@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | $tab = wp_parse_args( $tab_settings, $tab_defaults ); |
181 | 181 | |
182 | 182 | // Force the screen to be GravityView |
183 | - $tab['screen'] = 'gravityview'; |
|
183 | + $tab[ 'screen' ] = 'gravityview'; |
|
184 | 184 | |
185 | 185 | if ( class_exists( 'GravityView_Metabox_Tab' ) ) { |
186 | - $metabox = new \GravityView_Metabox_Tab( $tab['id'], $tab['title'], $tab['file'], $tab['icon-class'], $tab['callback'], $tab['callback_args'] ); |
|
186 | + $metabox = new \GravityView_Metabox_Tab( $tab[ 'id' ], $tab[ 'title' ], $tab[ 'file' ], $tab[ 'icon-class' ], $tab[ 'callback' ], $tab[ 'callback_args' ] ); |
|
187 | 187 | \GravityView_Metabox_Tabs::add( $metabox ); |
188 | 188 | } else { |
189 | - add_meta_box( 'gravityview_' . $tab['id'], $tab['title'], $tab['callback'], $tab['screen'], $tab['context'], $tab['priority'] ); |
|
189 | + add_meta_box( 'gravityview_' . $tab[ 'id' ], $tab[ 'title' ], $tab[ 'callback' ], $tab[ 'screen' ], $tab[ 'context' ], $tab[ 'priority' ] ); |
|
190 | 190 | } |
191 | 191 | } |
192 | 192 | |
@@ -211,14 +211,14 @@ discard block |
||
211 | 211 | */ |
212 | 212 | protected function is_extension_supported() { |
213 | 213 | |
214 | - self::$is_compatible = is_array( self::$is_compatible ) ? self::$is_compatible : array( get_called_class() => (bool) self::$is_compatible ); |
|
214 | + self::$is_compatible = is_array( self::$is_compatible ) ? self::$is_compatible : array( get_called_class() => (bool)self::$is_compatible ); |
|
215 | 215 | |
216 | 216 | if ( ! function_exists( 'gravityview' ) ) { |
217 | 217 | $message = sprintf( __( 'Could not activate the %s Extension; GravityView is not active.', 'gravityview' ), esc_html( $this->_title ) ); |
218 | - } else if ( false === version_compare( Plugin::$version, $this->_min_gravityview_version , ">=" ) ) { |
|
219 | - $message = sprintf( __( 'The %s Extension requires GravityView Version %s or newer.', 'gravityview' ), esc_html( $this->_title ), '<tt>'.$this->_min_gravityview_version.'</tt>' ); |
|
220 | - } else if ( isset( $this->_min_php_version ) && false === version_compare( phpversion(), $this->_min_php_version , ">=" ) ) { |
|
221 | - $message = sprintf( __( 'The %s Extension requires PHP Version %s or newer. Please ask your host to upgrade your server\'s PHP.', 'gravityview' ), esc_html( $this->_title ), '<tt>'.$this->_min_php_version.'</tt>' ); |
|
218 | + } else if ( false === version_compare( Plugin::$version, $this->_min_gravityview_version, ">=" ) ) { |
|
219 | + $message = sprintf( __( 'The %s Extension requires GravityView Version %s or newer.', 'gravityview' ), esc_html( $this->_title ), '<tt>' . $this->_min_gravityview_version . '</tt>' ); |
|
220 | + } else if ( isset( $this->_min_php_version ) && false === version_compare( phpversion(), $this->_min_php_version, ">=" ) ) { |
|
221 | + $message = sprintf( __( 'The %s Extension requires PHP Version %s or newer. Please ask your host to upgrade your server\'s PHP.', 'gravityview' ), esc_html( $this->_title ), '<tt>' . $this->_min_php_version . '</tt>' ); |
|
222 | 222 | } else if ( ! empty( $this->_max_gravityview_version ) && false === version_compare( $this->_max_gravityview_version, Plugin::$version, ">" ) ) { |
223 | 223 | $message = sprintf( __( 'The %s Extension is not compatible with this version of GravityView. Please update the Extension to the latest version.', 'gravityview' ), esc_html( $this->_title ) ); |
224 | 224 | } else { |
@@ -258,12 +258,12 @@ discard block |
||
258 | 258 | |
259 | 259 | $locale = get_locale(); |
260 | 260 | |
261 | - if ( function_exists('get_user_locale') && is_admin() ) { |
|
261 | + if ( function_exists( 'get_user_locale' ) && is_admin() ) { |
|
262 | 262 | $locale = get_user_locale(); |
263 | 263 | } |
264 | 264 | |
265 | 265 | // Traditional WordPress plugin locale filter |
266 | - $locale = apply_filters( 'plugin_locale', $locale, $this->_text_domain ); |
|
266 | + $locale = apply_filters( 'plugin_locale', $locale, $this->_text_domain ); |
|
267 | 267 | |
268 | 268 | $mofile = sprintf( '%1$s-%2$s.mo', $this->_text_domain, $locale ); |
269 | 269 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | public function settings() { |
292 | 292 | |
293 | 293 | // If doing ajax, get outta here |
294 | - if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && 'update-plugin' !== Utils::_POST('action') ) ) { |
|
294 | + if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && 'update-plugin' !== Utils::_POST( 'action' ) ) ) { |
|
295 | 295 | return; |
296 | 296 | } |
297 | 297 | |
@@ -306,9 +306,9 @@ discard block |
||
306 | 306 | $this->_path, |
307 | 307 | array( |
308 | 308 | 'version' => $this->_version, // current version number |
309 | - 'license' => $license['license'], |
|
309 | + 'license' => $license[ 'license' ], |
|
310 | 310 | 'item_id' => $this->_item_id, // The ID of the download on _remote_update_url |
311 | - 'item_name' => $this->_title, // name of this plugin |
|
311 | + 'item_name' => $this->_title, // name of this plugin |
|
312 | 312 | 'author' => strip_tags( $this->_author ) // author of this plugin |
313 | 313 | ) |
314 | 314 | ); |
@@ -337,16 +337,16 @@ discard block |
||
337 | 337 | */ |
338 | 338 | public static function add_notice( $notice = array() ) { |
339 | 339 | |
340 | - if ( is_array( $notice ) && empty( $notice['message'] ) ) { |
|
340 | + if ( is_array( $notice ) && empty( $notice[ 'message' ] ) ) { |
|
341 | 341 | gravityview()->log->error( 'Notice not set', array( 'data' => $notice ) ); |
342 | 342 | return; |
343 | 343 | } else if ( is_string( $notice ) ) { |
344 | 344 | $notice = array( 'message' => $notice ); |
345 | 345 | } |
346 | 346 | |
347 | - $notice['class'] = empty( $notice['class'] ) ? 'error' : $notice['class']; |
|
347 | + $notice[ 'class' ] = empty( $notice[ 'class' ] ) ? 'error' : $notice[ 'class' ]; |
|
348 | 348 | |
349 | - self::$admin_notices []= $notice; |
|
349 | + self::$admin_notices [ ] = $notice; |
|
350 | 350 | } |
351 | 351 | |
352 | 352 | /** |
@@ -360,8 +360,8 @@ discard block |
||
360 | 360 | } |
361 | 361 | |
362 | 362 | foreach ( self::$admin_notices as $key => $notice ) { |
363 | - echo '<div id="message" class="'. esc_attr( $notice['class'] ).'">'; |
|
364 | - echo wpautop( $notice['message'] ); |
|
363 | + echo '<div id="message" class="' . esc_attr( $notice[ 'class' ] ) . '">'; |
|
364 | + echo wpautop( $notice[ 'message' ] ); |
|
365 | 365 | echo '<div class="clear"></div>'; |
366 | 366 | echo '</div>'; |
367 | 367 | } |