[wp-trac] [WordPress Trac] #58723: Remove deprecated parameter tests in comments_link()

WordPress Trac noreply at wordpress.org
Thu Jul 6 06:50:47 UTC 2023


#58723: Remove deprecated parameter tests in comments_link()
--------------------------+-----------------------------
 Reporter:  Cybr          |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 In `comments_link()`, two unused parameters are checked if they're not
 empty. If they are, only a deprecation warning is shown for a WordPress
 version of the distant past.

 I suggest removing the parameters altogether.

 If we _must_ keep these deprecation warnings, at least use `if (
 $deprecated )` instead of `if ( ! empty( $deprecated ) )` for the former
 is about 2.7x faster while achieving the same.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58723>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list