Tag Info

New answers tagged

0

admin_url() should be used. However for some websites this request gives error 404 in front-end admin_url('wp-admin/admin-ajax.php') should point to an actual file (admin-ajax.php), as such WordPress won't pass it through index.php, and so it shouldn't lead to the theme's 404 page. (Unless the file has been deleted). ... unless you have a .htaccess ...


0

The recommended best practice is to use a mu-plugin for this. Adding add_filter()s to wp-config.php directly can cause all kinds of other problems and conflicts.


0

Actually you can read all the constants defined in wp-config.php from any place you want. If you have something like this in your wp-config.php define('DB_NAME', 'some_value'); You can do this for example in your functions.php file echo DB_NAME; Constants are globally accessible from everywhere. So please think about this approach.



Top 50 recent answers are included