Native Image Uploader doesn't work anymore after adding custom image uploader (2 posts)

  1. TheodoreNaiv
    Posted 3 years ago #

    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_register_script('my-upload', get_template_directory_uri(__FILE__) . '/inc/uploader/upload.js', array('jquery','media-upload','thickbox'));
    function thickbox_styles() {
    add_action('admin_print_scripts', 'upload_scripts');
    add_action('admin_print_styles', 'thickbox_styles');

    Thanks in advance for help me,

  2. TheodoreNaiv
    Posted 3 years ago #

    Sorry, I have forget to say that i wrote this code in the functions.php

Topic Closed

This topic has been closed to new replies.

About this Topic