Faster way to get_custom strings.

git-svn-id: https://develop.svn.wordpress.org/trunk@2208 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-02-02 22:52:47 +00:00
parent 575a6151ff
commit cc9e610760
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]; 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... // this will probably change at some point...
function the_meta() { function the_meta() {
global $id, $post_meta_cache; global $id, $post_meta_cache;