customize-widgets.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. window._wpCustomizeWidgetsSettings = {
  2. 'nonce': '12cc9d3284',
  3. 'registeredSidebars': [{
  4. 'name': 'Widget Area',
  5. 'id': 'sidebar-1',
  6. 'description': 'Add widgets here to appear in your sidebar.',
  7. 'class': '',
  8. 'before_widget': '<aside id="%1$s" class="widget %2$s">',
  9. 'after_widget': '</aside>',
  10. 'before_title': '<h2 class="widget-title">',
  11. 'after_title': '</h2>'
  12. }],
  13. 'registeredWidgets': {
  14. 'search-2': {
  15. 'name': 'Search',
  16. 'id': 'search-2',
  17. 'params': [
  18. {
  19. 'number': 2
  20. }
  21. ],
  22. 'classname': 'widget_search',
  23. 'description': 'A search form for your site.'
  24. }
  25. },
  26. 'availableWidgets': [
  27. {
  28. 'name': 'Search',
  29. 'id': 'search-2',
  30. 'params': [
  31. {
  32. 'number': 2
  33. }
  34. ],
  35. 'classname': 'widget_search',
  36. 'description': 'A search form for your site.',
  37. 'temp_id': 'search-__i__',
  38. 'is_multi': true,
  39. 'multi_number': 3,
  40. 'is_disabled': false,
  41. 'id_base': 'search',
  42. 'transport': 'refresh',
  43. 'width': 250,
  44. 'height': 200,
  45. 'is_wide': false
  46. }
  47. ],
  48. 'l10n': {
  49. 'error': 'An error has occurred. Please reload the page and try again.',
  50. 'navigatePreview': 'You can navigate to other pages on your site while using the Customizer to view and edit the widgets displayed on those pages.',
  51. 'noAreasShown': 'Your theme has 3 widget areas, but this particular page doesn\u2019t display them.',
  52. 'noWidgetsFound': 'No widgets found.',
  53. 'removeBtnLabel': 'Remove',
  54. 'removeBtnTooltip': 'Trash widget by moving it to the inactive widgets sidebar.',
  55. 'reorderLabelOn': 'Reorder widgets',
  56. 'reorderModeOff': 'Reorder mode closed',
  57. 'reorderModeOn': 'Reorder mode enabled',
  58. 'saveBtnLabel': 'Apply',
  59. 'saveBtnTooltip': 'Save and preview changes before publishing them.',
  60. 'someAreasShown': {
  61. '1': 'Your theme has 1 other widget area, but this particular page doesn\u2019t display it.',
  62. '2': 'Your theme has 2 other widget areas, but this particular page doesn\u2019t display them.'
  63. },
  64. 'widgetMovedDown': 'Widget moved down',
  65. 'widgetMovedUp': 'Widget moved up',
  66. 'widgetsFound': 'Number of widgets found: %d'
  67. },
  68. 'tpl': {
  69. 'widgetReorderNav': '<div class="widget-reorder-nav"><span class="move-widget" tabindex="0">Move to another area&hellip;</span><span class="move-widget-down" tabindex="0">Move down</span><span class="move-widget-up" tabindex="0">Move up</span></div>',
  70. 'moveWidgetArea': '<div class="move-widget-area"> <p class="description">Select an area to move this widget into:</p> <ul class="widget-area-select"> <% _.each( sidebars, function ( sidebar ){ %> <li class="" data-id="<%- sidebar.id %>" title="<%- sidebar.description %>" tabindex="0"><%- sidebar.name %></li> <% }); %> </ul> <div class="move-widget-actions"> <button class="move-widget-btn button" type="button">Move</button> </div> </div>'
  71. }
  72. };
  73. window._wpCustomizeSettings.panels.widgets = {
  74. 'id': 'widgets',
  75. 'description': 'Widgets are independent sections of content that can be placed into widgetized areas provided by your theme (commonly called sidebars).',
  76. 'priority': 110,
  77. 'type': 'widgets',
  78. 'title': 'Widgets',
  79. 'content': '',
  80. 'active': true,
  81. 'instanceNumber': 1
  82. };
  83. window._wpCustomizeSettings.sections['sidebar-widgets-sidebar-1'] = {
  84. 'id': 'sidebar-widgets-sidebar-1',
  85. 'description': 'Add widgets here to appear in your sidebar.',
  86. 'priority': 0,
  87. 'panel': 'widgets',
  88. 'type': 'sidebar',
  89. 'title': 'Widget Area',
  90. 'content': '',
  91. 'active': false,
  92. 'instanceNumber': 1,
  93. 'customizeAction': 'Customizing &#9656; Widgets',
  94. 'sidebarId': 'sidebar-1'
  95. };
  96. window._wpCustomizeSettings.settings['widget_search[2]'] = {
  97. 'value': {
  98. 'encoded_serialized_instance': 'YToxOntzOjU6InRpdGxlIjtzOjY6IkJ1c2NhciI7fQ==',
  99. 'title': 'Buscar',
  100. 'is_widget_customizer_js_value': true,
  101. 'instance_hash_key': '45f0a7f15e50bd3be86b141e2a8b3aaf'
  102. },
  103. 'transport': 'refresh',
  104. 'dirty': false
  105. };
  106. window._wpCustomizeSettings.settings['sidebars_widgets[sidebar-1]'] = {
  107. 'value': [ 'search-2' ],
  108. 'transport': 'refresh',
  109. 'dirty': false
  110. };
  111. window._wpCustomizeSettings.controls['widget_search[2]'] = {
  112. 'settings': {
  113. 'default': 'widget_search[2]'
  114. },
  115. 'type': 'widget_form',
  116. 'priority': 0,
  117. 'active': false,
  118. 'section': 'sidebar-widgets-sidebar-1',
  119. 'content': '<li id="customize-control-widget_search-2" class="customize-control customize-control-widget_form"> <\/li>',
  120. 'label': 'Search',
  121. 'description': '',
  122. 'instanceNumber': 2,
  123. 'widget_id': 'search-2',
  124. 'widget_id_base': 'search',
  125. 'sidebar_id': 'sidebar-1',
  126. 'width': 250,
  127. 'height': 200,
  128. 'is_wide': false,
  129. 'widget_control': '<div id="widget-15_search-2" class="widget"> <div class="widget-top"> <div class="widget-title-action"> <a class="widget-action hide-if-no-js" href="#available-widgets"><\/a> <a class="widget-control-edit hide-if-js" href="\/wp-admin\/customize.php?editwidget=search-2&#038;key=-1"> <span class="edit">Edit<\/span> <span class="add">Add<\/span> <span class="screen-reader-text">Search<\/span> <\/a> <\/div> <div class="widget-title"><h4>Search<span class="in-widget-title"><\/span><\/h4><\/div> <\/div> <div class="widget-inside"> <div class="form"> <div class="widget-content"><\/div><!-- .widget-content --> <input type="hidden" name="widget-id" class="widget-id" value="search-2" \/> <input type="hidden" name="id_base" class="id_base" value="search" \/> <input type="hidden" name="widget-width" class="widget-width" value="250" \/> <input type="hidden" name="widget-height" class="widget-height" value="200" \/> <input type="hidden" name="widget_number" class="widget_number" value="2" \/> <input type="hidden" name="multi_number" class="multi_number" value="" \/> <input type="hidden" name="add_new" class="add_new" value="" \/> <div class="widget-control-actions"> <div class="alignleft"> <a class="widget-control-remove" href="#remove">Delete<\/a> | <a class="widget-control-close" href="#close">Close<\/a> <\/div> <div class="alignright"> <input type="submit" name="savewidget" id="widget-search-2-savewidget" class="button button-primary widget-control-save right" value="Save" \/> <span class="spinner"><\/span> <\/div> <br class="clear" \/> <\/div> <\/div><!-- .form --> <\/div> <div class="widget-description"> A search form for your site. <\/div> <\/div>',
  130. 'widget_content': '<p><label for="widget-search-2-title">Title: <input class="widefat" id="widget-search-2-title" name="widget-search[2][title]" type="text" value="Buscar" \/><\/label><\/p>'
  131. };
  132. window._wpCustomizeSettings.controls['sidebars_widgets[sidebar-1]'] = {
  133. 'settings': {
  134. 'default': 'sidebars_widgets[sidebar-1]'
  135. },
  136. 'type': 'sidebar_widgets',
  137. 'priority': 99,
  138. 'active': true,
  139. 'section': 'sidebar-widgets-sidebar-1',
  140. 'content': '<li id="customize-control-sidebars_widgets-sidebar-1" class="customize-control customize-control-sidebar_widgets"> <span class="button add-new-widget" tabindex="0"> Add a Widget <\/span> <span class="reorder-toggle" tabindex="0"> <span class="reorder">Reorder<\/span> <span class="reorder-done">Done<\/span> <\/span> <\/li>',
  141. 'label': '',
  142. 'description': '',
  143. 'instanceNumber': 1,
  144. 'sidebar_id': 'sidebar-1'
  145. };