本文整理汇总了PHP中Jetpack::check_privacy方法的典型用法代码示例。如果您正苦于以下问题:PHP Jetpack::check_privacy方法的具体用法?PHP Jetpack::check_privacy怎么用?PHP Jetpack::check_privacy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jetpack
的用法示例。
在下文中一共展示了Jetpack::check_privacy方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jetpack_json_api_toggle
/**
* Module Name: JSON API
* Module Description: Allow applications to securely access your content through the cloud.
* Sort Order: 100
* First Introduced: 1.9
* Requires Connection: Yes
* Auto Activate: Public
* Module Tags: Writing, Developers
*/
function jetpack_json_api_toggle()
{
$jetpack = Jetpack::init();
$jetpack->sync->register('noop');
if (false !== strpos(current_filter(), 'jetpack_activate_module_')) {
Jetpack::check_privacy(__FILE__);
}
}
示例2: jetpack_enhanced_distribution_before_activate_default_modules
function jetpack_enhanced_distribution_before_activate_default_modules()
{
$old_version = Jetpack_Options::get_option('old_version');
list($old_version) = explode(':', $old_version);
if (version_compare($old_version, '1.9-something', '>=')) {
return;
}
Jetpack::check_privacy(__FILE__);
}
示例3: reindex_trigger
static function reindex_trigger()
{
$response = array('status' => 'ERROR');
// Force a privacy check
Jetpack::check_privacy(JETPACK__PLUGIN_FILE);
Jetpack::load_xml_rpc_client();
$client = new Jetpack_IXR_Client(array('user_id' => JETPACK_MASTER_USER));
$client->query('jetpack.reindexTrigger');
if (!$client->isError()) {
$response = $client->getResponse();
Jetpack_Options::update_option('sync_bulk_reindexing', true);
}
return $response;
}
示例4: jetpack_monitor_toggle
/**
* Module Name: Monitor
* Module Description: Jetpack Monitor will keep tabs on your site, and alert you the moment that downtime is detected.
* Sort Order: 55
* First Introduced: 2.6
* Requires Connection: Yes
* Auto Activate: No
*/
function jetpack_monitor_toggle()
{
$jetpack = Jetpack::init();
if (!$jetpack->current_user_is_connection_owner()) {
Jetpack::state('module', 'monitor');
Jetpack::state('error', 'master_user_required');
// Technically this call to `wp_safe_redirect` is not required because
// `Jetpack::activate_module` already sets up a redirect. However, this
// might not stay the case forever so it's clearer to do it here as well.
wp_safe_redirect(Jetpack::admin_url('page=jetpack'));
die;
}
$jetpack->sync->register('noop');
if (false !== strpos(current_filter(), 'jetpack_activate_module_')) {
Jetpack::check_privacy(__FILE__);
}
}
示例5: action_jetpack_activate_module_photon
/**
* Check if site is private and warn user if it is
*
* @uses Jetpack::check_privacy
* @action jetpack_activate_module_photon
* @return null
*/
public function action_jetpack_activate_module_photon()
{
Jetpack::check_privacy(__FILE__);
}
示例6: jetpack_sitemaps_activate
/**
* Check site privacy before activating sitemaps.
*
* @module sitemaps
*/
function jetpack_sitemaps_activate()
{
Jetpack::check_privacy(__FILE__);
}