WP_Customize_Nav_Menus::make_auto_draft_status_previewable() WordPress Method
The WP_Customize_Nav_Menus::make_auto_draft_status_previewable() method is used to make auto-draft status posts previewable in the Customizer. This is useful for making sure that changes made to nav menus in the Customizer are not lost when the Customizer is closed.
WP_Customize_Nav_Menus::make_auto_draft_status_previewable() #
Makes the auto-draft status protected so that it can be queried.
Source
File: wp-includes/class-wp-customize-nav-menus.php
public function make_auto_draft_status_previewable() { global $wp_post_statuses; $wp_post_statuses['auto-draft']->protected = true; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |