Skip to content

Instantly share code, notes, and snippets.

@ericmann
Created November 6, 2012 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericmann/4028438 to your computer and use it in GitHub Desktop.
Save ericmann/4028438 to your computer and use it in GitHub Desktop.
Endpoint registration
function my_init() {
add_rewrite_endpoint( 'my_entry', EP_ALL );
add_rewrite_endpoint( 'my_booked', EP_ALL );
add_rewrite_endpoint( 'my_custom_css', EP_ALL );
}
/**
* Flush rewrite rules on plugin activation.
*/
function my_activation() {
// First, load up the init scripts so we know which rewrites to add.
my_init();
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'my_activation' );
add_action( 'init', 'my_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment