__return_null() WordPress Function

The return_null() function is a WordPress function that returns a null value. This function is useful for returning a value from a function when you don't want to return anything.

__return_null() #

Returns null.


Description

Useful for returning null to filters easily.


Top ↑

Return

(null) Null value.


Top ↑

Source

File: wp-includes/functions.php

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

Top ↑

Changelog

Changelog
VersionDescription
3.4.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