@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | final class AdminPageFramework_Registry extends AdminPageFramework_Registry_Base { |
56 | 56 | |
57 | 57 | const TEXT_DOMAIN = 'admin-page-framework'; |
58 | - const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
58 | + const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Indicates whether the framework is loaded from the minified version or not. |
@@ -98,12 +98,12 @@ discard block |
||
98 | 98 | * Sets up static properties. |
99 | 99 | * @return void |
100 | 100 | */ |
101 | - static public function setUp( $sFilePath=__FILE__ ) { |
|
101 | + static public function setUp( $sFilePath = __FILE__ ) { |
|
102 | 102 | |
103 | 103 | self::$sFilePath = $sFilePath; |
104 | 104 | self::$sDirPath = dirname( self::$sFilePath ); |
105 | 105 | self::$sFileURI = plugins_url( '', self::$sFilePath ); |
106 | - self::$sIncludeClassListPath = self::$sDirPath . '/admin-page-framework-include-class-list.php'; |
|
106 | + self::$sIncludeClassListPath = self::$sDirPath.'/admin-page-framework-include-class-list.php'; |
|
107 | 107 | self::$aClassFiles = self::_getClassFilePathList( self::$sIncludeClassListPath ); |
108 | 108 | self::$sAutoLoaderPath = isset( self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] ) |
109 | 109 | ? self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return array |
118 | 118 | */ |
119 | 119 | static private function _getClassFilePathList( $sInclusionClassListPath ) { |
120 | - $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
120 | + $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
121 | 121 | include( $sInclusionClassListPath ); |
122 | 122 | return $aClassFiles; |
123 | 123 | } |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | */ |
131 | 131 | static public function getVersion() { |
132 | 132 | |
133 | - if ( ! isset( self::$sAutoLoaderPath ) ) { |
|
134 | - trigger_error( 'Admin Page Framework: ' . ' : ' . sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
133 | + if ( !isset( self::$sAutoLoaderPath ) ) { |
|
134 | + trigger_error( 'Admin Page Framework: '.' : '.sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
135 | 135 | return self::VERSION; |
136 | 136 | } |
137 | 137 | $_aMinifiedVesionSuffix = array( |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | */ |
180 | 180 | final class AdminPageFramework_Bootstrap { |
181 | 181 | |
182 | - public function __construct( $sLibraryPath=__FILE__ ) { |
|
182 | + public function __construct( $sLibraryPath = __FILE__ ) { |
|
183 | 183 | |
184 | - if ( ! $this->_isLoadable() ) { |
|
184 | + if ( !$this->_isLoadable() ) { |
|
185 | 185 | return; |
186 | 186 | } |
187 | 187 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * Copyright (c) 2013-2015 Michael Uno; Licensed MIT |
7 | 7 | * |
8 | 8 | */ |
9 | -if ( ! class_exists( 'AdminPageFramework_NetworkAdmin_Documentation' ) ) : |
|
9 | +if ( !class_exists( 'AdminPageFramework_NetworkAdmin_Documentation' ) ) : |
|
10 | 10 | /** |
11 | 11 | * Provides an abstract base to create admin pages in the network admin area. |
12 | 12 | * |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | parent::__construct( $oProp ); |
29 | 29 | |
30 | - if ( ! $this->_isInThePage() ) { |
|
30 | + if ( !$this->_isInThePage() ) { |
|
31 | 31 | return; |
32 | 32 | } |
33 | 33 | if ( $this->oProp->bIsAdminAjax ) { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @return string the input id attribute |
47 | 47 | */ |
48 | 48 | public function _replyToGetSectionName( /* $sSectionName, $aSectionset */ ) { |
49 | - $_aParams = func_get_args() + array( null, null, ); |
|
49 | + $_aParams = func_get_args() + array( null, null,); |
|
50 | 50 | return $_aParams[ 0 ]; |
51 | 51 | } |
52 | 52 | |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | * @since 3.6.0 |
75 | 75 | * @return string |
76 | 76 | */ |
77 | - public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
78 | - $_aParams = func_get_args() + array( null, null, ); |
|
77 | + public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
78 | + $_aParams = func_get_args() + array( null, null,); |
|
79 | 79 | return $_aParams[ 0 ]; |
80 | 80 | } |
81 | 81 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @return string |
86 | 86 | */ |
87 | 87 | public function _replyToGetFlatFieldName( /* $sFieldName, $aFieldset */ ) { |
88 | - $_aParams = func_get_args() + array( null, null, ); |
|
88 | + $_aParams = func_get_args() + array( null, null,); |
|
89 | 89 | return $_aParams[ 0 ]; |
90 | 90 | } |
91 | 91 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * @return string the flat input name attribute |
108 | 108 | */ |
109 | 109 | public function _replyToGetFlatInputName( /* $sFlatNameAttribute, $aField, $sKey */ ) { |
110 | - $_aParams = func_get_args() + array( null, null, null ); |
|
110 | + $_aParams = func_get_args() + array( null, null, null ); |
|
111 | 111 | return $_aParams[ 0 ]; |
112 | 112 | } |
113 | 113 | |
@@ -149,14 +149,14 @@ discard block |
||
149 | 149 | 'if' => true, |
150 | 150 | 'capability' => '', |
151 | 151 | ); |
152 | - if ( ! $aElementDefinition[ 'if' ] ) { |
|
152 | + if ( !$aElementDefinition[ 'if' ] ) { |
|
153 | 153 | return false; |
154 | 154 | } |
155 | 155 | // For front-end forms that allow guests, the capability level can be empty. In that case, return true. |
156 | - if ( ! $aElementDefinition[ 'capability' ] ) { |
|
156 | + if ( !$aElementDefinition[ 'capability' ] ) { |
|
157 | 157 | return true; |
158 | 158 | } |
159 | - if ( ! current_user_can( $aElementDefinition[ 'capability' ] ) ) { |
|
159 | + if ( !current_user_can( $aElementDefinition[ 'capability' ] ) ) { |
|
160 | 160 | return false; |
161 | 161 | } |
162 | 162 | return $bDefault; |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $this, |
193 | 193 | array( |
194 | 194 | // section_{instantiated class name}_{section id} |
195 | - 'section_head_' . $this->oProp->sClassName . '_' . $aSectionset[ 'section_id' ] |
|
195 | + 'section_head_'.$this->oProp->sClassName.'_'.$aSectionset[ 'section_id' ] |
|
196 | 196 | ), |
197 | 197 | $sSectionDescription |
198 | 198 | ); |
@@ -209,15 +209,15 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function _replyToGetFieldOutput( $sFieldOutput, $aFieldset ) { |
211 | 211 | |
212 | - $_sSectionPart = $this->oUtil->getAOrB( |
|
212 | + $_sSectionPart = $this->oUtil->getAOrB( |
|
213 | 213 | isset( $aFieldset[ 'section_id' ] ) && '_default' !== $aFieldset[ 'section_id' ], |
214 | - '_' . $aFieldset[ 'section_id' ], |
|
214 | + '_'.$aFieldset[ 'section_id' ], |
|
215 | 215 | '' |
216 | 216 | ); |
217 | 217 | return $this->oUtil->addAndApplyFilters( |
218 | 218 | $this, |
219 | 219 | array( |
220 | - 'field_' . $this->oProp->sClassName . $_sSectionPart . '_' . $aFieldset[ 'field_id' ] |
|
220 | + 'field_'.$this->oProp->sClassName.$_sSectionPart.'_'.$aFieldset[ 'field_id' ] |
|
221 | 221 | ), |
222 | 222 | $sFieldOutput, |
223 | 223 | $aFieldset // the field array |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * @since 2.1.0 |
61 | 61 | * @internal |
62 | 62 | */ |
63 | - protected function _setHelpTab( $sID, $sTitle, $aContents, $aSideBarContents=array() ) { |
|
63 | + protected function _setHelpTab( $sID, $sTitle, $aContents, $aSideBarContents = array() ) { |
|
64 | 64 | |
65 | 65 | if ( empty( $aContents ) ) { |
66 | 66 | return; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | ) |
78 | 78 | ); |
79 | 79 | |
80 | - if ( ! empty( $aSideBarContents ) ) { |
|
80 | + if ( !empty( $aSideBarContents ) ) { |
|
81 | 81 | $this->_oScreen->set_help_sidebar( implode( PHP_EOL, $aSideBarContents ) ); |
82 | 82 | } |
83 | 83 | |
@@ -89,6 +89,6 @@ discard block |
||
89 | 89 | * @internal |
90 | 90 | */ |
91 | 91 | protected function _formatHelpDescription( $sHelpDescription ) { |
92 | - return "<div class='contextual-help-description'>" . $sHelpDescription . "</div>"; |
|
92 | + return "<div class='contextual-help-description'>".$sHelpDescription."</div>"; |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | \ No newline at end of file |
@@ -36,19 +36,19 @@ discard block |
||
36 | 36 | |
37 | 37 | /* The system internal keys. */ |
38 | 38 | 'sSRC' => null, |
39 | - 'aPostTypes' => array(), // for meta box class |
|
39 | + 'aPostTypes' => array(), // for meta box class |
|
40 | 40 | 'sPageSlug' => null, |
41 | 41 | 'sTabSlug' => null, |
42 | - 'sType' => null, // script or style |
|
42 | + 'sType' => null, // script or style |
|
43 | 43 | |
44 | 44 | /* The below keys are for users. */ |
45 | 45 | 'handle_id' => null, |
46 | 46 | 'dependencies' => array(), |
47 | - 'version' => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value. |
|
48 | - 'translation' => array(), // only for scripts |
|
49 | - 'in_footer' => false, // only for scripts |
|
50 | - 'media' => 'all', // only for styles |
|
51 | - 'attributes' => array(), // 3.3.0+ - the attribute array |
|
47 | + 'version' => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value. |
|
48 | + 'translation' => array(), // only for scripts |
|
49 | + 'in_footer' => false, // only for scripts |
|
50 | + 'media' => 'all', // only for styles |
|
51 | + 'attributes' => array(), // 3.3.0+ - the attribute array |
|
52 | 52 | |
53 | 53 | ); |
54 | 54 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @remark This value should be overridden in an extended class. |
60 | 60 | * @internal |
61 | 61 | */ |
62 | - protected $_sClassSelector_Style = 'admin-page-framework-style'; |
|
62 | + protected $_sClassSelector_Style = 'admin-page-framework-style'; |
|
63 | 63 | |
64 | 64 | /** |
65 | 65 | * Stores the class selector used to the class-specific script. |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @remark This value should be overridden in an extended class. |
69 | 69 | * @internal |
70 | 70 | */ |
71 | - protected $_sClassSelector_Script = 'admin-page-framework-script'; |
|
71 | + protected $_sClassSelector_Script = 'admin-page-framework-script'; |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * Stores hand IDs by resource url to look up handle id and add custom arguments. |
@@ -142,8 +142,8 @@ discard block |
||
142 | 142 | * @internal |
143 | 143 | */ |
144 | 144 | |
145 | - public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) {} |
|
146 | - public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) {} |
|
145 | + public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) {} |
|
146 | + public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) {} |
|
147 | 147 | |
148 | 148 | /** |
149 | 149 | * A helper function for the _replyToEnqueueScripts() and the `_replyToEnqueueStyle()` methods. |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | } |
205 | 205 | |
206 | 206 | $_sAttributes = $this->getAttributes( $_aAttributes ); |
207 | - $_sModifiedURL = $sSanitizedURL . "' " . rtrim( $_sAttributes, "'\"" ); // '" |
|
207 | + $_sModifiedURL = $sSanitizedURL."' ".rtrim( $_sAttributes, "'\"" ); // '" |
|
208 | 208 | |
209 | 209 | return $_sModifiedURL; |
210 | 210 | |
@@ -252,19 +252,19 @@ discard block |
||
252 | 252 | */ |
253 | 253 | private function _getStyleTag( $oCaller, $sIDPrefix ) { |
254 | 254 | |
255 | - $_sStyle = $this->addAndApplyFilters( |
|
255 | + $_sStyle = $this->addAndApplyFilters( |
|
256 | 256 | $oCaller, |
257 | 257 | array( |
258 | - "style_common_admin_page_framework", // 3.2.1+ |
|
258 | + "style_common_admin_page_framework", // 3.2.1+ |
|
259 | 259 | "style_common_{$this->oProp->sClassName}", |
260 | 260 | ), |
261 | 261 | AdminPageFramework_CSS::getDefaultCSS() |
262 | 262 | ); |
263 | - $_sStyle = $this->isDebugMode() |
|
263 | + $_sStyle = $this->isDebugMode() |
|
264 | 264 | ? trim( $_sStyle ) |
265 | 265 | : $this->minifyCSS( $_sStyle ); |
266 | 266 | if ( $_sStyle ) { |
267 | - echo "<style type='text/css' id='" . esc_attr( $sIDPrefix ) . "'>" |
|
267 | + echo "<style type='text/css' id='".esc_attr( $sIDPrefix )."'>" |
|
268 | 268 | . $_sStyle |
269 | 269 | . "</style>"; |
270 | 270 | } |
@@ -278,20 +278,20 @@ discard block |
||
278 | 278 | */ |
279 | 279 | private function _getIEStyleTag( $oCaller, $sIDPrefix ) { |
280 | 280 | |
281 | - $_sStyleIE = $this->addAndApplyFilters( |
|
281 | + $_sStyleIE = $this->addAndApplyFilters( |
|
282 | 282 | $oCaller, |
283 | 283 | array( |
284 | - "style_ie_common_admin_page_framework", // 3.2.1+ |
|
284 | + "style_ie_common_admin_page_framework", // 3.2.1+ |
|
285 | 285 | "style_ie_common_{$this->oProp->sClassName}", |
286 | 286 | ), |
287 | 287 | AdminPageFramework_CSS::getDefaultCSSIE() |
288 | 288 | ); |
289 | 289 | |
290 | - $_sStyleIE = $this->isDebugMode() |
|
290 | + $_sStyleIE = $this->isDebugMode() |
|
291 | 291 | ? trim( $_sStyleIE ) |
292 | 292 | : $this->minifyCSS( $_sStyleIE ); |
293 | 293 | return $_sStyleIE |
294 | - ? "<!--[if IE]><style type='text/css' id='" . esc_attr( $sIDPrefix . "-ie" ) . "'>" |
|
294 | + ? "<!--[if IE]><style type='text/css' id='".esc_attr( $sIDPrefix."-ie" )."'>" |
|
295 | 295 | . $_sStyleIE |
296 | 296 | . "</style><![endif]-->" |
297 | 297 | : ''; |
@@ -324,14 +324,14 @@ discard block |
||
324 | 324 | $_sScript = $this->addAndApplyFilters( |
325 | 325 | $this->oProp->_getCallerObject(), |
326 | 326 | array( |
327 | - "script_common_admin_page_framework", // 3.2.1+ |
|
327 | + "script_common_admin_page_framework", // 3.2.1+ |
|
328 | 328 | "script_common_{$this->oProp->sClassName}", |
329 | 329 | ), |
330 | 330 | AdminPageFramework_Property_Base::$_sDefaultScript |
331 | 331 | ); |
332 | 332 | $_sScript = trim( $_sScript ); |
333 | 333 | if ( $_sScript ) { |
334 | - echo "<script type='text/javascript' id='" . esc_attr( $sIDPrefix ) . "'>" |
|
334 | + echo "<script type='text/javascript' id='".esc_attr( $sIDPrefix )."'>" |
|
335 | 335 | . $_sScript |
336 | 336 | . "</script>"; |
337 | 337 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | */ |
349 | 349 | protected function _printClassSpecificStyles( $sIDPrefix ) { |
350 | 350 | |
351 | - $_oCaller = $this->oProp->_getCallerObject(); |
|
351 | + $_oCaller = $this->oProp->_getCallerObject(); |
|
352 | 352 | echo $this->_getClassSpecificStyleTag( $_oCaller, $sIDPrefix ); |
353 | 353 | echo $this->_getClassSpecificIEStyleTag( $_oCaller, $sIDPrefix ); |
354 | 354 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | ? trim( $_sStyle ) |
377 | 377 | : $this->minifyCSS( $_sStyle ); |
378 | 378 | if ( $_sStyle ) { |
379 | - return "<style type='text/css' id='" . esc_attr( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" ) . "'>" |
|
379 | + return "<style type='text/css' id='".esc_attr( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" )."'>" |
|
380 | 380 | . $_sStyle |
381 | 381 | . "</style>"; |
382 | 382 | $_iCallCount++; |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | ? trim( $_sStyleIE ) |
403 | 403 | : $this->minifyCSS( $_sStyleIE ); |
404 | 404 | if ( $_sStyleIE ) { |
405 | - return "<!--[if IE]><style type='text/css' id='" . esc_attr( "{$sIDPrefix}-ie-{$this->oProp->sClassName}_{$_iCallCountIE}" ) . "'>" |
|
405 | + return "<!--[if IE]><style type='text/css' id='".esc_attr( "{$sIDPrefix}-ie-{$this->oProp->sClassName}_{$_iCallCountIE}" )."'>" |
|
406 | 406 | . $_sStyleIE |
407 | 407 | . "</style><![endif]-->"; |
408 | 408 | $_iCallCountIE++; |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | ); |
431 | 431 | $_sScript = trim( $_sScript ); |
432 | 432 | if ( $_sScript ) { |
433 | - echo "<script type='text/javascript' id='" . esc_attr( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" ) . "'>" |
|
433 | + echo "<script type='text/javascript' id='".esc_attr( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" )."'>" |
|
434 | 434 | . $_sScript |
435 | 435 | . "</script>"; |
436 | 436 | $_iCallCount++; |
@@ -454,12 +454,12 @@ discard block |
||
454 | 454 | public function _replyToAddStyle() { |
455 | 455 | |
456 | 456 | $_oCaller = $this->oProp->_getCallerObject(); |
457 | - if ( ! $_oCaller->_isInThePage() ) { |
|
457 | + if ( !$_oCaller->_isInThePage() ) { |
|
458 | 458 | return; |
459 | 459 | } |
460 | 460 | |
461 | 461 | $this->_printCommonStyles( 'admin-page-framework-style-common', get_class() ); |
462 | - $this->_printClassSpecificStyles( $this->_sClassSelector_Style . '-' . $this->oProp->sStructureType ); |
|
462 | + $this->_printClassSpecificStyles( $this->_sClassSelector_Style.'-'.$this->oProp->sStructureType ); |
|
463 | 463 | |
464 | 464 | } |
465 | 465 | /** |
@@ -474,12 +474,12 @@ discard block |
||
474 | 474 | public function _replyToAddScript() { |
475 | 475 | |
476 | 476 | $_oCaller = $this->oProp->_getCallerObject(); |
477 | - if ( ! $_oCaller->_isInThePage() ) { |
|
477 | + if ( !$_oCaller->_isInThePage() ) { |
|
478 | 478 | return; |
479 | 479 | } |
480 | 480 | |
481 | 481 | $this->_printCommonScripts( 'admin-page-framework-script-common', get_class() ); |
482 | - $this->_printClassSpecificScripts( $this->_sClassSelector_Script . '-' . $this->oProp->sStructureType ); |
|
482 | + $this->_printClassSpecificScripts( $this->_sClassSelector_Script.'-'.$this->oProp->sStructureType ); |
|
483 | 483 | |
484 | 484 | } |
485 | 485 | |
@@ -494,28 +494,28 @@ discard block |
||
494 | 494 | protected function _enqueueSRC( $aEnqueueItem ) { |
495 | 495 | |
496 | 496 | // For styles |
497 | - if ( 'style' === $aEnqueueItem['sType'] ) { |
|
497 | + if ( 'style' === $aEnqueueItem[ 'sType' ] ) { |
|
498 | 498 | wp_enqueue_style( |
499 | - $aEnqueueItem['handle_id'], |
|
500 | - $aEnqueueItem['sSRC'], |
|
501 | - $aEnqueueItem['dependencies'], |
|
502 | - $aEnqueueItem['version'], |
|
503 | - $aEnqueueItem['media'] |
|
499 | + $aEnqueueItem[ 'handle_id' ], |
|
500 | + $aEnqueueItem[ 'sSRC' ], |
|
501 | + $aEnqueueItem[ 'dependencies' ], |
|
502 | + $aEnqueueItem[ 'version' ], |
|
503 | + $aEnqueueItem[ 'media' ] |
|
504 | 504 | ); |
505 | 505 | return; |
506 | 506 | } |
507 | 507 | |
508 | 508 | // For scripts |
509 | 509 | wp_enqueue_script( |
510 | - $aEnqueueItem['handle_id'], |
|
511 | - $aEnqueueItem['sSRC'], |
|
512 | - $aEnqueueItem['dependencies'], |
|
513 | - $aEnqueueItem['version'], |
|
514 | - did_action( 'admin_body_class' ) ? true : $aEnqueueItem['in_footer'] |
|
510 | + $aEnqueueItem[ 'handle_id' ], |
|
511 | + $aEnqueueItem[ 'sSRC' ], |
|
512 | + $aEnqueueItem[ 'dependencies' ], |
|
513 | + $aEnqueueItem[ 'version' ], |
|
514 | + did_action( 'admin_body_class' ) ? true : $aEnqueueItem[ 'in_footer' ] |
|
515 | 515 | ); |
516 | 516 | |
517 | - if ( $aEnqueueItem['translation'] ) { |
|
518 | - wp_localize_script( $aEnqueueItem['handle_id'], $aEnqueueItem['handle_id'], $aEnqueueItem['translation'] ); |
|
517 | + if ( $aEnqueueItem[ 'translation' ] ) { |
|
518 | + wp_localize_script( $aEnqueueItem[ 'handle_id' ], $aEnqueueItem[ 'handle_id' ], $aEnqueueItem[ 'translation' ] ); |
|
519 | 519 | } |
520 | 520 | |
521 | 521 | } |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | * @internal |
532 | 532 | */ |
533 | 533 | public function _replyToEnqueueStyles() { |
534 | - foreach( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) { |
|
534 | + foreach ( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) { |
|
535 | 535 | $this->_enqueueSRCByCondition( $_aEnqueuingStyle ); |
536 | 536 | unset( $this->oProp->aEnqueuingStyles[ $_sKey ] ); |
537 | 537 | } |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | * @internal |
549 | 549 | */ |
550 | 550 | public function _replyToEnqueueScripts() { |
551 | - foreach( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) { |
|
551 | + foreach ( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) { |
|
552 | 552 | $this->_enqueueSRCByCondition( $_aEnqueuingScript ); |
553 | 553 | unset( $this->oProp->aEnqueuingScripts[ $_sKey ] ); |
554 | 554 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $_aParameters = func_get_args() + array( |
36 | 36 | $this->aSubject, |
37 | 37 | ); |
38 | - $this->aSubject = $_aParameters[ 0 ]; |
|
38 | + $this->aSubject = $_aParameters[ 0 ]; |
|
39 | 39 | |
40 | 40 | } |
41 | 41 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * If accessed from a console, include the registry class to laod 'AdminPageFramework_Registry_Base'. |
12 | 12 | */ |
13 | 13 | if ( php_sapi_name() === 'cli' ) { |
14 | - $_sFrameworkFilePath = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/admin-page-framework.php'; |
|
14 | + $_sFrameworkFilePath = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ).'/admin-page-framework.php'; |
|
15 | 15 | if ( file_exists( $_sFrameworkFilePath ) ) { |
16 | 16 | include_once( $_sFrameworkFilePath ); |
17 | 17 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @deprecated 3.2.0 |
147 | 147 | * @internal |
148 | 148 | */ |
149 | - public static $_sDefaultStyle =""; |
|
149 | + public static $_sDefaultStyle = ""; |
|
150 | 150 | |
151 | 151 | /** |
152 | 152 | * The default CSS rules for IE loaded in the head tag of the created admin pages. |
@@ -331,13 +331,13 @@ discard block |
||
331 | 331 | */ |
332 | 332 | public $aFormCallbacks = array( |
333 | 333 | |
334 | - 'hfID' => null, // the input id attribute |
|
335 | - 'hfTagID' => null, // the field container id attribute |
|
336 | - 'hfName' => null, // the field name attribute |
|
337 | - 'hfNameFlat' => null, // the flat field name attribute |
|
338 | - 'hfInputName' => null, // 3.6.0+ the field input name attribute |
|
339 | - 'hfInputNameFlat' => null, // 3.6.0+ the flat field input name |
|
340 | - 'hfClass' => null, // the class attribute |
|
334 | + 'hfID' => null, // the input id attribute |
|
335 | + 'hfTagID' => null, // the field container id attribute |
|
336 | + 'hfName' => null, // the field name attribute |
|
337 | + 'hfNameFlat' => null, // the flat field name attribute |
|
338 | + 'hfInputName' => null, // 3.6.0+ the field input name attribute |
|
339 | + 'hfInputNameFlat' => null, // 3.6.0+ the flat field input name |
|
340 | + 'hfClass' => null, // the class attribute |
|
341 | 341 | ); |
342 | 342 | |
343 | 343 | /** |
@@ -358,12 +358,12 @@ discard block |
||
358 | 358 | 'manage_options', |
359 | 359 | $sCapability |
360 | 360 | ); |
361 | - $this->sTextDomain = $this->getAOrB( |
|
361 | + $this->sTextDomain = $this->getAOrB( |
|
362 | 362 | empty( $sTextDomain ), |
363 | 363 | 'admin-page-framework', |
364 | 364 | $sTextDomain |
365 | 365 | ); |
366 | - $this->sStructureType = $sStructureType; |
|
366 | + $this->sStructureType = $sStructureType; |
|
367 | 367 | |
368 | 368 | $GLOBALS[ 'aAdminPageFramework' ] = $this->getElementAsArray( |
369 | 369 | $GLOBALS, |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | |
378 | 378 | $this->aFormArguments = array( |
379 | 379 | 'caller_id' => $this->sClassName, |
380 | - 'structure_type' => $this->_sPropertyType, // @todo change this to admin_page |
|
380 | + 'structure_type' => $this->_sPropertyType, // @todo change this to admin_page |
|
381 | 381 | 'action_hook_form_registration' => $this->_sFormRegistrationHook, |
382 | 382 | ) + $this->aFormArguments; |
383 | 383 | |
@@ -413,8 +413,8 @@ discard block |
||
413 | 413 | 'hfTagID' => array( $oCaller, '_replyToGetInputTagIDAttribute' ), // the fields & fieldset & field row container id attribute |
414 | 414 | 'hfName' => array( $oCaller, '_replyToGetFieldNameAttribute' ), // the input name attribute |
415 | 415 | 'hfNameFlat' => array( $oCaller, '_replyToGetFlatFieldName' ), // the flat input name attribute |
416 | - 'hfInputName' => array( $oCaller, '_replyToGetInputNameAttribute' ), // 3.6.0+ the field input name attribute |
|
417 | - 'hfInputNameFlat' => array( $oCaller, '_replyToGetFlatInputName' ), // 3.6.0+ the flat field input name |
|
416 | + 'hfInputName' => array( $oCaller, '_replyToGetInputNameAttribute' ), // 3.6.0+ the field input name attribute |
|
417 | + 'hfInputNameFlat' => array( $oCaller, '_replyToGetFlatInputName' ), // 3.6.0+ the flat field input name |
|
418 | 418 | 'hfClass' => array( $oCaller, '_replyToGetInputClassAttribute' ), // the class attribute |
419 | 419 | 'hfSectionName' => array( $oCaller, '_replyToGetSectionName' ), // 3.6.0+ |
420 | 420 | ) + $this->aFormCallbacks; |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | * @since DEVVER |
428 | 428 | */ |
429 | 429 | private function _setDeprecated() { |
430 | - $this->oUtil = new AdminPageFramework_WPUtility; |
|
430 | + $this->oUtil = new AdminPageFramework_WPUtility; |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | /** |
@@ -496,19 +496,19 @@ discard block |
||
496 | 496 | * @remark The information can be used to embed into the footer etc. |
497 | 497 | * @return array The information of the script. |
498 | 498 | */ |
499 | - protected function getCallerInfo( $sCallerPath=null ) { |
|
499 | + protected function getCallerInfo( $sCallerPath = null ) { |
|
500 | 500 | |
501 | 501 | $_aCallerInfo = self::$_aStructure_CallerInfo; |
502 | - $_aCallerInfo['sPath'] = $sCallerPath; |
|
503 | - $_aCallerInfo['sType'] = $this->_getCallerType( $_aCallerInfo['sPath'] ); |
|
502 | + $_aCallerInfo[ 'sPath' ] = $sCallerPath; |
|
503 | + $_aCallerInfo[ 'sType' ] = $this->_getCallerType( $_aCallerInfo[ 'sPath' ] ); |
|
504 | 504 | |
505 | - if ( 'unknown' == $_aCallerInfo['sType'] ) { |
|
505 | + if ( 'unknown' == $_aCallerInfo[ 'sType' ] ) { |
|
506 | 506 | return $_aCallerInfo; |
507 | 507 | } |
508 | - if ( 'plugin' == $_aCallerInfo['sType'] ) { |
|
509 | - return $this->getScriptData( $_aCallerInfo['sPath'], $_aCallerInfo['sType'] ) + $_aCallerInfo; |
|
508 | + if ( 'plugin' == $_aCallerInfo[ 'sType' ] ) { |
|
509 | + return $this->getScriptData( $_aCallerInfo[ 'sPath' ], $_aCallerInfo[ 'sType' ] ) + $_aCallerInfo; |
|
510 | 510 | } |
511 | - if ( 'theme' == $_aCallerInfo['sType'] ) { |
|
511 | + if ( 'theme' == $_aCallerInfo[ 'sType' ] ) { |
|
512 | 512 | $_oTheme = wp_get_theme(); // stores the theme info object |
513 | 513 | return array( |
514 | 514 | 'sName' => $_oTheme->Name, |
@@ -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 | } |