1 line
573 B
JavaScript
1 line
573 B
JavaScript
(function(a){a(".post-format-select a").on("click.post-format",function(h){var g=a(this),d,b,f=g.data("wp-format"),c=a("#post-body-content");a(".post-format-select a.nav-tab-active").removeClass("nav-tab-active");g.addClass("nav-tab-active").blur();a("#post_format").val(f);c.get(0).className=c.get(0).className.replace(/\bwp-format-[^ ]+/,"");c.addClass("wp-format-"+f);if(typeof tinymce!="undefined"){d=tinymce.get("content");if(d){b=d.getBody();b.className=b.className.replace(/\bpost-format-[^ ]+/,"");d.dom.addClass(b,"post-format-"+f)}}h.preventDefault()})})(jQuery); |