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


PHP Jetpack::permit_ssl方法代码示例

本文整理汇总了PHP中Jetpack::permit_ssl方法的典型用法代码示例。如果您正苦于以下问题:PHP Jetpack::permit_ssl方法的具体用法?PHP Jetpack::permit_ssl怎么用?PHP Jetpack::permit_ssl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Jetpack的用法示例。


在下文中一共展示了Jetpack::permit_ssl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ajax_recheck_ssl

 function ajax_recheck_ssl()
 {
     check_ajax_referer('recheck-ssl', 'ajax-nonce');
     $result = Jetpack::permit_ssl(true);
     wp_send_json(array('enabled' => $result, 'message' => get_transient('jetpack_https_test_message')));
 }
开发者ID:automattic,项目名称:jetpack,代码行数:6,代码来源:class.jetpack.php

示例2: generate_stats_array

 public static function generate_stats_array($prefix = '')
 {
     $return = array();
     $return["{$prefix}version"] = JETPACK__VERSION;
     $return["{$prefix}wp-version"] = get_bloginfo('version');
     $return["{$prefix}php-version"] = PHP_VERSION;
     $return["{$prefix}branch"] = floatval(JETPACK__VERSION);
     $return["{$prefix}wp-branch"] = floatval(get_bloginfo('version'));
     $return["{$prefix}php-branch"] = floatval(PHP_VERSION);
     $return["{$prefix}ssl"] = Jetpack::permit_ssl();
     $return["{$prefix}language"] = get_bloginfo('language');
     $return["{$prefix}charset"] = get_bloginfo('charset');
     $return["{$prefix}is-multisite"] = is_multisite() ? 'multisite' : 'singlesite';
     $return["{$prefix}identitycrisis"] = Jetpack::check_identity_crisis(1) ? 'yes' : 'no';
     $return["{$prefix}plugins"] = implode(',', Jetpack::get_active_plugins());
     if (!empty($_SERVER['SERVER_ADDR']) || !empty($_SERVER['LOCAL_ADDR'])) {
         $ip = !empty($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
         $ip_arr = array_map('intval', explode('.', $ip));
         if (4 == sizeof($ip_arr)) {
             $return["{$prefix}ip-2-octets"] = implode('.', array_slice($ip_arr, 0, 2));
             $return["{$prefix}ip-3-octets"] = implode('.', array_slice($ip_arr, 0, 3));
         }
     }
     foreach (Jetpack::get_available_modules() as $slug) {
         $return["{$prefix}module-{$slug}"] = Jetpack::is_module_active($slug) ? 'on' : 'off';
     }
     return $return;
 }
开发者ID:aim-web-projects,项目名称:kobe-chuoh,代码行数:28,代码来源:class.jetpack-heartbeat.php

示例3: generate_stats_array

 public static function generate_stats_array($prefix = '')
 {
     $return = array();
     $return["{$prefix}version"] = JETPACK__VERSION;
     $return["{$prefix}wp-version"] = get_bloginfo('version');
     $return["{$prefix}php-version"] = PHP_VERSION;
     $return["{$prefix}branch"] = floatval(JETPACK__VERSION);
     $return["{$prefix}wp-branch"] = floatval(get_bloginfo('version'));
     $return["{$prefix}php-branch"] = floatval(PHP_VERSION);
     $return["{$prefix}public"] = Jetpack_Options::get_option('public');
     $return["{$prefix}ssl"] = Jetpack::permit_ssl();
     $return["{$prefix}is-https"] = is_ssl() ? 'https' : 'http';
     $return["{$prefix}language"] = get_bloginfo('language');
     $return["{$prefix}charset"] = get_bloginfo('charset');
     $return["{$prefix}is-multisite"] = is_multisite() ? 'multisite' : 'singlesite';
     $return["{$prefix}identitycrisis"] = Jetpack::check_identity_crisis(1) ? 'yes' : 'no';
     $return["{$prefix}plugins"] = implode(',', Jetpack::get_active_plugins());
     $return["{$prefix}single-user-site"] = Jetpack::is_single_user_site();
     $return["{$prefix}manage-enabled"] = Jetpack::is_module_active('manage');
     // is-multi-network can have three values, `single-site`, `single-network`, and `multi-network`
     $return["{$prefix}is-multi-network"] = 'single-site';
     if (is_multisite()) {
         $return["{$prefix}is-multi-network"] = Jetpack::is_multi_network() ? 'multi-network' : 'single-network';
     }
     if (!empty($_SERVER['SERVER_ADDR']) || !empty($_SERVER['LOCAL_ADDR'])) {
         $ip = !empty($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
         $ip_arr = array_map('intval', explode('.', $ip));
         if (4 == count($ip_arr)) {
             $return["{$prefix}ip-2-octets"] = implode('.', array_slice($ip_arr, 0, 2));
         }
     }
     foreach (Jetpack::get_available_modules() as $slug) {
         $return["{$prefix}module-{$slug}"] = Jetpack::is_module_active($slug) ? 'on' : 'off';
     }
     return $return;
 }
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:36,代码来源:class.jetpack-heartbeat.php

示例4: recheck_ssl

 public static function recheck_ssl()
 {
     $result = Jetpack::permit_ssl(true);
     return array('enabled' => $result, 'message' => get_transient('jetpack_https_test_message'));
 }
开发者ID:elliott-stocks,项目名称:jetpack,代码行数:5,代码来源:class.core-rest-api-endpoints.php

示例5: generate_stats_array

 public static function generate_stats_array($prefix = '')
 {
     $return = array();
     $return["{$prefix}version"] = JETPACK__VERSION;
     $return["{$prefix}wp-version"] = get_bloginfo('version');
     $return["{$prefix}php-version"] = PHP_VERSION;
     $return["{$prefix}branch"] = floatval(JETPACK__VERSION);
     $return["{$prefix}wp-branch"] = floatval(get_bloginfo('version'));
     $return["{$prefix}php-branch"] = floatval(PHP_VERSION);
     $return["{$prefix}public"] = Jetpack_Options::get_option('public');
     $return["{$prefix}ssl"] = Jetpack::permit_ssl();
     $return["{$prefix}language"] = get_bloginfo('language');
     $return["{$prefix}charset"] = get_bloginfo('charset');
     $return["{$prefix}is-multisite"] = is_multisite() ? 'multisite' : 'singlesite';
     $return["{$prefix}identitycrisis"] = Jetpack::check_identity_crisis(1) ? 'yes' : 'no';
     $return["{$prefix}plugins"] = implode(',', Jetpack::get_active_plugins());
     switch (Jetpack_Options::get_option('json_api_full_management', null)) {
         case null:
             $return["{$prefix}full_manage"] = 'unset';
             break;
         case false:
             $return["{$prefix}full_manage"] = 'false';
             break;
         case true:
             $return["{$prefix}full_manage"] = 'true';
             break;
         default:
             $return["{$prefix}full_manage"] = Jetpack_Options::get_option('json_api_full_management', null);
     }
     if (!Jetpack_Options::get_option('public')) {
         // Also flag things as private since we don't provide the user with option to easy opt into if the site is private
         $return["{$prefix}full_manage"] = 'private-' . $return["{$prefix}full_manage"];
     }
     // is-multi-network can have three values, `single-site`, `single-network`, and `multi-network`
     $return["{$prefix}is-multi-network"] = 'single-site';
     if (is_multisite()) {
         $return["{$prefix}is-multi-network"] = Jetpack::is_multi_network() ? 'multi-network' : 'single-network';
     }
     if (!empty($_SERVER['SERVER_ADDR']) || !empty($_SERVER['LOCAL_ADDR'])) {
         $ip = !empty($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
         $ip_arr = array_map('intval', explode('.', $ip));
         if (4 == count($ip_arr)) {
             $return["{$prefix}ip-2-octets"] = implode('.', array_slice($ip_arr, 0, 2));
             $return["{$prefix}ip-3-octets"] = implode('.', array_slice($ip_arr, 0, 3));
         }
     }
     foreach (Jetpack::get_available_modules() as $slug) {
         $return["{$prefix}module-{$slug}"] = Jetpack::is_module_active($slug) ? 'on' : 'off';
     }
     return $return;
 }
开发者ID:moushegh,项目名称:blog-source-configs,代码行数:51,代码来源:class.jetpack-heartbeat.php


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