Skip to content

Commit

Permalink
ADD: star rating widget. [1]
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-nginx authored May 31, 2017
1 parent 3ecd980 commit cdd36b6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions layout/_third-party/rating.swig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% if theme.rating.enable and (not is_home() and is_post()) %}
<script type="text/javascript">
wpac_init = window.wpac_init || [];
wpac_init.push({widget: 'Rating', id: {{ theme.rating.id }},
el: 'wpac-rating',
color: '{{ theme.rating.color }}'
});
(function() {
if ('WIDGETPACK_LOADED' in window) return;
WIDGETPACK_LOADED = true;
var mc = document.createElement('script');
mc.type = 'text/javascript';
mc.async = true;
mc.src = '//embed.widgetpack.com/widget.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
})();
</script>
{% endif %}

0 comments on commit cdd36b6

Please sign in to comment.