Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#13630 closed defect (bug) (worksforme)

thickbox not loading when custom post type is registered w/out editor and thumbnail.

Reported by: lag47's profile lag47 Owned by:
Milestone: Priority: low
Severity: minor Version: 3.0
Component: Post Thumbnails Keywords: thickbox, custom post types
Focuses: Cc:

Description

thickbox not loading when custom post type is registered w/out editor and thumbnail. You would think there'd be no need for the thickbox script, however the thumbnail metabox can be added later using 'add_meta_box()'.

example:

register_post_type('my_post_type', array ('supports' => array('title')) ;

add_meta_box("my_thumbnail_div", 'My Featured Image', 'post_thumbnail_meta_box', "my_post_type");

Change History (4)

#1 @nacin
15 years ago

Well... don't do that. Add support for thumbnails instead via register_post_type.

#2 @nacin
14 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

#3 @nacin
14 years ago

The supports argument for register_post_type() simply wraps register_post_type_support().

If the use case calls for this being a just-in-time thing, you can always use register_post_type_support(), instead of add_meta_box(). That should get you exactly what you want.

#4 @westi
14 years ago

In other words - you should only use add_meta_box to add your own metaboxes not to add ones in core that might have other dependencies and get auto-added when you register support for them.

Note: See TracTickets for help on using tickets.