WordPress.org

Make WordPress Core

Ticket #35031: 35031.patch

File 35031.patch, 719 bytes (added by rommelxcastro, 4 years ago)

define order by on redirect_guess_404_permalink

  • wp-includes/canonical.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    587587                if ( get_query_var('day') )
    588588                        $where .= $wpdb->prepare(" AND DAYOFMONTH(post_date) = %d", get_query_var('day'));
    589589
    590                 $post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish'");
     590                $post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish' ORDER BY post_name ASC");
    591591                if ( ! $post_id )
    592592                        return false;
    593593                if ( get_query_var( 'feed' ) )