mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
posts_nav_link fixes. http://wordpress.org/support/6/6979
git-svn-id: http://svn.automattic.com/wordpress/trunk@1391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
713e887711
commit
1139d6fd36
@ -335,10 +335,12 @@ function get_pagenum_link($pagenum = 1){
|
||||
}
|
||||
|
||||
$home_root = str_replace('http://', '', trim(get_settings('home')));
|
||||
$home_root = preg_replace('|([^/]*)(.*)|i', '$2', $home_root);
|
||||
$home_root = preg_replace('|/+|i', '/', $home_root);
|
||||
$qstr = str_replace($home_root . '/', '', $qstr);
|
||||
$home_root = trailingslashit($home_root);
|
||||
$qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
|
||||
$qstr = preg_replace('|^/+|', '', $qstr);
|
||||
return preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . trailingslashit($qstr) );
|
||||
return preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . $qstr );
|
||||
}
|
||||
|
||||
function next_posts($max_page = 0) { // original by cfactor at cooltux.org
|
||||
|
Loading…
Reference in New Issue
Block a user