Completed
Branch dev (d064b2)
by
unknown
24:08 queued 04:45
created
include/class/utility/AdminPageFrameworkLoader_Utility.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             ),
35 35
             2 => __( 'Header already sent.', 'admin-page-framework-loader' ),
36 36
         );
37
-        if ( ! class_exists( 'AdminPageFramework_AdminNotice' ) ) {            
37
+        if ( !class_exists( 'AdminPageFramework_AdminNotice' ) ) {            
38 38
             return;
39 39
         }
40 40
         new AdminPageFramework_AdminNotice( 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             ),
35 35
             2 => __( 'Header already sent.', 'admin-page-framework-loader' ),
36 36
         );
37
-        if ( ! class_exists( 'AdminPageFramework_AdminNotice' ) ) {            
37
+        if ( ! class_exists( 'AdminPageFramework_AdminNotice' ) ) {
38 38
             return;
39 39
         }
40 40
         new AdminPageFramework_AdminNotice( 
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package         Admin Page Framework Loader
4
- * @copyright       Copyright (c) 2015, Michael Uno
5
- * @license         http://opensource.org/licenses/gpl-2.0.php GNU Public License
3
+     * @package         Admin Page Framework Loader
4
+     * @copyright       Copyright (c) 2015, Michael Uno
5
+     * @license         http://opensource.org/licenses/gpl-2.0.php GNU Public License
6 6
 */
7 7
 
8 8
 /** 
Please login to merge, or discard this patch.
_abstract/form/_view/css/AdminPageFramework_Form_View___CSS_Base.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @since   DEVVER
30 30
      */
31 31
     public function add( $sCSSRules ) {
32
-        $this->aAdded[] = $sCSSRules;
32
+        $this->aAdded[ ] = $sCSSRules;
33 33
     }
34 34
     
35 35
     /**
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function get() {
40 40
         
41
-        $_sCSSRules  = $this->_get() . PHP_EOL;
41
+        $_sCSSRules  = $this->_get().PHP_EOL;
42 42
         $_sCSSRules .= $this->_getVersionSpecific();
43 43
         $_sCSSRules .= implode( PHP_EOL, $this->aAdded );
44 44
         return $this->isDebugMode()
Please login to merge, or discard this patch.
_abstract/form/_view/css/AdminPageFramework_Form_View___CSS_Form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     protected function _get() {
25 25
 
26
-        $_sSpinnerURL  = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) );
26
+        $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) );
27 27
         return <<<CSSRULES
28 28
 .admin-page-framework-form-warning {
29 29
     font-weight: bold;
Please login to merge, or discard this patch.
_abstract/form/_view/css/AdminPageFramework_Form_View___CSS_Loading.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
      */
24 24
     protected function _get() {
25 25
 
26
-        $_sSpinnerPath = $this->getWPAdminDirPath() . '/images/wpspin_light-2x.gif';
27
-        if ( ! file_exists( $_sSpinnerPath ) ) {
26
+        $_sSpinnerPath = $this->getWPAdminDirPath().'/images/wpspin_light-2x.gif';
27
+        if ( !file_exists( $_sSpinnerPath ) ) {
28 28
             return '';
29 29
         }
30
-        $_sSpinnerURL  = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) );
30
+        $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) );
31 31
         return <<<CSSRULES
32 32
 .admin-page-framework-form-loading {
33 33
     position: absolute;
Please login to merge, or discard this patch.
factory/_abstract/utility/wp_utility/AdminPageFramework_WPUtility.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             1 => 'get_network_admin_url'
33 33
         );
34 34
         $_sWPAdminPath = str_replace( 
35
-            get_bloginfo( 'url' ) . '/', 
35
+            get_bloginfo( 'url' ).'/', 
36 36
             ABSPATH, 
37 37
             call_user_func( $_aFunctionNames[ ( integer ) is_network_admin() ] )
38 38
         );
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      * @since       DEVVER
50 50
      * @return      void
51 51
      */
52
-    static public function goToLocalURL( $sURL, $oCallbackOnError=null ) {
52
+    static public function goToLocalURL( $sURL, $oCallbackOnError = null ) {
53 53
         self::redirectByType( $sURL, 1, $oCallbackOnError );
54 54
     }
55 55
     
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @since       DEVVER      Added the second callback parameter.
61 61
      * @return      void
62 62
      */
63
-    static public function goToURL( $sURL, $oCallbackOnError=null ) {
63
+    static public function goToURL( $sURL, $oCallbackOnError = null ) {
64 64
         self::redirectByType( $sURL, 0, $oCallbackOnError );
65 65
     }
66 66
     
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @param       integer     $iType              0: external site, 1: local site (within the same domain).
71 71
      * @param       callable    $oCallbackOnError
72 72
      */
73
-    static public function redirectByType( $sURL, $iType=0, $oCallbackOnError=null ) {
73
+    static public function redirectByType( $sURL, $iType = 0, $oCallbackOnError = null ) {
74 74
      
75 75
         $_iRedirectError = self::getRedirectPreError( $sURL, $iType );
76 76
         if ( $_iRedirectError && is_callable( $oCallbackOnError ) ) {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     static public function getRedirectPreError( $sURL, $iType ) {
102 102
         
103 103
         // check only externnal urls as local ones can be a relative url and always fails the below check.
104
-        if ( ! $iType && filter_var( $sURL, FILTER_VALIDATE_URL) === false ) {
104
+        if ( !$iType && filter_var( $sURL, FILTER_VALIDATE_URL ) === false ) {
105 105
             return 1;
106 106
         }
107 107
         // If HTTP headers are already sent, redirect cannot be done.
Please login to merge, or discard this patch.
help/AdminPageFrameworkLoader_AdminPage_Help_Example.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             
24 24
         $_aItems     = $this->getContentsByHeader( $this->getReadmeContents(), 3 );
25 25
         $_iLastIndex = count( $_aItems ) - 1;
26
-        foreach( $_aItems as $_iIndex => $_aContent ) {
26
+        foreach ( $_aItems as $_iIndex => $_aContent ) {
27 27
 
28 28
             $_oParser   = new AdminPageFramework_WPReadmeParser;
29 29
             $_oParser->setText( $_aContent[ 1 ] );
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             $oAdminPage->addSettingSections(    
32 32
                 $this->sPageSlug, // the target page slug  
33 33
                 array(
34
-                    'section_id'        => 'examples_' . $_iIndex,             
34
+                    'section_id'        => 'examples_'.$_iIndex,             
35 35
                     'title'             => $_aContent[ 0 ],
36 36
                     'collapsible'       => array(
37 37
                         'toggle_all_button' => $_iLastIndex === $_iIndex 
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
         /**
53 53
          * @return      string
54 54
          */
55
-        private function getReadMeContents()  {       
55
+        private function getReadMeContents() {       
56 56
             return $this->_getReadmeContents( 
57
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/examples.txt',
57
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/examples.txt',
58 58
                 '',
59 59
                 array( 'Examples' )
60 60
             );     
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         /**
54 54
          * @return      string
55 55
          */
56
-        private function getReadMeContents()  {       
56
+        private function getReadMeContents() {
57 57
             return $this->_getReadmeContents( 
58 58
                 AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', // source path
59 59
                 '', // TOC title
Please login to merge, or discard this patch.
admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function replyToLoadTab( $oAdminPage ) {
23 23
 
24
-        $_aSections  = $this->getContentsByHeader( $this->getFAQContents(), 4 );
25
-        foreach( $_aSections as $_iIndex => $_aContent ) {
24
+        $_aSections = $this->getContentsByHeader( $this->getFAQContents(), 4 );
25
+        foreach ( $_aSections as $_iIndex => $_aContent ) {
26 26
             
27 27
             $_sTitle   = $_aContent[ 0 ];
28 28
             $_sContent = $this->_getFAQSubSections( $_aContent[ 1 ] );
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $oAdminPage->addSettingSections(    
33 33
                 $this->sPageSlug, // the target page slug  
34 34
                 array(
35
-                    'section_id'        => 'faq_sections_' . $_iIndex,
35
+                    'section_id'        => 'faq_sections_'.$_iIndex,
36 36
                     'tab_slug'          => $this->sTabSlug,                
37 37
                     'section_tab_slug'  => 'apf_faq',
38 38
                     'title'             => $_sTitle,
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
             
55 55
             $_aNestedSections = array();
56 56
             $_iLastIndex = count( $aItems ) - 1;
57
-            foreach( $aItems as $_iIndex => $_aContent ) {
57
+            foreach ( $aItems as $_iIndex => $_aContent ) {
58 58
                 
59
-                $_oParser   = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] );
59
+                $_oParser = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] );
60 60
                 
61 61
                 // If no sections, return the contents of the first item.
62
-                if ( ! $_aContent[ 0 ] ) {
62
+                if ( !$_aContent[ 0 ] ) {
63 63
                     return $_oParser->get();
64 64
                 }
65 65
                 
66
-                $_aNestedSections[] = array(
67
-                    'section_id'        => 'faq_item_' . $_iIndex,
66
+                $_aNestedSections[ ] = array(
67
+                    'section_id'        => 'faq_item_'.$_iIndex,
68 68
                     'title'             => $_aContent[ 0 ],
69 69
                     'collapsible'       => array(
70 70
                         'toggle_all_button' => $_iLastIndex === $_iIndex 
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
             return $_aNestedSections;
81 81
             
82 82
         }
83
-        private function getFAQContents()  {
83
+        private function getFAQContents() {
84 84
             
85
-            $_aReplacements   = array(
85
+            $_aReplacements = array(
86 86
                 '%PLUGIN_DIR_URL%'  => AdminPageFrameworkLoader_Registry::getPluginURL(),
87 87
                 '%WP_ADMIN_URL%'    => admin_url(),
88 88
             );
89 89
             $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( 
90
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt',
90
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt',
91 91
                 $_aReplacements
92 92
             );    
93 93
             return $_oWPReadmeParser->getRawSection( 'Frequently asked questions' );                        
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             return $_aNestedSections;
81 81
             
82 82
         }
83
-        private function getFAQContents()  {
83
+        private function getFAQContents() {
84 84
             
85 85
             $_aReplacements   = array(
86 86
                 '%PLUGIN_DIR_URL%'  => AdminPageFrameworkLoader_Registry::getPluginURL(),
Please login to merge, or discard this patch.
admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Tip.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
             
26 26
         $_aItems     = $this->getContentsByHeader( $this->getReadmeContents(), 4 );
27 27
         $_iLastIndex = count( $_aItems ) - 1;
28
-        foreach( $_aItems as $_iIndex => $_aContent ) {
28
+        foreach ( $_aItems as $_iIndex => $_aContent ) {
29 29
 
30 30
             $_oParser   = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] );
31 31
             $_sContent  = $_oParser->get();
32 32
             $oAdminPage->addSettingSections(    
33 33
                 $this->sPageSlug, // the target page slug  
34 34
                 array(
35
-                    'section_id'        => 'tips_' . $_iIndex,
35
+                    'section_id'        => 'tips_'.$_iIndex,
36 36
                     'title'             => $_aContent[ 0 ],
37 37
                     'collapsible'       => array(
38 38
                         'toggle_all_button' => $_iLastIndex === $_iIndex 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
         /**
54 54
          * @return      string
55 55
          */
56
-        private function getReadMeContents()  {       
56
+        private function getReadMeContents() {       
57 57
             return $this->_getReadmeContents( 
58
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', // source path
58
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt', // source path
59 59
                 '', // TOC title
60 60
                 array( 'Other Notes' )  // sections
61 61
             );
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         /**
54 54
          * @return      string
55 55
          */
56
-        private function getReadMeContents()  {       
56
+        private function getReadMeContents() {
57 57
             return $this->_getReadmeContents( 
58 58
                 AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', // source path
59 59
                 '', // TOC title
Please login to merge, or discard this patch.
form/_model/formatter/AdminPageFramework_Form_Model___FormatSectionset.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -35,41 +35,41 @@  discard block
 block discarded – undo
35 35
         // Optional
36 36
         'page_slug'         => null,
37 37
         'tab_slug'          => null,
38
-        'section_tab_slug'  => null,    // 3.0.0+
38
+        'section_tab_slug'  => null, // 3.0.0+
39 39
         'title'             => null,
40 40
         'description'       => null,
41 41
         'capability'        => null,
42 42
         'if'                => true,    
43
-        'order'             => null,    // do not set the default number here because incremented numbers will be added when registering the sections.
43
+        'order'             => null, // do not set the default number here because incremented numbers will be added when registering the sections.
44 44
         'help'              => null,
45 45
         'help_aside'        => null,
46
-        'repeatable'        => false,   // (boolean|array) 3.0.0+
47
-        'sortable'          => false,   // (boolean|array) 3.6.0+
46
+        'repeatable'        => false, // (boolean|array) 3.0.0+
47
+        'sortable'          => false, // (boolean|array) 3.6.0+
48 48
         'attributes'        => array(   // 3.3.1+
49
-            'class'         => null,    // set null to avoid undefined index warnings.
50
-            'style'         => null,    // set null to avoid undefined index warnings.
49
+            'class'         => null, // set null to avoid undefined index warnings.
50
+            'style'         => null, // set null to avoid undefined index warnings.
51 51
             'tab'           => array(),
52 52
         ),
53 53
         'class'             => array(    // 3.3.1+
54 54
             'tab'           => array(),
55 55
         ),
56
-        'hidden'            => false,    // 3.3.1+
57
-        'collapsible'       => false,    // 3.4.0+ (boolean|array) For the array structure see the $aStructure_CollapsibleArguments property.
58
-        'save'              => true,     // 3.6.0+
56
+        'hidden'            => false, // 3.3.1+
57
+        'collapsible'       => false, // 3.4.0+ (boolean|array) For the array structure see the $aStructure_CollapsibleArguments property.
58
+        'save'              => true, // 3.6.0+
59 59
         
60
-        'content'           => null,     // 3.6.1+  (string) An overriding section-set output.
60
+        'content'           => null, // 3.6.1+  (string) An overriding section-set output.
61 61
         
62
-        'tip'               => null,     // DEVVER  (string) Tool tip HTML strings. 
62
+        'tip'               => null, // DEVVER  (string) Tool tip HTML strings. 
63 63
         
64 64
         // Internal
65
-        '_fields_type'      => null,     // @deprecated DEVVER+ Use the `_structure_type` instead. 3.0.0+ - same as the one of the field definition array. Used to insert debug info at the bottom of sections.        
66
-        '_structure_type'   => null,     // DEVVER+
67
-        '_is_first_index'   => false,    // 3.4.0+ (boolean) indicates whether it is the first item of the sub-sections (for repeatable sections).
68
-        '_is_last_index'    => false,    // 3.4.0+ (boolean) indicates whether it is the last item of the sub-sections (for repeatable sections).
65
+        '_fields_type'      => null, // @deprecated DEVVER+ Use the `_structure_type` instead. 3.0.0+ - same as the one of the field definition array. Used to insert debug info at the bottom of sections.        
66
+        '_structure_type'   => null, // DEVVER+
67
+        '_is_first_index'   => false, // 3.4.0+ (boolean) indicates whether it is the first item of the sub-sections (for repeatable sections).
68
+        '_is_last_index'    => false, // 3.4.0+ (boolean) indicates whether it is the last item of the sub-sections (for repeatable sections).
69 69
         
70
-        '_section_path'         => '',       // DEVVER+ (string) e.g. my_section|nested_section       
71
-        '_section_path_array'   => '',       // DEVVER+ (array) an array version of the above section_path argument. Numerically indexed.
72
-        '_nested_depth'         => 0,        // DEVVER+ (integer) the nested level of the section
70
+        '_section_path'         => '', // DEVVER+ (string) e.g. my_section|nested_section       
71
+        '_section_path_array'   => '', // DEVVER+ (array) an array version of the above section_path argument. Numerically indexed.
72
+        '_nested_depth'         => 0, // DEVVER+ (integer) the nested level of the section
73 73
         
74 74
         // 3.6.0+ - (object) the caller framework factory object. This allows the framework to access the factory property when rendering the section.
75 75
         // DEVVER+  It no longer stores a factory object but a form object.
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
         $_aSectionPath = explode( '|', $this->sSectionPath );
125 125
         $_aSectionset  = $this->uniteArrays(
126 126
             array( 
127
-                '_fields_type'          => $this->sStructureType,   // @deprecated  DEVVER+
128
-                '_structure_type'       => $this->sStructureType,   // DEVVER+
129
-                '_section_path'         => $this->sSectionPath,     // DEVVER+
127
+                '_fields_type'          => $this->sStructureType, // @deprecated  DEVVER+
128
+                '_structure_type'       => $this->sStructureType, // DEVVER+
129
+                '_section_path'         => $this->sSectionPath, // DEVVER+
130 130
                 '_section_path_array'   => $_aSectionPath,
131
-                '_nested_depth'         => count( $_aSectionPath ) - 1,    // DEVVER+ - zero base
131
+                '_nested_depth'         => count( $_aSectionPath ) - 1, // DEVVER+ - zero base
132 132
             ) 
133 133
             + $this->aSectionset
134 134
             + array(
Please login to merge, or discard this patch.