[wp-trac] [WordPress Trac] #35788: Plugin Editor wrong selected option when file selected
WordPress Trac
noreply at wordpress.org
Fri Sep 16 13:25:45 UTC 2016
#35788: Plugin Editor wrong selected option when file selected
-------------------------------------+------------------
Reporter: CreativeJuiz | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: ui
-------------------------------------+------------------
Comment (by swissspidy):
`explode()` isn't really reliable and doesn't solve the root of the
problems, which is that `$file` and `$plugin` are used interchangeably
when they in fact shouldn't.
[attachment:35788.diff] correctly passes `$plugin` when the main plugin
file is needed and `$file` when the current file is needed.
This solves quite a few bugs:
* The currently selected plugin is always correct, even when editing files
in subdirectories.
* Gets rid of `wp_reset_vars()`, see #38073.
* Correctly marks an active plugin as active, even when editing files in
subdirectories.
Unfortunately `plugin-editor.php` is a mess. There are many many things
that should be cleaned up someday, like removing `<big>` tags.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35788#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list