Skip to content

Commit

Permalink
Fix readme and bump version to 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
drazenbebic committed Feb 11, 2020
1 parent 5a09e7a commit 22e0dc7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
9 changes: 7 additions & 2 deletions admin-bar-user-switching.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
* Plugin Name: User Switching in Admin Bar
* Plugin URI: https://www.bebic.at
* Description: Originally developed by <a href="https://markwilkinson.me/">Mark Wilkinson</a>, this plugin builds upon the <a href="https://wordpress.org/plugins/user-switching/">User Switching</a> plugin by John Blackbourn and adds a dropdown list of users in the WordPress admin bar with a link to switch to that user, then providing a switch back link in the admin bar as well.
* Version: 1.2
* Author: Dražen Bebić
* Author URI: https://www.bebic.at
* Version: 1.1.1
* Text Domain: abus
* Domain Path: /i18n/languages/
* Requires at least: 3.1
* Tested up to: 5.3
* Requires PHP: 5.6
*/

use AdminBarUserSwitching\Plugin as AdminBarUserSwitchingPlugin;
Expand All @@ -30,7 +35,7 @@

// Define ABUS_PLUGIN_VERSION
if (!defined('ABUS_PLUGIN_VERSION')) {
define('ABUS_PLUGIN_VERSION', '1.1.1');
define('ABUS_PLUGIN_VERSION', '1.2');
}

// Define ABUS_PLUGIN_SLUG
Expand Down
3 changes: 2 additions & 1 deletion includes/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public function enqueueScripts($hook)
wp_register_script(
'abus_script',
ABUS_JS_URL . 'abus_script.js',
array( 'jquery' )
array( 'jquery' ),
ABUS_PLUGIN_VERSION
);

$args = array(
Expand Down
22 changes: 14 additions & 8 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
=== Admin Bar User Switching ===
Contributors: wpmarkuk
Contributors: drazenbebic, wpmarkuk
Donate link: http://markwilkinson.me/saythanks/
Tags: users, user switching
Tags: users, user switching, wordpress
Requires at least: 3.1
Tested up to: 4.7.3
Stable tag: 1.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tested up to: 5.3
Stable tag: 1.2
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Extends the excellent User Switching plugin by John Blackbourn by adding a User Switching to the admin bar for quick and easy user switching.

== Description ==

This plugin was originally developed by [Mark Wilkinson](https://markwilkinson.me/).

An admin bar “Switch to User” option is provided which on hover provides a search box where you can query a user to switch to. The results are links to switch to that user. This plugin is great for when you are building sites for clients and it is beneficial to see the site as your logged in client see's it.

And there is an optional mode where you can use a custom keyboard combination, say 'su', and it activates the form where you search for users, and then you can use keyboard arrows to navigate the list of results, and the return key to switch to the selected user. The same combo can be used to focus the 'Switch Off' link, following a return to simulate a click.
Expand Down Expand Up @@ -55,9 +57,13 @@ It does indeed, although not too many! The following filters can be used.

== Changelog ==

= 1.2 - 2020-02-11 =
* Update - WordPress 5.3 compatibility
* Tweak - Update and modernize the codebase

= 1.1.1 =
* Only enqueue js if the user is logged in
* Do not seperately enqueue jQuery as it is already stated as a dependancy
* Do not seperately enqueue jQuery as it is already stated as a dependency

= 1.1 =
* Add keyboard navigation
Expand All @@ -84,7 +90,7 @@ It does indeed, although not too many! The following filters can be used.
* Make sure the current logged in user does not appear in the search results

= 1.0.2 =
* Thanks for @johnbillion for pointing out the incorrect capabilities check for switch_to_user. This now checks against edit_user so users who can edit users will be the Swtich to link.
* Thanks for @johnbillion for pointing out the incorrect capabilities check for switch_to_user. This now checks against edit_user so users who can edit users will be the Switch to link.

= 1.0.1 =
* Use switch_to_user user capability instead of is_super_admin when checking whether to display Switch to link in admin bar.
Expand Down

0 comments on commit 22e0dc7

Please sign in to comment.