mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-05 09:40:13 +00:00
Correctly slash post fields when trashing and untrashing posts.
Fixes #27550 Props dmenard, Denis-de-Bernardy git-svn-id: https://develop.svn.wordpress.org/trunk@34668 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2518,7 +2518,7 @@ function wp_trash_post( $post_id = 0 ) {
|
||||
add_post_meta($post_id,'_wp_trash_meta_time', time());
|
||||
|
||||
$post['post_status'] = 'trash';
|
||||
wp_insert_post($post);
|
||||
wp_insert_post( wp_slash( $post ) );
|
||||
|
||||
wp_trash_post_comments($post_id);
|
||||
|
||||
@@ -2565,7 +2565,7 @@ function wp_untrash_post( $post_id = 0 ) {
|
||||
delete_post_meta($post_id, '_wp_trash_meta_status');
|
||||
delete_post_meta($post_id, '_wp_trash_meta_time');
|
||||
|
||||
wp_insert_post($post);
|
||||
wp_insert_post( wp_slash( $post ) );
|
||||
|
||||
wp_untrash_post_comments($post_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user