@@ -400,7 +400,7 @@ |
||
| 400 | 400 | * @since 3.1.1 Moved from `AdminPageFramework_Menu`. Chagned the return type. |
| 401 | 401 | * @return array removed menu item. |
| 402 | 402 | */ |
| 403 | - private function _removePageSubmenuItem( $nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ){ |
|
| 403 | + private function _removePageSubmenuItem( $nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ) { |
|
| 404 | 404 | |
| 405 | 405 | $_aRemovedMenuItem = $this->_removePageSubMenuItemByIndex( |
| 406 | 406 | $nSubMenuPageIndex, |
@@ -26,6 +26,7 @@ discard block |
||
| 26 | 26 | * Sets up hooks |
| 27 | 27 | * |
| 28 | 28 | * @internal |
| 29 | + * @param AdminPageFramework_Router $oFactory |
|
| 29 | 30 | */ |
| 30 | 31 | public function __construct( $oFactory, $sActionHook='admin_menu' ) { |
| 31 | 32 | |
@@ -253,6 +254,7 @@ discard block |
||
| 253 | 254 | * @since 3.3.0 |
| 254 | 255 | * @since 3.1.1 Moved from `AdminPageFramework_Menu`. |
| 255 | 256 | * @since 3.7.4 Added the `$nOrder` parameter. |
| 257 | + * @param string $sMenuSlug |
|
| 256 | 258 | * @return string The page hook of the added page. |
| 257 | 259 | */ |
| 258 | 260 | private function _addPageSubmenuItem( $sRootPageSlug, $sMenuSlug, $sPageSlug, $sPageTitle, $sMenuTitle, $sCapability, $bShowInMenu, $nOrder ) { |
@@ -354,6 +356,7 @@ discard block |
||
| 354 | 356 | /** |
| 355 | 357 | * Sets up hooks for the page. |
| 356 | 358 | * @since 3.7.4 |
| 359 | + * @param false|string $sPageHook |
|
| 357 | 360 | */ |
| 358 | 361 | private function _setPageHooks( $sPageHook, $sPageSlug ) { |
| 359 | 362 | |
@@ -405,7 +408,7 @@ discard block |
||
| 405 | 408 | /** |
| 406 | 409 | * @since 3.7.4 |
| 407 | 410 | * @return void |
| 408 | - * @param numeric $$nOrder A user set order (menu position, index). |
|
| 411 | + * @param numeric $nOrder A user set order (menu position, index). |
|
| 409 | 412 | * @param array $aSubMenuItem The sub menu item array set in the global `$submenu` array. |
| 410 | 413 | */ |
| 411 | 414 | private function _setSubMenuPageByIndex( $nOrder, $aSubMenuItem, $sMenuSlug ) { |
@@ -529,6 +532,7 @@ discard block |
||
| 529 | 532 | * @since 3.1.1 Moved from `AdminPageFramework_Menu`. |
| 530 | 533 | * @since 3.5.3 Added the `$bShowInMenu` parameter. |
| 531 | 534 | * @since 3.7.4 Added the `$nOrder` parameter. |
| 535 | + * @param string $sMenuSlug |
|
| 532 | 536 | * @return void |
| 533 | 537 | */ |
| 534 | 538 | private function _addLinkSubmenuItem( $sMenuSlug, $sTitle, $sCapability, $sHref, $bShowInMenu, $nOrder ) { |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @internal |
| 29 | 29 | */ |
| 30 | - public function __construct( $oFactory, $sActionHook='admin_menu' ) { |
|
| 30 | + public function __construct( $oFactory, $sActionHook = 'admin_menu' ) { |
|
| 31 | 31 | |
| 32 | 32 | $this->oFactory = $oFactory; |
| 33 | 33 | add_action( |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | public function _replyToRegisterRootMenu() { |
| 75 | 75 | |
| 76 | 76 | // If the root menu label is not set but the slug is set, |
| 77 | - if ( ! $this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) { |
|
| 77 | + if ( !$this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) { |
|
| 78 | 78 | return; |
| 79 | 79 | } |
| 80 | 80 | $this->_registerRootMenuPage(); |
@@ -96,12 +96,12 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $this->oFactory->oProp->aRootMenu[ '_page_hook' ] = add_menu_page( |
| 99 | - $this->oFactory->oProp->sClassName, // Page title - will be invisible anyway |
|
| 100 | - $this->oFactory->oProp->aRootMenu[ 'sTitle' ], // Menu title - should be the root page title. |
|
| 101 | - $this->oFactory->oProp->sCapability, // Capability - access right |
|
| 102 | - $this->oFactory->oProp->aRootMenu[ 'sPageSlug' ], // Menu ID |
|
| 103 | - '', // Callback function for the page content output - the root page will be removed so no need to register a function. |
|
| 104 | - $this->oFactory->oProp->aRootMenu[ 'sIcon16x16' ], // icon path |
|
| 99 | + $this->oFactory->oProp->sClassName, // Page title - will be invisible anyway |
|
| 100 | + $this->oFactory->oProp->aRootMenu[ 'sTitle' ], // Menu title - should be the root page title. |
|
| 101 | + $this->oFactory->oProp->sCapability, // Capability - access right |
|
| 102 | + $this->oFactory->oProp->aRootMenu[ 'sPageSlug' ], // Menu ID |
|
| 103 | + '', // Callback function for the page content output - the root page will be removed so no need to register a function. |
|
| 104 | + $this->oFactory->oProp->aRootMenu[ 'sIcon16x16' ], // icon path |
|
| 105 | 105 | $this->getElement( |
| 106 | 106 | $this->oFactory->oProp->aRootMenu, |
| 107 | 107 | 'iPosition', |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | // Let external scripts add sub-menu pages. |
| 125 | 125 | $_aPages = $this->addAndApplyFilter( |
| 126 | - $this->oFactory, // caller object |
|
| 127 | - "pages_{$this->oFactory->oProp->sClassName}", // filter |
|
| 126 | + $this->oFactory, // caller object |
|
| 127 | + "pages_{$this->oFactory->oProp->sClassName}", // filter |
|
| 128 | 128 | $this->oFactory->oProp->aPages // arguments |
| 129 | 129 | ); |
| 130 | 130 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | // Format the `$aPages` property and register the pages. |
| 135 | 135 | $_iParsedIndex = 0; |
| 136 | 136 | $_aFormattedPages = array(); |
| 137 | - foreach( $_aPages as $_aSubMenuItem ) { |
|
| 137 | + foreach ( $_aPages as $_aSubMenuItem ) { |
|
| 138 | 138 | |
| 139 | 139 | // needs to be sanitized because there are hook filters applied to this array. |
| 140 | 140 | $_oFormatter = new AdminPageFramework_Format_SubMenuItem( |
@@ -169,8 +169,8 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | private function _getDefaultPageSlug( array $aPages ) { |
| 171 | 171 | |
| 172 | - foreach( $aPages as $_aPage ) { |
|
| 173 | - if ( ! isset( $_aPage[ 'page_slug' ] ) ) { |
|
| 172 | + foreach ( $aPages as $_aPage ) { |
|
| 173 | + if ( !isset( $_aPage[ 'page_slug' ] ) ) { |
|
| 174 | 174 | continue; |
| 175 | 175 | } |
| 176 | 176 | return $_aPage[ 'page_slug' ]; |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | private function _registerSubMenuItem( array $aArgs ) { |
| 194 | 194 | |
| 195 | - if ( ! current_user_can( $aArgs[ 'capability' ] ) ) { |
|
| 195 | + if ( !current_user_can( $aArgs[ 'capability' ] ) ) { |
|
| 196 | 196 | return ''; |
| 197 | 197 | } |
| 198 | 198 | |
@@ -256,14 +256,14 @@ discard block |
||
| 256 | 256 | */ |
| 257 | 257 | private function _addPageSubmenuItem( $sRootPageSlug, $sMenuSlug, $sPageSlug, $sPageTitle, $sMenuTitle, $sCapability, $bShowInMenu, $nOrder ) { |
| 258 | 258 | |
| 259 | - if ( ! $sPageSlug ) { |
|
| 259 | + if ( !$sPageSlug ) { |
|
| 260 | 260 | return ''; |
| 261 | 261 | } |
| 262 | 262 | $_sPageHook = $this->___addSubMenuPage( |
| 263 | - $sRootPageSlug, // the root (parent) page slug |
|
| 264 | - $sPageTitle, // page title |
|
| 265 | - $sMenuTitle, // menu title |
|
| 266 | - $sCapability, // capability |
|
| 263 | + $sRootPageSlug, // the root (parent) page slug |
|
| 264 | + $sPageTitle, // page title |
|
| 265 | + $sMenuTitle, // menu title |
|
| 266 | + $sCapability, // capability |
|
| 267 | 267 | $sPageSlug // menu slug |
| 268 | 268 | ); |
| 269 | 269 | |
@@ -291,14 +291,14 @@ discard block |
||
| 291 | 291 | $_aRemovedMenuItem = $this->_removePageSubmenuItem( $_nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ); |
| 292 | 292 | |
| 293 | 293 | // If the visibility option is `false`, remove the one just added from the sub-menu global array |
| 294 | - if ( ! $bShowInMenu && ! $this->_isCurrentPage( $sPageSlug ) ) { |
|
| 294 | + if ( !$bShowInMenu && !$this->_isCurrentPage( $sPageSlug ) ) { |
|
| 295 | 295 | return $_sPageHook; |
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | // Set the order index in the element of the `submenu` global array. |
| 299 | 299 | $this->_setSubMenuPageByIndex( |
| 300 | - $nOrder, // user-set order |
|
| 301 | - $_aRemovedMenuItem, // will be reassign with a new index |
|
| 300 | + $nOrder, // user-set order |
|
| 301 | + $_aRemovedMenuItem, // will be reassign with a new index |
|
| 302 | 302 | $sMenuSlug |
| 303 | 303 | ); |
| 304 | 304 | |
@@ -319,21 +319,21 @@ discard block |
||
| 319 | 319 | * @uses add_submenu_page |
| 320 | 320 | */ |
| 321 | 321 | private function ___addSubMenuPage( |
| 322 | - $sRootPageSlug, // the root (parent) page slug |
|
| 323 | - $sPageTitle, // page title |
|
| 324 | - $sMenuTitle, // menu title |
|
| 325 | - $sCapability, // capability |
|
| 322 | + $sRootPageSlug, // the root (parent) page slug |
|
| 323 | + $sPageTitle, // page title |
|
| 324 | + $sMenuTitle, // menu title |
|
| 325 | + $sCapability, // capability |
|
| 326 | 326 | $sPageSlug // menu slug |
| 327 | 327 | ) { |
| 328 | 328 | if ( $this->oFactory->oProp->bIsAdminAjax ) { |
| 329 | 329 | return $sPageSlug; |
| 330 | 330 | } |
| 331 | 331 | return add_submenu_page( |
| 332 | - $sRootPageSlug, // the root (parent) page slug |
|
| 333 | - $sPageTitle, // page title |
|
| 334 | - $sMenuTitle, // menu title |
|
| 335 | - $sCapability, // capability |
|
| 336 | - $sPageSlug, // menu slug |
|
| 332 | + $sRootPageSlug, // the root (parent) page slug |
|
| 333 | + $sPageTitle, // page title |
|
| 334 | + $sMenuTitle, // menu title |
|
| 335 | + $sCapability, // capability |
|
| 336 | + $sPageSlug, // menu slug |
|
| 337 | 337 | array( $this->oFactory, '_replyToRenderPage' ) // callback 3.7.10+ |
| 338 | 338 | ); |
| 339 | 339 | } |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | */ |
| 368 | 368 | add_action( |
| 369 | 369 | 'current_screen', |
| 370 | - array( $this->oFactory, "load_pre_" . $sPageSlug ), |
|
| 370 | + array( $this->oFactory, "load_pre_".$sPageSlug ), |
|
| 371 | 371 | 20 |
| 372 | 372 | ); |
| 373 | 373 | /** |
@@ -382,15 +382,15 @@ discard block |
||
| 382 | 382 | * Set a low priority because the user may add in-page tabs in their callback method of this action hook. |
| 383 | 383 | * @since 3.6.3 |
| 384 | 384 | */ |
| 385 | - add_action( "load_" . $sPageSlug, array( $this->oFactory, '_replyToFinalizeInPageTabs' ), 9999 ); |
|
| 385 | + add_action( "load_".$sPageSlug, array( $this->oFactory, '_replyToFinalizeInPageTabs' ), 9999 ); |
|
| 386 | 386 | |
| 387 | 387 | // 3.6.3+ |
| 388 | - add_action( "load_after_" . $sPageSlug, array( $this->oFactory, '_replyToEnqueuePageAssets' ) ); |
|
| 389 | - add_action( "load_after_" . $sPageSlug, array( $this->oFactory, '_replyToEnablePageMetaBoxes' ) ); // 3.7.10+ |
|
| 388 | + add_action( "load_after_".$sPageSlug, array( $this->oFactory, '_replyToEnqueuePageAssets' ) ); |
|
| 389 | + add_action( "load_after_".$sPageSlug, array( $this->oFactory, '_replyToEnablePageMetaBoxes' ) ); // 3.7.10+ |
|
| 390 | 390 | |
| 391 | 391 | $this->oFactory->oProp->aPageHooks[ $sPageSlug ] = $this->getAOrB( |
| 392 | 392 | is_network_admin(), |
| 393 | - $sPageHook . '-network', |
|
| 393 | + $sPageHook.'-network', |
|
| 394 | 394 | $sPageHook |
| 395 | 395 | ); |
| 396 | 396 | |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | |
| 408 | 408 | $_nNewIndex = $this->getUnusedNumericIndex( |
| 409 | 409 | $this->getElementAsArray( $GLOBALS, array( 'submenu', $sMenuSlug ) ), // subject array to parser |
| 410 | - $nOrder, // a desired menu position |
|
| 410 | + $nOrder, // a desired menu position |
|
| 411 | 411 | 5 // offset |
| 412 | 412 | ); |
| 413 | 413 | |
@@ -421,9 +421,9 @@ discard block |
||
| 421 | 421 | */ |
| 422 | 422 | private function _getSubMenuPageIndex( $sMenuSlug, $sMenuTitle, $sPageTitle, $sPageSlug ) { |
| 423 | 423 | |
| 424 | - foreach( $this->getElementAsArray( $GLOBALS, array( 'submenu', $sMenuSlug ) ) as $_iIndex => $_aSubMenu ) { |
|
| 424 | + foreach ( $this->getElementAsArray( $GLOBALS, array( 'submenu', $sMenuSlug ) ) as $_iIndex => $_aSubMenu ) { |
|
| 425 | 425 | |
| 426 | - if ( ! isset( $_aSubMenu[ 3 ] ) ) { |
|
| 426 | + if ( !isset( $_aSubMenu[ 3 ] ) ) { |
|
| 427 | 427 | continue; |
| 428 | 428 | } |
| 429 | 429 | |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | * @since 3.1.1 Moved from `AdminPageFramework_Menu`. Chagned the return type. |
| 456 | 456 | * @return array removed menu item. |
| 457 | 457 | */ |
| 458 | - private function _removePageSubmenuItem( $nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ){ |
|
| 458 | + private function _removePageSubmenuItem( $nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ) { |
|
| 459 | 459 | |
| 460 | 460 | $_aRemovedMenuItem = $this->_removePageSubMenuItemByIndex( |
| 461 | 461 | $nSubMenuPageIndex, |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | */ |
| 529 | 529 | private function _addLinkSubmenuItem( $sMenuSlug, $sTitle, $sCapability, $sHref, $bShowInMenu, $nOrder ) { |
| 530 | 530 | |
| 531 | - if ( ! $bShowInMenu ) { |
|
| 531 | + if ( !$bShowInMenu ) { |
|
| 532 | 532 | return; |
| 533 | 533 | } |
| 534 | 534 | |
@@ -543,9 +543,9 @@ discard block |
||
| 543 | 543 | 5 // offset |
| 544 | 544 | ); |
| 545 | 545 | $_aSubMenuItems[ $_nIndex ] = array( |
| 546 | - $sTitle, // 0 |
|
| 547 | - $sCapability, // 1 |
|
| 548 | - $sHref, // 2 |
|
| 546 | + $sTitle, // 0 |
|
| 547 | + $sCapability, // 1 |
|
| 548 | + $sHref, // 2 |
|
| 549 | 549 | ); |
| 550 | 550 | $GLOBALS[ 'submenu' ][ $sMenuSlug ] = $_aSubMenuItems; |
| 551 | 551 | |
@@ -562,17 +562,17 @@ discard block |
||
| 562 | 562 | */ |
| 563 | 563 | public function _replyToLoadPageForAjax() { |
| 564 | 564 | $_sCurrentPageSlug = $this->oFactory->oProp->getCurrentPageSlugIfAdded(); |
| 565 | - if ( ! $_sCurrentPageSlug ) { |
|
| 565 | + if ( !$_sCurrentPageSlug ) { |
|
| 566 | 566 | return; |
| 567 | 567 | } |
| 568 | - $_sCurrentTabSlug = $this->oFactory->oProp->getCurrentInPageTabSlugIfAdded( $_sCurrentPageSlug ); |
|
| 568 | + $_sCurrentTabSlug = $this->oFactory->oProp->getCurrentInPageTabSlugIfAdded( $_sCurrentPageSlug ); |
|
| 569 | 569 | if ( |
| 570 | - ! empty( $this->oFactory->oProp->aInPageTabs ) // it means at least one in-page tab is added |
|
| 571 | - && ! $_sCurrentTabSlug // the current tab could not be retrieved |
|
| 570 | + !empty( $this->oFactory->oProp->aInPageTabs ) // it means at least one in-page tab is added |
|
| 571 | + && !$_sCurrentTabSlug // the current tab could not be retrieved |
|
| 572 | 572 | ) { |
| 573 | 573 | return; |
| 574 | 574 | } |
| 575 | - call_user_func_array( array( $this->oFactory, "load_pre_" . $_sCurrentPageSlug ), array() ); |
|
| 575 | + call_user_func_array( array( $this->oFactory, "load_pre_".$_sCurrentPageSlug ), array() ); |
|
| 576 | 576 | } |
| 577 | 577 | |
| 578 | 578 | /** |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | public function _replyToRemoveRootMenuPage() { |
| 586 | 586 | |
| 587 | 587 | // After adding the sub menus, if the root menu is created, remove the page that is automatically created when registering the root menu. |
| 588 | - if ( ! $this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) { |
|
| 588 | + if ( !$this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) { |
|
| 589 | 589 | return; |
| 590 | 590 | } |
| 591 | 591 | if ( $this->oFactory->oProp->bIsAdminAjax ) { |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | * Namespace slugs have backslashes but the registered slugs backslashes are all converted to forward-slashes. |
| 597 | 597 | * @since 3.5.16 |
| 598 | 598 | */ |
| 599 | - $_sMenuSlug = str_replace( |
|
| 599 | + $_sMenuSlug = str_replace( |
|
| 600 | 600 | '\\', |
| 601 | 601 | '/', |
| 602 | 602 | $this->oFactory->oProp->aRootMenu[ 'sPageSlug' ] |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | class AdminPageFramework_Model__FormSubmission__Validator__ContactForm extends AdminPageFramework_Model__FormSubmission__Validator_Base { |
| 19 | 19 | |
| 20 | - public $sActionHookPrefix = 'try_validation_after_'; // 3.7.6 Changed it from `try_validation_before_` |
|
| 20 | + public $sActionHookPrefix = 'try_validation_after_'; // 3.7.6 Changed it from `try_validation_before_` |
|
| 21 | 21 | public $iHookPriority = 10; |
| 22 | 22 | public $iCallbackParameters = 5; |
| 23 | 23 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) { |
| 35 | 35 | |
| 36 | 36 | // Check whether sending an email has been confirmed by the user or not. |
| 37 | - if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) { |
|
| 37 | + if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) { |
|
| 38 | 38 | return; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -45,13 +45,13 @@ discard block |
||
| 45 | 45 | $this->getElement( $aSubmitInformation, 'section_id' ) |
| 46 | 46 | ); |
| 47 | 47 | $this->oFactory->oProp->_bDisableSavingOptions = true; |
| 48 | - $this->deleteTransient( 'apf_tfd' . md5( 'temporary_form_data_' . $this->oFactory->oProp->sClassName . get_current_user_id() ) ); |
|
| 48 | + $this->deleteTransient( 'apf_tfd'.md5( 'temporary_form_data_'.$this->oFactory->oProp->sClassName.get_current_user_id() ) ); |
|
| 49 | 49 | |
| 50 | 50 | // Schedule to remove the confirmation url query key. |
| 51 | 51 | add_action( "setting_update_url_{$this->oFactory->oProp->sClassName}", array( $this, '_replyToRemoveConfirmationQueryKey' ) ); |
| 52 | 52 | |
| 53 | 53 | // Go to the catch clause. |
| 54 | - $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause. |
|
| 54 | + $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause. |
|
| 55 | 55 | $_oException->aReturn = $aInputs; |
| 56 | 56 | throw $_oException; |
| 57 | 57 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | private function _sendEmailInBackground( $aInputs, $sPressedInputNameFlat, $sSubmitSectionID ) { |
| 88 | 88 | |
| 89 | - $_sTranskentKey = 'apf_em_' . md5( $sPressedInputNameFlat . get_current_user_id() ); |
|
| 89 | + $_sTranskentKey = 'apf_em_'.md5( $sPressedInputNameFlat.get_current_user_id() ); |
|
| 90 | 90 | $_aEmailOptions = $this->getTransient( $_sTranskentKey ); |
| 91 | 91 | $this->deleteTransient( $_sTranskentKey ); |
| 92 | 92 | |
@@ -101,13 +101,13 @@ discard block |
||
| 101 | 101 | 'name' => '', |
| 102 | 102 | ); |
| 103 | 103 | |
| 104 | - $_sTransientKey = 'apf_emd_' . md5( $sPressedInputNameFlat . get_current_user_id() ); |
|
| 104 | + $_sTransientKey = 'apf_emd_'.md5( $sPressedInputNameFlat.get_current_user_id() ); |
|
| 105 | 105 | $_aFormEmailData = array( |
| 106 | 106 | 'email_options' => $_aEmailOptions, |
| 107 | 107 | 'input' => $aInputs, |
| 108 | 108 | 'section_id' => $sSubmitSectionID, |
| 109 | 109 | ); |
| 110 | - $_bIsSet = $this->setTransient( $_sTransientKey, $_aFormEmailData, 100 ); |
|
| 110 | + $_bIsSet = $this->setTransient( $_sTransientKey, $_aFormEmailData, 100 ); |
|
| 111 | 111 | |
| 112 | 112 | // Send the email in the background. |
| 113 | 113 | wp_remote_get( |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | ); |
| 126 | 126 | |
| 127 | 127 | // @remark Not possible to tell whether it is sent or not at the moment because it is performed in the background. |
| 128 | - $_bSent = $_bIsSet; |
|
| 128 | + $_bSent = $_bIsSet; |
|
| 129 | 129 | $this->oFactory->setSettingNotice( |
| 130 | 130 | $this->oFactory->oMsg->get( |
| 131 | 131 | $this->getAOrB( |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | * @return string |
| 148 | 148 | */ |
| 149 | 149 | public function _replyToRemoveConfirmationQueryKey( $sSettingUpdateURL ) { |
| 150 | - return remove_query_arg( array( 'confirmation', ), $sSettingUpdateURL ); |
|
| 150 | + return remove_query_arg( array( 'confirmation',), $sSettingUpdateURL ); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | protected function _getFormattedSubMenuLinkArray( array $aSubMenuLink ) { |
| 93 | 93 | |
| 94 | 94 | // If the set URL is not valid, return. |
| 95 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
| 95 | + if ( !filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
| 96 | 96 | return array(); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function _replyToEnableMetaBox() { |
| 53 | 53 | |
| 54 | - if ( ! $this->_isMetaBoxAdded() ) { |
|
| 54 | + if ( !$this->_isMetaBoxAdded() ) { |
|
| 55 | 55 | return; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $_sCurrentScreenID = $this->getCurrentScreenID(); |
|
| 58 | + $_sCurrentScreenID = $this->getCurrentScreenID(); |
|
| 59 | 59 | |
| 60 | 60 | // Trigger the add_meta_boxes hooks to allow meta boxes to be added. |
| 61 | 61 | do_action( "add_meta_boxes_{$_sCurrentScreenID}", null ); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | // the network admin adds '-network' in the screen ID and the hooks with that id won't be triggered so use the 'page_hook' global variable. |
| 86 | 86 | if ( isset( $GLOBALS[ 'page_hook' ] ) ) { |
| 87 | 87 | add_action( |
| 88 | - "admin_footer-{$GLOBALS['page_hook']}", |
|
| 88 | + "admin_footer-{$GLOBALS[ 'page_hook' ]}", |
|
| 89 | 89 | array( $this, '_replyToAddMetaboxScript' ) |
| 90 | 90 | ); |
| 91 | 91 | } |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | $_sPageSlug = $this->getElement( $_GET, 'page', '' ); |
| 112 | - if ( ! $_sPageSlug ) { |
|
| 112 | + if ( !$_sPageSlug ) { |
|
| 113 | 113 | return false; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) { |
|
| 116 | + foreach ( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) { |
|
| 117 | 117 | if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { |
| 118 | 118 | return true; |
| 119 | 119 | } |
@@ -132,10 +132,10 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | private function _isPageOfMetaBox( $sPageSlug, $oMetaBox ) { |
| 134 | 134 | |
| 135 | - if ( in_array( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) { |
|
| 135 | + if ( in_array( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) { |
|
| 136 | 136 | return true; // for numeric keys with a string value. |
| 137 | 137 | } |
| 138 | - if ( ! array_key_exists( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) { |
|
| 138 | + if ( !array_key_exists( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) { |
|
| 139 | 139 | return false; // for keys of page slugs, the key does not exist, it means not added. |
| 140 | 140 | } |
| 141 | 141 | |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | */ |
| 82 | 82 | public function _replyToRegisterMetaBoxes( $sPageHook='' ) { |
| 83 | 83 | foreach( $this->oProp->aPageSlugs as $_sKey => $_asPage ) { |
| 84 | - if ( is_string( $_asPage ) ) { |
|
| 84 | + if ( is_string( $_asPage ) ) { |
|
| 85 | 85 | $this->_registerMetaBox( $_asPage ); |
| 86 | 86 | continue; |
| 87 | 87 | } |
@@ -256,7 +256,7 @@ |
||
| 256 | 256 | |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | - /** |
|
| 259 | + /** |
|
| 260 | 260 | * Extracts meta box form fields options array from the given options array of an admin page. |
| 261 | 261 | * |
| 262 | 262 | * @since 3.5.6 |
@@ -45,11 +45,11 @@ discard block |
||
| 45 | 45 | public function _replyToSetUpValidationHooks( $oScreen ) { |
| 46 | 46 | |
| 47 | 47 | // Validation hooks |
| 48 | - foreach( $this->oProp->aPageSlugs as $_sIndexOrPageSlug => $_asTabArrayOrPageSlug ) { |
|
| 48 | + foreach ( $this->oProp->aPageSlugs as $_sIndexOrPageSlug => $_asTabArrayOrPageSlug ) { |
|
| 49 | 49 | |
| 50 | 50 | if ( is_scalar( $_asTabArrayOrPageSlug ) ) { |
| 51 | 51 | $_sPageSlug = $_asTabArrayOrPageSlug; |
| 52 | - add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 ); // 3.4.1+ |
|
| 52 | + add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 ); // 3.4.1+ |
|
| 53 | 53 | add_filter( "validation_{$_sPageSlug}", array( $this, '_replyToValidateOptions' ), 10, 4 ); |
| 54 | 54 | add_filter( "options_update_status_{$_sPageSlug}", array( $this, '_replyToModifyOptionsUpdateStatus' ) ); |
| 55 | 55 | continue; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | // At this point, the array key is the page slug. It means the user specified the tab(s). |
| 59 | 59 | $_sPageSlug = $_sIndexOrPageSlug; |
| 60 | 60 | $_aTabs = $_asTabArrayOrPageSlug; |
| 61 | - foreach( $_aTabs as $_sTabSlug ) { |
|
| 61 | + foreach ( $_aTabs as $_sTabSlug ) { |
|
| 62 | 62 | add_filter( "validation_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToValidateOptions' ), 10, 4 ); |
| 63 | 63 | add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 ); // 3.4.1+ |
| 64 | 64 | add_filter( "options_update_status_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToModifyOptionsUpdateStatus' ) ); |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | * @return void |
| 79 | 79 | * @callback action add_meta_boxes |
| 80 | 80 | */ |
| 81 | - public function _replyToRegisterMetaBoxes( $sPageHook='' ) { |
|
| 82 | - foreach( $this->oProp->aPageSlugs as $_sKey => $_asPage ) { |
|
| 83 | - if ( is_string( $_asPage ) ) { |
|
| 81 | + public function _replyToRegisterMetaBoxes( $sPageHook = '' ) { |
|
| 82 | + foreach ( $this->oProp->aPageSlugs as $_sKey => $_asPage ) { |
|
| 83 | + if ( is_string( $_asPage ) ) { |
|
| 84 | 84 | $this->_registerMetaBox( $_asPage ); |
| 85 | 85 | continue; |
| 86 | 86 | } |
@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | * @return void |
| 97 | 97 | */ |
| 98 | 98 | private function _registerMetaBoxes( $sPageSlug, $asPage ) { |
| 99 | - foreach( $this->oUtil->getAsArray( $asPage ) as $_sTabSlug ) { |
|
| 100 | - if ( ! $this->oProp->isCurrentTab( $_sTabSlug ) ) { |
|
| 99 | + foreach ( $this->oUtil->getAsArray( $asPage ) as $_sTabSlug ) { |
|
| 100 | + if ( !$this->oProp->isCurrentTab( $_sTabSlug ) ) { |
|
| 101 | 101 | continue; |
| 102 | 102 | } |
| 103 | 103 | $this->_registerMetaBox( $sPageSlug ); |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | private function _registerMetaBox( $sPageSlug ) { |
| 116 | 116 | add_meta_box( |
| 117 | - $this->oProp->sMetaBoxID, // id |
|
| 118 | - $this->oProp->sTitle, // title |
|
| 117 | + $this->oProp->sMetaBoxID, // id |
|
| 118 | + $this->oProp->sTitle, // title |
|
| 119 | 119 | array( $this, '_replyToPrintMetaBoxContents' ), // callback |
| 120 | 120 | $this->oProp->_getScreenIDOfPage( $sPageSlug ), // screen ID |
| 121 | - $this->oProp->sContext, // context |
|
| 122 | - $this->oProp->sPriority, // priority |
|
| 121 | + $this->oProp->sContext, // context |
|
| 122 | + $this->oProp->sPriority, // priority |
|
| 123 | 123 | null // argument (deprecated) |
| 124 | 124 | ); |
| 125 | 125 | } |
@@ -167,17 +167,17 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | $_aNewMetaBoxInputs = $this->oForm->getSubmittedData( $_POST ); |
| 169 | 169 | $_aOldMetaBoxInputs = $this->oUtil->castArrayContents( |
| 170 | - $this->oForm->getDataStructureFromAddedFieldsets(), // model |
|
| 170 | + $this->oForm->getDataStructureFromAddedFieldsets(), // model |
|
| 171 | 171 | $aOldPageOptions // data source |
| 172 | 172 | ); |
| 173 | 173 | |
| 174 | 174 | // Apply filters - third party scripts will have access to the input. |
| 175 | 175 | $_aNewMetaBoxInputsRaw = $_aNewMetaBoxInputs; // copy one for validation errors. |
| 176 | 176 | $_aNewMetaBoxInputs = call_user_func_array( |
| 177 | - array( $this, 'validate' ), // triggers __call() |
|
| 177 | + array( $this, 'validate' ), // triggers __call() |
|
| 178 | 178 | array( $_aNewMetaBoxInputs, $_aOldMetaBoxInputs, $this, $aSubmitInfo ) |
| 179 | 179 | ); // 3.5.3+ |
| 180 | - $_aNewMetaBoxInputs = $this->oUtil->addAndApplyFilters( |
|
| 180 | + $_aNewMetaBoxInputs = $this->oUtil->addAndApplyFilters( |
|
| 181 | 181 | $this, |
| 182 | 182 | "validation_{$this->oProp->sClassName}", |
| 183 | 183 | $_aNewMetaBoxInputs, |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | */ |
| 216 | 216 | public function _replyToModifyOptionsUpdateStatus( $aStatus ) { |
| 217 | 217 | |
| 218 | - if ( ! $this->hasFieldError() ) { |
|
| 218 | + if ( !$this->hasFieldError() ) { |
|
| 219 | 219 | return $aStatus; |
| 220 | 220 | } |
| 221 | 221 | return array( |
@@ -245,12 +245,12 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | $_aPageOptions = $this->oUtil->addAndApplyFilter( |
| 247 | 247 | $this, // the caller factory object |
| 248 | - 'options_' . $this->oProp->sClassName, |
|
| 248 | + 'options_'.$this->oProp->sClassName, |
|
| 249 | 249 | $_aPageOptions |
| 250 | 250 | ); |
| 251 | 251 | |
| 252 | 252 | return $this->oUtil->castArrayContents( |
| 253 | - $this->oForm->getDataStructureFromAddedFieldsets(), // model |
|
| 253 | + $this->oForm->getDataStructureFromAddedFieldsets(), // model |
|
| 254 | 254 | $_aPageOptions // data source |
| 255 | 255 | ); |
| 256 | 256 | |
@@ -267,9 +267,9 @@ discard block |
||
| 267 | 267 | private function _getPageMetaBoxOptionsFromPageOptions( array $aPageOptions, array $aFieldsets ) { |
| 268 | 268 | |
| 269 | 269 | $_aOptions = array(); |
| 270 | - foreach( $aFieldsets as $_sSectionID => $_aFieldsets ) { |
|
| 271 | - if ( '_default' === $_sSectionID ) { |
|
| 272 | - foreach( $_aFieldsets as $_aField ) { |
|
| 270 | + foreach ( $aFieldsets as $_sSectionID => $_aFieldsets ) { |
|
| 271 | + if ( '_default' === $_sSectionID ) { |
|
| 272 | + foreach ( $_aFieldsets as $_aField ) { |
|
| 273 | 273 | if ( array_key_exists( $_aField[ 'field_id' ], $aPageOptions ) ) { |
| 274 | 274 | $_aOptions[ $_aField[ 'field_id' ] ] = $aPageOptions[ $_aField[ 'field_id' ] ]; |
| 275 | 275 | } |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | */ |
| 136 | 136 | public function _replyToModifyActionLinks( $aActionLinks, $oPost ) { |
| 137 | 137 | |
| 138 | - if ( $oPost->post_type !== $this->oProp->sPostType ){ |
|
| 138 | + if ( $oPost->post_type !== $this->oProp->sPostType ) { |
|
| 139 | 139 | return $aActionLinks; |
| 140 | 140 | } |
| 141 | 141 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | if ( $this->oProp->bIsAdmin ) { |
| 33 | 33 | |
| 34 | - add_action( 'load_' . $this->oProp->sPostType, array( $this, '_replyToSetUpHooksForView' ) ); |
|
| 34 | + add_action( 'load_'.$this->oProp->sPostType, array( $this, '_replyToSetUpHooksForView' ) ); |
|
| 35 | 35 | |
| 36 | 36 | // 3.5.10+ |
| 37 | 37 | add_action( 'admin_menu', array( $this, '_replyToRemoveAddNewSidebarMenu' ) ); |
@@ -105,19 +105,19 @@ discard block |
||
| 105 | 105 | private function _removeAddNewSidebarSubMenu( $sMenuKey, $sPostTypeSlug ) { |
| 106 | 106 | |
| 107 | 107 | // Remove the default post type menu item. |
| 108 | - if ( ! isset( $GLOBALS[ 'submenu' ][ $sMenuKey ] ) ) { |
|
| 108 | + if ( !isset( $GLOBALS[ 'submenu' ][ $sMenuKey ] ) ) { |
|
| 109 | 109 | // logged-in users of an insufficient access level don't have the menu to be registered. |
| 110 | 110 | return; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | foreach ( $GLOBALS[ 'submenu' ][ $sMenuKey ] as $_iIndex => $_aSubMenu ) { |
| 114 | 114 | |
| 115 | - if ( ! isset( $_aSubMenu[ 2 ] ) ) { |
|
| 115 | + if ( !isset( $_aSubMenu[ 2 ] ) ) { |
|
| 116 | 116 | continue; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | // Remove the default Add New entry. |
| 120 | - if ( 'post-new.php?post_type=' . $sPostTypeSlug === $_aSubMenu[ 2 ] ) { |
|
| 120 | + if ( 'post-new.php?post_type='.$sPostTypeSlug === $_aSubMenu[ 2 ] ) { |
|
| 121 | 121 | unset( $GLOBALS[ 'submenu' ][ $sMenuKey ][ $_iIndex ] ); |
| 122 | 122 | break; |
| 123 | 123 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function _replyToModifyActionLinks( $aActionLinks, $oPost ) { |
| 136 | 136 | |
| 137 | - if ( $oPost->post_type !== $this->oProp->sPostType ){ |
|
| 137 | + if ( $oPost->post_type !== $this->oProp->sPostType ) { |
|
| 138 | 138 | return $aActionLinks; |
| 139 | 139 | } |
| 140 | 140 | |
@@ -156,12 +156,12 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function _replyToAddAuthorTableFilter() { |
| 158 | 158 | |
| 159 | - if ( ! $this->oProp->bEnableAuthorTableFileter ) { |
|
| 159 | + if ( !$this->oProp->bEnableAuthorTableFileter ) { |
|
| 160 | 160 | return; |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | if ( |
| 164 | - ! ( isset( $_GET[ 'post_type' ] ) && post_type_exists( $_GET[ 'post_type' ] ) |
|
| 164 | + !( isset( $_GET[ 'post_type' ] ) && post_type_exists( $_GET[ 'post_type' ] ) |
|
| 165 | 165 | && in_array( strtolower( $_GET[ 'post_type' ] ), array( $this->oProp->sPostType ) ) ) |
| 166 | 166 | ) { |
| 167 | 167 | return; |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | foreach ( get_object_taxonomies( $GLOBALS[ 'typenow' ] ) as $_sTaxonomySulg ) { |
| 203 | 203 | |
| 204 | - if ( ! in_array( $_sTaxonomySulg, $this->oProp->aTaxonomyTableFilters ) ) { |
|
| 204 | + if ( !in_array( $_sTaxonomySulg, $this->oProp->aTaxonomyTableFilters ) ) { |
|
| 205 | 205 | continue; |
| 206 | 206 | } |
| 207 | 207 | |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | // Echo the drop down list based on the passed array argument. |
| 216 | 216 | wp_dropdown_categories( |
| 217 | 217 | array( |
| 218 | - 'show_option_all' => $this->oMsg->get( 'show_all' ) . ' ' . $_oTaxonomy->label, |
|
| 218 | + 'show_option_all' => $this->oMsg->get( 'show_all' ).' '.$_oTaxonomy->label, |
|
| 219 | 219 | 'taxonomy' => $_sTaxonomySulg, |
| 220 | 220 | 'name' => $_oTaxonomy->name, |
| 221 | 221 | 'orderby' => 'name', |
@@ -235,24 +235,24 @@ discard block |
||
| 235 | 235 | * |
| 236 | 236 | * @internal |
| 237 | 237 | */ |
| 238 | - public function _replyToGetTableFilterQueryForTaxonomies( $oQuery=null ) { |
|
| 238 | + public function _replyToGetTableFilterQueryForTaxonomies( $oQuery = null ) { |
|
| 239 | 239 | |
| 240 | 240 | if ( 'edit.php' != $this->oProp->sPageNow ) { |
| 241 | 241 | return $oQuery; |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - if ( ! isset( $GLOBALS[ 'typenow' ] ) ) { |
|
| 244 | + if ( !isset( $GLOBALS[ 'typenow' ] ) ) { |
|
| 245 | 245 | return $oQuery; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | foreach ( get_object_taxonomies( $GLOBALS[ 'typenow' ] ) as $sTaxonomySlug ) { |
| 249 | 249 | |
| 250 | - if ( ! in_array( $sTaxonomySlug, $this->oProp->aTaxonomyTableFilters ) ) { |
|
| 250 | + if ( !in_array( $sTaxonomySlug, $this->oProp->aTaxonomyTableFilters ) ) { |
|
| 251 | 251 | continue; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | $sVar = &$oQuery->query_vars[ $sTaxonomySlug ]; |
| 255 | - if ( ! isset( $sVar ) ) { |
|
| 255 | + if ( !isset( $sVar ) ) { |
|
| 256 | 256 | continue; |
| 257 | 257 | } |
| 258 | 258 | |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $_sStyle = trim( $_sStyle ); |
| 292 | 292 | |
| 293 | 293 | // Print out the filtered styles. |
| 294 | - if ( ! empty( $_sStyle ) ) { |
|
| 294 | + if ( !empty( $_sStyle ) ) { |
|
| 295 | 295 | echo "<style type='text/css' id='admin-page-framework-style-post-type'>" |
| 296 | 296 | . $this->oProp->sStyle |
| 297 | 297 | . "</style>"; |
@@ -347,10 +347,10 @@ discard block |
||
| 347 | 347 | */ |
| 348 | 348 | public function _replyToFilterPostTypeContent( $sContent ) { |
| 349 | 349 | |
| 350 | - if ( ! is_singular() ) { |
|
| 350 | + if ( !is_singular() ) { |
|
| 351 | 351 | return $sContent; |
| 352 | 352 | } |
| 353 | - if ( ! is_main_query() ) { |
|
| 353 | + if ( !is_main_query() ) { |
|
| 354 | 354 | return $sContent; |
| 355 | 355 | } |
| 356 | 356 | global $post; |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | /** |
| 53 | 53 | * @return string |
| 54 | 54 | */ |
| 55 | - private function getReadMeContents() { |
|
| 55 | + private function getReadMeContents() { |
|
| 56 | 56 | return $this->_getReadmeContents( |
| 57 | 57 | AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/examples.txt', |
| 58 | 58 | '', |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | $_aItems = $this->getContentsByHeader( $this->getReadmeContents(), 3 ); |
| 25 | 25 | $_iLastIndex = count( $_aItems ) - 1; |
| 26 | - foreach( $_aItems as $_iIndex => $_aContent ) { |
|
| 26 | + foreach ( $_aItems as $_iIndex => $_aContent ) { |
|
| 27 | 27 | |
| 28 | 28 | $_oParser = new AdminPageFramework_WPReadmeParser; |
| 29 | 29 | $_oParser->setText( $_aContent[ 1 ] ); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $oAdminPage->addSettingSections( |
| 32 | 32 | $this->sPageSlug, // the target page slug |
| 33 | 33 | array( |
| 34 | - 'section_id' => 'examples_' . $_iIndex, |
|
| 34 | + 'section_id' => 'examples_'.$_iIndex, |
|
| 35 | 35 | 'title' => $_aContent[ 0 ], |
| 36 | 36 | 'collapsible' => array( |
| 37 | 37 | 'toggle_all_button' => $_iLastIndex === $_iIndex |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | /** |
| 53 | 53 | * @return string |
| 54 | 54 | */ |
| 55 | - private function getReadMeContents() { |
|
| 55 | + private function getReadMeContents() { |
|
| 56 | 56 | return $this->_getReadmeContents( |
| 57 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/examples.txt', |
|
| 57 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/examples.txt', |
|
| 58 | 58 | '', |
| 59 | 59 | array( 'Examples' ) |
| 60 | 60 | ); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | /** |
| 54 | 54 | * @return string |
| 55 | 55 | */ |
| 56 | - private function getReadMeContents() { |
|
| 56 | + private function getReadMeContents() { |
|
| 57 | 57 | return $this->_getReadmeContents( |
| 58 | 58 | AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', // source path |
| 59 | 59 | '', // TOC title |
@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | $_aItems = $this->getContentsByHeader( $this->getReadmeContents(), 4 ); |
| 27 | 27 | $_iLastIndex = count( $_aItems ) - 1; |
| 28 | - foreach( $_aItems as $_iIndex => $_aContent ) { |
|
| 28 | + foreach ( $_aItems as $_iIndex => $_aContent ) { |
|
| 29 | 29 | |
| 30 | 30 | $_oParser = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] ); |
| 31 | 31 | $_sContent = $_oParser->get(); |
| 32 | 32 | $oAdminPage->addSettingSections( |
| 33 | 33 | $this->sPageSlug, // the target page slug |
| 34 | 34 | array( |
| 35 | - 'section_id' => 'tips_' . $_iIndex, |
|
| 35 | + 'section_id' => 'tips_'.$_iIndex, |
|
| 36 | 36 | 'title' => $_aContent[ 0 ], |
| 37 | 37 | 'collapsible' => array( |
| 38 | 38 | 'toggle_all_button' => $_iLastIndex === $_iIndex |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | /** |
| 54 | 54 | * @return string |
| 55 | 55 | */ |
| 56 | - private function getReadMeContents() { |
|
| 56 | + private function getReadMeContents() { |
|
| 57 | 57 | return $this->_getReadmeContents( |
| 58 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', // source path |
|
| 58 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt', // source path |
|
| 59 | 59 | '', // TOC title |
| 60 | 60 | array( 'Other Notes' ) // sections |
| 61 | 61 | ); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | ), |
| 35 | 35 | 2 => __( 'Header already sent.', 'admin-page-framework-loader' ), |
| 36 | 36 | ); |
| 37 | - if ( ! class_exists( 'AdminPageFramework_AdminNotice' ) ) { |
|
| 37 | + if ( !class_exists( 'AdminPageFramework_AdminNotice' ) ) { |
|
| 38 | 38 | return; |
| 39 | 39 | } |
| 40 | 40 | new AdminPageFramework_AdminNotice( |