Twenty Eleven: run twentyeleven_url_grabber once in widgets.php, props duck_ -- closes #17279
git-svn-id: http://svn.automattic.com/wordpress/trunk@17917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a6057fe8b9
commit
6b26de11a4
|
@ -99,10 +99,11 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
|||
|
||||
<li class="widget-entry-title">
|
||||
<?php
|
||||
$link_url = get_permalink();
|
||||
|
||||
if ( false != twentyeleven_url_grabber() )
|
||||
// Grab first link from the post content. If none found, use the post permalink as fallback.
|
||||
$link_url = twentyeleven_url_grabber();
|
||||
|
||||
if ( empty( $link_url ) )
|
||||
$link_url = get_permalink();
|
||||
?>
|
||||
<a href="<?php echo esc_url( $link_url ); ?>" title="<?php printf( esc_attr__( 'Link to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?> <span>→</span></a>
|
||||
<span class="comments-link">
|
||||
|
|
Loading…
Reference in New Issue