library/Theme/ColorScheme.php
public function colorPickerDefaultPalette() {

        if (!get_field('color_scheme', 'options')) {
            return;
        }

        if (!get_option($this->optionName) || !is_array(get_option($this->optionName)) || empty(get_option($this->optionName))) {
            $this->getRemoteColorScheme(get_field('color_scheme', 'options'));
        }

        $colors = (array) apply_filters( 'Municipio/Theme/ColorPickerDefaultPalette', get_option($this->optionName));

        wp_localize_script( 'helsingborg-se-admin', 'themeColorPalette', [
            'colors' => $colors,
        ]);
    }
public function colorPickerDefaultPalette() {

        if (!get_field('color_scheme', 'options')) {
            return;
        }

        if (!get_option($this->optionName) || !is_array(get_option($this->optionName)) || empty(get_option($this->optionName))) {
            $this->getRemoteColorScheme(get_field('color_scheme', 'options'));
        }

        $colors = (array) apply_filters( 'Municipio/Theme/ColorPickerDefaultPalette', get_option($this->optionName));

        wp_localize_script( 'helsingborg-se-admin', 'themeColorPalette', [
            'colors' => $colors,
        ]);
    }
public function colorPickerDefaultPalette ( ) { if ( ! get_field ( 'color_scheme' , 'options' ) ) { return ; } if ( ! get_option ( $ this -> optionName ) || ! is_array ( get_option ( $ this -> optionName ) ) || empty ( get_option ( $ this -> optionName ) ) ) { $ this -> getRemoteColorScheme ( get_field ( 'color_scheme' , 'options' ) ) ; } $ colors = ( array ) apply_filters ( 'Municipio/Theme/ColorPickerDefaultPalette' , get_option ( $ this -> optionName ) ) ; wp_localize_script ( 'helsingborg-se-admin' , 'themeColorPalette' , [ 'colors' => $ colors , ] ) ; }
Localize theme colors to set color picker default colors
@return void
Localize theme colors to set color picker default colors