WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/lcalosangeles/public_html/wp-content/plugins/autoupdater/lib/Config.php
<?php
defined('AUTOUPDATER_LIB') or die;

class AutoUpdater_Config
{
    protected static $prefix = 'autoupdater_';

    /**
     * @param string     $key
     * @param null|mixed $default
     *
     * @return mixed
     */
    public static function get($key, $default = null)
    {
        if (in_array($key, array('worker_token', 'aes_key'))) {
            return static::getRaw($key, $default);
        }

        return is_multisite() ? get_blog_option(1, static::$prefix . $key, $default) : get_option(static::$prefix . $key, $default);
    }

    /**
     * @param string     $key
     * @param null|mixed $default
     *
     * @return mixed
     */
    protected static function getRaw($key, $default = null)
    {
        global $wpdb;
        $value = $wpdb->get_var(
            $wpdb->prepare("SELECT option_value FROM {$wpdb->get_blog_prefix(1)}options WHERE option_name = %s LIMIT 1", static::$prefix . $key)
        );

        if (is_null($value)) {
            return $default;
        }

        return $value;
    }

    /**
     * @param string $key
     * @param mixed  $value
     *
     * @return bool
     */
    public static function set($key, $value)
    {
        $is_multisite = is_multisite();
        $old_value = $is_multisite ? get_blog_option(1, static::$prefix . $key, null) : get_option(static::$prefix . $key, null);
        // Possible comparison of values string(1) "0" and int(0) so don't use identical operator
        if ($old_value == $value && !is_null($old_value)) {
            return true;
        }

        return $is_multisite ? update_blog_option(1, static::$prefix . $key, $value) : update_option(static::$prefix . $key, $value);
    }

    /**
     * @param string $key
     *
     * @return bool
     */
    public static function remove($key)
    {
        return is_multisite() ? delete_blog_option(1, static::$prefix . $key) : delete_option(static::$prefix . $key);
    }

    /**
     * @return bool
     */
    public static function removeAll()
    {
        global $wpdb;

        $options = $wpdb->get_col(
            $wpdb->prepare(
                'SELECT option_name'
                    . ' FROM ' . $wpdb->get_blog_prefix(1) . 'options'
                    . ' WHERE option_name LIKE %s',
                static::$prefix . '%'
            )
        );

        $is_multisite = is_multisite();
        foreach ($options as $option) {
            $is_multisite ? delete_blog_option(1, $option) : delete_option($option);
        }

        return true;
    }

    /**
     * @return string
     */
    public static function getSiteUrl()
    {
        return rtrim(get_home_url(), '/');
    }

    /**
     * @return string
     */
    public static function getSiteBackendUrl()
    {
        return rtrim(get_admin_url(), '/');
    }

    /**
     * @return string
     */
    public static function getSiteLanguage()
    {
        return str_replace('_', '-', get_option('WPLANG', defined('WPLANG') && WPLANG ? WPLANG : 'en_US'));
    }

    /**
     * @return string
     */
    public static function getAutoUpdaterApiBaseUrl()
    {
        $stage = static::get('stage');
        $stage = ($stage === 'dev') ? 'development' : $stage;
        return 'https://api.' . ($stage ? $stage : 'production') . '.au.wpesvc.net/v3/';
    }
}