@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | * @since DEVVER |
104 | 104 | */ |
105 | 105 | public function _replyToEnqueueScripts() { |
106 | - if ( ! $this->oForm->isInThePage() ) { |
|
106 | + if ( !$this->oForm->isInThePage() ) { |
|
107 | 107 | return; |
108 | 108 | } |
109 | - foreach( $this->oForm->getResources( 'src_scripts' ) as $_asEnqueue ) { |
|
109 | + foreach ( $this->oForm->getResources( 'src_scripts' ) as $_asEnqueue ) { |
|
110 | 110 | $this->_enqueueScript( $_asEnqueue ); |
111 | 111 | } |
112 | 112 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | private function _getFormattedEnqueueScript( $asEnqueue ) { |
155 | 155 | static $_iCallCount = 1; |
156 | 156 | $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array( |
157 | - 'handle_id' => 'script_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount, |
|
157 | + 'handle_id' => 'script_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount, |
|
158 | 158 | 'src' => null, |
159 | 159 | 'dependencies' => null, |
160 | 160 | 'version' => null, |
@@ -177,10 +177,10 @@ discard block |
||
177 | 177 | */ |
178 | 178 | public function _replyToEnqueueStyles() { |
179 | 179 | |
180 | - if ( ! $this->oForm->isInThePage() ) { |
|
180 | + if ( !$this->oForm->isInThePage() ) { |
|
181 | 181 | return; |
182 | 182 | } |
183 | - foreach( $this->oForm->getResources( 'src_styles' ) as $_asEnqueueItem ) { |
|
183 | + foreach ( $this->oForm->getResources( 'src_styles' ) as $_asEnqueueItem ) { |
|
184 | 184 | $this->_enqueueStyle( $_asEnqueueItem ); |
185 | 185 | } |
186 | 186 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | private function _getFormattedEnqueueStyle( $asEnqueue ) { |
202 | 202 | static $_iCallCount = 1; |
203 | 203 | $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array( |
204 | - 'handle_id' => 'style_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount, |
|
204 | + 'handle_id' => 'style_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount, |
|
205 | 205 | 'src' => null, |
206 | 206 | 'dependencies' => null, |
207 | 207 | 'version' => null, |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | */ |
223 | 223 | public function _replyToAddStyle() { |
224 | 224 | |
225 | - if ( ! $this->oForm->isInThePage() ) { |
|
225 | + if ( !$this->oForm->isInThePage() ) { |
|
226 | 226 | return; |
227 | 227 | } |
228 | 228 | $_sCSSRules = $this->_getFormattedInlineStyles( |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function _replyToAddScript() { |
269 | 269 | |
270 | - if ( ! $this->oForm->isInThePage() ) { |
|
270 | + if ( !$this->oForm->isInThePage() ) { |
|
271 | 271 | return; |
272 | 272 | } |
273 | 273 |
@@ -230,7 +230,7 @@ |
||
230 | 230 | ); |
231 | 231 | |
232 | 232 | $_sID = $this->sanitizeSlug( strtolower( $this->oForm->aArguments[ 'caller_id' ] ) ); |
233 | - if ( $_sCSSRules ) { |
|
233 | + if ( $_sCSSRules ) { |
|
234 | 234 | echo "<style type='text/css' id='inline-style-{$_sID}' class='admin-page-framework-form-style'>" |
235 | 235 | . $_sCSSRules |
236 | 236 | . "</style>"; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_WPUtility { |
20 | 20 | |
21 | - public $sStructureType = ''; |
|
21 | + public $sStructureType = ''; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Stores the message object. |
@@ -49,18 +49,18 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function get() { |
51 | 51 | |
52 | - if ( ! $this->isDebugModeEnabled() ) { |
|
52 | + if ( !$this->isDebugModeEnabled() ) { |
|
53 | 53 | return ''; |
54 | 54 | } |
55 | 55 | |
56 | 56 | // For the generic admin pages, do no show debug information for each section. |
57 | - if ( ! in_array( $this->sStructureType, array( 'widget', 'post_meta_box', 'page_meta_box', 'user_meta' ) ) ) { |
|
57 | + if ( !in_array( $this->sStructureType, array( 'widget', 'post_meta_box', 'page_meta_box', 'user_meta' ) ) ) { |
|
58 | 58 | return ''; |
59 | 59 | } |
60 | 60 | |
61 | 61 | return "<div class='admin-page-framework-info'>" |
62 | - . $this->oMsg->get( 'debug_info' ) . ': ' |
|
63 | - . AdminPageFramework_Registry::NAME . ' ' . AdminPageFramework_Registry::getVersion() |
|
62 | + . $this->oMsg->get( 'debug_info' ).': ' |
|
63 | + . AdminPageFramework_Registry::NAME.' '.AdminPageFramework_Registry::getVersion() |
|
64 | 64 | . "</div>"; |
65 | 65 | |
66 | 66 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @since DEVVER Renamed from `AdminPageFramework_FormPart_DebugInfo`. |
17 | 17 | * @internal |
18 | 18 | */ |
19 | -class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_WPUtility { |
|
19 | +class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_WPUtility { |
|
20 | 20 | |
21 | 21 | public $sStructureType = ''; |
22 | 22 |
@@ -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>" |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @since 3.6.0 |
16 | 16 | * @internal |
17 | 17 | */ |
18 | -class AdminPageFramework_Form_View___Description extends AdminPageFramework_WPUtility { |
|
18 | +class AdminPageFramework_Form_View___Description extends AdminPageFramework_WPUtility { |
|
19 | 19 | |
20 | 20 | public $aDescriptions = array(); |
21 | 21 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @since 3.6.0 |
26 | 26 | */ |
27 | - public $sContext = ''; |
|
27 | + public $sContext = ''; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $this->aAttributes + $this->_getAttributes() |
33 | 33 | ); |
34 | 34 | |
35 | - $_aAttributes[ 'class' ] = $this->getClassAttribute( |
|
35 | + $_aAttributes[ 'class' ] = $this->getClassAttribute( |
|
36 | 36 | $this->getElement( $_aAttributes, 'class', array() ), |
37 | 37 | $this->getElement( $this->aArguments, array( 'class', $this->sContext ), array() ) |
38 | 38 | ); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @since 3.6.0 |
26 | 26 | */ |
27 | - public $sContext = 'fieldrow'; |
|
27 | + public $sContext = 'fieldrow'; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @return array The formatted attributes array. |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $_aAttributes = parent::_getFormattedAttributes(); |
35 | 35 | |
36 | 36 | // Set the visibility CSS property for the outermost container element. |
37 | - if ( $this->aArguments[ 'hidden' ] ) { |
|
37 | + if ( $this->aArguments[ 'hidden' ] ) { |
|
38 | 38 | $_aAttributes[ 'style' ] = $this->getStyleAttribute( |
39 | 39 | $this->getElement( $_aAttributes, 'style', array() ), |
40 | 40 | 'display:none' |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $this->aAttributes, |
39 | 39 | $this->iFieldsCount, |
40 | 40 | ); |
41 | - $this->aArguments = $_aParameters[ 0 ]; |
|
41 | + $this->aArguments = $_aParameters[ 0 ]; |
|
42 | 42 | $this->aAttributes = $_aParameters[ 1 ]; |
43 | 43 | $this->iFieldsCount = $_aParameters[ 2 ]; |
44 | 44 | |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | */ |
52 | 52 | protected function _getAttributes() { |
53 | 53 | return array( |
54 | - 'id' => $this->sContext . '-' . $this->aArguments[ 'tag_id' ], |
|
55 | - 'class' => 'admin-page-framework-' . $this->sContext |
|
54 | + 'id' => $this->sContext.'-'.$this->aArguments[ 'tag_id' ], |
|
55 | + 'class' => 'admin-page-framework-'.$this->sContext |
|
56 | 56 | . $this->getAOrB( $this->aArguments[ 'repeatable' ], ' repeatable dynamic-fields', '' ) // 3.6.0+ Added the 'dynamic-fields' class selector. |
57 | 57 | . $this->getAOrB( $this->aArguments[ 'sortable' ], ' sortable dynamic-fields', '' ), |
58 | 58 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | // 3.6.0+ Stores the total number of dynamic fields, used to generate the input id and name of repeated fields which contain an incremented index number. |
63 | 63 | 'data-largest_index' => max( |
64 | - ( int ) $this->iFieldsCount - 1, // zero-base index |
|
64 | + ( int ) $this->iFieldsCount - 1, // zero-base index |
|
65 | 65 | 0 |
66 | 66 | ), // convert negative numbers to zero. |
67 | 67 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @since 3.6.0 |
26 | 26 | */ |
27 | - public $sContext = 'fieldset'; |
|
27 | + public $sContext = 'fieldset'; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Returns an attribute array. |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected function _getAttributes() { |
34 | 34 | return array( |
35 | - 'id' => $this->sContext . '-' . $this->aArguments[ 'tag_id' ], |
|
36 | - 'class' => 'admin-page-framework-' . $this->sContext, |
|
35 | + 'id' => $this->sContext.'-'.$this->aArguments[ 'tag_id' ], |
|
36 | + 'class' => 'admin-page-framework-'.$this->sContext, |
|
37 | 37 | 'data-field_id' => $this->aArguments[ 'tag_id' ], // <-- not sure what this was for... |
38 | 38 | ); |
39 | 39 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class AdminPageFramework_Form_View___Attribute_SectionTable extends AdminPageFramework_Form_View___Attribute_Base { |
19 | 19 | |
20 | - public $sContext = 'section_table'; |
|
20 | + public $sContext = 'section_table'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Returns an attribute array. |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | protected function _getAttributes() { |
29 | 29 | return array( |
30 | - 'id' => 'section_table-' . $this->aArguments[ '_tag_id' ], // 'section-' . $sSectionID . '__' . $iSectionIndex |
|
30 | + 'id' => 'section_table-'.$this->aArguments[ '_tag_id' ], // 'section-' . $sSectionID . '__' . $iSectionIndex |
|
31 | 31 | 'class' => $this->getClassAttribute( |
32 | 32 | 'form-table', |
33 | 33 | 'admin-page-framework-section-table' // referred by the collapsible section script |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @since 3.6.0 |
26 | 26 | * @return array |
27 | 27 | */ |
28 | - protected function _getAttributes() { |
|
28 | + protected function _getAttributes() { |
|
29 | 29 | return array( |
30 | 30 | 'id' => 'section_table-' . $this->aArguments[ '_tag_id' ], // 'section-' . $sSectionID . '__' . $iSectionIndex |
31 | 31 | 'class' => $this->getClassAttribute( |