@@ -121,14 +121,14 @@ |
||
121 | 121 | foreach( $this->aFieldsets as $_sSecitonID => $_aFieldsets ) { |
122 | 122 | |
123 | 123 | $_bIsSubSectionLoaded = false; |
124 | - foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
124 | + foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
125 | 125 | // @todo Examine if this structure is correct or not. |
126 | 126 | // It may not be necessary to check the sub-section dimensions as this is not the saved options array. |
127 | 127 | // if it's a sub-section |
128 | 128 | if ( $this->isNumericInteger( $_iSubSectionIndexOrFieldID ) ) { |
129 | 129 | |
130 | 130 | // no need to repeat the same set of fields |
131 | - if ( $_bIsSubSectionLoaded ) { |
|
131 | + if ( $_bIsSubSectionLoaded ) { |
|
132 | 132 | continue; |
133 | 133 | } |
134 | 134 | $_bIsSubSectionLoaded = true; |
@@ -92,16 +92,16 @@ discard block |
||
92 | 92 | 'AdminPageFramework_Form_View___CSS_FieldError', |
93 | 93 | 'AdminPageFramework_Form_View___CSS_ToolTip', |
94 | 94 | ); |
95 | - foreach( $_aClassNames as $_sClassName ) { |
|
95 | + foreach ( $_aClassNames as $_sClassName ) { |
|
96 | 96 | $_oCSS = new $_sClassName; |
97 | - $this->aResources[ 'inline_styles' ][] = $_oCSS->get(); |
|
97 | + $this->aResources[ 'inline_styles' ][ ] = $_oCSS->get(); |
|
98 | 98 | } |
99 | 99 | $_aClassNamesForIE = array( |
100 | 100 | 'AdminPageFramework_Form_View___CSS_CollapsibleSectionIE', |
101 | 101 | ); |
102 | - foreach( $_aClassNames as $_sClassName ) { |
|
102 | + foreach ( $_aClassNames as $_sClassName ) { |
|
103 | 103 | $_oCSS = new $_sClassName; |
104 | - $this->aResources[ 'inline_styles_ie' ][] = $_oCSS->get(); |
|
104 | + $this->aResources[ 'inline_styles_ie' ][ ] = $_oCSS->get(); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | } |
@@ -120,10 +120,10 @@ discard block |
||
120 | 120 | protected function _set( ) { |
121 | 121 | |
122 | 122 | // Parse all added fieldsets and check associated resources. |
123 | - foreach( $this->aFieldsets as $_sSecitonID => $_aFieldsets ) { |
|
123 | + foreach ( $this->aFieldsets as $_sSecitonID => $_aFieldsets ) { |
|
124 | 124 | |
125 | 125 | $_bIsSubSectionLoaded = false; |
126 | - foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
126 | + foreach ( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
127 | 127 | // @todo Examine if this structure is correct or not. |
128 | 128 | // It may not be necessary to check the sub-section dimensions as this is not the saved options array. |
129 | 129 | // if it's a sub-section |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | continue; |
135 | 135 | } |
136 | 136 | $_bIsSubSectionLoaded = true; |
137 | - foreach( $_aSubSectionOrField as $_aField ) { |
|
137 | + foreach ( $_aSubSectionOrField as $_aField ) { |
|
138 | 138 | $this->_setFieldResources( $_aField ); |
139 | 139 | } |
140 | 140 | continue; |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | private function _setFieldResources( array $aFieldset ) { |
160 | 160 | |
161 | 161 | // Check the field conditions here. |
162 | - if ( ! $this->_isFieldsetAllowed( $aFieldset ) ) { |
|
162 | + if ( !$this->_isFieldsetAllowed( $aFieldset ) ) { |
|
163 | 163 | return; |
164 | 164 | } |
165 | 165 | |
166 | 166 | // 3.8.0+ Support nested fields. |
167 | 167 | if ( $this->hasFieldDefinitionsInContent( $aFieldset ) ) { |
168 | - foreach( $aFieldset[ 'content' ] as $_asNestedFieldset ) { |
|
168 | + foreach ( $aFieldset[ 'content' ] as $_asNestedFieldset ) { |
|
169 | 169 | if ( is_scalar( $_asNestedFieldset ) ) { |
170 | 170 | continue; |
171 | 171 | } |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $this->callBack( |
203 | 203 | $this->aCallbacks[ 'load_fieldset_resource' ], |
204 | 204 | array( |
205 | - $aFieldset, // 1st parameter |
|
205 | + $aFieldset, // 1st parameter |
|
206 | 206 | ) |
207 | 207 | ); |
208 | 208 | |
@@ -235,10 +235,10 @@ discard block |
||
235 | 235 | * @return boolean |
236 | 236 | */ |
237 | 237 | private function _isAlreadyRegistered( $sFieldtype, $sStructureType ) { |
238 | - if ( isset( self::$_aRegisteredFieldTypes[ $sFieldtype . '_' .$sStructureType ] ) ) { |
|
238 | + if ( isset( self::$_aRegisteredFieldTypes[ $sFieldtype.'_'.$sStructureType ] ) ) { |
|
239 | 239 | return true; |
240 | 240 | } |
241 | - self::$_aRegisteredFieldTypes[ $sFieldtype . '_' .$sStructureType ] = true; |
|
241 | + self::$_aRegisteredFieldTypes[ $sFieldtype.'_'.$sStructureType ] = true; |
|
242 | 242 | return false; |
243 | 243 | } |
244 | 244 | /** |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | return $this->callBack( |
258 | 258 | $this->aCallbacks[ 'is_fieldset_registration_allowed' ], |
259 | 259 | array( |
260 | - true, // 1st parameter |
|
260 | + true, // 1st parameter |
|
261 | 261 | $aFieldset, // 2nd parameter |
262 | 262 | ) |
263 | 263 | ); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | array( $this, '_replyToAddPostTypeQueryInEditPostLink' ), |
34 | 34 | 10, |
35 | 35 | 3 |
36 | - ); |
|
36 | + ); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * @return array The formatted definition array. |
41 | 41 | */ |
42 | 42 | public function get() { |
43 | - foreach( $this->aDimensionalKeys as $_sFlatFieldAddress ) { |
|
43 | + foreach ( $this->aDimensionalKeys as $_sFlatFieldAddress ) { |
|
44 | 44 | $this->unsetDimensionalArrayElement( |
45 | 45 | $this->aSubject, |
46 | 46 | explode( '|', $_sFlatFieldAddress ) |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $this->aInput, |
30 | 30 | $this->aFieldAddresses, |
31 | 31 | ); |
32 | - $this->aInput = $_aParameters[ 0 ]; |
|
32 | + $this->aInput = $_aParameters[ 0 ]; |
|
33 | 33 | $this->aFieldAddresses = $_aParameters[ 1 ]; |
34 | 34 | |
35 | 35 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function get() { |
44 | 44 | |
45 | - foreach( $this->_getFormattedDimensionalKeys( $this->aFieldAddresses ) as $_sFlatFieldAddress ) { |
|
45 | + foreach ( $this->_getFormattedDimensionalKeys( $this->aFieldAddresses ) as $_sFlatFieldAddress ) { |
|
46 | 46 | |
47 | 47 | $_aDimensionalKeys = explode( '|', $_sFlatFieldAddress ); |
48 | 48 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | // If the retrieved value does not exist, null will be given. |
55 | 55 | // This occurs with page meta boxes. |
56 | - if ( ! is_array( $_aDynamicElements ) ) { |
|
56 | + if ( !is_array( $_aDynamicElements ) ) { |
|
57 | 57 | continue; |
58 | 58 | } |
59 | 59 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class AdminPageFramework_Form_Model___DefaultValues extends AdminPageFramework_Form_Base { |
19 | 19 | |
20 | - public $aFieldsets = array(); |
|
20 | + public $aFieldsets = array(); |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Sets up hooks. |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $_aParameters = func_get_args() + array( |
29 | 29 | $this->aFieldsets, |
30 | 30 | ); |
31 | - $this->aFieldsets = $_aParameters[ 0 ]; |
|
31 | + $this->aFieldsets = $_aParameters[ 0 ]; |
|
32 | 32 | |
33 | 33 | } |
34 | 34 | |
@@ -86,13 +86,13 @@ discard block |
||
86 | 86 | */ |
87 | 87 | private function _getDefaultValues( $aFieldsets, $aDefaultOptions ) { |
88 | 88 | |
89 | - foreach( $aFieldsets as $_sSectionPath => $_aItems ) { |
|
89 | + foreach ( $aFieldsets as $_sSectionPath => $_aItems ) { |
|
90 | 90 | |
91 | 91 | $_aSectionPath = explode( '|', $_sSectionPath ); |
92 | - foreach( $_aItems as $_sFieldPath => $_aFieldset ) { |
|
92 | + foreach ( $_aItems as $_sFieldPath => $_aFieldset ) { |
|
93 | 93 | $_aFieldPath = explode( '|', $_sFieldPath ); |
94 | 94 | $this->setMultiDimensionalArray( |
95 | - $aDefaultOptions, // by reference |
|
95 | + $aDefaultOptions, // by reference |
|
96 | 96 | '_default' === $_sSectionPath |
97 | 97 | ? array( $_sFieldPath ) |
98 | 98 | : array_merge( $_aSectionPath, $_aFieldPath ), // key address |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | // If there are no sub-fields |
149 | 149 | if ( count( $_aSubFields ) == 0 ) { |
150 | 150 | return $this->getElement( |
151 | - $aFieldset, // subject |
|
152 | - 'value', // key |
|
151 | + $aFieldset, // subject |
|
152 | + 'value', // key |
|
153 | 153 | $this->getElement( // default value |
154 | - $aFieldset, // subject |
|
155 | - 'default', // key |
|
154 | + $aFieldset, // subject |
|
155 | + 'default', // key |
|
156 | 156 | null // default value |
157 | 157 | ) |
158 | 158 | ); |
@@ -161,13 +161,13 @@ discard block |
||
161 | 161 | // Otherwise, there are sub-fields |
162 | 162 | $_aDefault = array(); |
163 | 163 | array_unshift( $_aSubFields, $aFieldset ); // insert the main field into the very first index. |
164 | - foreach( $_aSubFields as $_iIndex => $_aField ) { |
|
164 | + foreach ( $_aSubFields as $_iIndex => $_aField ) { |
|
165 | 165 | $_aDefault[ $_iIndex ] = $this->getElement( |
166 | - $_aField, // subject |
|
167 | - 'value', // key |
|
166 | + $_aField, // subject |
|
167 | + 'value', // key |
|
168 | 168 | $this->getElement( // default value |
169 | - $_aField, // subject |
|
170 | - 'default', // key |
|
169 | + $_aField, // subject |
|
170 | + 'default', // key |
|
171 | 171 | null // default value |
172 | 172 | ) |
173 | 173 | ); |
@@ -60,18 +60,18 @@ discard block |
||
60 | 60 | |
61 | 61 | // Drop keys of fields-array which do not exist in the sections-array. |
62 | 62 | // For this reasons, the sections-array should be conditioned first before applying this method. |
63 | - $aFields = $this->castArrayContents( $aSections, $aFields ); |
|
63 | + $aFields = $this->castArrayContents( $aSections, $aFields ); |
|
64 | 64 | |
65 | 65 | $_aNewFields = array(); |
66 | - foreach( $aFields as $_sSectionID => $_aSubSectionOrFields ) { |
|
66 | + foreach ( $aFields as $_sSectionID => $_aSubSectionOrFields ) { |
|
67 | 67 | |
68 | 68 | // This type check is important as the parsing field array is content-cast, which can set null value to elements. |
69 | - if ( ! is_array( $_aSubSectionOrFields ) ) { |
|
69 | + if ( !is_array( $_aSubSectionOrFields ) ) { |
|
70 | 70 | continue; |
71 | 71 | } |
72 | 72 | |
73 | 73 | $this->_setConditionedFields( |
74 | - $_aNewFields, // by reference - gets updated in the method. |
|
74 | + $_aNewFields, // by reference - gets updated in the method. |
|
75 | 75 | $_aSubSectionOrFields, |
76 | 76 | $_sSectionID |
77 | 77 | ); |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | */ |
92 | 92 | private function _setConditionedFields( array &$_aNewFields, $_aSubSectionOrFields, $_sSectionID ) { |
93 | 93 | |
94 | - foreach( $_aSubSectionOrFields as $_sIndexOrFieldID => $_aSubSectionOrField ) { |
|
94 | + foreach ( $_aSubSectionOrFields as $_sIndexOrFieldID => $_aSubSectionOrField ) { |
|
95 | 95 | |
96 | 96 | // If it is a sub-section array. |
97 | 97 | if ( $this->isNumericInteger( $_sIndexOrFieldID ) ) { |
98 | 98 | $_sSubSectionIndex = $_sIndexOrFieldID; |
99 | 99 | $_aFields = $_aSubSectionOrField; |
100 | - foreach( $_aFields as $_aField ) { |
|
101 | - if ( ! $this->_isAllowed( $_aField ) ) { |
|
100 | + foreach ( $_aFields as $_aField ) { |
|
101 | + if ( !$this->_isAllowed( $_aField ) ) { |
|
102 | 102 | continue; |
103 | 103 | } |
104 | 104 | $_aNewFields[ $_sSectionID ][ $_sSubSectionIndex ][ $_aField[ 'field_id' ] ] = $_aField; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | // Otherwise, insert the formatted field definition array. |
111 | 111 | $_aField = $_aSubSectionOrField; |
112 | - if ( ! $this->_isAllowed( $_aField ) ) { |
|
112 | + if ( !$this->_isAllowed( $_aField ) ) { |
|
113 | 113 | continue; |
114 | 114 | } |
115 | 115 | $_aNewFields[ $_sSectionID ][ $_aField[ 'field_id' ] ] = $_aField; |
@@ -66,7 +66,7 @@ |
||
66 | 66 | foreach( $aFields as $_sSectionID => $_aSubSectionOrFields ) { |
67 | 67 | |
68 | 68 | // This type check is important as the parsing field array is content-cast, which can set null value to elements. |
69 | - if ( ! is_array( $_aSubSectionOrFields ) ) { |
|
69 | + if ( ! is_array( $_aSubSectionOrFields ) ) { |
|
70 | 70 | continue; |
71 | 71 | } |
72 | 72 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class AdminPageFramework_Form_Model___SectionConditioner extends AdminPageFramework_WPUtility { |
19 | 19 | |
20 | - public $aSectionsets = array(); |
|
20 | + public $aSectionsets = array(); |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Sets up hooks. |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $_aParameters = func_get_args() + array( |
29 | 29 | $this->aSectionsets, |
30 | 30 | ); |
31 | - $this->aSectionsets = $_aParameters[ 0 ]; |
|
31 | + $this->aSectionsets = $_aParameters[ 0 ]; |
|
32 | 32 | |
33 | 33 | } |
34 | 34 | |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | * @since DEVVER Moved from `AdminPageFramework_FormDefinition`. Changed the name from `getConditionedSections()`. |
51 | 51 | * @return array The conditioned sectionsets array. |
52 | 52 | */ |
53 | - private function _getSectionsConditioned( array $aSections=array() ) { |
|
53 | + private function _getSectionsConditioned( array $aSections = array() ) { |
|
54 | 54 | |
55 | - $_aNewSections = array(); |
|
56 | - foreach( $aSections as $_sSectionID => $_aSection ) { |
|
57 | - if ( ! $this->_isAllowed( $_aSection ) ) { |
|
55 | + $_aNewSections = array(); |
|
56 | + foreach ( $aSections as $_sSectionID => $_aSection ) { |
|
57 | + if ( !$this->_isAllowed( $_aSection ) ) { |
|
58 | 58 | continue; |
59 | 59 | } |
60 | 60 | $_aNewSections[ $_sSectionID ] = $_aSection; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | protected function _isAllowed( array $aDefinition ) { |
74 | 74 | |
75 | 75 | // Check capability. If the access level is not sufficient, skip. |
76 | - if ( ! current_user_can( $aDefinition[ 'capability' ] ) ) { |
|
76 | + if ( !current_user_can( $aDefinition[ 'capability' ] ) ) { |
|
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | return ( boolean ) $aDefinition[ 'if' ]; |
@@ -73,7 +73,7 @@ |
||
73 | 73 | protected function _isAllowed( array $aDefinition ) { |
74 | 74 | |
75 | 75 | // Check capability. If the access level is not sufficient, skip. |
76 | - if ( ! current_user_can( $aDefinition[ 'capability' ] ) ) { |
|
76 | + if ( ! current_user_can( $aDefinition[ 'capability' ] ) ) { |
|
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | return ( boolean ) $aDefinition[ 'if' ]; |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $this->oMsg, |
82 | 82 | false // `false` to disable auto-registering. |
83 | 83 | ); |
84 | - foreach( $_oFieldType->aFieldTypeSlugs as $_sSlug ) { |
|
84 | + foreach( $_oFieldType->aFieldTypeSlugs as $_sSlug ) { |
|
85 | 85 | $_aFieldTypeDefinitions[ $_sSlug ] = $_oFieldType->getDefinitionArray(); |
86 | 86 | } |
87 | 87 | } |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | 'posttype', |
44 | 44 | 'size', |
45 | 45 | 'section_title', // 3.0.0+ |
46 | - 'system', // 3.3.0+ |
|
47 | - 'inline_mixed', // 3.8.0+ |
|
48 | - '_nested', // 3.8.0+ |
|
46 | + 'system', // 3.3.0+ |
|
47 | + 'inline_mixed', // 3.8.0+ |
|
48 | + '_nested', // 3.8.0+ |
|
49 | 49 | ); |
50 | 50 | |
51 | 51 | public $sCallerID = ''; |
@@ -75,16 +75,16 @@ discard block |
||
75 | 75 | public function get() { |
76 | 76 | |
77 | 77 | $_aFieldTypeDefinitions = array(); |
78 | - foreach( self::$_aDefaultFieldTypeSlugs as $_sFieldTypeSlug ) { |
|
78 | + foreach ( self::$_aDefaultFieldTypeSlugs as $_sFieldTypeSlug ) { |
|
79 | 79 | |
80 | 80 | $_sFieldTypeClassName = "AdminPageFramework_FieldType_{$_sFieldTypeSlug}"; |
81 | 81 | $_oFieldType = new $_sFieldTypeClassName( |
82 | - $this->sCallerID, // usually an instantiated class name |
|
83 | - null, // field type slugs - if it is different from the one defined in the class property |
|
82 | + $this->sCallerID, // usually an instantiated class name |
|
83 | + null, // field type slugs - if it is different from the one defined in the class property |
|
84 | 84 | $this->oMsg, |
85 | 85 | false // `false` to disable auto-registering. |
86 | 86 | ); |
87 | - foreach( $_oFieldType->aFieldTypeSlugs as $_sSlug ) { |
|
87 | + foreach ( $_oFieldType->aFieldTypeSlugs as $_sSlug ) { |
|
88 | 88 | $_aFieldTypeDefinitions[ $_sSlug ] = $_oFieldType->getDefinitionArray(); |
89 | 89 | } |
90 | 90 | } |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | * Defines the default key-values of this field type. |
28 | 28 | */ |
29 | 29 | protected $aDefaultKeys = array( |
30 | - 'select_all_button' => false, // 3.3.0+ to change the label, set the label here |
|
31 | - 'select_none_button' => false, // 3.3.0+ to change the label, set the label here |
|
30 | + 'select_all_button' => false, // 3.3.0+ to change the label, set the label here |
|
31 | + 'select_none_button' => false, // 3.3.0+ to change the label, set the label here |
|
32 | 32 | ); |
33 | 33 | |
34 | 34 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function getScripts() { |
41 | 41 | new AdminPageFramework_Form_View___Script_CheckboxSelector; |
42 | - $_sClassSelectorSelectAll = $this->_getSelectButtonClassSelectors( |
|
42 | + $_sClassSelectorSelectAll = $this->_getSelectButtonClassSelectors( |
|
43 | 43 | $this->aFieldTypeSlugs, |
44 | 44 | 'select_all_button' // data attribute |
45 | 45 | ); |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | * @since 3.5.12 |
66 | 66 | * @return string |
67 | 67 | */ |
68 | - private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute='select_all_button' ) { |
|
68 | + private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute = 'select_all_button' ) { |
|
69 | 69 | |
70 | 70 | $_aClassSelectors = array(); |
71 | 71 | foreach ( $aFieldTypeSlugs as $_sSlug ) { |
72 | - if ( ! is_scalar( $_sSlug ) ) { |
|
72 | + if ( !is_scalar( $_sSlug ) ) { |
|
73 | 73 | continue; |
74 | 74 | } |
75 | - $_aClassSelectors[] = '.admin-page-framework-checkbox-container-' . $_sSlug . "[data-{$sDataAttribute}]"; |
|
75 | + $_aClassSelectors[ ] = '.admin-page-framework-checkbox-container-'.$_sSlug."[data-{$sDataAttribute}]"; |
|
76 | 76 | } |
77 | 77 | return implode( ',', $_aClassSelectors ); |
78 | 78 | |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | |
129 | 129 | $_aOutput = array(); |
130 | 130 | $_bIsMultiple = is_array( $aField[ 'label' ] ); |
131 | - foreach( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) { |
|
132 | - $_aOutput[] = $this->_getEachCheckboxOutput( |
|
131 | + foreach ( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) { |
|
132 | + $_aOutput[ ] = $this->_getEachCheckboxOutput( |
|
133 | 133 | $aField, |
134 | 134 | $_bIsMultiple |
135 | 135 | ? $_sKey |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $_sLabel |
138 | 138 | ); |
139 | 139 | } |
140 | - return "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">" |
|
140 | + return "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">" |
|
141 | 141 | . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element. |
142 | 142 | . implode( PHP_EOL, $_aOutput ) |
143 | 143 | . "</div>"; |
@@ -152,12 +152,12 @@ discard block |
||
152 | 152 | */ |
153 | 153 | protected function _getCheckboxContainerAttributes( array $aField ) { |
154 | 154 | return array( |
155 | - 'class' => 'admin-page-framework-checkbox-container-' . $aField[ 'type' ], |
|
155 | + 'class' => 'admin-page-framework-checkbox-container-'.$aField[ 'type' ], |
|
156 | 156 | 'data-select_all_button' => $aField[ 'select_all_button' ] |
157 | - ? ( ! is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] ) |
|
157 | + ? ( !is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] ) |
|
158 | 158 | : null, |
159 | 159 | 'data-select_none_button' => $aField[ 'select_none_button' ] |
160 | - ? ( ! is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] ) |
|
160 | + ? ( !is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] ) |
|
161 | 161 | : null, |
162 | 162 | ); |
163 | 163 | } |
@@ -174,8 +174,8 @@ discard block |
||
174 | 174 | $_oCheckbox->setAttributesByKey( $sKey ); |
175 | 175 | $_oCheckbox->addClass( $this->_sCheckboxClassSelector ); |
176 | 176 | return $this->getElement( $aField, array( 'before_label', $sKey ) ) |
177 | - . "<div class='admin-page-framework-input-label-container admin-page-framework-checkbox-label' style='min-width: " . $this->sanitizeLength( $aField[ 'label_min_width' ] ) . ";'>" |
|
178 | - . "<label " . $this->getAttributes( |
|
177 | + . "<div class='admin-page-framework-input-label-container admin-page-framework-checkbox-label' style='min-width: ".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>" |
|
178 | + . "<label ".$this->getAttributes( |
|
179 | 179 | array( |
180 | 180 | 'for' => $_oCheckbox->getAttribute( 'id' ), |
181 | 181 | 'class' => $_oCheckbox->getAttribute( 'disabled' ) |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * Defines the field type slugs used for this field type. |
25 | 25 | */ |
26 | - public $aFieldTypeSlugs = array( 'text', 'password', 'date', 'datetime', 'datetime-local', 'email', 'month', 'search', 'tel', 'url', 'week', ); |
|
26 | + public $aFieldTypeSlugs = array( 'text', 'password', 'date', 'datetime', 'datetime-local', 'email', 'month', 'search', 'tel', 'url', 'week',); |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Defines the default key-values of this field type. |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | protected function getField( $aField ) { |
66 | 66 | |
67 | 67 | $_aOutput = array(); |
68 | - foreach( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) { |
|
69 | - $_aOutput[] = $this->_getFieldOutputByLabel( |
|
68 | + foreach ( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) { |
|
69 | + $_aOutput[ ] = $this->_getFieldOutputByLabel( |
|
70 | 70 | $_sKey, |
71 | 71 | $_sLabel, |
72 | 72 | $aField |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | // the repeatable field buttons will be replaced with this element. |
77 | - $_aOutput[] = "<div class='repeatable-field-buttons'></div>"; |
|
77 | + $_aOutput[ ] = "<div class='repeatable-field-buttons'></div>"; |
|
78 | 78 | return implode( '', $_aOutput ); |
79 | 79 | |
80 | 80 | } |
@@ -93,23 +93,23 @@ discard block |
||
93 | 93 | $aField[ 'value' ] = $this->getElementByLabel( $aField[ 'value' ], $sKey, $aField[ 'label' ] ); |
94 | 94 | $_aInputAttributes = $_bIsArray |
95 | 95 | ? array( |
96 | - 'name' => $aField[ 'attributes' ][ 'name' ] . "[{$sKey}]", |
|
97 | - 'id' => $aField[ 'attributes' ][ 'id' ] . "_{$sKey}", |
|
96 | + 'name' => $aField[ 'attributes' ][ 'name' ]."[{$sKey}]", |
|
97 | + 'id' => $aField[ 'attributes' ][ 'id' ]."_{$sKey}", |
|
98 | 98 | 'value' => $aField[ 'value' ], |
99 | 99 | ) |
100 | 100 | + $aField[ 'attributes' ] |
101 | 101 | : $aField[ 'attributes' ]; |
102 | - $_aOutput = array( |
|
102 | + $_aOutput = array( |
|
103 | 103 | $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] ), |
104 | 104 | "<div class='admin-page-framework-input-label-container {$_sClassSelector}'>", |
105 | - "<label for='" . $_aInputAttributes[ 'id' ] . "'>", |
|
105 | + "<label for='".$_aInputAttributes[ 'id' ]."'>", |
|
106 | 106 | $this->getElementByLabel( $aField[ 'before_input' ], $sKey, $aField[ 'label' ] ), |
107 | 107 | $_sLabel |
108 | - ? "<span class='admin-page-framework-input-label-string' style='min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";'>" |
|
108 | + ? "<span class='admin-page-framework-input-label-string' style='min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>" |
|
109 | 109 | . $_sLabel |
110 | 110 | . "</span>" |
111 | 111 | : '', |
112 | - "<input " . $this->getAttributes( $_aInputAttributes ) . " />", |
|
112 | + "<input ".$this->getAttributes( $_aInputAttributes )." />", |
|
113 | 113 | $this->getElementByLabel( $aField[ 'after_input' ], $sKey, $aField[ 'label' ] ), |
114 | 114 | "</label>", |
115 | 115 | "</div>", |
@@ -43,7 +43,7 @@ |
||
43 | 43 | * @since 2.1.5 |
44 | 44 | * @since 3.3.1 Changed from `_replyToGetStyles()`. |
45 | 45 | */ |
46 | - protected function getStyles() { |
|
46 | + protected function getStyles() { |
|
47 | 47 | return <<<CSSRULES |
48 | 48 | /* Text Field Type */ |
49 | 49 | .admin-page-framework-field.admin-page-framework-field-text > .admin-page-framework-input-label-container { |