Changing the default WP editor font and size

You’ll need to add support for your theme (if it does not already have it) for editor styles. See this for more information: http://codex.wordpress.org/Function_Reference/add_editor_style Then you’ll just need to create a stylesheet. There are some themes out there that already support editor styles, which might be a good place to start in order to know … Read more

Auto-resize when writing with Custom post WP editor

Finally I got around this. You need to modify tinymce args passed to wp_editor function. WordPress have a argument wp_autoresize_on to allow the editor to be resized automatically. So instead of these: ‘tinymce’ => array( ‘toolbar1’=> ‘bold,italic,underline,link,unlink,forecolor’, ‘toolbar2’ => ”, ‘toolbar3’ => ” ) you need to use this: ‘tinymce’ => array( ‘autoresize_min_height’ => 100, … Read more

Remove specific buttons from wp_editor()

If you are using the settings API, you can use exactly the same code for calling wp_editor as you would anywhere else I’ve test the code below, it adds a setting section to the reading section, and then adds a field to the section containing a WYSIWYG editor with buttons limited to link, img and … Read more

How to remove the “Path” line in the WordPress Editor for end users who are submitting a form?

This is how the tinymce statusbar displays on my intsall: <div id=”mceu_34″ class=”mce-statusbar mce-container mce-panel mce-stack-layout-item mce-last” hidefocus=”1″ tabindex=”-1″ role=”group”> <div id=”mceu_34-body” class=”mce-container-body mce-flow-layout”> <div id=”mceu_35″ class=”mce-path mce-flow-layout-item mce-first mce-last”> <div role=”button” class=”mce-path-item” data-index=”0″ tabindex=”-1″ id=”mceu_35-0″ aria-level=”0″>p</div> <div class=”mce-divider” aria-hidden=”true”> » </div> <div role=”button” class=”mce-path-item mce-last” data-index=”1″ tabindex=”-1″ id=”mceu_35-1″ aria-level=”1″>strong</div> </div> </div> </div> so this … Read more

WP Editor strips input placeholder attribute

The list of allowed elements and attributes is stored in the global variable $allowedposttags which is set in wp-includes/kses.php. To override it create a simple mu plugin with the following content: <?php # -*- coding: utf-8 -*- /** * Plugin Name: Enable placeholder attribute for input elements in post tags. * Version: 2012.07.18 */ add_action( … Read more

Shortcode attribute escaping

I suggest using keywords for them. so you would do something like [shortcode attr=”single_quote double_quote”]test[/shortcode]. Then, while parsing the shortcode you can change them back.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)