diff --git src/wp-includes/theme.php src/wp-includes/theme.php
index a36fe79..c1c9c24 100644
|
|
|
function _wp_customize_include() {
|
| 2549 | 2549 | * @param WP_Post $changeset_post Changeset post object. |
| 2550 | 2550 | */ |
| 2551 | 2551 | function _wp_customize_publish_changeset( $new_status, $old_status, $changeset_post ) { |
| 2552 | | global $wp_customize; |
| | 2552 | global $wp_customize, $wpdb; |
| 2553 | 2553 | |
| 2554 | 2554 | $is_publishing_changeset = ( |
| 2555 | 2555 | 'customize_changeset' === $changeset_post->post_type |
| … |
… |
function _wp_customize_publish_changeset( $new_status, $old_status, $changeset_p
|
| 2600 | 2600 | * and thus garbage collected. |
| 2601 | 2601 | */ |
| 2602 | 2602 | if ( ! wp_revisions_enabled( $changeset_post ) ) { |
| | 2603 | $has_kses = ( false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ) ); |
| | 2604 | if ( $has_kses ) { |
| | 2605 | kses_remove_filters(); // Prevent KSES from corrupting JSON in post_content. |
| | 2606 | } |
| 2603 | 2607 | wp_trash_post( $changeset_post->ID ); |
| | 2608 | if ( $has_kses ) { |
| | 2609 | kses_init_filters(); |
| | 2610 | } |
| | 2611 | // @todo Remove '__trashed' suffix from post_name. |
| | 2612 | // @todo Should wp_trash_post() be used at all? Or should an approach like wp_publish_post() be used? |
| 2604 | 2613 | } |
| 2605 | 2614 | } |
| 2606 | 2615 | |