Created
January 3, 2018 15:47
-
-
Save CapWebSolutions/9fe95c7426324242c45cba97e7cc4d8f to your computer and use it in GitHub Desktop.
Detect MSIE running, include Trident and perform specific code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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