Make WordPress Core

Changeset 2208


Ignore:
Timestamp:
02/02/2005 10:52:47 PM (21 years ago)
Author:
saxmatt
Message:

Faster way to get_custom strings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-post.php

    r2099 r2208  
    245245}
    246246
     247function post_custom( $key = '' ) {
     248    if ( 1 == count($post_meta_cache[$id][$key]) ) return $post_meta_cache[$id][$key][0];
     249    else return $post_meta_cache[$id][$key];
     250}
     251
    247252// this will probably change at some point...
    248253function the_meta() {
Note: See TracChangeset for help on using the changeset viewer.