WP_Editor not saving data in user_meta
Solved: jQuery(‘input[name=dokan_update_profile]‘).click(function(){ tinyMCE.triggerSave(); }); Needed to update manually the tinymce, guess because it’s in an Iframe. Thanks anyway
Solved: jQuery(‘input[name=dokan_update_profile]‘).click(function(){ tinyMCE.triggerSave(); }); Needed to update manually the tinymce, guess because it’s in an Iframe. Thanks anyway
The code below will work, read inline comments. Paste it into your theme functions.php or plugin. The only problem with this is the it will only work when the template is selected and the post is saved/updated and the editor is blank. <?php function wpse_177576_update_editor_content( $post_id ) { if ( wp_is_post_revision( $post_id ) ) return; … Read more
You can check this out – wpgallery plugin, this is how they do it for the shortcode, basically parsing the shortcodes on the client-side, and replacing them back and forth as you click “Visual” or “Text”. Unless you are building a plugin, I would advise you to refrain from using shortcodes – use plain HTML, … Read more
The wordpress editor is designed to work in wordpress enviroment and there is not much point in trying to somehow make it work “outside” of wordpress. You might hack it but any wordpress upgrade might break it. You need to use your php in the wordpress context by making a page template for your theme … Read more
I believe the helper you’re looking for (assuming we’re not dealing with a custom post type) is: <?php remove_post_type_support(‘page’, ‘editor’); ?> When dealing with a custom post type you can exclude ‘editor’ from the ‘supports’ parameter to initialize the post type without the editor window. Finally, if you are trying to disable the editor only … Read more
The visual editor is not a textarea, it is an iframe, therefor even if you could set an attribute it will do nothing. You can set the attribute on the hidden textarea that will be sent to the server but since it is hidden I am not sure how an alert about it not being … Read more
I used the $input[‘user_custom_text’]; all I needed was $_POST[‘user_custom_text’]; also to get the media to work need wordpress Sanitize: <?php wp_kses_post( $data ); ?> http://codex.wordpress.org/Function_Reference/wp_kses_post
Might be because you are using a depreciated function for updating/adding the user meta (update_usermeta). You need to use update_user_meta function. WP Codex: https://codex.wordpress.org/Function_Reference/update_user_meta
What a great question. Here is the function: function add_taxonomies_to_pages() { register_taxonomy_for_object_type( ‘post_tag’, ‘page’ ); register_taxonomy_for_object_type( ‘category’, ‘page’ ); } add_action( ‘init’, ‘add_taxonomies_to_pages’ ); Get back to winning, now.
Might be possible that your wp_editor is broken! According to codex you can not use numeric editor ID may only contain lowercase letters and underscores…hyphens will cause editor to not display properly Call wp_editor in this way wp_editor( $nga_textarea_field_1_invalid, ‘nga_textarea_field_one’ ); textarea_name is not required because by default it is already wp_editor ID. I am … Read more