Title: WP_Filter_Sentinel
Published: August 20, 2026

---

# class WP_Filter_Sentinel {}

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_filter_sentinel/?output_format=md#description)
 * [Source](https://developer.wordpress.org/reference/classes/wp_filter_sentinel/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_filter_sentinel/?output_format=md#changelog)

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

Marker object used as a filter’s default value when any user value — including `
null`, `false`, or arbitrary objects — must remain distinguishable from the “no 
filter modified this” case.

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

Each instance is unique by identity. Compare returned values with `===` against 
the original sentinel to detect that no filter callback replaced it.

Filter callbacks that want to pass through without modifying the value should return
the received value unchanged. Returning a freshly constructed `WP_Filter_Sentinel`
is treated as a replacement, not as pass-through.

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

    ```php
    final class WP_Filter_Sentinel {}
    ```

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

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

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

## User Contributed Notes

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