Remove nav walker and Bootstrap navbar

This commit is contained in:
Ben Word
2015-04-14 14:25:20 -05:00
parent 9efeb67daf
commit 64e78cf003
5 changed files with 5 additions and 173 deletions

View File

@@ -11,38 +11,3 @@ function get_search_form() {
return $form;
}
add_filter('get_search_form', __NAMESPACE__ . '\\get_search_form');
/**
* Make a URL relative
*/
function root_relative_url($input) {
preg_match('|https?://([^/]+)(/.*)|i', $input, $matches);
if (!isset($matches[1]) || !isset($matches[2])) {
return $input;
} elseif (($matches[1] === $_SERVER['SERVER_NAME']) || $matches[1] === $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT']) {
return wp_make_link_relative($input);
} else {
return $input;
}
}
/**
* Compare URL against relative URL
*/
function url_compare($url, $rel) {
$url = trailingslashit($url);
$rel = trailingslashit($rel);
if ((strcasecmp($url, $rel) === 0) || root_relative_url($url) == $rel) {
return true;
} else {
return false;
}
}
/**
* Check if element is empty
*/
function is_element_empty($element) {
$element = trim($element);
return !empty($element);
}