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

Add support for WEnotesPost shortcode

parent e30289ab
......@@ -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}]`);
});
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment