试图想出这个...我有一个插件使用wp_register_script注册google maps api url然后使用wp_enqueue_script调用它,这对我来说都是正确的。当页面呈现时,域名已从网址中删除,因此它在该点调用相对路径并破坏脚本......任何想法
worpress:7.1 论文:2.1.4
// register the script
wp_register_script( 'map_list-google-places', 'http://maps.googleapis.com/maps/api/js?sensor=true&libraries=places' . $languageString);
//Load google maps
wp_enqueue_script( 'map_list-google-places');
<script type='text/javascript' src='/maps/api/js?sensor=true&libraries=places&ver=3.7.1'></script>
答案 0 :(得分:2)
在这里回答我自己的问题。有一个名为Relative Root Plugin的插件,在我的服务器(Rackspace Cloud Sites)旋转Wordpress网站时安装。
简单地停用或删除插件。 DONE。