filename stringlengths 11 137 | content stringlengths 6 292k |
|---|---|
projects/packages/scheduled-updates/tests/php/class-wpcom-rest-api-v2-endpoint-update-schedules-test.php | <?php
/**
* Test class for WPCOM_REST_API_V2_Endpoint_Update_Schedules.
*
* @package automattic/scheduled-updates
*/
/**
* Test class for WPCOM_REST_API_V2_Endpoint_Update_Schedules.
*
* @coversDefaultClass WPCOM_REST_API_V2_Endpoint_Update_Schedules
*/
class WPCOM_REST_API_V2_Endpoint_Update_Schedules_Test ex... |
projects/packages/scheduled-updates/tests/lib/functions-wordpress.php | <?php
/**
* Functions that mock WordPress core functionality for testing purposes.
*
* @package automattic/scheduled-updates
*/
if ( ! function_exists( 'wpcom_rest_api_v2_load_plugin' ) ) {
/**
* A drop-in for a WordPress.com function.
*
* @param string $class_name The name of the class to load.
*/
funct... |
projects/packages/scheduled-updates/src/pluggable.php | <?php
/**
* Functions.
*
* @package automattic/scheduled-updates
*/
if ( ! function_exists( 'wp_get_scheduled_events' ) ) {
/**
* Retrieves scheduled events.
*
* Retrieves all the events that have been scheduled for the hook provided.
*
* This should really be in Core, and until it is, we'll define it h... |
projects/packages/scheduled-updates/src/class-scheduled-updates.php | <?php
/**
* Scheduled Updates
*
* @package automattic/scheduled-updates
*/
namespace Automattic\Jetpack;
/**
* Scheduled Updates class.
*/
class Scheduled_Updates {
/**
* The version of the package.
*
* @var string
*/
const PACKAGE_VERSION = '0.3.2-alpha';
/**
* Initialize the class.
*/
public... |
projects/packages/scheduled-updates/src/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-update-schedules.php | <?php
/**
* Endpoint to manage plugin and theme update schedules.
*
* Example: https://public-api.wordpress.com/wpcom/v2/update-schedules
*
* @package automattic/scheduled-updates
*/
// Load dependencies.
require_once dirname( __DIR__ ) . '/pluggable.php';
require_once dirname( __DIR__ ) . '/class-scheduled-upda... |
projects/packages/a8c-mc-stats/tests/php/test_Stats.php | <?php // phpcs:ignore Squiz.Commenting.FileComment.Missing
namespace Automattic\Jetpack;
use PHPUnit\Framework\TestCase;
/**
* Test A8c_Mc_Stats class
*/
class StatsTest extends TestCase {
/**
* Test add and get_current_status methods
*/
public function test_add_get() {
$stats = new A8c_Mc_Stats();
$s... |
projects/packages/a8c-mc-stats/tests/php/bootstrap.php | <?php //phpcs:ignore Squiz.Commenting.FileComment.Missing
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/a8c-mc-stats/src/class-a8c-mc-stats.php | <?php
/**
* Jetpack MC Stats package.
*
* @package automattic/jetpack-mc-stats
*/
namespace Automattic\Jetpack;
/**
* Class MC Stats, used to record stats using https://pixel.wp.com/g.gif
*/
class A8c_Mc_Stats {
/**
* Holds the stats to be processed
*
* @var array
*/
private $stats = array();
/**
... |
projects/packages/compat/functions.php | <?php
/**
* Legacy global scope functions.
*
* @package automattic/jetpack-compat
*/
// If WordPress's plugin API is available already, use it. If not,
// drop data into `$wp_filter` for `WP_Hook::build_preinitialized_hooks()`.
if ( function_exists( 'add_filter' ) ) {
$add_filter = 'add_filter';
$add_action = 'a... |
projects/packages/compat/legacy/class-jetpack-sync-settings.php | <?php
/**
* Legacy/deprecated Sync Setting getter and setter.
*
* @package automattic/jetpack-sync
*/
use Automattic\Jetpack\Sync\Settings;
/**
* Class Jetpack_Sync_Settings
*
* @deprecated Use Automattic\Jetpack\Sync\Settings
*/
class Jetpack_Sync_Settings {
/**
* Return all settings
*
* @deprecated ... |
projects/packages/compat/legacy/class-jetpacktracking.php | <?php
/**
* Legacy and deprecated Jetpack Tracking class.
*
* @package automattic/jetpack-compat
*/
use Automattic\Jetpack\Tracking;
/**
* Legacy class JetpackTracking
*
* @deprecated See Automattic\Jetpack\Tracking
*/
class JetpackTracking {
/**
* Enqueue tracks scripts.
*
* @deprecated See Automatti... |
projects/packages/compat/legacy/class-jetpack-client.php | <?php
/**
* Jetpack Client
*
* Deprecated methods for Jetpack to act as client with wpcom, provided for back-compatibility.
*
* @category Connection
* @package automattic/jetpack-compat
*/
use Automattic\Jetpack\Connection\Client;
/**
* Class Jetpack_Client
*
* @deprecated Use Automattic\Jetpack\Connection... |
projects/packages/compat/legacy/class-jetpack-sync-modules.php | <?php
/**
* A compatibility shim for the sync modules class.
*
* @package automattic/jetpack-compat
*/
use Automattic\Jetpack\Sync\Modules;
/**
* Class Jetpack_Sync_Modules
*
* @deprecated Use Automattic\Jetpack\Sync\Modules
*/
class Jetpack_Sync_Modules {
/**
* Returns the sync module object.
*
* @pa... |
projects/packages/compat/legacy/class-jetpack-sync-actions.php | <?php
/**
* A compatibility shim for the sync actions class.
*
* @package automattic/jetpack-compat
*/
use Automattic\Jetpack\Sync\Actions;
/**
* Class Jetpack_Sync_Actions
*
* @deprecated Use Automattic\Jetpack\Sync\Actions
*/
class Jetpack_Sync_Actions extends Automattic\Jetpack\Sync\Actions {
/**
* Ini... |
projects/packages/compat/lib/locales.php | <?php // phpcs:disable
// This file is copied over from GlotPress/GlotPress-WP project and does not nessitate linting.
if ( ! class_exists( 'GP_Locale' ) ) :
class GP_Locale {
public $english_name;
public $native_name;
public $text_direction = 'ltr';
public $lang_code_iso_639_1 = null;
public $lang_co... |
projects/packages/compat/lib/tracks/client.php | <?php
/**
* Deprecated Tracks client.
*
* @package automattic/jetpack-compat
*/
/**
* Get tracks identity for an user.
*
* @deprecated 7.5.0 use Automattic\Jetpack\Tracking->tracks_get_identity instead
*
* @param int $user_id User id.
*
* @return mixed tracks identity.
*/
function jetpack_tracks_get_identi... |
projects/packages/blaze/tests/php/test-blaze.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* This file contains PHPUnit tests for the Blaze class.
* To run the package unit tests, run jetpack test packages/blaze
*
* @package automattic/jetpack-blaze
*/
namespace Automattic\Jetpack;
use WorDBless\BaseTestCase;
/**
* PHPUnit tests... |
projects/packages/blaze/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
/**
* Load WorDBless
*/
\WorDBless\Load::load();
|
projects/packages/blaze/tests/php/test-dashboard.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* This file contains PHPUnit tests for the Blaze class.
* To run the package unit tests, run jetpack test packages/blaze
*
* @package automattic/jetpack-blaze
*/
namespace Automattic\Jetpack\Blaze;
use WorDBless\BaseTestCase;
/**
* PHPUnit... |
projects/packages/blaze/src/class-dashboard.php | <?php
/**
* A class that adds a Blaze dashboard to wp-admin.
*
* @since 0.7.0
*
* @package automattic/jetpack-blaze
*/
namespace Automattic\Jetpack\Blaze;
use Automattic\Jetpack\Assets;
/**
* Responsible for adding a Blaze dashboard menu to wp-admin.
* The screen content itself is rendered remotely.
*/
clas... |
projects/packages/blaze/src/class-blaze.php | <?php
/**
* Attract high-quality traffic to your site.
*
* @package automattic/jetpack-blaze
*/
namespace Automattic\Jetpack;
use Automattic\Jetpack\Blaze\Dashboard as Blaze_Dashboard;
use Automattic\Jetpack\Blaze\Dashboard_REST_Controller as Blaze_Dashboard_REST_Controller;
use Automattic\Jetpack\Blaze\REST_Cont... |
projects/packages/blaze/src/class-dashboard-config-data.php | <?php
/**
* Blaze dashboard Initial State
*
* @package automattic/jetpack-blaze
*/
namespace Automattic\Jetpack\Blaze;
use Automattic\Jetpack\Connection\Manager;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Current_Plan;
use Jetpack_Options;
/**
* Class Dashboard_Config_Data
*/
class Dashboard_Conf... |
projects/packages/blaze/src/class-rest-controller.php | <?php
/**
* The Blaze Rest Controller class.
* Registers the REST routes for Blaze Dashboard.
*
* @package automattic/jetpack-blaze
*/
namespace Automattic\Jetpack\Blaze;
use Automattic\Jetpack\Blaze;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Status\Host;
use WP_Erro... |
projects/packages/blaze/src/class-dashboard-rest-controller.php | <?php
/**
* The Blaze Rest Controller class.
* Registers the REST routes for Blaze Dashboard.
*
* @package automattic/jetpack-blaze
*/
namespace Automattic\Jetpack\Blaze;
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Status\Host;... |
projects/packages/forms/tests/php/bootstrap.php | <?php
/**
* Unit test boosstrap code.
*
* @package automattic/jetpack-forms
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
\WorDBless\Load::load();
// Some of the legacy test rely on this constant
if ( ! defined( 'JETPACK__VERSION' ) ) {
define( 'JETPACK__VER... |
projects/packages/forms/tests/php/contact-form/test-class.contact-form.php | <?php
/**
* Unit Tests for Automattic\Jetpack\Forms\Contact_Form.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
use WorDBless\BaseTestCase;
use WorDBless\Posts;
/**
* Test class for Contact_Form
*
* @covers Contact_Form
*/
class WP_Test_Contact_Form extends BaseTest... |
projects/packages/forms/tests/php/contact-form/test-class.contact-form-plugin.php | <?php
/**
* Unit Tests for Automattic\Jetpack\Forms\Contact_Form.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
use WorDBless\BaseTestCase;
/**
* Test class for Contact_Form
*
* @covers Contact_Form_Plugin
*/
class WP_Test_Contact_Form_Plugin extends BaseTestCase {
... |
projects/packages/forms/src/class-jetpack-forms.php | <?php
/**
* Package description here
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms;
use Automattic\Jetpack\Forms\ContactForm\Util;
use Automattic\Jetpack\Forms\Dashboard\Dashboard;
use Automattic\Jetpack\Forms\Dashboard\Dashboard_View_Switch;
/**
* Understands the Jetpack Forms pack... |
projects/packages/forms/src/class-wpcom-rest-api-v2-endpoint-forms.php | <?php
/**
* The Forms Rest Controller class.
* Registers the REST routes for Jetpack Forms (taken from stats-admin).
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms;
use Automattic\Jetpack\Connection\Manager;
use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin;
use WP_Error;
... |
projects/packages/forms/src/blocks/contact-form/class-contact-form-block.php | <?php
/**
* Contact Form Block.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Extensions\Contact_Form;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Blocks;
use Automattic\Jetpack\Forms\ContactForm\Contact_Form;
use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin;
use Jetpack;
... |
projects/packages/forms/src/contact-form/class-contact-form-plugin.php | <?php
/**
* Contact_Form_Plugin class.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Extensions\Contact_Form\Contact_Form_Block;
use Automattic\Jetpack\Forms\Jetpack_Forms;
use Automattic\Jetpack\Forms\Service\Post_To... |
projects/packages/forms/src/contact-form/class-contact-form.php | <?php
/**
* Contact_Form class.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
use Automattic\Jetpack\Sync\Settings;
/**
* Class for the contact-form shortcode.
* Parses shortcode to output the contact form as HTML
* Sends email and stores the contact form response (a... |
projects/packages/forms/src/contact-form/class-admin.php | <?php
/**
* Admin class.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Assets\Logo;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Forms\Service\Google_Drive;
use Automattic\Je... |
projects/packages/forms/src/contact-form/class-form-view.php | <?php
/**
* Contact_Form_View class.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Forms\Jetpack_Forms;
/**
* Template for form builder
*/
class Form_View {
/**
* Display form view.
*/
public static function... |
projects/packages/forms/src/contact-form/class-contact-form-shortcode.php | <?php
/**
* Contact_Form_Shortcode class.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
/**
* Generic shortcode class.
* Does nothing other than store structured data and output the shortcode as a string
*
* Not very general - specific to Grunion.
*
* // phpcs:disa... |
projects/packages/forms/src/contact-form/class-contact-form-endpoint.php | <?php
/**
* Contact_Form_Endpoint class.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
/**
* Class Grunion_Contact_Form_Endpoint
* Used as 'rest_controller_class' parameter when 'feedback' post type is registered in modules/contact-form/grunion-contact-form.php.
*/
cl... |
projects/packages/forms/src/contact-form/class-util.php | <?php
/**
* Contact_Form_Util class.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
/**
* This class serves as a container for what previously were standalone grunion functions.
* In the long term we should aim to move things to other classes and gradually get rid of th... |
projects/packages/forms/src/contact-form/class-contact-form-field.php | <?php
/**
* Contact_Form_Field class.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;
use Automattic\Jetpack\Assets;
/**
* Class for the contact-field shortcode.
* Parses shortcode to output the contact form field as HTML.
* Validates input.
*/
class Contact_Form_Fiel... |
projects/packages/forms/src/contact-form/class-editor-view.php | <?php
/**
* 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 Stephanis
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\ContactForm;... |
projects/packages/forms/src/contact-form/templates/email-response.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/packages/forms/src/dashboard/class-dashboard.php | <?php
/**
* Jetpack forms dashboard.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\Dashboard;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Forms\Jetpack_Forms;
use Automattic\Jetpack\Forms\Service\Google_Drive;... |
projects/packages/forms/src/dashboard/class-dashboard-view-switch.php | <?php
/**
* Jetpack forms dashboard view switch.
*
* @package automattic/jetpack-forms
*/
namespace Automattic\Jetpack\Forms\Dashboard;
use Automattic\Jetpack\Forms\Jetpack_Forms;
use JETPACK__VERSION;
/**
* Understands switching between classic and redesigned versions of the feedback admin area.
*/
class Dash... |
projects/packages/forms/src/service/class-google-drive.php | <?php
/**
* Google Drive helper.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Forms\Service;
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager;
use Automattic\Jetpack\Status\Visitor;
/**
* Class Google_Drive
*/
class Google_Drive {
/**
* Checks if the use... |
projects/packages/forms/src/service/class-post-to-url.php | <?php
/**
* Post to URL using Jetpack Contact Forms.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Forms\Service;
/**
* Class Post_To_Url
*
* Hooks on Jetpack's Contact form to post form data to some URL.
*/
class Post_To_Url {
/**
* Singleton instance
*
* @var Post_To_Url
*/
priva... |
projects/packages/boost-core/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/boost-core/src/contracts/boost-api-client.php | <?php
/**
* Boost API Client interface.
*
* @package automattic/jetpack-boost-core
*/
namespace Automattic\Jetpack\Boost_Core\Contracts;
/**
* An interface to build Boost API client.
*
* Communication with Boost back-end should be done through this interface.
*/
interface Boost_API_Client {
/**
* Submit a... |
projects/packages/boost-core/src/lib/class-utils.php | <?php
/**
* Utility class.
*
* @package automattic/jetpack-boost-core
*/
namespace Automattic\Jetpack\Boost_Core\Lib;
use Automattic\Jetpack\Connection\Client;
/**
* Class Utils
*/
class Utils {
/**
* Standardize error format.
*
* @param mixed $error Error.
*
* @return array
*/
public static func... |
projects/packages/boost-core/src/lib/class-transient.php | <?php
/**
* Transients for Jetpack Boost.
*
* @package automattic/jetpack-boost-core
*/
namespace Automattic\Jetpack\Boost_Core\Lib;
/**
* Class Transient
*/
class Transient {
const OPTION_PREFIX = 'jb_transient_';
/**
* Get the key with prefix.
*
* @param string $key the key to be prefixed.
*/
pub... |
projects/packages/boost-core/src/lib/class-cacheable.php | <?php
/**
* Base abstract class for cacheable value objects.
*
* @package automattic/jetpack-boost-core
*/
namespace Automattic\Jetpack\Boost_Core\Lib;
/**
* Class Cacheable.
*/
abstract class Cacheable implements \JsonSerializable {
/**
* Default cache expiry.
*/
const DEFAULT_EXPIRY = 300; // 5 minutes... |
projects/packages/boost-core/src/lib/class-wpcom-boost-api-client.php | <?php
/**
* WPCOM Boost API Client interface.
*
* @package automattic/jetpack-boost-core
*/
namespace Automattic\Jetpack\Boost_Core\Lib;
use Automattic\Jetpack\Boost_Core\Contracts\Boost_API_Client;
/**
* A class that handles the Boost API client.
*
* The communication to the backend is done using this class ... |
projects/packages/boost-core/src/lib/class-url.php | <?php
/**
* Implement the URL normalizer.
*
* @package automattic/jetpack-boost-core
*/
namespace Automattic\Jetpack\Boost_Core\Lib;
/**
* Class Url
*/
class Url {
const PARAMS_TO_EXCLUDE = array( 'utm_campaign', 'utm_medium', 'utm_source', 'utm_content', 'fbclid', '_ga', 'jb-disable-modules' );
const PARA... |
projects/packages/boost-core/src/lib/class-boost-api.php | <?php
/**
* A helper class to help with Boost API interactions.
*
* @package automattic/jetpack-boost-core
*/
namespace Automattic\Jetpack\Boost_Core\Lib;
use Automattic\Jetpack\Boost_Core\Contracts\Boost_API_Client;
/**
* A class that handles the Boost API client.
*
* The communication to the backend is done... |
projects/packages/connection/tests/php/test_Tokens.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Tokens functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use DateTime;
use Jetpack_Options;
use PHPUnit\Framework\TestCase;
use WP_Error;
use Wp... |
projects/packages/connection/tests/php/test-tracking.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Tests for Automattic\Jetpack\Tracking methods
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
use Brain\Monkey;
use PHPUnit\Framework\TestCase;
/**
* Tracking test suite.
*/
class Test_Tracking extends TestCas... |
projects/packages/connection/tests/php/test_jetpack_xmlrpc_server.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Tests the Legacy Jetpack_XMLRPC_Server class.
*/
use Automattic\Jetpack\Connection\Tokens;
use Automattic\Jetpack\Constants;
use WorDBless\BaseTestCase;
/**
* Class to test the legacy Jetpack_XMLRPC_Server class.
*/
class Jetpack_XMLRPC_S... |
projects/packages/connection/tests/php/test-initial-state.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Status;
use PHPUnit\Framework\TestCase;
/**
* Unit tests for the Initial_State class.
*
* @package automattic/jetpack-connection
*/
class Test_Initial_State extends TestCase {
/**... |
projects/packages/connection/tests/php/test_Signature.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* The SignatureTest class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use PHPUnit\Framework\TestCase;
use stdClass;
/**
* Provides unit tests for the methods in the Jetpack_Signature class.
... |
projects/packages/connection/tests/php/test-package-version.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Connection;
use PHPUnit\Framework\TestCase;
/**
* Unit tests for the Package_Version class.
*
* @package automattic/jetpack-connection
*/
class Test_Package_Version extends TestCase {
/**
* Tests that the conncti... |
projects/packages/connection/tests/php/test-terms-of-service.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Tests the TOS package.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
use Brain\Monkey;
use Brain\Monkey\Functions;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase;
/**
* ... |
projects/packages/connection/tests/php/test-class-webhooks.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Unit tests for the Connection Webhooks class.
*
* @package automattic/jetpack-connection
* @see \Automattic\Jetpack\Connection\Webhooks
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use Brain\Monkey;
use PHP... |
projects/packages/connection/tests/php/test_XMLPC_Async_Call.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Connection Manager functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use WorDBless\BaseTestCase;
require_once ABSPATH . WPINC . '/IXR/class-IXR-client.php';
/**
* Connection Ma... |
projects/packages/connection/tests/php/test_Utils.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* The UtilsTest class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use PHPUnit\Framework\TestCase;
/**
* Provides unit tests for the methods in the Utils clas... |
projects/packages/connection/tests/php/test_Error_Handler.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Connection Manager functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use WorDBless\BaseTestCase;
/**
* Connection Manager functionality testing.
*/
class Error_Handler_Test ex... |
projects/packages/connection/tests/php/test_Rest_Authentication.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* REST Authentication functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use PHPUnit\Framework\TestCase;
/**
* REST Authentication functionality testing.
*/
class REST_Authentica... |
projects/packages/connection/tests/php/test_plugin_storage.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Unit tests for the Connection Plugin Storage class.
*
* @package automattic/jetpack-connection
* @see \Automattic\Jetpack\Connection\Plugin_Storage
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use PHPUnit\F... |
projects/packages/connection/tests/php/test_Manager_unit.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Connection Manager functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Status\Cache as StatusCache;
use PHPUnit\Framework\T... |
projects/packages/connection/tests/php/test-class-nonce-handler.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* The nonce handler tests.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use PHPUnit\Framework\TestCase;
/**
* The nonce handler tests.
*/
class Test_Nonce_Handler extends TestCase {
/**
* The ... |
projects/packages/connection/tests/php/bootstrap.php | <?php
/**
* Initialize the testing environment.
*
* @package automattic/jetpack-connection
*/
/**
* Load the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
// Work around WordPress bug when `@runInSeparateProcess` is used.
if ( empty( $_SERVER['SCRIPT_FILENAME'] ) ) {
$_SERVER['SC... |
projects/packages/connection/tests/php/test-class-connection-notice.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* The nonce handler tests.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use PHPUnit\Framework\TestCase;
/**
* The nonce handler tests.
*/
class Test_Connection_No... |
projects/packages/connection/tests/php/test_Secrets.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Secrets functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use PHPUnit\Framework\TestCase;
/**
* Secrets functionality testing.
*/
class SecretsTest extends TestCase {
/**
... |
projects/packages/connection/tests/php/test_Manager_integration.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Connection Manager functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
/**
* Connection Manager functionality testing.
*/
class ManagerIntegrat... |
projects/packages/connection/tests/php/test_Jetpack_IXR_ClientMulticall.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Connection Manager functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Jetpack_IXR_ClientMulticall;
use WorDBless\BaseTestCase;
require_once ABSPATH . WPINC . '/IXR/class-IXR-... |
projects/packages/connection/tests/php/test_XMLRPC_Connector.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Connection Manager functionality testing.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use PHPUnit\Framework\TestCase;
/**
* Text XMLRPC Connector
*/
class XMLRPC_Connector_Test extends TestCas... |
projects/packages/connection/tests/php/test-rest-endpoints.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Connection\Package_Version_Tracker as Connection_Package_Version_Tracker;
use Automattic\Jetpack\Connection\Plugin as Connection_Plugin;
use Automattic\Jetpack\Connection\Plugin_Storage ... |
projects/packages/connection/tests/php/test-partner-coupon.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Tests the partner-coupon package.
*
* @package automattic/jetpack-connection
*/
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
namespace Automattic\Jetpack;
use Jetpack_Options;
use PHPUnit\Framework\TestCa... |
projects/packages/connection/tests/php/test_package_version_tracker.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use PHPUnit\Framework\TestCase;
use WorDBless\Options as WorDBless_Options;
/**
* Unit tests for the Package_Version_Tracker class.
*
* @package automattic/jetpack-connect... |
projects/packages/connection/tests/php/test_Server_Sandbox.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use Brain\Monkey;
use Brain\Monkey\Actions;
use WorDBless\BaseTestCase;
/**
* Unit tests for the Server_Sandbox class.
*
* @package automattic/jetpack-connection
*/
class... |
projects/packages/connection/tests/php/test-partner.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Tests the partner package.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
use PHPUnit\Framework\TestCase;
/**
* Class Partner_Test
*
* @package Automattic\jetpack-connection
* @covers Automattic\Jetpack\Par... |
projects/packages/connection/tests/php/test-class-plugin.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Unit tests for the Connection Plugin Manager class.
*
* @package automattic/jetpack-connection
* @see \Automattic\Jetpack\Connection\Plugin
*/
namespace Automattic\Jetpack\Connection;
use PHPUnit\Framework\TestCase;
/**
* Unit tests for ... |
projects/packages/connection/legacy/class-jetpack-xmlrpc-server.php | <?php
/**
* Jetpack XMLRPC Server.
*
* @package automattic/jetpack-connection
*/
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Connection\Secrets;
use Automattic\Jetpack\Connection\Tokens;
use Automattic\Jetpack\Connection\Urls;
us... |
projects/packages/connection/legacy/class-jetpack-options.php | <?php
/**
* Legacy Jetpack_Options class.
*
* @package automattic/jetpack-connection
*/
use Automattic\Jetpack\Constants;
/**
* Class Jetpack_Options
*/
class Jetpack_Options {
/**
* An array that maps a grouped option type to an option name.
*
* @var array
*/
private static $grouped_options = array(... |
projects/packages/connection/legacy/class-jetpack-ixr-client.php | <?php
/**
* IXR_Client
*
* @package automattic/jetpack-connection
*
* @since 1.7.0
* @since-jetpack 1.5
* @since-jetpack 7.7 Moved to the jetpack-connection package.
*/
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager;
if ( ! class_exists( IXR_Client::class ) ) {
require_on... |
projects/packages/connection/legacy/class-jetpack-signature.php | <?php
/**
* The Jetpack Connection signature class file.
*
* @package automattic/jetpack-connection
*/
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
/**
* The Jetpack Connection signature class that is used to sign requests.
*/
class Jetpack_Signature {
/**
* Token part of the access token... |
projects/packages/connection/legacy/class-jetpack-tracks-client.php | <?php
/**
* Legacy Jetpack Tracks Client
*
* @package automattic/jetpack-tracking
*/
use Automattic\Jetpack\Connection\Manager;
/**
* Jetpack_Tracks_Client
*
* Send Tracks events on behalf of a user
*
* Example Usage:
```php
require( dirname(__FILE__).'path/to/tracks/class-jetpack-tracks-client.php' );
$r... |
projects/packages/connection/legacy/class-jetpack-tracks-event.php | <?php
/**
* Class Jetpack_Tracks_Event. Legacy.
*
* @package automattic/jetpack-sync
*/
/*
* Example Usage:
```php
require_once( dirname(__FILE__) . 'path/to/tracks/class-jetpack-tracks-event.php' );
$event = new Jetpack_Tracks_Event( array(
'_en' => $event_name, // required
'_ui' => $u... |
projects/packages/connection/legacy/class-jetpack-ixr-clientmulticall.php | <?php
/**
* IXR_ClientMulticall
*
* @package automattic/jetpack-connection
*
* @since 1.7.0
* @since-jetpack 1.5
* @since-jetpack 7.7 Moved to the jetpack-connection package.
*/
/**
* A Jetpack implementation of the WordPress core IXR client, capable of multiple calls in a single request.
*/
class Jetpack_IX... |
projects/packages/connection/src/class-error-handler.php | <?php
/**
* The Jetpack Connection error class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* The Jetpack Connection Errors that handles errors
*
* This class handles the following workflow:
*
* 1. A XML-RCP request with an invalid signature triggers a erro... |
projects/packages/connection/src/class-rest-connector.php | <?php
/**
* Sets up the Connection REST API endpoints.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Redirect;
use Automattic\Jetpack\Status;
use Jetpack_XMLRPC_Server;
use WP_Error;
use WP_REST_Request;
use WP_REST_... |
projects/packages/connection/src/class-plugin-storage.php | <?php
/**
* Storage for plugin connection information.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use WP_Error;
/**
* The class serves a single purpose - to store the data which plugins use the connection, along with some auxiliary information.
*/
class Plugin_Storag... |
projects/packages/connection/src/class-terms-of-service.php | <?php
/**
* A Terms of Service class for Jetpack.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
/**
* Class Terms_Of_Service
*
* Helper class that is responsible for the state of agreement of the terms of service.
*/
class Terms_Of_Service {
/**
* Jetpack option name where the... |
projects/packages/connection/src/class-client.php | <?php
/**
* The Connection Client class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
/**
* The Client class that is used to connect to WordPress.com Jetpack API.
*/
class Client {
const WPCOM_JSON_API_VERSION = '1.1';
/**
* ... |
projects/packages/connection/src/class-rest-authentication.php | <?php
/**
* The Jetpack Connection Rest Authentication file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* The Jetpack Connection Rest Authentication class.
*/
class Rest_Authentication {
/**
* The rest authentication status.
*
* @since 1.17.0
* @var bool... |
projects/packages/connection/src/class-utils.php | <?php
/**
* The Jetpack Connection package Utils class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Tracking;
/**
* Provides utility methods for the Connection package.
*/
class Utils {
const DEFAULT_JETPACK__API_VERSION = 1;
con... |
projects/packages/connection/src/class-partner-coupon.php | <?php
/**
* Class for the Jetpack partner coupon logic.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
use Automattic\Jetpack\Connection\Client as Connection_Client;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Jetpack_Options;
/**
* Disable direct access.
*... |
projects/packages/connection/src/class-package-version.php | <?php
/**
* The Package_Version class.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* The Package_Version class.
*/
class Package_Version {
const PACKAGE_VERSION = '2.3.4';
const PACKAGE_SLUG = 'connection';
/**
* Adds the package slug and version to the pac... |
projects/packages/connection/src/interface-manager.php | <?php
/**
* The Jetpack Connection Interface file.
* No longer used.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* This interface is no longer used and is now deprecated.
*
* @deprecated since jetpack 7.8
*/
interface Manager_Interface {
}
|
projects/packages/connection/src/class-tokens-locks.php | <?php
/**
* The Jetpack Connection Tokens Locks class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
*
* Jetpack Connection tokens cleanup during migration.
* This class encapsulates plugin or tool specific code that activates token lock upon migration.
*
* T... |
projects/packages/connection/src/class-initial-state.php | <?php
/**
* The React initial state.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Status;
/**
* The React initial state.
*/
class Initial_State {
/**
* Get the initial state data.
*
* @return array
*/
private static function get_data()... |
projects/packages/connection/src/class-partner.php | <?php
/**
* Jetpack Partner utilities.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
/**
* This class introduces functionality used by Jetpack hosting partners.
*
* @since partner-1.0.0
* @since 2.0.0
*/
class Partner {
/**
* Affiliate code.
*/
const AFFILIATE_CODE = 'af... |
projects/packages/connection/src/class-connection-notice.php | <?php
/**
* Admin connection notices.
*
* @package automattic/jetpack-admin-ui
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Redirect;
use Automattic\Jetpack\Tracking;
/**
* Admin connection notices.
*/
class Connection_Notice {
/**
* Whether the class has been initialized.
*
* @va... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.