Tag Info

New answers tagged

0

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.


0

Here you go: // Returns the attachment ID uploaded $attach_id = omakUploadImage( $file, $post_id ); // Set an image as Featured Image to post with $post_id // This is the cream you needed, Nivos set_post_thumbnail( $post_id, $attach_id ); // omakUploadImage is a custom function which takes an input type="file" value function omakUploadImage( $file, ...


0

I am not sure this answers your question directly, but as technical trivia — WordPress actually creates a posts as soon as you open editor, with auto-draft status. This is being used precisely to have a target for things like attachments and custom field before it is actually saved by user. So when user "saves" the post for the first times it's not actually ...


0

In WP 3.9.1 when you pass tinymce setting in front-end, it fails to load inlinepopups plugin for some reason. So you can set editor styles through global variable and it won't break whatever logic they use for loading plugins. $GLOBALS['editor_styles'] = array(get_stylesheet_directory_uri() . '/css/editor_style.css');


0

Since 3.9 some parts of the settings for the original Editor are wrapped in a self::first_init condition. This includes the plugins filter for external tinymce plugins. So, in a subsequent call for an editor, the filter won't run. Solution: One can pass a tinymce settings array to the settings of wp_editor(), that's where I would start. Or enqueue the ...


0

Not sure if this is a bug, but the behaviour is correct, or at least apparently intentional. a) There is only one dragDropUpload setting in the tinyMCEPreInit object, instead of one flag per editor. b) looking at class-wp-editor.php:139: if ( $set['drag_drop_upload'] ) { self::$drag_drop_upload = true; } so, if the setting is set to true once, ...



Top 50 recent answers are included