Can Rich Text features be configured per user?

look here tinymce and users and add something similar to your themes functions.php and maybe work on that by wrapping it with a custom role / capability which you assign to your trusted users: if (current_user_can( ‘have_tiny_mce_options’ ) { tinymce options here } the page example only shows 3 options but im sure that this … Read more

Set post title based on first h2 element in the content section

If you can handle this in the PHP side, you might be able to pull the h2 tags from the content using regular expression. PHP VERSION Test content $content = “<h2>This is H2 Content</h2><p>This is p content</p>Random Content<h2>This is another H2 section</h2><b><h2>This the third H2 section</h2></b>”; Grab any text inside H2s preg_match_all(‘#<h2>(.*?)</h2>#’, $content, $matches); // … Read more

How to allow html5 tag in WordPress

Just FYI… WordPress 3.2 includes an updated TinyMCE which allows HTML5 tags. It’s still under development but is fairly stable if you want to take the risk of running it now. The alternative is to write any posts requiring the tag with the visual editor turned off. As long as you don’t turn the editor … Read more

When adding buttons to the tinyMCE editor, how do I make them wrap to the next line and/or display in the “Kitchen Sink” area?

I imagine you’re also adding a filter mce_buttons to add in the button to, something like.. add_filter( ‘mce_buttons’, ‘add_my_tinymce_buttons’ ); function add_my_tinymce_buttons( $items ) { $items[] = ‘your-button’; return $items; } Just change the filter to hook onto mce_buttons_2 instead, and the button will appear on the second row , eg.. add_filter( ‘mce_buttons_2’, ‘add_my_tinymce_buttons’ ); … Read more

content gets scrambled

This is because the images are defined as floating to the left. To solve this, you can add a clear: both to the <h4> elements (it probably won’t hurt to do this in the stylesheet – will there be a situation where you need a title that exists next to a float?).

Add TinyMCE to CPT metaboxes in 3.1?

Use this class: http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html and then call the metabox like this (don’t forget to read the manual and view some examples): $meta_boxes[] = array( ‘id’ => ‘textmetabox’, ‘title’ => ‘Your Meta Box Title’, ‘pages’ => array(‘post’, ‘slider’, ‘whatever-your-cpt-is’), ‘fields’ => array( array( ‘name’ => ‘Your thoughts about Deluxe Blog Tips’, ‘id’ => $prefix . ‘thoughts’, … Read more

Add a select a class dropdown in tinymce

To achieve the dropdown styles we have to use the filter hook tiny_mce_before_init. This filter grants developers access to the TinyMCE settings array. The following example adds custom style options to an existing Style dropdown. add_filter( ‘tiny_mce_before_init’, ‘my_mce_before_init’ ); function my_mce_before_init( $settings ) { $style_formats = array( array( ‘title’ => ‘1/5 Block’, ‘block’ => ‘div’, … Read more

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