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
This commit is contained in:
Ryan Boren 2009-01-22 22:47:34 +00:00
parent 66ce91f31f
commit 181d28cd9a
1 changed files with 7 additions and 2 deletions

View File

@ -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;