Title: {$field}_pre
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( “{$field}_pre”, mixed $value )

## In this article

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

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

Filters the value of a specific post field before saving.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/field_pre/?output_format=md#description)󠁿

Only applied to post fields with a name which is _not_ prefixed with `post_`.

The dynamic portion of the hook name, `$field`, refers to the post field name. Possible
filter names include:

 * `ID_pre`
 * `comment_status_pre`
 * `ping_status_pre`
 * `to_ping_pre`
 * `pinged_pre`
 * `guid_pre`
 * `menu_order_pre`
 * `comment_count_pre`

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

 `$value`mixed

Value of the post field.

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

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

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

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

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

Sanitizes a post field based on context.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/field_pre/?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_pre%2F)
before being able to contribute a note or feedback.