'aacgfe-review-box',
'slug' => 'aacgfe',
'review' => true,
'review_url' => esc_url( 'https://wordpress.org/support/plugin/ai-auto-content-generator-for-elementor/reviews/' ),
'plugin_name' => 'AI Auto Content Generator For Elementor',
'review_interval' => 3,
)
);
}
// Elementor is not loaded
public function fail_to_load() {
if ( ! is_plugin_active( 'elementor/elementor.php' ) ) : ?>
' . esc_html__( 'Elementor Page Builder', 'ai-auto-content-generator-for-elementor' ) . '' . wp_kses_post( __( ' must be installed and activated to use "AI Auto Content Generator For Elementor" ', 'ai-auto-content-generator-for-elementor' ) ); ?>
isset($_SERVER['SERVER_SOFTWARE']) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : 'N/A',
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
'mysql_version' => $wpdb ? sanitize_text_field($wpdb->db_version()) : 'N/A',
'php_version' => sanitize_text_field(phpversion() ?: 'N/A'),
'wp_version' => sanitize_text_field(get_bloginfo('version') ?: 'N/A'),
'wp_debug' => (defined('WP_DEBUG') && WP_DEBUG) ? 'Enabled' : 'Disabled',
'wp_memory_limit' => sanitize_text_field(ini_get('memory_limit') ?: 'N/A'),
'wp_max_upload_size' => sanitize_text_field(ini_get('upload_max_filesize') ?: 'N/A'),
'wp_permalink_structure' => sanitize_text_field(get_option('permalink_structure') ?: 'Default'),
'wp_multisite' => is_multisite() ? 'Enabled' : 'Disabled',
'wp_language' => sanitize_text_field(get_option('WPLANG') ?: get_locale()),
'wp_prefix' => isset($wpdb->prefix) ? sanitize_key($wpdb->prefix) : 'N/A',
];
// Theme details
$theme = wp_get_theme();
$theme_data = [
'name' => sanitize_text_field($theme->get('Name')),
'version' => sanitize_text_field($theme->get('Version')),
'theme_uri' => esc_url($theme->get('ThemeURI')),
];
if (!function_exists('get_plugins')) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
if (!function_exists('get_plugin_data')) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$plugin_data = [];
$active_plugins = get_option('active_plugins', []);
foreach ($active_plugins as $plugin_path) {
$plugin_file = WP_PLUGIN_DIR . '/' . ltrim($plugin_path, '/');
if (file_exists($plugin_file)) {
$plugin_info = get_plugin_data($plugin_file, false, false);
$plugin_url = !empty($plugin_info['PluginURI']) ? esc_url($plugin_info['PluginURI']) : (!empty($plugin_info['AuthorURI']) ? esc_url($plugin_info['AuthorURI']) : 'N/A');
$plugin_data[] = [
'name' => sanitize_text_field($plugin_info['Name']),
'version' => sanitize_text_field($plugin_info['Version']),
'plugin_uri' => !empty($plugin_url) ? $plugin_url : 'N/A',
];
}
}
return [
'server_info' => $server_info,
'extra_details' => [
'wp_theme' => $theme_data,
'active_plugins' => $plugin_data,
],
];
}
}
}
// Get instance of the plugin class
function AACGFE_Widget_Addon() {
return AACGFE_Widget_Addon::get_instance();
}
// Initialize the plugin
AACGFE_Widget_Addon();