• Hi Everyone,

    I developed for a client a wordpress theme with custom admin panels and custom fields, both the functionality uses a custom image uploader, after created the custom image uploader the native uploader add Media (that i call when i click add media, the button above the editor) doesn’t work anymore, i can access to library, choose the pic but when i click “insert into page” the pic is not added in the content. The pic is anyway presents in the gallery, so then i think it’s a problem with my custom image uploader script, because when i disable it, the add media works well.

    Here is my code:

    function upload_scripts() {
    wp_enqueue_script('media-upload');
    wp_enqueue_script('thickbox');
    wp_register_script('my-upload', get_template_directory_uri(__FILE__) . '/inc/uploader/upload.js', array('jquery','media-upload','thickbox'));
    wp_enqueue_script('my-upload');
    }
    function thickbox_styles() {
    wp_enqueue_style('thickbox');
    }
    add_action('admin_print_scripts', 'upload_scripts');
    add_action('admin_print_styles', 'thickbox_styles');

    Thanks in advance for help me,
    Theo

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Native Image Uploader doesn't work anymore after adding custom image uploader’ is closed to new replies.