<?php
/**
 * Magical Plugin Activation - Example Implementation
 * 
 * This file demonstrates how to integrate the Magical Plugin Activation toolkit
 * into your WordPress theme. This is a complete example showing various use cases
 * and implementation patterns.
 * 
 * @package magical_plugin_activation
 * @version 1.0.0
 */

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}


/**
 * STEP 2: Define your theme's required and recommended plugins
 * Use the main filter to define your complete plugin list
 */

function news_axis_recommended_plugins($plugins) {
    $theme_plugins = array(
        
         // WordPress.org plugins
            'magical-addons-for-elementor' => array(
                'name' => __('Magical Addons', 'news-axis'),
                'slug' => 'magical-addons-for-elementor',
                'file' => 'magical-addons-for-elementor/magical-addons-for-elementor.php',
                'description' => __('Enhance your site with a collection of magical addons for Elementor.', 'news-axis'),
                'category' => 'Essential',
                'required' => false,
                'featured' => false,
                'is_local' => false
            ),
            'magical-posts-display' => array(
                'name' => __('Magical Posts Display', 'news-axis'),
                'slug' => 'magical-posts-display',
                'file' => 'magical-posts-display/magical-posts-display.php',
                'description' => __('Display your posts in a magical way with this addon for Elementor.', 'news-axis'),
                'category' => 'Essential',
                'required' => false,
                'featured' => true,
                'is_local' => false
            ),
            'elementor' => array(
                'name' => __('Elementor Page Builder', 'news-axis'),
                'slug' => 'elementor',
                'file' => 'elementor/elementor.php',
                'description' => __('Create beautiful pages with drag & drop page builder. Perfect for creating stunning layouts with your theme.', 'news-axis'),
                'category' => 'Page Builder',
                'required' => false,
                'featured' => true,
                'is_local' => false
            ),
            'click-to-top' => array(
                'name' => __('Click to Top', 'news-axis'),
                'slug' => 'click-to-top',
                'file' => 'click-to-top/click-to-top.php',
                'description' => __('Add a "click to top" button to your site.', 'news-axis'),
                'category' => 'Utility',
                'required' => false,
                'featured' => false,
                'is_local' => false
            ),
            'wp-edit-password-protected' => array(
                'name' => __('WP Edit Password Protected', 'news-axis'),
                'slug' => 'wp-edit-password-protected',
                'file' => 'wp-edit-password-protected/wp-edit-password-protected.php',
                'description' => __('Easily manage password protection for your WordPress content.', 'news-axis'),
                'category' => 'Security',
                'required' => false,
                'featured' => true,
                'is_local' => false
            ),
            'easy-share-solution' => array(
                'name' => __('Easy Share Solution', 'news-axis'),
                'slug' => 'easy-share-solution',
                'file' => 'easy-share-solution/easy-share-solution.php',
                'description' => __('Easily add social sharing buttons to your content.', 'news-axis'),
                'category' => 'Utility',
                'required' => false,
                'featured' => true,
                'is_local' => false
            ),
            'magical-blocks' => array(
                'name' => __('Magical Blocks', 'news-axis'),
                'slug' => 'magical-blocks',
                'file' => 'magical-blocks/magical-blocks.php',
                'description' => __('Add magical blocks to your content.', 'news-axis'),
                'category' => 'Utility',
                'required' => false,
                'featured' => false,
                'is_local' => false
            ),
        
    );

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

