diff --git a/functions.php b/functions.php index fc3fc88..d80594c 100644 --- a/functions.php +++ b/functions.php @@ -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); diff --git a/lib/activation.php b/lib/activation.php index d7e55bf..4b677d6 100644 --- a/lib/activation.php +++ b/lib/activation.php @@ -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); diff --git a/lib/comments.php b/lib/comments.php index 3b1f96f..afe1f11 100644 --- a/lib/comments.php +++ b/lib/comments.php @@ -38,6 +38,7 @@ class Roots_Walker_Comment extends Walker_Comment { call_user_func($args['end-callback'], $comment, $args, $depth); return; } + // Close ".media-body"
%s.', 'roots'), get_option('siteurl'), $user_identity); ?> - +
@@ -12,36 +13,32 @@
1 && get_option('page_comments')) : ?> - + -