Filters the value of a specific post field for display.
Description
Only applied to post fields with a name which is prefixed with post_. The dynamic portion of the hook name, $field, refers to the post field name. Possible filter names include: <ul> <li>post_author</li> <li>post_date</li> <li>post_date_gmt</li> <li>post_content</li> <li>post_title</li> <li>post_excerpt</li> <li>post_status</li> <li>post_password</li> <li>post_name</li> <li>post_modified</li> <li>post_modified_gmt</li> <li>post_content_filtered</li> <li>post_parent</li> <li>post_type</li> <li>post_mime_type</li> </ul>
Parameters
$valuemixed
Value of the prefixed post field.
$post_idint
Post ID.
$contextstring
Context for how to sanitize the field. Accepts 'raw', 'edit', 'db', 'display', 'attribute', or 'js'. The 'sample' value is used for permalink previewing. Default 'display'.
3288* @param int$post_id Post ID.3289* @param string$context Context for how to sanitize the field.3290* Accepts 'raw','edit','db','display',3291*'attribute',or'js'. The 'sample' value is3292* used for permalink previewing.Default'display'.3293*/3294$value=apply_filters("{$field}",$value,$post_id,$context);3295}else{3296/**3297* Filters the value of a specific post field for display.3298*3299* Only applied to post fields name which is *not* prefixed with `post_`.3300*
History
Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.