[wp-trac] [WordPress Trac] #51439: Docs: Undocumented @global instances (was: Undefined Varible - Codeing Standard)

WordPress Trac noreply at wordpress.org
Sun Oct 4 16:25:14 UTC 2020


#51439: Docs: Undocumented @global instances
-------------------------------------------+-------------------------------
 Reporter:  ravipatel                      |       Owner:  (none)
     Type:  defect (bug)                   |      Status:  new
 Priority:  low                            |   Milestone:  Awaiting Review
Component:  General                        |     Version:  trunk
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch needs-refresh close  |     Focuses:  docs, coding-
                                           |  standards
-------------------------------------------+-------------------------------
Changes (by davidbaumwald):

 * keywords:  has-patch needs-refresh => has-patch needs-refresh close
 * focuses:  coding-standards => docs, coding-standards


Comment:

 @ravipatel Looking at these patches more in depth, it looks like most of
 these added global vars are not necessary, as they are already defined
 earlier in execution. For example,
 [https://core.trac.wordpress.org/attachment/ticket/51439/51439-edit-form-
 comment.php.patch this patch] is not necessary.  `edit-form-comment.php`
 is an included template, and both `$action` and `$comment` are defined in
 the parent file `src/wp-admin/comment.php`.  Same goes for the `$typenow`
 and `$wpdb` in `src/wp-admin/edit.php`.

 I'm adding the `close` keyword because I think this ticket is not needed.
 I'll leave it open for a couple of days to see if anyone think s this does
 deserve to be a standalone ticket.  Please ensure that these variables are
 indeed undefined at runtime, if they aren't I suggest adding to
 [https://core.trac.wordpress.org/ticket/50768 this ticket] instead.

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


More information about the wp-trac mailing list