Per impostazione predefinita, l’editor di WordPress non permette tag HTML che non sono conformi allo standard XHTML 1.0. Tuttavia, il codice riportato di seguito costringerà l’editore ad accettare altri tag. È possibile incollarlo nel file functions.php del tuo tema, salvarlo, e la funzione è pronta per essere utilizzata.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
function fb_change_mce_options($initArray) { // Comma separated string of extendes tags // Command separated string of extended elements $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]'; if ( isset( $initArray['extended_valid_elements'] ) ) { $initArray['extended_valid_elements'] .= ',' . $ext; } else { $initArray['extended_valid_elements'] = $ext; } // maybe; set tiny paramter verify_html //$initArray['verify_html'] = false; return $initArray; } add_filter('tiny_mce_before_init', 'fb_change_mce_options'); |
pixolo ads