__return_zero() WordPress Function

__return_zero() is a WordPress function that returns 0 (zero). It is useful for returning a numeric value from a function that doesn't return anything by default. This function is also useful for returning a specific value from a function that returns a generic value (such as an array).

__return_zero() #

Returns 0.


Description

Useful for returning 0 to filters easily.


Top ↑

Return

(int) 0.


Top ↑

Source

File: wp-includes/functions.php

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

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