From 8d9fda7a9c3611cadaf0794c7e5d01abc768d93d Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 13 Oct 2004 03:20:03 +0000 Subject: [PATCH] Add template and stylesheet filters. git-svn-id: https://develop.svn.wordpress.org/trunk@1789 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 10 +++++++++- wp-includes/template-functions-general.php | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 30905fca5e..15e697ff09 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1830,8 +1830,16 @@ function the_post() { start_wp(true); } +function get_stylesheet() { + return apply_filters('stylesheet', get_settings('stylesheet')); +} + +function get_template() { + return apply_filters('template', get_settings('template')); +} + function get_template_directory() { - $template = get_settings('template'); + $template = get_template(); if (empty($template) || $template == 'default') { $template = ABSPATH . "wp-content"; diff --git a/wp-includes/template-functions-general.php b/wp-includes/template-functions-general.php index 0965405533..5e118abb57 100644 --- a/wp-includes/template-functions-general.php +++ b/wp-includes/template-functions-general.php @@ -82,7 +82,7 @@ function get_bloginfo($show='') { $output = get_settings('siteurl') .'/xmlrpc.php'; break; case 'stylesheet_url': - $output = get_settings('stylesheet');; + $output = get_stylesheet(); if (empty($output) || $output == 'default') { $output = get_settings('siteurl') . "/wp-layout.css"; } else { @@ -90,7 +90,7 @@ function get_bloginfo($show='') { } break; case 'stylesheet_directory': - $output = get_settings('stylesheet');; + $output = get_stylesheet(); if (empty($output) || $output == 'default') { $output = get_settings('siteurl'); } else { @@ -99,7 +99,7 @@ function get_bloginfo($show='') { break; case 'template_directory': case 'template_url': - $output = get_settings('template');; + $output = get_template(); if (empty($output) || $output == 'default') { $output = get_settings('siteurl'); } else {