apply_filters( 'wp_prepare_themes_for_js', array $prepared_themes )
- Since
- 3.8.0
Filters the themes prepared for JavaScript, for themes.php.
Description
Could be useful for changing the order, which is by name by default.
Compatibility
- WordPress
- since 3.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$prepared_themesarray- Array of theme data.
Where this hook fires · 1
wp-admin/includes/theme.php:816wp_prepare_themes_for_js()
Source code
* Could be useful for changing the order, which is by name by default. * * @since 3.8.0 * * @param array $prepared_themes Array of theme data. */ $prepared_themes = apply_filters( 'wp_prepare_themes_for_js', $prepared_themes ); $prepared_themes = array_values( $prepared_themes ); return array_filter( $prepared_themes );} /** * Prints JS templates for the theme-browsing UI in the Customizer.Changelog
Introduced in 3.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.