public function setup()
 {
     global $wp_rewrite;
     //set the permalink structure
     $wp_rewrite->set_permalink_structure('/blog/%year%/%monthnum%/%day%/%postname%/');
     $args = array('hierarchical' => false, 'public' => true, 'has_archive' => true, 'publicly_queryable' => true, 'rewrite' => array('slug' => 'flat-posts', 'with_front' => false, 'pages' => true, 'feeds' => true), 'capability_type' => 'page');
     register_post_type('flat_post_type', $args);
     $args = array('hierarchical' => true, 'public' => true, 'has_archive' => true, 'publicly_queryable' => true, 'rewrite' => array('slug' => 'hierarchical-posts', 'with_front' => false, 'pages' => true, 'feeds' => true), 'capability_type' => 'page');
     register_post_type('hier_post_type', $args);
     O2O::Register_Connection('post_to_flat', array('post'), array('flat_post_type'), array('rewrite' => 'from', 'to' => array('sortable' => true)));
     O2O::Register_Connection('flat_to_hier', array('flat_post_type'), array('hier_post_type'), array('rewrite' => 'from'));
 }