/**
* Theme Name: Fun Fly Agency
* Description: This is a child theme of BWG, generated by bwg.agency.
* Author: <a href="https://bwg.agency/">BWG.AGENCY</a>
* Template: Fun Fly Agency
* Version: 2.4.5
*/

// Hide "triply" theme from Appearance > Themes
add_filter('wp_prepare_themes_for_js', 'hide_triply_theme_from_dashboard');

function hide_triply_theme_from_dashboard($themes) {
    $theme_to_hide = 'Triply'; // Folder name of the theme to hide

    if (isset($themes[$theme_to_hide])) {
        unset($themes[$theme_to_hide]);
    }

    return $themes;
}

// Prevent activation of "triply" theme programmatically
add_filter('allowed_themes', 'block_triply_theme_activation');

function block_triply_theme_activation($themes) {
    unset($themes['Triply']); // Prevent activation of hidden theme
    return $themes;
}
