@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | // Property object |
134 | 134 | $this->oProp = $oProp; |
135 | 135 | |
136 | - if ( $this->oProp->bIsAdmin && ! $this->oProp->bIsAdminAjax ) { |
|
136 | + if ( $this->oProp->bIsAdmin && !$this->oProp->bIsAdminAjax ) { |
|
137 | 137 | if ( did_action( 'current_screen' ) ) { |
138 | 138 | $this->_replyToLoadComponents(); |
139 | 139 | } else { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $this->oLink = $this->oLink; |
161 | 161 | } |
162 | 162 | |
163 | - if ( ! $this->_isInThePage() ) { |
|
163 | + if ( !$this->_isInThePage() ) { |
|
164 | 164 | return; |
165 | 165 | } |
166 | 166 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | 'network_admin_page' => 'AdminPageFramework_HelpPane_Page', |
267 | 267 | 'post_meta_box' => 'AdminPageFramework_HelpPane_MetaBox', |
268 | 268 | 'page_meta_box' => 'AdminPageFramework_HelpPane_MetaBox_Page', |
269 | - 'post_type' => null, // no help pane class for the post type factory class. |
|
269 | + 'post_type' => null, // no help pane class for the post type factory class. |
|
270 | 270 | 'taxonomy_field' => 'AdminPageFramework_HelpPane_TaxonomyField', |
271 | 271 | 'widget' => 'AdminPageFramework_HelpPane_Widget', |
272 | 272 | 'user_meta' => 'AdminPageFramework_HelpPane_UserMeta', |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | */ |
328 | 328 | protected function _getPageLoadInfoInstance( $oProp, $oMsg ) { |
329 | 329 | |
330 | - if ( ! isset( $this->_aPageLoadClassNameMap[ $oProp->sStructureType ] ) ) { |
|
330 | + if ( !isset( $this->_aPageLoadClassNameMap[ $oProp->sStructureType ] ) ) { |
|
331 | 331 | return null; |
332 | 332 | } |
333 | 333 | $_sClassName = $this->_aPageLoadClassNameMap[ $oProp->sStructureType ]; |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $_aClassNameMap = array_shift( $_aParams ); |
350 | 350 | $_sKey = array_shift( $_aParams ); |
351 | 351 | |
352 | - if ( ! isset( $_aClassNameMap[ $_sKey ] ) ) { |
|
352 | + if ( !isset( $_aClassNameMap[ $_sKey ] ) ) { |
|
353 | 353 | return null; |
354 | 354 | } |
355 | 355 | |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | */ |
414 | 414 | public function __get( $sPropertyName ) { |
415 | 415 | |
416 | - switch( $sPropertyName ) { |
|
416 | + switch ( $sPropertyName ) { |
|
417 | 417 | case 'oHeadTag': // 3.3.0+ for backward compatibility |
418 | 418 | $sPropertyName = 'oResource'; |
419 | 419 | break; |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | // Set and return the sub class object instance. |
423 | 423 | if ( in_array( $sPropertyName, $this->_aSubClassNames ) ) { |
424 | 424 | return call_user_func( |
425 | - array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
425 | + array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
426 | 426 | ); |
427 | 427 | } |
428 | 428 | |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | * |
504 | 504 | * @internal |
505 | 505 | */ |
506 | - public function __call( $sMethodName, $aArguments=null ) { |
|
506 | + public function __call( $sMethodName, $aArguments = null ) { |
|
507 | 507 | |
508 | 508 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
509 | 509 | |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | |
543 | 543 | // Check if the method name contains a backslash. |
544 | 544 | if ( false === strpos( $sMethodName, "\\" ) ) { |
545 | - return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
545 | + return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
546 | 546 | } |
547 | 547 | |
548 | 548 | // if the method name contains a backslash, the user may be using a name space. |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | array( $this, $_sAutoCallbackClassName ), |
554 | 554 | $aArguments |
555 | 555 | ) |
556 | - : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
556 | + : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
557 | 557 | |
558 | 558 | } |
559 | 559 | |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | */ |
564 | 564 | private function _triggerUndefinedMethodWarning( $sMethodName ) { |
565 | 565 | trigger_error( |
566 | - AdminPageFramework_Registry::NAME . ': ' |
|
566 | + AdminPageFramework_Registry::NAME.': ' |
|
567 | 567 | . sprintf( |
568 | 568 | __( 'The method is not defined: %1$s', $this->oProp->sTextDomain ), |
569 | 569 | $sMethodName |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | if ( $this->oProp->bIsAdmin && ! $this->oProp->bIsAdminAjax ) { |
137 | 137 | if ( did_action( 'current_screen' ) ) { |
138 | 138 | $this->_replyToLoadComponents(); |
139 | - } else { |
|
139 | + } else { |
|
140 | 140 | add_action( 'current_screen', array( $this, '_replyToLoadComponents' ) ); |
141 | 141 | } |
142 | 142 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $this->oLink = $this->oLink; |
161 | 161 | } |
162 | 162 | |
163 | - if ( ! $this->_isInThePage() ) { |
|
163 | + if ( ! $this->_isInThePage() ) { |
|
164 | 164 | return; |
165 | 165 | } |
166 | 166 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | * @since 3.1.0 |
198 | 198 | * @internal |
199 | 199 | */ |
200 | - protected function _isInstantiatable() { |
|
200 | + protected function _isInstantiatable() { |
|
201 | 201 | return true; |
202 | 202 | } |
203 | 203 | |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * @since 3.2.0 Changed the scope to public from protected as the head tag object will access it. |
211 | 211 | * @internal |
212 | 212 | */ |
213 | - public function _isInThePage() { |
|
213 | + public function _isInThePage() { |
|
214 | 214 | return true; |
215 | 215 | } |
216 | 216 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | // Set and return the sub class object instance. |
423 | - if ( in_array( $sPropertyName, $this->_aSubClassNames ) ) { |
|
423 | + if ( in_array( $sPropertyName, $this->_aSubClassNames ) ) { |
|
424 | 424 | return call_user_func( |
425 | 425 | array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
426 | 426 | ); |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | * |
504 | 504 | * @internal |
505 | 505 | */ |
506 | - public function __call( $sMethodName, $aArguments=null ) { |
|
506 | + public function __call( $sMethodName, $aArguments=null ) { |
|
507 | 507 | |
508 | 508 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
509 | 509 |
@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | * @since 3.6.0 Moved from `AdminPageFramework_FormDefinition`. |
24 | 24 | */ |
25 | 25 | static public $aStructure = array( |
26 | - 'title' => null, // (string) the section title will be assigned by default in the section formatting method. |
|
27 | - 'is_collapsed' => true, // (boolean) whether it is already collapsed or expanded |
|
28 | - 'toggle_all_button' => null, // (boolean|string|array) the position of where to display the toggle-all button that toggles the folding state of all collapsible sections. Accepts the following values. 'top-right', 'top-left', 'bottom-right', 'bottom-left'. If true is passed, the default 'top-right' will be used. To not to display, do not set any or pass `false` or `null`. |
|
29 | - 'collapse_others_on_expand' => true, // (boolean) whether the other collapsible sections should be folded when the section is unfolded. |
|
30 | - 'container' => 'sections', // (string) the container element that collapsible styling gets applied to. Either 'sections' or 'section' is accepted. |
|
31 | - 'type' => 'box', // DEVVER+ (string) supported types 'box', 'button' Default: `box`. The `button` type is only supported when the `container` argument is `section`. |
|
26 | + 'title' => null, // (string) the section title will be assigned by default in the section formatting method. |
|
27 | + 'is_collapsed' => true, // (boolean) whether it is already collapsed or expanded |
|
28 | + 'toggle_all_button' => null, // (boolean|string|array) the position of where to display the toggle-all button that toggles the folding state of all collapsible sections. Accepts the following values. 'top-right', 'top-left', 'bottom-right', 'bottom-left'. If true is passed, the default 'top-right' will be used. To not to display, do not set any or pass `false` or `null`. |
|
29 | + 'collapse_others_on_expand' => true, // (boolean) whether the other collapsible sections should be folded when the section is unfolded. |
|
30 | + 'container' => 'sections', // (string) the container element that collapsible styling gets applied to. Either 'sections' or 'section' is accepted. |
|
31 | + 'type' => 'box', // DEVVER+ (string) supported types 'box', 'button' Default: `box`. The `button` type is only supported when the `container` argument is `section`. |
|
32 | 32 | ); |
33 | 33 | |
34 | 34 | public $abCollapsible = false; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * @remark The framework will not pass this parameter when formatting a section definition array. |
42 | 42 | * It will be passed when the framework is rendering a form table to generate collapsible elements. |
43 | 43 | */ |
44 | - public $aSection = array(); |
|
44 | + public $aSection = array(); |
|
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Sets up properties. |
@@ -84,14 +84,14 @@ discard block |
||
84 | 84 | |
85 | 85 | $_aCollapsible = $this->getAsArray( $this->abCollapsible ) + array( |
86 | 86 | 'title' => $sTitle, |
87 | - ) + self::$aStructure; |
|
87 | + ) + self::$aStructure; |
|
88 | 88 | |
89 | 89 | $_aCollapsible[ 'toggle_all_button' ] = implode( |
90 | 90 | ',', |
91 | 91 | $this->getAsArray( $_aCollapsible[ 'toggle_all_button' ] ) |
92 | 92 | ); |
93 | 93 | |
94 | - if ( ! empty( $aSection ) ) { |
|
94 | + if ( !empty( $aSection ) ) { |
|
95 | 95 | $_aCollapsible[ 'toggle_all_button' ] = $this->_getToggleAllButtonArgument( |
96 | 96 | $_aCollapsible[ 'toggle_all_button' ], |
97 | 97 | $aSection |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | private function _getToggleAllButtonArgument( $sToggleAll, array $aSection ) { |
117 | 117 | |
118 | - if ( ! $aSection[ 'repeatable' ] ) { |
|
118 | + if ( !$aSection[ 'repeatable' ] ) { |
|
119 | 119 | return $sToggleAll; |
120 | 120 | } |
121 | 121 | |
@@ -125,13 +125,13 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | // Disable the toggle all button for middle sub-sections in repeatable sections. |
128 | - if ( ! $aSection[ '_is_first_index' ] && ! $aSection[ '_is_last_index' ] ) { |
|
128 | + if ( !$aSection[ '_is_first_index' ] && !$aSection[ '_is_last_index' ] ) { |
|
129 | 129 | return 0; |
130 | 130 | } |
131 | 131 | |
132 | 132 | $_aToggleAll = $this->getAOrB( |
133 | - true === $sToggleAll || 1 === $sToggleAll, // evaluate |
|
134 | - array( 'top-right', 'bottom-right' ), // if true |
|
133 | + true === $sToggleAll || 1 === $sToggleAll, // evaluate |
|
134 | + array( 'top-right', 'bottom-right' ), // if true |
|
135 | 135 | explode( ',', $sToggleAll ) // if false |
136 | 136 | ); |
137 | 137 | $_aToggleAll = $this->getAOrB( |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Admin Page Framework |
|
4 | - * |
|
5 | - * http://en.michaeluno.jp/admin-page-framework/ |
|
6 | - * Copyright (c) 2013-2015 Michael Uno; Licensed MIT |
|
7 | - * |
|
8 | - */ |
|
3 | + * Admin Page Framework |
|
4 | + * |
|
5 | + * http://en.michaeluno.jp/admin-page-framework/ |
|
6 | + * Copyright (c) 2013-2015 Michael Uno; Licensed MIT |
|
7 | + * |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Provides JavaScript utility scripts. |
@@ -404,12 +404,12 @@ discard block |
||
404 | 404 | |
405 | 405 | |
406 | 406 | /** |
407 | - * Stores the set container IDs to prevent multiple calls. |
|
408 | - * |
|
409 | - * Collapsible and tabbed sections can call this method multiple times with the same container ID. |
|
410 | - * |
|
411 | - * @since 3.4.0 |
|
412 | - */ |
|
407 | + * Stores the set container IDs to prevent multiple calls. |
|
408 | + * |
|
409 | + * Collapsible and tabbed sections can call this method multiple times with the same container ID. |
|
410 | + * |
|
411 | + * @since 3.4.0 |
|
412 | + */ |
|
413 | 413 | static private $_aSetContainerIDsForRepeatableSections = array(); |
414 | 414 | /** |
415 | 415 | * Returns the enabler script of repeatable sections. |
@@ -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 | ); |
@@ -18,17 +18,17 @@ discard block |
||
18 | 18 | */ |
19 | 19 | class AdminPageFramework_Form_View___CollapsibleSectionTitle extends AdminPageFramework_Form_View___SectionTitle { |
20 | 20 | |
21 | - public $aArguments = array( |
|
21 | + public $aArguments = array( |
|
22 | 22 | 'title' => null, |
23 | 23 | 'tag' => null, |
24 | 24 | 'section_index' => null, |
25 | 25 | 'collapsible' => array(), |
26 | 26 | 'container_type' => 'section', // section or sections |
27 | 27 | |
28 | - 'sectionset' => array(), // DEVVER+ sectionset definition array |
|
28 | + 'sectionset' => array(), // DEVVER+ sectionset definition array |
|
29 | 29 | |
30 | 30 | ); |
31 | - public $aFieldsets = array(); |
|
31 | + public $aFieldsets = array(); |
|
32 | 32 | public $aSavedData = array(); |
33 | 33 | public $aFieldErrors = array(); |
34 | 34 | public $aFieldTypeDefinitions = array(); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * @param array|boolean $aCollapsible The collapsible argument. |
63 | 63 | * @param string $sContainer The position context. Accepts either 'sections' or 'section'. If the set position in the argument array does not match this value, the method will return an empty string. |
64 | 64 | */ |
65 | - private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer='sections', $iSectionIndex=null ) { |
|
65 | + private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer = 'sections', $iSectionIndex = null ) { |
|
66 | 66 | |
67 | 67 | if ( $sContainer !== $aCollapsible[ 'container' ] ) { |
68 | 68 | return ''; |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | ); |
79 | 79 | |
80 | 80 | $_aSectionset = $this->aArguments[ 'sectionset' ]; |
81 | - $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ) . '_' . $iSectionIndex; |
|
81 | + $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$iSectionIndex; |
|
82 | 82 | |
83 | 83 | return $this->_getCollapsibleSectionsEnablerScript() |
84 | - . "<div " . $this->getAttributes( |
|
84 | + . "<div ".$this->getAttributes( |
|
85 | 85 | array( |
86 | 86 | 'id' => $_sSectionTitleTagID, |
87 | 87 | 'class' => $this->getClassAttribute( |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | 'collapsed', |
103 | 103 | '' |
104 | 104 | ), |
105 | - 'admin-page-framework-collapsible-type-' . $aCollapsible[ 'type' ] |
|
105 | + 'admin-page-framework-collapsible-type-'.$aCollapsible[ 'type' ] |
|
106 | 106 | ), |
107 | 107 | ) |
108 | 108 | + $this->getDataAttributeArray( $aCollapsible ) |
109 | - ) . ">" |
|
109 | + ).">" |
|
110 | 110 | . $_sSectionTitle |
111 | 111 | . "</div>"; |
112 | 112 |
@@ -18,14 +18,14 @@ discard block |
||
18 | 18 | */ |
19 | 19 | class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base { |
20 | 20 | |
21 | - public $aArguments = array( |
|
21 | + public $aArguments = array( |
|
22 | 22 | 'title' => null, |
23 | 23 | 'tag' => null, |
24 | 24 | 'section_index' => null, |
25 | 25 | |
26 | 26 | 'sectionset' => array(), |
27 | 27 | ); |
28 | - public $aFieldsets = array(); |
|
28 | + public $aFieldsets = array(); |
|
29 | 29 | public $aSavedData = array(); |
30 | 30 | public $aFieldErrors = array(); |
31 | 31 | public $aFieldTypeDefinitions = array(); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | private function _getToolTip() { |
84 | 84 | |
85 | 85 | $_aSectionset = $this->aArguments[ 'sectionset' ]; |
86 | - $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ) . '_' . $this->aArguments[ 'section_index' ]; |
|
86 | + $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$this->aArguments[ 'section_index' ]; |
|
87 | 87 | $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
88 | 88 | $_aSectionset[ 'tip' ], |
89 | 89 | $_sSectionTitleTagID |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * @since DEVVER Moved from `AdminPageFramework_FormPart_SectionTitle`. |
103 | 103 | * @return string The section title output. |
104 | 104 | */ |
105 | - protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex=null, $aFieldTypeDefinitions=array(), $aCollapsible=array() ) { |
|
105 | + protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex = null, $aFieldTypeDefinitions = array(), $aCollapsible = array() ) { |
|
106 | 106 | |
107 | 107 | $_aSectionTitleField = $this->_getSectionTitleField( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ); |
108 | 108 | return $_aSectionTitleField |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | private function _getSectionTitleField( array $aFieldsetsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
141 | 141 | |
142 | - foreach( $aFieldsetsets as $_aFieldsetset ) { |
|
142 | + foreach ( $aFieldsetsets as $_aFieldsetset ) { |
|
143 | 143 | |
144 | 144 | if ( 'section_title' !== $_aFieldsetset[ 'type' ] ) { |
145 | 145 | continue; |
@@ -215,12 +215,12 @@ discard block |
||
215 | 215 | public function addSubMenuLink( array $aSubMenuLink ) { |
216 | 216 | |
217 | 217 | // If required keys are not set, return. |
218 | - if ( ! isset( $aSubMenuLink['href'], $aSubMenuLink['title'] ) ) { |
|
218 | + if ( ! isset( $aSubMenuLink['href'], $aSubMenuLink['title'] ) ) { |
|
219 | 219 | return; |
220 | 220 | } |
221 | 221 | |
222 | 222 | // If the set URL is not valid, return. |
223 | - if ( ! filter_var( $aSubMenuLink['href'], FILTER_VALIDATE_URL ) ) { |
|
223 | + if ( ! filter_var( $aSubMenuLink['href'], FILTER_VALIDATE_URL ) ) { |
|
224 | 224 | return; |
225 | 225 | } |
226 | 226 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | */ |
314 | 314 | public function addSubMenuPage( array $aSubMenuPage ) { |
315 | 315 | |
316 | - if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
316 | + if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
317 | 317 | return; |
318 | 318 | } |
319 | 319 |
@@ -16,15 +16,15 @@ discard block |
||
16 | 16 | */ |
17 | 17 | class AdminPageFrameworkLoader_Registry_Base { |
18 | 18 | |
19 | - const VERSION = '3.7.0b24'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
20 | - const NAME = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing. |
|
19 | + const VERSION = '3.7.0b24'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
20 | + const NAME = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing. |
|
21 | 21 | const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc. |
22 | - const DESCRIPTION = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.'; |
|
23 | - const URI = 'http://en.michaeluno.jp/'; |
|
24 | - const AUTHOR = 'miunosoft (Michael Uno)'; |
|
25 | - const AUTHOR_URI = 'http://en.michaeluno.jp/'; |
|
26 | - const COPYRIGHT = 'Copyright (c) 2015, Michael Uno'; |
|
27 | - const LICENSE = 'GPL v2 or later'; |
|
22 | + const DESCRIPTION = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.'; |
|
23 | + const URI = 'http://en.michaeluno.jp/'; |
|
24 | + const AUTHOR = 'miunosoft (Michael Uno)'; |
|
25 | + const AUTHOR_URI = 'http://en.michaeluno.jp/'; |
|
26 | + const COPYRIGHT = 'Copyright (c) 2015, Michael Uno'; |
|
27 | + const LICENSE = 'GPL v2 or later'; |
|
28 | 28 | const CONTRIBUTORS = ''; |
29 | 29 | |
30 | 30 | } |
@@ -55,7 +55,7 @@ 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. |
@@ -70,12 +70,12 @@ discard block |
||
70 | 70 | * |
71 | 71 | * These will be accessed from the bootstrap script. |
72 | 72 | */ |
73 | - const TEXT_DOMAIN = 'admin-page-framework-loader'; |
|
74 | - const TEXT_DOMAIN_PATH = '/language'; |
|
73 | + const TEXT_DOMAIN = 'admin-page-framework-loader'; |
|
74 | + const TEXT_DOMAIN_PATH = '/language'; |
|
75 | 75 | |
76 | - // These properties will be defined in the setUp() method. |
|
77 | - static public $sFilePath = ''; |
|
78 | - static public $sDirPath = ''; |
|
76 | + // These properties will be defined in the setUp() method. |
|
77 | + static public $sFilePath = ''; |
|
78 | + static public $sDirPath = ''; |
|
79 | 79 | |
80 | 80 | /** |
81 | 81 | * Requirements. |
@@ -136,30 +136,30 @@ discard block |
||
136 | 136 | static public $aTaxonomies = array( |
137 | 137 | ); |
138 | 138 | |
139 | - /** |
|
140 | - * Sets up static properties. |
|
139 | + /** |
|
140 | + * Sets up static properties. |
|
141 | 141 | * @return void |
142 | - */ |
|
143 | - static public function setUp( $sPluginFilePath=null ) { |
|
142 | + */ |
|
143 | + static public function setUp( $sPluginFilePath=null ) { |
|
144 | 144 | |
145 | - self::$sFilePath = $sPluginFilePath ? $sPluginFilePath : __FILE__; |
|
146 | - self::$sDirPath = dirname( self::$sFilePath ); |
|
145 | + self::$sFilePath = $sPluginFilePath ? $sPluginFilePath : __FILE__; |
|
146 | + self::$sDirPath = dirname( self::$sFilePath ); |
|
147 | 147 | |
148 | - } |
|
148 | + } |
|
149 | 149 | |
150 | - /** |
|
151 | - * Returns the URL with the given relative path to the plugin path. |
|
152 | - * |
|
153 | - * <h3>Example</h3> |
|
150 | + /** |
|
151 | + * Returns the URL with the given relative path to the plugin path. |
|
152 | + * |
|
153 | + * <h3>Example</h3> |
|
154 | 154 | * <code> |
155 | 155 | * AdminPageFrameworkLoader_Registry::getPluginURL( 'asset/css/meta_box.css' ); |
156 | 156 | * </code> |
157 | 157 | * @since 3.5.0 |
158 | 158 | * @return string |
159 | - */ |
|
160 | - public static function getPluginURL( $sRelativePath='' ) { |
|
161 | - return plugins_url( $sRelativePath, self::$sFilePath ); |
|
162 | - } |
|
159 | + */ |
|
160 | + public static function getPluginURL( $sRelativePath='' ) { |
|
161 | + return plugins_url( $sRelativePath, self::$sFilePath ); |
|
162 | + } |
|
163 | 163 | |
164 | 164 | /** |
165 | 165 | * Returns the information of this class. |
@@ -16,16 +16,16 @@ discard block |
||
16 | 16 | */ |
17 | 17 | class AdminPageFrameworkLoader_Registry_Base { |
18 | 18 | |
19 | - const VERSION = '3.7.0b24'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
19 | + const VERSION = '3.7.0b24'; // <--- 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://en.michaeluno.jp/'; |
24 | 24 | const AUTHOR = 'miunosoft (Michael Uno)'; |
25 | 25 | const AUTHOR_URI = 'http://en.michaeluno.jp/'; |
26 | 26 | const COPYRIGHT = 'Copyright (c) 2015, Michael Uno'; |
27 | 27 | const LICENSE = 'GPL v2 or later'; |
28 | - const CONTRIBUTORS = ''; |
|
28 | + const CONTRIBUTORS = ''; |
|
29 | 29 | |
30 | 30 | } |
31 | 31 | /** |
@@ -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 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | static public $aAdminPages = array( |
119 | 119 | // key => 'page slug' |
120 | - 'about' => 'apfl_about', // the welcome page |
|
120 | + 'about' => 'apfl_about', // the welcome page |
|
121 | 121 | 'addon' => 'apfl_addons', |
122 | 122 | 'tool' => 'apfl_tools', |
123 | 123 | 'help' => 'apfl_contact', |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * Sets up static properties. |
141 | 141 | * @return void |
142 | 142 | */ |
143 | - static public function setUp( $sPluginFilePath=null ) { |
|
143 | + static public function setUp( $sPluginFilePath = null ) { |
|
144 | 144 | |
145 | 145 | self::$sFilePath = $sPluginFilePath ? $sPluginFilePath : __FILE__; |
146 | 146 | self::$sDirPath = dirname( self::$sFilePath ); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @since 3.5.0 |
158 | 158 | * @return string |
159 | 159 | */ |
160 | - public static function getPluginURL( $sRelativePath='' ) { |
|
160 | + public static function getPluginURL( $sRelativePath = '' ) { |
|
161 | 161 | return plugins_url( $sRelativePath, self::$sFilePath ); |
162 | 162 | } |
163 | 163 | |
@@ -184,13 +184,13 @@ discard block |
||
184 | 184 | * @since 3.5.0 |
185 | 185 | * @return void |
186 | 186 | */ |
187 | - static public function setAdminNotice( $sMessage, $sClassAttribute='error' ) { |
|
188 | - if ( ! is_admin() ) { |
|
187 | + static public function setAdminNotice( $sMessage, $sClassAttribute = 'error' ) { |
|
188 | + if ( !is_admin() ) { |
|
189 | 189 | return; |
190 | 190 | } |
191 | - self::$_aAdminNotices[] = array( |
|
191 | + self::$_aAdminNotices[ ] = array( |
|
192 | 192 | 'message' => $sMessage, |
193 | - 'class_attribute' => trim( $sClassAttribute ) . ' notice is-dismissible', |
|
193 | + 'class_attribute' => trim( $sClassAttribute ).' notice is-dismissible', |
|
194 | 194 | ); |
195 | 195 | add_action( 'admin_notices', array( __CLASS__, '_replyToSetAdminNotice' ) ); |
196 | 196 | } |
@@ -200,12 +200,12 @@ discard block |
||
200 | 200 | * @return void |
201 | 201 | */ |
202 | 202 | static public function _replyToSetAdminNotice() { |
203 | - foreach( self::$_aAdminNotices as $_aAdminNotice ) { |
|
204 | - echo "<div class='" . esc_attr( $_aAdminNotice['class_attribute'] ) . " notice is-dismissible'>" |
|
203 | + foreach ( self::$_aAdminNotices as $_aAdminNotice ) { |
|
204 | + echo "<div class='".esc_attr( $_aAdminNotice[ 'class_attribute' ] )." notice is-dismissible'>" |
|
205 | 205 | ."<p>" |
206 | 206 | . sprintf( |
207 | - '<strong>%1$s</strong>: ' . $_aAdminNotice['message'], |
|
208 | - self::NAME . ' ' . self::VERSION |
|
207 | + '<strong>%1$s</strong>: '.$_aAdminNotice[ 'message' ], |
|
208 | + self::NAME.' '.self::VERSION |
|
209 | 209 | ) |
210 | 210 | . "</p>" |
211 | 211 | . "</div>"; |
@@ -217,24 +217,24 @@ discard block |
||
217 | 217 | AdminPageFrameworkLoader_Registry::setUp( __FILE__ ); |
218 | 218 | |
219 | 219 | // Initial checks. - Do no load if accessed directly, not exiting because the 'uninstall.php' and inclusion list generator will load this file. |
220 | -if ( ! defined( 'ABSPATH' ) ) { return; } |
|
220 | +if ( !defined( 'ABSPATH' ) ) { return; } |
|
221 | 221 | if ( defined( 'DOING_UNINSTALL' ) ) { return; } |
222 | 222 | |
223 | 223 | // Include the library file |
224 | -if ( ! class_exists( 'AdminPageFramework' ) ) { |
|
224 | +if ( !class_exists( 'AdminPageFramework' ) ) { |
|
225 | 225 | // The development version is available in the repository cloned via GitHub. |
226 | - $_sDevelopmentVersionPath = dirname( __FILE__ ) . '/development/admin-page-framework.php'; |
|
226 | + $_sDevelopmentVersionPath = dirname( __FILE__ ).'/development/admin-page-framework.php'; |
|
227 | 227 | $_bDebugMode = defined( 'WP_DEBUG' ) && WP_DEBUG; |
228 | 228 | include( |
229 | 229 | $_bDebugMode && file_exists( $_sDevelopmentVersionPath ) |
230 | 230 | ? $_sDevelopmentVersionPath |
231 | - : dirname( __FILE__ ) . '/library/admin-page-framework/admin-page-framework.php' |
|
231 | + : dirname( __FILE__ ).'/library/admin-page-framework/admin-page-framework.php' |
|
232 | 232 | ); |
233 | 233 | } |
234 | 234 | |
235 | 235 | if ( |
236 | - ! class_exists( 'AdminPageFramework_Registry' ) |
|
237 | - || ! defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility |
|
236 | + !class_exists( 'AdminPageFramework_Registry' ) |
|
237 | + || !defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility |
|
238 | 238 | || version_compare( AdminPageFramework_Registry::VERSION, AdminPageFrameworkLoader_Registry::VERSION, '<' ) |
239 | 239 | ) { |
240 | 240 | AdminPageFrameworkLoader_Registry::setAdminNotice( |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | |
251 | 251 | // Include the framework loader plugin components. |
252 | -include( AdminPageFrameworkLoader_Registry::$sDirPath . '/include/class/boot/AdminPageFrameworkLoader_Bootstrap.php' ); |
|
252 | +include( AdminPageFrameworkLoader_Registry::$sDirPath.'/include/class/boot/AdminPageFrameworkLoader_Bootstrap.php' ); |
|
253 | 253 | if ( class_exists( 'AdminPageFrameworkLoader_Bootstrap' ) ) { // for backward compatibility |
254 | 254 | new AdminPageFrameworkLoader_Bootstrap( |
255 | 255 | AdminPageFrameworkLoader_Registry::$sFilePath, |