When opening a file in Plugin Editor, show correct plugin in the dropdown selector
|Reported by:||Daedalon||Owned by:|
When opening a file in Plugin Editor, the reloaded page shows the first plugin according to alphabetical order in the dropdown next to "Select plugin to edit:". It should default to the plugin the loaded file belongs to.
Steps to reproduce
- Open wp-admin/plugin-editor.php
- Select any plugin from the "Select plugin to edit:" dropdown except the alphabetically first one, eg. WordPress Beta Tester, and click Select.
- The page reloads and WordPress Beta Tester is shown as the default value in the dropdown, as expected.
- Click any file under Plugin Files, eg. wordpress-beta-tester/readme.txt
-> The page reloads and shows the file in editor. However, "Select plugin to edit:" doesn't have a value set and shows the first plugin in alphabetical order by default.
-> However, if you chose the main plugin file, eg. wordpress-beta-tester/wp-beta-tester.php, "Select plugin to edit:" shows the correct plugin as the default value.
Any clicked file should lead to its plugin used as the default value for "Select plugin to edit:".