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

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

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.
since: 3.4.0

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 {
since: 2.8.0
since: 3.7.0 The `$args` parameter was added, making clearing the update cache optional.

upgrade( $theme, $args = array()   X-Ref
Upgrade 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 {
since: 2.8.0
since: 3.7.0 The `$args` parameter was added, making clearing the update cache optional.

bulk_upgrade( $themes, $args = array()   X-Ref
Upgrade 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 {
since: 3.0.0
since: 3.7.0 The `$args` parameter was added, making clearing the update cache optional.

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.
since: 3.3.0

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

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.
since: 2.8.0

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

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.
since: 2.8.0

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

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

theme_info( $theme = null )   X-Ref
Get 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,
since: 2.8.0
since: 3.0.0 The `$theme` argument was added.



Generated: Sat Nov 23 01:00:02 2024 Cross-referenced by PHPXref 0.7.1