Add support for Google Maps in WordPress Visual Editor
Have you ever pasted a Google Map into the HTML editor of WordPress, then gone back to the visual editor just to see it dissappear? Pretty annoying.
Here’s a a line of code that will stop that from happening. Simply paste it somewhere in your Theme Functions file (functions.php) in between the <?php and ?>.
Ionce got this solution from the WordPress support forums but can’t remember where, sorry…
add_filter('tiny_mce_before_init', create_function( '$a',
'$a["extended_valid_elements"] = "iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]"; return $a;') );