本文整理汇总了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();
}
示例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;
}
示例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);
}