You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
I found that preg_replace is deprecated warning is showing on sidebar.
So, here is what I modified the code to fix deprecation issue.
You can also commit my solution below.
functions.php
// filter tag clould output so that it can be styled by CSS
function wp_bootstrap_add_tag_class( $taglinks ) {
$tags = explode('', $taglinks);
// $regex = "#(.*tag-link[-])(.*)(' title.*)#e";
$regex = "#(.*tag-link[-])(.*)(' title.*)#";
foreach( $tags as $tag ) {
// $tagn[] = preg_replace($regex, "('$1$2 label tag-'.get_tag($2)->slug.'$3')", $tag );
$tagn[] = preg_replace_callback($regex, function ($matches) {
return $matches[1].$matches[2].' label tag-'.get_tag($matches[2])->slug.$matches[3];
}, $tag );
}
$taglinks = implode('', $tagn);
return $taglinks;
}
The text was updated successfully, but these errors were encountered:
Hi there,
I found that preg_replace is deprecated warning is showing on sidebar.
So, here is what I modified the code to fix deprecation issue.
You can also commit my solution below.
functions.php
The text was updated successfully, but these errors were encountered: