Changeset 27432 for trunk/src/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 03/06/2014 02:03:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-setting.php
r27398 r27432 123 123 break; 124 124 default : 125 126 /** 127 * Fires when the WP_Customize_Setting::preview() method is called for settings 128 * not handled as theme_mods or options. 129 * 130 * The dynamic portion of the hook name, $this->id, refers to the setting ID. 131 * 132 * @since 3.4.0 133 */ 125 134 do_action( 'customize_preview_' . $this->id ); 126 135 } … … 154 163 return false; 155 164 165 /** 166 * Fires when the WP_Customize_Setting::save() method is called for settings 167 * not handled as theme_mods or options. 168 * 169 * The dynamic portion of the hook name, $this->id_data['base'] refers to 170 * the base slug of the setting name. 171 * 172 * @since 3.4.0 173 */ 156 174 do_action( 'customize_save_' . $this->id_data[ 'base' ] ); 157 175 … … 191 209 public function sanitize( $value ) { 192 210 $value = wp_unslash( $value ); 211 212 /** 213 * Filter a Customize setting value in un-slashed form. 214 * 215 * @since 3.4.0 216 * 217 * @param mixed $value Value of the setting. 218 * @param WP_Customize_Setting $this WP_Customize_Setting instance. 219 */ 193 220 return apply_filters( "customize_sanitize_{$this->id}", $value, $this ); 194 221 } … … 211 238 break; 212 239 default : 240 241 /** 242 * Fires when the WP_Customize_Setting::update() method is called for settings 243 * not handled as theme_mods or options. 244 * 245 * The dynamic portion of the hook name, $this->type, refers to the type of setting. 246 * 247 * @since 3.4.0 248 * 249 * @param mixed $value Value of the setting. 250 */ 213 251 return do_action( 'customize_update_' . $this->type, $value ); 214 252 } … … 272 310 break; 273 311 default : 312 313 /** 314 * Filter a Customize setting value not handled as a theme_mod or option. 315 * 316 * The dynamic portion of the hook name, $this->id_date['base'], refers to 317 * the base slug of the setting name. 318 * 319 * For settings handled as theme_mods or options, see those corresponding 320 * functions for available hooks. 321 * 322 * @since 3.4.0 323 * 324 * @param mixed $default The setting default value. Default empty. 325 */ 274 326 return apply_filters( 'customize_value_' . $this->id_data[ 'base' ], $this->default ); 275 327 } … … 292 344 */ 293 345 public function js_value() { 346 347 /** 348 * Filter a Customize setting value for use in JavaScript. 349 * 350 * The dynamic portion of the hook name, $this->id, refers to the setting ID. 351 * 352 * @since 3.4.0 353 * 354 * @param mixed $value The setting value. 355 * @param WP_Customize_Setting $this WP_Customize_Setting instance. 356 */ 294 357 $value = apply_filters( "customize_sanitize_js_{$this->id}", $this->value(), $this ); 295 358
Note: See TracChangeset
for help on using the changeset viewer.