Make WordPress Core

Ticket #20571: 20571.diff

File 20571.diff, 714 bytes (added by jarednova, 12 years ago)

Fixes #20571 -- allows editing of slug when rewrite is off

  • wp-includes/link-template.php

    diff --git i/wp-includes/link-template.php w/wp-includes/link-template.php
    index 7197549..a0167eb 100644
    i w function get_post_permalink( $id = 0, $leavename = false, $sample = false ) { 
    200200                $post_link = home_url( user_trailingslashit($post_link) );
    201201        } else {
    202202                if ( $post_type->query_var && ( isset($post->post_status) && !$draft_or_pending ) )
    203                         $post_link = add_query_arg($post_type->query_var, $slug, '');
     203                        $post_link = add_query_arg($post_type->query_var, '%postname%', '');
    204204                else
    205205                        $post_link = add_query_arg(array('post_type' => $post->post_type, 'p' => $post->ID), '');
    206206                $post_link = home_url($post_link);