Make WordPress Core

Ticket #38539: 38539.0.diff

File 38539.0.diff, 717 bytes (added by westonruter, 8 years ago)
  • src/wp-includes/class-wp-customize-manager.php

    diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
    index ec0fa8d..8fd1a67 100644
    final class WP_Customize_Manager { 
    959959                // Posts & pages.
    960960                if ( ! empty( $posts ) ) {
    961961                        foreach ( array_keys( $posts ) as $post_symbol ) {
     962                                if ( empty( $posts[ $post_symbol ]['post_name'] ) ) {
     963                                        $posts[ $post_symbol ]['post_name'] = sanitize_title( $posts[ $post_symbol ]['post_title'] );
     964                                }
     965
    962966                                $posts[ $post_symbol ]['ID'] = wp_insert_post( wp_slash( array_merge(
    963967                                        $posts[ $post_symbol ],
    964968                                        array( 'post_status' => 'auto-draft' )