Skip to content

Commit

Permalink
Make plain permalink notice more actionable (#994)
Browse files Browse the repository at this point in the history
Adds some context for why the setting needs changing and a link to permalink settings to make it easier to do.
  • Loading branch information
obenland authored Nov 15, 2024
1 parent 6d76880 commit 1a4c6ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

### Fixed

Expand Down
6 changes: 5 additions & 1 deletion includes/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ public static function admin_menu() {
public static function admin_notices() {
$permalink_structure = \get_option( 'permalink_structure' );
if ( empty( $permalink_structure ) ) {
$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' );
$admin_notice = sprintf(
/* translators: %s: Permalink settings URL. */
\__( 'ActivityPub needs SEO-friendly URLs to work properly. Please <a href="%s">update your permalink structure</a> to an option other than Plain.', 'activitypub' ),
esc_url( admin_url( 'options-permalink.php' ) )
);
self::show_admin_notice( $admin_notice, 'error' );
}

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

Expand Down

0 comments on commit 1a4c6ef

Please sign in to comment.