WordPress.org

Make WordPress Core

Ticket #6925: 6925.patch

File 6925.patch, 572 bytes (added by pishmishy, 10 years ago)

Makes changes to slug persistent on 'Save'

  • wp-admin/admin-ajax.php

     
    588588        $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
    589589        $title = isset($_POST['new_title'])? $_POST['new_title'] : '';
    590590        $slug = isset($_POST['new_slug'])? $_POST['new_slug'] : '';
     591        $wpdb->update( $wpdb->posts, array( 'post_name' => $slug ), array( 'ID' => $post_id ) );
    591592        die(get_sample_permalink_html($post_id, $title, $slug));
    592593break;
    593594default :