Passed
Branch master (1d62df)
by
unknown
20:41
created
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   +7 added lines, -7 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
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      * @since       2.1.0
178 178
      * @remark      This method just adds the given text into the class property. The actual registration will be performed with the `replyToRegisterHelpTabTextForMetaBox()` method.
179 179
      */
180
-    public function addHelpText( $sHTMLContent, $sHTMLSidebarContent="" ) {
180
+    public function addHelpText( $sHTMLContent, $sHTMLSidebarContent = "" ) {
181 181
         if ( method_exists( $this->oHelpPane, '_addHelpText' ) ) {
182 182
             $this->oHelpPane->_addHelpText( $sHTMLContent, $sHTMLSidebarContent );
183 183
         }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) {
215 215
 
216
-        foreach( func_get_args() as $_asSectionset ) {
216
+        foreach ( func_get_args() as $_asSectionset ) {
217 217
             $this->addSettingSection( $_asSectionset );
218 218
         }
219 219
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      */
300 300
     public function addSettingSection( $aSectionset ) {
301 301
 
302
-        if ( ! is_array( $aSectionset ) ) {
302
+        if ( !is_array( $aSectionset ) ) {
303 303
             return;
304 304
         }
305 305
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
     * @return       void
333 333
     */
334 334
     public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {
335
-        foreach( func_get_args() as $_aFieldset ) {
335
+        foreach ( func_get_args() as $_aFieldset ) {
336 336
             $this->addSettingField( $_aFieldset );
337 337
         }
338 338
     }
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
     * @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.
608 608
     * @return       void
609 609
     */
610
-    public function setSettingNotice( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) {
610
+    public function setSettingNotice( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) {
611 611
         $this->oForm->setSubmitNotice(
612 612
             $sMessage,
613 613
             $sType,
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
      * @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.
627 627
      * @return      boolean     True if a setting notice is set; otherwise, false.
628 628
      */
629
-    public function hasSettingNotice( $sType='' ) {
629
+    public function hasSettingNotice( $sType = '' ) {
630 630
         return $this->oForm->hasSubmitNotice( $sType );
631 631
     }
632 632
 
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 1 patch
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.
development/factory/meta_box/AdminPageFramework_MetaBox_Router.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param       string          $sTextDomain            (optional) The text domain applied to the displayed text messages. Default: `admin-page-framework`.
34 34
      * @return      void
35 35
      */
36
-    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) {
36
+    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) {
37 37
 
38 38
         parent::__construct( $this->oProp );
39 39
 
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
             ? $this->oUtil->sanitizeSlug( $sMetaBoxID )
42 42
             : strtolower( $this->oProp->sClassName );
43 43
         $this->oProp->sTitle        = $sTitle;
44
-        $this->oProp->sContext      = $sContext;    // 'normal', 'advanced', or 'side'
45
-        $this->oProp->sPriority     = $sPriority;   // 'high', 'core', 'default' or 'low'
44
+        $this->oProp->sContext      = $sContext; // 'normal', 'advanced', or 'side'
45
+        $this->oProp->sPriority     = $sPriority; // 'high', 'core', 'default' or 'low'
46 46
 
47
-        if ( ! $this->oProp->bIsAdmin ) {
47
+        if ( !$this->oProp->bIsAdmin ) {
48 48
             return;
49 49
         }
50 50
 
51 51
         // 3.8.14
52
-        add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToCallLoadMethods' ), 100 );
52
+        add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToCallLoadMethods' ), 100 );
53 53
 
54 54
         $this->oUtil->registerAction(
55 55
             $this->oProp->bIsAdminAjax
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
             return true;
87 87
         }
88 88
 
89
-        if ( ! in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
89
+        if ( !in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
90 90
             return false;
91 91
         }
92 92
 
93
-        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {
93
+        if ( !in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {
94 94
             return false;
95 95
         }
96 96
         return true;
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function _isValidAjaxReferrer() {
107 107
 
108
-        if ( ! $this->oProp->bIsAdminAjax ) {
108
+        if ( !$this->oProp->bIsAdminAjax ) {
109 109
             return false;
110 110
         }
111 111
         $_aReferrer = parse_url( $this->oProp->sAjaxReferrer ) + array( 'query' => '', 'path' => '' );
112 112
         parse_str( $_aReferrer[ 'query' ], $_aQuery );
113 113
 
114 114
         $_sBaseName = basename( $_aReferrer[ 'path' ] );
115
-        if ( ! in_array( $_sBaseName, array( 'post.php', 'post-new.php' ) ) ) {
115
+        if ( !in_array( $_sBaseName, array( 'post.php', 'post-new.php' ) ) ) {
116 116
             return false;
117 117
         }
118 118
         // post-new.php?post_type={...} or post.php?post={n}&action=edit
Please login to merge, or discard this patch.
factory/meta_box/_model/AdminPageFramework_Property_post_meta_box.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @since       2.1.0       Moved from the meta box class.
35 35
      * @var string
36 36
      */
37
-    public $sMetaBoxID ='';
37
+    public $sMetaBoxID = '';
38 38
 
39 39
     /**
40 40
      * Stores the post type slugs associated with the meta box.
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
     /**
138 138
      * Calls the parent constructor by formatting the parameter values.
139 139
      */
140
-    public function __construct( $oCaller, $sClassName, $sCapability='edit_posts', $sTextDomain='admin-page-framework', $sStructureType='post_meta_box' ) {
140
+    public function __construct( $oCaller, $sClassName, $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework', $sStructureType = 'post_meta_box' ) {
141 141
 
142 142
         parent::__construct(
143
-            $oCaller,           // caller object
144
-            null,               // caller script path - meta boxes don't need the caller script path.
145
-            $sClassName,        // class name
146
-            $sCapability,       // capability
147
-            $sTextDomain,       // text domain
143
+            $oCaller, // caller object
144
+            null, // caller script path - meta boxes don't need the caller script path.
145
+            $sClassName, // class name
146
+            $sCapability, // capability
147
+            $sTextDomain, // text domain
148 148
             $sStructureType     // structure type
149 149
         );
150 150
 
Please login to merge, or discard this patch.