edit_attachment
Fires once an existing attachment has been updated.
Использование
add_action( 'edit_attachment', 'wp_kama_edit_attachment_action' ); /** * Function for `edit_attachment` action-hook. * * @param int $post_id Attachment ID. * * @return void */ function wp_kama_edit_attachment_action( $post_id ){ // action... }
- $post_id(int)
- Attachment ID.
Список изменений
С версии 2.0.0 | Введена. |
Где вызывается хук
edit_attachment
wp-includes/post.php 5010
do_action( 'edit_attachment', $post_id );