From 9194c6593e38ac036c7c0a517c07a01fa62d0341 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 4 Dec 2013 19:20:10 +0000 Subject: [PATCH] Add wp_prepare_themes_for_js filter to wp_prepare_themes_for_js(). props kovshenin. fixes #25948. git-svn-id: https://develop.svn.wordpress.org/trunk@26625 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/theme.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index e3ef308aa4..90a9e53d36 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -424,5 +424,14 @@ function wp_prepare_themes_for_js( $themes = null ) { ); } - return $prepared_themes; + /** + * Filter the themes prepared for JavaScript, for themes.php. + * + * Could be useful for changing the order, which is by name by default. + * + * @since 3.8.0 + * + * @param array $prepared_themes Array of themes. + */ + return apply_filters( 'wp_prepare_themes_for_js', $prepared_themes ); } \ No newline at end of file