Forums

Media upload buttons don't work as expected (1 post)

  1. proveyourselfthom
    Member
    Posted 7 months ago #

    Hi, I've added the editor to a plugin using the following code:

    if (!function_exists('add_tinymce_editor')):
    
    function add_tinymce_editor()
    
    {
    
        wp_enqueue_script('post');
    
        wp_enqueue_script('editor');
    
        wp_enqueue_script('editor-functions');
    
        wp_enqueue_script('media-upload');
    
        wp_enqueue_script('jquery');
    
        wp_enqueue_script('jquery-ui-core');
    
        wp_enqueue_script('jquery-ui-tabs');
    
        wp_enqueue_script('tiny_mce');
    
        add_thickbox();
    
    }
    
    endif;
    
    add_filter('wp_head','add_tinymce_editor');

    And then I've made the call to the_editor:

    echo the_editor(stripslashes(do_shortcode($gb_options['gb_message'])), 'gb_settings[gb_message]', 'title', true);

    It's displayed but media buttons doesn't work. On click on Add Video, for example, nothing happens. It's not opening the "window" (that lightbox like div), as in posts ...

    Am I missing something? Thanks.

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 7 months ago by proveyourselfthom
  • This topic is not resolved
  • WordPress version: 3.2.1