_enable_content_editor_for_navigation_post_type()
This callback enables content editor for wp_navigation type posts. We need to enable it back because we disable it to hide the content editor for wp_navigation type posts.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Returns
null. Nothing (null).
Usage
_enable_content_editor_for_navigation_post_type( $post );
- $post(WP_Post) (required)
- An instance of WP_Post class.
Notes
Changelog
| Since 5.9.0 | Introduced. |
_enable_content_editor_for_navigation_post_type() enable content editor for navigation post type code WP 7.0.1
function _enable_content_editor_for_navigation_post_type( $post ) {
$post_type = get_post_type( $post );
if ( 'wp_navigation' !== $post_type ) {
return;
}
add_post_type_support( $post_type, 'editor' );
}