Ticket #1235: paging_regex.diff
| File paging_regex.diff, 1.4 KB (added by , 21 years ago) |
|---|
-
wp-includes/classes.php
253 253 $q['posts_per_page'] = get_settings('posts_per_rss'); 254 254 $q['what_to_show'] = 'posts'; 255 255 } 256 257 if (isset($q['page'])) { 258 $q['page'] = trim($q['page'], '/'); 259 $q['page'] = (int) $q['page']; 260 } 256 261 257 262 $add_hours = intval(get_settings('gmt_offset')); 258 263 $add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours)); … … 1123 1128 $post = 1; 1124 1129 $trackbackmatch = $match . $trackbackregex; 1125 1130 $trackbackquery = $trackbackindex . '?' . $query . '&tb=1'; 1126 $match = $match . '?([0-9]+)?/?$'; 1131 $match = rtrim($match, '/'); 1132 $match = $match . '(/[0-9]+)?/?$'; 1127 1133 $query = $index . '?' . $query . '&page=' . $this->preg_index($num_toks + 1); 1128 1134 } else { 1129 1135 $match .= '?$'; -
wp-includes/functions.php
879 879 $day = mysql2date('d.m.y', $post->post_date); 880 880 $currentmonth = mysql2date('m', $post->post_date); 881 881 $numpages = 1; 882 $page = get_query_var('page'); 882 883 if (!$page) 883 884 $page = 1; 884 if (is set($p))885 if (is_single() || is_page()) 885 886 $more = 1; 886 887 $content = $post->post_content; 887 888 if (preg_match('/<!--nextpage-->/', $content)) {