[wp-trac] [WordPress Trac] #27753: wp_enqueue_media() breaks fetured image functionality (reopen)

WordPress Trac noreply at wordpress.org
Fri Apr 11 11:23:05 UTC 2014


#27753: wp_enqueue_media() breaks fetured image functionality (reopen)
---------------------------+-----------------------------
 Reporter:  hovida         |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:  3.8.2
 Severity:  normal         |   Keywords:
  Focuses:  accessibility  |
---------------------------+-----------------------------
 Hey there,

 The bug #23028 (https://core.trac.wordpress.org/ticket/23028) still
 exists.

 It was very annoying to find the problem. If you add the
 '''wp_enqueue_media''' functionality on themes or plugins, the media
 manager wont work correctly.

 The bug exists on the actual stable (3.8.2) up to beta releases (tested in
 3.9 RC1 and 3.9 RC3).

 {{{
 <?php
         class Media_Demo {
                 public function __construct() {
                         add_action('admin_init', array($this,
 'admin_init'));
                 }

                 public function admin_init() {
                         if(function_exists('wp_enqueue_media')){
                                 wp_enqueue_media();
                         } else {
                                 wp_enqueue_style('thickbox');
                                 wp_enqueue_script('media-upload');
                                 wp_enqueue_script('thickbox');
                         }
                 }
         }

         new Media_Demo();
 ?>
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27753>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list