Skip to content

Commit 949eeb3

Browse files
committed
Add status=active parameter to /wp/v2/themes REST API call for WP<5.7 compat
1 parent 2a69d65 commit 949eeb3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

assets/src/components/themes-context-provider/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function ThemesContextProvider( {
6262

6363
try {
6464
const fetchedThemes = await apiFetch( {
65-
path: '/wp/v2/themes',
65+
path: '/wp/v2/themes?status=active',
6666
} );
6767

6868
if ( hasUnmounted.current === true ) {

src/Admin/OnboardingWizardSubmenuPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ protected function add_preload_rest_paths() {
303303
),
304304
'/wp/v2/plugins',
305305
'/wp/v2/settings',
306-
'/wp/v2/themes',
306+
'/wp/v2/themes?status=active',
307307
'/wp/v2/users/me',
308308
];
309309

src/Admin/OptionsMenu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ protected function add_preload_rest_paths() {
322322
),
323323
'/wp/v2/plugins',
324324
'/wp/v2/settings',
325-
'/wp/v2/themes',
325+
'/wp/v2/themes?status=active',
326326
'/wp/v2/users/me',
327327
];
328328

0 commit comments

Comments
 (0)