메소드 |
설명 |
|
activate_plugins_permission_check ( ) : boolean |
Verify that user can view Jetpack admin page and can activate plugins. |
|
build_connect_url ( ) : string | WP_Error |
Gets a new connect raw URL with fresh nonce. |
|
cast_value ( mixed $value, array $definition ) : boolean | float | integer | string |
Perform a casting to the value specified in the option definition. |
|
configure_modules_permission_check ( ) : boolean |
Verify that user can update Jetpack modules. |
|
confirm_safe_mode ( ) : boolean |
Handles identity crisis mitigation, confirming safe mode for this site. |
|
connect_url_permission_callback ( ) : boolean | WP_Error |
Verify that the user can get a connect/link URL |
|
disconnect_site ( $data ) : boolean | WP_Error |
Disconnects Jetpack from the WordPress.com Servers |
|
disconnect_site_permission_callback ( ) : boolean | WP_Error |
Verify that the user can disconnect the site. |
|
dismiss_notice ( $data ) : array | wp-error |
Handles dismissing of Jetpack Notices |
|
get_module_requested ( string $route = '/module/(?P<slug>[a-z\-]+)' ) : array |
Get the currently accessed route and return the module slug in it. |
|
get_plugin ( WP_REST_Request $data ) : boolean | WP_Error |
Get data about the queried plugin. Currently it only returns whether the plugin is active or not. |
|
get_plugin_update_count ( ) : mixed | WP_Error |
Get number of plugin updates available. |
|
get_plugins ( ) : WP_REST_Response | WP_Error |
Get plugins data in site. |
|
get_remote_value ( string $module, string $option ) : boolean |
Get a value not saved locally. |
|
get_settings ( ) : object |
Get miscellaneous settings for this Jetpack installation, like Holiday Snow. |
|
get_site_data ( ) : array |
Get site data, including for example, the site's current plan. |
|
get_updateable_data_list ( string | array $selector = '' ) : array |
Returns a list of module options or general settings that can be updated. |
|
get_updateable_parameters ( string $selector = '' ) : array |
Get the query parameters to update module options or general settings. |
|
get_user_connection_data ( ) : object |
Get miscellaneous user data related to the connection. Similar data available in old "My Jetpack". |
|
get_user_connection_data_permission_callback ( ) : boolean | WP_Error |
Verify that a user can get the data about the current user. |
|
holiday_snow_option_name ( ) : string |
Returns the proper name for Jetpack Holiday Snow setting. |
|
identity_crisis_mitigation_permission_check ( ) : boolean |
Verify that user can mitigate an identity crisis. |
|
jetpack_connection_status ( ) : boolean |
Get connection status for this Jetpack site. |
|
jumpstart_activate ( WP_REST_Request $data ) : boolean | WP_Error |
Activates a series of valid Jetpack modules and initializes some options. |
|
jumpstart_deactivate ( WP_REST_Request $data ) : boolean | WP_Error |
Dismisses Jumpstart so user is not prompted to go through it again. |
|
jumpstart_toggle ( WP_REST_Request $data ) : boolean | WP_Error |
Toggles activation or deactivation of the JumpStart |
|
manage_modules_permission_check ( ) : boolean |
Verify that user can manage Jetpack modules. |
|
migrate_stats_and_subscribers ( ) : boolean |
Handles identity crisis mitigation, migrating stats and subscribers from old url to this, new url. |
|
prepare_modules_for_response ( string $modules = '', null | string $slug = null ) : array |
Adds extra information for modules. |
|
prepare_options_for_response ( string $module = '' ) : array |
Remove 'validate_callback' item from options available for module. |
|
register_endpoints ( ) |
Declare the Jetpack REST API endpoints. |
|
reset_jetpack_options ( WP_REST_Request $data ) : boolean | WP_Error |
Reset Jetpack options |
|
rest_authorization_required_code ( ) : integer |
Contextual HTTP error code for authorization failure. |
|
route ( $path, $classname, $method, $constructor_arguments = NULL, $endpoint_arguments = NULL ) |
|
|
sanitize_stats_allowed_roles ( string | boolean $value ) : boolean |
If for some reason the roles allowed to see Stats are empty (for example, user tampering with checkboxes),
return an array with only 'administrator' as the allowed role and save it for 'roles' option. |
|
split_options ( array $separate_options, array $grouped_options, string $prefix = '' ) : array |
Splits module options saved as arrays like relatedposts or verification_services_codes into separate options to be returned in the response. |
|
start_fresh_connection ( ) : boolean | WP_Error |
This IDC resolution will disconnect the site and re-connect to a completely new
and separate shadow site than the original. |
|
unlink_user ( $data ) : boolean | WP_Error |
Unlinks current user from the WordPress.com Servers. |
|
unlink_user_permission_callback ( ) : boolean | WP_Error |
Verify that a user can use the /connection/user endpoint. Has to be a registered user and be currently linked. |
|
update_setting ( WP_REST_Request $data ) : object |
Update a single miscellaneous setting for this Jetpack installation, like Holiday Snow. |
|
update_settings_permission_check ( ) : boolean |
Verify that user can update Jetpack general settings. |
|
validate_alphanum ( string $value = '', WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is an alphanumeric or empty string (to be able to clear the field). |
|
validate_boolean ( string | boolean $value, WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is either a pure boolean or a numeric string that can be mapped to a boolean. |
|
validate_custom_service ( string | boolean $value, WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter has enough information to build a custom sharing button. |
|
validate_custom_service_id ( string $value = '', WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is a custom sharing service ID like 'custom-1461976264'. |
|
validate_list_item ( string $value = '', WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter belongs to a list of admitted values. |
|
validate_module_list ( string $value = '', WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter belongs to a list of admitted values. |
|
validate_posint ( integer $value, WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is a positive integer. |
|
validate_services ( string | boolean $value, WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is among the views where the Sharing can be displayed. |
|
validate_sharing_show ( string | boolean $value, WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is among the views where the Sharing can be displayed. |
|
validate_stats_roles ( string | boolean $value, WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is among the roles allowed for Stats. |
|
validate_string ( string $value = '', WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is a string. |
|
validate_twitter_username ( string $value = '', WP_REST_Request $request, string $param ) : boolean |
Validates that the parameter is a Twitter username or empty string (to be able to clear the field). |
|
view_admin_page_permission_check ( ) : boolean |
Verify that user can view Jetpack admin page. |
|