Skip to main content

InstallThemeStep <ResourceType>

Installs a WordPress theme in the Playground.

@hasRunnableExample
@needsLogin
@example
<code>
{
"step": "installTheme",
"themeZipFile": {
"resource": "wordpress.org/themes",
"slug": "pendant"
},
"options": {
"activate": true,
"importStarterContent": true
}
}
</code>

Hierarchy

  • Pick<InstallAssetOptions, ifAlreadyInstalled>
    • InstallThemeStep

Index

Properties

optionalifAlreadyInstalled

ifAlreadyInstalled?: overwrite | skip | error

What to do if the asset already exists.

optionaloptions

options?: { activate?: boolean; importStarterContent?: boolean }

Optional installation options.


Type declaration

  • optionalactivate?: boolean

    Whether to activate the theme after installing it.

  • optionalimportStarterContent?: boolean

    Whether to import the theme’s starter content after installing it.

step

step: installTheme

The step identifier.

themeZipFile

themeZipFile: ResourceType

The theme zip file to install.