Skip to main content

InstallThemeStep <FileResource, DirectoryResource>

Installs a WordPress theme in the Playground.

@hasRunnableExample
@needsLogin
@example
<code>
{
"step": "installTheme",
"themeData": {
"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

Optional installation options.

step

step: installTheme

The step identifier.

themeData

themeData: FileResource | DirectoryResource

The theme files to install. It can be either a theme zip file, or a directory containing all the theme files at its root.

optionalthemeZipFile

themeZipFile?: FileResource

@deprecated. Use themeData instead.