Avoid converting “>” to >

Filtering the_content function wpse72941_content_filter( $content ) { $new_content=””; foreach( preg_split( ‘/((\r?\n)|(\r\n?))/’, $content ) as $line ) { $new_content .= preg_replace( ‘/^>/’, ‘>’, $line ) . ‘\r\n’; } return $new_content; } add_filter( ‘the_content’, ‘wpse72941_content_filter’, 1 ); I don’t know your markdown plugin – for the above approach, I have assumed that the markdown is interpreted after … Read more

WordPress Image Editor not working – conflict?

I have actually managed to resolve my own problem. For anyone else that might ever read this the problem which caused this was that my functions.php file had a closing ?> at the very end. For whatever reason this is what cause the issue and by removing this last line it was working again.

How to force TinyMCE in WordPress to replace newlines with tags and not with  

The answer suggested by GavinR is correct. You don’t need to install the suggested plug-in, though. Just add this mini plugin and you’re set: <?php defined( ‘ABSPATH’ ) OR exit; /* Plugin Name: TinyMCE break instead of paragraph */ function mytheme_tinymce_settings( $tinymce_init_settings ) { $tinymce_init_settings[‘forced_root_block’] = false; return $tinymce_init_settings; } add_filter( ‘tiny_mce_before_init’, ‘mytheme_tinymce_settings’ ); Now … Read more

Adding a rich text editor to Excerpt

Just replace the default output. Make sure you unescape the excerpt before you send it to the editor: add_action( ‘add_meta_boxes’, array ( ‘T5_Richtext_Excerpt’, ‘switch_boxes’ ) ); /** * Replaces the default excerpt editor with TinyMCE. */ class T5_Richtext_Excerpt { /** * Replaces the meta boxes. * * @return void */ public static function switch_boxes() { … Read more

Customizing HTML Editor Quicktags button to open a dialog for choosing insert options

According to the Codex, you can’t do this directly through the API. However, you can do it by using your own quicktags.js file as shown below. function sample_load_admin_scripts() { if ( is_admin() ) { wp_deregister_script(‘quicktags’); wp_register_script(‘quicktags’, (“/path/to/your/quicktags.js”), false, ”, true); } } if (is_admin()) { add_action(‘init’, sample_load_admin_scripts); } Then just add Javascript to do your … Read more

Editor removes tags

I had problems with TinyMCE Advanced. I struggled with this for a while. Finally discovered a simple solution – Use Shortcodes! Place this code into functions.php and enter [br] wherever you want a br tag to appear. add_shortcode(“br”, “br_tag”); function br_tag(){ return(“<br/>”); }

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