filename
stringlengths
11
137
content
stringlengths
6
292k
projects/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tiled Gallery block. * Relies on Photon, but can be used even when the module is not active. * * @since 6.9.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions; use Automattic\Jetpack\Blocks; use Automattic\Jetpac...
projects/plugins/jetpack/extensions/blocks/like/like.php
<?php /** * Like Block. * * @since 12.9 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Like; use Automattic\Jetpack\Assets; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * r...
projects/plugins/jetpack/extensions/blocks/simple-payments/simple-payments.php
<?php /** * Pay with PayPal block (aka Simple Payments). * * @since 9.0.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\SimplePayments; use Automattic\Jetpack\Blocks; use Jetpack_Simple_Payments; const FEATURE_NAME = 'simple-payments'; const BLOCK_NAME = 'jetpack/' . FEATURE_NAME...
projects/plugins/jetpack/extensions/blocks/donations/donations.php
<?php /** * Donations Block. * * @since 8.x * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Donations; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need...
projects/plugins/jetpack/extensions/blocks/pinterest/pinterest.php
<?php /** * Pinterest Block. * * Note: this block is no longer available to be added to new posts. * It is only kept available for existing posts with Pinterest blocks. * You can still embed Pinterest content using the embed method provided by WordPress itself. * * @since 8.0.0 * * @package automattic/jetpack ...
projects/plugins/jetpack/extensions/blocks/goodreads/goodreads.php
<?php /** * Goodreads Block. * * @since 13.2 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Goodreads; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg. * This is done via an action so that we can disable * registration if we ne...
projects/plugins/jetpack/extensions/blocks/image-compare/image-compare.php
<?php /** * Image Compare Block. * * @since 8.6 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\ImageCompare; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if ...
projects/plugins/jetpack/extensions/blocks/rating-star/rating-meta.php
<?php /** * Utilities for the rating block. * * @since 8.0.0 * * @package automattic/jetpack */ if ( ! function_exists( 'jetpack_rating_meta_get_symbol_low_fidelity' ) ) { /** * Returns the low fidelity symbol for the block. * * @return string */ function jetpack_rating_meta_get_symbol_low_fidelity() {...
projects/plugins/jetpack/extensions/blocks/rating-star/rating-star.php
<?php /** * Star Rating Block. * * @since 8.0.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Rating_Star; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; // Load generic function definitions. require_once __DIR__ . '/rating-meta.php'; /** * Registers the block for use in G...
projects/plugins/jetpack/extensions/blocks/markdown/markdown.php
<?php /** * Markdown Block. * * @since 6.8.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Markdown; use Automattic\Jetpack\Blocks; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need to. */ function regis...
projects/plugins/jetpack/extensions/blocks/recipe/class-jetpack-recipe-block.php
<?php /** * Jetpack Recipe Block * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Recipe; use Jetpack_Gutenberg; /** * Jetpack Recipe Block class. * * Helper class that lets us add schema attributes dynamically because they are not something that is store with the content. * Due to ...
projects/plugins/jetpack/extensions/blocks/recipe/recipe.php
<?php /** * Recipe Block. * * @since 11.1 * * @package automattic/jetpack */ use Automattic\Jetpack\Blocks; add_action( 'init', function () { Blocks::jetpack_register_block( __DIR__, array( 'render_callback' => array( 'Automattic\\Jetpack\\Extensions\\Recipe\\Jetpack_Recipe_Block', 'render' ), ...
projects/plugins/jetpack/extensions/blocks/repeat-visitor/repeat-visitor.php
<?php /** * Repeat Visitor Block * * @since 7.2.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Repeat_Visitor; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration...
projects/plugins/jetpack/extensions/blocks/opentable/opentable.php
<?php /** * OpenTable Block. * * @since 8.2 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\OpenTable; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need...
projects/plugins/jetpack/extensions/blocks/business-hours/business-hours.php
<?php /** * Business Hours Block. * * @since 7.1.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Business_Hours; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registratio...
projects/plugins/jetpack/extensions/blocks/contact-form/contact-form.php
<?php /** * Contact Form Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Contact_Form; add_action( 'init', array( Contact_Form_Block::class, 'register_block' ), 9 ); add_action( 'enqueue_block_editor_assets', array( Contact_Form_Block::class, 'load_editor_scripts' ), 9 );
projects/plugins/jetpack/extensions/blocks/top-posts/top-posts.php
<?php /** * Top Posts Block. * * @since 13.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Top_Posts; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; use Jetpack_Gutenb...
projects/plugins/jetpack/extensions/blocks/mailchimp/mailchimp.php
<?php /** * Mailchimp Block. * * @since 7.1.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Mailchimp; use Automattic\Jetpack\Blocks; use Jetpack; use Jetpack_Gutenberg; use Jetpack_Options; /** * Registers the block for use in Gutenberg * This is done via an action so that we ca...
projects/plugins/jetpack/extensions/blocks/nextdoor/nextdoor.php
<?php /** * Nextdoor Block. * * @since 12.8 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Nextdoor; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need ...
projects/plugins/jetpack/extensions/blocks/tock/tock.php
<?php /** * Tock Block. * * @since 12.3 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Tock; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need to. */ ...
projects/plugins/jetpack/extensions/blocks/payments-intro/payments-intro.php
<?php /** * Payments Intro Block. * * Acts as a menu for select payments blocks * * @since 10.x * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\PaymentsIntro; use Automattic\Jetpack\Blocks; /** * Registers the block for use in Gutenberg * This is done via an action so that we can...
projects/plugins/jetpack/extensions/blocks/sharing-button/class-sharing-source-block.php
<?php /** * Define all sharing sources. * * @since 13.0 * * @package automattic/jetpack * * phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound */ namespace Automattic\Jetpack\Extensions\Sharing_Button_Block; use Automattic\Jetpack\Device_Detection\User_Agent_Info; use Jetpack_PostImages; /**...
projects/plugins/jetpack/extensions/blocks/sharing-button/sharing-button.php
<?php /** * Sharing Buttons Block. * * @since 13.1 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Sharing_Button_Block; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Modules; use Automattic\Jetpack\Status\Host; use Jetpack_Gutenberg; require_once __DIR__ . '/class-sharing-so...
projects/plugins/jetpack/extensions/blocks/sharing-button/components/social-icons.php
<?php /** * SVG icons related functions and filters * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Sharing_Button_Block; /** * Returns an svg icon for a given social network. * * @param string $social_logo logo name for social icon. * * @return string */ function get_social_logo(...
projects/plugins/jetpack/extensions/blocks/sharing-button/components/class-jetpack-mastodon-modal.php
<?php /** * Display a Mastodon modal, where folks can enter a Mastodon instance. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Sharing_Button_Block; /** * Class Mastodon_Modal */ class Jetpack_Mastodon_Modal { /** * Mastodon SVG icon. * * @var string */ private static $svg...
projects/plugins/jetpack/extensions/blocks/related-posts/related-posts.php
<?php /** * Related Posts Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\RelatedPosts; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Modules; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; /** * Registers the block for use in Gutenberg * This is do...
projects/plugins/jetpack/extensions/blocks/google-calendar/google-calendar.php
<?php /** * Google Calendar Block. * * @since 8.3.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Google_Calendar; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registrat...
projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php
<?php /** * Subscriptions Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Subscriptions; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service\Abstract_Token_Subscript...
projects/plugins/jetpack/extensions/blocks/subscriptions/class-jetpack-subscription-site.php
<?php /** * Adds support for Jetpack Subscription Site feature. * * @package automattic/jetpack * @since 13.2 */ namespace Automattic\Jetpack\Extensions\Subscriptions; use Jetpack_Memberships; /** * Jetpack_Subscription_Site class. */ class Jetpack_Subscription_Site { /** * Jetpack_Subscription_Site single...
projects/plugins/jetpack/extensions/blocks/subscriptions/constants.php
<?php /** * Constants for the subscriptions Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Subscriptions; const FEATURE_NAME = 'subscriptions'; const BLOCK_NAME = 'jetpack/' . FEATURE_NAME; const NEWSLETTER_COLUMN_ID ...
projects/plugins/jetpack/extensions/blocks/ai-paragraph/ai-paragraph.php
<?php /** * Jetpack AI Paragraph Block. * * @since 11.8 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\AIParagraph; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers our block for use in Gutenberg * This is done via an action so that we can disable * registrat...
projects/plugins/jetpack/extensions/blocks/wordads/wordads.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Ads Block. * * @since 7.1.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Current_Plan as Jetpack_Plan; use Jetpack; use Jetpack_Gutenberg; /** * Jetpack...
projects/plugins/jetpack/extensions/blocks/ai-chat/ai-chat.php
<?php /** * Jetpack AI Chat. * * @since 12.1 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\AIChat; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Search\Module_Control as Search_Module_Control; use Automattic\Je...
projects/plugins/jetpack/extensions/blocks/map/map.php
<?php /** * Map block. * * @since 6.8.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Map; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Status\Host; use Automattic\Jetpack\Tracking; use Jetpack; use Jetpack_Gutenberg; use Jetpack_Mapbox_Helper; if ( ! class_exists( 'Jetpac...
projects/plugins/jetpack/extensions/blocks/premium-content/premium-content.php
<?php /** * Premium Content Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Premium_Content; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; use WP_Post; use const Automattic\Jetpack\Extensions\Subscriptions\META_NAME_CONTAINS_PAID_CONTENT; require_once __DIR__ . '/_inc/ac...
projects/plugins/jetpack/extensions/blocks/premium-content/buttons/buttons.php
<?php /** * Premium Content Buttons Child Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Premium_Content; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; const BUTTONS_NAME = 'premium-content/buttons'; /** * Registers the block for use in Gutenberg * This is done via a...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/legacy-buttons.php
<?php /** * Create legacy buttons markup. * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content; /** * Creates a subscribe/login buttons markup for legacy blocks. * * @param array $attributes Block attributes. * @param string $content String ...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/access-check.php
<?php /** * Determine access to premium content. * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content; use Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service\Abstract_Token_Subscription_Service; require_once __DIR__ . '/subscription...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/include.php
<?php /** * Subcription service includes to build out the service. * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content; require_once __DIR__ . '/class-jwt.php'; require_once __DIR__ . '/interface-subscription-service.php'; require_once __DIR__ . '/...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/class-wpcom-offline-subscription-service.php
<?php /** * This subscription service is used when a subscriber is offline and a token is not available. * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service; use const Automattic\Jetpack\Extensions\Subscriptions\META_NAME_FOR_P...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/interface-subscription-service.php
<?php /** * The Subscription Service represents the entity responsible for making sure a visitor * can see blocks that are considered premium content. * * If a visitor is not allowed to see they need to be given a way gain access. * * It is assumed that it will be a monetary exchange but that is up to the host *...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/class-jwt.php
<?php /** * JSON Web Token implementation, based on this spec: * https://tools.ietf.org/html/rfc7519 * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content; use DateTime; use DomainException; use InvalidArgumentException; use UnexpectedValueException...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/class-abstract-token-subscription-service.php
<?php /** * A paywall that exchanges JWT tokens from WordPress.com to allow * a current visitor to view content that has been deemed "Premium content". * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service; use Automattic\Jetpac...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/class-jetpack-token-subscription-service.php
<?php /** * A paywall that exchanges JWT tokens from WordPress.com to allow * a current visitor to view content that has been deemed "Premium content". * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service; use Automattic\Jetpac...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/class-unconfigured-subscription-service.php
<?php /** * The environment does not have a subscription service available. * This represents this scenario. * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service; use function site_url; // phpcs:disable /** * Class Unconfigur...
projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/class-wpcom-online-subscription-service.php
<?php /** * This subscription service is used when a subscriber is online * * @package Automattic\Jetpack\Extensions\Premium_Content */ namespace Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service; /** * Class WPCOM_Offline_Subscription_Service * * @package Automattic\Jetpack\Extensions\Premium...
projects/plugins/jetpack/extensions/blocks/premium-content/subscriber-view/subscriber-view.php
<?php /** * Premium Content Subscriber View Child Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Premium_Content; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; const SUBSCRIBER_VIEW_NAME = 'premium-content/subscriber-view'; require_once dirname( __DIR__ ) . '/_inc/acce...
projects/plugins/jetpack/extensions/blocks/premium-content/logged-out-view/logged-out-view.php
<?php /** * Premium Content Logged Out View Child Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Premium_Content; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; const LOGGEDOUT_VIEW_NAME = 'premium-content/logged-out-view'; require_once dirname( __DIR__ ) . '/_inc/acces...
projects/plugins/jetpack/extensions/blocks/premium-content/login-button/login-button.php
<?php /** * Premium Content Login Button Child Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Premium_Content; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service\Abstract_Token_Subscription_Service; use Automattic\Jetpack\Status...
projects/plugins/jetpack/extensions/blocks/button/button.php
<?php /** * Button Block. * * @since 8.5.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Button; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; const FEATURE_NAME = 'button'; const BLOCK_NAME = 'jetpack/' . FEATURE_NAME; /** * Registers the block for use in Gutenberg * ...
projects/plugins/jetpack/extensions/blocks/eventbrite/eventbrite.php
<?php /** * Eventbrite Block. * * @since 8.2.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Eventbrite; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we ...
projects/plugins/jetpack/extensions/blocks/sharing-buttons/sharing-buttons.php
<?php /** * Sharing Buttons Block. * * @since 11.x * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Sharing_Buttons; use Automattic\Jetpack\Blocks; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need to. */ fu...
projects/plugins/jetpack/extensions/blocks/recurring-payments/recurring-payments.php
<?php // phpcs:disable Squiz.Commenting.FileComment.Missing /** * Memberships block. * * @since 7.3.0 * * @package automattic/jetpack */ if ( ( defined( 'IS_WPCOM' ) && IS_WPCOM ) || Jetpack::is_connection_ready() ) { require_once JETPACK__PLUGIN_DIR . '/modules/memberships/class-jetpack-memberships.php'; Jetp...
projects/plugins/jetpack/extensions/blocks/send-a-message/send-a-message.php
<?php /** * Send a Message Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Send_A_Message; require_once __DIR__ . '/whatsapp-button/whatsapp-button.php'; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an...
projects/plugins/jetpack/extensions/blocks/send-a-message/whatsapp-button/whatsapp-button.php
<?php /** * WhatsApp Button Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\WhatsApp_Button; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; const PARENT_NAME = 'send-a-message'; const FEATURE_NAME = 'whatsapp-button'; const BLOCK_NAME = 'jetpack/' . FEATURE_NAME; /** ...
projects/plugins/jetpack/extensions/blocks/subscriber-login/subscriber-login.php
<?php /** * Subscriber Login Block. * * @since 13.1 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Subscriber_Login; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service\Abstract_Token_Subscription_Service; use Automattic\Jetpack\Statu...
projects/plugins/jetpack/extensions/blocks/blog-stats/blog-stats.php
<?php /** * Blog Stats Block. * * @since $$next_version$$ * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Blog_Stats; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Stats\WPCOM_Stats; use Automattic\Jetpack\Status...
projects/plugins/jetpack/extensions/blocks/payment-buttons/payment-buttons.php
<?php /** * Payment Buttons Block. * * @since 11.3 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\PaymentButtons; use Automattic\Jetpack\Blocks; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need to. */ fu...
projects/plugins/jetpack/extensions/blocks/cookie-consent/cookie-consent.php
<?php /** * Cookie-consent Block. * * @since 12.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\CookieConsent; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; const COOKIE_NAME = 'eucookielaw'; /** * Should the block be registered? * In wp-admin, we only want to show the b...
projects/plugins/jetpack/extensions/blocks/ai-assistant/ai-assistant.php
<?php /** * Jetpack AI Assistant Block. * * @since 12.2 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\AIAssistant; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; use Jetpack_Gutenberg; /** * Registers our block for use in Gutenber...
projects/plugins/jetpack/extensions/blocks/contact-info/contact-info.php
<?php /** * Contact Info block and its child blocks. * * @since 7.1.0 * * @package automattic/jetpack */ use Automattic\Jetpack\Blocks; Blocks::jetpack_register_block( __DIR__, array( 'render_callback' => array( 'Jetpack_Contact_Info_Block', 'render' ), ) ); Blocks::jetpack_register_block( 'jetpack/addre...
projects/plugins/jetpack/extensions/blocks/contact-info/class-jetpack-contact-info-block.php
<?php /** * Class Jetpack_Contact_Info_Block * * @package automattic/jetpack */ /** * Helper class that lets us add schema attributes dynamically because they are not something that is store with the content. * Due to the limitations of wp_kses. * * @since 7.1.0 */ class Jetpack_Contact_Info_Block { /** *...
projects/plugins/jetpack/extensions/blocks/calendly/calendly.php
<?php /** * Calendly Block. * * @since 8.2.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Calendly; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need...
projects/plugins/jetpack/extensions/blocks/blogroll/blogroll.php
<?php /** * Blogroll Block. * * @since 12.1 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Blogroll; require_once __DIR__ . '/blogroll-item/blogroll-item.php'; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via ...
projects/plugins/jetpack/extensions/blocks/blogroll/blogroll-item/blogroll-item.php
<?php /** * Blogroll Item Block. * * @since 12.6 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Blogroll_Item; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; const FEATURE_NAME = 'blogroll-item'; const BLOCK_NAME = 'jetpack/' . FEATURE_NAME; /** * Registers the block for ...
projects/plugins/jetpack/extensions/blocks/slideshow/slideshow.php
<?php /** * Slideshow Block. * * @since 7.1.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Slideshow; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we ne...
projects/plugins/jetpack/extensions/blocks/voice-to-content/voice-to-content.php
<?php /** * "Voice to content" Block. * * @since 12.5 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Voice_To_Content; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers our block for use in Gutenberg * This is done via an action so that we can disable * regist...
projects/plugins/jetpack/extensions/blocks/paywall/paywall.php
<?php /** * Paywall Block. * * @since 12.5 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Paywall; use Automattic\Jetpack\Blocks; const FEATURE_NAME = 'paywall'; const BLOCK_NAME = 'jetpack/' . FEATURE_NAME; const BLOCK_HTML = '<!-- wp:' . BLOCK_NAME . ' /-->'; co...
projects/plugins/jetpack/extensions/blocks/story/story.php
<?php /** * Story Block. * * @since 8.6.1 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Story; use Automattic\Jetpack\Blocks; use Jetpack; use Jetpack_Gutenberg; use Jetpack_PostImages; const EMBED_SIZE = array( 360, 640 ); // twice as many pixels for retina displays. const ...
projects/plugins/jetpack/extensions/blocks/instagram-gallery/instagram-gallery.php
<?php /** * Instagram Gallery Block. * * @since 8.5.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Instagram_Gallery; use Automattic\Jetpack\Blocks; use Jetpack; use Jetpack_Gutenberg; use Jetpack_Instagram_Gallery_Helper; /** * Registers the block for use in Gutenberg * This is...
projects/plugins/jetpack/extensions/blocks/ai-image/ai-image.php
<?php /** * Jetpack AI Image Block. * * @since 11.8 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\AIImage; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers our block for use in Gutenberg * This is done via an action so that we can disable * registration if w...
projects/plugins/jetpack/extensions/blocks/podcast-player/podcast-player.php
<?php /** * Podcast Player Block. * * @since 8.4.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Podcast_Player; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; use Jetpack_Podcast_Helper; if ( ! class_exists( 'Jetpack_Podcast_Helper' ) ) { require_once JETPACK__PLUGIN_DIR ....
projects/plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-header-title.php
<?php /** * Podcast Header Title template. * * @package automattic/jetpack */ //phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- This file expects $template_props set outside the file. namespace Automattic\Jetpack\Extensions\Podcast_Player; /** * Template variables. * * @var s...
projects/plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-header.php
<?php /** * Podcast Header template. * * @package automattic/jetpack */ // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- This file expects $template_props set outside the file. namespace Automattic\Jetpack\Extensions\Podcast_Player; /** * Template variables. * * @var array ...
projects/plugins/jetpack/extensions/blocks/podcast-player/templates/playlist-track.php
<?php /** * Podcast Title template. * * @package automattic/jetpack */ // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- This file expects $template_props set outside the file. namespace Automattic\Jetpack\Extensions\Podcast_Player; /** * Template variables. * * @var array $...
projects/plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-title.php
<?php /** * Podcast Title template. * * @package automattic/jetpack */ // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- This file expects $template_props set outside the file. namespace Automattic\Jetpack\Extensions\Podcast_Player; /** * Template variables. * * @var string ...
projects/plugins/jetpack/extensions/blocks/gif/gif.php
<?php /** * GIF Block. * * @since 7.0.0 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Gif; use Automattic\Jetpack\Blocks; use Jetpack_Gutenberg; /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable * registration if we need to. */ f...
projects/plugins/jetpack/extensions/extended-blocks/core-cover/core-cover.php
<?php /** * Plan checks for uploading video files to core/cover. * * @package automattic/jetpack **/ // Populate the available extensions with core/cover. add_filter( 'jetpack_set_available_extensions', function ( $extensions ) { return array_merge( $extensions, array( 'core/cover', ) ); } ); ...
projects/plugins/jetpack/extensions/extended-blocks/core-audio/core-audio.php
<?php /** * Plan checks for uploading audio files to core/audio. * * @package automattic/jetpack **/ // Populate the available extensions with core/audio. add_filter( 'jetpack_set_available_extensions', function ( $extensions ) { return array_merge( $extensions, array( 'core/audio', ) ); } ); ...
projects/plugins/jetpack/extensions/extended-blocks/videopress-video/videopress-video.php
<?php /** * Register VideoPress Video block. * * @package automattic/jetpack **/ namespace Automattic\Jetpack\Extensions\VideoPress_Video; use Automattic\Jetpack\VideoPress\Initializer as VideoPress_Pkg_Initializer; // Set the videopress/video block availability, depending on the site plan. add_action( 'jetpack...
projects/plugins/jetpack/extensions/extended-blocks/premium-content-container/premium-content-container.php
<?php /** * Plan checks for uploading video files to premium-content/container. * * @package automattic/jetpack **/ // Populate the available extensions with premium-content/container. add_filter( 'jetpack_set_available_extensions', function ( $extensions ) { return array_merge( $extensions, array( '...
projects/plugins/jetpack/extensions/extended-blocks/core-video/core-video.php
<?php /** * Plan checks for uploading video files to core/video. * * @package automattic/jetpack **/ // Populate the available extensions with core/video. add_filter( 'jetpack_set_available_extensions', function ( $extensions ) { return array_merge( $extensions, array( 'core/video', ) ); } ); ...
projects/plugins/jetpack/extensions/plugins/payments/payments.php
<?php /** * Payments plugin. * * @since 10.8 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Payments; use Jetpack_Gutenberg; const FEATURE_NAME = 'payments'; // Populate the available extensions with our feature. add_filter( 'jetpack_set_available_extensions', function ( $extensi...
projects/plugins/jetpack/extensions/plugins/sharing/sharing.php
<?php /** * Block Editor - Sharing feature. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Sharing; use Jetpack_Gutenberg; /** * Register Sharing plugin. * * @return void */ function register_plugins() { // Register Sharing. Jetpack_Gutenberg::set_extension_available( 'sharing' ...
projects/plugins/jetpack/extensions/plugins/likes/likes.php
<?php /** * Block Editor - Likes feature. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Likes; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; use Jetpack_Gutenberg; /** * Register Likes plugin. * ...
projects/plugins/jetpack/extensions/plugins/post-publish-qr-post-panel/post-publish-qr-post-panel.php
<?php /** * Block Editor - QR Post feature. * * @package automattic/jetpack */ // Feature name. const FEATURE_NAME = 'post-publish-qr-post-panel'; // Populate the available extensions with post-publish-qr-post-panel. add_filter( 'jetpack_set_available_extensions', function ( $extensions ) { return array_merge...
projects/plugins/jetpack/extensions/plugins/launchpad-save-modal/launchpad-save-modal.php
<?php /** * Launchpad Save Modal * * @since 11.7 * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\LaunchpadSaveModal; // Feature name. const FEATURE_NAME = 'launchpad-save-modal'; /** * Inject Launchpad options when in the block editor. */ function add_launchpad_options() { // Retu...
projects/plugins/jetpack/extensions/plugins/ai-content-lens/ai-content-lens.php
<?php /** * Block Editor - AI Assistant plugin feature. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Content_Lens; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; // Feature name. const FEATURE_NAME ...
projects/plugins/jetpack/extensions/plugins/site-editor-snackbars/site-editor-snackbars.php
<?php /** * Site Editor - Show a snackbar indicating what's being edited. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\SiteEditorSnackbars; const FEATURE_NAME = 'site-editor-snackbars'; add_filter( 'jetpack_set_available_extensions', function ( $extensions ) { return array_merge...
projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/ai-assistant-plugin.php
<?php /** * Block Editor - AI Assistant plugin feature. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\AiAssistantPlugin; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; // Feature name. const FEATURE_...
projects/plugins/jetpack/extensions/plugins/publicize/publicize.php
<?php /** * Block Editor - Publicize and Republicize features. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Publicize; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; use Jetpack_Gutenberg; /** * Re...
projects/plugins/jetpack/extensions/plugins/seo/seo.php
<?php /** * Block Editor - SEO feature. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Seo; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; use Jetpack_Gutenberg; /** * Register SEO plugin. * * @ret...
projects/plugins/jetpack/extensions/plugins/social-previews/social-previews.php
<?php /** * Social Previews plugin. * * @since 8.x * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Social_Previews; const FEATURE_NAME = 'social-previews'; // Populate the available extensions with Social Previews. add_filter( 'jetpack_set_available_extensions', function ( $extensi...
projects/plugins/jetpack/_inc/genericons.php
<?php /** * Globally registers the 'genericons' style and font. * * This ensures any theme or plugin using it is on the latest version of Genericons, and helps to avoid conflicts. * * @package automattic/jetpack */ add_action( 'init', 'jetpack_register_genericons', 1 ); /** * Registers Genericons if not alread...
projects/plugins/jetpack/_inc/jetpack-server-sandbox.php
<?php /** * This feature is only useful for Automattic developers. * It configures Jetpack to talk to staging/sandbox servers * on WordPress.com instead of production servers. * * @package automattic/jetpack */ /** * Provides sandbox request parameters. * * @param string $sandbox Sandbox domain. * @param str...
projects/plugins/jetpack/_inc/class.jetpack-provision.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Class file for provisioning Jetpack. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Secrets; use Automattic\Jetpack\Connection\Tokens; use Automattic\Jetpack\Identity_Crisis; us...
projects/plugins/jetpack/_inc/blogging-prompts.php
<?php /** * Used by the blogging prompt feature. * * @package automattic/jetpack */ /** * Hooked functions. */ /** * Adds the blogging prompt key post meta to the list of allowed post meta to be updated by rest api. * * @param array $keys Array of post meta keys that are allowed public metadata. * * @retur...
projects/plugins/jetpack/_inc/social-logos.php
<?php /** * Social Logos * Icon Font of the social logos we use on WordPress.com and in Jetpack * * Reference: https://github.com/Automattic/social-logos * * @package automattic/jetpack */ define( 'JETPACK_SOCIAL_LOGOS_URL', plugin_dir_url( __FILE__ ) . 'social-logos/' ); define( 'JETPACK_SOCIAL_LOGOS_DIR', plu...
projects/plugins/jetpack/_inc/lib/class-jetpack-instagram-gallery-helper.php
<?php /** * Instagram Gallery block and API helper. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager; /** * Class Jetpack_Instagram_Gallery_Helper */ class Jetpack_Instagram_Gallery_Helper { const TRANSIENT_KEY_PREFIX = 'jetpack_instagram_ga...
projects/plugins/jetpack/_inc/lib/class.jetpack-iframe-embed.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tweak a preview when rendered in an iframe. * This is used when rendering iFrames in the Calypso app. * * This file is shared between WordPress.com and Jetpack. * The canonical source is Jetpack and no WordPress.com-specific code should exis...