opencredit/badgeos — pull request #270 by ergomesh (2014-04-15 17:19:12+00:00)
Title: Transition of achievement type to published should flush rewrite rules 

[x] completes https://github.com/opencredit/badgeos/issues/191

This triggers a flush of the rewrite rules if the post_type is an achievement-type and the status is changed to published.

I did this,

badgeos_register_post_types();
badgeos_register_achievement_type_cpt();
flush_rewrite_rules();

To ensure that the badgeOs types are loaded and new achievements. It wasn't working by just doing a flush_rewrite_rules() let me know if you want it moved into a function like this in badgeos.php.

function badgeos_flush_rewrite_rules() {
badgeos_register_post_types();
badgeos_register_achievement_type_cpt();
flush_rewrite_rules();
}