http://codex.wordpress.org/WPMU_Functions/get_current_site#Examples
在 Wordpress 中,我尝试使用上述函数在插件中检索站点名称:
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;
不幸的是,这是从顶级站点返回的信息,而不是我想要的插件所在的任何子站点。
最佳答案
我认为你可以用:
get_bloginfo('姓名');
关于php - 返回站点名称的 Wordpress 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3629276/