[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Upgrade API: Theme_Upgrader class

File Size: 648 lines (20 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().

param: bool  $install_result
param: array $hook_extra
param: array $child_result
return: type
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.

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

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

param: string $package The full local path or URI of the package.
param: array  $args {
return: bool|WP_Error True if the installation was successful, false or a WP_Error object otherwise.
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.

param: string $theme The theme slug.
param: array  $args {
return: bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise.
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.

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

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

Hooked to the {@see 'upgrader_source_selection'} filter by Theme_Upgrader::install().
It will return an error if the theme doesn't have style.css or index.php
files.

param: string $source The full path to the package source.
return: string|WP_Error The source or a WP_Error.
since: 3.3.0

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

param: bool|WP_Error  $return
param: array          $theme
return: bool|WP_Error
since: 2.8.0

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

param: bool|WP_Error  $return
param: array          $theme
return: bool|WP_Error
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().

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

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

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



Generated: Tue Sep 17 01:00:03 2019 Cross-referenced by PHPXref 0.7.1