diff --git a/inc/roots-cleanup.php b/inc/roots-cleanup.php index dc302fe..aa707e7 100644 --- a/inc/roots-cleanup.php +++ b/inc/roots-cleanup.php @@ -77,12 +77,12 @@ add_filter('get_search_query', 'roots_search_query'); // thanks to Scott Walkinshaw (scottwalkinshaw.com) function roots_root_relative_url($input) { preg_match('/(https?:\/\/[^\/|"]+)/', $input, $matches); - // make sure we aren't making external links relative - if (isset($matches[0]) && strpos($matches[0], site_url()) === false) { - return $input; - } else { - return str_replace(end($matches), '', $input); - } + // make sure we aren't making external links relative + if (isset($matches[0]) && strpos($matches[0], site_url()) === false) { + return $input; + } else { + return str_replace(end($matches), '', $input); + } } add_filter('bloginfo_url', 'roots_root_relative_url'); @@ -107,7 +107,7 @@ add_filter('the_author_posts_link', 'roots_root_relative_url'); // Leaving plugins_url alone in admin to avoid potential issues (such as Gravity Forms) if (!is_admin()) { - add_filter('plugins_url', 'roots_root_relative_url'); + add_filter('plugins_url', 'roots_root_relative_url'); } // remove root relative URLs on any attachments in the feed @@ -349,42 +349,42 @@ function roots_nav_menu_args($args = '') { add_filter('wp_nav_menu_args', 'roots_nav_menu_args'); class roots_nav_walker extends Walker_Nav_Menu { - function start_el(&$output, $item, $depth, $args) { - global $wp_query; - $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; + function start_el(&$output, $item, $depth, $args) { + global $wp_query; + $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; - $slug = sanitize_title($item->title); + $slug = sanitize_title($item->title); - $class_names = $value = ''; - $classes = empty( $item->classes ) ? array() : (array) $item->classes; + $class_names = $value = ''; + $classes = empty( $item->classes ) ? array() : (array) $item->classes; - $classes = array_filter($classes, 'roots_check_current'); + $classes = array_filter($classes, 'roots_check_current'); - $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); - $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; + $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); + $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; - $id = apply_filters( 'nav_menu_item_id', 'menu-' . $slug, $item, $args ); - $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : ''; + $id = apply_filters( 'nav_menu_item_id', 'menu-' . $slug, $item, $args ); + $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : ''; - $output .= $indent . '