I just stepped into the concept of post formats and was wondering why there are two out of 3 functions from the post format "API" offer absolutely the same functionality. Consider the following two concepts (A vs. B):
if ( have_posts() )
{
while ( have_posts() )
{
the_post();
// A) has_post_format
if ( has_post_format('format') )
{
the_excerpt(); // some special formating
}
// VERSUS:
// B)
if ( get_post_format( $GLOBALS['post']->ID ) == 'format' )
{
the_excerpt(); // some special formating
}
} // endwhile;
} // endif;
Could someone please explain me why there are those two functions instead only ex. get_post_format? If you could offer me some examples of situations where the one isn't capable of something the other function can do, I'd be special happy and +1 it.