WordPress.org

Make WordPress Core

Changeset 1391


Ignore:
Timestamp:
06/07/2004 04:41:06 AM (14 years ago)
Author:
rboren
Message:

posts_nav_link fixes. http://wordpress.org/support/6/6979

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-links.php

    r1388 r1391  
    336336
    337337   $home_root = str_replace('http://', '', trim(get_settings('home')));
     338   $home_root = preg_replace('|([^/]*)(.*)|i', '$2', $home_root);
    338339   $home_root = preg_replace('|/+|i', '/', $home_root);
    339    $qstr = str_replace($home_root . '/', '', $qstr);
     340   $home_root = trailingslashit($home_root);
     341   $qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
    340342   $qstr = preg_replace('|^/+|', '', $qstr);
    341    return preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . trailingslashit($qstr) );
     343   return preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . $qstr );
    342344}
    343345
Note: See TracChangeset for help on using the changeset viewer.