diff --git a/shorthand_connect/includes/shorthand_options.php b/shorthand_connect/includes/shorthand_options.php index 2955189..2d70d19 100644 --- a/shorthand_connect/includes/shorthand_options.php +++ b/shorthand_connect/includes/shorthand_options.php @@ -48,6 +48,8 @@ function shorthand_options() { } if( isset($_POST['sh_submit_hidden_three']) && $_POST['sh_submit_hidden_three'] == 'Y' ) { update_option('sh_permalink', $_POST['sh_permalink']); + create_post_type(); + flush_rewrite_rules(); } $permalink_structure = get_option('sh_permalink'); diff --git a/shorthand_connect/shorthand_connect.php b/shorthand_connect/shorthand_connect.php index 751e7be..4c60b1a 100644 --- a/shorthand_connect/shorthand_connect.php +++ b/shorthand_connect/shorthand_connect.php @@ -317,5 +317,11 @@ function shorthand_show_columns($name) { } add_action('manage_posts_custom_column', 'shorthand_show_columns'); +function myplugin_activate() { + create_post_type(); + flush_rewrite_rules(); +} +register_activation_hook( __FILE__, 'myplugin_activate' ); + ?>