customize_sanitize_<setting_id>
The WordPress Core customize sanitize setting id hook.
Description
Parameters (1)
- 0. $absint (string) =>
'absint'
- The absint.
Usage
- To run the hook, copy the example below.
- $absint = apply_filters( 'customize_sanitize_{$setting_id}', $absint );
- if ( !empty( $absint ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the customize_sanitize_<setting_id> callback
- function filter_customize_sanitize_setting_id( $absint ) {
- // make filter magic happen here...
- return $absint;
- };
- // add the filter
- add_filter( "customize_sanitize_{$setting_id}", 'filter_customize_sanitize_setting_id', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( "customize_sanitize_{$setting_id}", 'filter_customize_sanitize_setting_id', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/class-wp-customize-nav-menus.php
- remove_filter( "customize_sanitize_{$setting_id}", 'absint' );