/**
  * Unflag preset and sample posts.
  */
 public function unflag_post($post_id)
 {
     $post_types = sp_post_types();
     $config_types = sp_config_types();
     $post_type = get_post_type($post_id);
     if (in_array($post_type, $post_types)) {
         delete_post_meta($post_id, '_sp_sample');
     } elseif (in_array($post_type, $config_types)) {
         delete_post_meta($post_id, '_sp_preset');
     }
 }
 function is_sp_config_type($typenow = null)
 {
     if ($typenow == null) {
         global $typenow;
     }
     $post_types = sp_config_types();
     if (in_array($typenow, $post_types)) {
         return true;
     }
     return false;
 }