@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | ) |
65 | 65 | ); |
66 | 66 | |
67 | - if ( ! $this->_isEnabled( $_aTab ) ) { |
|
67 | + if ( !$this->_isEnabled( $_aTab ) ) { |
|
68 | 68 | return array(); |
69 | 69 | } |
70 | 70 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | : esc_url( |
79 | 79 | $this->getElement( |
80 | 80 | $_aTab, |
81 | - 'url', // if the 'url' argument is set, use it. Otherwise, use the below gnerated url. |
|
81 | + 'url', // if the 'url' argument is set, use it. Otherwise, use the below gnerated url. |
|
82 | 82 | $this->getQueryAdminURL( |
83 | 83 | array( |
84 | 84 | 'page' => $this->aArguments[ 'page_slug' ], |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * @return boolean |
108 | 108 | */ |
109 | 109 | private function _isEnabled( $aTab ) { |
110 | - return ! in_array( |
|
110 | + return !in_array( |
|
111 | 111 | false, |
112 | 112 | array( |
113 | 113 | ( bool ) current_user_can( $aTab[ 'capability' ] ), // whether the user has the sufficient capability level |
@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | * @static |
25 | 25 | */ |
26 | 26 | static public $aStructure = array( |
27 | - 'src' => null, // (required, string) the source url or path |
|
27 | + 'src' => null, // (required, string) the source url or path |
|
28 | 28 | 'handle_id' => null, |
29 | 29 | 'dependencies' => array(), |
30 | - 'version' => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value. |
|
31 | - 'translation' => array(), // only for scripts |
|
32 | - 'in_footer' => false, // only for scripts |
|
30 | + 'version' => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value. |
|
31 | + 'translation' => array(), // only for scripts |
|
32 | + 'in_footer' => false, // only for scripts |
|
33 | 33 | // 'attributes' => null, // (optional, array) [3.3.0+] attributes array. `array( 'data-id' => '...' )` |
34 | 34 | ); |
35 | 35 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $_aParameters = func_get_args() + array( |
43 | 43 | $this->asSubject, |
44 | 44 | ); |
45 | - $this->asSubject = $_aParameters[ 0 ]; |
|
45 | + $this->asSubject = $_aParameters[ 0 ]; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | * @static |
25 | 25 | */ |
26 | 26 | static public $aStructure = array( |
27 | - 'src' => null, // (required, string) the source url or path |
|
28 | - 'handle_id' => null, // (optional, string) The handle ID of the stylesheet |
|
29 | - 'dependencies' => null, // (optional, array) The dependency array. |
|
30 | - 'version' => null, // (optional, string) The stylesheet version number. |
|
31 | - 'media' => null, // (optional, string) the description of the field which is inserted into the after the input field tag. |
|
27 | + 'src' => null, // (required, string) the source url or path |
|
28 | + 'handle_id' => null, // (optional, string) The handle ID of the stylesheet |
|
29 | + 'dependencies' => null, // (optional, array) The dependency array. |
|
30 | + 'version' => null, // (optional, string) The stylesheet version number. |
|
31 | + 'media' => null, // (optional, string) the description of the field which is inserted into the after the input field tag. |
|
32 | 32 | // 'attributes' => null, // (optional, array) [3.3.0+] attributes array. `array( 'data-id' => '...' )` |
33 | 33 | ); |
34 | 34 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $_aParameters = func_get_args() + array( |
42 | 42 | $this->asSubject, |
43 | 43 | ); |
44 | - $this->asSubject = $_aParameters[ 0 ]; |
|
44 | + $this->asSubject = $_aParameters[ 0 ]; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -19,7 +19,6 @@ |
||
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Represents the structure of the sub-field definition array. |
22 | - |
|
23 | 22 | */ |
24 | 23 | static public $aStructure = array( |
25 | 24 | ); |
@@ -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 |
@@ -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 |