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
I noticed that hooks are supported for Modify matches action, but not for Global text replace action (I think). It would be useful to have a hook to be called before replacing text that would support dynamic replacement text value.
For example, I need to search all shortcodes like [vc_single_image image=”6800″], where I need to extract the image ID using regex params. Then I need to replace the shortcode with <img src="/wp-content/2020/01/image.jpg" />, where image ID must be replace with actual image URL. In this case it would be helpful that Search Regex plugin would call some hook like apply_filters('before_replace_value, $searchRegexResult, $replaceValue, $match, ...), where I could read the image ID (from the search regex param), then programatically get the corresponding image URL, and return the custom replace value <img src="image-url.jpg" /> that Search Regex plugin will replace to.
The text was updated successfully, but these errors were encountered:
I noticed that hooks are supported for Modify matches action, but not for Global text replace action (I think). It would be useful to have a hook to be called before replacing text that would support dynamic replacement text value.
For example, I need to search all shortcodes like
[vc_single_image image=”6800″]
, where I need to extract the image ID using regex params. Then I need to replace the shortcode with<img src="/wp-content/2020/01/image.jpg" />
, where image ID must be replace with actual image URL. In this case it would be helpful that Search Regex plugin would call some hook like apply_filters('before_replace_value, $searchRegexResult, $replaceValue, $match, ...), where I could read the image ID (from the search regex param), then programatically get the corresponding image URL, and return the custom replace value<img src="image-url.jpg" />
that Search Regex plugin will replace to.The text was updated successfully, but these errors were encountered: