[ 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: 754 lines (25 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
Initialize the upgrade strings.


install_strings()   X-Ref
Initialize the installation strings.


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

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
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 {

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 {

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( $return, $theme )   X-Ref
Turn on maintenance mode before attempting to upgrade the current theme.

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

return: bool|WP_Error The passed in $return param or WP_Error.
param: bool|WP_Error $return Upgrade offer return.
param: array         $theme  Theme arguments.

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

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

return: bool|WP_Error The passed in $return param or WP_Error.
param: bool|WP_Error $return Upgrade offer return.
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().

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.

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 : Thu Oct 22 08:20:02 2020 Cross-referenced by PHPXref