PHP Class Fragen\GitHub_Updater\Plugin

Update a WordPress plugin from a GitHub repo.
Author: Andy Fragen
Author: Codepress
Inheritance: extends Base
Datei anzeigen Open project: afragen/github-updater

Protected Properties

Property Type Description
$tag Rollback variable

Public Methods

Method Description
__construct ( ) Constructor.
get_plugin_configs ( ) : array Returns an array of configurations for the known plugins.
get_remote_plugin_meta ( ) Get remote plugin meta to populate $config plugin objects.
instance ( ) : object The Plugin 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.
plugin_branch_switcher ( $plugin_file, $plugin_data ) : boolean Add branch switch row to plugins page.
plugin_row_meta ( $links, $file ) : array Add 'View details' link to plugins page.
plugins_api ( $false, $action, $response ) : mixed Put changelog in plugins_api, return WP.org data as appropriate
pre_set_site_transient_update_plugins ( $transient ) : mixed Hook into pre_set_site_transient_update_plugins to update from GitHub.

Protected Methods

Method Description
get_plugin_meta ( ) : array Get details of Git-sourced plugins from those that are installed.

Method Details

__construct() public method

Constructor.
public __construct ( )

get_plugin_configs() public method

Returns an array of configurations for the known plugins.
public get_plugin_configs ( ) : array
return array

get_plugin_meta() protected method

Get details of Git-sourced plugins from those that are installed.
protected get_plugin_meta ( ) : array
return array Indexed array of associative arrays of plugin details.

get_remote_plugin_meta() public method

Calls to remote APIs to get data.

instance() public static method

The Plugin 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 Plugin

load_pre_filters() public method

Load pre-update filters.
public load_pre_filters ( )

plugin_branch_switcher() public method

Add branch switch row to plugins page.
public plugin_branch_switcher ( $plugin_file, $plugin_data ) : boolean
$plugin_file
$plugin_data
return boolean

plugin_row_meta() public method

Add 'View details' link to plugins page.
public plugin_row_meta ( $links, $file ) : array
$links
$file
return array $links

plugins_api() public method

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

pre_set_site_transient_update_plugins() public method

Hook into pre_set_site_transient_update_plugins to update from GitHub.
public pre_set_site_transient_update_plugins ( $transient ) : mixed
$transient
return mixed

Property Details

$tag protected_oe property

Rollback variable
protected $tag