On this page
apply_filters( 'pre_prepare_themes_for_js', array $prepared_themes, WP_Theme[]|null $themes, string $current_theme )
Filters theme data before it is prepared for JavaScript.
Description
Passing a non-empty array will result in wp_prepare_themes_for_js() returning early with that value instead.
Parameters
$prepared_themesarray-
An associative array of theme data. Default empty array.
$themesWP_Theme[]|null-
An array of theme objects to prepare, if any.
$current_themestring-
The active theme slug.
Source
File: wp-admin/includes/theme.php. View all references
$prepared_themes = (array) apply_filters( 'pre_prepare_themes_for_js', array(), $themes, $current_theme );
Related
Used By
| Used By | Description |
|---|---|
| wp_prepare_themes_for_js() wp-admin/includes/theme.php | Prepares themes for JavaScript. |
Changelog
| Version | Description |
|---|---|
| 4.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_prepare_themes_for_js