[wp-trac] [WordPress Trac] #55098: Use meaningful variable name for "$s" and "$tax" in wp_ajax_ajax_tag_search()

WordPress Trac noreply at wordpress.org
Sat Jul 30 15:14:49 UTC 2022


#55098: Use meaningful variable name for "$s" and "$tax" in
wp_ajax_ajax_tag_search()
--------------------------+-----------------------------------------------
 Reporter:  azouamauriac  |       Owner:  SergeyBiryukov
     Type:  enhancement   |      Status:  closed
 Priority:  normal        |   Milestone:  6.1
Component:  Taxonomy      |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:  administration, coding-standards
--------------------------+-----------------------------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53801" 53801]:
 {{{
 #!CommitTicketReference repository="" revision="53801"
 Coding Standards: Use more meaningful variables names in some Ajax
 functions.

 This renames `$tax` to `$taxonomy_object` and `$s` to `$search` for
 clarity. The latter is only renamed when used as an internal variable and
 not referring to the `$s` global.

 The list of affected functions:
 * `wp_ajax_ajax_tag_search()`
 * `wp_ajax_add_link_category`
 * `wp_ajax_add_tag()`
 * `wp_ajax_get_tagcloud()`
 * `wp_ajax_inline_save_tax()`
 * `wp_ajax_find_posts()`

 Follow-up to [6542], [8901], [10222], [12833], [16771], [16992], [22723],
 [38698].

 Props azouamauriac.
 Fixes #55098.
 }}}

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


More information about the wp-trac mailing list