API / Minn\Cli / ThemeCommand

ThemeCommand final class

Minn\Cli\ThemeCommand · public/minn/src/Minn/Cli/ThemeCommand.php · 332 lines

`wp theme list|install|update|activate|delete`: the inventory CaptainCore reads, and the install/update the fleet's `wp theme` verbs run.

Used by 1

Constants and properties

privateFIELDS = array ( 0 => 'name', 1 => 'status', 2 => 'update', 3 => 'version', 4 => 'update_version', 5 => 'auto_update', )

Public

methodlist(array $args, array $assocArgs): void#

Lists installed themes.

## OPTIONS

[--status=<status>] : Filter to one status: active, inactive, or parent.

[--field=<field>] : Prints the value of a single field for each theme.

[--fields=<fields>] : Limit the output to specific object fields.

[--format=<format>] : Render output in a particular format. --- default: table options: - table - csv - json - count - yaml ---

methodinstall(array $args, array $assocArgs): void#

Installs one or more themes from the theme directory, a zip, or a URL.

## OPTIONS

<theme|zip|url>... : A theme slug, a local zip path, or a zip URL.

[--version=<version>] : Install that version from the directory instead of the current one.

[--force] : Overwrite an installed copy of the same folder.

[--activate] : Activate the theme after it is installed (or if it is already on disk).

methodupdate(array $args, array $assocArgs): void#

Updates one or more themes from the theme directory.

## OPTIONS

[<theme>...] : One or more themes to update.

[--all] : If set, all themes that have updates will be updated.

[--exclude=<theme-names>] : Comma separated list of theme names that should be excluded from updating.

[--minor] : Only perform updates for minor releases.

[--patch] : Only perform updates for patch releases.

[--format=<format>] : Render output in a particular format. --- default: table options: - table - csv - json - summary ---

[--version=<version>] : If set, the theme will be updated to the specified version.

[--dry-run] : Preview which themes would be updated.

methodactivate(array $args, array $assocArgs): void#

Activates a theme.

## OPTIONS

<theme> : The theme folder to activate.

methoddelete(array $args, array $assocArgs): void#

Deletes one or more themes from disk.

## OPTIONS

[<theme>...] : One or more theme folders to delete.

[--force] : Allow deleting the active theme.

methodis_installed(array $args, array $assocArgs): void#

Checks if a given theme is installed. Exit 0 when it is, 1 when not.

## OPTIONS

<theme> : The theme folder to check.

methodis_active(array $args, array $assocArgs): void#

Checks if a given theme is active. Exit 0 when it is, 1 when not.

## OPTIONS

<theme> : The theme folder to check.

methodsearch(array $args, array $assocArgs): void#

Searches the theme directory.

## OPTIONS

<search> : The string to search for.

[--page=<page>] : Optional page to display. --- default: 1 ---

[--per-page=<per-page>] : Optional number of results to display. Defaults to 10.

[--field=<field>] : Prints the value of a single field for each theme.

[--fields=<fields>] : Limit the output to specific object fields. Defaults to name,slug,rating.

[--format=<format>] : Render output in a particular format. --- default: table options: - table - csv - json - count - yaml ---

Internals 2

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatepinVersion(array $args, string $version): void#

`--version` on update force-installs that release using the install wording.

privateswitchTo(Minn\Cli\Runtime $runtime, string $slug): void#