Skip to content

Commit 61d8caf

Browse files
committed
Fix custom wp-content logic
1 parent a3490fa commit 61d8caf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Context/GivenStepDefinitions.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,21 @@ public function given_a_custom_wp_directory() {
175175
"define( 'WP_PLUGIN_DIR', __DIR__ . '/my-plugins' );"
176176
);
177177

178+
$this->move_files( 'my-content/mu-plugins', 'my-mu-plugins' );
179+
$this->add_line_to_wp_config(
180+
$wp_config_code,
181+
"define( 'WPMU_PLUGIN_DIR', __DIR__ . '/my-mu-plugins' );"
182+
);
183+
178184
file_put_contents( $wp_config_path, $wp_config_code );
179185

180186
if ( 'sqlite' === self::$db_type ) {
181187
$db_dropin = $this->variables['RUN_DIR'] . '/my-content/db.php';
182188

183189
/* similar to https://github.com/WordPress/sqlite-database-integration/blob/3306576c9b606bc23bbb26c15383fef08e03ab11/activate.php#L95 */
184190
$file_contents = str_replace(
185-
'plugins/',
186-
'../my-plugins/',
191+
'mu-plugins/',
192+
'../my-mu-plugins/',
187193
file_get_contents( $db_dropin )
188194
);
189195

0 commit comments

Comments
 (0)