Completed
Branch master (b9c20c)
by
unknown
03:58
created
factory/admin_page/_controller/AdminPageFramework_Link_admin_page.php 3 patches
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();
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     public function _replyToAddSettingsLinkInPluginListingPage( $aLinks ) {
212 212
          
213 213
         // If the sub-pages are not added, do nothing.
214
-        if ( count( $this->oProp->aPages ) < 1 ) { 
214
+        if ( count( $this->oProp->aPages ) < 1 ) {
215 215
             return $aLinks; 
216 216
         }    
217 217
         
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
      */
261 261
     public function _replyToAddLinkToPluginDescription( $aLinks, $sFile ) {
262 262
 
263
-        if ( $sFile !== plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) { 
263
+        if ( $sFile !== plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) {
264 264
             return $aLinks; 
265 265
         }
266 266
         
@@ -271,7 +271,8 @@  discard block
 block discarded – undo
271 271
             if ( ! $_sLLinkHTML ) {
272 272
                 continue;
273 273
             }
274
-            if ( is_array( $_sLLinkHTML ) ) {  // should not be an array
274
+            if ( is_array( $_sLLinkHTML ) ) {
275
+// should not be an array
275 276
                 $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks );
276 277
                 continue;
277 278
             } 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
             $this->oProp->aPluginTitleLinks = array_merge( 
91 91
                 $this->oProp->aPluginTitleLinks, 
92 92
                 $asLinks 
93
-           );
93
+            );
94 94
         }
95 95
                 
96 96
         $this->_addFilterHook_PluginTitleActionLink();
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 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();
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function _addLinkToPluginDescription( $asLinks ) {
58 58
         
59
-        if ( ! is_array( $asLinks ) ) {
60
-            $this->oProp->aPluginDescriptionLinks[] = $asLinks;
59
+        if ( !is_array( $asLinks ) ) {
60
+            $this->oProp->aPluginDescriptionLinks[ ] = $asLinks;
61 61
         } else {
62 62
             $this->oProp->aPluginDescriptionLinks = array_merge( 
63 63
                 $this->oProp->aPluginDescriptionLinks, 
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
      */    
85 85
     public function _addLinkToPluginTitle( $asLinks ) {
86 86
         
87
-        if ( ! is_array( $asLinks ) ) {
88
-            $this->oProp->aPluginTitleLinks[] = $asLinks;
87
+        if ( !is_array( $asLinks ) ) {
88
+            $this->oProp->aPluginTitleLinks[ ] = $asLinks;
89 89
         } else {
90 90
             $this->oProp->aPluginTitleLinks = array_merge( 
91 91
                 $this->oProp->aPluginTitleLinks, 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             }
121 121
             $_sPluginBaseName = plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] );
122 122
             add_filter( 
123
-                $this->_sFilterSuffix_PluginActionLinks . $_sPluginBaseName, 
123
+                $this->_sFilterSuffix_PluginActionLinks.$_sPluginBaseName, 
124 124
                 array( $this, '_replyToAddPluginActionLinks' ) 
125 125
             );            
126 126
         }
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
      * @return      string
134 134
      * @internal
135 135
      */ 
136
-    public function _replyToAddInfoInFooterLeft( $sLinkHTML='' ) {
136
+    public function _replyToAddInfoInFooterLeft( $sLinkHTML = '' ) {
137 137
 
138
-        if ( ! $this->_isPageAdded() ) {
138
+        if ( !$this->_isPageAdded() ) {
139 139
             return $sLinkHTML; // $sLinkHTML is given by the hook.
140 140
         }
141
-        $sLinkHTML  = empty( $this->oProp->aScriptInfo['sName'] )
141
+        $sLinkHTML = empty( $this->oProp->aScriptInfo[ 'sName' ] )
142 142
             ? $sLinkHTML
143
-            : $this->oProp->aFooterInfo['sLeft'];     
143
+            : $this->oProp->aFooterInfo[ 'sLeft' ];     
144 144
             
145 145
         $_sPageSlug = $this->oProp->getCurrentPageSlug();
146 146
         $_sTabSlug  = $this->oProp->getCurrentTabSlug();        
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
             array(                 
152 152
                 $this->getAOrB( 
153 153
                     $_sTabSlug,
154
-                    'footer_left_' . $_sPageSlug . '_' . $_sTabSlug,
154
+                    'footer_left_'.$_sPageSlug.'_'.$_sTabSlug,
155 155
                     null    // will be ignored
156 156
                 ),
157
-                'footer_left_' . $_sPageSlug,
158
-                'footer_left_' . $this->oProp->sClassName
157
+                'footer_left_'.$_sPageSlug,
158
+                'footer_left_'.$this->oProp->sClassName
159 159
             ),
160 160
             $sLinkHTML
161 161
         );        
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
      * @return      string
170 170
      * @internal
171 171
      */
172
-    public function _replyToAddInfoInFooterRight( $sLinkHTML='' ) {
172
+    public function _replyToAddInfoInFooterRight( $sLinkHTML = '' ) {
173 173
 
174
-        if ( ! $this->_isPageAdded() ) {
174
+        if ( !$this->_isPageAdded() ) {
175 175
             return $sLinkHTML; // $sLinkTHML is given by the hook.
176 176
         }
177 177
             
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
             array(                 
185 185
                 $this->getAOrB( 
186 186
                     $_sTabSlug,
187
-                    'footer_right_' . $_sPageSlug . '_' . $_sTabSlug,
187
+                    'footer_right_'.$_sPageSlug.'_'.$_sTabSlug,
188 188
                     null    // will be ignored
189 189
                 ),
190
-                'footer_right_' . $_sPageSlug,
191
-                'footer_right_' . $this->oProp->sClassName
190
+                'footer_right_'.$_sPageSlug,
191
+                'footer_right_'.$this->oProp->sClassName
192 192
             ),
193
-            $this->oProp->aFooterInfo['sRight']
193
+            $this->oProp->aFooterInfo[ 'sRight' ]
194 194
         );             
195 195
             
196 196
     }
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
          */
204 204
         private function _isPageAdded() {
205 205
             
206
-            if ( ! isset( $_GET['page'] ) ) {
206
+            if ( !isset( $_GET[ 'page' ] ) ) {
207 207
                 return false;
208 208
             }            
209
-            return ( bool ) $this->oProp->isPageAdded( $_GET['page'] );
209
+            return ( bool ) $this->oProp->isPageAdded( $_GET[ 'page' ] );
210 210
 
211 211
         }
212 212
     /**
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             : $this->oProp->sLabelPluginSettingsLink;        
229 229
 
230 230
         // If the user disables the settings link, the label property is empty. If so, do not add it.
231
-        if ( ! $this->oProp->sLabelPluginSettingsLink ) {
231
+        if ( !$this->oProp->sLabelPluginSettingsLink ) {
232 232
             return $aLinks;
233 233
         }
234 234
 
@@ -246,13 +246,13 @@  discard block
 block discarded – undo
246 246
         array_unshift(    
247 247
             $aLinks,
248 248
             // '<a href="' . esc_url( $_sLinkURL ) . '">' 
249
-            '<a ' . $this->getAttributes(
249
+            '<a '.$this->getAttributes(
250 250
                 array(
251 251
                     'href'      => esc_url( $_sLinkURL ),
252 252
                     // 3.5.7+ Added for acceptance testing
253 253
                     'class'     => 'apf-plugin-title-action-link apf-post-type',
254 254
                 )
255
-            ) . '>' 
255
+            ).'>' 
256 256
                 . $this->oProp->sLabelPluginSettingsLink 
257 257
             . '</a>'
258 258
         ); 
@@ -275,16 +275,16 @@  discard block
 block discarded – undo
275 275
         
276 276
         // Backward compatibility sanitisation.
277 277
         $_aAddingLinks = array();
278
-        foreach( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) {
278
+        foreach ( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) {
279 279
             
280
-            if ( ! $_sLLinkHTML ) {
280
+            if ( !$_sLLinkHTML ) {
281 281
                 continue;
282 282
             }
283 283
             if ( is_array( $_sLLinkHTML ) ) {  // should not be an array
284 284
                 $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks );
285 285
                 continue;
286 286
             } 
287
-            $_aAddingLinks[] = ( string ) $_sLLinkHTML;
287
+            $_aAddingLinks[ ] = ( string ) $_sLLinkHTML;
288 288
             
289 289
         }
290 290
         return array_merge( $aLinks, $_aAddingLinks );
@@ -301,13 +301,13 @@  discard block
 block discarded – undo
301 301
     public function _replyToAddPluginActionLinks( $aLinks ) {
302 302
 
303 303
         $_aAddingLinks = array();
304
-        foreach( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) {
304
+        foreach ( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) {
305 305
 
306 306
             if ( is_array( $_sLinkHTML ) ) {
307 307
                 $_aAddingLinks = array_merge( $_sLinkHTML, $aAddingLinks );
308 308
                 continue;
309 309
             } 
310
-            $_aAddingLinks[] = ( string ) $_sLinkHTML;
310
+            $_aAddingLinks[ ] = ( string ) $_sLinkHTML;
311 311
             
312 312
         }
313 313
         return array_merge( $aLinks, $_aAddingLinks );
Please login to merge, or discard this patch.
AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
34 34
                 
35 35
         // if the 'reset' key in the field definition array is set, this value will be set.
36
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
36
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
37 37
             return;
38 38
         }
39 39
         
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         );
44 44
                     
45 45
         // Go to the catch clause.
46
-        $_oException = new Exception( 'aReturn' );  // the property name to return from the catch clasue.
46
+        $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clasue.
47 47
         $_oException->aReturn = $this->_confirmSubmitButtonAction( 
48 48
             $this->getElement( $aSubmitInformation, 'input_name' ),
49 49
             $this->getElement( $aSubmitInformation, 'section_id' ),
Please login to merge, or discard this patch.
AdminPageFramework_Model__FormSubmission__Validator__ContactForm.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 class AdminPageFramework_Model__FormSubmission__Validator__ContactForm extends AdminPageFramework_Model__FormSubmission__Validator_Base {
19 19
     
20
-    public $sActionHookPrefix = 'try_validation_after_';    // 3.7.6 Changed it from `try_validation_before_`
20
+    public $sActionHookPrefix = 'try_validation_after_'; // 3.7.6 Changed it from `try_validation_before_`
21 21
     public $iHookPriority = 10;
22 22
     public $iCallbackParameters = 5;
23 23
  
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
35 35
                 
36 36
         // Check whether sending an email has been confirmed by the user or not.
37
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
37
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
38 38
             return;
39 39
         }
40 40
         
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
             $this->getElement( $aSubmitInformation, 'section_id' )
46 46
         );
47 47
         $this->oFactory->oProp->_bDisableSavingOptions = true;
48
-        $this->deleteTransient( 'apf_tfd' . md5( 'temporary_form_data_' . $this->oFactory->oProp->sClassName . get_current_user_id() ) );
48
+        $this->deleteTransient( 'apf_tfd'.md5( 'temporary_form_data_'.$this->oFactory->oProp->sClassName.get_current_user_id() ) );
49 49
         
50 50
         // Schedule to remove the confirmation url query key.
51 51
         add_action( "setting_update_url_{$this->oFactory->oProp->sClassName}", array( $this, '_replyToRemoveConfirmationQueryKey' ) );
52 52
         
53 53
         // Go to the catch clause.
54
-        $_oException = new Exception( 'aReturn' );  // the property name to return from the catch clause.
54
+        $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause.
55 55
         $_oException->aReturn = $aInputs;
56 56
         throw $_oException;
57 57
     
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
          */
87 87
         private function _sendEmailInBackground( $aInputs, $sPressedInputNameFlat, $sSubmitSectionID ) {
88 88
             
89
-            $_sTranskentKey = 'apf_em_' . md5( $sPressedInputNameFlat . get_current_user_id() );
89
+            $_sTranskentKey = 'apf_em_'.md5( $sPressedInputNameFlat.get_current_user_id() );
90 90
             $_aEmailOptions = $this->getTransient( $_sTranskentKey );
91 91
             $this->deleteTransient( $_sTranskentKey );
92 92
 
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
                 'name'          => '',
102 102
             );
103 103
 
104
-            $_sTransientKey  = 'apf_emd_' . md5( $sPressedInputNameFlat . get_current_user_id() );
104
+            $_sTransientKey  = 'apf_emd_'.md5( $sPressedInputNameFlat.get_current_user_id() );
105 105
             $_aFormEmailData = array(
106 106
                 'email_options' => $_aEmailOptions,
107 107
                 'input'         => $aInputs,
108 108
                 'section_id'    => $sSubmitSectionID,
109 109
             );
110
-            $_bIsSet = $this->setTransient( $_sTransientKey,  $_aFormEmailData, 100 );
110
+            $_bIsSet = $this->setTransient( $_sTransientKey, $_aFormEmailData, 100 );
111 111
             
112 112
             // Send the email in the background.
113 113
             wp_remote_get( 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             );  
126 126
             
127 127
             // @remark      Not possible to tell whether it is sent or not at the moment because it is performed in the background.
128
-            $_bSent      = $_bIsSet;    
128
+            $_bSent = $_bIsSet;    
129 129
             $this->oFactory->setSettingNotice( 
130 130
                 $this->oFactory->oMsg->get( 
131 131
                     $this->getAOrB( 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
          * @return      string
148 148
          */
149 149
         public function _replyToRemoveConfirmationQueryKey( $sSettingUpdateURL ) {
150
-            return remove_query_arg( array( 'confirmation', ), $sSettingUpdateURL );
150
+            return remove_query_arg( array( 'confirmation',), $sSettingUpdateURL );
151 151
         }      
152 152
         
153 153
 }
Please login to merge, or discard this patch.
AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
35 35
                                 
36
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
36
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
37 37
             return;
38 38
         }
39 39
         
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         );            
47 47
         
48 48
         // Go to the catch clause.
49
-        $_oException = new Exception( 'aReturn' );  // the property name to return from the catch clasue.
49
+        $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clasue.
50 50
         $_oException->aReturn = $this->_confirmSubmitButtonAction( 
51 51
             $this->getElement( $aSubmitInformation, 'input_name' ), 
52 52
             $this->getElement( $aSubmitInformation, 'section_id' ), 
Please login to merge, or discard this patch.
factory/admin_page/_view/AdminPageFramework_View__PageMetaboxEnabler.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
          */
52 52
         public function _replyToEnableMetaBox() {
53 53
 
54
-            if ( ! $this->_isMetaBoxAdded() ) {
54
+            if ( !$this->_isMetaBoxAdded() ) {
55 55
                 return;
56 56
             }
57 57
 
58
-            $_sCurrentScreenID =  $this->getCurrentScreenID();
58
+            $_sCurrentScreenID = $this->getCurrentScreenID();
59 59
 
60 60
             // Trigger the add_meta_boxes hooks to allow meta boxes to be added.
61 61
             do_action( "add_meta_boxes_{$_sCurrentScreenID}", null );
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             // the network admin adds '-network' in the screen ID and the hooks with that id won't be triggered so use the 'page_hook' global variable.
86 86
             if ( isset( $GLOBALS[ 'page_hook' ] ) ) {
87 87
                 add_action( 
88
-                    "admin_footer-{$GLOBALS['page_hook']}", 
88
+                    "admin_footer-{$GLOBALS[ 'page_hook' ]}", 
89 89
                     array( $this, '_replyToAddMetaboxScript' ) 
90 90
                 );    
91 91
             }
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
                 }
110 110
                 
111 111
                 $_sPageSlug = $this->getElement( $_GET, 'page', '' );
112
-                if ( ! $_sPageSlug ) {     
112
+                if ( !$_sPageSlug ) {     
113 113
                     return false;
114 114
                 }
115 115
                 
116
-                foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
116
+                foreach ( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
117 117
                     if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { 
118 118
                         return true; 
119 119
                     }
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
                  */
132 132
                 private function _isPageOfMetaBox( $sPageSlug, $oMetaBox ) {
133 133
                     
134
-                    if ( in_array( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) {
134
+                    if ( in_array( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) {
135 135
                         return true; // for numeric keys with a string value.
136 136
                     }
137
-                    if ( ! array_key_exists( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) {
137
+                    if ( !array_key_exists( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) {
138 138
                         return false; // for keys of page slugs, the key does not exist, it means not added.
139 139
                     }
140 140
                     
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,12 +109,12 @@
 block discarded – undo
109 109
                 }
110 110
                 
111 111
                 $_sPageSlug = $this->getElement( $_GET, 'page', '' );
112
-                if ( ! $_sPageSlug ) {     
112
+                if ( ! $_sPageSlug ) {
113 113
                     return false;
114 114
                 }
115 115
                 
116 116
                 foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
117
-                    if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { 
117
+                    if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) {
118 118
                         return true; 
119 119
                     }
120 120
                 }
Please login to merge, or discard this patch.
development/factory/admin_page/form/AdminPageFramework_Form_admin_page.php 3 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -52,16 +52,16 @@  discard block
 block discarded – undo
52 52
     public function getPageOnlyOptions( $aOptions, $sPageSlug ) {
53 53
 
54 54
         $_aStoredOptionsOfThePage = array();
55
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
55
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
56 56
             
57 57
             // Check the section
58
-            if ( ! $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
58
+            if ( !$this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
59 59
                 continue;
60 60
             }
61 61
 
62 62
             // At this point, the element belongs the given page slug as the section is of the given page slug's.
63 63
             $this->_setPageOnlyOptions( 
64
-                $_aStoredOptionsOfThePage,  // by reference - gets updated in the method.
64
+                $_aStoredOptionsOfThePage, // by reference - gets updated in the method.
65 65
                 $aOptions, 
66 66
                 $_aSubSectionsOrFields, 
67 67
                 $sPageSlug,
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
          * @internal
82 82
          */
83 83
         private function _setPageOnlyOptions( array &$_aStoredOptionsOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug, $_sSectionID ) {
84
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
84
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
85 85
                 
86 86
                 // If it's a sub-section array,
87 87
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public function getOtherPageOptions( $aOptions, $sPageSlug ) {
154 154
 
155 155
         $_aStoredOptionsNotOfThePage = array();
156
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
156
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
157 157
             
158 158
             // Check the section
159 159
             if ( $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
          * @internal
183 183
          */
184 184
         private function _setOtherPageOptions( array &$_aStoredOptionsNotOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug ) {
185
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
185
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
186 186
 
187 187
                 // It's a sub-section array. 
188 188
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     public function getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug ) {
246 246
 
247 247
         $_aStoredOptionsNotOfTheTab = array();
248
-        foreach( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) {
248
+        foreach ( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) {
249 249
                         
250 250
             // If the section is of the given page and the given tab, skip.
251 251
             if ( $this->_isThisSectionSetToThisTab( $_sSectionPath, $sPageSlug, $sTabSlug ) ) {
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         private function _setOtherTabOptions( array &$_aStoredOptionsNotOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $sSectionPath ) {
277 277
             
278 278
             // At this point, the passed element belongs to the other tabs since the section of the given tab is skipped.
279
-            foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField  ) {
279
+            foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField ) {
280 280
                 
281 281
                 // If it's a sub section
282 282
                 if ( $this->isNumericInteger( $_isSubSectionIndexOrFieldID ) ) {
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
335 335
      * @return      array
336 336
      */
337
-    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {     
337
+    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug = '' ) {     
338 338
                 
339 339
         $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug );
340 340
         $_aTabOptions      = $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions );       
@@ -352,17 +352,17 @@  discard block
 block discarded – undo
352 352
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
353 353
      * @return      array
354 354
      */
355
-    public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) {
355
+    public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug = '' ) {
356 356
         
357 357
         $_aStoredOptionsOfTheTab = array();
358
-        if ( ! $sTabSlug ) { 
358
+        if ( !$sTabSlug ) { 
359 359
             return $_aStoredOptionsOfTheTab; 
360 360
         }
361 361
         
362
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
362
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
363 363
              
364 364
             // Check the section
365
-            if ( ! $this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) {
365
+            if ( !$this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) {
366 366
                 continue;
367 367
             }
368 368
             
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
          */
389 389
         private function _setTabOnlyOptions( array &$_aStoredOptionsOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $_sSectionID ) {
390 390
             
391
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
391
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
392 392
                                 
393 393
                 // if it's a sub-section array.
394 394
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
      */
446 446
     private function _isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) {
447 447
         
448
-        if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) {
448
+        if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) {
449 449
             return false;
450 450
         }
451 451
         return ( 
@@ -463,10 +463,10 @@  discard block
 block discarded – undo
463 463
      */
464 464
     private function _isThisSectionSetToThisTab( $sSectionPath, $sPageSlug, $sTabSlug ) {
465 465
         
466
-        if ( ! $this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) {
466
+        if ( !$this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) {
467 467
             return false;
468 468
         }
469
-        if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) {
469
+        if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) {
470 470
             return false;
471 471
         }
472 472
         return (
@@ -483,9 +483,9 @@  discard block
 block discarded – undo
483 483
      */
484 484
     private function _setOptionValue( &$aSubject, $asDimensionalPath, $aOptions ) {
485 485
         $_aDimensionalPath = $this->getAsArray( $asDimensionalPath );
486
-        $_mValue     = $this->getElement(
486
+        $_mValue = $this->getElement(
487 487
             $aOptions,
488
-            $_aDimensionalPath,    // as of 3.7.0, it can be an array or string
488
+            $_aDimensionalPath, // as of 3.7.0, it can be an array or string
489 489
             null
490 490
         );
491 491
         if ( isset( $_mValue ) ) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -458,6 +458,7 @@
 block discarded – undo
458 458
      * @internal
459 459
      * @since       3.5.3
460 460
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
461
+     * @param string $sTabSlug
461 462
      * @return      boolean
462 463
      */
463 464
     private function _isThisSectionSetToThisTab( $sSectionPath, $sPageSlug, $sTabSlug ) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 );
107 107
                 // @todo Examine whether this check can be removed 
108 108
                 // as the section that hods this field is already checked above outside this loop.
109
-                if ( $sPageSlug !== $_aFieldset[ 'page_slug' ] ) { 
109
+                if ( $sPageSlug !== $_aFieldset[ 'page_slug' ] ) {
110 110
                     continue; 
111 111
                 }        
112 112
                 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
334 334
      * @return      array
335 335
      */
336
-    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {     
336
+    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {
337 337
                 
338 338
         $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug );
339 339
         $_aTabOptions      = $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions );       
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) {
355 355
         
356 356
         $_aStoredOptionsOfTheTab = array();
357
-        if ( ! $sTabSlug ) { 
357
+        if ( ! $sTabSlug ) {
358 358
             return $_aStoredOptionsOfTheTab; 
359 359
         }
360 360
         
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_View_Page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      * @return      void
65 65
      * @internal
66 66
      */ 
67
-    protected function _renderPage( $sPageSlug, $sTabSlug=null ) {
67
+    protected function _renderPage( $sPageSlug, $sTabSlug = null ) {
68 68
         $_oPageRenderer = new AdminPageFramework_View__PageRenderer( $this, $sPageSlug, $sTabSlug );
69 69
         $_oPageRenderer->render();
70 70
     }
Please login to merge, or discard this patch.
factory/_common/_abstract/AdminPageFramework_Factory_Controller.php 4 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      */    
170 170
     public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) {
171 171
         
172
-        foreach( func_get_args() as $_asSectionset ) { 
172
+        foreach( func_get_args() as $_asSectionset ) {
173 173
             $this->addSettingSection( $_asSectionset ); 
174 174
         }
175 175
         
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      */
239 239
     public function addSettingSection( $aSectionset ) {
240 240
         
241
-        if ( ! is_array( $aSectionset ) ) { 
241
+        if ( ! is_array( $aSectionset ) ) {
242 242
             return; 
243 243
         }
244 244
         
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     * @return       void
272 272
     */ 
273 273
     public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {
274
-        foreach( func_get_args() as $_aFieldset ) { 
274
+        foreach( func_get_args() as $_aFieldset ) {
275 275
             $this->addSettingField( $_aFieldset ); 
276 276
         }
277 277
     }    
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      * @access      public
219 219
      * @remark      The actual registration will be performed in the `_replyToRegisterSettings()` method with the `admin_menu` hook.
220 220
      * @remark      The `$oForm` property should be created in each extended class.
221
-     * @param       array|string        $aSection       the section array. If a string is passed, it is considered as a target page slug that will be used as a page slug element from the next call so that the element can be omitted.
221
+     * @param       array|string        $aSectionset       the section array. If a string is passed, it is considered as a target page slug that will be used as a page slug element from the next call so that the element can be omitted.
222 222
      * <h4>Section Definition Array</h4>
223 223
      * <ul>
224 224
      *      <li>**section_id** - (string) the section ID. Avoid using non-alphabetic characters except underscore and numbers.</li>
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      * @since        3.0.0   The scope changed to public to indicate the users will use.
348 348
      * @return       void
349 349
      * @remark       The $oForm property should be created in each extended class.
350
-     * @param        array|string       $asField        A field definition array or a string of the target section id.
350
+     * @param        array|string       $asFieldset        A field definition array or a string of the target section id.
351 351
     * <h4>Built-in Field Types</h4>
352 352
     * <ul>
353 353
     *       <li>[text](./class-AdminPageFramework_FieldType_text.html) - a normal field to enter short text input.</li>
Please login to merge, or discard this patch.
Indentation   +187 added lines, -187 removed lines patch added patch discarded remove patch
@@ -306,18 +306,18 @@  discard block
 block discarded – undo
306 306
     }     
307 307
         
308 308
     /**
309
-    * Adds form fields.
310
-    * 
311
-    * It inserts the given field definition arrays into the class property and later they are parsed when fields are registered. The field definition array requires specific keys. Refer to the parameter section of this method.
312
-    * 
313
-    * @since        2.0.0
314
-    * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
315
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
316
-    * @param        array       the field definition array.
317
-    * @param        array       (optional) another field array.
318
-    * @param        array       (optional) add more field arrays to the next parameters as many as necessary.
319
-    * @return       void
320
-    */ 
309
+     * Adds form fields.
310
+     * 
311
+     * It inserts the given field definition arrays into the class property and later they are parsed when fields are registered. The field definition array requires specific keys. Refer to the parameter section of this method.
312
+     * 
313
+     * @since        2.0.0
314
+     * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
315
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
316
+     * @param        array       the field definition array.
317
+     * @param        array       (optional) another field array.
318
+     * @param        array       (optional) add more field arrays to the next parameters as many as necessary.
319
+     * @return       void
320
+     */ 
321 321
     public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {
322 322
         foreach( func_get_args() as $_aFieldset ) { 
323 323
             $this->addSettingField( $_aFieldset ); 
@@ -348,57 +348,57 @@  discard block
 block discarded – undo
348 348
      * @return       void
349 349
      * @remark       The $oForm property should be created in each extended class.
350 350
      * @param        array|string       $asField        A field definition array or a string of the target section id.
351
-    * <h4>Built-in Field Types</h4>
352
-    * <ul>
353
-    *       <li>[text](./class-AdminPageFramework_FieldType_text.html) - a normal field to enter short text input.</li>
354
-    *       <li>[password](./class-AdminPageFramework_FieldType_text.html) - a masked text input field.</li>
355
-    *       <li>[textarea](./class-AdminPageFramework_FieldType_textarea.html) - a text input field with multiple lines. It supports rich text editors.</li>
356
-    *       <li>[radio](./class-AdminPageFramework_FieldType_radio.html) - a set of radio buttons that lets the user pick an option.</li>
357
-    *       <li>[checkbox](./class-AdminPageFramework_FieldType_checkbox.html) - a check box that lets the user enable/disable an item.</li>
358
-    *       <li>[select](./class-AdminPageFramework_FieldType_select.html) - a drop-down list that lest the user pick one or more item(s) from a list.</li>
359
-    *       <li>[hidden](./class-AdminPageFramework_FieldType_hidden.html) - a field with invisible input values.</li>
360
-    *       <li>[file](./class-AdminPageFramework_FieldType_file.html) - a file uploader that lets the user upload files.</li>
361
-    *       <li>[image](./class-AdminPageFramework_FieldType_image.html) - a text field with an image uploader that lets the user set the image URL.</li>
362
-    *       <li>[media](./class-AdminPageFramework_FieldType_media.html) - a text field with a media uploader that lets the user set the file URL.</li>
363
-    *       <li>[color](./class-AdminPageFramework_FieldType_color.html) - a text field with a color picker.</li>
364
-    *       <li>[submit](./class-AdminPageFramework_FieldType_submit.html) - a submit button that lets the user send the form.</li>
365
-    *       <li>[export](./class-AdminPageFramework_FieldType_export.html) - a custom submit field that lets the user export stored data.</li>
366
-    *       <li>[import](./class-AdminPageFramework_FieldType_import.html) - a custom combination field of file and submit fields that let the user import data.</li>
367
-    *       <li>[posttype](./class-AdminPageFramework_FieldType_posttype.html) - a check-list of post types enabled on the site.</li>
368
-    *       <li>[taxonomy](./class-AdminPageFramework_FieldType_taxonomy.html) - a set of check-lists of taxonomies enabled on the site in a tabbed box.</li>
369
-    *       <li>[size](./class-AdminPageFramework_FieldType_size.html) - a combination field of the text and the select fields that let the user set sizes with a selectable unit.</li>
370
-    *       <li>[section_title](./class-AdminPageFramework_FieldType_section_title.html) - [3.0.0+] a text field type that will be placed in the section title so that it lets the user set the section title. Note that only one field with this field type is allowed per a section.</li>
371
-    *       <li>[system](./class-AdminPageFramework_FieldType_system.html) - [3.3.0+] a custom text area field that displays the system information including the PHP settings, the framework version, MySQL version etc.</li>
372
-    *       <li>[inline_mixed](./class-AdminPageFramework_FieldType_inline_mixed.html) - [3.8.0+] a field that include inner fields with different field types. </li>
373
-    * </ul>
374
-    * <h4>Field Definition Arguments</h4>
375
-    * <ul>
376
-    *       <li>**field_id** - (required, string) the field ID. Avoid using non-alphabetic characters except underscore and numbers.</li>
377
-    *       <li>**type** - (optional, string) the type of the field. The supported types are listed below. When creating nested fields, this argument can be omitted.</li>
378
-    *       <li>**section_id** - (optional, string) the section ID that the field belongs to. If not set, the internal `_default` section ID will be assigned.</li>
379
-    *       <li>**title** - (optional, string) the title of the section.</li>
380
-    *       <li>**description** - (optional, string) the description of the field which is inserted into the after the input field tag.</li>
381
-    *       <li>**tip** - (optional, string) the tip for the field which is displayed when the mouse is hovered over the field title.</li>
382
-    *       <li>**capability** - (optional, string) the <a href="http://codex.wordpress.org/Roles_and_Capabilities">access level</a> of the section. If the page visitor does not have sufficient capability, the section will be invisible to them.</li>
383
-    *       <li>**error_message** - (optional, string) the error message to display above the input field.</li>
384
-    *       <li>**before_field** - (optional, string) the HTML string to insert before the input field output.</li>
385
-    *       <li>**after_field** - (optional, string) the HTML string to insert after the input field output.</li>
386
-    *       <li>**if** - (optional, boolean) if the passed value is false, the section will not be registered.</li>
387
-    *       <li>**order** - (optional, integer) the order number of the section. The higher the number is, the lower the position it gets.</li>
388
-    *       <li>**label** - (optional, string) the text label(s) associated with and displayed along with the input field. Some input types can ignore this key.</li>
389
-    *       <li>**default** - (optional, string|array) the default value(s) assigned to the input tag's value attribute.</li>
390
-    *       <li>**value** - (optional, string|array) the value(s) assigned to the input tag's `value` attribute to override the default and the stored value.</li>
391
-    *       <li>**delimiter** - (optional, string) the HTML string that delimits multiple elements. This is available if the <var>label</var> key is passed as array. It will be enclosed in inline-block elements so the passed HTML string should not contain block elements.</li>
392
-    *       <li>**before_input** - (optional, string) the HTML string inserted right before the input tag. It will be enclosed in the <code>label</code> tag so the passed HTML string should not contain block elements.</li>
393
-    *       <li>**after_input** - (optional, string) the HTML string inserted right after the input tag. It will be enclosed in the <code>label</code> tag so the passed HTML string should not contain block elements.</li>
394
-    *       <li>**label_min_width** - (optional, string) the inline style property of the `min-width` of the label tag for the field. If the unit is not specified, 'px' is applied. Default: `120`. e.g. `100%`</li> 
395
-    *       <li>**help** - (optional, string) the help description added to the contextual help tab.</li>
396
-    *       <li>**help_aside** - (optional, string) the additional help description for the side bar of the contextual help tab.</li>
397
-    *       <li>**repeatable** - [3.0.0+] (optional, array|boolean) whether the fields should be repeatable. If it yields true, the plus and the minus buttons appear next to each field that lets the user add/remove the fields. Optionally an setting array can be passed.
398
-    *           <h5>Repeatable Fields Setting Array</h5>
399
-    *           <ul>
400
-    *                 <li>**max** - the allowed maximum number of fields to be repeated.</li>
401
-    *                 <li>**min** - the allowed minimum number of fields to be repeated.</li>
351
+     * <h4>Built-in Field Types</h4>
352
+     * <ul>
353
+     *       <li>[text](./class-AdminPageFramework_FieldType_text.html) - a normal field to enter short text input.</li>
354
+     *       <li>[password](./class-AdminPageFramework_FieldType_text.html) - a masked text input field.</li>
355
+     *       <li>[textarea](./class-AdminPageFramework_FieldType_textarea.html) - a text input field with multiple lines. It supports rich text editors.</li>
356
+     *       <li>[radio](./class-AdminPageFramework_FieldType_radio.html) - a set of radio buttons that lets the user pick an option.</li>
357
+     *       <li>[checkbox](./class-AdminPageFramework_FieldType_checkbox.html) - a check box that lets the user enable/disable an item.</li>
358
+     *       <li>[select](./class-AdminPageFramework_FieldType_select.html) - a drop-down list that lest the user pick one or more item(s) from a list.</li>
359
+     *       <li>[hidden](./class-AdminPageFramework_FieldType_hidden.html) - a field with invisible input values.</li>
360
+     *       <li>[file](./class-AdminPageFramework_FieldType_file.html) - a file uploader that lets the user upload files.</li>
361
+     *       <li>[image](./class-AdminPageFramework_FieldType_image.html) - a text field with an image uploader that lets the user set the image URL.</li>
362
+     *       <li>[media](./class-AdminPageFramework_FieldType_media.html) - a text field with a media uploader that lets the user set the file URL.</li>
363
+     *       <li>[color](./class-AdminPageFramework_FieldType_color.html) - a text field with a color picker.</li>
364
+     *       <li>[submit](./class-AdminPageFramework_FieldType_submit.html) - a submit button that lets the user send the form.</li>
365
+     *       <li>[export](./class-AdminPageFramework_FieldType_export.html) - a custom submit field that lets the user export stored data.</li>
366
+     *       <li>[import](./class-AdminPageFramework_FieldType_import.html) - a custom combination field of file and submit fields that let the user import data.</li>
367
+     *       <li>[posttype](./class-AdminPageFramework_FieldType_posttype.html) - a check-list of post types enabled on the site.</li>
368
+     *       <li>[taxonomy](./class-AdminPageFramework_FieldType_taxonomy.html) - a set of check-lists of taxonomies enabled on the site in a tabbed box.</li>
369
+     *       <li>[size](./class-AdminPageFramework_FieldType_size.html) - a combination field of the text and the select fields that let the user set sizes with a selectable unit.</li>
370
+     *       <li>[section_title](./class-AdminPageFramework_FieldType_section_title.html) - [3.0.0+] a text field type that will be placed in the section title so that it lets the user set the section title. Note that only one field with this field type is allowed per a section.</li>
371
+     *       <li>[system](./class-AdminPageFramework_FieldType_system.html) - [3.3.0+] a custom text area field that displays the system information including the PHP settings, the framework version, MySQL version etc.</li>
372
+     *       <li>[inline_mixed](./class-AdminPageFramework_FieldType_inline_mixed.html) - [3.8.0+] a field that include inner fields with different field types. </li>
373
+     * </ul>
374
+     * <h4>Field Definition Arguments</h4>
375
+     * <ul>
376
+     *       <li>**field_id** - (required, string) the field ID. Avoid using non-alphabetic characters except underscore and numbers.</li>
377
+     *       <li>**type** - (optional, string) the type of the field. The supported types are listed below. When creating nested fields, this argument can be omitted.</li>
378
+     *       <li>**section_id** - (optional, string) the section ID that the field belongs to. If not set, the internal `_default` section ID will be assigned.</li>
379
+     *       <li>**title** - (optional, string) the title of the section.</li>
380
+     *       <li>**description** - (optional, string) the description of the field which is inserted into the after the input field tag.</li>
381
+     *       <li>**tip** - (optional, string) the tip for the field which is displayed when the mouse is hovered over the field title.</li>
382
+     *       <li>**capability** - (optional, string) the <a href="http://codex.wordpress.org/Roles_and_Capabilities">access level</a> of the section. If the page visitor does not have sufficient capability, the section will be invisible to them.</li>
383
+     *       <li>**error_message** - (optional, string) the error message to display above the input field.</li>
384
+     *       <li>**before_field** - (optional, string) the HTML string to insert before the input field output.</li>
385
+     *       <li>**after_field** - (optional, string) the HTML string to insert after the input field output.</li>
386
+     *       <li>**if** - (optional, boolean) if the passed value is false, the section will not be registered.</li>
387
+     *       <li>**order** - (optional, integer) the order number of the section. The higher the number is, the lower the position it gets.</li>
388
+     *       <li>**label** - (optional, string) the text label(s) associated with and displayed along with the input field. Some input types can ignore this key.</li>
389
+     *       <li>**default** - (optional, string|array) the default value(s) assigned to the input tag's value attribute.</li>
390
+     *       <li>**value** - (optional, string|array) the value(s) assigned to the input tag's `value` attribute to override the default and the stored value.</li>
391
+     *       <li>**delimiter** - (optional, string) the HTML string that delimits multiple elements. This is available if the <var>label</var> key is passed as array. It will be enclosed in inline-block elements so the passed HTML string should not contain block elements.</li>
392
+     *       <li>**before_input** - (optional, string) the HTML string inserted right before the input tag. It will be enclosed in the <code>label</code> tag so the passed HTML string should not contain block elements.</li>
393
+     *       <li>**after_input** - (optional, string) the HTML string inserted right after the input tag. It will be enclosed in the <code>label</code> tag so the passed HTML string should not contain block elements.</li>
394
+     *       <li>**label_min_width** - (optional, string) the inline style property of the `min-width` of the label tag for the field. If the unit is not specified, 'px' is applied. Default: `120`. e.g. `100%`</li> 
395
+     *       <li>**help** - (optional, string) the help description added to the contextual help tab.</li>
396
+     *       <li>**help_aside** - (optional, string) the additional help description for the side bar of the contextual help tab.</li>
397
+     *       <li>**repeatable** - [3.0.0+] (optional, array|boolean) whether the fields should be repeatable. If it yields true, the plus and the minus buttons appear next to each field that lets the user add/remove the fields. Optionally an setting array can be passed.
398
+     *           <h5>Repeatable Fields Setting Array</h5>
399
+     *           <ul>
400
+     *                 <li>**max** - the allowed maximum number of fields to be repeated.</li>
401
+     *                 <li>**min** - the allowed minimum number of fields to be repeated.</li>
402 402
      *                <li>**disabled** - (optional, boolean|array) [3.8.13+]
403 403
      *                    <ul>
404 404
      *                        <li>**message** - (optional, string) the message to show when the user clicks on the `Add` repeatable button.</li>
@@ -407,108 +407,108 @@  discard block
 block discarded – undo
407 407
      *                        <li>**box_width** - (optional, integer) the height of the modal window that displays the message. Default: 100.</li>
408 408
      *                    <ul>
409 409
      *                </li>
410
-    *           </ul>
411
-    *       </li>
412
-    *       <li>**sortable** - [3.0.0+] (optional, boolean) whether the fields should be sortable. If it yields true, the fields will be enclosed in a draggable box.
413
-    *       <li>**attributes** - [3.0.0+] (optional, array) holds key-value pairs representing the attribute and its property. Note that some field types have specific keys in the first dimensions. e.g. `array( 'class' => 'my_custom_class_selector', 'style' => 'background-color:#777', 'size' => 20, )` Every field holds the following nested attribute definition arrays.
414
-    *           <ul>
415
-    *               <li>**fieldrow** - the `td` tag element containing the field output.</li>
416
-    *               <li>**fieldset** - the `fieldset` tag element containing the field output.</li>
417
-    *               <li>**fields** - the `div` tag element containing the sub-fields and the main field.</li>
418
-    *               <li>**field** - the `div` tag element containing each field.</li>
419
-    *           </ul>
420
-    *       </li>
421
-    *       <li>**show_title_column** - [3.0.0+] (optional, boolean) If true, the field title column will be omitted from the output.</li>
422
-    *       <li>**hidden** - [3.0.0+] (optional, boolean) If true, the entire field row output will be invisible with the inline style attribute of `style="display:none"`.</li>
423
-    *       <li>**save** - [3.6.0+] (optional, boolean) If `false`, the field value will not be saved. Default: `true`</li>
424
-    *       <li>**content** - (optional, string|array) [3.6.1+] a custom section output. [3.8.0+] Supports an array to be passed for nested and inline-mixed fields. If an array holding field definitions is set, those fields will be nested.
425
-    *           <h4>Example</h4>
426
-    * <pre><code>
427
-    *   $this->addSettingFields(
428
-    *       'my_section_id', // the target section ID - pass dimensional keys of the section
429
-    *       array(
430
-    *           'field_id'      => 'Y',
431
-    *           'title'         => __( 'Y', 'admin-page-framework-loader' ),
432
-    *           'description'   => __( 'By passing an array of field definition to the <code>content</code> argument, you can nest fields.', 'admin-page-framework-loader' )
433
-    *               . ' ' . __( 'Also the <code>type</code> argument can be omitted.', 'admin-page-framework-loader' ),
434
-    *           'content'       => array(
435
-    *               array(
436
-    *                   'field_id'      => 'i',
437
-    *                   'title'         => __( 'i', 'admin-page-framework-loader' ),                    
438
-    *                   'type'          => 'textarea',
439
-    *               ),
440
-    *               array(
441
-    *                   'field_id'      => 'ii',
442
-    *                   'title'         => __( 'ii', 'admin-page-framework-loader' ),                    
443
-    *                   'type'          => 'color',                    
444
-    *               ),
445
-    *               array(
446
-    *                   'field_id'      => 'iii',
447
-    *                   'title'         => __( 'iii', 'admin-page-framework-loader' ),
448
-    *                   'repeatable'    => true,
449
-    *                   'sortable'      => true,
450
-    *                   'content'       => array(
451
-    *                       array(
452
-    *                           'field_id'      => 'a',
453
-    *                           'title'         => __( 'a', 'admin-page-framework-loader' ),                    
454
-    *                           'type'          => 'image',
455
-    *                           'attributes'    => array(
456
-    *                               'preview' => array(
457
-    *                                   'style' => 'max-width: 200px;',
458
-    *                               ),
459
-    *                           ),                                
460
-    *                       ),
461
-    *                       array(
462
-    *                           'field_id'      => 'b',
463
-    *                           'title'         => __( 'b', 'admin-page-framework-loader' ),
464
-    *                           'content'       => array(
465
-    *                               array(
466
-    *                                   'field_id'      => 'first',
467
-    *                                   'title'         => __( '1st', 'admin-page-framework-loader' ),                    
468
-    *                                   'type'          => 'color',
469
-    *                                   'repeatable'    => true,
470
-    *                                   'sortable'      => true,
471
-    *                               ),                                
472
-    *                               array(
473
-    *                                   'field_id'      => 'second',
474
-    *                                   'title'         => __( '2nd', 'admin-page-framework-loader' ),                    
475
-    *                                   'type'          => 'size',
476
-    *                               ),
477
-    *                               array(
478
-    *                                   'field_id'      => 'third',
479
-    *                                   'title'         => __( '3rd', 'admin-page-framework-loader' ),                    
480
-    *                                   'type'          => 'select',
481
-    *                                   'label'         => array(
482
-    *                                       'x' => 'X',
483
-    *                                       'y' => 'Y',
484
-    *                                       'z' => 'Z',                                        
485
-    *                                   ),
486
-    *                               ),                                    
487
-    *                           ),
488
-    *                           // 'description'   => '',
489
-    *                       ),                            
490
-    *                       array(
491
-    *                           'field_id'      => 'c',
492
-    *                           'title'         => __( 'c', 'admin-page-framework-loader' ),                    
493
-    *                           'type'          => 'radio',                    
494
-    *                           'label'         => array(
495
-    *                               'a' => __( 'Apple', 'admin-page-framework-loader' ),
496
-    *                               'b' => __( 'Banana', 'admin-page-framework-loader' ),
497
-    *                               'c' => __( 'Cherry', 'admin-page-framework-loader' ),
498
-    *                           ),
499
-    *                           'default'       => 'b',
500
-    *                       ),                        
501
-    *                   )
502
-    *               ),                    
503
-    *           ),
504
-    *       )
505
-    *   );
506
-    * </code></pre>
507
-    *       </li>
508
-    *       <li>**placement** - [3.8.0+] (optional, string) Specifies where the field is rendered. Either `normal` `section_title` or `field_title` is accepted. `field_title` can only be used by nested fields defined in the `content` argument.  Default: `normal`</li>
509
-    *       <li>**show_debug_info** - (optional, boolean) [3.8.8+] Whether to show debug information such as field definition tool-tips. Default: `true`.</li>
510
-    * </ul>
511
-    */
410
+     *           </ul>
411
+     *       </li>
412
+     *       <li>**sortable** - [3.0.0+] (optional, boolean) whether the fields should be sortable. If it yields true, the fields will be enclosed in a draggable box.
413
+     *       <li>**attributes** - [3.0.0+] (optional, array) holds key-value pairs representing the attribute and its property. Note that some field types have specific keys in the first dimensions. e.g. `array( 'class' => 'my_custom_class_selector', 'style' => 'background-color:#777', 'size' => 20, )` Every field holds the following nested attribute definition arrays.
414
+     *           <ul>
415
+     *               <li>**fieldrow** - the `td` tag element containing the field output.</li>
416
+     *               <li>**fieldset** - the `fieldset` tag element containing the field output.</li>
417
+     *               <li>**fields** - the `div` tag element containing the sub-fields and the main field.</li>
418
+     *               <li>**field** - the `div` tag element containing each field.</li>
419
+     *           </ul>
420
+     *       </li>
421
+     *       <li>**show_title_column** - [3.0.0+] (optional, boolean) If true, the field title column will be omitted from the output.</li>
422
+     *       <li>**hidden** - [3.0.0+] (optional, boolean) If true, the entire field row output will be invisible with the inline style attribute of `style="display:none"`.</li>
423
+     *       <li>**save** - [3.6.0+] (optional, boolean) If `false`, the field value will not be saved. Default: `true`</li>
424
+     *       <li>**content** - (optional, string|array) [3.6.1+] a custom section output. [3.8.0+] Supports an array to be passed for nested and inline-mixed fields. If an array holding field definitions is set, those fields will be nested.
425
+     *           <h4>Example</h4>
426
+     * <pre><code>
427
+     *   $this->addSettingFields(
428
+     *       'my_section_id', // the target section ID - pass dimensional keys of the section
429
+     *       array(
430
+     *           'field_id'      => 'Y',
431
+     *           'title'         => __( 'Y', 'admin-page-framework-loader' ),
432
+     *           'description'   => __( 'By passing an array of field definition to the <code>content</code> argument, you can nest fields.', 'admin-page-framework-loader' )
433
+     *               . ' ' . __( 'Also the <code>type</code> argument can be omitted.', 'admin-page-framework-loader' ),
434
+     *           'content'       => array(
435
+     *               array(
436
+     *                   'field_id'      => 'i',
437
+     *                   'title'         => __( 'i', 'admin-page-framework-loader' ),                    
438
+     *                   'type'          => 'textarea',
439
+     *               ),
440
+     *               array(
441
+     *                   'field_id'      => 'ii',
442
+     *                   'title'         => __( 'ii', 'admin-page-framework-loader' ),                    
443
+     *                   'type'          => 'color',                    
444
+     *               ),
445
+     *               array(
446
+     *                   'field_id'      => 'iii',
447
+     *                   'title'         => __( 'iii', 'admin-page-framework-loader' ),
448
+     *                   'repeatable'    => true,
449
+     *                   'sortable'      => true,
450
+     *                   'content'       => array(
451
+     *                       array(
452
+     *                           'field_id'      => 'a',
453
+     *                           'title'         => __( 'a', 'admin-page-framework-loader' ),                    
454
+     *                           'type'          => 'image',
455
+     *                           'attributes'    => array(
456
+     *                               'preview' => array(
457
+     *                                   'style' => 'max-width: 200px;',
458
+     *                               ),
459
+     *                           ),                                
460
+     *                       ),
461
+     *                       array(
462
+     *                           'field_id'      => 'b',
463
+     *                           'title'         => __( 'b', 'admin-page-framework-loader' ),
464
+     *                           'content'       => array(
465
+     *                               array(
466
+     *                                   'field_id'      => 'first',
467
+     *                                   'title'         => __( '1st', 'admin-page-framework-loader' ),                    
468
+     *                                   'type'          => 'color',
469
+     *                                   'repeatable'    => true,
470
+     *                                   'sortable'      => true,
471
+     *                               ),                                
472
+     *                               array(
473
+     *                                   'field_id'      => 'second',
474
+     *                                   'title'         => __( '2nd', 'admin-page-framework-loader' ),                    
475
+     *                                   'type'          => 'size',
476
+     *                               ),
477
+     *                               array(
478
+     *                                   'field_id'      => 'third',
479
+     *                                   'title'         => __( '3rd', 'admin-page-framework-loader' ),                    
480
+     *                                   'type'          => 'select',
481
+     *                                   'label'         => array(
482
+     *                                       'x' => 'X',
483
+     *                                       'y' => 'Y',
484
+     *                                       'z' => 'Z',                                        
485
+     *                                   ),
486
+     *                               ),                                    
487
+     *                           ),
488
+     *                           // 'description'   => '',
489
+     *                       ),                            
490
+     *                       array(
491
+     *                           'field_id'      => 'c',
492
+     *                           'title'         => __( 'c', 'admin-page-framework-loader' ),                    
493
+     *                           'type'          => 'radio',                    
494
+     *                           'label'         => array(
495
+     *                               'a' => __( 'Apple', 'admin-page-framework-loader' ),
496
+     *                               'b' => __( 'Banana', 'admin-page-framework-loader' ),
497
+     *                               'c' => __( 'Cherry', 'admin-page-framework-loader' ),
498
+     *                           ),
499
+     *                           'default'       => 'b',
500
+     *                       ),                        
501
+     *                   )
502
+     *               ),                    
503
+     *           ),
504
+     *       )
505
+     *   );
506
+     * </code></pre>
507
+     *       </li>
508
+     *       <li>**placement** - [3.8.0+] (optional, string) Specifies where the field is rendered. Either `normal` `section_title` or `field_title` is accepted. `field_title` can only be used by nested fields defined in the `content` argument.  Default: `normal`</li>
509
+     *       <li>**show_debug_info** - (optional, boolean) [3.8.8+] Whether to show debug information such as field definition tool-tips. Default: `true`.</li>
510
+     * </ul>
511
+     */
512 512
     public function addSettingField( $asFieldset ) {
513 513
         if ( method_exists( $this->oForm, 'addField' ) ) {
514 514
             $this->oForm->addField( $asFieldset );     
@@ -572,28 +572,28 @@  discard block
 block discarded – undo
572 572
     }
573 573
     
574 574
     /**
575
-    * Sets the given message to be displayed in the next page load. 
576
-    * 
577
-    * This is used to inform users about the submitted input data, such as "Updated successfully." or "Problem occurred." etc. 
578
-    * and normally used in validation callback methods.
579
-    * 
580
-    * <h4>Example</h4>
581
-    * `
582
-    * if ( ! $bVerified ) {
583
-    *       $this->setFieldErrors( $aErrors );     
584
-    *       $this->setSettingNotice( 'There was an error in your input.' );
585
-    *       return $aOldPageOptions;
586
-    * }
587
-    * `
588
-    *
589
-    * @since        3.0.4     
590
-    * @access       public
591
-    * @param        string      $sMessage       the text message to be displayed.
592
-    * @param        string      $sType          (optional) the type of the message, either "error" or "updated"  is used.
593
-    * @param        array       $asAttributes   (optional) the tag attribute array applied to the message container HTML element. If a string is given, it is used as the ID attribute value.
594
-    * @param        boolean     $bOverride      (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one.
595
-    * @return       void
596
-    */      
575
+     * Sets the given message to be displayed in the next page load. 
576
+     * 
577
+     * This is used to inform users about the submitted input data, such as "Updated successfully." or "Problem occurred." etc. 
578
+     * and normally used in validation callback methods.
579
+     * 
580
+     * <h4>Example</h4>
581
+     * `
582
+     * if ( ! $bVerified ) {
583
+     *       $this->setFieldErrors( $aErrors );     
584
+     *       $this->setSettingNotice( 'There was an error in your input.' );
585
+     *       return $aOldPageOptions;
586
+     * }
587
+     * `
588
+     *
589
+     * @since        3.0.4     
590
+     * @access       public
591
+     * @param        string      $sMessage       the text message to be displayed.
592
+     * @param        string      $sType          (optional) the type of the message, either "error" or "updated"  is used.
593
+     * @param        array       $asAttributes   (optional) the tag attribute array applied to the message container HTML element. If a string is given, it is used as the ID attribute value.
594
+     * @param        boolean     $bOverride      (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one.
595
+     * @return       void
596
+     */      
597 597
     public function setSettingNotice( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) {
598 598
         $this->oForm->setSubmitNotice(
599 599
             $sMessage,
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @return      array|string
54 54
      * @since       3.7.0
55 55
      */
56
-    public function getMessage( $sKey='' ) {
56
+    public function getMessage( $sKey = '' ) {
57 57
         return $this->oMsg->get( $sKey );
58 58
     }
59 59
        
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @return      array       The array holing the queued items.
74 74
      * @internal
75 75
      */
76
-    public function enqueueStyles( $aSRCs, $_vArg2=null ) {} 
76
+    public function enqueueStyles( $aSRCs, $_vArg2 = null ) {} 
77 77
     
78 78
     /**
79 79
      * Enqueues a style of the given source.
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @return      string      The style handle ID. If the passed url is not a valid url string, an empty string will be returned.
94 94
      * @internal
95 95
      */
96
-    public function enqueueStyle( $sSRC, $_vArg2=null ) {}
96
+    public function enqueueStyle( $sSRC, $_vArg2 = null ) {}
97 97
     
98 98
     /**
99 99
      * Enqueues scripts by the given sources.
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      * @return      array        The array holding the queued items.
115 115
      * @internal
116 116
      */    
117
-    public function enqueueScripts( $aSRCs, $_vArg2=null ) {}
117
+    public function enqueueScripts( $aSRCs, $_vArg2 = null ) {}
118 118
     /**
119 119
      * Enqueues a script by the given source.
120 120
      *  
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      * @return      string      The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
147 147
      * @internal
148 148
      */    
149
-    public function enqueueScript( $sSRC, $_vArg2=null ) {}    
149
+    public function enqueueScript( $sSRC, $_vArg2 = null ) {}    
150 150
     
151 151
     /*
152 152
      * Help Pane
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * @since       2.1.0
165 165
      * @remark      This method just adds the given text into the class property. The actual registration will be performed with the `replyToRegisterHelpTabTextForMetaBox()` method.
166 166
      */ 
167
-    public function addHelpText( $sHTMLContent, $sHTMLSidebarContent="" ) {
167
+    public function addHelpText( $sHTMLContent, $sHTMLSidebarContent = "" ) {
168 168
         if ( method_exists( $this->oHelpPane, '_addHelpText' ) ) {
169 169
             $this->oHelpPane->_addHelpText( $sHTMLContent, $sHTMLSidebarContent );
170 170
         }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      */    
201 201
     public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) {
202 202
         
203
-        foreach( func_get_args() as $_asSectionset ) { 
203
+        foreach ( func_get_args() as $_asSectionset ) { 
204 204
             $this->addSettingSection( $_asSectionset ); 
205 205
         }
206 206
         
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      */
287 287
     public function addSettingSection( $aSectionset ) {
288 288
         
289
-        if ( ! is_array( $aSectionset ) ) { 
289
+        if ( !is_array( $aSectionset ) ) { 
290 290
             return; 
291 291
         }
292 292
         
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
     * @return       void
320 320
     */ 
321 321
     public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {
322
-        foreach( func_get_args() as $_aFieldset ) { 
322
+        foreach ( func_get_args() as $_aFieldset ) { 
323 323
             $this->addSettingField( $_aFieldset ); 
324 324
         }
325 325
     }    
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
     * @param        boolean     $bOverride      (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one.
595 595
     * @return       void
596 596
     */      
597
-    public function setSettingNotice( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) {
597
+    public function setSettingNotice( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) {
598 598
         $this->oForm->setSubmitNotice(
599 599
             $sMessage,
600 600
             $sType,
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
      * @param       string      $sType If empty, the method will check if a message exists in all types. Otherwise, it checks the existence of a message of the specified type.
614 614
      * @return      boolean     True if a setting notice is set; otherwise, false.
615 615
      */
616
-    public function hasSettingNotice( $sType='' ) {
616
+    public function hasSettingNotice( $sType = '' ) {
617 617
         return $this->oForm->hasSubmitNotice( $sType );
618 618
     }
619 619
 
Please login to merge, or discard this patch.
factory/_common/_abstract/_model/AdminPageFramework_Format_Base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $_aParameters = func_get_args() + array( 
36 36
             $this->aSubject, 
37 37
         );
38
-        $this->aSubject  = $_aParameters[ 0 ];        
38
+        $this->aSubject = $_aParameters[ 0 ];        
39 39
         
40 40
     }
41 41
     
Please login to merge, or discard this patch.