当前位置: 首页>>代码示例>>PHP>>正文


PHP Jetpack::check_privacy方法代码示例

本文整理汇总了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__);
    }
}
开发者ID:Nancers,项目名称:Snancy-Website-Files,代码行数:17,代码来源:json-api.php

示例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__);
}
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:9,代码来源:enhanced-distribution.php

示例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;
 }
开发者ID:elliott-stocks,项目名称:jetpack,代码行数:14,代码来源:class.jetpack-sync-reindex.php

示例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__);
    }
}
开发者ID:Nancers,项目名称:Snancy-Website-Files,代码行数:25,代码来源:monitor.php

示例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__);
 }
开发者ID:rbryerking,项目名称:skillcrush-wordpress,代码行数:11,代码来源:class.photon.php

示例6: jetpack_sitemaps_activate

/**
 * Check site privacy before activating sitemaps.
 *
 * @module sitemaps
 */
function jetpack_sitemaps_activate()
{
    Jetpack::check_privacy(__FILE__);
}
开发者ID:elliott-stocks,项目名称:jetpack,代码行数:9,代码来源:sitemaps.php


注:本文中的Jetpack::check_privacy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。