Skip to content

Commit

Permalink
Backwards compatibility n better integration in WP3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mauryaratan committed Dec 16, 2013
1 parent c713744 commit 9ed1a2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion assets/js/stag-custom-sidebars.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ class StagCustomSidebars
@widget_area.find('.sidebar-stag-custom').each ->
where_to_add = $(this).find('.widgets-sortables')
id = where_to_add.attr('id').replace('sidebar-', '')
where_to_add.append("<div class='sidebar-description'><p class='description'>#{objectL10n.shortcode}: <code>[stag_sidebar id='#{id}']</code></p></div>");
if where_to_add.find('.sidebar-description').length > 0
where_to_add.find(".sidebar-description").append("<p class='description'>#{objectL10n.shortcode}: <code>[stag_sidebar id='#{id}']</code></p>");
else
where_to_add.append("<div class='sidebar-description'><p class='description'>#{objectL10n.shortcode}: <code>[stag_sidebar id='#{id}']</code></p></div>");
return
return

Expand Down
2 changes: 1 addition & 1 deletion assets/js/stag-custom-sidebars.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9ed1a2b

Please sign in to comment.