HTTP/2 301
server: nginx
date: Mon, 29 Dec 2025 14:58:30 GMT
content-type: text/html; charset=UTF-8
location: https://developer.wordpress.org/reference/functions/__return_empty_string/
x-content-type-options: nosniff
content-language: en
x-ua-compatible: IE=Edge
vary: Accept-Encoding, Cookie
expires: Thu, 01 Jan 1970 00:00:00 GMT
cache-control: no-cache, no-store, max-age=0, must-revalidate
pragma: no-cache
alt-svc: h3=":443"; ma=86400
strict-transport-security: max-age=31536000
HTTP/2 200
server: nginx
date: Mon, 29 Dec 2025 14:58:32 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
__return_empty_string() – Function | Developer.WordPress.org
__return_empty_string(): string
Useful for returning an empty string to filters easily.
// This will add a filter on `example_filter` that returns an empty string
add_filter( 'example_filter', '__return_empty_string' );
function __return_empty_string() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
return '';
}
View all references View on Trac View on GitHub
| Version | Description |
|---|
| 3.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.