[wp-trac] [WordPress Trac] #6531: Recursively search for files in theme and plugin editors
WordPress Trac
noreply at wordpress.org
Tue Oct 10 05:41:53 UTC 2017
#6531: Recursively search for files in theme and plugin editors
-------------------------------------------------+-------------------------
Reporter: torbens | Owner: pento
Type: defect (bug) | Status: closed
Priority: high | Milestone: 4.9
Component: Themes | Version: 2.5
Severity: minor | Resolution: fixed
Keywords: theme-editor has-patch has-unit- | Focuses:
tests | administration
-------------------------------------------------+-------------------------
Comment (by pento):
A few notes on [41086], changed from [attachment:6531.11.diff]:
* Changed the `get_plugin_files_exclusions` filter name to
`plugin_files_exclusions`. Though it's slightly different from the
function name, it more accurately reflects what it's for. (It's for
filtering the plugin files exclusions, not for filtering whether to get
the plugin files exclusions.)
* In `get_plugin_files()`, swap the `$plugin_files += $list_files` line
for an `array_merge()`, because the former didn't work properly in PHP
5.2/5.3 (`$list_files` had different keys in different PHP versions).
Similarly, add an `array_values()` call on the next line, to normalise the
array keys.
* In the `listFiles.php` tests, use `assertContains()` and
`assertNotContains()`, and test for `index.php` instead of `about.php`.
* A handful for inline docs changes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/6531#comment:70>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list