function sc_type_select($client_id = 0)
 {
     if (!$client_id) {
         $client_id = get_the_ID();
     }
     print apply_filters('sc_type_select', sc_get_type_select($client_id), $client_id);
 }
 public static function maybe_change_client_type()
 {
     if (!current_user_can('edit_posts')) {
         self::ajax_fail('User cannot create new posts!');
     }
     $nonce = $_REQUEST['security'];
     if (!wp_verify_nonce($nonce, self::NONCE)) {
         self::ajax_fail('Not going to fall for it!');
     }
     if (!isset($_REQUEST['client_id'])) {
         self::ajax_fail('No client ID!');
     }
     $client = Sprout_Client::get_instance($_REQUEST['client_id']);
     if (!is_a($client, 'Sprout_Client')) {
         self::ajax_fail('Client not found.');
     }
     $client->set_type($_REQUEST['type_id']);
     print sc_get_type_select($_REQUEST['client_id']);
     exit;
 }