From bf1ff3c7e6671b8b50bd33b81d50b8f0386ee272 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 20 Dec 2011 20:58:30 +0000 Subject: [PATCH] Add `__return_null()` to complement the existing true, false, zero, and empty array methods. props johnbillion, fixes #18845. git-svn-id: http://svn.automattic.com/wordpress/trunk@19607 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 0a4f49206..bed84abb6 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3501,6 +3501,18 @@ function __return_empty_array() { return array(); } +/** + * Returns null. + * + * Useful for returning null to filters easily. + * + * @since 3.3.0 + * @return null + */ +function __return_null() { + return null; +} + /** * Send a HTTP header to disable content type sniffing in browsers which support it. *