Make WordPress Core

Opened 14 years ago

Last modified 6 years ago

#17704 new enhancement

Automatically enqueue necessary scripts when custom meta boxes are used

Reported by: mitchoyoshitaka's profile mitchoyoshitaka Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: needs-refresh
Focuses: Cc:

Description

Right now if you add_meta_box() to a custom page, like using add_submenu_page() and then calling do_meta_boxes(), the screen options and post box JS don't work automagically. They should.

Attachments (2)

meta-box-test.php (716 bytes) - added by mitchoyoshitaka 14 years ago.
Test plugin to create page with custom meta boxes
17704.diff (1.2 KB) - added by mitchoyoshitaka 14 years ago.
Patch v1, which *should* work but depends on #17704

Download all attachments as: .zip

Change History (9)

@mitchoyoshitaka
14 years ago

Test plugin to create page with custom meta boxes

@mitchoyoshitaka
14 years ago

Patch v1, which *should* work but depends on #17704

#1 @mitchoyoshitaka
14 years ago

Sorry, I lied... I meant that patch should work but only with a fix for #9346.

#2 @scribu
14 years ago

Note that 'postbox' is also needed for collapsing and dragging boxes.

#3 @scribu
14 years ago

  • Summary changed from Give options pages screen options support for free if custom meta boxes are being used to Automatically enqueue necessary scripts when custom meta boxes are used

#4 @scribu
14 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement

Also, we have to admit that this is an enhancement.

Currently, plugins can hook into "load-$pagehook", for example, to enqueue the script.

Last edited 14 years ago by scribu (previous) (diff)

#5 @mitchoyoshitaka
13 years ago

  • Keywords has-patch added

#6 @chriscct7
10 years ago

  • Focuses administration added
  • Keywords needs-refresh added; has-patch removed

Refresh needed

#7 @chriscct7
9 years ago

  • Focuses administration removed
Note: See TracTickets for help on using tickets.