Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Configure TinyMCE editor not to strip out schema attributes
- // Configuration copied from https://snipt.net/jamesw/prevent-tinymce-from-stripping-schemaorg-attributes-in-wordpress/
- function hm_change_mce_options($in) {
- if(!empty($in['extended_valid_elements']))
- $in['extended_valid_elements'] .= ',';
- $in['extended_valid_elements'] .= '@[id|class|style|title|itemscope|itemtype|itemprop|datetime|rel],div,dl,ul,dt,dd,li,span,a|rev|charset|href|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]';
- return $in;
- }
- add_filter('tiny_mce_before_init', 'hm_change_mce_options');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement