[wp-trac] Re: [WordPress Trac] #9674: Better support for custom
post types
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 29 00:02:36 GMT 2009
#9674: Better support for custom post types
----------------------------+-----------------------------------------------
Reporter: wnorris | Owner: anonymous
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Administration | Version: 2.8
Severity: normal | Keywords: has-patch needs-review
----------------------------+-----------------------------------------------
Changes (by wnorris):
* keywords: => has-patch needs-review
Comment:
So as a first step, I've moved all of the meta_box functions into a
separate file, and removed all of the duplicate code. Specifically...
* moved all `*_meta_box` functions into `wp-
admin/includes/meta_boxes.php`
* removed `page_password_meta_box` and `post_password_meta_box`, since
those are part of the publish box, and weren't being used anyway
* went through each of the page meta box functions, and modified the
corresponding post meta box function to accommodate different post types.
This was actually very straightforward for all but the publish meta box.
Even then, it's not too bad... just a couple of `if ($post_type ==
'post')` to conditionally show the sticky checkbox.
* updated edit-page-form.php to use the post meta box functions where
possible. The only page meta box function left is for page attributes.
With the exception of dropping the password meta box functions (which
wasn't being used by WP core), these changes shouldn't introduce any
backwards compatibility issues.
This patch is only a first step toward better support for custom post
types, but one that can be applied immediately without worrying about
compatibility issues. It sets up a lot of the other changes that will
need to happen.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9674#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list