Completed
Branch dev (8a5453)
by
unknown
39s
created
factory/_common/_abstract/_controller/AdminPageFramework_Link_Base.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * Sets up hooks and properties.
27 27
      */
28
-    public function __construct( $oProp, $oMsg=null ) {
28
+    public function __construct( $oProp, $oMsg = null ) {
29 29
 
30
-        if ( ! $this->_isLoadable( $oProp ) ) {
30
+        if ( !$this->_isLoadable( $oProp ) ) {
31 31
             return;
32 32
         }
33 33
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         // Add an action link in the plugin listing page
40 40
         if ( $this->_shouldSetPluginActionLinks() ) {
41 41
             add_filter(
42
-                'plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ),
42
+                'plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ),
43 43
                 array( $this, '_replyToAddSettingsLinkInPluginListingPage' ),
44 44
                 20     // set a lower priority so that the link will be embedded at the beginning ( the most left hand side ).
45 45
             );
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
          * @return      boolean
55 55
          */
56 56
         private function _isLoadable( $oProp ) {
57
-            if ( ! $oProp->bIsAdmin ) {
57
+            if ( !$oProp->bIsAdmin ) {
58 58
                 return false;
59 59
             }
60 60
             if ( $oProp->bIsAdminAjax ) {
61 61
                 return false;
62 62
             }
63
-            return ! $this->hasBeenCalled( 'links_' . $oProp->sClassName );
63
+            return !$this->hasBeenCalled( 'links_'.$oProp->sClassName );
64 64
         }
65 65
 
66 66
     /**
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
     protected function _shouldSetPluginActionLinks() {
85 85
 
86 86
         // It is possible that the sub-objects are not set when the class is considered not loadable.
87
-        if ( ! isset( $this->oProp ) ) {
87
+        if ( !isset( $this->oProp ) ) {
88 88
             return false;
89 89
         }
90 90
 
91
-        if ( ! in_array( $this->oProp->sPageNow, array( 'plugins.php' ) ) ) {
91
+        if ( !in_array( $this->oProp->sPageNow, array( 'plugins.php' ) ) ) {
92 92
             return false;
93 93
         }
94 94
         return 'plugin' === $this->oProp->aScriptInfo[ 'sType' ];
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                         array(
156 156
                             'href'      => $aScriptInfo[ 'sURI' ],
157 157
                             'target'    => '_blank',
158
-                            'title'     => $aScriptInfo[ 'sName' ] . $_sVersion . $_sDescription
158
+                            'title'     => $aScriptInfo[ 'sName' ].$_sVersion.$_sDescription
159 159
                         ),
160 160
                         $aScriptInfo[ 'sName' ]
161 161
                     )
@@ -177,13 +177,13 @@  discard block
 block discarded – undo
177 177
                 $_sAuthorInfo = $this->getAOrB(
178 178
                     empty( $aScriptInfo[ 'sAuthor' ] ),
179 179
                     $_sAuthorInfo,
180
-                    ' by ' . $_sAuthorInfo
180
+                    ' by '.$_sAuthorInfo
181 181
                 );
182 182
 
183 183
                 // Enclosing the output in a span tag as the outer element is a '<p>' tag. So this cannot be div.
184 184
                 // 3.5.7+ Added the class attribute for acceptance testing
185 185
                 return "<span class='apf-script-info'>"
186
-                        . $_sPluginInfo . $_sAuthorInfo
186
+                        . $_sPluginInfo.$_sAuthorInfo
187 187
                     . "</span>";
188 188
 
189 189
             }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                         array(
215 215
                             'href'      => $aScriptInfo[ 'sURI' ],
216 216
                             'target'    => '_blank',
217
-                            'title'     => $aScriptInfo[ 'sName' ] . $_sVersion . $_sDescription,
217
+                            'title'     => $aScriptInfo[ 'sName' ].$_sVersion.$_sDescription,
218 218
                         ),
219 219
                         $aScriptInfo[ 'sName' ]
220 220
                     )
@@ -224,16 +224,16 @@  discard block
 block discarded – undo
224 224
                 // 3.5.7+ added the 'apf-credit' class attribute for acceptance testing
225 225
                 // 3.7.0+  added the footer-thankyou id attribute.
226 226
                 return "<span class='apf-credit' id='footer-thankyou'>"
227
-                    . $this->oMsg->get( 'powered_by' ) . '&nbsp;'
227
+                    . $this->oMsg->get( 'powered_by' ).'&nbsp;'
228 228
                     . $_sLibraryInfo
229 229
                     . ",&nbsp;"
230
-                    . $this->oMsg->get( 'and' ) . '&nbsp;'
230
+                    . $this->oMsg->get( 'and' ).'&nbsp;'
231 231
                     . $this->getHTMLTag(
232 232
                         'a',
233 233
                         array(
234 234
                             'href'      => 'https://wordpress.org',
235 235
                             'target'    => '_blank',
236
-                            'title'     => 'WordPress ' . $GLOBALS[ 'wp_version' ]
236
+                            'title'     => 'WordPress '.$GLOBALS[ 'wp_version' ]
237 237
                         ),
238 238
                         'WordPress'
239 239
                     )
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
          */
250 250
         protected function _setFooterHooks() {
251 251
 
252
-            add_filter( 'admin_footer_text' , array( $this, '_replyToAddInfoInFooterLeft' ) );
252
+            add_filter( 'admin_footer_text', array( $this, '_replyToAddInfoInFooterLeft' ) );
253 253
             add_filter( 'update_footer', array( $this, '_replyToAddInfoInFooterRight' ), 11 );
254 254
 
255 255
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
              * @callback    filter      admin_footer_text
262 262
              * @internal
263 263
              */
264
-            public function _replyToAddInfoInFooterLeft( $sLinkHTML='' ) {
264
+            public function _replyToAddInfoInFooterLeft( $sLinkHTML = '' ) {
265 265
 
266 266
                 $sLinkHTML = empty( $this->oProp->aScriptInfo[ 'sName' ] )
267 267
                     ? $sLinkHTML
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 
270 270
                 return $this->addAndApplyFilters(
271 271
                     $this->oProp->oCaller,
272
-                    'footer_left_' . $this->oProp->sClassName,
272
+                    'footer_left_'.$this->oProp->sClassName,
273 273
                     $sLinkHTML
274 274
                 );
275 275
 
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
              * @callback    filter      admin_footer_text
283 283
              * @internal
284 284
              */
285
-            public function _replyToAddInfoInFooterRight( $sLinkHTML='' ) {
285
+            public function _replyToAddInfoInFooterRight( $sLinkHTML = '' ) {
286 286
                 return $this->addAndApplyFilters(
287 287
                     $this->oProp->oCaller,
288
-                    'footer_right_' . $this->oProp->sClassName,
288
+                    'footer_right_'.$this->oProp->sClassName,
289 289
                     $this->oProp->aFooterInfo[ 'sRight' ]
290 290
                 );
291 291
             }
Please login to merge, or discard this patch.
development/factory/_common/_abstract/AdminPageFramework_Factory_Router.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
         }
163 163
 
164 164
         // Call the user constructor.
165
-        $this->start();     // defined in the controller class.
166
-        $this->oUtil->addAndDoAction( $this, 'start_' . $this->oProp->sClassName, $this );
165
+        $this->start(); // defined in the controller class.
166
+        $this->oUtil->addAndDoAction( $this, 'start_'.$this->oProp->sClassName, $this );
167 167
 
168 168
     }
169 169
         /**
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
          * @return      array
173 173
          */
174 174
         private function ___getSubClassNames() {
175
-            foreach( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) {
176
-                $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix . $this->_sStructureType;
175
+            foreach ( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) {
176
+                $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix.$this->_sStructureType;
177 177
             }
178 178
             return $this->aSubClassNames + $this->_aSubClassNames;
179 179
         }
@@ -187,15 +187,15 @@  discard block
 block discarded – undo
187 187
      */
188 188
     public function _replyToLoadComponents( /* $oScreen */ ) {
189 189
 
190
-        if ( ! $this->_isInThePage() ) {
190
+        if ( !$this->_isInThePage() ) {
191 191
             return;
192 192
         }
193 193
 
194
-        if ( ! isset( $this->oResource ) ) {
194
+        if ( !isset( $this->oResource ) ) {
195 195
             $this->oResource = $this->_replyTpSetAndGetInstance_oResource();
196 196
         }
197 197
 
198
-        if ( ! isset(  $this->oLink ) ) {
198
+        if ( !isset( $this->oLink ) ) {
199 199
             $this->oLink = $this->_replyTpSetAndGetInstance_oLink();
200 200
         }
201 201
 
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
      * Calls the load method and callbacks.
210 210
      * @since       3.8.14
211 211
      */
212
-    protected function _load( $aActions=array() ) {
212
+    protected function _load( $aActions = array() ) {
213 213
         $aActions = empty( $aActions )
214 214
             ? array(
215
-                'load_' . $this->oProp->sClassName,
215
+                'load_'.$this->oProp->sClassName,
216 216
             )
217 217
             : $aActions;
218 218
         $this->load();
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     protected function _setUp() {
226 226
         $aActions = array(
227
-            'set_up_' . $this->oProp->sClassName,
227
+            'set_up_'.$this->oProp->sClassName,
228 228
         );
229 229
         $this->setUp();
230 230
         $this->oUtil->addAndDoActions( $this, $aActions, $this );
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
          * @since   3.8.19
252 252
          */
253 253
         protected function _isWordPressCoreAjaxRequest() {
254
-            if ( ! isset( $GLOBALS[ 'pagenow' ] ) ) {
254
+            if ( !isset( $GLOBALS[ 'pagenow' ] ) ) {
255 255
                 return false;
256 256
             }
257 257
             if ( 'admin-ajax.php' !== $GLOBALS[ 'pagenow' ] ) {
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      * @return  boolean
284 284
      */
285 285
     protected function _isValidAjaxReferrer() {
286
-        if ( ! $this->oProp->bIsAdminAjax ) {
286
+        if ( !$this->oProp->bIsAdminAjax ) {
287 287
             return false;
288 288
         }
289 289
         return true;
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      */
300 300
     public function _replyToDetermineToLoad() {
301 301
 
302
-        if ( ! $this->_isInThePage() ) {
302
+        if ( !$this->_isInThePage() ) {
303 303
             return;
304 304
         }
305 305
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         // Set and return the sub class object instance.
364 364
         if ( isset( $this->aSubClassNames[ $sPropertyName ] ) ) {
365 365
             return call_user_func(
366
-                array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}"  )
366
+                array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" )
367 367
             );
368 368
         }
369 369
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
          */
398 398
         public function _replyTpSetAndGetInstance_oMsg() {
399 399
             $this->oMsg = call_user_func_array(
400
-                array( $this->aSubClassNames[ 'oMsg' ], 'getInstance'),
400
+                array( $this->aSubClassNames[ 'oMsg' ], 'getInstance' ),
401 401
                 array( $this->oProp->sTextDomain )  // parameters
402 402
             );
403 403
             return $this->oMsg;
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
      *
463 463
      * @internal
464 464
      */
465
-    public function __call( $sMethodName, $aArguments=null ) {
465
+    public function __call( $sMethodName, $aArguments = null ) {
466 466
 
467 467
         $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 );
468 468
 
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 
493 493
             // Check if the method name does not contain a backslash.
494 494
             if ( false === strpos( $sMethodName, "\\" ) ) {
495
-                return $this->oUtil->getElement( $aArguments, 0 );  // the first element - the filter value
495
+                return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value
496 496
             }
497 497
 
498 498
             // If the method name contains a backslash, the user may be using a name space.
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
                     array( $this, $_sAutoCallbackMethodName ),
504 504
                     $aArguments
505 505
                 )
506
-                : $this->oUtil->getElement( $aArguments, 0 );   // the first argument
506
+                : $this->oUtil->getElement( $aArguments, 0 ); // the first argument
507 507
 
508 508
         }
509 509
 
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
          */
514 514
         private function _triggerUndefinedMethodWarning( $sMethodName ) {
515 515
             trigger_error(
516
-                AdminPageFramework_Registry::NAME . ': '
516
+                AdminPageFramework_Registry::NAME.': '
517 517
                     . sprintf(
518 518
                         __( 'The method is not defined: %1$s', $this->oProp->sTextDomain ),
519 519
                         $sMethodName
Please login to merge, or discard this patch.
factory/_common/_abstract/AdminPageFramework_Factory_Controller.php 2 patches
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.
development/factory/_common/_abstract/AdminPageFramework_Factory_View.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
          * @return      string      the input id attribute
41 41
          */
42 42
         public function _replyToGetSectionName( /* $sSectionName, $aSectionset */ ) {
43
-            $_aParams = func_get_args() + array( null, null, );
43
+            $_aParams = func_get_args() + array( null, null,);
44 44
             return $_aParams[ 0 ];
45 45
         }
46 46
 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
          * @since       3.6.0
69 69
          * @return      string
70 70
          */
71
-        public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ )  {
72
-            $_aParams = func_get_args() + array( null, null, );
71
+        public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) {
72
+            $_aParams = func_get_args() + array( null, null,);
73 73
             return $_aParams[ 0 ];
74 74
         }
75 75
         /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
          * @return      string
80 80
          */
81 81
         public function _replyToGetFlatFieldName( /* $sFieldName, $aFieldset */ ) {
82
-            $_aParams = func_get_args() + array( null, null, );
82
+            $_aParams = func_get_args() + array( null, null,);
83 83
             return $_aParams[ 0 ];
84 84
         }
85 85
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
          * @return      string      the flat input name attribute
102 102
          */
103 103
         public function _replyToGetFlatInputName( /* $sFlatNameAttribute, $aField, $sKey */ ) {
104
-            $_aParams   = func_get_args() + array( null, null, null );
104
+            $_aParams = func_get_args() + array( null, null, null );
105 105
             return $_aParams[ 0 ];
106 106
         }
107 107
 
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
143 143
                 'if'            => true,
144 144
                 'capability'    => '',
145 145
             );
146
-            if ( ! $aElementDefinition[ 'if' ] ) {
146
+            if ( !$aElementDefinition[ 'if' ] ) {
147 147
                 return false;
148 148
             }
149 149
             // For front-end forms that allow guests, the capability level can be empty. In that case, return true.
150
-            if ( ! $aElementDefinition[ 'capability' ] ) {
150
+            if ( !$aElementDefinition[ 'capability' ] ) {
151 151
                 return true;
152 152
             }
153
-            if ( ! current_user_can( $aElementDefinition[ 'capability' ] ) ) {
153
+            if ( !current_user_can( $aElementDefinition[ 'capability' ] ) ) {
154 154
                 return false;
155 155
             }
156 156
             return $bDefault;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             $this,
187 187
             array(
188 188
                 // section_{instantiated class name}_{section id}
189
-                'section_head_' . $this->oProp->sClassName . '_' . $aSectionset[ 'section_id' ]
189
+                'section_head_'.$this->oProp->sClassName.'_'.$aSectionset[ 'section_id' ]
190 190
             ),
191 191
             $sSectionDescription
192 192
         );
@@ -203,15 +203,15 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function _replyToGetFieldOutput( $sFieldOutput, $aFieldset ) {
205 205
 
206
-        $_sSectionPart  = $this->oUtil->getAOrB(
206
+        $_sSectionPart = $this->oUtil->getAOrB(
207 207
             isset( $aFieldset[ 'section_id' ] ) && '_default' !== $aFieldset[ 'section_id' ],
208
-            '_' . $aFieldset[ 'section_id' ],
208
+            '_'.$aFieldset[ 'section_id' ],
209 209
             ''
210 210
         );
211 211
         return $this->oUtil->addAndApplyFilters(
212 212
             $this,
213 213
             array(
214
-                'field_' . $this->oProp->sClassName . $_sSectionPart . '_' . $aFieldset[ 'field_id' ]
214
+                'field_'.$this->oProp->sClassName.$_sSectionPart.'_'.$aFieldset[ 'field_id' ]
215 215
             ),
216 216
             $sFieldOutput,
217 217
             $aFieldset // the field array
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
          * @since       3.6.0
69 69
          * @return      string
70 70
          */
71
-        public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ )  {
71
+        public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) {
72 72
             $_aParams = func_get_args() + array( null, null, );
73 73
             return $_aParams[ 0 ];
74 74
         }
Please login to merge, or discard this patch.
_common/_abstract/_view/AdminPageFramework_Factory_View__SettingNotice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @since       3.7.9       Added the second parameter to accept an action hook name.
27 27
      */
28 28
 
29
-    public function __construct( $oFactory, $sActionHookName='admin_notices' ) {
29
+    public function __construct( $oFactory, $sActionHookName = 'admin_notices' ) {
30 30
 
31 31
         $this->oFactory = $oFactory;
32 32
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function _replyToPrintSettingNotice() {
47 47
 
48
-        if ( ! $this->_shouldProceed() ) {
48
+        if ( !$this->_shouldProceed() ) {
49 49
             return;
50 50
         }
51 51
         $this->oFactory->oForm->printSubmitNotices();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
          */
60 60
         private function _shouldProceed() {
61 61
 
62
-            if ( ! $this->oFactory->isInThePage() ) {
62
+            if ( !$this->oFactory->isInThePage() ) {
63 63
                 return false;
64 64
             }
65 65
 
Please login to merge, or discard this patch.
factory/_common/_abstract/_view/AdminPageFramework_TabNavigationBar.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * Stores the tab items.
27 27
      */
28
-    public $aTabs   = array();
28
+    public $aTabs = array();
29 29
 
30 30
     /**
31 31
      * Stores container attributes.
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
     );
36 36
 
37 37
     public $aTab = array(
38
-        'slug'       => null,  // (string) tab slug (id)
39
-        'title'      => null,  // (string) tab title
40
-        'href'       => null,  // (string) link url
41
-        'disabled'   => null,  // (boolean)
42
-        'class'      => null,  // (string) class selector to append to the class attribute
38
+        'slug'       => null, // (string) tab slug (id)
39
+        'title'      => null, // (string) tab title
40
+        'href'       => null, // (string) link url
41
+        'disabled'   => null, // (boolean)
42
+        'class'      => null, // (string) class selector to append to the class attribute
43 43
         'attributes' => array(),
44 44
     );
45 45
 
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
      * @param       array             $aTabs              An array holding each tab definitions
59 59
      * @param       array|string      $asActiveTabSlugs   The default tab slug.
60 60
      */
61
-    public function __construct( array $aTabs, $asActiveTabSlugs, $sTabTag='h2', $aAttributes=array( 'class' => 'nav-tab-wrapper', ), $aCallbacks=array() ) {
61
+    public function __construct( array $aTabs, $asActiveTabSlugs, $sTabTag = 'h2', $aAttributes = array( 'class' => 'nav-tab-wrapper',), $aCallbacks = array() ) {
62 62
 
63
-        $this->aCallbacks           = $aCallbacks + array(
63
+        $this->aCallbacks = $aCallbacks + array(
64 64
             'format'    => null,
65
-            'arguments' => null,  // custom arguments to pass to the callback functions.
65
+            'arguments' => null, // custom arguments to pass to the callback functions.
66 66
         );
67 67
         $this->aTabs                = $this->_getFormattedTabs( $aTabs );
68 68
         $this->aActiveSlugs         = $this->getAsArray( $asActiveTabSlugs );
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
          * @return      array
77 77
          */
78 78
         private function _getFormattedTabs( array $aTabs ) {
79
-            foreach( $aTabs as $_isKey => &$_aTab ) {
79
+            foreach ( $aTabs as $_isKey => &$_aTab ) {
80 80
                 $_aFormattedTab = $this->_getFormattedTab( $_aTab, $aTabs );
81 81
                 if ( isset( $_aFormattedTab[ 'slug' ] ) ) {
82 82
                     $_aTab = $_aFormattedTab;
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
         private function _getTabs() {
128 128
 
129 129
             $_aOutput = array();
130
-            foreach( $this->aTabs as $_aTab ) {
130
+            foreach ( $this->aTabs as $_aTab ) {
131 131
                 $_sTab = $this->_getTab( $_aTab );
132
-                if ( ! $_sTab ) {
132
+                if ( !$_sTab ) {
133 133
                     continue;
134 134
                 }
135
-                $_aOutput[] = $_sTab;
135
+                $_aOutput[ ] = $_sTab;
136 136
             }
137 137
 
138 138
             $_aContainerAttributes = $this->aAttributes + array( 'class' => null );
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
             return empty( $_aOutput )
145 145
                 ? ''
146
-                : "<{$this->sTabTag} " . $this->getAttributes( $_aContainerAttributes ) . ">"
146
+                : "<{$this->sTabTag} ".$this->getAttributes( $_aContainerAttributes ).">"
147 147
                     . implode( '', $_aOutput )
148 148
                 . "</{$this->sTabTag}>";
149 149
 
Please login to merge, or discard this patch.
_common/_abstract/_view/AdminPageFramework_Factory___Script_Base.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @since       3.3.0
30 30
      */
31
-    public function __construct( $oMsg=null ) {
31
+    public function __construct( $oMsg = null ) {
32 32
 
33 33
         if ( $this->hasBeenCalled( get_class( $this ) ) ) {
34 34
             return;
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function _replyToPrintScript() {
89 89
         $_sScript = $this->getScript( $this->oMsg );
90
-        if ( ! $_sScript ) {
90
+        if ( !$_sScript ) {
91 91
             return;
92 92
         }
93
-        echo "<script type='text/javascript' class='" . strtolower( get_class( $this ) ) . "'>"
93
+        echo "<script type='text/javascript' class='".strtolower( get_class( $this ) )."'>"
94 94
                 . '/* <![CDATA[ */'
95 95
                 . $_sScript
96 96
                 . '/* ]]> */'
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_View.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
         // Use nonce for verification
32 32
         $_aOutput   = array();
33
-        $_aOutput[] = wp_nonce_field(
33
+        $_aOutput[ ] = wp_nonce_field(
34 34
             $this->oProp->sMetaBoxID,
35 35
             $this->oProp->sMetaBoxID,
36 36
             true,
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
         // Get the fields output. If no field is added, the form object is not instantiated.
41 41
         if ( isset( $this->oForm ) ) {
42
-            $_aOutput[] = $this->oForm->get();
42
+            $_aOutput[ ] = $this->oForm->get();
43 43
         }
44 44
 
45 45
         // Do actions
46
-        $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this );
46
+        $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this );
47 47
 
48 48
         // Render the filtered output.
49 49
         echo $this->oUtil->addAndApplyFilters(
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox_Controller.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -17,32 +17,32 @@
 block discarded – undo
17 17
 abstract class AdminPageFramework_MetaBox_Controller extends AdminPageFramework_MetaBox_View {
18 18
 
19 19
     /**
20
-    * The method for all necessary set-ups.
21
-    *
22
-    * <h4>Example</h4>
23
-    * <code> public function setUp() {
24
-    *     $this->addSettingFields(
25
-    *         array(
26
-    *             'field_id'    => 'sample_metabox_text_field',
27
-    *             'title'       => 'Text Input',
28
-    *             'description' => 'The description for the field.',
29
-    *             'type'        => 'text',
30
-    *         ),
31
-    *         array(
32
-    *             'field_id'    => 'sample_metabox_textarea_field',
33
-    *             'title'       => 'Textarea',
34
-    *             'description' => 'The description for the field.',
35
-    *             'type'        => 'textarea',
36
-    *             'default'     => 'This is a default text value.',
37
-    *         )
38
-    *     );
39
-    * }</code>
40
-    *
41
-    * @abstract
42
-    * @since        2.0.0
43
-    * @remark       The user should override this method.
44
-    * @return       void
45
-    */
20
+     * The method for all necessary set-ups.
21
+     *
22
+     * <h4>Example</h4>
23
+     * <code> public function setUp() {
24
+     *     $this->addSettingFields(
25
+     *         array(
26
+     *             'field_id'    => 'sample_metabox_text_field',
27
+     *             'title'       => 'Text Input',
28
+     *             'description' => 'The description for the field.',
29
+     *             'type'        => 'text',
30
+     *         ),
31
+     *         array(
32
+     *             'field_id'    => 'sample_metabox_textarea_field',
33
+     *             'title'       => 'Textarea',
34
+     *             'description' => 'The description for the field.',
35
+     *             'type'        => 'textarea',
36
+     *             'default'     => 'This is a default text value.',
37
+     *         )
38
+     *     );
39
+     * }</code>
40
+     *
41
+     * @abstract
42
+     * @since        2.0.0
43
+     * @remark       The user should override this method.
44
+     * @return       void
45
+     */
46 46
     public function setUp() {}
47 47
 
48 48
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @since 3.0.0
54 54
      */
55
-    public function enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
55
+    public function enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
56 56
         return $this->oResource->_enqueueStyles( $aSRCs, $aPostTypes, $aCustomArgs );
57 57
     }
58 58
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param       array       (optional) The argument array for more advanced parameters.
76 76
      * @return      string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
77 77
      */
78
-    public function enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
78
+    public function enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
79 79
         return $this->oResource->_enqueueStyle( $sSRC, $aPostTypes, $aCustomArgs );
80 80
     }
81 81
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      *
84 84
      * @since 3.0.0
85 85
      */
86
-    public function enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) {
86
+    public function enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) {
87 87
         return $this->oResource->_enqueueScripts( $aSRCs, $aPostTypes, $aCustomArgs );
88 88
     }
89 89
     /**
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * @param       array       (optional) The argument array for more advanced parameters.
119 119
      * @return      string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
120 120
      */
121
-    public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) {
121
+    public function enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) {
122 122
         return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs );
123 123
     }
124 124
 
Please login to merge, or discard this patch.