403Webshell
Server IP : 127.0.1.1  /  Your IP : 127.0.0.1
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux sealall 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64
User : devops ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/domains/sealall.ca/wp-content/plugins/white-label/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/domains/sealall.ca/wp-content/plugins/white-label/functions/themes.php
<?php
/**
 *  Themes functionality.
 *
 * @package white-label
 */

if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly.
}

/**
 * Hide Themes from the theme page.
 *
 * @return void
 */
function white_label_hide_themes($prepared_themes)
{
    // Exit If it's WL Admin.
    if (white_label_is_wl_admin()) {
        return $prepared_themes;
    }

    $hidden_themes = white_label_get_option('hidden_themes', 'white_label_themes', false);

    // Exit if no settings.
    if (empty($hidden_themes)) {
        return $prepared_themes;
    }

    // Check each theme name.
    foreach ($hidden_themes as $theme) {
        if (isset($prepared_themes[$theme])) {
            unset($prepared_themes[$theme]);
        }
    }

    return $prepared_themes;
}

add_filter('wp_prepare_themes_for_js', 'white_label_hide_themes', 999, 1);


/**
 * Hide theme updates from the transient & updates page.
 *
 * @param array $value transient updates array.
 *
 * @return array $value update information.
 */
function white_label_hide_theme_updates($value)
{
    // Exit if it's WL Admin.
    if (white_label_is_wl_admin()) {
        return $value;
    }


    $hidden_themes = white_label_get_option('hidden_themes', 'white_label_themes', false);

    if (!empty($hidden_themes)) {
        // Hide each theme update.
        foreach ($hidden_themes as $theme) {
            if (isset($value->response[$theme])) {
                unset($value->response[$theme]);
            }
        }
    }

    return $value;
}

add_filter('site_transient_update_themes', 'white_label_hide_theme_updates');

Youez - 2016 - github.com/yon3zu
LinuXploit