pre_prepare_themes_for_js filter-hook . WP 4.2.0
Filters theme data before it is prepared for JavaScript.
Passing a non-empty array will result in wp_prepare_themes_for_js() returning early with that value instead.
Usage
add_filter( 'pre_prepare_themes_for_js', 'filter_function_name_8953', 10, 3 ); function filter_function_name_8953( $prepared_themes, $themes, $current_theme ){ // filter... return $prepared_themes; }
- $prepared_themes(array)
- An associative array of theme data.
Default: empty array - $themes(WP_Theme[]/null)
- An array of theme objects to prepare, if any.
- $current_theme(string)
- The current theme slug.
Changelog
Since 4.2.0 | Introduced. |
Where the hook is called
pre_prepare_themes_for_js
wp-admin/includes/theme.php 634
$prepared_themes = (array) apply_filters( 'pre_prepare_themes_for_js', array(), $themes, $current_theme );