[wp-trac] [WordPress Trac] #42605: category_description() does not work properly since 4.9

WordPress Trac noreply at wordpress.org
Wed Dec 20 04:30:36 UTC 2017


#42605: category_description() does not work properly since 4.9
--------------------------------+---------------------------
 Reporter:  torben.tschechne@…  |       Owner:  boonebgorges
     Type:  defect (bug)        |      Status:  closed
 Priority:  normal              |   Milestone:  4.9.2
Component:  Taxonomy            |     Version:  4.9
 Severity:  normal              |  Resolution:  fixed
 Keywords:  fixed-major         |     Focuses:
--------------------------------+---------------------------

Comment (by jorbin):

 My thinking is that it will help people clean up and test code if they see
 a deprecated argument notice. I don't expect code to break now, but I do
 worry if there comes a time in the future where there is a desire to add a
 new parameter to `term_description` and the committers then accidentally
 adding it as the 2nd parameter rather than the 3rd and code-breaking then.

 Something along the lines of:

 {{{#!php
 <?php
  function term_description( $term = 0, $deprecated = null ) {
     if ( null !== $deprecated ) {
         _deprecated_argument( __FUNCTION__ , '4.9.2', 'since terms are now
 split, taxonomy does not need to be passed to term_description' ) {
     }
 }}}

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


More information about the wp-trac mailing list