PHP Class VaultPress, vip-mu-plugins-public

ファイルを表示 Open project: Automattic/vip-mu-plugins-public Class Usage Examples

Public Properties

Property Type Description
$auto_register_option
$db_version
$option_name
$plugin_version

Public Methods

Method Description
__construct ( )
_fix_ixr_null_to_string ( &$args )
activate ( $network_wide )
activated_notice ( ) show message after activation
add_admin_actions_and_filters ( )
add_global_actions_and_filters ( )
add_js_token ( )
add_listener_actions_and_filters ( )
add_ping ( $type, $data, $hook = null )
add_to_jetpack_options_whitelist ( array $options ) : array Add the VaultPress options to the Jetpack options management whitelist.
add_vp_required_filters ( )
add_woocommerce_actions ( )
admin_head ( )
admin_init ( )
admin_menu ( )
ai_ping_count ( )
ai_ping_get ( $num = 1, $order = 'ASC' )
ai_ping_insert ( $value )
ai_ping_next ( ) : integer | false Use an option ID to ensure a unique ping ID for the site.
authenticate ( $user, $username, $password )
block_change_handler ( $table, $query )
can_use_openssl ( )
check_connection ( $force_check = false )
check_firewall ( )
clear_connection ( )
comment_action_handler ( $comment_id ) Handle Notifying VaultPress of Comment Activity
commentmeta_insert_handler ( $meta_id, $comment_id = null ) Handle Notifying VaultPress of Commentmeta Changes
commentmeta_modification_handler ( $meta_id, $object_id, $meta_key, $meta_value )
connect_notice ( ) show message if plugin is activated but not connected to VaultPress
contact_service ( $action, $args = [] )
deactivate ( )
delete_option ( $key )
do_c_block_firewall ( )
do_pings ( )
error_notice ( )
generic_change_handler ( $table, $key )
get_config ( $key )
get_jetpack_email ( )
get_last_table ( ) Emulate $wpdb->last_table
get_login_tokens ( )
get_messages ( $force_reload = false ) get any messages from the VP servers
get_option ( $key )
get_option_name_ignore ( $return_defaults = false ) Option name patterns to ignore
get_post_meta_name_ignore ( $return_defaults = false ) post meta name patterns to ignore
get_should_ignore_files ( $return_defaults = false ) file name patterns to ignore
get_table_from_query ( $q ) Emulate hyperdb::get_table_from_query()
init ( )
ip_in_cidr ( $ip, $cidr )
ip_in_cidrs ( $ip, $cidrs )
is_localhost ( )
is_main_site ( )
is_multisite ( )
is_registered ( )
is_write_query ( $q ) Emulate hyperdb::is_write_query()
link_action_handler ( $link_id ) Handle Notifying VaultPress of Link Changes
load_first ( $value )
load_menu ( )
option_handler ( $option_name ) means that we do not need to resolve an id like we would for, say, a post.
parse_request ( $wp )
plugin_action_handler ( $plugin = '' ) Handle Notifying VaultPress of Plugin Activation/Deactivation
post_action_handler ( $post_id ) Handle Notifying VaultPress of Post Changes
postmeta_action_handler ( $meta_id, $post_id = null, $meta_key = null ) Handle Notifying VaultPress of PostMeta changes via old school cherypicked hooks
postmeta_insert_handler ( $meta_id, $post_id, $meta_key, $meta_value = '' ) Handle Notifying VaultPress of PostMeta changes via newfangled metadata functions
postmeta_modification_handler ( $meta_id, $object_id, $meta_key, $meta_value )
record_table ( $table ) Emulate $wpdb->last_table
register ( $registration_key )
register_via_jetpack ( )
request_firewall_update ( $external_services = false )
reset_pings ( )
resolve_content_dir ( )
resolve_upload_path ( )
response ( $response, $raw = false )
server_url ( )
set_object_terms_handler ( $object_id, $terms, $tt_ids ) Handle Notifying VaultPress of term_relationship changes
sign_string ( $string, $secret, $salt )
site_url ( )
styles ( )
sync_jetpack_options ( ) Sync the VaultPress options to WordPress.com if the Jetpack plugin is active.
table_notify_columns ( $table )
term_handler ( $term_id, $tt_id = null ) Handle Notifying VaultPress of term changes
term_relationship_handler ( $object_id, $term_id ) Handle Notifying VaultPress of term_relationship changes
term_relationships_handler ( $object_id, $term_ids ) Handle Notifying VaultPress of term_relationship changes
term_taxonomies_handler ( $tt_ids ) Handle Notifying VaultPress of term_taxonomy changes
term_taxonomy_handler ( $tt_id ) Handle Notifying VaultPress of term_taxonomy changes
theme_action_handler ( $theme ) Handle Notifying VaultPress of Theme Switches
toolbar ( $wp_admin_bar ) display a security threat notice if one exists
ui ( )
ui_fatal_error ( )
ui_load ( )
ui_main ( )
ui_message ( $message, $type = 'notice', $heading = '' )
ui_register ( )
update_firewall ( )
update_option ( $key, $value )
update_options ( )
update_plan_settings ( $message ) Update local cache of VP plan settings, based on a ping or connection test result
updated_auto_register_option ( mixed $old_value, mixed $value ) When the VaultPress auto-register option is updated, run the registration call.
upgrade ( )
upload_handler ( $file ) Handle Notifying VaultPress of Upload Activity
userid_action_handler ( $user_or_id ) Handle Notifying VaultPress of User Edits
usermeta_action_handler ( $umeta_id, $user_id, $meta_key, $meta_value = '' ) Handle Notifying VaultPress of UserMeta changes
validate_api_signature ( )
validate_ip_address ( $rxs )
verify_table ( $table )
woocommerce_attribute_handler ( $id )
woocommerce_order_item_handler ( $id )
woocommerce_order_item_meta_handler ( $id )
woocommerce_tax_rate_handler ( $id ) WooCommerce notifications

Method Details

__construct() public method

public __construct ( )

_fix_ixr_null_to_string() public method

public _fix_ixr_null_to_string ( &$args )

activate() public method

public activate ( $network_wide )

activated_notice() public method

show message after activation
public activated_notice ( )

add_admin_actions_and_filters() public method

add_global_actions_and_filters() public method

add_js_token() public method

public add_js_token ( )

add_listener_actions_and_filters() public method

add_ping() public method

public add_ping ( $type, $data, $hook = null )

add_to_jetpack_options_whitelist() public method

Allows Jetpack to register VaultPress options automatically.
public add_to_jetpack_options_whitelist ( array $options ) : array
$options array The list of whitelisted option names.
return array The updated whitelist

add_vp_required_filters() public method

add_woocommerce_actions() public method

admin_head() public method

public admin_head ( )

admin_init() public method

public admin_init ( )

admin_menu() public method

public admin_menu ( )

ai_ping_count() public method

public ai_ping_count ( )

ai_ping_get() public method

public ai_ping_get ( $num = 1, $order = 'ASC' )

ai_ping_insert() public method

public ai_ping_insert ( $value )

ai_ping_next() public method

Use an option ID to ensure a unique ping ID for the site.
public ai_ping_next ( ) : integer | false
return integer | false The new ping number. False, if there was an error.

authenticate() public method

public authenticate ( $user, $username, $password )

block_change_handler() public method

public block_change_handler ( $table, $query )

can_use_openssl() public method

public can_use_openssl ( )

check_connection() public method

public check_connection ( $force_check = false )

check_firewall() public method

public check_firewall ( )

clear_connection() public method

public clear_connection ( )

comment_action_handler() public method

Handle Notifying VaultPress of Comment Activity
public comment_action_handler ( $comment_id )

commentmeta_insert_handler() public method

Handle Notifying VaultPress of Commentmeta Changes
public commentmeta_insert_handler ( $meta_id, $comment_id = null )

commentmeta_modification_handler() public method

public commentmeta_modification_handler ( $meta_id, $object_id, $meta_key, $meta_value )

connect_notice() public method

show message if plugin is activated but not connected to VaultPress
public connect_notice ( )

contact_service() public method

public contact_service ( $action, $args = [] )

deactivate() public method

public deactivate ( )

delete_option() public method

public delete_option ( $key )

do_c_block_firewall() public method

public do_c_block_firewall ( )

do_pings() public method

public do_pings ( )

error_notice() public method

public error_notice ( )

generic_change_handler() public method

public generic_change_handler ( $table, $key )

get_config() public method

public get_config ( $key )

get_jetpack_email() public method

public get_jetpack_email ( )

get_last_table() public method

Emulate $wpdb->last_table
public get_last_table ( )

get_login_tokens() public method

public get_login_tokens ( )

get_messages() public method

get any messages from the VP servers
public get_messages ( $force_reload = false )

get_option() public method

public get_option ( $key )

get_option_name_ignore() public method

Option name patterns to ignore
public get_option_name_ignore ( $return_defaults = false )

get_post_meta_name_ignore() public method

post meta name patterns to ignore
public get_post_meta_name_ignore ( $return_defaults = false )

get_should_ignore_files() public method

file name patterns to ignore
public get_should_ignore_files ( $return_defaults = false )

get_table_from_query() public method

Emulate hyperdb::get_table_from_query()
public get_table_from_query ( $q )

init() static public method

static public init ( )

ip_in_cidr() public method

public ip_in_cidr ( $ip, $cidr )

ip_in_cidrs() public method

public ip_in_cidrs ( $ip, $cidrs )

is_localhost() public method

public is_localhost ( )

is_main_site() public method

public is_main_site ( )

is_multisite() public method

public is_multisite ( )

is_registered() public method

public is_registered ( )

is_write_query() public method

Emulate hyperdb::is_write_query()
public is_write_query ( $q )

load_first() public method

public load_first ( $value )

load_menu() public method

public load_menu ( )

option_handler() public method

means that we do not need to resolve an id like we would for, say, a post.
public option_handler ( $option_name )

parse_request() public method

public parse_request ( $wp )

plugin_action_handler() public method

Handle Notifying VaultPress of Plugin Activation/Deactivation
public plugin_action_handler ( $plugin = '' )

post_action_handler() public method

Handle Notifying VaultPress of Post Changes
public post_action_handler ( $post_id )

postmeta_action_handler() public method

Handle Notifying VaultPress of PostMeta changes via old school cherypicked hooks
public postmeta_action_handler ( $meta_id, $post_id = null, $meta_key = null )

postmeta_insert_handler() public method

Handle Notifying VaultPress of PostMeta changes via newfangled metadata functions
public postmeta_insert_handler ( $meta_id, $post_id, $meta_key, $meta_value = '' )

postmeta_modification_handler() public method

public postmeta_modification_handler ( $meta_id, $object_id, $meta_key, $meta_value )

record_table() public method

Emulate $wpdb->last_table
public record_table ( $table )

register() static public method

static public register ( $registration_key )

register_via_jetpack() public method

request_firewall_update() public method

public request_firewall_update ( $external_services = false )

reset_pings() public method

public reset_pings ( )

resolve_content_dir() public method

public resolve_content_dir ( )

resolve_upload_path() public method

public resolve_upload_path ( )

response() public method

public response ( $response, $raw = false )

server_url() public method

public server_url ( )

set_object_terms_handler() public method

Handle Notifying VaultPress of term_relationship changes
public set_object_terms_handler ( $object_id, $terms, $tt_ids )

sign_string() public method

public sign_string ( $string, $secret, $salt )

site_url() public method

public site_url ( )

styles() public method

public styles ( )

sync_jetpack_options() public method

Sync the VaultPress options to WordPress.com if the Jetpack plugin is active.

table_notify_columns() public method

public table_notify_columns ( $table )

term_handler() public method

Handle Notifying VaultPress of term changes
public term_handler ( $term_id, $tt_id = null )

term_relationship_handler() public method

Handle Notifying VaultPress of term_relationship changes
public term_relationship_handler ( $object_id, $term_id )

term_relationships_handler() public method

Handle Notifying VaultPress of term_relationship changes
public term_relationships_handler ( $object_id, $term_ids )

term_taxonomies_handler() public method

Handle Notifying VaultPress of term_taxonomy changes
public term_taxonomies_handler ( $tt_ids )

term_taxonomy_handler() public method

Handle Notifying VaultPress of term_taxonomy changes
public term_taxonomy_handler ( $tt_id )

theme_action_handler() public method

Handle Notifying VaultPress of Theme Switches
public theme_action_handler ( $theme )

toolbar() public method

display a security threat notice if one exists
public toolbar ( $wp_admin_bar )

ui() public method

public ui ( )

ui_fatal_error() public method

public ui_fatal_error ( )

ui_load() public method

public ui_load ( )

ui_main() public method

public ui_main ( )

ui_message() public method

public ui_message ( $message, $type = 'notice', $heading = '' )

ui_register() public method

public ui_register ( )

update_firewall() public method

public update_firewall ( )

update_option() public method

public update_option ( $key, $value )

update_options() public method

public update_options ( )

update_plan_settings() public method

Update local cache of VP plan settings, based on a ping or connection test result
public update_plan_settings ( $message )

updated_auto_register_option() public method

This should only be run when the option is updated from the Jetpack/WP.com API call, and only if the new key is different than the old key.
public updated_auto_register_option ( mixed $old_value, mixed $value )
$old_value mixed The old option value, or the option name (if add_option).
$value mixed The new option value.

upgrade() public method

public upgrade ( )

upload_handler() public method

Handle Notifying VaultPress of Upload Activity
public upload_handler ( $file )

userid_action_handler() public method

Handle Notifying VaultPress of User Edits
public userid_action_handler ( $user_or_id )

usermeta_action_handler() public method

Handle Notifying VaultPress of UserMeta changes
public usermeta_action_handler ( $umeta_id, $user_id, $meta_key, $meta_value = '' )

validate_api_signature() public method

validate_ip_address() public method

public validate_ip_address ( $rxs )

verify_table() public method

public verify_table ( $table )

woocommerce_attribute_handler() public method

woocommerce_order_item_handler() public method

woocommerce_order_item_meta_handler() public method

woocommerce_tax_rate_handler() public method

WooCommerce notifications

Property Details

$auto_register_option public_oe property

public $auto_register_option

$db_version public_oe property

public $db_version

$option_name public_oe property

public $option_name

$plugin_version public_oe property

public $plugin_version