CoreFiles by mySites.guru
class-wp-filter-sentinel.php25 lines, 760 bytes, from wordpress-7.1.4.zip
Raw History Compare with 7.1.3
md5
9afdfe0f074044f4919e1bacaf08fa16
sha1
f5a6d70ec59140ac6244d436469f761487f34230
sha256
68c9c675d3805a343835728d98a0efedf0df9833cb904bebf909c7e0fda5c61c
<?php
/**
 * Filter Sentinel API.
 *
 * @package WordPress
 * @since 7.1.0
 */

declare( strict_types = 1 );

/**
 * 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.
 *
 * 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.
 *
 * @since 7.1.0
 */
final class WP_Filter_Sentinel {}

The same content is in 19 releases, WordPress 7.1-beta1 to 7.2-beta5. See them all, or every version of this file.