@@ -42,8 +42,6 @@ discard block |
||
42 | 42 | * Sets up properties. |
43 | 43 | * @since 3.6.0 |
44 | 44 | * @since 3.7.0 Changed the parameter structure. |
45 | - * @param array|string $asArguments The content output or the tooltip argument array. |
|
46 | - * @param string $sTitleElementID Not used at the moment. |
|
47 | 45 | */ |
48 | 46 | public function __construct( /* $aArguments, $sTitleElementID */ ) { |
49 | 47 | |
@@ -170,6 +168,7 @@ discard block |
||
170 | 168 | |
171 | 169 | /** |
172 | 170 | * Generates HTML attributes of the specified element. |
171 | + * @param string $sElementKey |
|
173 | 172 | * @return string |
174 | 173 | * @since 3.8.5 |
175 | 174 | */ |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * Stores the default argument values. |
23 | 23 | */ |
24 | - public $aArguments = array( |
|
24 | + public $aArguments = array( |
|
25 | 25 | 'attributes' => array( |
26 | 26 | 'container' => array(), |
27 | 27 | 'title' => array(), |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | 'description' => array(), |
30 | 30 | 'icon' => array(), |
31 | 31 | ), |
32 | - 'icon' => null, // the icon output to override |
|
33 | - 'dash-icon' => 'dashicons-editor-help', // the dash-icon class selector for the icon |
|
34 | - 'icon_alt_text' => '[?]', // [3.8.5+] alternative text when icon is not available. For WP v3.7.x or below. |
|
32 | + 'icon' => null, // the icon output to override |
|
33 | + 'dash-icon' => 'dashicons-editor-help', // the dash-icon class selector for the icon |
|
34 | + 'icon_alt_text' => '[?]', // [3.8.5+] alternative text when icon is not available. For WP v3.7.x or below. |
|
35 | 35 | 'title' => null, |
36 | - 'content' => null, // will be assigned in the constructor |
|
36 | + 'content' => null, // will be assigned in the constructor |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | public $sTitleElementID; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | if ( is_string( $asContent ) ) { |
91 | 91 | return true; |
92 | 92 | } |
93 | - if ( is_array( $asContent ) && ! $this->isAssociative( $asContent ) ) { |
|
93 | + if ( is_array( $asContent ) && !$this->isAssociative( $asContent ) ) { |
|
94 | 94 | return true; |
95 | 95 | } |
96 | 96 | return false; |
@@ -104,12 +104,12 @@ discard block |
||
104 | 104 | * @return string The output. |
105 | 105 | */ |
106 | 106 | public function get() { |
107 | - if ( ! $this->aArguments[ 'content' ] ) { |
|
107 | + if ( !$this->aArguments[ 'content' ] ) { |
|
108 | 108 | return ''; |
109 | 109 | } |
110 | - return "<a " . $this->_getElementAttributes( 'container', 'admin-page-framework-form-tooltip' ) . ">" |
|
110 | + return "<a ".$this->_getElementAttributes( 'container', 'admin-page-framework-form-tooltip' ).">" |
|
111 | 111 | . $this->_getTipLinkIcon() |
112 | - . "<span " . $this->_getElementAttributes( 'content', 'admin-page-framework-form-tooltip-content' ) . ">" |
|
112 | + . "<span ".$this->_getElementAttributes( 'content', 'admin-page-framework-form-tooltip-content' ).">" |
|
113 | 113 | . $this->_getTipTitle() |
114 | 114 | . $this->_getDescriptions() |
115 | 115 | . "</span>" |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | return $this->aArguments[ 'icon' ]; |
128 | 128 | } |
129 | 129 | if ( version_compare( $GLOBALS[ 'wp_version' ], '3.8', '>=' ) ) { |
130 | - return "<span " . $this->_getElementAttributes( |
|
130 | + return "<span ".$this->_getElementAttributes( |
|
131 | 131 | 'icon', |
132 | 132 | array( |
133 | 133 | 'dashicons', |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | private function _getTipTitle() { |
147 | 147 | if ( isset( $this->aArguments[ 'title' ] ) ) { |
148 | - return "<span " . $this->_getElementAttributes( 'title', 'admin-page-framework-form-tooltip-title' ) . ">" |
|
148 | + return "<span ".$this->_getElementAttributes( 'title', 'admin-page-framework-form-tooltip-title' ).">" |
|
149 | 149 | . $this->aArguments[ 'title' ] |
150 | 150 | . "</span>"; |
151 | 151 | } |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | */ |
158 | 158 | private function _getDescriptions() { |
159 | 159 | if ( isset( $this->aArguments[ 'content' ] ) ) { |
160 | - return "<span " . $this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ) . ">" |
|
160 | + return "<span ".$this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ).">" |
|
161 | 161 | . implode( |
162 | - "</span><span " . $this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ) . ">", |
|
162 | + "</span><span ".$this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ).">", |
|
163 | 163 | $this->getAsArray( $this->aArguments[ 'content' ] ) |
164 | 164 | ) |
165 | 165 | . "</span>" |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $_aContainerAttributes = $this->getElementAsArray( |
179 | 179 | $this->aArguments, |
180 | 180 | array( 'attributes', $sElementKey ) |
181 | - ) + array( 'class' => '' ) ; |
|
181 | + ) + array( 'class' => '' ); |
|
182 | 182 | $_aContainerAttributes[ 'class' ] = $this->getClassAttribute( |
183 | 183 | $_aContainerAttributes[ 'class' ], |
184 | 184 | $asClassSelectors |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @extends AdminPageFramework_Form_View___Section_Base |
16 | 16 | * @internal |
17 | 17 | */ |
18 | -class AdminPageFramework_Form_View___ToolTip extends AdminPageFramework_Form_View___Section_Base { |
|
18 | +class AdminPageFramework_Form_View___ToolTip extends AdminPageFramework_Form_View___Section_Base { |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Stores the default argument values. |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @since 3.7.0 |
155 | 155 | * @return string |
156 | 156 | */ |
157 | - private function _getDescriptions() { |
|
157 | + private function _getDescriptions() { |
|
158 | 158 | if ( isset( $this->aArguments[ 'content' ] ) ) { |
159 | 159 | return "<span " . $this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ) . ">" |
160 | 160 | . implode( |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | $_aParameters = func_get_args() + array( |
35 | 35 | $this->aFieldset, |
36 | - $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference. |
|
36 | + $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference. |
|
37 | 37 | $this->aFieldErrors, |
38 | 38 | $this->aFieldTypeDefinitions, |
39 | 39 | $this->aCallbacks, // field output element callables. |
@@ -61,14 +61,14 @@ discard block |
||
61 | 61 | |
62 | 62 | $aFieldset = $this->aFieldset; |
63 | 63 | |
64 | - if ( ! $this->isNormalPlacement( $aFieldset ) ) { |
|
64 | + if ( !$this->isNormalPlacement( $aFieldset ) ) { |
|
65 | 65 | return ''; |
66 | 66 | } |
67 | 67 | |
68 | - $_oFieldrowAttribute = new AdminPageFramework_Form_View___Attribute_Fieldrow( |
|
68 | + $_oFieldrowAttribute = new AdminPageFramework_Form_View___Attribute_Fieldrow( |
|
69 | 69 | $aFieldset, |
70 | 70 | array( |
71 | - 'id' => 'fieldrow-' . $aFieldset[ 'tag_id' ], |
|
71 | + 'id' => 'fieldrow-'.$aFieldset[ 'tag_id' ], |
|
72 | 72 | 'valign' => 'top', |
73 | 73 | 'class' => 'admin-page-framework-fieldrow', |
74 | 74 | ) |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | return $this->_getFieldByContainer( |
78 | 78 | $aFieldset, |
79 | 79 | array( |
80 | - 'open_container' => "<tr " . $_oFieldrowAttribute->get() . ">", |
|
80 | + 'open_container' => "<tr ".$_oFieldrowAttribute->get().">", |
|
81 | 81 | 'close_container' => "</tr>", |
82 | 82 | 'open_title' => "<th>", |
83 | 83 | 'close_title' => "</th>", |
@@ -126,13 +126,13 @@ discard block |
||
126 | 126 | $this->aCallbacks, |
127 | 127 | $this->oMsg |
128 | 128 | ); |
129 | - $_aOutput = array(); |
|
129 | + $_aOutput = array(); |
|
130 | 130 | if ( $aFieldset[ 'show_title_column' ] ) { |
131 | - $_aOutput[] = $aOpenCloseTags[ 'open_title' ] |
|
131 | + $_aOutput[ ] = $aOpenCloseTags[ 'open_title' ] |
|
132 | 132 | . $_oFieldTitle->get() |
133 | 133 | . $aOpenCloseTags[ 'close_title' ]; |
134 | 134 | } |
135 | - $_aOutput[] = $aOpenCloseTags[ 'open_main' ] |
|
135 | + $_aOutput[ ] = $aOpenCloseTags[ 'open_main' ] |
|
136 | 136 | // . call_user_func_array( $hfCallback, array( $aFieldset ) ) |
137 | 137 | . $this->getFieldsetOutput( $aFieldset ) |
138 | 138 | . $aOpenCloseTags[ 'close_main' ]; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
21 | 21 | |
22 | - public $sStructureType = ''; |
|
22 | + public $sStructureType = ''; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @since 3.8.5 |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function get() { |
59 | 59 | |
60 | - if ( ! $this->_shouldProceed() ) { |
|
60 | + if ( !$this->_shouldProceed() ) { |
|
61 | 61 | return ''; |
62 | 62 | } |
63 | 63 | |
64 | 64 | return "<div class='admin-page-framework-info'>" |
65 | - . $this->oMsg->get( 'debug_info' ) . ': ' |
|
65 | + . $this->oMsg->get( 'debug_info' ).': ' |
|
66 | 66 | . $this->getFrameworkNameVersion() |
67 | 67 | . "</div>"; |
68 | 68 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | private function _shouldProceed() { |
75 | 75 | |
76 | - if ( ! $this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) { |
|
76 | + if ( !$this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) { |
|
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | // For the generic admin pages, do no show debug information for each section. |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @extends AdminPageFramework_FrameworkUtility |
17 | 17 | * @internal |
18 | 18 | */ |
19 | -class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
|
19 | +class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
|
20 | 20 | |
21 | 21 | public $sStructureType = ''; |
22 | 22 |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | * Defines the default key-values of this field type. |
78 | 78 | */ |
79 | 79 | protected $aDefaultKeys = array( |
80 | - 'select_all_button' => false, // 3.3.0+ to change the label, set the label here |
|
81 | - 'select_none_button' => false, // 3.3.0+ to change the label, set the label here |
|
82 | - 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
80 | + 'select_all_button' => false, // 3.3.0+ to change the label, set the label here |
|
81 | + 'select_none_button' => false, // 3.3.0+ to change the label, set the label here |
|
82 | + 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
83 | 83 | ); |
84 | 84 | |
85 | 85 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | protected function getScripts() { |
93 | 93 | new AdminPageFramework_Form_View___Script_CheckboxSelector; |
94 | - $_sClassSelectorSelectAll = $this->_getSelectButtonClassSelectors( |
|
94 | + $_sClassSelectorSelectAll = $this->_getSelectButtonClassSelectors( |
|
95 | 95 | $this->aFieldTypeSlugs, |
96 | 96 | 'select_all_button' // data attribute |
97 | 97 | ); |
@@ -118,14 +118,14 @@ discard block |
||
118 | 118 | * @return string |
119 | 119 | * @internal |
120 | 120 | */ |
121 | - private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute='select_all_button' ) { |
|
121 | + private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute = 'select_all_button' ) { |
|
122 | 122 | |
123 | 123 | $_aClassSelectors = array(); |
124 | 124 | foreach ( $aFieldTypeSlugs as $_sSlug ) { |
125 | - if ( ! is_scalar( $_sSlug ) ) { |
|
125 | + if ( !is_scalar( $_sSlug ) ) { |
|
126 | 126 | continue; |
127 | 127 | } |
128 | - $_aClassSelectors[] = '.admin-page-framework-checkbox-container-' . $_sSlug . "[data-{$sDataAttribute}]"; |
|
128 | + $_aClassSelectors[ ] = '.admin-page-framework-checkbox-container-'.$_sSlug."[data-{$sDataAttribute}]"; |
|
129 | 129 | } |
130 | 130 | return implode( ',', $_aClassSelectors ); |
131 | 131 | |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | |
187 | 187 | $_aOutput = array(); |
188 | 188 | $_bIsMultiple = is_array( $aField[ 'label' ] ); |
189 | - foreach( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) { |
|
190 | - $_aOutput[] = $this->_getEachCheckboxOutput( |
|
189 | + foreach ( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) { |
|
190 | + $_aOutput[ ] = $this->_getEachCheckboxOutput( |
|
191 | 191 | $aField, |
192 | 192 | $_bIsMultiple |
193 | 193 | ? $_sKey |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $_sLabel |
196 | 196 | ); |
197 | 197 | } |
198 | - return "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">" |
|
198 | + return "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">" |
|
199 | 199 | . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element. |
200 | 200 | . implode( PHP_EOL, $_aOutput ) |
201 | 201 | . "</div>"; |
@@ -210,12 +210,12 @@ discard block |
||
210 | 210 | */ |
211 | 211 | protected function _getCheckboxContainerAttributes( array $aField ) { |
212 | 212 | return array( |
213 | - 'class' => 'admin-page-framework-checkbox-container-' . $aField[ 'type' ], |
|
213 | + 'class' => 'admin-page-framework-checkbox-container-'.$aField[ 'type' ], |
|
214 | 214 | 'data-select_all_button' => $aField[ 'select_all_button' ] |
215 | - ? ( ! is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] ) |
|
215 | + ? ( !is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] ) |
|
216 | 216 | : null, |
217 | 217 | 'data-select_none_button' => $aField[ 'select_none_button' ] |
218 | - ? ( ! is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] ) |
|
218 | + ? ( !is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] ) |
|
219 | 219 | : null, |
220 | 220 | ); |
221 | 221 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | private function _getEachCheckboxOutput( array $aField, $sKey, $sLabel ) { |
231 | 231 | |
232 | 232 | $_aInputAttributes = array( |
233 | - 'data-key' => $sKey, // 3.8.8+ For the `post_type_taxonomy` field type. |
|
233 | + 'data-key' => $sKey, // 3.8.8+ For the `post_type_taxonomy` field type. |
|
234 | 234 | ) + $aField[ 'attributes' ]; |
235 | 235 | $_oCheckbox = new AdminPageFramework_Input_checkbox( |
236 | 236 | $_aInputAttributes, |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | $_oCheckbox->setAttributesByKey( $sKey ); |
242 | 242 | $_oCheckbox->addClass( $this->_sCheckboxClassSelector ); |
243 | 243 | return $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] ) |
244 | - . "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-checkbox-label' ) . ">" |
|
245 | - . "<label " . $this->getAttributes( |
|
244 | + . "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-checkbox-label' ).">" |
|
245 | + . "<label ".$this->getAttributes( |
|
246 | 246 | array( |
247 | 247 | 'for' => $_oCheckbox->getAttribute( 'id' ), |
248 | 248 | 'class' => $_oCheckbox->getAttribute( 'disabled' ) |
@@ -63,16 +63,16 @@ discard block |
||
63 | 63 | * - use_desc_for_title (boolean|int) default is 1 - Whether to use the category description as the title attribute. side note: the framework enables this by default. |
64 | 64 | * @param integer $iCurrentObjectID |
65 | 65 | */ |
66 | - function start_el( &$sOutput, $oTerm, $iDepth=0, $aArgs=array(), $iCurrentObjectID=0 ) { |
|
66 | + function start_el( &$sOutput, $oTerm, $iDepth = 0, $aArgs = array(), $iCurrentObjectID = 0 ) { |
|
67 | 67 | |
68 | 68 | $aArgs = $aArgs + array( |
69 | 69 | '_name_prefix' => null, |
70 | 70 | '_input_id_prefix' => null, |
71 | 71 | '_attributes' => array(), |
72 | 72 | '_selected_items' => array(), |
73 | - 'taxonomy' => null, // parsed by the core function to perform the database query. |
|
74 | - 'disabled' => null, // not sure what this was for |
|
75 | - '_save_unchecked' => true, // 3.8.8+ |
|
73 | + 'taxonomy' => null, // parsed by the core function to perform the database query. |
|
74 | + 'disabled' => null, // not sure what this was for |
|
75 | + '_save_unchecked' => true, // 3.8.8+ |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | // Local variables |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | // Post count |
86 | 86 | $_sPostCount = $aArgs[ 'show_post_count' ] |
87 | - ? " <span class='font-lighter'>(" . $oTerm->count . ")</span>" |
|
87 | + ? " <span class='font-lighter'>(".$oTerm->count.")</span>" |
|
88 | 88 | : ''; |
89 | 89 | |
90 | 90 | // Attributes |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | + array( |
104 | 104 | 'class' => null, |
105 | 105 | ); |
106 | - $_aInputAttributes['class'] .= ' apf_checkbox'; |
|
106 | + $_aInputAttributes[ 'class' ] .= ' apf_checkbox'; |
|
107 | 107 | |
108 | 108 | $_aLiTagAttributes = array( |
109 | 109 | 'id' => "list-{$_sID}", |
@@ -112,15 +112,15 @@ discard block |
||
112 | 112 | ); |
113 | 113 | |
114 | 114 | $_sHiddenInputForUnchecked = $aArgs[ '_save_unchecked' ] |
115 | - ? "<input value='0' type='hidden' name='" . $_aInputAttributes[ 'name' ] . "' class='apf_checkbox' />" |
|
115 | + ? "<input value='0' type='hidden' name='".$_aInputAttributes[ 'name' ]."' class='apf_checkbox' />" |
|
116 | 116 | : ''; |
117 | 117 | |
118 | 118 | // Output - the variable is by reference so the modification takes effect |
119 | 119 | $sOutput .= "\n" |
120 | - . "<li " . AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ) . ">" |
|
120 | + . "<li ".AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ).">" |
|
121 | 121 | . "<label for='{$_sID}' class='taxonomy-checklist-label'>" |
122 | 122 | . $_sHiddenInputForUnchecked // 3.8.8+ |
123 | - . "<input " . AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes ) . " />" |
|
123 | + . "<input ".AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes )." />" |
|
124 | 124 | . esc_html( apply_filters( 'the_category', $oTerm->name ) ) |
125 | 125 | . $_sPostCount |
126 | 126 | . "</label>"; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /** |
82 | 82 | * Defines the field type slugs used for this field type. |
83 | 83 | */ |
84 | - public $aFieldTypeSlugs = array( 'posttype', ); |
|
84 | + public $aFieldTypeSlugs = array( 'posttype',); |
|
85 | 85 | |
86 | 86 | /** |
87 | 87 | * Defines the default key-values of this field type. |
@@ -89,20 +89,20 @@ discard block |
||
89 | 89 | * @remark $_aDefaultKeys holds shared default key-values defined in the base class. |
90 | 90 | */ |
91 | 91 | protected $aDefaultKeys = array( |
92 | - 'slugs_to_remove' => null, // the default array will be assigned in the rendering method. |
|
92 | + 'slugs_to_remove' => null, // the default array will be assigned in the rendering method. |
|
93 | 93 | /** |
94 | 94 | * Accepts query arguments. For the argument specification, see the arg parameter of get_post_types() function. |
95 | 95 | * See: http://codex.wordpress.org/Function_Reference/get_post_types#Parameters |
96 | 96 | */ |
97 | - 'query' => array(), // 3.2.1+ |
|
98 | - 'operator' => 'and', // 3.2.1+ either 'and' or 'or' |
|
97 | + 'query' => array(), // 3.2.1+ |
|
98 | + 'operator' => 'and', // 3.2.1+ either 'and' or 'or' |
|
99 | 99 | 'attributes' => array( |
100 | 100 | 'size' => 30, |
101 | 101 | 'maxlength' => 400, |
102 | 102 | ), |
103 | - 'select_all_button' => true, // 3.3.0+ to change the label, set the label here |
|
104 | - 'select_none_button' => true, // 3.3.0+ to change the label, set the label here |
|
105 | - 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
103 | + 'select_all_button' => true, // 3.3.0+ to change the label, set the label here |
|
104 | + 'select_none_button' => true, // 3.3.0+ to change the label, set the label here |
|
105 | + 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
106 | 106 | ); |
107 | 107 | protected $aDefaultRemovingPostTypeSlugs = array( |
108 | 108 | 'revision', |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | protected function getStyles() { |
121 | 121 | $_sParentStyles = parent::getStyles(); |
122 | - return $_sParentStyles . <<<CSSRULES |
|
122 | + return $_sParentStyles.<<<CSSRULES |
|
123 | 123 | /* Posttype Field Type */ |
124 | 124 | .admin-page-framework-field input[type='checkbox'] { |
125 | 125 | margin-right: 0.5em; |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | */ |
147 | 147 | protected function getField( $aField ) { |
148 | 148 | |
149 | - $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector. |
|
149 | + $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector. |
|
150 | 150 | $aField[ 'label' ] = $this->_getPostTypeArrayForChecklist( |
151 | 151 | isset( $aField[ 'slugs_to_remove' ] ) |
152 | 152 | ? $this->getAsArray( $aField[ 'slugs_to_remove' ] ) |
153 | - : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove |
|
153 | + : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove |
|
154 | 154 | $aField[ 'query' ], |
155 | 155 | $aField[ 'operator' ] |
156 | 156 | ); |
@@ -171,11 +171,11 @@ discard block |
||
171 | 171 | * @return array The array holding the elements of installed post types' labels and their slugs except the specified expluding post types. |
172 | 172 | * @internal |
173 | 173 | */ |
174 | - private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs=array(), $sOperator='and' ) { |
|
174 | + private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs = array(), $sOperator = 'and' ) { |
|
175 | 175 | |
176 | 176 | $_aPostTypes = array(); |
177 | - foreach( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) { |
|
178 | - if ( isset( $_oPostType->name, $_oPostType->label ) ) { |
|
177 | + foreach ( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) { |
|
178 | + if ( isset( $_oPostType->name, $_oPostType->label ) ) { |
|
179 | 179 | $_aPostTypes[ $_oPostType->name ] = $_oPostType->label; |
180 | 180 | } |
181 | 181 | } |
@@ -441,7 +441,7 @@ |
||
441 | 441 | * @since 3.8.8 |
442 | 442 | * @return array Post type slugs associated with the given taxonomy. |
443 | 443 | */ |
444 | - private function _getPostTypesByTaxonomySlug( $sTaxonomySlug ) { |
|
444 | + private function _getPostTypesByTaxonomySlug( $sTaxonomySlug ) { |
|
445 | 445 | $_oTaxonomy = get_taxonomy( $sTaxonomySlug ); |
446 | 446 | return $_oTaxonomy->object_type; |
447 | 447 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * Defines the field type slugs used for this field type. |
119 | 119 | * @var array |
120 | 120 | */ |
121 | - public $aFieldTypeSlugs = array( 'taxonomy', ); |
|
121 | + public $aFieldTypeSlugs = array( 'taxonomy',); |
|
122 | 122 | |
123 | 123 | /** |
124 | 124 | * Defines the default key-values of this field type. |
@@ -127,41 +127,41 @@ discard block |
||
127 | 127 | * @var array |
128 | 128 | */ |
129 | 129 | protected $aDefaultKeys = array( |
130 | - 'taxonomy_slugs' => 'category', // (array|string) This is for the taxonomy field type. |
|
131 | - 'height' => '250px', // the tab box height |
|
132 | - 'width' => null, // 3.5.7.2+ the tab box width |
|
133 | - 'max_width' => '100%', // for the taxonomy checklist field type, since 2.1.1. |
|
134 | - 'show_post_count' => true, // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not. |
|
130 | + 'taxonomy_slugs' => 'category', // (array|string) This is for the taxonomy field type. |
|
131 | + 'height' => '250px', // the tab box height |
|
132 | + 'width' => null, // 3.5.7.2+ the tab box width |
|
133 | + 'max_width' => '100%', // for the taxonomy checklist field type, since 2.1.1. |
|
134 | + 'show_post_count' => true, // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not. |
|
135 | 135 | 'attributes' => array(), |
136 | - 'select_all_button' => true, // (boolean|string) 3.3.0+ to change the label, set the label here |
|
137 | - 'select_none_button' => true, // (boolean|string) 3.3.0+ to change the label, set the label here |
|
138 | - 'label_no_term_found' => null, // (string) 3.3.2+ The label to display when no term is found. null needs to be set here as the default value will be assigned in the field output method. |
|
139 | - 'label_list_title' => '', // (string) 3.3.2+ The heading title string for a term list. Default: `''`. Insert an HTML custom string right before the list starts. |
|
136 | + 'select_all_button' => true, // (boolean|string) 3.3.0+ to change the label, set the label here |
|
137 | + 'select_none_button' => true, // (boolean|string) 3.3.0+ to change the label, set the label here |
|
138 | + 'label_no_term_found' => null, // (string) 3.3.2+ The label to display when no term is found. null needs to be set here as the default value will be assigned in the field output method. |
|
139 | + 'label_list_title' => '', // (string) 3.3.2+ The heading title string for a term list. Default: `''`. Insert an HTML custom string right before the list starts. |
|
140 | 140 | 'query' => array( // (array) 3.3.2+ Defines the default query argument. |
141 | 141 | // see the arguments of the get_category() function: http://codex.wordpress.org/Function_Reference/get_categories |
142 | 142 | // see the argument of the get_terms() function: http://codex.wordpress.org/Function_Reference/get_terms |
143 | 143 | 'child_of' => 0, |
144 | 144 | 'parent' => '', |
145 | - 'orderby' => 'name', // (string) 'ID' or 'term_id' or 'name' |
|
146 | - 'order' => 'ASC', // (string) 'ASC' or 'DESC' |
|
147 | - 'hide_empty' => false, // (boolean) whether to show the terms with no post associated. Default: false |
|
148 | - 'hierarchical' => true, // (boolean) whether to show the terms as a hierarchical tree. |
|
149 | - 'number' => '', // (integer) The maximum number of the terms to show. |
|
150 | - 'pad_counts' => false, // (boolean) whether to sum up the post counts with the child post counts. |
|
151 | - 'exclude' => array(), // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list. |
|
145 | + 'orderby' => 'name', // (string) 'ID' or 'term_id' or 'name' |
|
146 | + 'order' => 'ASC', // (string) 'ASC' or 'DESC' |
|
147 | + 'hide_empty' => false, // (boolean) whether to show the terms with no post associated. Default: false |
|
148 | + 'hierarchical' => true, // (boolean) whether to show the terms as a hierarchical tree. |
|
149 | + 'number' => '', // (integer) The maximum number of the terms to show. |
|
150 | + 'pad_counts' => false, // (boolean) whether to sum up the post counts with the child post counts. |
|
151 | + 'exclude' => array(), // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list. |
|
152 | 152 | 'exclude_tree' => array(), |
153 | - 'include' => array(), // (string) Comma separated term IDs to include in the list. |
|
153 | + 'include' => array(), // (string) Comma separated term IDs to include in the list. |
|
154 | 154 | 'fields' => 'all', |
155 | 155 | 'slug' => '', |
156 | 156 | 'get' => '', |
157 | 157 | 'name__like' => '', |
158 | 158 | 'description__like' => '', |
159 | 159 | 'offset' => '', |
160 | - 'search' => '', // (string) The search keyword to get the term with. |
|
160 | + 'search' => '', // (string) The search keyword to get the term with. |
|
161 | 161 | 'cache_domain' => 'core', |
162 | 162 | ), |
163 | - 'queries' => array(), // (optional, array) 3.3.2+ Sets a query argument for each taxonomy. The array key must be the taxonomy slug and the value is the query argument array. |
|
164 | - 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
163 | + 'queries' => array(), // (optional, array) 3.3.2+ Sets a query argument for each taxonomy. The array key must be the taxonomy slug and the value is the query argument array. |
|
164 | + 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
165 | 165 | ); |
166 | 166 | |
167 | 167 | /** |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | $_aJSArray = json_encode( $this->aFieldTypeSlugs ); |
193 | 193 | |
194 | - return parent::getScripts() . |
|
194 | + return parent::getScripts(). |
|
195 | 195 | // return |
196 | 196 | <<<JAVASCRIPTS |
197 | 197 | /* For tabs */ |
@@ -412,22 +412,22 @@ discard block |
||
412 | 412 | // Parse |
413 | 413 | $_aTabs = array(); |
414 | 414 | $_aCheckboxes = array(); |
415 | - foreach( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $_isKey => $_sTaxonomySlug ) { |
|
415 | + foreach ( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $_isKey => $_sTaxonomySlug ) { |
|
416 | 416 | $_aAssociatedDataAttributes = $this->_getDataAttributesOfAssociatedPostTypes( |
417 | 417 | $_sTaxonomySlug, |
418 | 418 | $this->_getPostTypesByTaxonomySlug( $_sTaxonomySlug ) |
419 | 419 | ); |
420 | - $_aTabs[] = $this->_getTaxonomyTab( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes ); |
|
421 | - $_aCheckboxes[] = $this->_getTaxonomyCheckboxes( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes ); |
|
420 | + $_aTabs[ ] = $this->_getTaxonomyTab( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes ); |
|
421 | + $_aCheckboxes[ ] = $this->_getTaxonomyCheckboxes( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes ); |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | // Output |
425 | - return "<div id='tabbox-{$aField['field_id']}' class='tab-box-container categorydiv' style='max-width:{$aField['max_width']};'>" |
|
425 | + return "<div id='tabbox-{$aField[ 'field_id' ]}' class='tab-box-container categorydiv' style='max-width:{$aField[ 'max_width' ]};'>" |
|
426 | 426 | . "<ul class='tab-box-tabs category-tabs'>" |
427 | 427 | . implode( PHP_EOL, $_aTabs ) |
428 | 428 | . "</ul>" |
429 | 429 | . "<div class='tab-box-contents-container'>" |
430 | - . "<div class='tab-box-contents' style='height: {$aField['height']};'>" |
|
430 | + . "<div class='tab-box-contents' style='height: {$aField[ 'height' ]};'>" |
|
431 | 431 | . implode( PHP_EOL, $_aCheckboxes ) |
432 | 432 | . "</div>" |
433 | 433 | . "</div>" |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | private function _getDataAttributesOfAssociatedPostTypes( $sTaxonomySlusg, $aPostTypes ) { |
454 | 454 | return array( |
455 | 455 | 'data-associated-with' => $sTaxonomySlusg, |
456 | - 'data-associated-post-types' => implode( ',', $aPostTypes ) . ',', // must add a trailing comma for jQuery to detect the item. |
|
456 | + 'data-associated-post-types' => implode( ',', $aPostTypes ).',', // must add a trailing comma for jQuery to detect the item. |
|
457 | 457 | ); |
458 | 458 | } |
459 | 459 | |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | private function _getTaxonomyCheckboxes( array $aField, $sKey, $sTaxonomySlug, $aAttributes ) { |
469 | 469 | |
470 | 470 | $_aTabBoxContainerArguments = array( |
471 | - 'id' => "tab_{$aField['input_id']}_{$sKey}", |
|
471 | + 'id' => "tab_{$aField[ 'input_id' ]}_{$sKey}", |
|
472 | 472 | 'class' => 'tab-box-content', |
473 | 473 | 'style' => $this->getInlineCSS( |
474 | 474 | array( |
@@ -477,9 +477,9 @@ discard block |
||
477 | 477 | ) |
478 | 478 | ), |
479 | 479 | ) + $aAttributes; |
480 | - return "<div " . $this->getAttributes( $_aTabBoxContainerArguments ) . ">" |
|
480 | + return "<div ".$this->getAttributes( $_aTabBoxContainerArguments ).">" |
|
481 | 481 | . $this->getElement( $aField, array( 'before_label', $sKey ) ) |
482 | - . "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">" |
|
482 | + . "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">" |
|
483 | 483 | . "</div>" |
484 | 484 | . "<ul class='list:category taxonomychecklist form-no-clear'>" |
485 | 485 | . $this->_getTaxonomyChecklist( $aField, $sKey, $sTaxonomySlug ) |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | 'taxonomy' => $sTaxonomySlug, |
505 | 505 | '_name_prefix' => is_array( $aField[ 'taxonomy_slugs' ] ) |
506 | 506 | ? "{$aField[ '_input_name' ]}[{$sTaxonomySlug}]" |
507 | - : $aField[ '_input_name' ], // name prefix of the input |
|
507 | + : $aField[ '_input_name' ], // name prefix of the input |
|
508 | 508 | '_input_id_prefix' => $aField[ 'input_id' ], |
509 | 509 | '_attributes' => $this->getElementAsArray( |
510 | 510 | $aField, |
@@ -512,12 +512,12 @@ discard block |
||
512 | 512 | ) + $aField[ 'attributes' ], |
513 | 513 | |
514 | 514 | // checked items ( term IDs ) e.g. array( 6, 10, 7, 15 ), |
515 | - '_selected_items' => $this->_getSelectedKeyArray( $aField['value'], $sTaxonomySlug ), |
|
515 | + '_selected_items' => $this->_getSelectedKeyArray( $aField[ 'value' ], $sTaxonomySlug ), |
|
516 | 516 | |
517 | - 'echo' => false, // returns the output |
|
518 | - 'show_post_count' => $aField[ 'show_post_count' ], // 3.2.0+ |
|
519 | - 'show_option_none' => $aField[ 'label_no_term_found' ], // 3.3.2+ |
|
520 | - 'title_li' => $aField[ 'label_list_title' ], // 3.3.2+ |
|
517 | + 'echo' => false, // returns the output |
|
518 | + 'show_post_count' => $aField[ 'show_post_count' ], // 3.2.0+ |
|
519 | + 'show_option_none' => $aField[ 'label_no_term_found' ], // 3.3.2+ |
|
520 | + 'title_li' => $aField[ 'label_list_title' ], // 3.3.2+ |
|
521 | 521 | |
522 | 522 | '_save_unchecked' => $aField[ 'save_unchecked' ], // 3.8.8+ Whether to insert hidden input element for unchecked. |
523 | 523 | ) |
@@ -564,8 +564,8 @@ discard block |
||
564 | 564 | $_aLiAttribues = array( |
565 | 565 | 'class' => 'tab-box-tab', |
566 | 566 | ) + $aAttributes; |
567 | - return "<li " . $this->getAttributes( $_aLiAttribues ) . ">" |
|
568 | - . "<a href='#tab_{$aField['input_id']}_{$sKey}'>" |
|
567 | + return "<li ".$this->getAttributes( $_aLiAttribues ).">" |
|
568 | + . "<a href='#tab_{$aField[ 'input_id' ]}_{$sKey}'>" |
|
569 | 569 | . "<span class='tab-box-tab-text'>" |
570 | 570 | . $this->_getLabelFromTaxonomySlug( $sTaxonomySlug ) |
571 | 571 | . "</span>" |
@@ -74,6 +74,8 @@ discard block |
||
74 | 74 | * <li>a base64-encoded SVG using a data URI, which will be colored to match the color scheme. This should begin with 'data:image/svg+xml;base64,'.</li> |
75 | 75 | * </ul> |
76 | 76 | * @param string (optional) the position number that is passed to the <var>$position</var> parameter of the <a href="http://codex.wordpress.org/Function_Reference/add_menu_page">add_menu_page()</a> function. |
77 | + * @param string $sIcon16x16 |
|
78 | + * @param integer $iMenuPosition |
|
77 | 79 | * @return void |
78 | 80 | */ |
79 | 81 | public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) { |
@@ -96,6 +98,7 @@ discard block |
||
96 | 98 | * |
97 | 99 | * @since 2.0.0 |
98 | 100 | * @internal |
101 | + * @param string $sMenuLabel |
|
99 | 102 | * @return void|string Returns the associated slug string, if true. |
100 | 103 | */ |
101 | 104 | private function _isBuiltInMenuItem( $sMenuLabel ) { |
@@ -160,9 +163,6 @@ discard block |
||
160 | 163 | * @since 3.0.0 Changed the scope to public. |
161 | 164 | * @remark The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug. |
162 | 165 | * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
163 | - * @param array $aSubMenuItem1 a first sub-menu array. A sub-menu array can be a link or a page. For the specifications of the array structures and its arguments, refer to the parameter section of the `addSubMenuItem()` method. |
|
164 | - * @param array $aSubMenuItem2 (optional) a second sub-menu array. |
|
165 | - * @param array $_and_more (optional) a third and add items as many as necessary with next parameters. |
|
166 | 166 | * @access public |
167 | 167 | * @return void |
168 | 168 | */ |
@@ -250,20 +250,20 @@ |
||
250 | 250 | } |
251 | 251 | |
252 | 252 | /** |
253 | - * Adds the given link into the menu on the left sidebar of the administration panel. |
|
254 | - * |
|
255 | - * @since 2.0.0 |
|
256 | - * @since 3.0.0 Changed the scope to public from protected. |
|
257 | - * @since 3.5.0 Changed the scope to public as it was still protected. |
|
258 | - * @param string the menu title. |
|
259 | - * @param string the URL linked to the menu. |
|
260 | - * @param string (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>. |
|
261 | - * @param string (optional) the order number. The larger it is, the lower the position it gets. |
|
262 | - * @param string (optional) if set to false, the menu title will not be listed in the tab navigation menu at the top of the page. |
|
263 | - * @access public |
|
264 | - * @return void |
|
265 | - * @internal |
|
266 | - */ |
|
253 | + * Adds the given link into the menu on the left sidebar of the administration panel. |
|
254 | + * |
|
255 | + * @since 2.0.0 |
|
256 | + * @since 3.0.0 Changed the scope to public from protected. |
|
257 | + * @since 3.5.0 Changed the scope to public as it was still protected. |
|
258 | + * @param string the menu title. |
|
259 | + * @param string the URL linked to the menu. |
|
260 | + * @param string (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>. |
|
261 | + * @param string (optional) the order number. The larger it is, the lower the position it gets. |
|
262 | + * @param string (optional) if set to false, the menu title will not be listed in the tab navigation menu at the top of the page. |
|
263 | + * @access public |
|
264 | + * @return void |
|
265 | + * @internal |
|
266 | + */ |
|
267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
268 | 268 | |
269 | 269 | // If required keys are not set, return. |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @param string (optional) the position number that is passed to the <var>$position</var> parameter of the <a href="http://codex.wordpress.org/Function_Reference/add_menu_page">add_menu_page()</a> function. |
77 | 77 | * @return void |
78 | 78 | */ |
79 | - public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) { |
|
79 | + public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16 = null, $iMenuPosition = null ) { |
|
80 | 80 | |
81 | 81 | $sRootMenuLabel = trim( $sRootMenuLabel ); |
82 | 82 | $_sSlug = $this->_isBuiltInMenuItem( $sRootMenuLabel ); // if true, this method returns the slug |
@@ -267,16 +267,16 @@ discard block |
||
267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
268 | 268 | |
269 | 269 | // If required keys are not set, return. |
270 | - if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
270 | + if ( !isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
271 | 271 | return; |
272 | 272 | } |
273 | 273 | |
274 | 274 | // If the set URL is not valid, return. |
275 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
275 | + if ( !filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
276 | 276 | return; |
277 | 277 | } |
278 | 278 | |
279 | - $_oFormatter = new AdminPageFramework_Format_SubMenuLink( |
|
279 | + $_oFormatter = new AdminPageFramework_Format_SubMenuLink( |
|
280 | 280 | $aSubMenuLink, |
281 | 281 | $this, |
282 | 282 | count( $this->oProp->aPages ) + 1 |
@@ -334,11 +334,11 @@ discard block |
||
334 | 334 | */ |
335 | 335 | public function addSubMenuPage( array $aSubMenuPage ) { |
336 | 336 | |
337 | - if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
337 | + if ( !isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
338 | 338 | return; |
339 | 339 | } |
340 | 340 | |
341 | - $_oFormatter = new AdminPageFramework_Format_SubMenuPage( |
|
341 | + $_oFormatter = new AdminPageFramework_Format_SubMenuPage( |
|
342 | 342 | $aSubMenuPage, |
343 | 343 | $this, |
344 | 344 | count( $this->oProp->aPages ) + 1 |
@@ -267,12 +267,12 @@ discard block |
||
267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
268 | 268 | |
269 | 269 | // If required keys are not set, return. |
270 | - if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
270 | + if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
271 | 271 | return; |
272 | 272 | } |
273 | 273 | |
274 | 274 | // If the set URL is not valid, return. |
275 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
275 | + if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
276 | 276 | return; |
277 | 277 | } |
278 | 278 | |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | */ |
335 | 335 | public function addSubMenuPage( array $aSubMenuPage ) { |
336 | 336 | |
337 | - if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
337 | + if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
338 | 338 | return; |
339 | 339 | } |
340 | 340 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @package AdminPageFramework |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
13 | +if ( !class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
14 | 14 | /** |
15 | 15 | * Facilitates WordPress plugin and theme development. |
16 | 16 | * |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | final class AdminPageFramework_Registry extends AdminPageFramework_Registry_Base { |
62 | 62 | |
63 | 63 | const TEXT_DOMAIN = 'admin-page-framework'; |
64 | - const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
64 | + const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Indicates whether the framework is loaded from the minified version or not. |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | * Sets up static properties. |
104 | 104 | * @return void |
105 | 105 | */ |
106 | - static public function setUp( $sFilePath=__FILE__ ) { |
|
106 | + static public function setUp( $sFilePath = __FILE__ ) { |
|
107 | 107 | |
108 | 108 | self::$sFilePath = $sFilePath; |
109 | 109 | self::$sDirPath = dirname( self::$sFilePath ); |
110 | - self::$sIncludeClassListPath = self::$sDirPath . '/admin-page-framework-include-class-list.php'; |
|
110 | + self::$sIncludeClassListPath = self::$sDirPath.'/admin-page-framework-include-class-list.php'; |
|
111 | 111 | self::$aClassFiles = self::_getClassFilePathList( self::$sIncludeClassListPath ); |
112 | 112 | self::$sAutoLoaderPath = isset( self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] ) |
113 | 113 | ? self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @return array |
123 | 123 | */ |
124 | 124 | static private function _getClassFilePathList( $sInclusionClassListPath ) { |
125 | - $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
125 | + $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
126 | 126 | include( $sInclusionClassListPath ); |
127 | 127 | return $aClassFiles; |
128 | 128 | } |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | */ |
136 | 136 | static public function getVersion() { |
137 | 137 | |
138 | - if ( ! isset( self::$sAutoLoaderPath ) ) { |
|
139 | - trigger_error( self::NAME . ': ' . ' : ' . sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
138 | + if ( !isset( self::$sAutoLoaderPath ) ) { |
|
139 | + trigger_error( self::NAME.': '.' : '.sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
140 | 140 | return self::VERSION; |
141 | 141 | } |
142 | - $_aMinifiedVesionSuffix = array( |
|
142 | + $_aMinifiedVesionSuffix = array( |
|
143 | 143 | 0 => '', |
144 | 144 | 1 => '.min', |
145 | 145 | ); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | endif; |
170 | 170 | |
171 | -if ( ! class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
171 | +if ( !class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
172 | 172 | /** |
173 | 173 | * Loads the Admin Page Framework library. |
174 | 174 | * |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | public function __construct( $sLibraryPath ) { |
191 | 191 | |
192 | - if ( ! $this->_isLoadable() ) { |
|
192 | + if ( !$this->_isLoadable() ) { |
|
193 | 193 | return; |
194 | 194 | } |
195 | 195 |