WordPressで連続するハイフン「–」を投稿したとき、「ー」に自動変換される。不都合が生じたので、修正しました。
変更するファイルは、「wp-includes」フォルダー内の「formatting.php」ファイルです。
変更内容は、下記に記載しています。

1. formatting.phpの変更

[root@localhost ~]# vi (ワードプレスの公開フォルダー)/wp-includes/formatting.php

ファイルの先頭に追記

// wptexturizeによる文字列変換をしない
remove_filter(‘the_title’, ‘wptexturize’);
remove_filter(‘the_content’, ‘wptexturize’);
remove_filter(‘the_excerpt’, ‘wptexturize’);
remove_filter(‘comment_text’, ‘wptexturize’);

// convert_charsによる文字列変換をしない
remove_filter(‘the_title’ , ‘convert_chars’);
remove_filter(‘the_content’, ‘convert_chars’);
remove_filter(‘the_excerpt’, ‘convert_chars’);

2.  formatting.phpの変更

1の方法でできない場合は、こちらを試してください・

[root@localhost ~]# vi (ワードプレスの公開フォルダー)/wp-includes/formatting.php

変更内容

(変更前)
$static_characters = array_merge(array(‘—‘, ‘ — ‘, ‘–‘, ‘ – ‘, ‘xn–’, ‘…’, ‘“’, ‘\’\”, ‘ ™’), $cockney);
$static_replacements = array_merge(array(‘—’, ‘ — ‘, ‘–’, ‘ – ‘, ‘xn--‘, ‘…’, $opening_quote, $closing_quote, ‘ ™’), $cockneyreplace);

(変更後)
$static_characters = array_merge(array(‘—‘, ‘ — ‘, ‘–‘, ‘ – ‘, ‘xn–’, ‘…’, ‘“’, ‘\’\”, ‘ ™’), $cockney);
$static_replacements = array_merge(array(‘---’, ‘ -- ‘, ‘--’, ‘ - ‘, ‘xn--‘, ‘…’, $opening_quote, $closing_quote, ‘ ™’), $cockneyreplace);

(感想)
以前も、同じ作業をしたのだが、「WordPress」をアップデートしたときに元に戻ってしまったみたい。アップデートの度に元に戻るようだったら、何か対策を考えなければ・・・バージョンアップしても修正されていない