edit_attachment
Fires once an existing attachment has been updated.
Usage
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.
Changelog
| Since 2.0.0 | Introduced. |
Where the hook is called
edit_attachment
wp-includes/post.php 5094
do_action( 'edit_attachment', $post_id );