check_privacy() public static method

public static check_privacy ( $file )
コード例 #1
0
/**
 * 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
0
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
0
 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
0
/**
 * 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
0
 /**
  * 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
0
ファイル: sitemaps.php プロジェクト: elliott-stocks/jetpack
/**
 * Check site privacy before activating sitemaps.
 *
 * @module sitemaps
 */
function jetpack_sitemaps_activate()
{
    Jetpack::check_privacy(__FILE__);
}