__return_empty_string(): string

Returns an empty string.

Description

Useful for returning an empty string to filters easily.

See also

Return

string Empty string.

More Information

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

Source

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

Changelog

VersionDescription
3.7.0Introduced.

User Contributed Notes

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