// コンテンツ内のhttpリンクを自動でhttpsに置換する設定 function replace_http_to_https_output($buffer) { // 自分のサイトのドメイン(例: http://example.com)をhttpsに置換 $search_http = 'http://' . $_SERVER['HTTP_HOST']; $replace_https = 'https://' . $_SERVER['HTTP_HOST']; return str_replace($search_http, $replace_https, $buffer); } function start_http_to_https_buffer() { ob_start("replace_http_to_https_output"); } function end_http_to_https_buffer() { if (ob_get_length()) { ob_end_flush(); } } add_action('init', 'start_http_to_https_buffer'); add_action('shutdown', 'end_http_to_https_buffer'); ページが見つかりませんでした « pain