Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#22775 closed defect (bug) (fixed)

Create a wp.media.frames object

Reported by: koopersmith's profile koopersmith Owned by: koopersmith's profile koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

To encourage plugins to share their media frames, but not pollute the window or wp.media objects with media frame instances, let's give plugins a canonical place to put their stuff.

For example:

wp.media.frames.customHeader = wp.media();

Also, we should add wp.media.attachment( id ) as a shortcut to wp.media.model.Attachment.get( id ).

Attachments (1)

22775.diff (1.7 KB) - added by koopersmith 12 years ago.

Download all attachments as: .zip

Change History (5)

@koopersmith
12 years ago

#1 @koopersmith
12 years ago

Also, adds frame caching to custom header, which works the same way as in custom background.

#2 @nacin
12 years ago

Cool.

#3 @markjaquith
12 years ago

He done been moonlighting on us!

Sure. :-) Sounds like a good idea.

#4 @koopersmith
12 years ago

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

In 23092:

Add a canonical location for media frames, an alias to fetch attachments, and frame caching to custom header. fixes #22775.

Note: See TracTickets for help on using tickets.