WordPress Started Executing Code Inside PRE Tags Even They Are Properly Escaped

Quick Fix Answer: Add the below code to your theme functions.php file for a quick fix. Rest still trying to find the reason for this error so if you have any then welcome to comment here so I will mark your answer as accepted. /* ————————————————————————- * * Stop Executing Codes Inside Pre/Code Tags /* … Read more

Why did my get mangled, and how can I keep from happening again?

This is a known bug with TinyMCE. That is the standard text editor in WP. When you hit refresh whilst editing a page it adds those tags to javascript. https://github.com/tinymce/tinymce/commit/5f320ac2acda15902b0488df1b7d85bf5c24ef94 However it is marked as fixed some time ago (2015) so perhaps your site is not up to date? Or of course perhaps it has … Read more

add button to tinymce

Your method is complex… Here is simplest function to add BUTTON in TinyMCE: (insert this code in funcitons.php): add_action(‘admin_init’, function() { if (current_user_can(‘edit_posts’) && get_user_option(‘rich_editing’) == ‘true’) { add_filter(‘mce_buttons_2’, ‘register_buttonfirst’); add_filter(‘mce_external_plugins’, ‘add_pluginfirst’); } }); function register_buttonfirst($buttons) { array_push($buttons, “|”, “shortcode_button1” ); return $buttons;} function add_pluginfirst($plugin_array) {$plugin_array[‘MyPuginButtonTag’] = plugin_dir_url( __FILE__ ).’My_js_folder/1_button.php’;return $plugin_array;} add_filter( ‘tiny_mce_version’, ‘my_refresh_mceeee1’); function … Read more

Add new MCE button for toggle specific cell background color

I have found a great tutorial about making a custom button to the tinymce. http://qnimate.com/adding-buttons-to-wordpress-visual-editor/ You can just follow this guide and copy all of it. Don’t forget to activate your new plugin in the plugin menu (in admin panel). Then you can just change the code inside index.js and especially in the ed.addCommand(“green_command”, function() … Read more

Is there an alternative way to upload html without using TinyMCE?

WordPress does a handful of HTML clean-up tasks when you submit your post. Here are a few: “Texturize” the special characters Automatic paragraphs – for carriage returns Emoticons Special characters (like “&” and “<“) Removing script tags and other “unsafe” stuff You will want to investigate the Raw HTML plug-in which has some great provisions … Read more