WP_Customize_Setting::get_root_value PHP Method

get_root_value() protected method

Get the root value for a setting, especially for multidimensional ones.
Since: 4.4.0
protected get_root_value ( mixed $default = null ) : mixed
$default mixed Value to return if root does not exist.
return mixed
    protected function get_root_value($default = null)
    {
        $id_base = $this->id_data['base'];
        if ('option' === $this->type) {
            return get_option($id_base, $default);
        } else {
            if ('theme_mod') {
                return get_theme_mod($id_base, $default);
            } else {
                /*
                 * Any WP_Customize_Setting subclass implementing aggregate multidimensional
                 * will need to override this method to obtain the data from the appropriate
                 * location.
                 */
                return $default;
            }
        }
    }