tec_automator_load_text_domain()
Loads the plugin localization files.
If the text domain loading functions provided by common
(from The Events Calendar or Event Tickets) are not available, then the function will use the load_plugin_textdomain
function.
Source
File: src/functions/load.php
function tec_automator_load_text_domain() { $domain = 'event-automator'; $plugin_base_dir = dirname( plugin_basename( EVENT_AUTOMATOR_FILE ) ); $plugin_rel_path = $plugin_base_dir . DIRECTORY_SEPARATOR . 'lang'; if ( ! class_exists( 'Tribe__Main' ) ) { // If we don't have Common classes load the old fashioned way. load_plugin_textdomain( $domain, false, $plugin_rel_path ); } else { // This will load `wp-content/languages/plugins` files first. Tribe__Main::instance()->load_text_domain( $domain, $plugin_rel_path ); } }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |