14. December 2013

Another six months have come and gone and it’s again time for a new version of WordPress, this time with a complete visual overhaul of the admin interface. I like the slick new design with OpenSans as the new default font and while there are a few isolated things I don’t particularly like, I upgraded my websites anyway. But after each major upgrade, I have to redo a couple of small alterations in the code to make the built-in editor a little more comfortable – even with version 3.8 they are still necessary, so here they are again with some minor amendments.

HTML-Editor: The HTML source editor has been using Consolas as a fixed-width font since version 3.2, but the line height is still a bit to generous especially on smaller screens. The corresponding CSS definition can be found in the file wp-includes/css/editor.css, in which it is possible to change line-height: 150%; in the definition wp-editor-area (formerly textarea.wp-editor-area) to 120% or another desired value.

Visual Editor: The display font of the visual editor is still Times New Roman, but it can be changed in the CSS file wp-includes\js\tinymce\themes\advanced\skins\wp_theme\content.css by altering the font definition in the main .body tag from font-family: Georgia […] to another font like Verdana. There is also now the possibility to let the current theme decide what font is used in the visual editor – this apparently works by placing an editor-style.css file into the CSS directory of a theme, but it seems the only theme that supports it is the new TwentyFourteen coming with this new release of WordPress, which switches the font to OpenSans. I have not yet found out if the font style of the visual editor can be changed directly from the CSS of a theme, but it seems that the new default theme calls up the editor-style.css to make exactly this happen.

Get Shortlink: The shortlink button next to the permalink line sometimes pops into the next line on displays 1024 pixels wide, but the button description can be changed into something less huge. Searching for the string “Get Shortlink” in the file /wp-admin/edit-form-advanced.php and just changing it into something else does the trick. The button can, of course, also be completely removed by deactivating the Jetpack module WP.ME-Shortlinks, but this is of no use if the feature is needed and the button is still too big.

And, of course, it needs to be said that I do not provide any guarantee for these “hacks” – you have to know what you’re doing if you are tinkering around in the innards of the WordPress system files. But if you’re careful and know your way around, these changes will not harm you WordPress installation at all – they are only a cosmetic makeover and no change in the program code is made.

Kategorie: Weblinks, Wordpress, WWW
Write a Comment