[wp-trac] [WordPress Trac] #39844: Don't return anchor tag if link is empty in get_the_author_posts_link()

WordPress Trac noreply at wordpress.org
Mon Feb 21 16:17:57 UTC 2022


#39844: Don't return anchor tag if link is empty in get_the_author_posts_link()
----------------------------------------+-----------------------------
 Reporter:  SirkoSchindler              |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Themes                      |     Version:  4.7.2
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  template
----------------------------------------+-----------------------------

Comment (by sabernhardt):

 To work on this, I removed and then changed the author's URL with the
 `author_link` hook:
 {{{
 add_filter( 'author_link', '__return_empty_string' );
 }}}
 {{{
 add_filter( 'author_link', function(){ return 'http://'; } );
 }}}

 The patch is refreshed, but it still should have unit tests.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39844#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list