dont add dupes to widgetLocations

this prevents widgets from being executed multiple times
v1.18.x
barisusakli 11 years ago
parent d61e632c59
commit 34b73e15e6

@ -18,7 +18,10 @@
var widgetLocations = ['sidebar', 'footer'], numLocations;
$('#content [widget-area]').each(function() {
widgetLocations.push($(this).attr('widget-area'));
var location = $(this).attr('widget-area');
if ($.inArray(location, widgetLocations) === -1) {
widgetLocations.push(location);
}
});
numLocations = widgetLocations.length;

Loading…
Cancel
Save