[wp-hackers] Overriding Existing Post Types

scribu scribu at gmail.com
Tue Jun 22 00:47:17 UTC 2010


On Tue, Jun 22, 2010 at 2:54 AM, Andrew Nacin <wp at andrewnacin.com> wrote:

> On Mon, Jun 21, 2010 at 6:45 PM, Lox <lox.dev at knc.nc> wrote:
>
> > To add excerpt, this does the trick:
> >
> > register_post_type( 'page', ...
>
>
> Don't re-register the post type. There's a proper way to do this that is
> more forwards compatible:
>
> add_post_type_support( 'page', 'excerpt' );
>

What about removing support?

Ideally, when re-registering a post type, register_post_type() should merge
the new arguments with the existing ones. That would allow maximum
flexibility, with minimum code duplication.

-- 
http://scribu.net


More information about the wp-hackers mailing list