summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/related-posts/related-posts.js')
-rw-r--r--plugins/jetpack/modules/related-posts/related-posts.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/jetpack/modules/related-posts/related-posts.js b/plugins/jetpack/modules/related-posts/related-posts.js
index f8fa781b..76f7d33d 100644
--- a/plugins/jetpack/modules/related-posts/related-posts.js
+++ b/plugins/jetpack/modules/related-posts/related-posts.js
@@ -1,4 +1,3 @@
-/* jshint onevar: false */
/* globals related_posts_js_options */
/**
@@ -69,11 +68,16 @@
class: classNames,
href: post.url,
title: anchor_title,
- rel: post.rel,
'data-origin': post.url_meta.origin,
'data-position': post.url_meta.position,
} );
+ if ( '' !== post.rel ) {
+ anchor.attr( {
+ rel: post.rel,
+ } );
+ }
+
var anchor_html = $( '<div>' )
.append( anchor )
.html();