get_webcomic_post_characters

Summary:

This function will be deprecated in the next release of Webcomic (3.0.9) in favor of the built-in WordPress function get_the_terms().

Returns an array of terms (characters) from the specified post.

Tag and base function call:

function get_webcomic_post_characters( $id = false ) {
    global $webcomic; return $webcomic->get_webcomic_post_terms( 'webcomic_character', $id );
}
/* After webcomic 3.0.9 */
function get_webcomic_post_characters( $id = false ) {
    return get_the_terms( $id, 'webcomic_collection' );
}

Examples:

<?php
    /* In the loop */
    $characters = get_webcomic_post_characters();
?>
</span>
<pre><?php
    /* Outside the loop */
    $characters = get_webcomic_post_characters( 27 );
?>
<?php
    /* An example of get_the_terms() */
    $characters = get_the_terms( get_the_ID(), 'webcomic_character' );
?>

Arguments

  • id (int) optional
    The ID of any post. If false, uses current post ID.
    default: false; can be any integer.
Share
Facebook Twitter Digg Stumble Delicous Email