/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/*
    Add your custom styles here
*/


/**
* Retrieve the name of the capability required to manage network snippets
*
* @return string
*/


function rocket_clean_all_domains_menu() {
    add_submenu_page(
        'settings.php',                 // Localização do menu
        'Rocket Clean All Domains',     // Título da página
        'Rocket Clean All Domains',     // Título do menu
        'manage_options',               // Capacidade necessária para acessar
        'rocket-clean-all-domains',     // Slug do menu
        'rocket_clean_all_domains_page' // Função para renderizar a página
    );
}
add_action('network_admin_menu', 'rocket_clean_all_domains_menu');

function rocket_clean_all_domains_page() {
    ?>
    <div class="wrap">
        <h1>Rocket Clean All Domains</h1>
        <form action="" method="post">
            <?php
            if (isset($_POST['rocket_clean_all'])) {
                require_once('/rocket_clean_all_domains.php');
                echo '<div id="message" class="updated notice is-dismissible"><p>Cache limpo em todos os domínios.</p></div>';
            }
            ?>
            <input type="submit" name="rocket_clean_all" class="button button-primary" value="Limpar Cache em Todos os Domínios">
        </form>
    </div>
    <?php
}

