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/Task/MultisiteUrls.php
<?php
defined('AUTOUPDATER_LIB') or die;

class AutoUpdater_Task_MultisiteUrls extends AutoUpdater_Task_Base
{
    /**
     * @return array
     */
    public function doTask()
    {
        return array(
            'success' => true,
            'urls' => $this->getUrls()
        );
    }

    protected function getUrls()
    {
        $urls = array();

        if (!is_multisite()) {
            return $urls;
        }

        if (version_compare(AUTOUPDATER_WP_VERSION, '4.6', '>=') && function_exists('get_sites')) {
            $sites = get_sites(array(
                'number' => 1000,
                'fields' => 'ids',
                'archived' => 0,
                'deleted' => 0
            ));
            foreach ($sites as $id) {
                $urls[] = rtrim(get_home_url($id), '/');
            }
        } elseif (version_compare(AUTOUPDATER_WP_VERSION, '3.7', '>=') && function_exists('wp_get_sites')) {
            $sites = wp_get_sites(array( // phpcs:ignore WordPress.WP.DeprecatedFunctions.wp_get_sitesFound
                'limit' => 1000,
                'archived' => 0,
                'deleted' => 0
            ));
            foreach ($sites as $site) {
                $urls[] = rtrim(get_home_url($site['blog_id']), '/');
            }
        }

        return $urls;
    }
}