W3cubDocs

/WordPress

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

Filters the value of a specific post field before saving.

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

$valuemixed
Value of the post field.

Source

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

Changelog

Version Description
2.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/field_pre