WP_Customize_Nav_Menus::make_auto_draft_status_previewable()publicWP 4.7.0

Makes the auto-draft status protected so that it can be queried.

Method of the class: WP_Customize_Nav_Menus{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Customize_Nav_Menus = new WP_Customize_Nav_Menus();
$WP_Customize_Nav_Menus->make_auto_draft_status_previewable();

Notes

  • Global. stdClass[]. $wp_post_statuses List of post statuses.

Changelog

Since 4.7.0 Introduced.

WP_Customize_Nav_Menus::make_auto_draft_status_previewable() code WP 6.4.3

public function make_auto_draft_status_previewable() {
	global $wp_post_statuses;
	$wp_post_statuses['auto-draft']->protected = true;
}