Skip to content

Commit 474a396

Browse files
Docs: Correct return type for add_link(), edit_link(), and wp_update_link().
Follow-up to [8758], [15564]. Props marian1. Fixes #64764. git-svn-id: https://develop.svn.wordpress.org/trunk@62024 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 159ca2d commit 474a396

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wp-admin/includes/bookmark.php

Lines changed: 4 additions & 4 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 The link ID on success. The value 0 on failure.
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 The link ID on success. The value 0 on failure.
2727
*/
2828
function edit_link( $link_id = 0 ) {
2929
if ( ! current_user_can( 'manage_links' ) ) {
@@ -169,7 +169,7 @@ function get_link_to_edit( $link ) {
169169
* If empty, uses default link category.
170170
* }
171171
* @param bool $wp_error Optional. Whether to return a WP_Error object on failure. Default false.
172-
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
172+
* @return int|WP_Error The link ID on success. The value 0 or WP_Error on failure.
173173
*/
174174
function wp_insert_link( $linkdata, $wp_error = false ) {
175175
global $wpdb;
@@ -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 The updated link ID on success. The value 0 on failure.
299299
*/
300300
function wp_update_link( $linkdata ) {
301301
$link_id = (int) $linkdata['link_id'];

0 commit comments

Comments
 (0)