Skip to content

Commit 8bfdfb5

Browse files
committed
Fix documented return type for add_link(), edit_link(), wp_update_link()
1 parent 105c7aa commit 8bfdfb5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/wp-admin/includes/bookmark.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* @since 2.0.0
1313
*
14-
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
14+
* @return int 0 on failure. The link ID on success.
1515
*/
1616
function add_link() {
1717
return edit_link();
@@ -23,7 +23,7 @@ function add_link() {
2323
* @since 2.0.0
2424
*
2525
* @param int $link_id Optional. ID of the link to edit. Default 0.
26-
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
26+
* @return int 0 on failure. The link ID on success.
2727
*/
2828
function edit_link( $link_id = 0 ) {
2929
if ( ! current_user_can( 'manage_links' ) ) {
@@ -295,7 +295,7 @@ function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
295295
* @since 2.0.0
296296
*
297297
* @param array $linkdata Link data to update. See wp_insert_link() for accepted arguments.
298-
* @return int|WP_Error Value 0 or WP_Error on failure. The updated link ID on success.
298+
* @return int 0 on failure. The updated link ID on success.
299299
*/
300300
function wp_update_link( $linkdata ) {
301301
$link_id = (int) $linkdata['link_id'];

0 commit comments

Comments
 (0)