Title: WP_Customize_Nav_Menus::make_auto_draft_status_previewable
Published: December 6, 2016
Last modified: May 20, 2026

---

# WP_Customize_Nav_Menus::make_auto_draft_status_previewable()

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_nav_menus/make_auto_draft_status_previewable/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_nav_menus/make_auto_draft_status_previewable/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_customize_nav_menus/make_auto_draft_status_previewable/?output_format=md#wp--skip-link--target)

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

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_customize_nav_menus/make_auto_draft_status_previewable/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-nav-menus.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-customize-nav-menus.php#L1359)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-customize-nav-menus.php#L1359-L1362)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_nav_menus/make_auto_draft_status_previewable/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.7.0](https://developer.wordpress.org/reference/since/4.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_nav_menus%2Fmake_auto_draft_status_previewable%2F)
before being able to contribute a note or feedback.