Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#54880 closed defect (bug) (fixed)

Docblock for wp_insert_link is inaccurate or function is missing functionality

Reported by: dshanske's profile dshanske Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.0 Priority: low
Severity: trivial Version: 3.5
Component: General Keywords: good-first-bug has-patch
Focuses: Cc:

Description

Aware that the function is not actively maintained, but it references that link_updated can be set using the function.

The function adds 'link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_rel', 'link_notes', and 'link_rss' to the database.

That misses link_updated, which the function says it provides.

There are two paths to resolution. We can note it in documentation or just simply fix it. Either seem to be a valid path.

Change History (4)

#1 @SergeyBiryukov
2 years ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to 6.0

Hi there, thanks for the ticket!

The documentation was added in [49487] / #50853.

Looks like the link_updated field is unused since [13744] / #12437, so I think we can remove it from the documentation. It was never updated via wp_insert_link() anyway, only via the wp-admin/update-links.php file removed in [13744].

This ticket was mentioned in PR #2213 on WordPress/wordpress-develop by iamdharmesh.


2 years ago
#2

  • Keywords has-patch added; needs-patch removed

Removed documentation for link_updated field from Docblock of wp_insert_link()

Trac ticket: https://core.trac.wordpress.org/ticket/54880

#3 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 52659:

General: Remove inaccurate reference to the link_updated field from the wp_insert_link() DocBlock.

The link_updated field is unused as of WordPress 3.0 and was never updated via wp_insert_link(), only via the wp-admin/update-links.php file removed in [13744].

Follow-up to [13744], [49487].

Props dshanske, dharm1025, SergeyBiryukov.
Fixes #54880.

Note: See TracTickets for help on using tickets.