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


PHP Jetpack::active_plan_supports方法代码示例

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


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

示例1: on_init

 /**
  * Fires on init
  */
 public function on_init()
 {
     add_action('wp_enqueue_media', array($this, 'enqueue_admin_scripts'));
     add_filter('plupload_default_settings', array($this, 'videopress_pluploder_config'));
     add_filter('wp_get_attachment_url', array($this, 'update_attachment_url_for_videopress'), 10, 2);
     if (Jetpack::active_plan_supports('videopress')) {
         add_filter('upload_mimes', array($this, 'add_video_upload_mimes'), 999);
     }
     add_action('admin_print_footer_scripts', array($this, 'print_in_footer_open_media_add_new'));
     add_action('admin_menu', array($this, 'change_add_new_menu_location'), 999);
     add_action('admin_head', array($this, 'enqueue_admin_styles'));
     VideoPress_Scheduler::init();
     VideoPress_XMLRPC::init();
 }
开发者ID:automattic,项目名称:jetpack,代码行数:17,代码来源:class.jetpack-videopress.php

示例2: get_options

 /**
  * Get VideoPress options
  */
 public static function get_options()
 {
     // Make sure we only get options from the database and services once per connection.
     if (count(self::$options) > 0) {
         return self::$options;
     }
     $defaults = array('meta' => array('max_upload_size' => 0));
     self::$options = Jetpack_Options::get_option(self::$option_name, array());
     self::$options = array_merge($defaults, self::$options);
     // Make sure that the shadow blog id never comes from the options, but instead uses the
     // associated shadow blog id, if videopress is enabled.
     self::$options['shadow_blog_id'] = 0;
     // Use the Jetpack ID for the shadow blog ID if we have a plan that supports VideoPress
     if (Jetpack::active_plan_supports('videopress')) {
         self::$options['shadow_blog_id'] = Jetpack_Options::get_option('id');
     }
     return self::$options;
 }
开发者ID:automattic,项目名称:jetpack,代码行数:21,代码来源:class.videopress-options.php

示例3: get_active_modules

 /**
  * Get a list of activated modules as an array of module slugs.
  */
 public static function get_active_modules()
 {
     $active = Jetpack_Options::get_option('active_modules');
     if (!is_array($active)) {
         $active = array();
     }
     if (class_exists('VaultPress') || function_exists('vaultpress_contact_service')) {
         $active[] = 'vaultpress';
     } else {
         $active = array_diff($active, array('vaultpress'));
     }
     // If this plan supports videopress, force activate module
     if (Jetpack::active_plan_supports('videopress')) {
         $active[] = 'videopress';
     } else {
         $active = array_diff($active, array('videopress'));
     }
     //If protect is active on the main site of a multisite, it should be active on all sites.
     if (!in_array('protect', $active) && is_multisite() && get_site_option('jetpack_protect_active')) {
         $active[] = 'protect';
     }
     return array_unique($active);
 }
开发者ID:automattic,项目名称:jetpack,代码行数:26,代码来源:class.jetpack.php


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