mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
In the `WP_Hook` class the function `array_keys` was called every time an array of hook priorities was needed. For sites with lots of filters or actions, this would result in thousands of calls to the `array_keys` function, which uses server resources. Instead of recomputing this array every time it is needed, only compute it when filters are added and removed, then store the result as a class property. Improve unit tests to ensure this behaviour is tested. Props spacedmonkey, bor0, flixos90, hellofromTonya, mukesh27. Fixes #58458. git-svn-id: https://develop.svn.wordpress.org/trunk@56609 602fd350-edb4-49c9-b593-d223f7449a82 |
||
|---|---|---|
| .. | ||
| addFilter.php | ||
| applyFilters.php | ||
| doAction.php | ||
| doAllHook.php | ||
| hasFilter.php | ||
| hasFilters.php | ||
| iterator.php | ||
| preinitHooks.php | ||
| removeAllFilters.php | ||
| removeFilter.php | ||