__return_empty_string()

Returns an empty string.


Description Description

Useful for returning an empty string to filters easily.

See also See also


Top ↑

Return Return

(string) Empty string.


Top ↑

More Information 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 Source

File: wp-includes/functions.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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