[wp-cvs] wordpress/wp-includes template-functions-post.php, 1.42, 1.43

Matthew Mullenweg saxmatt at users.sourceforge.net
Wed Feb 2 22:52:49 GMT 2005


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

Modified Files:
	template-functions-post.php 
Log Message:
Faster way to get_custom strings.

Index: template-functions-post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-post.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** template-functions-post.php	17 Jan 2005 20:16:22 -0000	1.42
--- template-functions-post.php	2 Feb 2005 22:52:47 -0000	1.43
***************
*** 245,248 ****
--- 245,253 ----
  }
  
+ function post_custom( $key = '' ) {
+ 	if ( 1 == count($post_meta_cache[$id][$key]) ) return $post_meta_cache[$id][$key][0];
+ 	else return $post_meta_cache[$id][$key];
+ }
+ 
  // this will probably change at some point...
  function the_meta() {



More information about the cvs mailing list