PHP Class Yoast_Theme_Update_Manager

Inheritance: extends Yoast_Update_Manager
Show file Open project: yoast/license-manager

Public Methods

Method Description
__construct ( Yoast_Product $product, string $license_key ) Constructor
get_update_data ( ) : object Get update data
load_themes_screen ( ) Add hooks and scripts to the Appearance > Themes screen
set_theme_update_transient ( $value ) Set "updates available" transient
show_update_details ( ) Show update link.

Private Methods

Method Description
get_theme_version ( ) : string Get the current theme version
setup_hooks ( ) Setup hooks

Method Details

__construct() public method

Constructor
public __construct ( Yoast_Product $product, string $license_key )
$product Yoast_Product The Product.
$license_key string The License key.

get_update_data() public method

This gets the update data from a transient (12 hours), if set. If not, it will make a remote request and get the update data.
public get_update_data ( ) : object
return object $update_data Object containing the update data

load_themes_screen() public method

Add hooks and scripts to the Appearance > Themes screen
public load_themes_screen ( )

set_theme_update_transient() public method

Set "updates available" transient
public set_theme_update_transient ( $value )

show_update_details() public method

Opens Thickbox with Changelog.
public show_update_details ( )