@@ -82,7 +82,7 @@ |
||
82 | 82 | protected function _getFormattedSubMenuLinkArray( array $aSubMenuLink ) { |
83 | 83 | |
84 | 84 | // If the set URL is not valid, return. |
85 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
85 | + if ( !filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
86 | 86 | return array(); |
87 | 87 | } |
88 | 88 |
@@ -82,7 +82,7 @@ |
||
82 | 82 | protected function _getFormattedSubMenuLinkArray( array $aSubMenuLink ) { |
83 | 83 | |
84 | 84 | // If the set URL is not valid, return. |
85 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
85 | + if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
86 | 86 | return array(); |
87 | 87 | } |
88 | 88 |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | 'page_slug' => null, // (required) |
33 | 33 | 'type' => 'page', // this is used to compare with the link type. |
34 | 34 | 'title' => null, |
35 | - 'page_title' => null, // (optional) 3.3.0+ When the page title is different from the above 'title' argument, set this. |
|
36 | - 'menu_title' => null, // (optional) 3.3.0+ When the menu title is different from the above 'title' argument, set this. |
|
35 | + 'page_title' => null, // (optional) 3.3.0+ When the page title is different from the above 'title' argument, set this. |
|
36 | + 'menu_title' => null, // (optional) 3.3.0+ When the menu title is different from the above 'title' argument, set this. |
|
37 | 37 | 'screen_icon' => null, // this will become either href_icon_32x32 or screen_icon_id |
38 | 38 | 'capability' => null, |
39 | 39 | 'order' => null, |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | |
114 | 114 | $aSubMenuPage = $aSubMenuPage |
115 | 115 | + array( |
116 | - 'show_page_title' => $this->oFactory->oProp->bShowPageTitle, // boolean |
|
116 | + 'show_page_title' => $this->oFactory->oProp->bShowPageTitle, // boolean |
|
117 | 117 | 'show_page_heading_tabs' => $this->oFactory->oProp->bShowPageHeadingTabs, // boolean |
118 | - 'show_in_page_tabs' => $this->oFactory->oProp->bShowInPageTabs, // boolean |
|
119 | - 'in_page_tab_tag' => $this->oFactory->oProp->sInPageTabTag, // string |
|
120 | - 'page_heading_tab_tag' => $this->oFactory->oProp->sPageHeadingTabTag, // string |
|
121 | - 'capability' => $this->oFactory->oProp->sCapability, // 3.6.0+ |
|
118 | + 'show_in_page_tabs' => $this->oFactory->oProp->bShowInPageTabs, // boolean |
|
119 | + 'in_page_tab_tag' => $this->oFactory->oProp->sInPageTabTag, // string |
|
120 | + 'page_heading_tab_tag' => $this->oFactory->oProp->sPageHeadingTabTag, // string |
|
121 | + 'capability' => $this->oFactory->oProp->sCapability, // 3.6.0+ |
|
122 | 122 | ) |
123 | 123 | + self::$aStructure; |
124 | 124 |
@@ -20,7 +20,6 @@ |
||
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Renders a registered meta box. |
23 | - |
|
24 | 23 | * @return void |
25 | 24 | * @param string $sContext `side`, `normal`, or `advanced`. |
26 | 25 | * @since 3.0.0 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function render( $sContext ) { |
30 | 30 | |
31 | 31 | // If nothing is registered do not render even the container. |
32 | - if ( ! $this->doesMetaBoxExist() ) { |
|
32 | + if ( !$this->doesMetaBoxExist() ) { |
|
33 | 33 | return; |
34 | 34 | } |
35 | 35 |
@@ -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 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @since 3.0.0 |
55 | 55 | */ |
56 | - public function enqueueStyles( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
56 | + public function enqueueStyles( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
57 | 57 | return $this->oResource->_enqueueStyles( $aSRCs, $aPostTypes, $aCustomArgs ); |
58 | 58 | } |
59 | 59 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @param array (optional) The argument array for more advanced parameters. |
77 | 77 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
78 | 78 | */ |
79 | - public function enqueueStyle( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
79 | + public function enqueueStyle( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
80 | 80 | return $this->oResource->_enqueueStyle( $sSRC, $aPostTypes, $aCustomArgs ); |
81 | 81 | } |
82 | 82 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * |
85 | 85 | * @since 3.0.0 |
86 | 86 | */ |
87 | - public function enqueueScripts( $aSRCs, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
87 | + public function enqueueScripts( $aSRCs, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
88 | 88 | return $this->oResource->_enqueueScripts( $aSRCs, $aPostTypes, $aCustomArgs ); |
89 | 89 | } |
90 | 90 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * @param array (optional) The argument array for more advanced parameters. |
120 | 120 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
121 | 121 | */ |
122 | - public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
122 | + public function enqueueScript( $sSRC, $aPostTypes = array(), $aCustomArgs = array() ) { |
|
123 | 123 | return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs ); |
124 | 124 | } |
125 | 125 |
@@ -119,7 +119,7 @@ |
||
119 | 119 | * @param array (optional) The argument array for more advanced parameters. |
120 | 120 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
121 | 121 | */ |
122 | - public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
122 | + public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { |
|
123 | 123 | return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs ); |
124 | 124 | } |
125 | 125 |
@@ -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 |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | * Sets up hooks. |
22 | 22 | * @since 3.7.9 |
23 | 23 | */ |
24 | - public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) { |
|
24 | + public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) { |
|
25 | 25 | |
26 | 26 | // This is important to set the hooks before the parent constructor |
27 | 27 | // as the setUp wil be called in there if the default action hook (current_screen) is already triggered. |
28 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) ); |
|
29 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToSetUpValidationHooks' ) ); |
|
28 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) ); |
|
29 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToSetUpValidationHooks' ) ); |
|
30 | 30 | |
31 | 31 | parent::__construct( |
32 | 32 | $sMetaBoxID, |
@@ -106,14 +106,14 @@ discard block |
||
106 | 106 | * @callback add_meta_boxes |
107 | 107 | */ |
108 | 108 | public function _replyToRegisterMetaBoxes() { |
109 | - foreach( $this->oProp->aPostTypes as $_sPostType ) { |
|
109 | + foreach ( $this->oProp->aPostTypes as $_sPostType ) { |
|
110 | 110 | add_meta_box( |
111 | - $this->oProp->sMetaBoxID, // id |
|
112 | - $this->oProp->sTitle, // title |
|
111 | + $this->oProp->sMetaBoxID, // id |
|
112 | + $this->oProp->sTitle, // title |
|
113 | 113 | array( $this, '_replyToPrintMetaBoxContents' ), // callback |
114 | - $_sPostType, // post type |
|
115 | - $this->oProp->sContext, // context |
|
116 | - $this->oProp->sPriority, // priority |
|
114 | + $_sPostType, // post type |
|
115 | + $this->oProp->sContext, // context |
|
116 | + $this->oProp->sPriority, // priority |
|
117 | 117 | null // argument - deprecated $this->oForm->aFields |
118 | 118 | ); |
119 | 119 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @internal |
146 | 146 | * @return integer The found post ID. `0` if not found. |
147 | 147 | */ |
148 | - private function _getPostID() { |
|
148 | + private function _getPostID() { |
|
149 | 149 | |
150 | 150 | // for an editing post page. |
151 | 151 | if ( isset( $GLOBALS[ 'post' ]->ID ) ) { |
@@ -177,14 +177,14 @@ discard block |
||
177 | 177 | public function _replyToFilterSavingData( $aPostData, $aUnmodified ) { |
178 | 178 | |
179 | 179 | // Perform initial checks. |
180 | - if ( ! $this->_shouldProceedValidation( $aUnmodified ) ) { |
|
180 | + if ( !$this->_shouldProceedValidation( $aUnmodified ) ) { |
|
181 | 181 | return $aPostData; |
182 | 182 | } |
183 | 183 | |
184 | 184 | // Retrieve the submitted data. |
185 | - $_aInputs = $this->oForm->getSubmittedData( |
|
186 | - $_POST, // subject data to be parsed |
|
187 | - true, // extract data with the fieldset structure |
|
185 | + $_aInputs = $this->oForm->getSubmittedData( |
|
186 | + $_POST, // subject data to be parsed |
|
187 | + true, // extract data with the fieldset structure |
|
188 | 188 | false // strip slashes |
189 | 189 | ); |
190 | 190 | $_aInputsRaw = $_aInputs; // store one for the last input array. |
@@ -219,8 +219,8 @@ discard block |
||
219 | 219 | } |
220 | 220 | |
221 | 221 | $this->oForm->updateMetaDataByType( |
222 | - $_iPostID, // object id |
|
223 | - $_aInputs, // user submit form data |
|
222 | + $_iPostID, // object id |
|
223 | + $_aInputs, // user submit form data |
|
224 | 224 | $this->oForm->dropRepeatableElements( $_aSavedMeta ), // Drop repeatable section elements from the saved meta array. |
225 | 225 | $this->oForm->sStructureType // fields type |
226 | 226 | ); |
@@ -277,14 +277,14 @@ discard block |
||
277 | 277 | } |
278 | 278 | |
279 | 279 | // If our nonce isn't there, or we can't verify it, bail |
280 | - if ( ! isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) { |
|
280 | + if ( !isset( $_POST[ $this->oProp->sMetaBoxID ] ) ) { |
|
281 | 281 | return false; |
282 | 282 | } |
283 | - if ( ! wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) { |
|
283 | + if ( !wp_verify_nonce( $_POST[ $this->oProp->sMetaBoxID ], $this->oProp->sMetaBoxID ) ) { |
|
284 | 284 | return false; |
285 | 285 | } |
286 | 286 | |
287 | - if ( ! in_array( $aUnmodified[ 'post_type' ], $this->oProp->aPostTypes ) ) { |
|
287 | + if ( !in_array( $aUnmodified[ 'post_type' ], $this->oProp->aPostTypes ) ) { |
|
288 | 288 | return false; |
289 | 289 | } |
290 | 290 |
@@ -20,6 +20,8 @@ |
||
20 | 20 | /** |
21 | 21 | * Sets up hooks. |
22 | 22 | * @since 3.7.9 |
23 | + * @param string $sMetaBoxID |
|
24 | + * @param string $sTitle |
|
23 | 25 | */ |
24 | 26 | public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) { |
25 | 27 |
@@ -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( |
@@ -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 |
@@ -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 | } |
@@ -69,7 +69,7 @@ |
||
69 | 69 | return "{$_aField['field_id']}{$_sKey}"; |
70 | 70 | } |
71 | 71 | |
72 | - /** |
|
72 | + /** |
|
73 | 73 | * Adds input fields |
74 | 74 | * |
75 | 75 | * @internal |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | '', |
49 | 49 | "[{$_sKey}]" |
50 | 50 | ); |
51 | - return $_aField['field_id'] . $_sKey; |
|
51 | + return $_aField[ 'field_id' ].$_sKey; |
|
52 | 52 | |
53 | 53 | } |
54 | 54 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | '', |
67 | 67 | "|{$_sKey}" |
68 | 68 | ); |
69 | - return "{$_aField['field_id']}{$_sKey}"; |
|
69 | + return "{$_aField[ 'field_id' ]}{$_sKey}"; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $_aOutput = array(); |
117 | 117 | |
118 | 118 | // Set nonce. |
119 | - $_aOutput[] = wp_nonce_field( |
|
119 | + $_aOutput[ ] = wp_nonce_field( |
|
120 | 120 | $this->oProp->sClassHash, |
121 | 121 | $this->oProp->sClassHash, |
122 | 122 | true, |
@@ -127,17 +127,17 @@ discard block |
||
127 | 127 | $this->_setOptionArray( $iTermID, $this->oProp->sOptionKey ); |
128 | 128 | |
129 | 129 | // Get the field outputs |
130 | - $_aOutput[] = $this->oForm->get( $bRenderTableRow ); |
|
130 | + $_aOutput[ ] = $this->oForm->get( $bRenderTableRow ); |
|
131 | 131 | |
132 | 132 | // Filter the output |
133 | 133 | $_sOutput = $this->oUtil->addAndApplyFilters( |
134 | 134 | $this, |
135 | - 'content_' . $this->oProp->sClassName, |
|
135 | + 'content_'.$this->oProp->sClassName, |
|
136 | 136 | $this->content( implode( PHP_EOL, $_aOutput ) ) |
137 | 137 | ); |
138 | 138 | |
139 | 139 | // Do action |
140 | - $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this ); |
|
140 | + $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this ); |
|
141 | 141 | |
142 | 142 | return $_sOutput; |
143 | 143 | |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | public function _replyToPrintColumnCell( $vValue, $sColumnSlug, $sTermID ) { |
157 | 157 | |
158 | 158 | $_sCellHTML = ''; |
159 | - if ( isset( $_GET['taxonomy'] ) && $_GET['taxonomy'] ) { |
|
160 | - $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$_GET['taxonomy']}", $vValue, $sColumnSlug, $sTermID ); |
|
159 | + if ( isset( $_GET[ 'taxonomy' ] ) && $_GET[ 'taxonomy' ] ) { |
|
160 | + $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$_GET[ 'taxonomy' ]}", $vValue, $sColumnSlug, $sTermID ); |
|
161 | 161 | } |
162 | 162 | $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$this->oProp->sClassName}", $_sCellHTML, $sColumnSlug, $sTermID ); |
163 | 163 | $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$this->oProp->sClassName}_{$sColumnSlug}", $_sCellHTML, $sTermID ); // 3.0.2+ |