@@ -20,5 +20,5 @@ |
||
| 20 | 20 | * @extends AdminPageFramework_Resource_post_meta_box |
| 21 | 21 | * @internal |
| 22 | 22 | */ |
| 23 | -class AdminPageFramework_Resource_user_meta extends AdminPageFramework_Resource_post_meta_box { |
|
| 23 | +class AdminPageFramework_Resource_user_meta extends AdminPageFramework_Resource_post_meta_box { |
|
| 24 | 24 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function _replyToSetFooterInfo() { |
| 38 | 38 | |
| 39 | - if ( ! $this->oProp->isPageAdded() ) { |
|
| 39 | + if ( ! $this->oProp->isPageAdded() ) { |
|
| 40 | 40 | return; |
| 41 | 41 | } |
| 42 | 42 | parent::_replyToSetFooterInfo(); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | public function _replyToAddSettingsLinkInPluginListingPage( $aLinks ) { |
| 212 | 212 | |
| 213 | 213 | // If the sub-pages are not added, do nothing. |
| 214 | - if ( count( $this->oProp->aPages ) < 1 ) { |
|
| 214 | + if ( count( $this->oProp->aPages ) < 1 ) { |
|
| 215 | 215 | return $aLinks; |
| 216 | 216 | } |
| 217 | 217 | |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | public function _replyToAddLinkToPluginDescription( $aLinks, $sFile ) { |
| 262 | 262 | |
| 263 | - if ( $sFile !== plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) { |
|
| 263 | + if ( $sFile !== plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) { |
|
| 264 | 264 | return $aLinks; |
| 265 | 265 | } |
| 266 | 266 | |
@@ -271,7 +271,8 @@ discard block |
||
| 271 | 271 | if ( ! $_sLLinkHTML ) { |
| 272 | 272 | continue; |
| 273 | 273 | } |
| 274 | - if ( is_array( $_sLLinkHTML ) ) { // should not be an array |
|
| 274 | + if ( is_array( $_sLLinkHTML ) ) { |
|
| 275 | +// should not be an array |
|
| 275 | 276 | $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks ); |
| 276 | 277 | continue; |
| 277 | 278 | } |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | $this->oProp->aPluginTitleLinks = array_merge( |
| 91 | 91 | $this->oProp->aPluginTitleLinks, |
| 92 | 92 | $asLinks |
| 93 | - ); |
|
| 93 | + ); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | $this->_addFilterHook_PluginTitleActionLink(); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function _replyToSetFooterInfo() { |
| 38 | 38 | |
| 39 | - if ( ! $this->oProp->isPageAdded() ) { |
|
| 39 | + if ( !$this->oProp->isPageAdded() ) { |
|
| 40 | 40 | return; |
| 41 | 41 | } |
| 42 | 42 | parent::_replyToSetFooterInfo(); |
@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function _addLinkToPluginDescription( $asLinks ) { |
| 58 | 58 | |
| 59 | - if ( ! is_array( $asLinks ) ) { |
|
| 60 | - $this->oProp->aPluginDescriptionLinks[] = $asLinks; |
|
| 59 | + if ( !is_array( $asLinks ) ) { |
|
| 60 | + $this->oProp->aPluginDescriptionLinks[ ] = $asLinks; |
|
| 61 | 61 | } else { |
| 62 | 62 | $this->oProp->aPluginDescriptionLinks = array_merge( |
| 63 | 63 | $this->oProp->aPluginDescriptionLinks, |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function _addLinkToPluginTitle( $asLinks ) { |
| 86 | 86 | |
| 87 | - if ( ! is_array( $asLinks ) ) { |
|
| 88 | - $this->oProp->aPluginTitleLinks[] = $asLinks; |
|
| 87 | + if ( !is_array( $asLinks ) ) { |
|
| 88 | + $this->oProp->aPluginTitleLinks[ ] = $asLinks; |
|
| 89 | 89 | } else { |
| 90 | 90 | $this->oProp->aPluginTitleLinks = array_merge( |
| 91 | 91 | $this->oProp->aPluginTitleLinks, |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | $_sPluginBaseName = plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ); |
| 122 | 122 | add_filter( |
| 123 | - $this->_sFilterSuffix_PluginActionLinks . $_sPluginBaseName, |
|
| 123 | + $this->_sFilterSuffix_PluginActionLinks.$_sPluginBaseName, |
|
| 124 | 124 | array( $this, '_replyToAddPluginActionLinks' ) |
| 125 | 125 | ); |
| 126 | 126 | } |
@@ -133,14 +133,14 @@ discard block |
||
| 133 | 133 | * @return string |
| 134 | 134 | * @internal |
| 135 | 135 | */ |
| 136 | - public function _replyToAddInfoInFooterLeft( $sLinkHTML='' ) { |
|
| 136 | + public function _replyToAddInfoInFooterLeft( $sLinkHTML = '' ) { |
|
| 137 | 137 | |
| 138 | - if ( ! $this->_isPageAdded() ) { |
|
| 138 | + if ( !$this->_isPageAdded() ) { |
|
| 139 | 139 | return $sLinkHTML; // $sLinkHTML is given by the hook. |
| 140 | 140 | } |
| 141 | - $sLinkHTML = empty( $this->oProp->aScriptInfo['sName'] ) |
|
| 141 | + $sLinkHTML = empty( $this->oProp->aScriptInfo[ 'sName' ] ) |
|
| 142 | 142 | ? $sLinkHTML |
| 143 | - : $this->oProp->aFooterInfo['sLeft']; |
|
| 143 | + : $this->oProp->aFooterInfo[ 'sLeft' ]; |
|
| 144 | 144 | |
| 145 | 145 | $_sPageSlug = $this->oProp->getCurrentPageSlug(); |
| 146 | 146 | $_sTabSlug = $this->oProp->getCurrentTabSlug(); |
@@ -151,11 +151,11 @@ discard block |
||
| 151 | 151 | array( |
| 152 | 152 | $this->getAOrB( |
| 153 | 153 | $_sTabSlug, |
| 154 | - 'footer_left_' . $_sPageSlug . '_' . $_sTabSlug, |
|
| 154 | + 'footer_left_'.$_sPageSlug.'_'.$_sTabSlug, |
|
| 155 | 155 | null // will be ignored |
| 156 | 156 | ), |
| 157 | - 'footer_left_' . $_sPageSlug, |
|
| 158 | - 'footer_left_' . $this->oProp->sClassName |
|
| 157 | + 'footer_left_'.$_sPageSlug, |
|
| 158 | + 'footer_left_'.$this->oProp->sClassName |
|
| 159 | 159 | ), |
| 160 | 160 | $sLinkHTML |
| 161 | 161 | ); |
@@ -169,9 +169,9 @@ discard block |
||
| 169 | 169 | * @return string |
| 170 | 170 | * @internal |
| 171 | 171 | */ |
| 172 | - public function _replyToAddInfoInFooterRight( $sLinkHTML='' ) { |
|
| 172 | + public function _replyToAddInfoInFooterRight( $sLinkHTML = '' ) { |
|
| 173 | 173 | |
| 174 | - if ( ! $this->_isPageAdded() ) { |
|
| 174 | + if ( !$this->_isPageAdded() ) { |
|
| 175 | 175 | return $sLinkHTML; // $sLinkTHML is given by the hook. |
| 176 | 176 | } |
| 177 | 177 | |
@@ -184,13 +184,13 @@ discard block |
||
| 184 | 184 | array( |
| 185 | 185 | $this->getAOrB( |
| 186 | 186 | $_sTabSlug, |
| 187 | - 'footer_right_' . $_sPageSlug . '_' . $_sTabSlug, |
|
| 187 | + 'footer_right_'.$_sPageSlug.'_'.$_sTabSlug, |
|
| 188 | 188 | null // will be ignored |
| 189 | 189 | ), |
| 190 | - 'footer_right_' . $_sPageSlug, |
|
| 191 | - 'footer_right_' . $this->oProp->sClassName |
|
| 190 | + 'footer_right_'.$_sPageSlug, |
|
| 191 | + 'footer_right_'.$this->oProp->sClassName |
|
| 192 | 192 | ), |
| 193 | - $this->oProp->aFooterInfo['sRight'] |
|
| 193 | + $this->oProp->aFooterInfo[ 'sRight' ] |
|
| 194 | 194 | ); |
| 195 | 195 | |
| 196 | 196 | } |
@@ -203,10 +203,10 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | private function _isPageAdded() { |
| 205 | 205 | |
| 206 | - if ( ! isset( $_GET['page'] ) ) { |
|
| 206 | + if ( !isset( $_GET[ 'page' ] ) ) { |
|
| 207 | 207 | return false; |
| 208 | 208 | } |
| 209 | - return ( bool ) $this->oProp->isPageAdded( $_GET['page'] ); |
|
| 209 | + return ( bool ) $this->oProp->isPageAdded( $_GET[ 'page' ] ); |
|
| 210 | 210 | |
| 211 | 211 | } |
| 212 | 212 | /** |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | : $this->oProp->sLabelPluginSettingsLink; |
| 229 | 229 | |
| 230 | 230 | // If the user disables the settings link, the label property is empty. If so, do not add it. |
| 231 | - if ( ! $this->oProp->sLabelPluginSettingsLink ) { |
|
| 231 | + if ( !$this->oProp->sLabelPluginSettingsLink ) { |
|
| 232 | 232 | return $aLinks; |
| 233 | 233 | } |
| 234 | 234 | |
@@ -246,13 +246,13 @@ discard block |
||
| 246 | 246 | array_unshift( |
| 247 | 247 | $aLinks, |
| 248 | 248 | // '<a href="' . esc_url( $_sLinkURL ) . '">' |
| 249 | - '<a ' . $this->getAttributes( |
|
| 249 | + '<a '.$this->getAttributes( |
|
| 250 | 250 | array( |
| 251 | 251 | 'href' => esc_url( $_sLinkURL ), |
| 252 | 252 | // 3.5.7+ Added for acceptance testing |
| 253 | 253 | 'class' => 'apf-plugin-title-action-link apf-post-type', |
| 254 | 254 | ) |
| 255 | - ) . '>' |
|
| 255 | + ).'>' |
|
| 256 | 256 | . $this->oProp->sLabelPluginSettingsLink |
| 257 | 257 | . '</a>' |
| 258 | 258 | ); |
@@ -275,16 +275,16 @@ discard block |
||
| 275 | 275 | |
| 276 | 276 | // Backward compatibility sanitisation. |
| 277 | 277 | $_aAddingLinks = array(); |
| 278 | - foreach( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) { |
|
| 278 | + foreach ( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) { |
|
| 279 | 279 | |
| 280 | - if ( ! $_sLLinkHTML ) { |
|
| 280 | + if ( !$_sLLinkHTML ) { |
|
| 281 | 281 | continue; |
| 282 | 282 | } |
| 283 | 283 | if ( is_array( $_sLLinkHTML ) ) { // should not be an array |
| 284 | 284 | $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks ); |
| 285 | 285 | continue; |
| 286 | 286 | } |
| 287 | - $_aAddingLinks[] = ( string ) $_sLLinkHTML; |
|
| 287 | + $_aAddingLinks[ ] = ( string ) $_sLLinkHTML; |
|
| 288 | 288 | |
| 289 | 289 | } |
| 290 | 290 | return array_merge( $aLinks, $_aAddingLinks ); |
@@ -301,13 +301,13 @@ discard block |
||
| 301 | 301 | public function _replyToAddPluginActionLinks( $aLinks ) { |
| 302 | 302 | |
| 303 | 303 | $_aAddingLinks = array(); |
| 304 | - foreach( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) { |
|
| 304 | + foreach ( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) { |
|
| 305 | 305 | |
| 306 | 306 | if ( is_array( $_sLinkHTML ) ) { |
| 307 | 307 | $_aAddingLinks = array_merge( $_sLinkHTML, $aAddingLinks ); |
| 308 | 308 | continue; |
| 309 | 309 | } |
| 310 | - $_aAddingLinks[] = ( string ) $_sLinkHTML; |
|
| 310 | + $_aAddingLinks[ ] = ( string ) $_sLinkHTML; |
|
| 311 | 311 | |
| 312 | 312 | } |
| 313 | 313 | return array_merge( $aLinks, $_aAddingLinks ); |
@@ -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 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | array( $this, '_replyToRegisterFormItems' ), |
| 30 | 30 | 100 // priority - low value is set as meta boxes use the `current_screen` action hook for `setUp()`. |
| 31 | 31 | ); |
| 32 | - } else { |
|
| 32 | + } else { |
|
| 33 | 33 | add_action( |
| 34 | 34 | $this->aArguments[ 'action_hook_form_registration' ], |
| 35 | 35 | array( $this, '_replyToRegisterFormItems' ) |
@@ -147,12 +147,12 @@ discard block |
||
| 147 | 147 | * Changed the name from `getFieldsModel()`. |
| 148 | 148 | * @return array |
| 149 | 149 | */ |
| 150 | - public function getDataStructureFromAddedFieldsets() { |
|
| 150 | + public function getDataStructureFromAddedFieldsets() { |
|
| 151 | 151 | |
| 152 | 152 | $_aFormDataStructure = array(); |
| 153 | 153 | foreach ( $this->getAsArray( $this->aFieldsets ) as $_sSectionID => $_aFieldsets ) { |
| 154 | 154 | |
| 155 | - if ( $_sSectionID != '_default' ) { |
|
| 155 | + if ( $_sSectionID != '_default' ) { |
|
| 156 | 156 | $_aFormDataStructure[ $_sSectionID ] = $_aFieldsets; |
| 157 | 157 | continue; |
| 158 | 158 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | * @param array $aSubject The subject array to modify. Usually the saved option data. |
| 186 | 186 | * @return array The modified options array. |
| 187 | 187 | */ |
| 188 | - public function dropRepeatableElements( array $aSubject ) { |
|
| 188 | + public function dropRepeatableElements( array $aSubject ) { |
|
| 189 | 189 | $_oFilterRepeatableElements = new AdminPageFramework_Form_Model___Modifier_FilterRepeatableElements( |
| 190 | 190 | $aSubject, |
| 191 | 191 | $this->getElementAsArray( |
@@ -402,7 +402,6 @@ discard block |
||
| 402 | 402 | * |
| 403 | 403 | * @since 3.7.0 |
| 404 | 404 | * @param array $aSavedData |
| 405 | - * @param boolean $bOnlyFieldsets Whether to format only the fieldsets. The taxonomy field factory uses this parameter. |
|
| 406 | 405 | */ |
| 407 | 406 | protected function _formatElementDefinitions( array $aSavedData ) { |
| 408 | 407 | |
@@ -438,7 +437,6 @@ discard block |
||
| 438 | 437 | * Changed the name from `_getFieldErrors()`. |
| 439 | 438 | * @access public The field type class accesses this method to render nested fields. |
| 440 | 439 | * @internal |
| 441 | - * @param boolean $bDelete whether or not the transient should be deleted after retrieving it. |
|
| 442 | 440 | * @return array |
| 443 | 441 | */ |
| 444 | 442 | public function getFieldErrors() { |
@@ -43,10 +43,10 @@ discard block |
||
| 43 | 43 | * @since 3.7.0 |
| 44 | 44 | * @return array |
| 45 | 45 | */ |
| 46 | - public function getSubmittedData( array $aDataToParse, $bExtractFromFieldStructure=true, $bStripSlashes=true ) { |
|
| 46 | + public function getSubmittedData( array $aDataToParse, $bExtractFromFieldStructure = true, $bStripSlashes = true ) { |
|
| 47 | 47 | |
| 48 | 48 | // Extracts the form data from the subject data for parsing |
| 49 | - $_aSubmittedFormData = $bExtractFromFieldStructure |
|
| 49 | + $_aSubmittedFormData = $bExtractFromFieldStructure |
|
| 50 | 50 | ? $this->castArrayContents( |
| 51 | 51 | $this->getDataStructureFromAddedFieldsets(), // form data (options) structure |
| 52 | 52 | $aDataToParse // the subject data array, usually $_POST. |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | : $aDataToParse; |
| 55 | 55 | |
| 56 | 56 | // 3.6.0 - sorts dynamic elements. |
| 57 | - $_aSubmittedFormData = $this->getSortedInputs( $_aSubmittedFormData ); |
|
| 57 | + $_aSubmittedFormData = $this->getSortedInputs( $_aSubmittedFormData ); |
|
| 58 | 58 | |
| 59 | 59 | return $bStripSlashes |
| 60 | 60 | ? stripslashes_deep( $_aSubmittedFormData ) // fixes magic quotes |
@@ -79,12 +79,12 @@ discard block |
||
| 79 | 79 | array_merge( |
| 80 | 80 | $this->getElementAsArray( |
| 81 | 81 | $_POST, |
| 82 | - '__repeatable_elements_' . $this->aArguments[ 'structure_type' ], |
|
| 82 | + '__repeatable_elements_'.$this->aArguments[ 'structure_type' ], |
|
| 83 | 83 | array() |
| 84 | 84 | ), |
| 85 | 85 | $this->getElementAsArray( |
| 86 | 86 | $_POST, |
| 87 | - '__sortable_elements_' . $this->aArguments[ 'structure_type' ], |
|
| 87 | + '__sortable_elements_'.$this->aArguments[ 'structure_type' ], |
|
| 88 | 88 | array() |
| 89 | 89 | ) |
| 90 | 90 | ) |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | * Changed the name from `getFieldsModel()`. |
| 148 | 148 | * @return array |
| 149 | 149 | */ |
| 150 | - public function getDataStructureFromAddedFieldsets() { |
|
| 150 | + public function getDataStructureFromAddedFieldsets() { |
|
| 151 | 151 | |
| 152 | - $_aFormDataStructure = array(); |
|
| 152 | + $_aFormDataStructure = array(); |
|
| 153 | 153 | foreach ( $this->getAsArray( $this->aFieldsets ) as $_sSectionID => $_aFieldsets ) { |
| 154 | 154 | |
| 155 | 155 | if ( $_sSectionID != '_default' ) { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | // For default field items. |
| 161 | - foreach( $_aFieldsets as $_sFieldID => $_aFieldset ) { |
|
| 161 | + foreach ( $_aFieldsets as $_sFieldID => $_aFieldset ) { |
|
| 162 | 162 | $_aFormDataStructure[ $_aFieldset[ 'field_id' ] ] = $_aFieldset; |
| 163 | 163 | } |
| 164 | 164 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $aSubject, |
| 191 | 191 | $this->getElementAsArray( |
| 192 | 192 | $_POST, |
| 193 | - '__repeatable_elements_' . $this->aArguments[ 'structure_type' ] |
|
| 193 | + '__repeatable_elements_'.$this->aArguments[ 'structure_type' ] |
|
| 194 | 194 | ) |
| 195 | 195 | ); |
| 196 | 196 | return $_oFilterRepeatableElements->get(); |
@@ -203,13 +203,13 @@ discard block |
||
| 203 | 203 | public function _replyToRegisterFormItems() { |
| 204 | 204 | |
| 205 | 205 | // Check if the form should be created or not. |
| 206 | - if ( ! $this->isInThePage() ) { |
|
| 206 | + if ( !$this->isInThePage() ) { |
|
| 207 | 207 | return; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | // Load field type definitions. |
| 211 | - $this->_setFieldTypeDefinitions( 'admin_page_framework' ); // site-wide |
|
| 212 | - $this->_setFieldTypeDefinitions( $this->aArguments[ 'caller_id' ] ); // per class |
|
| 211 | + $this->_setFieldTypeDefinitions( 'admin_page_framework' ); // site-wide |
|
| 212 | + $this->_setFieldTypeDefinitions( $this->aArguments[ 'caller_id' ] ); // per class |
|
| 213 | 213 | |
| 214 | 214 | // Set the options array |
| 215 | 215 | $this->aSavedData = $this->_getSavedData( |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | $this->aArguments, |
| 238 | 238 | $this->aFieldsets, |
| 239 | 239 | self::$_aResources, |
| 240 | - $this->aFieldTypeDefinitions, // must be called after performing `_setFieldTypeDefinitions()`. |
|
| 240 | + $this->aFieldTypeDefinitions, // must be called after performing `_setFieldTypeDefinitions()`. |
|
| 241 | 241 | $this->aCallbacks |
| 242 | 242 | ); |
| 243 | 243 | self::$_aResources = $_oFieldResources->get(); // updates the property |
@@ -254,10 +254,10 @@ discard block |
||
| 254 | 254 | $this->callBack( |
| 255 | 255 | $this->aCallbacks[ 'handle_form_data' ], |
| 256 | 256 | array( |
| 257 | - $this->aSavedData, // 1st parameter |
|
| 258 | - $this->aArguments, // 2nd parameter |
|
| 259 | - $this->aSectionsets, // 3rd parameter |
|
| 260 | - $this->aFieldsets, // 4th parameter |
|
| 257 | + $this->aSavedData, // 1st parameter |
|
| 258 | + $this->aArguments, // 2nd parameter |
|
| 259 | + $this->aSectionsets, // 3rd parameter |
|
| 260 | + $this->aFieldsets, // 4th parameter |
|
| 261 | 261 | ) |
| 262 | 262 | ); |
| 263 | 263 | |
@@ -271,15 +271,15 @@ discard block |
||
| 271 | 271 | $this->aSectionsets = $this->callBack( |
| 272 | 272 | $this->aCallbacks[ 'secitonsets_before_registration' ], |
| 273 | 273 | array( |
| 274 | - $this->aSectionsets, // 1st parameter |
|
| 274 | + $this->aSectionsets, // 1st parameter |
|
| 275 | 275 | ) |
| 276 | 276 | ); |
| 277 | 277 | // Let the main routine modify the fieldsets definition array. |
| 278 | 278 | $this->aFieldsets = $this->callBack( |
| 279 | 279 | $this->aCallbacks[ 'fieldsets_before_registration' ], |
| 280 | 280 | array( |
| 281 | - $this->aFieldsets, // 1st parameter |
|
| 282 | - $this->aSectionsets, // 2nd parameter |
|
| 281 | + $this->aFieldsets, // 1st parameter |
|
| 282 | + $this->aSectionsets, // 2nd parameter |
|
| 283 | 283 | ) |
| 284 | 284 | ); |
| 285 | 285 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | /** |
| 44 | 44 | * Stores the section definition. |
| 45 | 45 | */ |
| 46 | - public $aSection = array(); |
|
| 46 | + public $aSection = array(); |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Indicates the sub section index. |
@@ -91,8 +91,8 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $_aSection[ '_is_collapsible' ] = $_aSection[ 'collapsible' ] && 'section' === $_aSection[ 'collapsible' ][ 'container' ]; |
| 93 | 93 | |
| 94 | - $_aSection[ '_tag_id' ] = 'section-' . $_aSection[ 'section_id' ] . '__' . $this->iIndex; |
|
| 95 | - $_aSection[ '_tag_id_model' ] = 'section-' . $_aSection[ 'section_id' ] . '__' . '___i___'; |
|
| 94 | + $_aSection[ '_tag_id' ] = 'section-'.$_aSection[ 'section_id' ].'__'.$this->iIndex; |
|
| 95 | + $_aSection[ '_tag_id_model' ] = 'section-'.$_aSection[ 'section_id' ].'__'.'___i___'; |
|
| 96 | 96 | |
| 97 | 97 | return $_aSection; |
| 98 | 98 | |
@@ -236,7 +236,7 @@ |
||
| 236 | 236 | */ |
| 237 | 237 | private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) { |
| 238 | 238 | |
| 239 | - if ( ! $aSectionset[ 'title' ] ){ |
|
| 239 | + if ( ! $aSectionset[ 'title' ] ) { |
|
| 240 | 240 | return false; |
| 241 | 241 | } |
| 242 | 242 | if ( $aSectionset[ 'collapsible' ] ) { |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | private function _getCaption( array $aSectionset, $iSectionIndex, $aFieldsets, $aFieldErrors, $aFieldTypeDefinitions, $aCallbacks, $oMsg ) { |
| 82 | 82 | |
| 83 | - if ( ! $aSectionset[ 'description' ] && ! $aSectionset[ 'title' ] ) { |
|
| 83 | + if ( !$aSectionset[ 'description' ] && !$aSectionset[ 'title' ] ) { |
|
| 84 | 84 | return "<caption class='admin-page-framework-section-caption' style='display:none;'></caption>"; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | 'collapsible' => $_abCollapsible, |
| 104 | 104 | 'container_type' => 'section', // section or sections |
| 105 | 105 | |
| 106 | - 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
| 106 | + 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
| 107 | 107 | ), |
| 108 | 108 | $aFieldsets, |
| 109 | 109 | $this->aSavedData, |
@@ -113,15 +113,15 @@ discard block |
||
| 113 | 113 | $aCallbacks // field output element callables. |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | - $_bShowTitle = empty( $_abCollapsible ) && ! $aSectionset[ 'section_tab_slug' ]; |
|
| 116 | + $_bShowTitle = empty( $_abCollapsible ) && !$aSectionset[ 'section_tab_slug' ]; |
|
| 117 | 117 | return |
| 118 | - "<caption " . $this->getAttributes( |
|
| 118 | + "<caption ".$this->getAttributes( |
|
| 119 | 119 | array( |
| 120 | 120 | 'class' => 'admin-page-framework-section-caption', |
| 121 | 121 | // data-section_tab is referred by the repeater script to hide/show the title and the description |
| 122 | 122 | 'data-section_tab' => $aSectionset[ 'section_tab_slug' ], |
| 123 | 123 | ) |
| 124 | - ) . ">" |
|
| 124 | + ).">" |
|
| 125 | 125 | . $_oCollapsibleSectionTitle->get() |
| 126 | 126 | . $this->getAOrB( |
| 127 | 127 | $_bShowTitle, |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | 'tag' => 'h3', |
| 176 | 176 | 'section_index' => $iSectionIndex, |
| 177 | 177 | |
| 178 | - 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
| 178 | + 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
| 179 | 179 | ), |
| 180 | 180 | $aFieldsets, |
| 181 | 181 | $this->aSavedData, |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $this->oMsg, |
| 185 | 185 | $this->aCallbacks // field output element callables. |
| 186 | 186 | ); |
| 187 | - return "<div " . $this->getAttributes( |
|
| 187 | + return "<div ".$this->getAttributes( |
|
| 188 | 188 | array( |
| 189 | 189 | 'class' => 'admin-page-framework-section-title', |
| 190 | 190 | 'style' => $this->getAOrB( |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | 'display: none;' |
| 194 | 194 | ), |
| 195 | 195 | ) |
| 196 | - ). ">" |
|
| 196 | + ).">" |
|
| 197 | 197 | . $_oSectionTitle->get() |
| 198 | 198 | . "</div>"; |
| 199 | 199 | } |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | if ( $aSectionset[ 'collapsible' ] ) { |
| 210 | 210 | return ''; |
| 211 | 211 | } |
| 212 | - if ( ! is_callable( $hfSectionCallback ) ) { |
|
| 212 | + if ( !is_callable( $hfSectionCallback ) ) { |
|
| 213 | 213 | return ''; |
| 214 | 214 | } |
| 215 | 215 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | */ |
| 242 | 242 | private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) { |
| 243 | 243 | |
| 244 | - if ( ! $aSectionset[ 'title' ] ){ |
|
| 244 | + if ( !$aSectionset[ 'title' ] ) { |
|
| 245 | 245 | return false; |
| 246 | 246 | } |
| 247 | 247 | if ( $aSectionset[ 'collapsible' ] ) { |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | private function _getFieldError( $aErrors, $aSectionPath, $aFieldPath, $sHeadingMessage ) { |
| 66 | 66 | |
| 67 | 67 | // If this field has a section and the error element is set |
| 68 | - $_aErrorPath = array_merge( $aSectionPath, $aFieldPath ); |
|
| 68 | + $_aErrorPath = array_merge( $aSectionPath, $aFieldPath ); |
|
| 69 | 69 | if ( $this->_hasFieldError( $aErrors, $_aErrorPath ) ) { |
| 70 | 70 | return "<span class='field-error'>* " |
| 71 | 71 | . $sHeadingMessage |
@@ -75,6 +75,7 @@ |
||
| 75 | 75 | * |
| 76 | 76 | * @since 3.1.0 |
| 77 | 77 | * @since 3.7.0 Moved from `AdminPageFramework_Form_View___Fieldset`. |
| 78 | + * @param string $sHeadingMessage |
|
| 78 | 79 | * @return string The error string message. An empty value if not found. |
| 79 | 80 | */ |
| 80 | 81 | private function _getFieldError( $aErrors, $aSectionPath, $aFieldPath, $sHeadingMessage ) { |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | class AdminPageFramework_Form_View___Attribute_SectionTableBody extends AdminPageFramework_Form_View___Attribute_Base { |
| 19 | 19 | |
| 20 | - public $sContext = 'section_table_content'; |
|
| 20 | + public $sContext = 'section_table_content'; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Returns an attribute array. |
@@ -35,10 +35,10 @@ discard block |
||
| 35 | 35 | return array( |
| 36 | 36 | 'class' => $this->getAOrB( |
| 37 | 37 | $this->aArguments[ '_is_collapsible' ], |
| 38 | - 'admin-page-framework-collapsible-section-content' . ' ' |
|
| 39 | - . 'admin-page-framework-collapsible-content' . ' ' |
|
| 40 | - . 'accordion-section-content' . ' ' |
|
| 41 | - . 'admin-page-framework-collapsible-content-type-' . $_sCollapsibleType, |
|
| 38 | + 'admin-page-framework-collapsible-section-content'.' ' |
|
| 39 | + . 'admin-page-framework-collapsible-content'.' ' |
|
| 40 | + . 'accordion-section-content'.' ' |
|
| 41 | + . 'admin-page-framework-collapsible-content-type-'.$_sCollapsibleType, |
|
| 42 | 42 | null |
| 43 | 43 | ), |
| 44 | 44 | ); |
@@ -23,11 +23,11 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | protected function _get() { |
| 25 | 25 | |
| 26 | - $_sSpinnerPath = $this->getWPAdminDirPath() . '/images/wpspin_light-2x.gif'; |
|
| 27 | - if ( ! file_exists( $_sSpinnerPath ) ) { |
|
| 26 | + $_sSpinnerPath = $this->getWPAdminDirPath().'/images/wpspin_light-2x.gif'; |
|
| 27 | + if ( !file_exists( $_sSpinnerPath ) ) { |
|
| 28 | 28 | return ''; |
| 29 | 29 | } |
| 30 | - $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) ); |
|
| 30 | + $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) ); |
|
| 31 | 31 | return <<<CSSRULES |
| 32 | 32 | .admin-page-framework-form-loading { |
| 33 | 33 | position: absolute; |