PHP Class Fragen\GitHub_Updater\Settings

Class Settings
Author: Andy Fragen
Inheritance: extends Base
Mostrar archivo Open project: afragen/github-updater

Protected Properties

Property Type Description
$remote_management array Supported remote management services.

Public Methods

Method Description
__construct ( ) Start up.
add_plugin_page ( ) Add options page.
create_admin_page ( ) Options page callback.
ghu_tokens ( ) Create and return settings fields for private repositories.
load_hooks ( ) Load relevant action/filter hooks.
page_init ( ) Register and add settings.
plugin_action_links ( $links ) : array Add setting link to plugin page.
print_section_bitbucket_info ( ) Print the Bitbucket repo text.
print_section_bitbucket_username ( ) Print the Bitbucket user/pass text.
print_section_ghu_settings ( ) Print the GitHub Updater text.
print_section_github_access_token ( ) Print the GitHub Personal Access Token text.
print_section_github_info ( ) Print the GitHub text.
print_section_gitlab_info ( ) Print the GitLab text.
print_section_gitlab_token ( ) Print the GitLab Access Token text.
print_section_remote_management ( ) Print the Remote Management text.
remote_management_page_init ( ) Settings for Remote Management.
sanitize ( array $input ) : array Sanitize each setting field as needed.
token_callback_checkbox ( $args ) Get the settings option array and print one of its values.
token_callback_checkbox_remote ( $args ) : boolean | void Get the settings option array and print one of its values.
token_callback_text ( $args ) Get the settings option array and print one of its values.
update_settings ( ) Update settings for single site or network activated.

Protected Methods

Method Description
redirect_on_save ( ) Redirect to correct Settings tab on Save.

Private Methods

Method Description
display_ghu_repos ( $type ) Write out listing of installed plugins and themes using GitHub Updater.
filter_options ( ) : array | mixed Filter options so that sub-tab options are grouped in single $options variable.
installed_git_repos ( ) : array Return an array of the installed repository types.
options_sub_tabs ( ) Render the settings sub-tabs.
options_tabs ( ) Renders setting tabs.
refresh_transients ( ) : boolean Clear GitHub Updater transients.
reset_api_key ( ) : boolean Reset RESTful API key.
settings_sub_tabs ( ) : array Set up the Settings Sub-tabs.
settings_tabs ( ) : array Define tabs for Settings page.

Method Details

__construct() public method

Start up.
public __construct ( )

add_plugin_page() public method

Add options page.
public add_plugin_page ( )

create_admin_page() public method

Options page callback.
public create_admin_page ( )

ghu_tokens() public method

Create and return settings fields for private repositories.
public ghu_tokens ( )

load_hooks() public method

Load relevant action/filter hooks.
public load_hooks ( )

page_init() public method

Check to see if it's a private repo.
public page_init ( )

print_section_bitbucket_info() public method

Print the Bitbucket repo text.

print_section_bitbucket_username() public method

Print the Bitbucket user/pass text.

print_section_ghu_settings() public method

Print the GitHub Updater text.

print_section_github_access_token() public method

Print the GitHub Personal Access Token text.

print_section_github_info() public method

Print the GitHub text.

print_section_gitlab_info() public method

Print the GitLab text.

print_section_gitlab_token() public method

Print the GitLab Access Token text.

print_section_remote_management() public method

Print the Remote Management text.

redirect_on_save() protected method

Redirect to correct Settings tab on Save.
protected redirect_on_save ( )

remote_management_page_init() public method

Settings for Remote Management.

sanitize() public static method

Sanitize each setting field as needed.
public static sanitize ( array $input ) : array
$input array Contains all settings fields as array keys
return array

token_callback_checkbox() public method

Get the settings option array and print one of its values.
public token_callback_checkbox ( $args )
$args

token_callback_checkbox_remote() public method

For remote management settings.
public token_callback_checkbox_remote ( $args ) : boolean | void
$args
return boolean | void

token_callback_text() public method

Get the settings option array and print one of its values.
public token_callback_text ( $args )
$args

update_settings() public method

Update settings for single site or network activated.
public update_settings ( )

Property Details

$remote_management protected_oe static_oe property

Supported remote management services.
protected static array $remote_management
return array