Inpsyde\MultilingualPress\API\WPDBSiteRelations::get_all_relations PHP Method

get_all_relations() public method

Returns an array with site IDs as keys and arrays with the IDs of all related sites as values.
Since: 3.0.0
public get_all_relations ( ) : int[]
return int[] The array with site IDs as keys and arrays with the IDs of all related sites as values.
    public function get_all_relations()
    {
        $query = "SELECT site_1, site_2 FROM {$this->table} ORDER BY site_1 ASC, site_2 ASC";
        $rows = $this->db->get_results($query, ARRAY_A);
        return $rows ? $this->get_site_relations_from_query_results($rows) : [];
    }