Faster way to get_custom strings.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-02-02 22:52:47 +00:00
parent 0d3d253fbe
commit 11295e488e
1 changed files with 5 additions and 0 deletions

View File

@ -244,6 +244,11 @@ function get_post_custom_values($key='') {
return $post_meta_cache[$id][$key];
}
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() {
global $id, $post_meta_cache;