WordPress at a glance
function is not described

WP_Customize_Nav_Menus::make_auto_draft_status_previewable() public WP 4.7.0

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

{} It's a method of the class: WP_Customize_Nav_Menus{}

No Hooks.

Return

````. Null. Nothing.

Usage

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

Notes

  • Global. Array. $wp_post_statuses List of post statuses.

Changelog

Since 4.7.0 Introduced.

Code of WP_Customize_Nav_Menus::make_auto_draft_status_previewable() WP 5.7

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