@@ -520,7 +520,7 @@ |
||
| 520 | 520 | return self::getAttributes( |
| 521 | 521 | array( |
| 522 | 522 | 'class' => 'repeatable-section-remove-button button-secondary ' |
| 523 | - . 'repeatable-section-button button button-large', |
|
| 523 | + . 'repeatable-section-button button button-large', |
|
| 524 | 524 | 'title' => $oMsg->get( 'remove_section' ), |
| 525 | 525 | 'style' => $iSectionCount <= 1 |
| 526 | 526 | ? 'display:none' |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | if ( empty( $asArguments ) ) { |
| 447 | 447 | return ''; |
| 448 | 448 | } |
| 449 | - if ( self::hasBeenCalled( 'repeatable_section_' . $sContainerTagID ) ) { |
|
| 449 | + if ( self::hasBeenCalled( 'repeatable_section_'.$sContainerTagID ) ) { |
|
| 450 | 450 | return ''; |
| 451 | 451 | } |
| 452 | 452 | |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | $_oFormatter = new AdminPageFramework_Form_Model___Format_RepeatableSection( $asArguments, $oMsg ); |
| 455 | 455 | $_aArguments = $_oFormatter->get(); |
| 456 | 456 | $_sButtons = self::___getRepeatableSectionButtons( $_aArguments, $oMsg, $sContainerTagID, $iSectionCount ); |
| 457 | - $_sButtonsHTML = '"' . $_sButtons . '"'; |
|
| 457 | + $_sButtonsHTML = '"'.$_sButtons.'"'; |
|
| 458 | 458 | $_aJSArray = json_encode( $_aArguments ); |
| 459 | 459 | $_sScript = <<<JAVASCRIPTS |
| 460 | 460 | jQuery( document ).ready( function() { |
@@ -500,17 +500,17 @@ discard block |
||
| 500 | 500 | $_sIconAdd = "<span class='dashicons dashicons-plus-alt2'></span>"; |
| 501 | 501 | } |
| 502 | 502 | return "<div class='admin-page-framework-repeatable-section-buttons-outer-container'>" |
| 503 | - . "<div " . self::___getContainerAttributes( $_aArguments, $oMsg ) . ' >' |
|
| 504 | - . "<a " . self::___getRemoveButtonAttributes( $sContainerTagID, $oMsg, $iSectionCount ) . ">" |
|
| 503 | + . "<div ".self::___getContainerAttributes( $_aArguments, $oMsg ).' >' |
|
| 504 | + . "<a ".self::___getRemoveButtonAttributes( $sContainerTagID, $oMsg, $iSectionCount ).">" |
|
| 505 | 505 | . $_sIconRemove |
| 506 | 506 | . "</a>" |
| 507 | - . "<a " . self::___getAddButtonAttributes( $sContainerTagID, $oMsg, $_aArguments ) . ">" |
|
| 507 | + . "<a ".self::___getAddButtonAttributes( $sContainerTagID, $oMsg, $_aArguments ).">" |
|
| 508 | 508 | . $_sIconAdd |
| 509 | 509 | . "</a>" |
| 510 | 510 | . "</div>" |
| 511 | 511 | . "</div>" |
| 512 | 512 | . AdminPageFramework_Form_Utility::getModalForDisabledRepeatableElement( |
| 513 | - 'repeatable_section_disabled_' . $sContainerTagID, |
|
| 513 | + 'repeatable_section_disabled_'.$sContainerTagID, |
|
| 514 | 514 | $_aArguments[ 'disabled' ] |
| 515 | 515 | ); |
| 516 | 516 | } |
@@ -526,12 +526,12 @@ discard block |
||
| 526 | 526 | empty( $aArguments[ 'disabled' ] ) ? '' : 'disabled' |
| 527 | 527 | ), |
| 528 | 528 | ); |
| 529 | - unset( $aArguments[ 'disabled' ][ 'message' ] ); // this element can contain HTML tags. |
|
| 529 | + unset( $aArguments[ 'disabled' ][ 'message' ] ); // this element can contain HTML tags. |
|
| 530 | 530 | // Needs to remove it if it is empty as its data attribute will be checked in the JavaScript script. |
| 531 | 531 | if ( empty( $aArguments[ 'disabled' ] ) ) { |
| 532 | 532 | unset( $aArguments[ 'disabled' ] ); |
| 533 | 533 | } |
| 534 | - return self::getAttributes( $_aAttriubtes ) . ' ' . self::getDataAttributes( $aArguments ); |
|
| 534 | + return self::getAttributes( $_aAttriubtes ).' '.self::getDataAttributes( $aArguments ); |
|
| 535 | 535 | } |
| 536 | 536 | /** |
| 537 | 537 | * @return string |
@@ -562,10 +562,10 @@ discard block |
||
| 562 | 562 | . 'repeatable-section-button button button-large', |
| 563 | 563 | 'title' => $oMsg->get( 'add_section' ), |
| 564 | 564 | 'data-id' => $sContainerTagID, |
| 565 | - 'href' => ! empty( $aArguments[ 'disabled' ] ) |
|
| 566 | - ? '#TB_inline?width=' . $aArguments[ 'disabled' ][ 'box_width' ] |
|
| 567 | - . '&height=' . $aArguments[ 'disabled' ][ 'box_height' ] |
|
| 568 | - . '&inlineId=' . 'repeatable_section_disabled_' . $sContainerTagID |
|
| 565 | + 'href' => !empty( $aArguments[ 'disabled' ] ) |
|
| 566 | + ? '#TB_inline?width='.$aArguments[ 'disabled' ][ 'box_width' ] |
|
| 567 | + . '&height='.$aArguments[ 'disabled' ][ 'box_height' ] |
|
| 568 | + . '&inlineId='.'repeatable_section_disabled_'.$sContainerTagID |
|
| 569 | 569 | : null, |
| 570 | 570 | ) |
| 571 | 571 | ); |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | * @since 3.8.13 |
| 37 | 37 | */ |
| 38 | 38 | static protected $_aStructure_Disabled = array( |
| 39 | - 'message' => 'The ability of repeating sections is disabled.', // will be reassigned |
|
| 40 | - 'caption' => 'Warning', // will be reassigned |
|
| 39 | + 'message' => 'The ability of repeating sections is disabled.', // will be reassigned |
|
| 40 | + 'caption' => 'Warning', // will be reassigned |
|
| 41 | 41 | 'box_width' => 300, |
| 42 | 42 | 'box_height' => 72, |
| 43 | 43 | ); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function __construct( /* array $asArguments, $oMsg */ ) { |
| 56 | 56 | |
| 57 | - $_aParameters = func_get_args() + array( |
|
| 57 | + $_aParameters = func_get_args() + array( |
|
| 58 | 58 | $this->_aArguments, |
| 59 | 59 | null |
| 60 | 60 | ); |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | public function get() { |
| 74 | 74 | |
| 75 | 75 | $_aArguments = $this->_aArguments + self::$_aStructure; |
| 76 | - unset( $_aArguments[ 0 ] ); // remove the 0 index element converted from `'repeatable => 'true',`. |
|
| 77 | - if ( ! empty( $_aArguments[ 'disabled' ] ) ) { |
|
| 76 | + unset( $_aArguments[ 0 ] ); // remove the 0 index element converted from `'repeatable => 'true',`. |
|
| 77 | + if ( !empty( $_aArguments[ 'disabled' ] ) ) { |
|
| 78 | 78 | $_aArguments[ 'disabled' ] = $_aArguments[ 'disabled' ] + array( |
| 79 | 79 | 'message' => $this->_getDefaultMessage(), |
| 80 | 80 | 'caption' => $this->_oMsg->get( 'warning_caption' ), |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * @since 3.7.0 |
| 94 | 94 | * @return array The modified section-sets definition array. |
| 95 | 95 | */ |
| 96 | - public function _replyToModifySectionsets( $aSectionsets ) { |
|
| 96 | + public function _replyToModifySectionsets( $aSectionsets ) { |
|
| 97 | 97 | |
| 98 | 98 | return $this->oUtil->addAndApplyFilter( |
| 99 | 99 | $this, // caller factory object |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | * An alias of `_setLastInputs()`. |
| 365 | 365 | * @deprecated 3.7.0 |
| 366 | 366 | */ |
| 367 | - public function _setLastInput( $aLastInputs ) { |
|
| 367 | + public function _setLastInput( $aLastInputs ) { |
|
| 368 | 368 | return $this->setLastInputs( $aLastInputs ); |
| 369 | 369 | } |
| 370 | 370 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | add_filter( |
| 33 | 33 | // 'field_types_admin_page_framework', |
| 34 | - 'field_types_' . $oProp->sClassName, |
|
| 34 | + 'field_types_'.$oProp->sClassName, |
|
| 35 | 35 | array( $this, '_replyToFilterFieldTypeDefinitions' ) |
| 36 | 36 | ); |
| 37 | 37 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | 'title' => null, |
| 54 | 54 | 'help_aside' => null, |
| 55 | 55 | ); |
| 56 | - if ( ! $aFieldset[ 'help' ] ) { |
|
| 56 | + if ( !$aFieldset[ 'help' ] ) { |
|
| 57 | 57 | return; |
| 58 | 58 | } |
| 59 | 59 | $this->oHelpPane->_addHelpTextForFormFields( |
@@ -73,9 +73,9 @@ discard block |
||
| 73 | 73 | public function _replyToFilterFieldTypeDefinitions( $aFieldTypeDefinitions ) { |
| 74 | 74 | |
| 75 | 75 | // Not triggering `__call()` as the filter is fired manually in the form class. |
| 76 | - if ( method_exists( $this, 'field_types_' . $this->oProp->sClassName ) ) { |
|
| 76 | + if ( method_exists( $this, 'field_types_'.$this->oProp->sClassName ) ) { |
|
| 77 | 77 | return call_user_func_array( |
| 78 | - array( $this, 'field_types_' . $this->oProp->sClassName ), |
|
| 78 | + array( $this, 'field_types_'.$this->oProp->sClassName ), |
|
| 79 | 79 | array( $aFieldTypeDefinitions ) |
| 80 | 80 | ); |
| 81 | 81 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | public function _replyToModifySectionsets( $aSectionsets ) { |
| 97 | 97 | |
| 98 | 98 | return $this->oUtil->addAndApplyFilter( |
| 99 | - $this, // caller factory object |
|
| 99 | + $this, // caller factory object |
|
| 100 | 100 | "sections_{$this->oProp->sClassName}", |
| 101 | 101 | $aSectionsets |
| 102 | 102 | ); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | public function _replyToModifyFieldsets( $aFieldsets, $aSectionsets ) { |
| 117 | 117 | |
| 118 | 118 | // Apply filters to added field-sets |
| 119 | - foreach( $aFieldsets as $_sSectionPath => $_aFields ) { |
|
| 119 | + foreach ( $aFieldsets as $_sSectionPath => $_aFields ) { |
|
| 120 | 120 | $_aSectionPath = explode( '|', $_sSectionPath ); |
| 121 | 121 | $_sFilterSuffix = implode( '_', $_aSectionPath ); |
| 122 | 122 | $aFieldsets[ $_sSectionPath ] = $this->oUtil->addAndApplyFilter( |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $_aFields |
| 126 | 126 | ); |
| 127 | 127 | } |
| 128 | - $aFieldsets = $this->oUtil->addAndApplyFilter( |
|
| 128 | + $aFieldsets = $this->oUtil->addAndApplyFilter( |
|
| 129 | 129 | $this, |
| 130 | 130 | "fields_{$this->oProp->sClassName}", |
| 131 | 131 | $aFieldsets |
@@ -195,14 +195,14 @@ discard block |
||
| 195 | 195 | */ |
| 196 | 196 | private function _getHookNameByFieldsetAndPrefix( $sPrefix, $aFieldset ) { |
| 197 | 197 | |
| 198 | - $_sFieldPart = '_' . implode( '_', $aFieldset[ '_field_path_array' ] ); |
|
| 198 | + $_sFieldPart = '_'.implode( '_', $aFieldset[ '_field_path_array' ] ); |
|
| 199 | 199 | $_sSectionPart = implode( '_', $aFieldset[ '_section_path_array' ] ); |
| 200 | 200 | $_sSectionPart = $this->oUtil->getAOrB( |
| 201 | 201 | '_default' === $_sSectionPart, |
| 202 | 202 | '', |
| 203 | - '_' . $_sSectionPart |
|
| 203 | + '_'.$_sSectionPart |
|
| 204 | 204 | ); |
| 205 | - return $sPrefix . $this->oProp->sClassName . $_sSectionPart . $_sFieldPart; |
|
| 205 | + return $sPrefix.$this->oProp->sClassName.$_sSectionPart.$_sFieldPart; |
|
| 206 | 206 | |
| 207 | 207 | } |
| 208 | 208 | |
@@ -272,9 +272,9 @@ discard block |
||
| 272 | 272 | public function _replyToGetSavedFormData() { |
| 273 | 273 | |
| 274 | 274 | // Must update the property with the filtered value. |
| 275 | - $this->oProp->aOptions = $this->oUtil->addAndApplyFilter( |
|
| 275 | + $this->oProp->aOptions = $this->oUtil->addAndApplyFilter( |
|
| 276 | 276 | $this, // the caller factory object |
| 277 | - 'options_' . $this->oProp->sClassName, |
|
| 277 | + 'options_'.$this->oProp->sClassName, |
|
| 278 | 278 | $this->oProp->aOptions // subject value to be filtered |
| 279 | 279 | ); |
| 280 | 280 | return $this->oProp->aOptions; |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | * An alias of `_setLastInputs()`. |
| 365 | 365 | * @deprecated 3.7.0 |
| 366 | 366 | */ |
| 367 | - public function _setLastInput( $aLastInputs ) { |
|
| 367 | + public function _setLastInput( $aLastInputs ) { |
|
| 368 | 368 | return $this->setLastInputs( $aLastInputs ); |
| 369 | 369 | } |
| 370 | 370 | |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | public function _replyToRegisterHelpTabText() { |
| 30 | 30 | |
| 31 | 31 | // Check if the currently loaded page is of meta box page. |
| 32 | - if ( ! $this->oProp->oCaller->isInThePage() ) { |
|
| 32 | + if ( !$this->oProp->oCaller->isInThePage() ) { |
|
| 33 | 33 | return false; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | * @since 3.7.0 |
| 22 | 22 | * @return string |
| 23 | 23 | */ |
| 24 | - protected function _get() { |
|
| 24 | + protected function _get() { |
|
| 25 | 25 | return $this->_getFieldErrorRules(); |
| 26 | 26 | } |
| 27 | 27 | /** |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @since 3.7.0 |
| 31 | 31 | */ |
| 32 | 32 | public function add( $sCSSRules ) { |
| 33 | - $this->aAdded[] = $sCSSRules; |
|
| 33 | + $this->aAdded[ ] = $sCSSRules; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function get() { |
| 41 | 41 | |
| 42 | - $_sCSSRules = $this->_get() . PHP_EOL; |
|
| 42 | + $_sCSSRules = $this->_get().PHP_EOL; |
|
| 43 | 43 | $_sCSSRules .= $this->_getVersionSpecific(); |
| 44 | 44 | $_sCSSRules .= implode( PHP_EOL, $this->aAdded ); |
| 45 | 45 | return $_sCSSRules; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | protected function _get() { |
| 24 | 24 | |
| 25 | - $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) ); |
|
| 25 | + $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) ); |
|
| 26 | 26 | return <<<CSSRULES |
| 27 | 27 | .admin-page-framework-form-warning { |
| 28 | 28 | font-size: 1em; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * @return string The generated field name model. |
| 35 | 35 | */ |
| 36 | 36 | public function getModel() { |
| 37 | - return $this->get() . '|' . $this->sIndexMark; |
|
| 37 | + return $this->get().'|'.$this->sIndexMark; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | return $_sResult; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - public function getModel() { |
|
| 29 | + public function getModel() { |
|
| 30 | 30 | return $this->get() . '[' . $this->sIndexMark . ']'; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | return $_sResult; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - public function getModel() { |
|
| 29 | - return $this->get() . '[' . $this->sIndexMark . ']'; |
|
| 28 | + public function getModel() { |
|
| 29 | + return $this->get().'['.$this->sIndexMark.']'; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | protected function _getFieldName() { |
| 36 | 36 | |
| 37 | - $_aFieldPath = $this->aArguments[ '_field_path_array' ]; |
|
| 38 | - if ( ! $this->_isSectionSet() ) { |
|
| 37 | + $_aFieldPath = $this->aArguments[ '_field_path_array' ]; |
|
| 38 | + if ( !$this->_isSectionSet() ) { |
|
| 39 | 39 | return $this->_getInputNameConstructed( $_aFieldPath ); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $_aSectionPath = $this->aArguments[ '_section_path_array' ]; |
| 43 | 43 | if ( $this->_isSectionSet() && isset( $this->aArguments[ '_section_index' ] ) ) { |
| 44 | - $_aSectionPath[] = $this->aArguments[ '_section_index' ]; |
|
| 44 | + $_aSectionPath[ ] = $this->aArguments[ '_section_index' ]; |
|
| 45 | 45 | } |
| 46 | 46 | $_sFieldName = $this->_getInputNameConstructed( |
| 47 | 47 | array_merge( $_aSectionPath, $_aFieldPath ) |