Title: {$field}
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( “{$field}”, mixed $value, int $post_id, string $context )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/field/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/field/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/field/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/field/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/field/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/field/?output_format=md#wp--skip-link--target)

Filters the value of a specific post field for display.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/field/?output_format=md#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:

 * `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`

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/field/?output_format=md#parameters)󠁿

 `$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'`.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/field/?output_format=md#source)󠁿

    ```php
    $value = apply_filters( "{$field}", $value, $post_id, $context );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/post.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/post.php#L3235)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/post.php#L3235-L3235)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/field/?output_format=md#related)󠁿

| Used by | Description | 
| [sanitize_user_field()](https://developer.wordpress.org/reference/functions/sanitize_user_field/)`wp-includes/user.php` |

Sanitizes user field based on context.

  | 
| [sanitize_post_field()](https://developer.wordpress.org/reference/functions/sanitize_post_field/)`wp-includes/post.php` |

Sanitizes a post field based on context.

  | 
| [sanitize_bookmark_field()](https://developer.wordpress.org/reference/functions/sanitize_bookmark_field/)`wp-includes/bookmark.php` |

Sanitizes a bookmark field.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/field/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.3.0](https://developer.wordpress.org/reference/since/2.3.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Ffield%2F)
before being able to contribute a note or feedback.