开发者

Wordpress plugin returning site name

开发者 https://www.devze.com 2023-01-14 00:22 出处:网络
http://codex.wordpress.org/WPMU_Functions/get_current_site#Examples In Wordpress, I am trying to retrieve the site name inside a plugin using the above function:

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

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

echo 'You are viewing '.get_current_site()->site_name;
echo '<br/开发者_JS百科>Domain '.get_current_site()->domain;
echo '<br/>id  '.get_current_site()->id ;
echo '<br/>path '.get_current_site()->path;

Unfortunately this is returning info from the top level site, not whichever subsite the plugin is on, which I want.


i would think you can do it with:

get_bloginfo('name');

0

精彩评论

暂无评论...
验证码 换一张
取 消