__return_empty_string(): string

Returns an empty string.


Description

Useful for returning an empty string to filters easily.

Top ↑

See also


Top ↑

Return

string Empty string.


Top ↑

More Information

Usage:

// This will add a filter on `example_filter` that returns an empty string
add_filter( 'example_filter', '__return_empty_string' );


Top ↑

Source

File: wp-includes/functions.php. View all references

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

Top ↑

Changelog

Changelog
Version Description
3.7.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.