From 2e470c79032fdd80446d6248f5cc743cc28af3b9 Mon Sep 17 00:00:00 2001 From: alexsomeoddpilot Date: Thu, 30 Oct 2014 09:24:33 -0500 Subject: [PATCH 1/3] Fixing dead variables and params --- lib/extras.php | 2 +- lib/gallery.php | 1 - lib/nav.php | 2 ++ lib/utils.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/extras.php b/lib/extras.php index f4d9810..994ff30 100644 --- a/lib/extras.php +++ b/lib/extras.php @@ -2,7 +2,7 @@ /** * Clean up the_excerpt() */ -function roots_excerpt_more($more) { +function roots_excerpt_more() { return ' … ' . __('Continued', 'roots') . ''; } add_filter('excerpt_more', 'roots_excerpt_more'); diff --git a/lib/gallery.php b/lib/gallery.php index 67f4d01..975a8ed 100644 --- a/lib/gallery.php +++ b/lib/gallery.php @@ -123,7 +123,6 @@ if (current_theme_supports('bootstrap-gallery')) { * Add class="thumbnail img-thumbnail" to attachment items */ function roots_attachment_link_class($html) { - $postid = get_the_ID(); $html = str_replace(' Date: Thu, 30 Oct 2014 09:41:56 -0500 Subject: [PATCH 2/3] Removing dead variables in activation --- lib/activation.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/activation.php b/lib/activation.php index 4b677d6..fef50f7 100644 --- a/lib/activation.php +++ b/lib/activation.php @@ -15,7 +15,7 @@ function roots_theme_activation_options_init() { } add_action('admin_init', 'roots_theme_activation_options_init'); -function roots_activation_options_page_capability($capability) { +function roots_activation_options_page_capability() { return 'edit_theme_options'; } add_filter('option_page_capability_roots_activation_options', 'roots_activation_options_page_capability'); @@ -24,7 +24,7 @@ function roots_theme_activation_options_add_page() { $roots_activation_options = roots_get_theme_activation_options(); if (!$roots_activation_options) { - $theme_page = add_theme_page( + add_theme_page( __('Theme Activation', 'roots'), __('Theme Activation', 'roots'), 'edit_theme_options', @@ -141,7 +141,7 @@ function roots_theme_activation_action() { 'post_type' => 'page' ); - $result = wp_insert_post($add_default_pages); + wp_insert_post($add_default_pages); } $home = get_page_by_title(__('Home', 'roots')); From 2072b30918e7eea18a5556481f81d06d8cf71496 Mon Sep 17 00:00:00 2001 From: alexsomeoddpilot Date: Thu, 30 Oct 2014 09:47:00 -0500 Subject: [PATCH 3/3] Declaring properties on Roots_Wrapping --- lib/wrapper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/wrapper.php b/lib/wrapper.php index c5bd4b1..1e033ec 100644 --- a/lib/wrapper.php +++ b/lib/wrapper.php @@ -15,7 +15,13 @@ function roots_sidebar_path() { class Roots_Wrapping { // Stores the full path to the main template file - static $main_template; + public static $main_template; + + // basename of template file + public $slug; + + // array of templates + public $templates; // Stores the base name of the template file; e.g. 'page' for 'page.php' etc. static $base;