@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class AdminPageFramework_Model__FormSubmission__Validator__ContactForm extends AdminPageFramework_Model__FormSubmission__Validator_Base { |
19 | 19 | |
20 | - public $sActionHookPrefix = 'try_validation_after_'; // 3.7.6 Changed it from `try_validation_before_` |
|
20 | + public $sActionHookPrefix = 'try_validation_after_'; // 3.7.6 Changed it from `try_validation_before_` |
|
21 | 21 | public $iHookPriority = 10; |
22 | 22 | public $iCallbackParameters = 5; |
23 | 23 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) { |
35 | 35 | |
36 | 36 | // Check whether sending an email has been confirmed by the user or not. |
37 | - if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) { |
|
37 | + if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) { |
|
38 | 38 | return; |
39 | 39 | } |
40 | 40 | |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | $this->getElement( $aSubmitInformation, 'section_id' ) |
46 | 46 | ); |
47 | 47 | $this->oFactory->oProp->_bDisableSavingOptions = true; |
48 | - $this->deleteTransient( 'apf_tfd' . md5( 'temporary_form_data_' . $this->oFactory->oProp->sClassName . get_current_user_id() ) ); |
|
48 | + $this->deleteTransient( 'apf_tfd'.md5( 'temporary_form_data_'.$this->oFactory->oProp->sClassName.get_current_user_id() ) ); |
|
49 | 49 | |
50 | 50 | // Schedule to remove the confirmation url query key. |
51 | 51 | add_action( "setting_update_url_{$this->oFactory->oProp->sClassName}", array( $this, '_replyToRemoveConfirmationQueryKey' ) ); |
52 | 52 | |
53 | 53 | // Go to the catch clause. |
54 | - $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause. |
|
54 | + $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause. |
|
55 | 55 | $_oException->aReturn = $aInputs; |
56 | 56 | throw $_oException; |
57 | 57 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | private function _sendEmailInBackground( $aInputs, $sPressedInputNameFlat, $sSubmitSectionID ) { |
88 | 88 | |
89 | - $_sTranskentKey = 'apf_em_' . md5( $sPressedInputNameFlat . get_current_user_id() ); |
|
89 | + $_sTranskentKey = 'apf_em_'.md5( $sPressedInputNameFlat.get_current_user_id() ); |
|
90 | 90 | $_aEmailOptions = $this->getTransient( $_sTranskentKey ); |
91 | 91 | $this->deleteTransient( $_sTranskentKey ); |
92 | 92 | |
@@ -101,13 +101,13 @@ discard block |
||
101 | 101 | 'name' => '', |
102 | 102 | ); |
103 | 103 | |
104 | - $_sTransientKey = 'apf_emd_' . md5( $sPressedInputNameFlat . get_current_user_id() ); |
|
104 | + $_sTransientKey = 'apf_emd_'.md5( $sPressedInputNameFlat.get_current_user_id() ); |
|
105 | 105 | $_aFormEmailData = array( |
106 | 106 | 'email_options' => $_aEmailOptions, |
107 | 107 | 'input' => $aInputs, |
108 | 108 | 'section_id' => $sSubmitSectionID, |
109 | 109 | ); |
110 | - $_bIsSet = $this->setTransient( $_sTransientKey, $_aFormEmailData, 100 ); |
|
110 | + $_bIsSet = $this->setTransient( $_sTransientKey, $_aFormEmailData, 100 ); |
|
111 | 111 | |
112 | 112 | // Send the email in the background. |
113 | 113 | wp_remote_get( |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | ); |
126 | 126 | |
127 | 127 | // @remark Not possible to tell whether it is sent or not at the moment because it is performed in the background. |
128 | - $_bSent = $_bIsSet; |
|
128 | + $_bSent = $_bIsSet; |
|
129 | 129 | $this->oFactory->setSettingNotice( |
130 | 130 | $this->oFactory->oMsg->get( |
131 | 131 | $this->getAOrB( |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * @return string |
148 | 148 | */ |
149 | 149 | public function _replyToRemoveConfirmationQueryKey( $sSettingUpdateURL ) { |
150 | - return remove_query_arg( array( 'confirmation', ), $sSettingUpdateURL ); |
|
150 | + return remove_query_arg( array( 'confirmation',), $sSettingUpdateURL ); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $this->oFactory = $oFactory; |
31 | 31 | |
32 | 32 | add_filter( |
33 | - "validation_pre_" . $this->oFactory->oProp->sClassName, |
|
33 | + "validation_pre_".$this->oFactory->oProp->sClassName, |
|
34 | 34 | array( $this, '_replyToValiateUserFormInputs' ), |
35 | 35 | 10, |
36 | 36 | 4 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $_sSubmitSectionID = $this->_getPressedSubmitButtonData( $_aSubmits, 'section_id' ); |
62 | 62 | |
63 | 63 | // Submit Information - [3.5.0+] this will be passed to validation callback methods. |
64 | - $_aSubmitsInformation = array( |
|
64 | + $_aSubmitsInformation = array( |
|
65 | 65 | 'page_slug' => $_sPageSlug, |
66 | 66 | 'tab_slug' => $_sTabSlug, |
67 | 67 | 'input_id' => $this->_getPressedSubmitButtonData( $_aSubmits, 'input_id' ), |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | 'AdminPageFramework_Model__FormSubmission__Validator__Export', |
82 | 82 | 'AdminPageFramework_Model__FormSubmission__Validator__Reset', |
83 | 83 | 'AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm', // 3.7.6+ Moved to after validation from before validation |
84 | - 'AdminPageFramework_Model__FormSubmission__Validator__ContactForm', // 3.7.6+ Moved to after validation from before validation |
|
84 | + 'AdminPageFramework_Model__FormSubmission__Validator__ContactForm', // 3.7.6+ Moved to after validation from before validation |
|
85 | 85 | 'AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm', |
86 | 86 | |
87 | 87 | ); |
88 | - foreach( $_aClassNames as $_sClassName ) { |
|
88 | + foreach ( $_aClassNames as $_sClassName ) { |
|
89 | 89 | new $_sClassName( $this->oFactory ); |
90 | 90 | } |
91 | 91 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | $this->addAndDoActions( |
96 | 96 | $this->oFactory, |
97 | - 'try_validation_before_' . $this->oFactory->oProp->sClassName, |
|
97 | + 'try_validation_before_'.$this->oFactory->oProp->sClassName, |
|
98 | 98 | $aInputs, |
99 | 99 | $aRawInputs, |
100 | 100 | $_aSubmits, |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | $this->addAndDoActions( |
115 | 115 | $this->oFactory, |
116 | - 'try_validation_after_' . $this->oFactory->oProp->sClassName, |
|
116 | + 'try_validation_after_'.$this->oFactory->oProp->sClassName, |
|
117 | 117 | $aInputs, |
118 | 118 | $aRawInputs, |
119 | 119 | $_aSubmits, |
@@ -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' ), |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function _replyToEnableMetaBox() { |
53 | 53 | |
54 | - if ( ! $this->_isMetaBoxAdded() ) { |
|
54 | + if ( !$this->_isMetaBoxAdded() ) { |
|
55 | 55 | return; |
56 | 56 | } |
57 | 57 | |
58 | - $_sCurrentScreenID = $this->getCurrentScreenID(); |
|
58 | + $_sCurrentScreenID = $this->getCurrentScreenID(); |
|
59 | 59 | |
60 | 60 | // Trigger the add_meta_boxes hooks to allow meta boxes to be added. |
61 | 61 | do_action( "add_meta_boxes_{$_sCurrentScreenID}", null ); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | // the network admin adds '-network' in the screen ID and the hooks with that id won't be triggered so use the 'page_hook' global variable. |
86 | 86 | if ( isset( $GLOBALS[ 'page_hook' ] ) ) { |
87 | 87 | add_action( |
88 | - "admin_footer-{$GLOBALS['page_hook']}", |
|
88 | + "admin_footer-{$GLOBALS[ 'page_hook' ]}", |
|
89 | 89 | array( $this, '_replyToAddMetaboxScript' ) |
90 | 90 | ); |
91 | 91 | } |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | $_sPageSlug = $this->getElement( $_GET, 'page', '' ); |
112 | - if ( ! $_sPageSlug ) { |
|
112 | + if ( !$_sPageSlug ) { |
|
113 | 113 | return false; |
114 | 114 | } |
115 | 115 | |
116 | - foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) { |
|
116 | + foreach ( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) { |
|
117 | 117 | if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { |
118 | 118 | return true; |
119 | 119 | } |
@@ -131,10 +131,10 @@ discard block |
||
131 | 131 | */ |
132 | 132 | private function _isPageOfMetaBox( $sPageSlug, $oMetaBox ) { |
133 | 133 | |
134 | - if ( in_array( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) { |
|
134 | + if ( in_array( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) { |
|
135 | 135 | return true; // for numeric keys with a string value. |
136 | 136 | } |
137 | - if ( ! array_key_exists( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) { |
|
137 | + if ( !array_key_exists( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) { |
|
138 | 138 | return false; // for keys of page slugs, the key does not exist, it means not added. |
139 | 139 | } |
140 | 140 |
@@ -109,12 +109,12 @@ |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | $_sPageSlug = $this->getElement( $_GET, 'page', '' ); |
112 | - if ( ! $_sPageSlug ) { |
|
112 | + if ( ! $_sPageSlug ) { |
|
113 | 113 | return false; |
114 | 114 | } |
115 | 115 | |
116 | 116 | foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) { |
117 | - if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { |
|
117 | + if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { |
|
118 | 118 | return true; |
119 | 119 | } |
120 | 120 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | if ( in_array( $oProp->sClassName, self::$aClassNames ) ) |
32 | 32 | return self::$_oInstance; |
33 | 33 | |
34 | - self::$aClassNames[] = $oProp->sClassName; |
|
34 | + self::$aClassNames[ ] = $oProp->sClassName; |
|
35 | 35 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_Page( $oProp, $oMsg ); |
36 | 36 | |
37 | 37 | return self::$_oInstance; |
@@ -27,8 +27,9 @@ |
||
27 | 27 | */ |
28 | 28 | public static function instantiate( $oProp, $oMsg ) { |
29 | 29 | |
30 | - if ( in_array( $oProp->sClassName, self::$aClassNames ) ) |
|
31 | - return self::$_oInstance; |
|
30 | + if ( in_array( $oProp->sClassName, self::$aClassNames ) ) { |
|
31 | + return self::$_oInstance; |
|
32 | + } |
|
32 | 33 | |
33 | 34 | self::$aClassNames[] = $oProp->sClassName; |
34 | 35 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_PostType( $oProp, $oMsg ); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | * @return void |
65 | 65 | * @internal |
66 | 66 | */ |
67 | - protected function _renderPage( $sPageSlug, $sTabSlug=null ) { |
|
67 | + protected function _renderPage( $sPageSlug, $sTabSlug = null ) { |
|
68 | 68 | $_oPageRenderer = new AdminPageFramework_View__PageRenderer( $this, $sPageSlug, $sTabSlug ); |
69 | 69 | $_oPageRenderer->render(); |
70 | 70 | } |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Sets up hooks and properties. |
28 | 28 | */ |
29 | - public function __construct( $oProp, $oMsg=null ) { |
|
29 | + public function __construct( $oProp, $oMsg = null ) { |
|
30 | 30 | |
31 | - if ( ! $this->_isLoadable( $oProp ) ) { |
|
31 | + if ( !$this->_isLoadable( $oProp ) ) { |
|
32 | 32 | return; |
33 | 33 | } |
34 | 34 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | // Add an action link in the plugin listing page |
41 | 41 | if ( 'plugins.php' === $this->oProp->sPageNow && 'plugin' === $this->oProp->aScriptInfo[ 'sType' ] ) { |
42 | 42 | add_filter( |
43 | - 'plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), |
|
43 | + 'plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), |
|
44 | 44 | array( $this, '_replyToAddSettingsLinkInPluginListingPage' ), |
45 | 45 | 20 // set a lower priority so that the link will be embedded at the beginning ( the most left hand side ). |
46 | 46 | ); |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | * @return boolean |
55 | 55 | */ |
56 | 56 | private function _isLoadable( $oProp ) { |
57 | - if ( ! $oProp->bIsAdmin ) { |
|
57 | + if ( !$oProp->bIsAdmin ) { |
|
58 | 58 | return false; |
59 | 59 | } |
60 | 60 | if ( $oProp->bIsAdminAjax ) { |
61 | 61 | return false; |
62 | 62 | } |
63 | - return ! $this->hasBeenCalled( 'links_' . $oProp->sClassName ); |
|
63 | + return !$this->hasBeenCalled( 'links_'.$oProp->sClassName ); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | array( |
124 | 124 | 'href' => $aScriptInfo[ 'sURI' ], |
125 | 125 | 'target' => '_blank', |
126 | - 'title' => $aScriptInfo[ 'sName' ] . $_sVersion . $_sDescription |
|
126 | + 'title' => $aScriptInfo[ 'sName' ].$_sVersion.$_sDescription |
|
127 | 127 | ), |
128 | 128 | $aScriptInfo[ 'sName' ] |
129 | 129 | ) |
@@ -145,13 +145,13 @@ discard block |
||
145 | 145 | $_sAuthorInfo = $this->getAOrB( |
146 | 146 | empty( $aScriptInfo[ 'sAuthor' ] ), |
147 | 147 | $_sAuthorInfo, |
148 | - ' by ' . $_sAuthorInfo |
|
148 | + ' by '.$_sAuthorInfo |
|
149 | 149 | ); |
150 | 150 | |
151 | 151 | // Enclosing the output in a span tag as the outer element is a '<p>' tag. So this cannot be div. |
152 | 152 | // 3.5.7+ Added the class attribute for acceptance testing |
153 | 153 | return "<span class='apf-script-info'>" |
154 | - . $_sPluginInfo . $_sAuthorInfo |
|
154 | + . $_sPluginInfo.$_sAuthorInfo |
|
155 | 155 | . "</span>"; |
156 | 156 | |
157 | 157 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | array( |
183 | 183 | 'href' => $aScriptInfo[ 'sURI' ], |
184 | 184 | 'target' => '_blank', |
185 | - 'title' => $aScriptInfo[ 'sName' ] . $_sVersion . $_sDescription, |
|
185 | + 'title' => $aScriptInfo[ 'sName' ].$_sVersion.$_sDescription, |
|
186 | 186 | ), |
187 | 187 | $aScriptInfo[ 'sName' ] |
188 | 188 | ) |
@@ -192,16 +192,16 @@ discard block |
||
192 | 192 | // 3.5.7+ added the 'apf-credit' class attribute for acceptance testing |
193 | 193 | // 3.7.0+ added the footer-thankyou id attribute. |
194 | 194 | return "<span class='apf-credit' id='footer-thankyou'>" |
195 | - . $this->oMsg->get( 'powered_by' ) . ' ' |
|
195 | + . $this->oMsg->get( 'powered_by' ).' ' |
|
196 | 196 | . $_sLibraryInfo |
197 | 197 | . ", " |
198 | - . $this->oMsg->get( 'and' ) . ' ' |
|
198 | + . $this->oMsg->get( 'and' ).' ' |
|
199 | 199 | . $this->getHTMLTag( |
200 | 200 | 'a', |
201 | 201 | array( |
202 | 202 | 'href' => 'https://wordpress.org', |
203 | 203 | 'target' => '_blank', |
204 | - 'title' => 'WordPress ' . $GLOBALS[ 'wp_version' ] |
|
204 | + 'title' => 'WordPress '.$GLOBALS[ 'wp_version' ] |
|
205 | 205 | ), |
206 | 206 | 'WordPress' |
207 | 207 | ) |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | */ |
218 | 218 | protected function _setFooterHooks() { |
219 | 219 | |
220 | - add_filter( 'admin_footer_text' , array( $this, '_replyToAddInfoInFooterLeft' ) ); |
|
220 | + add_filter( 'admin_footer_text', array( $this, '_replyToAddInfoInFooterLeft' ) ); |
|
221 | 221 | add_filter( 'update_footer', array( $this, '_replyToAddInfoInFooterRight' ), 11 ); |
222 | 222 | |
223 | 223 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | * @callback filter admin_footer_text |
230 | 230 | * @internal |
231 | 231 | */ |
232 | - public function _replyToAddInfoInFooterLeft( $sLinkHTML='' ) { |
|
232 | + public function _replyToAddInfoInFooterLeft( $sLinkHTML = '' ) { |
|
233 | 233 | |
234 | 234 | $sLinkHTML = empty( $this->oProp->aScriptInfo[ 'sName' ] ) |
235 | 235 | ? $sLinkHTML |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | |
238 | 238 | return $this->addAndApplyFilters( |
239 | 239 | $this->oProp->oCaller, |
240 | - 'footer_left_' . $this->oProp->sClassName, |
|
240 | + 'footer_left_'.$this->oProp->sClassName, |
|
241 | 241 | $sLinkHTML |
242 | 242 | ); |
243 | 243 | |
@@ -250,10 +250,10 @@ discard block |
||
250 | 250 | * @callback filter admin_footer_text |
251 | 251 | * @internal |
252 | 252 | */ |
253 | - public function _replyToAddInfoInFooterRight( $sLinkHTML='' ) { |
|
253 | + public function _replyToAddInfoInFooterRight( $sLinkHTML = '' ) { |
|
254 | 254 | return $this->addAndApplyFilters( |
255 | 255 | $this->oProp->oCaller, |
256 | - 'footer_right_' . $this->oProp->sClassName, |
|
256 | + 'footer_right_'.$this->oProp->sClassName, |
|
257 | 257 | $this->oProp->aFooterInfo[ 'sRight' ] |
258 | 258 | ); |
259 | 259 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | * @return boolean |
51 | 51 | */ |
52 | 52 | private function _isLoadable( $oProp ) { |
53 | - if ( ! $oProp->bIsAdmin ) { |
|
53 | + if ( ! $oProp->bIsAdmin ) { |
|
54 | 54 | return false; |
55 | 55 | } |
56 | 56 | if ( $oProp->bIsAdminAjax ) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @since 2.1.0 |
55 | 55 | * @internal |
56 | 56 | */ |
57 | - protected function _setHelpTab( $sID, $sTitle, $aContents, $aSideBarContents=array() ) { |
|
57 | + protected function _setHelpTab( $sID, $sTitle, $aContents, $aSideBarContents = array() ) { |
|
58 | 58 | |
59 | 59 | if ( empty( $aContents ) ) { |
60 | 60 | return; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | ) |
72 | 72 | ); |
73 | 73 | |
74 | - if ( ! empty( $aSideBarContents ) ) { |
|
74 | + if ( !empty( $aSideBarContents ) ) { |
|
75 | 75 | $this->_oScreen->set_help_sidebar( implode( PHP_EOL, $aSideBarContents ) ); |
76 | 76 | } |
77 | 77 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @internal |
84 | 84 | */ |
85 | 85 | protected function _formatHelpDescription( $sHelpDescription ) { |
86 | - return "<div class='contextual-help-description'>" . $sHelpDescription . "</div>"; |
|
86 | + return "<div class='contextual-help-description'>".$sHelpDescription."</div>"; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | |
@@ -106,10 +106,10 @@ discard block |
||
106 | 106 | * @remark This method just adds the given text into the class property. The actual registration will be performed with the <em>replyToRegisterHelpTabTextForMetaBox()</em> method. |
107 | 107 | * @internal |
108 | 108 | */ |
109 | - public function _addHelpText( $sHTMLContent, $sHTMLSidebarContent="" ) { |
|
109 | + public function _addHelpText( $sHTMLContent, $sHTMLSidebarContent = "" ) { |
|
110 | 110 | |
111 | - $this->oProp->aHelpTabText[] = "<div class='contextual-help-description'>" . $sHTMLContent . "</div>"; |
|
112 | - $this->oProp->aHelpTabTextSide[] = "<div class='contextual-help-description'>" . $sHTMLSidebarContent . "</div>"; |
|
111 | + $this->oProp->aHelpTabText[ ] = "<div class='contextual-help-description'>".$sHTMLContent."</div>"; |
|
112 | + $this->oProp->aHelpTabTextSide[ ] = "<div class='contextual-help-description'>".$sHTMLSidebarContent."</div>"; |
|
113 | 113 | |
114 | 114 | } |
115 | 115 | |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | * @remark This method just adds the given text into the class property. The actual registration will be performed with the `replyToRegisterHelpTabTextForMetaBox()` method. |
126 | 126 | * @internal |
127 | 127 | */ |
128 | - public function _addHelpTextForFormFields( $sFieldTitle, $sHelpText, $sHelpTextSidebar="" ) { |
|
128 | + public function _addHelpTextForFormFields( $sFieldTitle, $sHelpText, $sHelpTextSidebar = "" ) { |
|
129 | 129 | $this->_addHelpText( |
130 | - "<span class='contextual-help-tab-title'>" . $sFieldTitle . "</span> - " . PHP_EOL |
|
130 | + "<span class='contextual-help-tab-title'>".$sFieldTitle."</span> - ".PHP_EOL |
|
131 | 131 | . $sHelpText, |
132 | 132 | $sHelpTextSidebar |
133 | 133 | ); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | public function _replyToRegisterHelpTabText() { |
146 | 146 | |
147 | 147 | // Check if the currently loaded page is of meta box page. |
148 | - if ( ! $this->_isInThePage() ) { |
|
148 | + if ( !$this->_isInThePage() ) { |
|
149 | 149 | return false; |
150 | 150 | } |
151 | 151 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected function _setHelpTab( $sID, $sTitle, $aContents, $aSideBarContents=array() ) { |
58 | 58 | |
59 | - if ( empty( $aContents ) ) { |
|
59 | + if ( empty( $aContents ) ) { |
|
60 | 60 | return; |
61 | 61 | } |
62 | 62 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | public function _replyToRegisterHelpTabText() { |
146 | 146 | |
147 | 147 | // Check if the currently loaded page is of meta box page. |
148 | - if ( ! $this->_isInThePage() ) { |
|
148 | + if ( ! $this->_isInThePage() ) { |
|
149 | 149 | return false; |
150 | 150 | } |
151 | 151 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * @return string the input id attribute |
42 | 42 | */ |
43 | 43 | public function _replyToGetSectionName( /* $sSectionName, $aSectionset */ ) { |
44 | - $_aParams = func_get_args() + array( null, null, ); |
|
44 | + $_aParams = func_get_args() + array( null, null,); |
|
45 | 45 | return $_aParams[ 0 ]; |
46 | 46 | } |
47 | 47 | |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | * @since 3.6.0 |
70 | 70 | * @return string |
71 | 71 | */ |
72 | - public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
73 | - $_aParams = func_get_args() + array( null, null, ); |
|
72 | + public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
73 | + $_aParams = func_get_args() + array( null, null,); |
|
74 | 74 | return $_aParams[ 0 ]; |
75 | 75 | } |
76 | 76 | /** |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @return string |
81 | 81 | */ |
82 | 82 | public function _replyToGetFlatFieldName( /* $sFieldName, $aFieldset */ ) { |
83 | - $_aParams = func_get_args() + array( null, null, ); |
|
83 | + $_aParams = func_get_args() + array( null, null,); |
|
84 | 84 | return $_aParams[ 0 ]; |
85 | 85 | } |
86 | 86 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * @return string the flat input name attribute |
103 | 103 | */ |
104 | 104 | public function _replyToGetFlatInputName( /* $sFlatNameAttribute, $aField, $sKey */ ) { |
105 | - $_aParams = func_get_args() + array( null, null, null ); |
|
105 | + $_aParams = func_get_args() + array( null, null, null ); |
|
106 | 106 | return $_aParams[ 0 ]; |
107 | 107 | } |
108 | 108 | |
@@ -144,14 +144,14 @@ discard block |
||
144 | 144 | 'if' => true, |
145 | 145 | 'capability' => '', |
146 | 146 | ); |
147 | - if ( ! $aElementDefinition[ 'if' ] ) { |
|
147 | + if ( !$aElementDefinition[ 'if' ] ) { |
|
148 | 148 | return false; |
149 | 149 | } |
150 | 150 | // For front-end forms that allow guests, the capability level can be empty. In that case, return true. |
151 | - if ( ! $aElementDefinition[ 'capability' ] ) { |
|
151 | + if ( !$aElementDefinition[ 'capability' ] ) { |
|
152 | 152 | return true; |
153 | 153 | } |
154 | - if ( ! current_user_can( $aElementDefinition[ 'capability' ] ) ) { |
|
154 | + if ( !current_user_can( $aElementDefinition[ 'capability' ] ) ) { |
|
155 | 155 | return false; |
156 | 156 | } |
157 | 157 | return $bDefault; |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $this, |
188 | 188 | array( |
189 | 189 | // section_{instantiated class name}_{section id} |
190 | - 'section_head_' . $this->oProp->sClassName . '_' . $aSectionset[ 'section_id' ] |
|
190 | + 'section_head_'.$this->oProp->sClassName.'_'.$aSectionset[ 'section_id' ] |
|
191 | 191 | ), |
192 | 192 | $sSectionDescription |
193 | 193 | ); |
@@ -204,15 +204,15 @@ discard block |
||
204 | 204 | */ |
205 | 205 | public function _replyToGetFieldOutput( $sFieldOutput, $aFieldset ) { |
206 | 206 | |
207 | - $_sSectionPart = $this->oUtil->getAOrB( |
|
207 | + $_sSectionPart = $this->oUtil->getAOrB( |
|
208 | 208 | isset( $aFieldset[ 'section_id' ] ) && '_default' !== $aFieldset[ 'section_id' ], |
209 | - '_' . $aFieldset[ 'section_id' ], |
|
209 | + '_'.$aFieldset[ 'section_id' ], |
|
210 | 210 | '' |
211 | 211 | ); |
212 | 212 | return $this->oUtil->addAndApplyFilters( |
213 | 213 | $this, |
214 | 214 | array( |
215 | - 'field_' . $this->oProp->sClassName . $_sSectionPart . '_' . $aFieldset[ 'field_id' ] |
|
215 | + 'field_'.$this->oProp->sClassName.$_sSectionPart.'_'.$aFieldset[ 'field_id' ] |
|
216 | 216 | ), |
217 | 217 | $sFieldOutput, |
218 | 218 | $aFieldset // the field array |
@@ -74,7 +74,7 @@ |
||
74 | 74 | * @since 3.6.0 |
75 | 75 | * @return string |
76 | 76 | */ |
77 | - public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
77 | + public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
78 | 78 | $_aParams = func_get_args() + array( null, null, ); |
79 | 79 | return $_aParams[ 0 ]; |
80 | 80 | } |