Fix activation buttons for both free plugins grid and theme panel
This commit is contained in:
1 parent
d50dfd344c
commit
5f64feeaa8
3 files changed
+47
-21
No files matched your search
@@ -1312,6 +1312,13 @@ function wp_allstars_activate_theme() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the theme object
|
||||
$theme_obj = wp_get_theme($theme);
|
||||
if (!$theme_obj->exists() || $theme_obj->errors()) {
|
||||
wp_send_json_error('Theme does not exist');
|
||||
return;
|
||||
}
|
||||
|
||||
// Switch the theme
|
||||
switch_theme($theme);
|
||||
|
||||
|
||||
Reference in new issue
Block a user