@@ -51,7 +51,7 @@ |
||
51 | 51 | */ |
52 | 52 | public function get() { |
53 | 53 | |
54 | - // Apply filters to modify the in-page tab array. |
|
54 | + // Apply filters to modify the in-page tab array. |
|
55 | 55 | $_aInPageTabs = $this->addAndApplyFilter( |
56 | 56 | $this->oFactory, // caller object |
57 | 57 | "tabs_{$this->oFactory->oProp->sClassName}_{$this->sPageSlug}", // filter name |
@@ -53,14 +53,14 @@ |
||
53 | 53 | |
54 | 54 | // Apply filters to modify the in-page tab array. |
55 | 55 | $_aInPageTabs = $this->addAndApplyFilter( |
56 | - $this->oFactory, // caller object |
|
56 | + $this->oFactory, // caller object |
|
57 | 57 | "tabs_{$this->oFactory->oProp->sClassName}_{$this->sPageSlug}", // filter name |
58 | 58 | $this->aInPageTabs // filtering value |
59 | 59 | ); |
60 | 60 | |
61 | 61 | // Added items may be missing necessary keys so format them |
62 | - foreach( ( array ) $_aInPageTabs as $_sTabSlug => $_aInPageTab ) { |
|
63 | - if ( ! is_array( $_aInPageTab ) ) { |
|
62 | + foreach ( ( array ) $_aInPageTabs as $_sTabSlug => $_aInPageTab ) { |
|
63 | + if ( !is_array( $_aInPageTab ) ) { |
|
64 | 64 | continue; |
65 | 65 | } |
66 | 66 | $_oFormatter = new AdminPageFramework_Format_InPageTab( |
@@ -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, |