This error came out of nowhere to disable a Revolution Slider plugin. From reading other similar questions I assume there is a mismatched set of curly brackets somewhere.
I use Brackets to edit, and it helps show the connections between the opening and closing symbols, but in all my experimenting (I am really really bad, basically non-coder) I can't seem to find the proper combination.
This code includes the first 3 Unexpected '}' }
errors
and the first of 9 Unexpected 'public' public function add_inline_js(){
errors in the code, I've not copied the subsequent 8 errors with all their variables. The last error is a final Unexpected '} }
error on the second to the last line before the ?>
line.
");
var htmlDiv = document.getElementById('rs-plugin-settings-inline-css');
if(htmlDiv) {
htmlDiv.innerHTML = htmlDiv.innerHTML + htmlDivCss;
}
else{
var htmlDiv = document.createElement('div');
htmlDiv.innerHTML = '<style>' + htmlDivCss + '</style>';
document.getElementsByTagName('head')[0].appendChild(htmlDiv.childNodes[0]);
}
</script></style><?php
if($markup_export === true){
echo '<!-- /STYLE -->';
}
}
}
//add custom Slide CSS here
if(trim($nav_css) !== ''){
if(!is_admin()){
?><script>
var htmlDivCss = unescape("<?php echo RevSliderCssParser::compress_css(rawurlencode($nav_css));?>");
var htmlDiv = document.getElementById('rs-plugin-settings-inline-css');
if(htmlDiv) {
htmlDiv.innerHTML = htmlDiv.innerHTML + htmlDivCss;
}
else{
var htmlDiv = document.createElement('div');
htmlDiv.innerHTML = '<style>' + htmlDivCss + '</style>';
document.getElementsByTagName('head')[0].appendChild(htmlDiv.childNodes[0]);
}
</script>
<?php
}else{
if($markup_export === true){
echo '<!-- STYLE -->';
}
?>
<style type="text/css"><?php echo RevSliderCssParser::compress_css(($nav_css));?></style>
<?php
if($markup_export === true){
echo '<!-- /STYLE -->';
}
}
}
if(!$markup_export){ //not needed for html markup export
if(has_action('wp_footer', array($this, 'add_inline_double_jquery_error')) === false){
add_action('wp_footer', array($this, 'add_inline_double_jquery_error'));
}
}
}
/**
* Output Inline JS
*/
public function add_inline_js(){
echo $this->rev_inline_js;
}