Make videos output as iframes not links

Copy paste from my answer here but with iframe/video mime type added: Alter image output in content function WPSE_80145_Mime($html, $id) { //fetching attachment by post $id $attachment = get_post($id); $mime_type = $attachment->post_mime_type; //get an valid array of video types, add any extra ones you need $image_exts = array( ‘video/mpeg’, ‘video/mp4’, ‘video/quicktime’ ); //checking the above … Read more

Multiple TinyMCEs breaking Distraction Free Writing

Don’t use meta boxes for TinyMCE. It has some kind of conflict with the DOM. Hook your code including wp_editor to edit_page_form action instead: add_action( ‘edit_page_form’, ‘my_second_editor’ ); function my_second_editor() { // get and set $content somehow… wp_editor( $content, ‘mysecondeditor’ ); } See Notes on wp_editor in the Codex.

WYSIWYG with HTML source?

Why not automate the move from Drupal to WP? I think WP will fix some of the P tag issue during the upload. http://codex.wordpress.org/Importing_Content#Drupal If that isn’t an option, I think WP is using br’s instead of full new p. From the visual editor, I’d delete the copied break altogether and “enter” a new one.

regEx wp core file

I was able to answer my own question. Simply adding a 0-9 into the code above remedied the situation. Here is the final code: if (!name || !/^[a-z0-9][a-z0-9\-\_:\.]*$/i.test(name)) { tinyMCEPopup.alert(‘advanced_dlg.anchor_invalid’); return; }

WordPress WYSIWYG editor on demand, responsive

Using the following code to FORCE the buttons to wrap when the width of the editor hit a certain width, I used this code: where single-movie-row is the container holding my WYSIWYG .single-movie-row .mceToolbar td { display:table-row; float: left; } .single-movie-row .mceToolbar td:nth-of-type(11){ clear: left; }