関数 wp_set_internal_encoding()
2014/11/22
エンコーディングを設定する関数を定義
定義ファイル :/blog/wp-includes/load.php
1 2 3 4 5 6 7 | function wp_set_internal_encoding() { if ( function_exists( 'mb_internal_encoding' ) ) { $charset = get_option( 'blog_charset' ); if ( ! $charset || ! @mb_internal_encoding( $charset ) ) mb_internal_encoding( 'UTF-8' ); } } |
‘mb_internal_encoding’関数があるか調べ、あれば 変数 $charset に Wordpress に設定したキャラクターセットを取得、代入する。
取得・設定ができなければ強制的に’UTF-8’設定する。
@mb_internal_encoding
@マーク : エラーが発生してもメッセージを出力しない