delete_themes
user capability. It is clear from its name, isn’t it? You are right. But it is not full true. It’s useful to know, that if you have not switch_themes
capability under single-site WordPress installation, you can not delete selected theme, even if you click ‘Delete’ command from WordPress interface. Interesting? Continue reading and see more detailed description or (if you curious enough) even look inside WordPress core source code together with me.I found
delete_themes
capability in this WordPress core files:– wp-admin\themes.php;
– wp-admin\network\themes.php;
– wp-admin\includes\class-wp-ms-themes-list-table.php;
– wp-admin\includes\class-wp-themes-list-table.php;
– wp-includes\capabilities.php;
– wp-admin\includes\schema.php.