filename
stringlengths
11
137
content
stringlengths
6
292k
projects/plugins/jetpack/_inc/lib/widgets.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Widgets and Sidebars Library * * Helper functions for manipulating widgets on a per-blog basis. * Only helpful on `wp_loaded` or later (currently requires widgets to be registered and the theme context to already be loaded). * * Used by the...
projects/plugins/jetpack/_inc/lib/markdown.php
<?php /** * Loader for the Markdown library. * * This file loads in a couple specific things from the markdown dir. * * @package automattic/jetpack */ if ( ! class_exists( 'MarkdownExtra_Parser' ) ) { require_once JETPACK__PLUGIN_DIR . '/_inc/lib/markdown/extra.php'; } require_once JETPACK__PLUGIN_DIR . '/_inc...
projects/plugins/jetpack/_inc/lib/class-jetpack-ai-helper.php
<?php /** * API helper for the AI blocks. * * @package automattic/jetpack * @since 11.8 */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager; use Automattic\Jetpack\Search\Plan as Search_Plan; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Visitor; /** * Class Jet...
projects/plugins/jetpack/_inc/lib/class-jetpack-top-posts-helper.php
<?php /** * Top Posts & Pages block helper. * * @package automattic/jetpack */ use Automattic\Jetpack\Stats\WPCOM_Stats; /** * Class Jetpack_Top_Posts_Helper */ class Jetpack_Top_Posts_Helper { /** * Returns user's top posts. * * @param int $period Period of days to draw stats from. * @param i...
projects/plugins/jetpack/_inc/lib/class-jetpack-mapbox-helper.php
<?php /** * Mapbox API helper. * * @package automattic/jetpack */ use Automattic\Jetpack\Status\Host; /** * Class Jetpack_Mapbox_Helper */ class Jetpack_Mapbox_Helper { /** * Site option key for the Mapbox service. * * @var string */ private static $site_option_key = 'mapbox_api_key'; /** * Transi...
projects/plugins/jetpack/_inc/lib/class.jetpack-password-checker.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * The password strength checker. * * @package automattic/jetpack */ /** * Checks passwords strength. */ class Jetpack_Password_Checker { /** * Minimum entropy bits a password should contain. 36 bits of entropy is considered * to be a re...
projects/plugins/jetpack/_inc/lib/functions.wp-notify.php
<?php /** phpcs:disable Squiz.Commenting.FileComment.MissingPackageTag,Generic.Commenting.DocComment.MissingShort * * Declare two functions to handle notification emails to authors and moderators. * * These functions are hooked into filters to short circuit the regular flow and send the emails. * Code was copied f...
projects/plugins/jetpack/_inc/lib/plans.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Plans Library * * Fetch plans data from WordPress.com. * * Not to be confused with the `Jetpack_Plan` (singular) * class, which stores and syncs data about the site's _current_ plan. * * @package automattic/jetpack */ class Jetpack_Plans ...
projects/plugins/jetpack/_inc/lib/class-jetpack-google-drive-helper.php
<?php /** * Google Drive helper. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager; use Automattic\Jetpack\Status\Visitor; /** * Class Jetpack_Google_Drive_Helper */ class Jetpack_Google_Drive_Helper { /** * Checks if the user has a valid c...
projects/plugins/jetpack/_inc/lib/tonesque.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tonesque * Grab an average color representation from an image. * * @author Automattic * @author Matias Ventura * @package automattic/jetpack */ /** * Color representation class. */ class Tonesque { /** * Image URL. * * @var strin...
projects/plugins/jetpack/_inc/lib/plugins.php
<?php /** * This file has been moved to the jetpack-plugins-installer package * * @deprecated 10.7 * * @package jetpack */ class_alias( Automattic\Jetpack\Plugins_Installer::class, 'Jetpack_Plugins' );
projects/plugins/jetpack/_inc/lib/debugger.php
<?php /** * Loading the various functions used for Jetpack Debugging. * * @package automattic/jetpack */ /* Jetpack Connection Testing Framework */ require_once __DIR__ . '/debugger/class-jetpack-cxn-test-base.php'; /* Jetpack Connection Tests */ require_once __DIR__ . '/debugger/class-jetpack-cxn-tests.php'; /* J...
projects/plugins/jetpack/_inc/lib/icalendar-reader.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Get and render iCal feeds. * Used by the Upcoming Events widget and the [upcomingevents] shortcode. * * @package automattic/jetpack */ // phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-nam...
projects/plugins/jetpack/_inc/lib/class-jetpack-recommendations.php
<?php /** * Utilities related to the Jetpack Recommendations * * @package automattic/jetpack */ use Automattic\Jetpack\Current_Plan as Jetpack_Plan; use Automattic\Jetpack\Plugins_Installer; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; /** * Contains utilities related to the Jetpack Recomme...
projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Register WP REST API endpoints for Jetpack. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Connection\Rest_Authentication; ...
projects/plugins/jetpack/_inc/lib/class.media-extractor.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Class with methods to extract metadata from a post/page about videos, images, links, mentions embedded * in or attached to the post/page. * * @package automattic/jetpack */ /** * Class with methods to extract metadata from a post/page abou...
projects/plugins/jetpack/_inc/lib/class.media.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName require_once JETPACK__PLUGIN_DIR . 'sal/class.json-api-date.php'; /** * Class to handle different actions related to media. */ class Jetpack_Media { /** * Original media meta data. Metadata key as stored by WP. * * @var string */ const WP...
projects/plugins/jetpack/_inc/lib/class.media-summary.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Provides media summary of a post. * * @package automattic/jetpack */ use Automattic\Jetpack\Image_CDN\Image_CDN_Core; /** * Class Jetpack_Media_Summary * * Priority: embed [video] > gallery > image > text */ class Jetpack_Media_Summary ...
projects/plugins/jetpack/_inc/lib/class.jetpack-search-performance-logger.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Measure the performance of Jetpack Search queries. */ class Jetpack_Search_Performance_Logger { /** * Jetpack_Search_Performance_Logger instance. * * @var null|Jetpack_Search_Performance_Logger */ private static $instance = null; /...
projects/plugins/jetpack/_inc/lib/components.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Status; /** * Components Library * * Load and display a pre-rendered component */ class Jetpack_Components { /** * Load and display a pre-rendered component * * @since 7.7.0 * * @param string $name Component name...
projects/plugins/jetpack/_inc/lib/class-jetpack-podcast-feed-locator.php
<?php /** * Extension of the SimplePie_Locator class, to detect podcast feeds * * @package automattic/jetpack */ /** * Class Jetpack_Podcast_Feed_Locator */ class Jetpack_Podcast_Feed_Locator extends SimplePie_Locator { /** * Overrides the locator is_feed function to check for * appropriate podcast elements...
projects/plugins/jetpack/_inc/lib/class.jetpack-automatic-install-skin.php
<?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase /** * This file has been moved to the jetpack-plugins-installer package * * @deprecated 10.7 * * @package jetpack */ class_alias( Automattic\Jetpack\Automatic_Install_Skin::class, 'Jetpack_Automatic_Install_Skin' );
projects/plugins/jetpack/_inc/lib/class-jetpack-currencies.php
<?php /** * Jetpack_Currencies: Utils for displaying and managing currencies. * * @package Jetpack * @since 9.1.0 */ /** * General currencies specific functionality */ class Jetpack_Currencies { /** * Currencies definition */ const CURRENCIES = array( 'USD' => array( 'format' => '%1$s%2$s', ...
projects/plugins/jetpack/_inc/lib/class-jetpack-podcast-helper.php
<?php /** * Helper to massage Podcast data to be used in the Podcast block. * * @package automattic/jetpack */ /** * Class Jetpack_Podcast_Helper */ class Jetpack_Podcast_Helper { /** * The RSS feed of the podcast. * * @var string */ protected $feed = null; /** * The number of seconds to cache the ...
projects/plugins/jetpack/_inc/lib/class-jetpack-wizard.php
<?php /** * Deprecated since 9.5.0 * * @deprecated * @package automattic/jetpack */ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped _deprecated_file( basename( __FILE__ ), 'jetpack-9.5.0' );
projects/plugins/jetpack/_inc/lib/class.jetpack-keyring-service-helper.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Utilities to interact with a Keyring instance. * Used for Publicize as well as the Site Verification tools. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Secrets; /** * A series of utilities to interact with a Keyri...
projects/plugins/jetpack/_inc/lib/class.color.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Color utility and conversion * * Represents a color value, and converts between RGB/HSV/XYZ/Lab/HSL * * Example: * $color = new Jetpack_Color(0xFFFFFF); * * @author Harold Asbridge <hasbridge@gmail.com> * @author Matt Wiebe <wiebe@automa...
projects/plugins/jetpack/_inc/lib/markdown/gfm.php
<?php /** * GitHub-Flavoured Markdown. Inspired by Evan's plugin, but modified. * * @author Evan Solomon * @author Matt Wiebe <wiebe@automattic.com> * @author Brandon Kraft <kraft@automattic.com> -- Strikedown support converted from GPL code at https://github.com/annaesvensson/yellow-markdown/blob/main/markdown.ph...
projects/plugins/jetpack/_inc/lib/markdown/extra.php
<?php # # Markdown Extra - A text-to-HTML conversion tool for web writers # # PHP Markdown & Extra # Copyright (c) 2004-2013 Michel Fortin # <http://michelf.ca/projects/php-markdown/> # # Original Markdown # Copyright (c) 2004-2006 John Gruber # <http://daringfireball.net/projects/markdown/> # # Tweaked to remove Wor...
projects/plugins/jetpack/_inc/lib/debugger/class-jetpack-cxn-test-base.php
<?php /** * Base class for Jetpack's debugging tests. * * @package automattic/jetpack */ use Automattic\Jetpack\Status; /** * Jetpack Connection Testing * * Framework for various "unit tests" against the Jetpack connection. * * Individual tests should be added to the class-jetpack-cxn-tests.php file. * * @...
projects/plugins/jetpack/_inc/lib/debugger/class-jetpack-debug-data.php
<?php /** * Jetpack Debug Data for the Site Health sections. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Tokens; use Automattic\Jetpack\Connection\Urls; use Automattic\Jetpack\Constants; use Automattic\Jetpack\Current_Plan as Jetpack_Plan; use Automattic\Jetpack\Identity_Crisis; use Automa...
projects/plugins/jetpack/_inc/lib/debugger/debug-functions.php
<?php /** * WP Site Health debugging functions. * * @package automattic/jetpack */ /** * Test runner for Core's Site Health module. * * @since 7.3.0 */ function jetpack_debugger_ajax_local_testing_suite() { check_ajax_referer( 'health-check-site-status' ); if ( ! current_user_can( 'jetpack_manage_modules' ) ...
projects/plugins/jetpack/_inc/lib/debugger/class-jetpack-debugger.php
<?php /** * Jetpack Debugger functionality allowing for self-service diagnostic information via the legacy jetpack debugger. * * @package automattic/jetpack */ use Automattic\Jetpack\Redirect; use Automattic\Jetpack\Status; /** * Class Jetpack_Debugger * * A namespacing class for functionality related to the l...
projects/plugins/jetpack/_inc/lib/debugger/class-jetpack-cxn-tests.php
<?php /** * Collection of tests to run on the Jetpack connection locally. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Connection\Tokens; use Automattic\Jetpack\Redirect; use Automattic\Jetpack\S...
projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tools to interact with Jetpack modules via API requests. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\REST_Connector; use Automattic\Jetpack\Current_Plan as Jetpack_Plan; use Automattic\Jetpack\Plugins_Installer; use ...
projects/plugins/jetpack/_inc/lib/core-api/load-wpcom-endpoints.php
<?php /** * Loader for WP REST API endpoints that are synced with WP.com. * * On WP.com see: * - wp-content/mu-plugins/rest-api.php * - wp-content/rest-api-plugins/jetpack-endpoints/ * * @package automattic/jetpack */ /** * Disable direct access. */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Loop thr...
projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-xmlrpc-consumer-endpoint.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * This is the base class for every Core API endpoint that needs an XMLRPC client. * * @package automattic/jetpack */ /** * Base class for every Core API endpoint that needs an XMLRPC client. */ abstract class Jetpack_Core_API_XMLRPC_Consumer...
projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-widgets-endpoints.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Interact with a specific widget via the REST API. * Currently only supports the Milestone widget. * * @package automattic/jetpack */ /** * Widget information getter endpoint. */ class Jetpack_Core_API_Widget_Endpoint { /** * Get infor...
projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-site-endpoints.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * List of /site core REST API endpoints used in Jetpack's dashboard. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Stats\WPCOM_Stats; /** * This is the endpoint class for `/site` endpoint...
projects/plugins/jetpack/_inc/lib/core-api/class-wpcom-rest-field-controller.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * `WP_REST_Controller` is basically a wrapper for `register_rest_route()` * `WPCOM_REST_API_V2_Field_Controller` is a mostly-analogous wrapper for `register_rest_field()` * * @todo - nicer API for array values? * * @package automattic/jetpack...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-fields/post-fields-publicize-connections.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Handle Publicize connection information for each post. * * @package automattic/jetpack */ /** * Add per-post Publicize Connection data. * * { # Post Object * ... * jetpack_publicize_connections: { # Defined below in this file. See s...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-goodreads.php
<?php /** * Get the User ID of a Goodreads account using its Author ID. * * @package automattic/jetpack */ /** * Goodreads block endpoint. */ class WPCOM_REST_API_V2_Endpoint_Goodreads extends WP_REST_Controller { /** * Constructor. */ public function __construct() { add_action( 'rest_api_init', array( $...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-search.php
<?php /** * Proxy endpoint for Jetpack Search * * @package automattic/jetpack */ use Automattic\Jetpack\Search\REST_Controller; /** * Jetpack Search: Makes authenticated requests to the site search API using blog tokens. * This endpoint will only be used when trying to search private Jetpack and WordPress.com s...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/business-hours.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Build localized strings for use with the Business Hours Block. * * @package automattic/jetpack */ /** * Business Hours: Localized week * * @since 7.1 */ class WPCOM_REST_API_V2_Endpoint_Business_Hours extends WP_REST_Controller { /** ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-following.php
<?php /** * REST API endpoint for the Jetpack Blogroll block. * * @package automattic/jetpack * @since 12.2 */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Status\Visitor; /** * Class WPCOM_REST_API_V2_Endpoint_Following */ class WPCOM_REST_API_V2_Endpoint_Following extends WP_REST_Controll...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-ai.php
<?php /** * REST API endpoint for the Jetpack AI blocks. * * @package automattic/jetpack * @since 11.8 */ use Automattic\Jetpack\Connection\Client; /** * Class WPCOM_REST_API_V2_Endpoint_AI */ class WPCOM_REST_API_V2_Endpoint_AI extends WP_REST_Controller { /** * Namespace prefix. * * @var string */ ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/memberships.php
<?php // phpcs:disable WordPress.Files.FileName.InvalidClassFileName /** * Memberships: API to communicate with "product" database. * * @package Jetpack * @since 7.3.0 */ use Automattic\Jetpack\Connection\Client; /** * Class WPCOM_REST_API_V2_Endpoint_Memberships * This introduces V2 endpoints. */ cla...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-app-media.php
<?php /** * REST API endpoint for the media uploaded by the Jetpack app. * * @package automattic/jetpack * @since 13.1 */ /** * Media uploaded by the Jetpack app helper API. * * @since 13.1 */ class WPCOM_REST_API_V2_Endpoint_App_Media extends WP_REST_Controller { /** * Constructor. */ public function ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-mailchimp.php
<?php /** * API endpoints to interact with WordPress.com * to get info from the Mailchimp API for use with the Mailchimp block. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Redirect; /** * Mailchimp: Get Mailchimp Status. * API to determine if current site...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-newsletter-categories-subscriptions-count.php
<?php /** * REST API endpoint for the Newsletter Categories * * @package automattic/jetpack * @since 12.6 */ use Automattic\Jetpack\Status\Host; require_once __DIR__ . '/trait-wpcom-rest-api-proxy-request-trait.php'; /** * Class WPCOM_REST_API_V2_Endpoint_Newsletter_Categories_Subscriptions_Count */ class WPC...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-podcast-player.php
<?php /** * Podcast Player API * * @package automattic/jetpack * @since 8.4.0 */ /** * Fetch podcast feeds and parse data for the Podcast Player block. * * @since 8.4.0 */ class WPCOM_REST_API_V2_Endpoint_Podcast_Player extends WP_REST_Controller { /** * Constructor. */ public function __construct() { ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/gutenberg-available-extensions.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Interact with the list of available block editor extensions (blocks, plugins) * made available by the Jetpack plugin. * * @package automattic/jetpack */ /** * Gutenberg: List Available Gutenberg Extensions (Blocks and Plugins) * * [ * ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-related-posts.php
<?php /** * REST API endpoint for Related Posts * * @package automattic/jetpack * @since 12.6 */ /** * Class WPCOM_REST_API_V2_Endpoint_Related_Posts */ class WPCOM_REST_API_V2_Endpoint_Related_Posts extends WP_REST_Controller { /** * Constructor. */ public function __construct() { $this->base_api_path ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-send-email-preview.php
<?php /** * Handles the sending of email previews via the WordPress.com REST API. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Manager; use Automattic\Jetpack\Status\Host; require_once __DIR__ . '/trait-wpcom-rest-api-proxy-request-trait.php'; /** * Class WPCOM_REST_API_V2_Endpoint_Send_...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-google-docs.php
<?php /** * Validate whether a google doc is available for embedding. * * @package automattic/jetpack */ use Automattic\Jetpack\Extensions\GoogleDocsEmbed; /** * Google Docs block endpoint. */ class WPCOM_REST_API_V2_Endpoint_Google_Docs extends WP_REST_Controller { /** * Constructor. */ public function _...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-publicize-share-post.php
<?php /** * Publicize: Share post * * This file is synced from the Jetpack monorepo to WPCOM. * * @package automattic/jetpack * @since */ use Automattic\Jetpack\Connection\Client; require_once __DIR__ . '/publicize-connections.php'; /** * Publicize: Share post class. */ class WPCOM_REST_API_V2_Endpoint_Publ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-transient.php
<?php /** * REST API endpoint for editing Jetpack Transients. * * @package automattic/jetpack * @since 9.7.0 */ /** * Jetpack transients API. * * @since 9.7.0 */ class WPCOM_REST_API_V2_Endpoint_Transient extends WP_REST_Controller { /** * Constructor. */ public function __construct() { $this->namespa...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-blog-stats.php
<?php /** * Get blog stats. * * @package automattic/jetpack */ use Automattic\Jetpack\Stats\WPCOM_Stats; /** * Blog Stats block endpoint. */ class WPCOM_REST_API_V2_Endpoint_Blog_Stats extends WP_REST_Controller { /** * Constructor. */ public function __construct() { add_action( 'rest_api_init', array( ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-instagram-gallery.php
<?php /** * REST API endpoint for the Instagram connections. * * @package automattic/jetpack * @since 8.5.0 */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager; /** * Instagram connections helper API. * * @since 8.5 */ class WPCOM_REST_API_V2_Endpoint_Instagram_Gallery exte...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/trait-wpcom-rest-api-proxy-request-trait.php
<?php /** * Trait WPCOM_REST_API_Proxy_Request_Trait * * Used to proxy requests to wpcom servers. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Status\Visitor; trait WPCOM_REST_API_Proxy_Request_Trait { /** * Proxy request to wpcom servers for the site a...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/publicize-connections.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Fetch information about Publicize connections on a site. * * @package automattic/jetpack */ /** * Publicize: List Connections * * [ * { # Connection Object. See schema for more detail. * id: (string) Connection unique_i...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/publicize-services.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Endpoint used to fetch information to connect to a Publicize service. * * @package automattic/jetpack */ /** * Publicize: List Publicize Services * * [ * { # Service Object. See schema for more detail. * name: (string) Service sl...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-newsletter-categories-list.php
<?php /** * REST API endpoint for the Newsletter Categories * * @package automattic/jetpack * @since 12.6 */ use Automattic\Jetpack\Status\Host; require_once __DIR__ . '/trait-wpcom-rest-api-proxy-request-trait.php'; /** * Class WPCOM_REST_API_V2_Endpoint_Following */ class WPCOM_REST_API_V2_Endpoint_Newslett...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/hello.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Example of a WP.com endpoint. * * @package automattic/jetpack */ /** * Example endpoint. */ class WPCOM_REST_API_V2_Endpoint_Hello { /** * Constructor. */ public function __construct() { add_action( 'rest_api_init', array( $this, '...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/sites-posts-featured-media-url.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * WPCOM Add Featured Media URL * Adds `jetpack_featured_media_url` to post responses * * @package automattic/jetpack */ /** * Add featured media url to API post responses. */ class WPCOM_REST_API_V2_Sites_Posts_Add_Featured_Media_URL { /**...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v3-endpoint-blogging-prompts.php
<?php /** * Blogging prompts endpoint for wpcom/v3. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager; /** * REST API endpoint wpcom/v3/sites/%s/blogging-prompts. */ class WPCOM_REST_API_V3_Endpoint_Blogging_Prompts extends WP_REST_Posts_Contr...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/publicize-connection-test-results.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Fetch information about Publicize connections on a site, including tests and connection status. * * @package automattic/jetpack */ require_once __DIR__ . '/publicize-connections.php'; /** * Publicize: List Connection Test Result Data * *...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/subscribers.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Get subscriber count from Jetpack's Subscriptions module. * * @package automattic/jetpack */ use Automattic\Jetpack\Constants; /** * Subscribers: Get subscriber count * * @since 6.9 */ class WPCOM_REST_API_V2_Endpoint_Subscribers extends...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/service-api-keys.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Get and save API keys for a site. * * @package automattic/jetpack */ /** * Service API Keys: Exposes 3rd party api keys that are used on a site. * * [ * { # Availability Object. See schema for more detail. * code: ...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-top-posts.php
<?php /** * Get post types and top posts. * * @package automattic/jetpack */ /** * Top Posts & Pages block endpoint. */ class WPCOM_REST_API_V2_Endpoint_Top_Posts extends WP_REST_Controller { /** * Constructor. */ public function __construct() { add_action( 'rest_api_init', array( $this, 'register_routes...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-resolve-redirect.php
<?php /** * REST API endpoint for resolving URL redirects. * * @package automattic/jetpack * @since 8.0.0 */ /** * Resolve URL redirects. * * @since 8.0.0 */ class WPCOM_REST_API_V2_Endpoint_Resolve_Redirect extends WP_REST_Controller { /** * Constructor. */ public function __construct() { $this->name...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-admin-menu.php
<?php /** * REST API endpoint for admin menus. * * @package automattic/jetpack * @since 9.1.0 */ /** * Class WPCOM_REST_API_V2_Endpoint_Admin_Menu */ class WPCOM_REST_API_V2_Endpoint_Admin_Menu extends WP_REST_Controller { /** * Namespace prefix. * * @var string */ public $namespace = 'wpcom/v2'; /...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-external-media.php
<?php /** * REST API endpoint for the External Media. * * @package automattic/jetpack * @since 8.7.0 */ use Automattic\Jetpack\Connection\Client; /** * External Media helper API. * * @since 8.7.0 */ class WPCOM_REST_API_V2_Endpoint_External_Media extends WP_REST_Controller { /** * Media argument schema f...
projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-template-loader.php
<?php /** * REST API endpoint for resolving template. * * @package automattic/jetpack */ /** * Returns the correct template for the site's page based on the template type */ class WPCOM_REST_API_V2_Endpoint_Template_Loader extends WP_REST_Controller { /** * Constructor. */ public function __construct() { ...
projects/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-settings-page.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Assets; use Automattic\Jetpack\Tracking; require_once __DIR__ . '/class.jetpack-admin-page.php'; require_once JETPACK__PLUGIN_DIR . 'class.jetpack-modules-list-table.php'; /** * Builds the settings page and its menu */ class...
projects/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-admin-page.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Main class file for Jetpack Admin pages. * * @package automattic/jetpack */ use Automattic\Jetpack\Current_Plan as Jetpack_Plan; use Automattic\Jetpack\Identity_Crisis; use Automattic\Jetpack\Redirect; use Automattic\Jetpack\Status; /** * ...
projects/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-landing-page.php
<?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase /** This is intentionally left empty as a stub because some sites were caching the require() * * @see https://github.com/Automattic/jetpack/issues/5091 * @package automattic/jetpack */
projects/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-react-page.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Assets\Logo; use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Status; require_once __DIR__ . '/class.jetpack-ad...
projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-about-page.php
<?php /** * Class for the Jetpack About Page within the wp-admin. * * @package automattic/jetpack */ /** * Disable direct access and execution. */ if ( ! defined( 'ABSPATH' ) ) { exit; } require_once __DIR__ . '/class.jetpack-admin-page.php'; /** * Builds the landing page and its menu. */ class Jetpack_Abou...
projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php
<?php /** * A utility class that generates the initial state for Redux in wp-admin. * Modularized from `class.jetpack-react-page.php`. * * @package automattic/jetpack */ use Automattic\Jetpack\Blaze; use Automattic\Jetpack\Boost_Speed_Score\Speed_Score_History; use Automattic\Jetpack\Connection\Manager as Connect...
projects/plugins/jetpack/modules/videopress.php
<?php /** * Module Name: VideoPress * Module Description: Save on hosting storage and bandwidth costs by streaming fast, ad-free video from our global network. * First Introduced: 2.5 * Requires Connection: Yes * Sort Order: 27 * Module Tags: Photos and Videos * Feature: Writing * Additional Search Queries: vid...
projects/plugins/jetpack/modules/wordads.php
<?php /** * Module Name: Ads * Module Description: Earn income by allowing Jetpack to display high quality ads. * Sort Order: 1 * First Introduced: 4.5.0 * Requires Connection: Yes * Auto Activate: No * Module Tags: Traffic, Appearance * Additional Search Queries: advertising, ad codes, ads, creator * Plans: p...
projects/plugins/jetpack/modules/shortcodes.php
<?php /** * Module Name: Shortcode Embeds * Module Description: Shortcodes are WordPress-specific markup that let you add media from popular sites. This feature is no longer necessary as the editor now handles media embeds rather gracefully. * Sort Order: 3 * First Introduced: 1.1 * Major Changes In: 1.2 * Requir...
projects/plugins/jetpack/modules/widgets.php
<?php /** * Module Name: Extra Sidebar Widgets * Module Description: Provides additional widgets for use on your site. * Sort Order: 4 * First Introduced: 1.2 * Requires Connection: No * Auto Activate: No * Module Tags: Social, Appearance * Feature: Appearance * Additional Search Queries: widget, widgets, face...
projects/plugins/jetpack/modules/subscriptions.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName) /** * Module Name: Newsletter * Module Description: Let visitors subscribe to new posts and comments via email * Sort Order: 9 * Recommendation Order: 8 * First Introduced: 1.2 * Requires Connection: Yes * Requires User Connection: Yes * Auto ...
projects/plugins/jetpack/modules/waf.php
<?php /** * Module Name: Firewall * Module Description: Protect your site with Jetpack's Web Application Firewall * Sort Order: 5 * First Introduced: 10.9 * Requires Connection: Yes * Auto Activate: No * Module Tags: Firewall, WAF * Feature: Security * * @package automattic/jetpack */
projects/plugins/jetpack/modules/markdown.php
<?php /** * Module Name: Markdown * Module Description: Write posts or pages in plain-text Markdown syntax * Sort Order: 31 * First Introduced: 2.8 * Requires Connection: No * Auto Activate: No * Module Tags: Writing * Feature: Writing * Additional Search Queries: md, markdown * * @package automattic/jetpack...
projects/plugins/jetpack/modules/post-by-email.php
<?php /** * Module Name: Post by email * Module Description: Publish posts by sending an email * First Introduced: 2.0 * Sort Order: 14 * Requires Connection: Yes * Requires User Connection: Yes * Auto Activate: No * Module Tags: Writing * Feature: Writing * Additional Search Queries: post by email, email * ...
projects/plugins/jetpack/modules/photon-cdn.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Module Name: Asset CDN * Module Description: Jetpack’s Site Accelerator loads your site faster by optimizing your images and serving your images and static files from our global network of servers. * Sort Order: 26 * Recommendation Order: 1 ...
projects/plugins/jetpack/modules/photon.php
<?php /** * Module Name: Image CDN * Module Description: Mirrors and serves your images from our free and fast image CDN, improving your site’s performance with no additional load on your servers. * Sort Order: 25 * Recommendation Order: 1 * First Introduced: 2.0 * Requires Connection: Yes * Auto Activate: No ...
projects/plugins/jetpack/modules/comment-likes.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Module Name: Comment Likes * Module Description: Increase visitor engagement by adding a Like button to comments. * Sort Order: 39 * Recommendation Order: 17 * First Introduced: 5.1 * Requires Connection: Yes * Auto Activate: No * Module T...
projects/plugins/jetpack/modules/related-posts.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Module Name: Related posts * Module Description: Keep visitors engaged on your blog by highlighting relevant and new content at the bottom of each published post. * First Introduced: 2.9 * Sort Order: 29 * Recommendation Order: 9 * Requires ...
projects/plugins/jetpack/modules/sharedaddy.php
<?php /** * Module Name: Sharing * Module Description: Add sharing buttons at the bottom of each post, making it easy for visitors to share your content. * Sort Order: 7 * Recommendation Order: 6 * First Introduced: 1.1 * Major Changes In: 1.2 * Requires Connection: No * Auto Activate: No * Module Tags: Social...
projects/plugins/jetpack/modules/google-analytics.php
<?php /** * Module Name: Google Analytics * Module Description: Set up Google Analytics without touching a line of code. * First Introduced: 4.5 * Sort Order: 37 * Requires Connection: Yes * Auto Activate: No * Feature: Engagement * Additional Search Queries: webmaster, google, analytics, console * Plans: busi...
projects/plugins/jetpack/modules/comments.php
<?php /** * Module Name: Comments * Module Description: Let visitors use a WordPress.com or Facebook account to comment * First Introduced: 1.4 * Sort Order: 20 * Requires Connection: Yes * Auto Activate: No * Module Tags: Social * Feature: Engagement * Additional Search Queries: comments, comment, facebook, s...
projects/plugins/jetpack/modules/geo-location.php
<?php /** * Module: geo-location * * @package automattic/jetpack */ /** * Adds support for geo-location features. */ require_once __DIR__ . '/geo-location/class.jetpack-geo-location.php'; /** * Geo-location shortcode callback for display of location data associated with a post. * * Usage with current global...
projects/plugins/jetpack/modules/copy-post.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Module Name: Copy Post * Module Description: Enable the option to copy entire posts and pages, including tags and settings * Sort Order: 15 * First Introduced: 7.0 * Requires Connection: No * Auto Activate: No * Module Tags: Writing * Fea...
projects/plugins/jetpack/modules/infinite-scroll.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Module Name: Infinite Scroll * Module Description: Automatically load new content when a visitor scrolls * Sort Order: 26 * First Introduced: 2.0 * Requires Connection: No * Auto Activate: No * Module Tags: Appearance * Feature: Appearanc...
projects/plugins/jetpack/modules/json-api.php
<?php /** * Module Name: JSON API * Module Description: Allow applications to securely access your content. * Sort Order: 19 * First Introduced: 1.9 * Requires Connection: Yes * Auto Activate: Public * Module Tags: Writing, Developers * Feature: General * Additional Search Queries: api, rest, develop, develope...
projects/plugins/jetpack/modules/plugin-search.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Adds the PSH functionality to Jetpack. * * @package automattic/jetpack */ // phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-named class files. use Automattic\Jetpack\Constants; use Automat...