@@ -58,23 +58,23 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function get() { |
60 | 60 | |
61 | - $this->aResources[ 'internal_scripts' ] = $this->_getUpdatedInternalItemsByCallback( |
|
61 | + $this->aResources[ 'internal_scripts' ] = $this->_getUpdatedInternalItemsByCallback( |
|
62 | 62 | $this->aResources[ 'internal_scripts' ], |
63 | 63 | 'hfGetScripts' |
64 | 64 | ); |
65 | - $this->aResources[ 'internal_styles' ] = $this->_getUpdatedInternalItemsByCallback( |
|
65 | + $this->aResources[ 'internal_styles' ] = $this->_getUpdatedInternalItemsByCallback( |
|
66 | 66 | $this->aResources[ 'internal_styles' ], |
67 | 67 | 'hfGetStyles' |
68 | 68 | ); |
69 | - $this->aResources[ 'internal_styles_ie' ] = $this->_getUpdatedInternalItemsByCallback( |
|
69 | + $this->aResources[ 'internal_styles_ie' ] = $this->_getUpdatedInternalItemsByCallback( |
|
70 | 70 | $this->aResources[ 'internal_styles_ie' ], |
71 | 71 | 'hfGetIEStyles' |
72 | 72 | ); |
73 | - $this->aResources[ 'src_styles' ] = $this->_getUpdatedEnqueuingItemsByCallback( |
|
73 | + $this->aResources[ 'src_styles' ] = $this->_getUpdatedEnqueuingItemsByCallback( |
|
74 | 74 | $this->aResources[ 'src_styles' ], |
75 | 75 | 'aEnqueueStyles' |
76 | 76 | ); |
77 | - $this->aResources[ 'src_scripts' ] = $this->_getUpdatedEnqueuingItemsByCallback( |
|
77 | + $this->aResources[ 'src_scripts' ] = $this->_getUpdatedEnqueuingItemsByCallback( |
|
78 | 78 | $this->aResources[ 'src_scripts' ], |
79 | 79 | 'aEnqueueScripts' |
80 | 80 | ); |
@@ -88,10 +88,10 @@ discard block |
||
88 | 88 | */ |
89 | 89 | private function _getUpdatedInternalItemsByCallback( array $aSubject, $sKey ) { |
90 | 90 | $_oCallable = $this->getElement( $this->aFieldTypeDefinition, $sKey ); |
91 | - if ( ! is_callable( $_oCallable ) ) { |
|
91 | + if ( !is_callable( $_oCallable ) ) { |
|
92 | 92 | return $aSubject; |
93 | 93 | } |
94 | - $aSubject[] = call_user_func_array( |
|
94 | + $aSubject[ ] = call_user_func_array( |
|
95 | 95 | $_oCallable, |
96 | 96 | array() |
97 | 97 | ); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Stores section set definitions. |
40 | 40 | */ |
41 | - public $aSectionsets = array( |
|
41 | + public $aSectionsets = array( |
|
42 | 42 | '_default' => array( |
43 | 43 | 'section_id' => '_default', |
44 | 44 | ), |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * Stores field set definitions. |
49 | 49 | */ |
50 | - public $aFieldsets = array(); |
|
50 | + public $aFieldsets = array(); |
|
51 | 51 | |
52 | 52 | /** |
53 | 53 | * Multi-dimensional array holding the saved form data. |
54 | 54 | */ |
55 | - public $aSavedData = array(); |
|
55 | + public $aSavedData = array(); |
|
56 | 56 | |
57 | 57 | /** |
58 | 58 | * The capability level of the form. |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | * Each secitonset and fieldset has individual capability. If they are not set, |
63 | 63 | * This value will be applied. |
64 | 64 | */ |
65 | - public $sCapability = ''; // default - an empty string |
|
65 | + public $sCapability = ''; // default - an empty string |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Stores callback functions. |
69 | 69 | * Each value will have a callback. |
70 | 70 | */ |
71 | - public $aCallbacks = array( |
|
71 | + public $aCallbacks = array( |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @return string The form default capability level. |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | + $this->aArguments; |
290 | 290 | $aArguments[ 'caller_id' ] = $aArguments[ 'caller_id' ] |
291 | 291 | ? $aArguments[ 'caller_id' ] |
292 | - : get_class( $this ); // if a caller id is empty, this class name will be used. |
|
292 | + : get_class( $this ); // if a caller id is empty, this class name will be used. |
|
293 | 293 | |
294 | 294 | if ( $this->sStructureType ) { |
295 | 295 | $aArguments[ 'structure_type' ] = $this->sStructureType; |
@@ -59,18 +59,18 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | // If the section ID is not registered, return false. |
62 | - if ( ! array_key_exists( $sID, $this->aSectionsets ) ) { |
|
62 | + if ( !array_key_exists( $sID, $this->aSectionsets ) ) { |
|
63 | 63 | return false; |
64 | 64 | } |
65 | 65 | |
66 | 66 | // the fields array's first dimension is also filled with the keys of section ids. |
67 | - if ( ! array_key_exists( $sID, $this->aFieldsets ) ) { |
|
67 | + if ( !array_key_exists( $sID, $this->aFieldsets ) ) { |
|
68 | 68 | return false; |
69 | 69 | } |
70 | 70 | |
71 | 71 | // Since numeric IDs are denied at the beginning of the method, the elements will not be sub-sections. |
72 | 72 | $_bIsSeciton = false; |
73 | - foreach( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
73 | + foreach ( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
74 | 74 | |
75 | 75 | if ( $_sSectionID == $sID ) { |
76 | 76 | $_bIsSeciton = true; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function canUserView( $sCapability ) { |
99 | 99 | |
100 | - if ( ! $sCapability ) { |
|
100 | + if ( !$sCapability ) { |
|
101 | 101 | return true; |
102 | 102 | } |
103 | 103 |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | * @param string $sStructureType The type of object. Currently 'post_meta_box' or 'user_meta' is accepted. |
33 | 33 | * @return void |
34 | 34 | */ |
35 | - public function updateMetaDataByType( $iObjectID, array $aInput, array $aSavedMeta, $sStructureType='post_meta_box' ) { |
|
35 | + public function updateMetaDataByType( $iObjectID, array $aInput, array $aSavedMeta, $sStructureType = 'post_meta_box' ) { |
|
36 | 36 | |
37 | - if ( ! $iObjectID ) { |
|
37 | + if ( !$iObjectID ) { |
|
38 | 38 | return; |
39 | 39 | } |
40 | 40 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | 'user_meta' => 'update_user_meta', |
44 | 44 | 'term_meta' => 'update_term_meta', |
45 | 45 | ); |
46 | - if ( ! in_array( $sStructureType, array_keys( $_aFunctionNameMapByFieldsType ) ) ) { |
|
46 | + if ( !in_array( $sStructureType, array_keys( $_aFunctionNameMapByFieldsType ) ) ) { |
|
47 | 47 | return; |
48 | 48 | } |
49 | 49 | $_sFunctionName = $this->getElement( $_aFunctionNameMapByFieldsType, $sStructureType ); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | $_vSavedValue = $this->getElement( |
82 | 82 | $aSavedMeta, // subject |
83 | - $_sSectionOrFieldID, // dimensional keys |
|
83 | + $_sSectionOrFieldID, // dimensional keys |
|
84 | 84 | null // default value |
85 | 85 | ); |
86 | 86 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function construct() { |
28 | 28 | |
29 | - if ( ! function_exists( 'wp_enqueue_media' ) ) { |
|
29 | + if ( !function_exists( 'wp_enqueue_media' ) ) { |
|
30 | 30 | return; |
31 | 31 | } |
32 | 32 | wp_enqueue_script( 'jquery' ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $_oMsg = $_aParams[ 0 ]; |
65 | 65 | |
66 | 66 | // means the WordPress version is 3.4.x or below |
67 | - if ( ! function_exists( 'wp_enqueue_media' ) ) { |
|
67 | + if ( !function_exists( 'wp_enqueue_media' ) ) { |
|
68 | 68 | return ""; |
69 | 69 | } |
70 | 70 |
@@ -115,7 +115,7 @@ |
||
115 | 115 | new self( $oMsg ); |
116 | 116 | |
117 | 117 | // $aSettings = $this->getAsArray( $aSettings ); |
118 | - $_sScript = <<<JAVASCRIPTS |
|
118 | + $_sScript = <<<JAVASCRIPTS |
|
119 | 119 | jQuery( document ).ready( function() { |
120 | 120 | jQuery( '#{$sContainerTagID}' ).enableAdminPageFrameworkSortableSections( '{$sContainerTagID}' ); |
121 | 121 | }); |
@@ -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 |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | */ |
28 | 28 | protected function _getAttributes() { |
29 | 29 | |
30 | - $_aSectionAttributes = $this->uniteArrays( |
|
31 | - $this->dropElementsByType( $this->aArguments[ 'attributes' ] ), // remove elements of an array. |
|
30 | + $_aSectionAttributes = $this->uniteArrays( |
|
31 | + $this->dropElementsByType( $this->aArguments[ 'attributes' ] ), // remove elements of an array. |
|
32 | 32 | array( |
33 | 33 | 'id' => $this->aArguments[ '_tag_id' ], // section-{section id}__{index} |
34 | 34 | 'class' => $this->getClassAttribute( |
@@ -49,19 +49,19 @@ discard block |
||
49 | 49 | ) |
50 | 50 | ); |
51 | 51 | |
52 | - $_aSectionAttributes[ 'class' ] = $this->getClassAttribute( |
|
52 | + $_aSectionAttributes[ 'class' ] = $this->getClassAttribute( |
|
53 | 53 | $_aSectionAttributes[ 'class' ], |
54 | 54 | $this->dropElementsByType( $this->aArguments[ 'class' ] ) |
55 | - ); // 3.3.1+ |
|
55 | + ); // 3.3.1+ |
|
56 | 56 | |
57 | - $_aSectionAttributes[ 'style' ] = $this->getStyleAttribute( |
|
57 | + $_aSectionAttributes[ 'style' ] = $this->getStyleAttribute( |
|
58 | 58 | $_aSectionAttributes[ 'style' ], |
59 | 59 | $this->getAOrB( |
60 | 60 | $this->aArguments[ 'hidden' ], |
61 | 61 | 'display:none', |
62 | 62 | null |
63 | 63 | ) |
64 | - ); // 3.3.1+ |
|
64 | + ); // 3.3.1+ |
|
65 | 65 | |
66 | 66 | return $_aSectionAttributes; |
67 | 67 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @since 3.6.0 |
27 | 27 | */ |
28 | - public $sContext = ''; |
|
28 | + public $sContext = ''; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * |