WP_Customize_Nav_Menus::make_auto_draft_status_previewable
Makes the auto-draft status protected so that it can be queried.
Method of the class: WP_Customize_Nav_Menus{}
No Hooks.
Returns
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_statusesList of post statuses.
Changelog
| Since 4.7.0 | Introduced. |
WP_Customize_Nav_Menus::make_auto_draft_status_previewable() WP Customize Nav Menus::make auto draft status previewable code WP 6.9.1
public function make_auto_draft_status_previewable() {
global $wp_post_statuses;
$wp_post_statuses['auto-draft']->protected = true;
}