Completed
Branch master (a559c4)
by
unknown
05:07
created
factory/_abstract/view/script/AdminPageFramework_Script_SortableSection.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework
4
- * 
5
- * http://en.michaeluno.jp/admin-page-framework/
6
- * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
- * 
8
- */
3
+     * Admin Page Framework
4
+     * 
5
+     * http://en.michaeluno.jp/admin-page-framework/
6
+     * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
+     * 
8
+     */
9 9
 
10 10
 /**
11 11
  * Provides methods for creating fields in the taxonomy page (edit-tags.php).
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,12 +105,12 @@
 block discarded – undo
105 105
         new self( $oMsg ); 
106 106
         
107 107
         // $aSettings              = $this->getAsArray( $aSettings );        
108
-        $_sScript       = <<<JAVASCRIPTS
108
+        $_sScript = <<<JAVASCRIPTS
109 109
 jQuery( document ).ready( function() {    
110 110
     jQuery( '#{$sContainerTagID}' ).enableAdminPageFrameworkSortableSections( '{$sContainerTagID}' ); 
111 111
 });            
112 112
 JAVASCRIPTS;
113
-        return "<script type='text/javascript' class='admin-page-framework-section-sortable-script'>" . $_sScript . "</script>";
113
+        return "<script type='text/javascript' class='admin-page-framework-section-sortable-script'>".$_sScript."</script>";
114 114
         
115 115
     }    
116 116
     
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,10 +94,10 @@
 block discarded – undo
94 94
      */
95 95
     static public function getEnabler( $sContainerTagID, $aSettings, $oMsg ) {
96 96
         
97
-        if ( empty( $aSettings ) ) { 
97
+        if ( empty( $aSettings ) ) {
98 98
             return ''; 
99 99
         }
100
-        if ( in_array( $sContainerTagID, self::$_aSetContainerIDsForSortableSections ) ) { 
100
+        if ( in_array( $sContainerTagID, self::$_aSetContainerIDsForSortableSections ) ) {
101 101
             return ''; 
102 102
         }
103 103
         self::$_aSetContainerIDsForSortableSections[ $sContainerTagID ] = $sContainerTagID;        
Please login to merge, or discard this patch.
development/factory/_abstract/view/script/AdminPageFramework_Script_Tab.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
      */
130 130
     static public function getEnabler() {
131 131
         
132
-        if ( self::$_bLoadedTabEnablerScript ) { 
132
+        if ( self::$_bLoadedTabEnablerScript ) {
133 133
             return ''; 
134 134
         }
135 135
         self::$_bLoadedTabEnablerScript = true;
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Model_Form.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
      * @since       3.3.0
67 67
      * @since       3.3.1       Moved from `AdminPageFramework_Setting_Base`.
68 68
      */
69
-    public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
69
+    public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
70 70
         
71 71
         parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain );
72 72
 
73 73
         if ( $this->oProp->bIsAdminAjax ) {
74 74
             return;
75 75
         }
76
-        if ( ! $this->oProp->bIsAdmin ) {
76
+        if ( !$this->oProp->bIsAdmin ) {
77 77
             return;
78 78
         }
79 79
         
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         new AdminPageFramework_Model_FormSubmission( $this );
82 82
                         
83 83
         // Checking the GET and POST methods.
84
-        if ( isset( $_REQUEST['apf_remote_request_test'] ) && '_testing' === $_REQUEST['apf_remote_request_test'] ) {
84
+        if ( isset( $_REQUEST[ 'apf_remote_request_test' ] ) && '_testing' === $_REQUEST[ 'apf_remote_request_test' ] ) {
85 85
             exit( 'OK' );
86 86
         }
87 87
         
@@ -100,19 +100,19 @@  discard block
 block discarded – undo
100 100
         AdminPageFramework_FieldTypeRegistration::_setFieldResources( $aField, $this->oProp, $this->oResource ); 
101 101
 
102 102
         // For the contextual help pane,
103
-        if ( $aField['help'] ) {
103
+        if ( $aField[ 'help' ] ) {
104 104
             $this->addHelpTab( 
105 105
                 array(
106
-                    'page_slug'                 => $aField['page_slug'],
107
-                    'page_tab_slug'             => $aField['tab_slug'],
108
-                    'help_tab_title'            => $aField['section_title'],
109
-                    'help_tab_id'               => $aField['section_id'],
106
+                    'page_slug'                 => $aField[ 'page_slug' ],
107
+                    'page_tab_slug'             => $aField[ 'tab_slug' ],
108
+                    'help_tab_title'            => $aField[ 'section_title' ],
109
+                    'help_tab_id'               => $aField[ 'section_id' ],
110 110
                     'help_tab_content'          => "<span class='contextual-help-tab-title'>" 
111
-                            . $aField['title'] 
112
-                        . "</span> - " . PHP_EOL
113
-                        . $aField['help'],
114
-                    'help_tab_sidebar_content'  => $aField['help_aside'] 
115
-                        ? $aField['help_aside'] 
111
+                            . $aField[ 'title' ] 
112
+                        . "</span> - ".PHP_EOL
113
+                        . $aField[ 'help' ],
114
+                    'help_tab_sidebar_content'  => $aField[ 'help_aside' ] 
115
+                        ? $aField[ 'help_aside' ] 
116 116
                         : "",
117 117
                 )
118 118
             );
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
                           
121 121
         // Call the field type callback method to let it know the field type is registered.
122 122
         if ( 
123
-            isset( $this->oProp->aFieldTypeDefinitions[ $aField['type'] ][ 'hfDoOnRegistration' ] ) 
124
-            && is_callable( $this->oProp->aFieldTypeDefinitions[ $aField['type'] ][ 'hfDoOnRegistration' ] )
123
+            isset( $this->oProp->aFieldTypeDefinitions[ $aField[ 'type' ] ][ 'hfDoOnRegistration' ] ) 
124
+            && is_callable( $this->oProp->aFieldTypeDefinitions[ $aField[ 'type' ] ][ 'hfDoOnRegistration' ] )
125 125
         ) {
126
-            call_user_func_array( $this->oProp->aFieldTypeDefinitions[ $aField['type'] ][ 'hfDoOnRegistration' ], array( $aField ) );
126
+            call_user_func_array( $this->oProp->aFieldTypeDefinitions[ $aField[ 'type' ] ][ 'hfDoOnRegistration' ], array( $aField ) );
127 127
         }            
128 128
         
129 129
     }            
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Router.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * 
28 28
      * @since       3.3.0
29 29
      */
30
-    function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
30
+    function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
31 31
                 
32 32
         // Objects
33 33
         $this->oProp = isset( $this->oProp ) 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @since       3.3.1       Moved from `AdminPageFramework_Base`.
67 67
      * @internal
68 68
      */
69
-    public function __call( $sMethodName, $aArgs=null ) {     
69
+    public function __call( $sMethodName, $aArgs = null ) {     
70 70
 
71 71
         $_sPageSlug             = $this->oProp->getCurrentPageSlug();
72 72
         $_sTabSlug              = $this->oProp->getCurrentTabSlug( $_sPageSlug );
@@ -77,22 +77,22 @@  discard block
 block discarded – undo
77 77
             'load_pre_',
78 78
         );        
79 79
         
80
-        switch( $this->_getCallbackName( $sMethodName, $_sPageSlug, $_aKnownMethodPrefixes ) ) {
80
+        switch ( $this->_getCallbackName( $sMethodName, $_sPageSlug, $_aKnownMethodPrefixes ) ) {
81 81
             case 'setup_pre':
82 82
                 $this->_doSetUp();
83 83
                 return;
84 84
                 
85 85
             // A callback of the call_page_{page slug} action hook
86
-            case $this->oProp->sClassHash . '_page_' . $_sPageSlug:
87
-                return $this->_renderPage( $_sPageSlug, $_sTabSlug );   // defined in AdminPageFramework_Page.
86
+            case $this->oProp->sClassHash.'_page_'.$_sPageSlug:
87
+                return $this->_renderPage( $_sPageSlug, $_sTabSlug ); // defined in AdminPageFramework_Page.
88 88
              
89 89
             // add_settings_section() callback 
90 90
             case 'section_pre_':
91
-                return $this->_renderSectionDescription( $sMethodName );    // defined in AdminPageFramework_Setting
91
+                return $this->_renderSectionDescription( $sMethodName ); // defined in AdminPageFramework_Setting
92 92
                 
93 93
             // add_settings_field() callback - 
94 94
             case 'field_pre_':
95
-                return $this->_renderSettingField( $_mFirstArg, $_sPageSlug );  // defined in AdminPageFramework_Setting
95
+                return $this->_renderSettingField( $_mFirstArg, $_sPageSlug ); // defined in AdminPageFramework_Setting
96 96
             
97 97
             // load-{page} callback            
98 98
             case 'load_pre_':
@@ -109,20 +109,20 @@  discard block
 block discarded – undo
109 109
          * @since       3.5.3
110 110
          * @return      string      The found callback method name or the prefix of a known callback method name. An empty string if not found.
111 111
          */
112
-        private function _getCallbackName( $sMethodName, $sPageSlug, array $aKnownMethodPrefixes=array() ) {
112
+        private function _getCallbackName( $sMethodName, $sPageSlug, array $aKnownMethodPrefixes = array() ) {
113 113
             
114 114
             if ( in_array( 
115 115
                     $sMethodName, 
116 116
                     array( 
117 117
                         'setup_pre',  
118
-                        $this->oProp->sClassHash . '_page_' . $sPageSlug
118
+                        $this->oProp->sClassHash.'_page_'.$sPageSlug
119 119
                     ) 
120 120
                 ) 
121 121
             ) {
122 122
                 return $sMethodName;
123 123
             }
124 124
             
125
-            foreach( $aKnownMethodPrefixes as $_sMethodPrefix ) {
125
+            foreach ( $aKnownMethodPrefixes as $_sMethodPrefix ) {
126 126
                 if ( $this->oUtil->hasPrefix( $_sMethodPrefix, $sMethodName ) ) {
127 127
                     return $_sMethodPrefix;
128 128
                 }
@@ -167,13 +167,13 @@  discard block
 block discarded – undo
167 167
          */ 
168 168
         protected function _doPageLoadCall( $sMethodName, $sPageSlug, $sTabSlug, $oScreen ) {
169 169
             
170
-            if ( ! $this->isPageLoadCall( $sMethodName, $sPageSlug, $oScreen->id ) ) {
170
+            if ( !$this->isPageLoadCall( $sMethodName, $sPageSlug, $oScreen->id ) ) {
171 171
                 return;
172 172
             }
173 173
 
174 174
             // [3.4.6+] Set the page and tab slugs to the default form section so that added form fields without a section will appear in different pages and tabs.
175
-            $this->oForm->aSections[ '_default' ]['page_slug']  = $sPageSlug ? $sPageSlug : null;
176
-            $this->oForm->aSections[ '_default' ]['tab_slug']   = $sTabSlug ? $sTabSlug : null;
175
+            $this->oForm->aSections[ '_default' ][ 'page_slug' ]  = $sPageSlug ? $sPageSlug : null;
176
+            $this->oForm->aSections[ '_default' ][ 'tab_slug' ]   = $sTabSlug ? $sTabSlug : null;
177 177
         
178 178
             // Do actions, class ->  page -> in-page tab
179 179
             $this->oUtil->addAndDoActions( 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             
190 190
             $this->oUtil->addAndDoActions( 
191 191
                 $this, // the caller object
192
-                array( "load_{$sPageSlug}_" . $this->oProp->getCurrentTabSlug( $sPageSlug ) ),
192
+                array( "load_{$sPageSlug}_".$this->oProp->getCurrentTabSlug( $sPageSlug ) ),
193 193
                 $this // the admin page object - this lets third-party scripts use the framework methods.
194 194
             );         
195 195
             
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                 if ( substr( $sMethodName, strlen( 'load_pre_' ) ) !== $sPageSlug ) {
218 218
                     return false;
219 219
                 }
220
-                if ( ! isset( $this->oProp->aPageHooks[ $sPageSlug ] ) ) {
220
+                if ( !isset( $this->oProp->aPageHooks[ $sPageSlug ] ) ) {
221 221
                     return false;
222 222
                 }
223 223
                 if ( $sScreenID !== $this->oProp->aPageHooks[ $sPageSlug ] ) {
@@ -238,12 +238,12 @@  discard block
 block discarded – undo
238 238
     protected function _isInstantiatable() {
239 239
         
240 240
         // Disable in admin-ajax.php
241
-        if ( isset( $GLOBALS['pagenow'] ) && 'admin-ajax.php' === $GLOBALS['pagenow'] ) {
241
+        if ( isset( $GLOBALS[ 'pagenow' ] ) && 'admin-ajax.php' === $GLOBALS[ 'pagenow' ] ) {
242 242
             return false;
243 243
         }
244 244
         
245 245
         // Nothing to do in the network admin area.
246
-        return ! is_network_admin();
246
+        return !is_network_admin();
247 247
         
248 248
     }
249 249
     
@@ -255,19 +255,19 @@  discard block
 block discarded – undo
255 255
      * @since       3.3.1       Moved from `AdminPageFramework_Base`.
256 256
      * @internal
257 257
      */
258
-    public function _isInThePage( $aPageSlugs=array() ) {
258
+    public function _isInThePage( $aPageSlugs = array() ) {
259 259
 
260 260
         // Maybe called too early
261
-        if ( ! isset( $this->oProp ) ) {
261
+        if ( !isset( $this->oProp ) ) {
262 262
             return true;
263 263
         }
264 264
         
265 265
         // If the setUp method is not loaded yet,
266
-        if ( ! $this->oProp->_bSetupLoaded ) {
266
+        if ( !$this->oProp->_bSetupLoaded ) {
267 267
             return true;
268 268
         }    
269 269
 
270
-        if ( ! isset( $_GET['page'] ) ) { return false; }
270
+        if ( !isset( $_GET[ 'page' ] ) ) { return false; }
271 271
                 
272 272
         $_oScreen = get_current_screen();
273 273
         if ( is_object( $_oScreen ) ) {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             return $this->oProp->isPageAdded();
279 279
         }
280 280
                 
281
-        return in_array( $_GET['page'], $aPageSlugs );
281
+        return in_array( $_GET[ 'page' ], $aPageSlugs );
282 282
         
283 283
     }    
284 284
     
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
      * @since       3.3.1       Moved from `AdminPageFramework_Base`.
67 67
      * @internal
68 68
      */
69
-    public function __call( $sMethodName, $aArgs=null ) {     
69
+    public function __call( $sMethodName, $aArgs=null ) {
70 70
 
71 71
         $_sPageSlug             = $this->oProp->getCurrentPageSlug();
72 72
         $_sTabSlug              = $this->oProp->getCurrentTabSlug( $_sPageSlug );
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_View.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
      */
28 28
     public function _replyToPrintAdminNotices() {
29 29
         
30
-        if ( ! $this->_isInThePage() ) { 
30
+        if ( !$this->_isInThePage() ) { 
31 31
             return; 
32 32
         }
33 33
         
34
-        foreach( $this->oProp->aAdminNotices as $_aAdminNotice ) {
34
+        foreach ( $this->oProp->aAdminNotices as $_aAdminNotice ) {
35 35
             
36 36
             $_sClassSelectors = $this->oUtil->getClassAttribute(
37 37
                 $this->oUtil->getElement(
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
      */
67 67
     public function _replyToDetermineToLoad( /* $oScreen */ ) {
68 68
         
69
-        if ( ! $this->_isInThePage() ) { 
69
+        if ( ! $this->_isInThePage() ) {
70 70
             return; 
71 71
         }
72 72
 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_View_Form.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function _replyToGetSectionName( /* $sAttribute, $aSectionset */ ) {
30 30
 
31
-        $_aParams            = func_get_args() + array( null, null,  );
31
+        $_aParams            = func_get_args() + array( null, null,);
32 32
         $sNameAttribute      = $_aParams[ 0 ];
33 33
         $aSectionset         = $_aParams[ 1 ];        
34 34
         
35 35
         $_aDimensionalKeys   = array( $this->oProp->sOptionKey );   
36
-        $_aDimensionalKeys[] = '[' . $aSectionset[ 'section_id' ] . ']';
36
+        $_aDimensionalKeys[ ] = '['.$aSectionset[ 'section_id' ].']';
37 37
         if ( isset( $aSectionset[ '_index' ] ) ) {
38
-            $_aDimensionalKeys[] = '[' . $aSectionset[ '_index' ] . ']';
38
+            $_aDimensionalKeys[ ] = '['.$aSectionset[ '_index' ].']';
39 39
         }
40 40
         
41 41
         return implode( '', $_aDimensionalKeys );
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function _replyToGetFieldNameAttribute( /* $sAttribute, $aFieldset */ ) {
50 50
         
51
-        $_aParams           = func_get_args() + array( null, null,  );
51
+        $_aParams           = func_get_args() + array( null, null,);
52 52
         $sNameAttribute     = $_aParams[ 0 ];
53 53
         $aFieldset          = $_aParams[ 1 ];        
54 54
         
55 55
         $_aDimensionalKeys  = array( $aFieldset[ 'option_key' ] );
56 56
         if ( $this->isSectionSet( $aFieldset ) ) {
57
-            $_aDimensionalKeys[] = '[' . $aFieldset[ 'section_id' ] . ']';
57
+            $_aDimensionalKeys[ ] = '['.$aFieldset[ 'section_id' ].']';
58 58
         }
59 59
         if ( isset( $aFieldset[ 'section_id' ], $aFieldset[ '_section_index' ] ) ) {
60
-            $_aDimensionalKeys[] = '[' . $aFieldset[ '_section_index' ] . ']';
60
+            $_aDimensionalKeys[ ] = '['.$aFieldset[ '_section_index' ].']';
61 61
         }
62
-        $_aDimensionalKeys[] = '[' . $aFieldset[ 'field_id' ] . ']';
62
+        $_aDimensionalKeys[ ] = '['.$aFieldset[ 'field_id' ].']';
63 63
         return implode( '', $_aDimensionalKeys );
64 64
         
65 65
     }
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function _replyToGetFlatFieldName( /* $sAttribute, $aFieldset */ ) {
72 72
 
73
-        $_aParams           = func_get_args() + array( null, null,  );
73
+        $_aParams           = func_get_args() + array( null, null,);
74 74
         $sNameAttribute     = $_aParams[ 0 ];
75 75
         $aFieldset          = $_aParams[ 1 ];        
76 76
         
77 77
         $_aDimensionalKeys  = array( $aFieldset[ 'option_key' ] );
78 78
         if ( $this->isSectionSet( $aFieldset ) ) {
79
-            $_aDimensionalKeys[] = $aFieldset[ 'section_id' ];
79
+            $_aDimensionalKeys[ ] = $aFieldset[ 'section_id' ];
80 80
         }
81 81
         if ( isset( $aFieldset[ 'section_id' ], $aFieldset[ '_section_index' ] ) ) {
82
-            $_aDimensionalKeys[] = $aFieldset[ '_section_index' ];
82
+            $_aDimensionalKeys[ ] = $aFieldset[ '_section_index' ];
83 83
         }
84
-        $_aDimensionalKeys[] = $aFieldset[ 'field_id' ];
84
+        $_aDimensionalKeys[ ] = $aFieldset[ 'field_id' ];
85 85
         return implode( '|', $_aDimensionalKeys );        
86 86
         
87 87
     }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             "[{$sKey}]"
105 105
         );   
106 106
         
107
-        return $this->_replyToGetFieldNameAttribute( '', $aField ) . $sKey;
107
+        return $this->_replyToGetFieldNameAttribute( '', $aField ).$sKey;
108 108
         
109 109
     }
110 110
     /**
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
         $_sKey              = $this->oUtil->getAOrB(
123 123
             '0' !== $_sKey && empty( $_sKey ),
124 124
             '',
125
-            "|" . $_sKey
125
+            "|".$_sKey
126 126
         );        
127 127
         
128
-        return $this->_replyToGetFlatFieldName( '', $aField ) . $_sKey;
128
+        return $this->_replyToGetFlatFieldName( '', $aField ).$_sKey;
129 129
 
130 130
     }
131 131
     
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
         return $this->oUtil->addAndApplyFilters(
143 143
             $this,
144
-            array( 'section_head_' . $this->oProp->sClassName . '_' . $aSection['section_id'] ), // section_{instantiated class name}_{section id}
144
+            array( 'section_head_'.$this->oProp->sClassName.'_'.$aSection[ 'section_id' ] ), // section_{instantiated class name}_{section id}
145 145
             $sSectionDescription
146 146
         );     
147 147
         
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
 
159 159
         $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
160 160
         $_sSectionID        = $this->oUtil->getElement( $aField, 'section_id', '_default' );
161
-        $_sFieldID          = $aField['field_id'];
161
+        $_sFieldID          = $aField[ 'field_id' ];
162 162
         
163 163
         // If the specified field does not exist, do nothing.
164
-        if ( $aField['page_slug'] != $_sCurrentPageSlug ) { 
164
+        if ( $aField[ 'page_slug' ] != $_sCurrentPageSlug ) { 
165 165
             return ''; 
166 166
         }
167 167
 
@@ -171,14 +171,14 @@  discard block
 block discarded – undo
171 171
             : $this->_getFieldErrors( $_sCurrentPageSlug );
172 172
 
173 173
         // Render the form field.         
174
-        $sFieldType = isset( $this->oProp->aFieldTypeDefinitions[ $aField['type'] ]['hfRenderField'] ) && is_callable( $this->oProp->aFieldTypeDefinitions[ $aField['type'] ]['hfRenderField'] )
175
-            ? $aField['type']
174
+        $sFieldType = isset( $this->oProp->aFieldTypeDefinitions[ $aField[ 'type' ] ][ 'hfRenderField' ] ) && is_callable( $this->oProp->aFieldTypeDefinitions[ $aField[ 'type' ] ][ 'hfRenderField' ] )
175
+            ? $aField[ 'type' ]
176 176
             : 'default'; // the predefined reserved field type is applied if the parsing field type is not defined(not found).
177 177
 
178
-        $_aTemp     = $this->getSavedOptions();    // assigning a variable for the strict standard
178
+        $_aTemp     = $this->getSavedOptions(); // assigning a variable for the strict standard
179 179
         $_oFieldset = new AdminPageFramework_FormFieldset( 
180 180
             $aField, 
181
-            $_aTemp,    // passed by reference. @todo: examine why it needs to be passed by reference.
181
+            $_aTemp, // passed by reference. @todo: examine why it needs to be passed by reference.
182 182
             $this->aFieldErrors, 
183 183
             $this->oProp->aFieldTypeDefinitions, 
184 184
             $this->oMsg,
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
         return $this->oUtil->addAndApplyFilters(
191 191
             $this,
192 192
             array( 
193
-                isset( $aField['section_id'] ) && '_default' !== $aField['section_id']
194
-                    ? 'field_' . $this->oProp->sClassName . '_' . $aField['section_id'] . '_' . $_sFieldID
195
-                    : 'field_' . $this->oProp->sClassName . '_' . $_sFieldID,
193
+                isset( $aField[ 'section_id' ] ) && '_default' !== $aField[ 'section_id' ]
194
+                    ? 'field_'.$this->oProp->sClassName.'_'.$aField[ 'section_id' ].'_'.$_sFieldID
195
+                    : 'field_'.$this->oProp->sClassName.'_'.$_sFieldID,
196 196
             ),
197 197
             $_sFieldOutput,
198 198
             $aField // the field array
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
         $_sFieldID          = $aField['field_id'];
162 162
         
163 163
         // If the specified field does not exist, do nothing.
164
-        if ( $aField['page_slug'] != $_sCurrentPageSlug ) { 
164
+        if ( $aField['page_slug'] != $_sCurrentPageSlug ) {
165 165
             return ''; 
166 166
         }
167 167
 
Please login to merge, or discard this patch.
factory/admin_page/controller/AdminPageFramework_HelpPane_Page.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
         $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
70 70
         $_sCurrentTabSlug   = $this->oProp->getCurrentTabSlug( $_sCurrentPageSlug );
71 71
         
72
-        if ( ! $this->oProp->isPageAdded( $_sCurrentPageSlug ) ) { 
72
+        if ( !$this->oProp->isPageAdded( $_sCurrentPageSlug ) ) { 
73 73
             return; 
74 74
         }
75 75
 
76
-        foreach( $this->oProp->aHelpTabs as $aHelpTab ) {
76
+        foreach ( $this->oProp->aHelpTabs as $aHelpTab ) {
77 77
             $this->_registerHelpTab( $aHelpTab, $_sCurrentPageSlug, $_sCurrentTabSlug );
78 78
         }
79 79
         
@@ -86,18 +86,18 @@  discard block
 block discarded – undo
86 86
          */
87 87
         private function _registerHelpTab( array $aHelpTab, $sCurrentPageSlug, $sCurrentTabSlug ) {
88 88
            
89
-            if ( $sCurrentPageSlug != $aHelpTab['sPageSlug'] ) { 
89
+            if ( $sCurrentPageSlug != $aHelpTab[ 'sPageSlug' ] ) { 
90 90
                 return;
91 91
             }
92
-            if ( isset( $aHelpTab['sPageTabSlug'] ) && ! empty( $aHelpTab['sPageTabSlug'] ) && $sCurrentTabSlug != $aHelpTab['sPageTabSlug'] ) {
92
+            if ( isset( $aHelpTab[ 'sPageTabSlug' ] ) && !empty( $aHelpTab[ 'sPageTabSlug' ] ) && $sCurrentTabSlug != $aHelpTab[ 'sPageTabSlug' ] ) {
93 93
                 return;
94 94
             }
95 95
 
96 96
             $this->_setHelpTab( 
97
-                $aHelpTab['sID'], 
98
-                $aHelpTab['sTitle'], 
99
-                $aHelpTab['aContent'], 
100
-                $aHelpTab['aSidebar']
97
+                $aHelpTab[ 'sID' ], 
98
+                $aHelpTab[ 'sTitle' ], 
99
+                $aHelpTab[ 'aContent' ], 
100
+                $aHelpTab[ 'aSidebar' ]
101 101
             );            
102 102
             
103 103
         }
@@ -128,24 +128,24 @@  discard block
 block discarded – undo
128 128
         $aHelpTab = ( array ) $aHelpTab + self::$_aStructure_HelpTabUserArray;
129 129
         
130 130
         // If the key is not set, that means the help tab array is not created yet. So create it and go back.
131
-        if ( ! isset( $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ] ) ) {
132
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ] = array(
133
-                'sID'           => $aHelpTab['help_tab_id'],
134
-                'sTitle'        => $aHelpTab['help_tab_title'],
135
-                'aContent'      => ! empty( $aHelpTab['help_tab_content'] ) ? array( $this->_formatHelpDescription( $aHelpTab['help_tab_content'] ) ) : array(),
136
-                'aSidebar'      => ! empty( $aHelpTab['help_tab_sidebar_content'] ) ? array( $this->_formatHelpDescription( $aHelpTab['help_tab_sidebar_content'] ) ) : array(),
137
-                'sPageSlug'     => $aHelpTab['page_slug'],
138
-                'sPageTabSlug'  => $aHelpTab['page_tab_slug'],
131
+        if ( !isset( $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ] ) ) {
132
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ] = array(
133
+                'sID'           => $aHelpTab[ 'help_tab_id' ],
134
+                'sTitle'        => $aHelpTab[ 'help_tab_title' ],
135
+                'aContent'      => !empty( $aHelpTab[ 'help_tab_content' ] ) ? array( $this->_formatHelpDescription( $aHelpTab[ 'help_tab_content' ] ) ) : array(),
136
+                'aSidebar'      => !empty( $aHelpTab[ 'help_tab_sidebar_content' ] ) ? array( $this->_formatHelpDescription( $aHelpTab[ 'help_tab_sidebar_content' ] ) ) : array(),
137
+                'sPageSlug'     => $aHelpTab[ 'page_slug' ],
138
+                'sPageTabSlug'  => $aHelpTab[ 'page_tab_slug' ],
139 139
             );
140 140
             return;
141 141
         }
142 142
 
143 143
         // This line will be reached if the help tab array is already set. In this case, just append an array element into the keys.
144
-        if ( ! empty( $aHelpTab['help_tab_content'] ) ) {
145
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ]['aContent'][] = $this->_formatHelpDescription( $aHelpTab['help_tab_content'] );
144
+        if ( !empty( $aHelpTab[ 'help_tab_content' ] ) ) {
145
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ][ 'aContent' ][ ] = $this->_formatHelpDescription( $aHelpTab[ 'help_tab_content' ] );
146 146
         }
147
-        if ( ! empty( $aHelpTab['help_tab_sidebar_content'] ) ) {
148
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ]['aSidebar'][] = $this->_formatHelpDescription( $aHelpTab['help_tab_sidebar_content'] );
147
+        if ( !empty( $aHelpTab[ 'help_tab_sidebar_content' ] ) ) {
148
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ][ 'aSidebar' ][ ] = $this->_formatHelpDescription( $aHelpTab[ 'help_tab_sidebar_content' ] );
149 149
         }
150 150
         
151 151
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
70 70
         $_sCurrentTabSlug   = $this->oProp->getCurrentTabSlug( $_sCurrentPageSlug );
71 71
         
72
-        if ( ! $this->oProp->isPageAdded( $_sCurrentPageSlug ) ) { 
72
+        if ( ! $this->oProp->isPageAdded( $_sCurrentPageSlug ) ) {
73 73
             return; 
74 74
         }
75 75
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
          */
87 87
         private function _registerHelpTab( array $aHelpTab, $sCurrentPageSlug, $sCurrentTabSlug ) {
88 88
            
89
-            if ( $sCurrentPageSlug != $aHelpTab['sPageSlug'] ) { 
89
+            if ( $sCurrentPageSlug != $aHelpTab['sPageSlug'] ) {
90 90
                 return;
91 91
             }
92 92
             if ( isset( $aHelpTab['sPageTabSlug'] ) && ! empty( $aHelpTab['sPageTabSlug'] ) && $sCurrentTabSlug != $aHelpTab['sPageTabSlug'] ) {
Please login to merge, or discard this patch.
development/factory/admin_page/controller/AdminPageFramework_Link_Page.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                 array( $this, '_replyToAddPostTypeQueryInEditPostLink' ), 
34 34
                 10, 
35 35
                 3 
36
-           );
36
+            );
37 37
         }        
38 38
     }
39 39
 
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function _replyToSetFooterInfo() {
38 38
 
39
-        if ( ! $this->oProp->isPageAdded() ) { 
39
+        if ( !$this->oProp->isPageAdded() ) { 
40 40
             return; 
41 41
         }
42 42
         parent::_replyToSetFooterInfo();
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function _addLinkToPluginDescription( $asLinks ) {
57 57
         
58
-        if ( ! is_array( $asLinks ) ) {
59
-            $this->oProp->aPluginDescriptionLinks[] = $asLinks;
58
+        if ( !is_array( $asLinks ) ) {
59
+            $this->oProp->aPluginDescriptionLinks[ ] = $asLinks;
60 60
         } else {
61
-            $this->oProp->aPluginDescriptionLinks = array_merge( $this->oProp->aPluginDescriptionLinks , $asLinks );
61
+            $this->oProp->aPluginDescriptionLinks = array_merge( $this->oProp->aPluginDescriptionLinks, $asLinks );
62 62
         }
63 63
 
64 64
         if ( 'plugins.php' !== $this->oProp->sPageNow ) {
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
      */    
78 78
     public function _addLinkToPluginTitle( $asLinks ) {
79 79
         
80
-        if ( ! is_array( $asLinks ) ) {
81
-            $this->oProp->aPluginTitleLinks[] = $asLinks;
80
+        if ( !is_array( $asLinks ) ) {
81
+            $this->oProp->aPluginTitleLinks[ ] = $asLinks;
82 82
         } else {
83 83
             $this->oProp->aPluginTitleLinks = array_merge( 
84 84
                 $this->oProp->aPluginTitleLinks, 
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
             if ( isset( $_sPluginBaseName ) ) {
114 114
                 return;
115 115
             }
116
-            $_sPluginBaseName = plugin_basename( $this->oProp->aScriptInfo['sPath'] );
116
+            $_sPluginBaseName = plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] );
117 117
             add_filter( 
118
-                $this->_sFilterSuffix_PluginActionLinks . $_sPluginBaseName, 
118
+                $this->_sFilterSuffix_PluginActionLinks.$_sPluginBaseName, 
119 119
                 array( $this, '_replyToAddLinkToPluginTitle' ) 
120 120
             );            
121 121
         }
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
      * @callback    filter      admin_footer_text
128 128
      * @return      string
129 129
      */ 
130
-    public function _replyToAddInfoInFooterLeft( $sLinkHTML='' ) {
130
+    public function _replyToAddInfoInFooterLeft( $sLinkHTML = '' ) {
131 131
 
132
-        if ( ! $this->_isPageAdded() ) {
132
+        if ( !$this->_isPageAdded() ) {
133 133
             return $sLinkHTML; // $sLinkHTML is given by the hook.
134 134
         }
135
-        $sLinkHTML  = empty( $this->oProp->aScriptInfo['sName'] )
135
+        $sLinkHTML = empty( $this->oProp->aScriptInfo[ 'sName' ] )
136 136
             ? $sLinkHTML
137
-            : $this->oProp->aFooterInfo['sLeft'];     
137
+            : $this->oProp->aFooterInfo[ 'sLeft' ];     
138 138
             
139 139
         $_sPageSlug = $this->oProp->getCurrentPageSlug();
140 140
         $_sTabSlug  = $this->oProp->getCurrentTabSlug();        
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
             array(                 
146 146
                 $this->getAOrB( 
147 147
                     $_sTabSlug,
148
-                    'footer_left_' . $_sPageSlug . '_' . $_sTabSlug,
148
+                    'footer_left_'.$_sPageSlug.'_'.$_sTabSlug,
149 149
                     null    // will be ignored
150 150
                 ),
151
-                'footer_left_' . $_sPageSlug,
152
-                'footer_left_' . $this->oProp->sClassName
151
+                'footer_left_'.$_sPageSlug,
152
+                'footer_left_'.$this->oProp->sClassName
153 153
             ),
154 154
             $sLinkHTML
155 155
         );        
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
      * @callback    filter      update_footer
163 163
      * @return      string
164 164
      */
165
-    public function _replyToAddInfoInFooterRight( $sLinkHTML='' ) {
165
+    public function _replyToAddInfoInFooterRight( $sLinkHTML = '' ) {
166 166
 
167
-        if ( ! $this->_isPageAdded() ) {
167
+        if ( !$this->_isPageAdded() ) {
168 168
             return $sLinkHTML; // $sLinkTHML is given by the hook.
169 169
         }
170 170
             
@@ -177,13 +177,13 @@  discard block
 block discarded – undo
177 177
             array(                 
178 178
                 $this->getAOrB( 
179 179
                     $_sTabSlug,
180
-                    'footer_right_' . $_sPageSlug . '_' . $_sTabSlug,
180
+                    'footer_right_'.$_sPageSlug.'_'.$_sTabSlug,
181 181
                     null    // will be ignored
182 182
                 ),
183
-                'footer_right_' . $_sPageSlug,
184
-                'footer_right_' . $this->oProp->sClassName
183
+                'footer_right_'.$_sPageSlug,
184
+                'footer_right_'.$this->oProp->sClassName
185 185
             ),
186
-            $this->oProp->aFooterInfo['sRight']
186
+            $this->oProp->aFooterInfo[ 'sRight' ]
187 187
         );             
188 188
             
189 189
     }
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
          */
196 196
         private function _isPageAdded() {
197 197
             
198
-            if ( ! isset( $_GET['page'] ) ) {
198
+            if ( !isset( $_GET[ 'page' ] ) ) {
199 199
                 return false;
200 200
             }            
201
-            return ( bool ) $this->oProp->isPageAdded( $_GET['page'] );
201
+            return ( bool ) $this->oProp->isPageAdded( $_GET[ 'page' ] );
202 202
 
203 203
         }
204 204
     /**
@@ -219,17 +219,17 @@  discard block
 block discarded – undo
219 219
             : $this->oProp->sLabelPluginSettingsLink;        
220 220
 
221 221
         // If the user disables the settings link, the label property is empty. If so, do not add it.
222
-        if ( ! $this->oProp->sLabelPluginSettingsLink ) {
222
+        if ( !$this->oProp->sLabelPluginSettingsLink ) {
223 223
             return $aLinks;
224 224
         }
225 225
         
226 226
         // For a custom root slug,
227
-        $_sLinkURL = preg_match( '/^.+\.php/', $this->oProp->aRootMenu['sPageSlug'] ) 
227
+        $_sLinkURL = preg_match( '/^.+\.php/', $this->oProp->aRootMenu[ 'sPageSlug' ] ) 
228 228
             ? add_query_arg( 
229 229
                 array( 
230 230
                     'page' => $this->oProp->sDefaultPageSlug 
231 231
                 ), 
232
-                admin_url( $this->oProp->aRootMenu['sPageSlug'] )
232
+                admin_url( $this->oProp->aRootMenu[ 'sPageSlug' ] )
233 233
             )
234 234
             : "admin.php?page={$this->oProp->sDefaultPageSlug}";
235 235
         
@@ -237,13 +237,13 @@  discard block
 block discarded – undo
237 237
         array_unshift(    
238 238
             $aLinks,
239 239
             // '<a href="' . esc_url( $_sLinkURL ) . '">' 
240
-            '<a ' . $this->getAttributes(
240
+            '<a '.$this->getAttributes(
241 241
                 array(
242 242
                     'href'      => esc_url( $_sLinkURL ),
243 243
                     // 3.5.7+ Added for acceptance testing
244 244
                     'class'     => 'apf-plugin-title-action-link apf-post-type',
245 245
                 )
246
-            ) . '>' 
246
+            ).'>' 
247 247
                 . $this->oProp->sLabelPluginSettingsLink 
248 248
             . '</a>'
249 249
         ); 
@@ -259,22 +259,22 @@  discard block
 block discarded – undo
259 259
      */
260 260
     public function _replyToAddLinkToPluginDescription( $aLinks, $sFile ) {
261 261
 
262
-        if ( $sFile != plugin_basename( $this->oProp->aScriptInfo['sPath'] ) ) { 
262
+        if ( $sFile != plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) { 
263 263
             return $aLinks; 
264 264
         }
265 265
         
266 266
         // Backward compatibility sanitisation.
267 267
         $_aAddingLinks = array();
268
-        foreach( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) {
268
+        foreach ( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) {
269 269
             
270
-            if ( ! $_sLLinkHTML ) {
270
+            if ( !$_sLLinkHTML ) {
271 271
                 continue;
272 272
             }
273 273
             if ( is_array( $_sLLinkHTML ) ) {  // should not be an array
274 274
                 $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks );
275 275
                 continue;
276 276
             } 
277
-            $_aAddingLinks[] = ( string ) $_sLLinkHTML;
277
+            $_aAddingLinks[ ] = ( string ) $_sLLinkHTML;
278 278
             
279 279
         }
280 280
         return array_merge( $aLinks, $_aAddingLinks );
@@ -288,16 +288,16 @@  discard block
 block discarded – undo
288 288
     public function _replyToAddLinkToPluginTitle( $aLinks ) {
289 289
 
290 290
         $_aAddingLinks = array();
291
-        foreach( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) {
291
+        foreach ( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) {
292 292
             
293
-            if ( ! $_sLinkHTML ) {
293
+            if ( !$_sLinkHTML ) {
294 294
                 continue;
295 295
             }
296 296
             if ( is_array( $_sLinkHTML ) ) {
297 297
                 $_aAddingLinks = array_merge( $_sLinkHTML, $aAddingLinks );
298 298
                 continue;
299 299
             } 
300
-            $_aAddingLinks[] = ( string ) $_sLinkHTML;
300
+            $_aAddingLinks[ ] = ( string ) $_sLinkHTML;
301 301
             
302 302
         }
303 303
         return array_merge( $aLinks, $_aAddingLinks );
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function _replyToSetFooterInfo() {
38 38
 
39
-        if ( ! $this->oProp->isPageAdded() ) { 
39
+        if ( ! $this->oProp->isPageAdded() ) {
40 40
             return; 
41 41
         }
42 42
         parent::_replyToSetFooterInfo();
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     public function _replyToAddSettingsLinkInPluginListingPage( $aLinks ) {
211 211
          
212 212
         // If the sub-pages are not added, do nothing.
213
-        if ( count( $this->oProp->aPages ) < 1 ) { 
213
+        if ( count( $this->oProp->aPages ) < 1 ) {
214 214
             return $aLinks; 
215 215
         }    
216 216
         
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     public function _replyToAddLinkToPluginDescription( $aLinks, $sFile ) {
261 261
 
262
-        if ( $sFile != plugin_basename( $this->oProp->aScriptInfo['sPath'] ) ) { 
262
+        if ( $sFile != plugin_basename( $this->oProp->aScriptInfo['sPath'] ) ) {
263 263
             return $aLinks; 
264 264
         }
265 265
         
@@ -270,7 +270,8 @@  discard block
 block discarded – undo
270 270
             if ( ! $_sLLinkHTML ) {
271 271
                 continue;
272 272
             }
273
-            if ( is_array( $_sLLinkHTML ) ) {  // should not be an array
273
+            if ( is_array( $_sLLinkHTML ) ) {
274
+// should not be an array
274 275
                 $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks );
275 276
                 continue;
276 277
             } 
Please login to merge, or discard this patch.
factory/admin_page/controller/AdminPageFramework_Resource_Page.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework
4
- * 
5
- * http://en.michaeluno.jp/admin-page-framework/
6
- * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
- * 
8
- */
3
+     * Admin Page Framework
4
+     * 
5
+     * http://en.michaeluno.jp/admin-page-framework/
6
+     * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
+     * 
8
+     */
9 9
 
10 10
 /**
11 11
  * Provides methods for creating fields in the taxonomy page (edit-tags.php).
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         
46 46
         // tab 
47 47
         if ( $_sPageSlug && $_sTabSlug ) {
48
-            $this->oProp->sStyle     = $this->addAndApplyFilters( 
48
+            $this->oProp->sStyle = $this->addAndApplyFilters( 
49 49
                 $_oCaller, 
50 50
                 "style_{$_sPageSlug}_{$_sTabSlug}", 
51 51
                 $this->oProp->sStyle 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         
55 55
         // page
56 56
         if ( $_sPageSlug ) {
57
-            $this->oProp->sStyle     = $this->addAndApplyFilters( 
57
+            $this->oProp->sStyle = $this->addAndApplyFilters( 
58 58
                 $_oCaller, 
59 59
                 "style_{$_sPageSlug}", 
60 60
                 $this->oProp->sStyle 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
          * @return      string      The tab slug if the tab has been added.
89 89
          */
90 90
         private function _getCurrentTabSlugForFilter( $sPageSlug ) {
91
-            $_sTabSlug  = $this->oProp->getCurrentTabSlug( $sPageSlug ); 
91
+            $_sTabSlug = $this->oProp->getCurrentTabSlug( $sPageSlug ); 
92 92
             return isset( $this->oProp->aInPageTabs[ $sPageSlug ][ $_sTabSlug ] )
93 93
                 ? $_sTabSlug
94 94
                 : '';          
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         
117 117
         // tab 
118 118
         if ( $_sPageSlug && $_sTabSlug ) {
119
-            $this->oProp->sScript     = $this->addAndApplyFilters( 
119
+            $this->oProp->sScript = $this->addAndApplyFilters( 
120 120
                 $_oCaller, 
121 121
                 "script_{$_sPageSlug}_{$_sTabSlug}", 
122 122
                 $this->oProp->sScript 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         
126 126
         // page
127 127
         if ( $_sPageSlug ) {
128
-            $this->oProp->sScript     = $this->addAndApplyFilters( 
128
+            $this->oProp->sScript = $this->addAndApplyFilters( 
129 129
                 $_oCaller, 
130 130
                 "script_{$_sPageSlug}", 
131 131
                 $this->oProp->sScript 
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
      * @since 2.1.5
144 144
      * @internal
145 145
      */
146
-    public function _enqueueStyles( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
146
+    public function _enqueueStyles( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
147 147
         
148 148
         $_aHandleIDs = array();
149
-        foreach( ( array ) $aSRCs as $_sSRC ) {
150
-            $_aHandleIDs[] = $this->_enqueueStyle( $_sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
149
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
150
+            $_aHandleIDs[ ] = $this->_enqueueStyle( $_sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
151 151
         }
152 152
         return $_aHandleIDs;
153 153
         
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      * @return      string  The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
174 174
      * @internal
175 175
      */    
176
-    public function _enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
176
+    public function _enqueueStyle( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
177 177
         return $this->_enqueueResourceByType( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs, 'style' );        
178 178
     }
179 179
     
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
      * 
183 183
      * @since 2.1.5
184 184
      */
185
-    public function _enqueueScripts( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
185
+    public function _enqueueScripts( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
186 186
         
187 187
         $_aHandleIDs = array();
188
-        foreach( ( array ) $aSRCs as $_sSRC ) {
189
-            $_aHandleIDs[] = $this->_enqueueScript( $_sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
188
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
189
+            $_aHandleIDs[ ] = $this->_enqueueScript( $_sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
190 190
         }
191 191
         return $_aHandleIDs;
192 192
         
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      * @return      string      The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
214 214
      * @internal
215 215
      */
216
-    public function _enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
216
+    public function _enqueueScript( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
217 217
         return $this->_enqueueResourceByType( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs, 'script' );
218 218
     }
219 219
         /**
@@ -226,20 +226,20 @@  discard block
 block discarded – undo
226 226
          * @param       array       $aCustomArgs    A custom argument array.
227 227
          * @param       string      $sType          Accepts 'style' or 'script'
228 228
          */
229
-        private function _enqueueResourceByType( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array(), $sType='style' ) {
229
+        private function _enqueueResourceByType( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array(), $sType = 'style' ) {
230 230
             
231
-            $sSRC       = trim( $sSRC );
231
+            $sSRC = trim( $sSRC );
232 232
             if ( empty( $sSRC ) ) { 
233 233
                 return ''; 
234 234
             }
235
-            $sSRC       = $this->getResolvedSRC( $sSRC );
235
+            $sSRC = $this->getResolvedSRC( $sSRC );
236 236
 
237 237
             // Get the property name for the type
238 238
             $_sContainerPropertyName     = $this->_getContainerPropertyNameByType( $sType );
239 239
             $_sEnqueuedIndexPropertyName = $this->_getEnqueuedIndexPropertyNameByType( $sType );
240 240
             
241 241
             // setting the key based on the url prevents duplicate items
242
-            $_sSRCHash  = md5( $sSRC );
242
+            $_sSRCHash = md5( $sSRC );
243 243
             if ( isset( $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ] ) ) { 
244 244
                 return ''; 
245 245
             } 
@@ -250,13 +250,13 @@  discard block
 block discarded – undo
250 250
                     'sTabSlug'  => $sTabSlug,
251 251
                     'sSRC'      => $sSRC,
252 252
                     'sType'     => $sType,
253
-                    'handle_id' => $sType . '_' . $this->oProp->sClassName . '_' .  ( ++$this->oProp->{$_sEnqueuedIndexPropertyName} ),
253
+                    'handle_id' => $sType.'_'.$this->oProp->sClassName.'_'.( ++$this->oProp->{$_sEnqueuedIndexPropertyName} ),
254 254
                 )
255 255
                 + self::$_aStructure_EnqueuingResources
256 256
                 ;
257 257
 
258 258
             // Store the attributes in another container by url.
259
-            $this->oProp->aResourceAttributes[ $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ]['handle_id'] ] = $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ]['attributes'];
259
+            $this->oProp->aResourceAttributes[ $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ][ 'attributes' ];
260 260
             
261 261
             return $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ][ 'handle_id' ];
262 262
             
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      * @since       3.0.0
297 297
      * @internal
298 298
      */
299
-    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) {
299
+    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) {
300 300
         return $this->_enqueueStyle( $sSRC, '', '', $aCustomArgs );
301 301
     }
302 302
     /**
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      * @since       3.0.0
307 307
      * @internal
308 308
      */    
309
-    public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) {
309
+    public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) {
310 310
         return $this->_enqueueScript( $sSRC, '', '', $aCustomArgs );
311 311
     }
312 312
     
@@ -323,11 +323,11 @@  discard block
 block discarded – undo
323 323
 
324 324
         $sCurrentPageSlug   = $this->oProp->getCurrentPageSlug();
325 325
         $sCurrentTabSlug    = $this->oProp->getCurrentTabSlug( $sCurrentPageSlug );
326
-        $sPageSlug          = $aEnqueueItem['sPageSlug'];
327
-        $sTabSlug           = $aEnqueueItem['sTabSlug'];
326
+        $sPageSlug          = $aEnqueueItem[ 'sPageSlug' ];
327
+        $sTabSlug           = $aEnqueueItem[ 'sTabSlug' ];
328 328
 
329 329
         // If the page slug is not specified and the currently loading page is one of the pages that is added by the framework,
330
-        if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework)
330
+        if ( !$sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework)
331 331
             return $this->_enqueueSRC( $aEnqueueItem );
332 332
         }
333 333
                 
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
         // If the tab slug is not specified and the page slug is specified, 
343 343
         // and if the current loading page slug and the specified one matches,
344 344
         if ( 
345
-            ( $sPageSlug && ! $sTabSlug )
345
+            ( $sPageSlug && !$sTabSlug )
346 346
             && ( $sCurrentPageSlug == $sPageSlug )
347 347
         ) {
348 348
             return $this->_enqueueSRC( $aEnqueueItem );
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         private function _enqueueResourceByType( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array(), $sType='style' ) {
230 230
             
231 231
             $sSRC       = trim( $sSRC );
232
-            if ( empty( $sSRC ) ) { 
232
+            if ( empty( $sSRC ) ) {
233 233
                 return ''; 
234 234
             }
235 235
             $sSRC       = $this->getResolvedSRC( $sSRC );
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             
241 241
             // setting the key based on the url prevents duplicate items
242 242
             $_sSRCHash  = md5( $sSRC );
243
-            if ( isset( $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ] ) ) { 
243
+            if ( isset( $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ] ) ) {
244 244
                 return ''; 
245 245
             } 
246 246
             
@@ -327,7 +327,8 @@  discard block
 block discarded – undo
327 327
         $sTabSlug           = $aEnqueueItem['sTabSlug'];
328 328
 
329 329
         // If the page slug is not specified and the currently loading page is one of the pages that is added by the framework,
330
-        if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework)
330
+        if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) {
331
+// means script-global(among pages added by the framework)
331 332
             return $this->_enqueueSRC( $aEnqueueItem );
332 333
         }
333 334
                 
Please login to merge, or discard this patch.