Timber\Timber::get_sites PHP Method

get_sites() public static method

Get sites.
public static get_sites ( array | boolean $blog_ids = false ) : array
$blog_ids array | boolean
return array
    public static function get_sites($blog_ids = false)
    {
        if (!is_array($blog_ids)) {
            global $wpdb;
            $blog_ids = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs} ORDER BY blog_id ASC");
        }
        $return = array();
        foreach ($blog_ids as $blog_id) {
            $return[] = new Site($blog_id);
        }
        return $return;
    }