__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.
Contents
Description
Useful for returning 0 to filters easily.
Return
(int) 0.
Source
File: wp-includes/functions.php
function __return_zero() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore return 0; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |