I have a working solution, there is probably a better solution but this work for top level pages. Basically I check to see if the slug for the page has changed and flush the rewrite rules if it has.
add_action( 'init', 'faqmgr_create_post_type' );
function faqmgr_create_post_type() {
$options=get_option('faqmgr_options', array('faq_page'=>0, 'faq_slug'=>'faq'));
$updated=false;
$tpost=get_post( $options['faq_page'], OBJECT );
if(is_null($tpost)){
$options=array('faq_page'=>0, 'faq_slug'=>'faq');
$updated=true;
update_option('faqmgr_options', $options);
}else{
if($options['faq_slug']!=$tpost->post_name){
$options['faq_slug']=$tpost->post_name;
$updated=true;
}
}
register_post_type( 'faq',
array(
'labels' => array(
'name' => __( 'FAQs' ),
'singular_name' => __( 'FAQ' ),
'add_new_item' => __( 'Add FAQ' ),
'edit_item' => __( 'Edit FAQ' ),
'new_item' => __( 'New FAQ' ),
'view_item' => __( 'View FAQ' ),
'search_items' => __( 'Search FAQs' )
),
'public' => true,
'exclude_from_search'=>true,
'has_archive' => true,
'rewrite' => array(
'slug' => $options['faq_slug'],
'with_front' => false
),
'supports' => array(
'title',
'editor',
'thumbnail'
)
)
);
if($updated=true;){
flush_rewrite_rules( false );
}
}