Making a plugin to fix classifieds page

Hi

Have just been speaking to @Jack Kitterhing in live chat who I'm hoping can pop over here and help me with this?

Was going to ask in live chat which should be on now, but no one turned up!

Jack, you advised me this;

'might be better in a plugin, so you open up one of your other plugins, copy the header part with the name etc and paste that in the php file, place that in a folder, zip it and then upload it to /plugins '

So I've followed those instructions as far as I know to the letter, but I'm getting;

Plugin could not be activated because it triggered a fatal error.

Parse error: syntax error, unexpected '}' in /home/rrokngem/public_html/******.co.uk/wp-content/plugins/fixclassifieds/classifiedscategories.php on line 44

Please could you take a look at my technique?

<?php
/*
  Plugin Name: Fix Classifieds
  Plugin URI:
  Description: Fixes classifieds display.
  Author: Jack Kitterhing (Incsub)
  Version: 1.0 beta
  Author URI: https://premium.wpmudev.org/
  Network: true
  WDP ID:
 */

/*
  Copyright 2007-2014 Incsub (http://incsub.com)

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by
  the Free Software Foundation.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

function my_custom_tax() {
	global $post;

	$terms = wp_get_post_terms( $post->ID, 'taxonomy_name' );

	foreach ( $terms as $term ) {
		// Get a single term from the array of terms.
		if ( !isset( $single_term ) )
			$single_term = $term['term_id'];
	}

	return $single_term;
}
add_filter( 'get_categories_taxonomy', 'classifieds_categories'  );
}
?>

is the content of my php file. Will open up support access so you can check if you like.

Thanks

Sally