Make WordPress Core


Ignore:
Timestamp:
02/21/2017 07:01:07 AM (6 years ago)
Author:
dd32
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).

Props westonruter.
Merges [39924] to the 4.7 branch.
See #38615, #38114.
Fixes #39610.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/class-wp-customize-nav-menus.php

    r40095 r40098  
    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', __( 'Unknown post type' ) );
    791791        }
Note: See TracChangeset for help on using the changeset viewer.