WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/19/2017 12:00:24 AM (3 years ago)
Author:
westonruter
Message:

Customize: Allow custom post types to be used in starter content.

Changes WP_Customize_Nav_Menus::insert_auto_draft_post() so it can be invoked for a post_type that is not registered (yet).

See #38615, #38114.
Fixes #39610.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r39756 r39924  
    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        }
Note: See TracChangeset for help on using the changeset viewer.