Add template and stylesheet filters.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-10-13 03:20:03 +00:00
parent f192cfe5c8
commit c4ff2cc8ec
2 changed files with 12 additions and 4 deletions

View File

@ -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";

View File

@ -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 {