[wp-trac] [WordPress Trac] #56863: Issue on media page

WordPress Trac noreply at wordpress.org
Thu Oct 20 08:28:37 UTC 2022


#56863: Issue on media page
-------------------------------------+-------------------------------------
 Reporter:  sumitsingh               |       Owner:  (none)
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  General                  |     Version:  6.0.3
 Severity:  normal                   |  Resolution:
 Keywords:  has-screenshots          |     Focuses:  ui, css,
  reporter-feedback                  |  administration
-------------------------------------+-------------------------------------
Changes (by sumitsingh):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Hi @kebbet ,

 Even issue when i am doing with filter.

 {{{#!php
 <?php
 // Allow SVG
 add_filter( 'wp_check_filetype_and_ext', function($data, $file, $filename,
 $mimes) {

   global $wp_version;
   if ( $wp_version !== '4.7.1' ) {
      return $data;
   }

   $filetype = wp_check_filetype( $filename, $mimes );

   return [
       'ext'             => $filetype['ext'],
       'type'            => $filetype['type'],
       'proper_filename' => $data['proper_filename']
   ];

 }, 10, 4 );

 function cc_mime_types( $mimes ){
   $mimes['svg'] = 'image/svg+xml';
   return $mimes;
 }
 add_filter( 'upload_mimes', 'cc_mime_types' );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56863#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list