Fix URL field 'nofollow' issue

This commit is contained in:
Champ Camba
2017-02-02 20:41:52 +08:00
parent 469f1941c8
commit ab77c5801a
+1 -1
View File
@@ -199,7 +199,7 @@
if ( ( isset( $data['validate'] ) && $data['validate'] != '' && strstr( $data['validate'], 'url' ) ) || ( isset( $data['type'] ) && $data['type'] == 'url' ) ) {
$alt = ( isset( $data['url_text'] ) && !empty( $data['url_text'] ) ) ? $data['url_text'] : $value;
$url_rel = ( isset( $data['url_rel'] ) ) ? 'rel="nofollow"' : '';
$url_rel = ( isset( $data['url_rel'] ) && $data['url_rel'] == 'nofollow' ) ? 'rel="nofollow"' : '';
if( !strstr( $value, 'http' )
&& !strstr( $value, '://' )
&& !strstr( $value, 'www.' )