jquery – wp not defined at wp.Uploader.prototype

Question

I followed this code as below but it gives me the error “wp not defined“. I placed the code inside footer.php in my theme and also in functions.php but both are erroneous.

(function($){

    $.extend( wp.Uploader.prototype, {
        success : function( file_attachment ){
            console.log( file_attachment );
        }
    });
})(jQuery);

0
ratib90486 6 months 2022-02-08T09:39:36-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse