Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #38864


Ignore:
Timestamp:
11/19/2016 05:42:24 AM (7 years ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38864 – Description

    initial v1  
    11When a custom setting `type` is supplied when constructing a the base `WP_Customize_Setting` class, then the plugin implementing the custom type is expected to supply the value via the `customize_value_{$id_base}` filter which is then returned in the call to `WP_Customize_Setting::value()`. When a setting is previewed, however, it is expected that the `WP_Customize_Setting::value()` returns the previewed (post) value instead of whatever the `customize_value_{$id_base}` filter returned. This is not currently the case.
     2
     3This issue is clearly seen when adding a setting via code like:
     4
     5{{{#!php
     6<?php
     7$wp_customize->add_setting( 'test_number', array(
     8        'type' => 'demo',
     9) );
     10}}}
     11
     12When loading the customizer and supplying a value for that setting, if you then try to reload the customizer so that the stored changeset restores the customized state upon reload, you'll see that the input is unexpectedly empty.