Skip to content

Instantly share code, notes, and snippets.

@johncionci
johncionci / add-textdomain.php
Created May 10, 2016 13:40 — forked from balbuf/add-textdomain.php
Add or update text domain of all WP i18n functions in a file
<?php
/**
* Console application, which adds textdomain argument
* to all i18n function calls
*
* Adapted from:
* http://develop.svn.wordpress.org/trunk/tools/i18n/add-textdomain.php
*
* Extended such that all text domains are replaced if found or added otherwise.
* Also, double-quoted strings are replaced by single-quoted strings.