Commit 81f78611 authored by Jim Tittsler's avatar Jim Tittsler
Browse files

Add support for WEnotesPost shortcode

parent e30289ab
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -392,6 +392,14 @@ ${idbody}
          count = $(this).data('count');
      $(this).replaceWith(`[WEnotes tag="${tag}" count="${count}"]`);
    });
    $('.WEnotesPost').each(function() {
      var tag = $.trim($(this).data('tag')),
          button = $.trim($(this).data('button')),
          buttonAttr = (button) ? ` button="${button}"` : '',
          leftmargin = $.trim($(this).data('leftmargin')),
          leftmarginAttr = (leftmargin) ? ` leftmargin="${leftmargin}"` : '';
      $(this).replaceWith(`[WEnotesPost tag="${tag}"${buttonAttr}${leftmarginAttr}]`);
    });
  }
};