Skip to content

Commit

Permalink
Merge branch 'trunk' into add/cache-control-site-health-test
Browse files Browse the repository at this point in the history
  • Loading branch information
b1ink0 committed Jan 22, 2025
2 parents 665f5ba + 6803bc9 commit b0996d7
Show file tree
Hide file tree
Showing 81 changed files with 1,862 additions and 402 deletions.
1,132 changes: 833 additions & 299 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
},
"devDependencies": {
"@octokit/rest": "^21.1.0",
"@wordpress/env": "^10.15.0",
"@wordpress/env": "^10.16.0",
"@wordpress/prettier-config": "^4.14.0",
"@wordpress/scripts": "^30.8.1",
"commander": "13.0.0",
"@wordpress/scripts": "^30.9.0",
"commander": "13.1.0",
"copy-webpack-plugin": "^12.0.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"fast-glob": "^3.3.3",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"lint-staged": "^15.4.1",
"lodash": "4.17.21",
"micromatch": "^4.0.8",
"npm-run-all": "^4.1.5",
Expand Down
5 changes: 3 additions & 2 deletions plugins/auto-sizes/auto-sizes.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
* @package auto-sizes
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

// Define the constant.
if ( defined( 'IMAGE_AUTO_SIZES_VERSION' ) ) {
Expand Down
2 changes: 2 additions & 0 deletions plugins/auto-sizes/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
* @since 1.0.0
*/

// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Displays the HTML generator tag for the plugin.
Expand Down
2 changes: 2 additions & 0 deletions plugins/dominant-color-images/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
* @since 1.0.0
*/

// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Add the dominant color metadata to the attachment.
Expand Down
5 changes: 3 additions & 2 deletions plugins/dominant-color-images/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
* @package dominant-color-images
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

// Define required constants.
if ( defined( 'DOMINANT_COLOR_IMAGES_VERSION' ) ) {
Expand Down
5 changes: 3 additions & 2 deletions plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.2.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Tag visitor that optimizes embeds.
Expand Down
2 changes: 2 additions & 0 deletions plugins/embed-optimizer/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
* @package embed-optimizer
*/

// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Add hooks.
Expand Down
5 changes: 3 additions & 2 deletions plugins/embed-optimizer/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
* @package embed-optimizer
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.1.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Tag visitor that optimizes elements with background-image styles.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.1.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Tag visitor that optimizes IMG tags.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.1.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Tag visitor that optimizes image tags.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
* @since 0.2.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Image Prioritizer: Image_Prioritizer_Video_Tag_Visitor class
Expand Down
2 changes: 2 additions & 0 deletions plugins/image-prioritizer/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
* @since 0.1.0
*/

// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Initializes Image Prioritizer when Optimization Detective has loaded.
Expand Down
2 changes: 2 additions & 0 deletions plugins/image-prioritizer/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
* @since 0.1.0
*/

// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

add_action( 'od_init', 'image_prioritizer_init' );
5 changes: 3 additions & 2 deletions plugins/image-prioritizer/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
* @package image-prioritizer
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.1.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Exception thrown when failing to validate URL Metrics data.
Expand Down
5 changes: 3 additions & 2 deletions plugins/optimization-detective/class-od-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.7.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Data for a single element in a URL Metric.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.1.1
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Extension to WP_HTML_Tag_Processor that supports injecting HTML and obtaining XPath for the current tag.
Expand Down
5 changes: 3 additions & 2 deletions plugins/optimization-detective/class-od-link-collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.3.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Collection for links added to the document.
Expand Down
5 changes: 3 additions & 2 deletions plugins/optimization-detective/class-od-strict-url-metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.6.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Representation of the measurements taken from a single client's visit to a specific URL without additionalProperties allowed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.4.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Context for tag visitors invoked for each tag while walking over a document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.3.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Registry for tag visitors invoked for each tag while walking over a document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.1.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Collection of URL groups according to the breakpoints.
Expand Down
5 changes: 3 additions & 2 deletions plugins/optimization-detective/class-od-url-metric-group.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.1.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* URL Metrics grouped by viewport according to breakpoints.
Expand Down
5 changes: 3 additions & 2 deletions plugins/optimization-detective/class-od-url-metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @since 0.1.0
*/

// Exit if accessed directly.
// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Representation of the measurements taken from a single client's visit to a specific URL.
Expand Down
2 changes: 2 additions & 0 deletions plugins/optimization-detective/detection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
* @since 0.1.0
*/

// @codeCoverageIgnoreStart
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// @codeCoverageIgnoreEnd

/**
* Obtains the ID for a post related to this response so that page caches can be told to invalidate their cache.
Expand Down
Loading

0 comments on commit b0996d7

Please sign in to comment.