@@ -217,7 +217,7 @@ public static function redirect_redirects()
217
217
$ redirect_id = get_the_ID (); // Pull this one time only.
218
218
219
219
$ to = (string )get_post_meta ($ redirect_id , 'wp_redirect_to ' , TRUE );
220
- $ to = preg_replace_callback ('/%% \\ \ $([^\ []+?)(.+?)%%/i ' , 'wp_redirects\plugin::_url_e_gprcs_value ' , $ to );
220
+ $ to = preg_replace_callback ('/%%\$([^[]+?)(\[ .+?)%%/i ' , '\\ wp_redirects \ \plugin::_url_e_gprcs_value ' , $ to );
221
221
$ to = preg_replace ('/%%(.+?)%%/i ' , '' , $ to ); // Ditch any remaining replacement codes.
222
222
223
223
$ to = // Cleanup any double slashes left over by replacement codes.
@@ -274,7 +274,7 @@ public function redirect_uri_patterns()
274
274
{
275
275
return urlencode ((string )@$ _is_regex_matches [$ m [1 ]]);
276
276
}, $ _to ) : $ _to );
277
- $ _to = preg_replace_callback ('/%% \\ \ $([^\ []+?)(.+?)%%/i ' , 'wp_redirects\plugin::_url_e_gprcs_value ' , $ _to );
277
+ $ _to = preg_replace_callback ('/%%\$([^[]+?)(\[ .+?)%%/i ' , '\\ wp_redirects \ \plugin::_url_e_gprcs_value ' , $ _to );
278
278
$ _to = preg_replace ('/%%(.+?)%%/i ' , '' , $ _to ); // Ditch any remaining replacement codes.
279
279
280
280
$ _to = // Cleanup any double slashes left over by replacement codes.
@@ -303,7 +303,7 @@ public static function _url_e_gprcs_value($m)
303
303
if (strlen ($ element_w_brackets = $ m [2 ]) && preg_match ('/^(?:(?:\[([" \'])[a-z0-9 \._\-]+? \\1\])|(?:\[[0-9]+\]))+$/i ' , $ element_w_brackets ))
304
304
eval ('$value = urlencode(trim(stripslashes((string)@$ ' .$ gprcs .$ element_w_brackets .'))); ' );
305
305
306
- return ( !empty ($ value) ) ? $ value : '' ; // Default to empty string.
306
+ return !empty ($ value ) ? $ value : '' ; // Default to empty string.
307
307
}
308
308
309
309
public static function get_redirect_hits ($ post_id ) {
0 commit comments