'abdielmskef', 'tab' => 'kits' ], admin_url( 'admin.php' ) ); // --- 1. PROCESS ACTIONS (POST) --- if ( isset( $_POST['abdielmskef_action'] ) && check_admin_referer( 'abdielmskef_kits_action', 'abdielmskef_nonce' ) ) { $action = sanitize_key( wp_unslash( $_POST['abdielmskef_action'] ) ); $kit_id = isset( $_POST['kit_id'] ) ? (int) $_POST['kit_id'] : 0; if ( $action === 'set_global' ) { if ( $kit_id && abdielmskef_is_kit( $kit_id ) ) { abdielmskef_set_active_kit_id( $kit_id ); // Clear Elementor CSS cache if ( class_exists( 'Elementor\\Plugin' ) ) { try { $plugin = \Elementor\Plugin::instance(); if ( isset( $plugin->files_manager ) && method_exists( $plugin->files_manager, 'clear_cache' ) ) { $plugin->files_manager->clear_cache(); } } catch ( \Throwable $e ) {} } echo '
' . esc_html__( 'Kit global actualizado.', 'abdiel-multi-style-kits-for-elementor' ) . '
' . esc_html__( 'Gestiona tus kits (Theme Style Kits) de Elementor.', 'abdiel-multi-style-kits-for-elementor' ) . '
'; echo '| ' . esc_html__( 'Kit', 'abdiel-multi-style-kits-for-elementor' ) . ' | '; echo '' . esc_html__( 'Estado', 'abdiel-multi-style-kits-for-elementor' ) . ' | '; echo '' . esc_html__( 'Acciones', 'abdiel-multi-style-kits-for-elementor' ) . ' | '; echo '
|---|---|---|
| ' . esc_html__( 'No kits found.', 'abdiel-multi-style-kits-for-elementor' ) . ' | ||
| ' . esc_html( $title ) . ' #' . (int) $kit_id . ' | ';
echo '' . ( $is_active ? '' . esc_html__( 'Global activo', 'abdiel-multi-style-kits-for-elementor' ) . '' : '' ) . ' | '; echo ''; echo '' . esc_html__( 'Editar', 'abdiel-multi-style-kits-for-elementor' ) . ' '; echo ' '; echo ' '; $export_url = wp_nonce_url( admin_url( 'admin-post.php?action=abdielmskef_export_kit&kit_id=' . (int) $kit_id ), 'abdielmskef_export_kit' ); echo '' . esc_html__( 'Exportar', 'abdiel-multi-style-kits-for-elementor' ) . ' '; echo ' '; $disable_delete = ( $kit_total <= 1 ); $delete_title_attr = $disable_delete ? esc_attr__( 'Cannot delete because it’s the only kit in the library. Elementor requires at least one active kit.', 'abdiel-multi-style-kits-for-elementor' ) : ''; if ( $disable_delete ) { echo ''; } else { echo ''; } echo ' | '; echo '
' . esc_html__( 'Save the assignment on each page/post (request override).', 'abdiel-multi-style-kits-for-elementor' ) . '
'; echo ''; echo '