@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function construct() { |
30 | 30 | |
31 | 31 | add_filter( |
32 | - 'options_' . $this->aArguments[ 'caller_id' ], |
|
32 | + 'options_'.$this->aArguments[ 'caller_id' ], |
|
33 | 33 | array( $this, '_replyToSanitizeSavedFormData' ), |
34 | 34 | 5 // high priority as it must be done earlier |
35 | 35 | ); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | // Extract the meta box field form data (options) from the page form data (options). |
55 | 55 | return $this->castArrayContents( |
56 | - $this->getDataStructureFromAddedFieldsets(), // form data structure generate from fieldsets |
|
56 | + $this->getDataStructureFromAddedFieldsets(), // form data structure generate from fieldsets |
|
57 | 57 | $aSavedFormData |
58 | 58 | ); |
59 | 59 |
@@ -23,12 +23,12 @@ |
||
23 | 23 | * @since 3.0.0 |
24 | 24 | * @deprecated 3.7.0 Use `AdminPageFramework_PageMetaBox` instead. |
25 | 25 | */ |
26 | - public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs=array(), $sContext='normal', $sPriority='default', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
26 | + public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs = array(), $sContext = 'normal', $sPriority = 'default', $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
27 | 27 | |
28 | 28 | parent::__construct( $sMetaBoxID, $sTitle, $asPageSlugs, $sContext, $sPriority, $sCapability, $sTextDomain ); |
29 | 29 | |
30 | 30 | $this->oUtil->showDeprecationNotice( |
31 | - 'The class, ' . __CLASS__ . ',', // deprecated item |
|
31 | + 'The class, '.__CLASS__.',', // deprecated item |
|
32 | 32 | 'AdminPageFramework_PageMetaBox' // alternative |
33 | 33 | ); |
34 | 34 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | return "{$_aField['field_id']}{$_sKey}"; |
69 | 69 | } |
70 | 70 | |
71 | - /** |
|
71 | + /** |
|
72 | 72 | * Adds input fields |
73 | 73 | * |
74 | 74 | * @internal |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | '', |
48 | 48 | "[{$_sKey}]" |
49 | 49 | ); |
50 | - return $_aField['field_id'] . $_sKey; |
|
50 | + return $_aField[ 'field_id' ].$_sKey; |
|
51 | 51 | |
52 | 52 | } |
53 | 53 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | '', |
66 | 66 | "|{$_sKey}" |
67 | 67 | ); |
68 | - return "{$_aField['field_id']}{$_sKey}"; |
|
68 | + return "{$_aField[ 'field_id' ]}{$_sKey}"; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $_aOutput = array(); |
116 | 116 | |
117 | 117 | // Set nonce. |
118 | - $_aOutput[] = wp_nonce_field( |
|
118 | + $_aOutput[ ] = wp_nonce_field( |
|
119 | 119 | $this->oProp->sClassHash, |
120 | 120 | $this->oProp->sClassHash, |
121 | 121 | true, |
@@ -126,17 +126,17 @@ discard block |
||
126 | 126 | $this->_setOptionArray( $iTermID, $this->oProp->sOptionKey ); |
127 | 127 | |
128 | 128 | // Get the field outputs |
129 | - $_aOutput[] = $this->oForm->get( $bRenderTableRow ); |
|
129 | + $_aOutput[ ] = $this->oForm->get( $bRenderTableRow ); |
|
130 | 130 | |
131 | 131 | // Filter the output |
132 | 132 | $_sOutput = $this->oUtil->addAndApplyFilters( |
133 | 133 | $this, |
134 | - 'content_' . $this->oProp->sClassName, |
|
134 | + 'content_'.$this->oProp->sClassName, |
|
135 | 135 | $this->content( implode( PHP_EOL, $_aOutput ) ) |
136 | 136 | ); |
137 | 137 | |
138 | 138 | // Do action |
139 | - $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this ); |
|
139 | + $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this ); |
|
140 | 140 | |
141 | 141 | return $_sOutput; |
142 | 142 |
@@ -19,22 +19,22 @@ |
||
19 | 19 | abstract class AdminPageFramework_Widget_Controller extends AdminPageFramework_Widget_View { |
20 | 20 | |
21 | 21 | /** |
22 | - * The method for necessary set-ups. |
|
23 | - * |
|
24 | - * <h4>Example</h4> |
|
25 | - * <code> |
|
26 | - * public function setUp() { |
|
27 | - * $this->setArguments( |
|
28 | - * array( |
|
29 | - * 'description' => __( 'This is a sample widget with built-in field types created by Admin Page Framework.', 'admin-page-framework-demo' ), |
|
30 | - * ) |
|
31 | - * ); |
|
32 | - * } |
|
33 | - * </code> |
|
34 | - * |
|
35 | - * @abstract |
|
36 | - * @since 3.2.0 |
|
37 | - */ |
|
22 | + * The method for necessary set-ups. |
|
23 | + * |
|
24 | + * <h4>Example</h4> |
|
25 | + * <code> |
|
26 | + * public function setUp() { |
|
27 | + * $this->setArguments( |
|
28 | + * array( |
|
29 | + * 'description' => __( 'This is a sample widget with built-in field types created by Admin Page Framework.', 'admin-page-framework-demo' ), |
|
30 | + * ) |
|
31 | + * ); |
|
32 | + * } |
|
33 | + * </code> |
|
34 | + * |
|
35 | + * @abstract |
|
36 | + * @since 3.2.0 |
|
37 | + */ |
|
38 | 38 | public function setUp() {} |
39 | 39 | |
40 | 40 | /** |
@@ -131,7 +131,7 @@ |
||
131 | 131 | * @see https://codex.wordpress.org/Function_Reference/wp_register_sidebar_widget |
132 | 132 | * @return void |
133 | 133 | */ |
134 | - protected function setArguments( array $aArguments=array() ) { |
|
134 | + protected function setArguments( array $aArguments = array() ) { |
|
135 | 135 | $this->oProp->aWidgetArguments = $aArguments; |
136 | 136 | } |
137 | 137 |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | |
37 | 37 | if ( $this->oProp->bIsAdmin ) { |
38 | 38 | add_filter( |
39 | - 'validation_' . $this->oProp->sClassName, |
|
39 | + 'validation_'.$this->oProp->sClassName, |
|
40 | 40 | array( $this, '_replyToSortInputs' ), |
41 | - 1, // set a high priority |
|
41 | + 1, // set a high priority |
|
42 | 42 | 3 // number of parameters |
43 | 43 | ); |
44 | 44 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function _replyToRegisterWidget() { |
110 | 110 | |
111 | - if ( ! is_object( $GLOBALS[ 'wp_widget_factory' ] ) ) { |
|
111 | + if ( !is_object( $GLOBALS[ 'wp_widget_factory' ] ) ) { |
|
112 | 112 | return; |
113 | 113 | } |
114 | 114 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * @param integer $iDepth The header number to parse. |
38 | 38 | * @param string $sTitle The heading title which appears at the beginning of the output. |
39 | 39 | */ |
40 | - public function __construct( $sHTML, $iDepth=4, $sTitle='' ) { |
|
40 | + public function __construct( $sHTML, $iDepth = 4, $sTitle = '' ) { |
|
41 | 41 | |
42 | 42 | $this->sTitle = $sTitle; |
43 | 43 | $this->sHTML = $sHTML; |
@@ -75,26 +75,26 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function getTOC() { |
77 | 77 | |
78 | - $iDepth = $this->iDepth; |
|
78 | + $iDepth = $this->iDepth; |
|
79 | 79 | |
80 | 80 | // get the headings down to the specified depth |
81 | 81 | $this->sHTML = preg_replace_callback( |
82 | - '/<h[2-' . $iDepth . ']*[^>]*>.*?<\/h[2-' . $iDepth . ']>/i', |
|
82 | + '/<h[2-'.$iDepth.']*[^>]*>.*?<\/h[2-'.$iDepth.']>/i', |
|
83 | 83 | array( $this, '_replyToInsertNamedElement' ), |
84 | 84 | $this->sHTML |
85 | 85 | ); |
86 | 86 | |
87 | 87 | $_aOutput = array(); |
88 | - foreach( $this->_aMatches as $_iIndex => $_sMatch ) { |
|
88 | + foreach ( $this->_aMatches as $_iIndex => $_sMatch ) { |
|
89 | 89 | $_sMatch = strip_tags( $_sMatch, '<h1><h2><h3><h4><h5><h6><h7><h8>' ); |
90 | - $_sMatch = preg_replace( '/<h([1-' . $iDepth . '])>/', '<li class="toc$1"><a href="#toc_' . $_iIndex . '">', $_sMatch ); |
|
91 | - $_sMatch = preg_replace( '/<\/h[1-' . $iDepth . ']>/', '</a></li>', $_sMatch ); |
|
92 | - $_aOutput[] = $_sMatch; |
|
90 | + $_sMatch = preg_replace( '/<h([1-'.$iDepth.'])>/', '<li class="toc$1"><a href="#toc_'.$_iIndex.'">', $_sMatch ); |
|
91 | + $_sMatch = preg_replace( '/<\/h[1-'.$iDepth.']>/', '</a></li>', $_sMatch ); |
|
92 | + $_aOutput[ ] = $_sMatch; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | // plug the results into appropriate HTML tags |
96 | 96 | $this->sTitle = $this->sTitle |
97 | - ? '<p class="toc-title">' . $this->sTitle . '</p>' |
|
97 | + ? '<p class="toc-title">'.$this->sTitle.'</p>' |
|
98 | 98 | : ''; |
99 | 99 | return '<div class="toc">' |
100 | 100 | . $this->sTitle |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | public function _replyToInsertNamedElement( $aMatches ) { |
112 | 112 | static $_icount = -1; |
113 | 113 | $_icount++; |
114 | - $this->_aMatches[] = $aMatches[ 0 ]; |
|
115 | - return "<span class='toc_header_link' id='toc_{$_icount}'></span>" . PHP_EOL |
|
114 | + $this->_aMatches[ ] = $aMatches[ 0 ]; |
|
115 | + return "<span class='toc_header_link' id='toc_{$_icount}'></span>".PHP_EOL |
|
116 | 116 | . $aMatches[ 0 ]; |
117 | 117 | } |
118 | 118 | /**#@-*/ |
@@ -349,7 +349,7 @@ |
||
349 | 349 | ? "<strong>" . $this->_sScriptName . "</strong>: " |
350 | 350 | : ''; |
351 | 351 | return $_sScripTitle |
352 | - . implode( '<br />', $_aWarnings ); |
|
352 | + . implode( '<br />', $_aWarnings ); |
|
353 | 353 | |
354 | 354 | } |
355 | 355 |
@@ -135,12 +135,12 @@ discard block |
||
135 | 135 | * </ul> |
136 | 136 | * @param string $sScriptName The script name. |
137 | 137 | */ |
138 | - public function __construct( array $aRequirements=array(), $sScriptName='' ) { |
|
138 | + public function __construct( array $aRequirements = array(), $sScriptName = '' ) { |
|
139 | 139 | |
140 | 140 | // Avoid undefined index warnings. |
141 | 141 | $aRequirements = $aRequirements + $this->_aDefaultRequirements; |
142 | 142 | $aRequirements = array_filter( $aRequirements, 'is_array' ); |
143 | - foreach( array( 'php', 'mysql', 'wordpress' ) as $_iIndex => $_sName ) { |
|
143 | + foreach ( array( 'php', 'mysql', 'wordpress' ) as $_iIndex => $_sName ) { |
|
144 | 144 | if ( isset( $aRequirements[ $_sName ] ) ) { |
145 | 145 | $aRequirements[ $_sName ] = $aRequirements[ $_sName ] + $this->_aDefaultRequirements[ $_sName ]; |
146 | 146 | } |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | $_aWarnings = array(); |
166 | 166 | |
167 | 167 | // PHP, WordPress, MySQL |
168 | - $_aWarnings[] = $this->_getWarningByType( 'php' ); |
|
169 | - $_aWarnings[] = $this->_getWarningByType( 'wordpress' ); |
|
170 | - $_aWarnings[] = $this->_getWarningByType( 'mysql' ); |
|
168 | + $_aWarnings[ ] = $this->_getWarningByType( 'php' ); |
|
169 | + $_aWarnings[ ] = $this->_getWarningByType( 'wordpress' ); |
|
170 | + $_aWarnings[ ] = $this->_getWarningByType( 'mysql' ); |
|
171 | 171 | |
172 | 172 | // Ensure necessary array elements. |
173 | 173 | $this->_aRequirements = $this->_aRequirements + array( |
@@ -180,10 +180,10 @@ discard block |
||
180 | 180 | // Check the rest. |
181 | 181 | $_aWarnings = array_merge( |
182 | 182 | $_aWarnings, |
183 | - $this->_checkFunctions( $this->_aRequirements['functions'] ), |
|
184 | - $this->_checkClasses( $this->_aRequirements['classes'] ), |
|
185 | - $this->_checkConstants( $this->_aRequirements['constants'] ), |
|
186 | - $this->_checkFiles( $this->_aRequirements['files'] ) |
|
183 | + $this->_checkFunctions( $this->_aRequirements[ 'functions' ] ), |
|
184 | + $this->_checkClasses( $this->_aRequirements[ 'classes' ] ), |
|
185 | + $this->_checkConstants( $this->_aRequirements[ 'constants' ] ), |
|
186 | + $this->_checkFiles( $this->_aRequirements[ 'files' ] ) |
|
187 | 187 | ); |
188 | 188 | |
189 | 189 | $this->aWarnings = array_filter( $_aWarnings ); // drop empty elements. |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | * @return string The warning. |
198 | 198 | */ |
199 | 199 | private function _getWarningByType( $sType ) { |
200 | - if ( ! isset( $this->_aRequirements[ $sType ][ 'version' ] ) ) { |
|
200 | + if ( !isset( $this->_aRequirements[ $sType ][ 'version' ] ) ) { |
|
201 | 201 | return ''; |
202 | 202 | } |
203 | 203 | if ( $this->_checkPHPVersion( $this->_aRequirements[ $sType ][ 'version' ] ) ) { |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | * @internal |
227 | 227 | */ |
228 | 228 | private function _checkWordPressVersion( $sWordPressVersion ) { |
229 | - return version_compare( $GLOBALS['wp_version'], $sWordPressVersion, ">=" ); |
|
229 | + return version_compare( $GLOBALS[ 'wp_version' ], $sWordPressVersion, ">=" ); |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
@@ -298,9 +298,9 @@ discard block |
||
298 | 298 | */ |
299 | 299 | private function _getWarningsByFunctionName( $sFuncName, $aSubjects ) { |
300 | 300 | $_aWarnings = array(); |
301 | - foreach( $aSubjects as $_sSubject => $_sWarning ) { |
|
302 | - if ( ! call_user_func_array( $sFuncName, array( $_sSubject ) ) ) { |
|
303 | - $_aWarnings[] = sprintf( $_sWarning, $_sSubject ); |
|
301 | + foreach ( $aSubjects as $_sSubject => $_sWarning ) { |
|
302 | + if ( !call_user_func_array( $sFuncName, array( $_sSubject ) ) ) { |
|
303 | + $_aWarnings[ ] = sprintf( $_sWarning, $_sSubject ); |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | return $_aWarnings; |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | */ |
323 | 323 | public function _replyToPrintAdminNotices() { |
324 | 324 | |
325 | - $_aWarnings = array_unique( $this->aWarnings ); |
|
325 | + $_aWarnings = array_unique( $this->aWarnings ); |
|
326 | 326 | if ( empty( $_aWarnings ) ) { |
327 | 327 | return; |
328 | 328 | } |
@@ -341,12 +341,12 @@ discard block |
||
341 | 341 | */ |
342 | 342 | private function _getWarnings() { |
343 | 343 | |
344 | - $_aWarnings = array_unique( $this->aWarnings ); |
|
344 | + $_aWarnings = array_unique( $this->aWarnings ); |
|
345 | 345 | if ( empty( $_aWarnings ) ) { |
346 | 346 | return ''; |
347 | 347 | } |
348 | - $_sScripTitle = $this->_sScriptName |
|
349 | - ? "<strong>" . $this->_sScriptName . "</strong>: " |
|
348 | + $_sScripTitle = $this->_sScriptName |
|
349 | + ? "<strong>".$this->_sScriptName."</strong>: " |
|
350 | 350 | : ''; |
351 | 351 | return $_sScripTitle |
352 | 352 | . implode( '<br />', $_aWarnings ); |
@@ -361,12 +361,12 @@ discard block |
||
361 | 361 | * @param boolean $bIsOnActivation Whether it is called upon plugin activation hook. |
362 | 362 | * @return void |
363 | 363 | */ |
364 | - public function deactivatePlugin( $sPluginFilePath, $sMessage='', $bIsOnActivation=false ) { |
|
364 | + public function deactivatePlugin( $sPluginFilePath, $sMessage = '', $bIsOnActivation = false ) { |
|
365 | 365 | |
366 | 366 | add_action( 'admin_notices', array( $this, '_replyToPrintAdminNotices' ) ); |
367 | - $this->aWarnings[] = '<strong>' . $sMessage . '</strong>'; |
|
368 | - if ( ! function_exists( 'deactivate_plugins' ) ) { |
|
369 | - if ( ! @include( ABSPATH . 'wp-admin/includes/plugin.php' ) ) { |
|
367 | + $this->aWarnings[ ] = '<strong>'.$sMessage.'</strong>'; |
|
368 | + if ( !function_exists( 'deactivate_plugins' ) ) { |
|
369 | + if ( !@include( ABSPATH.'wp-admin/includes/plugin.php' ) ) { |
|
370 | 370 | return; |
371 | 371 | } |
372 | 372 | } |
@@ -376,8 +376,8 @@ discard block |
||
376 | 376 | // Before that, we can display messages to the user. |
377 | 377 | if ( $bIsOnActivation ) { |
378 | 378 | |
379 | - $_sPluginListingPage = add_query_arg( array(), $GLOBALS['pagenow'] ); |
|
380 | - wp_die( $this->_getWarnings() . "<p><a href='$_sPluginListingPage'>Go back</a>.</p>" ); |
|
379 | + $_sPluginListingPage = add_query_arg( array(), $GLOBALS[ 'pagenow' ] ); |
|
380 | + wp_die( $this->_getWarnings()."<p><a href='$_sPluginListingPage'>Go back</a>.</p>" ); |
|
381 | 381 | |
382 | 382 | } |
383 | 383 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @since 3.5.0 |
97 | 97 | * @since 3.6.0 Made it accept string content to be passed to the first parameter. |
98 | 98 | */ |
99 | - public function __construct( $sFilePathOrContent='', array $aReplacements=array(), array $aCallbacks=array() ) { |
|
99 | + public function __construct( $sFilePathOrContent = '', array $aReplacements = array(), array $aCallbacks = array() ) { |
|
100 | 100 | |
101 | 101 | $this->sText = file_exists( $sFilePathOrContent ) |
102 | 102 | ? file_get_contents( $sFilePathOrContent ) |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | '/^[\s]*==[\s]*(.+?)[\s]*==/m', |
133 | 133 | $sText, |
134 | 134 | -1, |
135 | - PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY |
|
135 | + PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY |
|
136 | 136 | ); |
137 | 137 | return $_aSections; |
138 | 138 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @since 3.5.0 |
144 | 144 | * @return string |
145 | 145 | */ |
146 | - public function get( $sSectionName='' ) { |
|
146 | + public function get( $sSectionName = '' ) { |
|
147 | 147 | return $sSectionName |
148 | 148 | ? $this->getSection( $sSectionName ) |
149 | 149 | : $this->_getParsedText( $this->sText ); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | public function _replyToReplaceCodeBlocks( $aMatches ) { |
207 | 207 | |
208 | - if ( ! isset( $aMatches[ 1 ] ) ) { |
|
208 | + if ( !isset( $aMatches[ 1 ] ) ) { |
|
209 | 209 | return $aMatches[ 0 ]; |
210 | 210 | } |
211 | 211 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | */ |
229 | 229 | public function getRawSection( $sSectionName ) { |
230 | 230 | |
231 | - $_iIndex = array_search( $sSectionName, $this->_aSections ); |
|
231 | + $_iIndex = array_search( $sSectionName, $this->_aSections ); |
|
232 | 232 | return false === $_iIndex |
233 | 233 | ? '' |
234 | 234 | : trim( $this->_aSections[ $_iIndex + 1 ] ); |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | // If <?php notation is missing, highlight_string() will not highlight the syntax so add it. |
249 | 249 | $_bHasPHPTag = "<?php" === substr( $sCode, 0, 5 ); |
250 | 250 | |
251 | - $sCode = $_bHasPHPTag ? $sCode : "<?php " . $sCode; |
|
251 | + $sCode = $_bHasPHPTag ? $sCode : "<?php ".$sCode; |
|
252 | 252 | |
253 | 253 | $sCode = str_replace( '"', "'", $sCode ); // highlight_string() crashes if double quotes are contained in the code. |
254 | 254 | $sCode = highlight_string( $sCode, true ); |
@@ -213,7 +213,7 @@ |
||
213 | 213 | get_current_user_id(), |
214 | 214 | 'dismissed_wp_pointers', |
215 | 215 | true |
216 | - ) |
|
216 | + ) |
|
217 | 217 | ); |
218 | 218 | $_aValidPointers = array(); |
219 | 219 |
@@ -191,7 +191,8 @@ |
||
191 | 191 | if ( in_array( $_sScreenID, $this->aScreenIDs ) ) { |
192 | 192 | return apply_filters( get_class( $this ) . '-' . $_sScreenID, array() ); |
193 | 193 | } |
194 | - if ( isset( $_GET[ 'page' ] ) ) { // sanitization unnecessary |
|
194 | + if ( isset( $_GET[ 'page' ] ) ) { |
|
195 | +// sanitization unnecessary |
|
195 | 196 | return apply_filters( get_class( $this ) . '-' . $this->getHTTPQueryGET( 'page' ), array() ); |
196 | 197 | } |
197 | 198 | return array(); |
@@ -110,14 +110,14 @@ discard block |
||
110 | 110 | */ |
111 | 111 | private function ___setHooks( $aScreenIDs ) { |
112 | 112 | |
113 | - foreach( $aScreenIDs as $_sScreenID ) { |
|
114 | - if ( ! $_sScreenID ) { |
|
113 | + foreach ( $aScreenIDs as $_sScreenID ) { |
|
114 | + if ( !$_sScreenID ) { |
|
115 | 115 | continue; |
116 | 116 | } |
117 | - add_filter( get_class( $this ) . '-' . $_sScreenID, array( $this, '_replyToSetPointer' ) ); |
|
117 | + add_filter( get_class( $this ).'-'.$_sScreenID, array( $this, '_replyToSetPointer' ) ); |
|
118 | 118 | } |
119 | 119 | |
120 | - if ( ! $this->_hasBeenCalled() ) { |
|
120 | + if ( !$this->_hasBeenCalled() ) { |
|
121 | 121 | return; |
122 | 122 | } |
123 | 123 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | $_aPointers = $this->_getValidPointers( $this->_getPointers() ); |
161 | 161 | |
162 | - if ( empty( $_aPointers ) || ! is_array( $_aPointers ) ) { |
|
162 | + if ( empty( $_aPointers ) || !is_array( $_aPointers ) ) { |
|
163 | 163 | return; |
164 | 164 | } |
165 | 165 | |
@@ -179,10 +179,10 @@ discard block |
||
179 | 179 | $_oScreen = get_current_screen(); |
180 | 180 | $_sScreenID = $_oScreen->id; |
181 | 181 | if ( in_array( $_sScreenID, $this->aScreenIDs ) ) { |
182 | - return apply_filters( get_class( $this ) . '-' . $_sScreenID, array() ); |
|
182 | + return apply_filters( get_class( $this ).'-'.$_sScreenID, array() ); |
|
183 | 183 | } |
184 | 184 | if ( isset( $_GET[ 'page' ] ) ) { // sanitization unnecessary |
185 | - return apply_filters( get_class( $this ) . '-' . $this->getHTTPQueryGET( 'page' ), array() ); |
|
185 | + return apply_filters( get_class( $this ).'-'.$this->getHTTPQueryGET( 'page' ), array() ); |
|
186 | 186 | } |
187 | 187 | return array(); |
188 | 188 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | private function _getValidPointers( $_aPointers ) { |
197 | 197 | |
198 | 198 | // Get dismissed pointers |
199 | - $_aDismissed = explode( |
|
199 | + $_aDismissed = explode( |
|
200 | 200 | ',', |
201 | 201 | ( string ) get_user_meta( |
202 | 202 | get_current_user_id(), |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $_aPointer[ 'pointer_id' ] = $_iPointerID; |
225 | 225 | |
226 | 226 | // Add the pointer to $_aValidPointers array |
227 | - $_aValidPointers[] = $_aPointer; |
|
227 | + $_aValidPointers[ ] = $_aPointer; |
|
228 | 228 | |
229 | 229 | } |
230 | 230 | return $_aValidPointers; |
@@ -294,9 +294,9 @@ discard block |
||
294 | 294 | * @return string |
295 | 295 | * @internal |
296 | 296 | */ |
297 | - public function ___getInternalScript( $aPointers=array() ) { |
|
297 | + public function ___getInternalScript( $aPointers = array() ) { |
|
298 | 298 | |
299 | - $_aJSArray = json_encode( $aPointers ); |
|
299 | + $_aJSArray = json_encode( $aPointers ); |
|
300 | 300 | |
301 | 301 | /** |
302 | 302 | * Checks check-boxes in siblings. |