wp_prepare_themes_for_js
Filters the themes prepared for JavaScript, for themes.php.
Could be useful for changing the order, which is by name by default.
Usage
add_filter( 'wp_prepare_themes_for_js', 'wp_kama_prepare_themes_for_js_filter' ); /** * Function for `wp_prepare_themes_for_js` filter-hook. * * @param array $prepared_themes Array of theme data. * * @return array */ function wp_kama_prepare_themes_for_js_filter( $prepared_themes ){ // filter... return $prepared_themes; }
- $prepared_themes(array)
- Array of theme data.
Changelog
Since 3.8.0 | Introduced. |
Where the hook is called
wp_prepare_themes_for_js
wp-admin/includes/theme.php 816
$prepared_themes = apply_filters( 'wp_prepare_themes_for_js', $prepared_themes );