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:
parent
66ce91f31f
commit
181d28cd9a
@ -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…
x
Reference in New Issue
Block a user