how to include absolute css path using add_editor_style() in wordpress -
how include external css google font http://fonts.googleapis.com/css?family=lato
using add_editor_style() ?
when add add_editor_style('http://fonts.googleapis.com/css?family=lato');
, in source code show :
<link rel="stylesheet" data-mce-href="http://203.223.152.159/~marineac/wp-content/themes/twentyten/http://fonts.googleapis.com/css?family=lato&ver=342-201106301" href="http://203.223.152.159/~marineac/wp-content/themes/twentyten/http://fonts.googleapis.com/css?family=lato&ver=342-201106301">
you should use mce_css
filter. not tested:
function so_17961871( $mce_css ) { if ( ! empty( $mce_css ) ) $mce_css .= ','; $mce_css .= 'http://fonts.googleapis.com/css?family=lato'; return $mce_css; } add_filter( 'mce_css', 'so_17961871' );
Comments
Post a Comment