Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#36120 new enhancement

Move wp_*_link() functions into wp-includes

Reported by: jpry's profile JPry Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch dev-feedback
Focuses: Cc:

Description

The following link functions live in wp-admin/includes/bookmark.php:

  • wp_insert_link()
  • wp_delete_link()
  • wp_update_link()

I would like to propose that these three functions be moved into wp-includes/bookmark.php so that they are available on any request, and not just requests inside wp-admin.

It would also be necessary to move the wp_set_link_cats() so that it is available inside the wp_insert_link() function.

Other similar functions live in wp-includes already, such as wp_insert_post(), wp_insert_commet(), etc. This change would allow links to work in the same way as those other content types.

Attachments (1)

36120.patch (12.5 KB) - added by JPry 8 years ago.
Initial patch

Download all attachments as: .zip

Change History (6)

@JPry
8 years ago

Initial patch

#1 @JPry
8 years ago

  • Keywords has-patch added

#2 follow-up: @swissspidy
8 years ago

  • Keywords dev-feedback added

The link manager has been disabled by default since 3.5. I don't think we should further encourage its usage by moving these functions around.

#3 in reply to: ↑ 2 ; follow-up: @JPry
8 years ago

Replying to swissspidy:

The link manager has been disabled by default since 3.5. I don't think we should further encourage its usage by moving these functions around.

That is certainly true, but there still seems to be a good number of people using the Link Manager. According to the Link Manager Plugin page, there are 100,000+ installs using that plugin to enable the Link Manager.

#4 in reply to: ↑ 3 @dd32
8 years ago

Replying to swissspidy:

The link manager has been disabled by default since 3.5. I don't think we should further encourage its usage by moving these functions around.

I agree with this.

Replying to JPry:

That is certainly true, but there still seems to be a good number of people using the Link Manager. According to the Link Manager Plugin page, there are 100,000+ installs using that plugin to enable the Link Manager.

The original intention was to move more functionality from core into that plugin long-term, although that's not yet happened.

#5 @chriscct7
8 years ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.