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

Merge branch 'fix/i18n' into 'master'

Fix translation support

See merge request !13
parents 5806529f 9491959c
No related branches found
No related tags found
1 merge request!13Fix translation support
Pipeline #7788 failed
include:
- remote: https://git-cdn.e15r.co/gitlab/ci/wordpress/-/raw/main/plugins/templates/variables.yml
- remote: https://git-cdn.e15r.co/gitlab/ci/wordpress/-/raw/main/plugins/templates/cache.yml
- remote: https://git-cdn.e15r.co/gitlab/ci/wordpress/-/raw/main/plugins/templates/before-script-redis.yml
- remote: https://git-cdn.e15r.co/gitlab/ci/wordpress/-/raw/main/plugins/templates/matrix-redis.yml
- remote: https://git-cdn.e15r.co/gitlab/ci/wordpress/-/raw/main/plugins/default-redis.yml
......@@ -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,11 @@ 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 +73,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