@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $_sTag = $this->_getInPageTabTag( $sTag, $_aPage ); |
| 74 | 74 | |
| 75 | 75 | // If the in-page tabs' visibility is set to false, returns the title. |
| 76 | - if ( ! $_aPage[ 'show_in_page_tabs' ] ) { |
|
| 76 | + if ( !$_aPage[ 'show_in_page_tabs' ] ) { |
|
| 77 | 77 | return isset( $aInPageTabs[ $_sCurrentTabSlug ][ 'title' ] ) |
| 78 | 78 | ? "<{$_sTag}>" |
| 79 | 79 | . $aInPageTabs[ $_sCurrentTabSlug ][ 'title' ] |
@@ -100,9 +100,9 @@ discard block |
||
| 100 | 100 | private function _getInPageTabNavigationBar( array $aTabs, $sActiveTab, $sCurrentPageSlug, $sTag ) { |
| 101 | 101 | |
| 102 | 102 | $_oTabBar = new AdminPageFramework_TabNavigationBar( |
| 103 | - $aTabs, // tabs |
|
| 103 | + $aTabs, // tabs |
|
| 104 | 104 | $sActiveTab, // active tab slug |
| 105 | - $sTag, // container tag |
|
| 105 | + $sTag, // container tag |
|
| 106 | 106 | array( // container attributes |
| 107 | 107 | 'class' => 'in-page-tab', |
| 108 | 108 | ), |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * @since 3.5.10 |
| 131 | 131 | * @since 3.6.3 Moved from `AdminPageFramework_Page_View`. |
| 132 | 132 | */ |
| 133 | - public function _replyToFormatNavigationTabItem_InPageTab( array $aTab, array $aStructure, array $aTabs, array $aArguments=array() ) { |
|
| 133 | + public function _replyToFormatNavigationTabItem_InPageTab( array $aTab, array $aStructure, array $aTabs, array $aArguments = array() ) { |
|
| 134 | 134 | $_oFormatter = new AdminPageFramework_Format_NavigationTab_InPageTab( |
| 135 | 135 | $aTab, |
| 136 | 136 | $aStructure, |
@@ -18,32 +18,32 @@ |
||
| 18 | 18 | abstract class AdminPageFramework_MetaBox_Controller extends AdminPageFramework_MetaBox_View { |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | - * The method for all necessary set-ups. |
|
| 22 | - * |
|
| 23 | - * <h4>Example</h4> |
|
| 24 | - * <code> public function setUp() { |
|
| 25 | - * $this->addSettingFields( |
|
| 26 | - * array( |
|
| 27 | - * 'field_id' => 'sample_metabox_text_field', |
|
| 28 | - * 'title' => 'Text Input', |
|
| 29 | - * 'description' => 'The description for the field.', |
|
| 30 | - * 'type' => 'text', |
|
| 31 | - * ), |
|
| 32 | - * array( |
|
| 33 | - * 'field_id' => 'sample_metabox_textarea_field', |
|
| 34 | - * 'title' => 'Textarea', |
|
| 35 | - * 'description' => 'The description for the field.', |
|
| 36 | - * 'type' => 'textarea', |
|
| 37 | - * 'default' => 'This is a default text value.', |
|
| 38 | - * ) |
|
| 39 | - * ); |
|
| 40 | - * }</code> |
|
| 41 | - * |
|
| 42 | - * @abstract |
|
| 43 | - * @since 2.0.0 |
|
| 44 | - * @remark The user should override this method. |
|
| 45 | - * @return void |
|
| 46 | - */ |
|
| 21 | + * The method for all necessary set-ups. |
|
| 22 | + * |
|
| 23 | + * <h4>Example</h4> |
|
| 24 | + * <code> public function setUp() { |
|
| 25 | + * $this->addSettingFields( |
|
| 26 | + * array( |
|
| 27 | + * 'field_id' => 'sample_metabox_text_field', |
|
| 28 | + * 'title' => 'Text Input', |
|
| 29 | + * 'description' => 'The description for the field.', |
|
| 30 | + * 'type' => 'text', |
|
| 31 | + * ), |
|
| 32 | + * array( |
|
| 33 | + * 'field_id' => 'sample_metabox_textarea_field', |
|
| 34 | + * 'title' => 'Textarea', |
|
| 35 | + * 'description' => 'The description for the field.', |
|
| 36 | + * 'type' => 'textarea', |
|
| 37 | + * 'default' => 'This is a default text value.', |
|
| 38 | + * ) |
|
| 39 | + * ); |
|
| 40 | + * }</code> |
|
| 41 | + * |
|
| 42 | + * @abstract |
|
| 43 | + * @since 2.0.0 |
|
| 44 | + * @remark The user should override this method. |
|
| 45 | + * @return void |
|
| 46 | + */ |
|
| 47 | 47 | public function setUp() {} |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * |
| 67 | 67 | * @since 3.5.0 |
| 68 | 68 | */ |
| 69 | - public function enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 69 | + public function enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 70 | 70 | return $this->oResource->_enqueueStyles( $aSRCs, $aPostTypes, $aCustomArgs ); |
| 71 | 71 | } |
| 72 | 72 | /** |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @param array (optional) The argument array for more advanced parameters. |
| 90 | 90 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 91 | 91 | */ |
| 92 | - public function enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 92 | + public function enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 93 | 93 | return $this->oResource->_enqueueStyle( $sSRC, $aPostTypes, $aCustomArgs ); |
| 94 | 94 | } |
| 95 | 95 | /** |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * |
| 98 | 98 | * @since 3.5.0 |
| 99 | 99 | */ |
| 100 | - public function enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 100 | + public function enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 101 | 101 | return $this->oResource->_enqueueScripts( $aSRCs, $aPostTypes, $aCustomArgs ); |
| 102 | 102 | } |
| 103 | 103 | /** |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * @param array (optional) The argument array for more advanced parameters. |
| 133 | 133 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 134 | 134 | */ |
| 135 | - public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 135 | + public function enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
| 136 | 136 | return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs ); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | * @param array (optional) The argument array for more advanced parameters. |
| 133 | 133 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 134 | 134 | */ |
| 135 | - public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 135 | + public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
| 136 | 136 | return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs ); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -136,11 +136,11 @@ |
||
| 136 | 136 | * |
| 137 | 137 | * Triggered when a post has not been created so no post id is assigned. |
| 138 | 138 | * |
| 139 | - * @internal |
|
| 139 | + * @internal |
|
| 140 | 140 | * @since 3.3.0 |
| 141 | 141 | * @callback filter wp_insert_attachment_data |
| 142 | 142 | * @callback filter wp_insert_post_data |
| 143 | - * @param array $aPostData An array of slashed post data. |
|
| 143 | + * @param array $aPostData An array of slashed post data. |
|
| 144 | 144 | * @param array $aUnmodified An array of sanitized, but otherwise unmodified post data. |
| 145 | 145 | */ |
| 146 | 146 | public function _replyToFilterSavingData( $aPostData, $aUnmodified ) { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @internal |
| 115 | 115 | * @return integer The found post ID. `0` if not found. |
| 116 | 116 | */ |
| 117 | - private function _getPostID() { |
|
| 117 | + private function _getPostID() { |
|
| 118 | 118 | |
| 119 | 119 | // for an editing post page. |
| 120 | 120 | if ( isset( $GLOBALS[ 'post' ]->ID ) ) { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | public function _replyToFilterSavingData( $aPostData, $aUnmodified ) { |
| 147 | 147 | |
| 148 | 148 | // Perform initial checks. |
| 149 | - if ( ! $this->_shouldProceedValidation( $aUnmodified ) ) { |
|
| 149 | + if ( ! $this->_shouldProceedValidation( $aUnmodified ) ) { |
|
| 150 | 150 | return $aPostData; |
| 151 | 151 | } |
| 152 | 152 | |
@@ -236,12 +236,12 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | private function _shouldProceedValidation( array $aUnmodified ) { |
| 238 | 238 | |
| 239 | - if ( 'auto-draft' === $aUnmodified[ 'post_status' ] ) { |
|
| 239 | + if ( 'auto-draft' === $aUnmodified[ 'post_status' ] ) { |
|
| 240 | 240 | return false; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | // Bail if we're doing an auto save |
| 244 | - if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { |
|
| 244 | + if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { |
|
| 245 | 245 | return false; |
| 246 | 246 | } |
| 247 | 247 | |
@@ -22,12 +22,12 @@ discard block |
||
| 22 | 22 | * Sets up hooks. |
| 23 | 23 | * @since 3.7.9 |
| 24 | 24 | */ |
| 25 | - public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) { |
|
| 25 | + public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) { |
|
| 26 | 26 | |
| 27 | 27 | // This is important to set the hooks before the parent constructor |
| 28 | 28 | // as the setUp wil be called in there if the default action hook (current_screen) is already triggered. |
| 29 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) ); |
|
| 30 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToSetUpValidationHooks' ) ); |
|
| 29 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) ); |
|
| 30 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToSetUpValidationHooks' ) ); |
|
| 31 | 31 | |
| 32 | 32 | parent::__construct( |
| 33 | 33 | $sMetaBoxID, |
@@ -107,14 +107,14 @@ discard block |
||
| 107 | 107 | * @callback action add_meta_boxes |
| 108 | 108 | */ |
| 109 | 109 | public function _replyToRegisterMetaBoxes() { |
| 110 | - foreach( $this->oProp->aPostTypes as $sPostType ) { |
|
| 110 | + foreach ( $this->oProp->aPostTypes as $sPostType ) { |
|
| 111 | 111 | add_meta_box( |
| 112 | - $this->oProp->sMetaBoxID, // id |
|
| 113 | - $this->oProp->sTitle, // title |
|
| 112 | + $this->oProp->sMetaBoxID, // id |
|
| 113 | + $this->oProp->sTitle, // title |
|
| 114 | 114 | array( $this, '_replyToPrintMetaBoxContents' ), // callback |
| 115 | - $sPostType, // post type |
|
| 116 | - $this->oProp->sContext, // context |
|
| 117 | - $this->oProp->sPriority, // priority |
|
| 115 | + $sPostType, // post type |
|
| 116 | + $this->oProp->sContext, // context |
|
| 117 | + $this->oProp->sPriority, // priority |
|
| 118 | 118 | null // argument - deprecated $this->oForm->aFields |
| 119 | 119 | ); |
| 120 | 120 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * @internal |
| 147 | 147 | * @return integer The found post ID. `0` if not found. |
| 148 | 148 | */ |
| 149 | - private function _getPostID() { |
|
| 149 | + private function _getPostID() { |
|
| 150 | 150 | |
| 151 | 151 | // for an editing post page. |
| 152 | 152 | if ( isset( $GLOBALS[ 'post' ]->ID ) ) { |
@@ -178,14 +178,14 @@ discard block |
||
| 178 | 178 | public function _replyToFilterSavingData( $aPostData, $aUnmodified ) { |
| 179 | 179 | |
| 180 | 180 | // Perform initial checks. |
| 181 | - if ( ! $this->_shouldProceedValidation( $aUnmodified ) ) { |
|
| 181 | + if ( !$this->_shouldProceedValidation( $aUnmodified ) ) { |
|
| 182 | 182 | return $aPostData; |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | // Retrieve the submitted data. |
| 186 | - $_aInputs = $this->oForm->getSubmittedData( |
|
| 187 | - $_POST, // subject data to be parsed |
|
| 188 | - true, // extract data with the fieldset structure |
|
| 186 | + $_aInputs = $this->oForm->getSubmittedData( |
|
| 187 | + $_POST, // subject data to be parsed |
|
| 188 | + true, // extract data with the fieldset structure |
|
| 189 | 189 | false // strip slashes |
| 190 | 190 | ); |
| 191 | 191 | $_aInputsRaw = $_aInputs; // store one for the last input array. |
@@ -220,8 +220,8 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | $this->oForm->updateMetaDataByType( |
| 223 | - $_iPostID, // object id |
|
| 224 | - $_aInputs, // user submit form data |
|
| 223 | + $_iPostID, // object id |
|
| 224 | + $_aInputs, // user submit form data |
|
| 225 | 225 | $this->oForm->dropRepeatableElements( $_aSavedMeta ), // Drop repeatable section elements from the saved meta array. |
| 226 | 226 | $this->oForm->sStructureType // fields type |
| 227 | 227 | ); |
@@ -278,14 +278,14 @@ discard block |
||
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | // If our nonce isn't there, or we can't verify it, bail |
| 281 | - if ( ! isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) { |
|
| 281 | + if ( !isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) { |
|
| 282 | 282 | return false; |
| 283 | 283 | } |
| 284 | - if ( ! wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) { |
|
| 284 | + if ( !wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) { |
|
| 285 | 285 | return false; |
| 286 | 286 | } |
| 287 | 287 | |
| 288 | - if ( ! in_array( $aUnmodified[ 'post_type' ], $this->oProp->aPostTypes ) ) { |
|
| 288 | + if ( !in_array( $aUnmodified[ 'post_type' ], $this->oProp->aPostTypes ) ) { |
|
| 289 | 289 | return false; |
| 290 | 290 | } |
| 291 | 291 | |
@@ -32,6 +32,8 @@ |
||
| 32 | 32 | * Sets up properties and hooks. |
| 33 | 33 | * |
| 34 | 34 | * @since 3.0.4 |
| 35 | + * @param string $sMetaBoxID |
|
| 36 | + * @param string $sTitle |
|
| 35 | 37 | */ |
| 36 | 38 | public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs=array(), $sContext='normal', $sPriority='default', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
| 37 | 39 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | * @return void |
| 28 | 28 | * @internal |
| 29 | 29 | */ |
| 30 | - public function _replyToPrintMetaBoxContents( $oPost, $vArgs ) { |
|
| 30 | + public function _replyToPrintMetaBoxContents( $oPost, $vArgs ) { |
|
| 31 | 31 | |
| 32 | 32 | // Use nonce for verification |
| 33 | 33 | $_aOutput = array(); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | // Use nonce for verification |
| 33 | 33 | $_aOutput = array(); |
| 34 | - $_aOutput[] = wp_nonce_field( |
|
| 34 | + $_aOutput[ ] = wp_nonce_field( |
|
| 35 | 35 | $this->oProp->sMetaBoxID, |
| 36 | 36 | $this->oProp->sMetaBoxID, |
| 37 | 37 | true, |
@@ -40,11 +40,11 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | // Get the fields output. If no field is added, the form object is not instantiated. |
| 42 | 42 | if ( isset( $this->oForm ) ) { |
| 43 | - $_aOutput[] = $this->oForm->get(); |
|
| 43 | + $_aOutput[ ] = $this->oForm->get(); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // Do actions |
| 47 | - $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this ); |
|
| 47 | + $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this ); |
|
| 48 | 48 | |
| 49 | 49 | // Render the filtered output. |
| 50 | 50 | echo $this->oUtil->addAndApplyFilters( |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | * @since DEVVER |
| 22 | 22 | * @return string |
| 23 | 23 | */ |
| 24 | - protected function _get() { |
|
| 24 | + protected function _get() { |
|
| 25 | 25 | return $this->_getRules(); |
| 26 | 26 | } |
| 27 | 27 | /** |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | * @param string $sTextDomain (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: `admin-page-framework`. |
| 56 | 56 | * @return void returns nothing. |
| 57 | 57 | */ |
| 58 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ){ |
|
| 58 | + public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ) { |
|
| 59 | 59 | |
| 60 | 60 | if ( ! $this->_isInstantiatable() ) { |
| 61 | 61 | return; |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | protected $_aBuiltInRootMenuSlugs = array( |
| 41 | 41 | // All keys must be lower case to support case insensitive look-ups. |
| 42 | 42 | 'dashboard' => 'index.php', |
| 43 | - 'sites' => 'sites.php', // not work |
|
| 44 | - 'themes' => 'themes.php', // not work |
|
| 43 | + 'sites' => 'sites.php', // not work |
|
| 44 | + 'themes' => 'themes.php', // not work |
|
| 45 | 45 | 'plugins' => 'plugins.php', |
| 46 | 46 | 'users' => 'users.php', |
| 47 | 47 | 'settings' => 'settings.php', |
| 48 | - 'updates' => 'update-core.php', // does not work |
|
| 48 | + 'updates' => 'update-core.php', // does not work |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | * @param string $sTextDomain (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: `admin-page-framework`. |
| 67 | 67 | * @return void returns nothing. |
| 68 | 68 | */ |
| 69 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ){ |
|
| 69 | + public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_network', $sTextDomain = 'admin-page-framework' ) { |
|
| 70 | 70 | |
| 71 | - if ( ! $this->_isInstantiatable() ) { |
|
| 71 | + if ( !$this->_isInstantiatable() ) { |
|
| 72 | 72 | return; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | $sCallerPath = $sCallerPath |
| 76 | 76 | ? $sCallerPath |
| 77 | - : AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ); // this is important to attempt to find the caller script path here when separating the library into multiple files. |
|
| 77 | + : AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ); // this is important to attempt to find the caller script path here when separating the library into multiple files. |
|
| 78 | 78 | |
| 79 | 79 | parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain ); |
| 80 | 80 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | * @param mixed $vDefault the default value that will be returned if nothing is stored. |
| 159 | 159 | * @return mixed If the field ID is not specified. |
| 160 | 160 | */ |
| 161 | - static public function getOption( $sOptionKey, $asKey=null , $vDefault=null ) { |
|
| 161 | + static public function getOption( $sOptionKey, $asKey = null, $vDefault = null ) { |
|
| 162 | 162 | return AdminPageFramework_WPUtility::getSiteOption( $sOptionKey, $asKey, $vDefault ); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * @since 3.0.0 |
| 25 | 25 | * @deprecated DEVVER Use `AdminPageFramework_PageMetaBox` instead. |
| 26 | 26 | */ |
| 27 | - function __construct( $sMetaBoxID, $sTitle, $asPageSlugs=array(), $sContext='normal', $sPriority='default', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
| 27 | + function __construct( $sMetaBoxID, $sTitle, $asPageSlugs = array(), $sContext = 'normal', $sPriority = 'default', $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
| 28 | 28 | |
| 29 | 29 | trigger_error( |
| 30 | 30 | sprintf( |
@@ -67,11 +67,11 @@ |
||
| 67 | 67 | */ |
| 68 | 68 | function __construct( $sMetaBoxID, $sTitle, $asPageSlugs=array(), $sContext='normal', $sPriority='default', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
| 69 | 69 | |
| 70 | - if ( empty( $asPageSlugs ) ) { |
|
| 70 | + if ( empty( $asPageSlugs ) ) { |
|
| 71 | 71 | return; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if ( ! $this->_isInstantiatable() ) { |
|
| 74 | + if ( ! $this->_isInstantiatable() ) { |
|
| 75 | 75 | return; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -77,21 +77,21 @@ |
||
| 77 | 77 | * @param string $sPriority The priority, either `high`, `core`, `default` or `low`. |
| 78 | 78 | * @param string $sCapability The capability. See <a href="https://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Roles and Capabilities</a>. |
| 79 | 79 | */ |
| 80 | - public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs=array(), $sContext='normal', $sPriority='default', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
| 80 | + public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs = array(), $sContext = 'normal', $sPriority = 'default', $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
| 81 | 81 | |
| 82 | 82 | if ( empty( $asPageSlugs ) ) { |
| 83 | 83 | return; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if ( ! $this->_isInstantiatable() ) { |
|
| 86 | + if ( !$this->_isInstantiatable() ) { |
|
| 87 | 87 | return; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | // The property object needs to be done first before the parent constructor. |
| 91 | 91 | $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] ) |
| 92 | 92 | ? $this->aSubClassNames[ 'oProp' ] |
| 93 | - : 'AdminPageFramework_Property_' . $this->_sStructureType; |
|
| 94 | - $this->oProp = new $_sProprtyClassName( |
|
| 93 | + : 'AdminPageFramework_Property_'.$this->_sStructureType; |
|
| 94 | + $this->oProp = new $_sProprtyClassName( |
|
| 95 | 95 | $this, |
| 96 | 96 | get_class( $this ), |
| 97 | 97 | $sCapability, |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * |
| 23 | 23 | * @since 3.0.0 |
| 24 | 24 | */ |
| 25 | - public function enqueueStyles( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
| 25 | + public function enqueueStyles( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) { |
|
| 26 | 26 | if ( method_exists( $this->oResource, '_enqueueStyles' ) ) { |
| 27 | 27 | return $this->oResource->_enqueueStyles( $aSRCs, $sPageSlug, $sTabSlug, $aCustomArgs ); |
| 28 | 28 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * @param array (optional) The argument array for more advanced parameters. |
| 39 | 39 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 40 | 40 | */ |
| 41 | - public function enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
| 41 | + public function enqueueStyle( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) { |
|
| 42 | 42 | if ( method_exists( $this->oResource, '_enqueueStyle' ) ) { |
| 43 | 43 | return $this->oResource->_enqueueStyle( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs ); |
| 44 | 44 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * |
| 49 | 49 | * @since 2.1.5 |
| 50 | 50 | */ |
| 51 | - public function enqueueScripts( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
| 51 | + public function enqueueScripts( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) { |
|
| 52 | 52 | if ( method_exists( $this->oResource, '_enqueueScripts' ) ) { |
| 53 | 53 | return $this->oResource->_enqueueScripts( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs ); |
| 54 | 54 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * @param array (optional) The argument array for more advanced parameters. |
| 65 | 65 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 66 | 66 | */ |
| 67 | - public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
| 67 | + public function enqueueScript( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) { |
|
| 68 | 68 | if ( method_exists( $this->oResource, '_enqueueScript' ) ) { |
| 69 | 69 | return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs ); |
| 70 | 70 | } |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | * @param array (optional) The argument array for more advanced parameters. |
| 65 | 65 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
| 66 | 66 | */ |
| 67 | - public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
| 67 | + public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
| 68 | 68 | if ( method_exists( $this->oResource, '_enqueueScript' ) ) { |
| 69 | 69 | return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs ); |
| 70 | 70 | } |