edit_(field)
Filters the value of a specific post field to edit.
The dynamic portion of the hook name, $field, refers to the post field name.
Usage
add_filter( 'edit_(field)', 'wp_kama_edit_field_filter', 10, 2 ); /** * Function for `edit_(field)` filter-hook. * * @param mixed $value Value of the post field. * @param int $post_id Post ID. * * @return mixed */ function wp_kama_edit_field_filter( $value, $post_id ){ // filter... return $value; }
- $value(mixed)
- Value of the post field.
- $post_id(int)
- Post ID.
Changelog
Since 2.3.0 | Introduced. |
Where the hook is called
edit_(field)
wp-includes/post.php 2905
$value = apply_filters( "edit_{$field}", $value, $post_id );
wp-includes/bookmark.php 431
$value = apply_filters( "edit_{$field}", $value, $bookmark_id );
wp-includes/user.php 1811
$value = apply_filters( "edit_{$field}", $value, $user_id );
Where the hook is used in WordPress
wp-admin/edit-form-advanced.php 82
add_action( 'edit_form_after_title', '_wp_posts_page_notice' );
wp-admin/includes/admin-filters.php 90
add_action( 'edit_form_after_title', '_disable_content_editor_for_navigation_post_type' );
wp-admin/includes/admin-filters.php 91
add_action( 'edit_form_after_editor', '_enable_content_editor_for_navigation_post_type' );
wp-admin/includes/meta-boxes.php 1591
add_action( 'edit_form_after_title', 'edit_form_image_editor' );
wp-includes/class-wp-embed.php 46
add_action( 'edit_form_advanced', array( $this, 'maybe_run_ajax_cache' ) );
wp-includes/class-wp-embed.php 47
add_action( 'edit_page_form', array( $this, 'maybe_run_ajax_cache' ) );
wp-includes/default-filters.php 508
add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );