Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#14133 closed defect (bug) (fixed)

Custom post type breaks the_editor in plugins

Reported by: xiosen's profile xiosen Owned by:
Milestone: 3.1 Priority: normal
Severity: major Version: 3.0
Component: Editor Keywords: has-patch
Focuses: Cc:


I previously used the_editor to tap into the wordpress editor in my plugins. With the addition of custom post types in wordpress 3.0, this feature breaks the insert into post within the add media buttons which in turn breaks my plugins ability to use the_editor.

In wp-admin/includes/media.php line 1166 the default 'send' argument now checks for custom post type support whereas in previous versions of wordpress it defaulted to true.

In this instance, using media buttons through the_editor in a plugin does not work since a custom post type was not registered. Since 'send' is now defaulted to false the insert into post buttons do not show up.

I would propose adding a filter for the defaults or setting the 'send' default to true and only checking for post_type_supports if a post parent is found.

Attachments (1)

14133.diff (759 bytes) - added by blepoxp 14 years ago.
If post parent is empty, return true

Download all attachments as: .zip

Change History (6)

#1 @kevinB
14 years ago

  • Cc kevinB added

#2 @ryan
14 years ago

Defaulting to true if post_parent is empty sounds good.

#3 @nacin
14 years ago

  • Keywords needs-patch added; the_editor removed
  • Milestone changed from Awaiting Review to 3.1

14 years ago

If post parent is empty, return true

#4 @blepoxp
14 years ago

  • Keywords has-patch added; needs-patch removed

#5 @ryan
13 years ago

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

(In [15920]) Default send to editor to true if the post parent is empty. Props blepoxp. fixes #14133

Note: See TracTickets for help on using tickets.