Make WordPress Core

Ticket #6406: 6406.diff

File 6406.diff, 709 bytes (added by DD32, 15 years ago)

Add filter to flash uploader to allow disabling via plugin

  • wp-admin/includes/media.php

     
    764764
    765765        $flash_action_url = get_option('siteurl') . "/wp-admin/async-upload.php";
    766766
     767        $flash = apply_filters('flash_uploader', true);
    767768        // If Mac and mod_security, no Flash. :(
    768         $flash = true;
    769         if ( false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && apache_mod_loaded('mod_security') )
     769        if ( $flash && false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && apache_mod_loaded('mod_security') )
    770770                $flash = false;
    771771
    772772        $post_id = intval($_REQUEST['post_id']);