filename stringlengths 11 137 | content stringlengths 6 292k |
|---|---|
projects/plugins/jetpack/modules/widgets/gravatar-profile.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-named class files.
add_action( 'widgets_init', 'jetpack_gravatar_profile_widget_init' );
/**
* Register the widget for use in Appearance -> Widgets... |
projects/plugins/jetpack/modules/widgets/social-media-icons.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName.php
/**
* Social Media Icons Widget
*
* This widget is now deprecated.
* Any new features should go into modules/widgets/social-icons.php instead.
*
* @see https://github.com/Automattic/jetpack/pull/8498
*
* @package automattic/jetpack
*/
// ... |
projects/plugins/jetpack/modules/widgets/top-posts.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Top Posts widget.
*
* Currently, this widget depends on the Stats Module. To not load this file
* when the Stats Module is not active would potentially bypass Jetpack's
* fatal error detection on module activation, so we always load this fil... |
projects/plugins/jetpack/modules/widgets/follow-button.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-named class files.
// @todo Fix performance issues before shipping.
// add_action( 'widgets_init', 'follow_button_register_widget' );
/**
* Registe... |
projects/plugins/jetpack/modules/widgets/internet-defense-league.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-named class files.
/**
* Jetpack_Internet_Defense_League_Widget main class.
*/
class Jetpack_Internet_Defense_League_Widget extends WP_Widget {
/... |
projects/plugins/jetpack/modules/widgets/class-jetpack-instagram-widget.php | <?php
/**
* Instagram Widget. Display some Instagram photos via a widget.
*
* @package automattic/jetpack
*/
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager;
/**
* This is the actual Instagram widget along with other code that only applies to the widget.
*/
class Jetpack_Inst... |
projects/plugins/jetpack/modules/widgets/blog-stats.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileNam
/**
* Blog Stats Widget.
*
* @since 4.5.0
*
* @package automattic/jetpack
*/
// phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed -- TODO: Move classes to appropriately-named class files.
use Automattic\Jetpack\Stats\WPCOM_Stats;
// D... |
projects/plugins/jetpack/modules/widgets/migrate-to-core/gallery-widget.php | <?php
/**
* Migration from Jetpack's Gallery Widget to WordPress' Core Gallery Widget.
*
* @since 5.5
*
* @package automattic/jetpack
*/
/**
* Migrates all active instances of Jetpack's Gallery widget to Core's Media Gallery widget.
*/
function jetpack_migrate_gallery_widget() {
// Only trigger the migration ... |
projects/plugins/jetpack/modules/widgets/migrate-to-core/image-widget.php | <?php
/**
* Migration from Jetpack's Image Widget to WordPress' Core Image Widget.
*
* @since 4.9
*
* @package automattic/jetpack
*/
/**
* Migrates all active instances of Jetpack's image widget to Core's media image widget.
*/
function jetpack_migrate_image_widget() {
// Only trigger the migration from wp-ad... |
projects/plugins/jetpack/modules/widgets/simple-payments/admin-warning.php | <div class='jetpack-simple-payments-disabled-error'>
<p>
<?php
/**
* Show error and help if Pay with PayPal is disabled.
*
* @package automattic/jetpack
*/
$support_url = ( defined( 'IS_WPCOM' ) && IS_WPCOM )
? 'https://wordpress.com/support/pay-with-paypal/'
: 'https://jetpack.com/support/... |
projects/plugins/jetpack/modules/widgets/simple-payments/form.php | <?php
/**
* Display the Pay with PayPal Form.
*
* @package automattic/jetpack
* @phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
*/
?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
<?php esc_html_e( 'Widget Title', 'jetpack' ); ?>
</label>
<input
... |
projects/plugins/jetpack/modules/widgets/simple-payments/widget.php | <?php
/**
* Display the Pay with PayPal Widget.
*
* @package automattic/jetpack
* @phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
*/
?>
<div class='jetpack-simple-payments-wrapper'>
<div class='jetpack-simple-payments-product'>
<div class='jetpack-simple-payments-product-image' ... |
projects/plugins/jetpack/modules/widgets/eu-cookie-law/widget-amp.php | <?php // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
/**
* AMP Widget for Cookies and Consent.
*
* @package automattic/jetpack
*/
?>
<amp-consent id="eu-cookie-consent" layout="nodisplay" class="widget widget_eu_cookie_law_widget<?php echo esc_attr( ! empty( $instance['position']... |
projects/plugins/jetpack/modules/widgets/eu-cookie-law/form.php | <?php
/**
* EU Cookie Law Widget form.
*
* @package automattic/jetpack
*/
use Automattic\Jetpack\Redirect;
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
?>
<p>
<strong>
<?php esc_html_e( 'Banner text', 'jetpack' ); ?>
</strong>
<ul>
<li>
<label>
<input
<?php ... |
projects/plugins/jetpack/modules/widgets/eu-cookie-law/widget.php | <?php // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
/**
* Widget for Cookies and Consent.
*
* @package automattic/jetpack
*/
?>
<div
class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>"
data-hide-timeout="<?php echo (int) $instance['hide-timeout']; ?>"
data-consent-exp... |
projects/plugins/jetpack/modules/widgets/flickr/form.php | <?php
/**
* Jetpack_Flickr_Widget settings form output.
*
* @package automattic/jetpack
*/
//phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
?>
<p>
<label>
<?php esc_html_e( 'Title:', 'jetpack' ); ?>
</label>
<input
class="widefat"
name="<?php echo esc_attr( $this->get_field... |
projects/plugins/jetpack/modules/widgets/flickr/widget.php | <?php
/**
* Jetpack_Flickr_Widget frontend widget output.
*
* @package automattic/jetpack
*/
//phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
?>
<!-- Start of Flickr Widget -->
<div class="flickr-wrapper flickr-size-<?php echo esc_attr( $instance['flickr_image_size'] ); ?>">
<div c... |
projects/plugins/jetpack/modules/widgets/gallery/templates/form.php | <?php
/**
* Jetpack_Gallery_Widget backend settings form output.
*
* @package automattic/jetpack
*/
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title:', 'jetpack' ); ?>
<input c... |
projects/plugins/jetpack/modules/widgets/milestone/milestone.php | <?php
/**
* Milestone Widget Loader.
*
* @package automattic/jetpack
*/
/**
* The widget class.
*/
require_once __DIR__ . '/class-milestone-widget.php';
/**
* Registers the widget for use!
*/
function jetpack_register_widget_milestone() {
register_widget( 'Milestone_Widget' );
}
add_action( 'widgets_init', '... |
projects/plugins/jetpack/modules/widgets/milestone/class-milestone-widget.php | <?php
/**
* Milestone Countdown Widget
*
* @package automattic/jetpack
*/
use Automattic\Jetpack\Assets;
/**
* Class Milestone_Widget
*/
class Milestone_Widget extends WP_Widget {
/**
* Holding array for widget configuration and localization.
*
* @var array
*/
private static $config_js = array();
/*... |
projects/plugins/jetpack/modules/widgets/wordpress-post-widget/class.jetpack-display-posts-widget.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
use Automattic\Jetpack\Status;
/**
* Display a list of recent posts from a WordPress.com or Jetpack-enabled blog.
*/
class Jetpack_Display_Posts_Widget extends Jetpack_Display_Posts_Widget__Base {
/**
* Widget options key prefix.
*
* @var st... |
projects/plugins/jetpack/modules/widgets/wordpress-post-widget/class.jetpack-display-posts-widget-base.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
use Automattic\Jetpack\Image_CDN\Image_CDN_Core;
/**
* For back-compat, the final widget class must be named
* Jetpack_Display_Posts_Widget.
*
* For convenience, it's nice to have a widget class constructor with no
* arguments. Otherwise, we hav... |
projects/plugins/jetpack/views/admin/jetpack-plugin-portal-containers.php | <?php
/**
* Containers for Jetpack to portal React components in the WP Admin.
*
* @package automattic/jetpack
*/
?>
<div id="jetpack-plugin-portal-app">
<!--
React Managed
The app that needs to make use of portals can render here.
-->
</div>
<div id="jetpack-plugin-portal-sidecar">
<!--
React Managed
Used ... |
projects/plugins/jetpack/views/admin/network-activated-notice.php | <?php
/**
* View template file for network activation notice.
*
* @package automattic/jetpack
*/
if ( isset( $_GET['jetpack-notice'] ) && 'dismiss' === $_GET['jetpack-notice'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
?>
<div id="message" class="error">
<p><?php esc_html_e( 'Jetpack is... |
projects/plugins/jetpack/views/admin/must-connect-main-blog.php | <?php
/**
* View template file for main network site connection prompt.
*
* @package automattic/jetpack
*/
?>
<div class="wrap">
<div class="jetpack-wrap-container dops-card">
<div class="jetpack-text-container">
<h1><?php esc_html_e( 'Get started with Jetpack Multisite', 'jetpack' ); ?></h1>
<p>
<?ph... |
projects/plugins/jetpack/views/admin/network-admin-header.php | <?php
/**
* Loads view: admin/network-activated-notice.php
*
* @package automattic/jetpack
*/
Jetpack::init()->load_view( 'admin/network-activated-notice.php' );
do_action( 'jetpack_notices' );
|
projects/plugins/jetpack/views/admin/deactivation-dialog.php | <?php
/**
* The deactivation modal content.
*
* @package automattic/jetpack
*
* phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
* because $data is magically loaded by Jetpack::load_view()
*/
?>
<div id="jetpack_deactivation_dialog">
<div class="jetpack_deactivation_dialog_conten... |
projects/plugins/jetpack/views/admin/network-settings.php | <?php
/**
* Jetpack Network Settings view template.
*
* @package automattic/jetpack
*/
use Automattic\Jetpack\IP\Utils as IP_Utils;
if ( isset( $_GET['updated'] ) && 'true' === $_GET['updated'] ) : // phpcs:ignore WordPress.Security.NonceVerification.Recommended
?>
<div class="updated"><p><?php esc_html_e( 'Jet... |
projects/plugins/jetpack/src/class-tracking.php | <?php
/**
* Tracks class.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Plugin;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\IP\Utils as IP_Utils;
use Automattic\Jetpack\Tracking as Tracks;
/**
* Tracks class.
*/
class Tracking {
/**
* Tracking ob... |
projects/plugins/jetpack/src/class-jetpack-modules-overrides.php | <?php
/**
* Special cases for overriding modules.
*
* @package automattic/jetpack
*/
/**
* Provides methods for dealing with module overrides.
*
* @since 5.9.0
*/
class Jetpack_Modules_Overrides {
/**
* Used to cache module overrides so that we minimize how many times we apply the
* option_jetpack_active_... |
projects/plugins/jetpack/src/class-jetpack-crm-data.php | <?php
/**
* Compatibility functions for the Jetpack CRM plugin.
*
* @since 9.0.0
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack;
/**
* Provides Jetpack CRM plugin data.
*/
class Jetpack_CRM_Data {
const JETPACK_CRM_PLUGIN_SLUG = 'zero-bs-crm/ZeroBSCRM.php';
/**
* Provides Jetpack CRM pl... |
projects/plugins/starter-plugin/jetpack-starter-plugin.php | <?php
/**
*
* Plugin Name: Jetpack Starter Plugin
* Plugin URI: https://wordpress.org/plugins/jetpack-starter-plugin
* Description: plugin--description.
* Version: 0.5.0-alpha
* Author: Automattic
* Author URI: https://jetpack.com/
* License: GPLv2 or later
* Text Domain: jetpack-starter-plugin
*
* @package ... |
projects/plugins/starter-plugin/tests/php/test-class-jetpack-starter-plugin.php | <?php
/**
* Main plugin file testing.
*
* @package automattic/jetpack-social-plugin
*/
use WorDBless\BaseTestCase;
use WorDBless\Options as WorDBless_Options;
use WorDBless\Users as WorDBless_Users;
/**
* Main plugin file testing.
*/
class Jetpack_Starter_Plugin_Test extends BaseTestCase {
/**
* The current... |
projects/plugins/starter-plugin/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
// Preloading the file to reconcile Brain\Monkey with WorDBless.
require_once __DIR__ . '/../../vendor/antecedent/patchwork/Patchwork.php';
\WorDBless\Load::load();
... |
projects/plugins/starter-plugin/src/class-jetpack-starter-plugin.php | <?php
/**
* Primary class file for the Jetpack Starter Plugin plugin.
*
* @package automattic/jetpack-starter-plugin-plugin
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
use Automattic\Jetpack\Admin_UI\Admin_Menu;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_S... |
projects/plugins/super-cache/wp-cache-phase1.php | <?php
if ( ! function_exists( 'wp_cache_phase2' ) ) {
require_once __DIR__. '/wp-cache-phase2.php';
}
// error_reporting(E_ERROR | E_PARSE); // uncomment to debug this file!
// directory where the configuration file lives.
if ( !defined( 'WPCACHECONFIGPATH' ) ) {
define( 'WPCACHECONFIGPATH', WP_CONTENT_DIR );
}
if... |
projects/plugins/super-cache/wp-cache-phase2.php | <?php
/*
* WP Super Cache Phase 2 file.
* This file is included by the files wp-cache.php and wp-cache-phase1.php
* It has all the code for caching and serving requests.
*/
// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_operations_is_writable -- TODO: Fix or determine for sure that these should not... |
projects/plugins/super-cache/advanced-cache.php | <?php
// WP SUPER CACHE 1.2
function wpcache_broken_message() {
global $wp_cache_config_file;
if ( isset( $wp_cache_config_file ) == false ) {
return '';
}
$doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
$xmlrpc_request = defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST;
$rest_request = defined( 'REST_... |
projects/plugins/super-cache/wp-cache.php | <?php
/*
* Plugin Name: WP Super Cache
* Plugin URI: https://wordpress.org/plugins/wp-super-cache/
* Description: Very fast caching plugin for WordPress.
* Version: 2.0.0-alpha
* Author: Automattic
* Author URI: https://automattic.com/
* License: GPL2+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
* ... |
projects/plugins/super-cache/ossdl-cdn.php | <?php
/* Taken from OSSDL CDN off-linker, a plugin by W-Mark Kubacki (http://mark.ossdl.de/) and used with permission */
if ( ! isset( $ossdlcdn ) ) {
$ossdlcdn = 1; // have to default to on for existing users.
}
if ( 1 === $ossdlcdn && ! is_admin() ) {
add_action( 'init', 'do_scossdl_off_ob_start' );
}
/**
* Se... |
projects/plugins/super-cache/wp-cache-config-sample.php | <?php
/*
WP-Cache Config Sample File
See wp-cache.php for author details.
*/
if ( ! defined('WPCACHEHOME') )
define( 'WPCACHEHOME', WP_PLUGIN_DIR . '/wp-super-cache/' );
$cache_compression = 0; // Super cache compression
$cache_enabled = false;
$super_cache_enabled = true;
$cache_max_time = 3600; //in seconds
//$us... |
projects/plugins/super-cache/wp-cache-base.php | <?php
global $WPSC_HTTP_HOST, $cache_enabled, $cache_path, $blogcacheid, $blog_cache_dir;
// we need to backup HTTP_HOST early in the PHP process, and if running in command line set it to something useful.
if ( ! empty( $_SERVER['HTTP_HOST'] ) ) {
$WPSC_HTTP_HOST = function_exists( 'mb_strtolower' ) ? mb_strtolower( ... |
projects/plugins/super-cache/inc/preload-notification.php | <?php
// phpcs:disable WordPress.Security.NonceVerification.Recommended
function wpsc_preload_notification_scripts() {
if (
isset( $_GET['page'] ) && $_GET['page'] === 'wpsupercache' &&
isset( $_GET['tab'] ) && $_GET['tab'] === 'preload'
) {
wp_enqueue_script(
'preload-notification',
plugins_url( '/js/p... |
projects/plugins/super-cache/inc/delete-cache-button.php | <?php
if ( defined( 'WPSCDISABLEDELETEBUTTON' ) ) {
return;
}
/**
* Adds "Delete Cache" button in WP Toolbar.
*/
function wpsc_admin_bar_render( $wp_admin_bar ) {
if ( ! function_exists( 'current_user_can' ) || ! is_user_logged_in() ) {
return false;
}
$path_to_home = rtrim( (string) parse_url( get_option( '... |
projects/plugins/super-cache/plugins/badbehaviour.php | <?php
function wp_supercache_badbehaviour( $file ) {
global $cache_badbehaviour;
if ( 1 !== $cache_badbehaviour ) {
return $file;
}
wp_supercache_badbehaviour_include();
return $file;
}
add_cacheaction( 'wp_cache_served_cache_file', 'wp_supercache_badbehaviour' );
function wp_supercache_badbehaviour_include()... |
projects/plugins/super-cache/plugins/multisite.php | <?php
if ( is_multisite() ) {
add_cacheaction( 'add_cacheaction', 'wp_super_cache_multisite_init' );
}
function wp_super_cache_multisite_init() {
add_filter( 'wpmu_blogs_columns', 'wp_super_cache_blogs_col' );
add_action( 'manage_sites_custom_column', 'wp_super_cache_blogs_field', 10, 2 );
add_action( 'init', 'wp... |
projects/plugins/super-cache/plugins/dynamic-cache-test.php | <?php
/*
* On the Advanced Settings page enable "Enable dynamic caching" and clear
* the cache.
*
* Plugin authors: NEVER define the template tag for your users. Make them
* choose one so it will be unique to their site.
*
* There are two examples in this file. Both use template tags that must be
* kept secret... |
projects/plugins/super-cache/plugins/wptouch.php | <?php
function wp_super_cache_wptouch_admin() {
global $cache_wptouch, $wp_cache_config_file, $valid_nonce;
$cache_wptouch = '' === $cache_wptouch ? '0' : $cache_wptouch;
if ( isset( $_POST['cache_wptouch'] ) && $valid_nonce ) {
if ( $cache_wptouch === (int) $_POST['cache_wptouch'] ) {
$changed = false;
} ... |
projects/plugins/super-cache/plugins/awaitingmoderation.php | <?php
function awaitingmoderation_action( $buffer ) {
$buffer = str_replace( __( 'Your comment is awaiting moderation.', 'wp-super-cache' ), '', $buffer );
return $buffer;
}
function awaitingmoderation_actions() {
global $cache_awaitingmoderation;
if ( '1' === $cache_awaitingmoderation ) {
add_filter( 'wpsuperc... |
projects/plugins/super-cache/plugins/jetpack.php | <?php
if ( ! class_exists( 'Automattic\Jetpack\Device_Detection' ) ) {
// Manually load Device_Detection before autoload is initialized.
if ( defined( 'WPCACHEHOME' ) ) {
if ( file_exists( WPCACHEHOME . '/vendor/automattic/jetpack-device-detection/src/class-device-detection.php' ) ) {
require_once WPCACHEHOME .... |
projects/plugins/super-cache/plugins/domain-mapping.php | <?php
function domain_mapping_gc_cache( $function, $directory ) {
global $cache_path;
if ( ! function_exists( 'domain_mapping_warning' ) ) {
return;
}
$siteurl = domain_mapping_siteurl( false );
if ( ! $siteurl ) {
return;
}
$sitedir = trailingslashit( preg_replace( '`^(https?:)?//`', '', $siteurl ) );
... |
projects/plugins/super-cache/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/plugins/super-cache/tests/e2e/tools/mu-test-helpers.php | <?php
/**
* Helper tools for testing WP Super Cache.
*
* @package none. This line exists to stop the linter wasting even more of my time.
*/
/**
* Inject a random / time sensitive value into the footer.
*/
function wpsc_test_inject_footer() {
$rand = wp_rand( 0, 1000000 );
$time = microtime();
echo '<!-- ' .... |
projects/plugins/super-cache/partials/debug.php | <div class="wpsc-settings-inner">
<?php
extract( wpsc_update_debug_settings() ); // $wp_super_cache_debug, $wp_cache_debug_log, $wp_cache_debug_ip, $wp_super_cache_comments, $wp_super_cache_front_page_check, $wp_super_cache_front_page_clear, $wp_super_cache_front_page_text, $wp_super_cache_front_page_notification, $wp_... |
projects/plugins/super-cache/partials/lockdown.php | <div class="wpsc-card">
<a name='lockdown'></a>
<fieldset class="options">
<h4><?php _e( 'Lock Down:', 'wp-super-cache' ); ?> <?php echo $wp_lock_down == '0' ? '<span style="color:red">' . __( 'Disabled', 'wp-super-cache' ) . '</span>' : '<span style="color:green">' . __( 'Enabled', 'wp-super-cache' ) . '</span>'; ?>... |
projects/plugins/super-cache/partials/rejected_user_agents.php | <div class="wpsc-card">
<?php
echo '<a name="useragents"></a><fieldset class="options"><h4>' . __( 'Rejected User Agents', 'wp-super-cache' ) . '</h4>';
echo "<p>" . __( 'Strings in the HTTP ’User Agent’ header that prevent WP-Cache from caching bot, spiders, and crawlers’ requests. Note that super ca... |
projects/plugins/super-cache/partials/preload.php | <div class="wpsc-settings-inner">
<?php
global $wp_cache_preload_posts;
echo '<a name="preload"></a>';
if ( ! $cache_enabled || ! $super_cache_enabled || true === defined( 'DISABLESUPERCACHEPRELOADING' ) ) {
echo '<div class="notice notice-warning"><p>' . __( 'Preloading of cache disabled. Please make sure simple or ... |
projects/plugins/super-cache/partials/restore.php | <div class="wpsc-card">
<?php
echo '<fieldset class="options"><h4>' . __( 'Fix Configuration', 'wp-super-cache' ) . '</h4>';
echo '<form name="wp_restore" action="' . esc_url_raw( add_query_arg( 'tab', 'settings', $admin_url ) . '#top' ) . '" method="post">';
echo '<input type="hidden" name="wp_restore_config" />';
ech... |
projects/plugins/super-cache/partials/easy.php | <div class="wpsc-settings-inner">
<?php
global $wpsc_promo_links;
echo '<div class="wpsc-card">';
echo '<form name="wp_manager" action="' . esc_url_raw( add_query_arg( 'tab', 'easy', $admin_url ) ) . '" method="post">';
echo '<input type="hidden" name="action" value="easysetup" />';
wp_nonce_field( 'wp-cache' );
?>
<ta... |
projects/plugins/super-cache/partials/advanced.php | <div class="wpsc-settings-inner">
<?php
global $wp_cache_mod_rewrite, $wp_cache_mfunc_enabled, $wp_cache_mobile_enabled, $cache_enabled, $cache_path, $cache_time_interval, $cache_schedule_type;
$faq_url = 'https://jetpack.com/support/wp-super-cache/wp-super-cache-faq/';
$kses_allow_links = array( 'a' => array... |
projects/plugins/super-cache/partials/tracking_parameters.php | <div class="wpsc-card">
<?php
echo '<a name="trackingparameters"></a><fieldset class="options"><h4>' . __( 'Tracking Parameters', 'wp-super-cache' ) . '</h4>';
echo '<form name="edit_tracking_parameters" action="' . esc_url_raw( add_query_arg( 'tab', 'settings', $admin_url ) . '#trackingparameters' ) . '" method="post"... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-update-plugins.php | <?php
class WP_Super_Cache_Rest_Update_Plugins extends WP_REST_Controller {
/**
* Toggle plugins on/off through the /plugins/ endpoint
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {
$parameters = $request->ge... |
projects/plugins/super-cache/rest/load.php | <?php
require_once( __DIR__ . '/class.wp-super-cache-rest-get-settings.php' );
require_once( __DIR__ . '/class.wp-super-cache-rest-update-settings.php' );
require_once( __DIR__ . '/class.wp-super-cache-rest-get-stats.php' );
require_once( __DIR__ . '/class.wp-super-cache-rest-get-cache.php' );
require_once( __DIR__ . ... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-get-cache.php | <?php
class WP_Super_Cache_Rest_Get_Cache extends WP_REST_Controller {
/**
* Get a collection of items
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {
global $valid_nonce;
$valid_nonce = true;
$_GET[ 'lis... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-test-cache.php | <?php
class WP_Super_Cache_Rest_Test_Cache extends WP_REST_Controller {
/**
* Get a collection of items
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {
global $cache_path;
$url = trailingslashit( get_blogin... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-update-settings.php | <?php
require_once __DIR__ . '/class.wp-super-cache-settings-map.php';
class WP_Super_Cache_Rest_Update_Settings extends WP_REST_Controller {
/**
* Update the cache settings.
*
* @param WP_REST_Request $request Full data about the request.
*
* @return WP_Error|WP_REST_Response
*/
public function callba... |
projects/plugins/super-cache/rest/class.wp-super-cache-settings-map.php | <?php
class WP_Super_Cache_Settings_Map {
/**
* A map describing how settings transform from their external names
* into internal methods and globals.
*
* Key definitions:
*
* - get: A getter method or function that will be called to return the var
* - set: A setter method or function that will be calle... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-get-plugins.php | <?php
class WP_Super_Cache_Rest_Get_Plugins extends WP_REST_Controller {
/**
* GET a list of plugins through the /plugins/ endpoint
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {
$list = wpsc_get_plugin_list... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-get-status.php | <?php
class WP_Super_Cache_Rest_Get_Status extends WP_REST_Controller {
/**
* Get any status that might be visible.
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {
$status = array();
include_once( ABSPATH .... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-preload.php | <?php
class WP_Super_Cache_Rest_Preload extends WP_REST_Controller {
/**
* Update the cache settings.
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {
$parameters = $request->get_json_params();
if ( defined(... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-get-settings.php | <?php
require_once __DIR__ . '/class.wp-super-cache-settings-map.php';
class WP_Super_Cache_Rest_Get_Settings extends WP_REST_Controller {
/**
* Get the settings.
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-get-stats.php | <?php
class WP_Super_Cache_Rest_Get_Stats extends WP_REST_Controller {
/**
* Get the cache stats for the site.
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {
global $valid_nonce;
$_GET[ 'listfiles' ] = 1;
... |
projects/plugins/super-cache/rest/class.wp-super-cache-rest-delete-cache.php | <?php
class WP_Super_Cache_Rest_Delete_Cache extends WP_REST_Controller {
/**
* Get a collection of items
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response
*/
public function callback( $request ) {
$params = $request->get_json_params();
if ( isset( $... |
projects/plugins/super-cache/src/example.php | <?php
/**
* Put your classes in this `src` folder!
*
* @package automattic/PACKAGE-NAME
*/
// Start your code here!
|
projects/plugins/backup/jetpack-backup.php | <?php
/**
*
* Plugin Name: Jetpack VaultPress Backup
* Plugin URI: https://jetpack.com/jetpack-backup
* Description: Easily restore or download a backup of your site from a specific moment in time.
* Version: 2.6-alpha
* Author: Automattic - Jetpack Backup team
* Author URI: https://jetpack.com/
* License: GPLv... |
projects/plugins/backup/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/plugins/debug-helper/class-admin.php | <?php
/**
* Simple admin interface to activate/deactivate modules
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper;
/**
* Class Jetpack_Debug_Helper_Admin
*/
class Admin {
/**
* Option name.
*/
const OPTION_NAME = 'jetpack_debug_helper_active_modules';
/**
* C... |
projects/plugins/debug-helper/plugin.php | <?php
/**
* Plugin Name: Jetpack Debug Tools
* Description: Give me a Jetpack connection, and I'll break it every way possible.
* Author: Automattic - Jetpack Crew
* Version: 2.0.1-alpha
* Text Domain: jetpack
*
* @package automattic/jetpack-debug-helper.
*/
/*
This program is free software; you can redistribu... |
projects/plugins/debug-helper/modules/class-protect-helper.php | <?php
/**
* Jetpack Protect helper class.
*
* @package automattic/jetpack-debug-helper
*/
use Automattic\Jetpack\Plugins_Installer;
use Automattic\Jetpack\Sync\Functions as Sync_Functions;
/**
* Helps debug Protect
*/
class Protect_Helper {
/**
* Options.
*/
const STORED_OPTIONS_KEY = 'protect_helper_opt... |
projects/plugins/debug-helper/modules/class-idc-simulator.php | <?php // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r
/**
* Plugin Name: IDC Simulator
* Description: Cause an IDC on your site without having to clone it.
* Author: Bestpack
* Version: 1.0
* Text Domain: jetpack
*
* @package automattic/jetpack-debug-helper
*/
/**
* Class Broken_Token
*... |
projects/plugins/debug-helper/modules/class-mocker.php | <?php
/**
* The Mocker class creates mock data userful for testing.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper;
use Automattic\Jetpack\Debug_Helper\Mocker\Runner_Interface;
use WP_Error;
use WP_REST_Request;
use WP_REST_Server;
require_once __DIR__ . '/inc/mockers/i... |
projects/plugins/debug-helper/modules/class-broken-token.php | <?php // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r
/**
* Plugin Name: Broken Token
* Description: Give me a Jetpack connection, and I'll break it every way possible.
* Author: Bestpack
* Version: 1.0
* Text Domain: jetpack
*
* @package automattic/jetpack-debug-helper
*/
/**
* Require ... |
projects/plugins/debug-helper/modules/class-sync-data-settings-tester.php | <?php
/**
* Sync Data Settings Tester file contains the class `Sync_Date_Setting_Tester` that tests the Sync data settings.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper;
/**
* Sync_Data_Settings_Tester to test the Sync data settings.
*/
class Sync_Data_Settings_Teste... |
projects/plugins/debug-helper/modules/class-rest-api-tester.php | <?php
/**
* REST API Tester file contains the class `REST_API_Tester` that tests REST API endpoints.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper;
/**
* REST_API_Tester to test REST API endpoints.
*/
class REST_API_Tester {
/**
* Construction.
*/
public functi... |
projects/plugins/debug-helper/modules/class-jetpack-sync-debug-helper.php | <?php
/**
* Jetpack sync debug helper class
*
* @package automattic/jetpack-debug-helper
*/
defined( 'JETPACK__API_BASE' ) || define( 'JETPACK__API_BASE', get_option( Jetpack_Sync_Debug_Helper::API_BASE, 'https://jetpack.wordpress.com/jetpack.' ) );
Jetpack_Sync_Debug_Helper::init();
register_deactivation_hook( ... |
projects/plugins/debug-helper/modules/class-waf-helper.php | <?php
/**
* Jetpack WAF (Web Application Firewall) helper class.
*
* @package automattic/jetpack-debug-helper
*/
use Automattic\Jetpack\Waf\Waf_Rules_Manager;
use Automattic\Jetpack\Waf\Waf_Runner;
/**
* Helps debug WAF
*/
class Waf_Helper {
/**
* Options.
*/
const STORED_OPTIONS_KEY = 'waf_helper_option... |
projects/plugins/debug-helper/modules/class-modules-helper.php | <?php
/**
* Jetpack modules helper class.
*
* @package automattic/jetpack-debug-helper
*/
use Automattic\Jetpack\Modules;
/**
* Helps debug modules
*/
class Modules_Helper {
/**
* Construction.
*/
public function __construct() {
add_action( 'admin_menu', array( $this, 'register_submenu_page' ), 1000 );... |
projects/plugins/debug-helper/modules/class-wpcom-api-request-tracker-module.php | <?php // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r
/**
* Plugin Name: WPCOM API Request Tracker
* Description: Displays the number of requests to WPCOM API endpoints for the current page request.
* Author: Bestpack
* Version: 1.0
* Text Domain: jetpack
*
* @package automattic/jetpack-deb... |
projects/plugins/debug-helper/modules/class-cookie-state.php | <?php
/**
* The class allows setting fake cookie states to test the UI.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper;
use Automattic\Jetpack\CookieState as State;
use WP_Error;
use WP_REST_Request;
use WP_REST_Server;
/**
* REST_API_Tester to test REST API endpoints.... |
projects/plugins/debug-helper/modules/class-xmlrpc-logger.php | <?php
/**
* XMLRPC Logger file contains the class `XMLRPC_Logger` that logs XMLRPC requests.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper;
/**
* Class XMLRPC_Logger
*
* Handles logging of XML-RPC requests in WordPress.
* It hooks into the WordPress initialization p... |
projects/plugins/debug-helper/modules/class-autoloader-debug-helper.php | <?php // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r
/**
* Plugin Name: Autoloader Debugger
* Description: View current autoloader classmaps and cache settings.
* Author: Bestpack
* Version: 1.0
* Text Domain: jetpack
*
* @package automattic/jetpack-debug-helper
*/
/**
* Class Autoloade... |
projects/plugins/debug-helper/modules/class-scan-helper.php | <?php
/**
* Jetpack Scan helper class.
*
* @package automattic/jetpack-debug-helper
* @phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
*/
/**
* Helps debug Scan
*/
class Scan_Helper {
/**
* Associative array that defines which files to use for our threats.
*
* @var array<st... |
projects/plugins/debug-helper/modules/inc/class-wpcom-api-request-tracker.php | <?php
/**
* The WPCOM_API_Request_Tracker class
*
* @package automattic/jetpack-debug-helper.
*/
/**
* WPCOM_API_Request_Tracker.
*
* Tracks requests to WPCOM public API.
*/
class WPCOM_API_Request_Tracker {
/**
* Singleton WPCOM_API_Request_Tracker instance.
*
* @var WPCOM_API_Request_Tracker
**/
p... |
projects/plugins/debug-helper/modules/inc/class-broken-token-connection-errors.php | <?php // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r
/**
* View and trigger connection errors.
*
* @package automattic/jetpack-debug-helper.
*/
use Automattic\Jetpack\Connection\Error_Handler;
/**
* Class Broken_Token_Connection_Errors
*/
class Broken_Token_Connection_Errors {
/**
* E... |
projects/plugins/debug-helper/modules/inc/mockers/class-nonces-runner.php | <?php
/**
* The Mocker Runner that creates mock nonces.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper\Mocker;
require_once __DIR__ . '/class-tools.php';
/**
* Creating the mock nonces.
*/
class Nonces_Runner implements Runner_Interface {
/**
* Generate random non... |
projects/plugins/debug-helper/modules/inc/mockers/class-options-runner.php | <?php
/**
* The Mocker Runner that creates mock options.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper\Mocker;
require_once __DIR__ . '/interface-runner.php';
require_once __DIR__ . '/class-tools.php';
/**
* Creating the mock options.
*/
class Options_Runner implemen... |
projects/plugins/debug-helper/modules/inc/mockers/interface-runner.php | <?php
/**
* The Mocker Runner Interface.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper\Mocker;
/**
* Mocker Runner Interface.
*/
interface Runner_Interface {
/**
* Run the mocker functionality
*
* @param int $number How many mock options to create.
*
* @re... |
projects/plugins/debug-helper/modules/inc/mockers/class-tools.php | <?php
/**
* Mocking tools.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper\Mocker;
/**
* Mocking Tools.
*/
class Tools {
const CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
/**
* Generate a random string.
*
* @param int $length... |
projects/plugins/debug-helper/modules/inc/mockers/class-waf-runner.php | <?php
/**
* The Mocker Runner that creates mock firewall blocked requests.
*
* @package automattic/jetpack-debug-helper
*/
namespace Automattic\Jetpack\Debug_Helper\Mocker;
require_once __DIR__ . '/interface-runner.php';
require_once __DIR__ . '/class-tools.php';
/**
* Creating the mock options.
*/
class Waf_R... |
projects/plugins/migration/wpcom-migration.php | <?php
/**
*
* Plugin Name: Move to WordPress.com
* Plugin URI: https://wordpress.org/plugins/wpcom-migration
* Description: A WordPress plugin that helps users to migrate their sites to WordPress.com.
* Version: 2.1.0-alpha
* Author: Automattic
* Author URI: https://wordpress.com/
* License: GPLv2 or later
* T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.