mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-07 22:24:36 +00:00
Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see #21767 git-svn-id: https://develop.svn.wordpress.org/trunk@23594 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -241,7 +241,7 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
|
||||
return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) );
|
||||
|
||||
$post = _wp_post_revision_fields( $post, $autosave );
|
||||
$post = add_magic_quotes($post); //since data is from db
|
||||
$post = wp_slash($post); //since data is from db
|
||||
|
||||
$revision_id = wp_insert_post( $post );
|
||||
if ( is_wp_error($revision_id) )
|
||||
@@ -320,7 +320,7 @@ function wp_restore_post_revision( $revision_id, $fields = null ) {
|
||||
|
||||
$update['ID'] = $revision['post_parent'];
|
||||
|
||||
$update = add_magic_quotes( $update ); //since data is from db
|
||||
$update = wp_slash( $update ); //since data is from db
|
||||
|
||||
$post_id = wp_update_post( $update );
|
||||
if ( is_wp_error( $post_id ) )
|
||||
|
||||
Reference in New Issue
Block a user