<?php
/**
 * Recommended plugins for Blog Bank
 */

function blog_bank_magical_plugins($plugins) {
    $theme_plugins = array(
        'gallery-box' => array(
            'name'        => __('Gallery Box', 'blog-bank'),
            'slug'        => 'gallery-box',
            'file'        => 'gallery-box/gallery-box.php',
            'description' => __('Beautiful gallery and lightbox plugin.', 'blog-bank'),
            'category'    => 'Media',
            'required'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'elementor' => array(
            'name'        => __('Elementor', 'blog-bank'),
            'slug'        => 'elementor',
            'file'        => 'elementor/elementor.php',
            'description' => __('The most advanced frontend drag & drop page builder.', 'blog-bank'),
            'category'    => 'Page Builder',
            'required'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'magical-addons-for-elementor' => array(
            'name'        => __('Magical Addons', 'blog-bank'),
            'slug'        => 'magical-addons-for-elementor',
            'file'        => 'magical-addons-for-elementor/magical-addons-for-elementor.php',
            'description' => __('Premium quality addons for Elementor page builder.', 'blog-bank'),
            'category'    => 'Page Builder',
            'required'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'magical-posts-display' => array(
            'name'        => __('Magical Posts Display', 'blog-bank'),
            'slug'        => 'magical-posts-display',
            'file'        => 'magical-posts-display/magical-posts-display.php',
            'description' => __('Display posts in beautiful layouts.', 'blog-bank'),
            'category'    => 'Content Display',
            'required'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'easy-share-solution' => array(
            'name'        => __('Easy Share Solution', 'blog-bank'),
            'slug'        => 'easy-share-solution',
            'file'        => 'easy-share-solution/easy-share-solution.php',
            'description' => __('Easily add social sharing buttons.', 'blog-bank'),
            'category'    => 'Utility',
            'required'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'wp-edit-password-protected' => array(
            'name'        => __('Password Protected', 'blog-bank'),
            'slug'        => 'wp-edit-password-protected',
            'file'        => 'wp-edit-password-protected/wp-edit-password-protected.php',
            'description' => __('Manage password protection.', 'blog-bank'),
            'category'    => 'Security',
            'required'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'ai-marketing-expert' => array(
            'name'        => __('AI Marketing Expert', 'blog-bank'),
            'slug'        => 'ai-marketing-expert',
            'file'        => 'ai-marketing-expert/ai-marketing-expert.php',
            'description' => __('AI-powered marketing suite with email marketing, content generator, SEO analyzer, social media, and chatbot.', 'blog-bank'),
            'category'    => 'Marketing',
            'required'    => true,
            'featured'    => true,
            'is_local'    => false,
        ),
    );

    if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
        $theme_plugins['magical-products-display'] = array(
            'name'        => __('Magical Products Display', 'blog-bank'),
            'slug'        => 'magical-products-display',
            'file'        => 'magical-products-display/magical-products-display.php',
            'description' => __('Display WooCommerce products in beautiful layouts.', 'blog-bank'),
            'category'    => 'eCommerce',
            'required'    => false,
            'featured'    => true,
            'is_local'    => false,
        );
    }

    return array_merge($plugins, $theme_plugins);
}
add_filter('magical_plugin_activation_recommended_plugins', 'blog_bank_magical_plugins');
