• Hello,

    I have created a theme and added icon (.ico file) upload feature so anyone can select icon file for Favicon. The old code works perfectly.

    But after updating to WP 3.5, I updated my old code with this new one:

    jQuery(document).ready(function($){
    var _custom_media = true,
    _orig_send_attachment = wp.media.editor.send.attachment;
    $("#myupload_button").click(function(e) {
    var send_attachment_bkp = wp.media.editor.send.attachment;
    var button = $(this);
    var id = button.attr("id").replace("_button", "");
    _custom_media = true;
    wp.media.editor.send.attachment = function(props, attachment){
    if ( _custom_media ) {
    $("#"+id).val(attachment.url);
    } else {
    return _orig_send_attachment.apply( this, [props, attachment] );
    };
    }
    wp.media.editor.open(button);
    return false;
    });
    $(".add_media").on("click", function(){
    _custom_media = false;
    });
    });

    But not it doesn’t allow me to upload ICO file and only allow me to upload PNG/JPG imgages.

    I want to upload ICO file and than want to get ICO file URL in a textarea.

    So how can I configure to upload ICO file too?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress 3.5 : How to allow PDF/ICO file upload in media uploader’ is closed to new replies.