From d5427d9210e45fb524e354e2be566d7ca618829b Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 1 Mar 2010 08:50:27 +0000 Subject: [PATCH] Add __return_true() to complement __return_false(). see #12381 git-svn-id: http://svn.automattic.com/wordpress/trunk@13526 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index a2113e501..b7b010941 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -4047,11 +4047,24 @@ function _search_terms_tidy($t) { return trim($t, "\"'\n\r "); } +/** + * Returns true + * + * Useful for returning true to filters easily + * + * @see __return_false() + * @return bool true + */ +function __return_true() { + return true; +} + /** * Returns false * * Useful for returning false to filters easily - * + * + * @see __return_true() * @return bool false */ function __return_false() {