@@ -73,7 +73,7 @@ |
||
73 | 73 | 'title' => 'Title', // Post title. Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from `$_REQUEST[ 'mode' ]`) is 'excerpt', a post excerpt is included between the title and links. |
74 | 74 | 'author' => 'Author', // Post author. |
75 | 75 | 'comments' => '<div class="comment-grey-bubble"></div>', // Number of pending comments. |
76 | - 'date' => 'Date', // The date and publish status of the post. |
|
76 | + 'date' => 'Date', // The date and publish status of the post. |
|
77 | 77 | ); |
78 | 78 | |
79 | 79 | /** |
@@ -29,7 +29,7 @@ |
||
29 | 29 | if ( in_array( $oProp->sClassName, self::$aClassNames ) ) |
30 | 30 | return self::$_oInstance; |
31 | 31 | |
32 | - self::$aClassNames[] = $oProp->sClassName; |
|
32 | + self::$aClassNames[ ] = $oProp->sClassName; |
|
33 | 33 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_post_type( $oProp, $oMsg ); |
34 | 34 | |
35 | 35 | return self::$_oInstance; |
@@ -26,8 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public static function instantiate( $oProp, $oMsg ) { |
28 | 28 | |
29 | - if ( in_array( $oProp->sClassName, self::$aClassNames ) ) |
|
30 | - return self::$_oInstance; |
|
29 | + if ( in_array( $oProp->sClassName, self::$aClassNames ) ) { |
|
30 | + return self::$_oInstance; |
|
31 | + } |
|
31 | 32 | |
32 | 33 | self::$aClassNames[] = $oProp->sClassName; |
33 | 34 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_post_type( $oProp, $oMsg ); |
@@ -43,7 +44,8 @@ discard block |
||
43 | 44 | public function _replyToSetPageLoadInfoInFooter() { |
44 | 45 | |
45 | 46 | // Some users set `$_GET[ 'post_type' ]` element even in regular admin pages. In that case, do not load the style to avoid duplicates. |
46 | - if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] ) { // sanitization unnecessary |
|
47 | + if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] ) { |
|
48 | +// sanitization unnecessary |
|
47 | 49 | return; |
48 | 50 | } |
49 | 51 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * Sets up hooks and properties. |
22 | 22 | * |
23 | 23 | */ |
24 | - public function __construct( $oProp, $oMsg=null ) { |
|
24 | + public function __construct( $oProp, $oMsg = null ) { |
|
25 | 25 | |
26 | 26 | parent::__construct( $oProp, $oMsg ); |
27 | 27 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | ); |
60 | 60 | |
61 | 61 | // If the user explicitly sets an empty string to the label key, do not insert a link. |
62 | - if ( ! $_sLinkLabel ) { |
|
62 | + if ( !$_sLinkLabel ) { |
|
63 | 63 | return $aLinks; |
64 | 64 | } |
65 | 65 | |
@@ -67,13 +67,13 @@ discard block |
||
67 | 67 | array_unshift( |
68 | 68 | $aLinks, |
69 | 69 | // "<a href='" . esc_url( "edit.php?post_type={$this->oProp->sPostType}" ) . "'>" |
70 | - '<a ' . $this->getAttributes( |
|
70 | + '<a '.$this->getAttributes( |
|
71 | 71 | array( |
72 | 72 | 'href' => esc_url( "edit.php?post_type={$this->oProp->sPostType}" ), |
73 | 73 | // 3.5.7+ Added for acceptance testing |
74 | 74 | 'class' => 'apf-plugin-title-action-link apf-admin-page', |
75 | 75 | ) |
76 | - ) . '>' |
|
76 | + ).'>' |
|
77 | 77 | . $_sLinkLabel |
78 | 78 | . "</a>" |
79 | 79 | ); |
@@ -89,9 +89,9 @@ discard block |
||
89 | 89 | public function _replyToSetFooterInfo() { |
90 | 90 | |
91 | 91 | if ( |
92 | - ! $this->isPostDefinitionPage( $this->oProp->sPostType ) |
|
93 | - && ! $this->isPostListingPage( $this->oProp->sPostType ) |
|
94 | - && ! $this->isCustomTaxonomyPage( $this->oProp->sPostType ) |
|
92 | + !$this->isPostDefinitionPage( $this->oProp->sPostType ) |
|
93 | + && !$this->isPostListingPage( $this->oProp->sPostType ) |
|
94 | + && !$this->isCustomTaxonomyPage( $this->oProp->sPostType ) |
|
95 | 95 | ) { |
96 | 96 | return; |
97 | 97 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @remark e.g. `http://.../wp-admin/post.php?post=180&action=edit` -> `http://.../wp-admin/post.php?post=180&action=edit&post_type=[...]` |
110 | 110 | * @callback filter get_edit_post_link |
111 | 111 | */ |
112 | - public function _replyToAddPostTypeQueryInEditPostLink( $sURL, $iPostID=null, $sContext=null ) { |
|
112 | + public function _replyToAddPostTypeQueryInEditPostLink( $sURL, $iPostID = null, $sContext = null ) { |
|
113 | 113 | return add_query_arg( |
114 | 114 | array( |
115 | 115 | 'post' => $iPostID, |
@@ -26,7 +26,8 @@ |
||
26 | 26 | parent::__construct( $oProp, $oMsg ); |
27 | 27 | |
28 | 28 | // For post type posts listing table page ( edit.php ) |
29 | - if ( isset( $_GET[ 'post_type' ] ) && $_GET[ 'post_type' ] === $this->oProp->sPostType ) { // sanitization unnecessary |
|
29 | + if ( isset( $_GET[ 'post_type' ] ) && $_GET[ 'post_type' ] === $this->oProp->sPostType ) { |
|
30 | +// sanitization unnecessary |
|
30 | 31 | add_action( |
31 | 32 | 'get_edit_post_link', |
32 | 33 | array( $this, '_replyToAddPostTypeQueryInEditPostLink' ), |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | * @param string $sTextDomain |
29 | 29 | * @since 3.7.9 |
30 | 30 | */ |
31 | - public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) { |
|
31 | + public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) { |
|
32 | 32 | |
33 | 33 | // This is important to set the hooks before the parent constructor |
34 | 34 | // as the setUp wil be called in there if the default action hook (current_screen) is already triggered. |
35 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) ); |
|
36 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToSetUpValidationHooks' ) ); |
|
35 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) ); |
|
36 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToSetUpValidationHooks' ) ); |
|
37 | 37 | |
38 | 38 | parent::__construct( |
39 | 39 | $sMetaBoxID, |
@@ -115,14 +115,14 @@ discard block |
||
115 | 115 | * @callback add_meta_boxes |
116 | 116 | */ |
117 | 117 | public function _replyToRegisterMetaBoxes() { |
118 | - foreach( $this->oProp->aPostTypes as $_sPostType ) { |
|
118 | + foreach ( $this->oProp->aPostTypes as $_sPostType ) { |
|
119 | 119 | add_meta_box( |
120 | - $this->oProp->sMetaBoxID, // id |
|
121 | - $this->oProp->sTitle, // title |
|
120 | + $this->oProp->sMetaBoxID, // id |
|
121 | + $this->oProp->sTitle, // title |
|
122 | 122 | array( $this, '_replyToPrintMetaBoxContents' ), // callback |
123 | - $_sPostType, // post type |
|
124 | - $this->oProp->sContext, // context |
|
125 | - $this->oProp->sPriority, // priority |
|
123 | + $_sPostType, // post type |
|
124 | + $this->oProp->sContext, // context |
|
125 | + $this->oProp->sPriority, // priority |
|
126 | 126 | null // argument - deprecated $this->oForm->aFields |
127 | 127 | ); |
128 | 128 | } |
@@ -154,18 +154,18 @@ discard block |
||
154 | 154 | * @internal |
155 | 155 | * @return integer The found post ID. `0` if not found. |
156 | 156 | */ |
157 | - private function ___getPostID() { |
|
157 | + private function ___getPostID() { |
|
158 | 158 | |
159 | 159 | // for an editing post page. |
160 | 160 | if ( isset( $GLOBALS[ 'post' ]->ID ) ) { |
161 | 161 | return $GLOBALS[ 'post' ]->ID; |
162 | 162 | } |
163 | 163 | if ( isset( $_GET[ 'post' ] ) ) { // sanitization unnecessary |
164 | - return absint( $_GET[ 'post' ] ); // sanitization done |
|
164 | + return absint( $_GET[ 'post' ] ); // sanitization done |
|
165 | 165 | } |
166 | 166 | // for post.php without any query key-values. |
167 | 167 | if ( isset( $_POST[ 'post_ID' ] ) ) { // sanitization unnecessary |
168 | - return absint( $_POST[ 'post_ID' ] ); // sanitization done |
|
168 | + return absint( $_POST[ 'post_ID' ] ); // sanitization done |
|
169 | 169 | } |
170 | 170 | return 0; |
171 | 171 | |
@@ -186,14 +186,14 @@ discard block |
||
186 | 186 | public function _replyToFilterSavingData( $aPostData, $aUnmodified ) { |
187 | 187 | |
188 | 188 | // Perform initial checks. |
189 | - if ( ! $this->_shouldProceedValidation( $aUnmodified ) ) { |
|
189 | + if ( !$this->_shouldProceedValidation( $aUnmodified ) ) { |
|
190 | 190 | return $aPostData; |
191 | 191 | } |
192 | 192 | |
193 | 193 | // Retrieve the submitted data. |
194 | - $_aInputs = $this->oForm->getSubmittedData( |
|
195 | - $this->oForm->getHTTPRequestSanitized( $_POST, false ), // subject data to be parsed. Will be sanitized in the method // sanitization done |
|
196 | - true, // extract data with the fieldset structure |
|
194 | + $_aInputs = $this->oForm->getSubmittedData( |
|
195 | + $this->oForm->getHTTPRequestSanitized( $_POST, false ), // subject data to be parsed. Will be sanitized in the method // sanitization done |
|
196 | + true, // extract data with the fieldset structure |
|
197 | 197 | false // strip slashes |
198 | 198 | ); |
199 | 199 | $_aInputsRaw = $_aInputs; // store one for the last input array. |
@@ -228,8 +228,8 @@ discard block |
||
228 | 228 | } |
229 | 229 | |
230 | 230 | $this->oForm->updateMetaDataByType( |
231 | - $_iPostID, // object id |
|
232 | - $_aInputs, // user submit form data |
|
231 | + $_iPostID, // object id |
|
232 | + $_aInputs, // user submit form data |
|
233 | 233 | $this->oForm->dropRepeatableElements( $_aSavedMeta ), // Drop repeatable section elements from the saved meta array. |
234 | 234 | $this->oForm->sStructureType // fields type |
235 | 235 | ); |
@@ -288,14 +288,14 @@ discard block |
||
288 | 288 | } |
289 | 289 | |
290 | 290 | // If our nonce isn't there, or we can't verify it, bail |
291 | - if ( ! isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) { // sanitization unnecessary |
|
291 | + if ( !isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) { // sanitization unnecessary |
|
292 | 292 | return false; |
293 | 293 | } |
294 | - if ( ! wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) { // sanitization unnecessary |
|
294 | + if ( !wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) { // sanitization unnecessary |
|
295 | 295 | return false; |
296 | 296 | } |
297 | 297 | |
298 | - if ( ! in_array( $aUnmodified[ 'post_type' ], $this->oProp->aPostTypes, true ) ) { |
|
298 | + if ( !in_array( $aUnmodified[ 'post_type' ], $this->oProp->aPostTypes, true ) ) { |
|
299 | 299 | return false; |
300 | 300 | } |
301 | 301 |
@@ -154,17 +154,19 @@ discard block |
||
154 | 154 | * @internal |
155 | 155 | * @return integer The found post ID. `0` if not found. |
156 | 156 | */ |
157 | - private function ___getPostID() { |
|
157 | + private function ___getPostID() { |
|
158 | 158 | |
159 | 159 | // for an editing post page. |
160 | 160 | if ( isset( $GLOBALS[ 'post' ]->ID ) ) { |
161 | 161 | return $GLOBALS[ 'post' ]->ID; |
162 | 162 | } |
163 | - if ( isset( $_GET[ 'post' ] ) ) { // sanitization unnecessary |
|
163 | + if ( isset( $_GET[ 'post' ] ) ) { |
|
164 | +// sanitization unnecessary |
|
164 | 165 | return absint( $_GET[ 'post' ] ); // sanitization done |
165 | 166 | } |
166 | 167 | // for post.php without any query key-values. |
167 | - if ( isset( $_POST[ 'post_ID' ] ) ) { // sanitization unnecessary |
|
168 | + if ( isset( $_POST[ 'post_ID' ] ) ) { |
|
169 | +// sanitization unnecessary |
|
168 | 170 | return absint( $_POST[ 'post_ID' ] ); // sanitization done |
169 | 171 | } |
170 | 172 | return 0; |
@@ -288,10 +290,12 @@ discard block |
||
288 | 290 | } |
289 | 291 | |
290 | 292 | // If our nonce isn't there, or we can't verify it, bail |
291 | - if ( ! isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) { // sanitization unnecessary |
|
293 | + if ( ! isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) { |
|
294 | +// sanitization unnecessary |
|
292 | 295 | return false; |
293 | 296 | } |
294 | - if ( ! wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) { // sanitization unnecessary |
|
297 | + if ( ! wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) { |
|
298 | +// sanitization unnecessary |
|
295 | 299 | return false; |
296 | 300 | } |
297 | 301 |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | // Call the user constructor. |
172 | - $this->start(); // defined in the controller class. |
|
173 | - $this->oUtil->addAndDoAction( $this, 'start_' . $this->oProp->sClassName, $this ); |
|
172 | + $this->start(); // defined in the controller class. |
|
173 | + $this->oUtil->addAndDoAction( $this, 'start_'.$this->oProp->sClassName, $this ); |
|
174 | 174 | |
175 | 175 | } |
176 | 176 | /** |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | * @return array |
180 | 180 | */ |
181 | 181 | private function ___getSubClassNames() { |
182 | - foreach( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) { |
|
183 | - $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix . $this->_sStructureType; |
|
182 | + foreach ( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) { |
|
183 | + $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix.$this->_sStructureType; |
|
184 | 184 | } |
185 | 185 | return $this->aSubClassNames + $this->_aSubClassNames; |
186 | 186 | } |
@@ -194,15 +194,15 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function _replyToLoadComponents( /* $oScreen */ ) { |
196 | 196 | |
197 | - if ( ! $this->_isInThePage() ) { |
|
197 | + if ( !$this->_isInThePage() ) { |
|
198 | 198 | return; |
199 | 199 | } |
200 | 200 | |
201 | - if ( ! isset( $this->oResource ) ) { |
|
201 | + if ( !isset( $this->oResource ) ) { |
|
202 | 202 | $this->oResource = $this->_replyTpSetAndGetInstance_oResource(); |
203 | 203 | } |
204 | 204 | |
205 | - if ( ! isset( $this->oLink ) ) { |
|
205 | + if ( !isset( $this->oLink ) ) { |
|
206 | 206 | $this->oLink = $this->_replyTpSetAndGetInstance_oLink(); |
207 | 207 | } |
208 | 208 | |
@@ -216,10 +216,10 @@ discard block |
||
216 | 216 | * Calls the load method and callbacks. |
217 | 217 | * @since 3.8.14 |
218 | 218 | */ |
219 | - protected function _load( $aActions=array() ) { |
|
219 | + protected function _load( $aActions = array() ) { |
|
220 | 220 | $aActions = empty( $aActions ) |
221 | 221 | ? array( |
222 | - 'load_' . $this->oProp->sClassName, |
|
222 | + 'load_'.$this->oProp->sClassName, |
|
223 | 223 | ) |
224 | 224 | : $aActions; |
225 | 225 | $this->load(); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | */ |
232 | 232 | protected function _setUp() { |
233 | 233 | $aActions = array( |
234 | - 'set_up_' . $this->oProp->sClassName, |
|
234 | + 'set_up_'.$this->oProp->sClassName, |
|
235 | 235 | ); |
236 | 236 | $this->setUp(); |
237 | 237 | $this->oUtil->addAndDoActions( $this, $aActions, $this ); |
@@ -258,14 +258,14 @@ discard block |
||
258 | 258 | * @since 3.8.19 |
259 | 259 | */ |
260 | 260 | protected function _isWordPressCoreAjaxRequest() { |
261 | - if ( ! isset( $GLOBALS[ 'pagenow' ] ) ) { |
|
261 | + if ( !isset( $GLOBALS[ 'pagenow' ] ) ) { |
|
262 | 262 | return false; |
263 | 263 | } |
264 | 264 | if ( 'admin-ajax.php' !== $GLOBALS[ 'pagenow' ] ) { |
265 | 265 | return false; |
266 | 266 | } |
267 | 267 | return in_array( |
268 | - isset( $_POST[ 'action' ] ) ? $_POST[ 'action' ] : '', // sanitization unnecessary as just checking |
|
268 | + isset( $_POST[ 'action' ] ) ? $_POST[ 'action' ] : '', // sanitization unnecessary as just checking |
|
269 | 269 | array( 'heartbeat', 'closed-postboxes', 'meta-box-order' ), |
270 | 270 | true |
271 | 271 | ); |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | * @return boolean |
294 | 294 | */ |
295 | 295 | protected function _isValidAjaxReferrer() { |
296 | - if ( ! $this->oProp->bIsAdminAjax ) { |
|
296 | + if ( !$this->oProp->bIsAdminAjax ) { |
|
297 | 297 | return false; |
298 | 298 | } |
299 | 299 | return true; |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | */ |
310 | 310 | public function _replyToDetermineToLoad() { |
311 | 311 | |
312 | - if ( ! $this->_isInThePage() ) { |
|
312 | + if ( !$this->_isInThePage() ) { |
|
313 | 313 | return; |
314 | 314 | } |
315 | 315 | |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | // Set and return the sub class object instance. |
376 | 376 | if ( isset( $this->aSubClassNames[ $sPropertyName ] ) ) { |
377 | 377 | return call_user_func( |
378 | - array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
378 | + array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
379 | 379 | ); |
380 | 380 | } |
381 | 381 | |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | */ |
410 | 410 | public function _replyTpSetAndGetInstance_oMsg() { |
411 | 411 | $this->oMsg = call_user_func_array( |
412 | - array( $this->aSubClassNames[ 'oMsg' ], 'getInstance'), |
|
412 | + array( $this->aSubClassNames[ 'oMsg' ], 'getInstance' ), |
|
413 | 413 | array( $this->oProp->sTextDomain ) // parameters |
414 | 414 | ); |
415 | 415 | return $this->oMsg; |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | * |
475 | 475 | * @internal |
476 | 476 | */ |
477 | - public function __call( $sMethodName, $aArguments=null ) { |
|
477 | + public function __call( $sMethodName, $aArguments = null ) { |
|
478 | 478 | |
479 | 479 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
480 | 480 | |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | |
505 | 505 | // Check if the method name does not contain a backslash. |
506 | 506 | if ( false === strpos( $sMethodName, "\\" ) ) { |
507 | - return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
507 | + return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
508 | 508 | } |
509 | 509 | |
510 | 510 | // If the method name contains a backslash, the user may be using a name space. |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | array( $this, $_sAutoCallbackMethodName ), |
516 | 516 | $aArguments |
517 | 517 | ) |
518 | - : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
518 | + : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
519 | 519 | |
520 | 520 | } |
521 | 521 | |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | */ |
526 | 526 | private function _triggerUndefinedMethodWarning( $sMethodName ) { |
527 | 527 | trigger_error( |
528 | - AdminPageFramework_Registry::NAME . ': ' |
|
528 | + AdminPageFramework_Registry::NAME.': ' |
|
529 | 529 | . sprintf( |
530 | 530 | __( 'The method is not defined: %1$s', $this->oProp->sTextDomain ), |
531 | 531 | $sMethodName |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | 'caller_id' => '', |
321 | 321 | 'structure_type' => '', |
322 | 322 | 'action_hook_form_registration' => '', |
323 | - 'autoload_min_resource' => true, // will be overridden by the $bAutoloadMinifiedResource property. |
|
323 | + 'autoload_min_resource' => true, // will be overridden by the $bAutoloadMinifiedResource property. |
|
324 | 324 | ); |
325 | 325 | |
326 | 326 | /** |
@@ -328,14 +328,14 @@ discard block |
||
328 | 328 | * @since 3.7.0 |
329 | 329 | */ |
330 | 330 | public $aFormCallbacks = array( |
331 | - 'hfID' => null, // the input id attribute |
|
332 | - 'hfTagID' => null, // the field container id attribute |
|
333 | - 'hfName' => null, // the field name attribute |
|
334 | - 'hfNameFlat' => null, // the flat field name attribute |
|
331 | + 'hfID' => null, // the input id attribute |
|
332 | + 'hfTagID' => null, // the field container id attribute |
|
333 | + 'hfName' => null, // the field name attribute |
|
334 | + 'hfNameFlat' => null, // the flat field name attribute |
|
335 | 335 | // @todo Document the differences between `hfName` and `hfInputName` |
336 | - 'hfInputName' => null, // 3.6.0+ the field input name attribute |
|
337 | - 'hfInputNameFlat' => null, // 3.6.0+ the flat field input name |
|
338 | - 'hfClass' => null, // the class attribute |
|
336 | + 'hfInputName' => null, // 3.6.0+ the field input name attribute |
|
337 | + 'hfInputNameFlat' => null, // 3.6.0+ the flat field input name |
|
338 | + 'hfClass' => null, // the class attribute |
|
339 | 339 | ); |
340 | 340 | |
341 | 341 | /** |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | * @internal |
469 | 469 | */ |
470 | 470 | private function ___getURLQuery() { |
471 | - if ( ! $this->bIsAdminAjax ) { |
|
471 | + if ( !$this->bIsAdminAjax ) { |
|
472 | 472 | return $this->getHTTPQueryGET( array(), array() ); |
473 | 473 | } |
474 | 474 | parse_str( |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | * @since 3.7.9 |
484 | 484 | */ |
485 | 485 | private function ___setGlobals() { |
486 | - if ( ! isset( $GLOBALS[ 'aAdminPageFramework' ] ) ) { |
|
486 | + if ( !isset( $GLOBALS[ 'aAdminPageFramework' ] ) ) { |
|
487 | 487 | $GLOBALS[ 'aAdminPageFramework' ] = array( |
488 | 488 | 'aFieldFlags' => array() |
489 | 489 | ); |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | 'action_hook_form_registration' => $this->bIsAdminAjax |
512 | 512 | ? 'admin_init' // 3.8.14 |
513 | 513 | : $this->_sFormRegistrationHook, |
514 | - 'autoload_min_resource' => $this->bAutoloadMinifiedResource, // [3.8.31] |
|
514 | + 'autoload_min_resource' => $this->bAutoloadMinifiedResource, // [3.8.31] |
|
515 | 515 | ) + $this->aFormArguments; |
516 | 516 | } |
517 | 517 | /** |
@@ -555,8 +555,8 @@ discard block |
||
555 | 555 | 'hfTagID' => array( $this->oCaller, '_replyToGetInputTagIDAttribute' ), // the fields & fieldset & field row container id attribute |
556 | 556 | 'hfName' => array( $this->oCaller, '_replyToGetFieldNameAttribute' ), // the input name attribute |
557 | 557 | 'hfNameFlat' => array( $this->oCaller, '_replyToGetFlatFieldName' ), // the flat input name attribute |
558 | - 'hfInputName' => array( $this->oCaller, '_replyToGetInputNameAttribute' ), // 3.6.0+ the field input name attribute |
|
559 | - 'hfInputNameFlat' => array( $this->oCaller, '_replyToGetFlatInputName' ), // 3.6.0+ the flat field input name |
|
558 | + 'hfInputName' => array( $this->oCaller, '_replyToGetInputNameAttribute' ), // 3.6.0+ the field input name attribute |
|
559 | + 'hfInputNameFlat' => array( $this->oCaller, '_replyToGetFlatInputName' ), // 3.6.0+ the flat field input name |
|
560 | 560 | 'hfClass' => array( $this->oCaller, '_replyToGetInputClassAttribute' ), // the class attribute |
561 | 561 | 'hfSectionName' => array( $this->oCaller, '_replyToGetSectionName' ), // 3.6.0+ |
562 | 562 | ) + $this->aFormCallbacks; |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | * @remark The information can be used to embed into the footer etc. |
631 | 631 | * @return array The information of the script. |
632 | 632 | */ |
633 | - protected function getCallerInfo( $sCallerPath='' ) { |
|
633 | + protected function getCallerInfo( $sCallerPath = '' ) { |
|
634 | 634 | |
635 | 635 | if ( isset( self::$_aScriptDataCaches[ $sCallerPath ] ) ) { |
636 | 636 | return self::$_aScriptDataCaches[ $sCallerPath ]; |
@@ -748,11 +748,11 @@ discard block |
||
748 | 748 | |
749 | 749 | // 3.7.9 Moved from the constructor to make it lighter. |
750 | 750 | if ( 'sClassHash' === $sName ) { |
751 | - $this->sClassHash = md5( $this->sClassName ); |
|
751 | + $this->sClassHash = md5( $this->sClassName ); |
|
752 | 752 | return $this->sClassHash; |
753 | 753 | } |
754 | 754 | if ( 'sScriptType' === $sName ) { |
755 | - $this->sScriptType = $this->_getCallerType( $this->sCallerPath ); // 3.7.6+ |
|
755 | + $this->sScriptType = $this->_getCallerType( $this->sCallerPath ); // 3.7.6+ |
|
756 | 756 | return $this->sScriptType; |
757 | 757 | } |
758 | 758 | if ( 'oUtil' === $sName ) { |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | 'nonce_verification_failed' => 'A problem occurred while processing the form data. Please try again.', |
84 | 84 | 'check_max_input_vars' => 'Not all form fields could not be sent. ' |
85 | 85 | . 'Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. ' |
86 | - . '<code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', // 3.5.11+ // sanitization unnecessary as it is just a literal string |
|
87 | - 'send_email' => 'Is it okay to send the email?', // 3.3.0+ |
|
88 | - 'email_sent' => 'The email has been sent.', // 3.3.0+, 3.3.5+ deprecated, 3.8.32 Re-added |
|
86 | + . '<code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', // 3.5.11+ // sanitization unnecessary as it is just a literal string |
|
87 | + 'send_email' => 'Is it okay to send the email?', // 3.3.0+ |
|
88 | + 'email_sent' => 'The email has been sent.', // 3.3.0+, 3.3.5+ deprecated, 3.8.32 Re-added |
|
89 | 89 | 'email_scheduled' => 'The email has been scheduled.', // 3.3.5+, 3.8.32 deprecated |
90 | - 'email_could_not_send' => 'There was a problem sending the email', // 3.3.0+ |
|
90 | + 'email_could_not_send' => 'There was a problem sending the email', // 3.3.0+ |
|
91 | 91 | |
92 | 92 | // AdminPageFramework_PostType |
93 | 93 | 'title' => 'Title', |
@@ -114,14 +114,14 @@ discard block |
||
114 | 114 | 'upload_file' => 'Upload File', |
115 | 115 | 'use_this_file' => 'Use This File', |
116 | 116 | 'select_file' => 'Select File', |
117 | - 'remove_value' => 'Remove Value', // 3.2.0+ |
|
118 | - 'select_all' => 'Select All', // 3.3.0+ |
|
119 | - 'select_none' => 'Select None', // 3.3.0+ |
|
117 | + 'remove_value' => 'Remove Value', // 3.2.0+ |
|
118 | + 'select_all' => 'Select All', // 3.3.0+ |
|
119 | + 'select_none' => 'Select None', // 3.3.0+ |
|
120 | 120 | 'no_term_found' => 'No term found.', // 3.3.2+ |
121 | 121 | |
122 | 122 | // AdminPageFramework_Form_View___Script_{...} |
123 | 123 | 'select' => 'Select', // 3.4.2+ |
124 | - 'insert' => 'Insert', // 3.4.2+ |
|
124 | + 'insert' => 'Insert', // 3.4.2+ |
|
125 | 125 | 'use_this' => 'Use This', // 3.4.2+ |
126 | 126 | 'return_to_library' => 'Return to Library', // 3.4.2+ |
127 | 127 | |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | |
134 | 134 | // Repeatable sections & fields |
135 | 135 | 'repeatable_section_is_disabled' => 'The ability to repeat sections is disabled.', // 3.8.13+ |
136 | - 'repeatable_field_is_disabled' => 'The ability to repeat fields is disabled.', // 3.8.13+ |
|
137 | - 'warning_caption' => 'Warning', // 3.8.13+ |
|
136 | + 'repeatable_field_is_disabled' => 'The ability to repeat fields is disabled.', // 3.8.13+ |
|
137 | + 'warning_caption' => 'Warning', // 3.8.13+ |
|
138 | 138 | |
139 | 139 | // AdminPageFramework_FormField |
140 | 140 | 'allowed_maximum_number_of_fields' => 'The allowed maximum number of fields is {0}.', |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * @remark This class should be instantiated via this method. |
217 | 217 | * @return AdminPageFramework_Message |
218 | 218 | */ |
219 | - public static function getInstance( $sTextDomain='admin-page-framework' ) { |
|
219 | + public static function getInstance( $sTextDomain = 'admin-page-framework' ) { |
|
220 | 220 | |
221 | 221 | $_oInstance = isset( self::$_aInstancesByTextDomain[ $sTextDomain ] ) && ( self::$_aInstancesByTextDomain[ $sTextDomain ] instanceof AdminPageFramework_Message ) |
222 | 222 | ? self::$_aInstancesByTextDomain[ $sTextDomain ] |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | * Ensures that only one instance of this class object exists. ( no multiple instances of this object ) |
230 | 230 | * @deprecated 3.2.0 |
231 | 231 | */ |
232 | - public static function instantiate( $sTextDomain='admin-page-framework' ) { |
|
232 | + public static function instantiate( $sTextDomain = 'admin-page-framework' ) { |
|
233 | 233 | return self::getInstance( $sTextDomain ); |
234 | 234 | } |
235 | 235 | |
@@ -237,14 +237,14 @@ discard block |
||
237 | 237 | * Sets up properties. |
238 | 238 | * @param string $sTextDomain |
239 | 239 | */ |
240 | - public function __construct( $sTextDomain='admin-page-framework' ) { |
|
240 | + public function __construct( $sTextDomain = 'admin-page-framework' ) { |
|
241 | 241 | |
242 | 242 | $this->_sTextDomain = $sTextDomain; |
243 | 243 | |
244 | 244 | // Fill the $aMessages property with the keys extracted from the $aDefaults property |
245 | 245 | // with the value of null. The null is set to let it trigger the __get() method |
246 | 246 | // so that each translation item gets processed individually. |
247 | - $this->aMessages = array_fill_keys( |
|
247 | + $this->aMessages = array_fill_keys( |
|
248 | 248 | array_keys( $this->aDefaults ), |
249 | 249 | null |
250 | 250 | ); |
@@ -279,13 +279,13 @@ discard block |
||
279 | 279 | * @param string $sKey |
280 | 280 | * @return string|array |
281 | 281 | */ |
282 | - public function get( $sKey='' ) { |
|
283 | - if ( ! $sKey ) { |
|
282 | + public function get( $sKey = '' ) { |
|
283 | + if ( !$sKey ) { |
|
284 | 284 | return $this->_getAllMessages(); |
285 | 285 | } |
286 | 286 | return isset( $this->aMessages[ $sKey ] ) |
287 | 287 | ? __( $this->aMessages[ $sKey ], $this->_sTextDomain ) |
288 | - : __( $this->{$sKey}, $this->_sTextDomain ); // triggers __get() |
|
288 | + : __( $this->{$sKey}, $this->_sTextDomain ); // triggers __get() |
|
289 | 289 | } |
290 | 290 | /** |
291 | 291 | * Returns the all registered messag items. |
@@ -43,16 +43,16 @@ discard block |
||
43 | 43 | * For the `admin_page` fields type, an option key is prepended. |
44 | 44 | * For `page_meta_box`, no prepended element and it starts with the section or field ID. |
45 | 45 | */ |
46 | - static public function getInputsUnset( array $aInputs, $sFieldsType, $iSkipDepth=0 ) { |
|
46 | + static public function getInputsUnset( array $aInputs, $sFieldsType, $iSkipDepth = 0 ) { |
|
47 | 47 | |
48 | - $_sUnsetKey = '__unset_' . $sFieldsType; |
|
49 | - if ( ! isset( $_POST[ $_sUnsetKey ] ) ) { // sanitization unnecessary |
|
48 | + $_sUnsetKey = '__unset_'.$sFieldsType; |
|
49 | + if ( !isset( $_POST[ $_sUnsetKey ] ) ) { // sanitization unnecessary |
|
50 | 50 | return $aInputs; |
51 | 51 | } |
52 | 52 | |
53 | - $_aUnsetElements = self::getHTTPRequestSanitized( self::getElementAsArray( $_POST, array( $_sUnsetKey ) ) ); // sanitization done |
|
53 | + $_aUnsetElements = self::getHTTPRequestSanitized( self::getElementAsArray( $_POST, array( $_sUnsetKey ) ) ); // sanitization done |
|
54 | 54 | $_aUnsetElements = array_unique( $_aUnsetElements ); |
55 | - foreach( $_aUnsetElements as $_sFlatInputName ) { |
|
55 | + foreach ( $_aUnsetElements as $_sFlatInputName ) { |
|
56 | 56 | |
57 | 57 | $_aDimensionalKeys = explode( '|', $_sFlatInputName ); |
58 | 58 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | // The first element is the option key for the `admin_page` field type and section or field dimensional keys follow. |
65 | - for ( $_i = 0; $_i < $iSkipDepth; $_i++) { |
|
65 | + for ( $_i = 0; $_i < $iSkipDepth; $_i++ ) { |
|
66 | 66 | unset( $_aDimensionalKeys[ $_i ] ); |
67 | 67 | } |
68 | 68 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | static public function hasNestedFields( $aFieldset ) { |
121 | 121 | |
122 | - if ( ! self::hasFieldDefinitionsInContent( $aFieldset ) ) { |
|
122 | + if ( !self::hasFieldDefinitionsInContent( $aFieldset ) ) { |
|
123 | 123 | return false; |
124 | 124 | } |
125 | 125 | // At this point, the `content` argument contains either the definition of nested fields or inline-mixed fields. |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | static public function hasFieldDefinitionsInContent( $aFieldset ) { |
143 | 143 | |
144 | - if ( ! isset( $aFieldset[ 'content' ] ) ) { |
|
144 | + if ( !isset( $aFieldset[ 'content' ] ) ) { |
|
145 | 145 | return false; |
146 | 146 | } |
147 | 147 | if ( empty( $aFieldset[ 'content' ] ) ) { |
@@ -176,10 +176,10 @@ discard block |
||
176 | 176 | * @since 3.8.13 |
177 | 177 | */ |
178 | 178 | static public function isDynamicField( $aField ) { |
179 | - if ( ! empty( $aField[ 'repeatable' ] ) ) { |
|
179 | + if ( !empty( $aField[ 'repeatable' ] ) ) { |
|
180 | 180 | return true; |
181 | 181 | } |
182 | - if ( ! empty( $aField[ 'sortable' ] ) ) { |
|
182 | + if ( !empty( $aField[ 'sortable' ] ) ) { |
|
183 | 183 | return true; |
184 | 184 | } |
185 | 185 | return false; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | if ( empty( $sString ) ) { |
209 | 209 | return $sString; |
210 | 210 | } |
211 | - return $sString . '|'; |
|
211 | + return $sString.'|'; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
@@ -224,17 +224,17 @@ discard block |
||
224 | 224 | */ |
225 | 225 | static public function getFieldsetReformattedBySubFieldIndex( $aFieldset, $iSubFieldIndex, $bHasSubFields, $aParentFieldset ) { |
226 | 226 | |
227 | - $_oCallerForm = $aFieldset[ '_caller_object' ]; |
|
227 | + $_oCallerForm = $aFieldset[ '_caller_object' ]; |
|
228 | 228 | |
229 | 229 | // Add sub-field index to the parent field path for repeated nested items. |
230 | - $aFieldset[ '_parent_field_path' ] = self::getAOrB( |
|
230 | + $aFieldset[ '_parent_field_path' ] = self::getAOrB( |
|
231 | 231 | $bHasSubFields, |
232 | - $aFieldset[ '_parent_field_path' ] . '|' . $iSubFieldIndex, |
|
232 | + $aFieldset[ '_parent_field_path' ].'|'.$iSubFieldIndex, |
|
233 | 233 | $aFieldset[ '_parent_field_path' ] |
234 | 234 | ); |
235 | - $aFieldset[ '_parent_tag_id' ] = self::getAOrB( |
|
235 | + $aFieldset[ '_parent_tag_id' ] = self::getAOrB( |
|
236 | 236 | $bHasSubFields, |
237 | - $aParentFieldset[ 'tag_id' ] . '__' . $iSubFieldIndex, |
|
237 | + $aParentFieldset[ 'tag_id' ].'__'.$iSubFieldIndex, |
|
238 | 238 | $aParentFieldset[ 'tag_id' ] |
239 | 239 | ); |
240 | 240 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $aFieldset, |
244 | 244 | $aFieldset[ '_structure_type' ], |
245 | 245 | $aFieldset[ 'capability' ], |
246 | - ( integer ) $iSubFieldIndex + 1, // 1-based count (not index) |
|
246 | + ( integer ) $iSubFieldIndex + 1, // 1-based count (not index) |
|
247 | 247 | $aFieldset[ '_subsection_index' ], |
248 | 248 | $aFieldset[ '_is_section_repeatable' ], |
249 | 249 | $aFieldset[ '_caller_object' ] |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | |
253 | 253 | $_oFieldsetOutputFormatter = new AdminPageFramework_Form_Model___Format_FieldsetOutput( |
254 | 254 | $aFieldset, |
255 | - $aFieldset[ '_section_index' ], // `_section_index` is defined in the ...FieldsetOutput class. Since this is a nested item, it should be already set. |
|
255 | + $aFieldset[ '_section_index' ], // `_section_index` is defined in the ...FieldsetOutput class. Since this is a nested item, it should be already set. |
|
256 | 256 | $_oCallerForm->aFieldTypeDefinitions |
257 | 257 | ); |
258 | 258 | return $_oFieldsetOutputFormatter->get(); |
@@ -289,12 +289,12 @@ discard block |
||
289 | 289 | if ( empty( $aArguments ) ) { |
290 | 290 | return ''; |
291 | 291 | } |
292 | - if ( self::hasBeenCalled( 'disabled_repeatable_elements_modal_' . $sBoxElementID ) ) { |
|
292 | + if ( self::hasBeenCalled( 'disabled_repeatable_elements_modal_'.$sBoxElementID ) ) { |
|
293 | 293 | return ''; |
294 | 294 | } |
295 | 295 | add_thickbox(); // to display a message to the user. |
296 | 296 | return "<div id='{$sBoxElementID}' style='display:none'>" |
297 | - . "<p>" . $aArguments[ 'message' ] . "</p>" |
|
297 | + . "<p>".$aArguments[ 'message' ]."</p>" |
|
298 | 298 | . "</div>"; |
299 | 299 | |
300 | 300 | } |
@@ -46,7 +46,8 @@ |
||
46 | 46 | static public function getInputsUnset( array $aInputs, $sFieldsType, $iSkipDepth=0 ) { |
47 | 47 | |
48 | 48 | $_sUnsetKey = '__unset_' . $sFieldsType; |
49 | - if ( ! isset( $_POST[ $_sUnsetKey ] ) ) { // sanitization unnecessary |
|
49 | + if ( ! isset( $_POST[ $_sUnsetKey ] ) ) { |
|
50 | +// sanitization unnecessary |
|
50 | 51 | return $aInputs; |
51 | 52 | } |
52 | 53 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @return string |
41 | 41 | */ |
42 | 42 | private function _getTransientKey() { |
43 | - return 'apf_ntc_' . get_current_user_id(); |
|
43 | + return 'apf_ntc_'.get_current_user_id(); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | * @param string $sType If empty, the method will check if a message exists in all types. Otherwise, it checks the existence of a message of the specified type. |
53 | 53 | * @return boolean True if a setting notice is set; otherwise, false. |
54 | 54 | */ |
55 | - public function hasNotice( $sType='' ) { |
|
55 | + public function hasNotice( $sType = '' ) { |
|
56 | 56 | |
57 | - if ( ! $sType ) { |
|
57 | + if ( !$sType ) { |
|
58 | 58 | return ( boolean ) count( self::$_aNotices ); |
59 | 59 | } |
60 | 60 | |
61 | 61 | // Check if there is a message of the type. |
62 | - foreach( self::$_aNotices as $_aNotice ) { |
|
62 | + foreach ( self::$_aNotices as $_aNotice ) { |
|
63 | 63 | $_sClassAttribute = $this->getElement( |
64 | 64 | $_aNotice, |
65 | 65 | array( |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * @param boolean $bOverride (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one. |
99 | 99 | * @return void |
100 | 100 | */ |
101 | - public function set( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) { |
|
101 | + public function set( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) { |
|
102 | 102 | |
103 | 103 | // If the array is empty, schedule the task of saving the array at shutdown. |
104 | 104 | if ( empty( self::$_aNotices ) ) { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $_sID = md5( trim( $sMessage ) ); |
109 | 109 | |
110 | 110 | // If the override is false and a message is already set, do not add. |
111 | - if ( ! $bOverride && isset( self::$_aNotices[ $_sID ] ) ) { |
|
111 | + if ( !$bOverride && isset( self::$_aNotices[ $_sID ] ) ) { |
|
112 | 112 | return; |
113 | 113 | } |
114 | 114 | |
@@ -118,14 +118,14 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | $_aAttributes = $this->getAsArray( $asAttributes ); |
121 | - if ( is_string( $asAttributes ) && ! empty( $asAttributes ) ) { |
|
121 | + if ( is_string( $asAttributes ) && !empty( $asAttributes ) ) { |
|
122 | 122 | $_aAttributes[ 'id' ] = $asAttributes; |
123 | 123 | } |
124 | 124 | self::$_aNotices[ $_sID ] = array( |
125 | 125 | 'sMessage' => $sMessage, |
126 | 126 | 'aAttributes' => $_aAttributes + array( |
127 | 127 | 'class' => $sType, |
128 | - 'id' => 'form_submit_notice_' . $_sID, |
|
128 | + 'id' => 'form_submit_notice_'.$_sID, |
|
129 | 129 | ), |
130 | 130 | ); |
131 | 131 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | // By setting false to the 'settings-notice' key, it's possible to disable the notifications set with the framework. |
169 | - if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) { // sanitization unnecessary |
|
169 | + if ( isset( $_GET[ 'settings-notice' ] ) && !$_GET[ 'settings-notice' ] ) { // sanitization unnecessary |
|
170 | 170 | return; |
171 | 171 | } |
172 | 172 |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * @return void |
142 | 142 | */ |
143 | 143 | public function _replyToSaveNotices() { |
144 | - if ( empty( self::$_aNotices ) ) { |
|
144 | + if ( empty( self::$_aNotices ) ) { |
|
145 | 145 | return; |
146 | 146 | } |
147 | 147 | $_bResult = $this->setTransient( |
@@ -161,12 +161,13 @@ discard block |
||
161 | 161 | |
162 | 162 | // Retrieve the notifications set in a transient. |
163 | 163 | $_aNotices = $this->_getNotices(); |
164 | - if ( false === $_aNotices ) { |
|
164 | + if ( false === $_aNotices ) { |
|
165 | 165 | return; |
166 | 166 | } |
167 | 167 | |
168 | 168 | // By setting false to the 'settings-notice' key, it's possible to disable the notifications set with the framework. |
169 | - if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) { // sanitization unnecessary |
|
169 | + if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) { |
|
170 | +// sanitization unnecessary |
|
170 | 171 | return; |
171 | 172 | } |
172 | 173 |