__return_false() WordPress Function

The __return_false() function is a built-in function in WordPress that returns the boolean value false. This function is commonly used in conditional tags to return false if a certain condition is not met.

__return_false() #

Returns false.


Description

Useful for returning false to filters easily.

Top ↑

See also


Top ↑

Return

(false) False.


Top ↑

Source

File: wp-includes/functions.php

function __return_false() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
	return false;
}

Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More