ファンクション
画像等 http://をhttps://に変更
//ssl add_action('init', 'ssl_ob_start'); function ssl_ob_start(){ if( !is_admin() ) ob_start('ssl_ob_callback'); } function ssl_ob_callback($buffer){ $pattern = array( '|(<[^<]*)href=\"'.get_option('home').'([^>]*)\.css([^>]*>)|', '|(<[^<]*)href=\''.get_option('home').'([^>]*)\.css([^>]*>)|', '|(<[^<]*)src=\"'.get_option('home').'([^>]*>)|', '|(<[^<]*)src=\''.get_option('home').'([^>]*>)|' ); $replacement = array( '${1}href="https://za-su.com${2}.css${3}', '${1}href=\'https://za-su.com${2}.css${3}', '${1}src="https://za-su.com${2}', '${1}src=\'https://za-su.com${2}' ); $buffer = preg_replace($pattern, $replacement, $buffer); return $buffer; }