post_modified_gmt
Filters the value of a specific post field for display.
Only applied to post fields with a name which is prefixed with post_.
- post_author
- post_date
- post_date_gmt
- post_content
- post_title
- post_excerpt
- post_status
- post_password
- post_name
- post_modified
- post_modified_gmt
- post_content_filtered
- post_parent
- post_type
- post_mime_type
This is one of the variants of the dynamic hook (field)
Usage
add_filter( 'post_modified_gmt', 'wp_kama_post_modified_gmt_filter', 10, 3 ); /** * Function for `post_modified_gmt` filter-hook. * * @param mixed $value Value of the prefixed post field. * @param int $post_id Post ID. * @param string $context Context for how to sanitize the field. Accepts 'raw', 'edit', 'db', 'display', 'attribute', or 'js'. * * @return mixed */ function wp_kama_post_modified_gmt_filter( $value, $post_id, $context ){ // filter... return $value; }
- $value(mixed)
- Value of the prefixed post field.
- $post_id(int)
- Post ID.
- $context(string)
- Context for how to sanitize the field. Accepts 'raw', 'edit', 'db', 'display', 'attribute', or 'js'.
Default: 'display'
Changelog
Since 2.3.0 | Introduced. |
Where the hook is called
post_modified_gmt
wp-includes/post.php 3137
$value = apply_filters( "{$field}", $value, $post_id, $context );