@@ -93,18 +93,18 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | // If the section ID is not registered, return false. |
96 | - if ( ! array_key_exists( $sID, $this->aSectionsets ) ) { |
|
96 | + if ( !array_key_exists( $sID, $this->aSectionsets ) ) { |
|
97 | 97 | return false; |
98 | 98 | } |
99 | 99 | |
100 | 100 | // the fields array's first dimension is also filled with the keys of section ids. |
101 | - if ( ! array_key_exists( $sID, $this->aFieldsets ) ) { |
|
101 | + if ( !array_key_exists( $sID, $this->aFieldsets ) ) { |
|
102 | 102 | return false; |
103 | 103 | } |
104 | 104 | |
105 | 105 | // Since numeric IDs are denied at the beginning of the method, the elements will not be sub-sections. |
106 | 106 | $_bIsSection = false; |
107 | - foreach( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
107 | + foreach ( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
108 | 108 | |
109 | 109 | if ( $_sSectionID == $sID ) { |
110 | 110 | $_bIsSection = true; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * @return boolean |
131 | 131 | */ |
132 | 132 | public function canUserView( $sCapability ) { |
133 | - if ( ! $sCapability ) { |
|
133 | + if ( !$sCapability ) { |
|
134 | 134 | return true; |
135 | 135 | } |
136 | 136 | return ( boolean ) current_user_can( $sCapability ); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @return string |
59 | 59 | * @since 3.7.0 |
60 | 60 | */ |
61 | - public function get( $bTableRow=true ) { |
|
61 | + public function get( $bTableRow = true ) { |
|
62 | 62 | |
63 | 63 | $_sMethodName = $this->getAOrB( |
64 | 64 | $bTableRow, |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | ); |
68 | 68 | |
69 | 69 | $_sOutput = ''; |
70 | - foreach( $this->aFieldsetsPerSection as $_aFieldset ) { |
|
70 | + foreach ( $this->aFieldsetsPerSection as $_aFieldset ) { |
|
71 | 71 | |
72 | 72 | $_oFieldsetOutputFormatter = new AdminPageFramework_Form_Model___Format_FieldsetOutput( |
73 | 73 | $_aFieldset, |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ); |
77 | 77 | |
78 | 78 | $_aFieldset = $_oFieldsetOutputFormatter->get(); |
79 | - if ( ! $this->callBack( $this->aCallbacks[ 'is_fieldset_visible' ], array( true, $_aFieldset ) ) ) { |
|
79 | + if ( !$this->callBack( $this->aCallbacks[ 'is_fieldset_visible' ], array( true, $_aFieldset ) ) ) { |
|
80 | 80 | continue; |
81 | 81 | } |
82 | 82 |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function _isInThePage() { |
46 | 46 | |
47 | - if ( ! $this->oProp->bIsAdmin ) { |
|
47 | + if ( !$this->oProp->bIsAdmin ) { |
|
48 | 48 | return false; |
49 | 49 | } |
50 | 50 | |
51 | 51 | // Foe admin-ajax.php, aQuery holds the referer's GET URL parameters so the check covers the cases of ajax calls. |
52 | 52 | $_sPageSlug = $this->oUtil->getElement( $this->oProp->aQuery, array( 'page' ), '' ); |
53 | - if ( ! $this->___isAddedPage( $_sPageSlug ) ) { |
|
53 | + if ( !$this->___isAddedPage( $_sPageSlug ) ) { |
|
54 | 54 | return false; |
55 | 55 | } |
56 | 56 | return true; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | private function ___isAddedPage( $sPageSlug ) { |
64 | 64 | |
65 | 65 | // Case: page slugs are stored with numeric index |
66 | - if ( ! $this->oUtil->isAssociative( $this->oProp->aPageSlugs ) ) { |
|
66 | + if ( !$this->oUtil->isAssociative( $this->oProp->aPageSlugs ) ) { |
|
67 | 67 | return in_array( $sPageSlug, $this->oProp->aPageSlugs, true ); |
68 | 68 | } |
69 | 69 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | private $_iLevel; |
39 | 39 | |
40 | - public function __construct( $iLevel=null ) { |
|
40 | + public function __construct( $iLevel = null ) { |
|
41 | 41 | $this->_iLevel = null !== $iLevel |
42 | 42 | ? $iLevel |
43 | 43 | : error_reporting(); |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | private function _getIncluded() { |
57 | 57 | |
58 | 58 | $_aIncluded = array(); |
59 | - foreach( $this->_aLevels as $_iLevel => $iLevelText ) { |
|
59 | + foreach ( $this->_aLevels as $_iLevel => $iLevelText ) { |
|
60 | 60 | |
61 | 61 | // This is where we check if a level was used or not |
62 | 62 | if ( $this->_iLevel & $_iLevel ) { |
63 | - $_aIncluded[] = $_iLevel; |
|
63 | + $_aIncluded[ ] = $_iLevel; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | } |
@@ -74,16 +74,16 @@ discard block |
||
74 | 74 | $_aValues = array(); |
75 | 75 | |
76 | 76 | if ( count( $aIncluded ) > $_iAll / 2 ) { |
77 | - $_aValues[] = 'E_ALL'; |
|
78 | - foreach( $this->_aLevels as $_iLevel => $iLevelText ) { |
|
79 | - if ( ! in_array( $_iLevel, $aIncluded ) ) { |
|
80 | - $_aValues[] = $iLevelText; |
|
77 | + $_aValues[ ] = 'E_ALL'; |
|
78 | + foreach ( $this->_aLevels as $_iLevel => $iLevelText ) { |
|
79 | + if ( !in_array( $_iLevel, $aIncluded ) ) { |
|
80 | + $_aValues[ ] = $iLevelText; |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | return implode( ' & ~', $_aValues ); |
84 | 84 | } |
85 | - foreach( $aIncluded as $_iLevel ) { |
|
86 | - $_aValues[] = $this->_aLevels[ $_iLevel ]; |
|
85 | + foreach ( $aIncluded as $_iLevel ) { |
|
86 | + $_aValues[ ] = $this->_aLevels[ $_iLevel ]; |
|
87 | 87 | } |
88 | 88 | return implode( ' | ', $_aValues ); |
89 | 89 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | // Widgets can be called multiple times for the number of user-created widget instances for one class instance |
41 | 41 | // so make sure it is processed only once per page. |
42 | 42 | if ( $this->hasBeenCalled( 'resource_' . $oForm->aArguments[ 'caller_id' ] ) ) { |
43 | - return; |
|
43 | + return; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $this->___setHooks(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | // Widgets can be called multiple times for the number of user-created widget instances for one class instance |
41 | 41 | // so make sure it is processed only once per page. |
42 | - if ( $this->hasBeenCalled( 'resource_' . $oForm->aArguments[ 'caller_id' ] ) ) { |
|
42 | + if ( $this->hasBeenCalled( 'resource_'.$oForm->aArguments[ 'caller_id' ] ) ) { |
|
43 | 43 | return; |
44 | 44 | } |
45 | 45 | |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | * @since 3.7.0 |
113 | 113 | */ |
114 | 114 | public function _replyToEnqueueScripts() { |
115 | - if ( ! $this->oForm->isInThePage() ) { |
|
115 | + if ( !$this->oForm->isInThePage() ) { |
|
116 | 116 | return; |
117 | 117 | } |
118 | - foreach( $this->oForm->getResources( 'src_scripts' ) as $_isIndex => $_asEnqueue ) { |
|
118 | + foreach ( $this->oForm->getResources( 'src_scripts' ) as $_isIndex => $_asEnqueue ) { |
|
119 | 119 | $this->___enqueueScript( $_asEnqueue ); |
120 | - $this->oForm->unsetResources( array( 'src_scripts', $_isIndex ) ); // no longer needed |
|
120 | + $this->oForm->unsetResources( array( 'src_scripts', $_isIndex ) ); // no longer needed |
|
121 | 121 | } |
122 | 122 | } |
123 | 123 | /** |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $_aEnqueueItem[ 'src' ], |
145 | 145 | $_aEnqueueItem[ 'dependencies' ], |
146 | 146 | $_aEnqueueItem[ 'version' ], |
147 | - did_action( 'admin_body_class' ) || ( boolean ) $_aEnqueueItem['in_footer'] |
|
147 | + did_action( 'admin_body_class' ) || ( boolean ) $_aEnqueueItem[ 'in_footer' ] |
|
148 | 148 | ); |
149 | 149 | if ( $_aEnqueueItem[ 'translation' ] ) { |
150 | 150 | wp_localize_script( |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | private function ___getFormattedEnqueueScript( $asEnqueue ) { |
163 | 163 | static $_iCallCount = 1; |
164 | 164 | $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array( |
165 | - 'handle_id' => 'script_form_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount, |
|
165 | + 'handle_id' => 'script_form_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount, |
|
166 | 166 | 'src' => null, |
167 | 167 | 'dependencies' => null, |
168 | 168 | 'version' => null, |
@@ -185,10 +185,10 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public function _replyToEnqueueStyles() { |
187 | 187 | |
188 | - if ( ! $this->oForm->isInThePage() ) { |
|
188 | + if ( !$this->oForm->isInThePage() ) { |
|
189 | 189 | return; |
190 | 190 | } |
191 | - foreach( $this->oForm->getResources( 'src_styles' ) as $_isIndex => $_asEnqueueItem ) { |
|
191 | + foreach ( $this->oForm->getResources( 'src_styles' ) as $_isIndex => $_asEnqueueItem ) { |
|
192 | 192 | $this->___enqueueStyle( $_asEnqueueItem ); |
193 | 193 | $this->oForm->unsetResources( array( 'src_styles', $_isIndex ) ); // no longer needed |
194 | 194 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | private function ___getFormattedEnqueueStyle( $asEnqueue ) { |
211 | 211 | static $_iCallCount = 1; |
212 | 212 | $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array( |
213 | - 'handle_id' => 'style_form_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount, |
|
213 | + 'handle_id' => 'style_form_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount, |
|
214 | 214 | 'src' => null, |
215 | 215 | 'dependencies' => null, |
216 | 216 | 'version' => null, |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $_sSRCRaw = wp_normalize_path( $aEnqueueItem[ 'src' ] ); |
240 | 240 | $_sSRC = $this->getResolvedSRC( $_sSRCRaw ); // at this point, it is a URL |
241 | 241 | |
242 | - if ( ! $this->oForm->aArguments[ 'autoload_min_resource' ] ) { |
|
242 | + if ( !$this->oForm->aArguments[ 'autoload_min_resource' ] ) { |
|
243 | 243 | return $_sSRC; |
244 | 244 | } |
245 | 245 | |
@@ -265,16 +265,16 @@ discard block |
||
265 | 265 | + array( 'dirname' => '', 'filename' => '', 'basename' => '', 'extension' => '' ); // avoid undefined index warnings |
266 | 266 | |
267 | 267 | // If there is no extension, avoid using a minified version. |
268 | - if ( ! $_aPathParts[ 'extension' ] ) { |
|
268 | + if ( !$_aPathParts[ 'extension' ] ) { |
|
269 | 269 | return $_sSRC; |
270 | 270 | } |
271 | 271 | |
272 | 272 | $_aPathPartsURL = pathinfo( $_sSRC ) |
273 | 273 | + array( 'dirname' => '', 'filename' => '', 'basename' => '', 'extension' => '' ); // avoid undefined index warnings |
274 | 274 | |
275 | - $_sPathMinifiedVersion = $_aPathParts[ 'dirname' ] . '/' . $_aPathParts[ 'filename' ] . $_sMinPrefix . '.' . $_aPathParts[ 'extension' ]; |
|
275 | + $_sPathMinifiedVersion = $_aPathParts[ 'dirname' ].'/'.$_aPathParts[ 'filename' ].$_sMinPrefix.'.'.$_aPathParts[ 'extension' ]; |
|
276 | 276 | return file_exists( $_sPathMinifiedVersion ) |
277 | - ? $_aPathPartsURL[ 'dirname' ] . '/' . $_aPathPartsURL[ 'filename' ] . $_sMinPrefix . '.' . $_aPathPartsURL[ 'extension' ] |
|
277 | + ? $_aPathPartsURL[ 'dirname' ].'/'.$_aPathPartsURL[ 'filename' ].$_sMinPrefix.'.'.$_aPathPartsURL[ 'extension' ] |
|
278 | 278 | : $_sSRC; |
279 | 279 | |
280 | 280 | } |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | */ |
290 | 290 | public function _replyToAddStyle() { |
291 | 291 | |
292 | - if ( ! $this->oForm->isInThePage() ) { |
|
292 | + if ( !$this->oForm->isInThePage() ) { |
|
293 | 293 | return; |
294 | 294 | } |
295 | 295 | $_sCSSRules = $this->___getFormattedInternalStyles( |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | */ |
332 | 332 | public function _replyToAddScript() { |
333 | 333 | |
334 | - if ( ! $this->oForm->isInThePage() ) { |
|
334 | + if ( !$this->oForm->isInThePage() ) { |
|
335 | 335 | return; |
336 | 336 | } |
337 | 337 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | // tab |
46 | 46 | if ( $_sPageSlug && $_sTabSlug ) { |
47 | - $this->oProp->sStyle = $this->addAndApplyFilters( |
|
47 | + $this->oProp->sStyle = $this->addAndApplyFilters( |
|
48 | 48 | $_oCaller, |
49 | 49 | "style_{$_sPageSlug}_{$_sTabSlug}", |
50 | 50 | $this->oProp->sStyle |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | // page |
55 | 55 | if ( $_sPageSlug ) { |
56 | - $this->oProp->sStyle = $this->addAndApplyFilters( |
|
56 | + $this->oProp->sStyle = $this->addAndApplyFilters( |
|
57 | 57 | $_oCaller, |
58 | 58 | "style_{$_sPageSlug}", |
59 | 59 | $this->oProp->sStyle |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @return string The tab slug if the tab has been added. |
88 | 88 | */ |
89 | 89 | private function _getCurrentTabSlugForFilter( $sPageSlug ) { |
90 | - $_sTabSlug = $this->oProp->getCurrentTabSlug( $sPageSlug ); |
|
90 | + $_sTabSlug = $this->oProp->getCurrentTabSlug( $sPageSlug ); |
|
91 | 91 | return isset( $this->oProp->aInPageTabs[ $sPageSlug ][ $_sTabSlug ] ) |
92 | 92 | ? $_sTabSlug |
93 | 93 | : ''; |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | // tab |
117 | 117 | if ( $_sPageSlug && $_sTabSlug ) { |
118 | - $this->oProp->sScript = $this->addAndApplyFilters( |
|
118 | + $this->oProp->sScript = $this->addAndApplyFilters( |
|
119 | 119 | $_oCaller, |
120 | 120 | "script_{$_sPageSlug}_{$_sTabSlug}", |
121 | 121 | $this->oProp->sScript |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | // page |
126 | 126 | if ( $_sPageSlug ) { |
127 | - $this->oProp->sScript = $this->addAndApplyFilters( |
|
127 | + $this->oProp->sScript = $this->addAndApplyFilters( |
|
128 | 128 | $_oCaller, |
129 | 129 | "script_{$_sPageSlug}", |
130 | 130 | $this->oProp->sScript |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | |
149 | 149 | $sCurrentPageSlug = $this->oProp->getCurrentPageSlug(); |
150 | 150 | $sCurrentTabSlug = $this->oProp->getCurrentTabSlug( $sCurrentPageSlug ); |
151 | - $sPageSlug = $aEnqueueItem['sPageSlug']; |
|
152 | - $sTabSlug = $aEnqueueItem['sTabSlug']; |
|
151 | + $sPageSlug = $aEnqueueItem[ 'sPageSlug' ]; |
|
152 | + $sTabSlug = $aEnqueueItem[ 'sTabSlug' ]; |
|
153 | 153 | |
154 | 154 | // If the page slug is not specified and the currently loading page is one of the pages that is added by the framework, |
155 | - if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework) |
|
155 | + if ( !$sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework) |
|
156 | 156 | $this->_enqueueSRC( $aEnqueueItem ); |
157 | 157 | } |
158 | 158 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | // If the tab slug is not specified and the page slug is specified, |
168 | 168 | // and if the current loading page slug and the specified one matches, |
169 | 169 | if ( |
170 | - ( $sPageSlug && ! $sTabSlug ) |
|
170 | + ( $sPageSlug && !$sTabSlug ) |
|
171 | 171 | && ( $sCurrentPageSlug == $sPageSlug ) |
172 | 172 | ) { |
173 | 173 | $this->_enqueueSRC( $aEnqueueItem ); |
@@ -152,7 +152,8 @@ |
||
152 | 152 | $sTabSlug = $aEnqueueItem['sTabSlug']; |
153 | 153 | |
154 | 154 | // If the page slug is not specified and the currently loading page is one of the pages that is added by the framework, |
155 | - if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework) |
|
155 | + if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { |
|
156 | +// means script-global(among pages added by the framework) |
|
156 | 157 | $this->_enqueueSRC( $aEnqueueItem ); |
157 | 158 | } |
158 | 159 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @return array Added stylesheet handle IDs. |
25 | 25 | */ |
26 | 26 | public function enqueueStyles( /*$aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() */ ) { |
27 | - if ( ! method_exists( $this->oResource, '_enqueueResourcesByType' ) ) { |
|
27 | + if ( !method_exists( $this->oResource, '_enqueueResourcesByType' ) ) { |
|
28 | 28 | return array(); |
29 | 29 | } |
30 | 30 | $_aParams = func_get_args() + array( array(), '', '', array() ); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @since 3.8.31 Removed parameters to be compatible with the base class. |
51 | 51 | */ |
52 | 52 | public function enqueueStyle( /* $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() */ ) { |
53 | - if ( ! method_exists( $this->oResource, '_addEnqueuingResourceByType' ) ) { |
|
53 | + if ( !method_exists( $this->oResource, '_addEnqueuingResourceByType' ) ) { |
|
54 | 54 | return ''; |
55 | 55 | } |
56 | 56 | $_aParams = func_get_args() + array( '', '', '', array() ); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @return array Added script handle IDs |
72 | 72 | */ |
73 | 73 | public function enqueueScripts( /* $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() */ ) { |
74 | - if ( ! method_exists( $this->oResource, '_enqueueResourcesByType' ) ) { |
|
74 | + if ( !method_exists( $this->oResource, '_enqueueResourcesByType' ) ) { |
|
75 | 75 | return array(); |
76 | 76 | } |
77 | 77 | $_aParams = func_get_args() + array( array(), '', '', array() ); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
98 | 98 | */ |
99 | 99 | public function enqueueScript( /* $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() */ ) { |
100 | - if ( ! method_exists( $this->oResource, '_addEnqueuingResourceByType' ) ) { |
|
100 | + if ( !method_exists( $this->oResource, '_addEnqueuingResourceByType' ) ) { |
|
101 | 101 | return ''; |
102 | 102 | } |
103 | 103 | $_aParams = func_get_args() + array( '', '', '', array() ); |
@@ -1,38 +1,38 @@ |
||
1 | 1 | <?php |
2 | 2 | $_aClassFiles = array( |
3 | - "GitHubCustomFieldType"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/library/github-custom-field-type/GitHubCustomFieldType.php", |
|
4 | - "AdminPageFrameworkLoader_Bootstrap"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/AdminPageFrameworkLoader_Bootstrap.php", |
|
5 | - "AdminPageFrameworkLoader_AdminPage"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPage.php", |
|
6 | - "AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks.php", |
|
7 | - "AdminPageFrameworkLoader_AdminPageMetaBox_Notification"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_Notification.php", |
|
8 | - "AdminPageFrameworkLoader_AdminPage_Addon"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon.php", |
|
9 | - "AdminPageFrameworkLoader_AdminPage_Addon_Top"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon_Top.php", |
|
10 | - "AdminPageFrameworkLoader_AdminPage_Help"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help.php", |
|
11 | - "AdminPageFrameworkLoader_AdminPage_Help_About"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_About.php", |
|
12 | - "AdminPageFrameworkLoader_AdminPage_Help_Debug"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Debug.php", |
|
13 | - "AdminPageFrameworkLoader_AdminPage_Help_Example"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Example.php", |
|
14 | - "AdminPageFrameworkLoader_AdminPage_Help_FAQ"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php", |
|
15 | - "AdminPageFrameworkLoader_AdminPage_Help_Guide"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Guide.php", |
|
16 | - "AdminPageFrameworkLoader_AdminPage_Help_Information"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Information.php", |
|
17 | - "AdminPageFrameworkLoader_AdminPage_Help_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report.php", |
|
18 | - "AdminPageFrameworkLoader_AdminPage_Help_Report_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php", |
|
19 | - "AdminPageFrameworkLoader_AdminPage_Help_Tip"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Tip.php", |
|
20 | - "AdminPageFrameworkLoader_AdminPage_Tool"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/AdminPageFrameworkLoader_AdminPage_Tool.php", |
|
21 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator.php", |
|
22 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes.php", |
|
23 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator.php", |
|
24 | - "AdminPageFrameworkLoader_AdminPageWelcome"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/dashboard/AdminPageFrameworkLoader_AdminPageWelcome.php", |
|
25 | - "AdminPageFrameworkLoader_AdminPageWelcome_Welcome"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/dashboard/welcome/AdminPageFrameworkLoader_AdminPageWelcome_Welcome.php", |
|
26 | - "AdminPageFrameworkLoader_Demo"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/demo/AdminPageFrameworkLoader_Demo.php", |
|
27 | - "AdminPageFrameworkLoader_NetworkAdmin"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/network-admin/AdminPageFrameworkLoader_NetworkAdmin.php", |
|
28 | - "AdminPageFrameworkLoader_AdminPage_Page_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Page_Base.php", |
|
29 | - "AdminPageFrameworkLoader_AdminPage_RootBase"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_RootBase.php", |
|
30 | - "AdminPageFrameworkLoader_AdminPage_Section_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Section_Base.php", |
|
31 | - "AdminPageFrameworkLoader_AdminPage_Tab_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_Base.php", |
|
32 | - "AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase.php", |
|
33 | - "AdminPageFrameworkLoader_Event"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/event/AdminPageFrameworkLoader_Event.php", |
|
34 | - "AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/event/AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion.php", |
|
35 | - "AdminPageFrameworkLoader_Option"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/option/AdminPageFrameworkLoader_Option.php", |
|
36 | - "AdminPageFrameworkLoader_FeedList"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/utility/AdminPageFrameworkLoader_FeedList.php", |
|
37 | - "AdminPageFrameworkLoader_Utility"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/utility/AdminPageFrameworkLoader_Utility.php", |
|
3 | + "GitHubCustomFieldType"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/library/github-custom-field-type/GitHubCustomFieldType.php", |
|
4 | + "AdminPageFrameworkLoader_Bootstrap"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/AdminPageFrameworkLoader_Bootstrap.php", |
|
5 | + "AdminPageFrameworkLoader_AdminPage"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPage.php", |
|
6 | + "AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks.php", |
|
7 | + "AdminPageFrameworkLoader_AdminPageMetaBox_Notification"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_Notification.php", |
|
8 | + "AdminPageFrameworkLoader_AdminPage_Addon"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon.php", |
|
9 | + "AdminPageFrameworkLoader_AdminPage_Addon_Top"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon_Top.php", |
|
10 | + "AdminPageFrameworkLoader_AdminPage_Help"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help.php", |
|
11 | + "AdminPageFrameworkLoader_AdminPage_Help_About"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_About.php", |
|
12 | + "AdminPageFrameworkLoader_AdminPage_Help_Debug"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Debug.php", |
|
13 | + "AdminPageFrameworkLoader_AdminPage_Help_Example"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Example.php", |
|
14 | + "AdminPageFrameworkLoader_AdminPage_Help_FAQ"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php", |
|
15 | + "AdminPageFrameworkLoader_AdminPage_Help_Guide"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Guide.php", |
|
16 | + "AdminPageFrameworkLoader_AdminPage_Help_Information"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Information.php", |
|
17 | + "AdminPageFrameworkLoader_AdminPage_Help_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report.php", |
|
18 | + "AdminPageFrameworkLoader_AdminPage_Help_Report_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php", |
|
19 | + "AdminPageFrameworkLoader_AdminPage_Help_Tip"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Tip.php", |
|
20 | + "AdminPageFrameworkLoader_AdminPage_Tool"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/AdminPageFrameworkLoader_AdminPage_Tool.php", |
|
21 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator.php", |
|
22 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes.php", |
|
23 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator.php", |
|
24 | + "AdminPageFrameworkLoader_AdminPageWelcome"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/dashboard/AdminPageFrameworkLoader_AdminPageWelcome.php", |
|
25 | + "AdminPageFrameworkLoader_AdminPageWelcome_Welcome"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/dashboard/welcome/AdminPageFrameworkLoader_AdminPageWelcome_Welcome.php", |
|
26 | + "AdminPageFrameworkLoader_Demo"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/demo/AdminPageFrameworkLoader_Demo.php", |
|
27 | + "AdminPageFrameworkLoader_NetworkAdmin"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/network-admin/AdminPageFrameworkLoader_NetworkAdmin.php", |
|
28 | + "AdminPageFrameworkLoader_AdminPage_Page_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Page_Base.php", |
|
29 | + "AdminPageFrameworkLoader_AdminPage_RootBase"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_RootBase.php", |
|
30 | + "AdminPageFrameworkLoader_AdminPage_Section_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Section_Base.php", |
|
31 | + "AdminPageFrameworkLoader_AdminPage_Tab_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_Base.php", |
|
32 | + "AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase.php", |
|
33 | + "AdminPageFrameworkLoader_Event"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/event/AdminPageFrameworkLoader_Event.php", |
|
34 | + "AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/event/AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion.php", |
|
35 | + "AdminPageFrameworkLoader_Option"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/option/AdminPageFrameworkLoader_Option.php", |
|
36 | + "AdminPageFrameworkLoader_FeedList"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/utility/AdminPageFrameworkLoader_FeedList.php", |
|
37 | + "AdminPageFrameworkLoader_Utility"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/utility/AdminPageFrameworkLoader_Utility.php", |
|
38 | 38 | ); |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | */ |
17 | 17 | class AdminPageFrameworkLoader_Registry_Base { |
18 | 18 | |
19 | - const VERSION = '3.8.32'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
19 | + const VERSION = '3.8.32'; // <--- 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' ) && 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 |