unregister_default_headers( string|array $header )

Unregisters default headers.


Description Description

This function must be called after register_default_headers() has already added the header you want to remove.

See also See also


Top ↑

Parameters Parameters

$header

(string|array) (Required) The header string id (key of array) to remove, or an array thereof.


Top ↑

Return Return

(bool|void) A single header returns true on success, false on failure. There is currently no return value for multiple headers.


Top ↑

Source Source

File: wp-includes/theme.php

function unregister_default_headers( $header ) {
	global $_wp_default_headers;
	if ( is_array( $header ) ) {
		array_map( 'unregister_default_headers', $header );
	} elseif ( isset( $_wp_default_headers[ $header ] ) ) {
		unset( $_wp_default_headers[ $header ] );
		return true;
	} else {
		return false;
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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