[wp-cvs] wordpress/wp-includes functions.php, 1.190, 1.191 template-functions-general.php, 1.53, 1.54

Ryan Boren rboren at users.sourceforge.net
Wed Oct 13 03:20:06 UTC 2004


Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16718/wp-includes

Modified Files:
	functions.php template-functions-general.php 
Log Message:
Add template and stylesheet filters.

Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.190
retrieving revision 1.191
diff -C2 -d -r1.190 -r1.191
*** functions.php	13 Oct 2004 02:21:37 -0000	1.190
--- functions.php	13 Oct 2004 03:20:03 -0000	1.191
***************
*** 1831,1836 ****
  }
  
  function get_template_directory() {
! 	$template = get_settings('template');
  
  	if (empty($template) || $template == 'default') {
--- 1831,1844 ----
  }
  
+ 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_template();
  
  	if (empty($template) || $template == 'default') {

Index: template-functions-general.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-general.php,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** template-functions-general.php	4 Oct 2004 06:23:52 -0000	1.53
--- template-functions-general.php	13 Oct 2004 03:20:03 -0000	1.54
***************
*** 83,87 ****
  		break;
  	case 'stylesheet_url':
! 		$output = get_settings('stylesheet');;
  		if (empty($output) || $output == 'default') {
  			$output = get_settings('siteurl') . "/wp-layout.css";
--- 83,87 ----
  		break;
  	case 'stylesheet_url':
! 		$output = get_stylesheet();
  		if (empty($output) || $output == 'default') {
  			$output = get_settings('siteurl') . "/wp-layout.css";
***************
*** 91,95 ****
  		break;
  	case 'stylesheet_directory':
! 		$output = get_settings('stylesheet');;
  		if (empty($output) || $output == 'default') {
  			$output = get_settings('siteurl');
--- 91,95 ----
  		break;
  	case 'stylesheet_directory':
! 		$output = get_stylesheet();
  		if (empty($output) || $output == 'default') {
  			$output = get_settings('siteurl');
***************
*** 100,104 ****
  	case 'template_directory':
  	case 'template_url':
! 		$output = get_settings('template');;
  		if (empty($output) || $output == 'default') {
  			$output = get_settings('siteurl');
--- 100,104 ----
  	case 'template_directory':
  	case 'template_url':
! 		$output = get_template();
  		if (empty($output) || $output == 'default') {
  			$output = get_settings('siteurl');




More information about the cvs mailing list