PHP Class Fragen\GitHub_Updater\Theme

Class Theme
Author: Andy Fragen
Author: Seth Carstens
Author: UCF Web Communications
Inheritance: extends Base
Mostra file Open project: afragen/github-updater

Protected Properties

Property Type Description
$tag number Rollback variable.

Public Methods

Method Description
__construct ( ) Constructor.
customize_theme_update_html ( $prepared_themes ) : mixed Call theme messaging for single site installation.
get_remote_theme_meta ( ) Get remote theme meta to populate $config theme objects.
get_theme_configs ( ) : array Returns an array of configurations for the known themes.
instance ( ) : object The Theme object can be created/obtained via this method - this prevents unnecessary work in rebuilding the object and querying to construct a list of categories, etc.
load_pre_filters ( ) Load pre-update filters.
multisite_branch_switcher ( $theme_key, $theme ) : boolean | void Create branch switcher row for multisite installation.
pre_set_site_transient_update_themes ( array $transient ) : array | object Hook into pre_set_site_transient_update_themes to update.
remove_after_theme_row ( $theme_key, $theme ) Remove default after_theme_row_$stylesheet.
themes_api ( $false, $action, $response ) : mixed Put changelog in themes_api, return WP.org data as appropriate.
wp_theme_update_row ( $theme_key, $theme ) Add custom theme update row, from /wp-admin/includes/update.php Display update details or rollback links for multisite installation.

Protected Methods

Method Description
append_theme_actions_content ( object $theme ) : string Create theme update messaging for single site installation.
get_theme_meta ( ) : array Reads in WP_Theme class of each theme.
single_install_switcher ( object $theme ) : string Display rollback/branch switcher for single site installation.

Method Details

__construct() public method

Constructor.
public __construct ( )

append_theme_actions_content() protected method

Create theme update messaging for single site installation.
Author: Seth Carstens
protected append_theme_actions_content ( object $theme ) : string
$theme object
return string (content buffer)

customize_theme_update_html() public method

Call theme messaging for single site installation.
Author: Seth Carstens
public customize_theme_update_html ( $prepared_themes ) : mixed
$prepared_themes
return mixed

get_remote_theme_meta() public method

Calls to remote APIs to get data.

get_theme_configs() public method

Returns an array of configurations for the known themes.
public get_theme_configs ( ) : array
return array

get_theme_meta() protected method

Populates variable array.
protected get_theme_meta ( ) : array
return array Indexed array of associative arrays of theme details.

instance() public static method

The Theme object can be created/obtained via this method - this prevents unnecessary work in rebuilding the object and querying to construct a list of categories, etc.
public static instance ( ) : object
return object $instance Theme

load_pre_filters() public method

Load pre-update filters.
public load_pre_filters ( )

multisite_branch_switcher() public method

Create branch switcher row for multisite installation.
public multisite_branch_switcher ( $theme_key, $theme ) : boolean | void
$theme_key
$theme
return boolean | void

pre_set_site_transient_update_themes() public method

Finds newest tag and compares to current tag.
public pre_set_site_transient_update_themes ( array $transient ) : array | object
$transient array
return array | object

remove_after_theme_row() public method

Remove default after_theme_row_$stylesheet.
Author: @grappler
public remove_after_theme_row ( $theme_key, $theme )
$theme_key
$theme

single_install_switcher() protected method

Display rollback/branch switcher for single site installation.
protected single_install_switcher ( object $theme ) : string
$theme object
return string

themes_api() public method

Put changelog in themes_api, return WP.org data as appropriate.
public themes_api ( $false, $action, $response ) : mixed
$false
$action
$response
return mixed

wp_theme_update_row() public method

Add custom theme update row, from /wp-admin/includes/update.php Display update details or rollback links for multisite installation.
Author: Seth Carstens
public wp_theme_update_row ( $theme_key, $theme )
$theme_key
$theme

Property Details

$tag protected_oe property

Rollback variable.
protected number $tag
return number