Skip to content

Commit ff81966

Browse files
authored
Merge branch 'main' into copilot/add-plugin-dependencies-support
2 parents c82b850 + c8dec09 commit ff81966

File tree

4 files changed

+68
-1
lines changed

4 files changed

+68
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Check Branch Alias
2+
3+
on:
4+
release:
5+
types: [released]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
check-branch-alias:
14+
uses: wp-cli/.github/.github/workflows/reusable-check-branch-alias.yml@main

.github/workflows/issue-triage.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Issue Triage
3+
4+
'on':
5+
issues:
6+
types: [opened]
7+
workflow_dispatch:
8+
inputs:
9+
issue_number:
10+
description: 'Issue number to triage (leave empty to process all)'
11+
required: false
12+
type: string
13+
14+
jobs:
15+
issue-triage:
16+
uses: wp-cli/.github/.github/workflows/reusable-issue-triage.yml@main
17+
with:
18+
issue_number: ${{ github.event_name == 'workflow_dispatch' && inputs.issue_number || github.event.issue.number }}

features/theme.feature

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,41 @@ Feature: Manage WordPress themes
435435
| moina-blog | active |
436436
| moina | parent |
437437

438+
@require-wp-5.7
439+
Scenario: List broken themes (child theme without parent)
440+
Given a WP install
441+
And I run `wp theme install moina`
442+
And I run `wp theme install moina-blog`
443+
444+
When I run `wp theme list --fields=name,status`
445+
Then STDOUT should be a table containing rows:
446+
| name | status |
447+
| moina-blog | inactive |
448+
| moina | inactive |
449+
450+
When I run `wp theme delete moina`
451+
Then STDOUT should contain:
452+
"""
453+
Deleted 'moina' theme.
454+
"""
455+
456+
When I run `wp theme list --fields=name,status`
457+
Then STDOUT should be a table containing rows:
458+
| name | status |
459+
| moina-blog | inactive |
460+
461+
When I try `wp theme activate moina-blog`
462+
Then STDERR should contain:
463+
"""
464+
Error: The parent theme is missing. Please install the "moina" parent theme.
465+
"""
466+
467+
When I try `wp theme install moina-blog`
468+
Then STDERR should contain:
469+
"""
470+
Warning: moina-blog: Theme already installed.
471+
"""
472+
438473
Scenario: When updating a theme --format should be the same when using --dry-run
439474
Given a WP install
440475
And I run `wp theme delete --all --force`

src/WP_CLI/ParseThemeNameInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private function get_all_themes() {
8989
$auto_updates = [];
9090
}
9191

92-
foreach ( wp_get_themes() as $key => $theme ) {
92+
foreach ( wp_get_themes( [ 'errors' => null ] ) as $key => $theme ) {
9393
$stylesheet = $theme->get_stylesheet();
9494
$update_info = ( isset( $all_update_info->response[ $stylesheet ] ) && null !== $all_update_info->response[ $theme->get_stylesheet() ] ) ? (array) $all_update_info->response[ $theme->get_stylesheet() ] : null;
9595

0 commit comments

Comments
 (0)