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.' ) . '
' . esc_html__( 'Warning:' ) . ' ' . esc_html__( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
' . 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() ); } ?>