WordPress.org

Make WordPress Core

Ticket #39610: 39610.0.diff

File 39610.0.diff, 705 bytes (added by westonruter, 3 years ago)
  • src/wp-includes/class-wp-customize-nav-menus.php

    diff --git src/wp-includes/class-wp-customize-nav-menus.php src/wp-includes/class-wp-customize-nav-menus.php
    index 28e8196917..955ce1a82f 100644
    final class WP_Customize_Nav_Menus { 
    786786         * @return WP_Post|WP_Error Inserted auto-draft post object or error.
    787787         */
    788788        public function insert_auto_draft_post( $postarr ) {
    789                 if ( ! isset( $postarr['post_type'] ) || ! post_type_exists( $postarr['post_type'] ) ) {
     789                if ( ! isset( $postarr['post_type'] ) ) {
    790790                        return new WP_Error( 'unknown_post_type', __( 'Invalid post type.' ) );
    791791                }
    792792                if ( empty( $postarr['post_title'] ) ) {