Skip to content

Instantly share code, notes, and snippets.

@AdrienPoupa
Created July 23, 2020 20:30
Show Gist options
  • Save AdrienPoupa/61881a3cbd10a9c689d6795d971a25c0 to your computer and use it in GitHub Desktop.
Save AdrienPoupa/61881a3cbd10a9c689d6795d971a25c0 to your computer and use it in GitHub Desktop.
WordPress: add text domain regex

Will replace: _e('text') to _e('text', 'your-domain')

_e:

Find \_e\('(.*)'\)

Replace by \_e\('$1', 'your-domain'\)

__:

Find \_\_\('(.*)'\)

Replace by \_\_\('$1', 'your-domain'\)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment