﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
12779	Better support for custom post types in WP_Rewrite	nacin	ryan	"See also #12605 and [13773].

We currently use bitmasks in WP_Rewrite, which we should remove and convert to an array of URL types that can be checked using in_array(). We currently do not use bitmask operations in WP_Rewrite that would make them preferable for use.

To currently use custom post types with endpoints, a plugin would need to do the following, from [comment:5:ticket:12605 dd32 in #12605]:
{{{
define('EP_WIKI', 131072); // 2^17. 2^13 is used by core.
register_post_type('wiki', array(
	'label' => __('Wiki'),
	'public' => true,
	'supports' => array('revisions', 'editor', 'title'),
	'permalink_epmask' => EP_WIKI,
	'hierarchical' => true
));
add_rewrite_endpoint('history', EP_WIKI);
}}}

In particular:
> Care would need to be taken that any custom endpoints are in {{{2^x}}} format, and not currently in use by any other plugins loaded.

This would need to be backwards compatible with the existing bitmasks. More or less, {{{WP_Rewrite::add_endpoint()}}} would need to still take bitmasks and convert them to the new format."	enhancement	new	normal	Future Release	Rewrite Rules		normal			unsalkorkmaz dkikizas@… mikeschinkel@… Ken@… justin@…
