Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#27509 closed defect (bug) (fixed)

Audio/Video media modal scripts should not depend on mce-view.js

Reported by: gcorne's profile gcorne Owned by: wonderboymusic's profile wonderboymusic
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: Media Keywords: has-patch
Focuses: javascript Cc:

Description

Since the media modal can be used in various scenarios outside of standard post editing, media-audiovideo.js shouldn't depend on mce-view.js. Instead the mce views that are registered should either be registered in mce-view.js or in a separate file.

Attachments (1)

27509.diff (20.1 KB) - added by wonderboymusic 11 years ago.

Download all attachments as: .zip

Change History (4)

#1 @wonderboymusic
11 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.9

27509.diff is a first attempt - gonna think about this some more

#2 @wonderboymusic
11 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 27733:

Don't make mce-view a dependency for media-audiovideo. Make media-audiovideo and wp-playlist dependencies for mce-view and only enqueue mce-view in the admin in wp_enqueue_media(). MCE views don't need to be included when media is loaded on the front end.

Fixes #27509.

#3 @wonderboymusic
11 years ago

In 27734:

Always localize mediaelement when passing settings to the page via JSON. wp-mediaelement only gets triggered for audio and video shortcodes, playlists need the path passed to the page as well, as they don't enqueue wp-mediaelement.

See #27509.

Note: See TracTickets for help on using tickets.