Wordpress plugin returning site name

http://codex.wordpress.org/WPMU_Functions/get_current_site#Examples

In Wordpress, I am trying to get the site name inside the plugin using the above function:

echo 'You are viewing '.get_current_site()->site_name;
echo '<br/>Domain '.get_current_site()->domain;
echo '<br/>id  '.get_current_site()->id ;
echo '<br/>path '.get_current_site()->path;

Unfortunately, this returns information from a top-level site, and not depending on which plug-in is connected, what I want.

+3
source share
1 answer

I think you can do this with:

get_bloginfo ('name');

+3
source

Source: https://habr.com/ru/post/1762901/


All Articles