[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> class-theme-upgrader.php (summary)

Upgrade API: Theme_Upgrader class

File Size: 745 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Theme_Upgrader:: (12 methods):
  upgrade_strings()
  install_strings()
  check_parent_theme_filter()
  hide_activate_preview_actions()
  install()
  upgrade()
  bulk_upgrade()
  check_package()
  current_before()
  current_after()
  delete_old_theme()
  theme_info()


Class: Theme_Upgrader  - X-Ref

Core class used for upgrading/installing themes.

It is designed to upgrade/install themes from a local zip, remote zip URL,
or uploaded zip file.

upgrade_strings()   X-Ref
Initialize the upgrade strings.

since: 2.8.0

install_strings()   X-Ref
Initialize the installation strings.

since: 2.8.0

check_parent_theme_filter( $install_result, $hook_extra, $child_result )   X-Ref
Check if a child theme is being installed and we need to install its parent.

Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::install().

since: 3.4.0
return: bool
param: bool  $install_result
param: array $hook_extra
param: array $child_result

hide_activate_preview_actions( $actions )   X-Ref
Don't display the activate and preview actions to the user.

Hooked to the {@see 'install_theme_complete_actions'} filter by
Theme_Upgrader::check_parent_theme_filter() when installing
a child theme and installing the parent theme fails.

since: 3.4.0
return: array
param: array $actions Preview actions.

install( $package, $args = array()   X-Ref
Install a theme package.

since: 2.8.0
since: 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
return: bool|WP_Error True if the installation was successful, false or a WP_Error object otherwise.
param: string $package The full local path or URI of the package.
param: array  $args {

upgrade( $theme, $args = array()   X-Ref
Upgrade a theme.

since: 2.8.0
since: 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
return: bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise.
param: string $theme The theme slug.
param: array  $args {

bulk_upgrade( $themes, $args = array()   X-Ref
Upgrade several themes at once.

since: 3.0.0
since: 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
return: array[]|false An array of results, or false if unable to connect to the filesystem.
param: string[] $themes Array of the theme slugs.
param: array    $args {

check_package( $source )   X-Ref
Checks that the package source contains a valid theme.

Hooked to the {@see 'upgrader_source_selection'} filter by Theme_Upgrader::install().

since: 3.3.0
return: string|WP_Error The source as passed, or a WP_Error object on failure.
param: string $source The path to the downloaded package source.

current_before( $response, $theme )   X-Ref
Turn on maintenance mode before attempting to upgrade the active theme.

Hooked to the {@see 'upgrader_pre_install'} filter by Theme_Upgrader::upgrade() and
Theme_Upgrader::bulk_upgrade().

since: 2.8.0
return: bool|WP_Error The original `$response` parameter or WP_Error.
param: bool|WP_Error $response The installation response before the installation has started.
param: array         $theme    Theme arguments.

current_after( $response, $theme )   X-Ref
Turn off maintenance mode after upgrading the active theme.

Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::upgrade()
and Theme_Upgrader::bulk_upgrade().

since: 2.8.0
return: bool|WP_Error The original `$response` parameter or WP_Error.
param: bool|WP_Error $response The installation response after the installation has finished.
param: array         $theme    Theme arguments.

delete_old_theme( $removed, $local_destination, $remote_destination, $theme )   X-Ref
Delete the old theme during an upgrade.

Hooked to the {@see 'upgrader_clear_destination'} filter by Theme_Upgrader::upgrade()
and Theme_Upgrader::bulk_upgrade().

since: 2.8.0
return: bool
param: bool   $removed
param: string $local_destination
param: string $remote_destination
param: array  $theme

theme_info( $theme = null )   X-Ref
Get the WP_Theme object for a theme.

since: 2.8.0
since: 3.0.0 The `$theme` argument was added.
return: WP_Theme|false The theme's info object, or false `$theme` is not supplied
param: string $theme The directory name of the theme. This is optional, and if not supplied,



Generated: Fri Mar 29 01:00:02 2024 Cross-referenced by PHPXref 0.7.1