Initially, this function was created as a filter to code being added to WordPress, which was eventually pulled from core. If/when that code is added back to core, this function will become a filter.
The purpose of this function is to grab a post’s link when using the “link” post format. It will grab the link whether its plain text or wrapped in an
hybrid_get_the_post_format_url( $url = '', $post = null );
This function currently has placeholder parameters in the event that WordPress adds their previous code back into core. For now, you really don’t need them in theme templates.
This function will return the link URL found with the post. If no link is found, it will return the post permalink (
Typical usage for this function would be to replace the call to
the_permalink() in The Loop when displaying a link post as shown in the following code.
<?php the_title( '<h2 class="entry-title"><a href="' . hybrid_get_the_post_format_url() . '" title="' . the_title_attribute( array( 'echo' => false ) ) . '">', '<span class="meta-nav">→</span></a></h2>' ); ?>
You may also choose to use the function in other ways. All it does is return the URL found for the post.