Ticket #29808: 29808.7.diff
File 29808.7.diff, 3.8 KB (added by , 10 years ago) |
---|
-
src/wp-includes/link-template.php
2195 2195 * @param array $args { 2196 2196 * Optional. Default post navigation arguments. 2197 2197 * 2198 * @type string $prev_text Anchor text to display in the previous post link. 2199 * Default: `<span class="meta-nav">←</span> %title`. 2200 * @type string $next_text Anchor text to display in the next post link. 2201 * Default: `%title <span class="meta-nav">→</span>`. 2198 * @type string $prev_text Anchor text to display in the previous post link. Default: `%title`. 2199 * @type string $next_text Anchor text to display in the next post link. Default: `%title`. 2202 2200 * } 2203 2201 * @return string Markup for post links. 2204 2202 */ 2205 2203 function get_the_post_navigation( $args = array() ) { 2206 2204 $args = wp_parse_args( $args, array( 2207 'prev_text' => _x( '<span class="meta-nav">←</span> %title', 'Previous post link' ),2208 'next_text' => _x( '%title <span class="meta-nav">→</span>', 'Next post link' ),2205 'prev_text' => '%title', 2206 'next_text' => '%title', 2209 2207 ) ); 2210 2208 2211 2209 $navigation = ''; … … 2241 2239 * @param array $args { 2242 2240 * Optional. Default paging navigation arguments. 2243 2241 * 2244 * @type string $prev_text Anchor text to display in the previous posts link. 2245 * Default: `<span class="meta-nav">←</span> Older posts`. 2246 * @type string $next_text Anchor text to display in the next posts link. 2247 * Default: `Newer posts <span class="meta-nav">→</span>`. 2242 * @type string $prev_text Anchor text to display in the previous posts link. Default: `Older posts`. 2243 * @type string $next_text Anchor text to display in the next posts link. Default: `Newer posts`. 2248 2244 * } 2249 2245 * @return string Markup for paging links. 2250 2246 */ … … 2254 2250 // Don't print empty markup if there's only one page. 2255 2251 if ( $GLOBALS['wp_query']->max_num_pages > 1 ) { 2256 2252 $args = wp_parse_args( $args, array( 2257 'prev_text' => __( ' <span class="meta-nav">←</span>Older posts' ),2258 'next_text' => __( 'Newer posts <span class="meta-nav">→</span>' ),2253 'prev_text' => __( 'Older posts' ), 2254 'next_text' => __( 'Newer posts' ), 2259 2255 ) ); 2260 2256 2261 2257 $next_link = get_next_posts_link( $args['prev_text'] ); … … 2306 2302 * @type int $total The total amount of pages. Default: Value of 'max_num_pages' of current query. 2307 2303 * @type int $current The current page number. Default: Value of 'paged' query var. 2308 2304 * @type bool $prev_next Whether to include previous and next links. Default: true. 2309 * @type string $prev_text Anchor text to display in the previous posts link. Default: ` ←Previous`.2310 * @type string $next_text Anchor text to display in the next posts link. Default: `Next →`.2305 * @type string $prev_text Anchor text to display in the previous posts link. Default: `Previous`. 2306 * @type string $next_text Anchor text to display in the next posts link. Default: `Next`. 2311 2307 * @type bool $show_all Whether to show all pages. 2312 2308 * Default: false, shows short list of the pages near the current page. 2313 2309 * @type int $end_size Amount of numbers on either the start and the end list edges. Default: 1. … … 2327 2323 if ( $GLOBALS['wp_query']->max_num_pages > 1 ) { 2328 2324 $args = wp_parse_args( $args, array( 2329 2325 'mid_size' => 1, 2330 'prev_text' => __( ' ←Previous' ),2331 'next_text' => __( 'Next →' ),2326 'prev_text' => __( 'Previous' ), 2327 'next_text' => __( 'Next' ), 2332 2328 ) ); 2333 2329 // Make sure we get plain links, so we can work with it. 2334 2330 $args['type'] = 'plain';