I am developing a wordpress plugin.
In this plugin I am trying to get the hostname of the server.
Is this possible?
I see tags/filters like:
But they do not seem to work in plugins.
I would just use the PHP $_SERVER predefined variable rather than worry about whether a WP function is available or not.
echo $_SERVER['SERVER_NAME'];
will give you something like: www.example.com
http://www.php.net/manual/en/reserved.variables.server.php
I think you could use bloginfo('url'); wich gets the baseurl or are you looking for something else
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With