@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | */ |
17 | 17 | class AdminPageFrameworkLoader_Registry_Base { |
18 | 18 | |
19 | - const VERSION = '3.8.32'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
19 | + const VERSION = '3.8.32'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
20 | 20 | const NAME = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing. |
21 | - const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc. |
|
21 | + const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc. |
|
22 | 22 | const DESCRIPTION = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.'; |
23 | 23 | const URI = 'http://admin-page-framework.michaeluno.jp/'; |
24 | 24 | const AUTHOR = 'miunosoft (Michael Uno)'; |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | * @remark This is also accessed from `uninstall.php` so do not remove. |
56 | 56 | * @remark Do not exceed 8 characters as a transient name allows 45 characters or less ( 40 for site transients ) so that md5 (32 characters) can be added. |
57 | 57 | */ |
58 | - const TRANSIENT_PREFIX = 'APFL_'; |
|
58 | + const TRANSIENT_PREFIX = 'APFL_'; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * The hook slug used for the prefix of action and filter hook names. |
62 | 62 | * |
63 | 63 | * @remark The ending underscore is not necessary. |
64 | 64 | */ |
65 | - const HOOK_SLUG = 'admin_page_framework_loader'; |
|
65 | + const HOOK_SLUG = 'admin_page_framework_loader'; |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * The text domain slug and its path. |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | static public $aAdminPages = array( |
118 | 118 | // key => 'page slug' |
119 | - 'about' => 'apfl_about', // the welcome page |
|
119 | + 'about' => 'apfl_about', // the welcome page |
|
120 | 120 | 'addon' => 'apfl_addons', |
121 | 121 | 'tool' => 'apfl_tools', |
122 | 122 | 'help' => 'apfl_contact', |
@@ -154,12 +154,12 @@ discard block |
||
154 | 154 | * @since 3.5.0 |
155 | 155 | * @return string |
156 | 156 | */ |
157 | - public static function getPluginURL( $sRelativePath='' ) { |
|
157 | + public static function getPluginURL( $sRelativePath = '' ) { |
|
158 | 158 | if ( isset( self::$_sPluginURLCache ) ) { |
159 | - return self::$_sPluginURLCache . $sRelativePath; |
|
159 | + return self::$_sPluginURLCache.$sRelativePath; |
|
160 | 160 | } |
161 | 161 | self::$_sPluginURLCache = trailingslashit( plugins_url( '', self::$sFilePath ) ); |
162 | - return self::$_sPluginURLCache . $sRelativePath; |
|
162 | + return self::$_sPluginURLCache.$sRelativePath; |
|
163 | 163 | } |
164 | 164 | /** |
165 | 165 | * @since 3.7.9 |
@@ -189,13 +189,13 @@ discard block |
||
189 | 189 | * @since 3.5.0 |
190 | 190 | * @return void |
191 | 191 | */ |
192 | - static public function setAdminNotice( $sMessage, $sClassAttribute='error' ) { |
|
193 | - if ( ! is_admin() ) { |
|
192 | + static public function setAdminNotice( $sMessage, $sClassAttribute = 'error' ) { |
|
193 | + if ( !is_admin() ) { |
|
194 | 194 | return; |
195 | 195 | } |
196 | - self::$_aAdminNotices[] = array( |
|
196 | + self::$_aAdminNotices[ ] = array( |
|
197 | 197 | 'message' => $sMessage, |
198 | - 'class_attribute' => trim( $sClassAttribute ) . ' notice is-dismissible', |
|
198 | + 'class_attribute' => trim( $sClassAttribute ).' notice is-dismissible', |
|
199 | 199 | ); |
200 | 200 | add_action( 'admin_notices', array( __CLASS__, '_replyToSetAdminNotice' ) ); |
201 | 201 | } |
@@ -205,12 +205,12 @@ discard block |
||
205 | 205 | * @return void |
206 | 206 | */ |
207 | 207 | static public function _replyToSetAdminNotice() { |
208 | - foreach( self::$_aAdminNotices as $_aAdminNotice ) { |
|
209 | - echo "<div class='" . esc_attr( $_aAdminNotice['class_attribute'] ) . " notice is-dismissible'>" |
|
208 | + foreach ( self::$_aAdminNotices as $_aAdminNotice ) { |
|
209 | + echo "<div class='".esc_attr( $_aAdminNotice[ 'class_attribute' ] )." notice is-dismissible'>" |
|
210 | 210 | ."<p>" |
211 | 211 | . sprintf( |
212 | - '<strong>%1$s</strong>: ' . $_aAdminNotice['message'], |
|
213 | - self::NAME . ' ' . self::VERSION |
|
212 | + '<strong>%1$s</strong>: '.$_aAdminNotice[ 'message' ], |
|
213 | + self::NAME.' '.self::VERSION |
|
214 | 214 | ) |
215 | 215 | . "</p>" |
216 | 216 | . "</div>"; |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | AdminPageFrameworkLoader_Registry::setUp( __FILE__ ); |
223 | 223 | |
224 | 224 | // Initial checks. - Do no load if accessed directly, not exiting because the 'uninstall.php' and inclusion list generator will load this file. |
225 | -if ( ! defined( 'ABSPATH' ) ) { |
|
225 | +if ( !defined( 'ABSPATH' ) ) { |
|
226 | 226 | return; |
227 | 227 | } |
228 | 228 | if ( defined( 'DOING_UNINSTALL' ) && DOING_UNINSTALL ) { |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | |
235 | 235 | $_bFrameworkLoaded = class_exists( 'AdminPageFramework_Registry', false ); |
236 | 236 | if ( |
237 | - ! $_bFrameworkLoaded |
|
238 | - || ! defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility |
|
237 | + !$_bFrameworkLoaded |
|
238 | + || !defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility |
|
239 | 239 | || version_compare( AdminPageFramework_Registry::VERSION, AdminPageFrameworkLoader_Registry::VERSION, '<' ) |
240 | 240 | ) { |
241 | 241 | AdminPageFrameworkLoader_Registry::setAdminNotice( |
@@ -253,18 +253,18 @@ discard block |
||
253 | 253 | add_action( 'admin_init', 'AdminPageFrameworkLoader_Warning' ); |
254 | 254 | |
255 | 255 | // Include the library file - the development version will be available if you cloned the GitHub repository. |
256 | -$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/development/admin-page-framework.php'; |
|
256 | +$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/development/admin-page-framework.php'; |
|
257 | 257 | $_bDebugMode = defined( 'WP_DEBUG' ) && WP_DEBUG; |
258 | 258 | $_bLoadDevelopmentVersion = $_bDebugMode && file_exists( $_sDevelopmentVersionPath ); |
259 | 259 | include( |
260 | 260 | $_bLoadDevelopmentVersion |
261 | 261 | ? $_sDevelopmentVersionPath |
262 | - : AdminPageFrameworkLoader_Registry::$sDirPath . '/library/apf/admin-page-framework.php' |
|
262 | + : AdminPageFrameworkLoader_Registry::$sDirPath.'/library/apf/admin-page-framework.php' |
|
263 | 263 | ); |
264 | 264 | |
265 | 265 | // Include the framework loader plugin components. |
266 | 266 | include( AdminPageFramework_Registry::$aClassFiles[ 'AdminPageFramework_PluginBootstrap' ] ); |
267 | -include( AdminPageFrameworkLoader_Registry::$sDirPath . '/include/class/AdminPageFrameworkLoader_Bootstrap.php' ); |
|
267 | +include( AdminPageFrameworkLoader_Registry::$sDirPath.'/include/class/AdminPageFrameworkLoader_Bootstrap.php' ); |
|
268 | 268 | new AdminPageFrameworkLoader_Bootstrap( |
269 | 269 | AdminPageFrameworkLoader_Registry::$sFilePath, |
270 | 270 | AdminPageFrameworkLoader_Registry::HOOK_SLUG // hook prefix |
@@ -111,18 +111,18 @@ discard block |
||
111 | 111 | */ |
112 | 112 | private function _setHooks( $aScreenIDs ) { |
113 | 113 | |
114 | - foreach( $aScreenIDs as $_sScreenID ) { |
|
115 | - if ( ! $_sScreenID ) { |
|
114 | + foreach ( $aScreenIDs as $_sScreenID ) { |
|
115 | + if ( !$_sScreenID ) { |
|
116 | 116 | continue; |
117 | 117 | } |
118 | 118 | add_filter( |
119 | - get_class( $this ) . '-' . $_sScreenID, |
|
119 | + get_class( $this ).'-'.$_sScreenID, |
|
120 | 120 | array( $this, '_replyToSetPointer' ) |
121 | 121 | ); |
122 | 122 | |
123 | 123 | } |
124 | 124 | |
125 | - if ( ! $this->_hasBeenCalled() ) { |
|
125 | + if ( !$this->_hasBeenCalled() ) { |
|
126 | 126 | return; |
127 | 127 | } |
128 | 128 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | |
170 | 170 | $_aPointers = $this->_getValidPointers( $this->_getPointers() ); |
171 | 171 | |
172 | - if ( empty( $_aPointers ) || ! is_array( $_aPointers ) ) { |
|
172 | + if ( empty( $_aPointers ) || !is_array( $_aPointers ) ) { |
|
173 | 173 | return; |
174 | 174 | } |
175 | 175 | |
@@ -189,10 +189,10 @@ discard block |
||
189 | 189 | $_oScreen = get_current_screen(); |
190 | 190 | $_sScreenID = $_oScreen->id; |
191 | 191 | if ( in_array( $_sScreenID, $this->aScreenIDs ) ) { |
192 | - return apply_filters( get_class( $this ) . '-' . $_sScreenID, array() ); |
|
192 | + return apply_filters( get_class( $this ).'-'.$_sScreenID, array() ); |
|
193 | 193 | } |
194 | 194 | if ( isset( $_GET[ 'page' ] ) ) { // sanitization unnecessary |
195 | - return apply_filters( get_class( $this ) . '-' . $this->getHTTPQueryGET( 'page' ), array() ); |
|
195 | + return apply_filters( get_class( $this ).'-'.$this->getHTTPQueryGET( 'page' ), array() ); |
|
196 | 196 | } |
197 | 197 | return array(); |
198 | 198 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | private function _getValidPointers( $_aPointers ) { |
207 | 207 | |
208 | 208 | // Get dismissed pointers |
209 | - $_aDismissed = explode( |
|
209 | + $_aDismissed = explode( |
|
210 | 210 | ',', |
211 | 211 | ( string ) get_user_meta( |
212 | 212 | get_current_user_id(), |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $_aPointer[ 'pointer_id' ] = $_iPointerID; |
235 | 235 | |
236 | 236 | // Add the pointer to $_aValidPointers array |
237 | - $_aValidPointers[] = $_aPointer; |
|
237 | + $_aValidPointers[ ] = $_aPointer; |
|
238 | 238 | |
239 | 239 | } |
240 | 240 | return $_aValidPointers; |
@@ -310,9 +310,9 @@ discard block |
||
310 | 310 | * @return string |
311 | 311 | * @internal |
312 | 312 | */ |
313 | - public function _getInternalScript( $aPointers=array() ) { |
|
313 | + public function _getInternalScript( $aPointers = array() ) { |
|
314 | 314 | |
315 | - $_aJSArray = json_encode( $aPointers ); |
|
315 | + $_aJSArray = json_encode( $aPointers ); |
|
316 | 316 | |
317 | 317 | /** |
318 | 318 | * Checks check-boxes in siblings. |
@@ -191,7 +191,8 @@ |
||
191 | 191 | if ( in_array( $_sScreenID, $this->aScreenIDs ) ) { |
192 | 192 | return apply_filters( get_class( $this ) . '-' . $_sScreenID, array() ); |
193 | 193 | } |
194 | - if ( isset( $_GET[ 'page' ] ) ) { // sanitization unnecessary |
|
194 | + if ( isset( $_GET[ 'page' ] ) ) { |
|
195 | +// sanitization unnecessary |
|
195 | 196 | return apply_filters( get_class( $this ) . '-' . $this->getHTTPQueryGET( 'page' ), array() ); |
196 | 197 | } |
197 | 198 | return array(); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | if ( $sTaxonomy ) { |
83 | 83 | $aColumns = $this->oUtil->addAndApplyFilter( |
84 | 84 | $this, |
85 | - $sFilterPrefix . $this->oUtil->getHTTPQueryGET( 'taxonomy', '' ), |
|
85 | + $sFilterPrefix.$this->oUtil->getHTTPQueryGET( 'taxonomy', '' ), |
|
86 | 86 | $aColumns |
87 | 87 | ); |
88 | 88 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * @param string|null $sOptionKey |
122 | 122 | * @internal |
123 | 123 | */ |
124 | - protected function _setOptionArray( $iTermID=null, $sOptionKey=null ) { |
|
124 | + protected function _setOptionArray( $iTermID = null, $sOptionKey = null ) { |
|
125 | 125 | $this->oForm->aSavedData = $this->_getSavedFormData( $iTermID, $sOptionKey ); |
126 | 126 | } |
127 | 127 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | return $this->oUtil->addAndApplyFilter( |
136 | 136 | $this, // the caller factory object |
137 | - 'options_' . $this->oProp->sClassName, |
|
137 | + 'options_'.$this->oProp->sClassName, |
|
138 | 138 | $this->_getSavedTermFormData( $iTermID, $sOptionKey ) |
139 | 139 | // @todo maybe pass the term id because the user will not know whihch form data it is |
140 | 140 | ); |
@@ -168,16 +168,16 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function _replyToValidateOptions( $iTermID ) { |
170 | 170 | |
171 | - if ( ! $this->_shouldProceedValidation() ) { |
|
171 | + if ( !$this->_shouldProceedValidation() ) { |
|
172 | 172 | return; |
173 | 173 | } |
174 | 174 | |
175 | 175 | $_aTaxonomyFormData = $this->_getSavedTaxonomyFormData( $this->oProp->sOptionKey ); |
176 | 176 | $_aSavedFormData = $this->_getSavedTermFormData( $iTermID, $this->oProp->sOptionKey ); |
177 | - $_aSubmittedFormData = $this->oForm->getSubmittedData( $this->oForm->getHTTPRequestSanitized( $_POST ) ); // sanitization done |
|
177 | + $_aSubmittedFormData = $this->oForm->getSubmittedData( $this->oForm->getHTTPRequestSanitized( $_POST ) ); // sanitization done |
|
178 | 178 | $_aSubmittedFormData = $this->oUtil->addAndApplyFilters( |
179 | 179 | $this, |
180 | - 'validation_' . $this->oProp->sClassName, |
|
180 | + 'validation_'.$this->oProp->sClassName, |
|
181 | 181 | call_user_func_array( |
182 | 182 | array( $this, 'validate' ), // triggers __call() |
183 | 183 | array( $_aSubmittedFormData, $_aSavedFormData, $this ) |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | // @todo Examine whether it is appropriate to merge recursivly |
190 | 190 | // as some fields will have a problem such as select with multiple options. |
191 | - $_aTaxonomyFormData[ $iTermID ] = $this->oUtil->uniteArrays( |
|
191 | + $_aTaxonomyFormData[ $iTermID ] = $this->oUtil->uniteArrays( |
|
192 | 192 | $_aSubmittedFormData, |
193 | 193 | $_aSavedFormData |
194 | 194 | ); |
@@ -210,10 +210,10 @@ discard block |
||
210 | 210 | */ |
211 | 211 | protected function _shouldProceedValidation() { |
212 | 212 | |
213 | - if ( ! isset( $_POST[ $this->oProp->sClassHash ] ) ) { // sanitization unnecessary |
|
213 | + if ( !isset( $_POST[ $this->oProp->sClassHash ] ) ) { // sanitization unnecessary |
|
214 | 214 | return false; |
215 | 215 | } |
216 | - if ( ! wp_verify_nonce( $_POST[ $this->oProp->sClassHash ], $this->oProp->sClassHash ) ) { // sanitization unnecessary |
|
216 | + if ( !wp_verify_nonce( $_POST[ $this->oProp->sClassHash ], $this->oProp->sClassHash ) ) { // sanitization unnecessary |
|
217 | 217 | return false; |
218 | 218 | } |
219 | 219 | return true; |
@@ -210,10 +210,12 @@ |
||
210 | 210 | */ |
211 | 211 | protected function _shouldProceedValidation() { |
212 | 212 | |
213 | - if ( ! isset( $_POST[ $this->oProp->sClassHash ] ) ) { // sanitization unnecessary |
|
213 | + if ( ! isset( $_POST[ $this->oProp->sClassHash ] ) ) { |
|
214 | +// sanitization unnecessary |
|
214 | 215 | return false; |
215 | 216 | } |
216 | - if ( ! wp_verify_nonce( $_POST[ $this->oProp->sClassHash ], $this->oProp->sClassHash ) ) { // sanitization unnecessary |
|
217 | + if ( ! wp_verify_nonce( $_POST[ $this->oProp->sClassHash ], $this->oProp->sClassHash ) ) { |
|
218 | +// sanitization unnecessary |
|
217 | 219 | return false; |
218 | 220 | } |
219 | 221 | return true; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | '', |
48 | 48 | "[{$_sKey}]" |
49 | 49 | ); |
50 | - return $_aField['field_id'] . $_sKey; |
|
50 | + return $_aField[ 'field_id' ].$_sKey; |
|
51 | 51 | |
52 | 52 | } |
53 | 53 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | '', |
66 | 66 | "|{$_sKey}" |
67 | 67 | ); |
68 | - return "{$_aField['field_id']}{$_sKey}"; |
|
68 | + return "{$_aField[ 'field_id' ]}{$_sKey}"; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $_aOutput = array(); |
116 | 116 | |
117 | 117 | // Set nonce. |
118 | - $_aOutput[] = wp_nonce_field( |
|
118 | + $_aOutput[ ] = wp_nonce_field( |
|
119 | 119 | $this->oProp->sClassHash, |
120 | 120 | $this->oProp->sClassHash, |
121 | 121 | true, |
@@ -126,17 +126,17 @@ discard block |
||
126 | 126 | $this->_setOptionArray( $iTermID, $this->oProp->sOptionKey ); |
127 | 127 | |
128 | 128 | // Get the field outputs |
129 | - $_aOutput[] = $this->oForm->get( $bRenderTableRow ); |
|
129 | + $_aOutput[ ] = $this->oForm->get( $bRenderTableRow ); |
|
130 | 130 | |
131 | 131 | // Filter the output |
132 | 132 | $_sOutput = $this->oUtil->addAndApplyFilters( |
133 | 133 | $this, |
134 | - 'content_' . $this->oProp->sClassName, |
|
134 | + 'content_'.$this->oProp->sClassName, |
|
135 | 135 | $this->content( implode( PHP_EOL, $_aOutput ) ) |
136 | 136 | ); |
137 | 137 | |
138 | 138 | // Do action |
139 | - $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this ); |
|
139 | + $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this ); |
|
140 | 140 | |
141 | 141 | return $_sOutput; |
142 | 142 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | parent::__construct( $oProp ); |
28 | 28 | |
29 | - if ( ! $this->oProp->bIsAdmin ) { |
|
29 | + if ( !$this->oProp->bIsAdmin ) { |
|
30 | 30 | return; |
31 | 31 | } |
32 | 32 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | ); |
38 | 38 | |
39 | 39 | add_action( |
40 | - 'set_up_' . $this->oProp->sClassName, |
|
40 | + 'set_up_'.$this->oProp->sClassName, |
|
41 | 41 | array( $this, '_replyToSetUpHooks' ) |
42 | 42 | ); |
43 | 43 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function _isInThePage() { |
56 | 56 | |
57 | - if ( ! $this->oProp->bIsAdmin ) { |
|
57 | + if ( !$this->oProp->bIsAdmin ) { |
|
58 | 58 | return false; |
59 | 59 | } |
60 | 60 | |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | return $this->_isValidAjaxReferrer(); |
63 | 63 | } |
64 | 64 | |
65 | - if ( ! in_array( $this->oProp->sPageNow, array( 'edit-tags.php', 'term.php' ) ) ) { |
|
65 | + if ( !in_array( $this->oProp->sPageNow, array( 'edit-tags.php', 'term.php' ) ) ) { |
|
66 | 66 | return false; |
67 | 67 | } |
68 | 68 | |
69 | - if ( isset( $_GET[ 'taxonomy' ] ) && ! in_array( $_GET[ 'taxonomy' ], $this->oProp->aTaxonomySlugs ) ) { // sanitization unnecessary |
|
69 | + if ( isset( $_GET[ 'taxonomy' ] ) && !in_array( $_GET[ 'taxonomy' ], $this->oProp->aTaxonomySlugs ) ) { // sanitization unnecessary |
|
70 | 70 | return false; |
71 | 71 | } |
72 | 72 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | parse_str( $_aReferrer[ 'query' ], $_aQuery ); |
87 | 87 | |
88 | 88 | $_sBaseName = basename( $_aReferrer[ 'path' ] ); |
89 | - if ( ! in_array( $_sBaseName, array( 'edit-tags.php', 'term.php' ) ) ) { |
|
89 | + if ( !in_array( $_sBaseName, array( 'edit-tags.php', 'term.php' ) ) ) { |
|
90 | 90 | return false; |
91 | 91 | } |
92 | 92 | $_sTaxonomy = $this->oUtil->getElement( $this->oProp->aQuery, array( 'taxonomy' ), '' ); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function _replyToSetUpHooks( $oFactory ) { |
105 | 105 | |
106 | - foreach( $this->oProp->aTaxonomySlugs as $_sTaxonomySlug ) { |
|
106 | + foreach ( $this->oProp->aTaxonomySlugs as $_sTaxonomySlug ) { |
|
107 | 107 | |
108 | 108 | // Validation callbacks need to be set regardless of whether the current page is edit-tags.php or not. |
109 | 109 | add_action( "created_{$_sTaxonomySlug}", array( $this, '_replyToValidateOptions' ), 10, 2 ); |
@@ -66,7 +66,8 @@ |
||
66 | 66 | return false; |
67 | 67 | } |
68 | 68 | |
69 | - if ( isset( $_GET[ 'taxonomy' ] ) && ! in_array( $_GET[ 'taxonomy' ], $this->oProp->aTaxonomySlugs ) ) { // sanitization unnecessary |
|
69 | + if ( isset( $_GET[ 'taxonomy' ] ) && ! in_array( $_GET[ 'taxonomy' ], $this->oProp->aTaxonomySlugs ) ) { |
|
70 | +// sanitization unnecessary |
|
70 | 71 | return false; |
71 | 72 | } |
72 | 73 |
@@ -145,7 +145,7 @@ |
||
145 | 145 | * @since 3.5.3 |
146 | 146 | * @return string The found page slug. An empty string if not found. |
147 | 147 | * @remark Do not return `null` when not found as some framework methods check the retuened value with `isset()` and if null is given, `isset()` yields `false` while it does `true` for an emtpy string (''). |
148 | - */ |
|
148 | + */ |
|
149 | 149 | public function getCurrentPageSlug() { |
150 | 150 | return $this->getHTTPQueryGET( 'page', '' ); |
151 | 151 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | /** |
57 | 57 | * Sets up hooks and properties. |
58 | 58 | */ |
59 | - public function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) { |
|
59 | + public function __construct( $oCaller, $sClassName, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework', $sStructureType = 'page_meta_box' ) { |
|
60 | 60 | |
61 | 61 | // Let them overload. |
62 | 62 | unset( |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | public function _getScreenIDOfPage( $sPageSlug ) { |
106 | 106 | $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ); |
107 | 107 | return $_oAdminPage |
108 | - ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ] . ( is_network_admin() ? '-network' : '' ) |
|
108 | + ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ].( is_network_admin() ? '-network' : '' ) |
|
109 | 109 | : ''; |
110 | 110 | } |
111 | 111 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @since 3.0.0 |
116 | 116 | * @return boolean Returns true if it is of framework's added page; otherwise, false. |
117 | 117 | */ |
118 | - public function isPageAdded( $sPageSlug='' ) { |
|
118 | + public function isPageAdded( $sPageSlug = '' ) { |
|
119 | 119 | $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ); |
120 | 120 | return $_oAdminPage |
121 | 121 | ? $_oAdminPage->oProp->isPageAdded( $sPageSlug ) |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | public function isCurrentTab( $sTabSlug ) { |
133 | 133 | |
134 | 134 | $_sCurrentPageSlug = $this->getHTTPQueryGET( 'page' ); |
135 | - if ( ! $_sCurrentPageSlug ) { |
|
135 | + if ( !$_sCurrentPageSlug ) { |
|
136 | 136 | return false; |
137 | 137 | } |
138 | 138 | $_sCurrentTabSlug = $this->getHTTPQueryGET( 'tab', $this->getDefaultInPageTab( $_sCurrentPageSlug ) ); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function getDefaultInPageTab( $sPageSlug ) { |
181 | 181 | |
182 | - if ( ! $sPageSlug ) { |
|
182 | + if ( !$sPageSlug ) { |
|
183 | 183 | return ''; |
184 | 184 | } |
185 | 185 | return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) ) |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function getOptionKey( $sPageSlug ) { |
196 | 196 | |
197 | - if ( ! $sPageSlug ) { |
|
197 | + if ( !$sPageSlug ) { |
|
198 | 198 | return ''; |
199 | 199 | } |
200 | 200 | return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) ) |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $GLOBALS, |
222 | 222 | array( 'aAdminPageFramework', 'aPageClasses' ) |
223 | 223 | ); |
224 | - foreach( $_aPageClasses as $_oAdminPage ) { |
|
224 | + foreach ( $_aPageClasses as $_oAdminPage ) { |
|
225 | 225 | if ( $_oAdminPage->oProp->isPageAdded( $sPageSlug ) ) { |
226 | 226 | return $_oAdminPage; |
227 | 227 | } |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | public function _replyToSetUpValidationHooks( $oScreen ) { |
46 | 46 | |
47 | 47 | // Validation hooks |
48 | - foreach( $this->oProp->aPageSlugs as $_sIndexOrPageSlug => $_asTabArrayOrPageSlug ) { |
|
48 | + foreach ( $this->oProp->aPageSlugs as $_sIndexOrPageSlug => $_asTabArrayOrPageSlug ) { |
|
49 | 49 | |
50 | 50 | if ( is_scalar( $_asTabArrayOrPageSlug ) ) { |
51 | 51 | $_sPageSlug = $_asTabArrayOrPageSlug; |
52 | - add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 ); // 3.4.1+ |
|
52 | + add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 ); // 3.4.1+ |
|
53 | 53 | add_filter( "validation_{$_sPageSlug}", array( $this, '_replyToValidateOptions' ), 10, 4 ); |
54 | 54 | add_filter( "options_update_status_{$_sPageSlug}", array( $this, '_replyToModifyOptionsUpdateStatus' ) ); |
55 | 55 | continue; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | // At this point, the array key is the page slug. It means the user specified the tab(s). |
59 | 59 | $_sPageSlug = $_sIndexOrPageSlug; |
60 | 60 | $_aTabs = $_asTabArrayOrPageSlug; |
61 | - foreach( $_aTabs as $_sTabSlug ) { |
|
61 | + foreach ( $_aTabs as $_sTabSlug ) { |
|
62 | 62 | add_filter( "validation_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToValidateOptions' ), 10, 4 ); |
63 | 63 | add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 ); // 3.4.1+ |
64 | 64 | add_filter( "options_update_status_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToModifyOptionsUpdateStatus' ) ); |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | * @return void |
79 | 79 | * @callback action add_meta_boxes |
80 | 80 | */ |
81 | - public function _replyToRegisterMetaBoxes( $sPageHook='' ) { |
|
82 | - foreach( $this->oProp->aPageSlugs as $_sKey => $_asPage ) { |
|
83 | - if ( is_string( $_asPage ) ) { |
|
81 | + public function _replyToRegisterMetaBoxes( $sPageHook = '' ) { |
|
82 | + foreach ( $this->oProp->aPageSlugs as $_sKey => $_asPage ) { |
|
83 | + if ( is_string( $_asPage ) ) { |
|
84 | 84 | $this->_registerMetaBox( $_asPage ); |
85 | 85 | continue; |
86 | 86 | } |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | * @return void |
97 | 97 | */ |
98 | 98 | private function _registerMetaBoxes( $sPageSlug, $asPage ) { |
99 | - foreach( $this->oUtil->getAsArray( $asPage ) as $_sTabSlug ) { |
|
100 | - if ( ! $this->oProp->isCurrentTab( $_sTabSlug ) ) { |
|
99 | + foreach ( $this->oUtil->getAsArray( $asPage ) as $_sTabSlug ) { |
|
100 | + if ( !$this->oProp->isCurrentTab( $_sTabSlug ) ) { |
|
101 | 101 | continue; |
102 | 102 | } |
103 | 103 | $this->_registerMetaBox( $sPageSlug ); |
@@ -114,12 +114,12 @@ discard block |
||
114 | 114 | */ |
115 | 115 | private function _registerMetaBox( $sPageSlug ) { |
116 | 116 | add_meta_box( |
117 | - $this->oProp->sMetaBoxID, // id |
|
118 | - $this->oProp->sTitle, // title |
|
117 | + $this->oProp->sMetaBoxID, // id |
|
118 | + $this->oProp->sTitle, // title |
|
119 | 119 | array( $this, '_replyToPrintMetaBoxContents' ), // callback |
120 | 120 | $this->oProp->_getScreenIDOfPage( $sPageSlug ), // screen ID |
121 | - $this->oProp->sContext, // context |
|
122 | - $this->oProp->sPriority, // priority |
|
121 | + $this->oProp->sContext, // context |
|
122 | + $this->oProp->sPriority, // priority |
|
123 | 123 | null // argument (deprecated) |
124 | 124 | ); |
125 | 125 | } |
@@ -165,19 +165,19 @@ discard block |
||
165 | 165 | */ |
166 | 166 | public function _replyToValidateOptions( $aNewPageOptions, $aOldPageOptions, $oAdminPage, $aSubmitInfo ) { |
167 | 167 | |
168 | - $_aNewMetaBoxInputs = $this->oForm->getSubmittedData( $this->oForm->getHTTPRequestSanitized( $_POST ) ); // sanitization done |
|
168 | + $_aNewMetaBoxInputs = $this->oForm->getSubmittedData( $this->oForm->getHTTPRequestSanitized( $_POST ) ); // sanitization done |
|
169 | 169 | $_aOldMetaBoxInputs = $this->oUtil->castArrayContents( |
170 | - $this->oForm->getDataStructureFromAddedFieldsets(), // model |
|
170 | + $this->oForm->getDataStructureFromAddedFieldsets(), // model |
|
171 | 171 | $aOldPageOptions // data source |
172 | 172 | ); |
173 | 173 | |
174 | 174 | // Apply filters - third party scripts will have access to the input. |
175 | 175 | $_aNewMetaBoxInputsRaw = $_aNewMetaBoxInputs; // copy one for validation errors. |
176 | 176 | $_aNewMetaBoxInputs = call_user_func_array( |
177 | - array( $this, 'validate' ), // triggers __call() |
|
177 | + array( $this, 'validate' ), // triggers __call() |
|
178 | 178 | array( $_aNewMetaBoxInputs, $_aOldMetaBoxInputs, $this, $aSubmitInfo ) |
179 | 179 | ); // 3.5.3+ |
180 | - $_aNewMetaBoxInputs = $this->oUtil->addAndApplyFilters( |
|
180 | + $_aNewMetaBoxInputs = $this->oUtil->addAndApplyFilters( |
|
181 | 181 | $this, |
182 | 182 | "validation_{$this->oProp->sClassName}", |
183 | 183 | $_aNewMetaBoxInputs, |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | */ |
216 | 216 | public function _replyToModifyOptionsUpdateStatus( $aStatus ) { |
217 | 217 | |
218 | - if ( ! $this->hasFieldError() ) { |
|
218 | + if ( !$this->hasFieldError() ) { |
|
219 | 219 | return $aStatus; |
220 | 220 | } |
221 | 221 | return array( |
@@ -245,12 +245,12 @@ discard block |
||
245 | 245 | |
246 | 246 | $_aPageOptions = $this->oUtil->addAndApplyFilter( |
247 | 247 | $this, // the caller factory object |
248 | - 'options_' . $this->oProp->sClassName, |
|
248 | + 'options_'.$this->oProp->sClassName, |
|
249 | 249 | $_aPageOptions |
250 | 250 | ); |
251 | 251 | |
252 | 252 | return $this->oUtil->castArrayContents( |
253 | - $this->oForm->getDataStructureFromAddedFieldsets(), // model |
|
253 | + $this->oForm->getDataStructureFromAddedFieldsets(), // model |
|
254 | 254 | $_aPageOptions // data source |
255 | 255 | ); |
256 | 256 | |
@@ -267,9 +267,9 @@ discard block |
||
267 | 267 | private function _getPageMetaBoxOptionsFromPageOptions( array $aPageOptions, array $aFieldsets ) { |
268 | 268 | |
269 | 269 | $_aOptions = array(); |
270 | - foreach( $aFieldsets as $_sSectionID => $_aFieldsets ) { |
|
271 | - if ( '_default' === $_sSectionID ) { |
|
272 | - foreach( $_aFieldsets as $_aField ) { |
|
270 | + foreach ( $aFieldsets as $_sSectionID => $_aFieldsets ) { |
|
271 | + if ( '_default' === $_sSectionID ) { |
|
272 | + foreach ( $_aFieldsets as $_aField ) { |
|
273 | 273 | if ( array_key_exists( $_aField[ 'field_id' ], $aPageOptions ) ) { |
274 | 274 | $_aOptions[ $_aField[ 'field_id' ] ] = $aPageOptions[ $_aField[ 'field_id' ] ]; |
275 | 275 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | if ( $this->oProp->bIsAdmin ) { |
39 | 39 | |
40 | - add_action( 'load_' . $this->oProp->sPostType, array( $this, '_replyToSetUpHooksForModel' ) ); |
|
40 | + add_action( 'load_'.$this->oProp->sPostType, array( $this, '_replyToSetUpHooksForModel' ) ); |
|
41 | 41 | |
42 | 42 | if ( $this->oProp->sCallerPath ) { |
43 | 43 | new AdminPageFramework_PostType_Model__FlushRewriteRules( $this ); |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | |
65 | 65 | // Properties - sets translatable labels. |
66 | 66 | $this->oProp->aColumnHeaders = array( |
67 | - 'cb' => '<input type="checkbox" />', // Checkbox for bulk actions. |
|
68 | - 'title' => $this->oMsg->get( 'title' ), // Post title. Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from `$_REQUEST`['mode']) is 'excerpt', a post excerpt is included between the title and links. |
|
69 | - 'author' => $this->oMsg->get( 'author' ), // Post author. |
|
67 | + 'cb' => '<input type="checkbox" />', // Checkbox for bulk actions. |
|
68 | + 'title' => $this->oMsg->get( 'title' ), // Post title. Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from `$_REQUEST`['mode']) is 'excerpt', a post excerpt is included between the title and links. |
|
69 | + 'author' => $this->oMsg->get( 'author' ), // Post author. |
|
70 | 70 | 'comments' => '<div class="comment-grey-bubble"></div>', // Number of pending comments. |
71 | - 'date' => $this->oMsg->get( 'date' ), // The date and publish status of the post. |
|
71 | + 'date' => $this->oMsg->get( 'date' ), // The date and publish status of the post. |
|
72 | 72 | ); |
73 | 73 | |
74 | 74 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | echo $this->oUtil->addAndApplyFilter( |
131 | 131 | $this, |
132 | 132 | "cell_{$this->oProp->sPostType}_{$sColumnKey}", |
133 | - '', // value to be filtered - cell output |
|
133 | + '', // value to be filtered - cell output |
|
134 | 134 | $iPostID |
135 | 135 | ); |
136 | 136 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * @internal |
180 | 180 | */ |
181 | 181 | public function _replyToRegisterTaxonomies() { |
182 | - foreach( $this->oProp->aTaxonomies as $_sTaxonomySlug => $_aArguments ) { |
|
182 | + foreach ( $this->oProp->aTaxonomies as $_sTaxonomySlug => $_aArguments ) { |
|
183 | 183 | $this->_registerTaxonomy( |
184 | 184 | $_sTaxonomySlug, |
185 | 185 | $this->oUtil->getAsArray( $this->oProp->aTaxonomyObjectTypes[ $_sTaxonomySlug ] ), // object types |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | */ |
196 | 196 | public function _registerTaxonomy( $sTaxonomySlug, array $aObjectTypes, array $aArguments ) { |
197 | 197 | |
198 | - if ( ! in_array( $this->oProp->sPostType, $aObjectTypes ) ) { |
|
199 | - $aObjectTypes[] = $this->oProp->sPostType; |
|
198 | + if ( !in_array( $this->oProp->sPostType, $aObjectTypes ) ) { |
|
199 | + $aObjectTypes[ ] = $this->oProp->sPostType; |
|
200 | 200 | } |
201 | 201 | register_taxonomy( |
202 | 202 | $sTaxonomySlug, |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | */ |
235 | 235 | public function _replyToRemoveTexonomySubmenuPages() { |
236 | 236 | |
237 | - foreach( $this->oProp->aTaxonomyRemoveSubmenuPages as $sSubmenuPageSlug => $sTopLevelPageSlug ) { |
|
237 | + foreach ( $this->oProp->aTaxonomyRemoveSubmenuPages as $sSubmenuPageSlug => $sTopLevelPageSlug ) { |
|
238 | 238 | |
239 | 239 | remove_submenu_page( $sTopLevelPageSlug, $sSubmenuPageSlug ); |
240 | 240 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | if ( $this->oProp->bIsAdmin ) { |
33 | 33 | |
34 | - add_action( 'load_' . $this->oProp->sPostType, array( $this, '_replyToSetUpHooksForView' ) ); |
|
34 | + add_action( 'load_'.$this->oProp->sPostType, array( $this, '_replyToSetUpHooksForView' ) ); |
|
35 | 35 | |
36 | 36 | // 3.5.10+ |
37 | 37 | add_action( 'admin_menu', array( $this, '_replyToRemoveAddNewSidebarMenu' ) ); |
@@ -105,19 +105,19 @@ discard block |
||
105 | 105 | private function _removeAddNewSidebarSubMenu( $sMenuKey, $sPostTypeSlug ) { |
106 | 106 | |
107 | 107 | // Remove the default post type menu item. |
108 | - if ( ! isset( $GLOBALS[ 'submenu' ][ $sMenuKey ] ) ) { |
|
108 | + if ( !isset( $GLOBALS[ 'submenu' ][ $sMenuKey ] ) ) { |
|
109 | 109 | // logged-in users of an insufficient access level don't have the menu to be registered. |
110 | 110 | return; |
111 | 111 | } |
112 | 112 | |
113 | 113 | foreach ( $GLOBALS[ 'submenu' ][ $sMenuKey ] as $_iIndex => $_aSubMenu ) { |
114 | 114 | |
115 | - if ( ! isset( $_aSubMenu[ 2 ] ) ) { |
|
115 | + if ( !isset( $_aSubMenu[ 2 ] ) ) { |
|
116 | 116 | continue; |
117 | 117 | } |
118 | 118 | |
119 | 119 | // Remove the default Add New entry. |
120 | - if ( 'post-new.php?post_type=' . $sPostTypeSlug === $_aSubMenu[ 2 ] ) { |
|
120 | + if ( 'post-new.php?post_type='.$sPostTypeSlug === $_aSubMenu[ 2 ] ) { |
|
121 | 121 | unset( $GLOBALS[ 'submenu' ][ $sMenuKey ][ $_iIndex ] ); |
122 | 122 | break; |
123 | 123 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function _replyToModifyActionLinks( $aActionLinks, $oPost ) { |
136 | 136 | |
137 | - if ( $oPost->post_type !== $this->oProp->sPostType ){ |
|
137 | + if ( $oPost->post_type !== $this->oProp->sPostType ) { |
|
138 | 138 | return $aActionLinks; |
139 | 139 | } |
140 | 140 | |
@@ -156,12 +156,12 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function _replyToAddAuthorTableFilter() { |
158 | 158 | |
159 | - if ( ! $this->oProp->bEnableAuthorTableFileter ) { |
|
159 | + if ( !$this->oProp->bEnableAuthorTableFileter ) { |
|
160 | 160 | return; |
161 | 161 | } |
162 | 162 | |
163 | 163 | if ( |
164 | - ! ( isset( $_GET[ 'post_type' ] ) && post_type_exists( $_GET[ 'post_type' ] ) // sanitization unnecessary |
|
164 | + !( isset( $_GET[ 'post_type' ] ) && post_type_exists( $_GET[ 'post_type' ] ) // sanitization unnecessary |
|
165 | 165 | && strtolower( $_GET[ 'post_type' ] ) == $this->oProp->sPostType ) // sanitization unnecessary |
166 | 166 | ) { |
167 | 167 | return; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | foreach ( get_object_taxonomies( $GLOBALS[ 'typenow' ] ) as $_sTaxonomySulg ) { |
201 | 201 | |
202 | - if ( ! in_array( $_sTaxonomySulg, $this->oProp->aTaxonomyTableFilters ) ) { |
|
202 | + if ( !in_array( $_sTaxonomySulg, $this->oProp->aTaxonomyTableFilters ) ) { |
|
203 | 203 | continue; |
204 | 204 | } |
205 | 205 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | // Echo the drop down list based on the passed array argument. |
214 | 214 | wp_dropdown_categories( |
215 | 215 | array( |
216 | - 'show_option_all' => $this->oMsg->get( 'show_all' ) . ' ' . $_oTaxonomy->label, |
|
216 | + 'show_option_all' => $this->oMsg->get( 'show_all' ).' '.$_oTaxonomy->label, |
|
217 | 217 | 'taxonomy' => $_sTaxonomySulg, |
218 | 218 | 'name' => $_oTaxonomy->name, |
219 | 219 | 'orderby' => 'name', |
@@ -233,24 +233,24 @@ discard block |
||
233 | 233 | * |
234 | 234 | * @internal |
235 | 235 | */ |
236 | - public function _replyToGetTableFilterQueryForTaxonomies( $oQuery=null ) { |
|
236 | + public function _replyToGetTableFilterQueryForTaxonomies( $oQuery = null ) { |
|
237 | 237 | |
238 | 238 | if ( 'edit.php' != $this->oProp->sPageNow ) { |
239 | 239 | return $oQuery; |
240 | 240 | } |
241 | 241 | |
242 | - if ( ! isset( $GLOBALS[ 'typenow' ] ) ) { |
|
242 | + if ( !isset( $GLOBALS[ 'typenow' ] ) ) { |
|
243 | 243 | return $oQuery; |
244 | 244 | } |
245 | 245 | |
246 | 246 | foreach ( get_object_taxonomies( $GLOBALS[ 'typenow' ] ) as $sTaxonomySlug ) { |
247 | 247 | |
248 | - if ( ! in_array( $sTaxonomySlug, $this->oProp->aTaxonomyTableFilters ) ) { |
|
248 | + if ( !in_array( $sTaxonomySlug, $this->oProp->aTaxonomyTableFilters ) ) { |
|
249 | 249 | continue; |
250 | 250 | } |
251 | 251 | |
252 | 252 | $sVar = &$oQuery->query_vars[ $sTaxonomySlug ]; |
253 | - if ( ! isset( $sVar ) ) { |
|
253 | + if ( !isset( $sVar ) ) { |
|
254 | 254 | continue; |
255 | 255 | } |
256 | 256 | |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $_sStyle = trim( $_sStyle ); |
290 | 290 | |
291 | 291 | // Print out the filtered styles. |
292 | - if ( ! empty( $_sStyle ) ) { |
|
292 | + if ( !empty( $_sStyle ) ) { |
|
293 | 293 | echo "<style type='text/css' id='admin-page-framework-style-post-type'>" |
294 | 294 | . $this->oProp->sStyle |
295 | 295 | . "</style>"; |
@@ -345,10 +345,10 @@ discard block |
||
345 | 345 | */ |
346 | 346 | public function _replyToFilterPostTypeContent( $sContent ) { |
347 | 347 | |
348 | - if ( ! is_singular() ) { |
|
348 | + if ( !is_singular() ) { |
|
349 | 349 | return $sContent; |
350 | 350 | } |
351 | - if ( ! is_main_query() ) { |
|
351 | + if ( !is_main_query() ) { |
|
352 | 352 | return $sContent; |
353 | 353 | } |
354 | 354 | global $post; |