[wp-trac] [WordPress Trac] #60006: Remove the Unused global variables in the wp-admin

WordPress Trac noreply at wordpress.org
Mon Dec 4 12:39:36 UTC 2023


#60006: Remove the Unused global variables in the wp-admin
----------------------------+------------------------------
 Reporter:  viralsampat     |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  6.4
 Severity:  normal          |  Resolution:
 Keywords:  close           |     Focuses:
----------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch dev-feedback => close
 * component:  Site Health => Administration


Comment:

 Hi there, thanks for the patch!

 The suggested changes don't seem correct to me:
 * The `$_wp_filesystem_direct_method` global is used on
 [source:tags/6.4.1/src/wp-admin/includes/class-core-
 upgrader.php?marks=235#L229 line 235] of `wp-admin/includes/class-core-
 upgrader.php`.
 * The `$current_user` global is used on [source:tags/6.4.1/src/wp-
 admin/includes/post.php?marks=948#L945 line 948] of `wp-
 admin/includes/post.php`.

 So the `@global` tags should not be removed.

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


More information about the wp-trac mailing list