I need to get username, password etc from the wp-config
file to connect to a custom PDO database.
Currently I have another file where I have this info, but I would like to only use the wp-config
.
So how can I read the different properties of wp-config
?
I have even defined my own constants in in wp-config.php and managed to retrieve them in theme without any includes.
wp-config.php
define('DEFAULT_ACCESS', 'employee');
functions.php
echo "DEFAULT_ACCESS :".DEFAULT_ACCESS;
outputs DEFAULT_ACCESS :employee