Never mind, I have fixed it by editing the following block
{ if ( strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/media-upload.php”)===false
&& strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/upload.php”)===false
&& strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/media-new.php”)===false
&& strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/media.php”)===false )
and replace it with
{ if ( strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/media-upload.php”)===false
&& strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/upload.php”)===false
&& strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/media-new.php”)===false
&& strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/post-new.php”)===false
&& strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/post.php”)===false
&& strpos($_SERVER[‘REQUEST_URI’], “/wp-admin/media.php”)===false )