{ $locale = apply_filters('swa_load_textdomain_get_locale', get_locale()); // if load .mo file if (!empty($locale)) { $mofile_default = sprintf('%slanguages/%s.mo', SWA_PLUGIN_DIR, $locale); $mofile = apply_filters('swa_load_textdomain_mofile', $mofile_default); // make sure file exists, and load it if (file_exists($mofile)) { load_textdomain('swa', $mofile); } } } } //end of helper class //instantiate the singleton class SWA_Helper::get_instance(); function swa_serialize_role($roles) { $roles['meta_value'] = maybe_unserialize($roles['meta_value']); return $roles; } //locate and load activity post form function swa_show_post_form() { include SWA_PLUGIN_DIR . 'post-form.php'; //no inc_once because we may need form multiple times } function swa_get_base_component_scope($include, $exclude) { /* Fetch the names of components that have activity recorded in the DB */ $components = BP_Activity_Activity::get_recorded_components();