-
-
Save beatelite/69b2427903bd506f5f3ae88dc1e29822 to your computer and use it in GitHub Desktop.
WordPress - Get text domain function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get text domain | |
*/ | |
if(!function_exists('get_textdomain')) { | |
function get_textdomain() { | |
$default_headers = array( 'td' => 'Text Domain'); | |
$text_domain = get_file_data(get_stylesheet_uri(), $default_headers ); | |
if(array_key_exists('td', $text_domain)) { | |
return $text_domain['td']; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment