Skip to content

Commit 1a4c6ef

Browse files
authored
Make plain permalink notice more actionable (#994)
Adds some context for why the setting needs changing and a link to permalink settings to make it easier to do.
1 parent 6d76880 commit 1a4c6ef

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
* Reuse constants once they're defined
1717
* "FEP-b2b8: Long-form Text" support
18+
* Admin notice for plain permalink settings is more user-friendly and actionable
1819

1920
### Fixed
2021

includes/class-admin.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ public static function admin_menu() {
100100
public static function admin_notices() {
101101
$permalink_structure = \get_option( 'permalink_structure' );
102102
if ( empty( $permalink_structure ) ) {
103-
$admin_notice = \__( 'You are using the ActivityPub plugin with a permalink structure of "plain". This will prevent ActivityPub from working. Please go to "Settings" / "Permalinks" and choose a permalink structure other than "plain".', 'activitypub' );
103+
$admin_notice = sprintf(
104+
/* translators: %s: Permalink settings URL. */
105+
\__( 'ActivityPub needs SEO-friendly URLs to work properly. Please <a href="%s">update your permalink structure</a> to an option other than Plain.', 'activitypub' ),
106+
esc_url( admin_url( 'options-permalink.php' ) )
107+
);
104108
self::show_admin_notice( $admin_notice, 'error' );
105109
}
106110

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ For reasons of data protection, it is not possible to see the followers of other
155155
* Added: Unit tests for the `ActivityPub\Transformer\Post` class
156156
* Improved: Reuse constants once they're defined
157157
* Improved: "FEP-b2b8: Long-form Text" support
158+
* Improved: Admin notice for plain permalink settings is more user-friendly and actionable
158159
* Fixed: Do not display ActivityPub's user sub-menus to users who do not have the capabilities of writing posts.
159160
* Fixed: Proper margins for notices and font size for page title in settings screen.
160161

0 commit comments

Comments
 (0)