[wp-trac] [WordPress Trac] #36204: Video Shortcode Parameter Inconsistencies

WordPress Trac noreply at wordpress.org
Thu Mar 10 23:25:18 UTC 2016


#36204: Video Shortcode Parameter Inconsistencies
-----------------------------+-----------------------------
 Reporter:  georgestephanis  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Media            |    Version:  trunk
 Severity:  normal           |   Keywords:  needs-patch
  Focuses:  javascript       |
-----------------------------+-----------------------------
 When injecting a `[video]` shortcode via the "Add Media" modal on an edit
 post screen, it initially goes in as:


 {{{
 [video width="1280" height="720" mp4="http://src.wordpress-develop.dev/wp-
 content/uploads/2016/02/happy-dance.mp4"][/video]
 }}}

 but as soon as you edit it via the "Video Details" modal on the embed, the
 shortcode then becomes

 {{{
 [video width="1280" height="720" mp4="http://src.wordpress-develop.dev/wp-
 content/uploads/2016/02/happy-dance.mp4" id="17" src="" poster=""
 loop="false" autoplay="false" preload="metadata"][/video]
 }}}

 adding in the `id`, `src`, `poster`, `loop`, `autoplay`, and `preload`
 keys.

 The post-insertion shortcode creation is handled by
 https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/js/media/audiovideo.manifest.js?rev=33337#L153 -- but I'm not
 certain where the initial shortcode creation is generated.

 According to the `wp.media.video.shortcode()` method, it looks like all
 the items that match the defaults should be getting omitted, but that
 doesn't seem to be the case.

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


More information about the wp-trac mailing list