Edit Author Slug - Version 1.8.1

Version Description

  • Release date: 2020-12-14
  • Corrects settings page notice link to actually link to the current user's profile page.
Download this release

Release Info

Developer thebrandonallen
Plugin Icon 128x128 Edit Author Slug
Version 1.8.1
Comparing to
See all releases

Code changes from version 1.7.0 to 1.8.1

CHANGELOG.md CHANGED
@@ -5,7 +5,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
5
 
6
  ## [Unreleased]
7
 
8
- ## [1.7.0](https://github.com/thebrandonallen/edit-author-slug/tree/1.7.0) - 2020-06-07 ##
 
 
 
 
 
 
 
 
 
 
 
 
9
  ### Changed
10
  * Bumps the minimum required version to WordPress 4.9.
11
  * Bumps "Tested up to" version to 5.4.1
5
 
6
  ## [Unreleased]
7
 
8
+ ## [1.8.1](https://github.com/thebrandonallen/edit-author-slug/tree/1.8.1) - 2020-12-14
9
+ ### Fixed
10
+ * Corrects settings page notice link to actually link to the current user's profile page.
11
+
12
+ ## [1.8.0](https://github.com/thebrandonallen/edit-author-slug/tree/1.8.0) - 2020-12-14
13
+ ### Changed
14
+ * Bumps "Tested up to" version to 5.6
15
+ * Drops support for IE 10 on the settings page.
16
+
17
+ ### Added
18
+ * Adds a notice to the settings page reminding you that you can edit your author slug on your profile page.
19
+
20
+ ## [1.7.0](https://github.com/thebrandonallen/edit-author-slug/tree/1.7.0) - 2020-06-07
21
  ### Changed
22
  * Bumps the minimum required version to WordPress 4.9.
23
  * Bumps "Tested up to" version to 5.4.1
README.md CHANGED
@@ -1,136 +1,146 @@
1
- # Edit Author Slug [![Build Status](https://travis-ci.org/thebrandonallen/edit-author-slug.svg?branch=master)](https://travis-ci.org/thebrandonallen/edit-author-slug) #
2
- **Contributors:** [thebrandonallen](https://profiles.wordpress.org/thebrandonallen)
3
- **Tags:** author, author base, author slug, user nicename, nicename, permalink, permalinks, slug, users, user, role, roles
4
- **Requires at least:** 4.9
5
- **Tested up to:** 5.4.1
6
- **Requires PHP:** 5.6.20
7
- **Stable tag:** 1.7.0
8
- **License:** GPLv2 or later
9
- **License URI:** https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
-
11
- Allows an admin (or capable user) to edit the author slug of a user, and change the author base.
12
-
13
- ## Description ##
14
-
15
- This plugin allows full control of your user permalinks, allowing you to change both the author base (the '/author/' portion of the author URLs), and the author slug (defaults to the username of the author). You can set the author base globally, or you can set it to be user-specific based on a user's role. You now have the power to craft the perfect URL structure for you Author pages.
16
-
17
- WordPress default structure *http://example.com/author/username/*.
18
-
19
- Edit Author Slug allows for *http://example.com/ninja/master-ninja/*.
20
-
21
- Using a role-based author base would allow for *http://example.com/ida/master-splinter/* (for an Administrator Role), or *http://example.com/koga/leonardo/* (for a Subscriber Role).
22
-
23
- Development of this plugin takes place on [GitHub](https://github.com/thebrandonallen/edit-author-slug/ "Edit Author Slug on Github"). Pull requests are always welcome!
24
-
25
- Translations should be submitted to [Translate WordPress](https://translate.wordpress.org/projects/wp-plugins/edit-author-slug).
26
-
27
- ## Installation ##
28
-
29
- 1. Upload `edit-author-slug` folder to your WordPress plugins directory (typically 'wp-content/plugins')
30
- 2. Activate the plugin through the 'Plugins' menu in WordPress
31
- 3. Go to Users > Your Profile, or Users > All Users > (username), and edit the author slug.
32
- 4. Click "Update Profile" or "Update User"
33
- 5. Go to Settings > Edit Author Slug to edit settings
34
- 6. Click "Save Changes"
35
-
36
- ## Screenshots ##
37
-
38
- 1. Settings
39
- 2. Individual user author slug
40
-
41
- ## Frequently Asked Questions ##
42
-
43
- ### What is an author slug? ###
44
-
45
- On standard WordPress installs, it's the final part of an author permalink.
46
- e.g. - https://example.com/author/author-slug/
47
-
48
- In relation to WordPress internals, the author slug is the same as the `user_nicename` field found in a `WP_User` object, or the users table in the database.
49
-
50
- ### Will my changes persist if I deactivate or delete the Edit Author Slug plugin? ###
51
-
52
- It depends.
53
-
54
- Changing a user's author slug is permanent, as this changes the user's `user_nicename` field in the database.
55
-
56
- If you've changed the author base, deactivating or deleting the plugin will revert your author base back to `author`.
57
-
58
- ### Why can't I edit my Author Slug? ###
59
-
60
- Make sure you are an admin, or have been assigned the `edit_users` capability.
61
-
62
- ### Why isn't my new Author Slug working? ###
63
-
64
- While I've made every attempt to prevent this, I may have missed a spot or two. First things first, go to Settings > Permalinks and click "Save Changes." You don't need to actually need to make any changes for this to work. Hopefully, this should kick your new Author Slug into gear.
65
-
66
- If this doesn't work, make sure you don't have any slug conflicts from other posts/pages/plugins/permalink setting/etc. If you're still experiencing the issue, feel free to post a support request in the forums.
67
-
68
- ## Changelog ##
69
-
70
- ### 1.7.0 ###
71
- * Release date: 2020-06-07
72
- * Bumps the minimum required version to WordPress 4.9.
73
- * Bumps "Tested up to" version to 5.4.1
74
- * Fixes an error that may occur with some install of iThemes Security
75
-
76
- ### 1.6.1 ###
77
- * Release date: 2019-09-05
78
- * Removes pre-WP 4.5 cache busting. The minimum version has been 4.7 for quite some time, and, as of WP 4.5, the cache busting was redundant.
79
- * Don't show the options page if `ba_eas_can_edit_author_slug()` returns `false`.
80
- * Bumps "Tested up to" version to 5.2.3
81
-
82
- ### 1.6.0 ###
83
- * Release date: 2018-10-11
84
- * Minimum required WordPress version is now 4.7
85
- * Settings page JS no longer depends on jQuery (switched to plain js)
86
- * Add compatibility for iThemes Force Unique Nickname WordPress Tweak
87
- * Add a hash string as an author slug option
88
- * Minimum PHP version has been bumped to 5.3. This is a soft bump, meaning, the plugin should still run on PHP 5.2. However, PHP 5.2 is no longer, officially, supported.
89
-
90
- ### 1.5.2 ###
91
- * Release date: 2017-06-21
92
- * Fixed a regression where those using the default author based couldn't remove front unless they were also using role-based author bases. Props @thatherton.
93
-
94
- ### 1.5.1 ###
95
- * Release date: 2017-06-02
96
- * Fix PHP notice when manually updating a user profile. Props @mydigitalsauce.
97
-
98
- ### 1.5.0 ###
99
- * Release date: 2017-05-30
100
- * Bumped minimum required WordPress version to 4.4.
101
- * Refactored bulk upgrading again. The original fix made things better, but not as good as it could be. This new refactoring drastically improves performance and memory usage.
102
- * This release is primarily an under-the-hood release with a number of optimizations and performance improvements.
103
-
104
- ### 1.4.1 ###
105
- * Release date: 2017-04-24
106
- * Fix failing string replacement in bulk update message.
107
-
108
- ### 1.4.0 ###
109
- * Release date: 2017-04-04
110
- * Lots of code cleanup to better adhere to WordPress Coding Standards.
111
- * Improved performance of `ba_eas_sanitize_author_base()` by preventing unnecessary processing.
112
- * Fixed an issue where the demo author permalink URL could have a double slash.
113
- * Improvements to bulk update for sites with a large user base.
114
-
115
- ### 1.3.0 ###
116
- * Release date: 2017-01-25
117
- * Fix a potential bug where a sanitized author base could end up with double forward slashes.
118
- * Introduce the `%ba_eas_author_role%` permalink structure tag. This can be used to customize role-based author bases.
119
- * Bonus: All alternative facts are now free!
120
-
121
- ### 1.2.1 ###
122
- * Release date: 2016-02-29
123
- * Fixed stupid error where the default user nicename wasn't being properly retrieved from the database. Sorry about that :(
124
- * Unfortunately, some unicorns were lost during the development of this release, but they are a resilient creature.
125
-
126
- ### 1.2.0 ###
127
- * Release date: 2016-02-01
128
- * Added the ability to use forward slashes in the author base.
129
- * Improved display on the settings page, and storing, of role slugs.
130
- * Packaged translations are now removed. Anyone interested in translating the plugin should do so at [Translate WordPress](https://translate.wordpress.org/projects/wp-plugins/edit-author-slug).
131
- * EXPERIMENTAL: Added the ability to set the author slug to a user's numeric user id. While I have tested this, I can't be sure that no one's site will implode. If all goes well, the experimental tag will be removed in the next major release (or two).
132
- * Added ability to remove the front portion of author links.
133
- * Accessibility improvements to the settings page.
134
-
135
- ### Full Changelog ###
136
- * https://github.com/thebrandonallen/edit-author-slug/blob/master/CHANGELOG.md
 
 
 
 
 
 
 
 
 
 
1
+ # Edit Author Slug [![Build Status](https://travis-ci.org/thebrandonallen/edit-author-slug.svg?branch=master)](https://travis-ci.org/thebrandonallen/edit-author-slug) #
2
+ **Contributors:** [thebrandonallen](https://profiles.wordpress.org/thebrandonallen)
3
+ **Tags:** author, author base, author slug, user nicename, nicename, permalink, permalinks, slug, users, user, role, roles
4
+ **Requires at least:** 4.9
5
+ **Tested up to:** 5.6
6
+ **Requires PHP:** 5.6.20
7
+ **Stable tag:** 1.8.1
8
+ **License:** GPLv2 or later
9
+ **License URI:** https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
+
11
+ Allows an admin (or capable user) to edit the author slug of a user, and change the author base.
12
+
13
+ ## Description ##
14
+
15
+ This plugin allows full control of your user permalinks, allowing you to change both the author base (the '/author/' portion of the author URLs), and the author slug (defaults to the username of the author). You can set the author base globally, or you can set it to be user-specific based on a user's role. You now have the power to craft the perfect URL structure for you Author pages.
16
+
17
+ WordPress default structure *http://example.com/author/username/*.
18
+
19
+ Edit Author Slug allows for *http://example.com/ninja/master-ninja/*.
20
+
21
+ Using a role-based author base would allow for *http://example.com/ida/master-splinter/* (for an Administrator Role), or *http://example.com/koga/leonardo/* (for a Subscriber Role).
22
+
23
+ Development of this plugin takes place on [GitHub](https://github.com/thebrandonallen/edit-author-slug/ "Edit Author Slug on Github"). Pull requests are always welcome!
24
+
25
+ Translations should be submitted to [Translate WordPress](https://translate.wordpress.org/projects/wp-plugins/edit-author-slug).
26
+
27
+ ## Installation ##
28
+
29
+ 1. Upload `edit-author-slug` folder to your WordPress plugins directory (typically 'wp-content/plugins')
30
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
31
+ 3. Go to Users > Your Profile, or Users > All Users > (username), and edit the author slug.
32
+ 4. Click "Update Profile" or "Update User"
33
+ 5. Go to Settings > Edit Author Slug to edit settings
34
+ 6. Click "Save Changes"
35
+
36
+ ## Screenshots ##
37
+
38
+ 1. Settings
39
+ 2. Individual user author slug
40
+
41
+ ## Frequently Asked Questions ##
42
+
43
+ ### What is an author slug? ###
44
+
45
+ On standard WordPress installs, it's the final part of an author permalink.
46
+ e.g. - https://example.com/author/author-slug/
47
+
48
+ In relation to WordPress internals, the author slug is the same as the `user_nicename` field found in a `WP_User` object, or the users table in the database.
49
+
50
+ ### Will my changes persist if I deactivate or delete the Edit Author Slug plugin? ###
51
+
52
+ It depends.
53
+
54
+ Changing a user's author slug is permanent, as this changes the user's `user_nicename` field in the database.
55
+
56
+ If you've changed the author base, deactivating or deleting the plugin will revert your author base back to `author`.
57
+
58
+ ### Why can't I edit my Author Slug? ###
59
+
60
+ Make sure you are an admin, or have been assigned the `edit_users` capability.
61
+
62
+ ### Why isn't my new Author Slug working? ###
63
+
64
+ While I've made every attempt to prevent this, I may have missed a spot or two. First things first, go to Settings > Permalinks and click "Save Changes." You don't need to actually need to make any changes for this to work. Hopefully, this should kick your new Author Slug into gear.
65
+
66
+ If this doesn't work, make sure you don't have any slug conflicts from other posts/pages/plugins/permalink setting/etc. If you're still experiencing the issue, feel free to post a support request in the forums.
67
+
68
+ ## Changelog ##
69
+
70
+ ### 1.8.1 ###
71
+ * Release date: 2020-12-14
72
+ * Corrects settings page notice link to actually link to the current user's profile page.
73
+
74
+ ### 1.8.0 ###
75
+ * Release date: 2020-12-14
76
+ * Bumps "Tested up to" version to 5.6
77
+ * Adds a notice to the settings page reminding you that you can edit your author slug on your profile page.
78
+ * Drops support for IE 10 on the settings page.
79
+
80
+ ### 1.7.0 ###
81
+ * Release date: 2020-06-07
82
+ * Bumps the minimum required version to WordPress 4.9.
83
+ * Bumps "Tested up to" version to 5.4.1
84
+ * Fixes an error that may occur with some install of iThemes Security
85
+
86
+ ### 1.6.1 ###
87
+ * Release date: 2019-09-05
88
+ * Removes pre-WP 4.5 cache busting. The minimum version has been 4.7 for quite some time, and, as of WP 4.5, the cache busting was redundant.
89
+ * Don't show the options page if `ba_eas_can_edit_author_slug()` returns `false`.
90
+ * Bumps "Tested up to" version to 5.2.3
91
+
92
+ ### 1.6.0 ###
93
+ * Release date: 2018-10-11
94
+ * Minimum required WordPress version is now 4.7
95
+ * Settings page JS no longer depends on jQuery (switched to plain js)
96
+ * Add compatibility for iThemes Force Unique Nickname WordPress Tweak
97
+ * Add a hash string as an author slug option
98
+ * Minimum PHP version has been bumped to 5.3. This is a soft bump, meaning, the plugin should still run on PHP 5.2. However, PHP 5.2 is no longer, officially, supported.
99
+
100
+ ### 1.5.2 ###
101
+ * Release date: 2017-06-21
102
+ * Fixed a regression where those using the default author based couldn't remove front unless they were also using role-based author bases. Props @thatherton.
103
+
104
+ ### 1.5.1 ###
105
+ * Release date: 2017-06-02
106
+ * Fix PHP notice when manually updating a user profile. Props @mydigitalsauce.
107
+
108
+ ### 1.5.0 ###
109
+ * Release date: 2017-05-30
110
+ * Bumped minimum required WordPress version to 4.4.
111
+ * Refactored bulk upgrading again. The original fix made things better, but not as good as it could be. This new refactoring drastically improves performance and memory usage.
112
+ * This release is primarily an under-the-hood release with a number of optimizations and performance improvements.
113
+
114
+ ### 1.4.1 ###
115
+ * Release date: 2017-04-24
116
+ * Fix failing string replacement in bulk update message.
117
+
118
+ ### 1.4.0 ###
119
+ * Release date: 2017-04-04
120
+ * Lots of code cleanup to better adhere to WordPress Coding Standards.
121
+ * Improved performance of `ba_eas_sanitize_author_base()` by preventing unnecessary processing.
122
+ * Fixed an issue where the demo author permalink URL could have a double slash.
123
+ * Improvements to bulk update for sites with a large user base.
124
+
125
+ ### 1.3.0 ###
126
+ * Release date: 2017-01-25
127
+ * Fix a potential bug where a sanitized author base could end up with double forward slashes.
128
+ * Introduce the `%ba_eas_author_role%` permalink structure tag. This can be used to customize role-based author bases.
129
+ * Bonus: All alternative facts are now free!
130
+
131
+ ### 1.2.1 ###
132
+ * Release date: 2016-02-29
133
+ * Fixed stupid error where the default user nicename wasn't being properly retrieved from the database. Sorry about that :(
134
+ * Unfortunately, some unicorns were lost during the development of this release, but they are a resilient creature.
135
+
136
+ ### 1.2.0 ###
137
+ * Release date: 2016-02-01
138
+ * Added the ability to use forward slashes in the author base.
139
+ * Improved display on the settings page, and storing, of role slugs.
140
+ * Packaged translations are now removed. Anyone interested in translating the plugin should do so at [Translate WordPress](https://translate.wordpress.org/projects/wp-plugins/edit-author-slug).
141
+ * EXPERIMENTAL: Added the ability to set the author slug to a user's numeric user id. While I have tested this, I can't be sure that no one's site will implode. If all goes well, the experimental tag will be removed in the next major release (or two).
142
+ * Added ability to remove the front portion of author links.
143
+ * Accessibility improvements to the settings page.
144
+
145
+ ### Full Changelog ###
146
+ * https://github.com/thebrandonallen/edit-author-slug/blob/master/CHANGELOG.md
edit-author-slug.php CHANGED
@@ -7,7 +7,7 @@
7
  * Author URI: https://github.com/thebrandonallen/
8
  * Text Domain: edit-author-slug
9
  * Domain Path: /languages
10
- * Version: 1.7.0
11
  *
12
  * Copyright (C) 2009-2020 Brandon Allen (https://github.com/thebrandonallen)
13
  *
@@ -28,7 +28,7 @@
28
  * @package Edit_Author_Slug
29
  * @subpackage Main
30
  * @author Brandon Allen
31
- * @version 1.7.0
32
  */
33
 
34
  // Exit if accessed directly.
7
  * Author URI: https://github.com/thebrandonallen/
8
  * Text Domain: edit-author-slug
9
  * Domain Path: /languages
10
+ * Version: 1.8.1
11
  *
12
  * Copyright (C) 2009-2020 Brandon Allen (https://github.com/thebrandonallen)
13
  *
28
  * @package Edit_Author_Slug
29
  * @subpackage Main
30
  * @author Brandon Allen
31
+ * @version 1.8.1
32
  */
33
 
34
  // Exit if accessed directly.
includes/admin.php CHANGED
@@ -425,7 +425,11 @@ function ba_eas_settings_page_html() {
425
 
426
  <div class="wrap">
427
 
428
- <h1><?php esc_html_e( 'Edit Author Slug Settings', 'edit-author-slug' ); ?></h1>
 
 
 
 
429
 
430
  <form action="options.php" method="post">
431
 
425
 
426
  <div class="wrap">
427
 
428
+ <h1 id="edit-author-slug"><?php esc_html_e( 'Edit Author Slug Settings', 'edit-author-slug' ); ?></h1>
429
+
430
+ <div class="notice notice-large">
431
+ <a href="<?php echo esc_url( get_edit_profile_url() ); ?>">You can customize your own author slug by visiting your profile page.</a> This also applies to other users.
432
+ </div>
433
 
434
  <form action="options.php" method="post">
435
 
js/edit-author-slug.js CHANGED
@@ -1,18 +1,20 @@
1
- ( function() {
2
- var toggleHidden;
3
-
4
  // Toggle the .hidden class.
5
- toggleHidden = function( el ) {
6
- if (el && Object.prototype.hasOwnProperty.call(el, 'classList')) {
7
  el.classList.toggle( 'hidden' );
8
  }
9
  };
10
 
11
  // Run our code after the DOM is loaded.
12
- document.addEventListener( 'DOMContentLoaded', function() {
13
- var customInput = document.querySelector( 'input[name="ba_eas_author_slug_custom"]' ),
14
- front = document.querySelector( '.eas-demo-author-base-front' ),
15
- removeFront = document.querySelector( 'input[name="_ba_eas_remove_front"]' );
 
 
 
 
16
 
17
  // Hide the permalink front if remove front is on.
18
  if ( removeFront ) {
@@ -21,54 +23,69 @@
21
  }
22
 
23
  // Show/hide permalink front when remove front checkbox is toggled.
24
- removeFront.addEventListener( 'click', function() {
25
  toggleHidden( front );
26
- });
27
  }
28
 
29
  // Toggle checkbox sibling table rows.
30
- document.querySelectorAll( 'input[class="eas-checkbox"]' ).forEach( function( item ) {
31
- var siblingRow = item.parentNode.parentNode.nextElementSibling;
 
 
 
32
 
33
- // If the item isn't checked, hide it.
34
- if ( ! item.checked ) {
35
- toggleHidden( siblingRow );
36
- }
37
 
38
- // Listen for checkbox clicks, and hide the appropriate item.
39
- item.addEventListener( 'click', function() {
40
- toggleHidden( siblingRow );
41
- });
42
- });
43
 
44
  // Add click events to the user profile author slug radios.
45
- document.querySelectorAll( 'input[name="ba_eas_author_slug"]' ).forEach( function( item ) {
46
-
47
- // On click, set the custom author slug input value, to the value of
48
- // the radio item that was clicked.
49
- item.addEventListener( 'click', function() {
50
- if ( ! item.classList.contains( 'eas-author-slug-custom-radio' ) ) {
51
- customInput.value = item.value;
52
- }
53
- });
54
- });
 
 
 
 
 
55
 
56
  // When the custom author slug input is focused, set the custom radio as selected.
57
  if ( customInput ) {
58
- customInput.addEventListener( 'focus', function() {
59
- document.querySelector( '.eas-author-slug-custom-radio' ).checked = 'checked';
60
- });
 
 
61
  }
62
 
63
  // Watch select boxes, and add a warning if username is selected, but
64
  // only when iThemes `force unique nicename` is turned on.
65
- document.querySelectorAll( 'select' ).forEach( function( item ) {
66
- item.addEventListener( 'change', function( event ) {
67
- var errorDiv = event.target.nextElementSibling;
68
- if ( errorDiv && errorDiv.classList.contains( 'eas-author-slug-select-error' ) ) {
 
 
 
 
 
69
  toggleHidden( errorDiv );
70
  }
71
- });
72
- });
73
- });
74
- }() );
1
+ ( function () {
 
 
2
  // Toggle the .hidden class.
3
+ const toggleHidden = function ( el ) {
4
+ if ( el && Object.prototype.hasOwnProperty.call( el, 'classList' ) ) {
5
  el.classList.toggle( 'hidden' );
6
  }
7
  };
8
 
9
  // Run our code after the DOM is loaded.
10
+ document.addEventListener( 'DOMContentLoaded', function () {
11
+ const customInput = document.querySelector(
12
+ 'input[name="ba_eas_author_slug_custom"]'
13
+ );
14
+ const front = document.querySelector( '.eas-demo-author-base-front' );
15
+ const removeFront = document.querySelector(
16
+ 'input[name="_ba_eas_remove_front"]'
17
+ );
18
 
19
  // Hide the permalink front if remove front is on.
20
  if ( removeFront ) {
23
  }
24
 
25
  // Show/hide permalink front when remove front checkbox is toggled.
26
+ removeFront.addEventListener( 'click', function () {
27
  toggleHidden( front );
28
+ } );
29
  }
30
 
31
  // Toggle checkbox sibling table rows.
32
+ document
33
+ .querySelectorAll( 'input[class="eas-checkbox"]' )
34
+ .forEach( function ( item ) {
35
+ const siblingRow =
36
+ item.parentNode.parentNode.nextElementSibling;
37
 
38
+ // If the item isn't checked, hide it.
39
+ if ( ! item.checked ) {
40
+ toggleHidden( siblingRow );
41
+ }
42
 
43
+ // Listen for checkbox clicks, and hide the appropriate item.
44
+ item.addEventListener( 'click', function () {
45
+ toggleHidden( siblingRow );
46
+ } );
47
+ } );
48
 
49
  // Add click events to the user profile author slug radios.
50
+ document
51
+ .querySelectorAll( 'input[name="ba_eas_author_slug"]' )
52
+ .forEach( function ( item ) {
53
+ // On click, set the custom author slug input value, to the value of
54
+ // the radio item that was clicked.
55
+ item.addEventListener( 'click', function () {
56
+ if (
57
+ ! item.classList.contains(
58
+ 'eas-author-slug-custom-radio'
59
+ )
60
+ ) {
61
+ customInput.value = item.value;
62
+ }
63
+ } );
64
+ } );
65
 
66
  // When the custom author slug input is focused, set the custom radio as selected.
67
  if ( customInput ) {
68
+ customInput.addEventListener( 'focus', function () {
69
+ document.querySelector(
70
+ '.eas-author-slug-custom-radio'
71
+ ).checked = 'checked';
72
+ } );
73
  }
74
 
75
  // Watch select boxes, and add a warning if username is selected, but
76
  // only when iThemes `force unique nicename` is turned on.
77
+ document.querySelectorAll( 'select' ).forEach( function ( item ) {
78
+ item.addEventListener( 'change', function ( event ) {
79
+ const errorDiv = event.target.nextElementSibling;
80
+ if (
81
+ errorDiv &&
82
+ errorDiv.classList.contains(
83
+ 'eas-author-slug-select-error'
84
+ )
85
+ ) {
86
  toggleHidden( errorDiv );
87
  }
88
+ } );
89
+ } );
90
+ } );
91
+ } )();
js/edit-author-slug.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! edit-author-slug - v1.7.0 - 2020-06-08 3:21:44 AM UTC - https://github.com/thebrandonallen/edit-author-slug/ */
2
- !function(){var e;e=function(e){e&&Object.prototype.hasOwnProperty.call(e,"classList")&&e.classList.toggle("hidden")},document.addEventListener("DOMContentLoaded",(function(){var t=document.querySelector('input[name="ba_eas_author_slug_custom"]'),n=document.querySelector(".eas-demo-author-base-front"),c=document.querySelector('input[name="_ba_eas_remove_front"]');c&&(c.checked&&e(n),c.addEventListener("click",(function(){e(n)}))),document.querySelectorAll('input[class="eas-checkbox"]').forEach((function(t){var n=t.parentNode.parentNode.nextElementSibling;t.checked||e(n),t.addEventListener("click",(function(){e(n)}))})),document.querySelectorAll('input[name="ba_eas_author_slug"]').forEach((function(e){e.addEventListener("click",(function(){e.classList.contains("eas-author-slug-custom-radio")||(t.value=e.value)}))})),t&&t.addEventListener("focus",(function(){document.querySelector(".eas-author-slug-custom-radio").checked="checked"})),document.querySelectorAll("select").forEach((function(t){t.addEventListener("change",(function(t){var n=t.target.nextElementSibling;n&&n.classList.contains("eas-author-slug-select-error")&&e(n)}))}))}))}();
1
+ /*! edit-author-slug - v1.8.1 - 2020-12-14 4:30:04 PM UTC - https://github.com/thebrandonallen/edit-author-slug/ */
2
+ (function(){const e=function(e){if(e&&Object.prototype.hasOwnProperty.call(e,"classList")){e.classList.toggle("hidden")}};document.addEventListener("DOMContentLoaded",(function(){const t=document.querySelector('input[name="ba_eas_author_slug_custom"]');const n=document.querySelector(".eas-demo-author-base-front");const c=document.querySelector('input[name="_ba_eas_remove_front"]');if(c){if(c.checked){e(n)}c.addEventListener("click",(function(){e(n)}))}document.querySelectorAll('input[class="eas-checkbox"]').forEach((function(t){const n=t.parentNode.parentNode.nextElementSibling;if(!t.checked){e(n)}t.addEventListener("click",(function(){e(n)}))}));document.querySelectorAll('input[name="ba_eas_author_slug"]').forEach((function(e){e.addEventListener("click",(function(){if(!e.classList.contains("eas-author-slug-custom-radio")){t.value=e.value}}))}));if(t){t.addEventListener("focus",(function(){document.querySelector(".eas-author-slug-custom-radio").checked="checked"}))}document.querySelectorAll("select").forEach((function(t){t.addEventListener("change",(function(t){const n=t.target.nextElementSibling;if(n&&n.classList.contains("eas-author-slug-select-error")){e(n)}}))}))}))})();
languages/edit-author-slug.pot CHANGED
@@ -3,40 +3,52 @@
3
  # Submit translations to https://translate.wordpress.org/projects/wp-plugins/edit-author-slug.
4
  msgid ""
5
  msgstr ""
6
- "Project-Id-Version: Edit Author Slug 1.7.0\n"
7
- "Report-Msgid-Bugs-To: "
8
- "https://github.com/thebrandonallen/edit-author-slug/issues\n"
9
- "POT-Creation-Date: 2020-06-08 03:21:48+00:00\n"
10
  "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=utf-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
14
- "Last-Translator: BRANDON ALLEN <plugins@brandonallen.me>\n"
15
- "Language-Team: ENGLISH <plugins@brandonallen.me>\n"
16
- "Language: en\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
- "X-Poedit-Country: United States\n"
19
- "X-Poedit-SourceCharset: UTF-8\n"
20
- "X-Poedit-KeywordsList: "
21
- "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
22
- "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
23
- "X-Poedit-Basepath: ../\n"
24
- "X-Poedit-SearchPath-0: .\n"
25
- "X-Poedit-Bookmarks: \n"
26
- "X-Textdomain-Support: yes\n"
27
- "X-Generator: grunt-wp-i18n 1.0.3\n"
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  #: includes/admin.php:74
30
- msgid ""
31
- "Choose an Author Slug based on the above profile information, or create "
32
- "your own."
33
  msgstr ""
34
 
35
  #: includes/admin.php:74
36
  msgid "ie. - 'user-name', 'firstname-lastname', or 'master-ninja'"
37
  msgstr ""
38
 
39
- #: includes/admin.php:77 includes/admin.php:79 includes/admin.php:323
 
 
40
  msgid "Author Slug"
41
  msgstr ""
42
 
@@ -57,15 +69,11 @@ msgid "<strong>ERROR</strong>: An author slug cannot be blank. Please try again.
57
  msgstr ""
58
 
59
  #: includes/admin.php:213
60
- msgid ""
61
- "<strong>ERROR</strong>: An author slug can only contain alphanumeric "
62
- "characters, underscores (_) and dashes (-)."
63
  msgstr ""
64
 
65
  #: includes/admin.php:222
66
- msgid ""
67
- "<strong>ERROR</strong>: That author slug appears to be invalid. Please try "
68
- "something different."
69
  msgstr ""
70
 
71
  #: includes/admin.php:231
@@ -73,156 +81,152 @@ msgid "<strong>ERROR</strong>: An author slug may not be longer than 50 characte
73
  msgstr ""
74
 
75
  #: includes/admin.php:247
76
- msgid ""
77
- "<strong>ERROR</strong>: Your iThemes settings prevent your author slug from "
78
- "being the same as your username."
79
  msgstr ""
80
 
81
- #: includes/admin.php:263
82
  #. translators: 1: author slug
83
- msgid ""
84
- "<strong>ERROR</strong>: The author slug, %1$s, already exists. Please try "
85
- "something different."
86
  msgstr ""
87
 
88
- #: includes/admin.php:409 includes/admin.php:428
 
89
  msgid "Edit Author Slug Settings"
90
  msgstr ""
91
 
92
- #: includes/admin.php:452 includes/admin.php:460
 
93
  msgid "Author Base"
94
  msgstr ""
95
 
96
- #: includes/admin.php:474
97
  msgid "Remove Front"
98
  msgstr ""
99
 
100
- #: includes/admin.php:485
101
  msgid "Role-Based Author Base"
102
  msgstr ""
103
 
104
- #: includes/admin.php:495
105
  msgid "Role Slugs"
106
  msgstr ""
107
 
108
- #: includes/admin.php:505
109
  msgid "Automatic Author Slug Creation"
110
  msgstr ""
111
 
112
- #: includes/admin.php:513
113
  msgid "Automatically Update"
114
  msgstr ""
115
 
116
- #: includes/admin.php:523 includes/admin.php:554
 
117
  msgid "Author Slug Structure"
118
  msgstr ""
119
 
120
- #: includes/admin.php:536
121
  msgid "Bulk Update Author Slugs"
122
  msgstr ""
123
 
124
- #: includes/admin.php:544
125
  msgid "Bulk Update"
126
  msgstr ""
127
 
128
- #: includes/admin.php:573
129
  msgid "Change your author base to something more fun!"
130
  msgstr ""
131
 
132
- #: includes/admin.php:586
133
- msgid ""
134
- "Allow Author Slugs to be automatically updated, and set the default Author "
135
- "Slug structure for users. Automatic updating will only occur when a user "
136
- "can't edit Author Slugs on their own."
137
  msgstr ""
138
 
139
- #: includes/admin.php:586
140
- msgid ""
141
- "This could have SEO repercussions if users update their profiles "
142
- "frequently, and it will override any manual editing of the Author Slug you "
143
- "may have previously completed."
144
  msgstr ""
145
 
146
- #: includes/admin.php:609
147
  msgid "Defaults to 'author'"
148
  msgstr ""
149
 
150
- #: includes/admin.php:639
151
  msgid "Remove the \"front\" portion of the author permalink structure."
152
  msgstr ""
153
 
154
- #: includes/admin.php:655
155
  msgid "Set user's Author Base according to their role."
156
  msgstr ""
157
 
158
- #: includes/admin.php:661
159
- #. translators: 1: rewrite tag, 2: rewrite tag demo usage, 3: demo URL using
160
- #. rewrite tag
161
- msgid ""
162
- "Use the %1$s rewrite tag to customize the role-based author base. If you "
163
- "set the author base to \"%2$s\", the resulting author structure will be "
164
- "something like \"%3$s\"."
165
  msgstr ""
166
 
167
- #: includes/admin.php:774
168
  msgid "Automatically update Author Slug when a user updates their profile."
169
  msgstr ""
170
 
171
- #: includes/admin.php:802
172
  msgid "Default author slug options"
173
  msgstr ""
174
 
175
- #: includes/admin.php:828
176
  msgid "Update all users at once based on the specified Author Slug structure."
177
  msgstr ""
178
 
179
- #: includes/admin.php:845
180
- msgid ""
181
- "Update all users according to the below Author Slug setting. This will only "
182
- "be run after clicking \"Save Changes\"."
183
  msgstr ""
184
 
185
- #: includes/admin.php:873
186
  msgid "Default bulk update author slug options"
187
  msgstr ""
188
 
189
- #: includes/admin.php:910
190
  msgid "Settings"
191
  msgstr ""
192
 
193
- #: includes/admin.php:937 tests/test-admin.php:1112
 
194
  msgid "username (Default)"
195
  msgstr ""
196
 
197
- #: includes/admin.php:938 tests/test-admin.php:1113
 
198
  msgid "nickname"
199
  msgstr ""
200
 
201
- #: includes/admin.php:939 tests/test-admin.php:1114
 
202
  msgid "displayname"
203
  msgstr ""
204
 
205
- #: includes/admin.php:940 tests/test-admin.php:1115
 
206
  msgid "firstname"
207
  msgstr ""
208
 
209
- #: includes/admin.php:941 tests/test-admin.php:1116
 
210
  msgid "lastname"
211
  msgstr ""
212
 
213
- #: includes/admin.php:942 tests/test-admin.php:1117
 
214
  msgid "firstname-lastname"
215
  msgstr ""
216
 
217
- #: includes/admin.php:943 tests/test-admin.php:1118
 
218
  msgid "lastname-firstname"
219
  msgstr ""
220
 
221
- #: includes/admin.php:944 tests/test-admin.php:1119
 
222
  msgid "userid"
223
  msgstr ""
224
 
225
- #: includes/admin.php:945 tests/test-admin.php:1120
 
226
  msgid "hash"
227
  msgstr ""
228
 
@@ -234,17 +238,9 @@ msgstr ""
234
  msgid "Use class constant, BA_Edit_Author_Slug::DB_VERSION, instead."
235
  msgstr ""
236
 
237
- #: includes/functions.php:259
238
  #. translators: Updated author slugs count.
 
239
  msgid "%d user author slug updated."
240
  msgid_plural "%d user author slugs updated."
241
  msgstr[0] ""
242
  msgstr[1] ""
243
-
244
- #. Description of the plugin/theme
245
- msgid ""
246
- "Allows an Admin (or capable user) to edit the author slug of a user, and "
247
- "change the Author Base. <em>i.e. - (WordPress default structure) "
248
- "http://example.com/author/username/ (Plugin allows) "
249
- "http://example.com/ninja/master-ninja/</em>"
250
- msgstr ""
3
  # Submit translations to https://translate.wordpress.org/projects/wp-plugins/edit-author-slug.
4
  msgid ""
5
  msgstr ""
6
+ "Project-Id-Version: Edit Author Slug 1.8.1\n"
7
+ "Report-Msgid-Bugs-To: https://github.com/thebrandonallen/edit-author-slug/issues\n"
8
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
+ "Language-Team: LANGUAGE <LL@li.org>\n"
10
  "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "POT-Creation-Date: 2020-12-14T16:30:06+00:00\n"
14
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
15
+ "X-Generator: WP-CLI 2.4.0\n"
16
+ "X-Poedit-KeywordsList: __:1,2d;_e:1,2d;_x:1,2c,3d;_n:1,2,4d;_ex:1,2c,3d;_nx:1,2,4c,5d;esc_attr__:1,2d;esc_attr_e:1,2d;esc_attr_x:1,2c,3d;esc_html__:1,2d;esc_html_e:1,2d;esc_html_x:1,2c,3d;_n_noop:1,2,3d;_nx_noop:1,2,3c,4d\n"
17
+ "X-Domain: edit-author-slug\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/admin.php:73
21
+ #: includes/admin.php:410
22
+ msgid "Edit Author Slug"
23
+ msgstr ""
24
+
25
+ #. Plugin URI of the plugin
26
+ msgid "https://github.com/thebrandonallen/edit-author-slug/"
27
+ msgstr ""
28
+
29
+ #. Description of the plugin
30
+ msgid "Allows an Admin (or capable user) to edit the author slug of a user, and change the Author Base. <em>i.e. - (WordPress default structure) http://example.com/author/username/ (Plugin allows) http://example.com/ninja/master-ninja/</em>"
31
+ msgstr ""
32
+
33
+ #. Author of the plugin
34
+ msgid "Brandon Allen"
35
+ msgstr ""
36
+
37
+ #. Author URI of the plugin
38
+ msgid "https://github.com/thebrandonallen/"
39
+ msgstr ""
40
 
41
  #: includes/admin.php:74
42
+ msgid "Choose an Author Slug based on the above profile information, or create your own."
 
 
43
  msgstr ""
44
 
45
  #: includes/admin.php:74
46
  msgid "ie. - 'user-name', 'firstname-lastname', or 'master-ninja'"
47
  msgstr ""
48
 
49
+ #: includes/admin.php:77
50
+ #: includes/admin.php:79
51
+ #: includes/admin.php:323
52
  msgid "Author Slug"
53
  msgstr ""
54
 
69
  msgstr ""
70
 
71
  #: includes/admin.php:213
72
+ msgid "<strong>ERROR</strong>: An author slug can only contain alphanumeric characters, underscores (_) and dashes (-)."
 
 
73
  msgstr ""
74
 
75
  #: includes/admin.php:222
76
+ msgid "<strong>ERROR</strong>: That author slug appears to be invalid. Please try something different."
 
 
77
  msgstr ""
78
 
79
  #: includes/admin.php:231
81
  msgstr ""
82
 
83
  #: includes/admin.php:247
84
+ msgid "<strong>ERROR</strong>: Your iThemes settings prevent your author slug from being the same as your username."
 
 
85
  msgstr ""
86
 
 
87
  #. translators: 1: author slug
88
+ #: includes/admin.php:263
89
+ msgid "<strong>ERROR</strong>: The author slug, %1$s, already exists. Please try something different."
 
90
  msgstr ""
91
 
92
+ #: includes/admin.php:409
93
+ #: includes/admin.php:428
94
  msgid "Edit Author Slug Settings"
95
  msgstr ""
96
 
97
+ #: includes/admin.php:456
98
+ #: includes/admin.php:464
99
  msgid "Author Base"
100
  msgstr ""
101
 
102
+ #: includes/admin.php:478
103
  msgid "Remove Front"
104
  msgstr ""
105
 
106
+ #: includes/admin.php:489
107
  msgid "Role-Based Author Base"
108
  msgstr ""
109
 
110
+ #: includes/admin.php:499
111
  msgid "Role Slugs"
112
  msgstr ""
113
 
114
+ #: includes/admin.php:509
115
  msgid "Automatic Author Slug Creation"
116
  msgstr ""
117
 
118
+ #: includes/admin.php:517
119
  msgid "Automatically Update"
120
  msgstr ""
121
 
122
+ #: includes/admin.php:527
123
+ #: includes/admin.php:558
124
  msgid "Author Slug Structure"
125
  msgstr ""
126
 
127
+ #: includes/admin.php:540
128
  msgid "Bulk Update Author Slugs"
129
  msgstr ""
130
 
131
+ #: includes/admin.php:548
132
  msgid "Bulk Update"
133
  msgstr ""
134
 
135
+ #: includes/admin.php:577
136
  msgid "Change your author base to something more fun!"
137
  msgstr ""
138
 
139
+ #: includes/admin.php:590
140
+ msgid "Allow Author Slugs to be automatically updated, and set the default Author Slug structure for users. Automatic updating will only occur when a user can't edit Author Slugs on their own."
 
 
 
141
  msgstr ""
142
 
143
+ #: includes/admin.php:590
144
+ msgid "This could have SEO repercussions if users update their profiles frequently, and it will override any manual editing of the Author Slug you may have previously completed."
 
 
 
145
  msgstr ""
146
 
147
+ #: includes/admin.php:613
148
  msgid "Defaults to 'author'"
149
  msgstr ""
150
 
151
+ #: includes/admin.php:643
152
  msgid "Remove the \"front\" portion of the author permalink structure."
153
  msgstr ""
154
 
155
+ #: includes/admin.php:659
156
  msgid "Set user's Author Base according to their role."
157
  msgstr ""
158
 
159
+ #. translators: 1: rewrite tag, 2: rewrite tag demo usage, 3: demo URL using rewrite tag
160
+ #: includes/admin.php:665
161
+ msgid "Use the %1$s rewrite tag to customize the role-based author base. If you set the author base to \"%2$s\", the resulting author structure will be something like \"%3$s\"."
 
 
 
 
162
  msgstr ""
163
 
164
+ #: includes/admin.php:778
165
  msgid "Automatically update Author Slug when a user updates their profile."
166
  msgstr ""
167
 
168
+ #: includes/admin.php:806
169
  msgid "Default author slug options"
170
  msgstr ""
171
 
172
+ #: includes/admin.php:832
173
  msgid "Update all users at once based on the specified Author Slug structure."
174
  msgstr ""
175
 
176
+ #: includes/admin.php:849
177
+ msgid "Update all users according to the below Author Slug setting. This will only be run after clicking \"Save Changes\"."
 
 
178
  msgstr ""
179
 
180
+ #: includes/admin.php:877
181
  msgid "Default bulk update author slug options"
182
  msgstr ""
183
 
184
+ #: includes/admin.php:914
185
  msgid "Settings"
186
  msgstr ""
187
 
188
+ #: includes/admin.php:941
189
+ #: tests/test-admin.php:1112
190
  msgid "username (Default)"
191
  msgstr ""
192
 
193
+ #: includes/admin.php:942
194
+ #: tests/test-admin.php:1113
195
  msgid "nickname"
196
  msgstr ""
197
 
198
+ #: includes/admin.php:943
199
+ #: tests/test-admin.php:1114
200
  msgid "displayname"
201
  msgstr ""
202
 
203
+ #: includes/admin.php:944
204
+ #: tests/test-admin.php:1115
205
  msgid "firstname"
206
  msgstr ""
207
 
208
+ #: includes/admin.php:945
209
+ #: tests/test-admin.php:1116
210
  msgid "lastname"
211
  msgstr ""
212
 
213
+ #: includes/admin.php:946
214
+ #: tests/test-admin.php:1117
215
  msgid "firstname-lastname"
216
  msgstr ""
217
 
218
+ #: includes/admin.php:947
219
+ #: tests/test-admin.php:1118
220
  msgid "lastname-firstname"
221
  msgstr ""
222
 
223
+ #: includes/admin.php:948
224
+ #: tests/test-admin.php:1119
225
  msgid "userid"
226
  msgstr ""
227
 
228
+ #: includes/admin.php:949
229
+ #: tests/test-admin.php:1120
230
  msgid "hash"
231
  msgstr ""
232
 
238
  msgid "Use class constant, BA_Edit_Author_Slug::DB_VERSION, instead."
239
  msgstr ""
240
 
 
241
  #. translators: Updated author slugs count.
242
+ #: includes/functions.php:259
243
  msgid "%d user author slug updated."
244
  msgid_plural "%d user author slugs updated."
245
  msgstr[0] ""
246
  msgstr[1] ""
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,136 +1,146 @@
1
- === Edit Author Slug ===
2
- Contributors: thebrandonallen
3
- Tags: author, author base, author slug, user nicename, nicename, permalink, permalinks, slug, users, user, role, roles
4
- Requires at least: 4.9
5
- Tested up to: 5.4.1
6
- Requires PHP: 5.6.20
7
- Stable tag: 1.7.0
8
- License: GPLv2 or later
9
- License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
-
11
- Allows an admin (or capable user) to edit the author slug of a user, and change the author base.
12
-
13
- == Description ==
14
-
15
- This plugin allows full control of your user permalinks, allowing you to change both the author base (the '/author/' portion of the author URLs), and the author slug (defaults to the username of the author). You can set the author base globally, or you can set it to be user-specific based on a user's role. You now have the power to craft the perfect URL structure for you Author pages.
16
-
17
- WordPress default structure *http://example.com/author/username/*.
18
-
19
- Edit Author Slug allows for *http://example.com/ninja/master-ninja/*.
20
-
21
- Using a role-based author base would allow for *http://example.com/ida/master-splinter/* (for an Administrator Role), or *http://example.com/koga/leonardo/* (for a Subscriber Role).
22
-
23
- Development of this plugin takes place on [GitHub](https://github.com/thebrandonallen/edit-author-slug/ "Edit Author Slug on Github"). Pull requests are always welcome!
24
-
25
- Translations should be submitted to [Translate WordPress](https://translate.wordpress.org/projects/wp-plugins/edit-author-slug).
26
-
27
- == Installation ==
28
-
29
- 1. Upload `edit-author-slug` folder to your WordPress plugins directory (typically 'wp-content/plugins')
30
- 2. Activate the plugin through the 'Plugins' menu in WordPress
31
- 3. Go to Users > Your Profile, or Users > All Users > (username), and edit the author slug.
32
- 4. Click "Update Profile" or "Update User"
33
- 5. Go to Settings > Edit Author Slug to edit settings
34
- 6. Click "Save Changes"
35
-
36
- == Screenshots ==
37
-
38
- 1. Settings
39
- 2. Individual user author slug
40
-
41
- == Frequently Asked Questions ==
42
-
43
- = What is an author slug? =
44
-
45
- On standard WordPress installs, it's the final part of an author permalink.
46
- e.g. - https://example.com/author/author-slug/
47
-
48
- In relation to WordPress internals, the author slug is the same as the `user_nicename` field found in a `WP_User` object, or the users table in the database.
49
-
50
- = Will my changes persist if I deactivate or delete the Edit Author Slug plugin? =
51
-
52
- It depends.
53
-
54
- Changing a user's author slug is permanent, as this changes the user's `user_nicename` field in the database.
55
-
56
- If you've changed the author base, deactivating or deleting the plugin will revert your author base back to `author`.
57
-
58
- = Why can't I edit my Author Slug? =
59
-
60
- Make sure you are an admin, or have been assigned the `edit_users` capability.
61
-
62
- = Why isn't my new Author Slug working? =
63
-
64
- While I've made every attempt to prevent this, I may have missed a spot or two. First things first, go to Settings > Permalinks and click "Save Changes." You don't need to actually need to make any changes for this to work. Hopefully, this should kick your new Author Slug into gear.
65
-
66
- If this doesn't work, make sure you don't have any slug conflicts from other posts/pages/plugins/permalink setting/etc. If you're still experiencing the issue, feel free to post a support request in the forums.
67
-
68
- == Changelog ==
69
-
70
- = 1.7.0 =
71
- * Release date: 2020-06-07
72
- * Bumps the minimum required version to WordPress 4.9.
73
- * Bumps "Tested up to" version to 5.4.1
74
- * Fixes an error that may occur with some install of iThemes Security
75
-
76
- = 1.6.1 =
77
- * Release date: 2019-09-05
78
- * Removes pre-WP 4.5 cache busting. The minimum version has been 4.7 for quite some time, and, as of WP 4.5, the cache busting was redundant.
79
- * Don't show the options page if `ba_eas_can_edit_author_slug()` returns `false`.
80
- * Bumps "Tested up to" version to 5.2.3
81
-
82
- = 1.6.0 =
83
- * Release date: 2018-10-11
84
- * Minimum required WordPress version is now 4.7
85
- * Settings page JS no longer depends on jQuery (switched to plain js)
86
- * Add compatibility for iThemes Force Unique Nickname WordPress Tweak
87
- * Add a hash string as an author slug option
88
- * Minimum PHP version has been bumped to 5.3. This is a soft bump, meaning, the plugin should still run on PHP 5.2. However, PHP 5.2 is no longer, officially, supported.
89
-
90
- = 1.5.2 =
91
- * Release date: 2017-06-21
92
- * Fixed a regression where those using the default author based couldn't remove front unless they were also using role-based author bases. Props @thatherton.
93
-
94
- = 1.5.1 =
95
- * Release date: 2017-06-02
96
- * Fix PHP notice when manually updating a user profile. Props @mydigitalsauce.
97
-
98
- = 1.5.0 =
99
- * Release date: 2017-05-30
100
- * Bumped minimum required WordPress version to 4.4.
101
- * Refactored bulk upgrading again. The original fix made things better, but not as good as it could be. This new refactoring drastically improves performance and memory usage.
102
- * This release is primarily an under-the-hood release with a number of optimizations and performance improvements.
103
-
104
- = 1.4.1 =
105
- * Release date: 2017-04-24
106
- * Fix failing string replacement in bulk update message.
107
-
108
- = 1.4.0 =
109
- * Release date: 2017-04-04
110
- * Lots of code cleanup to better adhere to WordPress Coding Standards.
111
- * Improved performance of `ba_eas_sanitize_author_base()` by preventing unnecessary processing.
112
- * Fixed an issue where the demo author permalink URL could have a double slash.
113
- * Improvements to bulk update for sites with a large user base.
114
-
115
- = 1.3.0 =
116
- * Release date: 2017-01-25
117
- * Fix a potential bug where a sanitized author base could end up with double forward slashes.
118
- * Introduce the `%ba_eas_author_role%` permalink structure tag. This can be used to customize role-based author bases.
119
- * Bonus: All alternative facts are now free!
120
-
121
- = 1.2.1 =
122
- * Release date: 2016-02-29
123
- * Fixed stupid error where the default user nicename wasn't being properly retrieved from the database. Sorry about that :(
124
- * Unfortunately, some unicorns were lost during the development of this release, but they are a resilient creature.
125
-
126
- = 1.2.0 =
127
- * Release date: 2016-02-01
128
- * Added the ability to use forward slashes in the author base.
129
- * Improved display on the settings page, and storing, of role slugs.
130
- * Packaged translations are now removed. Anyone interested in translating the plugin should do so at [Translate WordPress](https://translate.wordpress.org/projects/wp-plugins/edit-author-slug).
131
- * EXPERIMENTAL: Added the ability to set the author slug to a user's numeric user id. While I have tested this, I can't be sure that no one's site will implode. If all goes well, the experimental tag will be removed in the next major release (or two).
132
- * Added ability to remove the front portion of author links.
133
- * Accessibility improvements to the settings page.
134
-
135
- = Full Changelog =
136
- * https://github.com/thebrandonallen/edit-author-slug/blob/master/CHANGELOG.md
 
 
 
 
 
 
 
 
 
 
1
+ === Edit Author Slug ===
2
+ Contributors: thebrandonallen
3
+ Tags: author, author base, author slug, user nicename, nicename, permalink, permalinks, slug, users, user, role, roles
4
+ Requires at least: 4.9
5
+ Tested up to: 5.6
6
+ Requires PHP: 5.6.20
7
+ Stable tag: 1.8.1
8
+ License: GPLv2 or later
9
+ License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
+
11
+ Allows an admin (or capable user) to edit the author slug of a user, and change the author base.
12
+
13
+ == Description ==
14
+
15
+ This plugin allows full control of your user permalinks, allowing you to change both the author base (the '/author/' portion of the author URLs), and the author slug (defaults to the username of the author). You can set the author base globally, or you can set it to be user-specific based on a user's role. You now have the power to craft the perfect URL structure for you Author pages.
16
+
17
+ WordPress default structure *http://example.com/author/username/*.
18
+
19
+ Edit Author Slug allows for *http://example.com/ninja/master-ninja/*.
20
+
21
+ Using a role-based author base would allow for *http://example.com/ida/master-splinter/* (for an Administrator Role), or *http://example.com/koga/leonardo/* (for a Subscriber Role).
22
+
23
+ Development of this plugin takes place on [GitHub](https://github.com/thebrandonallen/edit-author-slug/ "Edit Author Slug on Github"). Pull requests are always welcome!
24
+
25
+ Translations should be submitted to [Translate WordPress](https://translate.wordpress.org/projects/wp-plugins/edit-author-slug).
26
+
27
+ == Installation ==
28
+
29
+ 1. Upload `edit-author-slug` folder to your WordPress plugins directory (typically 'wp-content/plugins')
30
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
31
+ 3. Go to Users > Your Profile, or Users > All Users > (username), and edit the author slug.
32
+ 4. Click "Update Profile" or "Update User"
33
+ 5. Go to Settings > Edit Author Slug to edit settings
34
+ 6. Click "Save Changes"
35
+
36
+ == Screenshots ==
37
+
38
+ 1. Settings
39
+ 2. Individual user author slug
40
+
41
+ == Frequently Asked Questions ==
42
+
43
+ = What is an author slug? =
44
+
45
+ On standard WordPress installs, it's the final part of an author permalink.
46
+ e.g. - https://example.com/author/author-slug/
47
+
48
+ In relation to WordPress internals, the author slug is the same as the `user_nicename` field found in a `WP_User` object, or the users table in the database.
49
+
50
+ = Will my changes persist if I deactivate or delete the Edit Author Slug plugin? =
51
+
52
+ It depends.
53
+
54
+ Changing a user's author slug is permanent, as this changes the user's `user_nicename` field in the database.
55
+
56
+ If you've changed the author base, deactivating or deleting the plugin will revert your author base back to `author`.
57
+
58
+ = Why can't I edit my Author Slug? =
59
+
60
+ Make sure you are an admin, or have been assigned the `edit_users` capability.
61
+
62
+ = Why isn't my new Author Slug working? =
63
+
64
+ While I've made every attempt to prevent this, I may have missed a spot or two. First things first, go to Settings > Permalinks and click "Save Changes." You don't need to actually need to make any changes for this to work. Hopefully, this should kick your new Author Slug into gear.
65
+
66
+ If this doesn't work, make sure you don't have any slug conflicts from other posts/pages/plugins/permalink setting/etc. If you're still experiencing the issue, feel free to post a support request in the forums.
67
+
68
+ == Changelog ==
69
+
70
+ = 1.8.1 =
71
+ * Release date: 2020-12-14
72
+ * Corrects settings page notice link to actually link to the current user's profile page.
73
+
74
+ = 1.8.0 =
75
+ * Release date: 2020-12-14
76
+ * Bumps "Tested up to" version to 5.6
77
+ * Adds a notice to the settings page reminding you that you can edit your author slug on your profile page.
78
+ * Drops support for IE 10 on the settings page.
79
+
80
+ = 1.7.0 =
81
+ * Release date: 2020-06-07
82
+ * Bumps the minimum required version to WordPress 4.9.
83
+ * Bumps "Tested up to" version to 5.4.1
84
+ * Fixes an error that may occur with some install of iThemes Security
85
+
86
+ = 1.6.1 =
87
+ * Release date: 2019-09-05
88
+ * Removes pre-WP 4.5 cache busting. The minimum version has been 4.7 for quite some time, and, as of WP 4.5, the cache busting was redundant.
89
+ * Don't show the options page if `ba_eas_can_edit_author_slug()` returns `false`.
90
+ * Bumps "Tested up to" version to 5.2.3
91
+
92
+ = 1.6.0 =
93
+ * Release date: 2018-10-11
94
+ * Minimum required WordPress version is now 4.7
95
+ * Settings page JS no longer depends on jQuery (switched to plain js)
96
+ * Add compatibility for iThemes Force Unique Nickname WordPress Tweak
97
+ * Add a hash string as an author slug option
98
+ * Minimum PHP version has been bumped to 5.3. This is a soft bump, meaning, the plugin should still run on PHP 5.2. However, PHP 5.2 is no longer, officially, supported.
99
+
100
+ = 1.5.2 =
101
+ * Release date: 2017-06-21
102
+ * Fixed a regression where those using the default author based couldn't remove front unless they were also using role-based author bases. Props @thatherton.
103
+
104
+ = 1.5.1 =
105
+ * Release date: 2017-06-02
106
+ * Fix PHP notice when manually updating a user profile. Props @mydigitalsauce.
107
+
108
+ = 1.5.0 =
109
+ * Release date: 2017-05-30
110
+ * Bumped minimum required WordPress version to 4.4.
111
+ * Refactored bulk upgrading again. The original fix made things better, but not as good as it could be. This new refactoring drastically improves performance and memory usage.
112
+ * This release is primarily an under-the-hood release with a number of optimizations and performance improvements.
113
+
114
+ = 1.4.1 =
115
+ * Release date: 2017-04-24
116
+ * Fix failing string replacement in bulk update message.
117
+
118
+ = 1.4.0 =
119
+ * Release date: 2017-04-04
120
+ * Lots of code cleanup to better adhere to WordPress Coding Standards.
121
+ * Improved performance of `ba_eas_sanitize_author_base()` by preventing unnecessary processing.
122
+ * Fixed an issue where the demo author permalink URL could have a double slash.
123
+ * Improvements to bulk update for sites with a large user base.
124
+
125
+ = 1.3.0 =
126
+ * Release date: 2017-01-25
127
+ * Fix a potential bug where a sanitized author base could end up with double forward slashes.
128
+ * Introduce the `%ba_eas_author_role%` permalink structure tag. This can be used to customize role-based author bases.
129
+ * Bonus: All alternative facts are now free!
130
+
131
+ = 1.2.1 =
132
+ * Release date: 2016-02-29
133
+ * Fixed stupid error where the default user nicename wasn't being properly retrieved from the database. Sorry about that :(
134
+ * Unfortunately, some unicorns were lost during the development of this release, but they are a resilient creature.
135
+
136
+ = 1.2.0 =
137
+ * Release date: 2016-02-01
138
+ * Added the ability to use forward slashes in the author base.
139
+ * Improved display on the settings page, and storing, of role slugs.
140
+ * Packaged translations are now removed. Anyone interested in translating the plugin should do so at [Translate WordPress](https://translate.wordpress.org/projects/wp-plugins/edit-author-slug).
141
+ * EXPERIMENTAL: Added the ability to set the author slug to a user's numeric user id. While I have tested this, I can't be sure that no one's site will implode. If all goes well, the experimental tag will be removed in the next major release (or two).
142
+ * Added ability to remove the front portion of author links.
143
+ * Accessibility improvements to the settings page.
144
+
145
+ = Full Changelog =
146
+ * https://github.com/thebrandonallen/edit-author-slug/blob/master/CHANGELOG.md