Opened 14 years ago
Closed 14 years ago
#14133 closed defect (bug) (fixed)
Custom post type breaks the_editor in plugins
Reported by: | xiosen | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | major | Version: | 3.0 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
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.
Defaulting to true if post_parent is empty sounds good.