filename stringlengths 11 137 | content stringlengths 6 292k |
|---|---|
projects/packages/changelogger/lib/ChangeEntry.php | <?php
/**
* Class representing a change entry.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelog;
use DateTime;
use InvalidArgumentException;
use JsonSerializable;
/**
* Class representing a change entry.
*/
class ChangeEntry implements JsonSerializable {
/**
* Entry si... |
projects/packages/changelogger/lib/ChangelogEntry.php | <?php
/**
* Class representing a changelog entry.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelog;
use DateTime;
use InvalidArgumentException;
use JsonSerializable;
/**
* Class representing a changelog entry.
*/
class ChangelogEntry implements JsonSerializable {
/**
*... |
projects/packages/changelogger/lib/Changelog.php | <?php
/**
* Class representing a changelog.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelog;
use InvalidArgumentException;
use JsonSerializable;
/**
* Class representing a changelog.
*/
class Changelog implements JsonSerializable {
/**
* Content before the changelog i... |
projects/packages/changelogger/src/Application.php | <?php
/**
* User interface for the changelogger tool.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Symfony\Component\Console\Application as SymfonyApplication;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Input\InputI... |
projects/packages/changelogger/src/LoadChangeFileException.php | <?php
/**
* Exception for Utils::loadChangeFile()
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use RuntimeException;
/**
* Exception for Utils::loadChangeFile()
*/
class LoadChangeFileException extends RuntimeException {
/**
* Line number in the file where the ... |
projects/packages/changelogger/src/ValidateCommand.php | <?php
/**
* "Validate" command for the changelogger tool CLI.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony... |
projects/packages/changelogger/src/SquashCommand.php | <?php
/**
* "Squash" command for the changelogger tool CLI.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Automattic\Jetpack\Changelog\ChangeEntry;
use InvalidArgumentException;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input... |
projects/packages/changelogger/src/WriteCommand.php | <?php
/**
* "Write" command for the changelogger tool CLI.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Automattic\Jetpack\Changelog\ChangeEntry;
use Automattic\Jetpack\Changelog\Changelog;
use InvalidArgumentException;
use Symfony\Component\Console\Command\Comman... |
projects/packages/changelogger/src/AddCommand.php | <?php
/**
* "Add" command for the changelogger tool CLI.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\MissingInputException;
use Symfony\Component\Console\Input\InputInterface;
use ... |
projects/packages/changelogger/src/VersionCommand.php | <?php
/**
* "Version" command for the changelogger tool CLI.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\... |
projects/packages/changelogger/src/PluginTrait.php | <?php
/**
* Trait for changelogger plugin boilerplate.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Trait... |
projects/packages/changelogger/src/Config.php | <?php
/**
* Configuration loader for the changelogger tool.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Configuration loader for the changelogger tool.
*/
class Config {
/**
* Default config settings.... |
projects/packages/changelogger/src/CommandLoader.php | <?php
/**
* Command loader for the changelogger tool CLI.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\CommandLoader\CommandLoaderInterface;
use Symfony\Component\Console\Exception\CommandNot... |
projects/packages/changelogger/src/VersioningPlugin.php | <?php
/**
* Versioning plugin interface.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Automattic\Jetpack\Changelog\ChangeEntry;
use InvalidArgumentException;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use S... |
projects/packages/changelogger/src/FormatterPlugin.php | <?php
/**
* Formatter plugin interface.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Automattic\Jetpack\Changelog\Changelog;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\O... |
projects/packages/changelogger/src/Utils.php | <?php
/**
* Utilities for the changelogger tool.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use Automattic\Jetpack\Changelog\ChangeEntry;
use Symfony\Component\Console\Helper\DebugFormatterHelper;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Com... |
projects/packages/changelogger/src/ConfigException.php | <?php
/**
* Exception class used for fatal configuration errors.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger;
use RuntimeException;
/**
* Exception class used for fatal configuration errors.
*
* @since 1.2.0
*/
class ConfigException extends RuntimeException {
}
|
projects/packages/changelogger/src/Plugins/SemverVersioning.php | <?php
/**
* Semver versioning plugin.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger\Plugins;
use Automattic\Jetpack\Changelogger\PluginTrait;
use Automattic\Jetpack\Changelogger\VersioningPlugin;
use InvalidArgumentException;
/**
* Semver versioning plugin.
*/
class ... |
projects/packages/changelogger/src/Plugins/WordpressVersioning.php | <?php
/**
* WordPress versioning plugin.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger\Plugins;
use Automattic\Jetpack\Changelogger\PluginTrait;
use Automattic\Jetpack\Changelogger\VersioningPlugin;
use InvalidArgumentException;
use Symfony\Component\Console\Input\Input... |
projects/packages/changelogger/src/Plugins/KeepachangelogFormatter.php | <?php
/**
* Keepachangelog formatter plugin.
*
* @package automattic/jetpack-changelogger
*/
namespace Automattic\Jetpack\Changelogger\Plugins;
use Automattic\Jetpack\Changelog\KeepAChangelogParser;
use Automattic\Jetpack\Changelogger\FormatterPlugin;
use Automattic\Jetpack\Changelogger\PluginTrait;
/**
* Keepa... |
projects/packages/search/compatibility/unsupported-browsers.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Compatibility for browsers that don't support Instant Search.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search\Compatibility;
add_filter( 'jetpack_search_classic_search_enabled', __NAMESPACE__ . '\enable_classi... |
projects/packages/search/compatibility/search-0.17.0.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Compatibility for Jetpack Search version <= 0.17.0.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search\Compatibility\Jetpack;
add_filter( 'option_jetpack_search_overlay_trigger', __NAMESPACE__ . '\map_results_ov... |
projects/packages/search/compatibility/search-0.15.2.php | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Compatibility for Jetpack Search version <= 0.15.2.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search\Compatibility\Jetpack;
use Automattic\Jetpack\Search\Instant_Search;
add_filter( 'option_sidebars_widgets',... |
projects/packages/search/compatibility/jetpack.php | <?php
/**
* Jetpack compatibility
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search\Compatibility\Jetpack;
use Jetpack;
/**
* Override the condition to show Search submenu when Jetpack plugin exists.
*/
function should_show_jetpack_search_submenu() {
if ( ! current_user_can( 'manag... |
projects/packages/search/tests/php/test-instant-search-add-search-block.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Test class `Instant_Search`
*/
namespace Automattic\Jetpack\Search;
use PHPUnit\Framework\TestCase;
use ReflectionMethod;
use WP_Block_Patterns_Registry;
/**
* Unit tests for the Instant Search - functionality to add search block.
*
* @pa... |
projects/packages/search/tests/php/test-get-ios-version.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Search;
require_once __DIR__ . '/../../compatibility/unsupported-browsers.php';
use Automattic\Jetpack\Search\Test_Case as Search_Test_Case;
/**
* Unit tests for the get_ios_version_from_user_agent.
*
* @package autom... |
projects/packages/search/tests/php/test-jetpack-search.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName: This is necessary to ensure that PHPUnit runs these tests.
/**
* Classic Search test cases
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Search;
use PHPUnit\Framework\TestCase;
/**
* Jetpack_Instant_Search test cases
*/
clas... |
projects/packages/search/tests/php/test-instant-search-auto-config-jp-search-widget.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Test class `Instant_Search`
*/
namespace Automattic\Jetpack\Search;
use PHPUnit\Framework\TestCase;
/**
* Unit tests for the Instant_Search class auto config widgets.
*
* @package automattic/jetpack-search
*/
class Test_Instant_Search_Au... |
projects/packages/search/tests/php/class-test-case.php | <?php
/**
* Test_Case class
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use PHPUnit\Framework\TestCase;
use WorDBless\Options as WorDBless_Options;
use WorDBless\Posts as WorDBless_Posts;
use WorDBless\Users as WorDBless_Users;
/**
* Base Test_Case class which intercepts API c... |
projects/packages/search/tests/php/class-test-helpers-query.php | <?php
/**
* Helper class
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
/**
* Used by Test_Helpers class.
*/
class Test_Helpers_Query {
/**
* Set default value
*
* @var bool
*/
public $searching = true;
/**
* Return default value
*/
public function is_search() {
... |
projects/packages/search/tests/php/bootstrap.php | <?php
/**
* Initialize the testing environment.
*
* @package automattic/jetpack-search
*/
/**
* Load the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
require_once __DIR__ . '/class-test-case.php';
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Search\Helper;
use Automat... |
projects/packages/search/tests/php/test-helpers.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName: This is necessary to ensure that PHPUnit runs these tests.
/**
* Helper class
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Constants;
use PHPUnit\Framework\TestCase;
require_once __DIR__ ... |
projects/packages/search/tests/php/test-module-control.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Search\Test_Case as Search_Test_Case;
use Automattic\Jetpack\Status\Cache;
/**
* Unit tests for the REST_Controller class.
... |
projects/packages/search/tests/php/test-rest-controller.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Rest_Authentication as Connection_Rest_Authentication;
use Automattic\Jetpack\Search\Test_Case as Search_Test_Case;
use WP_REST_Request;
use WP_REST_Server;
/**
* Unit tests for... |
projects/packages/search/tests/php/class-test-helpers-customize.php | <?php
/**
* Helper class
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
/**
* Used by Test_Helpers class.
*/
class Test_Helpers_Customize {
/**
* Set default value
*
* @var bool
*/
public $previewing = false;
/**
* Return default value
*/
public function is_previe... |
projects/packages/search/tests/php/test-plan.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Search\Test_Case as Search_Test_Case;
use WP_Error;
/**
* Unit tests for the REST_Controller class.
*
* @package automattic/jetpack-search
*/
class Test_Plan extends Search_Test_Case {
... |
projects/packages/search/src/class-package.php | <?php
/**
* Search package information.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
/**
* Search package general information
*/
class Package {
const VERSION = '0.43.5-alpha';
const SLUG = 'search';
/**
* The path where package is installed.
*
* @var string
*/
... |
projects/packages/search/src/class-module-control.php | <?php
/**
* Jetpack Search: Module_Control class
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Modules;
use Automattic\Jetpack\Status;
use WP_Error;
/**
* To get and set Searh module settings... |
projects/packages/search/src/class-cli.php | <?php
/**
* CLI class exposed by WPCLI
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use WP_CLI;
use WP_CLI_Command;
use WP_Error;
if ( ! class_exists( 'WP_CLI_Command' ) ) {
return;
}
/**
* Provide functionality by WPCLI.
*/
class CLI extends WP_CLI_Command {
/**
* Aut... |
projects/packages/search/src/class-stats.php | <?php
/**
* Get search stats for use in the wp-admin dashboard.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Client;
use Jetpack_Options;
/**
* Search stats (e.g. post count, post type breakdown)
*/
class Stats {
/**
* Get stats from the Wo... |
projects/packages/search/src/class-helper.php | <?php
/**
* Helper class providing various static utility functions for use in Search.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Status;
use GP_Locales;
use Jetpack; // TODO: Remove this once migrated.
/**
* Various helper functions for reuse throug... |
projects/packages/search/src/class-options.php | <?php
/**
* Another helper class for parsing Jetpack Search options.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Constants;
/**
* Helpers for parsing the various Search options
*/
class Options {
/**
* The search widget's base ID.
*
* @since 5... |
projects/packages/search/src/class-template-tags.php | <?php
/**
* Template tags class used primarily for rendering widget-related HTML.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
/**
* Class that has various methods for outputting functionality into a theme that doesn't support widgets.
* Additionally the widget itself makes ... |
projects/packages/search/src/class-rest-controller.php | <?php
/**
* The Search Rest Controller class.
* Registers the REST routes for Search.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Rest_Authentication;
use Automattic\Jetpack\My_Jetpack\Products\Search a... |
projects/packages/search/src/class-settings.php | <?php
/**
* Jetpack Search Overlay Settings
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
// Exit if file is accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class to initialize search settings on the site.
*
* 1. Settings are synced to WPCOM according to `Aut... |
projects/packages/search/src/class-plan.php | <?php
/**
* The Search Plan class.
* Registers the REST routes for Search.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Client;
use Jetpack_Options;
use WP_Error;
/**
* Registers the REST routes for Search.
*/
class Plan {
const JETPACK_SEAR... |
projects/packages/search/src/instant-search/class-instant-search.php | <?php
/**
* Instant Search: Our modern and customizable search experience.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Assets;
use WP_Block_Parser;
use WP_Block_Patterns_Registry;
use WP_Error;
use WP_REST_Templates_Controller;
/**
* Class responsible fo... |
projects/packages/search/src/classic-search/class-classic-search.php | <?php
/**
* Classic Search: Our original search experience with filtering capability.
*
* @package @automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Client;
use WP_Error;
use WP_Query;
use WP_Tax_Query;
/**
* Class responsible for enabling the Classic Search... |
projects/packages/search/src/customizer/class-customizer.php | <?php
/**
* Jetpack Search Customizer Integration
*
* @package @automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Assets;
use WP_Customize_Color_Control;
/**
* Class to customize search on the site.
*/
class Customizer {
/**
* Search Plan class.
*
* @var Plan
... |
projects/packages/search/src/customizer/customize-controls/class-excluded-post-types-control.php | <?php
/**
* A multi-checkbox Customizer control for use with Jetpack Search configuration
*
* @package @automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Assets;
use WP_Customize_Control;
if ( ! class_exists( 'WP_Customize_Control' ) ) {
return;
}
/**
* Label Control ... |
projects/packages/search/src/customizer/customize-controls/class-label-control.php | <?php
/**
* A label-only Customizer control for use with Jetpack Search configuration
*
* @package automattic/jetpack
* @since 8.6.0
*/
namespace Automattic\Jetpack\Search;
use WP_Customize_Control;
if ( ! class_exists( 'WP_Customize_Control' ) ) {
return;
}
/**
* Label Control class.
*/
class Label_Control ... |
projects/packages/search/src/dashboard/class-dashboard.php | <?php
/**
* A class that adds a search dashboard to wp-admin.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Admin_UI\Admin_Menu;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State;
use Automattic\Jetpack\Conne... |
projects/packages/search/src/dashboard/class-initial-state.php | <?php
/**
* The React initial state.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Status;
use Jetpack_Options;
/**
* The React initial state.
*/
class Initial_State {
/**
* Connection M... |
projects/packages/search/src/wpes/class-query-parser.php | <?php
/**
* Parse a pure text query into WordPress Elasticsearch query. This builds on
* the Query_Builder() to provide search query parsing.
*
* The key part of this parser is taking a user's query string typed into a box
* and converting it into an ES search query.
*
* This varies by application, but roughly i... |
projects/packages/search/src/wpes/class-query-builder.php | <?php
/**
* Provides an interface for easily building a complex search query that
* combines multiple ranking signals.
*
* $bldr = new Query_Builder();
* $bldr->add_filter( ... );
* $bldr->add_filter( ... );
* $bldr->add_query( ... );
* $es_query = $bldr->build_query();
*
*
* All ES queries take a standard f... |
projects/packages/search/src/customberg/class-customberg.php | <?php
/**
* A class that adds a search customization interface to wp-admin.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Status;
use Automattic\Jetpack\Tracking;... |
projects/packages/search/src/widgets/class-search-widget.php | <?php
/**
* Jetpack Search widget.
*
* @package automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Redirect;
use Automattic\Jetpack\Status;
use Automattic\Jetpack\Sync\Modules\Sear... |
projects/packages/search/src/initializers/class-initializer.php | <?php
/**
* Initializer base class.
*
* @package @automattic/jetpack-search
*/
namespace Automattic\Jetpack\Search;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use WP_Error;
/**
* Base class for the initializer pattern.
*/
class Initializer {
/**
* Initialize the search package.
*
... |
projects/packages/boost-speed-score/tests/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../vendor/autoload.php';
// Additional functions that brain/monkey doesn't currently define.
if ( ! function_exists( 'wp_unslash' ) ) {
/**
* Workalike for WordPress's `wp_unslash`.
*
* @... |
projects/packages/boost-speed-score/tests/php/mocks.php | <?php //phpcs:ignore Squiz.Commenting.FileComment.Missing
use Brain\Monkey\Functions;
Functions\when( 'plugin_dir_path' )->alias(
function ( $file ) {
return dirname( $file ) . '/';
}
);
|
projects/packages/boost-speed-score/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/boost-speed-score/tests/php/class-base-test-case.php | <?php //phpcs:ignoreFile
namespace Automattic\Jetpack\Boost_Speed_Score\Tests;
use Brain\Monkey;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
require_once __DIR__ . '/mocks.php';
if ( ! defined( 'JETPACK_BOOST_SPEED_SCORE_DIR_PATH' ) ) {
define( 'JETPACK_BOOST_SPEED_SCORE_DIR_PATH', __DIR__ . '/../..' );
}
/**
... |
projects/packages/boost-speed-score/tests/php/lib/test-class-url.php | <?php
//phpcs:ignoreFile
namespace Automattic\Jetpack\Boost_Speed_Score\Tests\Lib;
use Automattic\Jetpack\Boost_Core\Lib\Url;
use Automattic\Jetpack\Boost_Speed_Score\Tests\Base_Test_Case;
use Brain\Monkey\Filters;
use Brain\Monkey\Functions;
/**
* Class WP_Test_Url
*
* @package Automattic\Jetpack\Boost_Speed_Scor... |
projects/packages/boost-speed-score/tests/php/lib/test-class-speed-score-history.php | <?php
//phpcs:ignoreFile
namespace Automattic\Jetpack\Boost_Speed_Score\Tests\Lib;
use Automattic\Jetpack\Boost_Speed_Score\Speed_Score_History;
use Automattic\Jetpack\Boost_Speed_Score\Tests\Base_Test_Case;
use Brain\Monkey\Functions;
/**
* Class WP_Test_Speed_Score_History
*
* @package Automattic\Jetpack\Boost_S... |
projects/packages/boost-speed-score/src/class-speed-score-graph-history-request.php | <?php
/**
* Represents a request to generate an array of speed scores history.
*
* @package automattic/jetpack-boost-speed-score
*/
namespace Automattic\Jetpack\Boost_Speed_Score;
use Automattic\Jetpack\Boost_Core\Lib\Boost_API;
use Automattic\Jetpack\Boost_Core\Lib\Cacheable;
/**
* Class Speed_Score_Graph_Hist... |
projects/packages/boost-speed-score/src/class-speed-score.php | <?php
/**
* Speed Score API endpoints.
*
* @package automattic/jetpack-boost-speed-score
*/
namespace Automattic\Jetpack\Boost_Speed_Score;
use Automattic\Jetpack\Boost_Core\Lib\Utils;
if ( ! defined( 'JETPACK_BOOST_REST_NAMESPACE' ) ) {
define( 'JETPACK_BOOST_REST_NAMESPACE', 'jetpack-boost/v1' );
}
// For us... |
projects/packages/boost-speed-score/src/class-jetpack-boost-modules.php | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Jetpack Boost Active Modules
*
* Since the speed scores API will be used in the Jetpack plugin and in the My Jetpack, if Jetpack Boost
* is uninstalled, all we need is to pass along this placeholder class for the modules that essentially
* ... |
projects/packages/boost-speed-score/src/class-speed-score-request.php | <?php
/**
* Represents a request to generate a pair of speed scores.
*
* @package automattic/jetpack-boost-speed-score
*/
namespace Automattic\Jetpack\Boost_Speed_Score;
use Automattic\Jetpack\Boost_Core\Lib\Boost_API;
use Automattic\Jetpack\Boost_Core\Lib\Cacheable;
use Automattic\Jetpack\Boost_Core\Lib\Url;
/*... |
projects/packages/boost-speed-score/src/class-speed-score-history.php | <?php
/**
* Speed score history after Jetpack Boost
*
* @package automattic/jetpack-boost-speed-score
*/
namespace Automattic\Jetpack\Boost_Speed_Score;
use Automattic\Jetpack\Boost_Core\Lib\Transient;
/**
* Class Speed_Score_History
*
* @package Automattic\Jetpack\Boost_Speed_Score\Lib
*/
class Speed_Score_... |
projects/packages/partner/tests/php/bootstrap.php | <?php
/**
* Bootstrap for tests.
*
* @package Automattic/jetpack-partner
*/
/**
* Composer's autoloader is all we need.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
/**
* Preloading the file to reconcile Brain\Monkey with Wordbless.
*/
require_once __DIR__ . '/../../vendor/antecedent/patchwork/Patc... |
projects/packages/partner/src/class-partner-coupon.php | <?php
/**
* Class for the Jetpack partner coupon logic.
*
* @deprecated 2.0.0
* @see automattic/jetpack-connection
*
* @package automattic/jetpack-partner
*/
|
projects/packages/partner/src/class-partner.php | <?php
/**
* Jetpack Partner utilities.
*
* @deprecated 2.0.0
* @see automattic/jetpack-connection
*
* @package automattic/jetpack-partner
*/
|
projects/packages/wordads/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/wordads/src/class-package.php | <?php
/**
* WordAds package information.
*
* @package automattic/jetpack-wordads
*/
namespace Automattic\Jetpack\WordAds;
/**
* WordAds package general information
*/
class Package {
const VERSION = '0.3.11-alpha';
const SLUG = 'wordads';
/**
* The path where package is installed.
*
* @var string
... |
projects/packages/wordads/src/class-helper.php | <?php
/**
* Helper class providing various static utility functions for use in Search.
*
* @package automattic/jetpack-wordads
*/
namespace Automattic\Jetpack\WordAds;
/**
* Various helper functions for reuse throughout the WordAds code.
*/
class Helper {
/**
* Get the current site's WordPress.com ID.
*... |
projects/packages/wordads/src/class-rest-controller.php | <?php
/**
* The WordAds Rest Controller class.
* Registers the REST routes for WordAds.
*
* @package automattic/jetpack-wordads
*/
namespace Automattic\Jetpack\WordAds;
use Automattic\Jetpack\Modules;
use Jetpack_Options;
use WP_Error;
use WP_REST_Request;
use WP_REST_Server;
/**
* Registers the REST routes fo... |
projects/packages/wordads/src/dashboard/class-dashboard.php | <?php
/**
* A class that adds a wordads dashboard to wp-admin.
*
* @package automattic/jetpack
*/
namespace Automattic\Jetpack\WordAds;
use Automattic\Jetpack\Admin_UI\Admin_Menu;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Status;
use Aut... |
projects/packages/wordads/src/dashboard/class-initial-state.php | <?php
/**
* The React initial state.
*
* @package automattic/jetpack-wordads
*/
namespace Automattic\Jetpack\WordAds;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Modules;
use Automattic\Jetpack\Status;
use Jetpack_Options;
/**
* The React initial state.
*/
class Init... |
projects/packages/wordads/src/initializers/class-initializer.php | <?php
/**
* Initializer base class.
*
* @package @automattic/jetpack-wordads
*/
namespace Automattic\Jetpack\WordAds;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Modules;
use WP_Error;
/**
* Base class for the initializer pattern.
*/
class Initializer {
/**
* I... |
projects/packages/heartbeat/src/class-heartbeat.php | <?php // phpcs:ignore
/**
* Jetpack Heartbeat package.
*
* @package automattic/jetpack-heartbeat
* @deprecated 1.4.1
* @see automattic/jetpack-connection
*/
require_once __DIR__ . '/../../jetpack-connection/src/class-heartbeat.php';
|
projects/packages/plugins-installer/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/plugins-installer/src/class-plugins-installer.php | <?php
/**
* Plugins Library
*
* Helper functions for installing and activating plugins.
*
* Used by the REST API
*
* @package jetpack-plugins-installer
*/
namespace Automattic\Jetpack;
use Plugin_Upgrader;
use WP_Error;
/**
* Plugins management tools.
*/
class Plugins_Installer {
/**
* Ensures that plu... |
projects/packages/plugins-installer/src/class-automatic-install-skin.php | <?php
/**
* Automatic_Upgrader_Skin extension for Jetpack
*
* @package jetpack-plugins-installer
*/
namespace Automattic\Jetpack;
use Automatic_Upgrader_Skin;
/**
* Include required files from wp-admin.
*/
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
require_once ABSPATH . 'wp-admin/includ... |
projects/packages/jitm/tests/php/test_JITM.php | <?php // phpcs:disable
namespace Automattic\Jetpack;
use Automattic\Jetpack\JITMS\JITM;
use Automattic\Jetpack\JITMS\Pre_Connection_JITM;
use Brain\Monkey;
use Brain\Monkey\Actions;
use Brain\Monkey\Filters;
use Brain\Monkey\Functions;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\Test... |
projects/packages/jitm/tests/php/bootstrap.php | <?php
/**
* Bootstrap.
*
* @package automattic/jetpack-jitm
*/
/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/jitm/tests/php/test_pre_connection_jitm.php | <?php // phpcs:disable
namespace Automattic\Jetpack;
use Automattic\Jetpack\JITMS\Pre_Connection_JITM;
use Brain\Monkey;
use Brain\Monkey\Filters;
use Brain\Monkey\Functions;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase;
class Test_Pre_Connection_JITM extends TestCase {
use... |
projects/packages/jitm/src/class-post-connection-jitm.php | <?php
/**
* Jetpack's Post-Connection JITM class.
*
* @package automattic/jetpack-jitm
*/
namespace Automattic\Jetpack\JITMS;
use Automattic\Jetpack\A8c_Mc_Stats;
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager;
use Automattic\Jetpack\Device_Detection;
use Automattic\Jetpack\Pa... |
projects/packages/jitm/src/class-pre-connection-jitm.php | <?php
/**
* Jetpack's Pre-Connection JITM class.
*
* @package automattic/jetpack-jitm
*/
namespace Automattic\Jetpack\JITMS;
/**
* Jetpack pre-connection just in time messaging through out the admin.
*/
class Pre_Connection_JITM extends JITM {
/**
* Filters and formats the messages for the client-side JS re... |
projects/packages/jitm/src/class-jitm.php | <?php
/**
* Jetpack's JITM class.
*
* @package automattic/jetpack-jitm
*/
namespace Automattic\Jetpack\JITMS;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Assets\Logo as Jetpack_Logo;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Status;
/**
* Jetpack just in t... |
projects/packages/jitm/src/class-rest-api-endpoints.php | <?php
/**
* JITM's REST API Endpoints
*
* @package automattic/jetpack-jitm
*/
namespace Automattic\Jetpack\JITMS;
use Automattic\Jetpack\Connection\REST_Connector;
use WP_REST_Server;
/**
* Register the JITM's REST API Endpoints and their callbacks.
*/
class Rest_Api_Endpoints {
/**
* Declare the JITM's RE... |
projects/packages/logo/tests/php/bootstrap.php | <?php
/**
* Bootstraps.
*
* @package automattic/jetpack-logo
*/
/**
* Includes the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';
|
projects/packages/logo/tests/php/test-logo.php | <?php
/**
* Tests the logo package
*
* @package automattic/jetpack-logo
*/
use Automattic\Jetpack\Assets\Logo;
use PHPUnit\Framework\TestCase;
/**
* Class Test_Logo
*/
class Test_Logo extends TestCase {
use \Yoast\PHPUnitPolyfills\Polyfills\AssertStringContains;
/**
* Ensure the rendered logo has all the C... |
projects/packages/logo/src/class-logo.php | <?php
/**
* A logo for Jetpack.
*
* @package automattic/jetpack-logo
*/
namespace Automattic\Jetpack\Assets;
/**
* Jetpack logo as SVG shapes.
*
* Initializes the logo property with a string describing the Jetpack logo.
* The Jetpack logo SVG string includes CSS classes to stylize it:
* - jetpack-logo: the w... |
projects/packages/codesniffer/tests/php/bootstrap.php | <?php
/**
* Bootstrap file for the codesniffer test suite.
*
* @package automattic/jetpack-codesniffer
*/
// Include the Composer autoloader.
require_once __DIR__ . '/../../vendor/autoload.php';
// Phpcs needs some bootstrapping of its own for tests to work.
require_once __DIR__ . '/../../vendor/squizlabs/php_cod... |
projects/packages/codesniffer/tests/php/tests/test-jetpackstandard.php | <?php
/**
* Tests for the Jetpack phpcs standard.
*
* @package automattic/jetpack-codesniffer
*/
namespace Automattic\Jetpack\Sniffs\Tests;
use PHP_CodeSniffer\Config;
use PHP_CodeSniffer\Files\DummyFile;
use PHP_CodeSniffer\Reporter;
use PHP_CodeSniffer\Ruleset;
use PHPUnit\Framework\TestCase;
use RecursiveDirec... |
projects/packages/codesniffer/tests/php/tests/test-jetpack-compat.php | <?php
/**
* Tests for the Jetpack-Compat-* phpcs standards.
*
* @package automattic/jetpack-codesniffer
*/
namespace Automattic\Jetpack\Sniffs\Tests;
use PHP_CodeSniffer\Config;
use PHP_CodeSniffer\Files\DummyFile;
use PHP_CodeSniffer\Reporter;
use PHP_CodeSniffer\Ruleset;
use PHPUnit\Framework\TestCase;
/**
* ... |
projects/packages/codesniffer/hacks/PHPUnitTestTrait.php | <?php
/**
* Hack around insufficiencies in MediaWiki\Sniffs\PHPUnit\PHPUnitTestTrait
*
* @package automattic/jetpack-codesniffer
*/
// phpcs:disable -- Better to keep close to upstream than to follow WP conventions.
namespace MediaWiki\Sniffs\PHPUnit;
use PHP_CodeSniffer\Files\DummyFile;
use PHP_CodeSniffer\File... |
projects/packages/codesniffer/Jetpack/Sniffs/Constants/MasterUserConstantSniff.php | <?php
/**
* Sniffer that looks for JETPACK_MASTER_USER constant usage
*
* @package automattic/jetpack-codesniffer
*/
namespace Automattic\Jetpack\Sniffs\Constants;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
/**
* Sniffer that looks for JETPACK_MASTER_USER constant usage
*/
class MasterUs... |
projects/packages/codesniffer/Jetpack/Sniffs/Functions/I18nSniff.php | <?php
/**
* Sniff for textdomains to some additiona functions.
*
* @package automattic/jetpack-codesniffer
*/
namespace Automattic\Jetpack\Sniffs\Functions;
use InvalidArgumentException;
use PHP_CodeSniffer\Exceptions\RuntimeException;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
use PHP_Code... |
projects/packages/codesniffer/Jetpack/Sniffs/Functions/SetCookieSniff.php | <?php
/**
* The setcookie sniff.
*
* @package Automattic/jetpack-coding-standards
*/
namespace Automattic\Jetpack\Sniffs\Functions;
use WordPressCS\WordPress\AbstractFunctionParameterSniff;
/**
* Flag calling setcookie without httponly.
* *
*
* @package Automattic/jetpack-coding-standards
*
* @since 2.6.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.