Manipulate list of themes in wp-admin

Probably not without editing core files. I haven’t found any hook you could use.

If you look in the file wp-admin/themes.php and follow the program flow until the list of themes will be displayed, you can find the class WP_Themes_List_Table in wp-admin/includes/class-wp-themes-list-table.php.

This class generates the HTML list. Following the prepare_items() method, WordPress get the list of available themes from the function get_themes() which doesn’t have a hook either.

What you can do is limit the result to allow only certain themes with the filter allowed_themes called in the function get_allowed_themes().

Leave a Comment