{$field}

{$field}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('{$field}') is found 3 times:

  • /wp-includes/bookmark.php line 443
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
        /** This filter is documented in wp-includes/post.php */
        $value = apply_filters( "pre_{$field}", $value );
    } else {
        /** This filter is documented in wp-includes/post.php */
        $value = apply_filters( "{$field}", $value, $bookmark_id, $context );
     
        if ( 'attribute' === $context ) {
            $value = esc_attr( $value );
        } elseif ( 'js' === $context ) {
            $value = esc_js( $value );
        }
  • /wp-includes/post.php line 3137
    3133
    3134
    3135
    3136
    3137
    3138
    3139
    3140
    3141
    3142
    3143
         * @param string $context Context for how to sanitize the field.
         *                        Accepts 'raw', 'edit', 'db', 'display',
         *                        'attribute', or 'js'. Default 'display'.
         */
        $value = apply_filters( "{$field}", $value, $post_id, $context );
    } else {
        /**
         * Filters the value of a specific post field for display.
         *
         * Only applied to post fields name which is *not* prefixed with `post_`.
         *
  • /wp-includes/user.php line 1868
    1864
    1865
    1866
    1867
    1868
    1869
    1870
    1871
    1872
    1873
    1874
    // Use display filters by default.
    if ( $prefixed ) {
     
        /** This filter is documented in wp-includes/post.php */
        $value = apply_filters( "{$field}", $value, $user_id, $context );
    } else {
     
        /**
         * Filters the value of a user field in a standard context.
         *
         * The dynamic portion of the hook name, `$field`, refers to the prefixed user

See this hook used in plugins: