Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Ensure wp_insert_post_empty_content filter gets removed after trashing #214

Merged
merged 1 commit into from
Aug 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions php/class-wp-customize-post-setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ protected function update( $data ) {

if ( $transition_to_trash ) {
$result = wp_trash_post( $this->post_id );
}

if ( $is_trashed ) {
remove_filter( 'wp_insert_post_empty_content', '__return_false', 100 );
}

Expand Down