@@ -16,9 +16,9 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | class AdminPageFrameworkLoader_Registry_Base { |
| 18 | 18 | |
| 19 | - const VERSION = '3.8.1'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
| 19 | + const VERSION = '3.8.1'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
| 20 | 20 | const NAME = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing. |
| 21 | - const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc. |
|
| 21 | + const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc. |
|
| 22 | 22 | const DESCRIPTION = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.'; |
| 23 | 23 | const URI = 'http://admin-page-framework.michaeluno.jp/'; |
| 24 | 24 | const AUTHOR = 'miunosoft (Michael Uno)'; |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | * @remark This is also accessed from `uninstall.php` so do not remove. |
| 56 | 56 | * @remark Do not exceed 8 characters as a transient name allows 45 characters or less ( 40 for site transients ) so that md5 (32 characters) can be added. |
| 57 | 57 | */ |
| 58 | - const TRANSIENT_PREFIX = 'APFL_'; |
|
| 58 | + const TRANSIENT_PREFIX = 'APFL_'; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * The hook slug used for the prefix of action and filter hook names. |
| 62 | 62 | * |
| 63 | 63 | * @remark The ending underscore is not necessary. |
| 64 | 64 | */ |
| 65 | - const HOOK_SLUG = 'admin_page_framework_loader'; |
|
| 65 | + const HOOK_SLUG = 'admin_page_framework_loader'; |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * The text domain slug and its path. |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | static public $aAdminPages = array( |
| 118 | 118 | // key => 'page slug' |
| 119 | - 'about' => 'apfl_about', // the welcome page |
|
| 119 | + 'about' => 'apfl_about', // the welcome page |
|
| 120 | 120 | 'addon' => 'apfl_addons', |
| 121 | 121 | 'tool' => 'apfl_tools', |
| 122 | 122 | 'help' => 'apfl_contact', |
@@ -154,12 +154,12 @@ discard block |
||
| 154 | 154 | * @since 3.5.0 |
| 155 | 155 | * @return string |
| 156 | 156 | */ |
| 157 | - public static function getPluginURL( $sRelativePath='' ) { |
|
| 157 | + public static function getPluginURL( $sRelativePath = '' ) { |
|
| 158 | 158 | if ( isset( self::$_sPluginURLCache ) ) { |
| 159 | - return self::$_sPluginURLCache . $sRelativePath; |
|
| 159 | + return self::$_sPluginURLCache.$sRelativePath; |
|
| 160 | 160 | } |
| 161 | 161 | self::$_sPluginURLCache = trailingslashit( plugins_url( '', self::$sFilePath ) ); |
| 162 | - return self::$_sPluginURLCache . $sRelativePath; |
|
| 162 | + return self::$_sPluginURLCache.$sRelativePath; |
|
| 163 | 163 | } |
| 164 | 164 | /** |
| 165 | 165 | * @since 3.7.9 |
@@ -189,13 +189,13 @@ discard block |
||
| 189 | 189 | * @since 3.5.0 |
| 190 | 190 | * @return void |
| 191 | 191 | */ |
| 192 | - static public function setAdminNotice( $sMessage, $sClassAttribute='error' ) { |
|
| 193 | - if ( ! is_admin() ) { |
|
| 192 | + static public function setAdminNotice( $sMessage, $sClassAttribute = 'error' ) { |
|
| 193 | + if ( !is_admin() ) { |
|
| 194 | 194 | return; |
| 195 | 195 | } |
| 196 | - self::$_aAdminNotices[] = array( |
|
| 196 | + self::$_aAdminNotices[ ] = array( |
|
| 197 | 197 | 'message' => $sMessage, |
| 198 | - 'class_attribute' => trim( $sClassAttribute ) . ' notice is-dismissible', |
|
| 198 | + 'class_attribute' => trim( $sClassAttribute ).' notice is-dismissible', |
|
| 199 | 199 | ); |
| 200 | 200 | add_action( 'admin_notices', array( __CLASS__, '_replyToSetAdminNotice' ) ); |
| 201 | 201 | } |
@@ -205,12 +205,12 @@ discard block |
||
| 205 | 205 | * @return void |
| 206 | 206 | */ |
| 207 | 207 | static public function _replyToSetAdminNotice() { |
| 208 | - foreach( self::$_aAdminNotices as $_aAdminNotice ) { |
|
| 209 | - echo "<div class='" . esc_attr( $_aAdminNotice['class_attribute'] ) . " notice is-dismissible'>" |
|
| 208 | + foreach ( self::$_aAdminNotices as $_aAdminNotice ) { |
|
| 209 | + echo "<div class='".esc_attr( $_aAdminNotice[ 'class_attribute' ] )." notice is-dismissible'>" |
|
| 210 | 210 | ."<p>" |
| 211 | 211 | . sprintf( |
| 212 | - '<strong>%1$s</strong>: ' . $_aAdminNotice['message'], |
|
| 213 | - self::NAME . ' ' . self::VERSION |
|
| 212 | + '<strong>%1$s</strong>: '.$_aAdminNotice[ 'message' ], |
|
| 213 | + self::NAME.' '.self::VERSION |
|
| 214 | 214 | ) |
| 215 | 215 | . "</p>" |
| 216 | 216 | . "</div>"; |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | AdminPageFrameworkLoader_Registry::setUp( __FILE__ ); |
| 223 | 223 | |
| 224 | 224 | // Initial checks. - Do no load if accessed directly, not exiting because the 'uninstall.php' and inclusion list generator will load this file. |
| 225 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 225 | +if ( !defined( 'ABSPATH' ) ) { |
|
| 226 | 226 | return; |
| 227 | 227 | } |
| 228 | 228 | if ( defined( 'DOING_UNINSTALL' ) ) { |
@@ -234,8 +234,8 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | $_bFrameworkLoaded = class_exists( 'AdminPageFramework_Registry', false ); |
| 236 | 236 | if ( |
| 237 | - ! $_bFrameworkLoaded |
|
| 238 | - || ! defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility |
|
| 237 | + !$_bFrameworkLoaded |
|
| 238 | + || !defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility |
|
| 239 | 239 | || version_compare( AdminPageFramework_Registry::VERSION, AdminPageFrameworkLoader_Registry::VERSION, '<' ) |
| 240 | 240 | ) { |
| 241 | 241 | AdminPageFrameworkLoader_Registry::setAdminNotice( |
@@ -253,18 +253,18 @@ discard block |
||
| 253 | 253 | add_action( 'admin_init', 'AdminPageFrameworkLoader_Warning' ); |
| 254 | 254 | |
| 255 | 255 | // Include the library file - the development version will be available if you cloned the GitHub repository. |
| 256 | -$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/development/admin-page-framework.php'; |
|
| 256 | +$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/development/admin-page-framework.php'; |
|
| 257 | 257 | $_bDebugMode = defined( 'WP_DEBUG' ) && WP_DEBUG; |
| 258 | 258 | $_bLoadDevelopmentVersion = $_bDebugMode && file_exists( $_sDevelopmentVersionPath ); |
| 259 | 259 | include( |
| 260 | 260 | $_bLoadDevelopmentVersion |
| 261 | 261 | ? $_sDevelopmentVersionPath |
| 262 | - : AdminPageFrameworkLoader_Registry::$sDirPath . '/library/apf/admin-page-framework.php' |
|
| 262 | + : AdminPageFrameworkLoader_Registry::$sDirPath.'/library/apf/admin-page-framework.php' |
|
| 263 | 263 | ); |
| 264 | 264 | |
| 265 | 265 | // Include the framework loader plugin components. |
| 266 | 266 | include( AdminPageFramework_Registry::$aClassFiles[ 'AdminPageFramework_PluginBootstrap' ] ); |
| 267 | -include( AdminPageFrameworkLoader_Registry::$sDirPath . '/include/class/AdminPageFrameworkLoader_Bootstrap.php' ); |
|
| 267 | +include( AdminPageFrameworkLoader_Registry::$sDirPath.'/include/class/AdminPageFrameworkLoader_Bootstrap.php' ); |
|
| 268 | 268 | new AdminPageFrameworkLoader_Bootstrap( |
| 269 | 269 | AdminPageFrameworkLoader_Registry::$sFilePath, |
| 270 | 270 | AdminPageFrameworkLoader_Registry::HOOK_SLUG // hook prefix |
@@ -127,16 +127,16 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function get() { |
| 129 | 129 | |
| 130 | - $_oFormatSectionsetsByTab = new AdminPageFramework_Form_View___Format_SectionsetsByTab( |
|
| 130 | + $_oFormatSectionsetsByTab = new AdminPageFramework_Form_View___Format_SectionsetsByTab( |
|
| 131 | 131 | $this->aStructure[ 'sectionsets' ], |
| 132 | 132 | $this->aStructure[ 'fieldsets' ], |
| 133 | 133 | $this->aArguments[ 'nested_depth' ] |
| 134 | 134 | ); |
| 135 | 135 | |
| 136 | - $_aOutput = array(); |
|
| 137 | - foreach( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) { |
|
| 136 | + $_aOutput = array(); |
|
| 137 | + foreach ( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) { |
|
| 138 | 138 | |
| 139 | - $_aOutput[] = $this->_getFormOutput( |
|
| 139 | + $_aOutput[ ] = $this->_getFormOutput( |
|
| 140 | 140 | $_oFormatSectionsetsByTab->getSectionsets( $_sSectionTabSlug ), |
| 141 | 141 | $_oFormatSectionsetsByTab->getFieldsets( $_sSectionTabSlug ), |
| 142 | 142 | $_sSectionTabSlug, |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | // Generate id for this output |
| 152 | 152 | $_sOutput = implode( PHP_EOL, $_aOutput ); |
| 153 | - $_sElementID = "admin-page-framework-sectionsets-" . uniqid(); |
|
| 153 | + $_sElementID = "admin-page-framework-sectionsets-".uniqid(); |
|
| 154 | 154 | return $this->_getSpinnerOutput( $_sOutput ) |
| 155 | 155 | . "<div id='{$_sElementID}' class='admin-page-framework-sctionsets admin-page-framework-form-js-on'>" |
| 156 | 156 | . $_sOutput |
@@ -185,17 +185,17 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | // A sectionset is a set of sections. |
| 187 | 187 | $_sSectionSet = $this->_getSectionsetsTables( |
| 188 | - $aSectionsets, // section-set definition (already divided by section tab) |
|
| 189 | - $aFieldsets, // field-set definitions (already divided by section tab) |
|
| 188 | + $aSectionsets, // section-set definition (already divided by section tab) |
|
| 189 | + $aFieldsets, // field-set definitions (already divided by section tab) |
|
| 190 | 190 | $aCallbacks |
| 191 | 191 | ); |
| 192 | 192 | return $_sSectionSet |
| 193 | - ? "<div " . $this->getAttributes( |
|
| 193 | + ? "<div ".$this->getAttributes( |
|
| 194 | 194 | array( |
| 195 | 195 | 'class' => 'admin-page-framework-sectionset', |
| 196 | - 'id' => "sectionset-{$sSectionTabSlug}_" . md5( serialize( $aSectionsets ) ), |
|
| 196 | + 'id' => "sectionset-{$sSectionTabSlug}_".md5( serialize( $aSectionsets ) ), |
|
| 197 | 197 | ) |
| 198 | - ) . ">" |
|
| 198 | + ).">" |
|
| 199 | 199 | . $_sSectionSet |
| 200 | 200 | . "</div>" |
| 201 | 201 | : ''; |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | * If there is no field overall to the section and its section tab, return an empty string. |
| 228 | 228 | * Otherwise, the sectionsets container gets rendered and its CSS rules such as margins give unwanted results. |
| 229 | 229 | */ |
| 230 | - if ( ! count( $aFieldsets ) ) { |
|
| 230 | + if ( !count( $aFieldsets ) ) { |
|
| 231 | 231 | return ''; |
| 232 | 232 | } |
| 233 | 233 | |
@@ -239,13 +239,13 @@ discard block |
||
| 239 | 239 | ); |
| 240 | 240 | $_sSectionTabSlug = $_aFirstSectionset[ 'section_tab_slug' ]; |
| 241 | 241 | $_sThisSectionID = $_aFirstSectionset[ 'section_id' ]; |
| 242 | - $_sSectionsID = 'sections-' . $_sThisSectionID; |
|
| 242 | + $_sSectionsID = 'sections-'.$_sThisSectionID; |
|
| 243 | 243 | $_aCollapsible = $this->_getCollapsibleArgumentForSections( |
| 244 | 244 | $_aFirstSectionset |
| 245 | 245 | ); |
| 246 | 246 | |
| 247 | - foreach( $aSectionsets as $_aSectionset ) { |
|
| 248 | - $_aOutputs = $this->_getSectionsetTable( |
|
| 247 | + foreach ( $aSectionsets as $_aSectionset ) { |
|
| 248 | + $_aOutputs = $this->_getSectionsetTable( |
|
| 249 | 249 | $_aOutputs, |
| 250 | 250 | $_sSectionsID, |
| 251 | 251 | $_aSectionset, |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | * Changed the visibility scope to private. Changed the 1st parameter from `$aSection`. |
| 274 | 274 | * @return array |
| 275 | 275 | */ |
| 276 | - private function _getCollapsibleArgumentForSections( array $aSectionset=array() ) { |
|
| 276 | + private function _getCollapsibleArgumentForSections( array $aSectionset = array() ) { |
|
| 277 | 277 | |
| 278 | 278 | $_oArgumentFormater = new AdminPageFramework_Form_Model___Format_CollapsibleSection( |
| 279 | 279 | $aSectionset[ 'collapsible' ], |
@@ -301,19 +301,19 @@ discard block |
||
| 301 | 301 | */ |
| 302 | 302 | private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) { |
| 303 | 303 | |
| 304 | - if ( ! $this->isSectionsetVisible( $_aSection ) ) { |
|
| 304 | + if ( !$this->isSectionsetVisible( $_aSection ) ) { |
|
| 305 | 305 | return $_aOutputs; |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | // If the 'save' argument is false, insert a flag that disables saving the section inputs. |
| 309 | - $_aOutputs[ 'section_contents' ][] = $this->_getUnsetFlagSectionInputTag( $_aSection ); |
|
| 309 | + $_aOutputs[ 'section_contents' ][ ] = $this->_getUnsetFlagSectionInputTag( $_aSection ); |
|
| 310 | 310 | |
| 311 | 311 | // For repeatable sections - sub-sections are divided field definition arrays by sub-section index, |
| 312 | 312 | // not section definition arrays. |
| 313 | - $_aSubSections = $this->getIntegerKeyElements( |
|
| 313 | + $_aSubSections = $this->getIntegerKeyElements( |
|
| 314 | 314 | $this->getElementAsArray( |
| 315 | 315 | $aFieldsInSections, // subject array |
| 316 | - $_aSection[ '_section_path' ], // dimensional path |
|
| 316 | + $_aSection[ '_section_path' ], // dimensional path |
|
| 317 | 317 | array() // default |
| 318 | 318 | ) |
| 319 | 319 | ); |
@@ -356,28 +356,28 @@ discard block |
||
| 356 | 356 | private function _getSubSections( $_aOutputs, $_sSectionsID, $_aSection, $_aSubSections ) { |
| 357 | 357 | |
| 358 | 358 | // Add the repeatable sections enabler script. |
| 359 | - if ( ! empty( $_aSection[ 'repeatable' ] ) ) { |
|
| 360 | - $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_RepeatableSection::getEnabler( |
|
| 359 | + if ( !empty( $_aSection[ 'repeatable' ] ) ) { |
|
| 360 | + $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_RepeatableSection::getEnabler( |
|
| 361 | 361 | $_sSectionsID, |
| 362 | 362 | $_aOutputs[ 'count_subsections' ], |
| 363 | 363 | $_aSection[ 'repeatable' ], |
| 364 | 364 | $this->oMsg |
| 365 | 365 | ); |
| 366 | - $_aOutputs[ 'section_contents' ][] = $this->_getRepeatableSectionFlagTag( $_aSection ); |
|
| 366 | + $_aOutputs[ 'section_contents' ][ ] = $this->_getRepeatableSectionFlagTag( $_aSection ); |
|
| 367 | 367 | } |
| 368 | 368 | // Add the sortable sections enabler script. 3.6.0+ |
| 369 | - if ( ! empty( $_aSection[ 'sortable' ] ) ) { |
|
| 370 | - $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( |
|
| 369 | + if ( !empty( $_aSection[ 'sortable' ] ) ) { |
|
| 370 | + $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( |
|
| 371 | 371 | $_sSectionsID, |
| 372 | 372 | $_aSection[ 'sortable' ], |
| 373 | 373 | $this->oMsg |
| 374 | 374 | ); |
| 375 | - $_aOutputs[ 'section_contents' ][] = $this->_getSortableSectionFlagTag( $_aSection ); |
|
| 375 | + $_aOutputs[ 'section_contents' ][ ] = $this->_getSortableSectionFlagTag( $_aSection ); |
|
| 376 | 376 | } |
| 377 | 377 | |
| 378 | 378 | // Get the section tables. |
| 379 | 379 | $_aSubSections = $this->numerizeElements( $_aSubSections ); // will include the main section as well. |
| 380 | - foreach( $_aSubSections as $_iIndex => $_aFields ) { |
|
| 380 | + foreach ( $_aSubSections as $_iIndex => $_aFields ) { |
|
| 381 | 381 | |
| 382 | 382 | $_oEachSectionArguments = new AdminPageFramework_Form_Model___Format_EachSection( |
| 383 | 383 | $_aSection, |
@@ -407,8 +407,8 @@ discard block |
||
| 407 | 407 | array( |
| 408 | 408 | 'class' => 'element-address', |
| 409 | 409 | 'type' => 'hidden', |
| 410 | - 'name' => '__repeatable_elements_' . $aSection[ '_structure_type' ] |
|
| 411 | - . '[' . $aSection[ 'section_id' ] . ']', |
|
| 410 | + 'name' => '__repeatable_elements_'.$aSection[ '_structure_type' ] |
|
| 411 | + . '['.$aSection[ 'section_id' ].']', |
|
| 412 | 412 | // @todo examine whether this value should include a section index. |
| 413 | 413 | 'value' => $aSection[ 'section_id' ], |
| 414 | 414 | ) |
@@ -426,8 +426,8 @@ discard block |
||
| 426 | 426 | array( |
| 427 | 427 | 'class' => 'element-address', |
| 428 | 428 | 'type' => 'hidden', |
| 429 | - 'name' => '__sortable_elements_' . $aSection[ '_structure_type' ] |
|
| 430 | - . '[' . $aSection[ 'section_id' ] . ']', |
|
| 429 | + 'name' => '__sortable_elements_'.$aSection[ '_structure_type' ] |
|
| 430 | + . '['.$aSection[ 'section_id' ].']', |
|
| 431 | 431 | // @todo examine whether this value should include a section index. |
| 432 | 432 | 'value' => $aSection[ 'section_id' ], |
| 433 | 433 | ) |
@@ -449,8 +449,8 @@ discard block |
||
| 449 | 449 | 'input', |
| 450 | 450 | array( |
| 451 | 451 | 'type' => 'hidden', |
| 452 | - 'name' => '__unset_' . $aSection[ '_structure_type' ] . '[' . $aSection[ 'section_id' ] . ']', |
|
| 453 | - 'value' => "__dummy_option_key|" . $aSection[ 'section_id' ], |
|
| 452 | + 'name' => '__unset_'.$aSection[ '_structure_type' ].'['.$aSection[ 'section_id' ].']', |
|
| 453 | + 'value' => "__dummy_option_key|".$aSection[ 'section_id' ], |
|
| 454 | 454 | 'class' => 'unset-element-names element-address', |
| 455 | 455 | ) |
| 456 | 456 | ); |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | private function _getSectionTableWithTabList( array $_aOutputs, array $aSectionset, $aFieldsetsPerSection ) { |
| 467 | 467 | |
| 468 | 468 | // Tab list |
| 469 | - $_aOutputs[ 'section_tab_list' ][] = $this->_getTabList( |
|
| 469 | + $_aOutputs[ 'section_tab_list' ][ ] = $this->_getTabList( |
|
| 470 | 470 | $aSectionset, |
| 471 | 471 | $aFieldsetsPerSection, |
| 472 | 472 | $this->aCallbacks[ 'fieldset_output' ] |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | |
| 475 | 475 | // Section container |
| 476 | 476 | $_oSectionTable = new AdminPageFramework_Form_View___Section( |
| 477 | - $this->aArguments, // for nested sections |
|
| 477 | + $this->aArguments, // for nested sections |
|
| 478 | 478 | $aSectionset, |
| 479 | 479 | $this->aStructure, |
| 480 | 480 | $aFieldsetsPerSection, |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | $this->aCallbacks, |
| 485 | 485 | $this->oMsg |
| 486 | 486 | ); |
| 487 | - $_aOutputs[ 'section_contents' ][] = $_oSectionTable->get(); |
|
| 487 | + $_aOutputs[ 'section_contents' ][ ] = $_oSectionTable->get(); |
|
| 488 | 488 | |
| 489 | 489 | return $_aOutputs; |
| 490 | 490 | |
@@ -512,9 +512,9 @@ discard block |
||
| 512 | 512 | 'section_index' => null, |
| 513 | 513 | 'collapsible' => $aCollapsible, |
| 514 | 514 | 'container_type' => 'sections', // section or sections |
| 515 | - 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
| 515 | + 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
| 516 | 516 | ), |
| 517 | - array(), // fieldsets |
|
| 517 | + array(), // fieldsets |
|
| 518 | 518 | $this->aSavedData, |
| 519 | 519 | $this->aFieldErrors, |
| 520 | 520 | $this->aStructure[ 'field_type_definitions' ], |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | $aOutputs[ 'count_subsections' ] |
| 532 | 532 | ); |
| 533 | 533 | return $_oCollapsibleSectionTitle->get() |
| 534 | - . "<div " . $_oSectionsTablesContainerAttributes->get() . ">" |
|
| 534 | + . "<div ".$_oSectionsTablesContainerAttributes->get().">" |
|
| 535 | 535 | . $this->_getSectionTabList( $sSectionTabSlug, $aOutputs[ 'section_tab_list' ] ) |
| 536 | 536 | . implode( PHP_EOL, $aOutputs[ 'section_contents' ] ) |
| 537 | 537 | . "</div>"; |
@@ -562,21 +562,21 @@ discard block |
||
| 562 | 562 | */ |
| 563 | 563 | private function _getTabList( array $aSection, array $aFields, $hfFieldCallback ) { |
| 564 | 564 | |
| 565 | - if ( ! $aSection[ 'section_tab_slug' ] ) { |
|
| 565 | + if ( !$aSection[ 'section_tab_slug' ] ) { |
|
| 566 | 566 | return ''; |
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | $iSectionIndex = $aSection[ '_index' ]; |
| 570 | 570 | |
| 571 | - $_sSectionTagID = 'section-' . $aSection[ 'section_id' ] . '__' . $iSectionIndex; |
|
| 571 | + $_sSectionTagID = 'section-'.$aSection[ 'section_id' ].'__'.$iSectionIndex; |
|
| 572 | 572 | $_aTabAttributes = $aSection[ 'attributes' ][ 'tab' ] |
| 573 | 573 | + array( |
| 574 | 574 | 'class' => 'admin-page-framework-section-tab nav-tab', |
| 575 | 575 | 'id' => "section_tab-{$_sSectionTagID}", |
| 576 | 576 | 'style' => null |
| 577 | 577 | ); |
| 578 | - $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] ); // 3.3.1+ |
|
| 579 | - $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null ); // 3.3.1+ |
|
| 578 | + $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] ); // 3.3.1+ |
|
| 579 | + $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null ); // 3.3.1+ |
|
| 580 | 580 | |
| 581 | 581 | $_oSectionTitle = new AdminPageFramework_Form_View___SectionTitle( |
| 582 | 582 | array( |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | 'tag' => 'h4', |
| 585 | 585 | 'section_index' => $iSectionIndex, |
| 586 | 586 | |
| 587 | - 'sectionset' => $aSection, // 3.7.0+ for tooltip |
|
| 587 | + 'sectionset' => $aSection, // 3.7.0+ for tooltip |
|
| 588 | 588 | ), |
| 589 | 589 | $aFields, |
| 590 | 590 | $this->aSavedData, |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | $this->aCallbacks // field output element callables. |
| 595 | 595 | ); |
| 596 | 596 | |
| 597 | - return "<li " . $this->getAttributes( $_aTabAttributes ) . ">" |
|
| 597 | + return "<li ".$this->getAttributes( $_aTabAttributes ).">" |
|
| 598 | 598 | . "<a href='#{$_sSectionTagID}'>" |
| 599 | 599 | . $_oSectionTitle->get() |
| 600 | 600 | ."</a>" |