@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | ? $aTabDefinition[ 'tab_slug' ] |
| 50 | 50 | : ''; |
| 51 | 51 | |
| 52 | - if ( ! $this->sTabSlug ) { |
|
| 52 | + if ( !$this->sTabSlug ) { |
|
| 53 | 53 | return; |
| 54 | 54 | } |
| 55 | 55 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | if ( $aTabDefinition[ 'tab_slug' ] ) { |
| 74 | 74 | add_action( |
| 75 | - "load_{$sPageSlug}_{$aTabDefinition['tab_slug']}", |
|
| 75 | + "load_{$sPageSlug}_{$aTabDefinition[ 'tab_slug' ]}", |
|
| 76 | 76 | array( $this, 'replyToLoadTab' ) |
| 77 | 77 | ); |
| 78 | 78 | add_action( |
@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | * Stores the option values. |
| 29 | 29 | */ |
| 30 | 30 | public $aOptions = array( |
| 31 | - 'welcomed' => false, // if the welcome screen is displayed, this will be true. |
|
| 32 | - 'enable_admin_pages' => true, // whether or not to enable the admin pages of the loader plugin. |
|
| 31 | + 'welcomed' => false, // if the welcome screen is displayed, this will be true. |
|
| 32 | + 'enable_admin_pages' => true, // whether or not to enable the admin pages of the loader plugin. |
|
| 33 | 33 | 'enable_demo' => false, |
| 34 | - 'version_upgraded_from' => null, // the version number that the user has upgraded from |
|
| 35 | - 'version_saved' => null, // represents the option version. |
|
| 34 | + 'version_upgraded_from' => null, // the version number that the user has upgraded from |
|
| 35 | + 'version_saved' => null, // represents the option version. |
|
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @since 3.5.0 |
| 54 | 54 | */ |
| 55 | - static public function getInstance( $sOptionKey='' ) { |
|
| 55 | + static public function getInstance( $sOptionKey = '' ) { |
|
| 56 | 56 | |
| 57 | 57 | $sOptionKey = $sOptionKey |
| 58 | 58 | ? $sOptionKey |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function __construct( $sOptionKey ) { |
| 75 | 75 | |
| 76 | - $this->bIsNetworkAdmin = is_network_admin(); // must be done first |
|
| 76 | + $this->bIsNetworkAdmin = is_network_admin(); // must be done first |
|
| 77 | 77 | $this->sOptionKey = $sOptionKey; |
| 78 | 78 | $this->aOptions = $this->_getFormattedOptions( $sOptionKey ); |
| 79 | 79 | |
@@ -98,8 +98,8 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function hasUpgraded() { |
| 100 | 100 | |
| 101 | - $_sOptionVersion = $this->get( 'version_saved' ); |
|
| 102 | - if ( ! $_sOptionVersion ) { |
|
| 101 | + $_sOptionVersion = $this->get( 'version_saved' ); |
|
| 102 | + if ( !$_sOptionVersion ) { |
|
| 103 | 103 | return false; |
| 104 | 104 | } |
| 105 | 105 | $_sOptionVersion = $this->_getVersionByDepth( $_sOptionVersion ); |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | * Returns a stating part of version by the given depth. |
| 112 | 112 | * @since 3.5.0 |
| 113 | 113 | */ |
| 114 | - private function _getVersionByDepth( $sVersion, $iDepth=2 ) { |
|
| 115 | - if ( ! $iDepth ) { |
|
| 114 | + private function _getVersionByDepth( $sVersion, $iDepth = 2 ) { |
|
| 115 | + if ( !$iDepth ) { |
|
| 116 | 116 | return $sVersion; |
| 117 | 117 | } |
| 118 | 118 | $_aParts = explode( '.', $sVersion ); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | /** |
| 124 | 124 | * Deletes the option from the database. |
| 125 | 125 | */ |
| 126 | - public function delete() { |
|
| 126 | + public function delete() { |
|
| 127 | 127 | return $this->bIsNetworkAdmin |
| 128 | 128 | ? delete_site_option( $this->sOptionKey ) |
| 129 | 129 | : delete_option( $this->sOptionKey ); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | /** |
| 133 | 133 | * Saves the options. |
| 134 | 134 | */ |
| 135 | - public function save( $aOptions=null ) { |
|
| 135 | + public function save( $aOptions = null ) { |
|
| 136 | 136 | |
| 137 | 137 | $_aOptions = $aOptions ? $aOptions : $this->aOptions; |
| 138 | 138 | return $this->bIsNetworkAdmin |
@@ -151,15 +151,15 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function set( /* $asKeys, $mValue */ ) { |
| 153 | 153 | |
| 154 | - $_aParameters = func_get_args(); |
|
| 155 | - if ( ! isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) { |
|
| 154 | + $_aParameters = func_get_args(); |
|
| 155 | + if ( !isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) { |
|
| 156 | 156 | return; |
| 157 | 157 | } |
| 158 | 158 | $_asKeys = $_aParameters[ 0 ]; |
| 159 | 159 | $_mValue = $_aParameters[ 1 ]; |
| 160 | 160 | |
| 161 | 161 | // string, integer, float, boolean |
| 162 | - if ( ! is_array( $_asKeys ) ) { |
|
| 162 | + if ( !is_array( $_asKeys ) ) { |
|
| 163 | 163 | $this->aOptions[ $_asKeys ] = $_mValue; |
| 164 | 164 | return; |
| 165 | 165 | } |
@@ -174,8 +174,8 @@ discard block |
||
| 174 | 174 | */ |
| 175 | 175 | public function update( /* $asKeys, $mValue */ ) { |
| 176 | 176 | |
| 177 | - $_aParameters = func_get_args(); |
|
| 178 | - call_user_func_array( array( $this, 'set' ), $_aParameters ); |
|
| 177 | + $_aParameters = func_get_args(); |
|
| 178 | + call_user_func_array( array( $this, 'set' ), $_aParameters ); |
|
| 179 | 179 | $this->save(); |
| 180 | 180 | |
| 181 | 181 | } |
@@ -189,11 +189,11 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | $_mDefault = null; |
| 191 | 191 | $_aKeys = func_get_args(); |
| 192 | - if ( ! isset( $_aKeys[ 0 ] ) ) { |
|
| 192 | + if ( !isset( $_aKeys[ 0 ] ) ) { |
|
| 193 | 193 | return null; |
| 194 | 194 | } |
| 195 | 195 | if ( is_array( $_aKeys[ 0 ] ) ) { |
| 196 | - $_aKeys = $_aKeys[ 0 ]; |
|
| 196 | + $_aKeys = $_aKeys[ 0 ]; |
|
| 197 | 197 | $_mDefault = isset( $_aKeys[ 1 ] ) |
| 198 | 198 | ? $_aKeys[ 1 ] |
| 199 | 199 | : null; |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | /** |
| 124 | 124 | * Deletes the option from the database. |
| 125 | 125 | */ |
| 126 | - public function delete() { |
|
| 126 | + public function delete() { |
|
| 127 | 127 | return $this->bIsNetworkAdmin |
| 128 | 128 | ? delete_site_option( $this->sOptionKey ) |
| 129 | 129 | : delete_option( $this->sOptionKey ); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $GLOBALS, |
| 47 | 47 | array( 'aAdminPageFramework', 'aPageClasses', $this->sClassName ) |
| 48 | 48 | ), |
| 49 | - 'options_' . $this->sClassName, // options_{instantiated class name} |
|
| 49 | + 'options_'.$this->sClassName, // options_{instantiated class name} |
|
| 50 | 50 | $this->sOptionKey |
| 51 | 51 | ? get_site_option( $this->sOptionKey, array() ) |
| 52 | 52 | : array() |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * @since 3.1.1 Made it return a boolean value. |
| 65 | 65 | * @return boolean True if saved; otherwise, false. |
| 66 | 66 | */ |
| 67 | - public function updateOption( $aOptions=null ) { |
|
| 67 | + public function updateOption( $aOptions = null ) { |
|
| 68 | 68 | |
| 69 | 69 | if ( $this->_bDisableSavingOptions ) { |
| 70 | 70 | return; |
@@ -40,14 +40,14 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public static function instantiate( $oProp, $oMsg ) { |
| 42 | 42 | |
| 43 | - if ( ! is_network_admin() ) { |
|
| 43 | + if ( !is_network_admin() ) { |
|
| 44 | 44 | return; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | if ( in_array( $oProp->sClassName, self::$aClassNames ) ) |
| 48 | 48 | return self::$_oInstance; |
| 49 | 49 | |
| 50 | - self::$aClassNames[] = $oProp->sClassName; |
|
| 50 | + self::$aClassNames[ ] = $oProp->sClassName; |
|
| 51 | 51 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_NetworkAdminPage( $oProp, $oMsg ); |
| 52 | 52 | |
| 53 | 53 | return self::$_oInstance; |
@@ -42,11 +42,11 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public static function instantiate( $oProp, $oMsg ) { |
| 44 | 44 | |
| 45 | - if ( ! is_network_admin() ) { |
|
| 45 | + if ( ! is_network_admin() ) { |
|
| 46 | 46 | return; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if ( in_array( $oProp->sClassName, self::$aClassNames ) ) { |
|
| 49 | + if ( in_array( $oProp->sClassName, self::$aClassNames ) ) { |
|
| 50 | 50 | return self::$_oInstance; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -20,5 +20,5 @@ |
||
| 20 | 20 | * @extends AdminPageFramework_Resource_post_meta_box |
| 21 | 21 | * @internal |
| 22 | 22 | */ |
| 23 | -class AdminPageFramework_Resource_user_meta extends AdminPageFramework_Resource_post_meta_box { |
|
| 23 | +class AdminPageFramework_Resource_user_meta extends AdminPageFramework_Resource_post_meta_box { |
|
| 24 | 24 | } |
@@ -56,10 +56,10 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) { |
| 58 | 58 | |
| 59 | - if ( ! $this->_isInstantiatable() ) { |
|
| 59 | + if ( ! $this->_isInstantiatable() ) { |
|
| 60 | 60 | return; |
| 61 | 61 | } |
| 62 | - if ( empty( $asPostTypeOrScreenID ) ) { |
|
| 62 | + if ( empty( $asPostTypeOrScreenID ) ) { |
|
| 63 | 63 | return; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | * @param string $sTextDomain (optional) The text domain applied to the displayed text messages. Default: `admin-page-framework`. |
| 55 | 55 | * @return void |
| 56 | 56 | */ |
| 57 | - public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) { |
|
| 57 | + public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) { |
|
| 58 | 58 | |
| 59 | - if ( ! $this->_isInstantiatable() ) { |
|
| 59 | + if ( !$this->_isInstantiatable() ) { |
|
| 60 | 60 | return; |
| 61 | 61 | } |
| 62 | 62 | if ( empty( $asPostTypeOrScreenID ) ) { |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | // A property object needs to be done first. |
| 67 | 67 | $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] ) |
| 68 | 68 | ? $this->aSubClassNames[ 'oProp' ] |
| 69 | - : 'AdminPageFramework_Property_' . $this->_sStructureType; |
|
| 70 | - $this->oProp = new $_sProprtyClassName( |
|
| 69 | + : 'AdminPageFramework_Property_'.$this->_sStructureType; |
|
| 70 | + $this->oProp = new $_sProprtyClassName( |
|
| 71 | 71 | $this, |
| 72 | 72 | get_class( $this ), |
| 73 | 73 | $sCapability, |
| 74 | 74 | $sTextDomain, |
| 75 | 75 | $this->_sStructureType |
| 76 | 76 | ); |
| 77 | - $this->oProp->aPostTypes = is_string( $asPostTypeOrScreenID ) |
|
| 77 | + $this->oProp->aPostTypes = is_string( $asPostTypeOrScreenID ) |
|
| 78 | 78 | ? array( $asPostTypeOrScreenID ) |
| 79 | 79 | : $asPostTypeOrScreenID; |
| 80 | 80 | |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | return false; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) { |
|
| 73 | + if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) { |
|
| 74 | 74 | return false; |
| 75 | 75 | } |
| 76 | 76 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param string $sTextDomain (optional) The text domain applied to the displayed text messages. Default: `admin-page-framework`. |
| 34 | 34 | * @return void |
| 35 | 35 | */ |
| 36 | - public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) { |
|
| 36 | + public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) { |
|
| 37 | 37 | |
| 38 | 38 | parent::__construct( $this->oProp ); |
| 39 | 39 | |
@@ -41,15 +41,15 @@ discard block |
||
| 41 | 41 | ? $this->oUtil->sanitizeSlug( $sMetaBoxID ) |
| 42 | 42 | : strtolower( $this->oProp->sClassName ); |
| 43 | 43 | $this->oProp->sTitle = $sTitle; |
| 44 | - $this->oProp->sContext = $sContext; // 'normal', 'advanced', or 'side' |
|
| 45 | - $this->oProp->sPriority = $sPriority; // 'high', 'core', 'default' or 'low' |
|
| 44 | + $this->oProp->sContext = $sContext; // 'normal', 'advanced', or 'side' |
|
| 45 | + $this->oProp->sPriority = $sPriority; // 'high', 'core', 'default' or 'low' |
|
| 46 | 46 | |
| 47 | - if ( ! $this->oProp->bIsAdmin ) { |
|
| 47 | + if ( !$this->oProp->bIsAdmin ) { |
|
| 48 | 48 | return; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | // 3.8.14 |
| 52 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToCallLoadMethods' ), 100 ); |
|
| 52 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToCallLoadMethods' ), 100 ); |
|
| 53 | 53 | |
| 54 | 54 | $this->oUtil->registerAction( |
| 55 | 55 | $this->oProp->bIsAdminAjax |
@@ -86,11 +86,11 @@ discard block |
||
| 86 | 86 | return true; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - if ( ! in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) { |
|
| 89 | + if ( !in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) { |
|
| 90 | 90 | return false; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) { |
|
| 93 | + if ( !in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) { |
|
| 94 | 94 | return false; |
| 95 | 95 | } |
| 96 | 96 | |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | * @since 2.1.5 |
| 31 | 31 | * @internal |
| 32 | 32 | */ |
| 33 | - public function _enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 33 | + public function _enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 34 | 34 | |
| 35 | 35 | $_aHandleIDs = array(); |
| 36 | - foreach( ( array ) $aSRCs as $_sSRC ) { |
|
| 37 | - $_aHandleIDs[] = $this->_enqueueStyle( $_sSRC, $aPostTypes, $aCustomArgs ); |
|
| 36 | + foreach ( ( array ) $aSRCs as $_sSRC ) { |
|
| 37 | + $_aHandleIDs[ ] = $this->_enqueueStyle( $_sSRC, $aPostTypes, $aCustomArgs ); |
|
| 38 | 38 | } |
| 39 | 39 | return $_aHandleIDs; |
| 40 | 40 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 59 | 59 | * @internal |
| 60 | 60 | */ |
| 61 | - public function _enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 61 | + public function _enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 62 | 62 | |
| 63 | 63 | $sSRC = trim( $sSRC ); |
| 64 | 64 | if ( empty( $sSRC ) ) { return ''; } |
@@ -74,13 +74,13 @@ discard block |
||
| 74 | 74 | 'sSRC' => $sSRC, |
| 75 | 75 | 'aPostTypes' => empty( $aPostTypes ) ? $this->oProp->aPostTypes : $aPostTypes, |
| 76 | 76 | 'sType' => 'style', |
| 77 | - 'handle_id' => 'style_' . $this->oProp->sClassName . '_' . ( ++$this->oProp->iEnqueuedStyleIndex ), |
|
| 77 | + 'handle_id' => 'style_'.$this->oProp->sClassName.'_'.( ++$this->oProp->iEnqueuedStyleIndex ), |
|
| 78 | 78 | ), |
| 79 | 79 | self::$_aStructure_EnqueuingResources |
| 80 | 80 | ); |
| 81 | 81 | |
| 82 | 82 | // Store the attributes in another container by url. |
| 83 | - $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingStyles[ $_sSRCHash ]['handle_id'] ] = $this->oProp->aEnqueuingStyles[ $_sSRCHash ]['attributes']; |
|
| 83 | + $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'attributes' ]; |
|
| 84 | 84 | |
| 85 | 85 | return $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'handle_id' ]; |
| 86 | 86 | |
@@ -92,11 +92,11 @@ discard block |
||
| 92 | 92 | * @since 2.1.5 |
| 93 | 93 | * @internal |
| 94 | 94 | */ |
| 95 | - public function _enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 95 | + public function _enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 96 | 96 | |
| 97 | 97 | $_aHandleIDs = array(); |
| 98 | - foreach( ( array ) $aSRCs as $_sSRC ) { |
|
| 99 | - $_aHandleIDs[] = $this->_enqueueScript( $_sSRC, $aPostTypes, $aCustomArgs ); |
|
| 98 | + foreach ( ( array ) $aSRCs as $_sSRC ) { |
|
| 99 | + $_aHandleIDs[ ] = $this->_enqueueScript( $_sSRC, $aPostTypes, $aCustomArgs ); |
|
| 100 | 100 | } |
| 101 | 101 | return $_aHandleIDs; |
| 102 | 102 | |
@@ -121,9 +121,9 @@ discard block |
||
| 121 | 121 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 122 | 122 | * @internal |
| 123 | 123 | */ |
| 124 | - public function _enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 124 | + public function _enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 125 | 125 | |
| 126 | - $sSRC = trim( $sSRC ); |
|
| 126 | + $sSRC = trim( $sSRC ); |
|
| 127 | 127 | if ( empty( $sSRC ) ) { |
| 128 | 128 | return ''; |
| 129 | 129 | } |
@@ -141,13 +141,13 @@ discard block |
||
| 141 | 141 | 'sSRC' => $sSRC, |
| 142 | 142 | 'aPostTypes' => empty( $aPostTypes ) ? $this->oProp->aPostTypes : $aPostTypes, |
| 143 | 143 | 'sType' => 'script', |
| 144 | - 'handle_id' => 'script_' . $this->oProp->sClassName . '_' . ( ++$this->oProp->iEnqueuedScriptIndex ), |
|
| 144 | + 'handle_id' => 'script_'.$this->oProp->sClassName.'_'.( ++$this->oProp->iEnqueuedScriptIndex ), |
|
| 145 | 145 | ), |
| 146 | 146 | self::$_aStructure_EnqueuingResources |
| 147 | 147 | ); |
| 148 | 148 | |
| 149 | 149 | // Store the attributes in another container by url. |
| 150 | - $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingScripts[ $_sSRCHash ]['handle_id'] ] = $this->oProp->aEnqueuingScripts[ $_sSRCHash ]['attributes']; |
|
| 150 | + $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'attributes' ]; |
|
| 151 | 151 | |
| 152 | 152 | return $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'handle_id' ]; |
| 153 | 153 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * @since 3.0.0 |
| 160 | 160 | * @internal |
| 161 | 161 | */ |
| 162 | - public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) { |
|
| 162 | + public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) { |
|
| 163 | 163 | return $this->_enqueueStyle( $sSRC, array(), $aCustomArgs ); |
| 164 | 164 | } |
| 165 | 165 | /** |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | * @since 3.0.0 |
| 169 | 169 | * @internal |
| 170 | 170 | */ |
| 171 | - public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) { |
|
| 171 | + public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) { |
|
| 172 | 172 | return $this->_enqueueScript( $sSRC, array(), $aCustomArgs ); |
| 173 | 173 | } |
| 174 | 174 | |
@@ -181,8 +181,8 @@ discard block |
||
| 181 | 181 | */ |
| 182 | 182 | protected function _enqueueSRCByCondition( $aEnqueueItem ) { |
| 183 | 183 | |
| 184 | - $_sCurrentPostType = isset( $_GET['post_type'] ) ? $_GET['post_type'] : ( isset( $GLOBALS['typenow'] ) ? $GLOBALS['typenow'] : null ); |
|
| 185 | - if ( in_array( $_sCurrentPostType, $aEnqueueItem['aPostTypes'] ) ) { |
|
| 184 | + $_sCurrentPostType = isset( $_GET[ 'post_type' ] ) ? $_GET[ 'post_type' ] : ( isset( $GLOBALS[ 'typenow' ] ) ? $GLOBALS[ 'typenow' ] : null ); |
|
| 185 | + if ( in_array( $_sCurrentPostType, $aEnqueueItem[ 'aPostTypes' ] ) ) { |
|
| 186 | 186 | return $this->_enqueueSRC( $aEnqueueItem ); |
| 187 | 187 | } |
| 188 | 188 | |
@@ -124,14 +124,14 @@ |
||
| 124 | 124 | public function _enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
| 125 | 125 | |
| 126 | 126 | $sSRC = trim( $sSRC ); |
| 127 | - if ( empty( $sSRC ) ) { |
|
| 127 | + if ( empty( $sSRC ) ) { |
|
| 128 | 128 | return ''; |
| 129 | 129 | } |
| 130 | 130 | $sSRC = $this->getResolvedSRC( $sSRC ); |
| 131 | 131 | |
| 132 | 132 | // Setting the key based on the url prevents duplicate items |
| 133 | 133 | $_sSRCHash = md5( $sSRC ); |
| 134 | - if ( isset( $this->oProp->aEnqueuingScripts[ $_sSRCHash ] ) ) { |
|
| 134 | + if ( isset( $this->oProp->aEnqueuingScripts[ $_sSRCHash ] ) ) { |
|
| 135 | 135 | return ''; |
| 136 | 136 | } |
| 137 | 137 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @since 2.1.0 Moved from the meta box class. |
| 36 | 36 | * @var string |
| 37 | 37 | */ |
| 38 | - public $sMetaBoxID =''; |
|
| 38 | + public $sMetaBoxID = ''; |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * Stores the post type slugs associated with the meta box. |
@@ -138,14 +138,14 @@ discard block |
||
| 138 | 138 | /** |
| 139 | 139 | * Calls the parent constructor by formatting the parameter values. |
| 140 | 140 | */ |
| 141 | - public function __construct( $oCaller, $sClassName, $sCapability='edit_posts', $sTextDomain='admin-page-framework', $sStructureType='post_meta_box' ) { |
|
| 141 | + public function __construct( $oCaller, $sClassName, $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework', $sStructureType = 'post_meta_box' ) { |
|
| 142 | 142 | |
| 143 | 143 | parent::__construct( |
| 144 | - $oCaller, // caller object |
|
| 145 | - null, // caller script path - meta boxes don't need the caller script path. |
|
| 146 | - $sClassName, // class name |
|
| 147 | - $sCapability, // capability |
|
| 148 | - $sTextDomain, // text domain |
|
| 144 | + $oCaller, // caller object |
|
| 145 | + null, // caller script path - meta boxes don't need the caller script path. |
|
| 146 | + $sClassName, // class name |
|
| 147 | + $sCapability, // capability |
|
| 148 | + $sTextDomain, // text domain |
|
| 149 | 149 | $sStructureType // structure type |
| 150 | 150 | ); |
| 151 | 151 | |