@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @param string $sType If empty, the method will check if a message exists in all types. Otherwise, it checks the existence of a message of the specified type. |
46 | 46 | * @return boolean True if a setting notice is set; otherwise, false. |
47 | 47 | */ |
48 | - public function hasSubmitNotice( $sType='' ) { |
|
48 | + public function hasSubmitNotice( $sType = '' ) { |
|
49 | 49 | return $this->oSubmitNotice->hasNotice( $sType ); |
50 | 50 | } |
51 | 51 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @param boolean $bOverride (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one. |
72 | 72 | * @return void |
73 | 73 | */ |
74 | - public function setSubmitNotice( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) { |
|
74 | + public function setSubmitNotice( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) { |
|
75 | 75 | $this->oSubmitNotice->set( |
76 | 76 | $sMessage, |
77 | 77 | $sType, |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $this->aSectionsets[ $aSectionset[ 'section_id' ] ] = $aSectionset; |
100 | 100 | $this->aFieldsets[ $aSectionset[ 'section_id' ] ] = $this->getElement( |
101 | - $this->aFieldsets, // subject array |
|
101 | + $this->aFieldsets, // subject array |
|
102 | 102 | $aSectionset[ 'section_id' ], // key |
103 | 103 | array() // default |
104 | 104 | ); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function removeSection( $sSectionID ) { |
115 | 115 | |
116 | - if ( '_default' === $sSectionID ){ |
|
116 | + if ( '_default' === $sSectionID ) { |
|
117 | 117 | return; |
118 | 118 | } |
119 | 119 | unset( |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @return void |
144 | 144 | */ |
145 | 145 | public function addResource( $sKey, $sValue ) { |
146 | - self::$_aResources[ $sKey ][] = $sValue; |
|
146 | + self::$_aResources[ $sKey ][ ] = $sValue; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | public function addField( $asFieldset ) { |
167 | 167 | |
168 | 168 | // If it is a target section, update the property and return. |
169 | - if ( ! $this->_isFieldsetDefinition( $asFieldset ) ) { |
|
169 | + if ( !$this->_isFieldsetDefinition( $asFieldset ) ) { |
|
170 | 170 | $this->_asTargetSectionID = $this->_getTargetSectionID( $asFieldset ); |
171 | 171 | return $this->_asTargetSectionID; |
172 | 172 | } |
@@ -175,13 +175,13 @@ discard block |
||
175 | 175 | |
176 | 176 | // Set the target section ID |
177 | 177 | $this->_asTargetSectionID = $this->getElement( |
178 | - $_aFieldset, // subject array |
|
178 | + $_aFieldset, // subject array |
|
179 | 179 | 'section_id', // key |
180 | 180 | $this->_asTargetSectionID // default |
181 | 181 | ); |
182 | 182 | |
183 | 183 | // Required Keys - 3.8.0+ Now 'type' can be omitted. |
184 | - if ( ! isset( $_aFieldset[ 'field_id' ] ) ) { |
|
184 | + if ( !isset( $_aFieldset[ 'field_id' ] ) ) { |
|
185 | 185 | return null; |
186 | 186 | } |
187 | 187 | |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | */ |
285 | 285 | public function removeField( $sFieldID ) { |
286 | 286 | |
287 | - foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
287 | + foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
288 | 288 | |
289 | 289 | if ( array_key_exists( $sFieldID, $_aSubSectionsOrFields ) ) { |
290 | 290 | unset( $this->aFieldsets[ $_sSectionID ][ $sFieldID ] ); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function removeSection( $sSectionID ) { |
115 | 115 | |
116 | - if ( '_default' === $sSectionID ){ |
|
116 | + if ( '_default' === $sSectionID ) { |
|
117 | 117 | return; |
118 | 118 | } |
119 | 119 | unset( |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | ); |
182 | 182 | |
183 | 183 | // Required Keys - 3.8.0+ Now 'type' can be omitted. |
184 | - if ( ! isset( $_aFieldset[ 'field_id' ] ) ) { |
|
184 | + if ( ! isset( $_aFieldset[ 'field_id' ] ) ) { |
|
185 | 185 | return null; |
186 | 186 | } |
187 | 187 |
@@ -148,6 +148,8 @@ |
||
148 | 148 | } |
149 | 149 | /** |
150 | 150 | * @since 3.7.0 |
151 | + * @param string $sKey |
|
152 | + * @param string $sValue |
|
151 | 153 | * @return void |
152 | 154 | */ |
153 | 155 | public function addResource( $sKey, $sValue ) { |
@@ -44,7 +44,7 @@ |
||
44 | 44 | call_user_func_array( |
45 | 45 | $aFieldTypeDefinition[ 'hfFieldSetTypeSetter' ], |
46 | 46 | array( $sStructureType ) |
47 | - ); |
|
47 | + ); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | if ( is_callable( $aFieldTypeDefinition[ 'hfFieldLoader' ] ) ) { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | foreach( $aFieldsets as $_sSectionPath => $_aItems ) { |
108 | 108 | |
109 | 109 | // If the section is not set, skip. |
110 | - if ( ! isset( $aSectionsets[ $_sSectionPath ] ) ) { |
|
110 | + if ( ! isset( $aSectionsets[ $_sSectionPath ] ) ) { |
|
111 | 111 | continue; |
112 | 112 | } |
113 | 113 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | } |
259 | 259 | |
260 | 260 | $_aSortedFields = array(); |
261 | - foreach( $aSectionsets as $_sSectionPath => $_aSecitonset ) { |
|
261 | + foreach( $aSectionsets as $_sSectionPath => $_aSecitonset ) { |
|
262 | 262 | if ( isset( $aFieldsets[ $_sSectionPath ] ) ) { |
263 | 263 | $_aSortedFields[ $_sSectionPath ] = $aFieldsets[ $_sSectionPath ]; |
264 | 264 | } |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | private function _getFieldsetFormatted( $aFieldset, $aSectionsets, $sCapability, $iCountOfElements, $iSubSectionIndex, $bIsSectionRepeatable, $oCallerObject ) { |
278 | 278 | |
279 | 279 | // 3.8.0+ Dropped the check for $aFieldset[ 'type' ] to allow it to be omitted. |
280 | - if ( ! isset( $aFieldset[ 'field_id' ] ) ) { |
|
280 | + if ( ! isset( $aFieldset[ 'field_id' ] ) ) { |
|
281 | 281 | return; |
282 | 282 | } |
283 | 283 |
@@ -99,6 +99,7 @@ discard block |
||
99 | 99 | * @since 3.1.1 Added a parameter. Changed to return the formatted sections array. |
100 | 100 | * @since 3.7.0 Moved from `AdminPageFramework_FormDefinition`. Changed the name from `formatFields()`. |
101 | 101 | * Added the `$aSectionsets` parameter. |
102 | + * @param string $sCapability |
|
102 | 103 | * @return array |
103 | 104 | */ |
104 | 105 | private function _getFieldsetsFormatted( array $aFieldsets, array $aSectionsets, $sCapability ) { |
@@ -278,6 +279,7 @@ discard block |
||
278 | 279 | * |
279 | 280 | * @since 3.0.0 |
280 | 281 | * @since 3.7.0 Moved from `AdminPageFramework_FormDefinition`. Changed the name from `formatField()`. |
282 | + * @param integer $iCountOfElements |
|
281 | 283 | * @return array|void An array of formatted field definition array. If required keys are not set, nothing will be returned. |
282 | 284 | */ |
283 | 285 | private function _getFieldsetFormatted( $aFieldset, $aSectionsets, $sCapability, $iCountOfElements, $iSubSectionIndex, $bIsSectionRepeatable, $oCallerObject ) { |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | ); |
114 | 114 | |
115 | 115 | $_aNewFieldsets = array(); |
116 | - foreach( $aFieldsets as $_sSectionPath => $_aItems ) { |
|
116 | + foreach ( $aFieldsets as $_sSectionPath => $_aItems ) { |
|
117 | 117 | |
118 | 118 | // If the section is not set, skip. |
119 | - if ( ! isset( $aSectionsets[ $_sSectionPath ] ) ) { |
|
119 | + if ( !isset( $aSectionsets[ $_sSectionPath ] ) ) { |
|
120 | 120 | continue; |
121 | 121 | } |
122 | 122 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $_aItems, |
126 | 126 | $this->getElement( // 3.6.0+ Get the section's capability |
127 | 127 | $aSectionsets, |
128 | - array( $_sSectionPath, 'capability', ), |
|
128 | + array( $_sSectionPath, 'capability',), |
|
129 | 129 | $sCapability |
130 | 130 | ), |
131 | 131 | $aSectionsets |
@@ -182,16 +182,16 @@ discard block |
||
182 | 182 | */ |
183 | 183 | private function _getNormalFieldsetsFormatted( $aItems, $sCapability, $aSectionsets, $_abSectionRepeatable ) { |
184 | 184 | |
185 | - $_aNewItems = array(); |
|
186 | - foreach( $aItems as $_sFieldID => $_aFieldset ) { |
|
185 | + $_aNewItems = array(); |
|
186 | + foreach ( $aItems as $_sFieldID => $_aFieldset ) { |
|
187 | 187 | |
188 | 188 | // Insert the formatted field definition array. The fields count is needed to set each order value. |
189 | - $_aFieldset = $this->_getFieldsetFormatted( |
|
189 | + $_aFieldset = $this->_getFieldsetFormatted( |
|
190 | 190 | $_aFieldset, |
191 | 191 | $aSectionsets, |
192 | 192 | $sCapability, |
193 | 193 | count( $_aNewItems ), // index of elements - zero based |
194 | - null, // sub-section index |
|
194 | + null, // sub-section index |
|
195 | 195 | $_abSectionRepeatable, |
196 | 196 | $this->oCallerForm |
197 | 197 | ); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * @return boolean |
211 | 211 | */ |
212 | 212 | private function _isSubSections( $aItems, $_abSectionRepeatable ) { |
213 | - if ( ! empty( $_abSectionRepeatable ) ) { |
|
213 | + if ( !empty( $_abSectionRepeatable ) ) { |
|
214 | 214 | return true; |
215 | 215 | } |
216 | 216 | return ( boolean ) count( $this->getIntegerKeyElements( $aItems ) ); |
@@ -221,9 +221,9 @@ discard block |
||
221 | 221 | private function _getSubSectionsFormatted( $aItems, $sCapability, $aSectionsets, $_abSectionRepeatable ) { |
222 | 222 | |
223 | 223 | $_aNewFieldset = array(); |
224 | - foreach( $this->numerizeElements( $aItems ) as $_iSubSectionIndex => $_aFieldsets ) { |
|
224 | + foreach ( $this->numerizeElements( $aItems ) as $_iSubSectionIndex => $_aFieldsets ) { |
|
225 | 225 | |
226 | - foreach( $_aFieldsets as $_aFieldset ) { |
|
226 | + foreach ( $_aFieldsets as $_aFieldset ) { |
|
227 | 227 | $_iCountElement = count( $this->getElementAsArray( $_aNewFieldset, $_iSubSectionIndex ) ); |
228 | 228 | $_aFieldset = $this->_getFieldsetFormatted( |
229 | 229 | $_aFieldset, |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | if ( empty( $_aFieldset ) ) { |
238 | 238 | continue; |
239 | 239 | } |
240 | - $_aNewFieldset[ $_iSubSectionIndex ][ $_aFieldset['field_id'] ] = $_aFieldset; |
|
240 | + $_aNewFieldset[ $_iSubSectionIndex ][ $_aFieldset[ 'field_id' ] ] = $_aFieldset; |
|
241 | 241 | } |
242 | 242 | uasort( $_aNewFieldset[ $_iSubSectionIndex ], array( $this, 'sortArrayByKey' ) ); |
243 | 243 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } |
265 | 265 | |
266 | 266 | $_aSortedFields = array(); |
267 | - foreach( $aSectionsets as $_sSectionPath => $_aSecitonset ) { |
|
267 | + foreach ( $aSectionsets as $_sSectionPath => $_aSecitonset ) { |
|
268 | 268 | if ( isset( $aFieldsets[ $_sSectionPath ] ) ) { |
269 | 269 | $_aSortedFields[ $_sSectionPath ] = $aFieldsets[ $_sSectionPath ]; |
270 | 270 | } |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | private function _getFieldsetFormatted( $aFieldset, $aSectionsets, $sCapability, $iCountOfElements, $iSubSectionIndex, $bIsSectionRepeatable, $oCallerObject ) { |
284 | 284 | |
285 | 285 | // 3.8.0+ Dropped the check for $aFieldset[ 'type' ] to allow it to be omitted. |
286 | - if ( ! isset( $aFieldset[ 'field_id' ] ) ) { |
|
286 | + if ( !isset( $aFieldset[ 'field_id' ] ) ) { |
|
287 | 287 | return; |
288 | 288 | } |
289 | 289 |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | * Represents the structure of the sub-field definition array. |
25 | 25 | */ |
26 | 26 | static public $aStructure = array( |
27 | - '_is_sub_field' => false, // @todo change this key name as all the parsed field is technically a sub-field. |
|
28 | - '_index' => 0, // indicates the field index |
|
27 | + '_is_sub_field' => false, // @todo change this key name as all the parsed field is technically a sub-field. |
|
28 | + '_index' => 0, // indicates the field index |
|
29 | 29 | '_is_multiple_fields' => false, |
30 | 30 | '_saved_value' => null, |
31 | 31 | '_is_value_set_by_user' => false, |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | '_fields_container_id' => '', |
40 | 40 | '_fieldset_container_id' => '', |
41 | 41 | |
42 | - '_field_object' => null, // 3.6.0+ |
|
43 | - '_parent_field_object' => null, // 3.6.0+ Stores the parent field object to be accessed from the nested fields to generate id and name attribute models. |
|
42 | + '_field_object' => null, // 3.6.0+ |
|
43 | + '_parent_field_object' => null, // 3.6.0+ Stores the parent field object to be accessed from the nested fields to generate id and name attribute models. |
|
44 | 44 | ); |
45 | 45 | |
46 | 46 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | $_aField = $this->aField + self::$aStructure; |
89 | 89 | |
90 | - $_aField[ '_is_sub_field' ] = is_numeric( $this->isIndex ) && 0 < $this->isIndex; // 3.5.3+ |
|
90 | + $_aField[ '_is_sub_field' ] = is_numeric( $this->isIndex ) && 0 < $this->isIndex; // 3.5.3+ |
|
91 | 91 | $_aField[ '_index' ] = $this->isIndex; |
92 | 92 | |
93 | 93 | // 'input_id' - something like ({section id}_){field_id}__{index} e.g. my_section_id_my_field_id__0 |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | 'value' => $_aField[ 'value' ], |
135 | 135 | 'type' => $_aField[ 'type' ], // text, password, etc. |
136 | 136 | 'disabled' => null, |
137 | - 'data-id_model' => $_aField[ '_input_id_model' ], // 3.3.1+ |
|
138 | - 'data-name_model' => $_aField[ '_input_name_model' ], // 3.3.1+ |
|
137 | + 'data-id_model' => $_aField[ '_input_id_model' ], // 3.3.1+ |
|
138 | + 'data-name_model' => $_aField[ '_input_name_model' ], // 3.3.1+ |
|
139 | 139 | ) |
140 | 140 | ), |
141 | 141 | // this allows sub-fields with different field types to set the default key-values for the sub-field. |
@@ -33,23 +33,23 @@ discard block |
||
33 | 33 | * @internal |
34 | 34 | */ |
35 | 35 | static public $aStructure = array( |
36 | - '_section_index' => null, // 3.0.0+ - internally set to indicate the section index for repeatable sections. |
|
36 | + '_section_index' => null, // 3.0.0+ - internally set to indicate the section index for repeatable sections. |
|
37 | 37 | |
38 | 38 | 'tag_id' => null, |
39 | - '_tag_id_model' => '', // 3.6.0+ |
|
39 | + '_tag_id_model' => '', // 3.6.0+ |
|
40 | 40 | |
41 | - '_field_name' => '', // 3.6.0+ |
|
42 | - '_field_name_model' => '', // 3.6.0+ |
|
41 | + '_field_name' => '', // 3.6.0+ |
|
42 | + '_field_name_model' => '', // 3.6.0+ |
|
43 | 43 | |
44 | - '_field_name_flat' => '', // 3.6.0+ |
|
45 | - '_field_name_flat_model' => '', // 3.6.0+ |
|
44 | + '_field_name_flat' => '', // 3.6.0+ |
|
45 | + '_field_name_flat_model' => '', // 3.6.0+ |
|
46 | 46 | |
47 | - '_field_address' => '', // 3.6.0+ |
|
48 | - '_field_address_model' => '', // 3.6.0+ |
|
47 | + '_field_address' => '', // 3.6.0+ |
|
48 | + '_field_address_model' => '', // 3.6.0+ |
|
49 | 49 | |
50 | - '_parent_field_object' => null, // 3.6.0+ Assigned when a field creates a nested field. |
|
50 | + '_parent_field_object' => null, // 3.6.0+ Assigned when a field creates a nested field. |
|
51 | 51 | |
52 | - '_parent_tag_id' => null, // 3.8.0+ Set outside the class. |
|
52 | + '_parent_tag_id' => null, // 3.8.0+ Set outside the class. |
|
53 | 53 | |
54 | 54 | ); |
55 | 55 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $_aFieldset = $this->aFieldset + self::$aStructure; |
93 | 93 | |
94 | 94 | // The section index must be set before generating a field tag id as it uses a section index. |
95 | - $_aFieldset[ '_section_index' ] = $this->iSectionIndex; |
|
95 | + $_aFieldset[ '_section_index' ] = $this->iSectionIndex; |
|
96 | 96 | $_oFieldTagIDGenerator = new AdminPageFramework_Form_View___Generate_FieldTagID( |
97 | 97 | $_aFieldset, |
98 | 98 | $_aFieldset[ '_caller_object' ]->aCallbacks[ 'hfTagID' ] |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | // 3.8.0+ Format nested fieldsets. |
128 | 128 | if ( $this->hasFieldDefinitionsInContent( $_aFieldset ) ) { |
129 | - foreach( $_aFieldset[ 'content' ] as &$_aNestedFieldset ) { |
|
129 | + foreach ( $_aFieldset[ 'content' ] as &$_aNestedFieldset ) { |
|
130 | 130 | // The inline-mixed type has a string element. |
131 | 131 | if ( is_scalar( $_aNestedFieldset ) ) { |
132 | 132 | continue; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | public $sNotice = ''; |
47 | 47 | public $aAttributes = array(); |
48 | 48 | public $aCallbacks = array( |
49 | - 'should_show' => null, // determines whether the admin notice should be displayed. |
|
49 | + 'should_show' => null, // determines whether the admin notice should be displayed. |
|
50 | 50 | ); |
51 | 51 | /**#@-*/ |
52 | 52 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * </ul> |
63 | 63 | * @since 3.5.0 |
64 | 64 | */ |
65 | - public function __construct( $sNotice, array $aAttributes=array( 'class' => 'error' ), array $aCallbacks=array() ) { |
|
65 | + public function __construct( $sNotice, array $aAttributes = array( 'class' => 'error' ), array $aCallbacks = array() ) { |
|
66 | 66 | |
67 | 67 | $this->aAttributes = $aAttributes + array( |
68 | 68 | 'class' => 'error', // 'updated' etc. |
@@ -70,17 +70,17 @@ discard block |
||
70 | 70 | $this->aAttributes[ 'class' ] = $this->getClassAttribute( |
71 | 71 | $this->aAttributes[ 'class' ], |
72 | 72 | 'admin-page-framework-settings-notice-message', |
73 | - 'admin-page-framework-settings-notice-container', // Moved from `AdminPageFramework_Factory_View`. |
|
73 | + 'admin-page-framework-settings-notice-container', // Moved from `AdminPageFramework_Factory_View`. |
|
74 | 74 | 'notice', |
75 | 75 | 'is-dismissible' // 3.5.12+ |
76 | 76 | ); |
77 | - $this->aCallbacks = $aCallbacks + $this->aCallbacks; |
|
77 | + $this->aCallbacks = $aCallbacks + $this->aCallbacks; |
|
78 | 78 | |
79 | 79 | // Load resources. |
80 | 80 | new AdminPageFramework_AdminNotice___Script; |
81 | 81 | |
82 | 82 | // An empty value may be set in oreder only to laode the fade-in script. |
83 | - if ( ! $sNotice ) { |
|
83 | + if ( !$sNotice ) { |
|
84 | 84 | return; |
85 | 85 | } |
86 | 86 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function _replyToDisplayAdminNotice() { |
110 | 110 | |
111 | - if ( ! $this->_shouldProceed() ) { |
|
111 | + if ( !$this->_shouldProceed() ) { |
|
112 | 112 | return; |
113 | 113 | } |
114 | 114 | |
@@ -119,14 +119,14 @@ discard block |
||
119 | 119 | 'display: none' |
120 | 120 | ); |
121 | 121 | |
122 | - echo "<div " . $this->getAttributes( $_aAttributes ) . ">" |
|
122 | + echo "<div ".$this->getAttributes( $_aAttributes ).">" |
|
123 | 123 | . "<p>" |
124 | 124 | . self::$_aNotices[ $this->sNotice ] |
125 | 125 | . "</p>" |
126 | 126 | . "</div>" |
127 | 127 | // Insert the same message except it is not hidden. |
128 | 128 | . "<noscript>" |
129 | - . "<div " . $this->getAttributes( $this->aAttributes ) . ">" |
|
129 | + . "<div ".$this->getAttributes( $this->aAttributes ).">" |
|
130 | 130 | . "<p>" |
131 | 131 | . self::$_aNotices[ $this->sNotice ] |
132 | 132 | . "</p>" |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | private function _shouldProceed() { |
146 | 146 | |
147 | - if ( ! is_callable( $this->aCallbacks[ 'should_show' ] ) ) { |
|
147 | + if ( !is_callable( $this->aCallbacks[ 'should_show' ] ) ) { |
|
148 | 148 | return true; |
149 | 149 | } |
150 | 150 | return call_user_func_array( |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * Sets up hooks and properties. |
25 | 25 | */ |
26 | - public function __construct( $oProp, $oMsg=null ) { |
|
26 | + public function __construct( $oProp, $oMsg = null ) { |
|
27 | 27 | |
28 | 28 | parent::__construct( $oProp, $oMsg ); |
29 | 29 | |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | |
32 | 32 | // This filter for non-network-admin action links is added in the parent constructor. |
33 | 33 | remove_filter( |
34 | - 'plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo['sPath'] ), |
|
34 | + 'plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), |
|
35 | 35 | array( $this, '_replyToAddSettingsLinkInPluginListingPage' ), |
36 | 36 | 20 |
37 | 37 | ); |
38 | 38 | // Add the action link filter for the multi-site network admin. |
39 | 39 | add_filter( |
40 | - 'network_admin_plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo['sPath'] ), |
|
40 | + 'network_admin_plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), |
|
41 | 41 | array( $this, '_replyToAddSettingsLinkInPluginListingPage' ) |
42 | 42 | ); |
43 | 43 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * @return string the flat input name attribute |
38 | 38 | */ |
39 | 39 | public function _replyToGetFlatInputName( /* $sFlatNameAttribute, $aField, $sKey, $sSectionIndex */ ) { |
40 | - $_aParams = func_get_args() + array( null, null, null ); |
|
40 | + $_aParams = func_get_args() + array( null, null, null ); |
|
41 | 41 | return $_aParams[ 0 ]; |
42 | 42 | } |
43 | 43 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param string The text domain. Default: `admin-page-framework`. |
47 | 47 | * @return void |
48 | 48 | */ |
49 | - public function __construct( $asTaxonomySlug, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
49 | + public function __construct( $asTaxonomySlug, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
50 | 50 | |
51 | 51 | if ( empty( $asTaxonomySlug ) ) { |
52 | 52 | return; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | // Properties |
56 | 56 | $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] ) |
57 | 57 | ? $this->aSubClassNames[ 'oProp' ] |
58 | - : 'AdminPageFramework_Property_' . $this->_sStructureType; |
|
58 | + : 'AdminPageFramework_Property_'.$this->_sStructureType; |
|
59 | 59 | $this->oProp = new $_sProprtyClassName( |
60 | 60 | $this, |
61 | 61 | get_class( $this ), |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $sTextDomain, |
64 | 64 | $this->_sStructureType |
65 | 65 | ); |
66 | - $this->oProp->aTaxonomySlugs = ( array ) $asTaxonomySlug; |
|
66 | + $this->oProp->aTaxonomySlugs = ( array ) $asTaxonomySlug; |
|
67 | 67 | |
68 | 68 | parent::__construct( $this->oProp ); |
69 | 69 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | public function __construct( $asTaxonomySlug, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
49 | 49 | |
50 | - if ( empty( $asTaxonomySlug ) ) { |
|
50 | + if ( empty( $asTaxonomySlug ) ) { |
|
51 | 51 | return; |
52 | 52 | } |
53 | 53 |