@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Creates an object instance with dynamic parameters. |
44 | 44 | */ |
45 | - static public function getInstance( $sClassName, array $aParameters=array() ) { |
|
45 | + static public function getInstance( $sClassName, array $aParameters = array() ) { |
|
46 | 46 | |
47 | 47 | $_oReflection = new ReflectionClass( $sClassName ); |
48 | 48 | return $_oReflection->newInstanceArgs( $aParameters ); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | // For PHP 5.2.x or below |
59 | 59 | if ( version_compare( phpversion(), '<', '5.3.0' ) ) { |
60 | 60 | trigger_error( |
61 | - 'Program Name' . ': ' |
|
61 | + 'Program Name'.': ' |
|
62 | 62 | . sprintf( |
63 | 63 | 'The method cannot run with your PHP version: %1$s', |
64 | 64 | phpversion() |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * Creates an object instance with dynamic parameters. |
46 | 46 | * |
47 | 47 | * @since 3.7.10 |
48 | - * @param string $sCalssName The class name for testing. |
|
48 | + * @param string $sClassName The class name for testing. |
|
49 | 49 | * @param array $aParameters The parameters to pass to the constructor of the class set in the first parameter. |
50 | 50 | * @return object An object instance of the class specified in the first parameter. |
51 | 51 | */ |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * |
62 | 62 | * @since 3.7.10 |
63 | 63 | * @param object $oClass The subject class object. |
64 | - * @param string $sMathodName The subject method name. |
|
64 | + * @param string $sMethodName The subject method name. |
|
65 | 65 | * @param array $aParameters The parameters to pass to the method set in the second parameter. |
66 | 66 | * @remark This supports private methods to be executed. |
67 | 67 | */ |
@@ -87,6 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | /** |
89 | 89 | * @since 3.7.10 |
90 | + * @param string $sClassName |
|
90 | 91 | * @return object |
91 | 92 | * @internal |
92 | 93 | */ |
@@ -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 | * |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | final class AdminPageFramework_Registry extends AdminPageFramework_Registry_Base { |
57 | 57 | |
58 | 58 | const TEXT_DOMAIN = 'admin-page-framework'; |
59 | - const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
59 | + const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * Indicates whether the framework is loaded from the minified version or not. |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | * Sets up static properties. |
99 | 99 | * @return void |
100 | 100 | */ |
101 | - static public function setUp( $sFilePath=__FILE__ ) { |
|
101 | + static public function setUp( $sFilePath = __FILE__ ) { |
|
102 | 102 | |
103 | 103 | self::$sFilePath = $sFilePath; |
104 | 104 | self::$sDirPath = dirname( self::$sFilePath ); |
105 | - self::$sIncludeClassListPath = self::$sDirPath . '/admin-page-framework-include-class-list.php'; |
|
105 | + self::$sIncludeClassListPath = self::$sDirPath.'/admin-page-framework-include-class-list.php'; |
|
106 | 106 | self::$aClassFiles = self::_getClassFilePathList( self::$sIncludeClassListPath ); |
107 | 107 | self::$sAutoLoaderPath = isset( self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] ) |
108 | 108 | ? self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return array |
118 | 118 | */ |
119 | 119 | static private function _getClassFilePathList( $sInclusionClassListPath ) { |
120 | - $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
120 | + $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
121 | 121 | include( $sInclusionClassListPath ); |
122 | 122 | return $aClassFiles; |
123 | 123 | } |
@@ -130,11 +130,11 @@ discard block |
||
130 | 130 | */ |
131 | 131 | static public function getVersion() { |
132 | 132 | |
133 | - if ( ! isset( self::$sAutoLoaderPath ) ) { |
|
134 | - trigger_error( 'Admin Page Framework: ' . ' : ' . sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
133 | + if ( !isset( self::$sAutoLoaderPath ) ) { |
|
134 | + trigger_error( 'Admin Page Framework: '.' : '.sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
135 | 135 | return self::VERSION; |
136 | 136 | } |
137 | - $_aMinifiedVesionSuffix = array( |
|
137 | + $_aMinifiedVesionSuffix = array( |
|
138 | 138 | 0 => '', |
139 | 139 | 1 => '.min', |
140 | 140 | ); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | } |
164 | 164 | endif; |
165 | 165 | |
166 | -if ( ! class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
166 | +if ( !class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
167 | 167 | /** |
168 | 168 | * Loads the Admin Page Framework library. |
169 | 169 | * |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function __construct( $sLibraryPath ) { |
186 | 186 | |
187 | - if ( ! $this->_isLoadable() ) { |
|
187 | + if ( !$this->_isLoadable() ) { |
|
188 | 188 | return; |
189 | 189 | } |
190 | 190 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * If accessed from a console, include the registry class to laod 'AdminPageFramework_Registry_Base'. |
12 | 12 | */ |
13 | 13 | if ( php_sapi_name() === 'cli' ) { |
14 | - $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ) . '/admin-page-framework.php'; |
|
14 | + $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ).'/admin-page-framework.php'; |
|
15 | 15 | if ( file_exists( $_sFrameworkFilePath ) ) { |
16 | 16 | include_once( $_sFrameworkFilePath ); |
17 | 17 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * If accessed from a console, include the registry class to laod 'AdminPageFramework_Registry_Base'. |
12 | 12 | */ |
13 | 13 | if ( php_sapi_name() === 'cli' ) { |
14 | - $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ) . '/admin-page-framework.php'; |
|
14 | + $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ).'/admin-page-framework.php'; |
|
15 | 15 | if ( file_exists( $_sFrameworkFilePath ) ) { |
16 | 16 | include_once( $_sFrameworkFilePath ); |
17 | 17 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) { |
35 | 35 | |
36 | - if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) { |
|
36 | + if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) { |
|
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | ); |
47 | 47 | |
48 | 48 | // Go to the catch clause. |
49 | - $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clasue. |
|
49 | + $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clasue. |
|
50 | 50 | $_oException->aReturn = $this->_confirmSubmitButtonAction( |
51 | 51 | $this->getElement( $aSubmitInformation, 'input_name' ), |
52 | 52 | $this->getElement( $aSubmitInformation, 'section_id' ), |
@@ -165,6 +165,7 @@ discard block |
||
165 | 165 | * Returns the HTML output of the number input part. |
166 | 166 | * |
167 | 167 | * @since 3.5.3 |
168 | + * @param boolean $bMultiLabels |
|
168 | 169 | * @return string The number input output. |
169 | 170 | */ |
170 | 171 | private function _getNumberInputPart( array $aField, array $aBaseAttributes, $isKey, $bMultiLabels ) { |
@@ -217,6 +218,7 @@ discard block |
||
217 | 218 | * Returns the HTML output of the unit select input part. |
218 | 219 | * |
219 | 220 | * @since 3.5.3 |
221 | + * @param boolean $bMultiLabels |
|
220 | 222 | * @return string The unit select input output. |
221 | 223 | */ |
222 | 224 | private function _getUnitSelectInput( array $aField, array $aBaseAttributes, $isKey, $bMultiLabels ) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | /** |
66 | 66 | * Defines the field type slugs used for this field type. |
67 | 67 | */ |
68 | - public $aFieldTypeSlugs = array( 'size', ); |
|
68 | + public $aFieldTypeSlugs = array( 'size',); |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Defines the default key-values of this field type. |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | protected $aDefaultKeys = array( |
76 | 76 | 'is_multiple' => false, // indicates whether the select tag alloes multiple selections. |
77 | - 'units' => null, // do not define units here since this will be merged with the user defined field array. |
|
77 | + 'units' => null, // do not define units here since this will be merged with the user defined field array. |
|
78 | 78 | 'attributes' => array( |
79 | 79 | 'size' => array( |
80 | 80 | 'min' => null, |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | protected $aDefaultUnits = array( |
104 | 104 | 'px' => 'px', // pixel |
105 | - '%' => '%', // percentage |
|
105 | + '%' => '%', // percentage |
|
106 | 106 | 'em' => 'em', // font size |
107 | 107 | 'ex' => 'ex', // font height |
108 | 108 | 'in' => 'in', // inch |
@@ -162,8 +162,8 @@ discard block |
||
162 | 162 | ); |
163 | 163 | |
164 | 164 | $_aOutput = array(); |
165 | - foreach( ( array ) $aField[ 'label' ] as $_isKey => $_sLabel ) { |
|
166 | - $_aOutput[] = $this->_getFieldOutputByLabel( |
|
165 | + foreach ( ( array ) $aField[ 'label' ] as $_isKey => $_sLabel ) { |
|
166 | + $_aOutput[ ] = $this->_getFieldOutputByLabel( |
|
167 | 167 | $_isKey, |
168 | 168 | $_sLabel, |
169 | 169 | $aField |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | |
187 | 187 | $_aBaseAttributes = $_bMultiLabels |
188 | 188 | ? array( |
189 | - 'name' => $aField[ 'attributes' ][ 'name' ] . "[{$isKey}]", |
|
190 | - 'id' => $aField[ 'attributes' ][ 'id' ] . "_{$isKey}", |
|
189 | + 'name' => $aField[ 'attributes' ][ 'name' ]."[{$isKey}]", |
|
190 | + 'id' => $aField[ 'attributes' ][ 'id' ]."_{$isKey}", |
|
191 | 191 | 'value' => $aField[ 'value' ], |
192 | 192 | ) |
193 | 193 | + $aField[ 'attributes' ] |
@@ -199,9 +199,9 @@ discard block |
||
199 | 199 | |
200 | 200 | $_aOutput = array( |
201 | 201 | $this->getElementByLabel( $aField[ 'before_label' ], $isKey, $aField[ 'label' ] ), |
202 | - "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-select-label' ) . ">", |
|
203 | - $this->_getNumberInputPart( $aField, $_aBaseAttributes, $isKey, is_array( $aField[ 'label' ] ) ), // The size (number) part |
|
204 | - $this->_getUnitSelectInput( $aField, $_aBaseAttributes, $isKey, is_array( $aField[ 'label' ] ) ), // The unit (select) part |
|
202 | + "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-select-label' ).">", |
|
203 | + $this->_getNumberInputPart( $aField, $_aBaseAttributes, $isKey, is_array( $aField[ 'label' ] ) ), // The size (number) part |
|
204 | + $this->_getUnitSelectInput( $aField, $_aBaseAttributes, $isKey, is_array( $aField[ 'label' ] ) ), // The unit (select) part |
|
205 | 205 | "</div>", |
206 | 206 | $this->getElementByLabel( $aField[ 'after_label' ], $isKey, $aField[ 'label' ] ) |
207 | 207 | ); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | private function _getNumberInputPart( array $aField, array $aBaseAttributes, $isKey, $bMultiLabels ) { |
219 | 219 | |
220 | 220 | // Size and Size Label |
221 | - $_aSizeAttributes = $this->_getSizeAttributes( |
|
221 | + $_aSizeAttributes = $this->_getSizeAttributes( |
|
222 | 222 | $aField, |
223 | 223 | $aBaseAttributes, |
224 | 224 | $bMultiLabels |
@@ -226,32 +226,32 @@ discard block |
||
226 | 226 | : '' |
227 | 227 | ); |
228 | 228 | |
229 | - $_aSizeLabelAttributes = array( |
|
229 | + $_aSizeLabelAttributes = array( |
|
230 | 230 | 'for' => $_aSizeAttributes[ 'id' ], |
231 | 231 | 'class' => $_aSizeAttributes[ 'disabled' ] |
232 | 232 | ? 'disabled' |
233 | 233 | : null, |
234 | 234 | ); |
235 | 235 | |
236 | - $_sLabel = $this->getElementByLabel( |
|
236 | + $_sLabel = $this->getElementByLabel( |
|
237 | 237 | $aField[ 'label' ], |
238 | 238 | $isKey, |
239 | 239 | $aField[ 'label' ] |
240 | 240 | ); |
241 | - return "<label " . $this->getAttributes( $_aSizeLabelAttributes ) . ">" |
|
241 | + return "<label ".$this->getAttributes( $_aSizeLabelAttributes ).">" |
|
242 | 242 | . $this->getElement( |
243 | 243 | $aField, |
244 | 244 | $bMultiLabels |
245 | 245 | ? array( 'before_label', $isKey, 'size' ) |
246 | 246 | : array( 'before_label', 'size' ) |
247 | 247 | ) |
248 | - . ( $aField[ 'label' ] && ! $aField[ 'repeatable' ] |
|
249 | - ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">" |
|
248 | + . ( $aField[ 'label' ] && !$aField[ 'repeatable' ] |
|
249 | + ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">" |
|
250 | 250 | . $_sLabel |
251 | 251 | . "</span>" |
252 | 252 | : "" |
253 | 253 | ) |
254 | - . "<input " . $this->getAttributes( $_aSizeAttributes ) . " />" |
|
254 | + . "<input ".$this->getAttributes( $_aSizeAttributes )." />" |
|
255 | 255 | . $this->getElement( |
256 | 256 | $aField, |
257 | 257 | $bMultiLabels |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | ) |
295 | 295 | : $aField[ 'units' ]; |
296 | 296 | |
297 | - return "<label " . $this->getAttributes( |
|
297 | + return "<label ".$this->getAttributes( |
|
298 | 298 | array( |
299 | 299 | 'for' => $_aUnitAttributes[ 'id' ], |
300 | 300 | 'class' => $_aUnitAttributes[ 'disabled' ] |
@@ -326,9 +326,9 @@ discard block |
||
326 | 326 | * @return array an unit attribute array |
327 | 327 | * @internal |
328 | 328 | */ |
329 | - private function _getUnitAttributes( array $aField, array $aBaseAttributes, $isLabelKey='' ) { |
|
329 | + private function _getUnitAttributes( array $aField, array $aBaseAttributes, $isLabelKey = '' ) { |
|
330 | 330 | |
331 | - $_bIsMultiple = $aField[ 'is_multiple' ] |
|
331 | + $_bIsMultiple = $aField[ 'is_multiple' ] |
|
332 | 332 | ? true |
333 | 333 | : $this->getElement( |
334 | 334 | $aField, |
@@ -340,13 +340,13 @@ discard block |
||
340 | 340 | |
341 | 341 | $_aSelectAttributes = array( |
342 | 342 | 'type' => 'select', |
343 | - 'id' => $aField[ 'input_id' ] . ( '' === $isLabelKey ? '' : '_' . $isLabelKey ) . '_' . 'unit', |
|
343 | + 'id' => $aField[ 'input_id' ].( '' === $isLabelKey ? '' : '_'.$isLabelKey ).'_'.'unit', |
|
344 | 344 | 'multiple' => $_bIsMultiple |
345 | 345 | ? 'multiple' |
346 | 346 | : null, |
347 | 347 | 'name' => $_bIsMultiple |
348 | - ? "{$aField['_input_name']}" . ( '' === $isLabelKey ? '' : '[' . $isLabelKey . ']' ) . "[unit][]" |
|
349 | - : "{$aField['_input_name']}" . ( '' === $isLabelKey ? '' : '[' . $isLabelKey . ']' ) . "[unit]", |
|
348 | + ? "{$aField[ '_input_name' ]}".( '' === $isLabelKey ? '' : '['.$isLabelKey.']' )."[unit][]" |
|
349 | + : "{$aField[ '_input_name' ]}".( '' === $isLabelKey ? '' : '['.$isLabelKey.']' )."[unit]", |
|
350 | 350 | 'value' => $this->getElement( |
351 | 351 | $aField, |
352 | 352 | array( 'value', 'unit' ), |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | '' === $isLabelKey |
359 | 359 | ? array( 'attributes', 'unit' ) |
360 | 360 | : array( 'attributes', $isLabelKey, 'unit' ), |
361 | - $this->aDefaultKeys['attributes']['unit'] |
|
361 | + $this->aDefaultKeys[ 'attributes' ][ 'unit' ] |
|
362 | 362 | ) |
363 | 363 | + $aBaseAttributes; |
364 | 364 | return $_aSelectAttributes; |
@@ -372,15 +372,15 @@ discard block |
||
372 | 372 | * @return array an size attribute array |
373 | 373 | * @internal |
374 | 374 | */ |
375 | - private function _getSizeAttributes( array $aField, array $aBaseAttributes, $sLabelKey='' ) { |
|
375 | + private function _getSizeAttributes( array $aField, array $aBaseAttributes, $sLabelKey = '' ) { |
|
376 | 376 | |
377 | 377 | return array( |
378 | 378 | 'type' => 'number', |
379 | - 'id' => $aField['input_id'] . '_' . ( '' !== $sLabelKey ? $sLabelKey . '_' : '' ) . 'size', |
|
380 | - 'name' => $aField[ '_input_name' ] . ( '' !== $sLabelKey ? "[{$sLabelKey}]" : '' ) . '[size]', |
|
379 | + 'id' => $aField[ 'input_id' ].'_'.( '' !== $sLabelKey ? $sLabelKey.'_' : '' ).'size', |
|
380 | + 'name' => $aField[ '_input_name' ].( '' !== $sLabelKey ? "[{$sLabelKey}]" : '' ).'[size]', |
|
381 | 381 | 'value' => $this->getElement( |
382 | - $aField, // subject |
|
383 | - array( 'value', 'size' ), // dimensional keys |
|
382 | + $aField, // subject |
|
383 | + array( 'value', 'size' ), // dimensional keys |
|
384 | 384 | '' // default |
385 | 385 | ), |
386 | 386 | ) |
@@ -193,7 +193,7 @@ |
||
193 | 193 | $aField[ '_structure_type' ], |
194 | 194 | array( 'widget', 'post_meta_box', 'page_meta_box' ) |
195 | 195 | ) |
196 | - ){ |
|
196 | + ) { |
|
197 | 197 | return "<span class='title-colon'>:</span>" ; |
198 | 198 | } |
199 | 199 |
@@ -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,14 +126,14 @@ 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 | // . $this->_getFieldTitle( $aFieldset ) |
133 | 133 | . $_oFieldTitle->get() |
134 | 134 | . $aOpenCloseTags[ 'close_title' ]; |
135 | 135 | } |
136 | - $_aOutput[] = $aOpenCloseTags[ 'open_main' ] |
|
136 | + $_aOutput[ ] = $aOpenCloseTags[ 'open_main' ] |
|
137 | 137 | // . call_user_func_array( $hfCallback, array( $aFieldset ) ) |
138 | 138 | . $this->getFieldsetOutput( $aFieldset ) |
139 | 139 | . $aOpenCloseTags[ 'close_main' ]; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | 0 // the first item |
159 | 159 | ); |
160 | 160 | |
161 | - return "<label class='admin-page-framework-field-title' for='" . $_oInputTagIDGenerator->get() . "'>" |
|
161 | + return "<label class='admin-page-framework-field-title' for='".$_oInputTagIDGenerator->get()."'>" |
|
162 | 162 | . "<a id='{$aField[ 'field_id' ]}'></a>" // to allow the browser to link to the element. |
163 | 163 | . "<span title='" |
164 | 164 | . esc_attr( |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * @since 3.7.0 |
182 | 182 | */ |
183 | 183 | private function _getToolTip( $asTip, $sElementID ) { |
184 | - $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
184 | + $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
185 | 185 | $asTip, |
186 | 186 | $sElementID |
187 | 187 | ); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | */ |
195 | 195 | private function _getTitleColon( $aField ) { |
196 | 196 | |
197 | - if ( ! isset( $aField[ 'title' ] ) || '' === $aField[ 'title' ] ) { |
|
197 | + if ( !isset( $aField[ 'title' ] ) || '' === $aField[ 'title' ] ) { |
|
198 | 198 | return ''; |
199 | 199 | } |
200 | 200 | if ( |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | $aField[ '_structure_type' ], |
203 | 203 | array( 'widget', 'post_meta_box', 'page_meta_box' ) |
204 | 204 | ) |
205 | - ){ |
|
206 | - return "<span class='title-colon'>:</span>" ; |
|
205 | + ) { |
|
206 | + return "<span class='title-colon'>:</span>"; |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | } |
@@ -141,8 +141,8 @@ discard block |
||
141 | 141 | public function __construct( $oProp ) { |
142 | 142 | |
143 | 143 | // Set sub-class names. |
144 | - foreach( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) { |
|
145 | - $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix . $this->_sStructureType; |
|
144 | + foreach ( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) { |
|
145 | + $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix.$this->_sStructureType; |
|
146 | 146 | } |
147 | 147 | $this->aSubClassNames = $this->aSubClassNames + $this->_aSubClassNames; |
148 | 148 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | // Required sub-class objects |
162 | 162 | $this->oProp = $oProp; |
163 | 163 | |
164 | - if ( $this->oProp->bIsAdmin && ! $this->oProp->bIsAdminAjax ) { |
|
164 | + if ( $this->oProp->bIsAdmin && !$this->oProp->bIsAdminAjax ) { |
|
165 | 165 | if ( did_action( 'current_screen' ) ) { |
166 | 166 | $this->_replyToLoadComponents(); |
167 | 167 | } else { |
@@ -170,8 +170,8 @@ discard block |
||
170 | 170 | } |
171 | 171 | |
172 | 172 | // Call the user constructor. |
173 | - $this->start(); // defined in the controller class. |
|
174 | - $this->oUtil->addAndDoAction( $this, 'start_' . $this->oProp->sClassName, $this ); |
|
173 | + $this->start(); // defined in the controller class. |
|
174 | + $this->oUtil->addAndDoAction( $this, 'start_'.$this->oProp->sClassName, $this ); |
|
175 | 175 | |
176 | 176 | } |
177 | 177 | |
@@ -184,15 +184,15 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function _replyToLoadComponents( /* $oScreen */ ) { |
186 | 186 | |
187 | - if ( ! $this->_isInThePage() ) { |
|
187 | + if ( !$this->_isInThePage() ) { |
|
188 | 188 | return; |
189 | 189 | } |
190 | 190 | |
191 | - if ( ! isset( $this->oResource ) ) { |
|
191 | + if ( !isset( $this->oResource ) ) { |
|
192 | 192 | $this->oResource = $this->_replyTpSetAndGetInstance_oResource(); |
193 | 193 | } |
194 | 194 | |
195 | - if ( ! isset( $this->oLink ) ) { |
|
195 | + if ( !isset( $this->oLink ) ) { |
|
196 | 196 | $this->oLink = $this->_replyTpSetAndGetInstance_oLink(); |
197 | 197 | } |
198 | 198 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | public function _replyToDetermineToLoad() { |
242 | 242 | |
243 | - if ( ! $this->_isInThePage() ) { |
|
243 | + if ( !$this->_isInThePage() ) { |
|
244 | 244 | return; |
245 | 245 | } |
246 | 246 | |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | // Set and return the sub class object instance. |
313 | 313 | if ( isset( $this->aSubClassNames[ $sPropertyName ] ) ) { |
314 | 314 | return call_user_func( |
315 | - array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
315 | + array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
316 | 316 | ); |
317 | 317 | } |
318 | 318 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | */ |
347 | 347 | public function _replyTpSetAndGetInstance_oMsg() { |
348 | 348 | $this->oMsg = call_user_func_array( |
349 | - array( $this->aSubClassNames[ 'oMsg' ], 'getInstance'), |
|
349 | + array( $this->aSubClassNames[ 'oMsg' ], 'getInstance' ), |
|
350 | 350 | array( $this->oProp->sTextDomain ) // parameters |
351 | 351 | ); |
352 | 352 | return $this->oMsg; |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | * |
412 | 412 | * @internal |
413 | 413 | */ |
414 | - public function __call( $sMethodName, $aArguments=null ) { |
|
414 | + public function __call( $sMethodName, $aArguments = null ) { |
|
415 | 415 | |
416 | 416 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
417 | 417 | |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | |
442 | 442 | // Check if the method name does not contain a backslash. |
443 | 443 | if ( false === strpos( $sMethodName, "\\" ) ) { |
444 | - return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
444 | + return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
445 | 445 | } |
446 | 446 | |
447 | 447 | // If the method name contains a backslash, the user may be using a name space. |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | array( $this, $_sAutoCallbackMethodName ), |
453 | 453 | $aArguments |
454 | 454 | ) |
455 | - : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
455 | + : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
456 | 456 | |
457 | 457 | } |
458 | 458 | |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | */ |
463 | 463 | private function _triggerUndefinedMethodWarning( $sMethodName ) { |
464 | 464 | trigger_error( |
465 | - AdminPageFramework_Registry::NAME . ': ' |
|
465 | + AdminPageFramework_Registry::NAME.': ' |
|
466 | 466 | . sprintf( |
467 | 467 | __( 'The method is not defined: %1$s', $this->oProp->sTextDomain ), |
468 | 468 | $sMethodName |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | if ( $this->oProp->bIsAdmin && ! $this->oProp->bIsAdminAjax ) { |
165 | 165 | if ( did_action( 'current_screen' ) ) { |
166 | 166 | $this->_replyToLoadComponents(); |
167 | - } else { |
|
167 | + } else { |
|
168 | 168 | add_action( 'current_screen', array( $this, '_replyToLoadComponents' ) ); |
169 | 169 | } |
170 | 170 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function _replyToLoadComponents( /* $oScreen */ ) { |
186 | 186 | |
187 | - if ( ! $this->_isInThePage() ) { |
|
187 | + if ( ! $this->_isInThePage() ) { |
|
188 | 188 | return; |
189 | 189 | } |
190 | 190 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * @since 3.1.0 |
212 | 212 | * @internal |
213 | 213 | */ |
214 | - protected function _isInstantiatable() { |
|
214 | + protected function _isInstantiatable() { |
|
215 | 215 | return true; |
216 | 216 | } |
217 | 217 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | * @todo Change the visibility scope to `protected` as the public version of the method `isInThePage()` has been introduced to make the design consitent. |
227 | 227 | * @internal |
228 | 228 | */ |
229 | - public function _isInThePage() { |
|
229 | + public function _isInThePage() { |
|
230 | 230 | return true; |
231 | 231 | } |
232 | 232 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | public function _replyToDetermineToLoad() { |
242 | 242 | |
243 | - if ( ! $this->_isInThePage() ) { |
|
243 | + if ( ! $this->_isInThePage() ) { |
|
244 | 244 | return; |
245 | 245 | } |
246 | 246 | |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | * |
412 | 412 | * @internal |
413 | 413 | */ |
414 | - public function __call( $sMethodName, $aArguments=null ) { |
|
414 | + public function __call( $sMethodName, $aArguments=null ) { |
|
415 | 415 | |
416 | 416 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
417 | 417 |
@@ -39,16 +39,16 @@ |
||
39 | 39 | * @since 3.7.4 Changed the default capability value to `read`. |
40 | 40 | * @todo Examine the appropriate default capability level. |
41 | 41 | */ |
42 | - public function __construct( $sCapability='read', $sTextDomain='admin-page-framework' ) { |
|
42 | + public function __construct( $sCapability = 'read', $sTextDomain = 'admin-page-framework' ) { |
|
43 | 43 | |
44 | 44 | $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] ) |
45 | 45 | ? $this->aSubClassNames[ 'oProp' ] |
46 | - : 'AdminPageFramework_Property_' . $this->_sStructureType; |
|
46 | + : 'AdminPageFramework_Property_'.$this->_sStructureType; |
|
47 | 47 | $this->oProp = new $_sProprtyClassName( |
48 | - $this, // the caller object |
|
49 | - get_class( $this ), // the caller class name |
|
50 | - $sCapability, // the capability level |
|
51 | - $sTextDomain, // the text domain |
|
48 | + $this, // the caller object |
|
49 | + get_class( $this ), // the caller class name |
|
50 | + $sCapability, // the capability level |
|
51 | + $sTextDomain, // the text domain |
|
52 | 52 | $this->_sStructureType // the structure type |
53 | 53 | ); |
54 | 54 |