[wp-trac] [WordPress Trac] #54856: Use a more appropriate variable name in link_advanced_meta_box()

WordPress Trac noreply at wordpress.org
Wed Jan 19 10:24:33 UTC 2022


#54856: Use a more appropriate variable name in link_advanced_meta_box()
------------------------------+----------------------------------------
 Reporter:  SergeyBiryukov    |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  6.0
Component:  General           |    Version:
 Severity:  normal            |   Keywords:  needs-patch good-first-bug
  Focuses:  coding-standards  |
------------------------------+----------------------------------------
 Background: #45059.

 In [45667], the `$r` variable in [source:tags/5.8.3/src/wp-admin/includes
 /meta-boxes.php?marks=1364-1370#L1345 link_advanced_meta_box()] was
 renamed to `$parsed_args`, along with other instances used with
 `wp_parse_args()`.

 In hindsight, this particular instance was unrelated to the other changes,
 as it's not used with `wp_parse_args()`. So the correct variable name to
 use here would be `$rating`, which I think `$r` was a short for.

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


More information about the wp-trac mailing list