Created
November 6, 2012 23:25
-
-
Save ericmann/4028438 to your computer and use it in GitHub Desktop.
Endpoint registration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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