PHP Class Fragen\GitHub_Updater\Plugin

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

Protected Properties

Свойство Type Description
$tag Rollback variable

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

__construct() public méthode

Constructor.
public __construct ( )

get_plugin_configs() public méthode

Returns an array of configurations for the known plugins.
public get_plugin_configs ( ) : array
Résultat array

get_plugin_meta() protected méthode

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

get_remote_plugin_meta() public méthode

Calls to remote APIs to get data.

instance() public static méthode

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
Résultat object $instance Plugin

load_pre_filters() public méthode

Load pre-update filters.
public load_pre_filters ( )

plugin_branch_switcher() public méthode

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

plugin_row_meta() public méthode

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

plugins_api() public méthode

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

pre_set_site_transient_update_plugins() public méthode

Hook into pre_set_site_transient_update_plugins to update from GitHub.
public pre_set_site_transient_update_plugins ( $transient ) : mixed
$transient
Résultat mixed

Property Details

$tag protected_oe property

Rollback variable
protected $tag