} } return $valid_plugins; } public function filter_template($template) { $default_theme = gravity_forms_debug()->get_default_theme(); return !$default_theme ? $template : $default_theme->template; } public function filter_stylesheet($stylesheet) { return $this->filter_template($stylesheet); } public function get_current_user_id() { return isset($_COOKIE['gravityformsdebug_ct_user_id']) && $_COOKIE['gravityformsdebug_ct_user_id'] ? $_COOKIE['gravityformsdebug_ct_user_id'] : false; } public function cancel_disable_redirect() { header(sprintf('Location: %s', admin_url('admin.php?page=gravityformsdebug')), true); setcookie('gravityformsdebug_ct_error_check', null, null, '/'); ob_get_clean(); exit; } } function gf_mu_debug() { return GFMUDebug::get_instance(); } gf_mu_debug();
public function is_plugin_wp_active($slug) { if (function_exists('gf_mu_debug') && is_array(gf_mu_debug()->wp_active_plugins)) { $is_active = in_array($slug, gf_mu_debug()->wp_active_plugins); } else { $is_active = is_plugin_active($slug); } return $is_active; }