Make WordPress Core

Opened 22 months ago

Last modified 13 months ago

#56362 assigned enhancement

Remove Link/Bookmark API form Core: Phase 2

Reported by: desrosj's profile desrosj Owned by: desrosj's profile desrosj
Milestone: Future Release Priority: normal
Severity: normal Version: 2.1
Component: General Keywords: needs-patch dev-feedback
Focuses: Cc:

Description

In WordPress 3.5, the Link Manager was disabled in Core by default in new installs, and hidden entirely when no links were present on a site updating (see #21307).

The intention was to return to this later and remove the Bookmark/Links API from Core entirely. However, no one returned to that second phase. This ticket is to explore removing this long hidden API from Core.

Change History (14)

#1 @desrosj
22 months ago

Here is some fact finding and rough back of napkin thoughts in no particular order:

  • It's been 10+ years now since #21307.
  • There are just under 50,000 sites with the Links Manager plugin active.
  • Moving all related code into the plugin and releasing an update seems like an easy way to somewhat seamlessly make these changes, given the site is using the plugin to re-enable the feature (the plugin is currently a 1 line add_filter()).
  • Sites have had 10 years to activate this plugin if they truly want this functionality. It's safe to say the overwhelming majority of sites that want this feature have this plugin active.
  • Only 1 theme and 50 plugins have the pre_option_link_manager_enabled filter. Only 3 have 10k active installs (Link Manager is first with ~50k).
  • Some searches of the plugin directory show that calling the related functions in the wild is not 0, but also not significant (lots of these results are either false positives, or custom implementations):

It seems reasonable to:

  • Move all related functionality into a new release of the Link Manager plugin defensively with the use of (function|class)_exists() checks.
  • Add a notice within the dashboard for users with the activate_plugins capability when the Link API appears to be active and links exist that they should update the plugin.
  • Potentially add _deprecated_function() notices to the related functions when the Link Manager is not active and at the correct version recommending the user installs or updates the plugin.
  • Publish developer notes and an awareness campaign to make folks aware this will happen.
  • Allow 1 full major release to pass before removing all related code from Core.
  • Remove the functions from Core in a following release.

#2 @desrosj
22 months ago

Also, this should be accompanied by a proposal posted to Making WordPress Core, which I intend to draft in the coming weeks.

#3 @johnbillion
22 months ago

  • Milestone changed from Awaiting Review to Future Release

+1 on all the points in your proposal.

#4 @desrosj
21 months ago

  • Milestone changed from Future Release to 6.1
  • Owner set to desrosj
  • Status changed from new to assigned

I'm moving this to 6.1. I'd like to get this done sooner rather than later to avoid what happened previously.

#5 follow-up: @jrf
21 months ago

Sites have had 10 years to activate this plugin if they truly want this functionality. It's safe to say the overwhelming majority of sites that want this feature have this plugin active.

To be honest, it's the first I've ever heard of the plugin and for "old" sites which were using the functionality when the API was deprecated, the option was turned back on automatically, so they never had the need to install the plugin.

I don't remember ever seeing a notice about turning on the plugin in the dashboard either, so I suspect there are a lot more sites out there which still use the API and have no clue that they were expected to turn on a plugin.

As site-owners often skip a number of WP releases when updating, I think only allowing one major with the dashboard notice is cutting things a little too fine.

That is, of course, unless the dashboard notification telling people to turn on the plugin is backported all the way back to WP 3.7.

#6 in reply to: ↑ 5 @desrosj
20 months ago

  • Keywords needs-patch added
  • Milestone changed from 6.1 to 6.2

Replying to jrf:

I don't remember ever seeing a notice about turning on the plugin in the dashboard either, so I suspect there are a lot more sites out there which still use the API and have no clue that they were expected to turn on a plugin.

As site-owners often skip a number of WP releases when updating, I think only allowing one major with the dashboard notice is cutting things a little too fine.

That is, of course, unless the dashboard notification telling people to turn on the plugin is backported all the way back to WP 3.7.

I was thinking of going the opposite way. Instead of backporting the notice, the first major release after moving the necessary code to the plugin would include an admin notice that displays when sites appear to be using the API without the plugin instructing them to install the plugin because the API will be removed in a future release. Paired with __deprecated_function() notices, this would hopefully be enough feedback/heads up.

Totally open to waiting more than 1 release if that's the consensus. But I think the approach I described above could allow for 1 or 2 major releases.

Time is running out on 6.1, though, so I'm going to focus on this next release.

This ticket was mentioned in Slack in #core by costdev. View the logs.


16 months ago

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


16 months ago

#9 @mukesh27
16 months ago

  • Keywords dev-feedback added
  • Version set to 2.1
Version 0, edited 16 months ago by mukesh27 (next)

#10 @desrosj
16 months ago

  • Milestone changed from 6.2 to Future Release

I haven't been able to give this the attention it needs so far this cycle. Going to punt to Future Release until some progress can be made.

#11 @aristath
13 months ago

+1 from me.
WP includes a lot of functionality that hasn't been used in many years, and we should be doing some house cleaning.
We should find a viable strategy to remove code like this... Deprecating functions and adding an admin notice sounds reasonable to me

#12 @jrf
13 months ago

Just a heads-up: I just wanted to try and install the plugin on a site which is still using the Links module, but as the plugin hasn't been updated in 11 (!!!) years, it will not show up when a user searches for it from the WP admin panel.

Of course, I can download the plugin and then install it via an upload or via FTP, but that's besides the point.

What my point really is, is that the plugin hasn't been updated in 11 year.

This raises the following questions:

  1. Will the plugin as-is still work with WP 6.2+ ?
  2. Will the plugin as-is still work with more recent PHP versions ? (think: PHP 5.5 and higher as PHP 5.5 wasn't released yet 11 years ago...)

Additionally, I worry that an official recommendation to install a plugin which hasn't had an update in 11 years, would undermine all efforts which try to teach admins to look critically whether plugins are still maintained etc to prevent security issues.

I believe that at the very least we should make sure the plugin gets a thorough once over for WP and PHP compatibility issues and a new point release, which will allow end-user admins to install the plugin from the comfort of the admin dashboard.

I'd also recommend that the plugin be set up with a repo on GitHub to allow for future maintenance of it in a more accessible way.

#13 @jrf
13 months ago

Ouch.. also just realised that the officially available version is 0.1-beta which also doesn't instill much confidence...

Last edited 13 months ago by jrf (previous) (diff)

#14 @jrf
13 months ago

Never mind... I just realize I overlooked the following line:

the plugin is currently a 1 line add_filter()

In other words, the plugin needs to be build properly before any other action can be taken.

Note: See TracTickets for help on using tickets.