/wp-includes/functions.php里面require ABSPATH . WPINC . '/option.php';后新加一段

require ABSPATH . WPINC . '/option.php';
add_filter('script_loader_src', 'agnostic_script_loader_src', 20,2); function agnostic_script_loader_src($src, $handle) { return preg_replace('/^(http|https):/', '', $src); } add_filter('style_loader_src', 'agnostic_style_loader_src', 20,2); function agnostic_style_loader_src($src, $handle) { return preg_replace('/^(http|https):/', '', $src); }

/wp-config.php新加以下代码

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);
最后修改:2022 年 08 月 29 日
如果觉得我的文章对你有用,请随意赞赏