Conversation
supportI’m trying this out and I’ve noticed that for IE versions UP TO 10, there is a version number added to the body class in addition to the ‘msie’ class. For example ‘ie10’ is added for MSIE 10. I am not seeing the Version for MSIE 11. I know Microsoft made changes to the UA for IE 11. Is there any way to detect its version number and add that class as well? Thanks https://wordpress.org/plugins/browser-body-classes-with-shortcodes/
Try opening up browser-body-classes-with-shortcodes.php and go to line 22. Replace this: $is_ie11 = (preg_match(‘/MSIE 11/i’,$agent)) ? true : false; with this: $is_ie11 = (preg_match(‘/rv:11.0/i’,$agent)) ? true : false;
That works. Thank you, Thom. But are you going to make that change to the plugin next update? or will I lose this modification when the next update comes? If so, is there a way to do this with a filter? Thanks
Try opening up browser-body-classes-with-shortcodes.php and go to line 22. Replace this: $is_ie11 = (preg_match(‘/MSIE 11/i’,$agent)) ? true : false; with this: $is_ie11 = (preg_match(‘/rv:11.0/i’,$agent)) ? true : false;
That works. Thank you, Thom. But are you going to make that change to the plugin next update? or will I lose this modification when the next update comes? If so, is there a way to do this with a filter? Thanks