Jetpack::get_cloud_site_options PHP Method

get_cloud_site_options() public method

Pings the WordPress.com Mirror Site for the specified options.
public get_cloud_site_options ( string | array $option_names ) : array
$option_names string | array The option names to request from the WordPress.com Mirror Site
return array An associative array of the option values as stored in the WordPress.com Mirror Site
    public function get_cloud_site_options($option_names)
    {
        $option_names = array_filter((array) $option_names, 'is_string');
        Jetpack::load_xml_rpc_client();
        $xml = new Jetpack_IXR_Client(array('user_id' => JETPACK_MASTER_USER));
        $xml->query('jetpack.fetchSiteOptions', $option_names);
        if ($xml->isError()) {
            return array('error_code' => $xml->getErrorCode(), 'error_msg' => $xml->getErrorMessage());
        }
        $cloud_site_options = $xml->getResponse();
        return $cloud_site_options;
    }
Jetpack