diff --git a/inc/network/includes-network.php b/inc/network/includes-network.php
index fefa86b..a38957e 100644
--- a/inc/network/includes-network.php
+++ b/inc/network/includes-network.php
@@ -99,6 +99,22 @@ function get_clean_basedomain() {
return $domain;
}
+/**
+ * Returns the warning message about subdirectory multisites not liking custom wp-content directories.
+ *
+ * Applies the 'pantheon.subdirectory_networks_message' filter.
+ *
+ * @since 1.4.5
+ * @return string Warning message or empty string.
+ */
+function pantheon_get_subdirectory_networks_message() {
+ if ( apply_filters( 'pantheon.enable_subdirectory_networks_message', true ) ) {
+ return '
' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
';
+ }
+
+ return '';
+}
+
/**
* Prints step 1 for Network installation process.
*
@@ -231,7 +247,7 @@ function network_step1( $errors = false ) {
endif;
if ( WP_CONTENT_DIR !== ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) {
- echo '' . esc_html__( 'Warning:' ) . ' ' . esc_html__( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
';
+ echo esc_html( pantheon_get_subdirectory_networks_message() );
}
$is_www = ( 0 === strpos( $hostname, 'www.' ) );
@@ -595,7 +611,8 @@ function network_step2( $errors = false ) {
);
echo '';
if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) {
- echo '' . esc_html__( 'Warning:' ) . ' ' . esc_html__( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
';
+ // Display the subdirectory networks message unless filtered.
+ echo esc_html( pantheon_get_subdirectory_networks_message() );
}
?>
';
if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) {
- echo '' . esc_html__( 'Warning:' ) . ' ' . esc_html__( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
';
+ // Display the subdirectory networks message unless filtered.
+ echo esc_html( pantheon_get_subdirectory_networks_message() );
}
?>