Ticket #4529: 4529-fixes.diff
| File 4529-fixes.diff, 2.2 KB (added by caesarsgrunt, 3 years ago) |
|---|
-
wp-includes/comment.php
892 892 893 893 do_action('untrash_comment', $comment_id); 894 894 895 $comment = array('comment_ID' => $comment_id); 896 897 $status = get_comment_meta($comment_id, '_wp_trash_meta_status', true); 895 $status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true); 898 896 if ( empty($status) ) 899 897 $status = '0'; 900 898 901 $comment['comment_approved'] = $status; 902 903 if ( wp_update_comment($comment) ) { 899 if ( wp_set_comment_status($comment_id, $status) ) { 904 900 delete_comment_meta($comment_id, '_wp_trash_meta_time'); 905 901 delete_comment_meta($comment_id, '_wp_trash_meta_status'); 906 902 do_action('untrashed_comment', $comment_id); … … 951 947 952 948 do_action('unspam_comment', $comment_id); 953 949 954 $status = get_comment_meta($comment_id, '_wp_trash_meta_status', true);950 $status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true); 955 951 if ( empty($status) ) 956 952 $status = '0'; 957 953 958 if ( wp_set_comment_status($comment_id, "$status") ) {954 if ( wp_set_comment_status($comment_id, $status) ) { 959 955 delete_comment_meta($comment_id, '_wp_trash_meta_status'); 960 956 do_action('unspammed_comment', $comment_id); 961 957 return true; -
wp-admin/upload.php
206 206 $messages[1] = __('Media attachment updated.'); 207 207 $messages[2] = __('Media permanently deleted.'); 208 208 $messages[3] = __('Error saving media attachment.'); 209 $messages[4] = __('Media moved to the trash.') . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='. $_GET['ids'], "bulk-media" ) ) . '">' . __('Undo?') . '</a>';209 $messages[4] = __('Media moved to the trash.') . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo?') . '</a>'; 210 210 $messages[5] = __('Media restored from the trash.'); 211 211 212 212 if ( isset($_GET['message']) && (int) $_GET['message'] ) {
