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

Prepare for WP.org release

parent 90828662
Branches
Tags
1 merge request!10Prepare for WP.org release
Pipeline #5073 passed
......@@ -9,7 +9,7 @@ module.exports = function( grunt ) {
addtextdomain: {
options: {
textdomain: 'redis-user-session-storage',
textdomain: 'wp-redis-user-session-storage',
},
update_all_domains: {
options: {
......
......@@ -45,9 +45,8 @@ Install and activate this plugin, then deactivate the old plugin. Both plugins c
## Changelog ##
### 0.2 ###
* Rename plugin to `Redis User Session Storage` to comply with WordPress.org plugin-naming requirements.
* Allow two versions of this plugin to co-exist safely to support seamless migration.
* Changes plugin class name to `Redis_User_Session_Storage` from `WP_Redis_User_Session_Storage`.
* Add cleanup routine for usermeta storage.
* Prepare plugin for WordPress.org release.
### 0.1 ###
* Initial public release
......@@ -4,8 +4,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Redis User Session Storage 0.2\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/redis-user-session-storage\n"
"POT-Creation-Date: 2022-07-10 01:18:39+00:00\n"
"https://wordpress.org/support/plugin/wp-redis-user-session-storage\n"
"POT-Creation-Date: 2022-07-13 23:11:21+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
......@@ -25,13 +25,6 @@ msgstr ""
"X-Textdomain-Support: yes\n"
"X-Generator: grunt-wp-i18n 1.0.3\n"
#: wp-redis-user-session-storage.php:93
#. translators: 1: New plugin name, 2: Old plugin name
msgid ""
"%1$s: An outdated version of this plugin, %2$s, is active. Please "
"deactivate it to use the current version."
msgstr ""
#. Plugin Name of the plugin/theme
msgid "Redis User Session Storage"
msgstr ""
......
......@@ -38,7 +38,7 @@
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. -->
<property name="text_domain" type="array" value="redis-user-session-storage"/>
<property name="text_domain" type="array" value="wp-redis-user-session-storage"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
......
......@@ -45,9 +45,8 @@ Install and activate this plugin, then deactivate the old plugin. Both plugins c
== Changelog ==
= 0.2 =
* Rename plugin to `Redis User Session Storage` to comply with WordPress.org plugin-naming requirements.
* Allow two versions of this plugin to co-exist safely to support seamless migration.
* Changes plugin class name to `Redis_User_Session_Storage` from `WP_Redis_User_Session_Storage`.
* Add cleanup routine for usermeta storage.
* Prepare plugin for WordPress.org release.
= 0.1 =
* Initial public release
......@@ -49,6 +49,13 @@ function load() {
require_once __DIR__ . '/inc/class-plugin.php';
require_once __DIR__ . '/inc/class-activation-deactivation-hooks.php';
// Alias plugin's original class name.
class_alias(
Plugin::class,
'WP_Redis_User_Session_Storage',
false
);
new Activation_Deactivation_Hooks( __FILE__ );
// Hooked at 9 in case old plugin is also active.
......@@ -67,35 +74,5 @@ load();
* @return string
*/
function set_session_token_manager( $manager ) {
if ( class_exists( WP_Redis_User_Session_Storage::class, false ) ) {
add_action( 'admin_notices', __NAMESPACE__ . '\admin_notice' );
}
return Plugin::class;
}
/**
* Show admin notice to certain users when older version is active.
*
* @return void
*/
function admin_notice() {
if ( ! current_user_can( 'activate_plugins' ) ) {
return;
}
?>
<div id="message" class="error">
<p>
<?php
printf(
/* translators: 1: New plugin name, 2: Old plugin name */
esc_html__( '%1$s: An outdated version of this plugin, %2$s, is active. Please deactivate it to use the current version.', 'redis-user-session-storage' ),
'<strong>Redis User Session Storage</strong>',
'<em>WP Redis User Session Storage</em>'
);
?>
</p>
</div>
<?php
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment