tribe_events_virtual_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 tribe_events_virtual_load_text_domain() {
	$domain          = 'events-virtual';
	$plugin_base_dir = dirname( plugin_basename( EVENTS_VIRTUAL_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 );
	}
}

Top ↑

Changelog #

Changelog
Version Description
1.0.4 Introduced.