Skip to content

Commit

Permalink
Allow mobile theme to be removed via query string for testing (#14196)
Browse files Browse the repository at this point in the history
Adds the ability to bypass minileven/mobile theme, allowing the current theme to be tested for responsiveness.
  • Loading branch information
scottsweb authored Dec 10, 2019
1 parent 0b00c12 commit 8c90318
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/minileven/minileven.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
$_SERVER['REQUEST_URI'] = ( isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . (( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '')));

function jetpack_check_mobile() {
// allow mobile theme to be disabled via query string for testing during deprecation.
if ( isset( $_GET['jetpack-preview'] ) && 'responsivetheme' === $_GET['jetpack-preview'] )
return false;
if ( ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) || ( defined('APP_REQUEST') && APP_REQUEST ) )
return false;
if ( !isset($_SERVER["HTTP_USER_AGENT"]) || (isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'false') )
Expand Down

0 comments on commit 8c90318

Please sign in to comment.