$xmlrpc_server
$xmlrpc_server
$instance : \Jetpack
Holds the singleton instance of this class
$conflicting_plugins : array
Map of modules that have conflicts with plugins and should not be auto-activated if the plugins are active. Used by filter_default_modules
Plugin Authors: If you'd like to prevent a single module from auto-activating,
change module-slug
and add this to your plugin:
add_filter( 'jetpack_get_default_modules', 'my_jetpack_get_default_modules' ); function my_jetpack_get_default_modules( $modules ) {
return array_diff( $modules, array( 'module-slug' ) );
}
handle_deprecated_modules(array $modules) : array
Checks activated modules during auto-activation to determine if any of those modules are being deprecated. If so, close them out, and add any replacement modules.
Runs at priority 99 by default.
This is run late, so that it can still activate a module if the new module is a replacement for another that the user currently has active, even if something at the normal priority would kibosh everything.
array | $modules |
filter_default_modules(array $modules) : array
Checks activated plugins during auto-activation to determine if any of those plugins are in the list with a corresponding module that is not compatible with the plugin. The module will not be allowed to auto-activate.
array | $modules |
throw_error_on_activate_plugin(string $plugin)
Sometimes a plugin can activate without causing errors, but it will cause errors on the next page load.
This function artificially throws errors for such cases (whitelisted).
string | $plugin | The activated plugin. |
get_avatar_url(int|string|object $id_or_email, int $size, string $default, bool $force_display) : array
Centralize the function here until it gets added to core.
int|string|object | $id_or_email | A user ID, email address, or comment object |
int | $size | Size of the avatar image |
string | $default | URL to a default image to use if no avatar is available |
bool | $force_display | Whether to force it to return an avatar even if show_avatars is disabled |
First element is the URL, second is the class.
get_cloud_site_options(string|array $option_names) : array
Pings the WordPress.com Mirror Site for the specified options.
string|array | $option_names | The option names to request from the WordPress.com Mirror Site |
An associative array of the option values as stored in the WordPress.com Mirror Site
check_identity_crisis(bool $force_recheck) : array
Checks to make sure that local options have the same values as remote options. Will cache the results for up to 24 hours.
bool | $force_recheck | Whether to ignore any cached transient and manually re-check. |
An array of options that do not match. If everything is good, it will evaluate to false.
whitelist_identity_crisis_value(string $key, string $value) : bool
Adds a value to the whitelist for the specified key.
string | $key | The option name that we're whitelisting the value for. |
string | $value | The value that we're intending to add to the whitelist. |
Whether the value was added to the whitelist, or false if it was already there.
is_identity_crisis_value_whitelisted(string $key, string $value) : bool
Checks whether a value is already whitelisted.
string | $key | The option name that we're checking the value for. |
string | $value | The value that we're curious to see if it's on the whitelist. |
Whether the value is whitelisted.