WordPress 3.9 and TinyMCE 4.0 Custom Button Plugin Fix -
, I do not see the problem getting custom font drop-down and Tinimiii documentation found Are not even help. The plugin was using the following functions: theme_advanced_buttons1_add_before, theme_advanced_fonts and tiny_mce_before_init to add font options. It does not work anymore and I have been told about the way to overcome this issue (so far) any thoughts ?? The current code is: Replace with
// TinyMCE function wp_googlefontmgr_formatTinyMCE ($ init) add font selection // the option settings for {$ myfontlist = ""; $ Mycsslist = ""; $ Editorfonts = get_option ("wp_googlefontmgr_editorfonts", 1); $ Websafefonts = get_option ("wp_googlefontmgr_safefonts", 1); ($ Editorfonts) {if ($ websafefonts) {// get websafefont list $ safefontlist = 'Arial = Arial, Helvetica, sans-serif, Arial Black = Arial Black, gadgets, sans-serif, Comic Sans = Comic Sans MS, comic Sence MS, cursor, courier new = courier new, courier new, courier, monospace, Georgia = Georgia, Georgia, serif, '; $ Safefontlist = 'Effect = effect, charcoal, sans-serif, Lucida Console = Lucida Console, Monaco, monospace, Lucida Sans Unicode = Lucida Sans Unicode, Lucida Grande, sans-serif, Palatino Linotype = Palatino Linotype, Book Antiqua, Palatino, serif; '; $ Safefontlist = 'Tahoma = Tahoma, Geneva, sans-serif, Times New Roman = Times New Roman, Times, serif, Trebuchet MS = Trebuchet MS, Helvetica, sans-serif, Verdana = Verdana, Geneva, sans-serif, Gill Sans = Gill Sons, Geneva, Un-Serif, '; } $ Fontdata = get_option ("wp_googlefontmgr_fonts"); // Get the Google Font List ($ fontdata) {// Load Forms for use in the // $ array = Explosion (",", $ fontdata); Forex Currency ($ value $ value) {$ myfontlist. = Sprintf (_ ('% s =% s,'), $ value, $ value); $ Mycsslist = "Http://fonts.googleapis.com/css?family=" .urlencode ($ value) ""; }} // Check if webfonts are loading ($ websafefonts) {$ myfontlist = $ myfontlist} $ Safefontlist; } $ Init ['content_css'] = get_template_directory_uri () "/editor-style.css"; $ Init ['content_css'] = rtrim ($ mycsslist, ','); $ Init ['theme_advanced_buttons1_add_before'] = 'Select Format, Fonts'; $ Init ['theme_advanced_fonts'] = rtrim ($ myfontlist, ','); Return $ init; }}
theme_advanced_fonts
font_formats
Comments
Post a Comment