Merge branch 'master' into grunt
This commit is contained in:
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,4 +1,17 @@
|
||||
### HEAD
|
||||
* Don't warn about unwritable htaccess if that option is disabled
|
||||
* Add missing collapse class for top navbar
|
||||
* Add comment template
|
||||
* Update is_dropdown evaluation in nav walker
|
||||
* Re-organize archives template
|
||||
* Add missing comment ID
|
||||
* hNews consistency with entry-title class
|
||||
* Add `wp_title()` filter
|
||||
* Fix missing closing div in comments
|
||||
* Fix for navbar dropdowns
|
||||
* Add option for using jQuery on Google CDN
|
||||
* Correct logic in `roots_enable_root_relative_urls`
|
||||
* Add Greek translation, update Brazilian Portuguese translation
|
||||
* Update to Bootstrap 2.3.1
|
||||
* Simplify alerts
|
||||
* Remove disabled post nav links
|
||||
|
||||
24
index.php
24
index.php
@@ -1,5 +1,21 @@
|
||||
<?php get_template_part('templates/page', 'header'); ?>
|
||||
<?php
|
||||
$format = have_posts() ? get_post_format() : false;
|
||||
get_template_part('templates/content', $format);
|
||||
?>
|
||||
|
||||
<?php if (!have_posts()) : ?>
|
||||
<div class="alert">
|
||||
<?php _e('Sorry, no results were found.', 'roots'); ?>
|
||||
</div>
|
||||
<?php get_search_form(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
<?php get_template_part('templates/content', get_post_format()); ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php if ($wp_query->max_num_pages > 1) : ?>
|
||||
<nav class="post-nav">
|
||||
<ul class="pager">
|
||||
<li class="previous"><?php next_posts_link(__('← Older posts', 'roots')); ?></li>
|
||||
<li class="next"><?php previous_posts_link(__('Newer posts →', 'roots')); ?></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
164
lang/roots.pot
164
lang/roots.pot
@@ -3,235 +3,235 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: 404.php:5
|
||||
msgid "The page you are looking for might have been removed, had its name changed, or is temporarily unavailable."
|
||||
#: 404.php:4
|
||||
msgid "Sorry, but the page you were trying to view does not exist."
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:8
|
||||
msgid "Please try the following:"
|
||||
#: 404.php:7
|
||||
msgid "It looks like this was the result of either:"
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:9
|
||||
msgid "a mistyped address"
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:10
|
||||
msgid "Check your spelling"
|
||||
msgid "an out-of-date link"
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:11
|
||||
msgid "Return to the <a href=\"%s\">home page</a>"
|
||||
#: index.php:5
|
||||
msgid "Sorry, no results were found."
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:12
|
||||
msgid "Click the <a href=\"javascript:history.back()\">Back</a> button"
|
||||
#: index.php:17
|
||||
msgid "← Older posts"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:31 lib/activation.php:32
|
||||
#: index.php:18
|
||||
msgid "Newer posts →"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:33 lib/activation.php:34
|
||||
msgid "Theme Activation"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:68
|
||||
#: lib/activation.php:70
|
||||
msgid "%s Theme Activation"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:83 lib/activation.php:85
|
||||
#: lib/activation.php:85 lib/activation.php:87
|
||||
msgid "Create static front page?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:87 lib/activation.php:100 lib/activation.php:113
|
||||
#: lib/activation.php:126 lib/activation.php:139
|
||||
#: lib/activation.php:89 lib/activation.php:102 lib/activation.php:115
|
||||
#: lib/activation.php:128 lib/activation.php:141
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:88 lib/activation.php:101 lib/activation.php:114
|
||||
#: lib/activation.php:127 lib/activation.php:140
|
||||
#: lib/activation.php:90 lib/activation.php:103 lib/activation.php:116
|
||||
#: lib/activation.php:129 lib/activation.php:142
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:91
|
||||
#: lib/activation.php:93
|
||||
msgid "Create a page called Home and set it to be the static front page"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:96
|
||||
#: lib/activation.php:98
|
||||
msgid "Change permalink structure?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:98
|
||||
#: lib/activation.php:100
|
||||
msgid "Update permalink structure?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:104
|
||||
#: lib/activation.php:106
|
||||
msgid "Change permalink structure to /%postname%/"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:109
|
||||
#: lib/activation.php:111
|
||||
msgid "Change uploads folder?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:111
|
||||
#: lib/activation.php:113
|
||||
msgid "Update uploads folder?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:117
|
||||
#: lib/activation.php:119
|
||||
msgid "Change uploads folder to /assets/ instead of /wp-content/uploads/"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:122 lib/activation.php:124
|
||||
#: lib/activation.php:124 lib/activation.php:126
|
||||
msgid "Create navigation menu?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:130
|
||||
#: lib/activation.php:132
|
||||
msgid "Create the Primary Navigation menu and set the location"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:135 lib/activation.php:137
|
||||
#: lib/activation.php:137 lib/activation.php:139
|
||||
msgid "Add pages to menu?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/activation.php:143
|
||||
#: lib/activation.php:145
|
||||
msgid "Add all current published pages to the Primary Navigation"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cleanup.php:388
|
||||
#: lib/cleanup.php:382
|
||||
msgid "Continued"
|
||||
msgstr ""
|
||||
|
||||
#: lib/htaccess.php:25
|
||||
msgid "Please make sure your <a href=\"%s\">.htaccess</a> file is writable "
|
||||
msgstr ""
|
||||
|
||||
#: lib/init.php:13
|
||||
#: lib/init.php:11
|
||||
msgid "Primary Navigation"
|
||||
msgstr ""
|
||||
|
||||
#: lib/utils.php:14
|
||||
#: lib/utils.php:60
|
||||
msgid "Latest Posts"
|
||||
msgstr ""
|
||||
|
||||
#: lib/utils.php:23
|
||||
#: lib/utils.php:69
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: lib/utils.php:25
|
||||
#: lib/utils.php:71
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: lib/utils.php:27
|
||||
#: lib/utils.php:73
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: lib/utils.php:31
|
||||
#: lib/utils.php:75
|
||||
msgid "Author Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: lib/utils.php:36
|
||||
#: lib/utils.php:80
|
||||
msgid "Search Results for %s"
|
||||
msgstr ""
|
||||
|
||||
#: lib/utils.php:38
|
||||
msgid "File Not Found"
|
||||
#: lib/utils.php:82
|
||||
msgid "Not Found"
|
||||
msgstr ""
|
||||
|
||||
#: lib/widgets.php:6
|
||||
#: lib/utils.php:94
|
||||
msgid "Please make sure your <a href=\"%s\">.htaccess</a> file is writable "
|
||||
msgstr ""
|
||||
|
||||
#: lib/widgets.php:8
|
||||
msgid "Primary Sidebar"
|
||||
msgstr ""
|
||||
|
||||
#: lib/widgets.php:15
|
||||
#: lib/widgets.php:17
|
||||
msgid "Footer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/widgets.php:41
|
||||
#: lib/widgets.php:45
|
||||
msgid "Use this widget to add a vCard"
|
||||
msgstr ""
|
||||
|
||||
#: lib/widgets.php:43
|
||||
#: lib/widgets.php:47
|
||||
msgid "Roots: vCard"
|
||||
msgstr ""
|
||||
|
||||
#: lib/widgets.php:70
|
||||
#: lib/widgets.php:74
|
||||
msgid "vCard"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:7
|
||||
msgid "<cite class=\"fn\">%s</cite>"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:8
|
||||
#: templates/comment.php:4
|
||||
msgid "%1$s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:9
|
||||
#: templates/comment.php:5
|
||||
msgid "(Edit)"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:15
|
||||
#: templates/comment.php:9
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:32
|
||||
msgid "This post is password protected. Enter the password to view comments."
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:39
|
||||
#: templates/comments.php:8
|
||||
msgid "One Response to “%2$s”"
|
||||
msgid_plural "%1$s Responses to “%2$s”"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/comments.php:49 templates/comments.php:51
|
||||
#: templates/comments.php:18
|
||||
msgid "← Older comments"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:54 templates/comments.php:56
|
||||
#: templates/comments.php:21
|
||||
msgid "Newer comments →"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:66 templates/comments.php:76
|
||||
#: templates/comments.php:29 templates/comments.php:38
|
||||
msgid "Comments are closed."
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:83
|
||||
#: templates/comments.php:45
|
||||
msgid "Leave a Reply"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:83
|
||||
#: templates/comments.php:45
|
||||
msgid "Leave a Reply to %s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:86
|
||||
#: templates/comments.php:48
|
||||
msgid "You must be <a href=\"%s\">logged in</a> to post a comment."
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:90
|
||||
#: templates/comments.php:53
|
||||
msgid "Logged in as <a href=\"%s/wp-admin/profile.php\">%s</a>."
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:90
|
||||
#: templates/comments.php:54
|
||||
msgid "Log out of this account"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:90
|
||||
#: templates/comments.php:54
|
||||
msgid "Log out »"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:92
|
||||
#: templates/comments.php:57
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:92 templates/comments.php:94
|
||||
#: templates/comments.php:57 templates/comments.php:59
|
||||
msgid " (required)"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:94
|
||||
#: templates/comments.php:59
|
||||
msgid "Email (will not be published)"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:96
|
||||
#: templates/comments.php:61
|
||||
msgid "Website"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:99
|
||||
#: templates/comments.php:64
|
||||
msgid "Comment"
|
||||
msgstr ""
|
||||
|
||||
#: templates/comments.php:101
|
||||
#: templates/comments.php:66
|
||||
msgid "Submit Comment"
|
||||
msgstr ""
|
||||
|
||||
@@ -239,24 +239,8 @@ msgstr ""
|
||||
msgid "Pages:"
|
||||
msgstr ""
|
||||
|
||||
#: templates/content.php:4
|
||||
msgid "Sorry, no results were found."
|
||||
msgstr ""
|
||||
|
||||
#: templates/content.php:28 templates/content.php:30
|
||||
msgid "← Older posts"
|
||||
msgstr ""
|
||||
|
||||
#: templates/content.php:33 templates/content.php:35
|
||||
msgid "Newer posts →"
|
||||
msgstr ""
|
||||
|
||||
#: templates/entry-meta.php:1
|
||||
msgid "Posted on %s at %s."
|
||||
msgstr ""
|
||||
|
||||
#: templates/entry-meta.php:2
|
||||
msgid "Written by"
|
||||
msgid "By"
|
||||
msgstr ""
|
||||
|
||||
#: templates/searchform.php:2
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
14
templates/comment.php
Normal file
14
templates/comment.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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']))); ?>
|
||||
@@ -1,34 +1,12 @@
|
||||
<?php if (!have_posts()) : ?>
|
||||
<div class="alert">
|
||||
<?php _e('Sorry, no results were found.', 'roots'); ?>
|
||||
<article <?php post_class(); ?>>
|
||||
<header>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php get_template_part('templates/entry-meta'); ?>
|
||||
</header>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
<?php get_search_form(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
<article <?php post_class(); ?>>
|
||||
<header>
|
||||
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php get_template_part('templates/entry-meta'); ?>
|
||||
</header>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
<footer>
|
||||
<?php the_tags('<ul class="entry-tags"><li>','</li><li>','</li></ul>'); ?>
|
||||
</footer>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php if ($wp_query->max_num_pages > 1) : ?>
|
||||
<nav class="post-nav">
|
||||
<ul class="pager">
|
||||
<?php if (get_next_posts_link()) : ?>
|
||||
<li class="previous"><?php next_posts_link(__('← Older posts', 'roots')); ?></li>
|
||||
<?php endif; ?>
|
||||
<?php if (get_previous_posts_link()) : ?>
|
||||
<li class="next"><?php previous_posts_link(__('Newer posts →', 'roots')); ?></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<footer>
|
||||
<?php the_tags('<ul class="entry-tags"><li>','</li><li>','</li></ul>'); ?>
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<a class="brand" href="<?php echo home_url(); ?>/">
|
||||
<?php bloginfo('name'); ?>
|
||||
</a>
|
||||
<nav class="nav-main nav-collapse" role="navigation">
|
||||
<nav class="nav-main nav-collapse collapse" role="navigation">
|
||||
<?php
|
||||
if (has_nav_menu('primary_navigation')) :
|
||||
wp_nav_menu(array('theme_location' => 'primary_navigation', 'menu_class' => 'nav'));
|
||||
|
||||
Reference in New Issue
Block a user