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

WordPress Trac noreply at wordpress.org
Fri Apr 11 11:37:51 UTC 2014


#27753: wp_enqueue_media() breaks featured image functionality
--------------------------+------------------------------
 Reporter:  hovida        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  3.8.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  javascript
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * focuses:  accessibility => javascript
 * component:  General => Media


Old description:

> 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();
> ?>
> }}}

New description:

 Hey there,

 The bug #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#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list