Skip to content

Commit

Permalink
Merge pull request #5347 from Automattic/staging
Browse files Browse the repository at this point in the history
Production release: v20240319.0
  • Loading branch information
luiztiago authored Mar 19, 2024
2 parents 5f29872 + 241e1c0 commit 9ab0146
Show file tree
Hide file tree
Showing 22 changed files with 3,380 additions and 4,318 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog-summary-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: softprops/action-gh-release@v0.1.15
- uses: softprops/action-gh-release@v2.0.3
with:
generate_release_notes: true
tag_name: ${{ steps.id-generator.outputs.id }}
Expand Down
7 changes: 6 additions & 1 deletion 000-vip-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
// Important - Cache-healthcheck and App-healthcheck
require_once __DIR__ . '/healthcheck/healthcheck.php';

if ( ! defined( 'WPVIP_MU_PLUGIN_DIR' ) ) {
define( 'WPVIP_MU_PLUGIN_DIR', __DIR__ );
}

if ( ! defined( 'WPCOM_VIP_SITE_MAINTENANCE_MODE' ) ) {
define( 'WPCOM_VIP_SITE_MAINTENANCE_MODE', false );
Expand Down Expand Up @@ -126,7 +129,9 @@
}

// Define constants for custom VIP Go paths
define( 'WPCOM_VIP_CLIENT_MU_PLUGIN_DIR', WP_CONTENT_DIR . '/client-mu-plugins' );
if ( ! defined( 'WPCOM_VIP_CLIENT_MU_PLUGIN_DIR' ) ) {
define( 'WPCOM_VIP_CLIENT_MU_PLUGIN_DIR', WP_CONTENT_DIR . '/client-mu-plugins' );
}

if ( method_exists( Context::class, 'is_fedramp' ) && Context::is_fedramp() ) {
// FedRAMP sites do not load Jetpack by default
Expand Down
4 changes: 2 additions & 2 deletions 001-core/privacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function _upload_archive_file( $archive_path ) {
}

if ( ! class_exists( 'Automattic\VIP\Files\Api_Client' ) ) {
require WPMU_PLUGIN_DIR . '/files/class-api-client.php';
require WPVIP_MU_PLUGIN_DIR . '/files/class-api-client.php';
}

// Build the `/wp-content/` version of the exports path since `LOCAL_UPLOADS` gives us a `/tmp` path.
Expand Down Expand Up @@ -371,7 +371,7 @@ function _delete_archive_file( $archive_url ) {
}

if ( ! class_exists( 'Automattic\VIP\Files\Api_Client' ) ) {
require WPMU_PLUGIN_DIR . '/files/class-api-client.php';
require WPVIP_MU_PLUGIN_DIR . '/files/class-api-client.php';
}

$api_client = \Automattic\VIP\Files\new_api_client();
Expand Down
40 changes: 20 additions & 20 deletions __tests__/e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Let's add this to a new file in `client-mu-plugins` called `beta.php` where we'l
<?php

// Load the VIP Vary_Cache class
require_once( WPMU_PLUGIN_DIR . '/cache/class-vary-cache.php' );
require_once( WPVIP_MU_PLUGIN_DIR . '/cache/class-vary-cache.php' );

use Automattic\VIP\Cache\Vary_Cache;
```
Expand Down
2 changes: 1 addition & 1 deletion cache/examples/segmentation-beta/beta.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace My\Application;

// Load the VIP Vary_Cache class
require_once WP_CONTENT_DIR . '/mu-plugins/cache/class-vary-cache.php';
require_once WPVIP_MU_PLUGIN_DIR . '/cache/class-vary-cache.php';

use Automattic\VIP\Cache\Vary_Cache;

Expand Down
2 changes: 1 addition & 1 deletion integrations/block-data-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function load(): void {
}

// Load the version of the plugin that should be set to the latest version, otherwise if it's not found deactivate the integration.
$load_path = WPMU_PLUGIN_DIR . '/vip-integrations/vip-block-data-api-' . $this->version . '/vip-block-data-api.php';
$load_path = WPVIP_MU_PLUGIN_DIR . '/vip-integrations/vip-block-data-api-' . $this->version . '/vip-block-data-api.php';
if ( file_exists( $load_path ) ) {
require_once $load_path;
} else {
Expand Down
2 changes: 1 addition & 1 deletion integrations/vip-governance.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function load(): void {
}

// Load the version of the plugin that should be set to the latest version, otherwise if it's not found deactivate the integration.
$load_path = WPMU_PLUGIN_DIR . '/vip-integrations/vip-governance-' . $this->version . '/vip-governance.php';
$load_path = WPVIP_MU_PLUGIN_DIR . '/vip-integrations/vip-governance-' . $this->version . '/vip-governance.php';
if ( file_exists( $load_path ) ) {
require_once $load_path;
} else {
Expand Down
4 changes: 2 additions & 2 deletions jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,9 @@ function vip_jetpack_load() {
if ( 'local' === $version ) {
$path = WPCOM_VIP_CLIENT_MU_PLUGIN_DIR . '/jetpack/jetpack.php';
} elseif ( '' === $version ) {
$path = WPMU_PLUGIN_DIR . '/jetpack/jetpack.php';
$path = WPVIP_MU_PLUGIN_DIR . '/jetpack/jetpack.php';
} else {
$path = WPMU_PLUGIN_DIR . "/jetpack-$version/jetpack.php";
$path = WPVIP_MU_PLUGIN_DIR . "/jetpack-$version/jetpack.php";
}

if ( file_exists( $path ) ) {
Expand Down
4 changes: 2 additions & 2 deletions lib/sunrise/sunrise.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
return;
}

$mu_plugin_dir = defined( 'WPMU_PLUGIN_DIR' ) ? constant( 'WPMU_PLUGIN_DIR' ) : constant( 'WP_CONTENT_DIR' ) . '/mu-plugins';
$mu_plugin_dir = defined( 'WPVIP_MU_PLUGIN_DIR' ) ? constant( 'WPVIP_MU_PLUGIN_DIR' ) : constant( 'WP_CONTENT_DIR' ) . '/mu-plugins';

if ( defined( 'VIP_IS_MULTIPLE_DATASETS_ENABLED' ) && VIP_IS_MULTIPLE_DATASETS_ENABLED ) {
require_once $mu_plugin_dir . '/lib/db-multiple-datasets-config.php';
Expand Down Expand Up @@ -75,7 +75,7 @@ function handle_not_found_error( $error_type ) {

$is_web_request = Context::is_web_request();
if ( $is_web_request ) {
$mu_plugin_dir = defined( 'WPMU_PLUGIN_DIR' ) ? constant( 'WPMU_PLUGIN_DIR' ) : constant( 'WP_CONTENT_DIR' ) . '/mu-plugins';
$mu_plugin_dir = defined( 'WPVIP_MU_PLUGIN_DIR' ) ? constant( 'WPVIP_MU_PLUGIN_DIR' ) : constant( 'WP_CONTENT_DIR' ) . '/mu-plugins';
$is_maintenance_mode = Context::is_maintenance_mode();
if ( $is_maintenance_mode ) {
// 503 prevents page from being cached.
Expand Down
Loading

0 comments on commit 9ab0146

Please sign in to comment.