<field>
This filter is documented in wp-includes/post.php.
Description
Parameters (3)
- 0. $value (unknown)
- The value.
- 1. $user_id (unknown)
- The user id.
- 2. $context (unknown)
- The context.
Usage
- To run the hook, copy the example below.
- $value = apply_filters( '{$field}', $value, $user_id, $context );
- if ( !empty( $value ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the <field> callback
- function filter_field( $value, $user_id, $context ) {
- // make filter magic happen here...
- return $value;
- };
- // add the filter
- add_filter( "{$field}", 'filter_field', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( "{$field}", 'filter_field', 10, 3 );
Defined (3)
The filter is defined in the following location(s).
- /wp-includes/user.php
- $value = apply_filters( $field, $value, $user_id, $context );
- /wp-includes/post.php
- $value = apply_filters( $field, $value, $post_id, $context );
- /wp-includes/bookmark.php
- $value = apply_filters( $field, $value, $bookmark_id, $context );