@@ -458,6 +458,7 @@ |
||
| 458 | 458 | * @internal |
| 459 | 459 | * @since 3.5.3 |
| 460 | 460 | * @since 3.7.0 Moved from `AdminPageFramework_FormDefinition_Page`. |
| 461 | + * @param string $sTabSlug |
|
| 461 | 462 | * @return boolean |
| 462 | 463 | */ |
| 463 | 464 | private function _isThisSectionSetToThisTab( $sSectionPath, $sPageSlug, $sTabSlug ) { |
@@ -51,16 +51,16 @@ discard block |
||
| 51 | 51 | public function getPageOnlyOptions( $aOptions, $sPageSlug ) { |
| 52 | 52 | |
| 53 | 53 | $_aStoredOptionsOfThePage = array(); |
| 54 | - foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
| 54 | + foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
| 55 | 55 | |
| 56 | 56 | // Check the section |
| 57 | - if ( ! $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) { |
|
| 57 | + if ( !$this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) { |
|
| 58 | 58 | continue; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // At this point, the element belongs the given page slug as the section is of the given page slug's. |
| 62 | 62 | $this->_setPageOnlyOptions( |
| 63 | - $_aStoredOptionsOfThePage, // by reference - gets updated in the method. |
|
| 63 | + $_aStoredOptionsOfThePage, // by reference - gets updated in the method. |
|
| 64 | 64 | $aOptions, |
| 65 | 65 | $_aSubSectionsOrFields, |
| 66 | 66 | $sPageSlug, |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * @internal |
| 81 | 81 | */ |
| 82 | 82 | private function _setPageOnlyOptions( array &$_aStoredOptionsOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug, $_sSectionID ) { |
| 83 | - foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
| 83 | + foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
| 84 | 84 | |
| 85 | 85 | // If it's a sub-section array, |
| 86 | 86 | if ( $this->isNumericInteger( $_sFieldID ) ) { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | public function getOtherPageOptions( $aOptions, $sPageSlug ) { |
| 153 | 153 | |
| 154 | 154 | $_aStoredOptionsNotOfThePage = array(); |
| 155 | - foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
| 155 | + foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
| 156 | 156 | |
| 157 | 157 | // Check the section |
| 158 | 158 | if ( $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | * @internal |
| 182 | 182 | */ |
| 183 | 183 | private function _setOtherPageOptions( array &$_aStoredOptionsNotOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug ) { |
| 184 | - foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
| 184 | + foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
| 185 | 185 | |
| 186 | 186 | // It's a sub-section array. |
| 187 | 187 | if ( $this->isNumericInteger( $_sFieldID ) ) { |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | public function getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug ) { |
| 245 | 245 | |
| 246 | 246 | $_aStoredOptionsNotOfTheTab = array(); |
| 247 | - foreach( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) { |
|
| 247 | + foreach ( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) { |
|
| 248 | 248 | |
| 249 | 249 | // If the section is of the given page and the given tab, skip. |
| 250 | 250 | if ( $this->_isThisSectionSetToThisTab( $_sSectionPath, $sPageSlug, $sTabSlug ) ) { |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | private function _setOtherTabOptions( array &$_aStoredOptionsNotOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $sSectionPath ) { |
| 276 | 276 | |
| 277 | 277 | // At this point, the passed element belongs to the other tabs since the section of the given tab is skipped. |
| 278 | - foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 278 | + foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 279 | 279 | |
| 280 | 280 | // If it's a sub section |
| 281 | 281 | if ( $this->isNumericInteger( $_isSubSectionIndexOrFieldID ) ) { |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | * @since 3.7.0 Moved from `AdminPageFramework_FormDefinition_Page`. |
| 334 | 334 | * @return array |
| 335 | 335 | */ |
| 336 | - public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) { |
|
| 336 | + public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug = '' ) { |
|
| 337 | 337 | |
| 338 | 338 | $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug ); |
| 339 | 339 | $_aTabOptions = $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions ); |
@@ -351,17 +351,17 @@ discard block |
||
| 351 | 351 | * @since 3.7.0 Moved from `AdminPageFramework_FormDefinition_Page`. |
| 352 | 352 | * @return array |
| 353 | 353 | */ |
| 354 | - public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) { |
|
| 354 | + public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug = '' ) { |
|
| 355 | 355 | |
| 356 | 356 | $_aStoredOptionsOfTheTab = array(); |
| 357 | - if ( ! $sTabSlug ) { |
|
| 357 | + if ( !$sTabSlug ) { |
|
| 358 | 358 | return $_aStoredOptionsOfTheTab; |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | - foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
| 361 | + foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
| 362 | 362 | |
| 363 | 363 | // Check the section |
| 364 | - if ( ! $this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) { |
|
| 364 | + if ( !$this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) { |
|
| 365 | 365 | continue; |
| 366 | 366 | } |
| 367 | 367 | |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | */ |
| 388 | 388 | private function _setTabOnlyOptions( array &$_aStoredOptionsOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $_sSectionID ) { |
| 389 | 389 | |
| 390 | - foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
| 390 | + foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
| 391 | 391 | |
| 392 | 392 | // if it's a sub-section array. |
| 393 | 393 | if ( $this->isNumericInteger( $_sFieldID ) ) { |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | */ |
| 445 | 445 | private function _isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) { |
| 446 | 446 | |
| 447 | - if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) { |
|
| 447 | + if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) { |
|
| 448 | 448 | return false; |
| 449 | 449 | } |
| 450 | 450 | return ( |
@@ -462,10 +462,10 @@ discard block |
||
| 462 | 462 | */ |
| 463 | 463 | private function _isThisSectionSetToThisTab( $sSectionPath, $sPageSlug, $sTabSlug ) { |
| 464 | 464 | |
| 465 | - if ( ! $this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) { |
|
| 465 | + if ( !$this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) { |
|
| 466 | 466 | return false; |
| 467 | 467 | } |
| 468 | - if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) { |
|
| 468 | + if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) { |
|
| 469 | 469 | return false; |
| 470 | 470 | } |
| 471 | 471 | return ( |
@@ -482,9 +482,9 @@ discard block |
||
| 482 | 482 | */ |
| 483 | 483 | private function _setOptionValue( &$aSubject, $asDimensionalPath, $aOptions ) { |
| 484 | 484 | $_aDimensionalPath = $this->getAsArray( $asDimensionalPath ); |
| 485 | - $_mValue = $this->getElement( |
|
| 485 | + $_mValue = $this->getElement( |
|
| 486 | 486 | $aOptions, |
| 487 | - $_aDimensionalPath, // as of 3.7.0, it can be an array or string |
|
| 487 | + $_aDimensionalPath, // as of 3.7.0, it can be an array or string |
|
| 488 | 488 | null |
| 489 | 489 | ); |
| 490 | 490 | if ( isset( $_mValue ) ) { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | if ( in_array( $oProp->sClassName, self::$aClassNames ) ) |
| 30 | 30 | return self::$_oInstance; |
| 31 | 31 | |
| 32 | - self::$aClassNames[] = $oProp->sClassName; |
|
| 32 | + self::$aClassNames[ ] = $oProp->sClassName; |
|
| 33 | 33 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_post_type( $oProp, $oMsg ); |
| 34 | 34 | |
| 35 | 35 | return self::$_oInstance; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function _replyToSetPageLoadInfoInFooter() { |
| 44 | 44 | |
| 45 | 45 | // Some users sets $_GET['post_type'] element even in regular admin pages. In that case, do not load the style to avoid duplicates. |
| 46 | - if ( isset( $_GET['page'] ) && $_GET['page'] ) { return; } |
|
| 46 | + if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] ) { return; } |
|
| 47 | 47 | |
| 48 | 48 | // For post type pages |
| 49 | 49 | if ( |
@@ -26,8 +26,9 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public static function instantiate( $oProp, $oMsg ) { |
| 28 | 28 | |
| 29 | - if ( in_array( $oProp->sClassName, self::$aClassNames ) ) |
|
| 30 | - return self::$_oInstance; |
|
| 29 | + if ( in_array( $oProp->sClassName, self::$aClassNames ) ) { |
|
| 30 | + return self::$_oInstance; |
|
| 31 | + } |
|
| 31 | 32 | |
| 32 | 33 | self::$aClassNames[] = $oProp->sClassName; |
| 33 | 34 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_post_type( $oProp, $oMsg ); |
@@ -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 ) |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | * @since 3.7.0 Changed the name from `AdminPageFramework_FormPart_SectionTitle`. |
| 16 | 16 | * @internal |
| 17 | 17 | */ |
| 18 | -class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base { |
|
| 18 | +class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base { |
|
| 19 | 19 | |
| 20 | 20 | public $aArguments = array( |
| 21 | 21 | 'title' => null, |
@@ -194,11 +194,11 @@ discard block |
||
| 194 | 194 | * @since 3.8.0 |
| 195 | 195 | * @internal |
| 196 | 196 | */ |
| 197 | - private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
|
| 197 | + private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
|
| 198 | 198 | |
| 199 | 199 | $_sOutput = ''; |
| 200 | 200 | foreach( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) { |
| 201 | - if ( empty( $_aFieldset ) ) { |
|
| 201 | + if ( empty( $_aFieldset ) ) { |
|
| 202 | 202 | continue; |
| 203 | 203 | } |
| 204 | 204 | $_sOutput .= $this->getFieldsetOutput( $_aFieldset ); |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | * @since 3.7.0 Moved from `AdminPageFramework_FormPart_SectionTitle`. |
| 243 | 243 | * @return array|void |
| 244 | 244 | */ |
| 245 | - private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
|
| 245 | + private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
|
| 246 | 246 | |
| 247 | 247 | foreach( $aFieldsets as $_aFieldset ) { |
| 248 | 248 | |
@@ -17,14 +17,14 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base { |
| 19 | 19 | |
| 20 | - public $aArguments = array( |
|
| 20 | + public $aArguments = array( |
|
| 21 | 21 | 'title' => null, |
| 22 | 22 | 'tag' => null, |
| 23 | 23 | 'section_index' => null, |
| 24 | 24 | |
| 25 | 25 | 'sectionset' => array(), |
| 26 | 26 | ); |
| 27 | - public $aFieldsets = array(); |
|
| 27 | + public $aFieldsets = array(); |
|
| 28 | 28 | public $aSavedData = array(); |
| 29 | 29 | public $aFieldErrors = array(); |
| 30 | 30 | public $aFieldTypeDefinitions = array(); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * @since 3.7.0 Moved from `AdminPageFramework_FormPart_SectionTitle`. |
| 91 | 91 | * @return string The section title output. |
| 92 | 92 | */ |
| 93 | - protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex=null, $aFieldTypeDefinitions=array(), $aCollapsible=array() ) { |
|
| 93 | + protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex = null, $aFieldTypeDefinitions = array(), $aCollapsible = array() ) { |
|
| 94 | 94 | |
| 95 | 95 | $_aSectionTitleFieldset = $this->_getSectionTitleField( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ); |
| 96 | 96 | $_sFieldsInSectionTitle = $this->_getFieldsetsOutputInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $_bHasOtherFields = $_sFieldsInSectionTitle |
| 101 | 101 | ? ' has-fields' |
| 102 | 102 | : ''; |
| 103 | - $_sOutput = $_sTitle . $_sFieldsInSectionTitle; |
|
| 103 | + $_sOutput = $_sTitle.$_sFieldsInSectionTitle; |
|
| 104 | 104 | return $_sOutput |
| 105 | 105 | ? "<div class='section-title-height-fixer'></div>" |
| 106 | 106 | . "<div class='section-title-outer-container'>" // 3.8.13+ For vertical alignment |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | * @return string |
| 129 | 129 | */ |
| 130 | 130 | private function _getToolTip( $_aSectionset ) { |
| 131 | - $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ) . '_' . $this->aArguments[ 'section_index' ]; |
|
| 131 | + $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$this->aArguments[ 'section_index' ]; |
|
| 132 | 132 | $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
| 133 | 133 | $_aSectionset[ 'tip' ], |
| 134 | 134 | $_sSectionTitleTagID |
@@ -160,8 +160,8 @@ discard block |
||
| 160 | 160 | private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
| 161 | 161 | |
| 162 | 162 | $_sOutput = ''; |
| 163 | - foreach( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) { |
|
| 164 | - if ( empty( $_aFieldset ) ) { |
|
| 163 | + foreach ( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) { |
|
| 164 | + if ( empty( $_aFieldset ) ) { |
|
| 165 | 165 | continue; |
| 166 | 166 | } |
| 167 | 167 | $_sOutput .= $this->getFieldsetOutput( $_aFieldset ); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | private function _getFieldsetsInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
| 178 | 178 | |
| 179 | 179 | $_aFieldsetsInSectionTitle = array(); |
| 180 | - foreach( $aFieldsets as $_aFieldset ) { |
|
| 180 | + foreach ( $aFieldsets as $_aFieldset ) { |
|
| 181 | 181 | |
| 182 | 182 | if ( 'section_title' !== $_aFieldset[ 'placement' ] ) { |
| 183 | 183 | continue; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $iSectionIndex, |
| 189 | 189 | $aFieldTypeDefinitions |
| 190 | 190 | ); |
| 191 | - $_aFieldsetsInSectionTitle[] = $_oFieldsetOutputFormatter->get(); |
|
| 191 | + $_aFieldsetsInSectionTitle[ ] = $_oFieldsetOutputFormatter->get(); |
|
| 192 | 192 | |
| 193 | 193 | } |
| 194 | 194 | return $_aFieldsetsInSectionTitle; |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
| 209 | 209 | |
| 210 | - foreach( $aFieldsets as $_aFieldset ) { |
|
| 210 | + foreach ( $aFieldsets as $_aFieldset ) { |
|
| 211 | 211 | |
| 212 | 212 | if ( 'section_title' !== $_aFieldset[ 'type' ] ) { |
| 213 | 213 | continue; |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | private function ___setFieldResourcesBySection( $_aFieldsets ) { |
| 130 | 130 | |
| 131 | 131 | $_bIsSubSectionLoaded = false; |
| 132 | - foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 132 | + foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 133 | 133 | // @todo Examine if this structure is correct or not. |
| 134 | 134 | // It may not be necessary to check the sub-section dimensions as this is not the saved options array. |
| 135 | 135 | // if it's a sub-section |
@@ -90,16 +90,16 @@ discard block |
||
| 90 | 90 | 'AdminPageFramework_Form_View___CSS_FieldError', |
| 91 | 91 | 'AdminPageFramework_Form_View___CSS_ToolTip', |
| 92 | 92 | ); |
| 93 | - foreach( $_aClassNames as $_sClassName ) { |
|
| 93 | + foreach ( $_aClassNames as $_sClassName ) { |
|
| 94 | 94 | $_oCSS = new $_sClassName; |
| 95 | - $this->aResources[ 'internal_styles' ][] = $_oCSS->get(); |
|
| 95 | + $this->aResources[ 'internal_styles' ][ ] = $_oCSS->get(); |
|
| 96 | 96 | } |
| 97 | 97 | $_aClassNamesForIE = array( |
| 98 | 98 | 'AdminPageFramework_Form_View___CSS_CollapsibleSectionIE', |
| 99 | 99 | ); |
| 100 | - foreach( $_aClassNamesForIE as $_sClassName ) { |
|
| 100 | + foreach ( $_aClassNamesForIE as $_sClassName ) { |
|
| 101 | 101 | $_oCSS = new $_sClassName; |
| 102 | - $this->aResources[ 'internal_styles_ie' ][] = $_oCSS->get(); |
|
| 102 | + $this->aResources[ 'internal_styles_ie' ][ ] = $_oCSS->get(); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * @return void |
| 118 | 118 | */ |
| 119 | 119 | private function ___set( $aAllFieldsets ) { |
| 120 | - foreach( $aAllFieldsets as $_sSecitonID => $_aFieldsets ) { |
|
| 120 | + foreach ( $aAllFieldsets as $_sSecitonID => $_aFieldsets ) { |
|
| 121 | 121 | $this->___setFieldResourcesBySection( $_aFieldsets ); |
| 122 | 122 | } |
| 123 | 123 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | private function ___setFieldResourcesBySection( $_aFieldsets ) { |
| 130 | 130 | |
| 131 | 131 | $_bIsSubSectionLoaded = false; |
| 132 | - foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 132 | + foreach ( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 133 | 133 | // @todo Examine if this structure is correct or not. |
| 134 | 134 | // It may not be necessary to check the sub-section dimensions as this is not the saved options array. |
| 135 | 135 | // if it's a sub-section |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | continue; |
| 141 | 141 | } |
| 142 | 142 | $_bIsSubSectionLoaded = true; |
| 143 | - foreach( $_aSubSectionOrField as $_aField ) { |
|
| 143 | + foreach ( $_aSubSectionOrField as $_aField ) { |
|
| 144 | 144 | $this->___setFieldResources( $_aField ); |
| 145 | 145 | } |
| 146 | 146 | continue; |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | private function ___setFieldResources( $aFieldset ) { |
| 166 | 166 | |
| 167 | 167 | // Check the field conditions. |
| 168 | - if ( ! $this->___isFieldsetAllowed( $aFieldset ) ) { |
|
| 168 | + if ( !$this->___isFieldsetAllowed( $aFieldset ) ) { |
|
| 169 | 169 | return; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | return $this->callBack( |
| 197 | 197 | $this->aCallbacks[ 'is_fieldset_registration_allowed' ], |
| 198 | 198 | array( |
| 199 | - true, // 1st parameter |
|
| 199 | + true, // 1st parameter |
|
| 200 | 200 | $aFieldset, // 2nd parameter |
| 201 | 201 | ) |
| 202 | 202 | ); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | */ |
| 209 | 209 | private function ___setResourcesOfNestedFields( $aFieldset ) { |
| 210 | 210 | |
| 211 | - if ( ! $this->hasFieldDefinitionsInContent( $aFieldset ) ) { |
|
| 211 | + if ( !$this->hasFieldDefinitionsInContent( $aFieldset ) ) { |
|
| 212 | 212 | return; |
| 213 | 213 | } |
| 214 | 214 | foreach ( $aFieldset[ 'content' ] as $_asNestedFieldset ) { |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | $this->callBack( |
| 249 | 249 | $this->aCallbacks[ 'load_fieldset_resource' ], |
| 250 | 250 | array( |
| 251 | - $aFieldset, // 1st parameter |
|
| 251 | + $aFieldset, // 1st parameter |
|
| 252 | 252 | ) |
| 253 | 253 | ); |
| 254 | 254 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | // Be careful not to add duplicate items as currently the sub-field items are parsed. |
| 257 | 257 | |
| 258 | 258 | // Is already registered? |
| 259 | - if ( $this->hasBeenCalled( 'registered_' . $_sFieldtype . '_' . $this->aArguments[ 'structure_type' ] ) ) { |
|
| 259 | + if ( $this->hasBeenCalled( 'registered_'.$_sFieldtype.'_'.$this->aArguments[ 'structure_type' ] ) ) { |
|
| 260 | 260 | return; |
| 261 | 261 | } |
| 262 | 262 | |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | $_aFieldTypeDefinition, |
| 272 | 272 | $this->aResources |
| 273 | 273 | ); |
| 274 | - $this->aResources = $_oFieldTypeResources->get(); |
|
| 274 | + $this->aResources = $_oFieldTypeResources->get(); |
|
| 275 | 275 | |
| 276 | 276 | } |
| 277 | 277 | |