It had NOTHING to with the theme! Sorry for the bother. It was some code inside the single post. The admin should probably delete this thread. Thanks.
The error is back! It disappeared on the above single post but now has reappeared on this single post:
http://www.sagaciousnewsnetwork.com/california-politicians-could-soon-be-forced-to-wear-logos-of-top-corporate-donors/
Perhaps it is the theme? Do you have any suggestions on what the problem might be and how to fix it? Thank you.
The error disappears when removing the hyperlink in the first 12-20 characters or so in the post. When I add the hyperlink back I get this message at top of post:
Warning: preg_replace(): Compilation failed: nothing to repeat at offset 101 in /home4/xxxxxxx/public_html/wp-content/themes/raindrops/functions.php on line 8712
AND the hyperlink is missing when error message appears.
The error changed from:
Warning: preg_replace(): Compilation failed: nothing to repeat at offset 191 in /home/xxxxx/public_html/wp-content/themes/raindrops/functions.php on line 8712
to
Warning: preg_replace(): Compilation failed: nothing to repeat at offset 101 in /home4/xxxxxxx/public_html/wp-content/themes/raindrops/functions.php on line 8712
very strange…
Please Add PHP Code child theme / functions.php
<?php
function raindrops_link_url_text_decode( $matches ) {
if( isset( $matches[1] ) && preg_match('!%!', $matches[1] ) ) {
$replace = urldecode( $matches[1] );
$replace = esc_html( $replace );
return preg_replace("|(>.*)?". $matches[1]."*?</a>|", "$1{$replace}$2", $matches[0] );
}
return $matches;
}
?>
Thank you.
Bug fixed
Sorry
function raindrops_link_url_text_decode( $matches ) {
if( isset( $matches[1] ) && false !== strpos($matches[1], '%') ) {
$replace = urldecode( $matches[1] );
$replace = esc_html( $replace );
return preg_replace("|>". $matches[1]."</a>|", ">{$replace}</a>", $matches[0] );
}
return $matches[0];
}