I’m building my theme options page and I want to use WordPress TinyMCE editor here, so I’m calling wp_editor
. But when I’m saving data some entities are added to the content for example, lets say I want to add image:
<img class="" title="" src="https://wordpress.stackexchange.com/questions/50674/path_to_image" alt="" />
Thats what I’ve got after clicking save:
<img title="\"\"" src="https://wordpress.stackexchange.com/questions/50674/\"path_to_image\"" alt="\"\"" />
Why is this changing quotes into entities (and leaves actual – correctly displayed quotes?)??
@edit:
This is how I display my editor:
$class = (isset($value['class'])) ? $value['class']:'';
$content = (get_option($value['id']) ? get_option($value['id']) : '');
$settings = array(
'textarea_name' => $value['id'],
'editor_class' => $class
);
wp_editor($content, strtolower($value['id']), $settings );
And that’s how I save data for this field:
update_option($value['id'],
$_POST[ $value['id'] ]);