If link name not given, use url for name. Props Denis-de-Bernardy. fixes #7789 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@10414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
48f9d53e41
commit
576f4098d4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue