[wp-hackers] Custom Post Types and pending incompatibilities

Kevin Newman CaptainN at unFocus.com
Mon Jul 12 22:56:32 UTC 2010

  On 7/10/10 4:05 PM, Otto wrote:
> One would hope that plugins would use a prefix naming convention for
> their custom types in the same way we recommend making function names
> and such. plugin_whatever and so forth.
Interesting idea. There is built in support for minimizing all that 
prefix typing when it comes to using classes in plugin development - 
something like this routine: add_action('init', array(&$this, 'init'));

Perhaps something similar could be added to register_post_type to 
provide a way to auto-prefix post type names. Since it seems there are 
other ways to modify the public representations of these names, why not 
make collisions at least a little less likely to occur.

In the mean time, if plugin devs want to take a auto-disciplined 
approach, they could prefix thusly: register_post_type(__class__ . 

Kevin N.

More information about the wp-hackers mailing list