Свойство | Type | Description | |
---|---|---|---|
$auth_required | boolean | Used by class Settings and class Messages. | |
$config | object | Store details of all repositories that are installed. | |
$error_code | Holds HTTP error code from API call. | ||
$extra_headers | array | Variable for holding extra theme and plugin headers. | |
$extra_repo_headers | array | Holds extra repo header types. | |
$git_servers | array | Holds git server types. | |
$hours | integer | Variable for setting update transient hours. | |
$languages | Class Object for Language Packs. | ||
$load_repo_meta | boolean | Checks user privileges and when to load. | |
$options | array | Holds the values to be used in the fields callbacks. | |
$options_remote | mixed | Holds the values for remote management settings. | |
$repo_api | object | Class Object for API. |
Méthode | Description | |
---|---|---|
__construct ( ) | Constructor. | |
add_headers ( $extra_headers ) : array | Add extra headers to get_plugins() or wp_get_themes(). | |
admin_pages_update_transient ( ) | Ensure update transient is update to date on admin pages. | |
ajax_update ( ) | AJAX endpoint for REST updates. | |
background_update ( ) | Piggyback on built-in update function to get metadata. | |
can_update ( $type ) : boolean | Function to check if plugin or theme object is able to be updated. | |
delete_all_transients ( ) : boolean | Delete all _ghu- transients from database table. | |
forced_meta_update_plugins ( boolean $true = false ) | Performs actual plugin metadata fetching. | |
forced_meta_update_remote_management ( ) | Calls $this->forced_meta_update_plugins() and $this->forced_meta_update_themes() for remote management services. | |
forced_meta_update_themes ( boolean $true = false ) | Performs actual theme metadata fetching. | |
get_remote_repo_meta ( $repo ) : boolean | Get remote repo meta data for plugins or themes. | |
init ( ) : boolean | Instantiate Plugin, Theme, and Settings for proper user capabilities. | |
load_hooks ( ) | Load relevant action/filter hooks. | |
remove_hooks ( ) | Remove hooks after use. | |
set_options_filter ( ) | Allows developers to use 'github_updater_set_options' hook to set access tokens or other settings. | |
set_rollback ( mixed $update_data ) : mixed | Test if rollback and then run set_rollback_transient. | |
upgrader_post_install ( boolean $true, array $hook_extra, array $result ) : mixed | Delete $source when updating from GitLab Release Asset. | |
upgrader_source_selection ( string $source, string $remote_source, object $upgrader, array $hook_extra = null ) : string | Used for renaming of sources to ensure correct directory name. |
Méthode | Description | |
---|---|---|
add_meta_repo_object ( ) | Add remote data to type object. | |
ensure_api_key_is_set ( ) | Ensure api key is set. | |
exit_no_update ( $response, $branch = false ) : boolean | Test to exit early if no update available, saves API calls. | |
get_changelog_filename ( $type ) : boolean | string | Get filename of changelog and return. | |
get_file_headers ( $contents, $type ) : array | Take remote file contents as string and parse headers. | |
get_local_info ( $repo, $file ) : null | string | Get local file info if no update available. Save API calls. | |
get_repo_parts ( $repo, $type ) : mixed | Create repo parts. | |
get_repo_slugs ( string $slug, object $upgrader_object = null ) : array | Set array with normal and extended repo names. | |
get_update_url ( string $type, string $action, string $repo_name ) : string | void | Generate update URL. | |
is_doing_ajax ( ) : boolean | Checks to see if DOING_AJAX. | |
is_heartbeat ( ) : boolean | Checks to see if a heartbeat is resulting in activity. | |
is_private ( object $repo ) : boolean | Is this a private repo? Test for whether remote_version is set ( default = 0.0.0 ) or a repo option is set/not empty. | |
load_options ( ) | Load site options. | |
make_branch_switch_row ( array $data ) : mixed | Make branch switch row. | |
make_rating ( $repo_meta ) : integer | Create some sort of rating from 0 to 100 for use in star ratings. | |
parse_header_uri ( $repo_header ) : array | Parse URI param returning array of parts. | |
parse_tags ( $response, $repo_type ) : boolean | Parse tags and set object data. | |
set_defaults ( $type ) | Set default values for plugin/theme. | |
set_file_info ( $response ) | Set repo object file info. | |
set_readme_info ( $response ) : boolean | Set data from readme.txt. | |
update_row_enclosure ( $repo_name, $type, boolean $branch_switcher = false ) : array | Return correct update row opening and closing tags for Shiny Updates. |
Méthode | Description | |
---|---|---|
set_rollback_transient ( string $type, object $repo ) | Update transient for rollback or branch switch. |
public add_headers ( $extra_headers ) : array | ||
$extra_headers | ||
Résultat | array |
protected add_meta_repo_object ( ) |
public admin_pages_update_transient ( ) |
public background_update ( ) |
public can_update ( $type ) : boolean | ||
$type | ||
Résultat | boolean |
public delete_all_transients ( ) : boolean | ||
Résultat | boolean |
protected ensure_api_key_is_set ( ) |
protected exit_no_update ( $response, $branch = false ) : boolean | ||
$response | array|bool | |
$branch | bool | |
Résultat | boolean |
public forced_meta_update_plugins ( boolean $true = false ) | ||
$true | boolean | Only used from API::wp_update_response() |
public forced_meta_update_remote_management ( ) |
public forced_meta_update_themes ( boolean $true = false ) | ||
$true | boolean | Only used from API::wp_update_response() |
protected get_changelog_filename ( $type ) : boolean | string | ||
$type | ||
Résultat | boolean | string |
protected get_file_headers ( $contents, $type ) : array | ||
$contents | ||
$type | ||
Résultat | array |
protected get_local_info ( $repo, $file ) : null | string | ||
$repo | ||
$file | ||
Résultat | null | string |
public get_remote_repo_meta ( $repo ) : boolean | ||
$repo | ||
Résultat | boolean |
protected get_repo_parts ( $repo, $type ) : mixed | ||
$repo | ||
$type | ||
Résultat | mixed |
protected static is_doing_ajax ( ) : boolean | ||
Résultat | boolean |
protected static is_heartbeat ( ) : boolean | ||
Résultat | boolean |
protected is_private ( object $repo ) : boolean | ||
$repo | object | |
Résultat | boolean |
protected make_branch_switch_row ( array $data ) : mixed | ||
$data | array | Parameters for creating branch switching row. |
Résultat | mixed |
protected make_rating ( $repo_meta ) : integer | ||
$repo_meta | ||
Résultat | integer |
protected parse_header_uri ( $repo_header ) : array | ||
$repo_header | ||
Résultat | array |
protected parse_tags ( $response, $repo_type ) : boolean | ||
$response | ||
$repo_type | ||
Résultat | boolean |
protected set_defaults ( $type ) | ||
$type |
protected set_file_info ( $response ) | ||
$response |
public set_options_filter ( ) |
protected set_readme_info ( $response ) : boolean | ||
$response | ||
Résultat | boolean |
public set_rollback ( mixed $update_data ) : mixed | ||
$update_data | mixed | |
Résultat | mixed | $update_data |
protected update_row_enclosure ( $repo_name, $type, boolean $branch_switcher = false ) : array | ||
$repo_name | ||
$type | ||
$branch_switcher | boolean | |
Résultat | array |
protected static bool $auth_required | ||
Résultat | boolean |
protected object $config | ||
Résultat | object |
protected static $error_code |
protected static array $extra_headers | ||
Résultat | array |
protected static array $extra_repo_headers | ||
Résultat | array |
protected static array $git_servers | ||
Résultat | array |
protected static int $hours | ||
Résultat | integer |
protected static bool $load_repo_meta | ||
Résultat | boolean |
protected static array $options | ||
Résultat | array |
protected static mixed $options_remote | ||
Résultat | mixed |