WordPress.org

Make WordPress Core

Ticket #29165: 29165.diff

File 29165.diff, 1.2 KB (added by celloexpressions, 5 years ago)

Introduce customize_preview_$setting->type action, correct docs for customize_save_ action.

  • src/wp-includes/class-wp-customize-setting.php

     
    134134                                 * @param WP_Customize_Setting $this WP_Customize_Setting instance.
    135135                                 */
    136136                                do_action( 'customize_preview_' . $this->id, $this );
     137
     138                                /**
     139                                 * Fires when the WP_Customize_Setting::preview() method is called for settings
     140                                 * not handled as theme_mods or options.
     141                                 *
     142                                 * The dynamic portion of the hook name, $this->type, refers to the setting type.
     143                                 *
     144                                 * @since 4.1.0
     145                                 *
     146                                 * @param WP_Customize_Setting $this WP_Customize_Setting instance.
     147                                 */
     148                                do_action( 'customize_preview_' . $this->type, $this );
    137149                }
    138150        }
    139151
     
    165177                        return false;
    166178
    167179                /**
    168                  * Fires when the WP_Customize_Setting::save() method is called for settings
    169                  * not handled as theme_mods or options.
     180                 * Fires when the WP_Customize_Setting::save() method is called.
    170181                 *
    171182                 * The dynamic portion of the hook name, $this->id_data['base'] refers to
    172183                 * the base slug of the setting name.