customize-settings.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. window.wp = window.wp || {};
  2. window.wp.customize = window.wp.customize || { get: function() {} };
  3. var customizerRootElement;
  4. customizerRootElement = jQuery( '<div id="customize-theme-controls"><ul></ul></div>' );
  5. customizerRootElement.css( { position: 'absolute', left: -10000, top: -10000 } ); // Remove from view.
  6. jQuery( document.body ).append( customizerRootElement );
  7. window._wpCustomizeSettings = {
  8. 'autofocus': {},
  9. 'browser': {
  10. 'ios': false,
  11. 'mobile': false
  12. },
  13. 'controls': {
  14. 'fixture-control': {
  15. 'active': true,
  16. 'content': '<li id="accordion-section-fixture-section" class="accordion-section control-section control-section-default"> <h3 class="accordion-section-title" tabindex="0"> Section Fixture <span class="screen-reader-text">Press return or enter to open</span> </h3> <ul class="accordion-section-content"> <li class="customize-section-description-container"> <div class="customize-section-title"> <button class="customize-section-back" tabindex="-1"> <span class="screen-reader-text">Back</span> </button> <h3> <span class="customize-action">Customizing &#9656; Fixture Panel</span> Section Fixture </h3> </div> </li> </ul> </li>',
  17. 'description': '',
  18. 'instanceNumber': 8,
  19. 'label': 'Fixture Control',
  20. 'priority': 10,
  21. 'section': 'fixture-section',
  22. 'settings': {
  23. 'default': 'fixture-setting'
  24. },
  25. 'type': 'text'
  26. }
  27. },
  28. 'documentTitleTmpl': 'Customize: %s',
  29. 'nonce': {
  30. 'preview': '',
  31. 'save': ''
  32. },
  33. 'panels': {
  34. 'fixture-panel': {
  35. 'active': true,
  36. 'content': '<li id="accordion-panel-fixture-panel" class="accordion-section control-section control-panel control-panel-default"> <h3 class="accordion-section-title" tabindex="0"> Fixture Panel <span class="screen-reader-text">Press return or enter to open this panel</span> </h3> <ul class="accordion-sub-container control-panel-content"> <li class="panel-meta customize-info accordion-section cannot-expand"> <button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text">Back</span></button> <div class="accordion-section-title"> <span class="preview-notice">You are customizing <strong class="panel-title">Fixture Panel</strong></span> <button class="customize-help-toggle dashicons dashicons-editor-help" tabindex="0" aria-expanded="false"><span class="screen-reader-text">Help</span></button> </div> </li> </ul> </li>',
  37. 'description': 'Lorem ipsum',
  38. 'instanceNumber': 1,
  39. 'priority': 110,
  40. 'title': 'Fixture panel with content',
  41. 'type': 'default'
  42. },
  43. 'fixture-panel-default-templated': {
  44. 'active': true,
  45. 'description': 'Lorem ipsum',
  46. 'instanceNumber': 2,
  47. 'priority': 110,
  48. 'title': 'Fixture default panel using template',
  49. 'type': 'default'
  50. },
  51. 'fixture-panel-titleless-templated': {
  52. 'active': true,
  53. 'description': 'Lorem ipsum',
  54. 'instanceNumber': 3,
  55. 'priority': 110,
  56. 'title': 'Fixture titleless panel using template',
  57. 'type': 'titleless'
  58. },
  59. 'fixture-panel-reusing-default-template': {
  60. 'active': true,
  61. 'description': 'Lorem ipsum',
  62. 'instanceNumber': 3,
  63. 'priority': 110,
  64. 'title': 'Fixture panel of custom type re-using default template',
  65. 'type': 'reusing-default-template'
  66. },
  67. 'fixture-panel-without-params': {}
  68. },
  69. 'sections': {
  70. 'fixture-section': {
  71. 'active': true,
  72. 'content': '<li id="accordion-section-fixture-section" class="accordion-section control-section control-section-default"> <h3 class="accordion-section-title" tabindex="0"> Section Fixture <span class="screen-reader-text">Press return or enter to open</span> </h3> <ul class="accordion-section-content"> <li class="customize-section-description-container"> <div class="customize-section-title"> <button class="customize-section-back" tabindex="-1"> <span class="screen-reader-text">Back</span> </button> <h3> <span class="customize-action">Customizing &#9656; Fixture Panel</span> Section Fixture </h3> </div> </li> </ul> </li>',
  73. 'description': '',
  74. 'instanceNumber': 2,
  75. 'panel': 'fixture-panel',
  76. 'priority': 20,
  77. 'title': 'Fixture Section',
  78. 'type': 'default'
  79. },
  80. 'fixture-section-default-templated': {
  81. 'active': true,
  82. 'description': '',
  83. 'instanceNumber': 3,
  84. 'panel': 'fixture-panel',
  85. 'priority': 20,
  86. 'title': 'Fixture default section using template',
  87. 'type': 'default'
  88. },
  89. 'fixture-section-titleless-templated': {
  90. 'active': true,
  91. 'description': '',
  92. 'instanceNumber': 4,
  93. 'panel': 'fixture-panel',
  94. 'priority': 20,
  95. 'title': 'Fixture titleless section using template',
  96. 'type': 'titleless'
  97. },
  98. 'fixture-section-reusing-default-template': {
  99. 'active': true,
  100. 'description': '',
  101. 'instanceNumber': 4,
  102. 'panel': 'fixture-panel',
  103. 'priority': 20,
  104. 'title': 'Fixture section of custom type re-using default template',
  105. 'type': 'reusing-default-template'
  106. },
  107. 'publish_settings': {
  108. 'active': true,
  109. 'description': '',
  110. 'instanceNumber': 6,
  111. 'priority': 20,
  112. 'title': 'Fixture section of custom type re-using default template',
  113. 'type': 'outer'
  114. },
  115. 'fixture-section-without-params': {}
  116. },
  117. 'settings': {
  118. 'fixture-setting': {
  119. 'transport': 'postMessage',
  120. 'value': 'Lorem Ipsum'
  121. },
  122. 'fixture-setting-abbr': {
  123. 'transport': 'postMessage',
  124. 'value': 'NASA',
  125. 'type': 'abbreviation'
  126. }
  127. },
  128. 'theme': {
  129. 'active': true,
  130. 'stylesheet': 'twentyfifteen'
  131. },
  132. 'url': {
  133. 'activated': 'http://example.org/wp-admin/themes.php?activated=true&previewed',
  134. 'ajax': '/wp-admin/admin-ajax.php',
  135. 'allowed': [
  136. 'http://example.org/'
  137. ],
  138. 'fallback': 'http://example.org/?preview=1&template=twentyfifteen&stylesheet=twentyfifteen&preview_iframe=1&TB_iframe=true',
  139. 'home': 'http://example.org/',
  140. 'isCrossDomain': false,
  141. 'login': 'http://example.org/wp-login.php?interim-login=1&customize-login=1',
  142. 'parent': 'http://example.org/wp-admin/',
  143. 'preview': 'http://example.org/'
  144. },
  145. 'previewableDevices': {
  146. 'desktop': {
  147. 'label': 'Enter desktop preview mode',
  148. 'default': true
  149. },
  150. 'tablet': {
  151. 'label': 'Enter tablet preview mode'
  152. },
  153. 'mobile': {
  154. 'label': 'Enter mobile preview mode'
  155. }
  156. },
  157. initialClientTimestamp: 1506510531595,
  158. initialServerDate: '2017-09-27 16:38:49',
  159. initialServerTimestamp: 1506510529913,
  160. changeset: {
  161. status: '',
  162. uuid: '0c674ff4-c159-4e7a-beb4-cb830ae73979',
  163. autosaved: false,
  164. branching: false,
  165. currentUserCanPublish: false,
  166. hasAutosaveRevision: false,
  167. latestAutoDraftUuid: '341b06f6-3c1f-454f-96df-3cf197f3e347',
  168. publishDate: '',
  169. locked: false
  170. },
  171. timeouts: {
  172. windowRefresh: 250,
  173. changesetAutoSave: 60000,
  174. keepAliveCheck: 2500,
  175. reflowPaneContents: 100,
  176. previewFrameSensitivity: 2000
  177. }
  178. };
  179. window._wpCustomizeControlsL10n = {};
  180. jQuery.ajaxSetup( {
  181. beforeSend: function( e, data ) {
  182. if ( data.url.indexOf( '//example.org' ) !== -1 ) {
  183. return false;
  184. }
  185. }
  186. } );