@@ -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 |
@@ -21,6 +21,6 @@ |
||
21 | 21 | /** |
22 | 22 | * The callback function name or the callable object to retrieve meta data. |
23 | 23 | */ |
24 | - protected $osCallable = 'get_term_meta'; |
|
24 | + protected $osCallable = 'get_term_meta'; |
|
25 | 25 | |
26 | 26 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | '' // default value |
55 | 55 | ); |
56 | 56 | |
57 | - if ( ! $this->canUserView( $this->sCapability ) ) { |
|
57 | + if ( !$this->canUserView( $this->sCapability ) ) { |
|
58 | 58 | return ''; |
59 | 59 | } |
60 | 60 | |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | ); |
83 | 83 | |
84 | 84 | $_sAddNewTerm = $bEditTerm ? '' : ' add-new-term'; |
85 | - $_sClassSelectors = 'admin-page-framework-form-table-term_meta' . $_sAddNewTerm; |
|
85 | + $_sClassSelectors = 'admin-page-framework-form-table-term_meta'.$_sAddNewTerm; |
|
86 | 86 | return '<tr class="admin-page-framework-form-table-outer-row-term_meta">' |
87 | 87 | . '<td colspan=2>' |
88 | - . '<table class="' . $_sClassSelectors . '">' |
|
88 | + . '<table class="'.$_sClassSelectors.'">' |
|
89 | 89 | . '<tbody>' |
90 | 90 | . '<tr>' |
91 | 91 | . '<td>' |
@@ -26,7 +26,7 @@ |
||
26 | 26 | * @since 3.8.0 |
27 | 27 | * @return void |
28 | 28 | */ |
29 | - public function construct() { |
|
29 | + public function construct() { |
|
30 | 30 | $this->_addDefaultResources(); |
31 | 31 | } |
32 | 32 | /** |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | * @since 3.8.0 |
57 | 57 | * @internal |
58 | 58 | */ |
59 | - protected function _setOptionArray( $iTermID=null, $_deprecated=null ) { |
|
59 | + protected function _setOptionArray( $iTermID = null, $_deprecated = null ) { |
|
60 | 60 | $this->oForm->aSavedData = $this->oUtil->addAndApplyFilter( |
61 | 61 | $this, // the caller factory object |
62 | - 'options_' . $this->oProp->sClassName, |
|
62 | + 'options_'.$this->oProp->sClassName, |
|
63 | 63 | $this->_getSavedTermMetas( $iTermID, $this->oForm->aFieldsets ) |
64 | 64 | // @todo maybe pass the term id because the user will not know whihch form data is |
65 | 65 | ); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function _replyToValidateOptions( $iTermID ) { |
93 | 93 | |
94 | - if ( ! $this->_shouldProceedValidation() ) { |
|
94 | + if ( !$this->_shouldProceedValidation() ) { |
|
95 | 95 | return; |
96 | 96 | } |
97 | 97 | |
@@ -99,19 +99,19 @@ discard block |
||
99 | 99 | $_aSubmittedFormData = $this->oForm->getSubmittedData( $_POST ); |
100 | 100 | $_aSubmittedFormData = $this->oUtil->addAndApplyFilters( |
101 | 101 | $this, |
102 | - 'validation_' . $this->oProp->sClassName, |
|
102 | + 'validation_'.$this->oProp->sClassName, |
|
103 | 103 | call_user_func_array( // 1st param |
104 | 104 | array( $this, 'validate' ), // triggers __call() |
105 | 105 | array( $_aSubmittedFormData, $_aSavedFormData, $this ) |
106 | 106 | ), // 3.5.10+ |
107 | - $_aSavedFormData, // 2nd param |
|
107 | + $_aSavedFormData, // 2nd param |
|
108 | 108 | $this // 3rd param |
109 | 109 | ); |
110 | 110 | |
111 | 111 | // @todo Update term metas |
112 | 112 | $this->oForm->updateMetaDataByType( |
113 | - $iTermID, // object id |
|
114 | - $_aSubmittedFormData, // user submit form data |
|
113 | + $iTermID, // object id |
|
114 | + $_aSubmittedFormData, // user submit form data |
|
115 | 115 | $this->oForm->dropRepeatableElements( $_aSavedFormData ), // Drop repeatable section elements from the saved meta array. |
116 | 116 | $this->oForm->sStructureType // fields type |
117 | 117 | ); |
@@ -166,7 +166,7 @@ |
||
166 | 166 | $aField[ '_structure_type' ], |
167 | 167 | array( 'widget', 'post_meta_box', 'page_meta_box' ) |
168 | 168 | ) |
169 | - ){ |
|
169 | + ) { |
|
170 | 170 | return "<span class='title-colon'>:</span>" ; |
171 | 171 | } |
172 | 172 |
@@ -172,7 +172,7 @@ |
||
172 | 172 | . $this->getFrameworkNameVersion() |
173 | 173 | . ' (' |
174 | 174 | . $this->oMsg->get( 'debug_info_will_be_disabled' ) |
175 | - . ')' |
|
175 | + . ')' |
|
176 | 176 | . '</span>', |
177 | 177 | 'attributes' => array( |
178 | 178 | 'container' => array( |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $aField = $this->aFieldset; |
71 | 71 | |
72 | - if ( ! $aField[ 'show_title_column' ] ) { |
|
72 | + if ( !$aField[ 'show_title_column' ] ) { |
|
73 | 73 | return ''; |
74 | 74 | } |
75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | 'for' => $_oInputTagIDGenerator->get(), |
84 | 84 | ); |
85 | 85 | $_sOutput .= $aField[ 'title' ] |
86 | - ? "<label " . $this->getAttributes( $_aLabelAttributes ) . "'>" |
|
86 | + ? "<label ".$this->getAttributes( $_aLabelAttributes )."'>" |
|
87 | 87 | . "<a id='{$aField[ 'field_id' ]}'></a>" // to allow the browser to link to the element. |
88 | 88 | . "<span title='" |
89 | 89 | . esc_attr( |
@@ -114,12 +114,12 @@ discard block |
||
114 | 114 | */ |
115 | 115 | private function _getFieldOutputsInFieldTitleAreaFromNestedFields( $aField ) { |
116 | 116 | |
117 | - if ( ! $this->hasNestedFields( $aField ) ) { |
|
117 | + if ( !$this->hasNestedFields( $aField ) ) { |
|
118 | 118 | return ''; |
119 | 119 | } |
120 | 120 | |
121 | 121 | $_sOutput = ''; |
122 | - foreach( $aField[ 'content' ] as $_aNestedField ) { |
|
122 | + foreach ( $aField[ 'content' ] as $_aNestedField ) { |
|
123 | 123 | |
124 | 124 | if ( 'field_title' !== $_aNestedField[ 'placement' ] ) { |
125 | 125 | continue; |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | |
128 | 128 | $_oFieldset = new AdminPageFramework_Form_View___Fieldset( |
129 | 129 | $_aNestedField, |
130 | - $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference. |
|
130 | + $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference. |
|
131 | 131 | $this->aFieldErrors, |
132 | 132 | $this->aFieldTypeDefinitions, |
133 | 133 | $this->oMsg, |
134 | 134 | $this->aCallbacks // field output element callables. |
135 | 135 | ); |
136 | - $_sOutput .= $_oFieldset->get(); // field output |
|
136 | + $_sOutput .= $_oFieldset->get(); // field output |
|
137 | 137 | |
138 | 138 | } |
139 | 139 | return $_sOutput; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @since 3.7.0 |
146 | 146 | */ |
147 | 147 | private function _getToolTip( $asTip, $sElementID ) { |
148 | - $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
148 | + $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
149 | 149 | $asTip, |
150 | 150 | $sElementID |
151 | 151 | ); |
@@ -159,14 +159,14 @@ discard block |
||
159 | 159 | */ |
160 | 160 | private function _getDebugInfo( $aField ) { |
161 | 161 | |
162 | - if ( ! $this->_shouldShowDebugInfo( $aField ) ) { |
|
162 | + if ( !$this->_shouldShowDebugInfo( $aField ) ) { |
|
163 | 163 | return ''; |
164 | 164 | } |
165 | - $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
165 | + $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
166 | 166 | array( |
167 | 167 | 'title' => $this->oMsg->get( 'field_arguments' ), |
168 | 168 | 'dash-icon' => 'dashicons-info', |
169 | - 'icon_alt_text' => '[' . $this->oMsg->get( 'debug' ) . ' ]', |
|
169 | + 'icon_alt_text' => '['.$this->oMsg->get( 'debug' ).' ]', |
|
170 | 170 | 'content' => AdminPageFramework_Debug::getDetails( $aField ) |
171 | 171 | . '<span class="admin-page-framework-info">' |
172 | 172 | . $this->getFrameworkNameVersion() |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | ), |
181 | 181 | ) |
182 | 182 | ), |
183 | - $aField[ 'field_id' ] . '_debug' |
|
183 | + $aField[ 'field_id' ].'_debug' |
|
184 | 184 | ); |
185 | 185 | return $_oToolTip->get(); |
186 | 186 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | private function _shouldShowDebugInfo( $aField ) { |
193 | 193 | |
194 | - if ( ! $aField[ 'show_debug_info' ] ) { |
|
194 | + if ( !$aField[ 'show_debug_info' ] ) { |
|
195 | 195 | return false; |
196 | 196 | } |
197 | 197 | if ( strlen( $aField[ '_parent_field_path' ] ) ) { |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | private function _getTitleColon( $aField ) { |
209 | 209 | |
210 | - if ( ! isset( $aField[ 'title' ] ) || '' === $aField[ 'title' ] ) { |
|
210 | + if ( !isset( $aField[ 'title' ] ) || '' === $aField[ 'title' ] ) { |
|
211 | 211 | return ''; |
212 | 212 | } |
213 | 213 | if ( |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | $aField[ '_structure_type' ], |
216 | 216 | array( 'widget', 'post_meta_box', 'page_meta_box' ) |
217 | 217 | ) |
218 | - ){ |
|
219 | - return "<span class='title-colon'>:</span>" ; |
|
218 | + ) { |
|
219 | + return "<span class='title-colon'>:</span>"; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | $_aParameters = func_get_args() + array( |
34 | 34 | $this->aFieldset, |
35 | - $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference. |
|
35 | + $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference. |
|
36 | 36 | $this->aFieldErrors, |
37 | 37 | $this->aFieldTypeDefinitions, |
38 | 38 | $this->aCallbacks, // field output element callables. |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | $aFieldset = $this->aFieldset; |
62 | 62 | |
63 | - if ( ! $this->isNormalPlacement( $aFieldset ) ) { |
|
63 | + if ( !$this->isNormalPlacement( $aFieldset ) ) { |
|
64 | 64 | return ''; |
65 | 65 | } |
66 | 66 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return $this->_getFieldByContainer( |
72 | 72 | $aFieldset, |
73 | 73 | array( |
74 | - 'open_main' => "<div " . $_oFieldrowAttribute->get() . ">", |
|
74 | + 'open_main' => "<div ".$_oFieldrowAttribute->get().">", |
|
75 | 75 | 'close_main' => "</div>", |
76 | 76 | ) |
77 | 77 | ); |
@@ -67,16 +67,16 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected function getField( $aField ) { |
69 | 69 | |
70 | - $_oCallerForm = $aField[ '_caller_object' ]; |
|
70 | + $_oCallerForm = $aField[ '_caller_object' ]; |
|
71 | 71 | |
72 | 72 | $_aInlineMixedOutput = array(); |
73 | - foreach( $this->getAsArray( $aField[ 'content' ] ) as $_aChildFieldset ) { |
|
73 | + foreach ( $this->getAsArray( $aField[ 'content' ] ) as $_aChildFieldset ) { |
|
74 | 74 | |
75 | 75 | if ( is_scalar( $_aChildFieldset ) ) { |
76 | 76 | continue; |
77 | 77 | } |
78 | 78 | |
79 | - if ( ! $this->isNormalPlacement( $_aChildFieldset ) ) { |
|
79 | + if ( !$this->isNormalPlacement( $_aChildFieldset ) ) { |
|
80 | 80 | continue; |
81 | 81 | } |
82 | 82 | |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | $_oFieldset = new AdminPageFramework_Form_View___Fieldset( |
93 | 93 | $_aChildFieldset, |
94 | 94 | $_oCallerForm->aSavedData, |
95 | - $_oCallerForm->getFieldErrors(), // @todo Generate field errors. $this->aErrors, |
|
95 | + $_oCallerForm->getFieldErrors(), // @todo Generate field errors. $this->aErrors, |
|
96 | 96 | $_oCallerForm->aFieldTypeDefinitions, |
97 | 97 | $_oCallerForm->oMsg, |
98 | 98 | $_oCallerForm->aCallbacks // field output element callables. |
99 | 99 | ); |
100 | - $_aInlineMixedOutput[] = $_oFieldset->get(); // field output |
|
100 | + $_aInlineMixedOutput[ ] = $_oFieldset->get(); // field output |
|
101 | 101 | |
102 | 102 | |
103 | 103 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * |
37 | 37 | * @since 3.8.0 |
38 | 38 | */ |
39 | - protected function getStyles() { |
|
39 | + protected function getStyles() { |
|
40 | 40 | return <<<CSSRULES |
41 | 41 | /* Nested fieldsets 3.8.0+ */ |
42 | 42 | .admin-page-framework-fieldset > .admin-page-framework-fields > .admin-page-framework-field.with-nested-fields > .admin-page-framework-fieldset.multiple-nesting { |