Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#52669 new enhancement

Amend plugin link for Link Manager error.

Reported by: tw2113 Owned by:
Milestone: 5.8 Priority: normal
Severity: trivial Version:
Component: General Keywords: has-patch
Focuses: Cc:


Right now, if a user tries to visit the legacy link management pages, they are instructed to install the "Link Manager" plugin which re-enables the pages.

However, the link provided to install the plugin just points to a search by keyword for "Link Manager", which at present time returns 2,153 results to sift through to hopefully find the intended https://wordpress.org/plugins/link-manager/

Let's help the user out by providing direct links to install the plugin, if able to, and then if they re-visit the same page without having activated yet, provide a link to activate it too.

Attached is a patch that checks the current status of "Link Manager" plugin, and amends the messaging link URLs to either install or activate the plugin.

Attachments (3)

52669.diff (1.8 KB) - added by tw2113 6 weeks ago.
52669.2.diff (1.8 KB) - added by tw2113 6 weeks ago.
52669.3.diff (1.9 KB) - added by tw2113 6 weeks ago.

Download all attachments as: .zip

Change History (10)

6 weeks ago

#1 @SergeyBiryukov
6 weeks ago

  • Milestone changed from Awaiting Review to 5.8

#2 @peterwilsoncc
6 weeks ago

Thanks for the patch, a couple of minor notes:

  • short array syntax in the plugins_api(), Core uses the long array syntax
  • If the plugin is installed, I don't think there needs to be a check for the latest version before activating: site admins can handle that as part of their regular update routine
  • I may be wrong about the above ;) -- if that's the case and the plugin needs updating a "please update" if condition will be needed. As is, an out of date plugin shows the message 'Sorry, you are not allowed to edit the links for this site.'

This is so much nicer than the current search link. Thanks boss.

#3 @tw2113
6 weeks ago

Will fix up the array syntax soon.

I will also look things over and see how to only do some parts if the plugin is installed already.

6 weeks ago

#4 @tw2113
6 weeks ago

Removed the latest version check because in brief hindsight, it was needless. We just need to activate once we get to that point.

Short array syntax removed.

#5 @SergeyBiryukov
6 weeks ago

Thanks for the patch!

Just noting that we'd probably want for the approach here to be consistent with the checks for Classic Editor plugin in do_block_editor_incompatible_meta_box().

#6 @tw2113
6 weeks ago

Thanks @SergeyBiryukov

I will check that section out and further amend to fit. Stay tuned.

6 weeks ago

#7 @tw2113
6 weeks ago

Amended to better match how Classic Editor does its own checks, as opposed to pinging WordPress.org for a status check.

Note: See TracTickets for help on using tickets.