Add comprehensive testing framework for both single site and multisite WordPress environments

This commit is contained in:
2025-04-21 17:32:01 +01:00
parent 136f07d9c4
commit 8ed22642e2
11 changed files with 422 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
<?php
/**
* Plugin Name: Multisite Setup Helper
* Description: Helper plugin to set up multisite testing environment
* Version: 1.0.0
* Author: WPALLSTARS
* License: GPL-2.0-or-later
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Add a filter to allow subdirectory multisite on localhost
*/
add_filter( 'allow_subdirectory_install', '__return_true' );
/**
* Add a filter to skip domain verification for multisite
*/
add_filter( 'multisite_domain_check', '__return_true' );
/**
* Add a filter to allow wildcard subdomains
*/
add_filter( 'wp_is_large_network', '__return_false' );
/**
* Add a filter to allow domain mapping
*/
add_filter( 'domain_mapping_warning', '__return_false' );