Ticket #35163: remove_query_string.patch
| File remove_query_string.patch, 2.4 KB (added by , 10 years ago) |
|---|
-
wp-includes/general-template.php
1489 1489 * 1490 1490 * @param string $link_html The archive HTML link content. 1491 1491 */ 1492 //var_dump('hoge'.$link_html); 1493 //var_dump(apply_filters( 'get_archives_link', $link_html )); 1492 1494 return apply_filters( 'get_archives_link', $link_html ); 1493 1495 } 1494 1496 … … 1623 1625 $after = $r['after']; 1624 1626 foreach ( (array) $results as $result ) { 1625 1627 $url = get_month_link( $result->year, $result->month ); 1626 if ( 'post' !== $r['post_type'] ) {1627 $url = add_query_arg( 'post_type', $r['post_type'], $url );1628 }1629 1628 /* translators: 1: month name, 2: 4-digit year */ 1630 1629 $text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $result->month ), $result->year ); 1631 1630 if ( $r['show_post_count'] ) { … … 1646 1645 $after = $r['after']; 1647 1646 foreach ( (array) $results as $result) { 1648 1647 $url = get_year_link( $result->year ); 1649 if ( 'post' !== $r['post_type'] ) {1650 $url = add_query_arg( 'post_type', $r['post_type'], $url );1651 }1652 1648 $text = sprintf( '%d', $result->year ); 1653 1649 if ( $r['show_post_count'] ) { 1654 1650 $r['after'] = ' (' . $result->posts . ')' . $after; … … 1668 1664 $after = $r['after']; 1669 1665 foreach ( (array) $results as $result ) { 1670 1666 $url = get_day_link( $result->year, $result->month, $result->dayofmonth ); 1671 if ( 'post' !== $r['post_type'] ) {1672 $url = add_query_arg( 'post_type', $r['post_type'], $url );1673 }1674 1667 $date = sprintf( '%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth ); 1675 1668 $text = mysql2date( $archive_day_date_format, $date ); 1676 1669 if ( $r['show_post_count'] ) { … … 1699 1692 $arc_week_start = date_i18n( $archive_week_start_date_format, $arc_week['start'] ); 1700 1693 $arc_week_end = date_i18n( $archive_week_end_date_format, $arc_week['end'] ); 1701 1694 $url = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week ); 1702 if ( 'post' !== $r['post_type'] ) {1703 $url = add_query_arg( 'post_type', $r['post_type'], $url );1704 }1705 1695 $text = $arc_week_start . $archive_week_separator . $arc_week_end; 1706 1696 if ( $r['show_post_count'] ) { 1707 1697 $r['after'] = ' (' . $result->posts . ')' . $after;