WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2337 | $validity = new WP_Error( 'unauthorized', __( 'Unauthorized to modify setting due to capability.' ) ); |
2338 | } else { |
2339 | if ( is_null( $unsanitized_value ) ) { |
2340 | continue; |
2341 | } |
2342 | $validity = $setting->validate( $unsanitized_value ); |
2343 | } |
2344 | if ( ! is_wp_error( $validity ) ) { |
2345 | /** This filter is documented in wp-includes/class-wp-customize-setting.php */ |
2346 | $late_validity = apply_filters( "customize_validate_{$setting->id}", new WP_Error(), $unsanitized_value, $setting ); |
2347 | if ( is_wp_error( $late_validity ) && $late_validity->has_errors() ) { |
2348 | $validity = $late_validity; |
2349 | } |
2350 | } |
2351 | if ( ! is_wp_error( $validity ) ) { |
2352 | $value = $setting->sanitize( $unsanitized_value ); |
2353 | if ( is_null( $value ) ) { |
2354 | $validity = false; |
2355 | } elseif ( is_wp_error( $value ) ) { |