Advertisement
Guest User

Untitled

a guest
Feb 18th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. // Configure TinyMCE editor not to strip out schema attributes
  2. // Configuration copied from https://snipt.net/jamesw/prevent-tinymce-from-stripping-schemaorg-attributes-in-wordpress/
  3. function hm_change_mce_options($in) {
  4. if(!empty($in['extended_valid_elements']))
  5. $in['extended_valid_elements'] .= ',';
  6.  
  7. $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]';
  8.  
  9. return $in;
  10. }
  11. add_filter('tiny_mce_before_init', 'hm_change_mce_options');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement