attachment_updated хук-событие . WP 4.4.0
Fires once an existing attachment has been updated.
Использование
add_action( 'attachment_updated', 'action_function_name_6019', 10, 3 ); function action_function_name_6019( $post_ID, $post_after, $post_before ){ // action... }
- $post_ID(число)
- Post ID.
- $post_after(WP_Post)
- Post object following the update.
- $post_before(WP_Post)
- Post object before the update.
Список изменений
С версии 4.4.0 | Введена. |
Где вызывается хук
attachment_updated
wp-includes/post.php 4232
do_action( 'attachment_updated', $post_ID, $post_after, $post_before );
Где используется хук в ядре WordPress
wp-includes/default-filters.php 402
add_action( 'attachment_updated', 'wp_check_for_changed_slugs', 12, 3 );
wp-includes/default-filters.php 406
add_action( 'attachment_updated', 'wp_check_for_changed_dates', 12, 3 );