Skip to content

Instantly share code, notes, and snippets.

@raamdev
Created July 5, 2016 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raamdev/13b3fc07c24ee5d358811b5fe212ebfd to your computer and use it in GitHub Desktop.
Save raamdev/13b3fc07c24ee5d358811b5fe212ebfd to your computer and use it in GitHub Desktop.
$to = preg_replace_callback('/%%\$(\_[a-zA-Z]+)(.+?)%%/i', 'wp_redirects\plugin::_url_e_gprcs_value', $to);
if(strlen($element_w_brackets = $m[2]) && preg_match('/^(?:(?:\[(["\'])[a-z0-9\._\-]+?\1\])|(?:\[[0-9]+\]))+$/i', $element_w_brackets))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment