Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $plugin_info = Array(
- 'pi_name' => 'IE_Edge',
- 'pi_version' => '0.0.1',
- 'pi_author' => 'Shaun Bebbington',
- 'pi_description' => 'Detect if IE10 or less is detected, and will add <meta http-equiv="X-UA-Compatible" content="IE=edge"> to the header if that\'s what you want.',
- 'pi_usage' => 'Include {exp:ie_edge} below the <meta charset="utf-8"> or similar element'
- );
- class IE_Edge
- {
- /**
- * Here is a simple plug-in for Expression Engine -> description above (see $plugin_info Array)
- *
- * @author Shaun Bebbington
- * @param none
- * @date 10 Sep 2014 11:08:05
- * @version 0.0.1
- * @return string
- */
- public function IE_Edge()
- {
- $this->EE =& get_instance();
- $browser = '';
- // Look for IE browsers
- if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') )
- {
- $browser = '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
- }
- $this->return_data = $browser;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement