WordPress.org

Make WordPress Core

Changeset 29948


Ignore:
Timestamp:
10/17/2014 09:20:42 PM (5 years ago)
Author:
ocean90
Message:

Customizer: Introduce customize_preview_$setting->type action to handle multiple settings of the same type.

props celloexpressions.
fixes #29165.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r29509 r29948  
    125125
    126126                /**
    127                  * Fires when the WP_Customize_Setting::preview() method is called for settings
     127                 * Fires when the {@see WP_Customize_Setting::preview()} method is called for settings
    128128                 * not handled as theme_mods or options.
    129129                 *
     
    134134                 * @param WP_Customize_Setting $this WP_Customize_Setting instance.
    135135                 */
    136                 do_action( 'customize_preview_' . $this->id, $this );
     136                do_action( "customize_preview_{$this->id}", $this );
     137
     138                /**
     139                 * Fires when the {@see 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    }
Note: See TracChangeset for help on using the changeset viewer.