Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save CapWebSolutions/9fe95c7426324242c45cba97e7cc4d8f to your computer and use it in GitHub Desktop.

Select an option

Save CapWebSolutions/9fe95c7426324242c45cba97e7cc4d8f to your computer and use it in GitHub Desktop.
Detect MSIE running, include Trident and perform specific code.
add_filter( 'ssp_episode_meta_details', 'ssp_remove_download_links', 10, 3 );
function ssp_remove_download_links ( $meta, $episode_id, $context ) {
$agent=strtoupper($_SERVER['HTTP_USER_AGENT']);
if ( strpos($agent,'MSIE') !== false || strpos($agent,'TRIDENT')!== false ) {
// Someone is STILL using IE. Don't show the downlolad links since they won't work in SSP.
/* IE specific code here */
return /*filtered result*/;
}
return $meta;
}
/* Ref: https://stackoverflow.com/questions/5302302/php-if-internet-explorer-6-7-8-or-9 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment