Closed mandrasch closed 1 month ago
The scripts provided here parses out config settings like DB_NAME from wp-config.php.
DB_NAME
wp-config.php
See:
Settings for wp-config.php can be written in 3 styles:
// single quotes define('DB_NAME', 'my-db'); // double quotes define("DB_NAME", "my-db"); // mixed quotes define('DB_NAME', "my-db");
Currently only single quotes are supported, which causes problems for users, e.g. https://github.com/mandrasch/ddev-pull-wp-scripts/issues/2.
A better regex could get values from all three variants.
If anyone is a pro, I'm happy to receive PRs for this challenge 👍
Submitted a PR to support multiple quote types: https://github.com/mandrasch/ddev-pull-wp-scripts/pull/5
Tested with single, double, and mixed successfully for me.
Thanks!
Thanks very much!
The scripts provided here parses out config settings like
DB_NAME
fromwp-config.php
.See:
Settings for
wp-config.php
can be written in 3 styles:Currently only single quotes are supported, which causes problems for users, e.g. https://github.com/mandrasch/ddev-pull-wp-scripts/issues/2.
A better regex could get values from all three variants.
If anyone is a pro, I'm happy to receive PRs for this challenge 👍