Merge branch 'master' into grunt

This commit is contained in:
Ben Word
2013-04-10 10:15:45 -05:00
10 changed files with 148 additions and 154 deletions

View File

@@ -138,9 +138,9 @@ add_filter('body_class', 'roots_body_class');
* @author Scott Walkinshaw <scott.walkinshaw@gmail.com>
*/
function roots_root_relative_url($input) {
// fix for site_url != home_url()
if(!is_admin() && site_url() != home_url() && stristr($input, 'wp-includes') === false) {
$input = str_replace(site_url(), "", $input);
// Fix for site_url() != home_url()
if (!is_admin() && site_url() != home_url() && stristr($input, 'wp-includes') === false) {
$input = str_replace(site_url(), '', $input);
}
$output = preg_replace_callback(
@@ -158,10 +158,10 @@ function roots_root_relative_url($input) {
);
// detect and correct for subdir installs
if($subdir = parse_url(home_url(), PHP_URL_PATH)) {
if(substr($output, 0, strlen($subdir)) == (substr($output, strlen($subdir), strlen($subdir)))) {
$output = substr($output, strlen($subdir));
}
if ($subdir = parse_url(home_url(), PHP_URL_PATH)) {
if (substr($output, 0, strlen($subdir)) == (substr($output, strlen($subdir), strlen($subdir)))) {
$output = substr($output, strlen($subdir));
}
}
return $output;
@@ -191,8 +191,8 @@ if (roots_enable_root_relative_urls()) {
'year_link',
'tag_link',
'the_author_posts_link',
'script_loader_src',
'style_loader_src'
'script_loader_src',
'style_loader_src'
);
add_filters($root_rel_filters, 'roots_root_relative_url');

View File

@@ -29,20 +29,7 @@ class Roots_Walker_Comment extends Walker_Comment {
extract($args, EXTR_SKIP); ?>
<li <?php comment_class('media comment-' . get_comment_ID()); ?>>
<?php echo get_avatar($comment, $size = '64'); ?>
<div class="media-body">
<h4 class="media-heading"><?php echo get_comment_author_link(); ?></h4>
<time datetime="<?php echo comment_date('c'); ?>"><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?>"><?php printf(__('%1$s', 'roots'), get_comment_date(), get_comment_time()); ?></a></time>
<?php edit_comment_link(__('(Edit)', 'roots'), '', ''); ?>
<?php if ($comment->comment_approved == '0') : ?>
<div class="alert">
<?php _e('Your comment is awaiting moderation.', 'roots'); ?>
</div>
<?php endif; ?>
<?php comment_text(); ?>
<?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
<?php include(locate_template('templates/comment.php')); ?>
<?php
}
@@ -51,7 +38,7 @@ class Roots_Walker_Comment extends Walker_Comment {
call_user_func($args['end-callback'], $comment, $args, $depth);
return;
}
echo "</li>\n";
echo "</div></li>\n";
}
}

View File

@@ -38,7 +38,7 @@ class Roots_Nav_Walker extends Walker_Nav_Menu {
}
function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) {
$element->is_dropdown = ((!empty($children_elements[$element->ID]) && (($depth + 1) < $max_depth)));
$element->is_dropdown = ((!empty($children_elements[$element->ID]) && (($depth + 1) < $max_depth || ($max_depth === 0))));
if ($element->is_dropdown) {
if ($depth === 0) {

View File

@@ -95,7 +95,9 @@ function roots_htaccess_writable() {
}
}
}
add_action('admin_init', 'roots_htaccess_writable');
if (current_theme_supports('h5bp-htaccess')) {
add_action('admin_init', 'roots_htaccess_writable');
}
/**
* Return WordPress subdirectory if applicable