Files
hub-insurance/wp-content/mu-plugins/99-studio-loader.php
T
2026-07-02 15:54:39 -06:00

34 lines
1.3 KiB
PHP

<?php
/**
* Studio MU-Plugins Loader
* Loads Studio-specific mu-plugins from a Studio-managed directory.
*/
// Define database constants if not already defined. It fixes the error
// for imported sites that don't have those defined e.g. WP Cloud and
// include plugins which try to access those directly e.g. Mailpoet
if ( ! defined( 'DB_NAME' ) ) define( 'DB_NAME', 'database_name_here' );
if ( ! defined( 'DB_USER' ) ) define( 'DB_USER', 'username_here' );
if ( ! defined( 'DB_PASSWORD' ) ) define( 'DB_PASSWORD', 'password_here' );
if ( ! defined( 'DB_HOST' ) ) define( 'DB_HOST', 'localhost' );
if ( ! defined( 'DB_CHARSET' ) ) define( 'DB_CHARSET', 'utf8' );
if ( ! defined( 'DB_COLLATE' ) ) define( 'DB_COLLATE', '' );
// Set environment type to local if not already defined
if ( ! defined( 'WP_ENVIRONMENT_TYPE' ) ) define( 'WP_ENVIRONMENT_TYPE', 'local' );
$studio_mu_plugins_dir = 'C:\\Users\\Knossos\\AppData\\Local\\Temp\\studio-mu-plugins-5kcqeQ';
if ( is_dir( $studio_mu_plugins_dir ) ) {
$files = glob( $studio_mu_plugins_dir . '/*.php' );
if ( $files ) {
// Sort files to ensure consistent loading order
sort( $files );
foreach ( $files as $file ) {
if ( is_file( $file ) ) {
require_once $file;
}
}
}
}