<?php if (AppPresser::is_mp6()) { echo '<style type="text/css"> #adminmenu .toplevel_page_apppresser_settings .wp-menu-image { width: 28px; height: 28px; background-image: url("' . plugins_url("images/icon.svg", dirname(__FILE__)) . '") !important; background-position: 5px 1px !important; background-size: 70px 30px; margin-right: 5px; } #adminmenu li.toplevel_page_apppresser_settings.wp-has-current-submenu a.wp-has-current-submenu .wp-menu-image { background-position: -40px 1px !important; } #adminmenu .toplevel_page_apppresser_settings .wp-menu-image:before { content: "" !important; } </style>'; } else { echo '<style type="text/css"> #adminmenuwrap #adminmenu .toplevel_page_apppresser_settings .wp-menu-image { width: 28px; height: 28px; background-image: url("' . plugins_url("images/icon.svg", dirname(__FILE__)) . '"); background-position: 5px 0 !important; background-size: 60px 30px; } #adminmenu li#toplevel_page_apppresser_settings.wp-has-current-submenu a.wp-has-current-submenu .wp-menu-image { background-position: -34px 0 !important; }
/** * Gets the app_is_app variable * @since 1.0.0 * @return boolean Variable value */ public static function is_app() { if (self::$is_app !== null) { return self::$is_app; } self::$is_app = isset($_GET['appp']) && $_GET['appp'] == 1 || isset($_COOKIE['AppPresser_Appp']) && $_COOKIE['AppPresser_Appp'] === 'true'; return self::$is_app; }
/** * Checks for debug settings either by * - defined constant 'SCRIPT_DEBUG' or * - url parameter 'apppdebug' or * - cookie 'AppPresser_Debug_Scripts' * @since 2.0 * @return boolean value */ public static function is_js_debug_mode() { if (self::$debug === null) { if (isset($_GET['apppdebug'])) { self::set_debug_cookie(); } self::$debug = isset($_GET['apppdebug']) || isset($_COOKIE['AppPresser_Debug_Scripts']) && $_COOKIE['AppPresser_Debug_Scripts'] === 'true' || defined('SCRIPT_DEBUG') && SCRIPT_DEBUG; } return self::$debug; }