pmpro_load_textdomain

The Paid Memberships Pro pmpro load textdomain function.

Description

pmpro_load_textdomain(); 

Usage

  1. if ( !function_exists( 'pmpro_load_textdomain' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/localization.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = pmpro_load_textdomain(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/localization.php  
  1. function pmpro_load_textdomain() 
  2. //get the locale 
  3. $locale = apply_filters("plugin_locale", get_locale(), "paid-memberships-pro"); 
  4. $mofile = "pmpro-" . $locale . ".mo"; 
  5.  
  6. //paths to local (plugin) and global (WP) language files 
  7. $mofile_local = dirname(__FILE__)."/../languages/" . $mofile; 
  8. $mofile_global = WP_LANG_DIR . '/pmpro/' . $mofile; 
  9.  
  10. //load global first  
  11. load_textdomain("paid-memberships-pro", $mofile_global); 
  12.  
  13. //load local second 
  14. load_textdomain("paid-memberships-pro", $mofile_local); 
  15.  
  16. //load via plugin_textdomain/glotpress 
  17. load_plugin_textdomain( 'paid-memberships-pro', false, dirname(__FILE__)."/../languages/" );