[wp-trac] [WordPress Trac] #56362: Remove Link/Bookmark API form Core: Phase 2

WordPress Trac noreply at wordpress.org
Wed Aug 10 19:18:07 UTC 2022


#56362: Remove Link/Bookmark API form Core: Phase 2
-------------------------+------------------------------
 Reporter:  desrosj      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by desrosj):

 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
 [https://wordpress.org/plugins/link-manager/ 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 [https://wpdirectory.net/search/01GA1WVDJ28N98PPWV68MYMJJ1 1 theme]
 and [https://wpdirectory.net/search/01GA1WT8Z6KWP63H4GEGWGMEZC 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):
  - `get_bookmark()`:
 [https://wpdirectory.net/search/01GA20AKJPPRTV5A2WP35ZRQEC 67 plugins, 107
 matches], 5 over 50k installs.
  - `get_bookmarks()`:
 [https://wpdirectory.net/search/01GA20BRHW33QXF1TJGNVG5PC1 176 plugins,
 402 instances], 4 over 50k installs.
  - Loading `wp-admin/includes/bookmark.php` directly:
 [https://wpdirectory.net/search/01GA207AE82QKHQMYZAS04BNT0 87 plugins, 488
 instances], 2 over 50k installs.

 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56362#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list