library/Theme/ColorScheme.php
public function getRemoteColorScheme($manifestId = "") : bool
    {
        if (!defined('MUNICIPIO_STYLEGUIDE_URI')) {
            return false;
        }

        if (empty($manifestId)) {
            $manifestId = apply_filters('Municipio/theme/key', get_field('color_scheme', 'option'));
        }

        $args = (defined('DEV_MODE') && DEV_MODE == true) ? ['sslverify' => false] : array();

        //Get remote data
        $request = wp_remote_get("https:" . MUNICIPIO_STYLEGUIDE_URI . "vars/" . $manifestId . '.json', $args);

        //Store if valid response
        if (wp_remote_retrieve_response_code($request) == 200) {
            if (!empty($response = json_decode(wp_remote_retrieve_body($request)))) {
                $this->storeColorScheme($response);
            }

            return true;
        }

        //Not updated
        return false;
    }
public function getRemoteColorScheme($manifestId = "") : bool
    {
        if (!defined('MUNICIPIO_STYLEGUIDE_URI')) {
            return false;
        }

        if (empty($manifestId)) {
            $manifestId = apply_filters('Municipio/theme/key', get_field('color_scheme', 'option'));
        }

        $args = (defined('DEV_MODE') && DEV_MODE == true) ? ['sslverify' => false] : array();

        //Get remote data
        $request = wp_remote_get("https:" . MUNICIPIO_STYLEGUIDE_URI . "vars/" . $manifestId . '.json', $args);

        //Store if valid response
        if (wp_remote_retrieve_response_code($request) == 200) {
            if (!empty($response = json_decode(wp_remote_retrieve_body($request)))) {
                $this->storeColorScheme($response);
            }

            return true;
        }

        //Not updated
        return false;
    }
public function getRemoteColorScheme ( $ manifestId = "" ) : bool { if ( ! defined ( 'MUNICIPIO_STYLEGUIDE_URI' ) ) { return false ; } if ( empty ( $ manifestId ) ) { $ manifestId = apply_filters ( 'Municipio/theme/key' , get_field ( 'color_scheme' , 'option' ) ) ; } $ args = ( defined ( 'DEV_MODE' ) && DEV_MODE == true ) ? [ 'sslverify' => false ] : array ( ) ; //Get remote data $ request = wp_remote_get ( "https:" . MUNICIPIO_STYLEGUIDE_URI . "vars/" . $ manifestId . '.json' , $ args ) ; //Store if valid response if ( wp_remote_retrieve_response_code ( $ request ) == 200 ) { if ( ! empty ( $ response = json_decode ( wp_remote_retrieve_body ( $ request ) ) ) ) { $ this -> storeColorScheme ( $ response ) ; } return true ; } //Not updated return false ; }
Get remote colorsheme from styleguide etc
@param  string $manifestId. A identifier that represents the id of the theme configuration (filename on server)
@return bool
Get remote colorsheme from styleguide etc