今天突然公司负责网站编辑的同事说公司网站后台打不开编辑功能了。
由于我的电脑是设置了自动缓存页面,而且从来不清理的,估计也是一些众所周知的原因导致的了,马上进行抓包分析。
找到了这个导致无法打开页面的元凶后,就估计调用文件的位置,既然是framework,那就到wordpress主题文件的文件夹里找到下面的文件。
/wp-content/themes/你的主题文件夹/framework/php/class-gmaps.php
搜索.google,果然找到了以下的代码
if( ! class_exists( 'av_google_maps' ) ){class av_google_maps{//maintain URL and version number here for all objects using this elementconst API_URL='https://maps.googleapis.com/maps/api/js';const API_VERSION='3.30';const MAPS_SEARCH_URL='https://www.google.com/maps/search/';const AJAX_NONCE='av_google_maps_nonce';/** * Holds the instance of this class * * @since 4.3.2 * @var av_google_maps */static private $_instance = null;
修改成,特别注意,国内的地址和国外的地址域名和形式是不同的:
if( ! class_exists( 'av_google_maps' ) ){class av_google_maps{//maintain URL and version number here for all objects using this elementconst API_URL='https://ditu.google.cn/maps/api/js';const API_VERSION='3.30';const MAPS_SEARCH_URL='https://www.google.com/maps/search/';const AJAX_NONCE='av_google_maps_nonce';/** * Holds the instance of this class * * @since 4.3.2 * @var av_google_maps */static private $_instance = null;
保存文件后,刷新页面就可以了。