filename stringlengths 11 137 | content stringlengths 6 292k |
|---|---|
projects/packages/sync/src/modules/class-menus.php | <?php
/**
* Menus sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
/**
* Class to handle sync for menus.
*/
class Menus extends Module {
/**
* Navigation menu items that were added but not synced yet.
*
* @access private
*
* @var array
*/
private $nav... |
projects/packages/sync/src/modules/class-stats.php | <?php
/**
* Stats sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Heartbeat;
/**
* Class to handle sync for stats.
*/
class Stats extends Module {
/**
* Sync module name.
*
* @access public
*
* @return string
*/
public functio... |
projects/packages/sync/src/modules/class-meta.php | <?php
/**
* Meta sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
/**
* Class to handle sync for meta.
*/
class Meta extends Module {
/**
* Sync module name.
*
* @access public
*
* @return string
*/
public function name() {
return 'meta';
}
/**
... |
projects/packages/sync/src/modules/class-users.php | <?php
/**
* Users sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Constants as Jetpack_Constants;
use Automattic\Jetpack\Password_Checker;
use Automattic\Jetpack\Sync\Defaults;
/**
* Class to handle sync for users.
*/
class Users extends Mo... |
projects/packages/sync/src/modules/class-comments.php | <?php
/**
* Comments sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Settings;
/**
* Class to handle sync for comments.
*/
class Comments extends Module {
/**
* Sync module name.
*
* @access ... |
projects/packages/sync/src/modules/class-options.php | <?php
/**
* Options sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Defaults;
use Automattic\Jetpack\Sync\Settings;
/**
* Class to handle sync for options.
*/
class Options extends Module {
/**
* Whitelist for options we want to syn... |
projects/packages/sync/src/modules/class-woocommerce-hpos-orders.php | <?php
/**
* WooCommerce HPOS orders sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore;
/**
* Adds WooCommerce HPOS specific data to sync when HPOS is enabled on the site.
*/
class WooCommerc... |
projects/packages/sync/src/modules/class-constants.php | <?php
/**
* Constants sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Defaults;
/**
* Class to handle sync for constants.
*/
class Constants extends Module {
/**
* Name of the constants checksum option.
*
* @var string
*/
con... |
projects/packages/sync/src/modules/class-search.php | <?php
/**
* Configuration lists for Jetpack Search Fields
*
* Post Meta: list of post meta keys that are available in the index
* and how they are configured.
*
* Custom Taxonomy: list of custom taxonomies that are indexed.
*
* The reason we need an allowed list is that Elasticsearch runs into scaling problem... |
projects/packages/sync/src/modules/class-term-relationships.php | <?php
/**
* Term relationships sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Listener;
use Automattic\Jetpack\Sync\Settings;
/**
* Class to handle sync for term relationships.
*/
class Term_Relationships extends Module {
/**
* Ma... |
projects/packages/sync/src/modules/class-terms.php | <?php
/**
* Terms sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Defaults;
use Automattic\Jetpack\Sync\Settings;
/**
* Class to handle sync for terms.
*/
class Terms extends Module {
/**
* Sync module name.
*
* @access public
... |
projects/packages/sync/src/modules/class-themes.php | <?php
/**
* Themes sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
/**
* Class to handle sync for themes.
*/
class Themes extends Module {
/**
* Sync module name.
*
* @access public
*
* @return string
*/
public function name() {
return 'themes';
}... |
projects/packages/sync/src/modules/class-network-options.php | <?php
/**
* Network Options sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Defaults;
/**
* Class to handle sync for network options.
*/
class Network_Options extends Module {
/**
* Whitelist for network options we want to sync.
*... |
projects/packages/sync/src/modules/class-protect.php | <?php
/**
* Protect sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Constants as Jetpack_Constants;
use Automattic\Jetpack\Waf\Brute_Force_Protection\Brute_Force_Protection;
/**
* Class to handle sync for Protect.
* Logs BruteProtect failed... |
projects/packages/sync/src/modules/class-import.php | <?php
/**
* Import sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Settings;
/**
* Class to handle sync for imports.
*/
class Import extends Module {
/**
* Tracks which actions have already been synced for the import
* to prevent... |
projects/packages/sync/src/modules/class-callables.php | <?php
/**
* Callables sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Constants as Jetpack_Constants;
use Automattic\Jetpack\Sync\Dedicated_Sender;
use Automattic\Jetpack\Sync\Defaults;
use Automattic\Jetpack\Sync\Functions;
use Automattic\Jet... |
projects/packages/sync/src/modules/class-full-sync.php | <?php
/**
* Full sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Listener;
use Automattic\Jetpack\Sync\Lock;
use Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Sync\Queue;
use Automattic\Jetpack\Sync\Settings;
/**
* This class ... |
projects/packages/sync/src/modules/class-updates.php | <?php
/**
* Updates sync module.
*
* @package automattic/jetpack-sync
*/
namespace Automattic\Jetpack\Sync\Modules;
use Automattic\Jetpack\Constants as Jetpack_Constants;
/**
* Class to handle sync for updates.
*/
class Updates extends Module {
/**
* Name of the updates checksum option.
*
* @var string
... |
projects/packages/post-list/tests/php/test-post-thumbnail.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* This file contains PHPUnit tests for the Post_Thumbnail class.
* To run the package unit tests:
* - go the post-list folder "cd projects/packages/post-list"
* - run the command "composer test-php"
*
* @package automattic/jetpack-post-list
... |
projects/packages/post-list/tests/php/test-post-list.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* This file contains PHPUnit tests for the Post_List class.
* To run the package unit tests:
* - go the post-list folder "cd projects/packages/post-list"
* - run the command "composer test-php"
*
* @package automattic/jetpack-post-list
*/
n... |
projects/packages/post-list/tests/php/bootstrap.php | <?php
/**
* Bootstrap for tests.
*
* @package Automattic/jetpack-post-list
*/
/**
* Composer's autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
/**
* Load WorDBless
*/
\WorDBless\Load::load();
|
projects/packages/post-list/src/class-post-list.php | <?php
/**
* The Post List Admin Area.
*
* @package automattic/jetpack-post-list
*/
namespace Automattic\Jetpack\Post_List;
/**
* The Post_List Admin Area
*/
class Post_List {
const PACKAGE_VERSION = '0.6.0';
const FEATURE = 'enhanced_post_list';
/**
* The configuration method that is called from ... |
projects/packages/post-list/src/class-post-thumbnail.php | <?php
/**
* This file contains the Post_Thumbnail class used for finding a suitable thumbnail for a post.
*
* @package automattic/jetpack-post-list
*/
namespace Automattic\Jetpack\Post_List;
/**
* The Post_Thumbnail class contains methods to find and return a suitable thumbnail for a post.
*/
class Post_Thumbna... |
projects/packages/publicize/tests/php/test-class-share-limits.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Main plugin file testing.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use WorDBless\BaseTestCase;
/**
* Main plugin file testing.
*/
class Share_Limits_Test extends BaseTestCase {
/**
* Get a l... |
projects/packages/publicize/tests/php/test-connections-post-field.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Publicize;
use Jetpack_Options;
use PHPUnit\Framework\TestCase;
use WorDBless\Options as WorDBless_Options;
use WorDBless\Posts as WorDBless_Posts;
use WorDBless\Users as WorDBless_Users;
use WP_REST_Request;
use WP_REST_... |
projects/packages/publicize/tests/php/bootstrap.php | <?php
/**
* Initialize the testing environment.
*
* @package automattic/jetpack-publicize
*/
/**
* Load the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
define( 'WP_DEBUG', true );
\WorDBless\Load::load();
|
projects/packages/publicize/tests/php/test-publicize-rest-controller.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Connection\Rest_Authentication as Connection_Rest_Authentication;
use PHPUnit\Framework\TestCase;
use WorDBless\Options as WorDBless_Options;
use WorDBless\Posts as WorDBless_Posts;
use W... |
projects/packages/publicize/tests/php/test-publicize-og-optimization.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Testing the Settings class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use WorDBless\BaseTestCase;
/**
* Testing the Settings class.
*/
class Publicize_OG_Optimization_Test extends BaseTestCase {... |
projects/packages/publicize/tests/php/test-social-image-generator/test-utilities.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Testing the utility methods.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use WorDBless\BaseTestCase;
use function Automattic\Jetpack\Publicize\Social_Image_Generator\get_image_url;
/**
* Testing th... |
projects/packages/publicize/tests/php/test-social-image-generator/test-rest-token-controller.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Publicize\Social_Image_Generator;
use Automattic\Jetpack\Connection\Tokens;
use Automattic\Jetpack\Constants;
use Jetpack_Options;
use PHPUnit\Framework\TestCase;
use WorDBless\Options as WorDBless_Options;
use WorDBless\... |
projects/packages/publicize/tests/php/test-social-image-generator/test-post-settings.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Testing the Post_Settings class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Publicize\Social_Image_Generator\Post_Settings;
use Automattic\Jetpack\Publicize\Social_Image_Gener... |
projects/packages/publicize/tests/php/jetpack-social-settings/test-jetpack-social-settings.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Testing the Settings class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Publicize\Jetpack_Social_Settings\Settings as SocialSettings;
use Automattic\Jetpack\Publicize\Social_Im... |
projects/packages/publicize/tests/php/jetpack-social-settings/test-dismissed-notices.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Testing the Dismissed Notices functionality.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Publicize\Jetpack_Social_Settings\Dismissed_Notices;
use WorDBless\BaseTestCase;
use Wo... |
projects/packages/publicize/tests/php/jetpack-social-settings/test-social-image-generator-settings.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Testing the Settings class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Current_Plan;
use Automattic\Jetpack\Publicize\Jetpack_Social_Settings\Settings as SocialSettings;
use A... |
projects/packages/publicize/tests/php/jetpack-social-settings/test-auto-conversion.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Testing the Settings class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Publicize\Jetpack_Social_Settings\Settings as SocialSettings;
use WorDBless\BaseTestCase;
use WorDBless\... |
projects/packages/publicize/src/class-publicize-ui.php | <?php
/**
* Publicize_UI class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Assets;
/**
* Only user facing pieces of Publicize are found here.
*/
class Publicize_UI {
/**
* Contains an instance of class 'Publicize' which loads Keyring, sets up ... |
projects/packages/publicize/src/class-publicize-base.php | <?php
/**
* Publicize_Base class.
*
* @package automattic/jetpack-publicize
*/
// phpcs:disable WordPress.NamingConventions.ValidVariableName
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\C... |
projects/packages/publicize/src/class-publicize-setup.php | <?php
/**
* Main Publicize class.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Publicize;
/**
* The class to configure and initialize the publicize package.
*/
class Publicize_Setup {
/**
* Whether to update the plan information from WPCOM when initialising the package.
*
* @var bool;... |
projects/packages/publicize/src/class-keyring-helper.php | <?php
/**
* Keyring helper.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Connection\Secrets;
use Automattic\Jetpack\Paths;
use Jetpack_IXR_Client;
use Jetpack_Options;
/**
* A series of utilities to interact with a Keyring instance.
*/
class Keyrin... |
projects/packages/publicize/src/class-share-limits.php | <?php
/**
* Enforce sharing limits for Jetpack Social.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Redirect;
/**
* Enforce sharing limits for Jetpack Social.
*/
class Share_Limits {
/**
* List of all connections.
... |
projects/packages/publicize/src/class-connections-post-field.php | <?php
/**
* Registers the API field for Publicize connections.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
/**
* The class to register the field and augment requests
* to Publicize supported post types.
*/
class Connections_Post_Field {
const FIELD_NAME = 'jetpack_pub... |
projects/packages/publicize/src/class-rest-controller.php | <?php
/**
* The Publicize Rest Controller class.
* Registers the REST routes for Publicize.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Connection\Client;
use Jetpack_Options;
use WP_Error;
use WP_REST_Server;
/**
* Registers the REST routes for S... |
projects/packages/publicize/src/class-publicize.php | <?php
/**
* Publicize class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize;
use Automattic\Jetpack\Connection\Tokens;
use Automattic\Jetpack\Redirect;
use Jetpack_IXR_Client;
use Jetpack_Options;
/**
* Extend the base class with Jetpack-specific functionality.
*/
class Pub... |
projects/packages/publicize/src/social-image-generator/class-rest-token-controller.php | <?php
/**
* Defines the endpoints used for handling tokens for the Social Image Generator.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Social_Image_Generator;
use WP_Error;
use WP_REST_Controller;
use WP_REST_Server;
/**
* Class used to register token related REST API end... |
projects/packages/publicize/src/social-image-generator/class-templates.php | <?php
/**
* Templates class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Social_Image_Generator;
/**
* This class is used to get information about templates.
*/
class Templates {
/**
* Available templates.
*
* @var array
*/
const TEMPLATES = array( 'highway', 'd... |
projects/packages/publicize/src/social-image-generator/class-rest-settings-controller.php | <?php
/**
* Class used to register REST API settings endpoints used by Social Image Generator.
*
* Flagged to be removed after deprecation.
*
* @deprecated $$next_version$$
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Social_Image_Generator;
use Automattic\Jetpack\Public... |
projects/packages/publicize/src/social-image-generator/class-setup.php | <?php
/**
* Setup class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Social_Image_Generator;
use Automattic\Jetpack\Publicize\Jetpack_Social_Settings\Settings;
/**
* Class for setting up Social Image Generator-related functionality.
*/
class Setup {
/**
* Initialise S... |
projects/packages/publicize/src/social-image-generator/utilities.php | <?php
/**
* Utilities.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Social_Image_Generator;
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Publicize\REST_Controller;
use Automattic\Jetpack\Redirect;
/**
* Given a post ID, returns the image URL for the gen... |
projects/packages/publicize/src/social-image-generator/class-post-settings.php | <?php
/**
* PostSettings class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Social_Image_Generator;
use Automattic\Jetpack\Publicize\Publicize;
/**
* This class is used to get SIG-specific information from a post.
*/
class Post_Settings {
/**
* Post to get information... |
projects/packages/publicize/src/social-image-generator/class-settings.php | <?php
/**
* Settings class.
*
* Flagged to be removed after deprecation.
*
* @deprecated $$next_version$$
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Social_Image_Generator;
use Automattic\Jetpack\Publicize\Jetpack_Social_Settings\Settings as Jetpack_Social_Settings;
/... |
projects/packages/publicize/src/auto-conversion-settings/class-rest-settings-controller.php | <?php
/**
* Class used to register REST API auto-conversion settings endpoints.
*
* Flagged to be removed after deprecation.
*
* @deprecated $$next_version$$
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Auto_Conversion;
use Automattic\Jetpack\Publicize\Jetpack_Social_Set... |
projects/packages/publicize/src/auto-conversion-settings/class-settings.php | <?php
/**
* Settings class.
* Flagged to be removed after deprecation.
*
* @deprecated $$next_version$$
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Auto_Conversion;
use Automattic\Jetpack\Publicize\Jetpack_Social_Settings\Settings as Jetpack_Social_Settings;
/**
* This... |
projects/packages/publicize/src/jetpack-social-settings/class-dismissed-notices.php | <?php
/**
* Dismissed notices handler class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Jetpack_Social_Settings;
/**
* This class is used to register the dismissed notices option.
*/
class Dismissed_Notices {
const DISMISSED_NOTICES_OPTION = 'jetpack_social_dismissed_n... |
projects/packages/publicize/src/jetpack-social-settings/class-settings.php | <?php
/**
* Settings class.
*
* @package automattic/jetpack-publicize
*/
namespace Automattic\Jetpack\Publicize\Jetpack_Social_Settings;
use Automattic\Jetpack\Modules;
use Automattic\Jetpack\Publicize\Social_Image_Generator\Templates;
/**
* This class is used to get and update Jetpack_Social_Settings.
* Curre... |
projects/packages/backup/actions.php | <?php
/**
* Action Hooks for Jetpack Backup module.
*
* @package automattic/jetpack-backup
*/
// 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_ac... |
projects/packages/backup/tests/php/test-package-version.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Backup;
use PHPUnit\Framework\TestCase;
use function add_filter;
use function apply_filters;
/**
* Unit tests for the Package_Version class.
*
* @package automattic/jetpack-backup
*/
class Test_Package_Version extend... |
projects/packages/backup/tests/php/test-storage-addon-upsell.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
// After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load a... |
projects/packages/backup/tests/php/bootstrap.php | <?php
/**
* Initialize the testing environment.
*
* @package automattic/jetpack-backup
*/
/**
* Load the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
define( 'WP_DEBUG', true );
\WorDBless\Load::load();
|
projects/packages/backup/tests/php/test-rest-controller.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
// After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load a... |
projects/packages/backup/src/class-package-version.php | <?php
/**
* The Package_Version class.
*
* @package automattic/jetpack-backup
*/
namespace Automattic\Jetpack\Backup;
/**
* The Package_Version class.
*
* Does *not* use namespaced versioning ("VXXXX") because send_package_version_to_tracker() is used as a
* "jetpack_package_versions" filter, and said filter ... |
projects/packages/backup/src/class-initial-state.php | <?php
/**
* The React initial state.
*
* @package automattic/jetpack-backup-plugin
*/
// After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader mig... |
projects/packages/backup/src/class-jetpack-backup-upgrades.php | <?php
/**
* Handle Backup plugin upgrades
*
* @package automattic/jetpack-backup-plugin
*/
// After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloade... |
projects/packages/backup/src/class-rest-controller.php | <?php
/**
* The Backup Rest Controller class.
* Registers the REST routes for Backup.
*
* @package automattic/jetpack-backup
*/
// After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in
// order to ensure that the specific version of this file always ge... |
projects/packages/backup/src/class-package-version-compat.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* The Package_Version class's compatibility shim.
*
* @package automattic/jetpack-backup
*/
// Do *not* update the "V0001" namespace version on changes.
namespace Automattic\Jetpack\Backup\V0001;
/**
* Package_Version proxy class to accommod... |
projects/packages/backup/src/class-jetpack-backup.php | <?php
/**
* Primary class file for the Jetpack Backup plugin.
*
* @package automattic/jetpack-backup-plugin
*/
// After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in
// order to ensure that the specific version of this file always get loaded. Otherwis... |
projects/packages/identity-crisis/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/jetpack-identity-crisis
*/
/**
* Include the Composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
/**
* Load WorDBless
*/
\WorDBless\Load::load();
require_once ABSPATH . WPINC . '/class-IXR.php';
|
projects/packages/identity-crisis/tests/php/test-url-secret.php | <?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Tests the URL_Secret class.
*
* @package automattic/jetpack-identity-crisis
*/
namespace Automattic\Jetpack;
use Automattic\Jetpack\IdentityCrisis\URL_Secret;
use Jetpack_Options;
use PHPUnit\Framework\TestCase;
/**
* Unit tests for the U... |
projects/packages/identity-crisis/tests/php/test-rest-endpoints.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\IdentityCrisis;
use Automattic\Jetpack\Connection\Manager;
use Automattic\Jetpack\Connection\Rest_Authentication as Connection_Rest_Authentication;
use Automattic\Jetpack\Connection\REST_Connector;
use Automattic\Jetpack\... |
projects/packages/identity-crisis/tests/php/test-identity-crisis.php | <?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Tests the Identity_Crisis package.
*
* @package automattic/jetpack-identity-crisis
*/
namespace Automattic\Jetpack;
use Automattic\Jetpack\IdentityCrisis\URL_Secret;
use Automattic\Jetpack\Status\Cache as StatusCache;
use Jetpack_Options;
u... |
projects/packages/identity-crisis/src/class-ui.php | <?php
/**
* Identity_Crisis package.
*
* @package automattic/jetpack-identity-crisis
*/
namespace Automattic\Jetpack\IdentityCrisis;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Identity_Crisis;
use Automattic\Jetpack\Status\Host;
use Automattic\Jetpack\Tracking;
use Jetpack_Options;
use Jetpack_Tracks_... |
projects/packages/identity-crisis/src/class-rest-endpoints.php | <?php
/**
* Identity_Crisis package.
*
* @package automattic/jetpack-identity-crisis
*/
namespace Automattic\Jetpack\IdentityCrisis;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Connection\Rest_Authentication;
use Jetpack_Options;
use WP_Error;
use WP_REST_Server;
/**
... |
projects/packages/identity-crisis/src/class-url-secret.php | <?php
/**
* IDC URL secret functionality.
*
* @package automattic/jetpack-identity-crisis
*/
namespace Automattic\Jetpack\IdentityCrisis;
use Jetpack_Options;
/**
* IDC URL secret functionality.
* A short-lived secret used to verify whether an IDC is coming from the same vs a different Jetpack site.
*/
class... |
projects/packages/identity-crisis/src/class-identity-crisis.php | <?php
/**
* Identity_Crisis package.
*
* @package automattic/jetpack-identity-crisis
*/
namespace Automattic\Jetpack;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Connection\Urls;
use Automattic\Jetpack\IdentityCrisis\Exception;
use Automattic\Jetpack\IdentityCrisis\UI;... |
projects/packages/identity-crisis/src/class-exception.php | <?php
/**
* Exception class for the Identity Crisis package.
*
* @package automattic/jetpack-identity-crisis
*/
namespace Automattic\Jetpack\IdentityCrisis;
/**
* Exception class for the Identity Crisis package.
*/
class Exception extends \Exception {}
|
projects/packages/import/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/import/src/class-main.php | <?php
/**
* Set of REST API routes used in WPCOM Unified Importer.
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Connection\Rest_Authentication;
/**
* This class will provide endpoint for the... |
projects/packages/import/src/endpoints/class-menu-item.php | <?php
/**
* Menu items REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Menu_Item
*/
class Menu_Item extends \WP_REST_Menu_Items_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use Impo... |
projects/packages/import/src/endpoints/class-start.php | <?php
/**
* Start REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
use Automattic\Jetpack\Import\Main;
/**
* Class Start
*
* This class is used to start the import process.
*/
class Start extends \WP_REST_Controller {
/**
* Base class
*/
use Import;
... |
projects/packages/import/src/endpoints/class-template.php | <?php
/**
* Templates REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Template
*/
class Template extends \WP_REST_Templates_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use Import_I... |
projects/packages/import/src/endpoints/class-post.php | <?php
/**
* Posts REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
use Automattic\Jetpack\Sync\Settings;
if ( ! function_exists( 'post_exists' ) ) {
require_once ABSPATH . 'wp-admin/includes/post.php';
}
/**
* Class Post
*/
class Post extends \WP_REST_Posts_... |
projects/packages/import/src/endpoints/class-end.php | <?php // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching
/**
* End REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class End
*
* This class is used to start the import process.
*/
class End extends ... |
projects/packages/import/src/endpoints/class-global-style.php | <?php
/**
* Global style REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
require_once ABSPATH . 'wp-includes/class-wp-theme-json-resolver.php';
require_once ABSPATH . 'wp-includes/theme.php';
/**
* Class Global_Style
*/
class Global_Style extends \WP_REST_Pos... |
projects/packages/import/src/endpoints/class-block.php | <?php
/**
* Blocks REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Block
*/
class Block extends \WP_REST_Blocks_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use Import_ID;
/**
*... |
projects/packages/import/src/endpoints/class-tag.php | <?php
/**
* Tags REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Tag
*/
class Tag extends \WP_REST_Terms_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use Import_ID;
/**
* Whethe... |
projects/packages/import/src/endpoints/trait-import.php | <?php
/**
* Jetpack Import unique import ID.
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Import trait. Base class for all import endpoints.
*/
trait Import {
/**
* REST API namespace.
*
* @var string
*/
private static $rest_namespace = 'jetpack/v4/im... |
projects/packages/import/src/endpoints/trait-import-id.php | <?php
/**
* Jetpack Import unique import ID.
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Import ID trait. Add a unique import ID to the items schema.
*/
trait Import_ID {
/**
* Meta and REST property name used for storing the WXR import ID.
*
* @var str... |
projects/packages/import/src/endpoints/class-custom-css.php | <?php
/**
* Custom CSS REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
require_once ABSPATH . 'wp-includes/theme.php';
/**
* Class Custom_CSS
*/
class Custom_CSS extends \WP_REST_Posts_Controller {
/**
* Base class
*/
use Import;
/**
* The Import I... |
projects/packages/import/src/endpoints/class-comment.php | <?php
/**
* Comments REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Comment
*/
class Comment extends \WP_REST_Comments_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use Import_ID;
... |
projects/packages/import/src/endpoints/class-menu.php | <?php
/**
* Menus REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Menu
*/
class Menu extends \WP_REST_Menus_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use Import_ID;
/**
* Whe... |
projects/packages/import/src/endpoints/class-page.php | <?php
/**
* Pages REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Page
*/
class Page extends Post {
/**
* Constructor.
*/
public function __construct() {
parent::__construct( 'page' );
}
/**
* Creates a single page.
*
* @param WP_... |
projects/packages/import/src/endpoints/class-category.php | <?php
/**
* Categories REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Category
*/
class Category extends \WP_REST_Terms_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use Import_ID;
... |
projects/packages/import/src/endpoints/class-navigation.php | <?php
/**
* Navigation REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Navigation Block
*/
class Navigation extends \WP_REST_Posts_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use Import_... |
projects/packages/import/src/endpoints/class-template-part.php | <?php
/**
* Template parts REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Template_Part
*/
class Template_Part extends \WP_REST_Templates_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*... |
projects/packages/import/src/endpoints/class-attachment.php | <?php
/**
* Attachments REST route
*
* @package automattic/jetpack-import
*/
namespace Automattic\Jetpack\Import\Endpoints;
/**
* Class Attachment
*/
class Attachment extends \WP_REST_Attachments_Controller {
/**
* Base class
*/
use Import;
/**
* The Import ID add a new item to the schema.
*/
use ... |
projects/packages/ip/tests/php/test-utils.php | <?php
/**
* Utils class test suite.
*
* @package automattic/jetpack-ip
*/
use Automattic\Jetpack\IP\Utils;
use Brain\Monkey;
use Brain\Monkey\Functions;
/**
* Utils class test suite.
*/
final class UtilsTest extends PHPUnit\Framework\TestCase {
/**
* Set up.
*
* @before
*/
public function set_up() {
... |
projects/packages/ip/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/jetpack-ip
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/ip/src/class-utils.php | <?php
/**
* Utils class file.
*
* @package automattic/jetpack-ip
*/
namespace Automattic\Jetpack\IP;
/**
* Class that provides static methods for working with IP addresses.
*/
class Utils {
const PACKAGE_VERSION = '0.2.1';
/**
* Get the current user's IP address.
*
* @return string|false IP address.
... |
projects/packages/assets/actions.php | <?php
/**
* Action Hooks for Jetpack Assets module.
*
* @package automattic/jetpack-assets
*/
// 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_action' ) ) {
add_action( 'wp_default_scripts', ar... |
projects/packages/assets/tests/php/bootstrap.php | <?php
/**
* Bootstraps the tests.
*
* @package automattic/jetpack-assets
*/
/**
* Load the composer packages.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/assets/tests/php/test-semver.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Tests for Automattic\Jetpack\Assets\Semver methods
*
* @package automattic/jetpack-assets
*/
namespace Automattic\Jetpack\Assets;
use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
/**
* Semver test suite.
*/
class SemverTest ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.