[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Upgrade API: Theme_Upgrader class

File Size: 804 lines (27 kb)
Included or required: 1 time
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
Initializes the upgrade strings.


install_strings()   X-Ref
Initializes the installation strings.


check_parent_theme_filter( $install_result, $hook_extra, $child_result )   X-Ref
Checks if a child theme is being installed and its parent also needs to be installed.

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

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.

return: array
param: array $actions Preview actions.

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

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
Upgrades a theme.

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
Upgrades several themes at once.

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().

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
Turns 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().

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
Turns 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().

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
Deletes the old theme during an upgrade.

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

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

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

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 : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref