WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#24424 closed task (blessed) (fixed)

Add a general WordPress Backbone utility file

Reported by: koopersmith Owned by: koopersmith
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

We've already added wp.template, but we could use a few more common Backbone helpers. Let's move these to a single wp-backbone file to start.

Attachments (1)

24424.diff (3.0 KB) - added by nacin 3 years ago.

Download all attachments as: .zip

Change History (16)

#2 @koopersmith
3 years ago

In 24360:

Extract the base views from media.

See #24424.

#3 @koopersmith
3 years ago

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

In 24361:

Update the subview controller for the patterns found in Backbone 1.0.

Fixes #24424.

#4 @koopersmith
3 years ago

In 24366:

Alias media.template to wp.template. See #23263, #24424.

#5 @koopersmith
3 years ago

In 24367:

Add Backbone property to the wp-backbone namespace. See #24424.

#6 @koopersmith
3 years ago

In 24368:

Branch the generic JS utilities from the Backbone commands. See #24424.

#7 @koopersmith
3 years ago

In 24369:

Move XHR helpers from media to utils. See #24424.

#8 @SergeyBiryukov
3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Getting this on Edit Post screen after [24369] (with SCRIPT_DEBUG disabled):

TypeError: wp.xhr is undefined

Looks like bumpbot didn't create wp-util.min.js.

Version 1, edited 3 years ago by SergeyBiryukov (previous) (next) (diff)

#9 follow-up: @mindctrl
3 years ago

I can't seem to replicate it at the moment, but when I first saw the issue with "Add Media", "Select Audio", etc. I was also having a problem, where on custom post types, the switcher was kicking me out to standard 'post' types and out of the custom post type. The link was missing the post_type=demo var. Just a heads up that maybe someone else can test.

#10 in reply to: ↑ 9 @SergeyBiryukov
3 years ago

Replying to mindctrl:

I can't seem to replicate it at the moment, but when I first saw the issue with "Add Media", "Select Audio", etc. I was also having a problem, where on custom post types, the switcher was kicking me out to standard 'post' types and out of the custom post type.

Related: #24360

#11 @nacin
3 years ago

In 24374:

Add wp-util.min.js. See #24424.

#12 @SergeyBiryukov
3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

#13 @sunnyratilal
3 years ago

#24435 was marked as a duplicate.

@nacin
3 years ago

#14 @nacin
3 years ago

In 24652:

Rename wp.xhr to wp.ajax to match admin-ajax.php (which it uses), jQuery.ajax (which it wraps), etc. see #24424.

#15 @kadamwhite
2 years ago

  • Cc kadamwhite added
Note: See TracTickets for help on using tickets.