Merge master
This commit is contained in:
@@ -2,15 +2,26 @@
|
||||
/**
|
||||
* Roots includes
|
||||
*/
|
||||
require_once locate_template('/lib/utils.php'); // Utility functions
|
||||
require_once locate_template('/lib/init.php'); // Initial theme setup and constants
|
||||
require_once locate_template('/lib/wrapper.php'); // Theme wrapper class
|
||||
require_once locate_template('/lib/sidebar.php'); // Sidebar class
|
||||
require_once locate_template('/lib/config.php'); // Configuration
|
||||
require_once locate_template('/lib/activation.php'); // Theme activation
|
||||
require_once locate_template('/lib/titles.php'); // Page titles
|
||||
require_once locate_template('/lib/nav.php'); // Custom nav modifications
|
||||
require_once locate_template('/lib/gallery.php'); // Custom [gallery] modifications
|
||||
require_once locate_template('/lib/comments.php'); // Custom comments modifications
|
||||
require_once locate_template('/lib/scripts.php'); // Scripts and stylesheets
|
||||
require_once locate_template('/lib/extras.php'); // Custom functions
|
||||
$roots_includes = array(
|
||||
'/lib/utils.php', // Utility functions
|
||||
'/lib/init.php', // Initial theme setup and constants
|
||||
'/lib/wrapper.php', // Theme wrapper class
|
||||
'/lib/sidebar.php', // Sidebar class
|
||||
'/lib/config.php', // Configuration
|
||||
'/lib/activation.php', // Theme activation
|
||||
'/lib/titles.php', // Page titles
|
||||
'/lib/nav.php', // Custom nav modifications
|
||||
'/lib/gallery.php', // Custom [gallery] modifications
|
||||
'/lib/comments.php', // Custom comments modifications
|
||||
'/lib/scripts.php', // Scripts and stylesheets
|
||||
'/lib/extras.php', // Custom functions
|
||||
);
|
||||
|
||||
foreach ($roots_includes as $file) {
|
||||
if (!$filepath = locate_template($file)) {
|
||||
trigger_error("Error locating `$file` for inclusion!", E_USER_ERROR);
|
||||
}
|
||||
|
||||
require_once $filepath;
|
||||
}
|
||||
unset($file, $filepath);
|
||||
|
||||
@@ -123,7 +123,7 @@ function roots_theme_activation_action() {
|
||||
if ($roots_theme_activation_options['create_front_page'] === 'true') {
|
||||
$roots_theme_activation_options['create_front_page'] = false;
|
||||
|
||||
$default_pages = array('Home');
|
||||
$default_pages = array(__('Home', 'roots'));
|
||||
$existing_pages = get_pages();
|
||||
$temp = array();
|
||||
|
||||
@@ -144,7 +144,7 @@ function roots_theme_activation_action() {
|
||||
$result = wp_insert_post($add_default_pages);
|
||||
}
|
||||
|
||||
$home = get_page_by_title('Home');
|
||||
$home = get_page_by_title(__('Home', 'roots'));
|
||||
update_option('show_on_front', 'page');
|
||||
update_option('page_on_front', $home->ID);
|
||||
|
||||
@@ -170,10 +170,10 @@ function roots_theme_activation_action() {
|
||||
|
||||
$roots_nav_theme_mod = false;
|
||||
|
||||
$primary_nav = wp_get_nav_menu_object('Primary Navigation');
|
||||
$primary_nav = wp_get_nav_menu_object(__('Primary Navigation', 'roots'));
|
||||
|
||||
if (!$primary_nav) {
|
||||
$primary_nav_id = wp_create_nav_menu('Primary Navigation', array('slug' => 'primary_navigation'));
|
||||
$primary_nav_id = wp_create_nav_menu(__('Primary Navigation', 'roots'), array('slug' => 'primary_navigation'));
|
||||
$roots_nav_theme_mod['primary_navigation'] = $primary_nav_id;
|
||||
} else {
|
||||
$roots_nav_theme_mod['primary_navigation'] = $primary_nav->term_id;
|
||||
@@ -187,7 +187,7 @@ function roots_theme_activation_action() {
|
||||
if ($roots_theme_activation_options['add_pages_to_primary_navigation'] === 'true') {
|
||||
$roots_theme_activation_options['add_pages_to_primary_navigation'] = false;
|
||||
|
||||
$primary_nav = wp_get_nav_menu_object('Primary Navigation');
|
||||
$primary_nav = wp_get_nav_menu_object(__('Primary Navigation', 'roots'));
|
||||
$primary_nav_term_id = (int) $primary_nav->term_id;
|
||||
$menu_items= wp_get_nav_menu_items($primary_nav_term_id);
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ class Roots_Walker_Comment extends Walker_Comment {
|
||||
call_user_func($args['end-callback'], $comment, $args, $depth);
|
||||
return;
|
||||
}
|
||||
// Close ".media-body" <div> located in templates/comment.php, and then the comment's <li>
|
||||
echo "</div></li>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ function roots_title() {
|
||||
return sprintf(__('Yearly Archives: %s', 'roots'), get_the_date('Y'));
|
||||
} elseif (is_author()) {
|
||||
$author = get_queried_object();
|
||||
return sprintf(__('Author Archives: %s', 'roots'), $author->display_name);
|
||||
return sprintf(__('Author Archives: %s', 'roots'), apply_filters('the_author', is_object($author) ? $author->display_name : null));
|
||||
} else {
|
||||
return single_cat_title('', false);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
function is_element_empty($element) {
|
||||
$element = trim($element);
|
||||
return empty($element) ? false : true;
|
||||
return !empty($element);
|
||||
}
|
||||
|
||||
// Tell WordPress to use searchform.php from the templates/ directory
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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>
|
||||
<time datetime="<?php echo get_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') : ?>
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
if (post_password_required()) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
if (have_comments()) : ?>
|
||||
<section id="comments">
|
||||
<section id="comments">
|
||||
<?php if (have_comments()) : ?>
|
||||
<h3><?php printf(_n('One Response to “%2$s”', '%1$s Responses to “%2$s”', get_comments_number(), 'roots'), number_format_i18n(get_comments_number()), get_the_title()); ?></h3>
|
||||
|
||||
<ol class="media-list">
|
||||
@@ -29,19 +30,15 @@
|
||||
<?php _e('Comments are closed.', 'roots'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section><!-- /#comments -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!have_comments() && !comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) : ?>
|
||||
<section id="comments">
|
||||
<?php elseif(!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) : ?>
|
||||
<div class="alert alert-warning">
|
||||
<?php _e('Comments are closed.', 'roots'); ?>
|
||||
</div>
|
||||
</section><!-- /#comments -->
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</section><!-- /#comments -->
|
||||
|
||||
<?php if (comments_open()) : ?>
|
||||
<section id="respond">
|
||||
<section id="respond">
|
||||
<?php if (comments_open()) : ?>
|
||||
<h3><?php comment_form_title(__('Leave a Reply', 'roots'), __('Leave a Reply to %s', 'roots')); ?></h3>
|
||||
<p class="cancel-comment-reply"><?php cancel_comment_reply_link(); ?></p>
|
||||
<?php if (get_option('comment_registration') && !is_user_logged_in()) : ?>
|
||||
@@ -51,7 +48,7 @@
|
||||
<?php if (is_user_logged_in()) : ?>
|
||||
<p>
|
||||
<?php printf(__('Logged in as <a href="%s/wp-admin/profile.php">%s</a>.', 'roots'), get_option('siteurl'), $user_identity); ?>
|
||||
<a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php __('Log out of this account', 'roots'); ?>"><?php _e('Log out »', 'roots'); ?></a>
|
||||
<a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'roots'); ?>"><?php _e('Log out »', 'roots'); ?></a>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<div class="form-group">
|
||||
@@ -76,5 +73,5 @@
|
||||
<?php do_action('comment_form', $post->ID); ?>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</section><!-- /#respond -->
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</section><!-- /#respond -->
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<footer class="content-info" role="contentinfo">
|
||||
<div class="container">
|
||||
<?php dynamic_sidebar('sidebar-footer'); ?>
|
||||
<p>© <?php echo date('Y'); ?> <?php bloginfo('name'); ?></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user