@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * Stores the tab items. |
| 28 | 28 | */ |
| 29 | - public $aTabs = array(); |
|
| 29 | + public $aTabs = array(); |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Stores container attributes. |
@@ -36,11 +36,11 @@ discard block |
||
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | 38 | public $aTab = array( |
| 39 | - 'slug' => null, // (string) tab slug (id) |
|
| 40 | - 'title' => null, // (string) tab title |
|
| 41 | - 'href' => null, // (string) link url |
|
| 42 | - 'disabled' => null, // (boolean) |
|
| 43 | - 'class' => null, // (string) class selector to append to the class attribute |
|
| 39 | + 'slug' => null, // (string) tab slug (id) |
|
| 40 | + 'title' => null, // (string) tab title |
|
| 41 | + 'href' => null, // (string) link url |
|
| 42 | + 'disabled' => null, // (boolean) |
|
| 43 | + 'class' => null, // (string) class selector to append to the class attribute |
|
| 44 | 44 | 'attributes' => array(), |
| 45 | 45 | ); |
| 46 | 46 | |
@@ -59,11 +59,11 @@ discard block |
||
| 59 | 59 | * @param array $aTabs An array holding each tab definitions |
| 60 | 60 | * @param array|string $asActiveTabSlugs The default tab slug. |
| 61 | 61 | */ |
| 62 | - public function __construct( array $aTabs, $asActiveTabSlugs, $sTabTag='h2', $aAttributes=array( 'class' => 'nav-tab-wrapper', ), $aCallbacks=array() ) { |
|
| 62 | + public function __construct( array $aTabs, $asActiveTabSlugs, $sTabTag = 'h2', $aAttributes = array( 'class' => 'nav-tab-wrapper',), $aCallbacks = array() ) { |
|
| 63 | 63 | |
| 64 | - $this->aCallbacks = $aCallbacks + array( |
|
| 64 | + $this->aCallbacks = $aCallbacks + array( |
|
| 65 | 65 | 'format' => null, |
| 66 | - 'arguments' => null, // custom arguments to pass to the callback functions. |
|
| 66 | + 'arguments' => null, // custom arguments to pass to the callback functions. |
|
| 67 | 67 | ); |
| 68 | 68 | $this->aTabs = $this->_getFormattedTabs( $aTabs ); |
| 69 | 69 | $this->aActiveSlugs = $this->getAsArray( $asActiveTabSlugs ); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * @return array |
| 78 | 78 | */ |
| 79 | 79 | private function _getFormattedTabs( array $aTabs ) { |
| 80 | - foreach( $aTabs as $_isKey => &$_aTab ) { |
|
| 80 | + foreach ( $aTabs as $_isKey => &$_aTab ) { |
|
| 81 | 81 | $_aFormattedTab = $this->_getFormattedTab( $_aTab, $aTabs ); |
| 82 | 82 | if ( isset( $_aFormattedTab[ 'slug' ] ) ) { |
| 83 | 83 | $_aTab = $_aFormattedTab; |
@@ -128,12 +128,12 @@ discard block |
||
| 128 | 128 | private function _getTabs() { |
| 129 | 129 | |
| 130 | 130 | $_aOutput = array(); |
| 131 | - foreach( $this->aTabs as $_aTab ) { |
|
| 131 | + foreach ( $this->aTabs as $_aTab ) { |
|
| 132 | 132 | $_sTab = $this->_getTab( $_aTab ); |
| 133 | - if ( ! $_sTab ) { |
|
| 133 | + if ( !$_sTab ) { |
|
| 134 | 134 | continue; |
| 135 | 135 | } |
| 136 | - $_aOutput[] = $_sTab; |
|
| 136 | + $_aOutput[ ] = $_sTab; |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | $_aContainerAttributes = $this->aAttributes + array( 'class' => null ); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | return empty( $_aOutput ) |
| 146 | 146 | ? '' |
| 147 | - : "<{$this->sTabTag} " . $this->getAttributes( $_aContainerAttributes ) . ">" |
|
| 147 | + : "<{$this->sTabTag} ".$this->getAttributes( $_aContainerAttributes ).">" |
|
| 148 | 148 | . implode( '', $_aOutput ) |
| 149 | 149 | . "</{$this->sTabTag}>"; |
| 150 | 150 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @subpackage Tab |
| 17 | 17 | * @internal |
| 18 | 18 | */ |
| 19 | -class AdminPageFramework_TabNavigationBar extends AdminPageFramework_FrameworkUtility { |
|
| 19 | +class AdminPageFramework_TabNavigationBar extends AdminPageFramework_FrameworkUtility { |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * The HTML tag used for the tag. |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @since 3.3.0 |
| 38 | 38 | */ |
| 39 | - public function __construct( $oMsg=null ) { |
|
| 39 | + public function __construct( $oMsg = null ) { |
|
| 40 | 40 | |
| 41 | 41 | $_sClassName = get_class( $this ); |
| 42 | 42 | if ( in_array( $_sClassName, self::$_aEnqueued ) ) { |
@@ -74,10 +74,10 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function _replyToPrintScript() { |
| 76 | 76 | $_sScript = $this->getScript( $this->oMsg ); |
| 77 | - if ( ! $_sScript ) { |
|
| 77 | + if ( !$_sScript ) { |
|
| 78 | 78 | return; |
| 79 | 79 | } |
| 80 | - echo "<script type='text/javascript' class='" . strtolower( get_class( $this ) ) . "'>" |
|
| 80 | + echo "<script type='text/javascript' class='".strtolower( get_class( $this ) )."'>" |
|
| 81 | 81 | . $_sScript |
| 82 | 82 | . "</script>"; |
| 83 | 83 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @since 3.7.9 Added the second parameter to accept an action hook name. |
| 28 | 28 | */ |
| 29 | 29 | |
| 30 | - public function __construct( $oFactory, $sActionHookName='admin_notices' ) { |
|
| 30 | + public function __construct( $oFactory, $sActionHookName = 'admin_notices' ) { |
|
| 31 | 31 | |
| 32 | 32 | $this->oFactory = $oFactory; |
| 33 | 33 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function _replyToPrintSettingNotice() { |
| 48 | 48 | |
| 49 | - if ( ! $this->_shouldProceed() ) { |
|
| 49 | + if ( !$this->_shouldProceed() ) { |
|
| 50 | 50 | return; |
| 51 | 51 | } |
| 52 | 52 | $this->oFactory->oForm->printSubmitNotices(); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | private function _shouldProceed() { |
| 62 | 62 | |
| 63 | - if ( ! $this->oFactory->_isInThePage() ) { |
|
| 63 | + if ( !$this->oFactory->_isInThePage() ) { |
|
| 64 | 64 | return false; |
| 65 | 65 | } |
| 66 | 66 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | private function _shouldProceed() { |
| 62 | 62 | |
| 63 | - if ( ! $this->oFactory->_isInThePage() ) { |
|
| 63 | + if ( ! $this->oFactory->_isInThePage() ) { |
|
| 64 | 64 | return false; |
| 65 | 65 | } |
| 66 | 66 | |
@@ -107,8 +107,8 @@ |
||
| 107 | 107 | } |
| 108 | 108 | CSSRULES; |
| 109 | 109 | |
| 110 | - return $_sCSS . PHP_EOL |
|
| 111 | - . self::_getPageLoadStatsRules() . PHP_EOL |
|
| 110 | + return $_sCSS.PHP_EOL |
|
| 111 | + . self::_getPageLoadStatsRules().PHP_EOL |
|
| 112 | 112 | . self::_getVersionSpecificRules(); |
| 113 | 113 | |
| 114 | 114 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | // Required sub-class objects |
| 132 | 132 | $this->oProp = $oProp; |
| 133 | 133 | |
| 134 | - if ( $this->oProp->bIsAdmin && ! $this->oProp->bIsAdminAjax ) { |
|
| 134 | + if ( $this->oProp->bIsAdmin && !$this->oProp->bIsAdminAjax ) { |
|
| 135 | 135 | if ( did_action( 'current_screen' ) ) { |
| 136 | 136 | $this->_replyToLoadComponents(); |
| 137 | 137 | } else { |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | // Call the user constructor. |
| 143 | - $this->start(); // defined in the controller class. |
|
| 144 | - $this->oUtil->addAndDoAction( $this, 'start_' . $this->oProp->sClassName, $this ); |
|
| 143 | + $this->start(); // defined in the controller class. |
|
| 144 | + $this->oUtil->addAndDoAction( $this, 'start_'.$this->oProp->sClassName, $this ); |
|
| 145 | 145 | |
| 146 | 146 | } |
| 147 | 147 | |
@@ -154,15 +154,15 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public function _replyToLoadComponents( /* $oScreen */ ) { |
| 156 | 156 | |
| 157 | - if ( ! $this->_isInThePage() ) { |
|
| 157 | + if ( !$this->_isInThePage() ) { |
|
| 158 | 158 | return; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - if ( ! isset( $this->oResource ) ) { |
|
| 161 | + if ( !isset( $this->oResource ) ) { |
|
| 162 | 162 | $this->oResource = $this->_replyTpSetAndGetInstance_oResource(); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if ( ! isset( $this->oLink ) ) { |
|
| 165 | + if ( !isset( $this->oLink ) ) { |
|
| 166 | 166 | $this->oLink = $this->_replyTpSetAndGetInstance_oLink(); |
| 167 | 167 | } |
| 168 | 168 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | public function _replyToDetermineToLoad() { |
| 212 | 212 | |
| 213 | - if ( ! $this->_isInThePage() ) { |
|
| 213 | + if ( !$this->_isInThePage() ) { |
|
| 214 | 214 | return; |
| 215 | 215 | } |
| 216 | 216 | |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | // Set and return the sub class object instance. |
| 292 | 292 | if ( in_array( $sPropertyName, $this->_aSubClassNames ) ) { |
| 293 | 293 | return call_user_func( |
| 294 | - array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
| 294 | + array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
| 295 | 295 | ); |
| 296 | 296 | } |
| 297 | 297 | |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | * |
| 386 | 386 | * @internal |
| 387 | 387 | */ |
| 388 | - public function __call( $sMethodName, $aArguments=null ) { |
|
| 388 | + public function __call( $sMethodName, $aArguments = null ) { |
|
| 389 | 389 | |
| 390 | 390 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
| 391 | 391 | |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | |
| 416 | 416 | // Check if the method name does not contain a backslash. |
| 417 | 417 | if ( false === strpos( $sMethodName, "\\" ) ) { |
| 418 | - return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
| 418 | + return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | // If the method name contains a backslash, the user may be using a name space. |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | array( $this, $_sAutoCallbackMethodName ), |
| 427 | 427 | $aArguments |
| 428 | 428 | ) |
| 429 | - : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
| 429 | + : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
| 430 | 430 | |
| 431 | 431 | } |
| 432 | 432 | |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | */ |
| 437 | 437 | private function _triggerUndefinedMethodWarning( $sMethodName ) { |
| 438 | 438 | trigger_error( |
| 439 | - AdminPageFramework_Registry::NAME . ': ' |
|
| 439 | + AdminPageFramework_Registry::NAME.': ' |
|
| 440 | 440 | . sprintf( |
| 441 | 441 | __( 'The method is not defined: %1$s', $this->oProp->sTextDomain ), |
| 442 | 442 | $sMethodName |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | if ( $this->oProp->bIsAdmin && ! $this->oProp->bIsAdminAjax ) { |
| 135 | 135 | if ( did_action( 'current_screen' ) ) { |
| 136 | 136 | $this->_replyToLoadComponents(); |
| 137 | - } else { |
|
| 137 | + } else { |
|
| 138 | 138 | add_action( 'current_screen', array( $this, '_replyToLoadComponents' ) ); |
| 139 | 139 | } |
| 140 | 140 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public function _replyToLoadComponents( /* $oScreen */ ) { |
| 156 | 156 | |
| 157 | - if ( ! $this->_isInThePage() ) { |
|
| 157 | + if ( ! $this->_isInThePage() ) { |
|
| 158 | 158 | return; |
| 159 | 159 | } |
| 160 | 160 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | * @since 3.1.0 |
| 182 | 182 | * @internal |
| 183 | 183 | */ |
| 184 | - protected function _isInstantiatable() { |
|
| 184 | + protected function _isInstantiatable() { |
|
| 185 | 185 | return true; |
| 186 | 186 | } |
| 187 | 187 | |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * @todo Change the visibility scope to `protected` as the public version of the method `isInThePage()` has been introduced to make the design consitent. |
| 197 | 197 | * @internal |
| 198 | 198 | */ |
| 199 | - public function _isInThePage() { |
|
| 199 | + public function _isInThePage() { |
|
| 200 | 200 | return true; |
| 201 | 201 | } |
| 202 | 202 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | public function _replyToDetermineToLoad() { |
| 212 | 212 | |
| 213 | - if ( ! $this->_isInThePage() ) { |
|
| 213 | + if ( ! $this->_isInThePage() ) { |
|
| 214 | 214 | return; |
| 215 | 215 | } |
| 216 | 216 | |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | public function __get( $sPropertyName ) { |
| 290 | 290 | |
| 291 | 291 | // Set and return the sub class object instance. |
| 292 | - if ( in_array( $sPropertyName, $this->_aSubClassNames ) ) { |
|
| 292 | + if ( in_array( $sPropertyName, $this->_aSubClassNames ) ) { |
|
| 293 | 293 | return call_user_func( |
| 294 | 294 | array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
| 295 | 295 | ); |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | * |
| 386 | 386 | * @internal |
| 387 | 387 | */ |
| 388 | - public function __call( $sMethodName, $aArguments=null ) { |
|
| 388 | + public function __call( $sMethodName, $aArguments=null ) { |
|
| 389 | 389 | |
| 390 | 390 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
| 391 | 391 | |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | |
| 85 | 85 | // The first element is the option key; the section or field dimensional keys follow. |
| 86 | 86 | if ( '__dummy_option_key' === $_aDimensionalKeys[ 0 ] ) { |
| 87 | - array_shift( $_aDimensionalKeys ); |
|
| 87 | + array_shift( $_aDimensionalKeys ); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $this->unsetDimensionalArrayElement( |
@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | * @param string $sStructureType The type of object. Currently 'post_meta_box' or 'user_meta' is accepted. |
| 32 | 32 | * @return void |
| 33 | 33 | */ |
| 34 | - public function updateMetaDataByType( $iObjectID, array $aInput, array $aSavedMeta, $sStructureType='post_meta_box' ) { |
|
| 34 | + public function updateMetaDataByType( $iObjectID, array $aInput, array $aSavedMeta, $sStructureType = 'post_meta_box' ) { |
|
| 35 | 35 | |
| 36 | - if ( ! $iObjectID ) { |
|
| 36 | + if ( !$iObjectID ) { |
|
| 37 | 37 | return; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | 'post_meta_box' => 'update_post_meta', |
| 42 | 42 | 'user_meta' => 'update_user_meta', |
| 43 | 43 | ); |
| 44 | - if ( ! in_array( $sStructureType, array_keys( $_aFunctionNameMapByFieldsType ) ) ) { |
|
| 44 | + if ( !in_array( $sStructureType, array_keys( $_aFunctionNameMapByFieldsType ) ) ) { |
|
| 45 | 45 | return; |
| 46 | 46 | } |
| 47 | 47 | $_sFunctionName = $this->getElement( $_aFunctionNameMapByFieldsType, $sStructureType ); |
@@ -69,16 +69,16 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | private function _getInputByUnset( array $aInput ) { |
| 71 | 71 | |
| 72 | - $_sUnsetKey = '__unset_' . $this->sStructureType; |
|
| 73 | - if ( ! isset( $_POST[ $_sUnsetKey ] ) ) { |
|
| 72 | + $_sUnsetKey = '__unset_'.$this->sStructureType; |
|
| 73 | + if ( !isset( $_POST[ $_sUnsetKey ] ) ) { |
|
| 74 | 74 | return $aInput; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $_aUnsetElements = array_unique( $_POST[ $_sUnsetKey ] ); |
| 78 | - foreach( $_aUnsetElements as $_sFlatInputName ) { |
|
| 78 | + foreach ( $_aUnsetElements as $_sFlatInputName ) { |
|
| 79 | 79 | |
| 80 | 80 | $_aDimensionalKeys = explode( '|', $_sFlatInputName ); |
| 81 | - if ( ! isset( $_aDimensionalKeys[ 0 ] ) ) { |
|
| 81 | + if ( !isset( $_aDimensionalKeys[ 0 ] ) ) { |
|
| 82 | 82 | continue; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | $_vSavedValue = $this->getElement( |
| 115 | 115 | $aSavedMeta, // subject |
| 116 | - $_sSectionOrFieldID, // dimensional keys |
|
| 116 | + $_sSectionOrFieldID, // dimensional keys |
|
| 117 | 117 | null // default value |
| 118 | 118 | ); |
| 119 | 119 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | private function _updateMetaDatumByFuncitonName( $iObjectID, $_vValue, array $aSavedMeta, $_sSectionOrFieldID, $_sFunctionName ) { |
| 109 | 109 | |
| 110 | - if ( is_null( $_vValue ) ) { |
|
| 110 | + if ( is_null( $_vValue ) ) { |
|
| 111 | 111 | return; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | // PHP can compare even array contents with the == operator. See http://www.php.net/manual/en/language.operators.array.php |
| 121 | 121 | // if the input value and the saved meta value are the same, no need to update it. |
| 122 | - if ( $_vValue == $_vSavedValue ) { |
|
| 122 | + if ( $_vValue == $_vSavedValue ) { |
|
| 123 | 123 | return; |
| 124 | 124 | } |
| 125 | 125 | |
@@ -57,18 +57,18 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // If the section ID is not registered, return false. |
| 60 | - if ( ! array_key_exists( $sID, $this->aSectionsets ) ) { |
|
| 60 | + if ( !array_key_exists( $sID, $this->aSectionsets ) ) { |
|
| 61 | 61 | return false; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | // the fields array's first dimension is also filled with the keys of section ids. |
| 65 | - if ( ! array_key_exists( $sID, $this->aFieldsets ) ) { |
|
| 65 | + if ( !array_key_exists( $sID, $this->aFieldsets ) ) { |
|
| 66 | 66 | return false; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // Since numeric IDs are denied at the beginning of the method, the elements will not be sub-sections. |
| 70 | 70 | $_bIsSeciton = false; |
| 71 | - foreach( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
| 71 | + foreach ( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
| 72 | 72 | |
| 73 | 73 | if ( $_sSectionID == $sID ) { |
| 74 | 74 | $_bIsSeciton = true; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @return boolean |
| 95 | 95 | */ |
| 96 | 96 | public function canUserView( $sCapability ) { |
| 97 | - if ( ! $sCapability ) { |
|
| 97 | + if ( !$sCapability ) { |
|
| 98 | 98 | return true; |
| 99 | 99 | } |
| 100 | 100 | return ( boolean ) current_user_can( $sCapability ); |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * @since DEVVER |
| 140 | 140 | */ |
| 141 | 141 | public function callBack( $oCallable, $asParameters ) { |
| 142 | - $_aParameters = self::getAsArray( |
|
| 142 | + $_aParameters = self::getAsArray( |
|
| 143 | 143 | $asParameters, |
| 144 | 144 | true // preserve empty |
| 145 | 145 | ); |
@@ -57,25 +57,25 @@ |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // If the section ID is not registered, return false. |
| 60 | - if ( ! array_key_exists( $sID, $this->aSectionsets ) ) { |
|
| 60 | + if ( ! array_key_exists( $sID, $this->aSectionsets ) ) { |
|
| 61 | 61 | return false; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | // the fields array's first dimension is also filled with the keys of section ids. |
| 65 | - if ( ! array_key_exists( $sID, $this->aFieldsets ) ) { |
|
| 65 | + if ( ! array_key_exists( $sID, $this->aFieldsets ) ) { |
|
| 66 | 66 | return false; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // Since numeric IDs are denied at the beginning of the method, the elements will not be sub-sections. |
| 70 | 70 | $_bIsSeciton = false; |
| 71 | - foreach( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
| 71 | + foreach( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
| 72 | 72 | |
| 73 | - if ( $_sSectionID == $sID ) { |
|
| 73 | + if ( $_sSectionID == $sID ) { |
|
| 74 | 74 | $_bIsSeciton = true; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | // a field using the ID is found, and it precedes a section match. |
| 78 | - if ( array_key_exists( $sID, $_aFields ) ) { |
|
| 78 | + if ( array_key_exists( $sID, $_aFields ) ) { |
|
| 79 | 79 | return false; |
| 80 | 80 | } |
| 81 | 81 | |
@@ -9,7 +9,6 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * Provides methods to retrieve field type resources. |
| 12 | - |
|
| 13 | 12 | * @package AdminPageFramework |
| 14 | 13 | * @subpackage Form |
| 15 | 14 | * @since DEVVER |
@@ -42,7 +41,7 @@ discard block |
||
| 42 | 41 | call_user_func_array( |
| 43 | 42 | $aFieldTypeDefinition[ 'hfFieldSetTypeSetter' ], |
| 44 | 43 | array( $sStructureType ) |
| 45 | - ); |
|
| 44 | + ); |
|
| 46 | 45 | } |
| 47 | 46 | |
| 48 | 47 | if ( is_callable( $aFieldTypeDefinition[ 'hfFieldLoader' ] ) ) { |
@@ -35,41 +35,41 @@ discard block |
||
| 35 | 35 | // Optional |
| 36 | 36 | 'page_slug' => null, |
| 37 | 37 | 'tab_slug' => null, |
| 38 | - 'section_tab_slug' => null, // 3.0.0+ |
|
| 38 | + 'section_tab_slug' => null, // 3.0.0+ |
|
| 39 | 39 | 'title' => null, |
| 40 | 40 | 'description' => null, |
| 41 | 41 | 'capability' => null, |
| 42 | 42 | 'if' => true, |
| 43 | - 'order' => null, // do not set the default number here because incremented numbers will be added when registering the sections. |
|
| 43 | + 'order' => null, // do not set the default number here because incremented numbers will be added when registering the sections. |
|
| 44 | 44 | 'help' => null, |
| 45 | 45 | 'help_aside' => null, |
| 46 | - 'repeatable' => false, // (boolean|array) 3.0.0+ |
|
| 47 | - 'sortable' => false, // (boolean|array) 3.6.0+ |
|
| 46 | + 'repeatable' => false, // (boolean|array) 3.0.0+ |
|
| 47 | + 'sortable' => false, // (boolean|array) 3.6.0+ |
|
| 48 | 48 | 'attributes' => array( // 3.3.1+ |
| 49 | - 'class' => null, // set null to avoid undefined index warnings. |
|
| 50 | - 'style' => null, // set null to avoid undefined index warnings. |
|
| 49 | + 'class' => null, // set null to avoid undefined index warnings. |
|
| 50 | + 'style' => null, // set null to avoid undefined index warnings. |
|
| 51 | 51 | 'tab' => array(), |
| 52 | 52 | ), |
| 53 | 53 | 'class' => array( // 3.3.1+ |
| 54 | 54 | 'tab' => array(), |
| 55 | 55 | ), |
| 56 | - 'hidden' => false, // 3.3.1+ |
|
| 57 | - 'collapsible' => false, // 3.4.0+ (boolean|array) For the array structure see the $aStructure_CollapsibleArguments property. |
|
| 58 | - 'save' => true, // 3.6.0+ |
|
| 56 | + 'hidden' => false, // 3.3.1+ |
|
| 57 | + 'collapsible' => false, // 3.4.0+ (boolean|array) For the array structure see the $aStructure_CollapsibleArguments property. |
|
| 58 | + 'save' => true, // 3.6.0+ |
|
| 59 | 59 | |
| 60 | - 'content' => null, // 3.6.1+ (string) An overriding section-set output. |
|
| 60 | + 'content' => null, // 3.6.1+ (string) An overriding section-set output. |
|
| 61 | 61 | |
| 62 | - 'tip' => null, // 3.7.0 (string) Tool tip HTML strings. |
|
| 62 | + 'tip' => null, // 3.7.0 (string) Tool tip HTML strings. |
|
| 63 | 63 | |
| 64 | 64 | // Internal |
| 65 | - '_fields_type' => null, // @deprecated 3.7.0+ Use the `_structure_type` instead. 3.0.0+ - same as the one of the field definition array. Used to insert debug info at the bottom of sections. |
|
| 66 | - '_structure_type' => null, // 3.7.0+ |
|
| 67 | - '_is_first_index' => false, // 3.4.0+ (boolean) indicates whether it is the first item of the sub-sections (for repeatable sections). |
|
| 68 | - '_is_last_index' => false, // 3.4.0+ (boolean) indicates whether it is the last item of the sub-sections (for repeatable sections). |
|
| 65 | + '_fields_type' => null, // @deprecated 3.7.0+ Use the `_structure_type` instead. 3.0.0+ - same as the one of the field definition array. Used to insert debug info at the bottom of sections. |
|
| 66 | + '_structure_type' => null, // 3.7.0+ |
|
| 67 | + '_is_first_index' => false, // 3.4.0+ (boolean) indicates whether it is the first item of the sub-sections (for repeatable sections). |
|
| 68 | + '_is_last_index' => false, // 3.4.0+ (boolean) indicates whether it is the last item of the sub-sections (for repeatable sections). |
|
| 69 | 69 | |
| 70 | - '_section_path' => '', // 3.7.0+ (string) e.g. my_section|nested_section |
|
| 71 | - '_section_path_array' => '', // 3.7.0+ (array) an array version of the above section_path argument. Numerically indexed. |
|
| 72 | - '_nested_depth' => 0, // 3.7.0+ (integer) the nested level of the section |
|
| 70 | + '_section_path' => '', // 3.7.0+ (string) e.g. my_section|nested_section |
|
| 71 | + '_section_path_array' => '', // 3.7.0+ (array) an array version of the above section_path argument. Numerically indexed. |
|
| 72 | + '_nested_depth' => 0, // 3.7.0+ (integer) the nested level of the section |
|
| 73 | 73 | |
| 74 | 74 | // 3.6.0+ - (object) the caller framework factory object. This allows the framework to access the factory property when rendering the section. |
| 75 | 75 | // 3.7.0+ It no longer stores a factory object but a form object. |
@@ -124,11 +124,11 @@ discard block |
||
| 124 | 124 | $_aSectionPath = explode( '|', $this->sSectionPath ); |
| 125 | 125 | $_aSectionset = $this->uniteArrays( |
| 126 | 126 | array( |
| 127 | - '_fields_type' => $this->sStructureType, // @deprecated 3.7.0+ |
|
| 128 | - '_structure_type' => $this->sStructureType, // 3.7.0+ |
|
| 129 | - '_section_path' => $this->sSectionPath, // 3.7.0+ |
|
| 127 | + '_fields_type' => $this->sStructureType, // @deprecated 3.7.0+ |
|
| 128 | + '_structure_type' => $this->sStructureType, // 3.7.0+ |
|
| 129 | + '_section_path' => $this->sSectionPath, // 3.7.0+ |
|
| 130 | 130 | '_section_path_array' => $_aSectionPath, |
| 131 | - '_nested_depth' => count( $_aSectionPath ) - 1, // 3.7.0+ - zero base |
|
| 131 | + '_nested_depth' => count( $_aSectionPath ) - 1, // 3.7.0+ - zero base |
|
| 132 | 132 | ) |
| 133 | 133 | + $this->aSectionset |
| 134 | 134 | + array( |