2010-09-02 78 views
3

http://codex.wordpress.org/WPMU_Functions/get_current_site#ExamplesWordPress插件返回站点名称

在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; 

从顶级网站不幸的是,这是返回信息,不是插件所在的子网站,而是我想要的。

回答

3

我会认为你可以做到这一点:

get_bloginfo( '名称');

+0

注意:我在此做了一个strtolower,将它传递给我正在构建的url。 – JohnnyBizzle 2010-09-23 09:47:32

相关问题