TinyMCE Editor Set Default Tab

I came across this page — http://wp-snippets.com/set-default-editor/ * — which looks promising, though a little out of date. Instead of their code, I would suggest trying this: add_filter( ‘wp_default_editor’, ‘wpse101200_default_editor’ ); function wpse101200_default_editor( $editor ) { return ‘tinymce’; } Reference WPSeek’s wp_default_editor() page wp_default_editor() in the WordPress core source Unfortunately, the Codex doesn’t currently have … Read more

TinyMCE style_select – Append Classes

EDIT The quick and easy method is just a simple setting: style_formats_merge… function myformatTinyMCE($in) { $style_formats = array( array( ‘title’ => ‘Classes’, ‘items’ => array( array( ‘title’ => ‘Blue Color’, ‘selector’ => ‘p,strong,u,em,ol,ul’, ‘classes’ => ‘blueColor’ ) ) ) ); $in[‘style_formats_merge’] = true; $in[‘style_formats’] = json_encode( $style_formats ); return $in; } add_filter(‘tiny_mce_before_init’, ‘myformatTinyMCE’ ); Everything … Read more

Show only oldest post by author

To restrict users to just one post, don’t let them create new posts. Just add one wp_editor() instance to their profile. Hook into ‘show_user_profile’ and ‘edit_user_profile’ to show the editor. Hook into ‘personal_options_update’ and ‘edit_user_profile_update’ to save the content to a user meta or a hidden custom post type. Now they don’t have to search … Read more

Modifying the main editor priority

The editor is hard-coded into the form. It isn’t inserted by add_meta_box. There is a hook called edit_form_after_title which you should be able to use though. Proof of concept: // use the action to create a place for your meta box function add_before_editor($post) { global $post; do_meta_boxes(‘post’, ‘pre_editor’, $post); } add_action(‘edit_form_after_title’,’add_before_editor’); // add a box … Read more

WP_Editor – Remove TinyMCE Toolbars

If I remember correctly, this should remove the toolbars on the tinyMCE: function my_format_TinyMCE( $in ) { $in[‘toolbar1’] = ”; $in[‘toolbar2’] = ”; $in[‘toolbar’] = false; return $in; } add_filter( ‘tiny_mce_before_init’, ‘my_format_TinyMCE’ ); References: https://codex.wordpress.org/TinyMCE http://www.tinymce.com/wiki.php/Configuration For the wp_editor, try applying these filter parameters onto your wp_editor() function. Hope it helps. ** Edit Also if … 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

Custom editor field displaying HTML in Visual editor

I found out I needed to add html_entity_decode() around the value so my final code is… /** * Add Copyright text to general settings menu */ $custom_general_settings = new FD_Custom_General_Settings(); class FD_Custom_General_Settings { function __construct() { add_filter(‘admin_init’, array(&$this , ‘register_fields’)); } function register_fields() { register_setting(‘general’, ‘footer_text’, ‘esc_attr’); add_settings_field(‘footer_text’, ‘<label for=”footer_text”>’.__(‘Footer Text’ , ‘footer_text’ ).'</label>’ , … Read more

Disable TinyMCE Drag and Drop

you can solve this problem by enqueue the following script with the dependency of jQuery jQuery(document).ready(function(){ tinyMCEPreInit.dragDropUpload = false; }); To add the dependency you can refer this link I have tested this solution and it has worked for me. I hope it will work for you too.

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