This commit is contained in:
emmymayo
2025-02-05 23:15:46 +01:00
commit 7269c99357
16995 changed files with 3389680 additions and 0 deletions
+94
View File
@@ -0,0 +1,94 @@
<?php
/**
* Compatibility files for third-party plugins.
* This is used to improve compatibility of specific Jetpack features with third-party plugins.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack;
use Automattic\Jetpack\Status\Host;
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_3rd_party_compat_filters', 11 );
/**
* Loads the individual 3rd-party compat functions.
*
* This is a refactor of load_3rd_party() to load the individual compat files only when needed instead of universally.
*/
function load_3rd_party_compat_filters() {
// bbPress
if ( function_exists( 'bbpress' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/bbpress.php';
}
// Beaver Builder
if ( class_exists( 'FLBuilder' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/beaverbuilder.php';
}
// Bitly
if ( class_exists( 'Bitly' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/bitly.php';
}
// BuddyPress
if ( class_exists( 'BuddyPress' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/buddypress.php';
}
// AMP. AMP__DIR__ is defined in the AMP plugin since the very first version.
if ( Constants::is_defined( 'AMP__DIR__' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/amp.php';
}
// Domain Mapping. All assume multisite, so it's an easy check.
if ( Constants::is_defined( 'SUNRISE' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/class-domain-mapping.php';
}
// Debug Bar
if ( class_exists( 'Debug_Bar' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/debug-bar.php';
}
// Letting these always load since it handles somethings upon plugin activation.
require_once JETPACK__PLUGIN_DIR . '/3rd-party/creative-mail.php';
require_once JETPACK__PLUGIN_DIR . '/3rd-party/jetpack-backup.php';
require_once JETPACK__PLUGIN_DIR . '/3rd-party/jetpack-boost.php';
require_once JETPACK__PLUGIN_DIR . '/3rd-party/woocommerce-services.php';
// qTranslate. Plugin closed in 2021, but leaving support for now to allow sites to drop it.
if ( Constants::is_defined( 'QTX_VERSION' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/qtranslate-x.php';
}
// VaultPress.
if ( Constants::is_defined( 'VAULTPRESS__VERSION' ) || class_exists( 'VaultPress' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/vaultpress.php';
}
// Web Stories
if ( Constants::is_defined( 'WEBSTORIES_VERSION' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/web-stories.php';
}
// WooCommerce
if ( class_exists( 'WooCommerce' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/woocommerce.php';
}
// Atomic Weekly
if ( ( new Host() )->is_atomic_platform() ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/atomic.php';
}
// WordPress.com Reader
require_once JETPACK__PLUGIN_DIR . '/3rd-party/wpcom-reader.php';
// WPML
if ( defined( 'ICL_SITEPRESS_VERSION' ) ) {
require_once JETPACK__PLUGIN_DIR . '/3rd-party/wpml.php';
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
/**
* This file contains compatibility features for AMP to improve Jetpack feature support.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack;
/**
* Load Jetpack_AMP_Support.
*/
function load_3rd_party_amp_support() {
// Only load the support class when AMP actually initializes.
// This avoids calls to some slow functions if the plugin is loaded but
// 'amp_is_enabled' is used to prevent it from initializing.
require_once JETPACK__PLUGIN_DIR . '/3rd-party/class.jetpack-amp-support.php';
add_action( 'init', array( 'Jetpack_AMP_Support', 'init' ), 1 );
add_action( 'admin_init', array( 'Jetpack_AMP_Support', 'admin_init' ), 1 );
}
add_action( 'amp_init', __NAMESPACE__ . '\load_3rd_party_amp_support' );
+33
View File
@@ -0,0 +1,33 @@
<?php
/**
* Helper functions for the Atomic platform.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Third_Party;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Status\Host;
/**
* Handles suppressing development version notices on Atomic-hosted sites.
*
* @param bool $development_version Filterable value if this is a development version of Jetpack.
*
* @return bool
*/
function atomic_weekly_override( $development_version ) {
if ( ( new Host() )->is_atomic_platform() ) {
$haystack = Constants::get_constant( 'JETPACK__PLUGIN_DIR' );
$needle = '/jetpack-dev/';
if ( str_ends_with( $haystack, $needle ) ) {
return $development_version; // Returns the default response if the active Jetpack version is from the beta plugin.
}
$development_version = false; // Returns false for regular installs on Atomic.
}
return $development_version; // Return default if not on Atomic.
}
add_filter( 'jetpack_development_version', __NAMESPACE__ . '\atomic_weekly_override' );
+70
View File
@@ -0,0 +1,70 @@
<?php
/**
* Compatibility functions for bbpress.
*
* Only added if bbpress is active via function_exists( 'bbpress' ) in 3rd-party.php.
*
* @package automattic/jetpack
*/
use Automattic\Jetpack\Image_CDN\Image_CDN;
// Priority 11 needed to ensure sharing_display is loaded.
add_action( 'init', 'jetpack_bbpress_compat', 11 );
/**
* Adds Jetpack + bbPress Compatibility filters.
*
* @author Brandon Kraft
* @since 3.7.1
*/
function jetpack_bbpress_compat() {
/**
* Add compatibility layer for REST API.
*
* @since 8.5.0 Moved from root-level file and check_rest_api_compat()
*/
require_once __DIR__ . '/class-jetpack-bbpress-rest-api.php';
Jetpack_BbPress_REST_API::instance();
// Adds sharing buttons to bbPress items.
if ( function_exists( 'sharing_display' ) ) {
add_filter( 'bbp_get_topic_content', 'sharing_display', 19 );
add_action( 'bbp_template_after_single_forum', 'jetpack_sharing_bbpress' );
add_action( 'bbp_template_after_single_topic', 'jetpack_sharing_bbpress' );
}
/**
* Enable Markdown support for bbpress post types.
*
* @author Brandon Kraft
* @since 6.0.0
*/
if ( function_exists( 'bbp_get_topic_post_type' ) ) {
add_post_type_support( bbp_get_topic_post_type(), 'wpcom-markdown' );
add_post_type_support( bbp_get_reply_post_type(), 'wpcom-markdown' );
add_post_type_support( bbp_get_forum_post_type(), 'wpcom-markdown' );
}
/**
* Use Photon for all images in Topics and replies.
*
* @since 4.9.0
*/
if ( class_exists( Image_CDN::class ) && Image_CDN::is_enabled() ) {
add_filter( 'bbp_get_topic_content', array( Image_CDN::class, 'filter_the_content' ), 999999 );
add_filter( 'bbp_get_reply_content', array( Image_CDN::class, 'filter_the_content' ), 999999 );
}
}
/**
* Display Jetpack "Sharing" buttons on bbPress 2.x forums/ topics/ lead topics/ replies.
*
* Determination if the sharing buttons should display on the post type is handled within sharing_display().
*
* @author David Decker
* @since 3.7.0
*/
function jetpack_sharing_bbpress() {
sharing_display( null, true );
}
+21
View File
@@ -0,0 +1,21 @@
<?php
/**
* Beaverbuilder Compatibility.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Third_Party;
use Automattic\Jetpack\Status\Host;
add_action( 'init', __NAMESPACE__ . '\beaverbuilder_refresh' );
/**
* If masterbar module is active force BeaverBuilder to refresh when publishing a layout.
*/
function beaverbuilder_refresh() {
if ( ( new Host() )->is_woa_site() ) {
add_filter( 'fl_builder_should_refresh_on_publish', '__return_true' );
}
}
+35
View File
@@ -0,0 +1,35 @@
<?php
/**
* Fixes issues with the Official Bitly for WordPress
* https://wordpress.org/plugins/bitly/
*
* @package automattic/jetpack
*/
if ( isset( $GLOBALS['bitly'] ) ) {
if ( method_exists( $GLOBALS['bitly'], 'og_tags' ) ) {
remove_action( 'wp_head', array( $GLOBALS['bitly'], 'og_tags' ) );
}
add_action( 'wp_head', 'jetpack_bitly_og_tag', 100 );
}
/**
* Adds bitly OG tags.
*/
function jetpack_bitly_og_tag() {
if ( has_filter( 'wp_head', 'jetpack_og_tags' ) === false ) {
// Add the bitly part again back if we don't have any jetpack_og_tags added.
if ( method_exists( $GLOBALS['bitly'], 'og_tags' ) ) {
$GLOBALS['bitly']->og_tags();
}
} elseif (
isset( $GLOBALS['posts'] )
&& $GLOBALS['posts'][0]->ID > 0
&& method_exists( $GLOBALS['bitly'], 'get_bitly_link_for_post_id' )
) {
printf(
"<meta property=\"bitly:url\" content=\"%s\" /> \n",
esc_attr( $GLOBALS['bitly']->get_bitly_link_for_post_id( $GLOBALS['posts'][0]->ID ) )
);
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
/**
* 3rd Party Integration for BuddyPress.
*
* @package automattic/jetpack.
*/
namespace Automattic\Jetpack\Third_Party;
add_filter( 'bp_core_pre_avatar_handle_upload', __NAMESPACE__ . '\blobphoto' );
/**
* Adds filters for skipping photon during pre_avatar_handle_upload.
*
* @param bool $bool Passthrough of filter's original content. No changes made.
*
* @return bool
*/
function blobphoto( $bool ) {
add_filter( 'jetpack_photon_skip_image', '__return_true' );
return $bool;
}
@@ -0,0 +1,160 @@
<?php
/**
* Domain Mapping 3rd Party
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Third_Party;
use Automattic\Jetpack\Constants;
/**
* Class Automattic\Jetpack\Third_Party\Domain_Mapping.
*
* This class contains methods that are used to provide compatibility between Jetpack sync and domain mapping plugins.
*/
class Domain_Mapping {
/**
* Singleton holder.
*
* @var Domain_Mapping
**/
private static $instance = null;
/**
* An array of methods that are used to hook the Jetpack sync filters for home_url and site_url to a mapping plugin.
*
* @var array
*/
public static $test_methods = array(
'hook_wordpress_mu_domain_mapping',
'hook_wpmu_dev_domain_mapping',
);
/**
* Singleton constructor.
*
* @return Domain_Mapping|null
*/
public static function init() {
if ( self::$instance === null ) {
self::$instance = new Domain_Mapping();
}
return self::$instance;
}
/**
* Class Automattic\Jetpack\Third_Party\Domain_Mapping constructor.
*/
private function __construct() {
add_action( 'plugins_loaded', array( $this, 'attempt_to_hook_domain_mapping_plugins' ) );
}
/**
* This function is called on the plugins_loaded action and will loop through the $test_methods
* to try and hook a domain mapping plugin to the Jetpack sync filters for the home_url and site_url callables.
*/
public function attempt_to_hook_domain_mapping_plugins() {
if ( ! Constants::is_defined( 'SUNRISE' ) ) {
return;
}
$hooked = false;
$count = count( self::$test_methods );
for ( $i = 0; $i < $count && ! $hooked; $i++ ) {
$hooked = call_user_func( array( $this, self::$test_methods[ $i ] ) );
}
}
/**
* This method will test for a constant and function that are known to be used with Donncha's WordPress MU
* Domain Mapping plugin. If conditions are met, we hook the domain_mapping_siteurl() function to Jetpack sync
* filters for home_url and site_url callables.
*
* @return bool
*/
public function hook_wordpress_mu_domain_mapping() {
if ( ! Constants::is_defined( 'SUNRISE_LOADED' ) || ! $this->function_exists( 'domain_mapping_siteurl' ) ) {
return false;
}
add_filter( 'jetpack_sync_home_url', 'domain_mapping_siteurl' );
add_filter( 'jetpack_sync_site_url', 'domain_mapping_siteurl' );
return true;
}
/**
* This method will test for a class and method known to be used in WPMU Dev's domain mapping plugin. If the
* method exists, then we'll hook the swap_to_mapped_url() to our Jetpack sync filters for home_url and site_url.
*
* @return bool
*/
public function hook_wpmu_dev_domain_mapping() {
if ( ! $this->class_exists( 'domain_map' ) || ! $this->method_exists( 'domain_map', 'utils' ) ) {
return false;
}
$utils = $this->get_domain_mapping_utils_instance();
add_filter( 'jetpack_sync_home_url', array( $utils, 'swap_to_mapped_url' ) );
add_filter( 'jetpack_sync_site_url', array( $utils, 'swap_to_mapped_url' ) );
return true;
}
/*
* Utility Methods
*
* These methods are very minimal, and in most cases, simply pass on arguments. Why create them you ask?
* So that we can test.
*/
/**
* Checks if a method exists.
*
* @param string $class Class name.
* @param string $method Method name.
*
* @return bool Returns function_exists() without modification.
*/
public function method_exists( $class, $method ) {
return method_exists( $class, $method );
}
/**
* Checks if a class exists.
*
* @param string $class Class name.
*
* @return bool Returns class_exists() without modification.
*/
public function class_exists( $class ) {
return class_exists( $class );
}
/**
* Checks if a function exists.
*
* @param string $function Function name.
*
* @return bool Returns function_exists() without modification.
*/
public function function_exists( $function ) {
return function_exists( $function );
}
/**
* Returns the Domain_Map::utils() instance.
*
* @see https://github.com/wpmudev/domain-mapping/blob/master/classes/Domainmap/Utils.php
* @return \Domainmap_Utils
*/
public function get_domain_mapping_utils_instance() {
return \domain_map::utils();
}
}
Domain_Mapping::init();
@@ -0,0 +1,161 @@
<?php
/**
* REST API Compatibility: bbPress & Jetpack
* Enables bbPress to work with the Jetpack REST API
*
* @package automattic/jetpack
*/
/**
* REST API Compatibility: bbPress.
*/
class Jetpack_BbPress_REST_API {
/**
* Singleton
*
* @var Jetpack_BbPress_REST_API
*/
private static $instance;
/**
* Returns or creates the singleton.
*
* @return Jetpack_BbPress_REST_API
*/
public static function instance() {
if ( isset( self::$instance ) ) {
return self::$instance;
}
self::$instance = new self();
}
/**
* Jetpack_BbPress_REST_API constructor.
*/
private function __construct() {
add_filter( 'rest_api_allowed_post_types', array( $this, 'allow_bbpress_post_types' ) );
add_filter( 'bbp_map_meta_caps', array( $this, 'adjust_meta_caps' ), 10, 4 );
add_filter( 'rest_api_allowed_public_metadata', array( $this, 'allow_bbpress_public_metadata' ) );
}
/**
* Adds the bbPress post types to the rest_api_allowed_post_types filter.
*
* @param array $allowed_post_types Allowed post types.
*
* @return array
*/
public function allow_bbpress_post_types( $allowed_post_types ) {
$allowed_post_types[] = 'forum';
$allowed_post_types[] = 'topic';
$allowed_post_types[] = 'reply';
return $allowed_post_types;
}
/**
* Adds the bbpress meta keys to the rest_api_allowed_public_metadata filter.
*
* @param array $allowed_meta_keys Allowed meta keys.
*
* @return array
*/
public function allow_bbpress_public_metadata( $allowed_meta_keys ) {
$allowed_meta_keys[] = '_bbp_forum_id';
$allowed_meta_keys[] = '_bbp_topic_id';
$allowed_meta_keys[] = '_bbp_status';
$allowed_meta_keys[] = '_bbp_forum_type';
$allowed_meta_keys[] = '_bbp_forum_subforum_count';
$allowed_meta_keys[] = '_bbp_reply_count';
$allowed_meta_keys[] = '_bbp_total_reply_count';
$allowed_meta_keys[] = '_bbp_topic_count';
$allowed_meta_keys[] = '_bbp_total_topic_count';
$allowed_meta_keys[] = '_bbp_topic_count_hidden';
$allowed_meta_keys[] = '_bbp_last_topic_id';
$allowed_meta_keys[] = '_bbp_last_reply_id';
$allowed_meta_keys[] = '_bbp_last_active_time';
$allowed_meta_keys[] = '_bbp_last_active_id';
$allowed_meta_keys[] = '_bbp_sticky_topics';
$allowed_meta_keys[] = '_bbp_voice_count';
$allowed_meta_keys[] = '_bbp_reply_count_hidden';
$allowed_meta_keys[] = '_bbp_anonymous_reply_count';
return $allowed_meta_keys;
}
/**
* Adds the needed caps to the bbp_map_meta_caps filter.
*
* @param array $caps Capabilities for meta capability.
* @param string $cap Capability name.
* @param int $user_id User id.
* @param array $args Arguments.
*
* @return array
*/
public function adjust_meta_caps( $caps, $cap, $user_id, $args ) {
// Return early if not a REST request or if not meta bbPress caps.
if ( $this->should_adjust_meta_caps_return_early( $caps, $cap, $user_id, $args ) ) {
return $caps;
}
// $args[0] could be a post ID or a post_type string.
if ( is_int( $args[0] ) ) {
$_post = get_post( $args[0] );
if ( ! empty( $_post ) ) {
$post_type = get_post_type_object( $_post->post_type );
}
} elseif ( is_string( $args[0] ) ) {
$post_type = get_post_type_object( $args[0] );
}
// no post type found, bail.
if ( empty( $post_type ) ) {
return $caps;
}
// reset the needed caps.
$caps = array();
// Add 'do_not_allow' cap if user is spam or deleted.
if ( bbp_is_user_inactive( $user_id ) ) {
$caps[] = 'do_not_allow';
// Moderators can always edit meta.
} elseif ( user_can( $user_id, 'moderate' ) ) { // phpcs:ignore WordPress.WP.Capabilities.Unknown
$caps[] = 'moderate';
// Unknown so map to edit_posts.
} else {
$caps[] = $post_type->cap->edit_posts;
}
return $caps;
}
/**
* Should adjust_meta_caps return early?
*
* @param array $caps Capabilities for meta capability.
* @param string $cap Capability name.
* @param int $user_id User id.
* @param array $args Arguments.
*
* @return bool
*/
private function should_adjust_meta_caps_return_early( $caps, $cap, $user_id, $args ) {
// only run for REST API requests.
if ( ! defined( 'REST_API_REQUEST' ) || ! REST_API_REQUEST ) {
return true;
}
// only modify caps for meta caps and for bbPress meta keys.
if ( ! in_array( $cap, array( 'edit_post_meta', 'delete_post_meta', 'add_post_meta' ), true ) || empty( $args[1] ) || ! str_contains( $args[1], '_bbp_' ) ) {
return true;
}
return false;
}
}
@@ -0,0 +1,539 @@
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Stats\Tracking_Pixel as Stats_Tracking_Pixel;
use Automattic\Jetpack\Sync\Functions;
/**
* Manages compatibility with the amp-wp plugin
*
* @see https://github.com/Automattic/amp-wp
*/
class Jetpack_AMP_Support {
/**
* Apply custom AMP changes on the front-end.
*/
public static function init() {
// Add Stats tracking pixel on Jetpack sites when the Stats module is active.
if (
Jetpack::is_module_active( 'stats' )
&& ! ( defined( 'IS_WPCOM' ) && IS_WPCOM )
) {
add_action( 'amp_post_template_footer', array( 'Jetpack_AMP_Support', 'add_stats_pixel' ) );
}
// Sharing.
add_filter( 'jetpack_sharing_display_markup', array( 'Jetpack_AMP_Support', 'render_sharing_html' ), 10, 2 );
add_filter( 'sharing_enqueue_scripts', array( 'Jetpack_AMP_Support', 'amp_disable_sharedaddy_css' ) );
add_action( 'wp_enqueue_scripts', array( 'Jetpack_AMP_Support', 'amp_enqueue_sharing_css' ) );
// Sharing for Reader mode.
if ( function_exists( 'jetpack_social_menu_include_svg_icons' ) ) {
add_action( 'amp_post_template_footer', 'jetpack_social_menu_include_svg_icons' );
}
add_action( 'amp_post_template_css', array( 'Jetpack_AMP_Support', 'amp_reader_sharing_css' ), 10, 0 );
// enforce freedom mode for videopress.
add_filter( 'videopress_shortcode_options', array( 'Jetpack_AMP_Support', 'videopress_enable_freedom_mode' ) );
// include Jetpack og tags when rendering native AMP head.
add_action( 'amp_post_template_head', array( 'Jetpack_AMP_Support', 'amp_post_jetpack_og_tags' ) );
// Post rendering changes for legacy AMP.
add_action( 'pre_amp_render_post', array( 'Jetpack_AMP_Support', 'amp_disable_the_content_filters' ) );
// Disable Comment Likes.
add_filter( 'jetpack_comment_likes_enabled', array( 'Jetpack_AMP_Support', 'comment_likes_enabled' ) );
// Transitional mode AMP should not have comment likes.
add_filter( 'the_content', array( 'Jetpack_AMP_Support', 'disable_comment_likes_before_the_content' ) );
// Add post template metadata for legacy AMP.
add_filter( 'amp_post_template_metadata', array( 'Jetpack_AMP_Support', 'amp_post_template_metadata' ), 10, 2 );
// Filter photon image args for AMP Stories.
add_filter( 'jetpack_photon_post_image_args', array( 'Jetpack_AMP_Support', 'filter_photon_post_image_args_for_stories' ), 10, 2 );
// Sync the amp-options.
add_filter( 'jetpack_options_whitelist', array( 'Jetpack_AMP_Support', 'filter_jetpack_options_safelist' ) );
}
/**
* Disable the Comment Likes feature on AMP views.
*
* @param bool $enabled Should comment likes be enabled.
*/
public static function comment_likes_enabled( $enabled ) {
return $enabled && ! self::is_amp_request();
}
/**
* Apply custom AMP changes in wp-admin.
*/
public static function admin_init() {
// disable Likes metabox for post editor if AMP canonical disabled.
add_filter( 'post_flair_disable', array( 'Jetpack_AMP_Support', 'is_amp_canonical' ), 99 );
}
/**
* Is the page in AMP 'canonical mode'.
* Used when themes register support for AMP with `add_theme_support( 'amp' )`.
*
* @return bool is_amp_canonical
*/
public static function is_amp_canonical() {
return function_exists( 'amp_is_canonical' ) && amp_is_canonical();
}
/**
* Is AMP available for this request
* This returns false for admin, CLI requests etc.
*
* @return bool is_amp_available
*/
public static function is_amp_available() {
return ( function_exists( 'amp_is_available' ) && amp_is_available() );
}
/**
* Does the page return AMP content.
*
* @return bool $is_amp_request Are we on am AMP view.
*/
public static function is_amp_request() {
$is_amp_request = ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() );
/**
* Returns true if the current request should return valid AMP content.
*
* @since 6.2.0
*
* @param boolean $is_amp_request Is this request supposed to return valid AMP content?
*/
return apply_filters( 'jetpack_is_amp_request', $is_amp_request );
}
/**
* Determines whether the legacy AMP post templates are being used.
*
* @since 10.6.0
*
* @return bool
*/
public static function is_amp_legacy() {
return ( function_exists( 'amp_is_legacy' ) && amp_is_legacy() );
}
/**
* Remove content filters added by Jetpack.
*/
public static function amp_disable_the_content_filters() {
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
add_filter( 'protected_embeds_use_form_post', '__return_false' );
remove_filter( 'the_title', 'widont' );
}
remove_filter( 'pre_kses', array( 'Filter_Embedded_HTML_Objects', 'filter' ), 11 );
remove_filter( 'pre_kses', array( 'Filter_Embedded_HTML_Objects', 'maybe_create_links' ), 100 );
}
/**
* Do not add comment likes on AMP requests.
*
* @param string $content Post content.
*/
public static function disable_comment_likes_before_the_content( $content ) {
if ( self::is_amp_request() ) {
remove_filter( 'comment_text', 'comment_like_button', 12 );
}
return $content;
}
/**
* Add Jetpack stats pixel.
*
* @since 6.2.1
*/
public static function add_stats_pixel() {
if ( ! has_action( 'wp_footer', array( Stats_Tracking_Pixel::class, 'add_amp_pixel' ) ) ) {
return;
}
$stats_data = Stats_Tracking_Pixel::build_view_data();
Stats_Tracking_Pixel::render_amp_footer( $stats_data );
}
/**
* Add publisher and image metadata to legacy AMP post.
*
* @since 6.2.0
*
* @param array $metadata Metadata array.
* @param WP_Post $post Post.
* @return array Modified metadata array.
*/
public static function amp_post_template_metadata( $metadata, $post ) {
if ( isset( $metadata['publisher'] ) && ! isset( $metadata['publisher']['logo'] ) ) {
$metadata = self::add_site_icon_to_metadata( $metadata );
}
if ( ! isset( $metadata['image'] ) && ! empty( $post ) ) {
$metadata = self::add_image_to_metadata( $metadata, $post );
}
return $metadata;
}
/**
* Add blavatar to legacy AMP post metadata.
*
* @since 6.2.0
*
* @param array $metadata Metadata.
*
* @return array Metadata.
*/
private static function add_site_icon_to_metadata( $metadata ) {
$size = 60;
$site_icon_url = class_exists( 'Automattic\\Jetpack\\Sync\\Functions' ) ? Functions::site_icon_url( $size ) : '';
if ( function_exists( 'blavatar_domain' ) ) {
$metadata['publisher']['logo'] = array(
'@type' => 'ImageObject',
'url' => blavatar_url( blavatar_domain( site_url() ), 'img', $size, self::staticize_subdomain( 'https://wordpress.com/i/favicons/apple-touch-icon-60x60.png' ) ),
'width' => $size,
'height' => $size,
);
} elseif ( $site_icon_url ) {
$metadata['publisher']['logo'] = array(
'@type' => 'ImageObject',
'url' => $site_icon_url,
'width' => $size,
'height' => $size,
);
}
return $metadata;
}
/**
* Add image to legacy AMP post metadata.
*
* @since 6.2.0
*
* @param array $metadata Metadata.
* @param WP_Post $post Post.
* @return array Metadata.
*/
private static function add_image_to_metadata( $metadata, $post ) {
$image = Jetpack_PostImages::get_image(
$post->ID,
array(
'fallback_to_avatars' => true,
'avatar_size' => 200,
// AMP already attempts these.
'from_thumbnail' => false,
'from_attachment' => false,
)
);
if ( empty( $image ) ) {
return self::add_fallback_image_to_metadata( $metadata );
}
if ( ! isset( $image['src_width'] ) ) {
$dimensions = self::extract_image_dimensions_from_getimagesize(
array(
$image['src'] => false,
)
);
if ( false !== $dimensions[ $image['src'] ] ) {
$image['src_width'] = $dimensions['width'];
$image['src_height'] = $dimensions['height'];
}
}
$metadata['image'] = array(
'@type' => 'ImageObject',
'url' => $image['src'],
);
if ( isset( $image['src_width'] ) ) {
$metadata['image']['width'] = $image['src_width'];
}
if ( isset( $image['src_width'] ) ) {
$metadata['image']['height'] = $image['src_height'];
}
return $metadata;
}
/**
* Add fallback image to legacy AMP post metadata.
*
* @since 6.2.0
*
* @param array $metadata Metadata.
* @return array Metadata.
*/
private static function add_fallback_image_to_metadata( $metadata ) {
/** This filter is documented in functions.opengraph.php */
$default_image = apply_filters( 'jetpack_open_graph_image_default', 'https://wordpress.com/i/blank.jpg' );
$metadata['image'] = array(
'@type' => 'ImageObject',
'url' => self::staticize_subdomain( $default_image ),
'width' => 200,
'height' => 200,
);
return $metadata;
}
/**
* Return static WordPress.com domain to use to load resources from WordPress.com.
*
* @param string $domain Asset URL.
*/
private static function staticize_subdomain( $domain ) {
// deal with WPCOM vs Jetpack.
if ( function_exists( 'staticize_subdomain' ) ) {
return staticize_subdomain( $domain );
} else {
return Assets::staticize_subdomain( $domain );
}
}
/**
* Extract image dimensions via wpcom/imagesize, only on WPCOM
*
* @since 6.2.0
*
* @param array $dimensions Dimensions.
* @return array Dimensions.
*/
private static function extract_image_dimensions_from_getimagesize( $dimensions ) {
if ( ! ( defined( 'IS_WPCOM' ) && IS_WPCOM && function_exists( 'require_lib' ) ) ) {
return $dimensions;
}
require_lib( 'wpcom/imagesize' );
foreach ( $dimensions as $url => $value ) {
if ( is_array( $value ) ) {
continue;
}
$result = wpcom_getimagesize( $url );
if ( is_array( $result ) ) {
$dimensions[ $url ] = array(
'width' => $result[0],
'height' => $result[1],
);
}
}
return $dimensions;
}
/**
* Display Open Graph Meta tags in AMP views.
*/
public static function amp_post_jetpack_og_tags() {
if ( ! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) {
Jetpack::init()->check_open_graph();
}
if ( function_exists( 'jetpack_og_tags' ) ) {
jetpack_og_tags();
}
}
/**
* Force Freedom mode in VideoPress.
*
* @param array $options Array of VideoPress shortcode options.
*/
public static function videopress_enable_freedom_mode( $options ) {
if ( self::is_amp_request() ) {
$options['freedom'] = true;
}
return $options;
}
/**
* Display custom markup for the sharing buttons when in an AMP view.
*
* @param string $markup Content markup of the Jetpack sharing links.
* @param array $sharing_enabled Array of Sharing Services currently enabled.
*/
public static function render_sharing_html( $markup, $sharing_enabled ) {
global $post;
if ( empty( $post ) ) {
return '';
}
if ( ! self::is_amp_request() ) {
return $markup;
}
remove_action( 'wp_footer', 'sharing_add_footer' );
if ( empty( $sharing_enabled ) ) {
return $markup;
}
$sharing_links = array();
foreach ( $sharing_enabled['visible'] as $service ) {
$sharing_link = $service->get_amp_display( $post );
if ( ! empty( $sharing_link ) ) {
$sharing_links[] = $sharing_link;
}
}
// Replace the existing unordered list with AMP sharing buttons.
$markup = preg_replace( '#<ul>(.+)</ul>#', implode( '', $sharing_links ), $markup );
// Remove any lingering share-end list items.
$markup = str_replace( '<li class="share-end"></li>', '', $markup );
return $markup;
}
/**
* Tells Jetpack not to enqueue CSS for share buttons.
*
* @param bool $enqueue Whether or not to enqueue.
* @return bool Whether or not to enqueue.
*/
public static function amp_disable_sharedaddy_css( $enqueue ) {
if ( self::is_amp_request() ) {
$enqueue = false;
}
return $enqueue;
}
/**
* Enqueues the AMP specific sharing styles for the sharing icons.
*/
public static function amp_enqueue_sharing_css() {
if (
Jetpack::is_module_active( 'sharedaddy' )
&& self::is_amp_request()
&& ! self::is_amp_legacy()
) {
wp_enqueue_style( 'sharedaddy-amp', plugin_dir_url( __DIR__ ) . 'modules/sharedaddy/amp-sharing.css', array( 'social-logos' ), JETPACK__VERSION );
}
}
/**
* For the AMP Reader mode template, include styles that we need.
*/
public static function amp_reader_sharing_css() {
// If sharing is not enabled, we should not proceed to render the CSS.
if ( ! defined( 'JETPACK_SOCIAL_LOGOS_DIR' ) || ! defined( 'JETPACK_SOCIAL_LOGOS_URL' ) || ! defined( 'WP_SHARING_PLUGIN_DIR' ) ) {
return;
}
/*
* We'll need to output the full contents of the 2 files
* in the head on AMP views. We can't rely on regular enqueues here.
* @todo As of AMP plugin v1.5, you can actually rely on regular enqueues thanks to https://github.com/ampproject/amp-wp/pull/4299. Once WPCOM upgrades AMP, then this method can be eliminated.
*
* phpcs:disable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
* phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
*/
$css = file_get_contents( JETPACK_SOCIAL_LOGOS_DIR . 'social-logos.css' );
$css = preg_replace( '#(?<=url\(")(?=social-logos\.)#', JETPACK_SOCIAL_LOGOS_URL, $css ); // Make sure font files get their absolute paths.
echo $css;
echo file_get_contents( WP_SHARING_PLUGIN_DIR . 'amp-sharing.css' );
/*
* phpcs:enable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
* phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped
*/
}
/**
* Ensure proper Photon image dimensions for AMP Stories.
*
* @param array $args Array of Photon Arguments.
* @param array $details {
* Array of image details.
*
* @type string $tag Image tag (Image HTML output).
* @type string $src Image URL.
* @type string $src_orig Original Image URL.
* @type int|false $width Image width.
* @type int|false $height Image height.
* @type int|false $width_orig Original image width before constrained by content_width.
* @type int|false $height_orig Original Image height before constrained by content_width.
* @type string $transform_orig Original transform before constrained by content_width.
* }
* @return array Args.
*/
public static function filter_photon_post_image_args_for_stories( $args, $details ) {
if ( ! is_singular( 'amp_story' ) ) {
return $args;
}
// Percentage-based dimensions are not allowed in AMP, so this shouldn't happen, but short-circuit just in case.
if ( str_contains( $details['width_orig'], '%' ) || str_contains( $details['height_orig'], '%' ) ) {
return $args;
}
$max_height = 1280; // See image size with the slug \AMP_Story_Post_Type::MAX_IMAGE_SIZE_SLUG.
$transform = $details['transform_orig'];
$width = $details['width_orig'];
$height = $details['height_orig'];
// If height is available, constrain to $max_height.
if ( false !== $height ) {
if ( $height > $max_height && false !== $height ) {
$width = ( $max_height * $width ) / $height;
$height = $max_height;
} elseif ( $height > $max_height ) {
$height = $max_height;
}
}
/*
* Set a height if none is found.
* If height is set in this manner and height is available, use `fit` instead of `resize` to prevent skewing.
*/
if ( false === $height ) {
$height = $max_height;
if ( false !== $width ) {
$transform = 'fit';
}
}
// Build array of Photon args and expose to filter before passing to Photon URL function.
$args = array();
if ( false !== $width && false !== $height ) {
$args[ $transform ] = $width . ',' . $height;
} elseif ( false !== $width ) {
$args['w'] = $width;
} elseif ( false !== $height ) {
$args['h'] = $height;
}
return $args;
}
/**
* Adds amp-options to the list of options to sync, if AMP is available
*
* @param array $options_safelist Safelist of options to sync.
*
* @return array Updated options safelist
*/
public static function filter_jetpack_options_safelist( $options_safelist ) {
if ( function_exists( 'is_amp_endpoint' ) ) {
$options_safelist[] = 'amp-options';
}
return $options_safelist;
}
}
+132
View File
@@ -0,0 +1,132 @@
<?php
/**
* Compatibility functions for the Creative Mail plugin.
* https://wordpress.org/plugins/creative-mail-by-constant-contact/
*
* @since 8.9.0
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Creative_Mail;
use Automattic\Jetpack\Plugins_Installer;
if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
}
const PLUGIN_SLUG = 'creative-mail-by-constant-contact';
const PLUGIN_FILE = 'creative-mail-by-constant-contact/creative-mail-plugin.php';
add_action( 'jetpack_activated_plugin', __NAMESPACE__ . '\configure_plugin', 10, 2 );
// Check for the JITM action.
if ( isset( $_GET['creative-mail-action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
add_action( 'admin_init', __NAMESPACE__ . '\try_install' );
}
if ( ! empty( $_GET['creative-mail-install-error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
add_action( 'admin_notices', __NAMESPACE__ . '\error_notice' );
}
/**
* Verify the intent to install Creative Mail, and kick off installation.
*
* This works in tandem with a JITM set up in the JITM package.
*
* @return never
*/
function try_install() {
check_admin_referer( 'creative-mail-install' );
$result = false;
$redirect = admin_url( 'edit.php?post_type=feedback' );
// Attempt to install and activate the plugin.
if ( current_user_can( 'activate_plugins' ) ) {
switch ( $_GET['creative-mail-action'] ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Function only hooked if set.
case 'install':
$result = install_and_activate();
break;
case 'activate':
$result = activate();
break;
}
}
if ( $result ) {
/** This action is already documented in _inc/lib/class.core-rest-api-endpoints.php */
do_action( 'jetpack_activated_plugin', PLUGIN_FILE, 'jitm' );
$redirect = admin_url( 'admin.php?page=creativemail' );
} else {
$redirect = add_query_arg( 'creative-mail-install-error', true, $redirect );
}
wp_safe_redirect( $redirect );
exit( 0 );
}
/**
* Install and activate the Creative Mail plugin.
*
* @return bool result of installation
*/
function install_and_activate() {
$result = Plugins_Installer::install_and_activate_plugin( PLUGIN_SLUG );
if ( is_wp_error( $result ) ) {
return false;
} else {
return true;
}
}
/**
* Activate the Creative Mail plugin.
*
* @return bool result of activation
*/
function activate() {
$result = activate_plugin( PLUGIN_FILE );
// Activate_plugin() returns null on success.
return $result === null;
}
/**
* Notify the user that the installation of Creative Mail failed.
*/
function error_notice() {
wp_admin_notice(
esc_html__( 'There was an error installing Creative Mail.', 'jetpack' ),
array(
'type' => 'error',
'dismissible' => true,
)
);
}
/**
* Set some options when first activating the plugin via Jetpack.
*
* @since 8.9.0
*
* @param string $plugin_file Plugin file.
* @param string $source Where did the plugin installation originate.
*/
function configure_plugin( $plugin_file, $source ) {
if ( PLUGIN_FILE !== $plugin_file ) {
return;
}
$plugin_info = array(
'plugin' => 'jetpack',
'version' => JETPACK__VERSION,
'time' => time(),
'source' => esc_attr( $source ),
);
update_option( 'ce4wp_referred_by', $plugin_info );
}
+24
View File
@@ -0,0 +1,24 @@
<?php
/**
* 3rd Party integration for Debug Bar.
*
* @package automattic/jetpack
*/
/**
* Checks if the search module is active, and if so, will initialize the singleton instance
* of Jetpack_Search_Debug_Bar and add it to the array of debug bar panels.
*
* @param array $panels The array of debug bar panels.
* @return array $panel The array of debug bar panels with our added panel.
*/
function init_jetpack_search_debug_bar( $panels ) {
if ( ! Jetpack::is_module_active( 'search' ) ) {
return $panels;
}
require_once __DIR__ . '/debug-bar/class-jetpack-search-debug-bar.php';
$panels[] = Jetpack_Search_Debug_Bar::instance();
return $panels;
}
add_filter( 'debug_bar_panels', 'init_jetpack_search_debug_bar' );
@@ -0,0 +1,192 @@
<?php
/**
* Adds a Jetpack Search debug panel to Debug Bar.
*
* @package automattic/jetpack
*/
use Automattic\Jetpack\Search as Jetpack_Search;
/**
* Singleton class instantiated by Jetpack_Searc_Debug_Bar::instance() that handles
* rendering the Jetpack Search debug bar menu item and panel.
*/
class Jetpack_Search_Debug_Bar extends Debug_Bar_Panel {
/**
* Holds singleton instance
*
* @var Jetpack_Search_Debug_Bar
*/
protected static $instance = null;
/**
* The title to use in the debug bar navigation
*
* @var string
*/
public $title;
/**
* Constructor
*/
public function __construct() {
$this->title( esc_html__( 'Jetpack Search', 'jetpack' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'login_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'enqueue_embed_scripts', array( $this, 'enqueue_scripts' ) );
}
/**
* Returns the singleton instance of Jetpack_Search_Debug_Bar
*
* @return Jetpack_Search_Debug_Bar
*/
public static function instance() {
if ( self::$instance === null ) {
self::$instance = new Jetpack_Search_Debug_Bar();
}
return self::$instance;
}
/**
* Enqueues styles for our panel in the debug bar
*
* @return void
*/
public function enqueue_scripts() {
// Do not enqueue scripts if we haven't already enqueued Debug Bar or Query Monitor styles.
if ( ! wp_style_is( 'debug-bar' ) && ! wp_style_is( 'query-monitor' ) ) {
return;
}
wp_enqueue_style(
'jetpack-search-debug-bar',
plugins_url( '3rd-party/debug-bar/debug-bar.css', JETPACK__PLUGIN_FILE ),
array(),
JETPACK__VERSION
);
wp_enqueue_script(
'jetpack-search-debug-bar',
plugins_url( '3rd-party/debug-bar/debug-bar.js', JETPACK__PLUGIN_FILE ),
array( 'jquery' ),
JETPACK__VERSION,
true
);
}
/**
* Should the Jetpack Search Debug Bar show?
*
* Since we've previously done a check for the search module being activated, let's just return true.
* Later on, we can update this to only show when `is_search()` is true.
*
* @return boolean
*/
public function is_visible() {
return true;
}
/**
* Renders the panel content
*
* @return void
*/
public function render() {
$jetpack_search = (
Jetpack_Search\Options::is_instant_enabled() ?
Jetpack_Search\Instant_Search::instance() :
Jetpack_Search\Classic_Search::instance()
);
// Search hasn't been initialized. Exit early and do not display the debug bar.
if ( ! method_exists( $jetpack_search, 'get_last_query_info' ) ) {
return;
}
$last_query_info = $jetpack_search->get_last_query_info();
// If not empty, let's reshuffle the order of some things.
if ( ! empty( $last_query_info ) ) {
$args = $last_query_info['args'];
$response = $last_query_info['response'];
$response_code = $last_query_info['response_code'];
unset( $last_query_info['args'] );
unset( $last_query_info['response'] );
unset( $last_query_info['response_code'] );
if ( $last_query_info['es_time'] === null ) {
$last_query_info['es_time'] = esc_html_x(
'cache hit',
'displayed in search results when results are cached',
'jetpack'
);
}
$temp = array_merge(
array( 'response_code' => $response_code ),
array( 'args' => $args ),
$last_query_info,
array( 'response' => $response )
);
$last_query_info = $temp;
}
?>
<div class="jetpack-search-debug-bar">
<h2><?php esc_html_e( 'Last query information:', 'jetpack' ); ?></h2>
<?php if ( empty( $last_query_info ) ) : ?>
<?php echo esc_html_x( 'None', 'Text displayed when there is no information', 'jetpack' ); ?>
<?php
else :
foreach ( $last_query_info as $key => $info ) :
?>
<h3><?php echo esc_html( $key ); ?></h3>
<?php
if ( 'response' !== $key && 'args' !== $key ) :
?>
<pre><?php print_r( esc_html( $info ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions ?></pre>
<?php
else :
$this->render_json_toggle( $info );
endif;
?>
<?php
endforeach;
endif;
?>
</div><!-- Closes .jetpack-search-debug-bar -->
<?php
}
/**
* Responsible for rendering the HTML necessary for the JSON toggle
*
* @param array $value The resonse from the API as an array.
* @return void
*/
public function render_json_toggle( $value ) {
?>
<div class="json-toggle-wrap">
<pre class="json">
<?php
// esc_html() will not double-encode entities (&amp; -> &amp;amp;).
// If any entities are part of the JSON blob, we want to re-encoode them
// (double-encode them) so that they are displayed correctly in the debug
// bar.
// Use _wp_specialchars() "manually" to ensure entities are encoded correctly.
echo _wp_specialchars( // phpcs:ignore WordPress.Security.EscapeOutput
wp_json_encode( $value ),
ENT_NOQUOTES, // Don't need to encode quotes (output is for a text node).
'UTF-8', // wp_json_encode() outputs UTF-8 (really just ASCII), not the blog's charset.
true // Do "double-encode" existing HTML entities.
);
?>
</pre>
<span class="pretty toggle"><?php echo esc_html_x( 'Pretty', 'label for formatting JSON', 'jetpack' ); ?></span>
<span class="ugly toggle"><?php echo esc_html_x( 'Minify', 'label for formatting JSON', 'jetpack' ); ?></span>
</div>
<?php
}
}
@@ -0,0 +1,56 @@
.jetpack-search-debug-bar h2,
.qm-debug-bar-output .jetpack-search-debug-bar h2 {
float: none !important;
padding: 0 !important;
text-align: left !important;
}
.qm-debug-bar-output .jetpack-search-debug-bar h2 {
margin-top: 1em !important;
}
.qm-debug-bar-output .jetpack-search-debug-bar h2:first-child {
margin-top: .5em !important;
}
.debug-menu-target h3 {
padding-top: 0
}
.jetpack-search-debug-output-toggle .print-r {
display: none;
}
.json-toggle-wrap {
position: relative;
}
.json-toggle-wrap .toggle {
position: absolute;
bottom: 10px;
right: 10px;
background: #fff;
border: 1px solid #000;
cursor: pointer;
padding: 2px 4px;
}
.json-toggle-wrap .ugly {
display: none;
}
.json-toggle-wrap.pretty .pretty {
display: none;
}
.json-toggle-wrap.pretty .ugly {
display: inline;
}
.jetpack-search-debug-bar pre {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
@@ -0,0 +1,23 @@
/* global jQuery */
/* eslint no-var: "off" */
( function ( $ ) {
$( document ).ready( function () {
$( '.jetpack-search-debug-bar .json-toggle-wrap .toggle' ).click( function () {
var t = $( this ),
wrap = t.closest( '.json-toggle-wrap' ),
pre = wrap.find( 'pre' ),
content = pre.text(),
isPretty = wrap.hasClass( 'pretty' );
if ( ! isPretty ) {
pre.text( JSON.stringify( JSON.parse( content ), null, 2 ) );
} else {
content.replace( '\t', '' ).replace( '\n', '' ).replace( ' ', '' );
pre.text( JSON.stringify( JSON.parse( content ) ) );
}
wrap.toggleClass( 'pretty' );
} );
} );
} )( jQuery );
+107
View File
@@ -0,0 +1,107 @@
<?php
/**
* Compatibility functions for the Jetpack Backup plugin.
* https://wordpress.org/plugins/jetpack-backup/
*
* @since 10.4
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Jetpack_Backup;
use Automattic\Jetpack\Plugins_Installer;
if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
}
const PLUGIN_SLUG = 'jetpack-backup';
const PLUGIN_FILE = 'jetpack-backup/jetpack-backup.php';
if ( isset( $_GET['jetpack-backup-install-error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
add_action( 'admin_notices', __NAMESPACE__ . '\error_notice' );
}
if ( isset( $_GET['jetpack-backup-action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
add_action( 'admin_init', __NAMESPACE__ . '\try_install' );
}
/**
* Verify the intent to install Jetpack Backup, and kick off installation.
*
* This works in tandem with a JITM set up in the JITM package.
*
* @return never
*/
function try_install() {
check_admin_referer( 'jetpack-backup-install' );
$result = false;
// If the plugin install fails, redirect to plugin install page pre-populated with jetpack-backup search term.
$redirect_on_error = admin_url( 'plugin-install.php?s=jetpack-backup&tab=search&type=term' );
// Attempt to install and activate the plugin.
if ( current_user_can( 'activate_plugins' ) ) {
switch ( $_GET['jetpack-backup-action'] ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Function only hooked if set.
case 'install':
$result = install_and_activate();
break;
case 'activate':
$result = activate();
break;
}
}
if ( $result ) {
/** This action is already documented in _inc/lib/class.core-rest-api-endpoints.php */
do_action( 'jetpack_activated_plugin', PLUGIN_FILE, 'jitm' );
$redirect = admin_url( 'admin.php?page=jetpack-backup' );
} else {
$redirect = add_query_arg( 'jetpack-backup-install-error', true, $redirect_on_error );
}
wp_safe_redirect( $redirect );
exit( 0 );
}
/**
* Install and activate the Jetpack Backup plugin.
*
* @return bool result of installation
*/
function install_and_activate() {
$result = Plugins_Installer::install_and_activate_plugin( PLUGIN_SLUG );
if ( is_wp_error( $result ) ) {
return false;
} else {
return true;
}
}
/**
* Activate the Jetpack Backup plugin.
*
* @return bool result of activation
*/
function activate() {
$result = activate_plugin( PLUGIN_FILE );
// Activate_plugin() returns null on success.
return $result === null;
}
/**
* Notify the user that the installation of Jetpack Backup failed.
*/
function error_notice() {
wp_admin_notice(
esc_html__( 'There was an error installing Jetpack Backup. Please try again.', 'jetpack' ),
array(
'type' => 'error',
'dismissible' => true,
)
);
}
+112
View File
@@ -0,0 +1,112 @@
<?php
/**
* Compatibility functions for the Jetpack Boost plugin.
* https://wordpress.org/plugins/jetpack-boost/
*
* @since 10.4
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Jetpack_Boost;
use Automattic\Jetpack\Plugins_Installer;
if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
}
const PLUGIN_SLUG = 'jetpack-boost';
const PLUGIN_FILE = 'jetpack-boost/jetpack-boost.php';
if ( isset( $_GET['jetpack-boost-install-error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
add_action( 'admin_notices', __NAMESPACE__ . '\error_notice' );
}
if ( isset( $_GET['jetpack-boost-action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
add_action( 'admin_init', __NAMESPACE__ . '\try_install' );
}
/**
* Verify the intent to install Jetpack Boost, and kick off installation.
*
* This works in tandem with a JITM set up in the JITM package.
*/
function try_install() {
if ( ! isset( $_GET['jetpack-boost-action'] ) ) {
return;
}
check_admin_referer( 'jetpack-boost-install' );
$result = false;
// If the plugin install fails, redirect to plugin install page pre-populated with jetpack-boost search term.
$redirect_on_error = admin_url( 'plugin-install.php?s=jetpack-boost&tab=search&type=term' );
// Attempt to install and activate the plugin.
if ( current_user_can( 'activate_plugins' ) ) {
switch ( $_GET['jetpack-boost-action'] ) {
case 'install':
$result = install_and_activate();
break;
case 'activate':
$result = activate();
break;
}
}
if ( $result ) {
/** This action is already documented in _inc/lib/class.core-rest-api-endpoints.php */
do_action( 'jetpack_activated_plugin', PLUGIN_FILE, 'jitm' );
$redirect = admin_url( 'admin.php?page=jetpack-boost' );
} else {
$redirect = add_query_arg( 'jetpack-boost-install-error', true, $redirect_on_error );
}
wp_safe_redirect( $redirect );
exit( 0 );
}
/**
* Install and activate the Jetpack Boost plugin.
*
* @return bool result of installation
*/
function install_and_activate() {
$result = Plugins_Installer::install_and_activate_plugin( PLUGIN_SLUG );
if ( is_wp_error( $result ) ) {
return false;
} else {
return true;
}
}
/**
* Activate the Jetpack Boost plugin.
*
* @return bool result of activation
*/
function activate() {
$result = activate_plugin( PLUGIN_FILE );
// Activate_plugin() returns null on success.
return $result === null;
}
/**
* Notify the user that the installation of Jetpack Boost failed.
*/
function error_notice() {
if ( empty( $_GET['jetpack-boost-install-error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
return;
}
wp_admin_notice(
esc_html__( 'There was an error installing Jetpack Boost. Please try again.', 'jetpack' ),
array(
'type' => 'error',
'dismissible' => true,
)
);
}
+25
View File
@@ -0,0 +1,25 @@
<?php
/**
* 3rd party integration for qTranslate.
*
* @package automattic/jetpack
*/
/**
* Prevent qTranslate X from redirecting REST calls.
*
* @since 5.3
*
* @param string $url_lang Language URL to redirect to.
* @param string $url_orig Original URL.
* @param array $url_info Pieces of original URL.
*
* @return bool
*/
function jetpack_no_qtranslate_rest_url_redirect( $url_lang, $url_orig, $url_info ) {
if ( str_contains( $url_info['wp-path'], 'wp-json/jetpack' ) ) {
return false;
}
return $url_lang;
}
add_filter( 'qtranslate_language_detect_redirect', 'jetpack_no_qtranslate_rest_url_redirect', 10, 3 );
+71
View File
@@ -0,0 +1,71 @@
<?php
/**
* Handles VaultPress->Rewind transition by deactivating VaultPress when needed.
*
* @package automattic/jetpack
*/
use Automattic\Jetpack\Redirect;
/**
* Notify user that VaultPress has been disabled. Hide VaultPress notice that requested attention.
*
* @since 5.8
*/
function jetpack_vaultpress_rewind_enabled_notice() {
// The deactivation is performed here because there may be pages that admin_init runs on,
// such as admin_ajax, that could deactivate the plugin without showing this notification.
deactivate_plugins( 'vaultpress/vaultpress.php' );
// Remove WP core notice that says that the plugin was activated.
unset( $_GET['activate'] ); // phpcs:ignore WordPress.Security.NonceVerification
$message = sprintf(
wp_kses(
/* Translators: first variable is the full URL to the new dashboard */
__( '<p style="margin-bottom: 0.25em;"><strong>Jetpack is now handling your backups.</strong></p><p>VaultPress is no longer needed and has been deactivated. You can access your backups at <a href="%3$s" target="_blank" rel="noopener noreferrer">this dashboard</a>.</p>', 'jetpack' ),
array(
'a' => array(
'href' => array(),
'target' => array(),
'rel' => array(),
),
'p' => array(
'style' => array(),
),
'strong' => array(),
)
),
esc_url( Redirect::get_url( 'calypso-backups' ) )
);
wp_admin_notice(
$message,
array(
'type' => 'success',
'dismissible' => true,
'additional_classes' => array( 'vp-deactivated' ),
'paragraph_wrap' => false,
)
);
?>
<style>#vp-notice{display:none;}</style>
<?php
}
/**
* If Backup & Scan is enabled, remove its entry in sidebar, deactivate VaultPress, and show a notification.
*
* @since 5.8
*/
function jetpack_vaultpress_rewind_check() {
if (
Jetpack::is_connection_ready() &&
Jetpack::is_plugin_active( 'vaultpress/vaultpress.php' ) &&
Jetpack::is_rewind_enabled()
) {
remove_submenu_page( 'jetpack', 'vaultpress' );
add_action( 'admin_notices', 'jetpack_vaultpress_rewind_enabled_notice' );
}
}
add_action( 'admin_init', 'jetpack_vaultpress_rewind_check', 11 );
+36
View File
@@ -0,0 +1,36 @@
<?php
/**
* Compatibility functions for the Web Stories plugin.
* https://wordpress.org/plugins/web-stories/
*
* @since 9.2.0
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Web_Stories;
if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
}
/**
* Filter to enable web stories built in open graph data from being output.
* If Jetpack is already handling Open Graph Meta Tags, the Web Stories plugin will not output any.
*
* @param bool $enabled If web stories open graph data is enabled.
*
* @return bool
*/
function maybe_disable_open_graph( $enabled ) {
/** This filter is documented in class.jetpack.php */
$jetpack_enabled = apply_filters( 'jetpack_enable_open_graph', false );
if ( $jetpack_enabled ) {
$enabled = false;
}
return $enabled;
}
add_filter( 'web_stories_enable_open_graph_metadata', __NAMESPACE__ . '\maybe_disable_open_graph' );
add_filter( 'web_stories_enable_twitter_metadata', __NAMESPACE__ . '\maybe_disable_open_graph' );
@@ -0,0 +1,151 @@
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
use Automattic\Jetpack\Plugins_Installer;
if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
}
/**
* Installs and activates the WooCommerce Services plugin.
*/
class WC_Services_Installer {
/**
* The instance of the Jetpack class.
*
* @var Jetpack
*/
private $jetpack;
/**
* The singleton instance of this class.
*
* @var WC_Services_Installer
*/
private static $instance = null;
/**
* Returns the singleton instance of this class.
*
* @return object The WC_Services_Installer object.
*/
public static function init() {
if ( self::$instance === null ) {
self::$instance = new WC_Services_Installer();
}
return self::$instance;
}
/**
* Constructor
*/
public function __construct() {
add_action( 'jetpack_loaded', array( $this, 'on_jetpack_loaded' ) );
if ( ! empty( $_GET['wc-services-install-error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
add_action( 'admin_notices', array( $this, 'error_notice' ) );
}
if ( isset( $_GET['wc-services-action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
add_action( 'admin_init', array( $this, 'try_install' ) );
}
}
/**
* Runs on Jetpack being ready to load its packages.
*
* @param Jetpack $jetpack object.
*/
public function on_jetpack_loaded( $jetpack ) {
$this->jetpack = $jetpack;
}
/**
* Verify the intent to install WooCommerce Services, and kick off installation.
*/
public function try_install() {
if ( ! isset( $_GET['wc-services-action'] ) ) {
return;
}
check_admin_referer( 'wc-services-install' );
$result = false;
switch ( $_GET['wc-services-action'] ) {
case 'install':
if ( current_user_can( 'install_plugins' ) ) {
$this->jetpack->stat( 'jitm', 'wooservices-install-' . JETPACK__VERSION );
$result = $this->install();
if ( $result ) {
$result = $this->activate();
}
}
break;
case 'activate':
if ( current_user_can( 'activate_plugins' ) ) {
$this->jetpack->stat( 'jitm', 'wooservices-activate-' . JETPACK__VERSION );
$result = $this->activate();
}
break;
}
if ( isset( $_GET['redirect'] ) ) {
$redirect = home_url( esc_url_raw( wp_unslash( $_GET['redirect'] ) ) );
} else {
$redirect = admin_url();
}
if ( $result ) {
$this->jetpack->stat( 'jitm', 'wooservices-activated-' . JETPACK__VERSION );
} else {
$redirect = add_query_arg( 'wc-services-install-error', true, $redirect );
}
wp_safe_redirect( $redirect );
exit( 0 );
}
/**
* Notify the user that the installation of WooCommerce Services failed.
*/
public function error_notice() {
wp_admin_notice(
esc_html__( 'There was an error installing WooCommerce Services.', 'jetpack' ),
array(
'type' => 'error',
'dismissible' => true,
)
);
}
/**
* Download and install the WooCommerce Services plugin.
*
* @return bool result of installation
*/
private function install() {
$result = Plugins_Installer::install_plugin( 'woocommerce-services' );
if ( is_wp_error( $result ) ) {
return false;
} else {
return true;
}
}
/**
* Activate the WooCommerce Services plugin.
*
* @return bool result of activation
*/
private function activate() {
$result = activate_plugin( 'woocommerce-services/woocommerce-services.php' );
// Activate_plugin() returns null on success.
return $result === null;
}
}
WC_Services_Installer::init();
+136
View File
@@ -0,0 +1,136 @@
<?php
/**
* This file contains compatibility functions for WooCommerce to improve Jetpack feature support.
*
* @package automattic/jetpack
*/
add_action( 'woocommerce_init', 'jetpack_woocommerce_integration' );
/**
* Loads JP+WC integration.
*
* Fires on `woocommerce_init` hook
*/
function jetpack_woocommerce_integration() {
/**
* Double check WooCommerce exists - unlikely to fail due to the hook being used but better safe than sorry.
*/
if ( ! class_exists( 'WooCommerce' ) ) {
return;
}
add_action( 'woocommerce_share', 'jetpack_woocommerce_social_share_icons', 10 );
/**
* Add product post type to Jetpack sitemap while skipping hidden products.
*/
add_filter( 'jetpack_sitemap_post_types', 'jetpack_woocommerce_add_to_sitemap' );
add_filter( 'jetpack_sitemap_skip_post', 'jetpack_woocommerce_skip_hidden_products_in_sitemap', 10, 2 );
/**
* Wrap in function exists check since this requires WooCommerce 3.3+.
*/
if ( function_exists( 'wc_get_default_products_per_row' ) ) {
add_filter( 'infinite_scroll_render_callbacks', 'jetpack_woocommerce_infinite_scroll_render_callback', 10 );
add_action( 'wp_enqueue_scripts', 'jetpack_woocommerce_infinite_scroll_style', 10 );
}
}
/**
* Add product post type to sitemap if Woocommerce is present.
*
* @param array $post_types Array of post types included in sitemap.
*/
function jetpack_woocommerce_add_to_sitemap( $post_types ) {
$post_types[] = 'product';
return $post_types;
}
/**
* Skip hidden products when generating the sitemap.
*
* @param bool $skip Whether to skip the post.
* @param WP_Post $post The post object.
*/
function jetpack_woocommerce_skip_hidden_products_in_sitemap( $skip, $post ) {
if ( $post !== null && $post->post_type === 'product' ) {
$product = wc_get_product( $post->ID );
if ( $product ) {
$skip = ! $product->is_visible();
}
}
return $skip;
}
/**
* Make sure the social sharing icons show up under the product's short description
*/
function jetpack_woocommerce_social_share_icons() {
if ( function_exists( 'sharing_display' ) ) {
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
sharing_display( '', true );
}
}
/**
* Remove sharing display from account, cart, and checkout pages in WooCommerce.
*/
function jetpack_woocommerce_remove_share() {
/**
* Double check WooCommerce exists - unlikely to fail due to the hook being used but better safe than sorry.
*/
if ( ! class_exists( 'WooCommerce' ) ) {
return;
}
if ( is_cart() || is_checkout() || is_account_page() ) {
remove_filter( 'the_content', 'sharing_display', 19 );
if ( class_exists( 'Jetpack_Likes' ) ) {
remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30 );
}
}
}
add_action( 'loop_start', 'jetpack_woocommerce_remove_share' );
/**
* Add a callback for WooCommerce product rendering in infinite scroll.
*
* @param array $callbacks Array of render callpacks for IS.
* @return array
*/
function jetpack_woocommerce_infinite_scroll_render_callback( $callbacks ) {
$callbacks[] = 'jetpack_woocommerce_infinite_scroll_render';
return $callbacks;
}
/**
* Add a default renderer for WooCommerce products within infinite scroll.
*/
function jetpack_woocommerce_infinite_scroll_render() {
if ( ! is_shop() && ! is_product_taxonomy() && ! is_product_category() && ! is_product_tag() ) {
return;
}
woocommerce_product_loop_start();
while ( have_posts() ) {
the_post();
wc_get_template_part( 'content', 'product' );
}
woocommerce_product_loop_end();
}
/**
* Basic styling when infinite scroll is active only.
*/
function jetpack_woocommerce_infinite_scroll_style() {
$custom_css = '
.infinite-scroll .woocommerce-pagination {
display: none;
}';
wp_add_inline_style( 'woocommerce-layout', $custom_css );
}
+66
View File
@@ -0,0 +1,66 @@
<?php
/**
* This provides minor tweaks to improve the experience for Jetpack feed in the WordPress.com Reader.
*
* This does not make sites available in the Reader—that depends on the public access to /feed/ as a method on the WP.com side
* to check if a site is public. It also does not add any content to the feed. Any content that should not be displayed in the Reader
* or other RSS readers should be filtered out elsewhere.
*
* These hooks were originally part of the now-deprecated Enhanced Distribution.
*
* @since 13.3
* @package Automattic/jetpack
*/
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Status;
use Automattic\Jetpack\Status\Host;
foreach ( array( 'rss_head', 'rss1_head', 'rss2_head' ) as $rss_head_action ) {
add_action( $rss_head_action, 'jetpack_wpcomreader_feed_id' );
}
foreach ( array( 'rss_item', 'rss1_item', 'rss2_item' ) as $rss_item_action ) {
add_action( $rss_item_action, 'jetpack_wpcomreader_post_id' );
}
/**
* Output feed identifier based on blog ID.
*
* @return void
*/
function jetpack_wpcomreader_feed_id() {
if (
( new Host() )->is_wpcom_simple()
|| (
( new Connection_Manager() )->is_connected()
&& ! ( new Status() )->is_offline_mode()
)
) {
$blog_id = Connection_Manager::get_site_id( true ); // Silence since we're not wanting to handle the error state.
if ( ! $blog_id ) {
return;
}
printf(
'<site xmlns="com-wordpress:feed-additions:1">%d</site>',
(int) $blog_id
);
}
}
/**
* Output feed item identifier based on current post ID.
*
* @return void
*/
function jetpack_wpcomreader_post_id() {
$id = get_the_ID();
if ( ! $id ) {
return;
}
printf(
'<post-id xmlns="com-wordpress:feed-additions:1">%d</post-id>',
(int) $id
);
}
+61
View File
@@ -0,0 +1,61 @@
<?php
/**
* Only load these if WPML plugin is installed and active.
*
* @package automattic/jetpack
*/
/**
* Load routines only if WPML is loaded.
*
* @since 4.4.0
*/
function wpml_jetpack_init() {
add_action( 'jetpack_widget_get_top_posts', 'wpml_jetpack_widget_get_top_posts', 10, 3 );
add_filter( 'grunion_contact_form_field_html', 'grunion_contact_form_field_html_filter', 10, 3 );
}
add_action( 'wpml_loaded', 'wpml_jetpack_init' );
/**
* Filter the Top Posts and Pages by language.
*
* @param array $posts Array of the most popular posts.
*
* @return array
*/
function wpml_jetpack_widget_get_top_posts( $posts ) {
global $sitepress;
foreach ( $posts as $k => $post ) {
$lang_information = wpml_get_language_information( $post['post_id'] );
if ( ! is_wp_error( $lang_information ) ) {
$post_language = substr( $lang_information['locale'], 0, 2 );
if ( $post_language !== $sitepress->get_current_language() ) {
unset( $posts[ $k ] );
}
}
}
return $posts;
}
/**
* Filter the HTML of the Contact Form and output the one requested by language.
*
* @param string $r Contact Form HTML output.
* @param string $field_label Field label.
*
* @return string
*/
function grunion_contact_form_field_html_filter( $r, $field_label ) {
global $sitepress;
if ( function_exists( 'icl_translate' ) ) {
if ( $sitepress->get_current_language() !== $sitepress->get_default_language() ) {
$label_translation = icl_translate( 'jetpack ', $field_label . '_label', $field_label );
$r = str_replace( $field_label, $label_translation, $r );
}
}
return $r;
}
File diff suppressed because it is too large Load Diff
+357
View File
@@ -0,0 +1,357 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+47
View File
@@ -0,0 +1,47 @@
# Security Policy
Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/).
## Supported Versions
Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions.
## Reporting a Vulnerability
Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure:
* [Jetpack](https://jetpack.com/)
* Jetpack Backup
* Jetpack Boost
* Jetpack CRM
* Jetpack Protect
* Jetpack Search
* Jetpack Social
* Jetpack VideoPress
**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.**
Our most critical targets are:
* Jetpack and the Jetpack composer packages (all within this repo)
* Jetpack.com -- the primary marketing site.
* cloud.jetpack.com -- a management site.
* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites.
For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic).
_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._
## Guidelines
We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines:
* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines).
* Pen-testing Production:
* Please **setup a local environment** instead whenever possible. Most of our code is open source (see above).
* If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC.
* **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels.
* To be eligible for a bounty, all of these guidelines must be followed.
* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability.
We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties.
@@ -0,0 +1,19 @@
var keyboardNavigation = false,
keyboardNavigationKeycodes = [ 9, 32, 37, 38, 39, 40 ]; // keyCodes for tab, space, left, up, right, down respectively
document.addEventListener( 'keydown', function ( event ) {
if ( keyboardNavigation ) {
return;
}
if ( keyboardNavigationKeycodes.indexOf( event.keyCode ) !== -1 ) {
keyboardNavigation = true;
document.documentElement.classList.add( 'accessible-focus' );
}
} );
document.addEventListener( 'mouseup', function () {
if ( ! keyboardNavigation ) {
return;
}
keyboardNavigation = false;
document.documentElement.classList.remove( 'accessible-focus' );
} );
File diff suppressed because one or more lines are too long
@@ -0,0 +1,61 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/ai-assistant",
"title": "AI Assistant",
"description": "Elevate your content creation with our AI-powered Gutenberg Block, offering seamless customization and generation. Bear in mind that, as an evolving tool, occasional imprecision may occur.",
"keywords": [
"AI",
"GPT",
"AL",
"Magic",
"help",
"assistant"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "text",
"icon": "<svg viewBox='0 0 32 32' width='32' height='32' xmlns='http://www.w3.org/2000/svg'><path d='M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z'/><path d='M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z'/><path d='M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z'/></svg>",
"supports": {
"html": false,
"multiple": true,
"reusable": false
},
"attributes": {
"content": {
"type": "string"
},
"originalContent": {
"type": "string"
},
"promptType": {
"type": "string"
},
"originalMessages": {
"type": "array",
"default": []
},
"messages": {
"type": "array",
"default": []
},
"userPrompt": {
"type": "string",
"default": ""
},
"requestingState": {
"type": "string",
"default": "init"
},
"preTransformAction": {
"type": "string",
"default": null
}
},
"example": {
"attributes": {
"content": "With **Jetpack AI Assistant**, you can provide a prompt, and it will generate high-quality blog posts, informative pages, well-organized lists, and thorough tables that meet your specific requirements.\n\nTo start using the **Jetpack AI Assistant**, type `/AI` in the block editor."
}
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1,47 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/ai-chat",
"title": "Jetpack AI Search",
"description": "Provide a summarized answer to questions, trained on the sites content. Powered by AI.",
"keywords": [
"AI",
"GPT",
"Chat",
"Search"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "text",
"icon": "<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M6.96774 8C6.96774 9.1402 6.04343 10.0645 4.90323 10.0645C3.76303 10.0645 2.83871 9.1402 2.83871 8C2.83871 6.8598 3.76303 5.93548 4.90323 5.93548C6.04343 5.93548 6.96774 6.8598 6.96774 8ZM5.41935 8C5.41935 8.28505 5.18828 8.51613 4.90323 8.51613C4.61818 8.51613 4.3871 8.28505 4.3871 8C4.3871 7.71495 4.61818 7.48387 4.90323 7.48387C5.18828 7.48387 5.41935 7.71495 5.41935 8Z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M11.0968 10.0645C12.237 10.0645 13.1613 9.1402 13.1613 8C13.1613 6.8598 12.237 5.93548 11.0968 5.93548C9.95657 5.93548 9.03226 6.8598 9.03226 8C9.03226 9.1402 9.95657 10.0645 11.0968 10.0645ZM11.0968 8.51613C11.3818 8.51613 11.6129 8.28505 11.6129 8C11.6129 7.71495 11.3818 7.48387 11.0968 7.48387C10.8117 7.48387 10.5806 7.71495 10.5806 8C10.5806 8.28505 10.8117 8.51613 11.0968 8.51613Z'/><path d='M5.93548 11.3548C5.50791 11.3548 5.16129 11.7015 5.16129 12.129C5.16129 12.5566 5.50791 12.9032 5.93548 12.9032H10.0645C10.4921 12.9032 10.8387 12.5566 10.8387 12.129C10.8387 11.7015 10.4921 11.3548 10.0645 11.3548H5.93548Z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M8.77419 0.774194C8.77419 0.346618 8.42758 0 8 0C7.57242 0 7.22581 0.346618 7.22581 0.774194V3.09677H4.90323C2.19525 3.09677 0 5.29202 0 8V11.0968C0 13.8048 2.19525 16 4.90323 16H11.0968C13.8048 16 16 13.8048 16 11.0968V8C16 5.29202 13.8048 3.09677 11.0968 3.09677H8.77419V0.774194ZM1.54839 8C1.54839 6.14717 3.0504 4.64516 4.90323 4.64516H11.0968C12.9496 4.64516 14.4516 6.14717 14.4516 8V11.0968C14.4516 12.9496 12.9496 14.4516 11.0968 14.4516H4.90323C3.0504 14.4516 1.54839 12.9496 1.54839 11.0968V8Z'/></svg>",
"supports": {
"align": true,
"alignWide": true,
"customClassName": true,
"className": true,
"html": false,
"multiple": false,
"reusable": false
},
"attributes": {
"askButtonLabel": {
"type": "string"
},
"placeholder": {
"type": "string"
},
"showCopy": {
"type": "boolean",
"default": true
},
"showFeedback": {
"type": "boolean",
"default": true
},
"showSources": {
"type": "boolean",
"default": true
}
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-polyfill'), 'version' => 'a4454db6c6513afd8c80');
@@ -0,0 +1 @@
.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form{display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:1rem}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-input{flex:auto;flex-grow:4}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-input input{font-size:16px;line-height:1.3;padding:15px 23px;width:100%}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-submit{flex:auto;flex-grow:1;height:53px;margin-left:10px;text-wrap:nowrap}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a{border:none;border-radius:2px;cursor:pointer;margin-left:.5rem;padding:.5rem;transition:.3s}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a svg{width:20px;fill:var(--wp--preset--color--contrast);vertical-align:middle}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a:disabled{cursor:not-allowed;opacity:.5}.jetpack-ai-chat-copy-button-container{margin:1rem 0}.jetpack-ai-chat-copy-button-container button{background:none;border:none;color:var(--wp--preset--color--secondary);cursor:pointer;display:block;font-size:16px;padding:inherit;position:relative;transition:.3s}.jetpack-ai-chat-copy-button-container button:disabled{cursor:not-allowed;opacity:.5}.jetpack-ai-chat-copy-button-container button .copy-icon{margin-right:.5rem;vertical-align:middle}.jetpack-ai-chat-error-container{color:#dc3232;font-size:1rem;margin:1rem 0}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper{display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:1rem}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input{flex:auto;flex-grow:4}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input input{font-size:16px;line-height:1.3;padding:15px 23px;width:100%}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input .components-base-control__field{margin-bottom:0}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-button{display:block;flex:auto;flex-grow:1;height:53px;margin-left:10px;text-wrap:nowrap;white-space:-moz-pre-space}.wp-block-jetpack-ai-chat .jetpack-ai-chat-answer-references{font-size:1rem;margin-top:12px}.wp-block-jetpack-ai-chat .jetpack-ai-chat-answer-references hr{margin:1rem 0}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
@@ -0,0 +1 @@
.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form{display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:1rem}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-input{flex:auto;flex-grow:4}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-input input{font-size:16px;line-height:1.3;padding:15px 23px;width:100%}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-feedback-form .jetpack-ai-chat-feedback-submit{flex:auto;flex-grow:1;height:53px;margin-right:10px;text-wrap:nowrap}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a{border:none;border-radius:2px;cursor:pointer;margin-right:.5rem;padding:.5rem;transition:.3s}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a svg{width:20px;fill:var(--wp--preset--color--contrast);vertical-align:middle}.jetpack-ai-chat-feedback-container .jetpack-ai-chat-answer-feedback-buttons a:disabled{cursor:not-allowed;opacity:.5}.jetpack-ai-chat-copy-button-container{margin:1rem 0}.jetpack-ai-chat-copy-button-container button{background:none;border:none;color:var(--wp--preset--color--secondary);cursor:pointer;display:block;font-size:16px;padding:inherit;position:relative;transition:.3s}.jetpack-ai-chat-copy-button-container button:disabled{cursor:not-allowed;opacity:.5}.jetpack-ai-chat-copy-button-container button .copy-icon{margin-left:.5rem;vertical-align:middle}.jetpack-ai-chat-error-container{color:#dc3232;font-size:1rem;margin:1rem 0}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper{display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:1rem}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input{flex:auto;flex-grow:4}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input input{font-size:16px;line-height:1.3;padding:15px 23px;width:100%}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-input .components-base-control__field{margin-bottom:0}.wp-block-jetpack-ai-chat .jetpack-ai-chat-question-wrapper .jetpack-ai-chat-question-button{display:block;flex:auto;flex-grow:1;height:53px;margin-right:10px;text-wrap:nowrap;white-space:-moz-pre-space}.wp-block-jetpack-ai-chat .jetpack-ai-chat-answer-references{font-size:1rem;margin-top:12px}.wp-block-jetpack-ai-chat .jetpack-ai-chat-answer-references hr{margin:1rem 0}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,50 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/blog-stats",
"title": "Blog Stats",
"description": "Show a stats counter for your blog.",
"keywords": [
"views",
"hits",
"analytics",
"counter",
"visitors"
],
"version": "1.0",
"textdomain": "jetpack",
"category": "grow",
"icon": "<svg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24'><path d='M160-200h160v-320H160v320Zm240 0h160v-560H400v560Zm240 0h160v-240H640v240ZM80-120v-480h240v-240h320v320h240v400H80Z'/></svg>",
"supports": {
"align": true,
"alignWide": true,
"html": false,
"multiple": true,
"reusable": true,
"color": {
"gradients": true
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"__experimentalFontFamily": true,
"fontSize": true
}
},
"attributes": {
"label": {
"type": "string"
},
"statsData": {
"type": "string",
"default": "views"
},
"statsOption": {
"type": "string",
"default": "site"
}
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1,111 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/blogging-prompt",
"title": "Writing Prompt",
"description": "Answer a new and inspiring writing prompt each day.",
"keywords": [
"writing",
"blogging"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "text",
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M14.3438 19.3438H9.65625C9.57031 19.3438 9.5 19.4141 9.5 19.5V20.125C9.5 20.4707 9.7793 20.75 10.125 20.75H13.875C14.2207 20.75 14.5 20.4707 14.5 20.125V19.5C14.5 19.4141 14.4297 19.3438 14.3438 19.3438ZM12 3.25C8.46289 3.25 5.59375 6.11914 5.59375 9.65625C5.59375 12.0273 6.88281 14.0977 8.79688 15.2051V17.4688C8.79688 17.8145 9.07617 18.0938 9.42188 18.0938H14.5781C14.9238 18.0938 15.2031 17.8145 15.2031 17.4688V15.2051C17.1172 14.0977 18.4062 12.0273 18.4062 9.65625C18.4062 6.11914 15.5371 3.25 12 3.25ZM14.498 13.9883L13.7969 14.3945V16.6875H10.2031V14.3945L9.50195 13.9883C7.96484 13.0996 7 11.4629 7 9.65625C7 6.89453 9.23828 4.65625 12 4.65625C14.7617 4.65625 17 6.89453 17 9.65625C17 11.4629 16.0352 13.0996 14.498 13.9883Z' stroke-width='0.1'/></svg>",
"supports": {
"align": false,
"alignWide": false,
"anchor": false,
"className": true,
"color": {
"background": true,
"gradients": true,
"link": true,
"text": true
},
"customClassName": true,
"html": false,
"inserter": true,
"multiple": false,
"reusable": true,
"spacing": {
"margin": [
"top",
"bottom"
],
"padding": true,
"blockGap": false
}
},
"attributes": {
"answersLink": {
"type": "string",
"source": "attribute",
"attribute": "href",
"selector": ".jetpack-blogging-prompt__answers-link"
},
"answersLinkText": {
"type": "string",
"source": "html",
"selector": ".jetpack-blogging-prompt__answers-link"
},
"gravatars": {
"type": "array",
"source": "query",
"selector": ".jetpack-blogging-prompt__answers-gravatar",
"query": {
"url": {
"type": "string",
"source": "attribute",
"attribute": "src"
}
},
"default": []
},
"promptLabel": {
"type": "string",
"source": "html",
"selector": ".jetpack-blogging-prompt__label"
},
"promptText": {
"type": "string",
"source": "html",
"selector": ".jetpack-blogging-prompt__text"
},
"promptFetched": {
"type": "boolean",
"default": false
},
"promptId": {
"type": "number"
},
"showResponses": {
"type": "boolean",
"default": true
},
"showLabel": {
"type": "boolean",
"default": true
},
"tagsAdded": {
"type": "boolean",
"default": false
},
"isBloganuary": {
"type": "boolean",
"default": false
}
},
"styles": [
{
"name": "block",
"label": "Block",
"isDefault": true
},
{
"name": "quote",
"label": "Quote"
}
],
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '5182e0629d0214a32263');
@@ -0,0 +1 @@
.jetpack-blogging-prompt{border:1px solid #ddd;border-radius:2px;box-sizing:border-box;padding:24px}.jetpack-blogging-prompt__label{background:no-repeat url(../images/icon-cd4e9ecf53fadf95246d.svg);background-position:-5px;background-size:24px 24px;font-size:14px;margin-bottom:16px;padding-inline-start:22px}.jetpack-blogging-prompt__label.is-bloganuary-icon{background:no-repeat url(../images/bloganuary-icon-20e07d1c81f21708f183.svg);background-position:0;padding-inline-start:26px}.jetpack-blogging-prompt__text{font-size:24px;margin-bottom:16px}.jetpack-blogging-prompt__answers-link{display:inline-block;margin-inline-start:10px;text-decoration:underline}.jetpack-blogging-prompt__answers{font-size:16px}.jetpack-blogging-prompt__answers-gravatar{border:2px solid #fff;border-radius:50%;height:24px;vertical-align:middle;width:24px}.jetpack-blogging-prompt__answers-gravatar:first-child{margin-inline-start:-2px}.jetpack-blogging-prompt__answers-gravatar:not(:first-child){margin-inline-start:-15px}.jetpack-blogging-prompt__spinner{text-align:center}.jetpack-blogging-prompt.is-style-quote{border:none;border-inline-start:4px solid #2f2f2f;margin-bottom:16px;padding:0 24px}@media only email{.jetpack-blogging-prompt__label{background:none;padding-inline-start:0}.jetpack-blogging-prompt__answers,.jetpack-blogging-prompt__answers-gravatar{margin-bottom:0}.jetpack-blogging-prompt__answers-gravatar:not(:first-child){margin-inline-start:0}}
@@ -0,0 +1 @@
(()=>{var t={79366:(t,r,e)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(e.p=window.Jetpack_Block_Assets_Base_Url)}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return t[o](i,i.exports,e),i.exports}e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var r=e.g.document;if(!t&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t+"../"})(),(()=>{"use strict";e(79366)})()})();
@@ -0,0 +1 @@
.jetpack-blogging-prompt{border:1px solid #ddd;border-radius:2px;box-sizing:border-box;padding:24px}.jetpack-blogging-prompt__label{background:no-repeat url(../images/icon-cd4e9ecf53fadf95246d.svg);background-position:-5px;background-size:24px 24px;font-size:14px;margin-bottom:16px;padding-inline-start:22px}.jetpack-blogging-prompt__label.is-bloganuary-icon{background:no-repeat url(../images/bloganuary-icon-20e07d1c81f21708f183.svg);background-position:0;padding-inline-start:26px}.jetpack-blogging-prompt__text{font-size:24px;margin-bottom:16px}.jetpack-blogging-prompt__answers-link{display:inline-block;margin-inline-start:10px;text-decoration:underline}.jetpack-blogging-prompt__answers{font-size:16px}.jetpack-blogging-prompt__answers-gravatar{border:2px solid #fff;border-radius:50%;height:24px;vertical-align:middle;width:24px}.jetpack-blogging-prompt__answers-gravatar:first-child{margin-inline-start:-2px}.jetpack-blogging-prompt__answers-gravatar:not(:first-child){margin-inline-start:-15px}.jetpack-blogging-prompt__spinner{text-align:center}.jetpack-blogging-prompt.is-style-quote{border:none;border-inline-start:4px solid #2f2f2f;margin-bottom:16px;padding:0 24px}@media only email{.jetpack-blogging-prompt__label{background:none;padding-inline-start:0}.jetpack-blogging-prompt__answers,.jetpack-blogging-prompt__answers-gravatar{margin-bottom:0}.jetpack-blogging-prompt__answers-gravatar:not(:first-child){margin-inline-start:0}}
@@ -0,0 +1,62 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/blogroll",
"title": "Blogroll",
"description": "Share the sites you follow with your users.",
"keywords": [],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "grow",
"icon": "<svg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M4.08691 16.2412H20.0869V14.7412H4.08691V16.2412Z'></path><path d='M4.08691 20.2412H13.0869V18.7412H4.08691V20.2412Z'></path><path fill-rule='evenodd' clip-rule='evenodd' d='M4.08691 8.17871C4.08691 6.00409 5.84979 4.24121 8.02441 4.24121C10.199 4.24121 11.9619 6.00409 11.9619 8.17871C11.9619 10.3533 10.199 12.1162 8.02441 12.1162C5.84979 12.1162 4.08691 10.3533 4.08691 8.17871ZM5.10729 6.71621C5.51231 5.90991 6.2418 5.29471 7.12439 5.04194C6.91534 5.28455 6.73551 5.57108 6.58869 5.88606C6.46938 6.14205 6.36999 6.42056 6.29338 6.71621H5.10729ZM4.85759 7.39121C4.79508 7.64341 4.76191 7.90719 4.76191 8.17871C4.76191 8.45024 4.79508 8.71401 4.85759 8.96621H6.16284C6.12938 8.71126 6.11192 8.44782 6.11192 8.1787C6.11192 7.90956 6.12938 7.64614 6.16284 7.39121H4.85759ZM6.84439 7.39121C6.80693 7.64285 6.78692 7.90651 6.78692 8.1787C6.78692 8.45091 6.80694 8.71459 6.84439 8.96621H9.20444C9.2419 8.71458 9.26192 8.45091 9.26192 8.17873C9.26192 7.90653 9.2419 7.64285 9.20444 7.39121H6.84439ZM9.88599 7.39121C9.91945 7.64615 9.93692 7.90958 9.93692 8.17873C9.93692 8.44786 9.91945 8.71128 9.88599 8.96621H11.1912C11.2537 8.71401 11.2869 8.45024 11.2869 8.17871C11.2869 7.90719 11.2537 7.64341 11.1912 7.39121H9.88599ZM10.9415 6.71621H9.75544C9.67883 6.42057 9.57945 6.14207 9.46014 5.88609C9.31332 5.5711 9.13347 5.28455 8.92441 5.04193C9.80702 5.29469 10.5365 5.9099 10.9415 6.71621ZM9.05465 6.71621H6.99417C7.05245 6.52254 7.12177 6.34014 7.2005 6.17123C7.42342 5.69296 7.71302 5.34019 8.02439 5.13337C8.33578 5.34019 8.6254 5.69297 8.84833 6.17126C8.92706 6.34016 8.99637 6.52255 9.05465 6.71621ZM5.10729 9.64121H6.29339C6.37419 9.95305 6.48034 10.2458 6.6085 10.5132C6.75142 10.8114 6.92452 11.0835 7.12445 11.3155C6.24183 11.0627 5.51232 10.4475 5.10729 9.64121ZM9.05466 9.64121H6.99418C7.05655 9.84847 7.13156 10.0428 7.21721 10.2215C7.43825 10.6827 7.72115 11.0226 8.02446 11.224C8.33582 11.0172 8.62541 10.6645 8.84833 10.1862C8.92706 10.0173 8.99638 9.83488 9.05466 9.64121ZM9.46014 10.4714C9.57945 10.2154 9.67884 9.93686 9.75545 9.64121H10.9415C10.5365 10.4475 9.80703 11.0627 8.92444 11.3155C9.13349 11.0729 9.31332 10.7863 9.46014 10.4714Z'></path></svg>",
"supports": {
"align": false,
"alignWide": true,
"anchor": false,
"customClassName": true,
"className": true,
"html": false,
"multiple": true,
"reusable": true,
"color": {
"link": true,
"gradients": true
},
"spacing": {
"padding": true,
"margin": true
},
"typography": {
"fontSize": true,
"lineHeight": true
}
},
"attributes": {
"show_avatar": {
"type": "boolean",
"default": true
},
"show_description": {
"type": "boolean",
"default": true
},
"open_links_new_window": {
"type": "boolean",
"default": true
},
"ignore_user_blogs": {
"type": "boolean",
"default": true
},
"load_placeholders": {
"type": "boolean",
"default": true
}
},
"providesContext": {
"showAvatar": "show_avatar",
"showDescription": "show_description",
"openLinksNewWindow": "open_links_new_window"
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '32a8501e8647dda360bd');
@@ -0,0 +1 @@
@container bitem (min-width: 480px){.wp-block-jetpack-blogroll{padding:24px}}.wp-block-jetpack-blogroll .block-editor-inner-blocks h3{font-size:20px;font-style:normal;font-weight:700;line-height:28px;margin-bottom:24px;margin-top:0}.wp-block-jetpack-blogroll.hide-avatar figure,.wp-block-jetpack-blogroll.hide-description .jetpack-blogroll-item-description{display:none}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item{container-name:bitem;container-type:inline-size}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information{align-items:flex-start;flex-direction:column;padding:20px 8px}@container bitem (min-width: 480px){.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information{align-items:center;flex-direction:row}}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item+.wp-block-jetpack-blogroll-item .jetpack-blogroll-item-divider{display:block}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item{overflow-x:clip}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item.has-subscription-form .jetpack-blogroll-item-slider{width:200%}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-divider{border-style:solid;border-width:1px 0 0;display:none;margin-block-end:0;margin-block-start:0;opacity:.2;width:100%}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-slider{display:flex;transition:transform .3s ease-in-out}@media(prefers-reduced-motion:reduce){.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-slider{transition:none}}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item.open .jetpack-blogroll-item-slider{transform:translateX(-50%)}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-title{font-weight:700}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-description,.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-title{word-break:break-word}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information{box-sizing:border-box;display:flex;gap:20px;padding:20px 0;width:100%}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information figure{align-self:flex-start;flex-shrink:0;height:48px;margin:0;width:48px}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information figure.empty-site-icon{background:url(../images/placeholder-site-icon-5bb955c1d041bc2adfc9.svg);background-size:cover}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information figure.empty-site-icon img{display:none}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information figure img{border-radius:50%;height:48px;width:48px}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information .jetpack-blogroll-item-content{align-self:flex-start}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-subscribe-button{white-space:nowrap}@container bitem (min-width: 480px){.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-subscribe-button{align-self:center;margin-left:auto}}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-cancel-button button,.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-submit-button button,.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-subscribe-button button{margin:0}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-email-input{border:1px solid #8c8f94;border-radius:0;box-sizing:border-box;font:inherit;margin:0;padding:14px;width:100%}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-submit{align-items:center;border:none;display:flex;flex-direction:column;gap:10px;justify-content:center;margin:0;padding:0;width:100%}@container bitem (min-width: 480px){.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-submit{flex-direction:row}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-submit .jetpack-blogroll-item-email-input{flex:1}}
@@ -0,0 +1 @@
(()=>{var t={79366:(t,e,r)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(r.p=window.Jetpack_Block_Assets_Base_Url)}},e={};function r(o){var c=e[o];if(void 0!==c)return c.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var o=e.getElementsByTagName("script");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t+"../"})(),(()=>{"use strict";r(79366)})(),(()=>{"use strict";function t(t){t.preventDefault();const e=t.currentTarget.closest(".wp-block-jetpack-blogroll-item");e?.classList.toggle("open")?e.querySelector(".jetpack-blogroll-item-submit").removeAttribute("disabled"):e.querySelector(".jetpack-blogroll-item-submit").setAttribute("disabled","disabled")}document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".jetpack-blogroll-item-subscribe-button, .jetpack-blogroll-item-cancel-button").forEach((e=>{e.addEventListener("click",t)}))}))})()})();
@@ -0,0 +1 @@
@container bitem (min-width: 480px){.wp-block-jetpack-blogroll{padding:24px}}.wp-block-jetpack-blogroll .block-editor-inner-blocks h3{font-size:20px;font-style:normal;font-weight:700;line-height:28px;margin-bottom:24px;margin-top:0}.wp-block-jetpack-blogroll.hide-avatar figure,.wp-block-jetpack-blogroll.hide-description .jetpack-blogroll-item-description{display:none}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item{container-name:bitem;container-type:inline-size}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information{align-items:flex-start;flex-direction:column;padding:20px 8px}@container bitem (min-width: 480px){.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information{align-items:center;flex-direction:row}}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item+.wp-block-jetpack-blogroll-item .jetpack-blogroll-item-divider{display:block}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item{overflow-x:clip}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item.has-subscription-form .jetpack-blogroll-item-slider{width:200%}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-divider{border-style:solid;border-width:1px 0 0;display:none;margin-block-end:0;margin-block-start:0;opacity:.2;width:100%}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-slider{display:flex;transition:transform .3s ease-in-out}@media(prefers-reduced-motion:reduce){.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-slider{transition:none}}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item.open .jetpack-blogroll-item-slider{transform:translateX(50%)}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-title{font-weight:700}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-description,.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-title{word-break:break-word}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information{box-sizing:border-box;display:flex;gap:20px;padding:20px 0;width:100%}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information figure{align-self:flex-start;flex-shrink:0;height:48px;margin:0;width:48px}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information figure.empty-site-icon{background:url(../images/placeholder-site-icon-5bb955c1d041bc2adfc9.svg);background-size:cover}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information figure.empty-site-icon img{display:none}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information figure img{border-radius:50%;height:48px;width:48px}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-information .jetpack-blogroll-item-content{align-self:flex-start}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-subscribe-button{white-space:nowrap}@container bitem (min-width: 480px){.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-subscribe-button{align-self:center;margin-right:auto}}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-cancel-button button,.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-submit-button button,.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-subscribe-button button{margin:0}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-email-input{border:1px solid #8c8f94;border-radius:0;box-sizing:border-box;font:inherit;margin:0;padding:14px;width:100%}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-submit{align-items:center;border:none;display:flex;flex-direction:column;gap:10px;justify-content:center;margin:0;padding:0;width:100%}@container bitem (min-width: 480px){.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-submit{flex-direction:row}.wp-block-jetpack-blogroll .wp-block-jetpack-blogroll-item .jetpack-blogroll-item-submit .jetpack-blogroll-item-email-input{flex:1}}
@@ -0,0 +1,155 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/business-hours",
"title": "Business Hours",
"description": "Display opening hours for your business.",
"keywords": [
"opening hours",
"closing time",
"schedule",
"working day"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "grow",
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/></svg>",
"supports": {
"html": true,
"color": {
"gradients": true
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true
},
"align": [
"wide",
"full"
]
},
"attributes": {
"days": {
"type": "array",
"default": [
{
"name": "Sun",
"hours": []
},
{
"name": "Mon",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Tue",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Wed",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Thu",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Fri",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Sat",
"hours": []
}
]
}
},
"example": {
"attributes": {
"days": [
{
"name": "Sun",
"hours": []
},
{
"name": "Mon",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Tue",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Wed",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Thu",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Fri",
"hours": [
{
"opening": "09:00",
"closing": "17:00"
}
]
},
{
"name": "Sat",
"hours": []
}
]
}
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '015c90376027208061a7');
@@ -0,0 +1 @@
@media(min-width:480px){.jetpack-business-hours dd,.jetpack-business-hours dt{display:inline-block}}.jetpack-business-hours dt{font-weight:700;margin-inline-end:.5em;min-width:30%;vertical-align:top}.jetpack-business-hours dd{margin:0}@media(min-width:480px){.jetpack-business-hours dd{max-width:calc(70% - .5em)}}.jetpack-business-hours__item{margin-bottom:.5em}
@@ -0,0 +1 @@
(()=>{var t={79366:(t,r,e)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(e.p=window.Jetpack_Block_Assets_Base_Url)}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return t[o](i,i.exports,e),i.exports}e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var r=e.g.document;if(!t&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t+"../"})(),(()=>{"use strict";e(79366)})()})();
@@ -0,0 +1 @@
@media(min-width:480px){.jetpack-business-hours dd,.jetpack-business-hours dt{display:inline-block}}.jetpack-business-hours dt{font-weight:700;margin-inline-end:.5em;min-width:30%;vertical-align:top}.jetpack-business-hours dd{margin:0}@media(min-width:480px){.jetpack-business-hours dd{max-width:calc(70% - .5em)}}.jetpack-business-hours__item{margin-bottom:.5em}
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'd2a4ef4a69b8ce407270');
@@ -0,0 +1 @@
.amp-wp-article .wp-block-jetpack-button{color:#fff}.wp-block-jetpack-button.is-style-outline>.wp-block-button__link{background-color:#0000;border:1px solid;color:currentColor}.wp-block-jetpack-button:not(.is-style-outline) button{border:none}
@@ -0,0 +1 @@
(()=>{var t={79366:(t,r,e)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(e.p=window.Jetpack_Block_Assets_Base_Url)}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return t[o](i,i.exports,e),i.exports}e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var r=e.g.document;if(!t&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t+"../"})(),(()=>{"use strict";e(79366)})()})();
@@ -0,0 +1 @@
.amp-wp-article .wp-block-jetpack-button{color:#fff}.wp-block-jetpack-button.is-style-outline>.wp-block-button__link{background-color:#0000;border:1px solid;color:currentColor}.wp-block-jetpack-button:not(.is-style-outline) button{border:none}
@@ -0,0 +1,71 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/calendly",
"title": "Calendly",
"description": "Embed a calendar for customers to schedule appointments.",
"keywords": [
"calendar",
"schedule",
"appointments",
"events",
"dates"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "grow",
"icon": "<svg viewBox='0 0 23 24' width='23' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z'/></svg>",
"supports": {
"align": true,
"alignWide": false,
"html": false
},
"attributes": {
"backgroundColor": {
"type": "string",
"default": "ffffff"
},
"hideEventTypeDetails": {
"type": "boolean",
"default": false
},
"primaryColor": {
"type": "string",
"default": "00A2FF"
},
"textColor": {
"type": "string",
"default": "4D5055"
},
"style": {
"type": "string",
"default": "inline",
"enum": [
"inline",
"link"
]
},
"url": {
"type": "string"
}
},
"example": {
"attributes": {
"hideEventTypeDetails": false,
"style": "inline",
"url": "https://calendly.com/wpcom/jetpack-block-example"
},
"innerBlocks": [
{
"name": "jetpack/button",
"attributes": {
"element": "a",
"text": "Schedule time with me",
"uniqueId": "calendly-widget-id",
"url": "https://calendly.com/wpcom/jetpack-block-example"
}
}
]
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '2c6dcab855ebf648b7a9');
@@ -0,0 +1 @@
.admin-bar .calendly-overlay .calendly-popup-close{top:47px}.wp-block-jetpack-calendly.calendly-style-inline{height:630px;position:relative}.wp-block-jetpack-calendly .calendly-spinner{top:50px}.wp-block-jetpack-calendly.aligncenter{text-align:center}.wp-block-jetpack-calendly .wp-block-jetpack-button{color:#fff}
@@ -0,0 +1 @@
(()=>{var t={79366:(t,r,e)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(e.p=window.Jetpack_Block_Assets_Base_Url)}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return t[o](i,i.exports,e),i.exports}e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var r=e.g.document;if(!t&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t+"../"})(),(()=>{"use strict";e(79366)})()})();
@@ -0,0 +1 @@
.admin-bar .calendly-overlay .calendly-popup-close{top:47px}.wp-block-jetpack-calendly.calendly-style-inline{height:630px;position:relative}.wp-block-jetpack-calendly .calendly-spinner{top:50px}.wp-block-jetpack-calendly.aligncenter{text-align:center}.wp-block-jetpack-calendly .wp-block-jetpack-button{color:#fff}
@@ -0,0 +1 @@
.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper{align-items:center;background:#000;border-radius:2px;box-shadow:inset 0 0 1px #fff;display:flex;font-size:14px;justify-content:space-between;padding:0 20px}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .banner-description,.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .banner-title{color:#fff}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .jetpack-upgrade-plan-banner__description,.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .jetpack-upgrade-plan-banner__title{margin-right:10px}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button{flex-shrink:0;height:28px;line-height:1;margin-left:auto}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary{background:#e34c84;color:#fff}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary:hover{background:#eb6594}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary.is-busy{background-image:linear-gradient(-45deg,#e34c84 28%,#ab235a 0,#ab235a 72%,#e34c84 0);background-size:100px 100%}.jetpack-upgrade-plan-banner.block-editor-block-list__block{margin-bottom:0;margin-top:0}.jetpack-upgrade-plan-banner.wp-block[data-align=left] .jetpack-upgrade-plan-banner__wrapper,.jetpack-upgrade-plan-banner.wp-block[data-align=right] .jetpack-upgrade-plan-banner__wrapper{max-width:580px;width:100%}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}.jetpack-editor-panel-logo{margin-left:.5em}.block-editor-warning{border:1px solid #e0e0e0;padding:10px 14px}.block-editor-warning .block-editor-warning__message{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4}.block-editor-warning .block-editor-warning__actions .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-weight:inherit;text-decoration:none}
@@ -0,0 +1,85 @@
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/**
* @license React
* react-dom-server-legacy.browser.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-dom-server.browser.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@@ -0,0 +1 @@
.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper{align-items:center;background:#000;border-radius:2px;box-shadow:inset 0 0 1px #fff;display:flex;font-size:14px;justify-content:space-between;padding:0 20px}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .banner-description,.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .banner-title{color:#fff}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .jetpack-upgrade-plan-banner__description,.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .jetpack-upgrade-plan-banner__title{margin-left:10px}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button{flex-shrink:0;height:28px;line-height:1;margin-right:auto}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary{background:#e34c84;color:#fff}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary:hover{background:#eb6594}.jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary.is-busy{background-image:linear-gradient(45deg,#e34c84 28%,#ab235a 0,#ab235a 72%,#e34c84 0);background-size:100px 100%}.jetpack-upgrade-plan-banner.block-editor-block-list__block{margin-bottom:0;margin-top:0}.jetpack-upgrade-plan-banner.wp-block[data-align=left] .jetpack-upgrade-plan-banner__wrapper,.jetpack-upgrade-plan-banner.wp-block[data-align=right] .jetpack-upgrade-plan-banner__wrapper{max-width:580px;width:100%}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}.jetpack-editor-panel-logo{margin-right:.5em}.block-editor-warning{border:1px solid #e0e0e0;padding:10px 14px}.block-editor-warning .block-editor-warning__message{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4}.block-editor-warning .block-editor-warning__actions .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-weight:inherit;text-decoration:none}
@@ -0,0 +1,63 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/contact-info",
"title": "Contact Info",
"description": "Add an email address, phone number, and physical address with improved markup for better SEO results.",
"keywords": [
"email",
"phone",
"address"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "grow",
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M19 5v14H5V5h14m0-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 9c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm6 10H6v-1.53c0-2.5 3.97-3.58 6-3.58s6 1.08 6 3.58V18zm-9.69-2h7.38c-.69-.56-2.38-1.12-3.69-1.12s-3.01.56-3.69 1.12z'/></svg>",
"supports": {
"align": [
"wide",
"full"
],
"html": false,
"color": {
"link": true,
"gradients": true
},
"spacing": {
"padding": true,
"margin": true
},
"typography": {
"fontSize": true,
"lineHeight": true
}
},
"example": {
"attributes": {},
"innerBlocks": [
{
"name": "jetpack/email",
"attributes": {
"email": "hello@yourjetpack.blog"
}
},
{
"name": "jetpack/phone",
"attributes": {
"phone": "123-456-7890"
}
},
{
"name": "jetpack/address",
"attributes": {
"address": "987 Photon Drive",
"city": "Speedyville",
"region": "CA",
"postal": "12345",
"country": "USA"
}
}
]
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'aebc1f4d75f21cfa2f41');
@@ -0,0 +1 @@
.wp-block-jetpack-contact-info{margin-bottom:1.5em}
@@ -0,0 +1 @@
(()=>{var t={79366:(t,r,e)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(e.p=window.Jetpack_Block_Assets_Base_Url)}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return t[o](i,i.exports,e),i.exports}e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var r=e.g.document;if(!t&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t+"../"})(),(()=>{"use strict";e(79366)})()})();
@@ -0,0 +1 @@
.wp-block-jetpack-contact-info{margin-bottom:1.5em}
@@ -0,0 +1,81 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/cookie-consent",
"title": "Cookie Consent",
"description": "Display a customizable cookie consent banner. To display this block on all pages of your site, please add it inside a Template Part that is present on all your templates, like a Header or a Footer.",
"keywords": [
"cookie",
"consent",
"privacy",
"GDPR",
"EU"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "grow",
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='m20.27,11.03c-.02-.31-.05-.62-.11-.92h-3.88v-2.91h-2.87v-3.79c-.32-.06-.64-.1-.97-.12-.15,0-.29,0-.44,0C7.42,3.28,3.71,7,3.71,11.57s3.71,8.3,8.29,8.3,8.29-3.72,8.29-8.3c0-.18,0-.36-.02-.54Zm-8.23,7.79c-4,0-7.24-3.25-7.24-7.25s3.24-7.24,7.24-7.24c.14,0,.27,0,.4.02v3.81h2.9v2.87h3.91c.02.18.03.36.03.54,0,4-3.24,7.25-7.24,7.25Z'/><path d='M 8, 8 a 1,1 0 1,1 2,0 a 1,1 0 1,1 -2,0'/><path d='M 12, 11.5 a 1,1 0 1,1 2,0 a 1,1 0 1,1 -2,0'/><path d='M 13, 16 a 1,1 0 1,1 2,0 a 1,1 0 1,1 -2,0'/><path d='M 8, 14 a 1,1 0 1,1 2,0 a 1,1 0 1,1 -2,0'/></svg>",
"supports": {
"align": [
"left",
"right",
"wide",
"full"
],
"alignWide": true,
"anchor": false,
"color": {
"gradients": true,
"link": true,
"background": true
},
"spacing": {
"padding": true
},
"customClassName": true,
"className": true,
"html": false,
"lock": false,
"multiple": false,
"reusable": false
},
"attributes": {
"text": {
"type": "string",
"source": "html",
"selector": "p"
},
"style": {
"type": "object",
"default": {
"color": {
"text": "var(--wp--preset--color--contrast)",
"background": "var(--wp--preset--color--tertiary)",
"link": "var(--wp--preset--color--contrast)"
},
"spacing": {
"padding": {
"top": "1em",
"right": "1em",
"bottom": "1em",
"left": "1em"
}
}
}
},
"align": {
"type": "string",
"default": "wide"
},
"consentExpiryDays": {
"type": "integer",
"default": 365
},
"showOverlay": {
"type": "boolean",
"default": false
}
},
"viewScript": "file:./view.js",
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-dom-ready'), 'version' => '62af1bb0e3146219a513');
@@ -0,0 +1 @@
.wp-block-jetpack-cookie-consent{align-items:center;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}.wp-block-jetpack-cookie-consent .wp-block-button__link{white-space:nowrap!important}.wp-block-jetpack-cookie-consent:not([role=document]){animation:cookie-consent-slide-in .2s ease-in-out;bottom:50px;position:fixed;transition:opacity .2s ease-in-out;z-index:50001}.wp-block-jetpack-cookie-consent:not([role=document]) span{display:none}.wp-block-jetpack-cookie-consent:not([role=document]) .wp-block-button{white-space:nowrap}@keyframes cookie-consent-slide-in{0%{opacity:0}to{opacity:1}}.wp-block-jetpack-cookie-consent:not([role=document]).is-dismissed{opacity:0;pointer-events:none}.wp-block-jetpack-cookie-consent:not([role=document]).alignleft,.wp-block-jetpack-cookie-consent:not([role=document]).alignright{flex-wrap:nowrap;max-width:50%}.wp-block-jetpack-cookie-consent:not([role=document]).alignright{margin-left:auto!important;right:10px}.wp-block-jetpack-cookie-consent:not([role=document]).alignleft{left:10px}.wp-block-jetpack-cookie-consent:not([role=document]).alignwide{left:5%!important;max-width:90%!important;width:100vw!important}.wp-block-jetpack-cookie-consent:not([role=document]).alignfull{width:100%}@media screen and (max-width:768px){.wp-block-jetpack-cookie-consent:not([role=document]).alignleft,.wp-block-jetpack-cookie-consent:not([role=document]).alignright{flex-wrap:wrap;left:5%;margin-left:0!important;max-width:unset;max-width:90%;width:100vw}}
@@ -0,0 +1 @@
(()=>{var e={79366:(e,t,r)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(r.p=window.Jetpack_Block_Assets_Base_Url)},98490:e=>{"use strict";e.exports=window.wp.domReady}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var c=t[o]={exports:{}};return e[o](c,c.exports,r),c.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e+"../"})(),(()=>{"use strict";r(79366)})(),(()=>{"use strict";var e=r(98490);r.n(e)()((function(){const e=document.querySelector(".wp-block-jetpack-cookie-consent"),t=e.querySelector("span"),r=parseInt(t.textContent),o=new Date(Date.now()+864e5*r),n=e.querySelector(".wp-block-button a");n.setAttribute("role","button"),n.setAttribute("href","#"),n.addEventListener("click",(e=>{n.closest(".wp-block-jetpack-cookie-consent")&&e.preventDefault()})),n.addEventListener("click",(function(){try{document.cookie=`eucookielaw=${o.getTime()};path=/;expires=${o.toGMTString()}`,e.classList.add("is-dismissed"),e.addEventListener("transitionend",(()=>e.remove()));const t=new Event("eucookielaw-dismissed");document.dispatchEvent(t)}catch{}}))}))})()})();
@@ -0,0 +1 @@
.wp-block-jetpack-cookie-consent{align-items:center;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}.wp-block-jetpack-cookie-consent .wp-block-button__link{white-space:nowrap!important}.wp-block-jetpack-cookie-consent:not([role=document]){animation:cookie-consent-slide-in .2s ease-in-out;bottom:50px;position:fixed;transition:opacity .2s ease-in-out;z-index:50001}.wp-block-jetpack-cookie-consent:not([role=document]) span{display:none}.wp-block-jetpack-cookie-consent:not([role=document]) .wp-block-button{white-space:nowrap}@keyframes cookie-consent-slide-in{0%{opacity:0}to{opacity:1}}.wp-block-jetpack-cookie-consent:not([role=document]).is-dismissed{opacity:0;pointer-events:none}.wp-block-jetpack-cookie-consent:not([role=document]).alignleft,.wp-block-jetpack-cookie-consent:not([role=document]).alignright{flex-wrap:nowrap;max-width:50%}.wp-block-jetpack-cookie-consent:not([role=document]).alignright{left:10px;margin-right:auto!important}.wp-block-jetpack-cookie-consent:not([role=document]).alignleft{right:10px}.wp-block-jetpack-cookie-consent:not([role=document]).alignwide{max-width:90%!important;right:5%!important;width:100vw!important}.wp-block-jetpack-cookie-consent:not([role=document]).alignfull{width:100%}@media screen and (max-width:768px){.wp-block-jetpack-cookie-consent:not([role=document]).alignleft,.wp-block-jetpack-cookie-consent:not([role=document]).alignright{flex-wrap:wrap;margin-right:0!important;max-width:unset;max-width:90%;right:5%;width:100vw}}
@@ -0,0 +1,97 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/donations",
"title": "Donations Form",
"description": "Collect one-time, monthly, or annually recurring donations.",
"keywords": [
"charity",
"contribution",
"credit card",
"debit card",
"donate",
"earn",
"monetize",
"ecommerce",
"fundraising",
"fundraiser",
"gofundme",
"money",
"nonprofit",
"non-profit",
"paid",
"patreon",
"pay",
"payments",
"recurring",
"stripe",
"sponsor",
"square",
"tipping",
"venmo"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "monetize",
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z' /></svg>",
"supports": {
"html": false
},
"attributes": {
"currency": {
"type": "string",
"default": ""
},
"oneTimeDonation": {
"type": "object",
"default": {
"show": true,
"planId": null,
"amounts": [
5,
15,
100
]
}
},
"monthlyDonation": {
"type": "object",
"default": {
"show": true,
"planId": null,
"amounts": [
5,
15,
100
]
}
},
"annualDonation": {
"type": "object",
"default": {
"show": true,
"planId": null,
"amounts": [
5,
15,
100
]
}
},
"showCustomAmount": {
"type": "boolean",
"default": true
},
"chooseAmountText": {
"type": "string"
},
"customAmountText": {
"type": "string"
},
"fallbackLinkUrl": {
"type": "string"
}
},
"example": {},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-dom-ready', 'wp-polyfill', 'wp-url'), 'version' => '3b5cd3cdf401d9f804df');
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
/*
* Exposes number format capability
*
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
* @license See CREDITS.md
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
*/
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'lodash', 'moment', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '218687f16286e20d72d9');
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,37 @@
/*
* Exposes number format capability
*
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
* @license See CREDITS.md
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
*/
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
/**
* @license qrcode.react
* Copyright (c) Paul O'Shannessy
* SPDX-License-Identifier: ISC
*/
/**
* filesize
*
* @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 10.1.6
*/
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'lodash', 'moment', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '4897008956164bf82035');
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,37 @@
/*
* Exposes number format capability
*
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
* @license See CREDITS.md
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
*/
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
/**
* @license qrcode.react
* Copyright (c) Paul O'Shannessy
* SPDX-License-Identifier: ISC
*/
/**
* filesize
*
* @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 10.1.6
*/
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'lodash', 'moment', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '3da28636eb058a4e857b');
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,30 @@
/*
* Exposes number format capability
*
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
* @license See CREDITS.md
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
*/
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
/**
* @license qrcode.react
* Copyright (c) Paul O'Shannessy
* SPDX-License-Identifier: ISC
*/
/**
* filesize
*
* @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 10.1.6
*/
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'lodash', 'moment', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '684a3b0967fbad845832');
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More