tags from wordpress shortcodes via a php functon-忘掉有多难的回答
tags from wordpress shortcodes via a php functon
Looking for a php function (non-jQuery or wpautop modification) approach to remove from within wordpress.
I tried this but it does not w
maybe a regex could work:
$string=preg_replace_('/\s*/', '', $string);
\s*
That should replace any with nothing or just whitespaces in it to nothing, thus removing them.
When applying regex to HTML code it's a good idea to remove the \r\n of the HTML first, since they stop the regex from working.
\r\n