mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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:
parent
0d3d253fbe
commit
11295e488e
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user