From 8307088b48b492dbbd427e4b406a9955e0f566a2 Mon Sep 17 00:00:00 2001
From: Chris Reynolds
Date: Mon, 9 Sep 2024 15:06:47 -0600
Subject: [PATCH 1/4] the first $config_filename definition is redundant
'wp-config.php' is already the default value in the filter
---
inc/network/includes-network.php | 2 --
1 file changed, 2 deletions(-)
diff --git a/inc/network/includes-network.php b/inc/network/includes-network.php
index a236a02..4f89f98 100644
--- a/inc/network/includes-network.php
+++ b/inc/network/includes-network.php
@@ -383,8 +383,6 @@ function network_step2( $errors = false ) {
$home_path = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path();
$wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix );
$rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
-
- $config_filename = 'wp-config.php';
$config_filename = apply_filters( 'pantheon.multisite.config_filename', 'wp-config.php' );
$location_of_wp_config = $abspath_fix;
From 701ff19628978fda37c0da706a9b74bd589fddf6 Mon Sep 17 00:00:00 2001
From: Chris Reynolds
Date: Mon, 9 Sep 2024 15:07:04 -0600
Subject: [PATCH 2/4] location of wp config could be filterable
---
inc/network/includes-network.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/network/includes-network.php b/inc/network/includes-network.php
index 4f89f98..6994a21 100644
--- a/inc/network/includes-network.php
+++ b/inc/network/includes-network.php
@@ -389,7 +389,7 @@ function network_step2( $errors = false ) {
if ( ! file_exists( ABSPATH . $config_filename ) && file_exists( dirname( ABSPATH ) . '/' . $config_filename ) ) {
$location_of_wp_config = dirname( $abspath_fix );
}
- $location_of_wp_config = trailingslashit( $location_of_wp_config );
+ $location_of_wp_config = apply_filters( 'pantheon.multisite.location_of_wp_config', trailingslashit( $location_of_wp_config ) );
// Wildcard DNS message.
if ( is_wp_error( $errors ) ) {
From 45df1172d8187891f0b2043b2a0917abe3d736d9 Mon Sep 17 00:00:00 2001
From: Chris Reynolds
Date: Mon, 9 Sep 2024 15:07:33 -0600
Subject: [PATCH 3/4] allow the happy publishing line to be filtered it should
refer to any line that is at the end of the file
---
inc/network/includes-network.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/inc/network/includes-network.php b/inc/network/includes-network.php
index 6994a21..ba3a517 100644
--- a/inc/network/includes-network.php
+++ b/inc/network/includes-network.php
@@ -446,6 +446,8 @@ function network_step2( $errors = false ) {
/* ' . esc_html__( 'That’s all, stop editing! Happy publishing.' ) . ' */' );
?>
@@ -455,9 +457,7 @@ function network_step2( $errors = false ) {
wp_kses_post( __( 'Add the following to your %1$s file in %2$s above the line reading %3$s:' ) ),
'' . $config_filename . '
', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'' . $location_of_wp_config . '
', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
- // translators: This string should only be translated if wp-config-sample.php is localized.
- // You can check the localized release package or https://i18n.svn.wordpress.org//branches//dist/wp-config-sample.php.
- '/* ' . esc_html__( 'That’s all, stop editing! Happy publishing.' ) . ' */
'
+ $happy_publishing_msg // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
);
?>
From 1d857534111717d111124452cd7973a7963f90ad Mon Sep 17 00:00:00 2001
From: Chris Reynolds
Date: Mon, 9 Sep 2024 15:07:38 -0600
Subject: [PATCH 4/4] lint
---
inc/site-health.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/inc/site-health.php b/inc/site-health.php
index af4dd98..77eb459 100644
--- a/inc/site-health.php
+++ b/inc/site-health.php
@@ -259,8 +259,8 @@ function get_compatibility_manual_fixes() {
__( 'WP Cerber conflicts with Pantheon\'s Global CDN caching. Read more about the issue here.', 'pantheon' ),
'https://docs.pantheon.io/plugins-known-issues#wp-cerber'
)
- )
- ]
+ ),
+ ],
];
return add_plugin_names_to_known_issues(