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 |
---|---|
399 |
|
400 | // update_post_meta() expects slashed. |
401 | update_post_meta( $post_ID, '_wp_attachment_image_alt', wp_slash( $image_alt ) ); |
402 | } |
403 | } |
404 |
|
405 | $attachment_data = isset( $post_data['attachments'][ $post_ID ] ) ? $post_data['attachments'][ $post_ID ] : array(); |
406 |
|
407 | /** This filter is documented in wp-admin/includes/media.php */ |
408 | $translated = apply_filters( 'attachment_fields_to_save', $translated, $attachment_data ); |
409 | } |
410 |
|
411 | // Convert taxonomy input to term IDs, to avoid ambiguity. |
412 | if ( isset( $post_data['tax_input'] ) ) { |
413 | foreach ( (array) $post_data['tax_input'] as $taxonomy => $terms ) { |
414 | $tax_object = get_taxonomy( $taxonomy ); |
415 |
|
416 | if ( $tax_object && isset( $tax_object->meta_box_sanitize_cb ) ) { |
417 | $translated['tax_input'][ $taxonomy ] = call_user_func_array( $tax_object->meta_box_sanitize_cb, array( $taxonomy, $terms ) ); |