Genesis Sandbox Featured Content Widget. Based on Nick Croft's Genesis Featured Widget Amplified for additional functionality which allows support for custom post types, taxonomies, and extends the flexibility of the widget via action hooks to allow the elements to be re-positioned or other elements to be added.
I deleted a few empty categories and I'm suddenly seeing this error on my site:
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/content/l/i/s/lisaholley/html/redesign/wp-includes/formatting.php on line 3042
The following is the code on line 3042 in formatting.php:
$url = pregreplace('|[^a-z0-9-~+.?#=!&;,/:%@$|*\'()\x80-\xff]|i', '', $url);
I've had to completely deactivate the plugin to resurrect the site below that widget. Any ideas? This isn't something I'm familiar with. Thanks!
Full code:
/**
Checks and cleans a URL.
*
A number of characters are removed from the URL. If the URL is for displaying
(the default behaviour) ampersands are also replaced. The 'clean_url' filter
is applied to the returned cleaned URL.
*
@since 2.8.0
*
@param string $url The URL to be cleaned.
@param array $protocols Optional. An array of acceptable protocols.
Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn' if not set.
@param string $_context Private. Use esc_url_raw() for database usage.
@return string The cleaned $url after the 'clean_url' filter is applied.
*/
function esc_url( $url, $protocols = null, $_context = 'display' ) {
$original_url = $url;
if ( '' == $url )
return $url;
$url = pregreplace('|[^a-z0-9-~+.?#=!&;,/:%@$|_\'()\x80-\xff]|i', '', $url);
$strip = array('%0d', '%0a', '%0D', '%0A');
$url = _deep_replace($strip, $url);
$url = strreplace(';//', '://', $url);
/ If the URL doesn't appear to contain a scheme, we
presume it needs http:// appended (unless a relative
link starting with /, # or ? or a php file).
*/
if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&
! preg_match('/^[a-z0-9-]+?.php/i', $url) )
$url = 'http://' . $url;
I deleted a few empty categories and I'm suddenly seeing this error on my site:
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/content/l/i/s/lisaholley/html/redesign/wp-includes/formatting.php on line 3042
The following is the code on line 3042 in formatting.php: $url = pregreplace('|[^a-z0-9-~+.?#=!&;,/:%@$|*\'()\x80-\xff]|i', '', $url);
I've had to completely deactivate the plugin to resurrect the site below that widget. Any ideas? This isn't something I'm familiar with. Thanks!
Full code: /**
@return string The cleaned $url after the 'clean_url' filter is applied. */ function esc_url( $url, $protocols = null, $_context = 'display' ) { $original_url = $url;
if ( '' == $url ) return $url; $url = pregreplace('|[^a-z0-9-~+.?#=!&;,/:%@$|_\'()\x80-\xff]|i', '', $url); $strip = array('%0d', '%0a', '%0D', '%0A'); $url = _deep_replace($strip, $url); $url = strreplace(';//', '://', $url); / If the URL doesn't appear to contain a scheme, we