@@ -107,8 +107,8 @@ |
||
107 | 107 | } |
108 | 108 | CSSRULES; |
109 | 109 | |
110 | - return $_sCSS . PHP_EOL |
|
111 | - . self::_getPageLoadStatsRules() . PHP_EOL |
|
110 | + return $_sCSS.PHP_EOL |
|
111 | + . self::_getPageLoadStatsRules().PHP_EOL |
|
112 | 112 | . self::_getVersionSpecificRules(); |
113 | 113 | |
114 | 114 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | array( $this, '_replyToRegisterFormItems' ), |
30 | 30 | 100 // priority - low value is set as meta boxes use the `current_screen` action hook for `setUp()`. |
31 | 31 | ); |
32 | - } else { |
|
32 | + } else { |
|
33 | 33 | add_action( |
34 | 34 | $this->aArguments[ 'action_hook_form_registration' ], |
35 | 35 | array( $this, '_replyToRegisterFormItems' ) |
@@ -147,12 +147,12 @@ discard block |
||
147 | 147 | * Changed the name from `getFieldsModel()`. |
148 | 148 | * @return array |
149 | 149 | */ |
150 | - public function getDataStructureFromAddedFieldsets() { |
|
150 | + public function getDataStructureFromAddedFieldsets() { |
|
151 | 151 | |
152 | 152 | $_aFormDataStructure = array(); |
153 | 153 | foreach ( $this->getAsArray( $this->aFieldsets ) as $_sSectionID => $_aFieldsets ) { |
154 | 154 | |
155 | - if ( $_sSectionID != '_default' ) { |
|
155 | + if ( $_sSectionID != '_default' ) { |
|
156 | 156 | $_aFormDataStructure[ $_sSectionID ] = $_aFieldsets; |
157 | 157 | continue; |
158 | 158 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * @param array $aSubject The subject array to modify. Usually the saved option data. |
186 | 186 | * @return array The modified options array. |
187 | 187 | */ |
188 | - public function dropRepeatableElements( array $aSubject ) { |
|
188 | + public function dropRepeatableElements( array $aSubject ) { |
|
189 | 189 | $_oFilterRepeatableElements = new AdminPageFramework_Form_Model___Modifier_FilterRepeatableElements( |
190 | 190 | $aSubject, |
191 | 191 | $this->getElementAsArray( |
@@ -402,7 +402,6 @@ discard block |
||
402 | 402 | * |
403 | 403 | * @since 3.7.0 |
404 | 404 | * @param array $aSavedData |
405 | - * @param boolean $bOnlyFieldsets Whether to format only the fieldsets. The taxonomy field factory uses this parameter. |
|
406 | 405 | */ |
407 | 406 | protected function _formatElementDefinitions( array $aSavedData ) { |
408 | 407 | |
@@ -438,7 +437,6 @@ discard block |
||
438 | 437 | * Changed the name from `_getFieldErrors()`. |
439 | 438 | * @access public The field type class accesses this method to render nested fields. |
440 | 439 | * @internal |
441 | - * @param boolean $bDelete whether or not the transient should be deleted after retrieving it. |
|
442 | 440 | * @return array |
443 | 441 | */ |
444 | 442 | public function getFieldErrors() { |
@@ -47,16 +47,16 @@ discard block |
||
47 | 47 | * @return array |
48 | 48 | * @since 3.7.0 |
49 | 49 | */ |
50 | - public function getSubmittedData( array $aDataToParse, $bExtractFromFieldStructure=true, $bStripSlashes=true ) { |
|
50 | + public function getSubmittedData( array $aDataToParse, $bExtractFromFieldStructure = true, $bStripSlashes = true ) { |
|
51 | 51 | |
52 | 52 | // Extracts the form data from the subject data for parsing |
53 | - $_aSubmittedFormData = $bExtractFromFieldStructure |
|
53 | + $_aSubmittedFormData = $bExtractFromFieldStructure |
|
54 | 54 | ? $this->castArrayContents( |
55 | 55 | $this->getDataStructureFromAddedFieldsets(), // form data (options) structure |
56 | 56 | $aDataToParse // the subject data array, usually $_POST. |
57 | 57 | ) |
58 | 58 | : $aDataToParse; |
59 | - $_aSubmittedFormData = $this->getHTTPRequestSanitized( $_aSubmittedFormData, $bStripSlashes ); |
|
59 | + $_aSubmittedFormData = $this->getHTTPRequestSanitized( $_aSubmittedFormData, $bStripSlashes ); |
|
60 | 60 | return $this->getSortedInputs( $_aSubmittedFormData ); // [3.6.0] - sorts dynamic elements. |
61 | 61 | |
62 | 62 | } |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | array_merge( |
80 | 80 | $this->getElementAsArray( |
81 | 81 | $_POST, |
82 | - '__repeatable_elements_' . $this->aArguments[ 'structure_type' ], |
|
82 | + '__repeatable_elements_'.$this->aArguments[ 'structure_type' ], |
|
83 | 83 | array() |
84 | 84 | ), |
85 | 85 | $this->getElementAsArray( |
86 | 86 | $_POST, |
87 | - '__sortable_elements_' . $this->aArguments[ 'structure_type' ], |
|
87 | + '__sortable_elements_'.$this->aArguments[ 'structure_type' ], |
|
88 | 88 | array() |
89 | 89 | ) |
90 | 90 | ) |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | * Changed the name from `getFieldsModel()`. |
144 | 144 | * @return array |
145 | 145 | */ |
146 | - public function getDataStructureFromAddedFieldsets() { |
|
146 | + public function getDataStructureFromAddedFieldsets() { |
|
147 | 147 | |
148 | - $_aFormDataStructure = array(); |
|
148 | + $_aFormDataStructure = array(); |
|
149 | 149 | foreach ( $this->getAsArray( $this->aFieldsets ) as $_sSectionID => $_aFieldsets ) { |
150 | 150 | |
151 | 151 | if ( $_sSectionID != '_default' ) { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | // For default field items. |
157 | - foreach( $_aFieldsets as $_sFieldID => $_aFieldset ) { |
|
157 | + foreach ( $_aFieldsets as $_sFieldID => $_aFieldset ) { |
|
158 | 158 | $_aFormDataStructure[ $_aFieldset[ 'field_id' ] ] = $_aFieldset; |
159 | 159 | } |
160 | 160 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $aSubject, |
187 | 187 | $this->getElementAsArray( |
188 | 188 | $_POST, |
189 | - '__repeatable_elements_' . $this->aArguments[ 'structure_type' ] |
|
189 | + '__repeatable_elements_'.$this->aArguments[ 'structure_type' ] |
|
190 | 190 | ) |
191 | 191 | ); |
192 | 192 | return $_oFilterRepeatableElements->get(); |
@@ -199,13 +199,13 @@ discard block |
||
199 | 199 | public function _replyToRegisterFormItems() { |
200 | 200 | |
201 | 201 | // Check if the form should be created or not. |
202 | - if ( ! $this->isInThePage() ) { |
|
202 | + if ( !$this->isInThePage() ) { |
|
203 | 203 | return; |
204 | 204 | } |
205 | 205 | |
206 | 206 | // Load field type definitions. |
207 | - $this->_setFieldTypeDefinitions( 'admin_page_framework' ); // site-wide |
|
208 | - $this->_setFieldTypeDefinitions( $this->aArguments[ 'caller_id' ] ); // per class |
|
207 | + $this->_setFieldTypeDefinitions( 'admin_page_framework' ); // site-wide |
|
208 | + $this->_setFieldTypeDefinitions( $this->aArguments[ 'caller_id' ] ); // per class |
|
209 | 209 | |
210 | 210 | // Set the options array |
211 | 211 | $this->aSavedData = $this->_getSavedData( |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $this->aArguments, |
234 | 234 | $this->aFieldsets, |
235 | 235 | self::$_aResources, |
236 | - $this->aFieldTypeDefinitions, // must be called after performing `_setFieldTypeDefinitions()`. |
|
236 | + $this->aFieldTypeDefinitions, // must be called after performing `_setFieldTypeDefinitions()`. |
|
237 | 237 | $this->aCallbacks |
238 | 238 | ); |
239 | 239 | self::$_aResources = $_oFieldResources->get(); // updates the property |
@@ -250,10 +250,10 @@ discard block |
||
250 | 250 | $this->callBack( |
251 | 251 | $this->aCallbacks[ 'handle_form_data' ], |
252 | 252 | array( |
253 | - $this->aSavedData, // 1st parameter |
|
254 | - $this->aArguments, // 2nd parameter |
|
255 | - $this->aSectionsets, // 3rd parameter |
|
256 | - $this->aFieldsets, // 4th parameter |
|
253 | + $this->aSavedData, // 1st parameter |
|
254 | + $this->aArguments, // 2nd parameter |
|
255 | + $this->aSectionsets, // 3rd parameter |
|
256 | + $this->aFieldsets, // 4th parameter |
|
257 | 257 | ) |
258 | 258 | ); |
259 | 259 | |
@@ -267,15 +267,15 @@ discard block |
||
267 | 267 | $this->aSectionsets = $this->callBack( |
268 | 268 | $this->aCallbacks[ 'secitonsets_before_registration' ], |
269 | 269 | array( |
270 | - $this->aSectionsets, // 1st parameter |
|
270 | + $this->aSectionsets, // 1st parameter |
|
271 | 271 | ) |
272 | 272 | ); |
273 | 273 | // Let the main routine modify the fieldsets definition array. |
274 | 274 | $this->aFieldsets = $this->callBack( |
275 | 275 | $this->aCallbacks[ 'fieldsets_before_registration' ], |
276 | 276 | array( |
277 | - $this->aFieldsets, // 1st parameter |
|
278 | - $this->aSectionsets, // 2nd parameter |
|
277 | + $this->aFieldsets, // 1st parameter |
|
278 | + $this->aSectionsets, // 2nd parameter |
|
279 | 279 | ) |
280 | 280 | ); |
281 | 281 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | /** |
44 | 44 | * Stores the section definition. |
45 | 45 | */ |
46 | - public $aSection = array(); |
|
46 | + public $aSection = array(); |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * Indicates the sub section index. |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | |
92 | 92 | $_aSection[ '_is_collapsible' ] = $_aSection[ 'collapsible' ] && 'section' === $_aSection[ 'collapsible' ][ 'container' ]; |
93 | 93 | |
94 | - $_aSection[ '_tag_id' ] = 'section-' . $_aSection[ 'section_id' ] . '__' . $this->iIndex; |
|
95 | - $_aSection[ '_tag_id_model' ] = 'section-' . $_aSection[ 'section_id' ] . '__' . '___i___'; |
|
94 | + $_aSection[ '_tag_id' ] = 'section-'.$_aSection[ 'section_id' ].'__'.$this->iIndex; |
|
95 | + $_aSection[ '_tag_id_model' ] = 'section-'.$_aSection[ 'section_id' ].'__'.'___i___'; |
|
96 | 96 | |
97 | 97 | return $_aSection; |
98 | 98 |
@@ -236,7 +236,7 @@ |
||
236 | 236 | */ |
237 | 237 | private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) { |
238 | 238 | |
239 | - if ( ! $aSectionset[ 'title' ] ){ |
|
239 | + if ( ! $aSectionset[ 'title' ] ) { |
|
240 | 240 | return false; |
241 | 241 | } |
242 | 242 | if ( $aSectionset[ 'collapsible' ] ) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | private function _getCaption( array $aSectionset, $iSectionIndex, $aFieldsets, $aFieldErrors, $aFieldTypeDefinitions, $aCallbacks, $oMsg ) { |
82 | 82 | |
83 | - if ( ! $aSectionset[ 'description' ] && ! $aSectionset[ 'title' ] ) { |
|
83 | + if ( !$aSectionset[ 'description' ] && !$aSectionset[ 'title' ] ) { |
|
84 | 84 | return "<caption class='admin-page-framework-section-caption' style='display:none;'></caption>"; |
85 | 85 | } |
86 | 86 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | 'collapsible' => $_abCollapsible, |
104 | 104 | 'container_type' => 'section', // section or sections |
105 | 105 | |
106 | - 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
106 | + 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
107 | 107 | ), |
108 | 108 | $aFieldsets, |
109 | 109 | $this->aSavedData, |
@@ -113,15 +113,15 @@ discard block |
||
113 | 113 | $aCallbacks // field output element callables. |
114 | 114 | ); |
115 | 115 | |
116 | - $_bShowTitle = empty( $_abCollapsible ) && ! $aSectionset[ 'section_tab_slug' ]; |
|
116 | + $_bShowTitle = empty( $_abCollapsible ) && !$aSectionset[ 'section_tab_slug' ]; |
|
117 | 117 | return |
118 | - "<caption " . $this->getAttributes( |
|
118 | + "<caption ".$this->getAttributes( |
|
119 | 119 | array( |
120 | 120 | 'class' => 'admin-page-framework-section-caption', |
121 | 121 | // data-section_tab is referred by the repeater script to hide/show the title and the description |
122 | 122 | 'data-section_tab' => $aSectionset[ 'section_tab_slug' ], |
123 | 123 | ) |
124 | - ) . ">" |
|
124 | + ).">" |
|
125 | 125 | . $_oCollapsibleSectionTitle->get() |
126 | 126 | . $this->getAOrB( |
127 | 127 | $_bShowTitle, |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | 'tag' => 'h3', |
176 | 176 | 'section_index' => $iSectionIndex, |
177 | 177 | |
178 | - 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
178 | + 'sectionset' => $aSectionset, // 3.7.0+ for tooltip |
|
179 | 179 | ), |
180 | 180 | $aFieldsets, |
181 | 181 | $this->aSavedData, |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $this->oMsg, |
185 | 185 | $this->aCallbacks // field output element callables. |
186 | 186 | ); |
187 | - return "<div " . $this->getAttributes( |
|
187 | + return "<div ".$this->getAttributes( |
|
188 | 188 | array( |
189 | 189 | 'class' => 'admin-page-framework-section-title', |
190 | 190 | 'style' => $this->getAOrB( |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | 'display: none;' |
194 | 194 | ), |
195 | 195 | ) |
196 | - ). ">" |
|
196 | + ).">" |
|
197 | 197 | . $_oSectionTitle->get() |
198 | 198 | . "</div>"; |
199 | 199 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | if ( $aSectionset[ 'collapsible' ] ) { |
210 | 210 | return ''; |
211 | 211 | } |
212 | - if ( ! is_callable( $hfSectionCallback ) ) { |
|
212 | + if ( !is_callable( $hfSectionCallback ) ) { |
|
213 | 213 | return ''; |
214 | 214 | } |
215 | 215 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | */ |
242 | 242 | private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) { |
243 | 243 | |
244 | - if ( ! $aSectionset[ 'title' ] ){ |
|
244 | + if ( !$aSectionset[ 'title' ] ) { |
|
245 | 245 | return false; |
246 | 246 | } |
247 | 247 | if ( $aSectionset[ 'collapsible' ] ) { |
@@ -65,7 +65,7 @@ |
||
65 | 65 | private function _getFieldError( $aErrors, $aSectionPath, $aFieldPath, $sHeadingMessage ) { |
66 | 66 | |
67 | 67 | // If this field has a section and the error element is set |
68 | - $_aErrorPath = array_merge( $aSectionPath, $aFieldPath ); |
|
68 | + $_aErrorPath = array_merge( $aSectionPath, $aFieldPath ); |
|
69 | 69 | if ( $this->_hasFieldError( $aErrors, $_aErrorPath ) ) { |
70 | 70 | return "<span class='field-error'>* " |
71 | 71 | . $sHeadingMessage |
@@ -75,6 +75,7 @@ |
||
75 | 75 | * |
76 | 76 | * @since 3.1.0 |
77 | 77 | * @since 3.7.0 Moved from `AdminPageFramework_Form_View___Fieldset`. |
78 | + * @param string $sHeadingMessage |
|
78 | 79 | * @return string The error string message. An empty value if not found. |
79 | 80 | */ |
80 | 81 | private function _getFieldError( $aErrors, $aSectionPath, $aFieldPath, $sHeadingMessage ) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class AdminPageFramework_Form_View___Attribute_SectionTableBody extends AdminPageFramework_Form_View___Attribute_Base { |
19 | 19 | |
20 | - public $sContext = 'section_table_content'; |
|
20 | + public $sContext = 'section_table_content'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Returns an attribute array. |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | return array( |
36 | 36 | 'class' => $this->getAOrB( |
37 | 37 | $this->aArguments[ '_is_collapsible' ], |
38 | - 'admin-page-framework-collapsible-section-content' . ' ' |
|
39 | - . 'admin-page-framework-collapsible-content' . ' ' |
|
40 | - . 'accordion-section-content' . ' ' |
|
41 | - . 'admin-page-framework-collapsible-content-type-' . $_sCollapsibleType, |
|
38 | + 'admin-page-framework-collapsible-section-content'.' ' |
|
39 | + . 'admin-page-framework-collapsible-content'.' ' |
|
40 | + . 'accordion-section-content'.' ' |
|
41 | + . 'admin-page-framework-collapsible-content-type-'.$_sCollapsibleType, |
|
42 | 42 | null |
43 | 43 | ), |
44 | 44 | ); |
@@ -23,11 +23,11 @@ |
||
23 | 23 | */ |
24 | 24 | protected function _get() { |
25 | 25 | |
26 | - $_sSpinnerPath = $this->getWPAdminDirPath() . '/images/wpspin_light-2x.gif'; |
|
27 | - if ( ! file_exists( $_sSpinnerPath ) ) { |
|
26 | + $_sSpinnerPath = $this->getWPAdminDirPath().'/images/wpspin_light-2x.gif'; |
|
27 | + if ( !file_exists( $_sSpinnerPath ) ) { |
|
28 | 28 | return ''; |
29 | 29 | } |
30 | - $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) ); |
|
30 | + $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) ); |
|
31 | 31 | return <<<CSSRULES |
32 | 32 | .admin-page-framework-form-loading { |
33 | 33 | position: absolute; |
@@ -50,8 +50,8 @@ |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | $_aOutput = array(); |
53 | - foreach( $this->aDescriptions as $_sDescription ) { |
|
54 | - $_aOutput[] = "<p class='" . esc_attr( $this->sClassAttribute ) . "'>" |
|
53 | + foreach ( $this->aDescriptions as $_sDescription ) { |
|
54 | + $_aOutput[ ] = "<p class='".esc_attr( $this->sClassAttribute )."'>" |
|
55 | 55 | . "<span class='description'>" |
56 | 56 | . $_sDescription |
57 | 57 | . "</span>" |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @internal |
17 | 17 | * @extends AdminPageFramework_FrameworkUtility |
18 | 18 | */ |
19 | -class AdminPageFramework_Form_View___Description extends AdminPageFramework_FrameworkUtility { |
|
19 | +class AdminPageFramework_Form_View___Description extends AdminPageFramework_FrameworkUtility { |
|
20 | 20 | |
21 | 21 | public $aDescriptions = array(); |
22 | 22 |
@@ -49,7 +49,7 @@ |
||
49 | 49 | * @return string The generated string value. |
50 | 50 | */ |
51 | 51 | public function get() { |
52 | - return $this->_getFiltered( $this->_getBaseFieldTagID() . '__' . $this->isIndex ); |
|
52 | + return $this->_getFiltered( $this->_getBaseFieldTagID().'__'.$this->isIndex ); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | } |