Initialize custom post types before flushing rewrite rules on activation

This commit is contained in:
ThemeBoy
2013-12-04 05:22:12 +11:00
parent dade2a2ee1
commit 77ca021429

View File

@@ -1,7 +1,12 @@
<?php
// Flush rewrite rules on activation to make sure permalinks work properly
function sp_rewrite_flush() {
sp_event_cpt_init();
sp_team_cpt_init();
sp_table_cpt_init();
sp_player_cpt_init();
sp_list_cpt_init();
sp_staff_cpt_init();
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'sp_rewrite_flush' );