Fix clean URL issues with non-standard setups

This commit is contained in:
Ben Word
2013-05-01 15:51:59 -05:00
parent ec94cfb2f5
commit a8c543753a
5 changed files with 6 additions and 59 deletions

View File

@@ -85,29 +85,6 @@ function roots_title() {
}
}
/**
* Return WordPress subdirectory if applicable
*/
function wp_base_dir() {
preg_match('!(https?://[^/|"]+)([^"]+)?!', site_url(), $matches);
if (count($matches) === 3) {
return end($matches);
} else {
return '';
}
}
/**
* Opposite of built in WP functions for trailing slashes
*/
function leadingslashit($string) {
return '/' . unleadingslashit($string);
}
function unleadingslashit($string) {
return ltrim($string, '/');
}
function add_filters($tags, $function) {
foreach($tags as $tag) {
add_filter($tag, $function);