de

wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren




get_post_custom [ WordPress Function ]

get_post_custom ( $post_id = 0 )
Parameter:
  • (int) $post_id Post ID.
Links:
Gibt zurück:
  • (array)
Definiert in:



Retrieve post meta fields, based on post ID.

The post meta fields are retrieved from the cache where possible, so the function is optimized to be called more than once.

Source


<?php
function get_post_custom$post_id ) {
    
$post_id absint$post_id );
    if ( ! 
$post_id )
        
$post_id get_the_ID();

    return 
get_post_meta$post_id );
}
?>

Beispiele [ wp-snippets.com ]

Top Google Suchergebnisse

Mehr ...

0 Nutzerkommentare

Noch keine. Sei der Erste!

Neu hinzufügen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics