Skip to content

Commit

Permalink
Remove two extra front-end queries when mobile theme is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityrail committed Jul 5, 2016
1 parent e948c96 commit ad38724
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/minileven.php
Expand Up @@ -16,7 +16,7 @@
function jetpack_load_minileven() {
include dirname( __FILE__ ) . "/minileven/minileven.php";

if ( get_option( 'wp_mobile_app_promos' ) != '1' )
if ( Jetpack_Options::get_option_and_ensure_autoload( 'wp_mobile_app_promos', '0' ) != '1' )
remove_action( 'wp_mobile_theme_footer', 'jetpack_mobile_app_promo' );
}

Expand Down
2 changes: 1 addition & 1 deletion modules/minileven/minileven.php
Expand Up @@ -34,7 +34,7 @@ function jetpack_check_mobile() {
return false;
if ( jetpack_mobile_exclude() )
return false;
if ( 1 == get_option('wp_mobile_disable') )
if ( 1 == Jetpack_Options::get_option_and_ensure_autoload( 'wp_mobile_disable', '0' ) )
return false;
if ( isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'true' )
return true;
Expand Down

0 comments on commit ad38724

Please sign in to comment.