From 9042be77faf11ec574a8a572fbcad52d888f56ce Mon Sep 17 00:00:00 2001 From: Ben Word Date: Mon, 4 Feb 2013 20:11:00 -0600 Subject: [PATCH] Introduce add_theme_support('bootstrap-gallery') Only apply the Roots [gallery] shortcode if enabled in config.php --- lib/cleanup.php | 6 ++++-- lib/config.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/cleanup.php b/lib/cleanup.php index 4e83cbf..0aa4704 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -360,8 +360,10 @@ function roots_gallery($attr) { return $output; } -remove_shortcode('gallery'); -add_shortcode('gallery', 'roots_gallery'); +if (current_theme_supports('bootstrap-gallery')) { + remove_shortcode('gallery'); + add_shortcode('gallery', 'roots_gallery'); +} /** * Remove unnecessary dashboard widgets diff --git a/lib/config.php b/lib/config.php index 38c3bdd..1521b66 100644 --- a/lib/config.php +++ b/lib/config.php @@ -7,6 +7,7 @@ add_theme_support('root-relative-urls'); // Enable relative URLs add_theme_support('rewrites'); // Enable URL rewrites add_theme_support('h5bp-htaccess'); // Enable HTML5 Boilerplate's .htaccess add_theme_support('bootstrap-top-navbar'); // Enable Bootstrap's fixed navbar +add_theme_support('bootstrap-gallery'); // Enable Bootstrap's thumbnails component on [gallery] add_theme_support('nice-search'); // Enable /?s= to /search/ redirect /**