filename
stringlengths
11
137
content
stringlengths
6
292k
projects/plugins/jetpack/modules/masterbar/nudges/additional-css/class-atomic-additional-css-manager.php
<?php /** * WPORG_Additional_CSS_Manager file * * Responsible with replacing the Core Additional CSS section with an upgrade nudge on Atomic. * * @package Jetpack */ namespace Automattic\Jetpack\Dashboard_Customizations; /** * Class Atomic_Additional_CSS_Manager * * @package Automattic\Jetpack\Dashboard_Cust...
projects/plugins/jetpack/modules/masterbar/nudges/additional-css/class-wpcom-additional-css-manager.php
<?php /** * WPCOM_Additional_CSS_Manager file * * Is responsible with registering the Additional CSS section in WPCOM. * * @package Jetpack */ namespace Automattic\Jetpack\Dashboard_Customizations; /** * Class WPCOM_Disable_Additional_CSS * * @package Automattic\Jetpack\Dashboard_Customizations */ class WPC...
projects/plugins/jetpack/modules/masterbar/profile-edit/class-wpcom-user-profile-fields-revert.php
<?php /** * Manage User profile fields. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Dashboard_Customizations; use Automattic\Jetpack\Connection\Manager as Connection_Manager; /** * Responsible with preventing the back-end default implementation to save the fields that are managed on WP.com p...
projects/plugins/jetpack/modules/masterbar/profile-edit/profile-edit.php
<?php /** * WP-Admin Profile edit. * * @package Jetpack */ use Automattic\Jetpack\Connection\Manager as Connection_Manager; /** * Hides profile fields for WordPress.com connected users. * * @param WP_User $user The current WP_User object. */ function jetpack_masterbar_hide_profile_fields( $user ) { $connecti...
projects/plugins/jetpack/modules/masterbar/profile-edit/bootstrap.php
<?php /** * Bootstrap the WP.com User profile edit restriction. * * @package automattic\jetpack */ namespace Automattic\Jetpack\Dashboard_Customizations; use Automattic\Jetpack\Connection\Manager as Connection_Manager; require_once __DIR__ . '/profile-edit.php'; require_once __DIR__ . '/class-wpcom-user-profile-...
projects/plugins/jetpack/modules/sharedaddy/recaptcha.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Google reCAPTCHA utilities, for use in the sharing feature. * * @package automattic/jetpack */ /** * Class that handles reCAPTCHA. * * @deprecated 11.0 */ class Jetpack_ReCaptcha { /** * URL to which requests are POSTed. * * @con...
projects/plugins/jetpack/modules/sharedaddy/sharedaddy.php
<?php /** * Jetpack's Sharing feature, nee Sharedaddy. * The most super duper sharing tool on the interwebs. * * @package automattic/jetpack */ // Set up Sharing in wp-admin. require_once plugin_dir_path( __FILE__ ) . 'sharing.php'; /** * Send an email via the Email sharing button. * * @param array $data Arra...
projects/plugins/jetpack/modules/sharedaddy/sharing-service.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Utilities to register and interact with a sharing service. * * Sharing_Service gets info about a service. * Sharing_Service_Total and Sharing_Post_Total get stats data. * * @package automattic/jetpack * * phpcs:disable Generic.Files.OneOb...
projects/plugins/jetpack/modules/sharedaddy/sharing.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Set up Sharing functionality and management in wp-admin. * * @package automattic/jetpack */ // phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-named class files. use Automattic\Jetpack\Asse...
projects/plugins/jetpack/modules/sharedaddy/sharing-sources.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Define all sharing sources. * * phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound */ use Automattic\Jetpack\Device_Detection\User_Agent_Info; /** * Base class for sharing sources. * See individual sharing classes below f...
projects/plugins/jetpack/modules/sharedaddy/services/class-jetpack-mastodon-modal.php
<?php /** * Display a Mastodon modal, where folks can enter a Mastodon instance. * * @package automattic/jetpack */ /** * Class Mastodon_Modal */ class Jetpack_Mastodon_Modal { /** * Mastodon SVG icon. * * @var string */ private static $svg = '<svg width="261" height="66" viewBox="0 0 261 66" fill="non...
projects/plugins/jetpack/modules/custom-post-types/portfolios.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Register a portfolio post type and handle displaying it anywhere on the site. * * @package automattic/jetpack */ /** * Jetpack Portfolio. */ class Jetpack_Portfolio { const CUSTOM_POST_TYPE = 'jetpack-portfolio'; const CUSTOM_TAXON...
projects/plugins/jetpack/modules/custom-post-types/comics.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Create and manage comics with this Custom Post Type. * * @package automattic/jetpack */ // phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-named class files. use Automattic\Jetpack\Assets; ...
projects/plugins/jetpack/modules/custom-post-types/testimonial.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Register a Testimonial post type and handle displaying it anywhere on the site. * * @package automattic/jetpack * @phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound * @phpcs:disable MediaWiki.Usage.NestedFunctions.NestedFun...
projects/plugins/jetpack/modules/custom-post-types/nova.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Manage restaurant menus from your WordPress site, * via a new "nova" CPT. * * Put the following code in your theme's Food Menu Page Template to customize the markup of the menu. * * if ( class_exists( 'Nova_Restaurant' ) ) { * Nova_Restau...
projects/plugins/jetpack/modules/wpcom-tos/wpcom-tos.php
<?php /** * Handles acceptance of WordPress.com Terms of Service for sites connected to WP.com. * * This is auto-loaded as of Jetpack v8.3 for WP.com connected-sites only. * * @package automattic/jetpack */ namespace Automattic\Jetpack\TOS; use Automattic\Jetpack\Connection\Client; /** * Makes a request to th...
projects/plugins/jetpack/modules/calypsoify/class-jetpack-calypsoify.php
<?php /** * This is Calypso skin of the wp-admin interface that is conditionally triggered via the ?calypsoify=1 param. * * @package automattic/jetpack */ use Automattic\Jetpack\Status; /** * Class Jetpack_Calypsoify */ class Jetpack_Calypsoify { /** * Singleton instance of `Jetpack_Calypsoify`. * * @va...
projects/plugins/jetpack/modules/likes/jetpack-likes-master-iframe.php
<?php /** * Jetpack likes iframe. * * @package jetpack */ /** * This function needs to get loaded after the like scripts get added to the page. */ function jetpack_likes_master_iframe() { $version = gmdate( 'Ymd' ); $_locale = get_locale(); if ( ! defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || ! file_exist...
projects/plugins/jetpack/modules/likes/jetpack-likes-settings.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Sync\Settings; /** * Jetpack likes settings class. */ class Jetpack_Likes_Settings { /** * False if running on WPCOM Simple * * @var bool */ public $in_jetpack; /** * Constructor function. */ public function...
projects/plugins/jetpack/modules/site-icon/site-icon-functions.php
<?php /** * Provides the jetpack_site_icon_url function is not available. * * @package automattic/jetpack */ if ( ! function_exists( 'jetpack_site_icon_url' ) ) : /** * Returns the Jetpack Site Icon URL. * * @param null|int $blog_id Blog ID. * @param string $size Site icon size in pixels. * @param boo...
projects/plugins/jetpack/modules/markdown/easy-markdown.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Plugin URI: https://automattic.com/ * Plugin Name: Easy Markdown * Description: Write in Markdown, publish in WordPress * Version: 0.1 * Author: Matt Wiebe * Author URI: https://automattic.com/ * Text Domain: jetpack * * @package automatt...
projects/plugins/jetpack/modules/contact-form/grunion-editor-view.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Assets; /* * A prototype to allow inline editing / editor views for contact forms.\ * * Originally developed in: https://github.com/automattic/gm2016-grunion-editor * Authors: Michael Arestad, Andrew Ozz, and George Stephan...
projects/plugins/jetpack/modules/contact-form/grunion-contact-form.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Grunion Contact Form * Add a contact form to any post, page or text widget. * Emails will be sent to the post's author by default, or any email address you choose. * * @deprecated $$next-version$$ Use automattic/jetpack-forms * @package aut...
projects/plugins/jetpack/modules/contact-form/grunion-form-view.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Template for form builder */ use Automattic\Jetpack\Assets; // phpcs:ignore PSR12.Files.FileHeader.IncorrectOrder /** * Filter to modify the limit of 5 additional contact form fields. * * @module contact-form * * @since 3.2.0 * * @para...
projects/plugins/jetpack/modules/contact-form/grunion-response-email-template.php
<?php /** * Grunion Contact Form Template * The template contains several placeholders: * %1$s is the hero text to display above the response * %2$s is the response itself. * %3$s is a link to the response page in wp-admin * %4$s is a link to the embedded form to allow the site owner to edit it to change their em...
projects/plugins/jetpack/modules/contact-form/admin.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName -- legacy file /** * Contact form elements in the admin area. Used with Classic Editor. * * @deprecated $$next-version$$ Use automattic/jetpack-forms * @package automattic/jetpack */ // phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed ...
projects/plugins/jetpack/modules/contact-form/class-grunion-contact-form-endpoint.php
<?php /** * Plugin Name: Feedback CPT Permissions over-ride * * @deprecated $$next-version$$ Use automattic/jetpack-forms * @package automattic/jetpack */ if ( class_exists( 'WP_REST_Posts_Controller' ) ) { /** * Class Grunion_Contact_Form_Endpoint * Used as 'rest_controller_class' parameter when 'feedback'...
projects/plugins/jetpack/modules/woocommerce-analytics/class-jetpack-woocommerce-analytics.php
<?php /** * Jetpack_WooCommerce_Analytics is ported from the Jetpack_Google_Analytics code. * * @package automattic/jetpack */ if ( ! defined( 'ABSPATH' ) ) { exit; } require __DIR__ . '/classes/class-jetpack-woocommerce-analytics-trait.php'; require_once __DIR__ . '/classes/class-jetpack-woocommerce-analytics-u...
projects/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-my-account.php
<?php /** * Jetpack_WooCommerce_Analytics_My_Account * * @deprecated $$next-version$$ * * @package automattic/jetpack * @author Automattic */ /** * Bail if accessed directly */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class Jetpack_WooCommerce_Analytics_My_Account * Filters and Actions added to My A...
projects/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-universal.php
<?php /** * Jetpack_WooCommerce_Analytics_Universal * * @deprecated $$next-version$$ * * @package automattic/jetpack * @author Automattic */ /** * Bail if accessed directly */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class Jetpack_WooCommerce_Analytics_Universal * Filters and Actions added to Store p...
projects/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-trait.php
<?php /** * Jetpack_WooCommerce_Analytics_Trait * * @deprecated $$next-version$$ * * @package automattic/jetpack * @author Automattic */ /** * Bail if accessed directly */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Jetpack_WooCommerce_Analytics_Trait * Common functionality for WooCommerce Analytics cl...
projects/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-checkout-flow.php
<?php /** * Jetpack_WooCommerce_Analytics_Checkout_Flow * * @deprecated $$next-version$$ * * @package automattic/jetpack * @author Automattic */ /** * Bail if accessed directly */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class Jetpack_WooCommerce_Analytics_Checkout_Flow * Class that handles all page ...
projects/plugins/jetpack/modules/scan/class-admin-bar-notice.php
<?php /** * A class that adds the scan notice to the admin bar. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Scan; use Automattic\Jetpack\Assets; use Automattic\Jetpack\Redirect; /** * Class Main * * Responsible for loading the admin bar notice if threats are found. * * @package Automatti...
projects/plugins/jetpack/modules/scan/class-admin-sidebar-link.php
<?php /** * A class that adds a scan and backup link to the admin sidebar. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Scan; use Automattic\Jetpack\My_Jetpack\Products\Backup; use Automattic\Jetpack\Redirect; use Automattic\Jetpack\Status\Host; use Jetpack_Core_Json_Api_Endpoints; /** * Clas...
projects/plugins/jetpack/modules/scan/scan.php
<?php /** * Jetpack Scan features that show up on the jetpack admin side. * - Adds a admin bar notice when the site has threats. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Scan; if ( ! apply_filters( 'jetpack_disable_scan', false ) ) { require_once __DIR__ . '/class-admin-bar-notice.php'; ...
projects/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * The Jetpack_RelatedPosts class. * * @package automattic/jetpack */ use Automattic\Jetpack\Assets; use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Sync\Settings; /** * The Jetpack_RelatedPosts class. */ class Jetpack_RelatedPosts { c...
projects/plugins/jetpack/modules/related-posts/class.related-posts-customize.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Assets; // Exit if file is accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class to include elements to modify Related Posts look in Customizer. * * @since 4.4.0 */ class Jetpack_Related_Posts_Customize {...
projects/plugins/jetpack/modules/carousel/jetpack-carousel.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Module: Jetpack Carousel * * @package automattic/jetpack */ use Automattic\Jetpack\Assets; use Automattic\Jetpack\Stats\Options as Stats_Options; use Automattic\Jetpack\Status; /** * Jetpack_Carousel class. */ class Jetpack_Carousel { /**...
projects/plugins/jetpack/modules/shortcodes/videopress.php
<?php /** * Provides VideoPress videos support when module is disabled. * * @since 2.4 * @since 3.9.5 Added compatibility with refactored VideoPress module. * * @package automattic/jetpack */ if ( ! Jetpack::is_module_active( 'videopress' ) ) { \Automattic\Jetpack\Assets::add_resource_hint( '//v0.wordpress....
projects/plugins/jetpack/modules/shortcodes/archiveorg-book.php
<?php /** * Archive.org Shortcode * * Usage: * [archiveorg-book goodytwoshoes00newyiala] * [archiveorg-book https://www.archive.org/stream/goodytwoshoes00newyiala] * [archiveorg id=goodytwoshoes00newyiala width=480 height=430] * <iframe src="https://www.archive.org/stream/goodytwoshoes00newyiala?ui=embed#mode/1...
projects/plugins/jetpack/modules/shortcodes/wordads.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Wordads shortcode. * * Examples: * [wordads] * * @package automattic/jetpack */ /** * Embed WordAds 'ad' in post */ class Jetpack_WordAds_Shortcode { /** * Used to determine whether scripts and styles have been enqueued already. *...
projects/plugins/jetpack/modules/shortcodes/spotify.php
<?php /** * Spotify shortcode. * * Usage: * [spotify id="spotify:track:4bz7uB4edifWKJXSDxwHcs" width="400" height="100"] * * @package automattic/jetpack */ if ( ! shortcode_exists( 'spotify' ) ) { add_shortcode( 'spotify', 'jetpack_spotify_shortcode' ); } /** * Parse shortcode arguments and render its output...
projects/plugins/jetpack/modules/shortcodes/flatio.php
<?php /** * Flat.io embed * * Example URL: https://flat.io/score/5a5268ed41396318cbd7772c-string-quartet-for-rainy-days * * @package automattic/jetpack */ // Register oEmbed provider. wp_oembed_add_provider( 'https://flat.io/score/*', 'https://flat.io/services/oembed', false ); wp_oembed_add_provider( 'https://*...
projects/plugins/jetpack/modules/shortcodes/houzz.php
<?php /** * Houzz Embed * * Examples: * Post content: * - [houzz=http://www.houzz.com/pro/james-crisp] * - http://www.houzz.com/pro/james-crisp * Blog sidebar: [houzz=http://www.houzz.com/profile/alon w=200 h=300] * * @package automattic/jetpack */ // Register oEmbed provider. wp_oembed_add_provider( '#https...
projects/plugins/jetpack/modules/shortcodes/class.filter-embedded-html-objects.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * The companion file to shortcodes.php * * This file contains the code that converts HTML embeds into shortcodes * for when the user copy/pastes in HTML. * * @package automattic/jetpack */ add_filter( 'pre_kses', array( 'Filter_Embedded_HTM...
projects/plugins/jetpack/modules/shortcodes/googlemaps.php
<?php /** * Google Maps embeds. * * Supported formats: * <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=bg&amp;geocode=&amp;q=%D0%9C%D0%BB%D0%B0%D0%B4%D0%BE%D1%81%D1%82+1,+%D0%A1%D0%BE%D1%84%D0%B8%D1%8F,+%D...
projects/plugins/jetpack/modules/shortcodes/archives.php
<?php /** * Archives shortcode * * @author bubel & nickmomrik * [archives limit=10] * * @package automattic/jetpack */ add_shortcode( 'archives', 'archives_shortcode' ); /** * Display Archives shortcode. * * @param array $atts Shortcode attributes. */ function archives_shortcode( $atts ) { if ( is_feed() ...
projects/plugins/jetpack/modules/shortcodes/smartframe.php
<?php /** * Smartframe.io embed * * Example URL: https://mikael-korpela.smartframe.io/p/mantymetsa_1630927773870/7673dc41a775fb845cc26acf24f1fe4?t=rql1c6dbpv2 * Example embed code: <script src="https://embed.smartframe.io/6ae67829d1264ee0ea6071a788940eae.js" data-image-id="mantymetsa_1630927773870" data-width="100%...
projects/plugins/jetpack/modules/shortcodes/mailchimp.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * MailChimp Subscriber Popup Form shortcode * * Example: * [mailchimp_subscriber_popup baseUrl="mc.us11.list-manage.com" uuid="1ca7856462585a934b8674c71" lid="2d24f1898b"] * * Embed code example: * <script type="text/javascript" src="//downlo...
projects/plugins/jetpack/modules/shortcodes/cartodb.php
<?php /** * Carto (formerly CartoDB) * * Example URL: http://osm2.carto.com/viz/08aef918-94da-11e4-ad83-0e0c41326911/public_map * * possible patterns: * [username].carto.com/viz/[map-id]/public_map * [username].carto.com/viz/[map-id]/embed_map * [username].carto.com/viz/[map-id]/map * [organization].carto.com/...
projects/plugins/jetpack/modules/shortcodes/instagram.php
<?php /** * Instagram Embeds. * * Full links: https://www.instagram.com/p/BnMOk_FFsxg/ * https://www.instagram.com/tv/BkQjCfsBIzi/ * [instagram url=https://www.instagram.com/p/BnMOk_FFsxg/] * [instagram url=https://www.instagram.com/p/BZoonmAHvHf/ width=320] * Embeds can be converted to a shortcode when the auth...
projects/plugins/jetpack/modules/shortcodes/vimeo.php
<?php /** * Vimeo Shortcode. * * Examples: * [vimeo 141358] * [vimeo http://vimeo.com/141358] * [vimeo 141358 h=500&w=350] * [vimeo 141358 h=500 w=350] * [vimeo id=141358 width=350 height=500] * * <iframe src="http://player.vimeo.com/video/18427511" width="400" height="225" frameborder="0"></iframe><p><a href...
projects/plugins/jetpack/modules/shortcodes/tweet.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tweet shortcode. * Params map to key value pairs, and all but tweet are optional: * tweet = id or permalink url* (Required) * align = none|left|right|center * width = number in pixels example: width="300" * lang = en|fr|de|ko|etc... lang...
projects/plugins/jetpack/modules/shortcodes/others.php
<?php /** * Extra oEmbed providers that we use on wpcom for feature parity. * * This file will be loaded even when you don't use the Shortcodes feature, * as these embeds are considered safe to use on any site * (and may end up embedded in Core in the future). * * @package automattic/jetpack */ wp_oembed_add_p...
projects/plugins/jetpack/modules/shortcodes/upcoming-events.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Display a list of upcoming events from a calendar. * * @package automattic/jetpack */ /** * Register a upcomingevents shortcode. * Most of the heavy lifting done in iCalendarReader class, * where the icalendar_render_events() function co...
projects/plugins/jetpack/modules/shortcodes/inline-pdfs.php
<?php /** * Embed support for Inline PDFs * * Takes a plain-text PDF URL (*.pdf), and attempts to embed it directly * in the post instead of leaving it as a bare link. * * @package automattic/jetpack */ wp_embed_register_handler( 'inline-pdfs', '#https?://[^<]*\.pdf$#i', 'jetpack_inline_pdf_embed_handler' ); /...
projects/plugins/jetpack/modules/shortcodes/getty.php
<?php /** * Getty shortcode * * [getty src="82278805" width="$width" height="$height"] * <div class="getty embed image" style="background-color:#fff;display:inline-block;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#a7a7a7;font-size:11px;width:100%;max-width:462px;"><div style="padding:0;margin:0;t...
projects/plugins/jetpack/modules/shortcodes/bandcamp.php
<?php /** * Shortcode handler for [bandcamp], which inserts a bandcamp.com * music player (iframe, html5) * * [bandcamp album=119385304] * [bandcamp album=3462839126 bgcol=FFFFFF linkcol=4285BB size=venti] * [bandcamp track=2446959313] * * @package automattic/jetpack */ /** * Display the Bandcamp shortcode....
projects/plugins/jetpack/modules/shortcodes/medium.php
<?php /** * Embed support for Medium * * Supported formats: * - Profiles: https://medium.com/@jeherve * - Stories: https://medium.com/@jeherve/this-is-a-story-19f582daaf5b * - And all the above in shortcode formats: * [medium url="https://medium.com/@jeherve/this-is-a-story-19f582daaf5b" width="100%" border="fal...
projects/plugins/jetpack/modules/shortcodes/brightcove.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Assets; /** * Brightcove shortcode. * * Brighcove had renovated their video player embedding code since they introduced their "new studio". * See https://support.brightcove.com/en/video-cloud/docs. * The new code is not 100...
projects/plugins/jetpack/modules/shortcodes/flickr.php
<?php /** * Flickr Short Code * Author: kellan * License: BSD/GPL/public domain (take your pick) * * [flickr video=www.flickr.com/photos/kalakeli/49931239842] * [flickr video=49931239842] * [flickr video=49931239842 w=200 h=150] * [flickr video=49931239842 autoplay="yes" controls="no"] * [flickr video=49931239...
projects/plugins/jetpack/modules/shortcodes/presentations.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Presentations * Presentations plugin based on the work done by <a href="http://darylkoop.com/">Daryl Koopersmith</a>. Powered by jmpress.js * * HOW TO: How the plugin settings are organized and which features are supported. * * The entire pr...
projects/plugins/jetpack/modules/shortcodes/descript.php
<?php /** * Descript.com embed * * Example URL: https://share.descript.com/view/jUxUmel6GyN * Example embed code: <iframe src="https://share.descript.com/embed/jUxUmel6GyN" width="640" height="360" frameborder="0" allowfullscreen></iframe> * * @package automattic/jetpack */ if ( defined( 'IS_WPCOM' ) && IS_WPCO...
projects/plugins/jetpack/modules/shortcodes/slideshow.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Assets; use Automattic\Jetpack\Extensions\Slideshow; /** * Slideshow shortcode. * Adds a new "slideshow" gallery type when adding a gallery using the classic editor. * * @package automattic/jetpack */ /** * Slideshow shor...
projects/plugins/jetpack/modules/shortcodes/twitter-timeline.php
<?php /** * Twitter Timeline Shortcode. * * Examples: * [twitter-timeline username=jetpack] * * @package automattic/jetpack */ /** * Render the Twitter shortcode. * * @param array $atts Shortcode attributes. */ function twitter_timeline_shortcode( $atts ) { $default_atts = array( 'username' => '', 'id'...
projects/plugins/jetpack/modules/shortcodes/wufoo.php
<?php /** * Plugin Name: Wufoo Shortcode * Based on https://wordpress.org/plugins/wufoo-shortcode/ * * Examples: * [wufoo username="jeherve" formhash="z1x13ltw1m8jtrw" autoresize="true" height="338" header="show"] * * @package automattic/jetpack */ /** * Display the Wufoo shortcode. * * @param array $atts S...
projects/plugins/jetpack/modules/shortcodes/mixcloud.php
<?php /** * Mixcloud embeds * * Examples: * [mixcloud MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ /] * [mixcloud MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ width=640 height=480 /] * [mixcloud http://www.mixcloud.com/MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ /] *...
projects/plugins/jetpack/modules/shortcodes/soundcloud.php
<?php /** * SoundCloud Shortcode * Based on this plugin: https://wordpress.org/plugins/soundcloud-shortcode/ * * Credits: * Original version: Johannes Wagener <johannes@soundcloud.com> * Options support: Tiffany Conroy <tiffany@soundcloud.com> * HTML5 & oEmbed support: Tim Bormans <tim@soundcloud.com> * * Exam...
projects/plugins/jetpack/modules/shortcodes/twitchtv.php
<?php /** * Twitch.tv shortcode * * Examples: * [twitchtv url='https://www.twitch.tv/paperbat' height='378' width='620' autoplay='false'] * [twitchtv url='https://www.twitch.tv/paperbat/b/323486192' height='378' width='620' autoplay='false'] * * @package automattic/jetpack */ /** * (Live URL) https://www.twit...
projects/plugins/jetpack/modules/shortcodes/dailymotion.php
<?php /** * Dailymotion code * * @package automattic/jetpack */ /** * Original codes: * * <embed height="270" type="application/x-shockwave-flash" width="480" src="http&#58;//www.dailymotion.com/swf/video/xekmrq?additionalInfos=0" wmode="opaque" pluginspage="http&#58;//www.macromedia.com/go/getflashplayer" allo...
projects/plugins/jetpack/modules/shortcodes/crowdsignal.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Crowdsignal (PollDaddy) shortcode. * * Formats: * [polldaddy type="iframe" survey="EB151947E5950FCF" height="auto" domain="jeherve" id="a-survey-with-branches"] * [crowdsignal type="iframe" survey="EB151947E5950FCF" height="auto" domain="jeh...
projects/plugins/jetpack/modules/shortcodes/codepen.php
<?php /** * CodePen embed * * Example URL: http://codepen.io/css-tricks/pen/wFeaG * * @package automattic/jetpack */ // Register oEmbed provider. wp_oembed_add_provider( '#https?://codepen.io/([^/]+)/pen/([^/]+)/?#', 'https://codepen.io/api/oembed', true );
projects/plugins/jetpack/modules/shortcodes/unavailable.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Display a message on the frontend when we retire a shortcode, * explaining why the shortcode is not available anymore. * * @package automattic/jetpack */ // phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to...
projects/plugins/jetpack/modules/shortcodes/gist.php
<?php /** * GitHub's Gist site supports oEmbed but their oembed provider only * returns raw HTML (no styling) and the first little bit of the code. * * Their JavaScript-based embed method is a lot better, so that's what we're using. * * Supported formats: * Full URL: https://gist.github.com/57cc50246aab776e11006...
projects/plugins/jetpack/modules/shortcodes/sitemap.php
<?php /** * Sitemap shortcode. * * Usage: [sitemap] * * @package automattic/jetpack */ add_shortcode( 'sitemap', 'jetpack_sitemap_shortcode' ); /** * Renders a tree of pages. * * @since 4.5.0 * * @return string */ function jetpack_sitemap_shortcode() { $tree = wp_list_pages( array( 'title_li' => '<b...
projects/plugins/jetpack/modules/shortcodes/googleapps.php
<?php /** * Google Docs and Google Calendar Shortcode * * Presentation: * <iframe src="https://docs.google.com/present/embed?id=dhfhrphh_123drp8s65c&interval=15&autoStart=true&loop=true&size=l" frameborder="0" width="700" height="559"></iframe> * <iframe src="https://docs.google.com/presentation/embed?id=13ItX4jV0...
projects/plugins/jetpack/modules/shortcodes/ustream.php
<?php /** * Ustream.tv shortcode * * Example: * [ustream id=1524 live=1] * [ustreamsocial id=12980237 width="500"] * * Embed code example, from http://www.ustream.tv/leolaporte * <iframe src="http://www.ustream.tv/embed/recorded/1524?v=3&#038;wmode=direct" width="480" height="296" scrolling="no" frameborder="0"...
projects/plugins/jetpack/modules/shortcodes/youtube.php
<?php /** * Youtube shortcode * * Contains shortcode + some improvements over the Core Embeds syntax (see http://codex.wordpress.org/Embeds ) * * Examples: * [youtube https://www.youtube.com/watch?v=WVbQ-oro7FQ] * [youtube=http://www.youtube.com/watch?v=wq0rXGLs0YM&fs=1&hl=bg_BG&autohide=1&rel=0] * http://www.y...
projects/plugins/jetpack/modules/shortcodes/scribd.php
<?php /** * Scribd Shortcode * * [scribd id=DOCUMENT_ID key=DOCUMENT_KEY mode=MODE] * DOCUMENT_ID is an integer (also used as an object_id) * DOCUMENT_KEY is an alphanumeric hash ('-' character as well) * MODE can be 'list', 'book', 'slide', 'slideshow', or 'tile' * * [scribd id=39027960 key=key-3kaiwcjqhtipf25...
projects/plugins/jetpack/modules/shortcodes/vr.php
<?php /** * VR Viewer Shortcode * converts [vr] shortcode to an iframe viewer hosted on vr.me.sh * * @package automattic/jetpack */ /** * Scrub URL paramaters for VR viewer * * @param array $params { * parameter array which is passed to the jetpack_vr_viewer. * * @type string $url url of 360 media ...
projects/plugins/jetpack/modules/shortcodes/pinterest.php
<?php /** * Pinterest embeds * * Based on "Board Widget" example here: http://business.pinterest.com/widget-builder/#code * * Example URL: https://pinterest.com/pin/129056345550241149/ * Second Example URL: https://uk.pinterest.com/annsawesomepins/travel/ * * @package automattic/jetpack */ wp_embed_register_h...
projects/plugins/jetpack/modules/shortcodes/ted.php
<?php /** * TED Player embed code * http://www.ted.com * * Examples: * http://www.ted.com/talks/view/id/210 * http://www.ted.com/talks/marc_goodman_a_vision_of_crimes_in_the_future.html * [ted id="210" lang="en"] * [ted id="http://www.ted.com/talks/view/id/210" lang="en"] * [ted id=1539 lang=fr width=560 heigh...
projects/plugins/jetpack/modules/shortcodes/untappd-menu.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Untappd Shortcodes * * @author kraftbj * * [untappd-menu location="123" theme="123"] * @since 4.1.0 * @param location int Location ID for the Untappd venue. Required. * @param theme int Theme ID for the Untappd menu. Required. * * @p...
projects/plugins/jetpack/modules/shortcodes/gravatar.php
<?php /** * Gravatar shortcode for avatar and profile. * * Usage: * * [gravatar email="user@example.org" size="48"] * [gravatar_profile who="user@example.org"] * * @package automattic/jetpack */ add_shortcode( 'gravatar', 'jetpack_gravatar_shortcode' ); add_shortcode( 'gravatar_profile', 'jetpack_gravatar_pro...
projects/plugins/jetpack/modules/shortcodes/facebook.php
<?php /** * Facebook embeds * * @package automattic/jetpack */ define( 'JETPACK_FACEBOOK_EMBED_REGEX', '#^https?://(www.)?facebook\.com/([^/]+)/(posts|photos)/([^/]+)?#' ); define( 'JETPACK_FACEBOOK_ALTERNATE_EMBED_REGEX', '#^https?://(www.)?facebook\.com/permalink.php\?([^\s]+)#' ); define( 'JETPACK_FACEBOOK_PHOT...
projects/plugins/jetpack/modules/shortcodes/vine.php
<?php /** * Vine shortcode * The service is now archived, but existing embeds are still accessible. * * Examples: * Vine embed code: * <iframe class="vine-embed" src="https://vine.co/v/bjHh0zHdgZT" width="600" height="600" frameborder="0"></iframe> * <script async src="//platform.vine.co/static/scripts/embed.js"...
projects/plugins/jetpack/modules/shortcodes/recipe.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName use Automattic\Jetpack\Assets; /** * Embed recipe 'cards' in post, with basic styling and print functionality * * To Do * - defaults settings * - basic styles/themecolor styles * - validation/sanitization * - print styles * * @package automat...
projects/plugins/jetpack/modules/shortcodes/googleplus.php
<?php /** * Google+ embeds * Google+ has shut down. Output the link for history's sake. * Other than that, there's not much we can do. * * @package automattic/jetpack */ define( 'JETPACK_GOOGLEPLUS_EMBED_REGEX', '#^https?://plus\.(sandbox\.)?google\.com/(u/\d+/)?([^/]+)/posts/([^/]+)$#' ); /* * Example URL: ht...
projects/plugins/jetpack/modules/shortcodes/kickstarter.php
<?php /** * Kickstarter shortcode * * Usage: * [kickstarter url="https://www.kickstarter.com/projects/peaktoplateau/yak-wool-baselayers-from-tibet-to-the-world" width="480" height=""] * * @package automattic/jetpack */ add_shortcode( 'kickstarter', 'jetpack_kickstarter_shortcode' ); add_filter( 'pre_kses', 'jet...
projects/plugins/jetpack/modules/shortcodes/slideshare.php
<?php /** * Slideshare shortcode * * Formats: * Old style (still compatible): [slideshare id=5342235&doc=camprock-101002163655-phpapp01&w=300&h=200] * New style: [slideshare id=5342235&w=300&h=200&fb=0&mw=0&mh=0&sc=no] * * Legend: * id = Document ID provided by Slideshare * w = Width of iFrame (in...
projects/plugins/jetpack/modules/shortcodes/quiz.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileNam use Automattic\Jetpack\Assets; /** * Quiz shortcode. * * Usage: * * [quiz] * [question]What's the right answer?[/question] * [wrong]This one?[explanation]Nope[/explanation][/wrong] * [answer]Yes, this is the one![explanation]Yay![/explanation][...
projects/plugins/jetpack/modules/shortcodes/archiveorg.php
<?php /** * Archive.org book shortcode. * * Usage: * [archiveorg Experime1940] * [archiveorg http://archive.org/details/Experime1940 poster=http://archive.org/images/map.png] * [archiveorg id=Experime1940 width=640 height=480 autoplay=1] * <iframe src="http://archive.org/embed/Experime1940&autoplay=1&poster=htt...
projects/plugins/jetpack/modules/subscriptions/views.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName // phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-named class files. /** * Jetpack_Subscriptions_Widget main view class. */ class Jetpack_Subscriptions_Widget extends WP_Widget { const ID_BASE =...
projects/plugins/jetpack/modules/subscriptions/jetpack-user-content-link-redirection.php
<?php /** * User Content Link Redirection * * The purpose of this file is to track and redirect user content links in emails. * This renders an iframe pointing to subscribe.wordpress.com which will track and * return the destination url for the iframe parent to redirect to. * * @package automattic/jetpack */ /...
projects/plugins/jetpack/modules/subscriptions/subscribe-modal/class-jetpack-subscribe-modal.php
<?php /** * Adds support for Jetpack Subscribe Modal feature * * @package automattic/jetpack-mu-wpcom * @since 12.4 */ use Automattic\Jetpack\Extensions\Premium_Content\Subscription_Service\Abstract_Token_Subscription_Service; use const Automattic\Jetpack\Extensions\Subscriptions\META_NAME_FOR_POST_LEVEL_ACCESS_S...
projects/plugins/jetpack/modules/wordads/class-wordads.php
<?php /** * Main WordAds file. * * @package automattic/jetpack */ use Automattic\Jetpack\Status\Host; define( 'WORDADS_ROOT', __DIR__ ); define( 'WORDADS_BASENAME', plugin_basename( __FILE__ ) ); define( 'WORDADS_FILE_PATH', WORDADS_ROOT . '/' . basename( __FILE__ ) ); define( 'WORDADS_URL', plugins_url( '/', __F...
projects/plugins/jetpack/modules/wordads/php/class-wordads-params.php
<?php /** * WordAds Param Class file. * * @package automattic/jetpack */ use Automattic\Jetpack\Status; /** * Class WordAds_Params * * Sets parameters for WordAds. */ class WordAds_Params { /** * WordAds options * * @var array */ public $options; /** * Current URL * * @access public * @var...
projects/plugins/jetpack/modules/wordads/php/class-wordads-cron.php
<?php /** * WordAds cron tasks. * * @package automattic/jetpack */ /** * WordAds cron tasks * * @since 4.5.0 */ class WordAds_Cron { /** * Add the actions the cron tasks will use * * @since 4.5.0 */ public function __construct() { add_action( 'wordads_cron_status', array( $this, 'update_wordads_st...
projects/plugins/jetpack/modules/wordads/php/class-wordads-ccpa-do-not-sell-link-widget.php
<?php /** * CCPA Do Not Sell Widget * * @package automattic/jetpack */ /** * Class WordAds_Ccpa_Do_Not_Sell_Link_Widget */ class WordAds_Ccpa_Do_Not_Sell_Link_Widget extends WP_Widget { /** * WordAds_Ccpa_Do_Not_Sell_Link_Widget constructor. */ public function __construct() { parent::__construct( 'wo...
projects/plugins/jetpack/modules/wordads/php/class-wordads-california-privacy.php
<?php /** * CCPA Class * * @package automattic/jetpack */ use Automattic\Jetpack\Assets; /** * Class WordAds_California_Privacy * * Implementation of [California Consumer Privacy Act] (https://leginfo.legislature.ca.gov/faces/codes_displayText.xhtml?lawCode=CIV&division=3.&title=1.81.5.&part=4.&chapter=&articl...