diff --git a/functions.php b/functions.php
index 62e8841..fef4745 100644
--- a/functions.php
+++ b/functions.php
@@ -1,10 +1,7 @@
\n";
}
-
add_action('init', 'roots_head_cleanup');
/**
@@ -80,7 +78,6 @@ function roots_language_attributes() {
return $output;
}
-
add_filter('language_attributes', 'roots_language_attributes');
/**
@@ -92,7 +89,6 @@ function roots_clean_style_tag($input) {
$media = $matches[3][0] === 'print' ? ' media="print"' : '';
return '' . "\n";
}
-
add_filter('style_loader_tag', 'roots_clean_style_tag');
/**
@@ -114,7 +110,6 @@ function roots_body_class($classes) {
return $classes;
}
-
add_filter('body_class', 'roots_body_class');
/**
@@ -204,7 +199,6 @@ if (roots_enable_root_relative_urls()) {
function roots_embed_wrap($cache, $url, $attr = '', $post_ID = '') {
return '
' . $cache . '
';
}
-
add_filter('embed_oembed_html', 'roots_embed_wrap', 10, 4);
add_filter('embed_googlevideo', 'roots_embed_wrap', 10, 2);
@@ -216,7 +210,6 @@ function roots_attachment_link_class($html) {
$html = str_replace('' . __('Continued', 'roots') . '';
}
-
add_filter('excerpt_length', 'roots_excerpt_length');
add_filter('excerpt_more', 'roots_excerpt_more');
@@ -393,7 +382,6 @@ add_filter('excerpt_more', 'roots_excerpt_more');
function roots_remove_self_closing_tags($input) {
return str_replace(' />', '>', $input);
}
-
add_filter('get_avatar', 'roots_remove_self_closing_tags'); //
add_filter('comment_id_fields', 'roots_remove_self_closing_tags'); //
add_filter('post_thumbnail_html', 'roots_remove_self_closing_tags'); //
@@ -403,10 +391,8 @@ add_filter('post_thumbnail_html', 'roots_remove_self_closing_tags'); //
*/
function roots_remove_default_description($bloginfo) {
$default_tagline = 'Just another WordPress site';
-
return ($bloginfo === $default_tagline) ? '' : $bloginfo;
}
-
add_filter('get_bloginfo_rss', 'roots_remove_default_description');
/**
@@ -423,7 +409,6 @@ function roots_change_mce_options($options) {
return $options;
}
-
add_filter('tiny_mce_before_init', 'roots_change_mce_options');
/**
@@ -463,7 +448,6 @@ function roots_widget_first_last_classes($params) {
return $params;
}
-
add_filter('dynamic_sidebar_params', 'roots_widget_first_last_classes');
/**
@@ -483,7 +467,6 @@ function roots_nice_search_redirect() {
exit();
}
}
-
if (current_theme_supports('nice-search')) {
add_action('template_redirect', 'roots_nice_search_redirect');
}
@@ -501,7 +484,6 @@ function roots_request_filter($query_vars) {
return $query_vars;
}
-
add_filter('request', 'roots_request_filter');
/**
@@ -512,5 +494,4 @@ function roots_get_search_form($argument) {
locate_template('/templates/searchform.php', true, false);
}
}
-
add_filter('get_search_form', 'roots_get_search_form');
diff --git a/lib/comments.php b/lib/comments.php
index 62f4c3e..5131fe2 100644
--- a/lib/comments.php
+++ b/lib/comments.php
@@ -1,11 +1,4 @@
\n";
}
}
+
+function roots_get_avatar($avatar) {
+ $avatar = str_replace("class='avatar", "class='avatar pull-left media-object", $avatar);
+ return $avatar;
+}
+add_filter('get_avatar', 'roots_get_avatar');
diff --git a/lib/config.php b/lib/config.php
index ae11d9b..e951476 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -1,5 +1,4 @@
', ' ', $item_html);
}
elseif (stristr($item_html, 'li class="divider')) {
- $item_html = preg_replace('/]*>.*?<\/a>/iU', '', $item_html);
+ $item_html = preg_replace('/]*>.*?<\/a>/iU', '', $item_html);
}
elseif (stristr($item_html, 'li class="nav-header')) {
$item_html = preg_replace('/]*>(.*)<\/a>/iU', '$1', $item_html);
- }
+ }
$output .= $item_html;
}
@@ -68,7 +67,6 @@ function roots_nav_menu_css_class($classes, $item) {
return array_filter($classes, 'is_element_empty');
}
-
add_filter('nav_menu_css_class', 'roots_nav_menu_css_class', 10, 2);
add_filter('nav_menu_item_id', '__return_null');
@@ -95,7 +93,4 @@ function roots_nav_menu_args($args = '') {
return array_merge($args, $roots_nav_menu_args);
}
-
add_filter('wp_nav_menu_args', 'roots_nav_menu_args');
-
-
diff --git a/lib/rewrites.php b/lib/rewrites.php
index 72286eb..e2db26d 100644
--- a/lib/rewrites.php
+++ b/lib/rewrites.php
@@ -15,7 +15,6 @@
*
* @link https://github.com/retlehs/roots/blob/master/doc/rewrites.md
*/
-
function roots_add_rewrites($content) {
global $wp_rewrite;
$roots_new_non_wp_rules = array(
diff --git a/lib/scripts.php b/lib/scripts.php
index 1e21047..0c0888a 100644
--- a/lib/scripts.php
+++ b/lib/scripts.php
@@ -1,6 +1,6 @@
s.parentNode.insertBefore(g,s)}(document,'script'));
diff --git a/lib/utils.php b/lib/utils.php
index cf688de..538ca41 100644
--- a/lib/utils.php
+++ b/lib/utils.php
@@ -1,7 +1,6 @@
__('Primary Sidebar', 'roots'),
'id' => 'sidebar-primary',
@@ -20,12 +22,14 @@ function roots_widgets_init() {
'after_title' => '',
));
- // Register widgets
+ // Widgets
register_widget('Roots_Vcard_Widget');
}
add_action('widgets_init', 'roots_widgets_init');
-// Example vCard widget
+/**
+ * Example vCard widget
+ */
class Roots_Vcard_Widget extends WP_Widget {
private $fields = array(
'title' => 'Title (optional)',