get_am_plugins(); // Define plugin mappings $plugin_mappings = array( 'fox-lms' => 'fox-lms', 'quiz-maker' => 'quiz-maker', 'poll-maker' => 'poll-maker', 'ays-popup-box' => 'ays-popup-box', 'gallery-photo-gallery' => 'gallery-photo-gallery', 'secure-copy-content-protection' => 'secure-copy-content-protection', 'ays-facebook-popup-likebox' => 'ays-facebook-popup-likebox', 'chart-builder' => 'chart-builder' ); // Function to get plugin button HTML function get_plugin_button_html($plugin_slug, $admin_obj) { if (!function_exists('get_plugins')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $plugins = get_plugins(); $plugin_file = ''; $is_installed = false; $is_active = false; // Find plugin file foreach ($plugins as $file => $plugin_data) { if (strpos($file, $plugin_slug) !== false) { $plugin_file = $file; $is_installed = true; $is_active = is_plugin_active($file); break; } } if ($is_active) { return ''; } elseif ($is_installed) { return ''; } else { return ''; } } ?>