Skip to content
Snippets Groups Projects
Commit e14956ce authored by Erick Hitter's avatar Erick Hitter
Browse files

Fix translation support

parent 5806529f
No related branches found
No related tags found
1 merge request!13Fix translation support
Pipeline #5108 failed with stages
in 2 minutes and 13 seconds
......@@ -6,6 +6,8 @@
* Version: 0.2
* Author: Erick Hitter
* Author URI: https://ethitter.com/
* Text Domain: wp-redis-user-session-storage
* Domain Path: /languages/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -27,7 +29,6 @@
namespace Redis_User_Session_Storage;
use Redis;
use WP_Redis_User_Session_Storage;
use WP_Session_Tokens;
/**
......@@ -58,6 +59,10 @@ function load() {
new Activation_Deactivation_Hooks( __FILE__ );
add_action( 'plugins_loaded',
__NAMESPACE__ . '\action_plugins_loaded'
);
// Hooked at 9 in case old plugin is also active.
add_filter(
'session_token_manager',
......@@ -67,6 +72,19 @@ function load() {
}
load();
/**
* Perform various actions after plugin loads.
*
* @return void
*/
function action_plugins_loaded() {
load_plugin_textdomain(
'wp-redis-user-session-storage',
false,
dirname( plugin_basename( __FILE__ ) ) . '/languages/'
);
}
/**
* Override Core's default usermeta-based token storage.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment