From 181d28cd9abef6f97ebc59da8d9f1e9b4d622892 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 22 Jan 2009 22:47:34 +0000 Subject: [PATCH] If link name not given, use url for name. Props Denis-de-Bernardy. fixes #7789 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@10414 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/bookmark.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php index 88bd03035c..a0077a10b0 100644 --- a/wp-admin/includes/bookmark.php +++ b/wp-admin/includes/bookmark.php @@ -142,8 +142,13 @@ function wp_insert_link( $linkdata, $wp_error = false ) { if ( !empty( $link_id ) ) $update = true; - if ( trim( $link_name ) == '' ) - return 0; + if ( trim( $link_name ) == '' ) { + if ( trim( $link_url ) != '' ) { + $link_name = $link_url; + } else { + return 0; + } + } if ( trim( $link_url ) == '' ) return 0;