WordPress.org

Make WordPress Core

Ticket #49871: 49871.diff

File 49871.diff, 678 bytes (added by Jules Colle, 20 months ago)

show permalink instead of guid for scheduled posts

  • src/wp-includes/link-template.php

    diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php
    index 9dbbf4931f..eefc966114 100644
    a b function get_permalink( $post = 0, $leavename = false ) { 
    165165         */
    166166        $permalink = apply_filters( 'pre_post_link', $permalink, $post, $leavename );
    167167
    168         if ( '' != $permalink && ! in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft', 'future' ), true ) ) {
     168        if ( '' != $permalink && ! in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ), true ) ) {
    169169
    170170                $category = '';
    171171                if ( strpos( $permalink, '%category%' ) !== false ) {