本文整理汇总了PHP中Jetpack类的典型用法代码示例。如果您正苦于以下问题:PHP Jetpack类的具体用法?PHP Jetpack怎么用?PHP Jetpack使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Jetpack类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
if (class_exists('Jetpack') && Jetpack::is_active()) {
add_action('jetpack-start_step-connect-social', array($this, 'render'));
add_filter('jetpack_start_js_globals', array($this, 'jetpack_start_js_globals'));
}
}
示例2: format_module
protected static function format_module($module_slug)
{
$module_data = Jetpack::get_module($module_slug);
$module = array();
$module['id'] = $module_slug;
$module['active'] = Jetpack::is_module_active($module_slug);
$module['name'] = $module_data['name'];
$module['short_description'] = $module_data['description'];
$module['sort'] = $module_data['sort'];
$module['introduced'] = $module_data['introduced'];
$module['changed'] = $module_data['changed'];
$module['free'] = $module_data['free'];
$module['module_tags'] = $module_data['module_tags'];
// Fetch the HTML formatted long description
ob_start();
if (Jetpack::is_active() && has_action('jetpack_module_more_info_connected_' . $module_slug)) {
/** This action is documented in class.jetpack-modules-list-table.php */
do_action('jetpack_module_more_info_connected_' . $module_slug);
} else {
/** This action is documented in class.jetpack-modules-list-table.php */
do_action('jetpack_module_more_info_' . $module_slug);
}
$module['description'] = ob_get_clean();
return $module;
}
示例3: get_access_token
/**
* Gets locally stored token
*
* @return object|false
*/
public static function get_access_token($user_id = false)
{
if ($user_id) {
if (!($tokens = Jetpack::get_option('user_tokens'))) {
return false;
}
if ($user_id === JETPACK_MASTER_USER) {
if (!($user_id = Jetpack::get_option('master_user'))) {
return false;
}
}
if (!isset($tokens[$user_id]) || !($token = $tokens[$user_id])) {
return false;
}
$token_chunks = explode('.', $token);
if (empty($token_chunks[1]) || empty($token_chunks[2])) {
return false;
}
if ($user_id != $token_chunks[2]) {
return false;
}
$token = "{$token_chunks[0]}.{$token_chunks[1]}";
} else {
$token = Jetpack::get_option('blog_token');
if (empty($token)) {
return false;
}
}
return (object) array('secret' => $token, 'external_user_id' => (int) $user_id);
}
示例4: es_api_search_index
/**
* Executes an elasticsearch query via our REST API.
*
* Requires setup on our end and a paid addon to your hosting account.
* You probably shouldn't be using this function. Questions? Ask us.
*
* Valid arguments:
*
* * size: Number of query results to return.
*
* * from: Offset, the starting result to return.
*
* * multi_match: Will do a match search against the default fields (this is almost certainly what you want).
* e.g. array( 'query' => 'this is a test', 'fields' => array( 'content' ) )
* See: http://www.elasticsearch.org/guide/reference/query-dsl/multi-match-query.html
*
* * query_string: Will do a query_string search, interprets the string as Lucene query syntax.
* e.g. array( 'default_field' => 'content', 'query' => 'tag:(world OR nation) howdy' )
* This can fail if the user doesn't close parenthesis, or specifies a field that is not valid.
* See: http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query.html
*
* * more_like_this: Will do a more_like_this search, which is best for related content.
* e.g. array( 'fields' => array( 'title', 'content' ), 'like_text' => 'this is a test', 'min_term_freq' => 1, 'max_query_terms' => 12 )
* See: http://www.elasticsearch.org/guide/reference/query-dsl/mlt-query.html
*
* * facets: Structured set of facets. DO NOT do a terms facet on the content of posts/comments. It will load ALL terms into memory,
* probably taking minutes to complete and slowing down the entire cluster. With great power... etc.
* See: http://www.elasticsearch.org/guide/reference/api/search/facets/index.html
*
* * filter: Structured set of filters (often FASTER, since cached from one query to the next).
* See: http://www.elasticsearch.org/guide/reference/query-dsl/filtered-query.html
*
* * highlight: Structure defining how to highlight the results.
* See: http://www.elasticsearch.org/guide/reference/api/search/highlighting.html
*
* * fields: Structure defining what fields to return with the results.
* See: http://www.elasticsearch.org/guide/reference/api/search/fields.html
*
* * sort: Structure defining how to sort the results.
* See: http://www.elasticsearch.org/guide/reference/api/search/sort.html
*
* @param array $args
* @return bool|string False if WP_Error, otherwise JSON string
*/
function es_api_search_index($args)
{
if (class_exists('Jetpack')) {
$jetpack_blog_id = Jetpack::get_option('id');
if (!$jetpack_blog_id) {
return array('error' => 'Failed to get Jetpack blog_id');
}
$args['blog_id'] = $jetpack_blog_id;
}
$defaults = array('blog_id' => get_current_blog_id());
$args = wp_parse_args($args, $defaults);
$args['blog_id'] = absint($args['blog_id']);
$service_url = 'http://public-api.wordpress.com/rest/v1/sites/' . $args['blog_id'] . '/search';
unset($args['blog_id']);
$request = wp_remote_post($service_url, array('headers' => array('Content-Type' => 'application/json'), 'body' => json_encode($args)));
if (is_wp_error($request)) {
return false;
}
$response = json_decode(wp_remote_retrieve_body($request), true);
// Rewrite blog id from remote to local id
if (isset($response['results']) && isset($response['results']['hits'])) {
$local_blog_id = get_current_blog_id();
foreach ($response['results']['hits'] as $key => $hit) {
if (isset($hit['fields']['blog_id']) && $hit['fields']['blog_id'] == $jetpack_blog_id) {
$response['results']['hits'][$key]['fields']['blog_id'] = $local_blog_id;
}
}
}
return $response;
}
示例5: __construct
function __construct()
{
global $current_user;
$this->log('Created WP_Polldaddy Object: constructor');
$this->errors = new WP_Error();
$this->scheme = 'https';
$this->version = '2.0.22';
$this->multiple_accounts = true;
$this->polldaddy_client_class = 'api_client';
$this->polldaddy_clients = array();
$this->is_admin = (bool) current_user_can('manage_options');
$this->is_author = (bool) current_user_can('edit_posts');
$this->is_editor = (bool) current_user_can('delete_others_pages');
$this->user_code = null;
$this->rating_user_code = null;
$this->id = $current_user instanceof WP_User ? intval($current_user->ID) : 0;
$this->has_feedback_menu = false;
if (class_exists('Jetpack')) {
if (method_exists('Jetpack', 'is_active') && Jetpack::is_active()) {
$jetpack_active_modules = get_option('jetpack_active_modules');
if ($jetpack_active_modules && in_array('contact-form', $jetpack_active_modules)) {
$this->has_feedback_menu = true;
}
}
}
}
示例6: hoot_base_enqueue_styles
/**
* Load stylesheets for the front end.
*
* @since 1.0
* @access public
* @return void
*/
function hoot_base_enqueue_styles()
{
/* Gets ".min" suffix. */
$suffix = hoot_get_min_suffix();
/* Load Google Fonts if 'google-fonts' is active. */
if (current_theme_supports('google-fonts')) {
wp_enqueue_style('hoot-google-fonts', hoot_google_fonts_enqueue_url(), array(), null);
}
/* Load lightSlider style if 'light-slider' is active. */
if (current_theme_supports('slick-slider')) {
wp_enqueue_style('slick', trailingslashit(THEME_URI) . "css/slick{$suffix}.css", false, '1.5.9');
wp_enqueue_style('slick-theme', trailingslashit(THEME_URI) . "css/slick-theme{$suffix}.css", false, '1.5.9');
}
/* Load gallery style if 'cleaner-gallery' is active. */
if (current_theme_supports('cleaner-gallery')) {
wp_enqueue_style('gallery', trailingslashit(HOOT_CSS) . "gallery{$suffix}.css");
}
/* Load gallery styles if Jetpack 'tiled-gallery' module is active */
if (class_exists('Jetpack') && Jetpack::is_module_active('tiled-gallery')) {
wp_enqueue_style('gallery', trailingslashit(HOOT_CSS) . "gallery{$suffix}.css");
wp_enqueue_style('hoot-jetpack', trailingslashit(THEME_URI) . "css/jetpack{$suffix}.css");
}
/* Load font awesome if 'font-awesome' is active. */
if (current_theme_supports('font-awesome')) {
wp_enqueue_style('font-awesome', trailingslashit(HOOT_CSS) . "font-awesome{$suffix}.css", false, '4.2.0');
}
}
示例7: photon_msg
function photon_msg()
{
if (current_user_can('jetpack_manage_modules')) {
?>
<div class="jp-jitm">
<a href="#" data-module="photon" class="dismiss"><span class="genericon genericon-close"></span></a>
<div class="jp-emblem">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0" y="0" viewBox="0 0 172.9 172.9" enable-background="new 0 0 172.9 172.9" xml:space="preserve">
<path d="M86.4 0C38.7 0 0 38.7 0 86.4c0 47.7 38.7 86.4 86.4 86.4s86.4-38.7 86.4-86.4C172.9 38.7 134.2 0 86.4 0zM83.1 106.6l-27.1-6.9C49 98 45.7 90.1 49.3 84l33.8-58.5V106.6zM124.9 88.9l-33.8 58.5V66.3l27.1 6.9C125.1 74.9 128.4 82.8 124.9 88.9z"/>
</svg>
</div>
<p>
<?php
_e('Deliver super-fast images to your visitors that are automatically optimized for any device.', 'jetpack');
?>
</p>
<p>
<a href="#" data-module="photon" class="activate button button-jetpack">
<?php
esc_html_e('Activate Photon', 'jetpack');
?>
</a>
</p>
</div>
<?php
//jitm is being viewed, track it
$jetpack = Jetpack::init();
$jetpack->stat('jitm', 'photon-viewed');
$jetpack->do_stats('server_side');
}
}
示例8: vine_embed_video
/**
* Vine embed code:
* <iframe class="vine-embed" src="https://vine.co/v/bjHh0zHdgZT" width="600" height="600" frameborder="0"></iframe>
* <script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script>
*
* URL example:
* https://vine.co/v/bjHh0zHdgZT/
*
* Embed shortcode examples:
* [embed]https://vine.co/v/bjHh0zHdgZT[/embed]
* [embed width="300"]https://vine.co/v/bjHh0zHdgZT[/embed]
* [embed type="postcard" width="300"]https://vine.co/v/bjHh0zHdgZT[/embed]
**/
function vine_embed_video($matches, $attr, $url, $rawattr)
{
static $vine_flag_embedded_script;
$max_height = 300;
$type = 'simple';
// Only allow 'postcard' or 'simple' types
if (isset($rawattr['type']) && $rawattr['type'] === 'postcard') {
$type = 'postcard';
}
$vine_size = Jetpack::get_content_width();
// If the user enters a value for width or height, we ignore the Jetpack::get_content_width()
if (isset($rawattr['width']) || isset($rawattr['height'])) {
// 300 is the minimum size that Vine provides for embeds. Lower than that, the postcard embeds looks weird.
$vine_size = max($max_height, min($attr['width'], $attr['height']));
}
if (empty($vine_size)) {
$vine_size = $max_height;
}
$url = 'https://vine.co/v/' . $matches[1] . '/embed/' . $type;
$vine_html = sprintf('<span class="embed-vine" style="display: block;"><iframe class="vine-embed" src="%s" width="%s" height="%s" frameborder="0"></iframe></span>', esc_url($url), (int) $vine_size, (int) $vine_size);
if ($vine_flag_embedded_script !== true) {
$vine_html .= '<script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script>';
$vine_flag_embedded_script = true;
}
return $vine_html;
}
示例9: enlightenment_general_settings
function enlightenment_general_settings()
{
add_settings_section('navbar', __('Navbar', 'enlightenment'), '__return_false', 'enlightenment_theme_options');
add_settings_section('page_header', __('Page Header', 'enlightenment'), '__return_false', 'enlightenment_theme_options');
add_settings_section('post_thumbnails', __('Post Thumbnails', 'enlightenment'), '__return_false', 'enlightenment_theme_options');
add_settings_section('entry_meta', __('Entry Meta', 'enlightenment'), '__return_false', 'enlightenment_theme_options');
add_settings_section('lightbox', __('Lightbox', 'enlightenment'), '__return_false', 'enlightenment_theme_options');
add_settings_section('posts_nav', __('Posts Navigation', 'enlightenment'), '__return_false', 'enlightenment_theme_options');
add_settings_section('footer', __('Footer', 'enlightenment'), '__return_false', 'enlightenment_theme_options');
add_settings_field('navbar_position', __('Navbar Position', 'enlightenment'), 'enlightenment_select_box', 'enlightenment_theme_options', 'navbar', array('name' => 'navbar_position', 'options' => array('fixed-top' => 'Fixed on Top', 'static-top' => 'Static')));
add_settings_field('navbar_background', __('Navbar Background Color', 'enlightenment'), 'enlightenment_select_box', 'enlightenment_theme_options', 'navbar', array('name' => 'navbar_background', 'options' => array('default' => 'Light', 'inverse' => 'Dark')));
add_settings_field('navbar_size', __('Navbar Size', 'enlightenment'), 'enlightenment_select_box', 'enlightenment_theme_options', 'navbar', array('name' => 'navbar_size', 'options' => array('small' => 'Small', 'large' => 'Large'), 'description' => __('Menu Item Descriptions are hidden in the small Navbar.', 'enlightenment')));
add_settings_field('shrink_navbar', __('Shrink Navbar', 'enlightenment'), 'enlightenment_checkbox', 'enlightenment_theme_options', 'navbar', array('name' => 'shrink_navbar', 'label' => __('Shrink Fixed Navbar when scrolling', 'enlightenment')));
add_settings_field('blog_header_text', __('Blog Pages Header Text', 'enlightenment'), 'enlightenment_text_input', 'enlightenment_theme_options', 'page_header', array('name' => 'blog_header_text'));
add_settings_field('blog_header_description', __('Blog Pages Description', 'enlightenment'), 'enlightenment_textarea', 'enlightenment_theme_options', 'page_header', array('name' => 'blog_header_description'));
add_settings_field('thumbnail_header_image', __('Thumbnail Header Image', 'enlightenment'), 'enlightenment_checkbox', 'enlightenment_theme_options', 'page_header', array('name' => 'thumbnail_header_image', 'label' => __('Display post thumbnail as header image on single posts', 'enlightenment')));
add_settings_field('thumbnails_crop_flag', __('Crop Thumbnails', 'enlightenment'), 'enlightenment_checkbox', 'enlightenment_theme_options', 'post_thumbnails', array('name' => 'thumbnails_crop_flag', 'label' => __('Hard crop post thumbnails', 'enlightenment'), 'description' => sprintf(__('After changing this option, it is recommended to recreate your thumbnails using a plugin like <a href="%s">AJAX Thumbnail Rebuild</a>', 'enlightenment'), esc_url('http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/'))));
add_settings_field('thumbnails_size', __('Thumbnails Size', 'enlightenment'), 'enlightenment_select_box', 'enlightenment_theme_options', 'post_thumbnails', array('name' => 'thumbnails_size', 'options' => array('small' => 'Small', 'large' => 'Large')));
$post_meta = enlightenment_theme_option('post_meta');
add_settings_field('post_meta', __('Post Meta', 'enlightenment'), 'enlightenment_checkboxes', 'enlightenment_theme_options', 'entry_meta', array('boxes' => array(array('name' => 'post_meta[author]', 'label' => __('Author', 'enlightenment'), 'checked' => $post_meta['author']), array('name' => 'post_meta[date]', 'label' => __('Date', 'enlightenment'), 'checked' => $post_meta['date']), array('name' => 'post_meta[category]', 'label' => __('Category', 'enlightenment'), 'checked' => $post_meta['category']), array('name' => 'post_meta[comments]', 'label' => __('Comments', 'enlightenment'), 'checked' => $post_meta['comments']), array('name' => 'post_meta[edit_link]', 'label' => __('Edit Post Link', 'enlightenment'), 'checked' => $post_meta['edit_link']))));
if (class_exists('Jetpack') && in_array('custom-content-types', Jetpack::get_active_modules())) {
$post_meta = enlightenment_theme_option('portfolio_meta');
add_settings_field('portfolio_meta', __('Portfolio Meta', 'enlightenment'), 'enlightenment_checkboxes', 'enlightenment_theme_options', 'entry_meta', array('boxes' => array(array('name' => 'portfolio_meta[author]', 'label' => __('Author', 'enlightenment'), 'checked' => $post_meta['author']), array('name' => 'portfolio_meta[date]', 'label' => __('Date', 'enlightenment'), 'checked' => $post_meta['date']), array('name' => 'portfolio_meta[project_type]', 'label' => __('Project Type', 'enlightenment'), 'checked' => $post_meta['project_type']), array('name' => 'portfolio_meta[comments]', 'label' => __('Comments', 'enlightenment'), 'checked' => $post_meta['comments']), array('name' => 'portfolio_meta[edit_link]', 'label' => __('Edit Project Link', 'enlightenment'), 'checked' => $post_meta['edit_link']))));
}
add_settings_field('enable_lightbox', __('Enable Lightbox', 'enlightenment'), 'enlightenment_checkbox', 'enlightenment_theme_options', 'lightbox', array('name' => 'enable_lightbox', 'label' => __('Open image links in a lightbox', 'enlightenment')));
add_settings_field('lightbox_script', __('Lightbox Script', 'enlightenment'), 'enlightenment_select_box', 'enlightenment_theme_options', 'lightbox', array('name' => 'lightbox_script', 'options' => array('colorbox' => __('Colorbox', 'enlightenment'), 'fluidbox' => __('Fluidbox', 'enlightenment'), 'imagelightbox' => __('ImageLightbox.js', 'enlightenment'))));
add_settings_field('posts_nav_style', __('Posts Navigation Style', 'enlightenment'), 'enlightenment_select_box', 'enlightenment_theme_options', 'posts_nav', array('name' => 'posts_nav_style', 'options' => array('static' => __('Static Links', 'enlightenment'), 'ajax' => 'AJAX Links', 'infinite' => 'Infinite Scroll')));
add_settings_field('posts_nav_labels', __('Static Links Labels', 'enlightenment'), 'enlightenment_select_box', 'enlightenment_theme_options', 'posts_nav', array('name' => 'posts_nav_labels', 'options' => array('next/prev' => __('Next Page / Previous Page', 'enlightenment'), 'older/newer' => __('Older Posts / Newer Posts', 'enlightenment'), 'earlier/later' => __('Earlier Posts / Later Posts', 'enlightenment'), 'numbered' => __('Numbered Pagination', 'enlightenment'))));
add_settings_field('copyright_notice', __('Copyright Notice', 'enlightenment'), 'enlightenment_text_input', 'enlightenment_theme_options', 'footer', array('name' => 'copyright_notice', 'description' => __('%year% = Current Year, %sitename% = Website Name', 'enlightenment')));
add_settings_field('credit_links', __('Credit Links', 'enlightenment'), 'enlightenment_checkboxes', 'enlightenment_theme_options', 'footer', array('boxes' => array(array('name' => 'theme_credit_link', 'label' => 'Theme Credit Link'), array('name' => 'author_credit_link', 'label' => 'Theme Author Credit Link'), array('name' => 'wordpress_credit_link', 'label' => 'WordPress Credit Link'))));
}
示例10: user_role_change
/**
* Synchronize connected user role changes
*/
static function user_role_change($user_id)
{
if (Jetpack::is_active() && Jetpack::is_user_connected($user_id)) {
$current_user_id = get_current_user_id();
wp_set_current_user($user_id);
$role = Jetpack::translate_current_user_to_role();
$signed_role = Jetpack::sign_role($role);
wp_set_current_user($current_user_id);
$master_token = Jetpack_Data::get_access_token(JETPACK_MASTER_USER);
$master_user_id = absint($master_token->external_user_id);
if (!$master_user_id) {
return;
}
// this shouldn't happen
Jetpack::xmlrpc_async_call('jetpack.updateRole', $user_id, $signed_role);
//@todo retry on failure
//try to choose a new master if we're demoting the current one
if ($user_id == $master_user_id && 'administrator' != $role) {
$query = new WP_User_Query(array('fields' => array('id'), 'role' => 'administrator', 'orderby' => 'id', 'exclude' => array($master_user_id)));
$new_master = false;
foreach ($query->results as $result) {
$uid = absint($result->id);
if ($uid && Jetpack::is_user_connected($uid)) {
$new_master = $uid;
break;
}
}
if ($new_master) {
Jetpack_Options::update_option('master_user', $new_master);
}
// else disconnect..?
}
}
}
示例11: sandwich_myshortcode
function sandwich_myshortcode()
{
// No need to register our shortcode since it already exists
// Check if Shortcake exists
if (!function_exists('shortcode_ui_register_for_shortcode')) {
return;
}
// Only create the UI when in the admin
if (!is_admin()) {
return;
}
// Register Shortcake UI
shortcode_ui_register_for_shortcode('myshortcode', array('label' => __('Some Existing Shortcode', 'pbsandwich'), 'listItemImage' => 'dashicons-wordpress', 'attrs' => array(array('label' => __('Content', 'pbsandwich'), 'attr' => 'content', 'type' => 'textarea'), array('label' => __('Some Text', 'pbsandwich'), 'attr' => 'some_text', 'type' => 'text'), array('label' => __('Some Color', 'pbsandwich'), 'attr' => 'some_color', 'type' => 'color', 'value' => '#333333'))));
// TODO: If the rendered shortcode in the editor NEEDS to be previewed in a logged out state (e.g. login forms)
// uncomment this and add in your shortcode here.
// sandwich_add_logged_out_shortcode( 'myshortcode' );
// Make sure Jetpack is activated
if (!class_exists('Jetpack')) {
add_action('print_media_templates', 'sandwich_jetpack_myshortcode_disabled');
return;
}
// Make sure our required Jetpack module is turned on
if (!Jetpack::is_module_active('some-jetpack-module')) {
add_action('print_media_templates', 'sandwich_jetpack_myshortcode_disabled');
return;
}
}
示例12: init
function init()
{
if (fastfood_is_mobile()) {
return;
}
//Infinite Scroll
if (Jetpack::is_module_active('infinite-scroll')) {
//nop
}
//Sharedaddy
if (Jetpack::is_module_active('sharedaddy')) {
remove_filter('the_content', 'sharing_display', 19);
remove_filter('the_excerpt', 'sharing_display', 19);
add_action('fastfood_hook_entry_bottom', array($this, 'sharedaddy'));
}
//Carousel
if (Jetpack::is_module_active('carousel')) {
//nop
}
//Likes
if (Jetpack::is_module_active('likes')) {
add_action('fastfood_hook_entry_bottom', array($this, 'likes'));
remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1);
add_filter('fastfood_filter_likes', array(Jetpack_Likes::init(), 'post_likes'), 30, 1);
}
}
示例13: __construct
function __construct($args = array(), $path = false, $port = 80, $timeout = 15)
{
$defaults = array('url' => Jetpack::xmlrpc_api_url(), 'user_id' => 0);
$args = wp_parse_args($args, $defaults);
$this->jetpack_args = $args;
$this->IXR_Client($args['url'], $path, $port, $timeout);
}
示例14: result
protected function result()
{
$args = $this->input();
$event = isset($args['event']) && is_string($args['event']) ? $code : false;
$num = isset($args['num']) ? intval($num) : false;
return array('log' => Jetpack::get_log($event, $num));
}
示例15: format_plugin
protected function format_plugin($plugin_file, $plugin_data)
{
$plugin = array();
$plugin['id'] = preg_replace("/(.+)\\.php\$/", "\$1", $plugin_file);
$plugin['slug'] = Jetpack_Autoupdate::get_plugin_slug($plugin_file);
$plugin['active'] = Jetpack::is_plugin_active($plugin_file);
$plugin['name'] = $plugin_data['Name'];
$plugin['plugin_url'] = $plugin_data['PluginURI'];
$plugin['version'] = $plugin_data['Version'];
$plugin['description'] = $plugin_data['Description'];
$plugin['author'] = $plugin_data['Author'];
$plugin['author_url'] = $plugin_data['AuthorURI'];
$plugin['network'] = $plugin_data['Network'];
$plugin['update'] = $this->get_plugin_updates($plugin_file);
$plugin['next_autoupdate'] = date('Y-m-d H:i:s', wp_next_scheduled('wp_maybe_auto_update'));
$autoupdate = in_array($plugin_file, Jetpack_Options::get_option('autoupdate_plugins', array()));
$plugin['autoupdate'] = $autoupdate;
$autoupdate_translation = in_array($plugin_file, Jetpack_Options::get_option('autoupdate_plugins_translations', array()));
$plugin['autoupdate_translation'] = $autoupdate || $autoupdate_translation;
$plugin['uninstallable'] = is_uninstallable_plugin($plugin_file);
if (!empty($this->log[$plugin_file])) {
$plugin['log'] = $this->log[$plugin_file];
}
return $plugin;
}