diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19f1490b655ad41acc2e7c184b480166fa456f76..81fe12df0ab24a2714a9b733aa5601ec812a0612 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,2 @@ 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 diff --git a/wp-redis-user-session-storage.php b/wp-redis-user-session-storage.php index d4efbe50e61ab23c17f81f63b2028bd5dbe0328b..bdc11c1bc6fa02203f4de4e05f1a689a252ad27d 100644 --- a/wp-redis-user-session-storage.php +++ b/wp-redis-user-session-storage.php @@ -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. *