Introduce __return_zero() and use it instead of create_function in the login header.

Also add version info to __return_true and __return_false.

git-svn-id: https://develop.svn.wordpress.org/trunk@14639 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2010-05-14 16:46:53 +00:00
parent db0df6a9c0
commit 81b12ac87e
2 changed files with 16 additions and 1 deletions

View File

@@ -4128,6 +4128,7 @@ function _search_terms_tidy($t) {
*
* Useful for returning true to filters easily
*
* @since 3.0.0
* @see __return_false()
* @return bool true
*/
@@ -4140,6 +4141,7 @@ function __return_true() {
*
* Useful for returning false to filters easily
*
* @since 3.0.0
* @see __return_true()
* @return bool false
*/
@@ -4147,6 +4149,19 @@ function __return_false() {
return false;
}
/**
* Returns 0
*
* Useful for returning 0 to filters easily
*
* @since 3.0.0
* @see __return_zero()
* @return int 0
*/
function __return_zero() {
return 0;
}
/**
* Send a HTTP header to disable content type sniffing in browsers which support it.
*