Ticket #15950: 15950.patch
| File 15950.patch, 633 bytes (added by johnbillion, 2 years ago) |
|---|
-
wp-includes/canonical.php
403 403 if ( get_query_var('day') ) 404 404 $where .= $wpdb->prepare(" AND DAYOFMONTH(post_date) = %d", get_query_var('day')); 405 405 406 $post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish' ");406 $post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish' ORDER BY post_parent ASC"); 407 407 if ( !$post_id ) 408 408 return false; 409 409 return get_permalink($post_id);
