AMP for WP – Accelerated Mobile Pages - Version 0.9.36

Version Description

  • Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
  • Redux Core Update. Better compatibility with the Salient theme and Themeforest themes & plugins using redux framework in their core, which makes the plugin much stable. [Huge Improvements]
  • Hide advertisement section if advance ads plugin is active. [Better User experience]
  • Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
  • Launch Post Builder button added. One of the important feature called Post Builder, that is drag and drop post builder was somewhere hidden in the customizer, so positioned it for better visibility from users. [Better UX]
Download this release

Release Info

Developer mohammed_kaludi
Plugin Icon 128x128 AMP for WP – Accelerated Mobile Pages
Version 0.9.36
Comparing to
See all releases

Code changes from version 0.9.35 to 0.9.36

Files changed (289) hide show
  1. accelerated-moblie-pages.php +12 -4
  2. images/amp-post-builder.png +0 -0
  3. includes/includes.php +1 -8
  4. includes/options/README.md +0 -33
  5. includes/options/{options-init.php → admin-config.php} +255 -277
  6. includes/options/admin-init.php +0 -22
  7. includes/options/{redux-framework → redux-core}/assets/css/color-picker/color-picker.css +0 -0
  8. includes/options/{redux-framework → redux-core}/assets/css/color-picker/color-picker.scss +0 -0
  9. includes/options/{redux-framework → redux-core}/assets/css/import_export/import_export.css +0 -0
  10. includes/options/{redux-framework → redux-core}/assets/css/media/media.css +0 -0
  11. includes/options/{redux-framework → redux-core}/assets/css/media/media.scss +0 -0
  12. includes/options/redux-core/assets/css/redux-admin.css +177 -0
  13. includes/options/{redux-framework → redux-core}/assets/css/redux-admin.scss +0 -1
  14. includes/options/{redux-framework → redux-core}/assets/css/redux-fields.css +0 -0
  15. includes/options/{redux-framework → redux-core}/assets/css/redux-vendor.css +0 -0
  16. includes/options/{redux-framework → redux-core}/assets/css/rtl.css +1 -1
  17. includes/options/{redux-framework → redux-core}/assets/css/rtl.scss +8 -0
  18. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/elusive-icons.css +0 -0
  19. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/fonts/elusiveicons-webfont.eot +0 -0
  20. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/fonts/elusiveicons-webfont.svg +0 -0
  21. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/fonts/elusiveicons-webfont.ttf +0 -0
  22. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/fonts/elusiveicons-webfont.woff +0 -0
  23. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_animated.scss +0 -0
  24. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_bordered-pulled.scss +0 -0
  25. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_core.scss +0 -0
  26. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_fixed-width.scss +0 -0
  27. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_icons.scss +0 -0
  28. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_larger.scss +0 -0
  29. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_list.scss +0 -0
  30. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_mixins.scss +0 -0
  31. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_path.scss +0 -0
  32. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_rotated-flipped.scss +0 -0
  33. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_stacked.scss +0 -0
  34. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_variables.scss +0 -0
  35. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/elusive-icons.css +0 -0
  36. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/elusive-icons.css.map +0 -0
  37. includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/elusive-icons.scss +0 -0
  38. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  39. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  40. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  41. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  42. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  43. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_ffffff_1x400.png +0 -0
  44. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  45. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  46. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_222222_256x240.png +0 -0
  47. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_2e83ff_256x240.png +0 -0
  48. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_454545_256x240.png +0 -0
  49. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_888888_256x240.png +0 -0
  50. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_cd0a0a_256x240.png +0 -0
  51. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_f6cf3b_256x240.png +0 -0
  52. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_ffffff_256x240.png +0 -0
  53. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.css +0 -0
  54. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.less +0 -0
  55. includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.scss +0 -0
  56. includes/options/{redux-framework → redux-core}/assets/css/vendor/qtip/jquery.qtip.css +0 -0
  57. includes/options/{redux-framework → redux-core}/assets/css/vendor/qtip/jquery.qtip.min.css +0 -0
  58. includes/options/{redux-framework → redux-core}/assets/css/vendor/spectrum/redux-spectrum.css +0 -0
  59. includes/options/{redux-framework → redux-core}/assets/css/vendor/spectrum/redux-spectrum.min.css +0 -0
  60. includes/options/{redux-framework → redux-core}/assets/img/1c.png +0 -0
  61. includes/options/{redux-framework → redux-core}/assets/img/1col.png +0 -0
  62. includes/options/{redux-framework → redux-core}/assets/img/2-col-portfolio.png +0 -0
  63. includes/options/{redux-framework → redux-core}/assets/img/2cl.png +0 -0
  64. includes/options/{redux-framework → redux-core}/assets/img/2cr.png +0 -0
  65. includes/options/{redux-framework → redux-core}/assets/img/3-col-portfolio.png +0 -0
  66. includes/options/{redux-framework → redux-core}/assets/img/3cl.png +0 -0
  67. includes/options/{redux-framework → redux-core}/assets/img/3cm.png +0 -0
  68. includes/options/{redux-framework → redux-core}/assets/img/3cr.png +0 -0
  69. includes/options/{redux-framework → redux-core}/assets/img/4-col-portfolio.png +0 -0
  70. includes/options/{redux-framework → redux-core}/assets/img/ajax.gif +0 -0
  71. includes/options/{redux-framework → redux-core}/assets/img/menu_icon.png +0 -0
  72. includes/options/{redux-framework → redux-core}/assets/img/toggle_tabs.png +0 -0
  73. includes/options/{redux-framework → redux-core}/assets/js/media/media.js +0 -0
  74. includes/options/{redux-framework → redux-core}/assets/js/media/media.min.js +0 -0
  75. includes/options/{redux-framework → redux-core}/assets/js/redux.js +117 -35
  76. includes/options/redux-core/assets/js/redux.min.js +2 -0
  77. includes/options/{redux-framework → redux-core}/assets/js/vendor.min.js +0 -0
  78. includes/options/{redux-framework → redux-core}/assets/js/vendor/cookie.js +0 -0
  79. includes/options/{redux-framework → redux-core}/assets/js/vendor/jquery.alphanum.js +0 -0
  80. includes/options/{redux-framework → redux-core}/assets/js/vendor/jquery.serializeForm.js +0 -0
  81. includes/options/{redux-framework → redux-core}/assets/js/vendor/jquery.typewatch.js +0 -0
  82. includes/options/{redux-framework → redux-core}/assets/js/vendor/jsonview.js +0 -0
  83. includes/options/{redux-framework → redux-core}/assets/js/vendor/jsonview.min.js +0 -0
  84. includes/options/{redux-framework → redux-core}/assets/js/vendor/lte-ie7.js +0 -0
  85. includes/options/{redux-framework → redux-core}/assets/js/vendor/qtip/jquery.qtip.js +0 -0
  86. includes/options/{redux-framework → redux-core}/assets/js/vendor/qtip/jquery.qtip.min.js +0 -0
  87. includes/options/{redux-framework → redux-core}/assets/js/vendor/redux.select2.sortable.js +0 -0
  88. includes/options/{redux-framework → redux-core}/assets/js/vendor/redux.select2.sortable.min.js +0 -0
  89. includes/options/{redux-framework → redux-core}/assets/js/vendor/spectrum/redux-spectrum.js +0 -0
  90. includes/options/{redux-framework → redux-core}/assets/js/vendor/spectrum/redux-spectrum.min.js +0 -0
  91. includes/options/{redux-framework → redux-core}/core/dashboard.php +1 -1
  92. includes/options/{redux-framework → redux-core}/core/enqueue.php +2 -3
  93. includes/options/{redux-framework → redux-core}/core/newsflash.php +0 -0
  94. includes/options/{redux-framework → redux-core}/core/panel.php +0 -0
  95. includes/options/{redux-framework → redux-core}/core/required.php +0 -0
  96. includes/options/{redux-framework → redux-core}/framework.php +60 -60
  97. includes/options/{redux-framework → redux-core}/inc/browser.php +44 -44
  98. includes/options/{redux-framework → redux-core}/inc/class.p.php +0 -0
  99. includes/options/{redux-framework → redux-core}/inc/class.redux_admin_notices.php +3 -3
  100. includes/options/{redux-framework → redux-core}/inc/class.redux_api.php +0 -0
  101. includes/options/{redux-framework → redux-core}/inc/class.redux_cdn.php +0 -0
  102. includes/options/{redux-framework → redux-core}/inc/class.redux_filesystem.php +0 -0
  103. includes/options/{redux-framework → redux-core}/inc/class.redux_functions.php +0 -0
  104. includes/options/{redux-framework → redux-core}/inc/class.redux_helpers.php +2 -2
  105. includes/options/{redux-framework → redux-core}/inc/class.redux_instances.php +0 -0
  106. includes/options/{redux-framework → redux-core}/inc/class.thirdparty.fixes.php +0 -0
  107. includes/options/redux-core/inc/extensions/README.txt +1 -0
  108. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/extension_customizer.css +0 -0
  109. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/extension_customizer.js +12 -12
  110. includes/options/redux-core/inc/extensions/customizer/extension_customizer.min.js +1 -0
  111. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/extension_customizer.php +0 -0
  112. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/extension_customizer.scss +0 -0
  113. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_control.php +0 -0
  114. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_devs.php +0 -0
  115. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_fields.php +0 -0
  116. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_panel.php +0 -0
  117. includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_section.php +0 -0
  118. includes/options/{redux-framework → redux-core}/inc/extensions/import_export/extension_import_export.php +0 -0
  119. includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.css +0 -0
  120. includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.js +0 -0
  121. includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.min.js +0 -0
  122. includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.php +0 -0
  123. includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.scss +0 -0
  124. includes/options/{redux-framework → redux-core}/inc/extensions/options_object/extension_options_object.php +0 -0
  125. includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.css +0 -0
  126. includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.js +0 -0
  127. includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.min.js +0 -0
  128. includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.php +0 -0
  129. includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.scss +0 -0
  130. includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.css +0 -0
  131. includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.js +0 -0
  132. includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.min.js +0 -0
  133. includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.php +0 -0
  134. includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.scss +0 -0
  135. includes/options/redux-core/inc/fields/background/field_background.css +1 -0
  136. includes/options/redux-core/inc/fields/background/field_background.js +324 -0
  137. includes/options/redux-core/inc/fields/background/field_background.min.js +1 -0
  138. includes/options/redux-core/inc/fields/background/field_background.php +430 -0
  139. includes/options/redux-core/inc/fields/background/field_background.scss +59 -0
  140. includes/options/redux-core/inc/fields/border/field_border.css +1 -0
  141. includes/options/redux-core/inc/fields/border/field_border.js +131 -0
  142. includes/options/redux-core/inc/fields/border/field_border.min.js +1 -0
  143. includes/options/redux-core/inc/fields/border/field_border.php +323 -0
  144. includes/options/redux-core/inc/fields/border/field_border.scss +47 -0
  145. includes/options/redux-core/inc/fields/button_set/field_button_set.js +56 -0
  146. includes/options/redux-core/inc/fields/button_set/field_button_set.min.js +1 -0
  147. includes/options/redux-core/inc/fields/button_set/field_button_set.php +154 -0
  148. includes/options/redux-core/inc/fields/checkbox/field_checkbox.css +1 -0
  149. includes/options/redux-core/inc/fields/checkbox/field_checkbox.js +55 -0
  150. includes/options/redux-core/inc/fields/checkbox/field_checkbox.min.js +1 -0
  151. includes/options/redux-core/inc/fields/checkbox/field_checkbox.php +159 -0
  152. includes/options/redux-core/inc/fields/checkbox/field_checkbox.scss +13 -0
  153. includes/options/redux-core/inc/fields/color/field_color.js +175 -0
  154. includes/options/redux-core/inc/fields/color/field_color.min.js +1 -0
  155. includes/options/redux-core/inc/fields/color/field_color.php +122 -0
  156. includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.css +1 -0
  157. includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.js +142 -0
  158. includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.min.js +1 -0
  159. includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.php +128 -0
  160. includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.scss +17 -0
  161. includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.css +0 -0
  162. includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.js +0 -0
  163. includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.min.js +0 -0
  164. includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.php +1 -1
  165. includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.scss +0 -0
  166. includes/options/redux-core/inc/fields/date/field_date.css +1 -0
  167. includes/options/redux-core/inc/fields/date/field_date.js +82 -0
  168. includes/options/redux-core/inc/fields/date/field_date.min.js +1 -0
  169. includes/options/redux-core/inc/fields/date/field_date.php +95 -0
  170. includes/options/redux-core/inc/fields/date/field_date.scss +8 -0
  171. includes/options/redux-core/inc/fields/dimensions/field_dimensions.css +1 -0
  172. includes/options/redux-core/inc/fields/dimensions/field_dimensions.js +76 -0
  173. includes/options/redux-core/inc/fields/dimensions/field_dimensions.less +30 -0
  174. includes/options/redux-core/inc/fields/dimensions/field_dimensions.min.js +1 -0
  175. includes/options/redux-core/inc/fields/dimensions/field_dimensions.php +306 -0
  176. includes/options/redux-core/inc/fields/dimensions/field_dimensions.scss +33 -0
  177. includes/options/redux-core/inc/fields/divide/field_divide.css +1 -0
  178. includes/options/redux-core/inc/fields/divide/field_divide.php +85 -0
  179. includes/options/redux-core/inc/fields/divide/field_divide.scss +50 -0
  180. includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.css +0 -0
  181. includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.js +0 -0
  182. includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.min.js +0 -0
  183. includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.php +0 -0
  184. includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.scss +0 -0
  185. includes/options/{redux-framework/inc/fields/ace_editor/vendor/mode-text.js → redux-core/inc/fields/editor/field_editor_c.php} +0 -0
  186. includes/options/redux-core/inc/fields/gallery/field_gallery.js +117 -0
  187. includes/options/redux-core/inc/fields/gallery/field_gallery.min.js +1 -0
  188. includes/options/redux-core/inc/fields/gallery/field_gallery.php +105 -0
  189. includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.css +0 -0
  190. includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.js +0 -0
  191. includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.min.js +0 -0
  192. includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.php +0 -0
  193. includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.scss +0 -0
  194. includes/options/redux-core/inc/fields/info/field_info.css +1 -0
  195. includes/options/redux-core/inc/fields/info/field_info.php +167 -0
  196. includes/options/redux-core/inc/fields/info/field_info.scss +159 -0
  197. includes/options/redux-core/inc/fields/link_color/field_link_color.css +1 -0
  198. includes/options/redux-core/inc/fields/link_color/field_link_color.js +111 -0
  199. includes/options/redux-core/inc/fields/link_color/field_link_color.min.js +1 -0
  200. includes/options/redux-core/inc/fields/link_color/field_link_color.php +224 -0
  201. includes/options/redux-core/inc/fields/link_color/field_link_color.scss +7 -0
  202. includes/options/{redux-framework → redux-core}/inc/fields/media/field_media.css +0 -0
  203. includes/options/{redux-framework → redux-core}/inc/fields/media/field_media.less +0 -0
  204. includes/options/{redux-framework → redux-core}/inc/fields/media/field_media.php +0 -0
  205. includes/options/{redux-framework → redux-core}/inc/fields/media/field_media.scss +0 -0
  206. includes/options/redux-core/inc/fields/multi_text/field_multi_text.css +1 -0
  207. includes/options/redux-core/inc/fields/multi_text/field_multi_text.js +65 -0
  208. includes/options/redux-core/inc/fields/multi_text/field_multi_text.min.js +1 -0
  209. includes/options/redux-core/inc/fields/multi_text/field_multi_text.php +113 -0
  210. includes/options/redux-core/inc/fields/multi_text/field_multi_text.scss +53 -0
  211. includes/options/redux-core/inc/fields/palette/field_palette.css +1 -0
  212. includes/options/redux-core/inc/fields/palette/field_palette.js +53 -0
  213. includes/options/redux-core/inc/fields/palette/field_palette.min.js +1 -0
  214. includes/options/redux-core/inc/fields/palette/field_palette.php +110 -0
  215. includes/options/redux-core/inc/fields/palette/field_palette.scss +55 -0
  216. includes/options/redux-core/inc/fields/password/field_password.php +106 -0
  217. includes/options/redux-core/inc/fields/radio/field_radio.php +57 -0
  218. includes/options/redux-core/inc/fields/raw/field_raw.php +53 -0
  219. includes/options/redux-core/inc/fields/raw/parsedown.php +1542 -0
  220. includes/options/redux-core/inc/fields/section/field_section.css +1 -0
  221. includes/options/redux-core/inc/fields/section/field_section.php +130 -0
  222. includes/options/redux-core/inc/fields/section/field_section.scss +24 -0
  223. includes/options/{redux-framework → redux-core}/inc/fields/select/elusive-icons.php +0 -0
  224. includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.css +0 -0
  225. includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.js +0 -0
  226. includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.min.js +0 -0
  227. includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.php +0 -0
  228. includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.scss +0 -0
  229. includes/options/redux-core/inc/fields/select_image/field_select_image.css +1 -0
  230. includes/options/redux-core/inc/fields/select_image/field_select_image.js +72 -0
  231. includes/options/redux-core/inc/fields/select_image/field_select_image.min.js +1 -0
  232. includes/options/redux-core/inc/fields/select_image/field_select_image.php +176 -0
  233. includes/options/redux-core/inc/fields/select_image/field_select_image.scss +19 -0
  234. includes/options/redux-core/inc/fields/slider/field_slider.css +1 -0
  235. includes/options/redux-core/inc/fields/slider/field_slider.js +269 -0
  236. includes/options/redux-core/inc/fields/slider/field_slider.min.js +1 -0
  237. includes/options/redux-core/inc/fields/slider/field_slider.php +414 -0
  238. includes/options/redux-core/inc/fields/slider/field_slider.scss +81 -0
  239. includes/options/redux-core/inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.css +172 -0
  240. includes/options/redux-core/inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.js +1420 -0
  241. includes/options/redux-core/inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.min.js +20 -0
  242. includes/options/redux-core/inc/fields/slides/field_slides.css +1 -0
  243. includes/options/redux-core/inc/fields/slides/field_slides.js +150 -0
  244. includes/options/redux-core/inc/fields/slides/field_slides.min.js +1 -0
  245. includes/options/redux-core/inc/fields/slides/field_slides.php +270 -0
  246. includes/options/redux-core/inc/fields/slides/field_slides.scss +92 -0
  247. includes/options/redux-core/inc/fields/sortable/field_sortable.css +1 -0
  248. includes/options/redux-core/inc/fields/sortable/field_sortable.js +91 -0
  249. includes/options/redux-core/inc/fields/sortable/field_sortable.min.js +1 -0
  250. includes/options/redux-core/inc/fields/sortable/field_sortable.php +164 -0
  251. includes/options/redux-core/inc/fields/sortable/field_sortable.scss +73 -0
  252. includes/options/redux-core/inc/fields/sorter/field_sorter.css +1 -0
  253. includes/options/redux-core/inc/fields/sorter/field_sorter.js +151 -0
  254. includes/options/redux-core/inc/fields/sorter/field_sorter.min.js +1 -0
  255. includes/options/redux-core/inc/fields/sorter/field_sorter.php +223 -0
  256. includes/options/redux-core/inc/fields/sorter/field_sorter.scss +63 -0
  257. includes/options/redux-core/inc/fields/spacing/field_spacing.css +1 -0
  258. includes/options/redux-core/inc/fields/spacing/field_spacing.js +86 -0
  259. includes/options/redux-core/inc/fields/spacing/field_spacing.min.js +1 -0
  260. includes/options/redux-core/inc/fields/spacing/field_spacing.php +385 -0
  261. includes/options/redux-core/inc/fields/spacing/field_spacing.scss +33 -0
  262. includes/options/redux-core/inc/fields/spinner/arrow_left.png +0 -0
  263. includes/options/redux-core/inc/fields/spinner/arrow_right.png +0 -0
  264. includes/options/redux-core/inc/fields/spinner/field_spinner.css +1 -0
  265. includes/options/redux-core/inc/fields/spinner/field_spinner.js +129 -0
  266. includes/options/redux-core/inc/fields/spinner/field_spinner.min.js +1 -0
  267. includes/options/redux-core/inc/fields/spinner/field_spinner.php +183 -0
  268. includes/options/redux-core/inc/fields/spinner/field_spinner.scss +101 -0
  269. includes/options/redux-core/inc/fields/spinner/vendor/spinner_custom.js +1 -0
  270. includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.css +0 -0
  271. includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.js +0 -0
  272. includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.min.js +0 -0
  273. includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.php +0 -0
  274. includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.scss +0 -0
  275. includes/options/{redux-framework → redux-core}/inc/fields/switch/slider-control.png +0 -0
  276. includes/options/{redux-framework → redux-core}/inc/fields/switch/switch.gif +0 -0
  277. includes/options/{redux-framework → redux-core}/inc/fields/text/field_text.css +0 -0
  278. includes/options/{redux-framework → redux-core}/inc/fields/text/field_text.php +0 -0
  279. includes/options/{redux-framework → redux-core}/inc/fields/text/field_text.scss +0 -0
  280. includes/options/{redux-framework → redux-core}/inc/fields/textarea/field_textarea.php +1 -1
  281. includes/options/redux-core/inc/fields/typography/field_typography.css +1 -0
  282. includes/options/redux-core/inc/fields/typography/field_typography.js +655 -0
  283. includes/options/redux-core/inc/fields/typography/field_typography.json +1093 -0
  284. includes/options/redux-core/inc/fields/typography/field_typography.min.js +1 -0
  285. includes/options/redux-core/inc/fields/typography/field_typography.php +1093 -0
  286. includes/options/redux-core/inc/fields/typography/field_typography.scss +247 -0
  287. includes/options/redux-core/inc/fields/typography/field_typography_json.js +669 -0
  288. includes/options/redux-core/inc/fields/typography/field_typography_json.min.js +1 -0
  289. includes/options/redux-core/inc/fields/typography/googlefonts.php +1 -0
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 0.9.35
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
@@ -25,12 +25,19 @@ add_action( 'init', 'ampforwp_add_custom_post_support',11);
25
 
26
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
27
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
28
- define('AMPFORWP_VERSION','0.9.35');
 
 
 
 
 
 
 
 
29
  /*
30
  * Load Files only in the backend
31
  * As we don't need plugin activation code to run everytime the site loads
32
  */
33
-
34
  if ( is_admin() ) {
35
  add_action('init','ampforwp_plugin_notice');
36
  function ampforwp_plugin_notice() {
@@ -191,4 +198,5 @@ add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
191
 
192
  function ampforwp_is_amp_endpoint() {
193
  return false !== get_query_var( 'amp', false );
194
- }
 
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.36
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
25
 
26
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
27
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
28
+ define('AMPFORWP_VERSION','0.9.36');
29
+
30
+ // Redux panel inclusion code
31
+ if ( !class_exists( 'ReduxFramework' ) ) {
32
+ require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
33
+ }
34
+ // Register all the main options
35
+ require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
36
+
37
  /*
38
  * Load Files only in the backend
39
  * As we don't need plugin activation code to run everytime the site loads
40
  */
 
41
  if ( is_admin() ) {
42
  add_action('init','ampforwp_plugin_notice');
43
  function ampforwp_plugin_notice() {
198
 
199
  function ampforwp_is_amp_endpoint() {
200
  return false !== get_query_var( 'amp', false );
201
+ }
202
+
images/amp-post-builder.png ADDED
Binary file
includes/includes.php CHANGED
@@ -1,11 +1,8 @@
1
- <?php
2
  /* This file will contain all the extra code that works like a supporting.
3
-
4
  1. AMP menu code
5
  2. Newsletter code
6
- 3. Redux panel inclusion code
7
  */
8
-
9
  // 1. AMP menu code
10
  // Registering Custom AMP menu for this plugin
11
  if (! function_exists( 'ampforwp_menu') ) {
@@ -21,8 +18,4 @@
21
 
22
  // 2. Newsletter code
23
  require_once( AMPFORWP_PLUGIN_DIR . '/includes/newsletter.php' );
24
-
25
- // 3. Redux panel inclusion code
26
- require_once( AMPFORWP_PLUGIN_DIR . '/includes/options/admin-init.php' );
27
-
28
  ?>
1
+ <?php
2
  /* This file will contain all the extra code that works like a supporting.
 
3
  1. AMP menu code
4
  2. Newsletter code
 
5
  */
 
6
  // 1. AMP menu code
7
  // Registering Custom AMP menu for this plugin
8
  if (! function_exists( 'ampforwp_menu') ) {
18
 
19
  // 2. Newsletter code
20
  require_once( AMPFORWP_PLUGIN_DIR . '/includes/newsletter.php' );
 
 
 
 
21
  ?>
includes/options/README.md DELETED
@@ -1,33 +0,0 @@
1
- ## Cust Redux Build Instructions
2
-
3
- ### NEVER modify anything in the redux-framework folder
4
- Redux works because it's extensible by hooks. If you modify the core directory,
5
- or attempt to add your own stuff within the core directory, any other version of
6
- Redux WILL override your code. Never ever modify the ReduxCore, only extend it
7
- via hooks and filters. ;)
8
-
9
- #### ~/admin/options-init.php
10
- Your options configuration.
11
-
12
-
13
- #### ~/admin/tgm/tgm-init.php (If you opted to use it)
14
- You can add additional plugins if desired.
15
-
16
- #### Learn About Redux Extensions
17
- https://docs.reduxframework.com/extensions/using-extensions/
18
-
19
- #### ~/admin/redux-extensions/extensions
20
- Place all extensions within this directory. An example would look like:
21
-
22
- * ~admin
23
- * redux-extensions
24
- * extension
25
- * metaboxes
26
- * extension_metaboxes.php
27
-
28
- #### ~/admin/redux-extensions/configs
29
- Place any custom configs extensions, that should not be added to the standard
30
- options-init.php file, within this folder. These will be auto-loaded.
31
-
32
-
33
- ### For further instructions or assistance, please visit http://docs.reduxframework.com
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/options/{options-init.php → admin-config.php} RENAMED
@@ -1,77 +1,56 @@
1
  <?php
2
- /**
3
- * For full documentation, please visit: http://docs.reduxframework.com/
4
- * For a more extensive sample-config file, you may look at:
5
- * https://github.com/reduxframework/redux-framework/blob/master/sample/sample-config.php
6
- */
7
 
8
- if ( ! class_exists( 'Redux' ) ) {
9
- return;
10
- }
11
 
12
- // This is your option name where all the Redux data is stored.
13
- $opt_name = "redux_builder_amp";
14
-
15
- /**
16
- * ---> SET ARGUMENTS
17
- * All the possible arguments for Redux.
18
- * For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
19
- * */
20
-
21
- $theme = wp_get_theme(); // For use with some settings. Not necessary.
22
-
23
- $args = array(
24
- 'opt_name' => 'redux_builder_amp',
25
- 'display_name' => 'Accelerated Mobile Pages Options',
26
- //'display_version' => '0.7.1',
27
- 'page_slug' => 'amp_options',
28
- 'page_title' => 'Accelerated Mobile Pages Options',
29
- 'update_notice' => false,
30
- 'intro_text' => '<a href="https://wordpress.org/support/plugin/accelerated-mobile-pages" target="_blank">Need Help? Support Forum</a> | <a href="https://wordpress.org/plugins/accelerated-mobile-pages/faq/" target="_blank">FAQ</a> | <a href="https://wordpress.org/plugins/accelerated-mobile-pages/changelog/" target="_blank">Change Log</a> | <a href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages" target="_blank">Reviews</a>| <a href="https://www.paypal.me/Kaludi/5" target="_blank">Donate</a>',
31
- 'footer_text' => '',
32
- 'admin_bar' => TRUE,
33
- 'menu_type' => 'menu',
34
- 'menu_title' => 'AMP',
35
- 'allow_sub_menu' => TRUE,
36
- 'page_parent_post_type' => 'your_post_type',
37
- 'default_mark' => '',
38
- 'class' => 'amp_options_class',
39
- 'hints' => array(
40
- 'icon' => 'el el-adjust-alt',
41
- 'icon_position' => 'left',
42
- 'icon_size' => 'normal',
43
- 'tip_style' => array(
44
- 'color' => 'light',
45
- ),
46
- 'tip_position' => array(
47
- 'my' => 'top left',
48
- 'at' => 'bottom right',
49
- ),
50
- 'tip_effect' => array(
51
- 'show' => array(
52
- 'duration' => '500',
53
- 'event' => 'mouseover',
54
- ),
55
- 'hide' => array(
56
- 'duration' => '500',
57
- 'event' => 'mouseleave unfocus',
58
- ),
59
- ),
60
- ),
61
- 'output' => TRUE,
62
- 'output_tag' => TRUE,
63
- 'settings_api' => TRUE,
64
- 'cdn_check_time' => '1440',
65
- 'compiler' => TRUE,
66
- 'page_permissions' => 'manage_options',
67
- 'save_defaults' => TRUE,
68
- 'show_import_export' => TRUE,
69
- 'database' => 'options',
70
- 'transient_time' => '3600',
71
- 'network_sites' => TRUE,
72
- );
73
 
74
- // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
75
  $args['share_icons'][] = array(
76
  'url' => 'https://github.com/ahmedkaludi/Accelerated-Mobile-Pages',
77
  'title' => 'Visit us on GitHub',
@@ -79,15 +58,11 @@
79
  //'img' => '', // You can use icon OR img. IMG needs to be a full URL.
80
  );
81
 
82
- Redux::setArgs( $opt_name, $args );
83
 
84
- /*
85
- * ---> END ARGUMENTS
86
- */
87
 
88
- /*
89
- * ---> START HELP TABS
90
- */
91
 
92
  $tabs = array(
93
  array(
@@ -273,15 +248,15 @@
273
  'default' => 1
274
  ),
275
 
276
- array(
277
- 'id' =>'amp-rtl-select-option',
278
- 'type' => 'switch',
279
- 'title' => __('RTL Support', 'redux-framework-demo'),
280
- 'default' => 0,
281
- 'subtitle' => __('Enable Right to Left language support', 'redux-framework-demo'),
282
- 'true' => 'true',
283
- 'false' => 'false',
284
- ),
285
  // array(
286
  // 'id' => 'amp-navigation-text',
287
  // 'title' => __('Navigation Text', 'redux-framework-demo'),
@@ -297,7 +272,7 @@
297
  'title' => __('AMP on Pages', 'redux-framework-demo'),
298
  'subtitle' => __('Enable or Disable AMP on all Pages', 'redux-framework-demo'),
299
  'default' => 1,
300
- 'desc' => __( 'Re-Save permalink if you make changes in this option', 'redux-framework-demo' ),
301
  ),
302
  array(
303
  'id' =>'amp-on-off-support-for-non-amp-home-page',
@@ -326,7 +301,9 @@
326
  // AMP Design SECTION
327
  Redux::setSection( $opt_name, array(
328
  'title' => __( 'Design', 'redux-framework-demo' ),
329
- 'desc' => __( '<b>Quick Links: <a href="' . esc_url(admin_url('customize.php?autofocus[section]=amp_design&customize_amp=1')) .'">AMP Page Builder & Color Settings</a></b>'),
 
 
330
  'id' => 'amp-design',
331
  'subsection' => true,
332
  'fields' => array(
@@ -408,209 +385,210 @@
408
 
409
  ) ;
410
 
411
- $AD_URL = "http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=advertisement-tab&utm_campaign=AMP%20Plugin";
412
- $desc = '';
413
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
414
- if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
415
- $desc = '<a href="'.$AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp-ads-retina.png" width="560" height="85" /></a>';
416
- }
417
- // ADS SECTION
418
- Redux::setSection( $opt_name, array(
419
- 'title' => __( 'Advertisement', 'redux-framework-demo' ),
420
- 'desc' => $desc,
421
- 'id' => 'amp-ads',
422
- 'subsection' => true,
423
- 'fields' => array(
424
- // Ad 1 Starts
425
- array(
426
- 'id' =>'enable-amp-ads-1',
427
- 'type' => 'switch',
428
- 'title' => __('AD #1', 'redux-framework-demo'),
429
- 'default' => 0,
430
- 'subtitle' => __('Below the Header (SiteWide)', 'redux-framework-demo'),
431
- 'true' => 'Enabled',
432
- 'false' => 'Disabled',
433
- ),
434
- array(
435
- 'id' => 'enable-amp-ads-select-1',
436
- 'type' => 'select',
437
- 'title' => __('AD Size', 'redux-framework-demo'),
438
- 'required' => array('enable-amp-ads-1', '=' , '1'),
439
- // Must provide key => value pairs for select options
440
- 'options' => array(
441
- '1' => '300x250',
442
- '2' => '336x280',
443
- '3' => '728x90',
444
- '4' => '300x600',
445
- '5' => '320x100',
446
- '6' => '200x50',
447
- '7' => '320x50'
448
- ),
449
- 'default' => '2',
450
- ),
451
- array(
452
- 'id' =>'enable-amp-ads-text-feild-client-1',
453
- 'type' => 'text',
454
- 'required' => array('enable-amp-ads-1', '=' , '1'),
455
- 'title' => __('Data AD Client', 'redux-framework-demo'),
456
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
457
- 'default' => '',
458
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
459
- ),
460
  array(
461
- 'id' => 'enable-amp-ads-text-feild-slot-1',
462
- 'type' => 'text',
463
- 'title' => __('Data AD Slot', 'redux-framework-demo'),
464
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
465
- 'default' => '',
466
- 'required' => array('enable-amp-ads-1', '=' , '1'),
467
- 'placeholder'=> '70XXXXXX12'
468
- ),
469
- // Ad 1 ends
470
-
471
- // Ad 2 Starts
472
- array(
473
- 'id'=>'enable-amp-ads-2',
474
- 'type' => 'switch',
475
- 'title' => __('AD #2', 'redux-framework-demo'),
476
- 'default' => 0,
477
- 'subtitle' => __('Below the Footer (SiteWide)', 'redux-framework-demo'),
478
- 'true' => 'Enabled',
479
- 'false' => 'Disabled',
480
  ),
481
- array(
482
- 'id' => 'enable-amp-ads-select-2',
483
- 'type' => 'select',
484
- 'title' => __('AD Size', 'redux-framework-demo'),
485
- 'required' => array('enable-amp-ads-2', '=' , '1'),
486
- // Must provide key => value pairs for select options
487
- 'options' => array(
488
- '1' => '300x250',
489
- '2' => '336x280',
490
- '3' => '728x90',
491
- '4' => '300x600',
492
- '5' => '320x100',
493
- '6' => '200x50',
494
- '7' => '320x50'
 
 
495
  ),
496
- 'default' => '2',
497
- ),
498
- array(
499
- 'id' =>'enable-amp-ads-text-feild-client-2',
500
- 'type' => 'text',
501
- 'required' => array('enable-amp-ads-2', '=' , '1'),
502
- 'title' => __('Data AD Client', 'redux-framework-demo'),
503
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
504
- 'default' => '',
505
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
506
- ),
507
- array(
508
- 'id' => 'enable-amp-ads-text-feild-slot-2',
509
- 'type' => 'text',
510
- 'title' => __('Data AD Slot', 'redux-framework-demo'),
511
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
512
- 'default' => '',
513
- 'required' => array('enable-amp-ads-2', '=' , '1'),
514
- 'placeholder'=> '70XXXXXX12'
515
- ),
516
- // Ad 2 ends
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
517
 
518
- // Ad 3 starts
519
- array(
520
- 'id' => 'enable-amp-ads-3',
521
  'type' => 'switch',
522
- 'title' => __('AD #3', 'redux-framework-demo'),
523
  'default' => 0,
524
- 'subtitle' => __('Above the Post Content (Single Post)', 'redux-framework-demo'),
525
  'true' => 'Enabled',
526
  'false' => 'Disabled',
527
  ),
528
- array(
529
- 'id' => 'enable-amp-ads-select-3',
530
- 'type' => 'select',
531
- 'title' => __('AD Size', 'redux-framework-demo'),
532
- 'required' => array('enable-amp-ads-3', '=' , '1'),
533
- // Must provide key => value pairs for select options
534
- 'options' => array(
535
- '1' => '300x250',
536
- '2' => '336x280',
537
- '3' => '728x90',
538
- '4' => '300x600',
539
  '5' => '320x100',
540
  '6' => '200x50',
541
  '7' => '320x50'
 
 
542
  ),
543
- 'default' => '2',
544
- ),
545
- array(
546
- 'id' =>'enable-amp-ads-text-feild-client-3',
547
- 'type' => 'text',
548
- 'required' => array('enable-amp-ads-3', '=' , '1'),
549
- 'title' => __('Data AD Client', 'redux-framework-demo'),
550
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
551
- 'default' => '',
552
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
553
- ),
554
- array(
555
- 'id' => 'enable-amp-ads-text-feild-slot-3',
556
- 'type' => 'text',
557
- 'title' => __('Data AD Slot', 'redux-framework-demo'),
558
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
559
- 'default' => '',
560
- 'required' => array('enable-amp-ads-3', '=' , '1'),
561
- 'placeholder'=> '70XXXXXX12'
562
- ),
563
- // Ad 3 ends
564
-
565
- // Ad 4 Starts
566
- array(
567
- 'id' => 'enable-amp-ads-4',
568
- 'type' => 'switch',
569
- 'title' => __('AD #4', 'redux-framework-demo'),
570
- 'default' => 0,
571
- 'subtitle' => __('Below the Post Content (Single Post)', 'redux-framework-demo'),
572
- 'true' => 'Enabled',
573
- 'false' => 'Disabled',
574
- ),
575
- array(
576
- 'id' => 'enable-amp-ads-select-4',
577
- 'type' => 'select',
578
- 'title' => __('AD Size', 'redux-framework-demo'),
579
- 'required' => array('enable-amp-ads-4', '=' , '1'),
580
- // Must provide key => value pairs for select options
581
- 'options' => array(
582
- '1' => '300x250',
583
- '2' => '336x280',
584
- '3' => '728x90',
585
- '4' => '300x600',
586
- '5' => '320x100',
587
- '6' => '200x50',
588
- '7' => '320x50'
589
  ),
590
- 'default' => '2',
591
- ),
592
- array(
593
- 'id' =>'enable-amp-ads-text-feild-client-4',
594
- 'type' => 'text',
595
- 'required' => array('enable-amp-ads-4', '=' , '1'),
596
- 'title' => __('Data AD Client', 'redux-framework-demo'),
597
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
598
- 'default' => '',
599
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
600
- ),
601
- array(
602
- 'id' => 'enable-amp-ads-text-feild-slot-4',
603
- 'type' => 'text',
604
- 'title' => __('Data AD Slot', 'redux-framework-demo'),
605
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'redux-framework-demo'),
606
- 'default' => '',
607
- 'required' => array('enable-amp-ads-4', '=' , '1'),
608
- 'placeholder'=> '70XXXXXX12'
609
- )
610
- // Ad 4 ends
611
- ),
612
- ) );
613
-
614
 
615
  // Single Section
616
  Redux::setSection( $opt_name, array(
1
  <?php
2
+ // Admin Panel Options
 
 
 
 
3
 
4
+ if ( ! class_exists( 'Redux' ) ) {
5
+ return;
6
+ }
7
 
8
+ // Option name where all the Redux data is stored.
9
+ $opt_name = "redux_builder_amp";
10
+
11
+ // All the possible arguments for Redux.
12
+ //$amp_redux_header = '<span id="name"><span style="color: #4dbefa;">U</span>ltimate <span style="color: #4dbefa;">W</span>idgets</span>';
13
+
14
+ $args = array(
15
+ // TYPICAL -> Change these values as you need/desire
16
+ 'opt_name' => 'redux_builder_amp', // This is where your data is stored in the database and also becomes your global variable name.
17
+ 'display_name' => __( 'Accelerated Mobile Pages Options','ampforwp' ), // Name that appears at the top of your panel
18
+ 'menu_type' => 'menu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
19
+ 'allow_sub_menu' => true, // Show the sections below the admin menu item or not
20
+ 'menu_title' => __( 'AMP', 'ampforwp' ),
21
+ 'page_title' => 'Accelerated Mobile Pages Options',
22
+ 'display_version' => AMPFORWP_VERSION,
23
+ 'update_notice' => false,
24
+ 'intro_text' => '<a href="https://wordpress.org/support/plugin/accelerated-mobile-pages" target="_blank">Need Help? Support Forum</a> | <a href="https://wordpress.org/plugins/accelerated-mobile-pages/faq/" target="_blank">FAQ</a> | <a href="https://wordpress.org/plugins/accelerated-mobile-pages/changelog/" target="_blank">Change Log</a> | <a href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages" target="_blank">Reviews</a>| <a href="https://www.paypal.me/Kaludi/5" target="_blank">Donate</a>',
25
+ 'global_variable' => '', // Set a different name for your global variable other than the opt_name
26
+ 'dev_mode' => false, // Show the time the page took to load, etc
27
+ 'customizer' => false, // Enable basic customizer support,
28
+ 'async_typography' => false, // Enable async for fonts,
29
+ 'disable_save_warn' => true,
30
+ 'open_expanded' => false,
31
+ // OPTIONAL -> Give you extra features
32
+ 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
33
+ 'page_parent' => 'themes.php', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
34
+ 'page_permissions' => 'manage_options', // Permissions needed to access the options panel.
35
+ 'last_tab' => '', // Force your panel to always open to a specific tab (by id)
36
+ 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title
37
+ 'page_slug' => 'amp_options', // Page slug used to denote the panel
38
+ 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not
39
+ 'default_show' => false, // If true, shows the default value next to each field that is not the default value.
40
+ 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: *
41
+ 'admin_bar' => true,
42
+ 'admin_bar_icon' => 'dashicons-admin-generic',
43
+ // CAREFUL -> These options are for advanced use only
44
+ 'output' => false, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output
45
+ 'output_tag' => false, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head
46
+ //'domain' => 'redux-framework', // Translation domain key. Don't change this unless you want to retranslate all of Redux.
47
+ 'footer_credit' => false, // Disable the footer credit of Redux. Please leave if you can help it.
48
+ 'footer_text' => "",
49
+ 'show_import_export' => true,
50
+ 'system_info' => true,
51
+
52
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
 
54
  $args['share_icons'][] = array(
55
  'url' => 'https://github.com/ahmedkaludi/Accelerated-Mobile-Pages',
56
  'title' => 'Visit us on GitHub',
58
  //'img' => '', // You can use icon OR img. IMG needs to be a full URL.
59
  );
60
 
 
61
 
62
+ Redux::setArgs( "redux_builder_amp", $args );
63
+
64
+
65
 
 
 
 
66
 
67
  $tabs = array(
68
  array(
248
  'default' => 1
249
  ),
250
 
251
+ array(
252
+ 'id' =>'amp-rtl-select-option',
253
+ 'type' => 'switch',
254
+ 'title' => __('RTL Support', 'redux-framework-demo'),
255
+ 'default' => 0,
256
+ 'subtitle' => __('Enable Right to Left language support', 'redux-framework-demo'),
257
+ 'true' => 'true',
258
+ 'false' => 'false',
259
+ ),
260
  // array(
261
  // 'id' => 'amp-navigation-text',
262
  // 'title' => __('Navigation Text', 'redux-framework-demo'),
272
  'title' => __('AMP on Pages', 'redux-framework-demo'),
273
  'subtitle' => __('Enable or Disable AMP on all Pages', 'redux-framework-demo'),
274
  'default' => 1,
275
+ 'desc' => __( 'Re-Save permalink if you make changes in this option', 'redux-framework-demo' ),
276
  ),
277
  array(
278
  'id' =>'amp-on-off-support-for-non-amp-home-page',
301
  // AMP Design SECTION
302
  Redux::setSection( $opt_name, array(
303
  'title' => __( 'Design', 'redux-framework-demo' ),
304
+ 'desc' => __( '
305
+ <br /><a href="' . esc_url(admin_url('customize.php?autofocus[section]=amp_design&customize_amp=1')) .'" target="_blank"><img class="ampforwp-post-builder-img" src="'.AMPFORWP_IMAGE_DIR . '/amp-post-builder.png" width="489" height="72" /></a>
306
+ '),
307
  'id' => 'amp-design',
308
  'subsection' => true,
309
  'fields' => array(
385
 
386
  ) ;
387
 
388
+ $AD_URL = "http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=advertisement-tab&utm_campaign=AMP%20Plugin";
389
+ $desc = '';
390
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
391
+ if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
392
+
393
+ $desc = '<a href="'.$AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp-ads-retina.png" width="560" height="85" /></a>';
394
+
395
+ // ADS SECTION
396
+ Redux::setSection( $opt_name, array(
397
+ 'title' => __( 'Advertisement', 'redux-framework-demo' ),
398
+ 'desc' => $desc,
399
+ 'id' => 'amp-ads',
400
+ 'subsection' => true,
401
+ 'fields' => array(
402
+ // Ad 1 Starts
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
  array(
404
+ 'id' =>'enable-amp-ads-1',
405
+ 'type' => 'switch',
406
+ 'title' => __('AD #1', 'redux-framework-demo'),
407
+ 'default' => 0,
408
+ 'subtitle' => __('Below the Header (SiteWide)', 'redux-framework-demo'),
409
+ 'true' => 'Enabled',
410
+ 'false' => 'Disabled',
 
 
 
 
 
 
 
 
 
 
 
 
411
  ),
412
+ array(
413
+ 'id' => 'enable-amp-ads-select-1',
414
+ 'type' => 'select',
415
+ 'title' => __('AD Size', 'redux-framework-demo'),
416
+ 'required' => array('enable-amp-ads-1', '=' , '1'),
417
+ // Must provide key => value pairs for select options
418
+ 'options' => array(
419
+ '1' => '300x250',
420
+ '2' => '336x280',
421
+ '3' => '728x90',
422
+ '4' => '300x600',
423
+ '5' => '320x100',
424
+ '6' => '200x50',
425
+ '7' => '320x50'
426
+ ),
427
+ 'default' => '2',
428
  ),
429
+ array(
430
+ 'id' =>'enable-amp-ads-text-feild-client-1',
431
+ 'type' => 'text',
432
+ 'required' => array('enable-amp-ads-1', '=' , '1'),
433
+ 'title' => __('Data AD Client', 'redux-framework-demo'),
434
+ 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
435
+ 'default' => '',
436
+ 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
437
+ ),
438
+ array(
439
+ 'id' => 'enable-amp-ads-text-feild-slot-1',
440
+ 'type' => 'text',
441
+ 'title' => __('Data AD Slot', 'redux-framework-demo'),
442
+ 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
443
+ 'default' => '',
444
+ 'required' => array('enable-amp-ads-1', '=' , '1'),
445
+ 'placeholder'=> '70XXXXXX12'
446
+ ),
447
+ // Ad 1 ends
448
+
449
+ // Ad 2 Starts
450
+ array(
451
+ 'id'=>'enable-amp-ads-2',
452
+ 'type' => 'switch',
453
+ 'title' => __('AD #2', 'redux-framework-demo'),
454
+ 'default' => 0,
455
+ 'subtitle' => __('Below the Footer (SiteWide)', 'redux-framework-demo'),
456
+ 'true' => 'Enabled',
457
+ 'false' => 'Disabled',
458
+ ),
459
+ array(
460
+ 'id' => 'enable-amp-ads-select-2',
461
+ 'type' => 'select',
462
+ 'title' => __('AD Size', 'redux-framework-demo'),
463
+ 'required' => array('enable-amp-ads-2', '=' , '1'),
464
+ // Must provide key => value pairs for select options
465
+ 'options' => array(
466
+ '1' => '300x250',
467
+ '2' => '336x280',
468
+ '3' => '728x90',
469
+ '4' => '300x600',
470
+ '5' => '320x100',
471
+ '6' => '200x50',
472
+ '7' => '320x50'
473
+ ),
474
+ 'default' => '2',
475
+ ),
476
+ array(
477
+ 'id' =>'enable-amp-ads-text-feild-client-2',
478
+ 'type' => 'text',
479
+ 'required' => array('enable-amp-ads-2', '=' , '1'),
480
+ 'title' => __('Data AD Client', 'redux-framework-demo'),
481
+ 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
482
+ 'default' => '',
483
+ 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
484
+ ),
485
+ array(
486
+ 'id' => 'enable-amp-ads-text-feild-slot-2',
487
+ 'type' => 'text',
488
+ 'title' => __('Data AD Slot', 'redux-framework-demo'),
489
+ 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
490
+ 'default' => '',
491
+ 'required' => array('enable-amp-ads-2', '=' , '1'),
492
+ 'placeholder'=> '70XXXXXX12'
493
+ ),
494
+ // Ad 2 ends
495
+
496
+ // Ad 3 starts
497
+ array(
498
+ 'id' => 'enable-amp-ads-3',
499
+ 'type' => 'switch',
500
+ 'title' => __('AD #3', 'redux-framework-demo'),
501
+ 'default' => 0,
502
+ 'subtitle' => __('Above the Post Content (Single Post)', 'redux-framework-demo'),
503
+ 'true' => 'Enabled',
504
+ 'false' => 'Disabled',
505
+ ),
506
+ array(
507
+ 'id' => 'enable-amp-ads-select-3',
508
+ 'type' => 'select',
509
+ 'title' => __('AD Size', 'redux-framework-demo'),
510
+ 'required' => array('enable-amp-ads-3', '=' , '1'),
511
+ // Must provide key => value pairs for select options
512
+ 'options' => array(
513
+ '1' => '300x250',
514
+ '2' => '336x280',
515
+ '3' => '728x90',
516
+ '4' => '300x600',
517
+ '5' => '320x100',
518
+ '6' => '200x50',
519
+ '7' => '320x50'
520
+ ),
521
+ 'default' => '2',
522
+ ),
523
+ array(
524
+ 'id' =>'enable-amp-ads-text-feild-client-3',
525
+ 'type' => 'text',
526
+ 'required' => array('enable-amp-ads-3', '=' , '1'),
527
+ 'title' => __('Data AD Client', 'redux-framework-demo'),
528
+ 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
529
+ 'default' => '',
530
+ 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
531
+ ),
532
+ array(
533
+ 'id' => 'enable-amp-ads-text-feild-slot-3',
534
+ 'type' => 'text',
535
+ 'title' => __('Data AD Slot', 'redux-framework-demo'),
536
+ 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'redux-framework-demo'),
537
+ 'default' => '',
538
+ 'required' => array('enable-amp-ads-3', '=' , '1'),
539
+ 'placeholder'=> '70XXXXXX12'
540
+ ),
541
+ // Ad 3 ends
542
 
543
+ // Ad 4 Starts
544
+ array(
545
+ 'id' => 'enable-amp-ads-4',
546
  'type' => 'switch',
547
+ 'title' => __('AD #4', 'redux-framework-demo'),
548
  'default' => 0,
549
+ 'subtitle' => __('Below the Post Content (Single Post)', 'redux-framework-demo'),
550
  'true' => 'Enabled',
551
  'false' => 'Disabled',
552
  ),
553
+ array(
554
+ 'id' => 'enable-amp-ads-select-4',
555
+ 'type' => 'select',
556
+ 'title' => __('AD Size', 'redux-framework-demo'),
557
+ 'required' => array('enable-amp-ads-4', '=' , '1'),
558
+ // Must provide key => value pairs for select options
559
+ 'options' => array(
560
+ '1' => '300x250',
561
+ '2' => '336x280',
562
+ '3' => '728x90',
563
+ '4' => '300x600',
564
  '5' => '320x100',
565
  '6' => '200x50',
566
  '7' => '320x50'
567
+ ),
568
+ 'default' => '2',
569
  ),
570
+ array(
571
+ 'id' =>'enable-amp-ads-text-feild-client-4',
572
+ 'type' => 'text',
573
+ 'required' => array('enable-amp-ads-4', '=' , '1'),
574
+ 'title' => __('Data AD Client', 'redux-framework-demo'),
575
+ 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'redux-framework-demo'),
576
+ 'default' => '',
577
+ 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
  ),
579
+ array(
580
+ 'id' => 'enable-amp-ads-text-feild-slot-4',
581
+ 'type' => 'text',
582
+ 'title' => __('Data AD Slot', 'redux-framework-demo'),
583
+ 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'redux-framework-demo'),
584
+ 'default' => '',
585
+ 'required' => array('enable-amp-ads-4', '=' , '1'),
586
+ 'placeholder'=> '70XXXXXX12'
587
+ )
588
+ // Ad 4 ends
589
+ ),
590
+ ) );
591
+ }
 
 
 
 
 
 
 
 
 
 
 
592
 
593
  // Single Section
594
  Redux::setSection( $opt_name, array(
includes/options/admin-init.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- // // Load the TGM init if it exists
3
- // if ( file_exists( dirname( __FILE__ ) . '/tgm/tgm-init.php' ) ) {
4
- // require_once dirname( __FILE__ ) . '/tgm/tgm-init.php';
5
- // }
6
- //
7
- // Load the embedded Redux Framework
8
- if ( ! class_exists( 'ReduxFramework' )) {
9
- if ( file_exists( dirname( __FILE__ ).'/redux-framework/framework.php' ) ) {
10
- require_once dirname(__FILE__).'/redux-framework/framework.php';
11
- }
12
- }
13
-
14
- // Load the theme/plugin options
15
- if ( file_exists( dirname( __FILE__ ) . '/options-init.php' ) ) {
16
- require_once dirname( __FILE__ ) . '/options-init.php';
17
- }
18
-
19
- // Load Redux extensions
20
- if ( file_exists( dirname( __FILE__ ) . '/redux-extensions/extensions-init.php' ) ) {
21
- require_once dirname( __FILE__ ) . '/redux-extensions/extensions-init.php';
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/options/{redux-framework → redux-core}/assets/css/color-picker/color-picker.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/color-picker/color-picker.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/import_export/import_export.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/media/media.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/media/media.scss RENAMED
File without changes
includes/options/redux-core/assets/css/redux-admin.css ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .spinner{visibility:hidden;display:block}.spinner.is-active{visibility:visible}.redux-main .description{margin-top:7px}.form-table>tbody>tr>th{width:30%}.redux-container{background-color:#f5f5f5;background-repeat:repeat-x;background-image:-moz-linear-gradient(top, #f2f2f2 0%, #f5f5f5 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f2f2f2), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #f2f2f2 0%, #f5f5f5 100%);background-image:-ms-linear-gradient(top, #f2f2f2 0%, #f5f5f5 100%);background-image:-o-linear-gradient(top, #f2f2f2 0%, #f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#eeeeee', GradientType=0);background-image:-linear-gradient(top, #f2f2f2 0%, #f5f5f5 100%);border:1px solid #dedede;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.4);margin-top:5px;overflow:hidden}.redux-container a:focus{box-shadow:none}.redux-container #redux-header,.redux-container #redux-footer{text-align:right;padding:6px 10px}.redux-container #redux-header{background:#f1f1f1;border-bottom:3px solid blue}.redux-container #redux-header .display_header{float:left;margin:20px 10px}.redux-container #redux-header .display_header h2{display:inline-block;font-style:normal;padding-right:5px}.redux-container #redux-header .display_header .redux-dev-mode-notice-container{position:absolute;top:67px;left:20px;bottom:auto;width:auto}.redux-container #redux-header .display_header span{color:#888}.redux-container #redux-header .display_header span.redux-dev-mode-notice{background-color:#f0ad4e;display:inline;padding:.2em .5em .2em;font-weight:700;line-height:1;color:#fff !important;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.redux-container #redux-header .icon32{float:right;margin:16px 16px 0}.redux-container #redux-footer{border-top:1px solid #E7E7E7;z-index:999}.redux-container #redux-footer #redux-share{float:left;line-height:28px;font-size:15px}.redux-container #redux-footer #redux-share a{text-decoration:none;margin-right:10px}.redux-container #redux-footer #redux-share a img{margin-bottom:-3px}.redux-container .notice-green{margin:0;border-bottom:1px solid #E7E7E7;background-color:#DFF0D8;color:#468847;padding:8px 35px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.redux-container .notice-blue{margin:0;border-bottom:1px solid #BCE8F1;background-color:#D9EDF7;color:#3A87AD;padding:8px 35px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.redux-container .notice-yellow{margin:0;border-bottom:1px solid #E7E7E7;background-color:#FCF8E3;color:#C09853;padding:8px 35px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.redux-container .notice-red,.redux-container .redux-field-errors{margin:0;border-bottom:1px solid #E7E7E7;background-color:#F2DEDE;color:#B94A48;padding:8px 35px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.redux-container .redux-field-error input,.redux-container .redux-field-error textarea,.redux-container .redux-field-error checkbox{background-color:#FFF6F6;color:#A00}.redux-container .redux-field-warning input,.redux-container .redux-field-warning textarea,.redux-container .redux-field-warning checkbox{background-color:#fcf8e3;color:#444}.redux-container .redux-field-errors,.redux-container .redux-field-warnings,.redux-container .redux-save-warn{display:none}.redux-container .sticky-save-warn{min-height:76px}.redux-container .sticky-save-warn .redux-save-warn{position:fixed;top:32px;right:21px;left:183px;opacity:1;z-index:9999}.redux-container #info_bar{background:#f3f3f3;border-bottom:1px solid #dedede;padding:6px 10px 6px 6px;text-align:right;-moz-box-shadow:inset 0 1px 0 #fcfcfc;-webkit-box-shadow:inset 0 1px 0 #fcfcfc;box-shadow:inset 0 1px 0 #fcfcfc}.redux-container .redux-group-tab{display:none;margin-bottom:15px}.redux-container .redux-group-tab .redux-theme-data{padding:20px 0;border-top:1px solid #E7E7E7}.redux-container .redux-group-tab .redux-theme-data.theme-description{padding:10px 0;border-width:0}.redux-container .redux-group-tab .redux-theme-data.theme-uri,.redux-container .redux-group-tab .redux-theme-data.theme-author,.redux-container .redux-group-tab .redux-theme-data.theme-version{padding:0;border-width:0}.redux-container .redux-group-tab h3{margin-top:0;line-height:2em;border-bottom:1px solid #E7E7E7}.redux-container .redux-group-tab .redux-section-desc{margin-bottom:15px;color:#666}.redux-container .redux-action_bar{float:right}.redux-container .redux-action_bar .spinner{float:left;margin-top:4px}.redux-container .redux-ajax-loading{display:none;background:red url(data:image/gif;base64,R0lGODlhEAAQAPUAAIiIiIqKio2NjZSUlJqamp6enqKioqSkpK+vr7i4uL+/v8PDw8XFxcnJyc/Pz9HR0dTU1NjY2Nzc3OLi4ubm5unp6ezs7PPz88vLy83NzdDQ0NXV1d3d3eHh4bu7u8zMzOvr6+3t7ZiYmNbW1sDAwMTExNra2s7OztPT09vb2+Xl5QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/i1NYWRlIGJ5IEtyYXNpbWlyYSBOZWpjaGV2YSAod3d3LmxvYWRpbmZvLm5ldCkAIfkEAAoA/wAsAAAAABAAEAAABXDgJY6XZZEoOTnOlI5WdUFNA5UnSR3FJNUSieFAIUUEgcdl4noEBBGSZaHIiSqKhTX2GhVFiQGjuxgkSoYAoosAGE6RhKQrUURHlS+pItMVCHMjEgQ9JBJISg+JT3ciFg4NFkcCNw0OViiDgF0oTC8hACH5BAAKAP8ALAAAAAAQABAAAAVx4CWOZGle1qJYp2hV1xYE29V1JXUYHWUcnQgGwyFFBAENiqUZ1kapFamTyeBcsNOLMkoMGC3GIIEyBBAtRMDAiiSKp04iQqpwc9kRpUCAizgEBVciEQNJFxpKGgECdFAYYBsCAjUMGS0XgAODmDacIyEAIfkEAAoA/wAsAAAAABAAEAAABnbAi3BILBovIMUidBSGQJdNIKBBMomUg6FDMRgoHcOBQowIqNaLJiCIEEMLxdWpnIfITRAHnxgwjiEfDR8UIQYBCEcgDYwdUR6ORxEfG3MgeFiFRB0FBBxEHAQFkUJmaBofamxuRB9/GwICGxeMTRehnrabpERBACH5BAAKAP8ALAAAAAAQABAAAAZ9wItwSCwaL5aFwnIUWiqXUSAwulSYRMrB0KEYDJSO4UAhRgQBDZLpCAgixOSSWFEssEho81IWJgYMTQwDCUgGAQhNCAEGTCMJHU0dCXBDFX1DFhwdeHwFIhxmGBihQxEDaRcOGhYao1WZGIFnAiMUDg6YRR0ioE57Fx2RRkEAIfkEAAoA/wAsAAAAABAAEAAABXLgJY5kaV7WolinaLGQEEBXxZLUUUyUYVATw4FCisg0NZYmIIiQUosKqaJY3FDS1oUoSgwYrcUggTIAEC1EwMCKJCatSYI2qnBx2dGkQOCQOAQFdxdGARoVGhCITE4kGBgWEI8QFgwYWhGTWiMWERFXIyEAIfkEAAoA/wAsAAAAABAAEAAABn/Ai3BILBovloXCchRaKpdRIDC6VJhEysHQoRgMlI7hQCFGBAENkukICCLE5JJYUSywSGjzUhYmBgxNDAMJSAYBCE0IAAZMEQkdTRwKVUMcHHhCFXpDERgYcJYEBZFDI58aFhoOFxpuoUIUGhoUZwJVGA6ZaxccBAQce0QdpUVBACH5BAAKAP8ALAAAAAAQABAAAAZ8wItwSCwaLyEFKXQUhioXSCAAuVSYRMrB0KEYDJSO4UAhmgQBDZKpCQhMxFBJgRVWlFkOtElhUj4NH3VEJQMJFx0NintFCAEGISEQH3BHHR5VThVlRRSMQh0FBBxEHAQFnEJnaRcfHxdtb0WKIWcCVSUNTYgEo7tEHR1HQQAh+QQACgD/ACwAAAAAEAAQAAAGdcCLcEgsGi8hhSJ0FHY6l1EgMLqAmEROo5HqGAwqL5g42qKsoAsqIEgRVacTdAhSLLBI1bWpwiYGDE0MAwlIBgEITQgBBkwjCRxNHQlVdCpGekUqBQSRQxwEBZdDKQIBZ3FqbG5EDYEjpikhW3hFoJ1NRU9HQQA7) no-repeat;width:16px;height:16px;margin:3px 4px 0;float:right}.redux-container #redux-intro-text{background:#f3f3f3;border-bottom:1px solid #dedede;-moz-box-shadow:inset 0 1px 0 #fcfcfc;-webkit-box-shadow:inset 0 1px 0 #fcfcfc;box-shadow:inset 0 1px 0 #fcfcfc;padding:3px;padding:10px 10px}.redux-container #redux-intro-text p{margin:0;font-family:"Lucida Grande", Sans-serif;color:#888}.redux-container .expand_options{cursor:pointer;display:block;height:22px;width:21px;float:left;font-size:0;text-indent:-9999px;margin:1px 0 0 5px;border:1px solid #bbb;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAyCAIAAAAm4OfBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQhJREFUeNrslT0KhDAQhTeLR7ATT6IXSKGFYO0lciFrO1N4AU8TLNXKv0CaJbLJRAZxl1hYyJuXN+PoR/Z9fyFdBNNr27Zf8Oq6bhgGSGUYhpTSzyeBNi8hRFVVEK+6rrXaQFOs6yrvTdOYjcqyVEpTLqXI89yaSypBudq2xckF2TipOSvfmmhZFuAGnJV6Licvey5gj7fnwpwXvEfLfqnT0jQ1OBJCQLnUBvZ9b85VFAV076UU8g1ZckVRxBiDzD6OY62WzPOM9i+cpunvvcZxfCQfPWs9a91Ym2UZ5xyHtd/e8hXWng+/zlrD9jmz1tDj7bkw5wXv0Y210itJEs9az9oHsPYQYACveK0/IuB51AAAAABJRU5ErkJggg==) no-repeat -2px -26px}.redux-container .expand_options.expanded{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAyCAIAAAAm4OfBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQhJREFUeNrslT0KhDAQhTeLR7ATT6IXSKGFYO0lciFrO1N4AU8TLNXKv0CaJbLJRAZxl1hYyJuXN+PoR/Z9fyFdBNNr27Zf8Oq6bhgGSGUYhpTSzyeBNi8hRFVVEK+6rrXaQFOs6yrvTdOYjcqyVEpTLqXI89yaSypBudq2xckF2TipOSvfmmhZFuAGnJV6Licvey5gj7fnwpwXvEfLfqnT0jQ1OBJCQLnUBvZ9b85VFAV076UU8g1ZckVRxBiDzD6OY62WzPOM9i+cpunvvcZxfCQfPWs9a91Ym2UZ5xyHtd/e8hXWng+/zlrD9jmz1tDj7bkw5wXv0Y210itJEs9az9oHsPYQYACveK0/IuB51AAAAABJRU5ErkJggg==) no-repeat -2px -1px}.redux-container .expand_options:hover{border-color:#888}.redux-container .sticky-footer-fixed{background:#f3f3f3;border-top:1px solid #dedede !important;-moz-box-shadow:inset 0 1px 0 #fcfcfc;-webkit-box-shadow:inset 0 1px 0 #fcfcfc;box-shadow:inset 0 1px 0 #fcfcfc}.redux-container .redux-sidebar,.redux-container .redux-main{min-height:300px}.no-js{border:1px solid #ffbaba;margin:0;border-bottom:1px solid #E7E7E7;background-color:#F2DEDE;color:#B94A48;padding:8px 35px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.redux-main{background:#FCFCFC;margin-left:201px;border-left:1px solid #D8D8D8;padding:10px 20px;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #FFF;box-shadow:inset 0 1px 0 #FFF;position:relative}.redux-main #redux_ajax_overlay{position:absolute;top:0;left:0;right:0;bottom:0;-moz-opacity:0.10;-khtml-opacity:0.10;opacity:0.10;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=10);filter:alpha(opacity=10);background:#000;z-index:200;display:none}.redux-main .form-table.no-border{border-top:none}.redux-main .form-table tr{border-bottom:1px solid #E7E7E7}.redux-main .form-table tr:last-child{border-bottom:none !important}.redux-main .form-table tr th,.redux-main .form-table tr td{color:#333}.redux-main .form-table tr td table.mceLayout,.redux-main .form-table tr td table.mceLayout tr,.redux-main .form-table tr td table.mceLayout tr td{padding:0;border-width:0}.redux-main .form-table tr td .redux-th-warning{font-size:1em;color:#C09853;font-weight:normal;display:block;margin-top:10px}.redux-main .form-table tr td .redux-field-warning{border-color:#C09853;margin-top:10px}.redux-main .form-table tr td .redux-th-error{font-size:1em;color:#B94A48;font-weight:normal;display:block;margin-top:10px}.redux-main input.large-text{width:100%}.redux-main .hide{display:none}.redux-main .redux-field-container{padding:20px 0}.redux-main .mini,.redux-main input[type=text].mini{width:60px;text-align:center}.redux-main input{line-height:19px}.redux-main img{max-width:100%;height:auto;width:auto !important}.redux-main .select2-default{width:auto !important}.redux-main .showDefaults{display:block;font-weight:normal;font-size:.8em;color:#888}.redux-main span.description{display:block;font-style:normal;font-weight:400}.redux-main #redux-system-info textarea{min-height:730px;width:100%}.redux-main .field-desc{clear:both;font-size:13px}.redux-main .data-full li{width:100%}.redux-main .data-half li{width:50%;float:left}.redux-main .data-third li{width:33.3%;float:left}.redux-main .data-quarter li{width:25%;float:left}.redux-main .ui-helper-hidden-accessible{top:inherit}.redux-main .form-table{clear:none;margin-top:0px !important}.redux-main .form-table tr:first-child th,.redux-main .form-table tr:first-child td{padding-top:0}.redux-main .input-append input{border-right:0;margin-bottom:0;border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0;float:left;margin-top:0;display:block}.redux-main .input-append .add-on{border-top-right-radius:3px;border-bottom-right-radius:3px;margin-left:-2px;padding-top:4px !important;padding-bottom:2px !important}.redux-main .input-prepend input{border-left:0;margin-bottom:0;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0;padding-top:2px;padding-bottom:5px;float:left;margin-top:0;display:block}.redux-main .input-prepend .add-on{border-top-left-radius:3px;border-bottom-left-radius:3px;float:left}.redux-main .input-append{margin-right:10px;font-size:0;white-space:nowrap;float:left;display:inline-block;margin-bottom:6px}.redux-main .input-append .add-on,.redux-main .input-prepend .add-on{width:auto;display:inline-block;min-width:16px;padding:3px 4px;font-size:12px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #cccccc}.redux-main .input-prepend{font-size:0;white-space:nowrap;float:left;display:inline-block;margin-bottom:6px}.redux-sidebar{width:202px;float:left}.redux-sidebar .redux-group-menu{margin-top:0 !important}.redux-sidebar .redux-group-menu li{margin-top:0}.redux-sidebar .redux-group-menu li.active a,.redux-sidebar .redux-group-menu li.active a:hover,.redux-sidebar .redux-group-menu li.activeChild a,.redux-sidebar .redux-group-menu li.activeChild a:hover{background:#FCFCFC;color:#269ad6;width:184px;opacity:1}.redux-sidebar .redux-group-menu li.active a li a{background:#333;padding-left:5px}.redux-sidebar .redux-group-menu li.divide{padding:0;border-width:1px 0;border-style:solid;border-bottom-color:#E7E7E7;border-top-color:#F9F9F9}.redux-sidebar .redux-group-menu li a:first-child{border-top:none}.redux-sidebar .redux-group-menu li a{display:block;padding:10px 4px 10px 14px;background:#e0e0e0;background:transparent;border-width:1px 0;border-style:solid;border-bottom-color:#E7E7E7;border-top-color:#F9F9F9;opacity:0.7;color:#555;font-weight:600;text-decoration:none;-webkit-transition:none;transition:none}.redux-sidebar .redux-group-menu li a.custom-tab{background:#f6f6f6}.redux-sidebar .redux-group-menu li a img{width:16px;height:16px;position:absolute;left:15px}.redux-sidebar .redux-group-menu li a:hover{background:#e5e5e5;color:#777;opacity:1}.redux-sidebar .redux-menu-warning,.redux-sidebar .redux-menu-error,.redux-sidebar .hasSubSections .extraIconSubsections{display:inline-block;float:right;padding:6px 7px 4px 7px;margin-left:4px;font-family:sans-serif;font-size:9px;font-weight:600;line-height:9px;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent}.redux-sidebar .redux-menu-warning i,.redux-sidebar .redux-menu-error i,.redux-sidebar .hasSubSections .extraIconSubsections i{margin-left:-3px;margin-top:-3px}.redux-sidebar .redux-menu-error{background-color:#b94a48;color:#f2dede}.redux-sidebar .redux-menu-warning{background-color:#C09853;color:#FCF8E3}.redux-sidebar ul .subsection{display:none}.redux-sidebar .redux-group-tab-link-a{position:relative;outline:0}.redux-sidebar .redux-group-tab-link-a i{vertical-align:middle;font-size:1.35em;position:absolute}.redux-sidebar .redux-group-tab-link-a span{display:block}.redux-sidebar .redux-group-tab-link-a span.group_title{padding-left:30px}.redux-sidebar .redux-group-tab-link-li a.hasError span.group_title{padding-right:25px}.redux-sidebar #redux-header{text-align:center}.redux-sidebar #redux-header .display_header{float:none}.form-table th,.form-table td{margin:0;padding:0;width:auto}.redux_field_th{font-weight:600;padding:20px 10px 20px 0px;display:block}.redux_field_th span:first-child{font-weight:normal;display:block;color:#666}.farb-popup-wrapper{position:relative;display:block}.farb-popup{position:absolute;left:40px;top:40px;background-color:white;border:1px solid #222;padding:5px;z-index:100}#ui-datepicker-div{display:none}.mp6 .icon-themes{display:none}.mp6 .redux-container #info_bar{padding:6px 10px 6px 6px}.mp6 .redux-container #info_bar a{margin-top:2px}.redux-timer{text-align:center;font-size:10px;color:#888}.wrap{margin-top:0}@media screen and (max-width: 600px){.redux-sidebar{width:44px}.redux-sidebar .extraIconSubsections{display:none !important}.redux-sidebar .redux-group-menu li a,.redux-sidebar .redux-group-menu li a:hover,.redux-sidebar .redux-group-menu li.active a,.redux-sidebar .redux-group-menu li.active a:hover,.redux-sidebar .redux-group-menu li.activeChild a,.redux-sidebar .redux-group-menu li.activeChild a:hover{width:auto}.redux-sidebar .redux-group-tab-link-a{position:relative}.redux-sidebar .redux-group-tab-link-a i{position:inherit}.redux-sidebar .redux-group-tab-link-a span{display:none;position:absolute;top:0;left:44px;padding:12px;width:200px;background:#eeeeee;border:1px solid #ccc;-webkit-box-shadow:2px 2px 8px rgba(0,0,0,0.2);-moz-box-shadow:2px 2px 8px rgba(0,0,0,0.2);box-shadow:2px 2px 8px rgba(0,0,0,0.2);border-width:1px 1px 1px 0px;z-index:3}.redux-sidebar .redux-group-tab-link-a:hover>span{display:block}.redux-main{margin-left:43px;width:auto;max-width:100%}table.form-table,.form-table>thead,.form-table>tbody,.form-table>tbody>tr>th,.form-table>tbody>tr>td,.form-table>tbody>tr{display:block;width:100% !important;padding:0px !important}.form-table>tbody>tr>th,.form-table>tbody>tr>td{padding:10px !important}.form-table>tbody>tr>th,.form-table>tbody>tr>td{padding:10px !important}}@media screen and (max-width: 782px){.form-table>tbody>tr>th{width:100%}.redux_field_th{padding-bottom:0}.mp6 .redux-container #info_bar{height:auto;padding-bottom:1px}.mp6 .redux-container #info_bar a{margin-top:5px}.redux-container-switch label{padding:5px 10px !important}.redux-container-button_set label{padding:12px 10px}.redux-container #redux-footer #redux-share{line-height:34px}}pre{overflow:hidden}#redux-header h2{color:#fff}.admin-color-fresh .button.ui-datepicker-current,.admin-color-fresh button.ui-datepicker-close,.wp-customizer .button.ui-datepicker-current,.wp-customizer button.ui-datepicker-close{background-color:#007db9 !important}.admin-color-fresh .ui-datepicker-buttonpane button.ui-datepicker-current,.wp-customizer .ui-datepicker-buttonpane button.ui-datepicker-current{background:#1e8cbe !important;color:white !important;border:1px solid #104b66 !important}.admin-color-fresh .ui-datepicker-header .ui-icon,.wp-customizer .ui-datepicker-header .ui-icon{background-image:url(data:image/png;base64,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) !important}.admin-color-fresh .ui-datepicker-header,.wp-customizer .ui-datepicker-header{background-color:#23282d !important;color:white !important}.admin-color-fresh .ui-datepicker td .ui-state-active,.wp-customizer .ui-datepicker td .ui-state-active{background-color:#007db9 !important;color:white !important}.admin-color-fresh .ui-datepicker td .ui-state-hover,.wp-customizer .ui-datepicker td .ui-state-hover{color:#007db9 !important}.admin-color-fresh .ui-datepicker td .ui-state-highlight,.wp-customizer .ui-datepicker td .ui-state-highlight{background:#0073aa !important;border:1px solid #23282d !important;color:white !important}.admin-color-fresh .redux-container-switch .cb-disable,.admin-color-fresh .redux-container-switch .cb-enable,.admin-color-fresh .ui-state-default,.admin-color-fresh .ui-widget-content .ui-state-default,.admin-color-fresh .ui-widget-header .ui-state-default,.wp-customizer .redux-container-switch .cb-disable,.wp-customizer .redux-container-switch .cb-enable,.wp-customizer .ui-state-default,.wp-customizer .ui-widget-content .ui-state-default,.wp-customizer .ui-widget-header .ui-state-default{background-color:#f5f5f5 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important;background-image:-moz-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-ms-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important;background-image:-webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-o-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-linear-gradient(top, #f8f8f8, #f5f5f5) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f5f5f5', GradientType=0) !important;border-color:#ccc !important}.admin-color-fresh .ui-datepicker td .ui-state-active,.wp-customizer .ui-datepicker td .ui-state-active{color:black !important;font-weight:700 !important;background:white !important}.admin-color-fresh .redux-container-switch .cb-disable.selected,.wp-customizer .redux-container-switch .cb-disable.selected{background-color:#646464 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important;background-image:-moz-linear-gradient(top, #929292, #646464) !important;background-image:-ms-linear-gradient(top, #929292, #646464) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important;background-image:-webkit-linear-gradient(top, #929292, #646464) !important;background-image:-o-linear-gradient(top, #929292, #646464) !important;background-image:-linear-gradient(top, #929292, #646464) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#929292', endColorstr='#646464', GradientType=0) !important;border-color:#767676 !important}.admin-color-fresh .redux-container-switch .cb-enable.selected,.admin-color-fresh .redux-field-container .ui-buttonset .ui-state-active,.wp-customizer .redux-container-switch .cb-enable.selected,.wp-customizer .redux-field-container .ui-buttonset .ui-state-active{background-color:#0073aa !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#008bce), to(#0073aa)) !important;background-image:-moz-linear-gradient(top, #008bce, #0073aa) !important;background-image:-ms-linear-gradient(top, #008bce, #0073aa) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #008bce), color-stop(100%, #0073aa)) !important;background-image:-webkit-linear-gradient(top, #008bce, #0073aa) !important;background-image:-o-linear-gradient(top, #008bce, #0073aa) !important;background-image:-linear-gradient(top, #008bce, #0073aa) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#008bce', endColorstr='#0073aa', GradientType=0) !important;border-color:#003f5d !important;border-color:#005077 !important;-webkit-box-shadow:inset 0 1px 0 #00a7f6,0 1px 0 rgba(0,0,0,0.15) !important;box-shadow:inset 0 1px 0 #00a7f6,0 1px 0 rgba(0,0,0,0.15) !important}.admin-color-fresh #redux-header,.wp-customizer #redux-header{background:#23282d;border-color:#0073aa}.admin-color-fresh #redux-header .display_header span,.wp-customizer #redux-header .display_header span{color:#a0a5aa}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections a{position:relative}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a:after,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after{border:0 none !important;content:"\0020" !important}.admin-color-fresh .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error,.wp-customizer .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error{display:none;margin-right:5px}.admin-color-fresh .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections,.wp-customizer .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections{background-color:#b94a48;color:#f2dede}.admin-color-fresh .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections,.wp-customizer .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent;font-size:9px;height:9px;line-height:9px;margin-right:5px;padding:6px 7px 4px 7px;width:5px}.admin-color-fresh .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections,.wp-customizer .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections{display:none}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error{display:block}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error{margin-right:2px}.admin-color-fresh .redux-sidebar .redux-group-menu li.active,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild,.wp-customizer .redux-sidebar .redux-group-menu li.active,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild{border-left:0 none}.admin-color-fresh .redux-sidebar .redux-group-menu li.active a,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild a,.wp-customizer .redux-sidebar .redux-group-menu li.active a,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild a{color:#23282d}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections a,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{-webkit-transition:all 0.2s;-moz-transition:all 0.2s;transition:all 0.2s;color:#fff;width:auto;border-bottom:0}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li{border-top:0 none !important}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover{color:#fff}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{width:auto;border-top:0 !important;padding:7px;color:#fff;padding-left:15px;-webkit-transition:all 0.2;-moz-transition:all 0.2;-ms-transition:all 0.2;-o-transition:all 0.2;transition:all 0.2}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{color:#1e8cbe;background:#0d0e10}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title{padding-left:5px !important}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a{padding-left:14px}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title{padding-left:30px !important}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections a{background:#0073aa}.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{background:#23282d}.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{background:#a0a5aa;text-shadow:1px 1px #54595d}.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{background:#23282d;text-shadow:none}.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a,.wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{background:#0073aa;text-shadow:1px 1px #002e44}.admin-color-fresh .redux-container-image_select .redux-image-select-selected img,.wp-customizer .redux-container-image_select .redux-image-select-selected img{border-color:#0073aa}.admin-color-fresh #redux-footer #redux-share a,.wp-customizer #redux-footer #redux-share a{color:#0073aa}.admin-color-fresh #redux-footer #redux-share a:hover,.wp-customizer #redux-footer #redux-share a:hover{color:#002e44}.admin-color-fresh .select2-results .select2-highlighted,.wp-customizer .select2-results .select2-highlighted{background:#0073aa}.admin-color-fresh .select2-drop-active,.admin-color-fresh .select2-container-multi.select2-container-active .select2-choices,.admin-color-fresh .select2-drop.select2-drop-above.select2-drop-active,.admin-color-fresh .select2-container-active .select2-choice,.admin-color-fresh .select2-container-active .select2-choices,.admin-color-fresh .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-fresh .select2-dropdown-open.select2-drop-above .select2-choices,.wp-customizer .select2-drop-active,.wp-customizer .select2-container-multi.select2-container-active .select2-choices,.wp-customizer .select2-drop.select2-drop-above.select2-drop-active,.wp-customizer .select2-container-active .select2-choice,.wp-customizer .select2-container-active .select2-choices,.wp-customizer .select2-dropdown-open.select2-drop-above .select2-choice,.wp-customizer .select2-dropdown-open.select2-drop-above .select2-choices{border-color:#0073aa}.admin-color-fresh .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-fresh .select2-dropdown-open.select2-drop-above .select2-choices,.wp-customizer .select2-dropdown-open.select2-drop-above .select2-choice,.wp-customizer .select2-dropdown-open.select2-drop-above .select2-choices{border-top:inherit}.admin-color-fresh .noUi-connect,.wp-customizer .noUi-connect{background-color:#007db9 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#0095dd), to(#007db9)) !important;background-image:-moz-linear-gradient(top, #0095dd, #007db9) !important;background-image:-ms-linear-gradient(top, #0095dd, #007db9) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #0095dd), color-stop(100%, #007db9)) !important;background-image:-webkit-linear-gradient(top, #0095dd, #007db9) !important;background-image:-o-linear-gradient(top, #0095dd, #007db9) !important;background-image:-linear-gradient(top, #0095dd, #007db9) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0095dd', endColorstr='#007db9', GradientType=0) !important}.admin-color-light .button.ui-datepicker-current,.admin-color-light button.ui-datepicker-close{background-color:#04b0db !important}.admin-color-light .ui-datepicker-buttonpane button.ui-datepicker-current{background:#0384a4 !important;color:white !important;border:1px solid #013340 !important}.admin-color-light .ui-datepicker-header .ui-icon{background-image:url(data:image/png;base64,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) !important}.admin-color-light .ui-datepicker-header{background-color:#888 !important;color:white !important}.admin-color-light .ui-datepicker td .ui-state-active{background-color:#04b0db !important;color:white !important}.admin-color-light .ui-datepicker td .ui-state-hover{color:#04b0db !important}.admin-color-light .ui-datepicker td .ui-state-highlight{background:#04a4cc !important;border:1px solid #888 !important;color:white !important}.admin-color-light .redux-container-switch .cb-disable,.admin-color-light .redux-container-switch .cb-enable,.admin-color-light .ui-state-default,.admin-color-light .ui-widget-content .ui-state-default,.admin-color-light .ui-widget-header .ui-state-default{background-color:#f5f5f5 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important;background-image:-moz-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-ms-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important;background-image:-webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-o-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-linear-gradient(top, #f8f8f8, #f5f5f5) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f5f5f5', GradientType=0) !important;border-color:#ccc !important}.admin-color-light .ui-datepicker td .ui-state-active{color:black !important;font-weight:700 !important;background:white !important}.admin-color-light .redux-container-switch .cb-disable.selected{background-color:#646464 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important;background-image:-moz-linear-gradient(top, #929292, #646464) !important;background-image:-ms-linear-gradient(top, #929292, #646464) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important;background-image:-webkit-linear-gradient(top, #929292, #646464) !important;background-image:-o-linear-gradient(top, #929292, #646464) !important;background-image:-linear-gradient(top, #929292, #646464) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#929292', endColorstr='#646464', GradientType=0) !important;border-color:#767676 !important}.admin-color-light .redux-container-switch .cb-enable.selected,.admin-color-light .redux-field-container .ui-buttonset .ui-state-active{background-color:#04a4cc !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#05c0ef), to(#04a4cc)) !important;background-image:-moz-linear-gradient(top, #05c0ef, #04a4cc) !important;background-image:-ms-linear-gradient(top, #05c0ef, #04a4cc) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #05c0ef), color-stop(100%, #04a4cc)) !important;background-image:-webkit-linear-gradient(top, #05c0ef, #04a4cc) !important;background-image:-o-linear-gradient(top, #05c0ef, #04a4cc) !important;background-image:-linear-gradient(top, #05c0ef, #04a4cc) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#05c0ef', endColorstr='#04a4cc', GradientType=0) !important;border-color:#036881 !important;border-color:#037c9a !important;-webkit-box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,0.15) !important;box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,0.15) !important}.admin-color-light #redux-header{background:#888;border-color:#04a4cc}.admin-color-light #redux-header .display_header span{color:#e6e6e6}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections a{position:relative}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after{border:0 none !important;content:"\0020" !important}.admin-color-light .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error{display:none;margin-right:5px}.admin-color-light .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections{background-color:#b94a48;color:#f2dede}.admin-color-light .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent;font-size:9px;height:9px;line-height:9px;margin-right:5px;padding:6px 7px 4px 7px;width:5px}.admin-color-light .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections{display:none}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error{display:block}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error{margin-right:2px}.admin-color-light .redux-sidebar .redux-group-menu li.active,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild{border-left:0 none}.admin-color-light .redux-sidebar .redux-group-menu li.active a,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild a{color:#888}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections a,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{-webkit-transition:all 0.2s;-moz-transition:all 0.2s;transition:all 0.2s;color:#fff;width:auto;border-bottom:0}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li{border-top:0 none !important}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover{color:#fff}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{width:auto;border-top:0 !important;padding:7px;color:#fff;padding-left:15px;-webkit-transition:all 0.2;-moz-transition:all 0.2;-ms-transition:all 0.2;-o-transition:all 0.2;transition:all 0.2}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{color:#0384a4;background:#6f6f6f}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title{padding-left:5px !important}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a{padding-left:14px}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title{padding-left:30px !important}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections a{background:#04a4cc}.admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{background:#888}.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{background:#e6e6e6;text-shadow:1px 1px #9a9a9a}.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{background:#888;text-shadow:none}.admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{background:#04a4cc;text-shadow:1px 1px #025468}.admin-color-light .redux-container-image_select .redux-image-select-selected img{border-color:#04a4cc}.admin-color-light #redux-footer #redux-share a{color:#04a4cc}.admin-color-light #redux-footer #redux-share a:hover{color:#025468}.admin-color-light .select2-results .select2-highlighted{background:#04a4cc}.admin-color-light .select2-drop-active,.admin-color-light .select2-container-multi.select2-container-active .select2-choices,.admin-color-light .select2-drop.select2-drop-above.select2-drop-active,.admin-color-light .select2-container-active .select2-choice,.admin-color-light .select2-container-active .select2-choices,.admin-color-light .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-light .select2-dropdown-open.select2-drop-above .select2-choices{border-color:#04a4cc}.admin-color-light .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-light .select2-dropdown-open.select2-drop-above .select2-choices{border-top:inherit}.admin-color-light .noUi-connect{background-color:#04b0db !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#09cafa), to(#04b0db)) !important;background-image:-moz-linear-gradient(top, #09cafa, #04b0db) !important;background-image:-ms-linear-gradient(top, #09cafa, #04b0db) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #09cafa), color-stop(100%, #04b0db)) !important;background-image:-webkit-linear-gradient(top, #09cafa, #04b0db) !important;background-image:-o-linear-gradient(top, #09cafa, #04b0db) !important;background-image:-linear-gradient(top, #09cafa, #04b0db) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#09cafa', endColorstr='#04b0db', GradientType=0) !important}.admin-color-blue .button.ui-datepicker-current,.admin-color-blue button.ui-datepicker-close{background-color:#509dba !important}.admin-color-blue .ui-datepicker-buttonpane button.ui-datepicker-current{background:#db9825 !important;color:white !important;border:1px solid #845c16 !important}.admin-color-blue .ui-datepicker-header .ui-icon{background-image:url(data:image/png;base64,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) !important}.admin-color-blue .ui-datepicker-header{background-color:#096484 !important;color:white !important}.admin-color-blue .ui-datepicker td .ui-state-active{background-color:#509dba !important;color:white !important}.admin-color-blue .ui-datepicker td .ui-state-hover{color:#509dba !important}.admin-color-blue .ui-datepicker td .ui-state-highlight{background:#4796b3 !important;border:1px solid #096484 !important;color:white !important}.admin-color-blue .redux-container-switch .cb-disable,.admin-color-blue .redux-container-switch .cb-enable,.admin-color-blue .ui-state-default,.admin-color-blue .ui-widget-content .ui-state-default,.admin-color-blue .ui-widget-header .ui-state-default{background-color:#f5f5f5 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important;background-image:-moz-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-ms-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important;background-image:-webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-o-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-linear-gradient(top, #f8f8f8, #f5f5f5) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f5f5f5', GradientType=0) !important;border-color:#ccc !important}.admin-color-blue .ui-datepicker td .ui-state-active{color:black !important;font-weight:700 !important;background:white !important}.admin-color-blue .redux-container-switch .cb-disable.selected{background-color:#646464 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important;background-image:-moz-linear-gradient(top, #929292, #646464) !important;background-image:-ms-linear-gradient(top, #929292, #646464) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important;background-image:-webkit-linear-gradient(top, #929292, #646464) !important;background-image:-o-linear-gradient(top, #929292, #646464) !important;background-image:-linear-gradient(top, #929292, #646464) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#929292', endColorstr='#646464', GradientType=0) !important;border-color:#767676 !important}.admin-color-blue .redux-container-switch .cb-enable.selected,.admin-color-blue .redux-field-container .ui-buttonset .ui-state-active{background-color:#4796b3 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#5ea5bf), to(#4796b3)) !important;background-image:-moz-linear-gradient(top, #5ea5bf, #4796b3) !important;background-image:-ms-linear-gradient(top, #5ea5bf, #4796b3) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5ea5bf), color-stop(100%, #4796b3)) !important;background-image:-webkit-linear-gradient(top, #5ea5bf, #4796b3) !important;background-image:-o-linear-gradient(top, #5ea5bf, #4796b3) !important;background-image:-linear-gradient(top, #5ea5bf, #4796b3) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5ea5bf', endColorstr='#4796b3', GradientType=0) !important;border-color:#31687c !important;border-color:#39778e !important;-webkit-box-shadow:inset 0 1px 0 #7cb6cb,0 1px 0 rgba(0,0,0,0.15) !important;box-shadow:inset 0 1px 0 #7cb6cb,0 1px 0 rgba(0,0,0,0.15) !important}.admin-color-blue #redux-header{background:#096484;border-color:#4796b3}.admin-color-blue #redux-header .display_header span{color:#e2ecf1}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections a{position:relative}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after{border:0 none !important;content:"\0020" !important}.admin-color-blue .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error{display:none;margin-right:5px}.admin-color-blue .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections{background-color:#b94a48;color:#f2dede}.admin-color-blue .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent;font-size:9px;height:9px;line-height:9px;margin-right:5px;padding:6px 7px 4px 7px;width:5px}.admin-color-blue .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections{display:none}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error{display:block}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error{margin-right:2px}.admin-color-blue .redux-sidebar .redux-group-menu li.active,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild{border-left:0 none}.admin-color-blue .redux-sidebar .redux-group-menu li.active a,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild a{color:#096484}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections a,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{-webkit-transition:all 0.2s;-moz-transition:all 0.2s;transition:all 0.2s;color:#fff;width:auto;border-bottom:0}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li{border-top:0 none !important}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover{color:#fff}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{width:auto;border-top:0 !important;padding:7px;color:#fff;padding-left:15px;-webkit-transition:all 0.2;-moz-transition:all 0.2;-ms-transition:all 0.2;-o-transition:all 0.2;transition:all 0.2}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{color:#db9825;background:#064054}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title{padding-left:5px !important}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a{padding-left:14px}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title{padding-left:30px !important}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections a{background:#4796b3}.admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{background:#096484}.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{background:#e2ecf1;text-shadow:1px 1px #7ba8bf}.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{background:#096484;text-shadow:none}.admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{background:#4796b3;text-shadow:1px 1px #2a596a}.admin-color-blue .redux-container-image_select .redux-image-select-selected img{border-color:#4796b3}.admin-color-blue #redux-footer #redux-share a{color:#4796b3}.admin-color-blue #redux-footer #redux-share a:hover{color:#2a596a}.admin-color-blue .select2-results .select2-highlighted{background:#4796b3}.admin-color-blue .select2-drop-active,.admin-color-blue .select2-container-multi.select2-container-active .select2-choices,.admin-color-blue .select2-drop.select2-drop-above.select2-drop-active,.admin-color-blue .select2-container-active .select2-choice,.admin-color-blue .select2-container-active .select2-choices,.admin-color-blue .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-blue .select2-dropdown-open.select2-drop-above .select2-choices{border-color:#4796b3}.admin-color-blue .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-blue .select2-dropdown-open.select2-drop-above .select2-choices{border-top:inherit}.admin-color-blue .noUi-connect{background-color:#509dba !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#69abc4), to(#509dba)) !important;background-image:-moz-linear-gradient(top, #69abc4, #509dba) !important;background-image:-ms-linear-gradient(top, #69abc4, #509dba) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #69abc4), color-stop(100%, #509dba)) !important;background-image:-webkit-linear-gradient(top, #69abc4, #509dba) !important;background-image:-o-linear-gradient(top, #69abc4, #509dba) !important;background-image:-linear-gradient(top, #69abc4, #509dba) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#69abc4', endColorstr='#509dba', GradientType=0) !important}.admin-color-coffee .button.ui-datepicker-current,.admin-color-coffee button.ui-datepicker-close{background-color:#ccad93 !important}.admin-color-coffee .ui-datepicker-buttonpane button.ui-datepicker-current{background:#ba906d !important;color:white !important;border:1px solid #835d3e !important}.admin-color-coffee .ui-datepicker-header .ui-icon{background-image:url(data:image/png;base64,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) !important}.admin-color-coffee .ui-datepicker-header{background-color:#46403c !important;color:white !important}.admin-color-coffee .ui-datepicker td .ui-state-active{background-color:#ccad93 !important;color:white !important}.admin-color-coffee .ui-datepicker td .ui-state-hover{color:#ccad93 !important}.admin-color-coffee .ui-datepicker td .ui-state-highlight{background:#c7a589 !important;border:1px solid #46403c !important;color:white !important}.admin-color-coffee .redux-container-switch .cb-disable,.admin-color-coffee .redux-container-switch .cb-enable,.admin-color-coffee .ui-state-default,.admin-color-coffee .ui-widget-content .ui-state-default,.admin-color-coffee .ui-widget-header .ui-state-default{background-color:#f5f5f5 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important;background-image:-moz-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-ms-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important;background-image:-webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-o-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-linear-gradient(top, #f8f8f8, #f5f5f5) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f5f5f5', GradientType=0) !important;border-color:#ccc !important}.admin-color-coffee .ui-datepicker td .ui-state-active{color:black !important;font-weight:700 !important;background:white !important}.admin-color-coffee .redux-container-switch .cb-disable.selected{background-color:#646464 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important;background-image:-moz-linear-gradient(top, #929292, #646464) !important;background-image:-ms-linear-gradient(top, #929292, #646464) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important;background-image:-webkit-linear-gradient(top, #929292, #646464) !important;background-image:-o-linear-gradient(top, #929292, #646464) !important;background-image:-linear-gradient(top, #929292, #646464) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#929292', endColorstr='#646464', GradientType=0) !important;border-color:#767676 !important}.admin-color-coffee .redux-container-switch .cb-enable.selected,.admin-color-coffee .redux-field-container .ui-buttonset .ui-state-active{background-color:#c7a589 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#d2b7a1), to(#c7a589)) !important;background-image:-moz-linear-gradient(top, #d2b7a1, #c7a589) !important;background-image:-ms-linear-gradient(top, #d2b7a1, #c7a589) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #d2b7a1), color-stop(100%, #c7a589)) !important;background-image:-webkit-linear-gradient(top, #d2b7a1, #c7a589) !important;background-image:-o-linear-gradient(top, #d2b7a1, #c7a589) !important;background-image:-linear-gradient(top, #d2b7a1, #c7a589) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d2b7a1', endColorstr='#c7a589', GradientType=0) !important;border-color:#ae7d55 !important;border-color:#b78b66 !important;-webkit-box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,0.15) !important;box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,0.15) !important}.admin-color-coffee #redux-header{background:#46403c;border-color:#c7a589}.admin-color-coffee #redux-header .display_header span{color:#cdcbc9}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections a{position:relative}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after{border:0 none !important;content:"\0020" !important}.admin-color-coffee .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error{display:none;margin-right:5px}.admin-color-coffee .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections{background-color:#b94a48;color:#f2dede}.admin-color-coffee .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent;font-size:9px;height:9px;line-height:9px;margin-right:5px;padding:6px 7px 4px 7px;width:5px}.admin-color-coffee .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections{display:none}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error{display:block}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error{margin-right:2px}.admin-color-coffee .redux-sidebar .redux-group-menu li.active,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild{border-left:0 none}.admin-color-coffee .redux-sidebar .redux-group-menu li.active a,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild a{color:#46403c}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections a,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{-webkit-transition:all 0.2s;-moz-transition:all 0.2s;transition:all 0.2s;color:#fff;width:auto;border-bottom:0}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li{border-top:0 none !important}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover{color:#fff}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{width:auto;border-top:0 !important;padding:7px;color:#fff;padding-left:15px;-webkit-transition:all 0.2;-moz-transition:all 0.2;-ms-transition:all 0.2;-o-transition:all 0.2;transition:all 0.2}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{color:#ba906d;background:#2b2724}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title{padding-left:5px !important}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a{padding-left:14px}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title{padding-left:30px !important}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections a{background:#c7a589}.admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{background:#46403c}.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{background:#cdcbc9;text-shadow:1px 1px #837e7a}.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{background:#46403c;text-shadow:none}.admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{background:#c7a589;text-shadow:1px 1px #9f714b}.admin-color-coffee .redux-container-image_select .redux-image-select-selected img{border-color:#c7a589}.admin-color-coffee #redux-footer #redux-share a{color:#c7a589}.admin-color-coffee #redux-footer #redux-share a:hover{color:#9f714b}.admin-color-coffee .select2-results .select2-highlighted{background:#c7a589}.admin-color-coffee .select2-drop-active,.admin-color-coffee .select2-container-multi.select2-container-active .select2-choices,.admin-color-coffee .select2-drop.select2-drop-above.select2-drop-active,.admin-color-coffee .select2-container-active .select2-choice,.admin-color-coffee .select2-container-active .select2-choices,.admin-color-coffee .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-coffee .select2-dropdown-open.select2-drop-above .select2-choices{border-color:#c7a589}.admin-color-coffee .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-coffee .select2-dropdown-open.select2-drop-above .select2-choices{border-top:inherit}.admin-color-coffee .noUi-connect{background-color:#ccad93 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#d7bfac), to(#ccad93)) !important;background-image:-moz-linear-gradient(top, #d7bfac, #ccad93) !important;background-image:-ms-linear-gradient(top, #d7bfac, #ccad93) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #d7bfac), color-stop(100%, #ccad93)) !important;background-image:-webkit-linear-gradient(top, #d7bfac, #ccad93) !important;background-image:-o-linear-gradient(top, #d7bfac, #ccad93) !important;background-image:-linear-gradient(top, #d7bfac, #ccad93) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d7bfac', endColorstr='#ccad93', GradientType=0) !important}.admin-color-ectoplasm .button.ui-datepicker-current,.admin-color-ectoplasm button.ui-datepicker-close{background-color:#a9bd4f !important}.admin-color-ectoplasm .ui-datepicker-buttonpane button.ui-datepicker-current{background:#89993a !important;color:white !important;border:1px solid #474f1e !important}.admin-color-ectoplasm .ui-datepicker-header .ui-icon{background-image:url(data:image/png;base64,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) !important}.admin-color-ectoplasm .ui-datepicker-header{background-color:#413256 !important;color:white !important}.admin-color-ectoplasm .ui-datepicker td .ui-state-active{background-color:#a9bd4f !important;color:white !important}.admin-color-ectoplasm .ui-datepicker td .ui-state-hover{color:#a9bd4f !important}.admin-color-ectoplasm .ui-datepicker td .ui-state-highlight{background:#a3b745 !important;border:1px solid #413256 !important;color:white !important}.admin-color-ectoplasm .redux-container-switch .cb-disable,.admin-color-ectoplasm .redux-container-switch .cb-enable,.admin-color-ectoplasm .ui-state-default,.admin-color-ectoplasm .ui-widget-content .ui-state-default,.admin-color-ectoplasm .ui-widget-header .ui-state-default{background-color:#f5f5f5 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important;background-image:-moz-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-ms-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important;background-image:-webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-o-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-linear-gradient(top, #f8f8f8, #f5f5f5) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f5f5f5', GradientType=0) !important;border-color:#ccc !important}.admin-color-ectoplasm .ui-datepicker td .ui-state-active{color:black !important;font-weight:700 !important;background:white !important}.admin-color-ectoplasm .redux-container-switch .cb-disable.selected{background-color:#646464 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important;background-image:-moz-linear-gradient(top, #929292, #646464) !important;background-image:-ms-linear-gradient(top, #929292, #646464) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important;background-image:-webkit-linear-gradient(top, #929292, #646464) !important;background-image:-o-linear-gradient(top, #929292, #646464) !important;background-image:-linear-gradient(top, #929292, #646464) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#929292', endColorstr='#646464', GradientType=0) !important;border-color:#767676 !important}.admin-color-ectoplasm .redux-container-switch .cb-enable.selected,.admin-color-ectoplasm .redux-field-container .ui-buttonset .ui-state-active{background-color:#a3b745 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#b0c25e), to(#a3b745)) !important;background-image:-moz-linear-gradient(top, #b0c25e, #a3b745) !important;background-image:-ms-linear-gradient(top, #b0c25e, #a3b745) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #b0c25e), color-stop(100%, #a3b745)) !important;background-image:-webkit-linear-gradient(top, #b0c25e, #a3b745) !important;background-image:-o-linear-gradient(top, #b0c25e, #a3b745) !important;background-image:-linear-gradient(top, #b0c25e, #a3b745) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b0c25e', endColorstr='#a3b745', GradientType=0) !important;border-color:#727f30 !important;border-color:#829237 !important;-webkit-box-shadow:inset 0 1px 0 #bfcd7b,0 1px 0 rgba(0,0,0,0.15) !important;box-shadow:inset 0 1px 0 #bfcd7b,0 1px 0 rgba(0,0,0,0.15) !important}.admin-color-ectoplasm #redux-header{background:#413256;border-color:#a3b745}.admin-color-ectoplasm #redux-header .display_header span{color:#cbc5d3}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections a{position:relative}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after{border:0 none !important;content:"\0020" !important}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error{display:none;margin-right:5px}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections{background-color:#b94a48;color:#f2dede}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent;font-size:9px;height:9px;line-height:9px;margin-right:5px;padding:6px 7px 4px 7px;width:5px}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections{display:none}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error{display:block}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error{margin-right:2px}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild{border-left:0 none}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active a,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild a{color:#413256}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections a,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{-webkit-transition:all 0.2s;-moz-transition:all 0.2s;transition:all 0.2s;color:#fff;width:auto;border-bottom:0}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li{border-top:0 none !important}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover{color:#fff}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{width:auto;border-top:0 !important;padding:7px;color:#fff;padding-left:15px;-webkit-transition:all 0.2;-moz-transition:all 0.2;-ms-transition:all 0.2;-o-transition:all 0.2;transition:all 0.2}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{color:#89993a;background:#291f36}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title{padding-left:5px !important}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a{padding-left:14px}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title{padding-left:30px !important}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections a{background:#a3b745}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{background:#413256}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{background:#cbc5d3;text-shadow:1px 1px #7d6e91}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{background:#413256;text-shadow:none}.admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{background:#a3b745;text-shadow:1px 1px #616d29}.admin-color-ectoplasm .redux-container-image_select .redux-image-select-selected img{border-color:#a3b745}.admin-color-ectoplasm #redux-footer #redux-share a{color:#a3b745}.admin-color-ectoplasm #redux-footer #redux-share a:hover{color:#616d29}.admin-color-ectoplasm .select2-results .select2-highlighted{background:#a3b745}.admin-color-ectoplasm .select2-drop-active,.admin-color-ectoplasm .select2-container-multi.select2-container-active .select2-choices,.admin-color-ectoplasm .select2-drop.select2-drop-above.select2-drop-active,.admin-color-ectoplasm .select2-container-active .select2-choice,.admin-color-ectoplasm .select2-container-active .select2-choices,.admin-color-ectoplasm .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-ectoplasm .select2-dropdown-open.select2-drop-above .select2-choices{border-color:#a3b745}.admin-color-ectoplasm .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-ectoplasm .select2-dropdown-open.select2-drop-above .select2-choices{border-top:inherit}.admin-color-ectoplasm .noUi-connect{background-color:#a9bd4f !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#b6c669), to(#a9bd4f)) !important;background-image:-moz-linear-gradient(top, #b6c669, #a9bd4f) !important;background-image:-ms-linear-gradient(top, #b6c669, #a9bd4f) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #b6c669), color-stop(100%, #a9bd4f)) !important;background-image:-webkit-linear-gradient(top, #b6c669, #a9bd4f) !important;background-image:-o-linear-gradient(top, #b6c669, #a9bd4f) !important;background-image:-linear-gradient(top, #b6c669, #a9bd4f) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b6c669', endColorstr='#a9bd4f', GradientType=0) !important}.admin-color-midnight .button.ui-datepicker-current,.admin-color-midnight button.ui-datepicker-close{background-color:#e35950 !important}.admin-color-midnight .ui-datepicker-buttonpane button.ui-datepicker-current{background:#d92c23 !important;color:white !important;border:1px solid #811a15 !important}.admin-color-midnight .ui-datepicker-header .ui-icon{background-image:url(data:image/png;base64,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) !important}.admin-color-midnight .ui-datepicker-header{background-color:#363b3f !important;color:white !important}.admin-color-midnight .ui-datepicker td .ui-state-active{background-color:#e35950 !important;color:white !important}.admin-color-midnight .ui-datepicker td .ui-state-hover{color:#e35950 !important}.admin-color-midnight .ui-datepicker td .ui-state-highlight{background:#e14d43 !important;border:1px solid #363b3f !important;color:white !important}.admin-color-midnight .redux-container-switch .cb-disable,.admin-color-midnight .redux-container-switch .cb-enable,.admin-color-midnight .ui-state-default,.admin-color-midnight .ui-widget-content .ui-state-default,.admin-color-midnight .ui-widget-header .ui-state-default{background-color:#f5f5f5 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important;background-image:-moz-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-ms-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important;background-image:-webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-o-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-linear-gradient(top, #f8f8f8, #f5f5f5) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f5f5f5', GradientType=0) !important;border-color:#ccc !important}.admin-color-midnight .ui-datepicker td .ui-state-active{color:black !important;font-weight:700 !important;background:white !important}.admin-color-midnight .redux-container-switch .cb-disable.selected{background-color:#646464 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important;background-image:-moz-linear-gradient(top, #929292, #646464) !important;background-image:-ms-linear-gradient(top, #929292, #646464) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important;background-image:-webkit-linear-gradient(top, #929292, #646464) !important;background-image:-o-linear-gradient(top, #929292, #646464) !important;background-image:-linear-gradient(top, #929292, #646464) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#929292', endColorstr='#646464', GradientType=0) !important;border-color:#767676 !important}.admin-color-midnight .redux-container-switch .cb-enable.selected,.admin-color-midnight .redux-field-container .ui-buttonset .ui-state-active{background-color:#e14d43 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#e66a62), to(#e14d43)) !important;background-image:-moz-linear-gradient(top, #e66a62, #e14d43) !important;background-image:-ms-linear-gradient(top, #e66a62, #e14d43) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #e66a62), color-stop(100%, #e14d43)) !important;background-image:-webkit-linear-gradient(top, #e66a62, #e14d43) !important;background-image:-o-linear-gradient(top, #e66a62, #e14d43) !important;background-image:-linear-gradient(top, #e66a62, #e14d43) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e66a62', endColorstr='#e14d43', GradientType=0) !important;border-color:#ba281e !important;border-color:#d02c21 !important;-webkit-box-shadow:inset 0 1px 0 #ec8b85,0 1px 0 rgba(0,0,0,0.15) !important;box-shadow:inset 0 1px 0 #ec8b85,0 1px 0 rgba(0,0,0,0.15) !important}.admin-color-midnight #redux-header{background:#363b3f;border-color:#e14d43}.admin-color-midnight #redux-header .display_header span{color:#c2c4c5}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections a{position:relative}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after{border:0 none !important;content:"\0020" !important}.admin-color-midnight .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error{display:none;margin-right:5px}.admin-color-midnight .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections{background-color:#b94a48;color:#f2dede}.admin-color-midnight .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent;font-size:9px;height:9px;line-height:9px;margin-right:5px;padding:6px 7px 4px 7px;width:5px}.admin-color-midnight .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections{display:none}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error{display:block}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error{margin-right:2px}.admin-color-midnight .redux-sidebar .redux-group-menu li.active,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild{border-left:0 none}.admin-color-midnight .redux-sidebar .redux-group-menu li.active a,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild a{color:#363b3f}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections a,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{-webkit-transition:all 0.2s;-moz-transition:all 0.2s;transition:all 0.2s;color:#fff;width:auto;border-bottom:0}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li{border-top:0 none !important}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover{color:#fff}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{width:auto;border-top:0 !important;padding:7px;color:#fff;padding-left:15px;-webkit-transition:all 0.2;-moz-transition:all 0.2;-ms-transition:all 0.2;-o-transition:all 0.2;transition:all 0.2}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{color:#d92c23;background:#1e2124}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title{padding-left:5px !important}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a{padding-left:14px}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title{padding-left:30px !important}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections a{background:#e14d43}.admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{background:#363b3f}.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{background:#c2c4c5;text-shadow:1px 1px #74787a}.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{background:#363b3f;text-shadow:none}.admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{background:#e14d43;text-shadow:1px 1px #a4231a}.admin-color-midnight .redux-container-image_select .redux-image-select-selected img{border-color:#e14d43}.admin-color-midnight #redux-footer #redux-share a{color:#e14d43}.admin-color-midnight #redux-footer #redux-share a:hover{color:#a4231a}.admin-color-midnight .select2-results .select2-highlighted{background:#e14d43}.admin-color-midnight .select2-drop-active,.admin-color-midnight .select2-container-multi.select2-container-active .select2-choices,.admin-color-midnight .select2-drop.select2-drop-above.select2-drop-active,.admin-color-midnight .select2-container-active .select2-choice,.admin-color-midnight .select2-container-active .select2-choices,.admin-color-midnight .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-midnight .select2-dropdown-open.select2-drop-above .select2-choices{border-color:#e14d43}.admin-color-midnight .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-midnight .select2-dropdown-open.select2-drop-above .select2-choices{border-top:inherit}.admin-color-midnight .noUi-connect{background-color:#e35950 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#e8776f), to(#e35950)) !important;background-image:-moz-linear-gradient(top, #e8776f, #e35950) !important;background-image:-ms-linear-gradient(top, #e8776f, #e35950) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #e8776f), color-stop(100%, #e35950)) !important;background-image:-webkit-linear-gradient(top, #e8776f, #e35950) !important;background-image:-o-linear-gradient(top, #e8776f, #e35950) !important;background-image:-linear-gradient(top, #e8776f, #e35950) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e8776f', endColorstr='#e35950', GradientType=0) !important}.admin-color-ocean .button.ui-datepicker-current,.admin-color-ocean button.ui-datepicker-close{background-color:#a7c0a9 !important}.admin-color-ocean .ui-datepicker-buttonpane button.ui-datepicker-current{background:#86a988 !important;color:white !important;border:1px solid #547555 !important}.admin-color-ocean .ui-datepicker-header .ui-icon{background-image:url(data:image/png;base64,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) !important}.admin-color-ocean .ui-datepicker-header{background-color:#627c83 !important;color:white !important}.admin-color-ocean .ui-datepicker td .ui-state-active{background-color:#a7c0a9 !important;color:white !important}.admin-color-ocean .ui-datepicker td .ui-state-hover{color:#a7c0a9 !important}.admin-color-ocean .ui-datepicker td .ui-state-highlight{background:#9ebaa0 !important;border:1px solid #627c83 !important;color:white !important}.admin-color-ocean .redux-container-switch .cb-disable,.admin-color-ocean .redux-container-switch .cb-enable,.admin-color-ocean .ui-state-default,.admin-color-ocean .ui-widget-content .ui-state-default,.admin-color-ocean .ui-widget-header .ui-state-default{background-color:#f5f5f5 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important;background-image:-moz-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-ms-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important;background-image:-webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-o-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-linear-gradient(top, #f8f8f8, #f5f5f5) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f5f5f5', GradientType=0) !important;border-color:#ccc !important}.admin-color-ocean .ui-datepicker td .ui-state-active{color:black !important;font-weight:700 !important;background:white !important}.admin-color-ocean .redux-container-switch .cb-disable.selected{background-color:#646464 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important;background-image:-moz-linear-gradient(top, #929292, #646464) !important;background-image:-ms-linear-gradient(top, #929292, #646464) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important;background-image:-webkit-linear-gradient(top, #929292, #646464) !important;background-image:-o-linear-gradient(top, #929292, #646464) !important;background-image:-linear-gradient(top, #929292, #646464) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#929292', endColorstr='#646464', GradientType=0) !important;border-color:#767676 !important}.admin-color-ocean .redux-container-switch .cb-enable.selected,.admin-color-ocean .redux-field-container .ui-buttonset .ui-state-active{background-color:#9ebaa0 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#b3c9b4), to(#9ebaa0)) !important;background-image:-moz-linear-gradient(top, #b3c9b4, #9ebaa0) !important;background-image:-ms-linear-gradient(top, #b3c9b4, #9ebaa0) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #b3c9b4), color-stop(100%, #9ebaa0)) !important;background-image:-webkit-linear-gradient(top, #b3c9b4, #9ebaa0) !important;background-image:-o-linear-gradient(top, #b3c9b4, #9ebaa0) !important;background-image:-linear-gradient(top, #b3c9b4, #9ebaa0) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3c9b4', endColorstr='#9ebaa0', GradientType=0) !important;border-color:#719a74 !important;border-color:#80a583 !important;-webkit-box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,0.15) !important;box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,0.15) !important}.admin-color-ocean #redux-header{background:#627c83;border-color:#9ebaa0}.admin-color-ocean #redux-header .display_header span{color:#d5dddf}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections a{position:relative}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after{border:0 none !important;content:"\0020" !important}.admin-color-ocean .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error{display:none;margin-right:5px}.admin-color-ocean .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections{background-color:#b94a48;color:#f2dede}.admin-color-ocean .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent;font-size:9px;height:9px;line-height:9px;margin-right:5px;padding:6px 7px 4px 7px;width:5px}.admin-color-ocean .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections{display:none}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error{display:block}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error{margin-right:2px}.admin-color-ocean .redux-sidebar .redux-group-menu li.active,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild{border-left:0 none}.admin-color-ocean .redux-sidebar .redux-group-menu li.active a,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild a{color:#627c83}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections a,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{-webkit-transition:all 0.2s;-moz-transition:all 0.2s;transition:all 0.2s;color:#fff;width:auto;border-bottom:0}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li{border-top:0 none !important}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover{color:#fff}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{width:auto;border-top:0 !important;padding:7px;color:#fff;padding-left:15px;-webkit-transition:all 0.2;-moz-transition:all 0.2;-ms-transition:all 0.2;-o-transition:all 0.2;transition:all 0.2}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{color:#86a988;background:#4c6066}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title{padding-left:5px !important}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a{padding-left:14px}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title{padding-left:30px !important}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections a{background:#9ebaa0}.admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{background:#627c83}.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{background:#d5dddf;text-shadow:1px 1px #7e979d}.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{background:#627c83;text-shadow:none}.admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{background:#9ebaa0;text-shadow:1px 1px #658d68}.admin-color-ocean .redux-container-image_select .redux-image-select-selected img{border-color:#9ebaa0}.admin-color-ocean #redux-footer #redux-share a{color:#9ebaa0}.admin-color-ocean #redux-footer #redux-share a:hover{color:#658d68}.admin-color-ocean .select2-results .select2-highlighted{background:#9ebaa0}.admin-color-ocean .select2-drop-active,.admin-color-ocean .select2-container-multi.select2-container-active .select2-choices,.admin-color-ocean .select2-drop.select2-drop-above.select2-drop-active,.admin-color-ocean .select2-container-active .select2-choice,.admin-color-ocean .select2-container-active .select2-choices,.admin-color-ocean .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-ocean .select2-dropdown-open.select2-drop-above .select2-choices{border-color:#9ebaa0}.admin-color-ocean .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-ocean .select2-dropdown-open.select2-drop-above .select2-choices{border-top:inherit}.admin-color-ocean .noUi-connect{background-color:#a7c0a9 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#bccfbd), to(#a7c0a9)) !important;background-image:-moz-linear-gradient(top, #bccfbd, #a7c0a9) !important;background-image:-ms-linear-gradient(top, #bccfbd, #a7c0a9) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #bccfbd), color-stop(100%, #a7c0a9)) !important;background-image:-webkit-linear-gradient(top, #bccfbd, #a7c0a9) !important;background-image:-o-linear-gradient(top, #bccfbd, #a7c0a9) !important;background-image:-linear-gradient(top, #bccfbd, #a7c0a9) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bccfbd', endColorstr='#a7c0a9', GradientType=0) !important}.admin-color-sunrise .button.ui-datepicker-current,.admin-color-sunrise button.ui-datepicker-close{background-color:#df8a48 !important}.admin-color-sunrise .ui-datepicker-buttonpane button.ui-datepicker-current{background:#cc6c23 !important;color:white !important;border:1px solid #753e14 !important}.admin-color-sunrise .ui-datepicker-header .ui-icon{background-image:url(data:image/png;base64,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) !important}.admin-color-sunrise .ui-datepicker-header{background-color:#b43c38 !important;color:white !important}.admin-color-sunrise .ui-datepicker td .ui-state-active{background-color:#df8a48 !important;color:white !important}.admin-color-sunrise .ui-datepicker td .ui-state-hover{color:#df8a48 !important}.admin-color-sunrise .ui-datepicker td .ui-state-highlight{background:#dd823b !important;border:1px solid #b43c38 !important;color:white !important}.admin-color-sunrise .redux-container-switch .cb-disable,.admin-color-sunrise .redux-container-switch .cb-enable,.admin-color-sunrise .ui-state-default,.admin-color-sunrise .ui-widget-content .ui-state-default,.admin-color-sunrise .ui-widget-header .ui-state-default{background-color:#f5f5f5 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5)) !important;background-image:-moz-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-ms-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f8f8f8), color-stop(100%, #f5f5f5)) !important;background-image:-webkit-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-o-linear-gradient(top, #f8f8f8, #f5f5f5) !important;background-image:-linear-gradient(top, #f8f8f8, #f5f5f5) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f5f5f5', GradientType=0) !important;border-color:#ccc !important}.admin-color-sunrise .ui-datepicker td .ui-state-active{color:black !important;font-weight:700 !important;background:white !important}.admin-color-sunrise .redux-container-switch .cb-disable.selected{background-color:#646464 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464)) !important;background-image:-moz-linear-gradient(top, #929292, #646464) !important;background-image:-ms-linear-gradient(top, #929292, #646464) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #929292), color-stop(100%, #646464)) !important;background-image:-webkit-linear-gradient(top, #929292, #646464) !important;background-image:-o-linear-gradient(top, #929292, #646464) !important;background-image:-linear-gradient(top, #929292, #646464) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#929292', endColorstr='#646464', GradientType=0) !important;border-color:#767676 !important}.admin-color-sunrise .redux-container-switch .cb-enable.selected,.admin-color-sunrise .redux-field-container .ui-buttonset .ui-state-active{background-color:#dd823b !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#e29559), to(#dd823b)) !important;background-image:-moz-linear-gradient(top, #e29559, #dd823b) !important;background-image:-ms-linear-gradient(top, #e29559, #dd823b) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #e29559), color-stop(100%, #dd823b)) !important;background-image:-webkit-linear-gradient(top, #e29559, #dd823b) !important;background-image:-o-linear-gradient(top, #e29559, #dd823b) !important;background-image:-linear-gradient(top, #e29559, #dd823b) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e29559', endColorstr='#dd823b', GradientType=0) !important;border-color:#ad5d1e !important;border-color:#c36922 !important;-webkit-box-shadow:inset 0 1px 0 #e8ac7c,0 1px 0 rgba(0,0,0,0.15) !important;box-shadow:inset 0 1px 0 #e8ac7c,0 1px 0 rgba(0,0,0,0.15) !important}.admin-color-sunrise #redux-header{background:#b43c38;border-color:#dd823b}.admin-color-sunrise #redux-header .display_header span{color:#f0c8c6}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections a{position:relative}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:after{border:0 none !important;content:"\0020" !important}.admin-color-sunrise .redux-sidebar .redux-group-menu li.hasSubSections .redux-menu-error{display:none;margin-right:5px}.admin-color-sunrise .redux-sidebar .redux-group-menu li.hasSubSections a.hasError .extraIconSubsections{background-color:#b94a48;color:#f2dede}.admin-color-sunrise .redux-sidebar .redux-group-menu li.hasSubSections a .extraIconSubsections{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border:0 solid transparent;font-size:9px;height:9px;line-height:9px;margin-right:5px;padding:6px 7px 4px 7px;width:5px}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active a .extraIconSubsections,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild a .extraIconSubsections{display:none}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections .redux-menu-error,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .redux-menu-error{display:block}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections .subsection .redux-menu-error,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .subsection .redux-menu-error{margin-right:2px}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild{border-left:0 none}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active a,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild a{color:#b43c38}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after{right:0;border:solid 8px transparent;content:"\0020";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections a,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{-webkit-transition:all 0.2s;-moz-transition:all 0.2s;transition:all 0.2s;color:#fff;width:auto;border-bottom:0}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li{border-top:0 none !important}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.active a:hover,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a:hover{color:#fff}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{width:auto;border-top:0 !important;padding:7px;color:#fff;padding-left:15px;-webkit-transition:all 0.2;-moz-transition:all 0.2;-ms-transition:all 0.2;-o-transition:all 0.2;transition:all 0.2}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{color:#cc6c23;background:#8d2f2c}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a span.group_title,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a span.group_title{padding-left:5px !important}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a{padding-left:14px}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li.hasIcon a span.group_title,.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.hasIcon a span.group_title{padding-left:30px !important}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections a{background:#dd823b}.admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{background:#b43c38}.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{background:#f0c8c6;text-shadow:1px 1px #d0534d}.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{background:#b43c38;text-shadow:none}.admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{background:#dd823b;text-shadow:1px 1px #98511a}.admin-color-sunrise .redux-container-image_select .redux-image-select-selected img{border-color:#dd823b}.admin-color-sunrise #redux-footer #redux-share a{color:#dd823b}.admin-color-sunrise #redux-footer #redux-share a:hover{color:#98511a}.admin-color-sunrise .select2-results .select2-highlighted{background:#dd823b}.admin-color-sunrise .select2-drop-active,.admin-color-sunrise .select2-container-multi.select2-container-active .select2-choices,.admin-color-sunrise .select2-drop.select2-drop-above.select2-drop-active,.admin-color-sunrise .select2-container-active .select2-choice,.admin-color-sunrise .select2-container-active .select2-choices,.admin-color-sunrise .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-sunrise .select2-dropdown-open.select2-drop-above .select2-choices{border-color:#dd823b}.admin-color-sunrise .select2-dropdown-open.select2-drop-above .select2-choice,.admin-color-sunrise .select2-dropdown-open.select2-drop-above .select2-choices{border-top:inherit}.admin-color-sunrise .noUi-connect{background-color:#df8a48 !important;background-image:-khtml-gradient(linear, left top, left bottom, from(#e59e66), to(#df8a48)) !important;background-image:-moz-linear-gradient(top, #e59e66, #df8a48) !important;background-image:-ms-linear-gradient(top, #e59e66, #df8a48) !important;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #e59e66), color-stop(100%, #df8a48)) !important;background-image:-webkit-linear-gradient(top, #e59e66, #df8a48) !important;background-image:-o-linear-gradient(top, #e59e66, #df8a48) !important;background-image:-linear-gradient(top, #e59e66, #df8a48) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e59e66', endColorstr='#df8a48', GradientType=0) !important}@media screen and (max-width: 600px){.redux-group-tab-link-a{min-height:15px}.redux-group-tab-link-a span{padding:11px 12px;color:#555;-webkit-transition:all 0.3s;-moz-transition:all 0.3s;transition:all 0.3s;text-shadow:none !important}.redux-group-tab-link-a span:hover{background:#e5e5e5}}@media screen and (max-width: 782px){#redux-footer #redux-share{line-height:38px;font-size:18px}.sticky-save-warn .redux-save-warn{right:13px;top:46px}.redux-container .expand_options{margin-top:5px}.redux-action_bar input{margin-bottom:0 !important}}@media screen and (max-width: 600px){#redux-footer #redux-share,.redux-hint-qtip{display:none}.redux-container .redux-action_bar{float:none}}.redux-sidebar .icon-large,.redux-main .icon-large{background-image:inherit !important;width:inherit;height:inherit}.redux-main dd,.redux-main li,.redux-sidebar li{margin-bottom:0 !important}.fully-expanded .redux-sidebar{margin-left:-500px}.fully-expanded .redux-main{margin-left:0}.fully-expanded .redux-group-tab{display:block}@media screen and (max-width: 640px){#redux-defaults-section{display:none}}@media screen and (max-width: 730px){#redux-share{display:none}}@media screen and (max-width: 730px){#redux-defaults-section2{display:none}#redux-share{display:none}}@media screen and (max-width: 600px){.form-table>tbody>tr>th{padding-bottom:0 !important}.redux_field_th{padding-top:0;padding-bottom:0}.redux-main .redux-field-container{padding-top:0;padding-bottom:0}.redux-main .subsection a{min-height:15px}}@media screen and (min-width: 601px) and (max-width: 782px){.redux-container .sticky-save-warn .redux-save-warn{top:47px !important;right:13px !important}}@media screen and (max-width: 782px){.redux-main .form-table-section-indented input[type=text]{width:95% !important}.redux-main .redux-container-sortable input[type=text]{width:80%;display:initial}.redux-main .redux-typography-container .input_wrapper input.mini{font-size:16px !important;height:40px !important;padding:7px 10px !important;line-height:24px !important}.redux-main .redux-typography-container .picker-wrapper label{margin-top:16px !important}.redux-main .input-append{height:50px !important}.redux-main .input-append .add-on{font-size:16px;line-height:24px !important;padding:7px;height:32px !important;float:right;margin-top:-40px}.redux-main .redux-hint-qtip{float:left !important}.redux-main .redux-action_bar .button{margin-top:-1px}}@media screen and (max-width: 600px){.sticky-save-warn .redux-save-warn{top:0 !important;right:14px !important}}@media screen and (max-width: 570px){.redux-main .redux-container-sortable .checkbox-container{width:85%;padding-bottom:5px}.redux-main .redux-container-sortable .checkbox-container label{display:initial}}#redux-header{position:relative}.redux-main{position:relative}.redux-main #redux-sticky{min-height:32px;margin-left:-20px;margin-right:-20px;margin-top:-10px;margin-bottom:8px}.redux-main #redux-sticky #info_bar{height:32px}.redux-main #redux-sticky #info_bar .expand_options{margin-top:4px}.redux-main .redux_field_search{top:50px;right:5px}.redux-main #redux-footer-sticky{margin-left:-20px;margin-right:-20px;margin-bottom:-10px}.redux-qtip{z-index:999999 !important}.redux-main pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}
2
+ /* custom css */
3
+ .redux-container{
4
+ position: relative;
5
+ border-radius: 3px;
6
+ }
7
+ #redux-intro-text{
8
+ position: absolute;
9
+ right: 0;
10
+ top: 13px;
11
+ }
12
+ #redux-intro-text a{
13
+ text-decoration: none
14
+ }
15
+ .admin-color-fresh #redux-header, .wp-customizer #redux-header{
16
+ background: #303F9F
17
+ }
18
+ .redux-container #redux-header{
19
+ border: 0;
20
+ border-radius: 3px 3px 0px 0px
21
+ }
22
+ .redux-container #redux-header .display_header{
23
+ margin: 0 14px
24
+ }
25
+ .redux-container #redux-header .display_header .redux-dev-mode-notice-container{
26
+ position: relative;
27
+ top: 0;
28
+ float: right;
29
+ left: 20px;
30
+ bottom: auto;
31
+ width: auto;
32
+ margin-top: 17px;
33
+ }
34
+ #info_bar .redux-action_bar{
35
+ display: none
36
+ }
37
+ .redux-container #redux-intro-text{
38
+ text-align: right
39
+ }
40
+ .redux-container #redux-intro-text{
41
+ background: transparent;
42
+ border: 0;
43
+ margin-top: -1px;
44
+ color: #999;
45
+ right: 10px;
46
+ letter-spacing: 0.8px;
47
+ box-shadow: none;
48
+ }
49
+ .redux-container #redux-intro-text a{
50
+ color: #eee;
51
+ font-size: 10px
52
+ }
53
+ .redux-sidebar{
54
+ margin-top: -1px
55
+ }
56
+ .admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a, .wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections a{
57
+ background: rgba(48, 63, 159, 0.89)
58
+ }
59
+ .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a, .wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a{
60
+ background: rgba(48, 63, 159, 0.89)
61
+ }
62
+ .admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a, .wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{
63
+ background: #fff;
64
+ text-shadow: none !important;
65
+ color: #444
66
+ }
67
+ .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a, .wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a{
68
+ background: #fff;
69
+ text-shadow: none !important;
70
+ color: #444
71
+ }
72
+ .admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover, .wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover, .wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover{
73
+ background: rgba(48, 63, 159, 0.89);
74
+ color: #fff
75
+ }
76
+ .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a, .wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a{
77
+ background: #444;
78
+ color: #fff
79
+ }
80
+ .admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after, .wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after, .wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after,
81
+ .admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a:after, .wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{
82
+ display: none
83
+ }
84
+ .redux-sidebar .redux-group-menu li a:hover{
85
+ color: #444;
86
+ background: #fff
87
+ }
88
+ #redux_save,
89
+ #redux-defaults-section,
90
+ #redux-defaults {
91
+ margin-top: 2px;
92
+ background: #4452a7;
93
+ text-shadow: none;
94
+ border: 0;
95
+ border-radius: 0;
96
+ box-shadow: none;
97
+ padding: 14px 32px 28px 35px;
98
+ line-height: 1;
99
+ margin-left: 5px;
100
+ transition: all 100ms;
101
+ }
102
+ #redux_save:hover{
103
+ background: #2b3dab;
104
+ }
105
+ #redux-defaults-section,
106
+ #redux-defaults {
107
+ background: #f2f2f2;
108
+ color: #999
109
+ }
110
+ #redux-defaults-section:hover,
111
+ #redux-defaults:hover {
112
+ background: #f4f4f4;
113
+ color: #555
114
+ }
115
+
116
+
117
+ .redux-container #redux-footer #redux-share{
118
+ margin-top: 8px;
119
+ }
120
+ .admin-color-fresh #redux-footer #redux-share a, .wp-customizer #redux-footer #redux-share a{
121
+ color: #4452a7
122
+ }
123
+ .amp-faq strong{
124
+ color: #666;
125
+ margin-bottom: 5px;
126
+ margin-top: 5px;
127
+ }
128
+ .redux-container-switch .cb-enable{
129
+ border-radius: 20px 0px 0px 20px !important;
130
+ padding: 5px 13px 5px 15px !important
131
+
132
+ }
133
+ .redux-container-switch .cb-disable{
134
+ border-radius: 0px 20px 20px 0px !important;
135
+ padding: 5px 17px 5px 10px !important;
136
+ }
137
+ .admin-color-fresh .redux-container-switch .cb-disable, .admin-color-fresh .redux-container-switch .cb-enable, .admin-color-fresh .ui-state-default, .admin-color-fresh .ui-widget-content .ui-state-default, .admin-color-fresh .ui-widget-header .ui-state-default, .wp-customizer .redux-container-switch .cb-disable, .wp-customizer .redux-container-switch .cb-enable, .wp-customizer .ui-state-default, .wp-customizer .ui-widget-content .ui-state-default, .wp-customizer .ui-widget-header .ui-state-default{
138
+ border: 0;
139
+ background: #f2f2f2 !important;
140
+ color: #999;
141
+ }
142
+ .redux-container-switch .switch-options{
143
+ text-transform: uppercase;
144
+ font-size: 11px;
145
+ letter-spacing: 1.2px;
146
+ }
147
+ .admin-color-fresh .redux-container-switch .cb-enable.selected, .admin-color-fresh .redux-field-container .ui-buttonset .ui-state-active, .wp-customizer .redux-container-switch .cb-enable.selected, .wp-customizer .redux-field-container .ui-buttonset .ui-state-active {
148
+ background: #4452a7 !important;
149
+ box-shadow: none !important;
150
+ border: 0 !important;
151
+ }
152
+ .admin-color-fresh .redux-container-switch .cb-disable.selected{
153
+ background: #303f9f !important;
154
+ color: #fff;
155
+ box-shadow: none !important;
156
+ border: 0 !important;
157
+
158
+ }
159
+ .wp-customizer .redux-container-switch .cb-disable.selected{
160
+ background: red !important
161
+ }
162
+ .ampforwp-ad-img-banner{
163
+ width: 560px;
164
+ height: 99px !important;
165
+ }
166
+ .ampforwp-extension-ad-img-banner{
167
+ width: 345px;
168
+ height: 450px !important;
169
+ margin-right:20px;
170
+ margin-bottom:20px;
171
+ }
172
+ #footer-thankyou {
173
+ display: none;
174
+ }
175
+ img.ampforwp-post-builder-img{
176
+ height: 72px
177
+ }
includes/options/{redux-framework → redux-core}/assets/css/redux-admin.scss RENAMED
@@ -998,7 +998,6 @@ pre {
998
  -moz-border-radius: 10px;
999
  -webkit-border-radius: 10px;
1000
  border: 0 solid transparent;
1001
- float: right;
1002
  font-size: 9px;
1003
  height: 9px;
1004
  line-height: 9px;
998
  -moz-border-radius: 10px;
999
  -webkit-border-radius: 10px;
1000
  border: 0 solid transparent;
 
1001
  font-size: 9px;
1002
  height: 9px;
1003
  line-height: 9px;
includes/options/{redux-framework → redux-core}/assets/css/redux-fields.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/redux-vendor.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/rtl.css RENAMED
@@ -1 +1 @@
1
- .redux-container .redux-action_bar{float:left}.redux-container #expand_options,.redux-sidebar,.cb-enable,.cb-disable,.cb-enable span,.cb-disable span,#redux-footer #redux-share{float:right}.redux-main{border-left:0px;margin-left:0px;border-right:1px solid #d8d8d8;margin-right:201px}.redux-group-tab-link-a{padding-left:0px;padding-right:30px}.redux-group-tab-link-a i{padding-left:10px;padding-right:5px}.redux-group-tab-link-a span.group_title{padding-left:0px;padding-right:30px}.redux-container .expand_options,.redux-sidebar,.cb-enable,.cb-disable,.cb-enable span,.cb-disable span,#redux-footer #redux-share{float:right}.redux_slider{margin-left:0px;margin-right:15px}.redux-action_bar{float:left !important}.expand_options{float:right !important;border:1px solid #f00}.redux_field_th{padding:20px 0 20px 10px !important}.field-desc{text-align:right}.redux-container-ace_editor,.redux-container-border,.redux-container-spacing,.redux-container-dimensions{direction:ltr !important}.redux-container-border .field-border-input,.redux-container-border .redux-color-init,.redux-container-border .redux-border-style,.redux-container-sorter,.redux-container-border,.redux-container-spacing,.redux-container-spacing .field-spacing-input,.redux-container-dimensions .redux-dimensions-container,.redux-container-text label,.redux-container-checkbox input,.typography-font-bar,.typography-style-bar,.redux-color.redux-typography-color,.redux-typography-subsets{float:right !important}.input-append{margin-right:10px;direction:ltr !important}.redux-container-slider,.redux-container-spinner,.redux-container-switch{direction:ltr !important;float:right;margin:0}.redux-main .redux-typography-container .typography-preview{text-align:center !important;direction:ltr !important}.redux-info-field .redux-info-icon{margin-left:15px}#redux-share{float:right !important}
1
+ .redux-container .redux-action_bar{float:left}.redux-container #expand_options,.redux-sidebar,.cb-enable,.cb-disable,.cb-enable span,.cb-disable span,#redux-footer #redux-share{float:right}.redux-main{border-left:0px;margin-left:0px;border-right:1px solid #d8d8d8;margin-right:201px}.redux-group-tab-link-a{padding-left:0px;padding-right:30px}.redux-group-tab-link-a i{padding-left:10px;padding-right:5px}.redux-group-tab-link-a span.group_title{padding-left:0px;padding-right:30px}.redux-container .expand_options,.redux-sidebar,.cb-enable,.cb-disable,.cb-enable span,.cb-disable span,#redux-footer #redux-share{float:right}.redux_slider{margin-left:0px;margin-right:15px}.redux-action_bar{float:left !important}.expand_options{float:right !important;border:1px solid #f00}.redux_field_th{padding:20px 0 20px 10px !important}.field-desc{text-align:right}.redux-container-ace_editor,.redux-container-border,.redux-container-spacing,.redux-container-dimensions{direction:ltr !important}.redux-container-border .field-border-input,.redux-container-border .redux-color-init,.redux-container-border .redux-border-style,.redux-container-sorter,.redux-container-border,.redux-container-spacing,.redux-container-spacing .field-spacing-input,.redux-container-dimensions .redux-dimensions-container,.redux-container-text label,.redux-container-checkbox input,.typography-font-bar,.typography-style-bar,.redux-color.redux-typography-color,.redux-typography-subsets{float:right !important}.input-append{margin-right:10px;direction:ltr !important}.redux-container-slider,.redux-container-spinner,.redux-container-switch{direction:ltr !important;float:right;margin:0}.redux-main .redux-typography-container .typography-preview{text-align:center !important;direction:ltr !important}.redux-info-field .redux-info-icon{margin-left:15px}#redux-share{float:right !important}.redux-sidebar .redux-menu-warning,.redux-sidebar .redux-menu-error,.redux-sidebar .hasSubSections .extraIconSubsections{float:left}
includes/options/{redux-framework → redux-core}/assets/css/rtl.scss RENAMED
@@ -115,4 +115,12 @@
115
 
116
  #redux-share {
117
  float:right !important;
 
 
 
 
 
 
 
 
118
  }
115
 
116
  #redux-share {
117
  float:right !important;
118
+ }
119
+
120
+ .redux-sidebar {
121
+ .redux-menu-warning,
122
+ .redux-menu-error,
123
+ .hasSubSections .extraIconSubsections {
124
+ float: left;
125
+ }
126
  }
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/elusive-icons.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/fonts/elusiveicons-webfont.eot RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/fonts/elusiveicons-webfont.svg RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/fonts/elusiveicons-webfont.ttf RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/fonts/elusiveicons-webfont.woff RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_animated.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_bordered-pulled.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_core.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_fixed-width.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_icons.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_larger.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_list.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_mixins.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_path.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_rotated-flipped.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_stacked.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/_variables.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/elusive-icons.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/elusive-icons.css.map RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/elusive-icons/scss/elusive-icons.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_55_fbf9ee_1x400.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_65_ffffff_1x400.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_dadada_1x400.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_ffffff_1x400.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_highlight-soft_75_cccccc_1x100.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_222222_256x240.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_2e83ff_256x240.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_454545_256x240.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_888888_256x240.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_cd0a0a_256x240.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_f6cf3b_256x240.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_ffffff_256x240.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.less RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/qtip/jquery.qtip.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/qtip/jquery.qtip.min.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/spectrum/redux-spectrum.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/css/vendor/spectrum/redux-spectrum.min.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/1c.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/1col.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/2-col-portfolio.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/2cl.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/2cr.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/3-col-portfolio.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/3cl.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/3cm.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/3cr.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/4-col-portfolio.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/ajax.gif RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/menu_icon.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/img/toggle_tabs.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/media/media.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/media/media.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/redux.js RENAMED
@@ -1413,41 +1413,100 @@
1413
 
1414
 
1415
  };
1416
- $.redux.resizeAds = function() {
1417
- var el = $( '#redux-header' );
1418
- var maxWidth;
1419
- if ( el.length ) {
1420
- maxWidth = el.width() - el.find( '.display_header' ).width() - 30;
1421
- } else {
1422
- el = $( '#customize-info' );
1423
- maxWidth = el.width();
1424
- }
1425
-
1426
- var maxHeight = el.height();
1427
- var rAds = el.find( '.rAds' );
1428
-
1429
- $( rAds ).find( 'video' ).each(
1430
- function() {
1431
- $.redux.scaleToRatio( $( this ), maxHeight, maxWidth );
1432
- }
1433
- );
1434
- $( rAds ).find( 'img' ).each(
1435
- function() {
1436
- $.redux.scaleToRatio( $( this ), maxHeight, maxWidth );
1437
- }
1438
- );
1439
- $( rAds ).find( 'div' ).each(
1440
- function() {
1441
- $.redux.scaleToRatio( $( this ), maxHeight, maxWidth );
1442
- }
1443
- );
1444
-
1445
- if ( rAds.css( 'left' ) == "-99999px" ) {
1446
- rAds.css( 'display', 'none' ).css( 'left', 'auto' );
1447
- }
1448
- rAds.fadeIn( 'slow' );
1449
- };
1450
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1451
  })( jQuery );
1452
 
1453
  jQuery.noConflict();
@@ -1478,8 +1537,15 @@ function redux_change( variable ) {
1478
  jQuery( '#redux-compiler-hook' ).val( 1 );
1479
  }
1480
 
 
 
 
 
 
1481
  var rContainer = jQuery( variable ).parents( '.redux-container:first' );
 
1482
  var parentID = jQuery( variable ).closest( '.redux-group-tab' ).attr( 'id' );
 
1483
  // Let's count down the errors now. Fancy. ;)
1484
  var id = parentID.split( '_' );
1485
  id = id[0];
@@ -1734,3 +1800,19 @@ function colorNameToHex( colour ) {
1734
  return colour;
1735
  }
1736
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1413
 
1414
 
1415
  };
1416
+ // $.redux.resizeAds = function() {
1417
+ // var el = $( '#redux-header' );
1418
+ // var maxWidth;
1419
+ // if ( el.length ) {
1420
+ // maxWidth = el.width() - el.find( '.display_header' ).width() - 30;
1421
+ // } else {
1422
+ // el = $( '#customize-info' );
1423
+ // maxWidth = el.width();
1424
+ // }
1425
+
1426
+ // var maxHeight = el.height();
1427
+ // var rAds = el.find( '.rAds' );
1428
+
1429
+ // $( rAds ).find( 'video' ).each(
1430
+ // function() {
1431
+ // $.redux.scaleToRatio( $( this ), maxHeight, maxWidth );
1432
+ // }
1433
+ // );
1434
+ // $( rAds ).find( 'img' ).each(
1435
+ // function() {
1436
+ // $.redux.scaleToRatio( $( this ), maxHeight, maxWidth );
1437
+ // }
1438
+ // );
1439
+ // $( rAds ).find( 'div' ).each(
1440
+ // function() {
1441
+ // $.redux.scaleToRatio( $( this ), maxHeight, maxWidth );
1442
+ // }
1443
+ // );
1444
+
1445
+ // if ( rAds.css( 'left' ) == "-99999px" ) {
1446
+ // rAds.css( 'display', 'none' ).css( 'left', 'auto' );
1447
+ // }
1448
+ // rAds.fadeIn( 'slow' );
1449
+ // };
1450
+ // $( document ).ready(
1451
+ // function() {
1452
+ // if ( redux.rAds ) {
1453
+ // setTimeout(
1454
+ // function() {
1455
+ // var el;
1456
+ // if ( $( '#redux-header' ).length > 0 ) {
1457
+ // $( '#redux-header' ).append( '<div class="rAds"></div>' );
1458
+ // el = $( '#redux-header' );
1459
+ // } else {
1460
+ // $( '#customize-theme-controls ul' ).first().prepend( '<li id="redux_rAds" class="accordion-section rAdsContainer" style="position: relative;"><div class="rAds"></div></li>' );
1461
+ // el = $( '#redux_rAds' );
1462
+ // }
1463
+
1464
+ // el.css( 'position', 'relative' );
1465
+
1466
+ // el.find( '.rAds' ).attr(
1467
+ // 'style',
1468
+ // 'position:absolute; top: 6px; right: 6px; display:block !important;overflow:hidden;'
1469
+ // ).css( 'left', '-99999px' );
1470
+ // el.find( '.rAds' ).html( redux.rAds.replace( /<br\s?\/?>/, '' ) );
1471
+ // var rAds = el.find( '.rAds' );
1472
+
1473
+ // var maxHeight = el.height();
1474
+ // var maxWidth = el.width() - el.find( '.display_header' ).width() - 30;
1475
+
1476
+ // rAds.find( 'a' ).css( 'float', 'right' ).css( 'line-height', el.height() + 'px' ).css(
1477
+ // 'margin-left', '5px'
1478
+ // );
1479
+
1480
+ // $( document ).ajaxComplete(
1481
+ // function() {
1482
+ // rAds.find( 'a' ).hide();
1483
+ // setTimeout(
1484
+ // function() {
1485
+ // $.redux.resizeAds();
1486
+ // rAds.find( 'a' ).fadeIn();
1487
+ // }, 1400
1488
+ // );
1489
+ // setTimeout(
1490
+ // function() {
1491
+ // $.redux.resizeAds();
1492
+
1493
+ // }, 1500
1494
+ // );
1495
+ // $( document ).unbind( 'ajaxComplete' );
1496
+ // }
1497
+ // );
1498
+
1499
+ // $( window ).resize(
1500
+ // function() {
1501
+ // $.redux.resizeAds();
1502
+ // }
1503
+ // );
1504
+ // }, 400
1505
+ // );
1506
+
1507
+ // }
1508
+ // }
1509
+ // );
1510
  })( jQuery );
1511
 
1512
  jQuery.noConflict();
1537
  jQuery( '#redux-compiler-hook' ).val( 1 );
1538
  }
1539
 
1540
+ // var test = jQuery( variable ).parents( '.redux-field-container:first' );
1541
+ // if ( test.hasClass( 'redux-container-typography' ) && redux.field_objects.typography ) {
1542
+ // redux.field_objects.typography.change( test );
1543
+ // }
1544
+
1545
  var rContainer = jQuery( variable ).parents( '.redux-container:first' );
1546
+
1547
  var parentID = jQuery( variable ).closest( '.redux-group-tab' ).attr( 'id' );
1548
+
1549
  // Let's count down the errors now. Fancy. ;)
1550
  var id = parentID.split( '_' );
1551
  id = id[0];
1800
  return colour;
1801
  }
1802
 
1803
+ function redux_hook( object, functionName, callback, before ) {
1804
+ (function( originalFunction ) {
1805
+ object[functionName] = function() {
1806
+
1807
+ if ( before === true ) {
1808
+ callback.apply( this, [returnValue, originalFunction, arguments] );
1809
+ }
1810
+ var returnValue = originalFunction.apply( this, arguments );
1811
+ if ( before !== true ) {
1812
+ callback.apply( this, [returnValue, originalFunction, arguments] );
1813
+ }
1814
+
1815
+ return returnValue;
1816
+ };
1817
+ }( object[functionName] ));
1818
+ }
includes/options/redux-core/assets/js/redux.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ function redux_change(a){jQuery("body").trigger("check_dependencies",a),a.hasClass("compiler")&&jQuery("#redux-compiler-hook").val(1);var b=jQuery(a).parents(".redux-container:first"),c=jQuery(a).closest(".redux-group-tab").attr("id"),d=c.split("_");d=d[0];var e=b.find('.redux-group-tab-link-a[data-key="'+d+'"]').parents(".redux-group-tab-link-li:first"),f=jQuery("#"+c+"_li").parents(".hasSubSections:first");if(jQuery(a).parents("fieldset.redux-field:first").hasClass("redux-field-error")){jQuery(a).parents("fieldset.redux-field:first").removeClass("redux-field-error"),jQuery(a).parent().find(".redux-th-error").slideUp();var g=parseInt(b.find(".redux-field-errors span").text())-1;if(0>=g)jQuery("#"+c+"_li .redux-menu-error").fadeOut("fast").remove(),jQuery("#"+c+"_li .redux-group-tab-link-a").removeClass("hasError"),jQuery("#"+c+"_li").parents(".inside:first").find(".redux-field-errors").slideUp(),jQuery(a).parents(".redux-container:first").find(".redux-field-errors").slideUp(),jQuery("#redux_metaboxes_errors").slideUp();else{var h=parseInt(e.find(".redux-menu-error:first").text())-1;0>=h?e.find(".redux-menu-error:first").fadeOut().remove():e.find(".redux-menu-error:first").text(h),b.find(".redux-field-errors span").text(g)}0!==f.length&&0===f.find(".redux-menu-error").length&&f.find(".hasError").removeClass("hasError")}if(jQuery(a).parents("fieldset.redux-field:first").hasClass("redux-field-warning")){jQuery(a).parents("fieldset.redux-field:first").removeClass("redux-field-warning"),jQuery(a).parent().find(".redux-th-warning").slideUp();var i=parseInt(b.find(".redux-field-warnings span").text())-1;if(0>=i)jQuery("#"+c+"_li .redux-menu-warning").fadeOut("fast").remove(),jQuery("#"+c+"_li .redux-group-tab-link-a").removeClass("hasWarning"),jQuery("#"+c+"_li").parents(".inside:first").find(".redux-field-warnings").slideUp(),jQuery(a).parents(".redux-container:first").find(".redux-field-warnings").slideUp(),jQuery("#redux_metaboxes_warnings").slideUp();else{var j=parseInt(e.find(".redux-menu-warning:first").text())-1;0>=j?e.find(".redux-menu-warning:first").fadeOut().remove():e.find(".redux-menu-warning:first").text(j),b.find(".redux-field-warning span").text(i)}0!==f.length&&0===f.find(".redux-menu-warning").length&&f.find(".hasWarning").removeClass("hasWarning")}return b.find(".saved_notice:visible").length>0?void 0:redux.customizer?void redux.customizer.save(a,b,c):void(redux.args.disable_save_warn||(b.find(".redux-save-warn").slideDown(),window.onbeforeunload=confirmOnPageExit))}function colorValidate(a){var b=jQuery(a).val(),c=colorNameToHex(b);return c!==b.replace("#","")?c:b}function colorNameToHex(a){var b=a.replace(/^\s\s*/,"").replace(/\s\s*$/,"").replace("#",""),c={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",redux:"#01a3e3",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"undefined"!==c[b.toLowerCase()]?c[b.toLowerCase()]:a}function redux_hook(a,b,c,d){!function(e){a[b]=function(){d===!0&&c.apply(this,[a,e,arguments]);var a=e.apply(this,arguments);return d!==!0&&c.apply(this,[a,e,arguments]),a}}(a[b])}!function(a){"function"==typeof define&&define.amd?jQueryCookie.define(["jquery"],a):a(jQuery)}(function(a){function b(a){return a}function c(a){return decodeURIComponent(a.replace(e," "))}function d(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return f.json?JSON.parse(a):a}catch(b){}}var e=/\+/g,f=a.cookie=function(e,g,h){if(void 0!==g){if(h=a.extend({},f.defaults,h),"number"==typeof h.expires){var i=h.expires,j=h.expires=new Date;j.setDate(j.getDate()+i)}return g=f.json?JSON.stringify(g):String(g),document.cookie=[f.raw?e:encodeURIComponent(e),"=",f.raw?g:encodeURIComponent(g),h.expires?"; expires="+h.expires.toUTCString():"",h.path?"; path="+h.path:"",h.domain?"; domain="+h.domain:"",h.secure?"; secure":""].join("")}for(var k=f.raw?b:c,l=document.cookie.split("; "),m=e?void 0:{},n=0,o=l.length;o>n;n++){var p=l[n].split("="),q=k(p.shift()),r=k(p.join("="));if(e&&e===q){m=d(r);break}e||(m[q]=d(r))}return m};f.defaults={},a.removeCookie=function(b,c){return void 0!==a.cookie(b)?(a.cookie(b,"",a.extend({},c,{expires:-1})),!0):!1}}),function(a){a.fn.typeWatch=function(b){function c(b,c){var d=a(b.el).val();(d.length>=f.captureLength&&d.toUpperCase()!=b.text||c&&d.length>=f.captureLength)&&(b.text=d.toUpperCase(),b.cb.call(b.el,d))}function d(b){var d=b.type.toUpperCase();if(a.inArray(d,f.inputTypes)>=0){var e={timer:null,text:a(b).val().toUpperCase(),cb:f.callback,el:b,wait:f.wait};f.highlight&&a(b).focus(function(){this.select()});var g=function(b){var d=e.wait,g=!1,h=this.type.toUpperCase();"undefined"!=typeof b.keyCode&&13==b.keyCode&&"TEXTAREA"!=h&&a.inArray(h,f.inputTypes)>=0&&(d=1,g=!0);var i=function(){c(e,g)};clearTimeout(e.timer),e.timer=setTimeout(i,d)};a(b).on("keydown paste cut input",g)}}var e=["TEXT","TEXTAREA","PASSWORD","TEL","SEARCH","URL","EMAIL","DATETIME","DATE","MONTH","WEEK","TIME","DATETIME-LOCAL","NUMBER","RANGE"],f=a.extend({wait:750,callback:function(){},highlight:!0,captureLength:2,inputTypes:e},b);return this.each(function(){d(this)})}}(jQuery),function(a){a.fn.serializeForm=function(){if(this.length<1)return!1;var b={},c=b,d=':input[type!="checkbox"][type!="radio"], input:checked',e=function(){if(!this.disabled){var d=this.name.replace(/\[([^\]]+)?\]/g,",$1").split(","),e=d.length-1,f=a(this);if(d[0]){for(var g=0;e>g;g++)c=c[d[g]]=c[d[g]]||(""===d[g+1]||"0"===d[g+1]?[]:{});void 0!==c.length?c.push(f.val()):c[d[e]]=f.val(),c=b}}};return this.filter(d).each(e),this.find(d).each(e),b}}(jQuery),function(a){function b(){var a="!@#$%^&*()+=[]\\';,/{}|\":<>?~`.-_";return a+=" "}function c(){var a="¬€£¦";return a}function d(b,c,d){b.each(function(){var b=a(this);b.bind("keyup change paste",function(a){var e="";a.originalEvent&&a.originalEvent.clipboardData&&a.originalEvent.clipboardData.getData&&(e=a.originalEvent.clipboardData.getData("text/plain")),setTimeout(function(){h(b,c,d,e)},0)}),b.bind("keypress",function(a){var e=a.charCode?a.charCode:a.which;if(!(g(e)||a.ctrlKey||a.metaKey)){var f=String.fromCharCode(e),h=b.selection(),i=h.start,j=h.end,k=b.val(),l=k.substring(0,i)+f+k.substring(j),m=c(l,d);m!=l&&a.preventDefault()}})})}function e(b,c){var d=parseFloat(a(b).val()),e=a(b);return isNaN(d)?void e.val(""):(f(c.min)&&d<c.min&&e.val(""),void(f(c.max)&&d>c.max&&e.val("")))}function f(a){return!isNaN(a)}function g(a){return a>=32?!1:10==a?!1:13==a?!1:!0}function h(a,b,c,d){var e=a.val();""==e&&d.length>0&&(e=d);var f=b(e,c);if(e!=f){var g=a.alphanum_caret();a.val(f),e.length==f.length+1?a.alphanum_caret(g-1):a.alphanum_caret(g)}}function i(b,c){"undefined"==typeof c&&(c=D);var d,e={};return d="string"==typeof b?F[b]:"undefined"==typeof b?{}:b,a.extend(e,c,d),"undefined"==typeof e.blacklist&&(e.blacklistSet=x(e.allow,e.disallow)),e}function j(b){var c,d={};return c="string"==typeof b?G[b]:"undefined"==typeof b?{}:b,a.extend(d,E,c),d}function k(a,b,c){return c.maxLength&&a.length>=c.maxLength?!1:c.allow.indexOf(b)>=0?!0:c.allowSpace&&" "==b?!0:c.blacklistSet.contains(b)?!1:!c.allowNumeric&&K[b]?!1:!c.allowUpper&&u(b)?!1:!c.allowLower&&v(b)?!1:!c.allowCaseless&&w(b)?!1:!c.allowLatin&&L.contains(b)?!1:c.allowOtherCharSets?!0:K[b]||L.contains(b)?!0:!1}function l(a,b,c){if(K[b])return n(a,c)?!1:p(a,c)?!1:o(a,c)?!1:q(a+b,c)?!1:r(a+b,c)?!1:!0;if(c.allowPlus&&"+"==b&&""==a)return!0;if(c.allowMinus&&"-"==b&&""==a)return!0;if(b==I&&c.allowThouSep&&A(a,b))return!0;if(b==J){if(a.indexOf(J)>=0)return!1;if(c.allowDecSep)return!0}return!1}function m(a){return a+="",a.replace(/[^0-9]/g,"").length}function n(a,b){var c=b.maxDigits;if(""==c||isNaN(c))return!1;var d=m(a);return d>=c?!0:!1}function o(a,b){var c=b.maxDecimalPlaces;if(""==c||isNaN(c))return!1;var d=a.indexOf(J);if(-1==d)return!1;var e=a.substring(d),f=m(e);return f>=c?!0:!1}function p(a,b){var c=b.maxPreDecimalPlaces;if(""==c||isNaN(c))return!1;var d=a.indexOf(J);if(d>=0)return!1;var e=m(a);return e>=c?!0:!1}function q(a,b){if(!b.max||b.max<0)return!1;var c=parseFloat(a);return c>b.max?!0:!1}function r(a,b){if(!b.min||b.min>0)return!1;var c=parseFloat(a);return c<b.min?!0:!1}function s(a,b){if("string"!=typeof a)return a;var c,d=a.split(""),e=[],f=0;for(f=0;f<d.length;f++){c=d[f];var g=e.join("");k(g,c,b)&&e.push(c)}return e.join("")}function t(a,b){if("string"!=typeof a)return a;var c,d=a.split(""),e=[],f=0;for(f=0;f<d.length;f++){c=d[f];var g=e.join("");l(g,c,b)&&e.push(c)}return e.join("")}function u(a){var b=a.toUpperCase(),c=a.toLowerCase();return a==b&&b!=c?!0:!1}function v(a){var b=a.toUpperCase(),c=a.toLowerCase();return a==c&&b!=c?!0:!1}function w(a){return a.toUpperCase()==a.toLowerCase()?!0:!1}function x(a,b){var c=new B(H+b),d=new B(a),e=c.subtract(d);return e}function y(){var a,b="0123456789".split(""),c={},d=0;for(d=0;d<b.length;d++)a=b[d],c[a]=!0;return c}function z(){var a="abcdefghijklmnopqrstuvwxyz",b=a.toUpperCase(),c=new B(a+b);return c}function A(a,b){if(0==a.length)return!1;var c=a.indexOf(J);if(c>=0)return!1;var d=a.indexOf(I);if(0>d)return!0;var e=a.lastIndexOf(I),f=a.length-e-1;if(3>f)return!1;var g=m(a.substring(d));return g%3>0?!1:!0}function B(a){"string"==typeof a?this.map=C(a):this.map={}}function C(a){var b,c={},d=a.split(""),e=0;for(e=0;e<d.length;e++)b=d[e],c[b]=!0;return c}a.fn.alphanum=function(a){var b=i(a),c=this;return d(c,s,b),this},a.fn.alpha=function(a){var b=i("alpha"),c=i(a,b),e=this;return d(e,s,c),this},a.fn.numeric=function(a){var b=j(a),c=this;return d(c,t,b),c.blur(function(){e(this,a)}),this};var D={allow:"",disallow:"",allowSpace:!0,allowNumeric:!0,allowUpper:!0,allowLower:!0,allowCaseless:!0,allowLatin:!0,allowOtherCharSets:!0,maxLength:NaN},E={allowPlus:!1,allowMinus:!0,allowThouSep:!0,allowDecSep:!0,allowLeadingSpaces:!1,maxDigits:NaN,maxDecimalPlaces:NaN,maxPreDecimalPlaces:NaN,max:NaN,min:NaN},F={alpha:{allowNumeric:!1},upper:{allowNumeric:!1,allowUpper:!0,allowLower:!1,allowCaseless:!0},lower:{allowNumeric:!1,allowUpper:!1,allowLower:!0,allowCaseless:!0}},G={integer:{allowPlus:!1,allowMinus:!0,allowThouSep:!1,allowDecSep:!1},positiveInteger:{allowPlus:!1,allowMinus:!1,allowThouSep:!1,allowDecSep:!1}},H=b()+c(),I=",",J=".",K=y(),L=z();B.prototype.add=function(a){var b=this.clone();for(var c in a.map)b.map[c]=!0;return b},B.prototype.subtract=function(a){var b=this.clone();for(var c in a.map)delete b.map[c];return b},B.prototype.contains=function(a){return this.map[a]?!0:!1},B.prototype.clone=function(){var a=new B;for(var b in this.map)a.map[b]=!0;return a},a.fn.alphanum.backdoorAlphaNum=function(a,b){var c=i(b);return s(a,c)},a.fn.alphanum.backdoorNumeric=function(a,b){var c=j(b);return t(a,c)},a.fn.alphanum.setNumericSeparators=function(a){1==a.thousandsSeparator.length&&1==a.decimalSeparator.length&&(I=a.thousandsSeparator,J=a.decimalSeparator)}}(jQuery),function(a){function b(a,b){if(a.createTextRange){var c=a.createTextRange();c.move("character",b),c.select()}else null!=a.selectionStart&&(a.focus(),a.setSelectionRange(b,b))}function c(a){if("selection"in document){var b=a.createTextRange();try{b.setEndPoint("EndToStart",document.selection.createRange())}catch(c){return 0}return b.text.length}return null!=a.selectionStart?a.selectionStart:void 0}a.fn.alphanum_caret=function(d,e){return"undefined"==typeof d?c(this.get(0)):this.queue(function(c){if(isNaN(d)){var f=a(this).val().indexOf(d);e===!0?f+=d.length:"undefined"!=typeof e&&(f+=e),b(this,f)}else b(this,d);c()})}}(jQuery),function(a){var b=function(a){return a?a.ownerDocument.defaultView||a.ownerDocument.parentWindow:window},c=function(b,c){var d=a.Range.current(b).clone(),e=a.Range(b).select(b);return d.overlaps(e)?(d.compare("START_TO_START",e)<1?(startPos=0,d.move("START_TO_START",e)):(fromElementToCurrent=e.clone(),fromElementToCurrent.move("END_TO_START",d),startPos=fromElementToCurrent.toString().length),d.compare("END_TO_END",e)>=0?endPos=e.toString().length:endPos=startPos+d.toString().length,{start:startPos,end:endPos}):null},d=function(d){var e=b(d);if(void 0!==d.selectionStart)return document.activeElement&&document.activeElement!=d&&d.selectionStart==d.selectionEnd&&0==d.selectionStart?{start:d.value.length,end:d.value.length}:{start:d.selectionStart,end:d.selectionEnd};if(e.getSelection)return c(d,e);try{if("input"==d.nodeName.toLowerCase()){var f=b(d).document.selection.createRange(),g=d.createTextRange();g.setEndPoint("EndToStart",f);var h=g.text.length;return{start:h,end:h+f.text.length}}var i=c(d,e);if(!i)return i;var j=a.Range.current().clone(),k=j.clone().collapse().range,l=j.clone().collapse(!1).range;return k.moveStart("character",-1),l.moveStart("character",-1),0!=i.startPos&&""==k.text&&(i.startPos+=2),0!=i.endPos&&""==l.text&&(i.endPos+=2),i}catch(m){return{start:d.value.length,end:d.value.length}}},e=function(a,c,d){var e=b(a);if(a.setSelectionRange)void 0===d?(a.focus(),a.setSelectionRange(c,c)):(a.select(),a.selectionStart=c,a.selectionEnd=d);else if(a.createTextRange){var f=a.createTextRange();f.moveStart("character",c),d=d||c,f.moveEnd("character",d-a.value.length),f.select()}else if(e.getSelection){var h=e.document,i=e.getSelection(),j=h.createRange(),k=[c,void 0!==d?d:c];g([a],k),j.setStart(k[0].el,k[0].count),j.setEnd(k[1].el,k[1].count),i.removeAllRanges(),i.addRange(j)}else if(e.document.body.createTextRange){var j=document.body.createTextRange();j.moveToElementText(a),j.collapse(),j.moveStart("character",c),j.moveEnd("character",void 0!==d?d:c),j.select()}},f=function(a,b,c,d){"number"==typeof c[0]&&c[0]<b&&(c[0]={el:d,count:c[0]-a}),"number"==typeof c[1]&&c[1]<=b&&(c[1]={el:d,count:c[1]-a})},g=function(a,b,c){var d,e;c=c||0;for(var h=0;a[h];h++)d=a[h],3===d.nodeType||4===d.nodeType?(e=c,c+=d.nodeValue.length,f(e,c,b,d)):8!==d.nodeType&&(c=g(d.childNodes,b,c));return c};jQuery.fn.selection=function(a,b){return void 0!==a?this.each(function(){e(this,a,b)}):d(this[0])},a.fn.selection.getCharElement=g}(jQuery),function(a){"use strict";a.redux=a.redux||{},a(document).ready(function(){a.fn.isOnScreen=function(){if(window){var b=a(window),c={top:b.scrollTop()};c.right=c.left+b.width(),c.bottom=c.top+b.height();var d=this.offset();return d.right=d.left+this.outerWidth(),d.bottom=d.top+this.outerHeight(),!(c.right<d.left||c.left>d.right||c.bottom<d.top||c.top>d.bottom)}},a.redux.hideFields(),a.redux.checkRequired(),a.redux.initEvents(),a.redux.initQtip(),a.redux.tabCheck(),a.redux.notices(),a.redux.tabControl()}),a.redux.ajax_save=function(b){var c=a(document.getElementById("redux_ajax_overlay"));c.fadeIn(),jQuery(".redux-action_bar .spinner").addClass("is-active"),jQuery(".redux-action_bar input").attr("disabled","disabled");var d=jQuery(document.getElementById("redux_notification_bar"));d.slideUp(),jQuery(".redux-save-warn").slideUp(),jQuery(".redux_ajax_save_error").slideUp("medium",function(){jQuery(this).remove()});var e=jQuery(document.getElementById("redux-form-wrapper"));redux.fields.hasOwnProperty("editor")&&a.each(redux.fields.editor,function(a,b){if("undefined"!=typeof tinyMCE){var c=tinyMCE.get(a);c&&c.save()}});var f=e.serialize();e.find("input[type=checkbox]").each(function(){if("undefined"!=typeof a(this).attr("name")){var b=a(this).is(":checked")?a(this).val():"0";f+="&"+a(this).attr("name")+"="+b}}),"redux_save"!=b.attr("name")&&(f+="&"+b.attr("name")+"="+b.val());var g=e.attr("data-nonce");return jQuery.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:redux.args.opt_name+"_ajax_save",nonce:g,opt_name:redux.args.opt_name,data:f},error:function(a){window.console||(console={}),console.log=console.log||function(a,b){},console.log(redux.ajax.console),console.log(a.responseText),jQuery(".redux-action_bar input").removeAttr("disabled"),c.fadeOut("fast"),jQuery(".redux-action_bar .spinner").removeClass("is-active"),alert(redux.ajax.alert)},success:function(b){if(b.action&&"reload"==b.action)location.reload(!0);else if("success"==b.status){jQuery(".redux-action_bar input").removeAttr("disabled"),c.fadeOut("fast"),jQuery(".redux-action_bar .spinner").removeClass("is-active"),redux.options=b.options,redux.errors=b.errors,redux.warnings=b.warnings,d.html(b.notification_bar).slideDown("fast"),(null!==b.errors||null!==b.warnings)&&a.redux.notices();var e=a(document.getElementById("redux_notification_bar")).find(".saved_notice");e.slideDown(),e.delay(4e3).slideUp()}else jQuery(".redux-action_bar input").removeAttr("disabled"),jQuery(".redux-action_bar .spinner").removeClass("is-active"),c.fadeOut("fast"),jQuery(".wrap h2:first").parent().append('<div class="error redux_ajax_save_error" style="display:none;"><p>'+b.status+"</p></div>"),jQuery(".redux_ajax_save_error").slideDown(),jQuery("html, body").animate({scrollTop:0},"slow")}}),!1},a.redux.initEvents=function(){a(".redux-presets-bar").on("click",function(){window.onbeforeunload=null}),a("#toplevel_page_"+redux.args.slug+" .wp-submenu a, #wp-admin-bar-"+redux.args.slug+" a.ab-item").click(function(b){if((a("#toplevel_page_"+redux.args.slug).hasClass("wp-menu-open")||a(this).hasClass("ab-item"))&&!a(this).parents("ul.ab-submenu:first").hasClass("ab-sub-secondary")&&a(this).attr("href").toLowerCase().indexOf(redux.args.slug+"&tab=")>=0){b.preventDefault();var c=a(this).attr("href").split("&tab=");return a("#"+c[1]+"_section_group_li_a").click(),a(this).parents("ul:first").find(".current").removeClass("current"),a(this).addClass("current"),a(this).parent().addClass("current"),!1}}),a(".redux-action_bar input").on("click",function(b){if(a(this).attr("name")==redux.args.opt_name+"[defaults]"){if(!confirm(redux.args.reset_confirm))return!1}else if(a(this).attr("name")==redux.args.opt_name+"[defaults-section]"&&!confirm(redux.args.reset_section_confirm))return!1;window.onbeforeunload=null,redux.args.ajax_save===!0&&(a.redux.ajax_save(a(this)),b.preventDefault())}),a(".expand_options").click(function(b){b.preventDefault();var c=a(".redux-container");if(a(c).hasClass("fully-expanded")){a(c).removeClass("fully-expanded");var d=a.cookie("redux_current_tab");a(".redux-container:first").find("#"+d+"_section_group").fadeIn(200,function(){0!==a(".redux-container:first").find("#redux-footer").length&&a.redux.stickyInfo(),a.redux.initFields()})}return a.redux.expandOptions(a(this).parents(".redux-container:first")),!1}),a(".saved_notice").is(":visible")&&a(".saved_notice").slideDown(),a(document.body).on("change",".redux-field input, .redux-field textarea, .redux-field select",function(){a(this).hasClass("noUpdate")||redux_change(a(this))});var b=a("#redux-footer").height();a("#redux-sticky-padder").css({height:b}),a("#redux-footer-sticky").removeClass("hide"),0!==a("#redux-footer").length&&(a(window).scroll(function(){a.redux.stickyInfo()}),a(window).resize(function(){a.redux.stickyInfo()})),a(".saved_notice").delay(4e3).slideUp()},a.redux.hideFields=function(){a("label[for='redux_hide_field']").each(function(b,c){var d=a(this).parent().parent();a(d).addClass("hidden")})},a.redux.checkRequired=function(){a.redux.required(),a("body").on("change",".redux-main select, .redux-main radio, .redux-main input[type=checkbox], .redux-main input[type=hidden]",function(b){a.redux.check_dependencies(this)}),a("body").on("check_dependencies",function(b,c){a.redux.check_dependencies(c)}),a("td > fieldset:empty,td > div:empty").parent().parent().hide()},a.redux.initQtip=function(){if(a().qtip){var b="",c=redux.args.hints.tip_style.shadow;c===!0&&(b="qtip-shadow");var d="",e=redux.args.hints.tip_style.color;""!==e&&(d="qtip-"+e);var f="",g=redux.args.hints.tip_style.rounded;g===!0&&(f="qtip-rounded");var h="",i=redux.args.hints.tip_style.style;""!==i&&(h="qtip-"+i);var j=b+","+d+","+f+","+h+",redux-qtip";j=j.replace(/,/g," ");var k=redux.args.hints.tip_position.my,l=redux.args.hints.tip_position.at;k=a.redux.verifyPos(k.toLowerCase(),!0),l=a.redux.verifyPos(l.toLowerCase(),!1);var m=redux.args.hints.tip_effect.show.event,n=redux.args.hints.tip_effect.hide.event,o=redux.args.hints.tip_effect.show.effect,p=redux.args.hints.tip_effect.show.duration,q=redux.args.hints.tip_effect.hide.effect,r=redux.args.hints.tip_effect.hide.duration;a("div.redux-dev-qtip").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:{effect:function(){a(this).slideDown(500)},event:"mouseover"},hide:{effect:function(){a(this).slideUp(500)},event:"mouseleave"},style:{classes:"qtip-shadow qtip-light"},position:{my:"top center",at:"bottom center"}})}),a("div.redux-hint-qtip").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:{effect:function(){switch(o){case"slide":a(this).slideDown(p);break;case"fade":a(this).fadeIn(p);break;default:a(this).show()}},event:m},hide:{effect:function(){switch(q){case"slide":a(this).slideUp(r);break;case"fade":a(this).fadeOut(r);break;default:a(this).hide(r)}},event:n},style:{classes:j},position:{my:k,at:l}})}),a("input[qtip-content]").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:"focus",hide:"blur",style:j,position:{my:k,at:l}})})}},a.redux.tabCheck=function(){if(a(".redux-group-tab-link-a").click(function(){var b=a(this);if(b.parent().hasClass("empty_section")&&b.parent().hasClass("hasSubSections")){var c=a(this).closest("ul").find(".redux-group-tab-link-a"),d=c.index(this);b=c.slice(d+1,d+2)}var e=b.parents(".redux-container:first"),f=b.data("rel"),g=e.find(".redux-group-tab-link-li.active:first .redux-group-tab-link-a").data("rel");if(g!==f){if(a("#currentSection").val(f),b.parents(".postbox-container:first").length||a.cookie("redux_current_tab",f,{expires:7,path:"/"}),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").length){var h=e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").attr("id").split("_");h=h[0]}if(e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu a.current").removeClass("current"),e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu li.current").removeClass("current"),e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu a").each(function(){var b=a(this).attr("href").split("&tab=");(b[1]==f||b[1]==h)&&(a(this).addClass("current"),a(this).parent().addClass("current"))}),e.find("#"+g+"_section_group_li").find("#"+g+"_section_group_li").length)e.find("#"+g+"_section_group_li").addClass("activeChild"),e.find("#"+f+"_section_group_li").addClass("active").removeClass("activeChild");else if(e.find("#"+f+"_section_group_li").parents("#"+g+"_section_group_li").length||e.find("#"+g+"_section_group_li").parents("ul.subsection").find("#"+f+"_section_group_li").length)e.find("#"+f+"_section_group_li").parents("#"+g+"_section_group_li").length?e.find("#"+g+"_section_group_li").addClass("activeChild").removeClass("active"):(e.find("#"+f+"_section_group_li").addClass("active"),e.find("#"+g+"_section_group_li").removeClass("active")),e.find("#"+f+"_section_group_li").removeClass("activeChild").addClass("active");else if(e.find("#"+f+"_section_group_li").addClass("active").removeClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+g+"_section_group_li").find("ul.subsection").length){e.find("#"+g+"_section_group_li").find("ul.subsection").slideUp("fast",function(){e.find("#"+g+"_section_group_li").removeClass("active").removeClass("activeChild")});var i=e.find("#"+f+"_section_group_li").parents(".hasSubSections:first");i.length>0&&(e.find("#"+f+"_section_group_li").removeClass("active"),f=i.find(".redux-group-tab-link-a:first").data("rel"),i.hasClass("empty_section")?(i.find(".subsection li:first").addClass("active"),e.find("#"+f+"_section_group_li").removeClass("active").addClass("activeChild").find("ul.subsection").slideDown(),i=i.find(".subsection li:first"),f=i.find(".redux-group-tab-link-a:first").data("rel")):e.find("#"+f+"_section_group_li").addClass("active").removeClass("activeChild").find("ul.subsection").slideDown())}else e.find("#"+g+"_section_group_li").parents("ul.subsection").length?e.find("#"+g+"_section_group_li").parents("#"+f+"_section_group_li").length?e.find("#"+g+"_section_group_li").removeClass("active"):e.find("#"+g+"_section_group_li").parents("ul.subsection").slideUp("fast",function(){e.find("#"+g+"_section_group_li").removeClass("active"),e.find("#"+g+"_section_group_li").parents(".redux-group-tab-link-li").removeClass("active").removeClass("activeChild"),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").addClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+f+"_section_group_li").addClass("active")}):(e.find("#"+g+"_section_group_li").removeClass("active"),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").length&&(e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").addClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+f+"_section_group_li").addClass("active")));e.find("#"+g+"_section_group").hide(),e.find("#"+f+"_section_group").fadeIn(200,function(){0!==e.find("#redux-footer").length&&a.redux.stickyInfo(),a.redux.initFields()}),a("#toplevel_page_"+redux.args.slug).find(".current").removeClass("current")}}),void 0!==redux.last_tab)return void a("#"+redux.last_tab+"_section_group_li_a").click();var b=decodeURI((new RegExp("tab=(.+?)(&|$)").exec(location.search)||[,""])[1]);""!==b?a.cookie("redux_current_tab_get")!==b&&(a.cookie("redux_current_tab",b,{expires:7,path:"/"}),a.cookie("redux_current_tab_get",b,{expires:7,path:"/"}),a("#"+b+"_section_group_li").click()):""!==a.cookie("redux_current_tab_get")&&a.removeCookie("redux_current_tab_get");var c=a("#"+a.cookie("redux_current_tab")+"_section_group_li_a");null===a.cookie("redux_current_tab")||"undefined"==typeof a.cookie("redux_current_tab")||0===c.length?a(".redux-container").find(".redux-group-tab-link-a:first").click():c.click()},a.redux.initFields=function(){a(".redux-group-tab:visible").find(".redux-field-init:visible").each(function(){var b=a(this).attr("data-type");if("undefined"!=typeof redux.field_objects&&redux.field_objects[b]&&redux.field_objects[b]&&redux.field_objects[b].init(),!redux.customizer&&a(this).hasClass("redux_remove_th")){var c=a(this).parents("tr:first"),d=c.find("th:first");d.html()&&d.html().length>0&&(a(this).prepend(d.html()),a(this).find(".redux_field_th").css("padding","0 0 10px 0")),a(this).parent().attr("colspan","2"),d.remove()}})},a.redux.notices=function(){redux.errors&&redux.errors.errors&&(a.each(redux.errors.errors,function(b,c){a.each(c.errors,function(b,c){a("#"+redux.args.opt_name+"-"+c.id).addClass("redux-field-error"),0===a("#"+redux.args.opt_name+"-"+c.id).parent().find(".redux-th-error").length?a("#"+redux.args.opt_name+"-"+c.id).append('<div class="redux-th-error">'+c.msg+"</div>"):a("#"+redux.args.opt_name+"-"+c.id).parent().find(".redux-th-error").html(c.msg).css("display","block")})}),a(".redux-container").each(function(){var b=a(this);b.find(".redux-menu-error").remove();var c=b.find(".redux-field-error").length;c>0&&(b.find(".redux-field-errors span").text(c),b.find(".redux-field-errors").slideDown(),b.find(".redux-group-tab").each(function(){var c=a(this).find(".redux-field-error").length;if(c>0){var d=a(this).attr("id").split("_");d=d[0],b.find('.redux-group-tab-link-a[data-key="'+d+'"]').prepend('<span class="redux-menu-error">'+c+"</span>"),b.find('.redux-group-tab-link-a[data-key="'+d+'"]').addClass("hasError");var e=b.find('.redux-group-tab-link-a[data-key="'+d+'"]').parents(".hasSubSections:first");e&&e.find(".redux-group-tab-link-a:first").addClass("hasError")}}))})),redux.warnings&&redux.warnings.warnings&&(a.each(redux.warnings.warnings,function(b,c){a.each(c.warnings,function(b,c){a("#"+redux.args.opt_name+"-"+c.id).addClass("redux-field-warning"),0===a("#"+redux.args.opt_name+"-"+c.id).parent().find(".redux-th-warning").length?a("#"+redux.args.opt_name+"-"+c.id).append('<div class="redux-th-warning">'+c.msg+"</div>"):a("#"+redux.args.opt_name+"-"+c.id).parent().find(".redux-th-warning").html(c.msg).css("display","block")})}),a(".redux-container").each(function(){var b=a(this);b.find(".redux-menu-warning").remove();var c=b.find(".redux-field-warning").length;c>0&&(b.find(".redux-field-warnings span").text(c),b.find(".redux-field-warnings").slideDown(),b.find(".redux-group-tab").each(function(){var c=a(this).find(".redux-field-warning").length;if(c>0){var d=a(this).attr("id").split("_");d=d[0],b.find('.redux-group-tab-link-a[data-key="'+d+'"]').prepend('<span class="redux-menu-warning">'+c+"</span>"),b.find('.redux-group-tab-link-a[data-key="'+d+'"]').addClass("hasWarning");var e=b.find('.redux-group-tab-link-a[data-key="'+d+'"]').parents(".hasSubSections:first");e&&e.find(".redux-group-tab-link-a:first").addClass("hasWarning")}}))}))},a.redux.tabControl=function(){a(".redux-section-tabs div").hide(),a(".redux-section-tabs div:first").show(),a(".redux-section-tabs ul li:first").addClass("active"),a(".redux-section-tabs ul li a").click(function(){a(".redux-section-tabs ul li").removeClass("active"),a(this).parent().addClass("active");var b=a(this).attr("href");return a(".redux-section-tabs div").hide(),a(b).fadeIn("medium",function(){a.redux.initFields()}),!1})},a.redux.required=function(){a.each(redux.folds,function(b,c){var d=a("#"+redux.args.opt_name+"-"+b);if(d.parents("tr:first").addClass("fold"),
2
+ "hide"==c){if(d.parents("tr:first").addClass("hide"),d.hasClass("redux-container-section")){var e=a("#section-"+b);e.hasClass("redux-section-indent-start")&&(a("#section-table-"+b).hide().addClass("hide"),e.hide().addClass("hide"))}if(d.hasClass("redux-container-info")&&a("#info-"+b).hide().addClass("hide"),d.hasClass("redux-container-divide")&&a("#divide-"+b).hide().addClass("hide"),d.hasClass("redux-container-raw")){var f=d.parents().find("table#"+redux.args.opt_name+"-"+b);f.hide().addClass("hide")}}})},a.redux.get_container_value=function(b){var c=a("#"+redux.args.opt_name+"-"+b).serializeForm();return null!==c&&"object"==typeof c&&c.hasOwnProperty(redux.args.opt_name)&&(c=c[redux.args.opt_name][b]),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-media")&&(c=c.url),c},a.redux.check_dependencies=function(b){if(null!==redux.required){var c=a(b),d=c.parents(".redux-field:first").data("id");if(redux.required.hasOwnProperty(d)){var e=c.parents(".redux-field-container:first"),f=e.parents("tr:first").hasClass(".hide");e.parents("tr:first").length||(f=e.parents(".customize-control:first").hasClass(".hide")),a.each(redux.required[d],function(b,c){var d=a(this),e=!1,g=a("#"+redux.args.opt_name+"-"+b),h=g.parents("tr:first");if(f||(e=a.redux.check_parents_dependencies(b)),e===!0){if(g.hasClass("redux-container-section")){var i=a("#section-"+b);i.hasClass("redux-section-indent-start")&&i.hasClass("hide")&&(a("#section-table-"+b).fadeIn(300).removeClass("hide"),i.fadeIn(300).removeClass("hide"))}if(g.hasClass("redux-container-info")&&a("#info-"+b).fadeIn(300).removeClass("hide"),g.hasClass("redux-container-divide")&&a("#divide-"+b).fadeIn(300).removeClass("hide"),g.hasClass("redux-container-raw")){var j=g.parents().find("table#"+redux.args.opt_name+"-"+b);j.fadeIn(300).removeClass("hide")}h.fadeIn(300,function(){a(this).removeClass("hide"),redux.required.hasOwnProperty(b)&&a.redux.check_dependencies(a("#"+redux.args.opt_name+"-"+b).children().first()),a.redux.initFields()}),(g.hasClass("redux-container-section")||g.hasClass("redux-container-info"))&&h.css({display:"none"})}else e===!1&&h.fadeOut(100,function(){a(this).addClass("hide"),redux.required.hasOwnProperty(b)&&a.redux.required_recursive_hide(b)});d.find("select, radio, input[type=checkbox]").trigger("change")})}}},a.redux.required_recursive_hide=function(b){var c=a("#"+redux.args.opt_name+"-"+b).parents("tr:first");c.fadeOut(50,function(){if(a(this).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-section")){var c=a("#section-"+b);c.hasClass("redux-section-indent-start")&&(a("#section-table-"+b).fadeOut(50).addClass("hide"),c.fadeOut(50).addClass("hide"))}if(a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-info")&&a("#info-"+b).fadeOut(50).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-divide")&&a("#divide-"+b).fadeOut(50).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-raw")){var d=a("#"+redux.args.opt_name+"-"+b).parents().find("table#"+redux.args.opt_name+"-"+b);d.fadeOut(50).addClass("hide")}redux.required.hasOwnProperty(b)&&a.each(redux.required[b],function(b){a.redux.required_recursive_hide(b)})})},a.redux.check_parents_dependencies=function(b){var c="";return redux.required_child.hasOwnProperty(b)?a.each(redux.required_child[b],function(b,d){if(a("#"+redux.args.opt_name+"-"+d.parent).parents("tr:first").hasClass(".hide"))c=!1;else if(c!==!1){var e=a.redux.get_container_value(d.parent);c=a.redux.check_dependencies_visibility(e,d)}}):c=!0,c},a.redux.check_dependencies_visibility=function(b,c){var d,e=!1,f=c.checkValue,g=c.operation;switch(g){case"=":case"equals":a.isArray(b)?a(b[0]).each(function(b,c){if(a.isArray(f))a(f).each(function(a,b){return c==b?(e=!0,!0):void 0});else if(c==f)return e=!0,!0}):a.isArray(f)?a(f).each(function(a,c){b==c&&(e=!0)}):b==f&&(e=!0);break;case"!=":case"not":a.isArray(b)?a(b).each(function(b,c){if(a.isArray(f))a(f).each(function(a,b){return c!=b?(e=!0,!0):void 0});else if(c!=f)return e=!0,!0}):a.isArray(f)?a(f).each(function(a,c){b!=c&&(e=!0)}):b!=f&&(e=!0);break;case">":case"greater":case"is_larger":parseFloat(b)>parseFloat(f)&&(e=!0);break;case">=":case"greater_equal":case"is_larger_equal":parseFloat(b)>=parseFloat(f)&&(e=!0);break;case"<":case"less":case"is_smaller":parseFloat(b)<parseFloat(f)&&(e=!0);break;case"<=":case"less_equal":case"is_smaller_equal":parseFloat(b)<=parseFloat(f)&&(e=!0);break;case"contains":a.isPlainObject(b)&&(b=Object.keys(b).map(function(a){return[a,b[a]]})),a.isPlainObject(f)&&(f=Object.keys(f).map(function(a){return[a,f[a]]})),a.isArray(f)?a(f).each(function(c,d){var f=!1,g=d[0],h=d[1];return a(b).each(function(a,b){var c=b[0],d=b[1];return g===c&&h==d?(e=!0,f=!0,!1):void 0}),f===!0?!1:void 0}):-1!==b.toString().indexOf(f)&&(e=!0);break;case"doesnt_contain":case"not_contain":a.isPlainObject(b)&&(d=Object.keys(b).map(function(a){return b[a]}),b=d),a.isPlainObject(f)&&(d=Object.keys(f).map(function(a){return f[a]}),f=d),a.isArray(f)?a(f).each(function(a,c){-1===b.toString().indexOf(c)&&(e=!0)}):-1===b.toString().indexOf(f)&&(e=!0);break;case"is_empty_or":(""===b||b==f)&&(e=!0);break;case"not_empty_and":""!==b&&b!=f&&(e=!0);break;case"is_empty":case"empty":case"!isset":b&&""!==b&&null!==b||(e=!0);break;case"not_empty":case"!empty":case"isset":b&&""!==b&&null!==b&&(e=!0)}return e},a.redux.verifyPos=function(a,b){if(a=a.replace(/^\s+|\s+$/gm,""),""===a||-1==a.search(" "))return b===!0?"top left":"bottom right";var c=a.split(" "),d=b?"top":"bottom";("top"==c[0]||"center"==c[0]||"bottom"==c[0])&&(d=c[0]);var e=b?"left":"right";return("left"==c[1]||"center"==c[1]||"right"==c[1])&&(e=c[1]),d+" "+e},a.redux.stickyInfo=function(){var b=a(".redux-main").innerWidth()-20;a("#info_bar").isOnScreen()||a("#redux-footer-sticky").isOnScreen()?(a("#redux-footer").css({background:"#eee",position:"inherit",bottom:"inherit",width:"inherit"}),a("#redux-sticky-padder").hide(),a("#redux-footer").removeClass("sticky-footer-fixed")):(a("#redux-footer").css({position:"fixed",bottom:"0",width:b,right:21}),a("#redux-footer").addClass("sticky-footer-fixed"),a(".redux-save-warn").css("left",a("#redux-sticky").offset().left),a("#redux-sticky-padder").show()),a("#info_bar").isOnScreen()?a("#redux-sticky").removeClass("sticky-save-warn"):a("#redux-sticky").addClass("sticky-save-warn")},a.redux.expandOptions=function(b){var c=b.find(".expand_options"),d=b.find(".redux-sidebar").width()-1,e=a(".redux-group-menu .active a").data("rel")+"_section_group";return c.hasClass("expanded")?(c.removeClass("expanded"),b.find(".redux-main").removeClass("expand"),b.find(".redux-sidebar").stop().animate({"margin-left":"0px"},500),b.find(".redux-main").stop().animate({"margin-left":d},500,function(){b.find(".redux-main").attr("style","")}),b.find(".redux-group-tab").each(function(){a(this).attr("id")!==e&&a(this).fadeOut("fast")})):(c.addClass("expanded"),b.find(".redux-main").addClass("expand"),b.find(".redux-sidebar").stop().animate({"margin-left":-d-113},500),b.find(".redux-main").stop().animate({"margin-left":"-1px"},500),b.find(".redux-group-tab").fadeIn("medium",function(){a.redux.initFields()})),!1},a.redux.scaleToRatio=function(b,c,d){var e=0,f=b.attr("data-width");f||(f=b.width(),b.attr("data-width",f));var g=b.attr("data-height"),h=b.height();(!g||h>g)&&(g=h,b.attr("data-height",g),b.css("width","auto"),b.attr("data-width",b.width()),f=b.width()),f>d?(e=d/f,b.css("width",d),b.css("height",g*e),g*=e,f*=e):b.css("width","auto"),g>c?(e=c/g,b.css("height",c),b.css("width",f*e),f*=e,g*=e):b.css("height","auto");var i=(a(document.getElementById("redux-header")).height()-b.height())/2;i>0?b.css("margin-top",i):b.css("margin-top",0),a("#redux-header .redux_field_search")&&a("#redux-header .redux_field_search").css("right",a(b).width()+20)},a.redux.resizeAds=function(){var b,c=a("#redux-header");c.length?b=c.width()-c.find(".display_header").width()-30:(c=a("#customize-info"),b=c.width());var d=c.height(),e=c.find(".rAds");a(e).find("video").each(function(){a.redux.scaleToRatio(a(this),d,b)}),a(e).find("img").each(function(){a.redux.scaleToRatio(a(this),d,b)}),a(e).find("div").each(function(){a.redux.scaleToRatio(a(this),d,b)}),"-99999px"==e.css("left")&&e.css("display","none").css("left","auto"),e.fadeIn("slow")},a(document).ready(function(){redux.rAds&&setTimeout(function(){var b;a("#redux-header").length>0?(a("#redux-header").append('<div class="rAds"></div>'),b=a("#redux-header")):(a("#customize-theme-controls ul").first().prepend('<li id="redux_rAds" class="accordion-section rAdsContainer" style="position: relative;"><div class="rAds"></div></li>'),b=a("#redux_rAds")),b.css("position","relative"),b.find(".rAds").attr("style","position:absolute; top: 6px; right: 6px; display:block !important;overflow:hidden;").css("left","-99999px"),b.find(".rAds").html(redux.rAds.replace(/<br\s?\/?>/,""));var c=b.find(".rAds");b.height(),b.width()-b.find(".display_header").width()-30;c.find("a").css("float","right").css("line-height",b.height()+"px").css("margin-left","5px"),a(document).ajaxComplete(function(){c.find("a").hide(),setTimeout(function(){a.redux.resizeAds(),c.find("a").fadeIn()},1400),setTimeout(function(){a.redux.resizeAds()},1500),a(document).unbind("ajaxComplete")}),a(window).resize(function(){a.redux.resizeAds()})},400)})}(jQuery),jQuery.noConflict();var confirmOnPageExit=function(a){a=a||window.event;var b=redux.args.save_pending;return a&&(a.returnValue=b),window.onbeforeunload=null,b};
includes/options/{redux-framework → redux-core}/assets/js/vendor.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/cookie.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/jquery.alphanum.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/jquery.serializeForm.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/jquery.typewatch.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/jsonview.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/jsonview.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/lte-ie7.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/qtip/jquery.qtip.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/qtip/jquery.qtip.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/redux.select2.sortable.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/redux.select2.sortable.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/spectrum/redux-spectrum.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/assets/js/vendor/spectrum/redux-spectrum.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/core/dashboard.php RENAMED
@@ -14,7 +14,7 @@
14
  }
15
 
16
  public function add_redux_dashboard() {
17
- // add_meta_box('redux_dashboard_widget', 'Redux Framework News', array($this,'redux_dashboard_widget'), 'dashboard', 'side', 'high');
18
  }
19
 
20
  public function dat() {
14
  }
15
 
16
  public function add_redux_dashboard() {
17
+ add_meta_box('redux_dashboard_widget', 'Redux Framework News', array($this,'redux_dashboard_widget'), 'dashboard', 'side', 'high');
18
  }
19
 
20
  public function dat() {
includes/options/{redux-framework → redux-core}/core/enqueue.php RENAMED
@@ -35,7 +35,7 @@
35
  add_filter("redux/{$this->parent->args['opt_name']}/localize", array('Redux_Helpers', 'localize'));
36
 
37
  $this->set_localized_data();
38
-
39
  /**
40
  * action 'redux-enqueue-{opt_name}'
41
  *
@@ -406,7 +406,7 @@
406
  if (!empty($this->parent->args['last_tab'])) {
407
  $this->parent->localize_data['last_tab'] = $this->parent->args['last_tab'];
408
  }
409
-
410
  $this->parent->localize_data['required'] = $this->parent->required;
411
  $this->parent->localize_data['fonts'] = $this->parent->fonts;
412
  $this->parent->localize_data['required_child'] = $this->parent->required_child;
@@ -439,7 +439,6 @@
439
  }
440
 
441
 
442
-
443
  $this->parent->localize_data['fieldsHidden'] = $this->parent->fieldsHidden;
444
  $this->parent->localize_data['options'] = $this->parent->options;
445
  $this->parent->localize_data['defaults'] = $this->parent->options_defaults;
35
  add_filter("redux/{$this->parent->args['opt_name']}/localize", array('Redux_Helpers', 'localize'));
36
 
37
  $this->set_localized_data();
38
+
39
  /**
40
  * action 'redux-enqueue-{opt_name}'
41
  *
406
  if (!empty($this->parent->args['last_tab'])) {
407
  $this->parent->localize_data['last_tab'] = $this->parent->args['last_tab'];
408
  }
409
+
410
  $this->parent->localize_data['required'] = $this->parent->required;
411
  $this->parent->localize_data['fonts'] = $this->parent->fonts;
412
  $this->parent->localize_data['required_child'] = $this->parent->required_child;
439
  }
440
 
441
 
 
442
  $this->parent->localize_data['fieldsHidden'] = $this->parent->fieldsHidden;
443
  $this->parent->localize_data['options'] = $this->parent->options;
444
  $this->parent->localize_data['defaults'] = $this->parent->options_defaults;
includes/options/{redux-framework → redux-core}/core/newsflash.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/core/panel.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/core/required.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/framework.php RENAMED
@@ -69,7 +69,7 @@
69
  // Please update the build number with each push, no matter how small.
70
  // This will make for easier support when we ask users what version they are using.
71
 
72
- public static $_version = '3.6.0.2';
73
  public static $_dir;
74
  public static $_url;
75
  public static $_upload_dir;
@@ -515,7 +515,7 @@
515
  // Enable network admin when using network database mode
516
  'network_sites' => true,
517
  // Enable sites as well as admin when using network database mode
518
- 'hide_reset' => true,
519
  'hide_save' => false,
520
  'hints' => array(
521
  'icon' => 'el el-question-sign',
@@ -547,7 +547,7 @@
547
  ),
548
  'show_import_export' => true,
549
  'show_options_object' => true,
550
- 'dev_mode' => false,
551
  'templates_path' => '',
552
  // Path to the templates file for various Redux elements
553
  'ajax_save' => true,
@@ -1144,20 +1144,16 @@
1144
  public function field_default_values( $field ) {
1145
  // Detect what field types are being used
1146
  if( isset ( $field['type'] ) ) {// Line of code added by Khaled
1147
- if ( ! isset ( $this->fields[ $field['type'] ][ $field['id'] ] ) ) {
1148
- $this->fields[ $field['type'] ][ $field['id'] ] = 1;
1149
- } else {
1150
- $this->fields[ $field['type'] ] = array( $field['id'] => 1 );
1151
- }
1152
- }// Line of code added by Khaled
1153
-
1154
  if ( isset ( $field['default'] ) ) {
1155
  $this->options_defaults[ $field['id'] ] = apply_filters( "redux/{$this->args['opt_name']}/field/{$field['type']}/defaults", $field['default'], $field );
1156
-
1157
- } elseif ( isset ( $field['type'] ) ) { // Line of code added by Khaled
1158
  // Sorter data filter
1159
- if( $field['type'] != "ace_editor" ) {
1160
-
1161
 
1162
  if ( isset( $field['data'] ) && ! empty( $field['data'] ) ) {
1163
  if ( ! isset( $field['args'] ) ) {
@@ -1200,9 +1196,9 @@
1200
  $this->options_defaults[ $field['id'] ] = $field['options'];
1201
  }
1202
  }
1203
- }
1204
- } // Line of code added by Khaled
1205
- }
1206
  /**
1207
  * Get default options into an array suitable for the settings API
1208
  *
@@ -1228,20 +1224,20 @@
1228
  if ( empty ( $field['id'] ) && empty ( $field['type'] ) ) {
1229
  continue;
1230
  }
1231
- if( isset ( $field['type'] ) ) { // Line of code added by Khaled
1232
- if ( in_array( $field['type'] , array( 'ace_editor' ) ) && isset ( $field['options'] ) ) {
1233
- $this->sections[ $sk ]['fields'][ $k ]['args'] = $field['options'];
1234
- unset ( $this->sections[ $sk ]['fields'][ $k ]['options'] );
1235
- }
1236
-
1237
- if ( $field['type'] == "section" && isset ( $field['indent'] ) && $field['indent'] == "true" ) {
1238
- $field['class'] = isset ( $field['class'] ) ? $field['class'] : '';
1239
- $field['class'] .= " redux-section-indent-start";
1240
- $this->sections[ $sk ]['fields'][ $k ] = $field;
1241
- }
1242
- } // Line of code added by Khaled
1243
  $this->field_default_values( $field );
1244
- }//end of foreach
1245
  }
1246
  }
1247
  }
@@ -1278,10 +1274,10 @@
1278
  }
1279
  $this->dev_mode_forced = true;
1280
  $this->args['dev_mode'] = true;
1281
- // if ( isset( $this->args['forced_dev_mode_off'] ) && $this->args['forced_dev_mode_off'] == true ) {
1282
- // $this->dev_mode_forced = false;
1283
- // $this->args['dev_mode'] = false;
1284
- // }
1285
  }
1286
 
1287
  // Auto create the page_slug appropriately
@@ -2957,9 +2953,15 @@
2957
  }
2958
  }
2959
 
 
 
 
 
 
 
2960
  if ( isset( $this->extensions[ $field['type'] ] ) && method_exists( $this->extensions[ $field['type'] ], '_validate_values' ) ) {
2961
- $plugin_options = $this->extensions[ $field['type'] ]->_validate_values( $plugin_options, $field, $sections );
2962
- }
2963
 
2964
  // Default 'not_empty 'flag to false.
2965
  $isNotEmpty = false;
@@ -3069,11 +3071,11 @@
3069
  }
3070
  } else {
3071
  if ( isset( $plugin_options[ $field['id'] ] ) ) {
3072
- if ( is_array( $plugin_options[ $field['id'] ] ) ) {
3073
- $pofi = $plugin_options[ $field['id'] ];
3074
- } else {
3075
- $pofi = trim( $plugin_options[ $field['id'] ] );
3076
- }
3077
  } else {
3078
  $pofi = null;
3079
  }
@@ -3104,6 +3106,7 @@
3104
  $this->errors[] = $callbackvalues['error'];
3105
  }
3106
  // TODO - This warning message is failing. Hmm.
 
3107
  if ( isset ( $callbackvalues['warning'] ) ) {
3108
  $this->warnings[] = $callbackvalues['warning'];
3109
  }
@@ -3229,7 +3232,8 @@
3229
  $icon = str_replace( 'el-icon-', 'el el-', $icon );
3230
  }
3231
 
3232
- $section[ $nextK ]['class'] = isset ( $section[ $nextK ]['class'] ) ? $section[ $nextK ]['class'] : '';
 
3233
  $string .= '<li id="' . esc_attr( $nextK . $suffix ) . '_section_group_li" class="redux-group-tab-link-li ' . esc_attr( $hide_sub ) . esc_attr( $section[ $nextK ]['class'] ) . ( $icon ? ' hasIcon' : '' ) . '">';
3234
  $string .= '<a href="javascript:void(0);" id="' . esc_attr( $nextK . $suffix ) . '_section_group_li_a" class="redux-group-tab-link-a" data-key="' . esc_attr( $nextK ) . '" data-rel="' . esc_attr( $nextK . $suffix ) . '">' . $icon . '<span class="group_title">' . wp_kses_post( $sections[ $nextK ]['title'] ) . '</span></a>';
3235
  $string .= '</li>';
@@ -3271,7 +3275,8 @@
3271
  * @return void
3272
  */
3273
  public function _section_desc( $section ) {
3274
- $id = trim( rtrim( $section['id'], '_section' ), $this->args['opt_name'] );
 
3275
 
3276
  if ( isset ( $this->sections[ $id ]['desc'] ) && ! empty ( $this->sections[ $id ]['desc'] ) ) {
3277
  echo '<div class="redux-section-desc">' . $this->sections[ $id ]['desc'] . '</div>';
@@ -3976,7 +3981,7 @@
3976
  foreach ( $this->args['admin_bar_links'] as $idx => $arr ) {
3977
  if ( is_array( $arr ) && ! empty( $arr ) ) {
3978
  foreach ( $arr as $x => $y ) {
3979
- if ( strpos( strtolower( $y ), 'redux' ) >= 0 ) {
3980
  $msg = __( '<strong>Redux Framework Notice: </strong>There are references to the Redux Framework support site in your config\'s <code>admin_bar_links</code> argument. This is sample data. Please change or remove this data before shipping your product.', 'redux-framework' );
3981
  $this->display_arg_change_notice( 'admin', $msg );
3982
  $this->omit_admin_items = true;
@@ -3991,7 +3996,7 @@
3991
  foreach ( $this->args['share_icons'] as $idx => $arr ) {
3992
  if ( is_array( $arr ) && ! empty( $arr ) ) {
3993
  foreach ( $arr as $x => $y ) {
3994
- if ( strpos( strtolower( $y ), 'redux' ) >= 0 ) {
3995
  $msg = __( '<strong>Redux Framework Notice: </strong>There are references to the Redux Framework support site in your config\'s <code>share_icons</code> argument. This is sample data. Please change or remove this data before shipping your product.', 'redux-framework' );
3996
  $this->display_arg_change_notice( 'share', $msg );
3997
  $this->omit_share_icons = true;
@@ -4016,16 +4021,16 @@
4016
  }
4017
  }
4018
 
4019
- // if ( $mode == 'share' ) {
4020
- // if ( ! $this->omit_share_icons ) {
4021
- // $this->admin_notices[] = array(
4022
- // 'type' => 'error',
4023
- // 'msg' => $msg,
4024
- // 'id' => 'share_config',
4025
- // 'dismiss' => true,
4026
- // );
4027
- // }
4028
- // }
4029
  }
4030
  }
4031
 
@@ -4038,8 +4043,3 @@
4038
  */
4039
  do_action( 'redux/init', ReduxFramework::init() );
4040
  } // class_exists('ReduxFramework')
4041
- /** remove redux menu under the tools **/
4042
- add_action( 'admin_menu', 'remove_redux_menu',12 );
4043
- function remove_redux_menu() {
4044
- remove_submenu_page('tools.php','redux-about');
4045
- }
69
  // Please update the build number with each push, no matter how small.
70
  // This will make for easier support when we ask users what version they are using.
71
 
72
+ public static $_version = '3.6.2';
73
  public static $_dir;
74
  public static $_url;
75
  public static $_upload_dir;
515
  // Enable network admin when using network database mode
516
  'network_sites' => true,
517
  // Enable sites as well as admin when using network database mode
518
+ 'hide_reset' => false,
519
  'hide_save' => false,
520
  'hints' => array(
521
  'icon' => 'el el-question-sign',
547
  ),
548
  'show_import_export' => true,
549
  'show_options_object' => true,
550
+ 'dev_mode' => true,
551
  'templates_path' => '',
552
  // Path to the templates file for various Redux elements
553
  'ajax_save' => true,
1144
  public function field_default_values( $field ) {
1145
  // Detect what field types are being used
1146
  if( isset ( $field['type'] ) ) {// Line of code added by Khaled
1147
+ if ( ! isset ( $this->fields[ $field['type'] ][ $field['id'] ] ) ) {
1148
+ $this->fields[ $field['type'] ][ $field['id'] ] = 1;
1149
+ } else {
1150
+ $this->fields[ $field['type'] ] = array( $field['id'] => 1 );
1151
+ }
1152
+ } // Line of code added by Khaled
 
1153
  if ( isset ( $field['default'] ) ) {
1154
  $this->options_defaults[ $field['id'] ] = apply_filters( "redux/{$this->args['opt_name']}/field/{$field['type']}/defaults", $field['default'], $field );
1155
+ } elseif ( isset ( $field['type'] ) ) {
 
1156
  // Sorter data filter
 
 
1157
 
1158
  if ( isset( $field['data'] ) && ! empty( $field['data'] ) ) {
1159
  if ( ! isset( $field['args'] ) ) {
1196
  $this->options_defaults[ $field['id'] ] = $field['options'];
1197
  }
1198
  }
1199
+ } // Line of code added by Khaled
1200
+ }
1201
+
1202
  /**
1203
  * Get default options into an array suitable for the settings API
1204
  *
1224
  if ( empty ( $field['id'] ) && empty ( $field['type'] ) ) {
1225
  continue;
1226
  }
1227
+ if( isset ( $field['type'] ) ) { // Line of code added by Khaled
1228
+ if ( in_array( $field['type'], array( 'ace_editor' ) ) && isset ( $field['options'] ) ) {
1229
+ $this->sections[ $sk ]['fields'][ $k ]['args'] = $field['options'];
1230
+ unset ( $this->sections[ $sk ]['fields'][ $k ]['options'] );
1231
+ }
1232
+
1233
+ if ( $field['type'] == "section" && isset ( $field['indent'] ) && $field['indent'] == "true" ) {
1234
+ $field['class'] = isset ( $field['class'] ) ? $field['class'] : '';
1235
+ $field['class'] .= " redux-section-indent-start";
1236
+ $this->sections[ $sk ]['fields'][ $k ] = $field;
1237
+ }
1238
+ } // Line of code added by Khaled
1239
  $this->field_default_values( $field );
1240
+ }
1241
  }
1242
  }
1243
  }
1274
  }
1275
  $this->dev_mode_forced = true;
1276
  $this->args['dev_mode'] = true;
1277
+ if ( isset( $this->args['forced_dev_mode_off'] ) && $this->args['forced_dev_mode_off'] == true ) {
1278
+ $this->dev_mode_forced = false;
1279
+ $this->args['dev_mode'] = false;
1280
+ }
1281
  }
1282
 
1283
  // Auto create the page_slug appropriately
2953
  }
2954
  }
2955
 
2956
+ // if ( isset ( $field['type'] ) && $field['type'] == 'typography' ) {
2957
+ // if ( ! is_array( $plugin_options[ $field['id'] ] ) && ! empty( $plugin_options[ $field['id'] ] ) ) {
2958
+ // $plugin_options[ $field['id'] ] = json_decode( $plugin_options[ $field['id'] ], true );
2959
+ // }
2960
+ // }
2961
+
2962
  if ( isset( $this->extensions[ $field['type'] ] ) && method_exists( $this->extensions[ $field['type'] ], '_validate_values' ) ) {
2963
+ $plugin_options = $this->extensions[ $field['type'] ]->_validate_values( $plugin_options, $field );
2964
+ }
2965
 
2966
  // Default 'not_empty 'flag to false.
2967
  $isNotEmpty = false;
3071
  }
3072
  } else {
3073
  if ( isset( $plugin_options[ $field['id'] ] ) ) {
3074
+ if ( is_array( $plugin_options[ $field['id'] ] ) ) {
3075
+ $pofi = $plugin_options[ $field['id'] ];
3076
+ } else {
3077
+ $pofi = trim( $plugin_options[ $field['id'] ] );
3078
+ }
3079
  } else {
3080
  $pofi = null;
3081
  }
3106
  $this->errors[] = $callbackvalues['error'];
3107
  }
3108
  // TODO - This warning message is failing. Hmm.
3109
+ // No it isn't. Problem was in the sample-config - kp
3110
  if ( isset ( $callbackvalues['warning'] ) ) {
3111
  $this->warnings[] = $callbackvalues['warning'];
3112
  }
3232
  $icon = str_replace( 'el-icon-', 'el el-', $icon );
3233
  }
3234
 
3235
+ $sections[ $nextK ]['class'] = isset($sections[ $nextK ]['class']) ? $sections[ $nextK ]['class'] : '';
3236
+ $section[ $nextK ]['class'] = isset ( $section[ $nextK ]['class'] ) ? $section[ $nextK ]['class'] : $sections[ $nextK ]['class'];
3237
  $string .= '<li id="' . esc_attr( $nextK . $suffix ) . '_section_group_li" class="redux-group-tab-link-li ' . esc_attr( $hide_sub ) . esc_attr( $section[ $nextK ]['class'] ) . ( $icon ? ' hasIcon' : '' ) . '">';
3238
  $string .= '<a href="javascript:void(0);" id="' . esc_attr( $nextK . $suffix ) . '_section_group_li_a" class="redux-group-tab-link-a" data-key="' . esc_attr( $nextK ) . '" data-rel="' . esc_attr( $nextK . $suffix ) . '">' . $icon . '<span class="group_title">' . wp_kses_post( $sections[ $nextK ]['title'] ) . '</span></a>';
3239
  $string .= '</li>';
3275
  * @return void
3276
  */
3277
  public function _section_desc( $section ) {
3278
+ $id = rtrim( $section['id'], '_section' );
3279
+ $id = str_replace($this->args['opt_name'], '', $id);
3280
 
3281
  if ( isset ( $this->sections[ $id ]['desc'] ) && ! empty ( $this->sections[ $id ]['desc'] ) ) {
3282
  echo '<div class="redux-section-desc">' . $this->sections[ $id ]['desc'] . '</div>';
3981
  foreach ( $this->args['admin_bar_links'] as $idx => $arr ) {
3982
  if ( is_array( $arr ) && ! empty( $arr ) ) {
3983
  foreach ( $arr as $x => $y ) {
3984
+ if ( strpos( strtolower( $y ), 'redux' ) !== false ) {
3985
  $msg = __( '<strong>Redux Framework Notice: </strong>There are references to the Redux Framework support site in your config\'s <code>admin_bar_links</code> argument. This is sample data. Please change or remove this data before shipping your product.', 'redux-framework' );
3986
  $this->display_arg_change_notice( 'admin', $msg );
3987
  $this->omit_admin_items = true;
3996
  foreach ( $this->args['share_icons'] as $idx => $arr ) {
3997
  if ( is_array( $arr ) && ! empty( $arr ) ) {
3998
  foreach ( $arr as $x => $y ) {
3999
+ if ( strpos( strtolower( $y ), 'redux' ) !== false ) {
4000
  $msg = __( '<strong>Redux Framework Notice: </strong>There are references to the Redux Framework support site in your config\'s <code>share_icons</code> argument. This is sample data. Please change or remove this data before shipping your product.', 'redux-framework' );
4001
  $this->display_arg_change_notice( 'share', $msg );
4002
  $this->omit_share_icons = true;
4021
  }
4022
  }
4023
 
4024
+ if ( $mode == 'share' ) {
4025
+ if ( ! $this->omit_share_icons ) {
4026
+ $this->admin_notices[] = array(
4027
+ 'type' => 'error',
4028
+ 'msg' => $msg,
4029
+ 'id' => 'share_config',
4030
+ 'dismiss' => true,
4031
+ );
4032
+ }
4033
+ }
4034
  }
4035
  }
4036
 
4043
  */
4044
  do_action( 'redux/init', ReduxFramework::init() );
4045
  } // class_exists('ReduxFramework')
 
 
 
 
 
includes/options/{redux-framework → redux-core}/inc/browser.php RENAMED
@@ -260,8 +260,8 @@ class Browser
260
  * Is the browser from facebook?
261
  * @return boolean True if the browser is from facebook otherwise false
262
  */
263
- public function isFacebook()
264
- {
265
  return $this->_is_facebook;
266
  }
267
 
@@ -305,9 +305,9 @@ class Browser
305
  * Set the Browser to be a Facebook request
306
  * @param boolean $value is the browser a robot or not
307
  */
308
- protected function setFacebook($value = true)
309
- {
310
- $this->_is_facebook = $value;
311
  }
312
 
313
  /**
@@ -420,7 +420,7 @@ class Browser
420
  $this->checkBrowserLynx() ||
421
  $this->checkBrowserShiretoko() ||
422
  $this->checkBrowserIceCat() ||
423
- $this->checkBrowserIceweasel() ||
424
  $this->checkBrowserW3CValidator() ||
425
  $this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */
426
  );
@@ -502,7 +502,7 @@ class Browser
502
  }
503
  return false;
504
  }
505
-
506
  /**
507
  * Determine if the browser is the BingBot or not (last updated 1.9)
508
  * @return boolean True if the browser is the BingBot otherwise false
@@ -1099,10 +1099,10 @@ class Browser
1099
  * Detect Version for the Safari browser on iOS devices
1100
  * @return boolean True if it detects the version correctly otherwise false
1101
  */
1102
- protected function getSafariVersionOnIos()
1103
  {
1104
  $aresult = explode('/',stristr($this->_agent,'Version'));
1105
- if( isset($aresult[1]) )
1106
  {
1107
  $aversion = explode(' ',$aresult[1]);
1108
  $this->setVersion($aversion[0]);
@@ -1115,10 +1115,10 @@ class Browser
1115
  * Detect Version for the Chrome browser on iOS devices
1116
  * @return boolean True if it detects the version correctly otherwise false
1117
  */
1118
- protected function getChromeVersionOnIos()
1119
  {
1120
  $aresult = explode('/',stristr($this->_agent,'CriOS'));
1121
- if( isset($aresult[1]) )
1122
  {
1123
  $aversion = explode(' ',$aresult[1]);
1124
  $this->setVersion($aversion[0]);
@@ -1209,71 +1209,71 @@ class Browser
1209
  */
1210
  protected function checkPlatform()
1211
  {
1212
- if (stripos($this->_agent, 'windows') !== false)
1213
  {
1214
  $this->_platform = self::PLATFORM_WINDOWS;
1215
- }
1216
- else if (stripos($this->_agent, 'iPad') !== false)
1217
  {
1218
  $this->_platform = self::PLATFORM_IPAD;
1219
- }
1220
- else if (stripos($this->_agent, 'iPod') !== false)
1221
  {
1222
  $this->_platform = self::PLATFORM_IPOD;
1223
- }
1224
- else if (stripos($this->_agent, 'iPhone') !== false)
1225
  {
1226
  $this->_platform = self::PLATFORM_IPHONE;
1227
- }
1228
- elseif (stripos($this->_agent, 'mac') !== false)
1229
  {
1230
  $this->_platform = self::PLATFORM_APPLE;
1231
- }
1232
- elseif (stripos($this->_agent, 'android') !== false)
1233
  {
1234
  $this->_platform = self::PLATFORM_ANDROID;
1235
- }
1236
- elseif (stripos($this->_agent, 'linux') !== false)
1237
  {
1238
  $this->_platform = self::PLATFORM_LINUX;
1239
- }
1240
- else if (stripos($this->_agent, 'Nokia') !== false)
1241
  {
1242
  $this->_platform = self::PLATFORM_NOKIA;
1243
- }
1244
- else if (stripos($this->_agent, 'BlackBerry') !== false)
1245
  {
1246
  $this->_platform = self::PLATFORM_BLACKBERRY;
1247
- }
1248
- elseif (stripos($this->_agent, 'FreeBSD') !== false)
1249
  {
1250
  $this->_platform = self::PLATFORM_FREEBSD;
1251
- }
1252
- elseif (stripos($this->_agent, 'OpenBSD') !== false)
1253
  {
1254
  $this->_platform = self::PLATFORM_OPENBSD;
1255
- }
1256
- elseif (stripos($this->_agent, 'NetBSD') !== false)
1257
  {
1258
  $this->_platform = self::PLATFORM_NETBSD;
1259
- }
1260
- elseif (stripos($this->_agent, 'OpenSolaris') !== false)
1261
  {
1262
  $this->_platform = self::PLATFORM_OPENSOLARIS;
1263
- }
1264
- elseif (stripos($this->_agent, 'SunOS') !== false)
1265
  {
1266
  $this->_platform = self::PLATFORM_SUNOS;
1267
- }
1268
- elseif (stripos($this->_agent, 'OS\/2') !== false)
1269
  {
1270
  $this->_platform = self::PLATFORM_OS2;
1271
- }
1272
- elseif (stripos($this->_agent, 'BeOS') !== false)
1273
  {
1274
  $this->_platform = self::PLATFORM_BEOS;
1275
- }
1276
- elseif (stripos($this->_agent, 'win') !== false)
1277
  {
1278
  $this->_platform = self::PLATFORM_WINDOWS;
1279
  }
260
  * Is the browser from facebook?
261
  * @return boolean True if the browser is from facebook otherwise false
262
  */
263
+ public function isFacebook()
264
+ {
265
  return $this->_is_facebook;
266
  }
267
 
305
  * Set the Browser to be a Facebook request
306
  * @param boolean $value is the browser a robot or not
307
  */
308
+ protected function setFacebook($value = true)
309
+ {
310
+ $this->_is_facebook = $value;
311
  }
312
 
313
  /**
420
  $this->checkBrowserLynx() ||
421
  $this->checkBrowserShiretoko() ||
422
  $this->checkBrowserIceCat() ||
423
+ $this->checkBrowserIceweasel() ||
424
  $this->checkBrowserW3CValidator() ||
425
  $this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */
426
  );
502
  }
503
  return false;
504
  }
505
+
506
  /**
507
  * Determine if the browser is the BingBot or not (last updated 1.9)
508
  * @return boolean True if the browser is the BingBot otherwise false
1099
  * Detect Version for the Safari browser on iOS devices
1100
  * @return boolean True if it detects the version correctly otherwise false
1101
  */
1102
+ protected function getSafariVersionOnIos()
1103
  {
1104
  $aresult = explode('/',stristr($this->_agent,'Version'));
1105
+ if( isset($aresult[1]) )
1106
  {
1107
  $aversion = explode(' ',$aresult[1]);
1108
  $this->setVersion($aversion[0]);
1115
  * Detect Version for the Chrome browser on iOS devices
1116
  * @return boolean True if it detects the version correctly otherwise false
1117
  */
1118
+ protected function getChromeVersionOnIos()
1119
  {
1120
  $aresult = explode('/',stristr($this->_agent,'CriOS'));
1121
+ if( isset($aresult[1]) )
1122
  {
1123
  $aversion = explode(' ',$aresult[1]);
1124
  $this->setVersion($aversion[0]);
1209
  */
1210
  protected function checkPlatform()
1211
  {
1212
+ if (stripos($this->_agent, 'windows') !== false)
1213
  {
1214
  $this->_platform = self::PLATFORM_WINDOWS;
1215
+ }
1216
+ else if (stripos($this->_agent, 'iPad') !== false)
1217
  {
1218
  $this->_platform = self::PLATFORM_IPAD;
1219
+ }
1220
+ else if (stripos($this->_agent, 'iPod') !== false)
1221
  {
1222
  $this->_platform = self::PLATFORM_IPOD;
1223
+ }
1224
+ else if (stripos($this->_agent, 'iPhone') !== false)
1225
  {
1226
  $this->_platform = self::PLATFORM_IPHONE;
1227
+ }
1228
+ elseif (stripos($this->_agent, 'mac') !== false)
1229
  {
1230
  $this->_platform = self::PLATFORM_APPLE;
1231
+ }
1232
+ elseif (stripos($this->_agent, 'android') !== false)
1233
  {
1234
  $this->_platform = self::PLATFORM_ANDROID;
1235
+ }
1236
+ elseif (stripos($this->_agent, 'linux') !== false)
1237
  {
1238
  $this->_platform = self::PLATFORM_LINUX;
1239
+ }
1240
+ else if (stripos($this->_agent, 'Nokia') !== false)
1241
  {
1242
  $this->_platform = self::PLATFORM_NOKIA;
1243
+ }
1244
+ else if (stripos($this->_agent, 'BlackBerry') !== false)
1245
  {
1246
  $this->_platform = self::PLATFORM_BLACKBERRY;
1247
+ }
1248
+ elseif (stripos($this->_agent, 'FreeBSD') !== false)
1249
  {
1250
  $this->_platform = self::PLATFORM_FREEBSD;
1251
+ }
1252
+ elseif (stripos($this->_agent, 'OpenBSD') !== false)
1253
  {
1254
  $this->_platform = self::PLATFORM_OPENBSD;
1255
+ }
1256
+ elseif (stripos($this->_agent, 'NetBSD') !== false)
1257
  {
1258
  $this->_platform = self::PLATFORM_NETBSD;
1259
+ }
1260
+ elseif (stripos($this->_agent, 'OpenSolaris') !== false)
1261
  {
1262
  $this->_platform = self::PLATFORM_OPENSOLARIS;
1263
+ }
1264
+ elseif (stripos($this->_agent, 'SunOS') !== false)
1265
  {
1266
  $this->_platform = self::PLATFORM_SUNOS;
1267
+ }
1268
+ elseif (stripos($this->_agent, 'OS\/2') !== false)
1269
  {
1270
  $this->_platform = self::PLATFORM_OS2;
1271
+ }
1272
+ elseif (stripos($this->_agent, 'BeOS') !== false)
1273
  {
1274
  $this->_platform = self::PLATFORM_BEOS;
1275
+ }
1276
+ elseif (stripos($this->_agent, 'win') !== false)
1277
  {
1278
  $this->_platform = self::PLATFORM_WINDOWS;
1279
  }
includes/options/{redux-framework → redux-core}/inc/class.p.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/class.redux_admin_notices.php RENAMED
@@ -75,7 +75,7 @@
75
 
76
  // Get the current page. To avoid errors, we'll set
77
  // the redux page slug if the GET is empty.
78
- $pageName = empty( $_GET['page'] ) ? '&amp;page=' . self::$_parent->args['page_slug'] : '&amp;page=' . $_GET['page'];
79
 
80
  // Ditto for the current tab.
81
  $curTab = empty( $_GET['tab'] ) ? '&amp;tab=0' : '&amp;tab=' . esc_attr( $_GET['tab'] );
@@ -151,8 +151,8 @@
151
  $userid = $current_user->ID;
152
 
153
  // Get the notice id
154
- $id = $_GET['id'];
155
- $val = $_GET['dismiss'];
156
 
157
  // Add the dismiss request to the user meta.
158
  update_user_meta( $userid, 'ignore_' . $id, $val );
75
 
76
  // Get the current page. To avoid errors, we'll set
77
  // the redux page slug if the GET is empty.
78
+ $pageName = empty( $_GET['page'] ) ? '&amp;page=' . self::$_parent->args['page_slug'] : '&amp;page=' . esc_attr( $_GET['page'] );
79
 
80
  // Ditto for the current tab.
81
  $curTab = empty( $_GET['tab'] ) ? '&amp;tab=0' : '&amp;tab=' . esc_attr( $_GET['tab'] );
151
  $userid = $current_user->ID;
152
 
153
  // Get the notice id
154
+ $id = esc_attr( $_GET['id'] );
155
+ $val = esc_attr( $_GET['dismiss'] );
156
 
157
  // Add the dismiss request to the user meta.
158
  update_user_meta( $userid, 'ignore_' . $id, $val );
includes/options/{redux-framework → redux-core}/inc/class.redux_api.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/class.redux_cdn.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/class.redux_filesystem.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/class.redux_functions.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/class.redux_helpers.php RENAMED
@@ -148,7 +148,7 @@
148
  'php' => $version,
149
  'site' => array(
150
  'hash' => $hash,
151
- 'version' => bloginfo( 'version' ),
152
  'multisite' => is_multisite(),
153
  'users' => $user_query->get_total(),
154
  'lang' => get_locale(),
@@ -391,7 +391,7 @@
391
  // Only is a file-write check
392
  $sysinfo['redux_data_writeable'] = self::makeBoolStr( @$f( ReduxFramework::$_upload_dir . 'test-log.log', 'a' ) );
393
  $sysinfo['wp_content_url'] = WP_CONTENT_URL;
394
- $sysinfo['wp_ver'] = bloginfo( 'version' );
395
  $sysinfo['wp_multisite'] = is_multisite();
396
  $sysinfo['permalink_structure'] = get_option( 'permalink_structure' ) ? get_option( 'permalink_structure' ) : 'Default';
397
  $sysinfo['front_page_display'] = get_option( 'show_on_front' );
148
  'php' => $version,
149
  'site' => array(
150
  'hash' => $hash,
151
+ 'version' => get_bloginfo( 'version' ),
152
  'multisite' => is_multisite(),
153
  'users' => $user_query->get_total(),
154
  'lang' => get_locale(),
391
  // Only is a file-write check
392
  $sysinfo['redux_data_writeable'] = self::makeBoolStr( @$f( ReduxFramework::$_upload_dir . 'test-log.log', 'a' ) );
393
  $sysinfo['wp_content_url'] = WP_CONTENT_URL;
394
+ $sysinfo['wp_ver'] = get_bloginfo( 'version' );
395
  $sysinfo['wp_multisite'] = is_multisite();
396
  $sysinfo['permalink_structure'] = get_option( 'permalink_structure' ) ? get_option( 'permalink_structure' ) : 'Default';
397
  $sysinfo['front_page_display'] = get_option( 'show_on_front' );
includes/options/{redux-framework → redux-core}/inc/class.redux_instances.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/class.thirdparty.fixes.php RENAMED
File without changes
includes/options/redux-core/inc/extensions/README.txt ADDED
@@ -0,0 +1 @@
 
1
+ This directory is a placeholder for Redux Framework extensions.
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/extension_customizer.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/extension_customizer.js RENAMED
@@ -51,27 +51,27 @@
51
  customTypes: {}, // override defaultTypes
52
  defaultTypes: {
53
  string: function( str ) {
54
- return String( str )
55
  },
56
  number: function( str ) {
57
- return Number( str )
58
  },
59
  boolean: function( str ) {
60
- return (["false", "null", "undefined", "", "0"].indexOf( str ) === -1)
61
  },
62
  null: function( str ) {
63
- return (["false", "null", "undefined", "", "0"].indexOf( str ) !== -1) ? null : str
64
  },
65
  array: function( str ) {
66
- return JSON.parse( str )
67
  },
68
  object: function( str ) {
69
- return JSON.parse( str )
70
  },
71
  auto: function( str ) {
72
  return $.serializeJSON.parseValue(
73
  str, null, {parseNumbers: true, parseBooleans: true, parseNulls: true}
74
- )
75
  } // try again with something like "parseAll"
76
  },
77
 
@@ -83,7 +83,7 @@
83
  var opt, validOpts, defaultOptions, optWithDefault, parseAll, f;
84
  f = $.serializeJSON;
85
 
86
- if ( options == null ) options = {}; // options ||= {}
87
  defaultOptions = f.defaultOptions || {}; // defaultOptions
88
 
89
  // Make sure that the user didn't misspell an option
@@ -97,7 +97,7 @@
97
  // Helper to get the default value for this option if none is specified by the user
98
  optWithDefault = function( key ) {
99
  return (options[key] !== false) && (options[key] !== '') && (options[key] || defaultOptions[key]);
100
- }
101
 
102
  // Return computed options (opts to be used in the rest of the script)
103
  parseAll = optWithDefault( 'parseAll' );
@@ -112,7 +112,7 @@
112
  typeFunctions: $.extend( {}, optWithDefault( 'defaultTypes' ), optWithDefault( 'customTypes' ) ),
113
 
114
  useIntKeysAsArrayIndex: optWithDefault( 'useIntKeysAsArrayIndex' ),
115
- }
116
  },
117
 
118
  // Given a string, apply the type or the relevant "parse" options, to return the parsed value
@@ -152,9 +152,9 @@
152
  } else {
153
  var keys = [];
154
  for ( var key in obj ) {
155
- keys.push( key )
156
  }
157
- ;
158
  return keys;
159
  }
160
  }, // polyfill Object.keys to get option keys in IE<9
51
  customTypes: {}, // override defaultTypes
52
  defaultTypes: {
53
  string: function( str ) {
54
+ return String( str );
55
  },
56
  number: function( str ) {
57
+ return Number( str );
58
  },
59
  boolean: function( str ) {
60
+ return (["false", "null", "undefined", "", "0"].indexOf( str ) === -1);
61
  },
62
  null: function( str ) {
63
+ return (["false", "null", "undefined", "", "0"].indexOf( str ) !== -1) ? null : str;
64
  },
65
  array: function( str ) {
66
+ return JSON.parse( str );
67
  },
68
  object: function( str ) {
69
+ return JSON.parse( str );
70
  },
71
  auto: function( str ) {
72
  return $.serializeJSON.parseValue(
73
  str, null, {parseNumbers: true, parseBooleans: true, parseNulls: true}
74
+ );
75
  } // try again with something like "parseAll"
76
  },
77
 
83
  var opt, validOpts, defaultOptions, optWithDefault, parseAll, f;
84
  f = $.serializeJSON;
85
 
86
+ if ( options === null || options === undefined ) options = {}; // options ||= {}
87
  defaultOptions = f.defaultOptions || {}; // defaultOptions
88
 
89
  // Make sure that the user didn't misspell an option
97
  // Helper to get the default value for this option if none is specified by the user
98
  optWithDefault = function( key ) {
99
  return (options[key] !== false) && (options[key] !== '') && (options[key] || defaultOptions[key]);
100
+ };
101
 
102
  // Return computed options (opts to be used in the rest of the script)
103
  parseAll = optWithDefault( 'parseAll' );
112
  typeFunctions: $.extend( {}, optWithDefault( 'defaultTypes' ), optWithDefault( 'customTypes' ) ),
113
 
114
  useIntKeysAsArrayIndex: optWithDefault( 'useIntKeysAsArrayIndex' ),
115
+ };
116
  },
117
 
118
  // Given a string, apply the type or the relevant "parse" options, to return the parsed value
152
  } else {
153
  var keys = [];
154
  for ( var key in obj ) {
155
+ keys.push( key );
156
  }
157
+
158
  return keys;
159
  }
160
  }, // polyfill Object.keys to get option keys in IE<9
includes/options/redux-core/inc/extensions/customizer/extension_customizer.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";a.fn.serializeJSON=function(b){var c,d,e,f,g,h,i;return h=a.serializeJSON,i=h.setupOpts(b),d=this.serializeArray(),h.readCheckboxUncheckedValues(d,this,i),c={},a.each(d,function(a,b){e=h.splitInputNameIntoKeysArray(b.name,i),f=e.pop(),"skip"!==f&&(g=h.parseValue(b.value,f,i),i.parseWithFunction&&"_"===f&&(g=i.parseWithFunction(g,b.name)),h.deepSet(c,e,g,i))}),c},a.serializeJSON={defaultOptions:{checkboxUncheckedValue:void 0,parseNumbers:!1,parseBooleans:!1,parseNulls:!1,parseAll:!1,parseWithFunction:null,customTypes:{},defaultTypes:{string:function(a){return String(a)},number:function(a){return Number(a)},"boolean":function(a){return-1===["false","null","undefined","","0"].indexOf(a)},"null":function(a){return-1!==["false","null","undefined","","0"].indexOf(a)?null:a},array:function(a){return JSON.parse(a)},object:function(a){return JSON.parse(a)},auto:function(b){return a.serializeJSON.parseValue(b,null,{parseNumbers:!0,parseBooleans:!0,parseNulls:!0})}},useIntKeysAsArrayIndex:!1},setupOpts:function(b){var c,d,e,f,g,h;h=a.serializeJSON,(null===b||void 0===b)&&(b={}),e=h.defaultOptions||{},d=["checkboxUncheckedValue","parseNumbers","parseBooleans","parseNulls","parseAll","parseWithFunction","customTypes","defaultTypes","useIntKeysAsArrayIndex"];for(c in b)if(-1===d.indexOf(c))throw new Error("serializeJSON ERROR: invalid option '"+c+"'. Please use one of "+d.join(", "));return f=function(a){return b[a]!==!1&&""!==b[a]&&(b[a]||e[a])},g=f("parseAll"),{checkboxUncheckedValue:f("checkboxUncheckedValue"),parseNumbers:g||f("parseNumbers"),parseBooleans:g||f("parseBooleans"),parseNulls:g||f("parseNulls"),parseWithFunction:f("parseWithFunction"),typeFunctions:a.extend({},f("defaultTypes"),f("customTypes")),useIntKeysAsArrayIndex:f("useIntKeysAsArrayIndex")}},parseValue:function(b,c,d){var e,f;return f=a.serializeJSON,e=d.typeFunctions&&d.typeFunctions[c],e?e(b):d.parseNumbers&&f.isNumeric(b)?Number(b):!d.parseBooleans||"true"!==b&&"false"!==b?d.parseNulls&&"null"==b?null:b:"true"===b},isObject:function(a){return a===Object(a)},isUndefined:function(a){return void 0===a},isValidArrayIndex:function(a){return/^[0-9]+$/.test(String(a))},isNumeric:function(a){return a-parseFloat(a)>=0},optionKeys:function(a){if(Object.keys)return Object.keys(a);var b=[];for(var c in a)b.push(c);return b},splitInputNameIntoKeysArray:function(b,c){var d,e,f,g,h;return h=a.serializeJSON,g=h.extractTypeFromInputName(b,c),e=g[0],f=g[1],d=e.split("["),d=a.map(d,function(a){return a.replace(/]/g,"")}),""===d[0]&&d.shift(),d.push(f),d},extractTypeFromInputName:function(b,c){var d,e,f;if(d=b.match(/(.*):([^:]+)$/)){if(f=a.serializeJSON,e=f.optionKeys(c?c.typeFunctions:f.defaultOptions.defaultTypes),e.push("skip"),-1!==e.indexOf(d[2]))return[d[1],d[2]];throw new Error("serializeJSON ERROR: Invalid type "+d[2]+" found in input name '"+b+"', please use one of "+e.join(", "))}return[b,"_"]},deepSet:function(b,c,d,e){var f,g,h,i,j,k;if(null==e&&(e={}),k=a.serializeJSON,k.isUndefined(b))throw new Error("ArgumentError: param 'o' expected to be an object or array, found undefined");if(!c||0===c.length)throw new Error("ArgumentError: param 'keys' expected to be an array with least one element");f=c[0],1===c.length?""===f?b.push(d):b[f]=d:(g=c[1],""===f&&(i=b.length-1,j=b[i],f=k.isObject(j)&&(k.isUndefined(j[g])||c.length>2)?i:i+1),""===g?(k.isUndefined(b[f])||!a.isArray(b[f]))&&(b[f]=[]):e.useIntKeysAsArrayIndex&&k.isValidArrayIndex(g)?(k.isUndefined(b[f])||!a.isArray(b[f]))&&(b[f]=[]):(k.isUndefined(b[f])||!k.isObject(b[f]))&&(b[f]={}),h=c.slice(1),k.deepSet(b[f],h,d,e))},readCheckboxUncheckedValues:function(b,c,d){var e,f,g,h,i;null==d&&(d={}),i=a.serializeJSON,e="input[type=checkbox][name]:not(:checked):not([disabled])",f=c.find(e).add(c.filter(e)),f.each(function(c,e){g=a(e),h=g.attr("data-unchecked-value"),h?b.push({name:e.name,value:h}):i.isUndefined(d.checkboxUncheckedValue)||b.push({name:e.name,value:d.checkboxUncheckedValue})})}}}(window.jQuery||window.$),function(a){"use strict";redux.customizer=redux.customizer||{},a(document).ready(function(){redux.customizer.init()}),redux.customizer.init=function(){a("body").addClass(redux_customizer.body_class),a(".accordion-section.redux-section, .accordion-section.redux-panel, .accordion-section-title").click(function(){a.redux.initFields()})},redux.customizer.save=function(a,b){var c=a.hasClass("redux-field")?a:a.parents(".redux-field-container:first");redux.customizer.inputSave(c)},redux.customizer.inputSave=function(b){b.hasClass("redux-field-container")||(b=b.parents('[class^="redux-field-container"]'));var c=b.parent().find(".redux-customizer-input").data("id");if(!c){b=b.parents(".redux-container-repeater:first");var c=b.parent().find(".redux-customizer-input").data("id")}var d=b.find(":input").serializeJSON();a.each(d,function(a,b){d=b});var e=b.parent().find(".redux-customizer-input").data("key");d[e]&&(d=d[e]);var f=wp.customize.control(c);f.setting.set(d)}}(jQuery);
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/extension_customizer.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/extension_customizer.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_control.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_devs.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_fields.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_panel.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/customizer/inc/customizer_section.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/import_export/extension_import_export.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/import_export/import_export/field_import_export.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/options_object/extension_options_object.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/extensions/options_object/options_object/field_options_object.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/ace_editor/field_ace_editor.scss RENAMED
File without changes
includes/options/redux-core/inc/fields/background/field_background.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-main .redux-container-background .redux-background-position,.redux-main .redux-container-background .redux-background-position select,.redux-main .redux-container-background .redux-background-attachment,.redux-main .redux-container-background .redux-background-attachment select,.redux-main .redux-container-background .redux-background-clip,.redux-main .redux-container-background .redux-background-clip select,.redux-main .redux-container-background .redux-background-origin,.redux-main .redux-container-background .redux-background-origin select,.redux-main .redux-container-background .redux-background-size,.redux-main .redux-container-background .redux-background-size select,.redux-main .redux-container-background .redux-background-repeat,.redux-main .redux-container-background .redux-background-repeat select{width:200px !important;margin-right:10px;margin-bottom:7px}.redux-main .redux-container-background .background-preview{display:block;width:100%;margin:5px 0 10px;border:1px dotted lightgray}.redux-main .redux-container-background .select2-container{margin-right:10px;margin-bottom:10px}.redux-main .redux-container-background .wp-picker-container{margin-bottom:10px}.redux-main .redux-container-background .upload{width:100%;margin-bottom:8px}.redux-main .redux-container-select li.ui-state-highlight{height:20px;margin-top:2px;margin-left:5px;width:64px;margin-bottom:0}.wp-customizer .redux-container-background .redux-background-position,.wp-customizer .redux-container-background .redux-background-position select,.wp-customizer .redux-container-background .redux-background-attachment,.wp-customizer .redux-container-background .redux-background-attachment select,.wp-customizer .redux-container-background .redux-background-clip,.wp-customizer .redux-container-background .redux-background-clip select,.wp-customizer .redux-container-background .redux-background-origin,.wp-customizer .redux-container-background .redux-background-origin select,.wp-customizer .redux-container-background .redux-background-size,.wp-customizer .redux-container-background .redux-background-size select,.wp-customizer .redux-container-background .redux-background-repeat,.wp-customizer .redux-container-background .redux-background-repeat select{width:100% !important}
includes/options/redux-core/inc/fields/background/field_background.js ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Redux Background
3
+ * Dependencies : jquery, wp media uploader
4
+ * Feature added by : Dovy Paukstys
5
+ * Date : 07 Jan 2014
6
+ */
7
+
8
+ /*global redux_change, wp, redux*/
9
+
10
+ (function( $ ) {
11
+ "use strict";
12
+
13
+ redux.field_objects = redux.field_objects || {};
14
+ redux.field_objects.background = redux.field_objects.background || {};
15
+
16
+ redux.field_objects.background.init = function( selector ) {
17
+ if ( !selector ) {
18
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-background:visible' );
19
+ }
20
+
21
+ $( selector ).each(
22
+ function() {
23
+ var el = $( this );
24
+ var parent = el;
25
+ if ( !el.hasClass( 'redux-field-container' ) ) {
26
+ parent = el.parents( '.redux-field-container:first' );
27
+ }
28
+
29
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
30
+ return;
31
+ }
32
+
33
+ if ( parent.hasClass( 'redux-field-init' ) ) {
34
+ parent.removeClass( 'redux-field-init' );
35
+ } else {
36
+ return;
37
+ }
38
+ // Remove the image button
39
+ el.find( '.redux-remove-background' ).unbind( 'click' ).on(
40
+ 'click', function( e ) {
41
+ e.preventDefault();
42
+ redux.field_objects.background.removeImage( $( this ).parents( '.redux-container-background:first' ) );
43
+ return false;
44
+ }
45
+ );
46
+
47
+ // Upload media button
48
+ el.find( '.redux-background-upload' ).unbind().on(
49
+ 'click', function( event ) {
50
+ redux.field_objects.background.addImage(
51
+ event, $( this ).parents( '.redux-container-background:first' )
52
+ );
53
+ }
54
+ );
55
+
56
+ el.find( '.redux-background-input' ).on(
57
+ 'change', function() {
58
+ redux.field_objects.background.preview( $( this ) );
59
+ }
60
+ );
61
+
62
+ el.find( '.redux-color' ).wpColorPicker(
63
+ {
64
+ change: function( e, ui ) {
65
+ $( this ).val( ui.color.toString() );
66
+ redux_change( $( this ) );
67
+ $( '#' + e.target.id + '-transparency' ).removeAttr( 'checked' );
68
+ redux.field_objects.background.preview( $( this ) );
69
+ },
70
+
71
+ clear: function( e, ui ) {
72
+ $( this ).val( ui.color.toString() );
73
+ redux_change( $( this ).parent().find( '.redux-color-init' ) );
74
+ redux.field_objects.background.preview( $( this ) );
75
+ }
76
+ }
77
+ );
78
+
79
+ // Replace and validate field on blur
80
+ el.find( '.redux-color' ).on(
81
+ 'blur', function() {
82
+ var value = $( this ).val();
83
+ var id = '#' + $( this ).attr( 'id' );
84
+
85
+ if ( value === "transparent" ) {
86
+ $( this ).parent().parent().find( '.wp-color-result' ).css(
87
+ 'background-color', 'transparent'
88
+ );
89
+
90
+ el.find( id + '-transparency' ).attr( 'checked', 'checked' );
91
+ } else {
92
+ if ( colorValidate( this ) === value ) {
93
+ if ( value.indexOf( "#" ) !== 0 ) {
94
+ $( this ).val( $( this ).data( 'oldcolor' ) );
95
+ }
96
+ }
97
+
98
+ el.find( id + '-transparency' ).removeAttr( 'checked' );
99
+ }
100
+ }
101
+ );
102
+
103
+ el.find( '.redux-color' ).on(
104
+ 'focus', function() {
105
+ $( this ).data( 'oldcolor', $( this ).val() );
106
+ }
107
+ );
108
+
109
+ el.find( '.redux-color' ).on(
110
+ 'keyup', function() {
111
+ var value = $( this ).val();
112
+ var color = colorValidate( this );
113
+ var id = '#' + $( this ).attr( 'id' );
114
+
115
+ if ( value === "transparent" ) {
116
+ $( this ).parent().parent().find( '.wp-color-result' ).css(
117
+ 'background-color', 'transparent'
118
+ );
119
+ el.find( id + '-transparency' ).attr( 'checked', 'checked' );
120
+ } else {
121
+ el.find( id + '-transparency' ).removeAttr( 'checked' );
122
+
123
+ if ( color && color !== $( this ).val() ) {
124
+ $( this ).val( color );
125
+ }
126
+ }
127
+ }
128
+ );
129
+
130
+ // When transparency checkbox is clicked
131
+ el.find( '.color-transparency' ).on(
132
+ 'click', function() {
133
+ if ( $( this ).is( ":checked" ) ) {
134
+ el.find( '.redux-saved-color' ).val( $( '#' + $( this ).data( 'id' ) ).val() );
135
+ el.find( '#' + $( this ).data( 'id' ) ).val( 'transparent' );
136
+ el.find( '#' + $( this ).data( 'id' ) ).parent().parent().find( '.wp-color-result' ).css(
137
+ 'background-color', 'transparent'
138
+ );
139
+ } else {
140
+ if ( el.find( '#' + $( this ).data( 'id' ) ).val() === 'transparent' ) {
141
+ var prevColor = $( '.redux-saved-color' ).val();
142
+
143
+ if ( prevColor === '' ) {
144
+ prevColor = $( '#' + $( this ).data( 'id' ) ).data( 'default-color' );
145
+ }
146
+
147
+ el.find( '#' + $( this ).data( 'id' ) ).parent().parent().find( '.wp-color-result' ).css(
148
+ 'background-color', prevColor
149
+ );
150
+ el.find( '#' + $( this ).data( 'id' ) ).val( prevColor );
151
+ }
152
+ }
153
+ redux.field_objects.background.preview( $( this ) );
154
+ redux_change( $( this ) );
155
+ }
156
+ );
157
+
158
+ var default_params = {
159
+ width: 'resolve',
160
+ triggerChange: true,
161
+ allowClear: true
162
+ };
163
+
164
+ var select2_handle = el.find( '.select2_params' );
165
+ if ( select2_handle.size() > 0 ) {
166
+ var select2_params = select2_handle.val();
167
+
168
+ select2_params = JSON.parse( select2_params );
169
+ default_params = $.extend( {}, default_params, select2_params );
170
+ }
171
+
172
+ el.find( " .redux-background-repeat, .redux-background-clip, .redux-background-origin, .redux-background-size, .redux-background-attachment, .redux-background-position" ).select2( default_params );
173
+
174
+ }
175
+ );
176
+ };
177
+
178
+ // Update the background preview
179
+ redux.field_objects.background.preview = function( selector ) {
180
+ var parent = $( selector ).parents( '.redux-container-background:first' );
181
+ var preview = $( parent ).find( '.background-preview' );
182
+
183
+ if ( !preview ) { // No preview present
184
+ return;
185
+ }
186
+ var hide = true;
187
+
188
+ var css = 'height:' + preview.height() + 'px;';
189
+ $( parent ).find( '.redux-background-input' ).each(
190
+ function() {
191
+ var data = $( this ).serializeArray();
192
+ data = data[0];
193
+ if ( data && data.name.indexOf( '[background-' ) != -1 ) {
194
+ if ( data.value !== "" ) {
195
+ hide = false;
196
+ data.name = data.name.split( '[background-' );
197
+ data.name = 'background-' + data.name[1].replace( ']', '' );
198
+ if ( data.name == "background-image" ) {
199
+ css += data.name + ':url("' + data.value + '");';
200
+ } else {
201
+ css += data.name + ':' + data.value + ';';
202
+ }
203
+ }
204
+ }
205
+ }
206
+ );
207
+ if ( !hide ) {
208
+ preview.attr( 'style', css ).fadeIn();
209
+ } else {
210
+ preview.slideUp();
211
+ }
212
+
213
+
214
+ };
215
+
216
+ // Add a file via the wp.media function
217
+ redux.field_objects.background.addImage = function( event, selector ) {
218
+ event.preventDefault();
219
+
220
+ var frame;
221
+ var jQueryel = $( this );
222
+
223
+ // If the media frame already exists, reopen it.
224
+ if ( frame ) {
225
+ frame.open();
226
+ return;
227
+ }
228
+
229
+ // Create the media frame.
230
+ frame = wp.media(
231
+ {
232
+ multiple: false,
233
+ library: {
234
+ //type: 'image' //Only allow images
235
+ },
236
+ // Set the title of the modal.
237
+ title: jQueryel.data( 'choose' ),
238
+ // Customize the submit button.
239
+ button: {
240
+ // Set the text of the button.
241
+ text: jQueryel.data( 'update' )
242
+ // Tell the button not to close the modal, since we're
243
+ // going to refresh the page when the image is selected.
244
+
245
+ }
246
+ }
247
+ );
248
+
249
+ // When an image is selected, run a callback.
250
+ frame.on(
251
+ 'select', function() {
252
+ // Grab the selected attachment.
253
+ var attachment = frame.state().get( 'selection' ).first();
254
+ frame.close();
255
+
256
+ //console.log(attachment.attributes.type);
257
+
258
+ if ( attachment.attributes.type !== "image" ) {
259
+ return;
260
+ }
261
+
262
+ selector.find( '.upload' ).val( attachment.attributes.url );
263
+ selector.find( '.upload-id' ).val( attachment.attributes.id );
264
+ selector.find( '.upload-height' ).val( attachment.attributes.height );
265
+ selector.find( '.upload-width' ).val( attachment.attributes.width );
266
+ redux_change( $( selector ).find( '.upload-id' ) );
267
+ var thumbSrc = attachment.attributes.url;
268
+ if ( typeof attachment.attributes.sizes !== 'undefined' && typeof attachment.attributes.sizes.thumbnail !== 'undefined' ) {
269
+ thumbSrc = attachment.attributes.sizes.thumbnail.url;
270
+ } else if ( typeof attachment.attributes.sizes !== 'undefined' ) {
271
+ var height = attachment.attributes.height;
272
+ for ( var key in attachment.attributes.sizes ) {
273
+ var object = attachment.attributes.sizes[key];
274
+ if ( object.height < height ) {
275
+ height = object.height;
276
+ thumbSrc = object.url;
277
+ }
278
+ }
279
+ } else {
280
+ thumbSrc = attachment.attributes.icon;
281
+ }
282
+ selector.find( '.upload-thumbnail' ).val( thumbSrc );
283
+ if ( !selector.find( '.upload' ).hasClass( 'noPreview' ) ) {
284
+ selector.find( '.screenshot' ).empty().hide().append( '<img class="redux-option-image" src="' + thumbSrc + '">' ).slideDown( 'fast' );
285
+ }
286
+
287
+ selector.find( '.redux-remove-background' ).removeClass( 'hide' );//show "Remove" button
288
+ selector.find( '.redux-background-input-properties' ).slideDown();
289
+ redux.field_objects.background.preview( selector.find( '.upload' ) );
290
+ }
291
+ );
292
+
293
+ // Finally, open the modal.
294
+ frame.open();
295
+ };
296
+
297
+ // Update the background preview
298
+ redux.field_objects.background.removeImage = function( selector ) {
299
+
300
+ // This shouldn't have been run...
301
+ if ( !selector.find( '.redux-remove-background' ).addClass( 'hide' ) ) {
302
+ return;
303
+ }
304
+ selector.find( '.redux-remove-background' ).addClass( 'hide' ); //hide "Remove" button
305
+
306
+ selector.find( '.upload' ).val( '' );
307
+ selector.find( '.upload-id' ).val( '' );
308
+ selector.find( '.upload-height' ).val( '' );
309
+ selector.find( '.upload-width' ).val( '' );
310
+ redux_change( $( selector ).find( '.upload-id' ) );
311
+ selector.find( '.redux-background-input-properties' ).hide();
312
+ var screenshot = selector.find( '.screenshot' );
313
+
314
+ // Hide the screenshot
315
+ screenshot.slideUp();
316
+
317
+ selector.find( '.remove-file' ).unbind();
318
+ // We don't display the upload button if .upload-notice is present
319
+ // This means the user doesn't have the WordPress 3.5 Media Library Support
320
+ if ( $( '.section-upload .upload-notice' ).length > 0 ) {
321
+ $( '.redux-background-upload' ).remove();
322
+ }
323
+ };
324
+ })( jQuery );
includes/options/redux-core/inc/fields/background/field_background.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.background=redux.field_objects.background||{},redux.field_objects.background.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-background:visible")),a(b).each(function(){var b=a(this),c=b;if(b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),!c.is(":hidden")&&c.hasClass("redux-field-init")){c.removeClass("redux-field-init"),b.find(".redux-remove-background").unbind("click").on("click",function(b){return b.preventDefault(),redux.field_objects.background.removeImage(a(this).parents(".redux-container-background:first")),!1}),b.find(".redux-background-upload").unbind().on("click",function(b){redux.field_objects.background.addImage(b,a(this).parents(".redux-container-background:first"))}),b.find(".redux-background-input").on("change",function(){redux.field_objects.background.preview(a(this))}),b.find(".redux-color").wpColorPicker({change:function(b,c){a(this).val(c.color.toString()),redux_change(a(this)),a("#"+b.target.id+"-transparency").removeAttr("checked"),redux.field_objects.background.preview(a(this))},clear:function(b,c){a(this).val(c.color.toString()),redux_change(a(this).parent().find(".redux-color-init")),redux.field_objects.background.preview(a(this))}}),b.find(".redux-color").on("blur",function(){var c=a(this).val(),d="#"+a(this).attr("id");"transparent"===c?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),b.find(d+"-transparency").attr("checked","checked")):(colorValidate(this)===c&&0!==c.indexOf("#")&&a(this).val(a(this).data("oldcolor")),b.find(d+"-transparency").removeAttr("checked"))}),b.find(".redux-color").on("focus",function(){a(this).data("oldcolor",a(this).val())}),b.find(".redux-color").on("keyup",function(){var c=a(this).val(),d=colorValidate(this),e="#"+a(this).attr("id");"transparent"===c?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),b.find(e+"-transparency").attr("checked","checked")):(b.find(e+"-transparency").removeAttr("checked"),d&&d!==a(this).val()&&a(this).val(d))}),b.find(".color-transparency").on("click",function(){if(a(this).is(":checked"))b.find(".redux-saved-color").val(a("#"+a(this).data("id")).val()),b.find("#"+a(this).data("id")).val("transparent"),b.find("#"+a(this).data("id")).parent().parent().find(".wp-color-result").css("background-color","transparent");else if("transparent"===b.find("#"+a(this).data("id")).val()){var c=a(".redux-saved-color").val();""===c&&(c=a("#"+a(this).data("id")).data("default-color")),b.find("#"+a(this).data("id")).parent().parent().find(".wp-color-result").css("background-color",c),b.find("#"+a(this).data("id")).val(c)}redux.field_objects.background.preview(a(this)),redux_change(a(this))});var d={width:"resolve",triggerChange:!0,allowClear:!0},e=b.find(".select2_params");if(e.size()>0){var f=e.val();f=JSON.parse(f),d=a.extend({},d,f)}b.find(" .redux-background-repeat, .redux-background-clip, .redux-background-origin, .redux-background-size, .redux-background-attachment, .redux-background-position").select2(d)}})},redux.field_objects.background.preview=function(b){var c=a(b).parents(".redux-container-background:first"),d=a(c).find(".background-preview");if(d){var e=!0,f="height:"+d.height()+"px;";a(c).find(".redux-background-input").each(function(){var b=a(this).serializeArray();b=b[0],b&&-1!=b.name.indexOf("[background-")&&""!==b.value&&(e=!1,b.name=b.name.split("[background-"),b.name="background-"+b.name[1].replace("]",""),f+="background-image"==b.name?b.name+':url("'+b.value+'");':b.name+":"+b.value+";")}),e?d.slideUp():d.attr("style",f).fadeIn()}},redux.field_objects.background.addImage=function(b,c){b.preventDefault();var d,e=a(this);return d?void d.open():(d=wp.media({multiple:!1,library:{},title:e.data("choose"),button:{text:e.data("update")}}),d.on("select",function(){var b=d.state().get("selection").first();if(d.close(),"image"===b.attributes.type){c.find(".upload").val(b.attributes.url),c.find(".upload-id").val(b.attributes.id),c.find(".upload-height").val(b.attributes.height),c.find(".upload-width").val(b.attributes.width),redux_change(a(c).find(".upload-id"));var e=b.attributes.url;if("undefined"!=typeof b.attributes.sizes&&"undefined"!=typeof b.attributes.sizes.thumbnail)e=b.attributes.sizes.thumbnail.url;else if("undefined"!=typeof b.attributes.sizes){var f=b.attributes.height;for(var g in b.attributes.sizes){var h=b.attributes.sizes[g];h.height<f&&(f=h.height,e=h.url)}}else e=b.attributes.icon;c.find(".upload-thumbnail").val(e),c.find(".upload").hasClass("noPreview")||c.find(".screenshot").empty().hide().append('<img class="redux-option-image" src="'+e+'">').slideDown("fast"),c.find(".redux-remove-background").removeClass("hide"),c.find(".redux-background-input-properties").slideDown(),redux.field_objects.background.preview(c.find(".upload"))}}),void d.open())},redux.field_objects.background.removeImage=function(b){if(b.find(".redux-remove-background").addClass("hide")){b.find(".redux-remove-background").addClass("hide"),b.find(".upload").val(""),b.find(".upload-id").val(""),b.find(".upload-height").val(""),b.find(".upload-width").val(""),redux_change(a(b).find(".upload-id")),b.find(".redux-background-input-properties").hide();var c=b.find(".screenshot");c.slideUp(),b.find(".remove-file").unbind(),a(".section-upload .upload-notice").length>0&&a(".redux-background-upload").remove()}}}(jQuery);
includes/options/redux-core/inc/fields/background/field_background.php ADDED
@@ -0,0 +1,430 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Background
17
+ * @author Dovy Paukstys
18
+ * @version 3.1.5
19
+ */
20
+ // Exit if accessed directly
21
+ if ( ! defined( 'ABSPATH' ) ) {
22
+ exit;
23
+ }
24
+
25
+ // Don't duplicate me!
26
+ if ( ! class_exists( 'ReduxFramework_background' ) ) {
27
+
28
+ /**
29
+ * Main ReduxFramework_background class
30
+ *
31
+ * @since 3.1.5
32
+ */
33
+ class ReduxFramework_background {
34
+
35
+ /**
36
+ * Field Constructor.
37
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
38
+ *
39
+ * @since 3.1.5
40
+ * @access public
41
+ * @return void
42
+ */
43
+ function __construct( $field = array(), $value = '', $parent ) {
44
+
45
+ $this->parent = $parent;
46
+ $this->field = $field;
47
+ $this->value = $value;
48
+ }
49
+
50
+ /**
51
+ * Field Render Function.
52
+ * Takes the vars and outputs the HTML for the field in the settings
53
+ *
54
+ * @since 1.0.0
55
+ * @access public
56
+ * @return void
57
+ */
58
+ public function render() {
59
+
60
+ $defaults = array(
61
+ 'background-color' => true,
62
+ 'background-repeat' => true,
63
+ 'background-attachment' => true,
64
+ 'background-position' => true,
65
+ 'background-image' => true,
66
+ 'background-gradient' => false,
67
+ 'background-clip' => false,
68
+ 'background-origin' => false,
69
+ 'background-size' => true,
70
+ 'preview_media' => false,
71
+ 'preview' => true,
72
+ 'preview_height' => '200px',
73
+ 'transparent' => true,
74
+ );
75
+
76
+ $this->field = wp_parse_args( $this->field, $defaults );
77
+
78
+ // No errors please
79
+ $defaults = array(
80
+ 'background-color' => '',
81
+ 'background-repeat' => '',
82
+ 'background-attachment' => '',
83
+ 'background-position' => '',
84
+ 'background-image' => '',
85
+ 'background-clip' => '',
86
+ 'background-origin' => '',
87
+ 'background-size' => '',
88
+ 'media' => array(),
89
+ );
90
+
91
+ $this->value = wp_parse_args( $this->value, $defaults );
92
+
93
+ $defaults = array(
94
+ 'id' => '',
95
+ 'width' => '',
96
+ 'height' => '',
97
+ 'thumbnail' => '',
98
+ );
99
+
100
+ $this->value['media'] = wp_parse_args( $this->value['media'], $defaults );
101
+
102
+ // select2 args
103
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
104
+ $select2_params = json_encode( $this->field['select2'] );
105
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
106
+
107
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
108
+ }
109
+
110
+ if ( $this->field['background-color'] === true ) {
111
+
112
+ if ( isset( $this->value['color'] ) && empty( $this->value['background-color'] ) ) {
113
+ $this->value['background-color'] = $this->value['color'];
114
+ }
115
+
116
+ echo '<input data-id="' . $this->field['id'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[background-color]" id="' . $this->field['id'] . '-color" class="redux-color redux-background-input redux-color-init ' . $this->field['class'] . '" type="text" value="' . $this->value['background-color'] . '" data-default-color="' . ( isset( $this->field['default']['background-color'] ) ? $this->field['default']['background-color'] : "" ) . '" />';
117
+ echo '<input type="hidden" class="redux-saved-color" id="' . $this->field['id'] . '-saved-color' . '" value="">';
118
+
119
+ if ( ! isset( $this->field['transparent'] ) || $this->field['transparent'] !== false ) {
120
+ $tChecked = "";
121
+ if ( $this->value['background-color'] == "transparent" ) {
122
+ $tChecked = ' checked="checked"';
123
+ }
124
+ echo '<label for="' . $this->field['id'] . '-transparency" class="color-transparency-check"><input type="checkbox" class="checkbox color-transparency redux-background-input ' . $this->field['class'] . '" id="' . $this->field['id'] . '-transparency" data-id="' . $this->field['id'] . '-color" value="1"' . $tChecked . '> ' . __( 'Transparent', 'redux-framework' ) . '</label>';
125
+ }
126
+
127
+ if ( $this->field['background-repeat'] === true || $this->field['background-position'] === true || $this->field['background-attachment'] === true ) {
128
+ echo '<br />';
129
+ }
130
+ }
131
+
132
+
133
+ if ( $this->field['background-repeat'] === true ) {
134
+ $array = array(
135
+ 'no-repeat' => 'No Repeat',
136
+ 'repeat' => 'Repeat All',
137
+ 'repeat-x' => 'Repeat Horizontally',
138
+ 'repeat-y' => 'Repeat Vertically',
139
+ 'inherit' => 'Inherit',
140
+ );
141
+ echo '<select id="' . $this->field['id'] . '-repeat-select" data-placeholder="' . __( 'Background Repeat', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[background-repeat]" class="redux-select-item redux-background-input redux-background-repeat ' . $this->field['class'] . '">';
142
+ echo '<option></option>';
143
+
144
+ foreach ( $array as $k => $v ) {
145
+ echo '<option value="' . $k . '"' . selected( $this->value['background-repeat'], $k, false ) . '>' . $v . '</option>';
146
+ }
147
+ echo '</select>';
148
+ }
149
+
150
+ if ( $this->field['background-clip'] === true ) {
151
+ $array = array(
152
+ 'inherit' => 'Inherit',
153
+ 'border-box' => 'Border Box',
154
+ 'content-box' => 'Content Box',
155
+ 'padding-box' => 'Padding Box',
156
+ );
157
+ echo '<select id="' . $this->field['id'] . '-repeat-select" data-placeholder="' . __( 'Background Clip', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[background-clip]" class="redux-select-item redux-background-input redux-background-clip ' . $this->field['class'] . '">';
158
+ echo '<option></option>';
159
+
160
+ foreach ( $array as $k => $v ) {
161
+ echo '<option value="' . $k . '"' . selected( $this->value['background-clip'], $k, false ) . '>' . $v . '</option>';
162
+ }
163
+ echo '</select>';
164
+ }
165
+
166
+ if ( $this->field['background-origin'] === true ) {
167
+ $array = array(
168
+ 'inherit' => 'Inherit',
169
+ 'border-box' => 'Border Box',
170
+ 'content-box' => 'Content Box',
171
+ 'padding-box' => 'Padding Box',
172
+ );
173
+ echo '<select id="' . $this->field['id'] . '-repeat-select" data-placeholder="' . __( 'Background Origin', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[background-origin]" class="redux-select-item redux-background-input redux-background-origin ' . $this->field['class'] . '">';
174
+ echo '<option></option>';
175
+
176
+ foreach ( $array as $k => $v ) {
177
+ echo '<option value="' . $k . '"' . selected( $this->value['background-origin'], $k, false ) . '>' . $v . '</option>';
178
+ }
179
+ echo '</select>';
180
+ }
181
+
182
+ if ( $this->field['background-size'] === true ) {
183
+ $array = array(
184
+ 'inherit' => 'Inherit',
185
+ 'cover' => 'Cover',
186
+ 'contain' => 'Contain',
187
+ );
188
+ echo '<select id="' . $this->field['id'] . '-repeat-select" data-placeholder="' . __( 'Background Size', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[background-size]" class="redux-select-item redux-background-input redux-background-size ' . $this->field['class'] . '">';
189
+ echo '<option></option>';
190
+
191
+ foreach ( $array as $k => $v ) {
192
+ echo '<option value="' . $k . '"' . selected( $this->value['background-size'], $k, false ) . '>' . $v . '</option>';
193
+ }
194
+ echo '</select>';
195
+ }
196
+
197
+ if ( $this->field['background-attachment'] === true ) {
198
+ $array = array(
199
+ 'fixed' => 'Fixed',
200
+ 'scroll' => 'Scroll',
201
+ 'inherit' => 'Inherit',
202
+ );
203
+ echo '<select id="' . $this->field['id'] . '-attachment-select" data-placeholder="' . __( 'Background Attachment', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[background-attachment]" class="redux-select-item redux-background-input redux-background-attachment ' . $this->field['class'] . '">';
204
+ echo '<option></option>';
205
+ foreach ( $array as $k => $v ) {
206
+ echo '<option value="' . $k . '"' . selected( $this->value['background-attachment'], $k, false ) . '>' . $v . '</option>';
207
+ }
208
+ echo '</select>';
209
+ }
210
+
211
+ if ( $this->field['background-position'] === true ) {
212
+ $array = array(
213
+ 'left top' => 'Left Top',
214
+ 'left center' => 'Left center',
215
+ 'left bottom' => 'Left Bottom',
216
+ 'center top' => 'Center Top',
217
+ 'center center' => 'Center Center',
218
+ 'center bottom' => 'Center Bottom',
219
+ 'right top' => 'Right Top',
220
+ 'right center' => 'Right center',
221
+ 'right bottom' => 'Right Bottom',
222
+ );
223
+ echo '<select id="' . $this->field['id'] . '-position-select" data-placeholder="' . __( 'Background Position', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[background-position]" class="redux-select-item redux-background-input redux-background-position ' . $this->field['class'] . '">';
224
+ echo '<option></option>';
225
+
226
+ foreach ( $array as $k => $v ) {
227
+ echo '<option value="' . $k . '"' . selected( $this->value['background-position'], $k, false ) . '>' . $v . '</option>';
228
+ }
229
+ echo '</select>';
230
+ }
231
+
232
+ if ( $this->field['background-image'] === true ) {
233
+ echo '<br />';
234
+
235
+ if ( empty( $this->value ) && ! empty( $this->field['default'] ) ) { // If there are standard values and value is empty
236
+ if ( is_array( $this->field['default'] ) ) {
237
+ if ( ! empty( $this->field['default']['media']['id'] ) ) {
238
+ $this->value['media']['id'] = $this->field['default']['media']['id'];
239
+ } else if ( ! empty( $this->field['default']['id'] ) ) {
240
+ $this->value['media']['id'] = $this->field['default']['id'];
241
+ }
242
+
243
+ if ( ! empty( $this->field['default']['url'] ) ) {
244
+ $this->value['background-image'] = $this->field['default']['url'];
245
+ } else if ( ! empty( $this->field['default']['media']['url'] ) ) {
246
+ $this->value['background-image'] = $this->field['default']['media']['url'];
247
+ } else if ( ! empty( $this->field['default']['background-image'] ) ) {
248
+ $this->value['background-image'] = $this->field['default']['background-image'];
249
+ }
250
+ } else {
251
+ if ( is_numeric( $this->field['default'] ) ) { // Check if it's an attachment ID
252
+ $this->value['media']['id'] = $this->field['default'];
253
+ } else { // Must be a URL
254
+ $this->value['background-image'] = $this->field['default'];
255
+ }
256
+ }
257
+ }
258
+
259
+
260
+ if ( empty( $this->value['background-image'] ) && ! empty( $this->value['media']['id'] ) ) {
261
+ $img = wp_get_attachment_image_src( $this->value['media']['id'], 'full' );
262
+ $this->value['background-image'] = $img[0];
263
+ $this->value['media']['width'] = $img[1];
264
+ $this->value['media']['height'] = $img[2];
265
+ }
266
+
267
+ $hide = 'hide ';
268
+
269
+ if ( ( isset( $this->field['preview_media'] ) && $this->field['preview_media'] === false ) ) {
270
+ $this->field['class'] .= " noPreview";
271
+ }
272
+
273
+ if ( ( ! empty( $this->field['background-image'] ) && $this->field['background-image'] === true ) || isset( $this->field['preview'] ) && $this->field['preview'] === false ) {
274
+ $hide = '';
275
+ }
276
+
277
+ $placeholder = isset( $this->field['placeholder'] ) ? $this->field['placeholder'] : __( 'No media selected', 'redux-framework' );
278
+
279
+ echo '<input placeholder="' . $placeholder . '" type="text" class="redux-background-input ' . $hide . 'upload ' . $this->field['class'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[background-image]" id="' . $this->parent->args['opt_name'] . '[' . $this->field['id'] . '][background-image]" value="' . $this->value['background-image'] . '" />';
280
+ echo '<input type="hidden" class="upload-id ' . $this->field['class'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[media][id]" id="' . $this->parent->args['opt_name'] . '[' . $this->field['id'] . '][media][id]" value="' . $this->value['media']['id'] . '" />';
281
+ echo '<input type="hidden" class="upload-height" name="' . $this->field['name'] . $this->field['name_suffix'] . '[media][height]" id="' . $this->parent->args['opt_name'] . '[' . $this->field['id'] . '][media][height]" value="' . $this->value['media']['height'] . '" />';
282
+ echo '<input type="hidden" class="upload-width" name="' . $this->field['name'] . $this->field['name_suffix'] . '[media][width]" id="' . $this->parent->args['opt_name'] . '[' . $this->field['id'] . '][media][width]" value="' . $this->value['media']['width'] . '" />';
283
+ echo '<input type="hidden" class="upload-thumbnail" name="' . $this->field['name'] . $this->field['name_suffix'] . '[media][thumbnail]" id="' . $this->parent->args['opt_name'] . '[' . $this->field['id'] . '][media][thumbnail]" value="' . $this->value['media']['thumbnail'] . '" />';
284
+
285
+ //Preview
286
+ $hide = '';
287
+
288
+ if ( ( isset( $this->field['preview_media'] ) && $this->field['preview_media'] === false ) || empty( $this->value['background-image'] ) ) {
289
+ $hide = 'hide ';
290
+ }
291
+
292
+ if ( empty( $this->value['media']['thumbnail'] ) && ! empty( $this->value['background-image'] ) ) { // Just in case
293
+ if ( ! empty( $this->value['media']['id'] ) ) {
294
+ $image = wp_get_attachment_image_src( $this->value['media']['id'], array(
295
+ 150,
296
+ 150
297
+ ) );
298
+ $this->value['media']['thumbnail'] = $image[0];
299
+ } else {
300
+ $this->value['media']['thumbnail'] = $this->value['background-image'];
301
+ }
302
+ }
303
+
304
+ echo '<div class="' . $hide . 'screenshot">';
305
+ echo '<a class="of-uploaded-image" href="' . $this->value['background-image'] . '" target="_blank">';
306
+ echo '<img class="redux-option-image" id="image_' . $this->value['media']['id'] . '" src="' . $this->value['media']['thumbnail'] . '" alt="" target="_blank" rel="external" />';
307
+ echo '</a>';
308
+ echo '</div>';
309
+
310
+ //Upload controls DIV
311
+ echo '<div class="upload_button_div">';
312
+
313
+ //If the user has WP3.5+ show upload/remove button
314
+ echo '<span class="button redux-background-upload" id="' . $this->field['id'] . '-media">' . __( 'Upload', 'redux-framework' ) . '</span>';
315
+
316
+ $hide = '';
317
+ if ( empty( $this->value['background-image'] ) || $this->value['background-image'] == '' ) {
318
+ $hide = ' hide';
319
+ }
320
+
321
+ echo '<span class="button removeCSS redux-remove-background' . $hide . '" id="reset_' . $this->field['id'] . '" rel="' . $this->field['id'] . '">' . __( 'Remove', 'redux-framework' ) . '</span>';
322
+
323
+ echo '</div>';
324
+ }
325
+
326
+
327
+ /**
328
+ * Preview
329
+ * */
330
+ if ( ! isset( $this->field['preview'] ) || $this->field['preview'] !== false ):
331
+
332
+ $css = $this->getCSS();
333
+ if ( empty( $css ) ) {
334
+ $css = "display:none;";
335
+ }
336
+ $css .= "height: " . $this->field['preview_height'] . ";";
337
+ echo '<p class="clear ' . $this->field['id'] . '_previewer background-preview" style="' . $css . '">&nbsp;</p>';
338
+
339
+ endif;
340
+ }
341
+
342
+ /**
343
+ * Enqueue Function.
344
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
345
+ *
346
+ * @since 1.0.0
347
+ * @access public
348
+ * @return void
349
+ */
350
+ public function enqueue() {
351
+ if ( function_exists( 'wp_enqueue_media' ) ) {
352
+ wp_enqueue_media();
353
+ } else {
354
+ if (!wp_script_is ( 'media-upload' )) {
355
+ wp_enqueue_script( 'media-upload' );
356
+ }
357
+ }
358
+
359
+ if (!wp_style_is ( 'select2-css' )) {
360
+ wp_enqueue_style( 'select2-css' );
361
+ }
362
+
363
+ if (!wp_style_is ( 'wp-color-picker' )) {
364
+ wp_enqueue_style( 'wp-color-picker' );
365
+ }
366
+
367
+ if (!wp_script_is ( 'redux-field-background-js' )) {
368
+ wp_enqueue_script(
369
+ 'redux-field-background-js',
370
+ ReduxFramework::$_url . 'inc/fields/background/field_background' . Redux_Functions::isMin() . '.js',
371
+ array( 'jquery', 'wp-color-picker', 'select2-js', 'redux-js' ),
372
+ time(),
373
+ true
374
+ );
375
+ }
376
+
377
+ if ($this->parent->args['dev_mode']) {
378
+ if (!wp_style_is ( 'redux-field-background-css' )) {
379
+ wp_enqueue_style(
380
+ 'redux-field-background-css',
381
+ ReduxFramework::$_url . 'inc/fields/background/field_background.css',
382
+ array(),
383
+ time(),
384
+ 'all'
385
+ );
386
+ }
387
+
388
+ if (!wp_style_is ( 'redux-color-picker-css' )) {
389
+ wp_enqueue_style( 'redux-color-picker-css' );
390
+ }
391
+ }
392
+ }
393
+
394
+ public static function getCSS( $value = array() ) {
395
+
396
+ $css = '';
397
+
398
+ if ( ! empty( $value ) && is_array( $value ) ) {
399
+ foreach ( $value as $key => $value ) {
400
+ if ( ! empty( $value ) && $key != "media" ) {
401
+ if ( $key == "background-image" ) {
402
+ $css .= $key . ":url('" . $value . "');";
403
+ } else {
404
+ $css .= $key . ":" . $value . ";";
405
+ }
406
+ }
407
+ }
408
+ }
409
+
410
+ return $css;
411
+ }
412
+
413
+ public function output() {
414
+ $style = $this->getCSS( $this->value );
415
+
416
+ if ( ! empty( $style ) ) {
417
+
418
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
419
+ $keys = implode( ",", $this->field['output'] );
420
+ $this->parent->outputCSS .= $keys . "{" . $style . '}';
421
+ }
422
+
423
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
424
+ $keys = implode( ",", $this->field['compiler'] );
425
+ $this->parent->compilerCSS .= $keys . "{" . $style . '}';
426
+ }
427
+ }
428
+ }
429
+ }
430
+ }
includes/options/redux-core/inc/fields/background/field_background.scss ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-main {
2
+ .redux-container-background {
3
+ .redux-background-position,
4
+ .redux-background-position select,
5
+ .redux-background-attachment,
6
+ .redux-background-attachment select,
7
+ .redux-background-clip,
8
+ .redux-background-clip select,
9
+ .redux-background-origin,
10
+ .redux-background-origin select,
11
+ .redux-background-size,
12
+ .redux-background-size select,
13
+ .redux-background-repeat,
14
+ .redux-background-repeat select {
15
+ width:200px !important;
16
+ margin-right: 10px;
17
+ margin-bottom: 7px;
18
+ }
19
+
20
+ .background-preview {
21
+ display:block;
22
+ width: 100%;
23
+ margin: 5px 0 10px;
24
+ border:1px dotted lightgray;
25
+ }
26
+
27
+ .select2-container {
28
+ margin-right: 10px;
29
+ margin-bottom: 10px;
30
+ }
31
+
32
+ .wp-picker-container {
33
+ margin-bottom: 10px;
34
+ }
35
+
36
+ .upload {
37
+ width: 100%;
38
+ margin-bottom: 8px;
39
+ }
40
+ }
41
+
42
+ .redux-container-select {
43
+ li.ui-state-highlight {
44
+ height: 20px;
45
+ margin-top:2px;
46
+ margin-left: 5px;
47
+ width: 64px;
48
+ margin-bottom: 0;
49
+ }
50
+ }
51
+ }
52
+
53
+ .wp-customizer {
54
+ .redux-container-background {
55
+ .redux-background-position, .redux-background-position select, .redux-background-attachment, .redux-background-attachment select, .redux-background-clip, .redux-background-clip select, .redux-background-origin, .redux-background-origin select, .redux-background-size, .redux-background-size select, .redux-background-repeat, .redux-background-repeat select {
56
+ width: 100% !important;
57
+ }
58
+ }
59
+ }
includes/options/redux-core/inc/fields/border/field_border.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-border .select2-container{float:left;display:block;margin-right:10px}.redux-container-border .select_wrapper{float:left;width:inherit}.redux-container-border .select_wrapper select{width:80px;float:left}.redux-container-border .field-border-input{margin-right:10px;margin-bottom:7px}.redux-container-border .wp-picker-container{margin-top:2px}@media screen and (max-width: 782px){.redux-container-border .field-border-input input{display:inline-block !important;width:100px !important}.redux-container-border .field-border-input .add-on{padding:7px 4px;font-size:16px;line-height:1.5}.redux-container-border .select_wrapper{margin-top:6px}}
includes/options/redux-core/inc/fields/border/field_border.js ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Field Border (border)
3
+ */
4
+
5
+ /*global redux_change, wp, redux*/
6
+
7
+ (function( $ ) {
8
+ "use strict";
9
+
10
+ redux.field_objects = redux.field_objects || {};
11
+ redux.field_objects.border = redux.field_objects.border || {};
12
+
13
+ redux.field_objects.border.init = function( selector ) {
14
+ if ( !selector ) {
15
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-border:visible' );
16
+ }
17
+
18
+ $( selector ).each(
19
+ function() {
20
+ var el = $( this );
21
+ var parent = el;
22
+
23
+ if ( !el.hasClass( 'redux-field-container' ) ) {
24
+ parent = el.parents( '.redux-field-container:first' );
25
+ }
26
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
27
+ return;
28
+ }
29
+ if ( parent.hasClass( 'redux-field-init' ) ) {
30
+ parent.removeClass( 'redux-field-init' );
31
+ } else {
32
+ return;
33
+ }
34
+ el.find( ".redux-border-top, .redux-border-right, .redux-border-bottom, .redux-border-left, .redux-border-all" ).numeric(
35
+ {
36
+ allowMinus: false
37
+ }
38
+ );
39
+
40
+ var default_params = {
41
+ triggerChange: true,
42
+ allowClear: true
43
+ };
44
+
45
+ var select2_handle = el.find( '.redux-container-border' ).find( '.select2_params' );
46
+
47
+ if ( select2_handle.size() > 0 ) {
48
+ var select2_params = select2_handle.val();
49
+
50
+ select2_params = JSON.parse( select2_params );
51
+ default_params = $.extend( {}, default_params, select2_params );
52
+ }
53
+
54
+ el.find( ".redux-border-style" ).select2( default_params );
55
+
56
+ el.find( '.redux-border-input' ).on(
57
+ 'change', function() {
58
+ var units = $( this ).parents( '.redux-field:first' ).find( '.field-units' ).val();
59
+ if ( $( this ).parents( '.redux-field:first' ).find( '.redux-border-units' ).length !== 0 ) {
60
+ units = $( this ).parents( '.redux-field:first' ).find( '.redux-border-units option:selected' ).val();
61
+ }
62
+ var value = $( this ).val();
63
+ if ( typeof units !== 'undefined' && value ) {
64
+ value += units;
65
+ }
66
+ if ( $( this ).hasClass( 'redux-border-all' ) ) {
67
+ $( this ).parents( '.redux-field:first' ).find( '.redux-border-value' ).each(
68
+ function() {
69
+ $( this ).val( value );
70
+ }
71
+ );
72
+ } else {
73
+ $( '#' + $( this ).attr( 'rel' ) ).val( value );
74
+ }
75
+ }
76
+ );
77
+
78
+ el.find( '.redux-border-units' ).on(
79
+ 'change', function() {
80
+ $( this ).parents( '.redux-field:first' ).find( '.redux-border-input' ).change();
81
+ }
82
+ );
83
+
84
+ el.find( '.redux-color-init' ).wpColorPicker(
85
+ {
86
+ change: function( e, ui ) {
87
+ $( this ).val( ui.color.toString() );
88
+ redux_change( $( this ) );
89
+ el.find( '#' + e.target.getAttribute( 'data-id' ) + '-transparency' ).removeAttr( 'checked' );
90
+ },
91
+
92
+ clear: function( e, ui ) {
93
+ $( this ).val( ui.color.toString() );
94
+ redux_change( $( this ).parent().find( '.redux-color-init' ) );
95
+ }
96
+ }
97
+ );
98
+
99
+ el.find( '.redux-color' ).on(
100
+ 'keyup', function() {
101
+ var color = colorValidate( this );
102
+
103
+ if ( color && color !== $( this ).val() ) {
104
+ $( this ).val( color );
105
+ }
106
+ }
107
+ );
108
+
109
+ // Replace and validate field on blur
110
+ el.find( '.redux-color' ).on(
111
+ 'blur', function() {
112
+ var value = $( this ).val();
113
+
114
+ if ( colorValidate( this ) === value ) {
115
+ if ( value.indexOf( "#" ) !== 0 ) {
116
+ $( this ).val( $( this ).data( 'oldcolor' ) );
117
+ }
118
+ }
119
+ }
120
+ );
121
+
122
+ // Store the old valid color on keydown
123
+ el.find( '.redux-color' ).on(
124
+ 'keydown', function() {
125
+ $( this ).data( 'oldkeypress', $( this ).val() );
126
+ }
127
+ );
128
+ }
129
+ );
130
+ };
131
+ })( jQuery );
includes/options/redux-core/inc/fields/border/field_border.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.border=redux.field_objects.border||{},redux.field_objects.border.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-border:visible")),a(b).each(function(){var b=a(this),c=b;if(b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),!c.is(":hidden")&&c.hasClass("redux-field-init")){c.removeClass("redux-field-init"),b.find(".redux-border-top, .redux-border-right, .redux-border-bottom, .redux-border-left, .redux-border-all").numeric({allowMinus:!1});var d={triggerChange:!0,allowClear:!0},e=b.find(".redux-container-border").find(".select2_params");if(e.size()>0){var f=e.val();f=JSON.parse(f),d=a.extend({},d,f)}b.find(".redux-border-style").select2(d),b.find(".redux-border-input").on("change",function(){var b=a(this).parents(".redux-field:first").find(".field-units").val();0!==a(this).parents(".redux-field:first").find(".redux-border-units").length&&(b=a(this).parents(".redux-field:first").find(".redux-border-units option:selected").val());var c=a(this).val();"undefined"!=typeof b&&c&&(c+=b),a(this).hasClass("redux-border-all")?a(this).parents(".redux-field:first").find(".redux-border-value").each(function(){a(this).val(c)}):a("#"+a(this).attr("rel")).val(c)}),b.find(".redux-border-units").on("change",function(){a(this).parents(".redux-field:first").find(".redux-border-input").change()}),b.find(".redux-color-init").wpColorPicker({change:function(c,d){a(this).val(d.color.toString()),redux_change(a(this)),b.find("#"+c.target.getAttribute("data-id")+"-transparency").removeAttr("checked")},clear:function(b,c){a(this).val(c.color.toString()),redux_change(a(this).parent().find(".redux-color-init"))}}),b.find(".redux-color").on("keyup",function(){var b=colorValidate(this);b&&b!==a(this).val()&&a(this).val(b)}),b.find(".redux-color").on("blur",function(){var b=a(this).val();colorValidate(this)===b&&0!==b.indexOf("#")&&a(this).val(a(this).data("oldcolor"))}),b.find(".redux-color").on("keydown",function(){a(this).data("oldkeypress",a(this).val())})}})}}(jQuery);
includes/options/redux-core/inc/fields/border/field_border.php ADDED
@@ -0,0 +1,323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package Redux_Field
16
+ * @subpackage Border
17
+ * @version 3.0.0
18
+ */
19
+
20
+ // Exit if accessed directly
21
+ if ( ! defined( 'ABSPATH' ) ) {
22
+ exit;
23
+ }
24
+
25
+ // Don't duplicate me!
26
+ if ( ! class_exists( 'ReduxFramework_border' ) ) {
27
+
28
+ class ReduxFramework_border {
29
+
30
+ /**
31
+ * Field Constructor.
32
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
33
+ *
34
+ * @since ReduxFramework 1.0.0
35
+ */
36
+ function __construct( $field = array(), $value = '', $parent ) {
37
+
38
+ $this->parent = $parent;
39
+ $this->field = $field;
40
+ $this->value = $value;
41
+ } //function
42
+
43
+ private function stripAlphas($s) {
44
+
45
+ // Regex is our friend. THERE ARE FOUR LIGHTS!!
46
+ return preg_replace('/[^\d.-]/', '', $s);
47
+ }
48
+
49
+ /**
50
+ * Field Render Function.
51
+ * Takes the vars and outputs the HTML for the field in the settings
52
+ *
53
+ * @since ReduxFramework 1.0.0
54
+ */
55
+ function render() {
56
+
57
+ // No errors please
58
+ $defaults = array(
59
+ 'top' => true,
60
+ 'bottom' => true,
61
+ 'all' => true,
62
+ 'style' => true,
63
+ 'color' => true,
64
+ 'left' => true,
65
+ 'right' => true,
66
+ );
67
+
68
+ $this->field = wp_parse_args( $this->field, $defaults );
69
+
70
+ $defaults = array(
71
+ 'top' => '',
72
+ 'right' => '',
73
+ 'bottom' => '',
74
+ 'left' => '',
75
+ 'color' => '',
76
+ 'style' => '',
77
+ );
78
+
79
+ $this->value = wp_parse_args( $this->value, $defaults );
80
+
81
+ $value = array(
82
+ 'top' => isset( $this->value['border-top'] ) ? filter_var( $this->value['border-top'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : filter_var( $this->value['top'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ),
83
+ 'right' => isset( $this->value['border-right'] ) ? filter_var( $this->value['border-right'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : filter_var( $this->value['right'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ),
84
+ 'bottom' => isset( $this->value['border-bottom'] ) ? filter_var( $this->value['border-bottom'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : filter_var( $this->value['bottom'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ),
85
+ 'left' => isset( $this->value['border-left'] ) ? filter_var( $this->value['border-left'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : filter_var( $this->value['left'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ),
86
+ 'color' => isset( $this->value['border-color'] ) ? $this->value['border-color'] : $this->value['color'],
87
+ 'style' => isset( $this->value['border-style'] ) ? $this->value['border-style'] : $this->value['style']
88
+ );
89
+
90
+ if ( ( isset( $this->value['width'] ) || isset( $this->value['border-width'] ) ) ) {
91
+ if ( isset( $this->value['border-width'] ) && ! empty( $this->value['border-width'] ) ) {
92
+ $this->value['width'] = $this->value['border-width'];
93
+ }
94
+
95
+ $this->value['width'] = $this->stripAlphas($this->value['width']);
96
+
97
+ $value['top'] = $this->value['width'];
98
+ $value['right'] = $this->value['width'];
99
+ $value['bottom'] = $this->value['width'];
100
+ $value['left'] = $this->value['width'];
101
+ }
102
+
103
+ $this->value = $value;
104
+
105
+ $defaults = array(
106
+ 'top' => '',
107
+ 'right' => '',
108
+ 'bottom' => '',
109
+ 'left' => '',
110
+ );
111
+
112
+ $this->value = wp_parse_args( $this->value, $defaults );
113
+
114
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
115
+ $select2_params = json_encode( $this->field['select2'] );
116
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
117
+
118
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
119
+ }
120
+
121
+
122
+ echo '<input type="hidden" class="field-units" value="px">';
123
+
124
+ if ( isset( $this->field['all'] ) && $this->field['all'] == true ) {
125
+ echo '<div class="field-border-input input-prepend"><span class="add-on"><i class="el el-fullscreen icon-large"></i></span><input type="text" class="redux-border-all redux-border-input mini ' . $this->field['class'] . '" placeholder="' . __( 'All', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-all" value="' . $this->value['top'] . '"></div>';
126
+ }
127
+
128
+ echo '<input type="hidden" class="redux-border-value" id="' . $this->field['id'] . '-top" name="' . $this->field['name'] . $this->field['name_suffix'] . '[border-top]" value="' . ( isset($this->value['top']) && $this->value['top'] != '' ? $this->value['top'] . 'px' : '' ) . '">';
129
+ echo '<input type="hidden" class="redux-border-value" id="' . $this->field['id'] . '-right" name="' . $this->field['name'] . $this->field['name_suffix'] . '[border-right]" value="' . ( isset($this->value['right']) && $this->value['right'] != '' ? $this->value['right'] . 'px' : '' ) . '">';
130
+ echo '<input type="hidden" class="redux-border-value" id="' . $this->field['id'] . '-bottom" name="' . $this->field['name'] . $this->field['name_suffix'] . '[border-bottom]" value="' . ( isset($this->value['bottom']) && $this->value['bottom'] != '' ? $this->value['bottom'] . 'px' : '' ) . '">';
131
+ echo '<input type="hidden" class="redux-border-value" id="' . $this->field['id'] . '-left" name="' . $this->field['name'] . $this->field['name_suffix'] . '[border-left]" value="' . ( isset($this->value['left']) && $this->value['left'] != '' ? $this->value['left'] . 'px' : '' ) . '">';
132
+
133
+ if ( ! isset( $this->field['all'] ) || $this->field['all'] !== true ) {
134
+ /**
135
+ * Top
136
+ * */
137
+ if ( $this->field['top'] === true ) {
138
+ echo '<div class="field-border-input input-prepend"><span class="add-on"><i class="el el-arrow-up icon-large"></i></span><input type="text" class="redux-border-top redux-border-input mini ' . $this->field['class'] . '" placeholder="' . __( 'Top', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-top" value="' . $this->value['top'] . '"></div>';
139
+ }
140
+
141
+ /**
142
+ * Right
143
+ * */
144
+ if ( $this->field['right'] === true ) {
145
+ echo '<div class="field-border-input input-prepend"><span class="add-on"><i class="el el-arrow-right icon-large"></i></span><input type="text" class="redux-border-right redux-border-input mini ' . $this->field['class'] . '" placeholder="' . __( 'Right', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-right" value="' . $this->value['right'] . '"></div>';
146
+ }
147
+
148
+ /**
149
+ * Bottom
150
+ * */
151
+ if ( $this->field['bottom'] === true ) {
152
+ echo '<div class="field-border-input input-prepend"><span class="add-on"><i class="el el-arrow-down icon-large"></i></span><input type="text" class="redux-border-bottom redux-border-input mini ' . $this->field['class'] . '" placeholder="' . __( 'Bottom', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-bottom" value="' . $this->value['bottom'] . '"></div>';
153
+ }
154
+
155
+ /**
156
+ * Left
157
+ * */
158
+ if ( $this->field['left'] === true ) {
159
+ echo '<div class="field-border-input input-prepend"><span class="add-on"><i class="el el-arrow-left icon-large"></i></span><input type="text" class="redux-border-left redux-border-input mini ' . $this->field['class'] . '" placeholder="' . __( 'Left', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-left" value="' . $this->value['left'] . '"></div>';
160
+ }
161
+ }
162
+
163
+ /**
164
+ * Border-style
165
+ * */
166
+ if ( $this->field['style'] != false ) {
167
+ $options = array(
168
+ 'solid' => 'Solid',
169
+ 'dashed' => 'Dashed',
170
+ 'dotted' => 'Dotted',
171
+ 'double' => "Double",
172
+ 'none' => 'None'
173
+ );
174
+ echo '<select original-title="' . __( 'Border style', 'redux-framework' ) . '" id="' . $this->field['id'] . '[border-style]" name="' . $this->field['name'] . $this->field['name_suffix'] . '[border-style]" class="tips redux-border-style ' . $this->field['class'] . '" rows="6" data-id="' . $this->field['id'] . '">';
175
+ foreach ( $options as $k => $v ) {
176
+ echo '<option value="' . $k . '"' . selected( $value['style'], $k, false ) . '>' . $v . '</option>';
177
+ }
178
+ echo '</select>';
179
+ } else {
180
+ echo '<input type="hidden" id="' . $this->field['id'] . '[border-style]" name="' . $this->field['name'] . $this->field['name_suffix'] . '[border-style]" value="' . $this->value['style'] . '" data-id="' . $this->field['id'] . '">';
181
+ }
182
+
183
+ /**
184
+ * Color
185
+ * */
186
+ if ( $this->field['color'] != false ) {
187
+ $default = isset( $this->field['default']['border-color'] ) ? $this->field['default']['border-color'] : '';
188
+
189
+
190
+ if ( empty( $default ) ) {
191
+ $default = ( isset( $this->field['default']['color'] ) ) ? $this->field['default']['color'] : '#ffffff';
192
+ }
193
+
194
+ echo '<input name="' . $this->field['name'] . $this->field['name_suffix'] . '[border-color]" id="' . $this->field['id'] . '-border" class="redux-border-color redux-color redux-color-init ' . $this->field['class'] . '" type="text" value="' . $this->value['color'] . '" data-default-color="' . $default . '" data-id="' . $this->field['id'] . '" />';
195
+ } else {
196
+ echo '<input type="hidden" id="' . $this->field['id'] . '[border-color]" name="' . $this->field['name'] . $this->field['name_suffix'] . '[border-color]" value="' . $this->value['color'] . '" data-id="' . $this->field['id'] . '">';
197
+ }
198
+ }
199
+
200
+ //function
201
+
202
+ /**
203
+ * Enqueue Function.
204
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
205
+ *
206
+ * @since ReduxFramework 1.0.0
207
+ */
208
+ function enqueue() {
209
+ $min = Redux_Functions::isMin();
210
+
211
+ if (!wp_style_is ( 'select2-css' )) {
212
+ wp_enqueue_style( 'select2-css' );
213
+ }
214
+
215
+ if (!wp_style_is ( 'wp-color-picker' )) {
216
+ wp_enqueue_style( 'wp-color-picker' );
217
+ }
218
+
219
+ if (!wp_script_is ( 'redux-field-border-js' )) {
220
+ wp_enqueue_script(
221
+ 'redux-field-border-js',
222
+ ReduxFramework::$_url . 'inc/fields/border/field_border' . $min . '.js',
223
+ array( 'jquery', 'select2-js', 'wp-color-picker', 'redux-js' ),
224
+ time(),
225
+ true
226
+ );
227
+ }
228
+
229
+ if ($this->parent->args['dev_mode']) {
230
+ if (!wp_style_is ( 'redux-color-picker-css' )) {
231
+ wp_enqueue_style( 'redux-color-picker-css' );
232
+ }
233
+
234
+ if (!wp_style_is ( 'redux-field-border-css' )) {
235
+ wp_enqueue_style(
236
+ 'redux-field-border-css',
237
+ ReduxFramework::$_url . 'inc/fields/border/field_border.css',
238
+ array(),
239
+ time(),
240
+ 'all'
241
+ );
242
+ }
243
+ }
244
+ } //function
245
+
246
+ public function output() {
247
+ if ( isset( $this->field['all'] ) && true == $this->field['all'] ) {
248
+ $borderWidth = isset( $this->value['border-width'] ) ? $this->value['border-width'] : '0px';
249
+ $val = isset( $this->value['border-top'] ) ? $this->value['border-top'] : $borderWidth;
250
+
251
+ $this->value['border-top'] = $val;
252
+ $this->value['border-bottom'] = $val;
253
+ $this->value['border-left'] = $val;
254
+ $this->value['border-right'] = $val;
255
+ }
256
+
257
+ $cleanValue = array(
258
+ 'color' => ! empty( $this->value['border-color'] ) ? $this->value['border-color'] : '',
259
+ 'style' => ! empty( $this->value['border-style'] ) ? $this->value['border-style'] : ''
260
+ );
261
+
262
+ $borderWidth = '';
263
+ if ( isset( $this->value['border-width'] ) ) {
264
+ $borderWidth = $this->value['border-width'];
265
+ }
266
+
267
+ $this->field['top'] = isset( $this->field['top'] ) ? $this->field['top'] : true;
268
+ $this->field['bottom'] = isset( $this->field['bottom'] ) ? $this->field['bottom'] : true;
269
+ $this->field['left'] = isset( $this->field['left'] ) ? $this->field['left'] : true;
270
+ $this->field['right'] = isset( $this->field['right'] ) ? $this->field['right'] : true;
271
+
272
+ if ( $this->field['top'] === true ) {
273
+ $cleanValue['top'] = ! empty( $this->value['border-top'] ) ? $this->value['border-top'] : $borderWidth;
274
+ }
275
+
276
+ if ( $this->field['bottom'] == true ) {
277
+ $cleanValue['bottom'] = ! empty( $this->value['border-bottom'] ) ? $this->value['border-bottom'] : $borderWidth;
278
+ }
279
+
280
+ if ( $this->field['left'] === true ) {
281
+ $cleanValue['left'] = ! empty( $this->value['border-left'] ) ? $this->value['border-left'] : $borderWidth;
282
+ }
283
+
284
+ if ( $this->field['right'] === true ) {
285
+ $cleanValue['right'] = ! empty( $this->value['border-right'] ) ? $this->value['border-right'] : $borderWidth;
286
+ }
287
+
288
+ $style = "";
289
+
290
+ //absolute, padding, margin
291
+ if ( ! isset( $this->field['all'] ) || $this->field['all'] != true ) {
292
+ foreach ( $cleanValue as $key => $value ) {
293
+ if ( $key == "color" || $key == "style" ) {
294
+ continue;
295
+ }
296
+ if (!empty($value)) {
297
+ $style .= 'border-' . $key . ':' . $value . ' ' . $cleanValue['style'] . ' ' . $cleanValue['color'] . ';';
298
+ }
299
+ }
300
+ } else {
301
+ if (!empty($cleanValue['top'])) {
302
+ $style .= 'border:' . $cleanValue['top'] . ' ' . $cleanValue['style'] . ' ' . $cleanValue['color'] . ';';
303
+ }
304
+ }
305
+
306
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
307
+ $keys = implode( ",", $this->field['output'] );
308
+
309
+ if (!empty($style)) {
310
+ $this->parent->outputCSS .= $keys . "{" . $style . '}';
311
+ }
312
+ }
313
+
314
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
315
+ $keys = implode( ",", $this->field['compiler'] );
316
+
317
+ if (!empty($style)) {
318
+ $this->parent->compilerCSS .= $keys . "{" . $style . '}';
319
+ }
320
+ }
321
+ }
322
+ } //class
323
+ }
includes/options/redux-core/inc/fields/border/field_border.scss ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-border {
2
+ .select2-container {
3
+ float: left;
4
+ display: block;
5
+ margin-right: 10px;
6
+ }
7
+
8
+ .select_wrapper {
9
+ float: left;
10
+ select {
11
+ width: 80px;
12
+ float: left;
13
+
14
+ }
15
+ width: inherit;
16
+ }
17
+
18
+ .field-border-input {
19
+ margin-right: 10px;
20
+ margin-bottom: 7px;
21
+ }
22
+
23
+ .wp-picker-container {
24
+ margin-top: 2px;
25
+ }
26
+ }
27
+
28
+ @media screen and (max-width: 782px) {
29
+ .redux-container-border {
30
+ .field-border-input {
31
+ input {
32
+ display: inline-block !important;
33
+ width: 100px !important;
34
+ }
35
+
36
+ .add-on {
37
+ padding: 7px 4px;
38
+ font-size: 16px;
39
+ line-height: 1.5;
40
+ }
41
+ }
42
+
43
+ .select_wrapper {
44
+ margin-top: 6px;
45
+ }
46
+ }
47
+ }
includes/options/redux-core/inc/fields/button_set/field_button_set.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Field Button Set (button_set)
3
+ */
4
+
5
+ /*global jQuery, document, redux*/
6
+
7
+ (function( $ ) {
8
+ "use strict";
9
+
10
+ redux.field_objects = redux.field_objects || {};
11
+ redux.field_objects.button_set = redux.field_objects.button_set || {};
12
+
13
+ $( document ).ready(
14
+ function() {
15
+ //redux.field_objects.button_set.init();
16
+ if ( $.fn.button.noConflict !== undefined ) {
17
+ var btn = $.fn.button.noConflict();
18
+ $.fn.btn = btn;
19
+ }
20
+ }
21
+ );
22
+
23
+ redux.field_objects.button_set.init = function( selector ) {
24
+ if ( !selector ) {
25
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-button_set:visible' );
26
+ }
27
+
28
+ $( selector ).each(
29
+ function() {
30
+ var el = $( this );
31
+ var parent = el;
32
+ if ( !el.hasClass( 'redux-field-container' ) ) {
33
+ parent = el.parents( '.redux-field-container:first' );
34
+ }
35
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
36
+ return;
37
+ }
38
+ if ( parent.hasClass( 'redux-field-init' ) ) {
39
+ parent.removeClass( 'redux-field-init' );
40
+ } else {
41
+ return;
42
+ }
43
+ el.find( '.buttonset' ).each(
44
+ function() {
45
+ if ( $( this ).is( ':checkbox' ) ) {
46
+ $( this ).find( '.buttonset-item' ).button();
47
+ }
48
+
49
+ $( this ).buttonset();
50
+ }
51
+ );
52
+ }
53
+ );
54
+
55
+ };
56
+ })( jQuery );
includes/options/redux-core/inc/fields/button_set/field_button_set.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.button_set=redux.field_objects.button_set||{},a(document).ready(function(){if(void 0!==a.fn.button.noConflict){var b=a.fn.button.noConflict();a.fn.btn=b}}),redux.field_objects.button_set.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-button_set:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".buttonset").each(function(){a(this).is(":checkbox")&&a(this).find(".buttonset-item").button(),a(this).buttonset()}))})}}(jQuery);
includes/options/redux-core/inc/fields/button_set/field_button_set.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package Redux_Field
16
+ * @subpackage Button_Set
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @version 3.0.0
20
+ */
21
+
22
+ // Exit if accessed directly
23
+ if ( ! defined( 'ABSPATH' ) ) {
24
+ exit;
25
+ }
26
+
27
+ // Don't duplicate me!
28
+ if ( ! class_exists( 'ReduxFramework_button_set' ) ) {
29
+
30
+ /**
31
+ * Main ReduxFramework_button_set class
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ class ReduxFramework_button_set {
36
+
37
+ /**
38
+ * Holds configuration settings for each field in a model.
39
+ * Defining the field options
40
+ * array['fields'] array Defines the fields to be shown by scaffolding.
41
+ * [fieldName] array Defines the options for a field, or just enables the field if array is not applied.
42
+ * ['name'] string Overrides the field name (default is the array key)
43
+ * ['model'] string (optional) Overrides the model if the field is a belongsTo associated value.
44
+ * ['width'] string Defines the width of the field for paginate views. Examples are "100px" or "auto"
45
+ * ['align'] string Alignment types for paginate views (left, right, center)
46
+ * ['format'] string Formatting options for paginate fields. Options include ('currency','nice','niceShort','timeAgoInWords' or a valid Date() format)
47
+ * ['title'] string Changes the field name shown in views.
48
+ * ['desc'] string The description shown in edit/create views.
49
+ * ['readonly'] boolean True prevents users from changing the value in edit/create forms.
50
+ * ['type'] string Defines the input type used by the Form helper (example 'password')
51
+ * ['options'] array Defines a list of string options for drop down lists.
52
+ * ['editor'] boolean If set to True will show a WYSIWYG editor for this field.
53
+ * ['default'] string The default value for create forms.
54
+ *
55
+ * @param array $arr (See above)
56
+ *
57
+ * @return Object A new editor object.
58
+ * */
59
+ static $_properties = array(
60
+ 'id' => 'Identifier',
61
+ );
62
+
63
+ /**
64
+ * Field Constructor.
65
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
66
+ *
67
+ * @since 1.0.0
68
+ * @access public
69
+ * @return void
70
+ */
71
+ function __construct( $field = array(), $value = '', $parent ) {
72
+
73
+ $this->parent = $parent;
74
+ $this->field = $field;
75
+ $this->value = $value;
76
+ }
77
+
78
+ /**
79
+ * Field Render Function.
80
+ * Takes the vars and outputs the HTML for the field in the settings
81
+ *
82
+ * @since 1.0.0
83
+ * @access public
84
+ * @return void
85
+ */
86
+ public function render() {
87
+ if ( !empty( $this->field['data'] ) && empty( $this->field['options'] ) ) {
88
+ if ( empty( $this->field['args'] ) ) {
89
+ $this->field['args'] = array();
90
+ }
91
+
92
+ $this->field['options'] = $this->parent->get_wordpress_data( $this->field['data'], $this->field['args'] );
93
+
94
+ if ( empty( $this->field['options'] ) ) {
95
+ return;
96
+ }
97
+ }
98
+
99
+ // multi => true renders the field multi-selectable (checkbox vs radio)
100
+ echo '<div class="buttonset ui-buttonset">';
101
+ $i = 0;
102
+ foreach ( $this->field['options'] as $k => $v ) {
103
+
104
+ $selected = '';
105
+ if ( isset( $this->field['multi'] ) && $this->field['multi'] == true ) {
106
+ $type = "checkbox";
107
+ $multi_suffix = '[]';
108
+
109
+ if ( ! empty( $this->value ) && ! is_array( $this->value ) ) {
110
+ $this->value = array( $this->value );
111
+ }
112
+
113
+ if ( is_array( $this->value ) && in_array( $k, $this->value ) ) {
114
+ $selected = 'checked="checked"';
115
+ }
116
+
117
+ } else {
118
+ $multi_suffix = "";
119
+ $type = "radio";
120
+
121
+ if ( is_scalar( $this->value ) ) {
122
+ $selected = checked( $this->value, $k, false );
123
+ }
124
+ }
125
+
126
+ echo '<input data-id="' . $this->field['id'] . '" type="' . $type . '" id="' . $this->field['id'] . '-buttonset' . $k . '" name="' . $this->field['name'] . $this->field['name_suffix'] . $multi_suffix . '" class="buttonset-item ' . $this->field['class'] . '" value="' . $k . '" ' . $selected . '/>';
127
+ echo '<label for="' . $this->field['id'] . '-buttonset' . $k . '">' . $v . '</label>';
128
+ }
129
+
130
+ echo '</div>';
131
+ }
132
+
133
+ /**
134
+ * Enqueue Function.
135
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
136
+ *
137
+ * @since 1.0.0
138
+ * @access public
139
+ * @return void
140
+ */
141
+ public function enqueue() {
142
+
143
+ if (!wp_script_is ( 'redux-field-button-set-js' )) {
144
+ wp_enqueue_script(
145
+ 'redux-field-button-set-js',
146
+ ReduxFramework::$_url . 'inc/fields/button_set/field_button_set' . Redux_Functions::isMin() . '.js',
147
+ array( 'jquery', 'jquery-ui-core', 'redux-js' ),
148
+ time(),
149
+ true
150
+ );
151
+ }
152
+ }
153
+ }
154
+ }
includes/options/redux-core/inc/fields/checkbox/field_checkbox.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-checkbox label{vertical-align:top;width:100%}.redux-container-checkbox label .field-desc{margin-top:0;float:left;width:93%;clear:none}
includes/options/redux-core/inc/fields/checkbox/field_checkbox.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Redux Checkbox
3
+ * Dependencies : jquery
4
+ * Feature added by : Dovy Paukstys
5
+ * Date : 17 June 2014
6
+ */
7
+
8
+ /*global redux_change, wp, redux*/
9
+
10
+ (function( $ ) {
11
+ "use strict";
12
+
13
+ redux.field_objects = redux.field_objects || {};
14
+ redux.field_objects.checkbox = redux.field_objects.checkbox || {};
15
+
16
+ $( document ).ready(
17
+ function() {
18
+ //redux.field_objects.checkbox.init();
19
+ }
20
+ );
21
+
22
+ redux.field_objects.checkbox.init = function( selector ) {
23
+ if ( !selector ) {
24
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-checkbox:visible' );
25
+ }
26
+
27
+ $( selector ).each(
28
+ function() {
29
+ var el = $( this );
30
+ var parent = el;
31
+ if ( !el.hasClass( 'redux-field-container' ) ) {
32
+ parent = el.parents( '.redux-field-container:first' );
33
+ }
34
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
35
+ return;
36
+ }
37
+ if ( parent.hasClass( 'redux-field-init' ) ) {
38
+ parent.removeClass( 'redux-field-init' );
39
+ } else {
40
+ return;
41
+ }
42
+ el.find( '.checkbox' ).on(
43
+ 'click', function( e ) {
44
+ var val = 0;
45
+ if ( $( this ).is( ':checked' ) ) {
46
+ val = $( this ).parent().find( '.checkbox-check' ).attr( 'data-val' );
47
+ }
48
+ $( this ).parent().find( '.checkbox-check' ).val( val );
49
+ redux_change( $( this ) );
50
+ }
51
+ );
52
+ }
53
+ );
54
+ };
55
+ })( jQuery );
includes/options/redux-core/inc/fields/checkbox/field_checkbox.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.checkbox=redux.field_objects.checkbox||{},a(document).ready(function(){}),redux.field_objects.checkbox.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-checkbox:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".checkbox").on("click",function(b){var c=0;a(this).is(":checked")&&(c=a(this).parent().find(".checkbox-check").attr("data-val")),a(this).parent().find(".checkbox-check").val(c),redux_change(a(this))}))})}}(jQuery);
includes/options/redux-core/inc/fields/checkbox/field_checkbox.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Checkbox
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @version 3.0.0
20
+ */
21
+ // Exit if accessed directly
22
+ if ( !defined ( 'ABSPATH' ) ) {
23
+ exit;
24
+ }
25
+
26
+ // Don't duplicate me!
27
+ if ( !class_exists ( 'ReduxFramework_checkbox' ) ) {
28
+
29
+ /**
30
+ * Main ReduxFramework_checkbox class
31
+ *
32
+ * @since 1.0.0
33
+ */
34
+ class ReduxFramework_checkbox {
35
+
36
+ /**
37
+ * Field Constructor.
38
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
39
+ *
40
+ * @since 1.0.0
41
+ * @access public
42
+ * @return void
43
+ */
44
+ function __construct ( $field = array(), $value = '', $parent ) {
45
+
46
+ $this->parent = $parent;
47
+ $this->field = $field;
48
+ $this->value = $value;
49
+ }
50
+
51
+ /**
52
+ * Field Render Function.
53
+ * Takes the vars and outputs the HTML for the field in the settings
54
+ *
55
+ * @since 1.0.0
56
+ * @access public
57
+ * @return void
58
+ */
59
+ public function render () {
60
+ if( !empty( $this->field['data'] ) && empty( $this->field['options'] ) ) {
61
+ if (empty($this->field['args'])) {
62
+ $this->field['args'] = array();
63
+ }
64
+
65
+ $this->field['options'] = $this->parent->get_wordpress_data($this->field['data'], $this->field['args']);
66
+ if (empty($this->field['options'])) {
67
+ return;
68
+ }
69
+ }
70
+
71
+ $this->field[ 'data_class' ] = ( isset ( $this->field[ 'multi_layout' ] ) ) ? 'data-' . $this->field[ 'multi_layout' ] : 'data-full';
72
+
73
+ if ( !empty ( $this->field[ 'options' ] ) && ( is_array ( $this->field[ 'options' ] ) || is_array ( $this->field[ 'default' ] ) ) ) {
74
+
75
+ echo '<ul class="' . $this->field[ 'data_class' ] . '">';
76
+
77
+ if ( !isset ( $this->value ) ) {
78
+ $this->value = array();
79
+ }
80
+
81
+ if ( !is_array ( $this->value ) ) {
82
+ $this->value = array();
83
+ }
84
+
85
+ if ( empty ( $this->field[ 'options' ] ) && isset ( $this->field[ 'default' ] ) && is_array ( $this->field[ 'default' ] ) ) {
86
+ $this->field[ 'options' ] = $this->field[ 'default' ];
87
+ }
88
+
89
+ foreach ( $this->field[ 'options' ] as $k => $v ) {
90
+
91
+ if ( empty ( $this->value[ $k ] ) ) {
92
+ $this->value[ $k ] = "";
93
+ }
94
+
95
+ echo '<li>';
96
+ echo '<label for="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $k . ']', array(
97
+ '[' => '_',
98
+ ']' => ''
99
+ ) ) . '_' . array_search ( $k, array_keys ( $this->field[ 'options' ] ) ) . '">';
100
+ echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . $this->field[ 'name' ] . '[' . $k . ']' . $this->field[ 'name_suffix' ] . '" value="' . $this->value[ $k ] . '" ' . '/>';
101
+ echo '<input type="checkbox" class="checkbox ' . $this->field[ 'class' ] . '" id="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $k . ']', array(
102
+ '[' => '_',
103
+ ']' => ''
104
+ ) ) . '_' . array_search ( $k, array_keys ( $this->field[ 'options' ] ) ) . '" value="1" ' . checked ( $this->value[ $k ], '1', false ) . '/>';
105
+ echo ' ' . $v . '</label>';
106
+ echo '</li>';
107
+ }
108
+
109
+ echo '</ul>';
110
+ } else if ( empty ( $this->field[ 'data' ] ) ) {
111
+
112
+ echo (!empty ( $this->field[ 'desc' ] ) ) ? ' <ul class="data-full"><li><label for="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . ']', array(
113
+ '[' => '_',
114
+ ']' => ''
115
+ ) ) . '">' : '';
116
+
117
+ // Got the "Checked" status as "0" or "1" then insert it as the "value" option
118
+ //$ch_value = 1; // checked($this->value, '1', false) == "" ? "0" : "1";
119
+ echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . $this->field[ 'name' ] . $this->field[ 'name_suffix' ] . '" value="' . $this->value . '" ' . '/>';
120
+ echo '<input type="checkbox" id="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . ']', array(
121
+ '[' => '_',
122
+ ']' => ''
123
+ ) ) . '" value="1" class="checkbox ' . $this->field[ 'class' ] . '" ' . checked ( $this->value, '1', false ) . '/>';
124
+ echo isset( $this->field[ 'label' ] ) ? ' ' . $this->field[ 'label' ] : '';
125
+ echo '</label></li></ul>';
126
+ }
127
+ }
128
+
129
+ /**
130
+ * Enqueue Function.
131
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
132
+ *
133
+ * @since 1.0.0
134
+ * @access public
135
+ * @return void
136
+ */
137
+ public function enqueue () {
138
+
139
+ if ($this->parent->args['dev_mode']) {
140
+ wp_enqueue_style (
141
+ 'redux-field-checkbox-css',
142
+ ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox.css',
143
+ array(),
144
+ time (),
145
+ 'all'
146
+ );
147
+ }
148
+
149
+ wp_enqueue_script (
150
+ 'redux-field-checkbox-js',
151
+ ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox' . Redux_Functions::isMin () . '.js',
152
+ array( 'jquery', 'redux-js' ),
153
+ time (),
154
+ true
155
+ );
156
+ }
157
+ }
158
+
159
+ }
includes/options/redux-core/inc/fields/checkbox/field_checkbox.scss ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-checkbox {
2
+ label {
3
+ vertical-align: top;
4
+ width: 100%;
5
+
6
+ .field-desc {
7
+ margin-top: 0;
8
+ float: left;
9
+ width: 93%;
10
+ clear: none;
11
+ }
12
+ }
13
+ }
includes/options/redux-core/inc/fields/color/field_color.js ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Field Color (color)
3
+ */
4
+
5
+ /*global jQuery, document, redux_change, redux*/
6
+
7
+ (function( $ ) {
8
+ 'use strict';
9
+
10
+ redux.field_objects = redux.field_objects || {};
11
+ redux.field_objects.color = redux.field_objects.color || {};
12
+
13
+ $( document ).ready(
14
+ function() {
15
+
16
+ }
17
+ );
18
+
19
+ redux.field_objects.color.init = function( selector ) {
20
+
21
+ if ( !selector ) {
22
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-color:visible' );
23
+ }
24
+
25
+ $( selector ).each(
26
+ function() {
27
+
28
+ var el = $( this );
29
+ var parent = el;
30
+
31
+ if ( !el.hasClass( 'redux-field-container' ) ) {
32
+ parent = el.parents( '.redux-field-container:first' );
33
+ }
34
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
35
+ return;
36
+ }
37
+ if ( parent.hasClass( 'redux-field-init' ) ) {
38
+ parent.removeClass( 'redux-field-init' );
39
+ } else {
40
+ return;
41
+ }
42
+ // var $control = el.find( '.redux-color-init' ),
43
+ //
44
+ // value = $control.val().replace( /\s+/g, '' ),
45
+ // alpha_val = 100,
46
+ // $alpha, $alpha_output;
47
+ // //console.log($control);
48
+ // if ( value.match( /rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/ ) ) {
49
+ // alpha_val = parseFloat( value.match( /rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/ )[ 1 ] ) * 100;
50
+ // }
51
+ el.find( '.redux-color-init' ).wpColorPicker(
52
+ {
53
+ change: function( e, ui ) {
54
+ $( this ).val( ui.color.toString() );
55
+ redux_change( $( this ) );
56
+ el.find( '#' + e.target.getAttribute( 'data-id' ) + '-transparency' ).removeAttr( 'checked' );
57
+ },
58
+ clear: function( e, ui ) {
59
+ $( this ).val( '' );
60
+ redux_change( $( this ).parent().find( '.redux-color-init' ) );
61
+ }
62
+ }
63
+ );
64
+ // $( '<div class="redux-alpha-container">'
65
+ // + '<label>Alpha: <output class="rangevalue">' + alpha_val + '%</output></label>'
66
+ // + '<input type="range" min="1" max="100" value="' + alpha_val + '" name="alpha" class="vc_alpha-field">'
67
+ // + '</div>' ).appendTo( $control.parents( '.wp-picker-container:first' ).addClass( 'vc_color-picker' ).find( '.iris-picker' ) );
68
+ // $alpha = $control.parents( '.wp-picker-container:first' ).find( '.vc_alpha-field' );
69
+ // //console.log($alpha);
70
+ // $alpha_output = $control.parents( '.wp-picker-container:first' ).find( '.redux-alpha-container output' );
71
+ // $alpha.bind( 'change keyup', function () {
72
+ // var alpha_val = parseFloat( $alpha.val() ),
73
+ // iris = $control.data( 'a8cIris' ),
74
+ // color_picker = $control.data( 'wp-wpColorPicker' );
75
+ // //console.log(alpha_val);
76
+ // $alpha_output.val( $alpha.val() + '%' );
77
+ // console.log(alpha_val / 100.0);
78
+ // iris._color._alpha = parseFloat(alpha_val / 100.0);
79
+ // console.log(iris._color);
80
+ // //$control.val( iris._color.toString() );
81
+ // el.find( '.redux-color-init' ).wpColorPicker( 'color', iris._color.toString() );
82
+ // //console.log($control.val());
83
+ // //color_picker.toggler.css( { backgroundColor: $control.val() } );
84
+ // } ).val( alpha_val ).trigger( 'change' );
85
+
86
+ el.find( '.redux-color' ).on(
87
+ 'focus', function() {
88
+ $( this ).data( 'oldcolor', $( this ).val() );
89
+ }
90
+ );
91
+
92
+ el.find( '.redux-color' ).on(
93
+ 'keyup', function() {
94
+ var value = $( this ).val();
95
+ var color = colorValidate( this );
96
+ var id = '#' + $( this ).attr( 'id' );
97
+
98
+ if ( value === "transparent" ) {
99
+ $( this ).parent().parent().find( '.wp-color-result' ).css(
100
+ 'background-color', 'transparent'
101
+ );
102
+
103
+ el.find( id + '-transparency' ).attr( 'checked', 'checked' );
104
+ } else {
105
+ el.find( id + '-transparency' ).removeAttr( 'checked' );
106
+
107
+ if ( color && color !== $( this ).val() ) {
108
+ $( this ).val( color );
109
+ }
110
+ }
111
+ }
112
+ );
113
+
114
+ // Replace and validate field on blur
115
+ el.find( '.redux-color' ).on(
116
+ 'blur', function() {
117
+ var value = $( this ).val();
118
+ var id = '#' + $( this ).attr( 'id' );
119
+
120
+ if ( value === "transparent" ) {
121
+ $( this ).parent().parent().find( '.wp-color-result' ).css(
122
+ 'background-color', 'transparent'
123
+ );
124
+
125
+ el.find( id + '-transparency' ).attr( 'checked', 'checked' );
126
+ } else {
127
+ if ( colorValidate( this ) === value ) {
128
+ if ( value.indexOf( "#" ) !== 0 ) {
129
+ $( this ).val( $( this ).data( 'oldcolor' ) );
130
+ }
131
+ }
132
+
133
+ el.find( id + '-transparency' ).removeAttr( 'checked' );
134
+ }
135
+ }
136
+ );
137
+
138
+ // Store the old valid color on keydown
139
+ el.find( '.redux-color' ).on(
140
+ 'keydown', function() {
141
+ $( this ).data( 'oldkeypress', $( this ).val() );
142
+ }
143
+ );
144
+
145
+ // When transparency checkbox is clicked
146
+ el.find( '.color-transparency' ).on(
147
+ 'click', function() {
148
+ if ( $( this ).is( ":checked" ) ) {
149
+ el.find( '.redux-saved-color' ).val( $( '#' + $( this ).data( 'id' ) ).val() );
150
+ el.find( '#' + $( this ).data( 'id' ) ).val( 'transparent' );
151
+ el.find( '#' + $( this ).data( 'id' ) ).parent().parent().find( '.wp-color-result' ).css(
152
+ 'background-color', 'transparent'
153
+ );
154
+ } else {
155
+ if ( el.find( '#' + $( this ).data( 'id' ) ).val() === 'transparent' ) {
156
+ var prevColor = $( '.redux-saved-color' ).val();
157
+
158
+ if ( prevColor === '' ) {
159
+ prevColor = $( '#' + $( this ).data( 'id' ) ).data( 'default-color' );
160
+ }
161
+
162
+ el.find( '#' + $( this ).data( 'id' ) ).parent().parent().find( '.wp-color-result' ).css(
163
+ 'background-color', prevColor
164
+ );
165
+
166
+ el.find( '#' + $( this ).data( 'id' ) ).val( prevColor );
167
+ }
168
+ }
169
+ redux_change( $( this ) );
170
+ }
171
+ );
172
+ }
173
+ );
174
+ };
175
+ })( jQuery );
includes/options/redux-core/inc/fields/color/field_color.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.color=redux.field_objects.color||{},a(document).ready(function(){}),redux.field_objects.color.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-color:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".redux-color-init").wpColorPicker({change:function(c,d){a(this).val(d.color.toString()),redux_change(a(this)),b.find("#"+c.target.getAttribute("data-id")+"-transparency").removeAttr("checked")},clear:function(b,c){a(this).val(""),redux_change(a(this).parent().find(".redux-color-init"))}}),b.find(".redux-color").on("focus",function(){a(this).data("oldcolor",a(this).val())}),b.find(".redux-color").on("keyup",function(){var c=a(this).val(),d=colorValidate(this),e="#"+a(this).attr("id");"transparent"===c?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),b.find(e+"-transparency").attr("checked","checked")):(b.find(e+"-transparency").removeAttr("checked"),d&&d!==a(this).val()&&a(this).val(d))}),b.find(".redux-color").on("blur",function(){var c=a(this).val(),d="#"+a(this).attr("id");"transparent"===c?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),b.find(d+"-transparency").attr("checked","checked")):(colorValidate(this)===c&&0!==c.indexOf("#")&&a(this).val(a(this).data("oldcolor")),b.find(d+"-transparency").removeAttr("checked"))}),b.find(".redux-color").on("keydown",function(){a(this).data("oldkeypress",a(this).val())}),b.find(".color-transparency").on("click",function(){if(a(this).is(":checked"))b.find(".redux-saved-color").val(a("#"+a(this).data("id")).val()),b.find("#"+a(this).data("id")).val("transparent"),b.find("#"+a(this).data("id")).parent().parent().find(".wp-color-result").css("background-color","transparent");else if("transparent"===b.find("#"+a(this).data("id")).val()){var c=a(".redux-saved-color").val();""===c&&(c=a("#"+a(this).data("id")).data("default-color")),b.find("#"+a(this).data("id")).parent().parent().find(".wp-color-result").css("background-color",c),b.find("#"+a(this).data("id")).val(c)}redux_change(a(this))}))})}}(jQuery);
includes/options/redux-core/inc/fields/color/field_color.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Color
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @version 3.0.0
20
+ */
21
+
22
+ // Exit if accessed directly
23
+ if ( ! defined( 'ABSPATH' ) ) {
24
+ exit;
25
+ }
26
+
27
+ // Don't duplicate me!
28
+ if ( ! class_exists( 'ReduxFramework_color' ) ) {
29
+
30
+ /**
31
+ * Main ReduxFramework_color class
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ class ReduxFramework_color {
36
+
37
+ /**
38
+ * Field Constructor.
39
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
40
+ *
41
+ * @since 1.0.0
42
+ * @access public
43
+ * @return void
44
+ */
45
+ function __construct( $field = array(), $value = '', $parent ) {
46
+
47
+ $this->parent = $parent;
48
+ $this->field = $field;
49
+ $this->value = $value;
50
+ }
51
+
52
+ /**
53
+ * Field Render Function.
54
+ * Takes the vars and outputs the HTML for the field in the settings
55
+ *
56
+ * @since 1.0.0
57
+ * @access public
58
+ * @return void
59
+ */
60
+ public function render() {
61
+
62
+ echo '<input data-id="' . $this->field['id'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '" id="' . $this->field['id'] . '-color" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" value="' . $this->value . '" data-oldcolor="" data-default-color="' . ( isset( $this->field['default'] ) ? $this->field['default'] : "" ) . '" />';
63
+ echo '<input type="hidden" class="redux-saved-color" id="' . $this->field['id'] . '-saved-color' . '" value="">';
64
+
65
+ if ( ! isset( $this->field['transparent'] ) || $this->field['transparent'] !== false ) {
66
+
67
+ $tChecked = "";
68
+
69
+ if ( $this->value == "transparent" ) {
70
+ $tChecked = ' checked="checked"';
71
+ }
72
+
73
+ echo '<label for="' . $this->field['id'] . '-transparency" class="color-transparency-check"><input type="checkbox" class="checkbox color-transparency ' . $this->field['class'] . '" id="' . $this->field['id'] . '-transparency" data-id="' . $this->field['id'] . '-color" value="1"' . $tChecked . '> ' . __( 'Transparent', 'redux-framework' ) . '</label>';
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Enqueue Function.
79
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
80
+ *
81
+ * @since 1.0.0
82
+ * @access public
83
+ * @return void
84
+ */
85
+ public function enqueue() {
86
+ if ($this->parent->args['dev_mode']) {
87
+ wp_enqueue_style( 'redux-color-picker-css' );
88
+ }
89
+
90
+ wp_enqueue_style( 'wp-color-picker' );
91
+
92
+ wp_enqueue_script(
93
+ 'redux-field-color-js',
94
+ ReduxFramework::$_url . 'inc/fields/color/field_color' . Redux_Functions::isMin() . '.js',
95
+ array( 'jquery', 'wp-color-picker', 'redux-js' ),
96
+ time(),
97
+ true
98
+ );
99
+ }
100
+
101
+ public function output() {
102
+ $style = '';
103
+
104
+ if ( ! empty( $this->value ) ) {
105
+ $mode = ( isset( $this->field['mode'] ) && ! empty( $this->field['mode'] ) ? $this->field['mode'] : 'color' );
106
+
107
+ $style .= $mode . ':' . $this->value . ';';
108
+
109
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
110
+ $css = Redux_Functions::parseCSS( $this->field['output'], $style, $this->value );
111
+ $this->parent->outputCSS .= $css;
112
+ }
113
+
114
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
115
+ $css = Redux_Functions::parseCSS( $this->field['compiler'], $style, $this->value );
116
+ $this->parent->compilerCSS .= $css;
117
+
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-color_gradient .colorGradient{display:inline-block}.redux-container-color_gradient .toLabel{padding-left:18px}@media screen and (max-width: 660px){.redux-container-color_gradient .colorGradient{display:block;text-align:center !important}}
includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.js ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Field Color Gradient
3
+ */
4
+
5
+ /*global jQuery, document, redux_change, redux*/
6
+
7
+ (function( $ ) {
8
+ 'use strict';
9
+
10
+ redux.field_objects = redux.field_objects || {};
11
+ redux.field_objects.color_gradient = redux.field_objects.color_gradient || {};
12
+
13
+ $( document ).ready(
14
+ function() {
15
+ // setTimeout(function () {
16
+ // redux.field_objects.color.init();
17
+ // }, 1000);
18
+ }
19
+ );
20
+
21
+ redux.field_objects.color_gradient.init = function( selector ) {
22
+
23
+ if ( !selector ) {
24
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-color_gradient:visible' );
25
+ }
26
+
27
+ $( selector ).each(
28
+ function() {
29
+ var el = $( this );
30
+ var parent = el;
31
+
32
+ if ( !el.hasClass( 'redux-field-container' ) ) {
33
+ parent = el.parents( '.redux-field-container:first' );
34
+ }
35
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
36
+ return;
37
+ }
38
+ if ( parent.hasClass( 'redux-field-init' ) ) {
39
+ parent.removeClass( 'redux-field-init' );
40
+ } else {
41
+ return;
42
+ }
43
+
44
+ el.find( '.redux-color-init' ).wpColorPicker(
45
+ {
46
+ change: function( e, ui ) {
47
+ $( this ).val( ui.color.toString() );
48
+ redux_change( $( this ) );
49
+ el.find( '#' + e.target.getAttribute( 'data-id' ) + '-transparency' ).removeAttr( 'checked' );
50
+ },
51
+ clear: function( e, ui ) {
52
+ $( this ).val( ui.color.toString() );
53
+ redux_change( $( this ).parent().find( '.redux-color-init' ) );
54
+ }
55
+ }
56
+ );
57
+
58
+ el.find( '.redux-color' ).on(
59
+ 'keyup', function() {
60
+ var value = $( this ).val();
61
+ var color = colorValidate( this );
62
+ var id = '#' + $( this ).attr( 'id' );
63
+
64
+ if ( value === "transparent" ) {
65
+ $( this ).parent().parent().find( '.wp-color-result' ).css(
66
+ 'background-color', 'transparent'
67
+ );
68
+
69
+ el.find( id + '-transparency' ).attr( 'checked', 'checked' );
70
+ } else {
71
+ el.find( id + '-transparency' ).removeAttr( 'checked' );
72
+
73
+ if ( color && color !== $( this ).val() ) {
74
+ $( this ).val( color );
75
+ }
76
+ }
77
+ }
78
+ );
79
+
80
+ // Replace and validate field on blur
81
+ el.find( '.redux-color' ).on(
82
+ 'blur', function() {
83
+ var value = $( this ).val();
84
+ var id = '#' + $( this ).attr( 'id' );
85
+
86
+ if ( value === "transparent" ) {
87
+ $( this ).parent().parent().find( '.wp-color-result' ).css(
88
+ 'background-color', 'transparent'
89
+ );
90
+
91
+ el.find( id + '-transparency' ).attr( 'checked', 'checked' );
92
+ } else {
93
+ if ( colorValidate( this ) === value ) {
94
+ if ( value.indexOf( "#" ) !== 0 ) {
95
+ $( this ).val( $( this ).data( 'oldcolor' ) );
96
+ }
97
+ }
98
+
99
+ el.find( id + '-transparency' ).removeAttr( 'checked' );
100
+ }
101
+ }
102
+ );
103
+
104
+ // Store the old valid color on keydown
105
+ el.find( '.redux-color' ).on(
106
+ 'keydown', function() {
107
+ $( this ).data( 'oldkeypress', $( this ).val() );
108
+ }
109
+ );
110
+
111
+ // When transparency checkbox is clicked
112
+ el.find( '.color-transparency' ).on(
113
+ 'click', function() {
114
+ if ( $( this ).is( ":checked" ) ) {
115
+
116
+ el.find( '.redux-saved-color' ).val( $( '#' + $( this ).data( 'id' ) ).val() );
117
+ el.find( '#' + $( this ).data( 'id' ) ).val( 'transparent' );
118
+ el.find( '#' + $( this ).data( 'id' ) ).parent().parent().find( '.wp-color-result' ).css(
119
+ 'background-color', 'transparent'
120
+ );
121
+ } else {
122
+ if ( el.find( '#' + $( this ).data( 'id' ) ).val() === 'transparent' ) {
123
+ var prevColor = $( '.redux-saved-color' ).val();
124
+
125
+ if ( prevColor === '' ) {
126
+ prevColor = $( '#' + $( this ).data( 'id' ) ).data( 'default-color' );
127
+ }
128
+
129
+ el.find( '#' + $( this ).data( 'id' ) ).parent().parent().find( '.wp-color-result' ).css(
130
+ 'background-color', prevColor
131
+ );
132
+
133
+ el.find( '#' + $( this ).data( 'id' ) ).val( prevColor );
134
+ }
135
+ }
136
+ redux_change( $( this ) );
137
+ }
138
+ );
139
+ }
140
+ );
141
+ };
142
+ })( jQuery );
includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.color_gradient=redux.field_objects.color_gradient||{},a(document).ready(function(){}),redux.field_objects.color_gradient.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-color_gradient:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".redux-color-init").wpColorPicker({change:function(c,d){a(this).val(d.color.toString()),redux_change(a(this)),b.find("#"+c.target.getAttribute("data-id")+"-transparency").removeAttr("checked")},clear:function(b,c){a(this).val(c.color.toString()),redux_change(a(this).parent().find(".redux-color-init"))}}),b.find(".redux-color").on("keyup",function(){var c=a(this).val(),d=colorValidate(this),e="#"+a(this).attr("id");"transparent"===c?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),b.find(e+"-transparency").attr("checked","checked")):(b.find(e+"-transparency").removeAttr("checked"),d&&d!==a(this).val()&&a(this).val(d))}),b.find(".redux-color").on("blur",function(){var c=a(this).val(),d="#"+a(this).attr("id");"transparent"===c?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),b.find(d+"-transparency").attr("checked","checked")):(colorValidate(this)===c&&0!==c.indexOf("#")&&a(this).val(a(this).data("oldcolor")),b.find(d+"-transparency").removeAttr("checked"))}),b.find(".redux-color").on("keydown",function(){a(this).data("oldkeypress",a(this).val())}),b.find(".color-transparency").on("click",function(){if(a(this).is(":checked"))b.find(".redux-saved-color").val(a("#"+a(this).data("id")).val()),b.find("#"+a(this).data("id")).val("transparent"),b.find("#"+a(this).data("id")).parent().parent().find(".wp-color-result").css("background-color","transparent");else if("transparent"===b.find("#"+a(this).data("id")).val()){var c=a(".redux-saved-color").val();""===c&&(c=a("#"+a(this).data("id")).data("default-color")),b.find("#"+a(this).data("id")).parent().parent().find(".wp-color-result").css("background-color",c),b.find("#"+a(this).data("id")).val(c)}redux_change(a(this))}))})}}(jQuery);
includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Color_Gradient
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @version 3.0.0
20
+ */
21
+ // Exit if accessed directly
22
+ if ( ! defined( 'ABSPATH' ) ) {
23
+ exit;
24
+ }
25
+
26
+ // Don't duplicate me!
27
+ if ( ! class_exists( 'ReduxFramework_color_gradient' ) ) {
28
+
29
+ /**
30
+ * Main ReduxFramework_color_gradient class
31
+ *
32
+ * @since 1.0.0
33
+ */
34
+ class ReduxFramework_color_gradient {
35
+
36
+ /**
37
+ * Field Constructor.
38
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
39
+ *
40
+ * @since 1.0.0
41
+ * @access public
42
+ * @return void
43
+ */
44
+ function __construct( $field = array(), $value = '', $parent ) {
45
+ $this->parent = $parent;
46
+ $this->field = $field;
47
+ $this->value = $value;
48
+ }
49
+
50
+ /**
51
+ * Field Render Function.
52
+ * Takes the vars and outputs the HTML for the field in the settings
53
+ *
54
+ * @since 1.0.0
55
+ * @access public
56
+ * @return void
57
+ */
58
+ public function render() {
59
+
60
+ // No errors please
61
+ $defaults = array(
62
+ 'from' => '',
63
+ 'to' => ''
64
+ );
65
+
66
+ $this->value = wp_parse_args( $this->value, $defaults );
67
+
68
+ echo '<div class="colorGradient"><strong>' . __( 'From ', 'redux-framework' ) . '</strong>&nbsp;';
69
+ echo '<input data-id="' . $this->field['id'] . '" id="' . $this->field['id'] . '-from" name="' . $this->field['name'] . $this->field['name_suffix'] . '[from]' . '" value="' . $this->value['from'] . '" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['from'] . '" />';
70
+ echo '<input type="hidden" class="redux-saved-color" id="' . $this->field['id'] . '-saved-color' . '" value="">';
71
+
72
+ if ( ! isset( $this->field['transparent'] ) || $this->field['transparent'] !== false ) {
73
+ $tChecked = "";
74
+
75
+ if ( $this->value['from'] == "transparent" ) {
76
+ $tChecked = ' checked="checked"';
77
+ }
78
+
79
+ echo '<label for="' . $this->field['id'] . '-from-transparency" class="color-transparency-check"><input type="checkbox" class="checkbox color-transparency ' . $this->field['class'] . '" id="' . $this->field['id'] . '-from-transparency" data-id="' . $this->field['id'] . '-from" value="1"' . $tChecked . '> ' . __( 'Transparent', 'redux-framework' ) . '</label>';
80
+ }
81
+ echo "</div>";
82
+ echo '<div class="colorGradient toLabel"><strong>' . __( 'To ', 'redux-framework' ) . '</strong>&nbsp;<input data-id="' . $this->field['id'] . '" id="' . $this->field['id'] . '-to" name="' . $this->field['name'] . $this->field['name_suffix'] . '[to]' . '" value="' . $this->value['to'] . '" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['to'] . '" />';
83
+
84
+ if ( ! isset( $this->field['transparent'] ) || $this->field['transparent'] !== false ) {
85
+ $tChecked = "";
86
+
87
+ if ( $this->value['to'] == "transparent" ) {
88
+ $tChecked = ' checked="checked"';
89
+ }
90
+
91
+ echo '<label for="' . $this->field['id'] . '-to-transparency" class="color-transparency-check"><input type="checkbox" class="checkbox color-transparency" id="' . $this->field['id'] . '-to-transparency" data-id="' . $this->field['id'] . '-to" value="1"' . $tChecked . '> ' . __( 'Transparent', 'redux-framework' ) . '</label>';
92
+ }
93
+ echo "</div>";
94
+ }
95
+
96
+ /**
97
+ * Enqueue Function.
98
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
99
+ *
100
+ * @since 1.0.0
101
+ * @access public
102
+ * @return void
103
+ */
104
+ public function enqueue() {
105
+ wp_enqueue_style( 'wp-color-picker' );
106
+
107
+ wp_enqueue_script(
108
+ 'redux-field-color-gradient-js',
109
+ ReduxFramework::$_url . 'inc/fields/color_gradient/field_color_gradient' . Redux_Functions::isMin() . '.js',
110
+ array( 'jquery', 'wp-color-picker', 'redux-js' ),
111
+ time(),
112
+ 'all'
113
+ );
114
+
115
+ if ($this->parent->args['dev_mode']) {
116
+ wp_enqueue_style( 'redux-color-picker-css' );
117
+
118
+ wp_enqueue_style(
119
+ 'redux-field-color_gradient-css',
120
+ ReduxFramework::$_url . 'inc/fields/color_gradient/field_color_gradient.css',
121
+ array(),
122
+ time(),
123
+ 'all'
124
+ );
125
+ }
126
+ }
127
+ }
128
+ }
includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.scss ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-color_gradient {
2
+ .colorGradient {
3
+ display: inline-block;
4
+ }
5
+ .toLabel {
6
+ padding-left: 18px;
7
+ }
8
+ }
9
+
10
+ @media screen and (max-width: 660px) {
11
+ .redux-container-color_gradient {
12
+ .colorGradient {
13
+ display: block;
14
+ text-align: center !important;
15
+ }
16
+ }
17
+ }
includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.php RENAMED
@@ -124,7 +124,7 @@ if( !class_exists( 'ReduxFramework_color_rgba' ) ) {
124
  $color = Redux_Helpers::hex2rgba($this->value['color'], $this->value['alpha']);
125
  }
126
 
127
- if ($this->value['rgba'] == ''){
128
  $this->value['rgba'] = Redux_Helpers::hex2rgba($this->value['color'], $this->value['alpha']);
129
  }
130
 
124
  $color = Redux_Helpers::hex2rgba($this->value['color'], $this->value['alpha']);
125
  }
126
 
127
+ if ($this->value['rgba'] == '' && $this->value['color'] != '' ){
128
  $this->value['rgba'] = Redux_Helpers::hex2rgba($this->value['color'], $this->value['alpha']);
129
  }
130
 
includes/options/{redux-framework → redux-core}/inc/fields/color_rgba/field_color_rgba.scss RENAMED
File without changes
includes/options/redux-core/inc/fields/date/field_date.css ADDED
@@ -0,0 +1 @@
 
1
+ #ui-datepicker-div{z-index:15 !important}.ui-datepicker-header{background-color:#00abef}
includes/options/redux-core/inc/fields/date/field_date.js ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global jQuery, document, redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.date = redux.field_objects.date || {};
8
+
9
+ $( document ).ready(
10
+ function() {
11
+ //redux.field_objects.date.init();
12
+ }
13
+ );
14
+
15
+ redux.field_objects.date.init = function( selector ) {
16
+ if ( !selector ) {
17
+ selector = $( document ).find( '.redux-container-date:visible' );
18
+ }
19
+ $( selector ).each(
20
+ function() {
21
+ var el = $( this );
22
+ var parent = el;
23
+ if ( !el.hasClass( 'redux-field-container' ) ) {
24
+ parent = el.parents( '.redux-field-container:first' );
25
+ }
26
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
27
+ return;
28
+ }
29
+ if ( parent.hasClass( 'redux-field-init' ) ) {
30
+ parent.removeClass( 'redux-field-init' );
31
+ } else {
32
+ return;
33
+ }
34
+ // var someArr = []
35
+ // someArr = i;
36
+ // console.log(someArr);
37
+
38
+ // var str = JSON.parse('{"redux_demo[opt-multi-check]":{"redux_demo[opt-multi-check][1]":"1","redux_demo[opt-multi-check][2]":"","redux_demo[opt-multi-check][3]":""}}');
39
+ // console.log (str);
40
+ //
41
+ // $.each(str, function(idx, val){
42
+ // var tmpArr = new Object();
43
+ // var count = 1;
44
+ //
45
+ // $.each(val, function (i, v){
46
+ //
47
+ // tmpArr[count] = v;
48
+ // count++;
49
+ // });
50
+ //
51
+ // var newArr = {};
52
+ // newArr[idx] = tmpArr;
53
+ // var newJSON = JSON.stringify(newArr)
54
+ // //console.log(newJSON);
55
+ // });
56
+
57
+ el.find( '.redux-datepicker' ).each( function() {
58
+ $( this ).datepicker({
59
+ "dateFormat":"mm/dd/yy",
60
+ beforeShow: function(input, instance){
61
+ var el = $('#ui-datepicker-div');
62
+ //$.datepicker._pos = $.datepicker._findPos(input); //this is the default position
63
+ var popover = instance.dpDiv;
64
+ $('.redux-container:first').append(el);
65
+ $('#ui-datepicker-div').hide();
66
+ setTimeout(function() {
67
+ popover.position({
68
+ my: 'left top',
69
+ at: 'left bottom',
70
+ collision: 'none',
71
+ of: input
72
+ });
73
+ }, 1);
74
+ }
75
+ });
76
+ });
77
+ }
78
+ );
79
+
80
+
81
+ };
82
+ })( jQuery );
includes/options/redux-core/inc/fields/date/field_date.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.date=redux.field_objects.date||{},a(document).ready(function(){}),redux.field_objects.date.init=function(b){b||(b=a(document).find(".redux-container-date:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".redux-datepicker").each(function(){a(this).datepicker({dateFormat:"mm/dd/yy",beforeShow:function(b,c){var d=a("#ui-datepicker-div"),e=c.dpDiv;a(".redux-container:first").append(d),a("#ui-datepicker-div").hide(),setTimeout(function(){e.position({my:"left top",at:"left bottom",collision:"none",of:b})},1)}})}))})}}(jQuery);
includes/options/redux-core/inc/fields/date/field_date.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Date
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @author Kevin Provance (kprovance)
20
+ * @version 3.0.0
21
+ */
22
+
23
+ // Exit if accessed directly
24
+ if ( ! defined( 'ABSPATH' ) ) {
25
+ exit;
26
+ }
27
+
28
+ // Don't duplicate me!
29
+ if ( ! class_exists( 'ReduxFramework_date' ) ) {
30
+
31
+ /**
32
+ * Main ReduxFramework_date class
33
+ *
34
+ * @since 1.0.0
35
+ */
36
+ class ReduxFramework_date {
37
+
38
+ /**
39
+ * Field Constructor.
40
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
41
+ *
42
+ * @since 1.0.0
43
+ * @access public
44
+ * @return void
45
+ */
46
+ function __construct( $field = array(), $value = '', $parent ) {
47
+ $this->parent = $parent;
48
+ $this->field = $field;
49
+ $this->value = $value;
50
+ }
51
+
52
+ /**
53
+ * Field Render Function.
54
+ * Takes the vars and outputs the HTML for the field in the settings
55
+ *
56
+ * @since 1.0.0
57
+ * @access public
58
+ * @return void
59
+ */
60
+ public function render() {
61
+ $placeholder = ( isset( $this->field['placeholder'] ) ) ? ' placeholder="' . esc_attr( $this->field['placeholder'] ) . '" ' : '';
62
+
63
+ echo '<input data-id="' . $this->field['id'] . '" type="text" id="' . $this->field['id'] . '-date" name="' . $this->field['name'] . $this->field['name_suffix'] . '"' . $placeholder . 'value="' . $this->value . '" class="redux-datepicker regular-text ' . $this->field['class'] . '" />';
64
+ }
65
+
66
+ /**
67
+ * Enqueue Function.
68
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
69
+ *
70
+ * @since 1.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function enqueue() {
75
+
76
+ if ($this->parent->args['dev_mode']) {
77
+ wp_enqueue_style(
78
+ 'redux-field-date-css',
79
+ ReduxFramework::$_url . 'inc/fields/date/field_date.css',
80
+ array(),
81
+ time(),
82
+ 'all'
83
+ );
84
+ }
85
+
86
+ wp_enqueue_script(
87
+ 'redux-field-date-js',
88
+ ReduxFramework::$_url . 'inc/fields/date/field_date' . Redux_Functions::isMin() . '.js',
89
+ array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'redux-js' ),
90
+ time(),
91
+ true
92
+ );
93
+ }
94
+ }
95
+ }
includes/options/redux-core/inc/fields/date/field_date.scss ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ #ui-datepicker-div {
2
+ z-index: 15 !important;
3
+ }
4
+
5
+ .ui-datepicker-header {
6
+ background-color: #00abef;
7
+ }
8
+
includes/options/redux-core/inc/fields/dimensions/field_dimensions.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-dimensions-container select,.redux-dimensions-container .select_wrapper{width:65px !important;float:left}.redux-dimensions-container .field-dimensions-input{margin-right:10px;margin-bottom:7px}@media screen and (max-width: 782px){.redux-dimensions-container .field-dimensions-input input{display:inline-block !important;width:100px !important}.redux-dimensions-container .field-dimensions-input .add-on{padding:7px 4px;font-size:16px;line-height:1.5}.redux-dimensions-container .select_wrapper{margin-top:6px}}
includes/options/redux-core/inc/fields/dimensions/field_dimensions.js ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /*global jQuery, document, redux*/
3
+
4
+ (function( $ ) {
5
+ "use strict";
6
+
7
+ redux.field_objects = redux.field_objects || {};
8
+ redux.field_objects.dimensions = redux.field_objects.dimensions || {};
9
+
10
+ $( document ).ready(
11
+ function() {
12
+ //redux.field_objects.dimensions.init();
13
+ }
14
+ );
15
+
16
+ redux.field_objects.dimensions.init = function( selector ) {
17
+
18
+ if ( !selector ) {
19
+ selector = $( document ).find( '.redux-container-dimensions:visible' );
20
+ }
21
+ $( selector ).each(
22
+ function() {
23
+ var el = $( this );
24
+ var parent = el;
25
+ if ( !el.hasClass( 'redux-field-container' ) ) {
26
+ parent = el.parents( '.redux-field-container:first' );
27
+ }
28
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
29
+ return;
30
+ }
31
+ if ( parent.hasClass( 'redux-field-init' ) ) {
32
+ parent.removeClass( 'redux-field-init' );
33
+ } else {
34
+ return;
35
+ }
36
+ var default_params = {
37
+ width: 'resolve',
38
+ triggerChange: true,
39
+ allowClear: true
40
+ };
41
+
42
+ var select2_handle = el.find( '.select2_params' );
43
+ if ( select2_handle.size() > 0 ) {
44
+ var select2_params = select2_handle.val();
45
+
46
+ select2_params = JSON.parse( select2_params );
47
+ default_params = $.extend( {}, default_params, select2_params );
48
+ }
49
+
50
+ el.find( ".redux-dimensions-units" ).select2( default_params );
51
+
52
+ el.find( '.redux-dimensions-input' ).on(
53
+ 'change', function() {
54
+ var units = $( this ).parents( '.redux-field:first' ).find( '.field-units' ).val();
55
+ if ( $( this ).parents( '.redux-field:first' ).find( '.redux-dimensions-units' ).length !== 0 ) {
56
+ units = $( this ).parents( '.redux-field:first' ).find( '.redux-dimensions-units option:selected' ).val();
57
+ }
58
+ if ( typeof units !== 'undefined' ) {
59
+ el.find( '#' + $( this ).attr( 'rel' ) ).val( $( this ).val() + units );
60
+ } else {
61
+ el.find( '#' + $( this ).attr( 'rel' ) ).val( $( this ).val() );
62
+ }
63
+ }
64
+ );
65
+
66
+ el.find( '.redux-dimensions-units' ).on(
67
+ 'change', function() {
68
+ $( this ).parents( '.redux-field:first' ).find( '.redux-dimensions-input' ).change();
69
+ }
70
+ );
71
+ }
72
+ );
73
+
74
+
75
+ };
76
+ })( jQuery );
includes/options/redux-core/inc/fields/dimensions/field_dimensions.less ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-dimensions-container {
2
+ select, .select_wrapper {
3
+ width: 80px !important;
4
+ float: left;
5
+ }
6
+
7
+ .field-dimensions-input {
8
+ margin-right: 10px;
9
+ margin-bottom: 7px;
10
+ }
11
+ }
12
+
13
+ @media screen and (max-width: 782px) {
14
+ .redux-dimensions-container {
15
+ .field-dimensions-input {
16
+ input {
17
+ display: inline-block !important;
18
+ width: 100px !important;
19
+ }
20
+ .add-on {
21
+ padding: 7px 4px;
22
+ font-size: 16px;
23
+ line-height: 1.5;
24
+ }
25
+ }
26
+ .select_wrapper {
27
+ margin-top: 6px;
28
+ }
29
+ }
30
+ }
includes/options/redux-core/inc/fields/dimensions/field_dimensions.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.dimensions=redux.field_objects.dimensions||{},a(document).ready(function(){}),redux.field_objects.dimensions.init=function(b){b||(b=a(document).find(".redux-container-dimensions:visible")),a(b).each(function(){var b=a(this),c=b;if(b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),!c.is(":hidden")&&c.hasClass("redux-field-init")){c.removeClass("redux-field-init");var d={width:"resolve",triggerChange:!0,allowClear:!0},e=b.find(".select2_params");if(e.size()>0){var f=e.val();f=JSON.parse(f),d=a.extend({},d,f)}b.find(".redux-dimensions-units").select2(d),b.find(".redux-dimensions-input").on("change",function(){var c=a(this).parents(".redux-field:first").find(".field-units").val();0!==a(this).parents(".redux-field:first").find(".redux-dimensions-units").length&&(c=a(this).parents(".redux-field:first").find(".redux-dimensions-units option:selected").val()),"undefined"!=typeof c?b.find("#"+a(this).attr("rel")).val(a(this).val()+c):b.find("#"+a(this).attr("rel")).val(a(this).val())}),b.find(".redux-dimensions-units").on("change",function(){a(this).parents(".redux-field:first").find(".redux-dimensions-input").change()})}})}}(jQuery);
includes/options/redux-core/inc/fields/dimensions/field_dimensions.php ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ if ( ! class_exists( 'ReduxFramework_dimensions' ) ) {
8
+ class ReduxFramework_dimensions {
9
+
10
+ /**
11
+ * Field Constructor.
12
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
13
+ *
14
+ * @since ReduxFramework 1.0.0
15
+ */
16
+ function __construct( $field = array(), $value = '', $parent ) {
17
+ $this->parent = $parent;
18
+ $this->field = $field;
19
+ $this->value = $value;
20
+ } //function
21
+
22
+ /**
23
+ * Field Render Function.
24
+ * Takes the vars and outputs the HTML for the field in the settings
25
+ *
26
+ * @since ReduxFramework 1.0.0
27
+ */
28
+ function render() {
29
+
30
+ /*
31
+ * So, in_array() wasn't doing it's job for checking a passed array for a proper value.
32
+ * It's wonky. It only wants to check the keys against our array of acceptable values, and not the key's
33
+ * value. So we'll use this instead. Fortunately, a single no array value can be passed and it won't
34
+ * take a dump.
35
+ */
36
+
37
+ // No errors please
38
+ $defaults = array(
39
+ 'width' => true,
40
+ 'height' => true,
41
+ 'units_extended' => false,
42
+ 'units' => 'px',
43
+ 'mode' => array(
44
+ 'width' => false,
45
+ 'height' => false,
46
+ ),
47
+ );
48
+
49
+ $this->field = wp_parse_args( $this->field, $defaults );
50
+
51
+ $defaults = array(
52
+ 'width' => '',
53
+ 'height' => '',
54
+ 'units' => 'px'
55
+ );
56
+
57
+ $this->value = wp_parse_args( $this->value, $defaults );
58
+
59
+ if ( isset( $this->value['unit'] ) ) {
60
+ $this->value['units'] = $this->value['unit'];
61
+ }
62
+
63
+ /*
64
+ * Acceptable values checks. If the passed variable doesn't pass muster, we unset them
65
+ * and reset them with default values to avoid errors.
66
+ */
67
+
68
+ // If units field has a value but is not an acceptable value, unset the variable
69
+ if ( isset( $this->field['units'] ) && ! Redux_Helpers::array_in_array( $this->field['units'], array(
70
+ '',
71
+ false,
72
+ '%',
73
+ 'in',
74
+ 'cm',
75
+ 'mm',
76
+ 'em',
77
+ 'ex',
78
+ 'pt',
79
+ 'pc',
80
+ 'px',
81
+ 'rem'
82
+ ) )
83
+ ) {
84
+ unset( $this->field['units'] );
85
+ }
86
+
87
+ //if there is a default unit value but is not an accepted value, unset the variable
88
+ if ( isset( $this->value['units'] ) && ! Redux_Helpers::array_in_array( $this->value['units'], array(
89
+ '',
90
+ '%',
91
+ 'in',
92
+ 'cm',
93
+ 'mm',
94
+ 'em',
95
+ 'ex',
96
+ 'pt',
97
+ 'pc',
98
+ 'px'
99
+ ) )
100
+ ) {
101
+ unset( $this->value['units'] );
102
+ }
103
+
104
+ /*
105
+ * Since units field could be an array, string value or bool (to hide the unit field)
106
+ * we need to separate our functions to avoid those nasty PHP index notices!
107
+ */
108
+
109
+ // if field units has a value and IS an array, then evaluate as needed.
110
+ if ( isset( $this->field['units'] ) && ! is_array( $this->field['units'] ) ) {
111
+
112
+ //if units fields has a value but units value does not then make units value the field value
113
+ if ( isset( $this->field['units'] ) && ! isset( $this->value['units'] ) || $this->field['units'] == false ) {
114
+ $this->value['units'] = $this->field['units'];
115
+
116
+ // If units field does NOT have a value and units value does NOT have a value, set both to blank (default?)
117
+ } else if ( ! isset( $this->field['units'] ) && ! isset( $this->value['units'] ) ) {
118
+ $this->field['units'] = 'px';
119
+ $this->value['units'] = 'px';
120
+
121
+ // If units field has NO value but units value does, then set unit field to value field
122
+ } else if ( ! isset( $this->field['units'] ) && isset( $this->value['units'] ) ) {
123
+ $this->field['units'] = $this->value['units'];
124
+
125
+ // if unit value is set and unit value doesn't equal unit field (coz who knows why)
126
+ // then set unit value to unit field
127
+ } elseif ( isset( $this->value['units'] ) && $this->value['units'] !== $this->field['units'] ) {
128
+ $this->value['units'] = $this->field['units'];
129
+ }
130
+
131
+ // do stuff based on unit field NOT set as an array
132
+ } elseif ( isset( $this->field['units'] ) && is_array( $this->field['units'] ) ) {
133
+ // nothing to do here, but I'm leaving the construct just in case I have to debug this again.
134
+ }
135
+
136
+ echo '<fieldset id="' . $this->field['id'] . '" class="redux-dimensions-container" data-id="' . $this->field['id'] . '">';
137
+
138
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
139
+ $select2_params = json_encode( $this->field['select2'] );
140
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
141
+
142
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
143
+ }
144
+
145
+
146
+ // This used to be unit field, but was giving the PHP index error when it was an array,
147
+ // so I changed it.
148
+ echo '<input type="hidden" class="field-units" value="' . $this->value['units'] . '">';
149
+
150
+ /**
151
+ * Width
152
+ * */
153
+ if ( $this->field['width'] === true ) {
154
+ if ( ! empty( $this->value['width'] ) && strpos( $this->value['width'], $this->value['units'] ) === false ) {
155
+ $this->value['width'] = filter_var( $this->value['width'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
156
+ if ( $this->field['units'] !== false ) {
157
+ $this->value['width'] .= $this->value['units'];
158
+ }
159
+ }
160
+ echo '<div class="field-dimensions-input input-prepend">';
161
+ echo '<span class="add-on"><i class="el el-resize-horizontal icon-large"></i></span>';
162
+ echo '<input type="text" class="redux-dimensions-input redux-dimensions-width mini ' . $this->field['class'] . '" placeholder="' . __( 'Width', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-width" value="' . filter_var( $this->value['width'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) . '">';
163
+ echo '<input data-id="' . $this->field['id'] . '" type="hidden" id="' . $this->field['id'] . '-width" name="' . $this->field['name'] . $this->field['name_suffix'] . '[width]' . '" value="' . $this->value['width'] . '"></div>';
164
+ }
165
+
166
+ /**
167
+ * Height
168
+ * */
169
+ if ( $this->field['height'] === true ) {
170
+ if ( ! empty( $this->value['height'] ) && strpos( $this->value['height'], $this->value['units'] ) === false ) {
171
+ $this->value['height'] = filter_var( $this->value['height'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
172
+ if ( $this->field['units'] !== false ) {
173
+ $this->value['height'] .= $this->value['units'];
174
+ }
175
+ }
176
+ echo '<div class="field-dimensions-input input-prepend">';
177
+ echo '<span class="add-on"><i class="el el-resize-vertical icon-large"></i></span>';
178
+ echo '<input type="text" class="redux-dimensions-input redux-dimensions-height mini ' . $this->field['class'] . '" placeholder="' . __( 'Height', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-height" value="' . filter_var( $this->value['height'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) . '">';
179
+ echo '<input data-id="' . $this->field['id'] . '" type="hidden" id="' . $this->field['id'] . '-height" name="' . $this->field['name'] . $this->field['name_suffix'] . '[height]' . '" value="' . $this->value['height'] . '"></div>';
180
+ }
181
+
182
+ /**
183
+ * Units
184
+ * */
185
+ // If units field is set and units field NOT false then
186
+ // fill out the options object and show it, otherwise it's hidden
187
+ // and the default units value will apply.
188
+ if ( isset( $this->field['units'] ) && $this->field['units'] !== false ) {
189
+ echo '<div class="select_wrapper dimensions-units" original-title="' . __( 'Units', 'redux-framework' ) . '">';
190
+ echo '<select data-id="' . $this->field['id'] . '" data-placeholder="' . __( 'Units', 'redux-framework' ) . '" class="redux-dimensions redux-dimensions-units select ' . $this->field['class'] . '" original-title="' . __( 'Units', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[units]' . '">';
191
+
192
+ // Extended units, show 'em all
193
+ if ( $this->field['units_extended'] ) {
194
+ $testUnits = array( 'px', 'em', 'rem', '%', 'in', 'cm', 'mm', 'ex', 'pt', 'pc' );
195
+ } else {
196
+ $testUnits = array( 'px', 'em', 'rem', '%' );
197
+ }
198
+
199
+ if ( $this->field['units'] != "" && is_array( $this->field['units'] ) ) {
200
+ $testUnits = $this->field['units'];
201
+ }
202
+
203
+ if ( in_array( $this->field['units'], $testUnits ) ) {
204
+ echo '<option value="' . $this->field['units'] . '" selected="selected">' . $this->field['units'] . '</option>';
205
+ } else {
206
+ foreach ( $testUnits as $aUnit ) {
207
+ echo '<option value="' . $aUnit . '" ' . selected( $this->value['units'], $aUnit, false ) . '>' . $aUnit . '</option>';
208
+ }
209
+ }
210
+ echo '</select></div>';
211
+ };
212
+ echo "</fieldset>";
213
+ } //function
214
+
215
+ /**
216
+ * Enqueue Function.
217
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
218
+ *
219
+ * @since ReduxFramework 1.0.0
220
+ */
221
+ function enqueue() {
222
+ wp_enqueue_style( 'select2-css' );
223
+
224
+ wp_enqueue_script(
225
+ 'redux-field-dimensions-js',
226
+ ReduxFramework::$_url . 'inc/fields/dimensions/field_dimensions' . Redux_Functions::isMin() . '.js',
227
+ array( 'jquery', 'select2-js', 'redux-js' ),
228
+ time(),
229
+ true
230
+ );
231
+
232
+ if ( $this->parent->args['dev_mode'] ) {
233
+ wp_enqueue_style(
234
+ 'redux-field-dimensions-css',
235
+ ReduxFramework::$_url . 'inc/fields/dimensions/field_dimensions.css',
236
+ array(),
237
+ time(),
238
+ 'all'
239
+ );
240
+ }
241
+ }
242
+
243
+ public function output() {
244
+
245
+ // if field units has a value and IS an array, then evaluate as needed.
246
+ if ( isset( $this->field['units'] ) && ! is_array( $this->field['units'] ) ) {
247
+
248
+ //if units fields has a value but units value does not then make units value the field value
249
+ if ( isset( $this->field['units'] ) && ! isset( $this->value['units'] ) || $this->field['units'] == false ) {
250
+ $this->value['units'] = $this->field['units'];
251
+
252
+ // If units field does NOT have a value and units value does NOT have a value, set both to blank (default?)
253
+ } else if ( ! isset( $this->field['units'] ) && ! isset( $this->value['units'] ) ) {
254
+ $this->field['units'] = 'px';
255
+ $this->value['units'] = 'px';
256
+
257
+ // If units field has NO value but units value does, then set unit field to value field
258
+ } else if ( ! isset( $this->field['units'] ) && isset( $this->value['units'] ) ) {
259
+ $this->field['units'] = $this->value['units'];
260
+
261
+ // if unit value is set and unit value doesn't equal unit field (coz who knows why)
262
+ // then set unit value to unit field
263
+ } elseif ( isset( $this->value['units'] ) && $this->value['units'] !== $this->field['units'] ) {
264
+ $this->value['units'] = $this->field['units'];
265
+ }
266
+
267
+ // do stuff based on unit field NOT set as an array
268
+ } elseif ( isset( $this->field['units'] ) && is_array( $this->field['units'] ) ) {
269
+ // nothing to do here, but I'm leaving the construct just in case I have to debug this again.
270
+ }
271
+
272
+ $units = isset( $this->value['units'] ) ? $this->value['units'] : "";
273
+
274
+ $height = isset( $this->field['mode'] ) && ! empty( $this->field['mode'] ) ? $this->field['mode'] : 'height';
275
+ $width = isset( $this->field['mode'] ) && ! empty( $this->field['mode'] ) ? $this->field['mode'] : 'width';
276
+
277
+ $cleanValue = array(
278
+ $height => isset( $this->value['height'] ) ? filter_var( $this->value['height'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : '',
279
+ $width => isset( $this->value['width'] ) ? filter_var( $this->value['width'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : '',
280
+ );
281
+
282
+ $style = "";
283
+
284
+ foreach ( $cleanValue as $key => $value ) {
285
+ // Output if it's a numeric entry
286
+ if ( isset( $value ) && is_numeric( $value ) ) {
287
+ $style .= $key . ':' . $value . $units . ';';
288
+ }
289
+ }
290
+
291
+ if ( ! empty( $style ) ) {
292
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
293
+ $keys = implode( ",", $this->field['output'] );
294
+ $this->parent->outputCSS .= $keys . "{" . $style . '}';
295
+ }
296
+
297
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
298
+ $keys = implode( ",", $this->field['compiler'] );
299
+ $this->parent->compilerCSS .= $keys . "{" . $style . '}';
300
+ }
301
+ }
302
+ } //function
303
+ } //class
304
+ }
305
+
306
+
includes/options/redux-core/inc/fields/dimensions/field_dimensions.scss ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-dimensions-container {
2
+ select,
3
+ .select_wrapper {
4
+ width: 65px !important;
5
+ float: left;
6
+ }
7
+
8
+ .field-dimensions-input {
9
+ margin-right: 10px;
10
+ margin-bottom: 7px;
11
+ }
12
+ }
13
+
14
+ @media screen and (max-width: 782px) {
15
+ .redux-dimensions-container {
16
+ .field-dimensions-input {
17
+ input {
18
+ display: inline-block !important;
19
+ width: 100px !important;
20
+ }
21
+
22
+ .add-on {
23
+ padding: 7px 4px;
24
+ font-size: 16px;
25
+ line-height: 1.5;
26
+ }
27
+ }
28
+
29
+ .select_wrapper {
30
+ margin-top: 6px;
31
+ }
32
+ }
33
+ }
includes/options/redux-core/inc/fields/divide/field_divide.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-main .divide{height:20px;line-height:20px;float:none;border-color:#E7E7E7;display:block;width:100%;height:35px !important;line-height:35px !important;position:relative;margin:15px 0 10px 0}.redux-main .divide .inner{width:42% !important;left:40% !important;margin-left:-6%;background-color:#FCFCFC;border-color:#E7E7E7;position:absolute;height:1px;top:50%;width:100%;margin-top:-1px;border-top-width:1px;border-top-style:solid}.redux-main .divide .inner span{background-color:#FCFCFC;border-color:#E7E7E7;height:5px;width:5px;border-width:2px;border-style:solid;display:block;position:absolute;left:50%;margin-left:-5px;margin-top:-5px}.wp-customizer .redux-container-divide .divide .inner{width:82% !important;left:18% !important;margin-left:-8%}
includes/options/redux-core/inc/fields/divide/field_divide.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Divide
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @version 3.0.0
20
+ */
21
+
22
+ // Exit if accessed directly
23
+ if ( !defined ( 'ABSPATH' ) ) {
24
+ exit;
25
+ }
26
+
27
+ // Don't duplicate me!
28
+ if ( !class_exists ( 'ReduxFramework_divide' ) ) {
29
+
30
+ /**
31
+ * Main ReduxFramework_divide class
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ class ReduxFramework_divide {
36
+
37
+ /**
38
+ * Field Constructor.
39
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
40
+ *
41
+ * @since 1.0.0
42
+ * @access public
43
+ * @return void
44
+ */
45
+ function __construct ( $field = array(), $value = '', $parent ) {
46
+ $this->parent = $parent;
47
+ $this->field = $field;
48
+ $this->value = $value;
49
+ }
50
+
51
+ /**
52
+ * Field Render Function.
53
+ * Takes the vars and outputs the HTML for the field in the settings
54
+ *
55
+ * @since 1.0.0
56
+ * @access public
57
+ * @return void
58
+ */
59
+ public function render () {
60
+ echo '</td></tr></table>';
61
+ echo '<div data-id="' . $this->field[ 'id' ] . '" id="divide-' . $this->field[ 'id' ] . '" class="divide ' . $this->field[ 'class' ] . '"><div class="inner"><span>&nbsp;</span></div></div>';
62
+ echo '<table class="form-table no-border"><tbody><tr><th></th><td>';
63
+ }
64
+
65
+ /**
66
+ * Enqueue Function.
67
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
68
+ *
69
+ * @since 1.0.0
70
+ * @access public
71
+ * @return void
72
+ */
73
+ public function enqueue() {
74
+ if ($this->parent->args['dev_mode']) {
75
+ wp_enqueue_style(
76
+ 'redux-field-divide',
77
+ ReduxFramework::$_url . 'inc/fields/divide/field_divide.css',
78
+ array(),
79
+ time(),
80
+ 'all'
81
+ );
82
+ }
83
+ }
84
+ }
85
+ }
includes/options/redux-core/inc/fields/divide/field_divide.scss ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-main {
2
+ .divide {
3
+ height: 20px;
4
+ line-height: 20px;
5
+ float: none;
6
+ border-color: #E7E7E7;
7
+ display: block;
8
+ width: 100%;
9
+ height: 35px !important;
10
+ line-height: 35px !important;
11
+ position: relative;
12
+ margin: 15px 0 10px 0;
13
+
14
+ .inner {
15
+ width: 42% !important;
16
+ left: 40% !important;
17
+ margin-left: -6%;
18
+ background-color: #FCFCFC;
19
+ border-color: #E7E7E7;
20
+ position: absolute;
21
+ height: 1px;
22
+ top: 50%;
23
+ width: 100%;
24
+ margin-top: -1px;
25
+ border-top-width: 1px;
26
+ border-top-style: solid;
27
+ span {
28
+ background-color: #FCFCFC;
29
+ border-color: #E7E7E7;
30
+ height: 5px;
31
+ width: 5px;
32
+ border-width: 2px;
33
+ border-style: solid;
34
+ display: block;
35
+ position: absolute;
36
+ left: 50%;
37
+ margin-left: -5px;
38
+ margin-top: -5px;
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ .wp-customizer .redux-container-divide {
45
+ .divide .inner {
46
+ width: 82% !important;
47
+ left: 18% !important;
48
+ margin-left: -8%;
49
+ }
50
+ }
includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/editor/field_editor.scss RENAMED
File without changes
includes/options/{redux-framework/inc/fields/ace_editor/vendor/mode-text.js → redux-core/inc/fields/editor/field_editor_c.php} RENAMED
File without changes
includes/options/redux-core/inc/fields/gallery/field_gallery.js ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global redux_change, wp */
2
+
3
+ /*global redux_change, redux*/
4
+
5
+ (function( $ ) {
6
+ "use strict";
7
+
8
+ redux.field_objects = redux.field_objects || {};
9
+ redux.field_objects.gallery = redux.field_objects.gallery || {};
10
+
11
+ $( document ).ready(
12
+ function() {
13
+ //redux.field_objects.gallery.init();
14
+ }
15
+ );
16
+
17
+ redux.field_objects.gallery.init = function( selector ) {
18
+
19
+
20
+ if ( !selector ) {
21
+ selector = $( document ).find( '.redux-container-gallery:visible' );
22
+ }
23
+
24
+ $( selector ).each(
25
+ function() {
26
+ var el = $( this );
27
+ var parent = el;
28
+ if ( !el.hasClass( 'redux-field-container' ) ) {
29
+ parent = el.parents( '.redux-field-container:first' );
30
+ }
31
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
32
+ return;
33
+ }
34
+ if ( parent.hasClass( 'redux-field-init' ) ) {
35
+ parent.removeClass( 'redux-field-init' );
36
+ } else {
37
+ return;
38
+ }
39
+ // When the user clicks on the Add/Edit gallery button, we need to display the gallery editing
40
+ el.on(
41
+ {
42
+ click: function( event ) {
43
+ // hide gallery settings used for posts/pages
44
+ wp.media.view.Settings.Gallery = wp.media.view.Settings.Gallery.extend({
45
+ template: function(view){
46
+ return;
47
+ }
48
+ });
49
+
50
+ var current_gallery = $( this ).closest( 'fieldset' );
51
+
52
+ if ( event.currentTarget.id === 'clear-gallery' ) {
53
+ //remove value from input
54
+
55
+ var rmVal = current_gallery.find( '.gallery_values' ).val( '' );
56
+
57
+ //remove preview images
58
+ current_gallery.find( ".screenshot" ).html( "" );
59
+
60
+ return;
61
+
62
+ }
63
+
64
+ // Make sure the media gallery API exists
65
+ if ( typeof wp === 'undefined' || !wp.media || !wp.media.gallery ) {
66
+ return;
67
+ }
68
+ event.preventDefault();
69
+
70
+ // Activate the media editor
71
+ var $$ = $( this );
72
+
73
+ var val = current_gallery.find( '.gallery_values' ).val();
74
+ var final;
75
+
76
+ if ( !val ) {
77
+ final = '[gallery ids="0"]';
78
+ } else {
79
+ final = '[gallery ids="' + val + '"]';
80
+ }
81
+
82
+ var frame = wp.media.gallery.edit( final );
83
+
84
+ // When the gallery-edit state is updated, copy the attachment ids across
85
+ frame.state( 'gallery-edit' ).on(
86
+ 'update', function( selection ) {
87
+
88
+ //clear screenshot div so we can append new selected images
89
+ current_gallery.find( ".screenshot" ).html( "" );
90
+
91
+ var element, preview_html = "", preview_img;
92
+ var ids = selection.models.map(
93
+ function( e ) {
94
+ element = e.toJSON();
95
+ preview_img = typeof element.sizes.thumbnail !== 'undefined' ? element.sizes.thumbnail.url : element.url;
96
+ preview_html = "<a class='of-uploaded-image' href='" + preview_img + "'><img class='redux-option-image' src='" + preview_img + "' alt='' /></a>";
97
+ current_gallery.find( ".screenshot" ).append( preview_html );
98
+
99
+ return e.id;
100
+ }
101
+ );
102
+
103
+ current_gallery.find( '.gallery_values' ).val( ids.join( ',' ) );
104
+ redux_change( current_gallery.find( '.gallery_values' ) );
105
+
106
+ }
107
+ );
108
+
109
+ return false;
110
+ }
111
+ }, '.gallery-attachments'
112
+ );
113
+ }
114
+ );
115
+
116
+ };
117
+ })( jQuery );
includes/options/redux-core/inc/fields/gallery/field_gallery.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.gallery=redux.field_objects.gallery||{},a(document).ready(function(){}),redux.field_objects.gallery.init=function(b){b||(b=a(document).find(".redux-container-gallery:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.on({click:function(b){wp.media.view.Settings.Gallery=wp.media.view.Settings.Gallery.extend({template:function(a){}});var c=a(this).closest("fieldset");if("clear-gallery"===b.currentTarget.id){c.find(".gallery_values").val("");return void c.find(".screenshot").html("")}if("undefined"!=typeof wp&&wp.media&&wp.media.gallery){b.preventDefault();var d,e=(a(this),c.find(".gallery_values").val());d=e?'[gallery ids="'+e+'"]':'[gallery ids="0"]';var f=wp.media.gallery.edit(d);return f.state("gallery-edit").on("update",function(a){c.find(".screenshot").html("");var b,d,e="",f=a.models.map(function(a){return b=a.toJSON(),d="undefined"!=typeof b.sizes.thumbnail?b.sizes.thumbnail.url:b.url,e="<a class='of-uploaded-image' href='"+d+"'><img class='redux-option-image' src='"+d+"' alt='' /></a>",c.find(".screenshot").append(e),a.id});c.find(".gallery_values").val(f.join(",")),redux_change(c.find(".gallery_values"))}),!1}}},".gallery-attachments"))})}}(jQuery);
includes/options/redux-core/inc/fields/gallery/field_gallery.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Gallery
17
+ * @author Abdullah Almesbahi (cadr-sa)
18
+ * @version 3.0.0
19
+ */
20
+
21
+ // Exit if accessed directly
22
+ if ( ! defined( 'ABSPATH' ) ) {
23
+ exit;
24
+ }
25
+
26
+ // Don't duplicate me!
27
+ if ( ! class_exists( 'ReduxFramework_gallery' ) ) {
28
+
29
+ /**
30
+ * Main ReduxFramework_gallery class
31
+ *
32
+ * @since 3.0.0
33
+ */
34
+ class ReduxFramework_gallery {
35
+
36
+ /**
37
+ * Field Constructor.
38
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
39
+ *
40
+ * @since 1.0.0
41
+ * @access public
42
+ * @return void
43
+ */
44
+ function __construct( $field = array(), $value = '', $parent ) {
45
+ $this->parent = $parent;
46
+ $this->field = $field;
47
+ $this->value = $value;
48
+ }
49
+
50
+ /**
51
+ * Field Render Function.
52
+ * Takes the vars and outputs the HTML for the field in the settings
53
+ *
54
+ * @since 1.0.0
55
+ * @access public
56
+ * @return void
57
+ */
58
+ public function render() {
59
+ echo '<div class="screenshot">';
60
+
61
+ if ( ! empty( $this->value ) ) {
62
+ $ids = explode( ',', $this->value );
63
+
64
+ foreach ( $ids as $attachment_id ) {
65
+ $img = wp_get_attachment_image_src( $attachment_id, 'thumbnail' );
66
+ echo '<a class="of-uploaded-image" href="' . $img[0] . '">';
67
+ echo '<img class="redux-option-image" id="image_' . $this->field['id'] . '_' . $attachment_id . '" src="' . $img[0] . '" alt="" target="_blank" rel="external" />';
68
+ echo '</a>';
69
+ }
70
+ }
71
+
72
+ echo '</div>';
73
+ echo '<a href="#" onclick="return false;" id="edit-gallery" class="gallery-attachments button button-primary">' . __( 'Add/Edit Gallery', 'redux-framework' ) . '</a> ';
74
+ echo '<a href="#" onclick="return false;" id="clear-gallery" class="gallery-attachments button">' . __( 'Clear Gallery', 'redux-framework' ) . '</a>';
75
+ echo '<input type="hidden" class="gallery_values ' . $this->field['class'] . '" value="' . esc_attr( $this->value ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '" />';
76
+ }
77
+
78
+ /**
79
+ * Enqueue Function.
80
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
81
+ *
82
+ * @since 1.0.0
83
+ * @access public
84
+ * @return void
85
+ */
86
+ public function enqueue() {
87
+
88
+ if ( function_exists( 'wp_enqueue_media' ) ) {
89
+ wp_enqueue_media();
90
+ } else {
91
+ wp_enqueue_script( 'media-upload' );
92
+ wp_enqueue_script( 'thickbox' );
93
+ wp_enqueue_style( 'thickbox' );
94
+ }
95
+
96
+ wp_enqueue_script(
97
+ 'redux-field-gallery-js',
98
+ ReduxFramework::$_url . 'inc/fields/gallery/field_gallery' . Redux_Functions::isMin() . '.js',
99
+ array( 'jquery', 'redux-js' ),
100
+ time(),
101
+ true
102
+ );
103
+ }
104
+ }
105
+ }
includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/image_select/field_image_select.scss RENAMED
File without changes
includes/options/redux-core/inc/fields/info/field_info.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-info-field{min-height:20px;padding:8px 19px;margin:10px 0;border:1px solid;border-radius:4px;border:1px solid;position:relative}.redux-info-field h1,.redux-info-field h2,.redux-info-field h3,.redux-info-field h4,.redux-info-field h5,.redux-info-field h6{border-bottom:0 !important}.redux-info-field h3{color:#777}.redux-info-field .redux-info-icon{display:inline-block;margin-right:15px}.redux-info-field .redux-info-icon i{font-size:2em}.redux-info-field .redux-info-desc{display:inline-block;vertical-align:top}.redux-info-field.redux-normal{background-color:#eeeeee;border-color:#cccccc;color:#666666}.redux-info-field.redux-normal i{color:#c5c5c5}.redux-info-field.redux-warning{background-color:#fbeba4;border-color:#d7c281;color:#958234}.redux-info-field.redux-warning i{color:#dcca81}.redux-info-field.redux-success{background-color:#c4ee91;border-color:#71af5d;color:#4d7615}.redux-info-field.redux-success i{color:#a0ca6c}.redux-info-field.redux-critical{background-color:#fba1a3;border-color:#b84f5b;color:#981225}.redux-info-field.redux-critical i{color:#dd767d}.redux-info-field.redux-info{background-color:#d3e4f4;border-color:#a9b6c2;color:#5c80a1}.redux-info-field.redux-info i{color:#afc6da}.redux-notice-field{margin:15px 0 0;background-color:#fff;border:0;border-left:4px solid #f3f3f3;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);padding:1px 12px}.redux-notice-field h1,.redux-notice-field h2,.redux-notice-field h3,.redux-notice-field h4,.redux-notice-field h5,.redux-notice-field h6{border-bottom:0 !important}.redux-notice-field p{margin:.5em 0;padding:2px}.redux-notice-field .redux-info-icon{display:inline-block;margin-right:15px}.redux-notice-field .redux-info-icon i{font-size:2em}.redux-notice-field .redux-info-desc{display:inline-block;vertical-align:top}.redux-notice-field.redux-info{border-left:4px solid #0099d5}.redux-notice-field.redux-success{border-left:4px solid #7ad03a}.redux-notice-field.redux-warning{border-left:4px solid #fbeba4}.redux-notice-field.redux-critical{border-left:4px solid #dd3d36}.redux-main .redux-field-container.redux-container-info{padding:0}.wp-customizer .hasIcon.redux-notice-field .redux-info-desc,.wp-customizer .hasIcon.redux-info-field .redux-info-desc{display:block;margin-left:43px}.wp-customizer .hasIcon.redux-notice-field .redux-info-icon,.wp-customizer .hasIcon.redux-info-field .redux-info-icon{float:left}.wp-customizer .redux-main .customize-control.customize-control-redux-info{border-bottom:0}
includes/options/redux-core/inc/fields/info/field_info.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Info
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @version 3.0.0
20
+ */
21
+
22
+ // Exit if accessed directly
23
+ if ( ! defined( 'ABSPATH' ) ) {
24
+ exit;
25
+ }
26
+
27
+ // Don't duplicate me!
28
+ if ( ! class_exists( 'ReduxFramework_info' ) ) {
29
+
30
+ /**
31
+ * Main ReduxFramework_info class
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ class ReduxFramework_info {
36
+
37
+ /**
38
+ * Field Constructor.
39
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
40
+ *
41
+ * @since 1.0.0
42
+ * @access public
43
+ * @return void
44
+ */
45
+ function __construct( $field = array(), $value = '', $parent ) {
46
+ $this->parent = $parent;
47
+ $this->field = $field;
48
+ $this->value = $value;
49
+ }
50
+
51
+ /**
52
+ * Field Render Function.
53
+ * Takes the vars and outputs the HTML for the field in the settings
54
+ *
55
+ * @since 1.0.0
56
+ * @access public
57
+ * @return void
58
+ */
59
+ public function render() {
60
+
61
+ $defaults = array(
62
+ 'title' => '',
63
+ 'desc' => '',
64
+ 'notice' => true,
65
+ 'style' => '',
66
+ 'color' => '',
67
+ );
68
+
69
+ $this->field = wp_parse_args( $this->field, $defaults );
70
+
71
+ $styles = array(
72
+ 'normal',
73
+ 'info',
74
+ 'warning',
75
+ 'success',
76
+ 'critical',
77
+ 'custom'
78
+ );
79
+
80
+ if (!in_array($this->field['style'], $styles)) {
81
+ $this->field['style'] = 'normal';
82
+ }
83
+ if ($this->field['style'] == "custom") {
84
+ if (!empty($this->field['color']) ) {
85
+ $this->field['color'] = "border-color:".$this->field['color'].';';
86
+ } else {
87
+ $this->field['style'] = 'normal';
88
+ $this->field['color'] = "";
89
+ }
90
+ } else {
91
+ $this->field['color'] = "";
92
+ }
93
+
94
+ if ( empty( $this->field['desc'] ) && ! empty( $this->field['default'] ) ) {
95
+ $this->field['desc'] = $this->field['default'];
96
+ unset( $this->field['default'] );
97
+ }
98
+
99
+ if ( empty( $this->field['desc'] ) && ! empty( $this->field['subtitle'] ) ) {
100
+ $this->field['desc'] = $this->field['subtitle'];
101
+ unset( $this->field['subtitle'] );
102
+ }
103
+
104
+ if ( empty( $this->field['desc'] ) ) {
105
+ $this->field['desc'] = "";
106
+ }
107
+
108
+ if ( empty( $this->field['raw_html'] ) ) {
109
+ if ( $this->field['notice'] == true ) {
110
+ $this->field['class'] .= ' redux-notice-field';
111
+ } else {
112
+ $this->field['class'] .= ' redux-info-field';
113
+ }
114
+
115
+
116
+
117
+ $this->field['style'] = 'redux-' . $this->field['style'] . ' ';
118
+ }
119
+
120
+ $indent = ( isset( $this->field['sectionIndent'] ) && $this->field['sectionIndent'] ) ? ' form-table-section-indented' : '';
121
+
122
+ echo '</td></tr></table><div id="info-' . esc_attr($this->field['id']) . '" class="' . ( isset( $this->field['icon'] ) && ! empty( $this->field['icon'] ) && $this->field['icon'] !== true ? "hasIcon " : "") . esc_attr($this->field['style']) . ' ' . esc_attr($this->field['class']) . ' redux-field-' . esc_attr($this->field['type']) . esc_attr($indent) . '"'.( !empty($this->field['color']) ? ' style="' . esc_attr($this->field['color']) . '"' : '' ) . '>';
123
+
124
+ if ( ! empty( $this->field['raw_html'] ) && $this->field['raw_html'] ) {
125
+ echo wp_kses_post($this->field['desc']);
126
+ } else {
127
+ if ( isset( $this->field['title'] ) && ! empty( $this->field['title'] ) ) {
128
+ $this->field['title'] = '<b>' . wp_kses_post($this->field['title']) . '</b><br/>';
129
+ }
130
+
131
+ if ( isset( $this->field['icon'] ) && ! empty( $this->field['icon'] ) && $this->field['icon'] !== true ) {
132
+ echo '<p class="redux-info-icon"><i class="' . esc_attr($this->field['icon']) . ' icon-large"></i></p>';
133
+ }
134
+
135
+ if ( isset( $this->field['raw'] ) && ! empty( $this->field['raw'] ) ) {
136
+ echo wp_kses_post($this->field['raw']);
137
+ }
138
+
139
+ if ( ! empty( $this->field['title'] ) || ! empty( $this->field['desc'] ) ) {
140
+ echo '<p class="redux-info-desc">' . wp_kses_post($this->field['title']) . wp_kses_post($this->field['desc']) . '</p>';
141
+ }
142
+ }
143
+
144
+ echo '</div><table class="form-table no-border" style="margin-top: 0;"><tbody><tr style="border-bottom:0; display:none;"><th style="padding-top:0;"></th><td style="padding-top:0;">';
145
+ }
146
+
147
+ /**
148
+ * Enqueue Function.
149
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
150
+ *
151
+ * @since 1.0.0
152
+ * @access public
153
+ * @return void
154
+ */
155
+ public function enqueue() {
156
+ if ($this->parent->args['dev_mode']) {
157
+ wp_enqueue_style(
158
+ 'redux-field-info-css',
159
+ ReduxFramework::$_url . 'inc/fields/info/field_info.css',
160
+ array(),
161
+ time(),
162
+ 'all'
163
+ );
164
+ }
165
+ }
166
+ }
167
+ }
includes/options/redux-core/inc/fields/info/field_info.scss ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-info-field {
2
+ min-height: 20px;
3
+ padding: 8px 19px;
4
+ margin: 10px 0;
5
+ border: 1px solid;
6
+ border-radius: 4px;
7
+ border: 1px solid;
8
+ position: relative;
9
+
10
+ h1,
11
+ h2,
12
+ h3,
13
+ h4,
14
+ h5,
15
+ h6 {
16
+ border-bottom: 0 !important;
17
+ }
18
+
19
+ h3 {
20
+ color: #777;
21
+ }
22
+
23
+ .redux-info-icon {
24
+ display: inline-block;
25
+ margin-right: 15px;
26
+
27
+ i {
28
+ font-size: 2em;
29
+ }
30
+ }
31
+
32
+ .redux-info-desc {
33
+ display: inline-block;
34
+ vertical-align: top;
35
+ }
36
+
37
+ &.redux-normal {
38
+ background-color: #eeeeee;
39
+ border-color: #cccccc;
40
+ color: #666666;
41
+
42
+ i {
43
+ color: #c5c5c5;
44
+ }
45
+ }
46
+
47
+ &.redux-warning {
48
+ background-color: #fbeba4;
49
+ border-color: #d7c281;
50
+ color: #958234;
51
+
52
+ i {
53
+ color: #dcca81;
54
+ }
55
+ }
56
+
57
+ &.redux-success {
58
+ background-color: #c4ee91;
59
+ border-color: #71af5d;
60
+ color: #4d7615;
61
+
62
+ i {
63
+ color: #a0ca6c;
64
+ }
65
+ }
66
+
67
+ &.redux-critical {
68
+ background-color: #fba1a3;
69
+ border-color: #b84f5b;
70
+ color: #981225;
71
+
72
+ i {
73
+ color: #dd767d;
74
+ }
75
+ }
76
+
77
+ &.redux-info {
78
+ background-color: #d3e4f4;
79
+ border-color: #a9b6c2;
80
+ color: #5c80a1;
81
+
82
+ i {
83
+ color: #afc6da;
84
+ }
85
+ }
86
+ }
87
+
88
+ .redux-notice-field {
89
+ margin: 15px 0 0;
90
+ background-color: #fff;
91
+ border: 0;
92
+ border-left: 4px solid #f3f3f3;
93
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
94
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
95
+ padding: 1px 12px;
96
+
97
+ h1,
98
+ h2,
99
+ h3,
100
+ h4,
101
+ h5,
102
+ h6 {
103
+ border-bottom: 0 !important;
104
+ }
105
+
106
+ p {
107
+ margin: .5em 0;
108
+ padding: 2px;
109
+ }
110
+
111
+ .redux-info-icon {
112
+ display: inline-block;
113
+ margin-right: 15px;
114
+
115
+ i {
116
+ font-size: 2em;
117
+ }
118
+ }
119
+
120
+ .redux-info-desc {
121
+ display: inline-block;
122
+ vertical-align: top;
123
+ }
124
+
125
+ &.redux-info {
126
+ border-left: 4px solid #0099d5;
127
+ }
128
+
129
+ &.redux-success {
130
+ border-left: 4px solid #7ad03a;
131
+ }
132
+
133
+ &.redux-warning {
134
+ border-left: 4px solid #fbeba4;
135
+ }
136
+
137
+ &.redux-critical {
138
+ border-left: 4px solid #dd3d36;
139
+ }
140
+ }
141
+
142
+ .redux-main .redux-field-container.redux-container-info {
143
+ padding: 0;
144
+ }
145
+
146
+ .wp-customizer {
147
+ .hasIcon.redux-notice-field, .hasIcon.redux-info-field {
148
+ .redux-info-desc {
149
+ display: block;
150
+ margin-left: 43px;
151
+ }
152
+ .redux-info-icon {
153
+ float: left;
154
+ }
155
+ }
156
+ .redux-main .customize-control.customize-control-redux-info {
157
+ border-bottom: 0;
158
+ }
159
+ }
includes/options/redux-core/inc/fields/link_color/field_link_color.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-link_color .linkColor{display:inline-block;padding-right:10px;padding-bottom:7px}
includes/options/redux-core/inc/fields/link_color/field_link_color.js ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Field Link Color
3
+ */
4
+
5
+ /*global jQuery, document, redux_change, redux*/
6
+
7
+ (function( $ ) {
8
+ 'use strict';
9
+
10
+ redux.field_objects = redux.field_objects || {};
11
+ redux.field_objects.link_color = redux.field_objects.link_color || {};
12
+
13
+ $( document ).ready(
14
+ function() {
15
+
16
+ }
17
+ );
18
+
19
+ redux.field_objects.link_color.init = function( selector ) {
20
+
21
+ if ( !selector ) {
22
+ selector = $( document ).find( '.redux-container-link_color:visible' );
23
+ }
24
+
25
+ $( selector ).each(
26
+ function() {
27
+ var el = $( this );
28
+ var parent = el;
29
+
30
+ if ( !el.hasClass( 'redux-field-container' ) ) {
31
+ parent = el.parents( '.redux-field-container:first' );
32
+ }
33
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
34
+ return;
35
+ }
36
+ if ( parent.hasClass( 'redux-field-init' ) ) {
37
+ parent.removeClass( 'redux-field-init' );
38
+ } else {
39
+ return;
40
+ }
41
+
42
+ el.find( '.redux-color-init' ).wpColorPicker(
43
+ {
44
+ change: function( e, ui ) {
45
+ $( this ).val( ui.color.toString() );
46
+ redux_change( $( this ) );
47
+ el.find( '#' + e.target.getAttribute( 'data-id' ) + '-transparency' ).removeAttr( 'checked' );
48
+ },
49
+ clear: function( e, ui ) {
50
+ $( this ).val( ui.color.toString() );
51
+ redux_change( $( this ).parent().find( '.redux-color-init' ) );
52
+ }
53
+ }
54
+ );
55
+
56
+ el.find( '.redux-color' ).on(
57
+ 'keyup', function() {
58
+ var value = $( this ).val();
59
+ var color = colorValidate( this );
60
+ var id = '#' + $( this ).attr( 'id' );
61
+
62
+ if ( value === "transparent" ) {
63
+ $( this ).parent().parent().find( '.wp-color-result' ).css(
64
+ 'background-color', 'transparent'
65
+ );
66
+
67
+ el.find( id + '-transparency' ).attr( 'checked', 'checked' );
68
+ } else {
69
+ el.find( id + '-transparency' ).removeAttr( 'checked' );
70
+
71
+ if ( color && color !== $( this ).val() ) {
72
+ $( this ).val( color );
73
+ }
74
+ }
75
+ }
76
+ );
77
+
78
+ // Replace and validate field on blur
79
+ el.find( '.redux-color' ).on(
80
+ 'blur', function() {
81
+ var value = $( this ).val();
82
+ var id = '#' + $( this ).attr( 'id' );
83
+
84
+ if ( value === "transparent" ) {
85
+ $( this ).parent().parent().find( '.wp-color-result' ).css(
86
+ 'background-color', 'transparent'
87
+ );
88
+
89
+ el.find( id + '-transparency' ).attr( 'checked', 'checked' );
90
+ } else {
91
+ if ( colorValidate( this ) === value ) {
92
+ if ( value.indexOf( "#" ) !== 0 ) {
93
+ $( this ).val( $( this ).data( 'oldcolor' ) );
94
+ }
95
+ }
96
+
97
+ el.find( id + '-transparency' ).removeAttr( 'checked' );
98
+ }
99
+ }
100
+ );
101
+
102
+ // Store the old valid color on keydown
103
+ el.find( '.redux-color' ).on(
104
+ 'keydown', function() {
105
+ $( this ).data( 'oldkeypress', $( this ).val() );
106
+ }
107
+ );
108
+ }
109
+ );
110
+ };
111
+ })( jQuery );
includes/options/redux-core/inc/fields/link_color/field_link_color.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.link_color=redux.field_objects.link_color||{},a(document).ready(function(){}),redux.field_objects.link_color.init=function(b){b||(b=a(document).find(".redux-container-link_color:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".redux-color-init").wpColorPicker({change:function(c,d){a(this).val(d.color.toString()),redux_change(a(this)),b.find("#"+c.target.getAttribute("data-id")+"-transparency").removeAttr("checked")},clear:function(b,c){a(this).val(c.color.toString()),redux_change(a(this).parent().find(".redux-color-init"))}}),b.find(".redux-color").on("keyup",function(){var c=a(this).val(),d=colorValidate(this),e="#"+a(this).attr("id");"transparent"===c?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),b.find(e+"-transparency").attr("checked","checked")):(b.find(e+"-transparency").removeAttr("checked"),d&&d!==a(this).val()&&a(this).val(d))}),b.find(".redux-color").on("blur",function(){var c=a(this).val(),d="#"+a(this).attr("id");"transparent"===c?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),b.find(d+"-transparency").attr("checked","checked")):(colorValidate(this)===c&&0!==c.indexOf("#")&&a(this).val(a(this).data("oldcolor")),b.find(d+"-transparency").removeAttr("checked"))}),b.find(".redux-color").on("keydown",function(){a(this).data("oldkeypress",a(this).val())}))})}}(jQuery);
includes/options/redux-core/inc/fields/link_color/field_link_color.php ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Color_Gradient
17
+ * @author Luciano "WebCaos" Ubertini
18
+ * @author Daniel J Griffiths (Ghost1227)
19
+ * @author Dovy Paukstys
20
+ * @author Kevin Provance (kprovance) - fixing everyone else's bugs.
21
+ * @version 3.0.0
22
+ */
23
+
24
+ // Exit if accessed directly
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ // Don't duplicate me!
30
+ if ( ! class_exists( 'ReduxFramework_link_color' ) ) {
31
+
32
+ /**
33
+ * Main ReduxFramework_link_color class
34
+ *
35
+ * @since 1.0.0
36
+ */
37
+ class ReduxFramework_link_color {
38
+
39
+ /**
40
+ * Field Constructor.
41
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
42
+ *
43
+ * @since 1.0.0
44
+ * @access public
45
+ * @return void
46
+ */
47
+ function __construct( $field = array(), $value = '', $parent ) {
48
+ $this->parent = $parent;
49
+ $this->field = $field;
50
+ $this->value = $value;
51
+
52
+ $defaults = array(
53
+ 'regular' => true,
54
+ 'hover' => true,
55
+ 'visited' => false,
56
+ 'active' => true
57
+ );
58
+ $this->field = wp_parse_args( $this->field, $defaults );
59
+
60
+ $defaults = array(
61
+ 'regular' => '',
62
+ 'hover' => '',
63
+ 'visited' => '',
64
+ 'active' => ''
65
+ );
66
+
67
+ $this->value = wp_parse_args( $this->value, $defaults );
68
+
69
+ // In case user passes no default values.
70
+ if ( isset( $this->field['default'] ) ) {
71
+ $this->field['default'] = wp_parse_args( $this->field['default'], $defaults );
72
+ } else {
73
+ $this->field['default'] = $defaults;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Field Render Function.
79
+ * Takes the vars and outputs the HTML for the field in the settings
80
+ *
81
+ * @since 1.0.0
82
+ * @access public
83
+ * @return void
84
+ */
85
+ public function render() {
86
+
87
+ if ( $this->field['regular'] === true && $this->field['default']['regular'] !== false ) {
88
+ echo '<span class="linkColor"><strong>' . __( 'Regular', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-regular" name="' . $this->field['name'] . $this->field['name_suffix'] . '[regular]' . '" value="' . $this->value['regular'] . '" class="redux-color redux-color-regular redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['regular'] . '" /></span>';
89
+ }
90
+
91
+ if ( $this->field['hover'] === true && $this->field['default']['hover'] !== false ) {
92
+ echo '<span class="linkColor"><strong>' . __( 'Hover', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-hover" name="' . $this->field['name'] . $this->field['name_suffix'] . '[hover]' . '" value="' . $this->value['hover'] . '" class="redux-color redux-color-hover redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['hover'] . '" /></span>';
93
+ }
94
+
95
+ if ( $this->field['visited'] === true && $this->field['default']['visited'] !== false ) {
96
+ echo '<span class="linkColor"><strong>' . __( 'Visited', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-hover" name="' . $this->field['name'] . $this->field['name_suffix'] . '[visited]' . '" value="' . $this->value['visited'] . '" class="redux-color redux-color-visited redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['visited'] . '" /></span>';
97
+ }
98
+
99
+ if ( $this->field['active'] === true && $this->field['default']['active'] !== false ) {
100
+ echo '<span class="linkColor"><strong>' . __( 'Active', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-active" name="' . $this->field['name'] . $this->field['name_suffix'] . '[active]' . '" value="' . $this->value['active'] . '" class="redux-color redux-color-active redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['active'] . '" /></span>';
101
+ }
102
+ }
103
+
104
+ /**
105
+ * Enqueue Function.
106
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
107
+ *
108
+ * @since 1.0.0
109
+ * @access public
110
+ * @return void
111
+ */
112
+ public function enqueue() {
113
+ wp_enqueue_style( 'wp-color-picker' );
114
+
115
+ wp_enqueue_script(
116
+ 'redux-field-link-color-js',
117
+ ReduxFramework::$_url . 'inc/fields/link_color/field_link_color' . Redux_Functions::isMin() . '.js',
118
+ array( 'jquery', 'wp-color-picker', 'redux-js' ),
119
+ time(),
120
+ true
121
+ );
122
+
123
+ if ($this->parent->args['dev_mode']) {
124
+ wp_enqueue_style( 'redux-color-picker-css' );
125
+
126
+ wp_enqueue_style(
127
+ 'redux-field-link_color-js',
128
+ ReduxFramework::$_url . 'inc/fields/link_color/field_link_color.css',
129
+ array(),
130
+ time(),
131
+ 'all'
132
+ );
133
+ }
134
+ }
135
+
136
+ public function output() {
137
+
138
+ $style = array();
139
+
140
+ if ( ! empty( $this->value['regular'] ) && $this->field['regular'] === true && $this->field['default']['regular'] !== false ) {
141
+ $style[] = 'color:' . $this->value['regular'] . ';';
142
+ }
143
+
144
+ if ( ! empty( $this->value['visited'] ) && $this->field['visited'] === true && $this->field['default']['visited'] !== false ) {
145
+ $style['visited'] = 'color:' . $this->value['visited'] . ';';
146
+ }
147
+
148
+ if ( ! empty( $this->value['hover'] ) && $this->field['hover'] === true && $this->field['default']['hover'] !== false ) {
149
+ $style['hover'] = 'color:' . $this->value['hover'] . ';';
150
+ }
151
+
152
+ if ( ! empty( $this->value['active'] ) && $this->field['active'] === true && $this->field['default']['active'] !== false ) {
153
+ $style['active'] = 'color:' . $this->value['active'] . ';';
154
+ }
155
+
156
+ if ( ! empty( $style ) ) {
157
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
158
+ $styleString = "";
159
+
160
+ foreach ( $style as $key => $value ) {
161
+ if ( is_numeric( $key ) ) {
162
+ $styleString .= implode( ",", $this->field['output'] ) . "{" . $value . '}';
163
+ } else {
164
+ if ( count( $this->field['output'] ) == 1 ) {
165
+ foreach($this->field['output'] as $sel => $elem) {
166
+ continue;
167
+ }
168
+
169
+ if (strpos($elem, ',') != false) {
170
+ $selector_arr = explode(',',$elem);
171
+ $sel_list = '';
172
+
173
+ foreach($selector_arr as $idx => $selector) {
174
+ $sel_list .= $selector . ":" . $key . ",";
175
+ }
176
+
177
+ $sel_list = rtrim($sel_list,',');
178
+ $styleString .= $sel_list . "{" . $value . '}';
179
+ } else {
180
+ $styleString .= $elem . ":" . $key . "{" . $value . '}';
181
+ }
182
+ } else {
183
+ $blah = '';
184
+ foreach($this->field['output'] as $k => $sel) {
185
+ $blah .= $sel . ':' . $key . ',';
186
+ }
187
+
188
+ $blah = substr($blah, 0, strlen($blah) - 1);
189
+ $styleString .= $blah . '{' . $value . '}';
190
+
191
+ }
192
+ }
193
+ }
194
+
195
+ $this->parent->outputCSS .= $styleString;
196
+ }
197
+
198
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
199
+ $styleString = "";
200
+
201
+ foreach ( $style as $key => $value ) {
202
+ if ( is_numeric( $key ) ) {
203
+ $styleString .= implode( ",", $this->field['compiler'] ) . "{" . $value . '}';
204
+
205
+ } else {
206
+ if ( count( $this->field['compiler'] ) == 1 ) {
207
+ $styleString .= $this->field['compiler'][0] . ":" . $key . "{" . $value . '}';
208
+ } else {
209
+ $blah = '';
210
+ foreach($this->field['compiler'] as $k => $sel) {
211
+ $blah .= $sel . ':' . $key . ',';
212
+ }
213
+
214
+ $blah = substr($blah, 0, strlen($blah) - 1);
215
+ $styleString .= $blah . '{' . $value . '}';
216
+ }
217
+ }
218
+ }
219
+ $this->parent->compilerCSS .= $styleString;
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
includes/options/redux-core/inc/fields/link_color/field_link_color.scss ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .redux-container-link_color {
2
+ .linkColor {
3
+ display: inline-block;
4
+ padding-right: 10px;
5
+ padding-bottom: 7px;
6
+ }
7
+ }
includes/options/{redux-framework → redux-core}/inc/fields/media/field_media.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/media/field_media.less RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/media/field_media.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/media/field_media.scss RENAMED
File without changes
includes/options/redux-core/inc/fields/multi_text/field_multi_text.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-multi_text ul.redux-multi-text{margin:0;padding:0}.redux-container-multi_text .redux-multi-text-add{clear:both;margin:5px 0}.redux-container-multi_text a.redux-multi-text-remove.deletion{color:#F00;padding:2px 4px;margin-left:5px}.redux-container-multi_text a.redux-multi-text-remove.deletion:hover{background:red;color:#fff;text-decoration:none}@media screen and (max-width: 782px){.redux-container-multi_text input{clear:both}.redux-container-multi_text .redux-multi-text-remove{margin:0;float:right}}.wp-customizer .redux-container-multi_text .button{float:right}.wp-customizer .redux-container-multi_text .redux-multi-text-remove{float:right;margin-bottom:5px}.wp-customizer .redux-container-multi_text ul.redux-multi-text input{width:100% !important}
includes/options/redux-core/inc/fields/multi_text/field_multi_text.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.multi_text = redux.field_objects.multi_text || {};
8
+
9
+ $( document ).ready(
10
+ function() {
11
+ //redux.field_objects.multi_text.init();
12
+ }
13
+ );
14
+
15
+ redux.field_objects.multi_text.init = function( selector ) {
16
+
17
+ if ( !selector ) {
18
+ selector = $( document ).find( '.redux-container-multi_text:visible' );
19
+ }
20
+
21
+ $( selector ).each(
22
+ function() {
23
+ var el = $( this );
24
+ var parent = el;
25
+ if ( !el.hasClass( 'redux-field-container' ) ) {
26
+ parent = el.parents( '.redux-field-container:first' );
27
+ }
28
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
29
+ return;
30
+ }
31
+ if ( parent.hasClass( 'redux-field-init' ) ) {
32
+ parent.removeClass( 'redux-field-init' );
33
+ } else {
34
+ return;
35
+ }
36
+ el.find( '.redux-multi-text-remove' ).live(
37
+ 'click', function() {
38
+ redux_change( $( this ) );
39
+ $( this ).prev( 'input[type="text"]' ).val( '' );
40
+ $( this ).parent().slideUp(
41
+ 'medium', function() {
42
+ $( this ).remove();
43
+ }
44
+ );
45
+ }
46
+ );
47
+
48
+ el.find( '.redux-multi-text-add' ).click(
49
+ function() {
50
+ var number = parseInt( $( this ).attr( 'data-add_number' ) );
51
+ var id = $( this ).attr( 'data-id' );
52
+ var name = $( this ).attr( 'data-name' );
53
+ for ( var i = 0; i < number; i++ ) {
54
+ var new_input = $( '#' + id + ' li:last-child' ).clone();
55
+ el.find( '#' + id ).append( new_input );
56
+ el.find( '#' + id + ' li:last-child' ).removeAttr( 'style' );
57
+ el.find( '#' + id + ' li:last-child input[type="text"]' ).val( '' );
58
+ el.find( '#' + id + ' li:last-child input[type="text"]' ).attr( 'name', name );
59
+ }
60
+ }
61
+ );
62
+ }
63
+ );
64
+ };
65
+ })( jQuery );
includes/options/redux-core/inc/fields/multi_text/field_multi_text.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.multi_text=redux.field_objects.multi_text||{},a(document).ready(function(){}),redux.field_objects.multi_text.init=function(b){b||(b=a(document).find(".redux-container-multi_text:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".redux-multi-text-remove").live("click",function(){redux_change(a(this)),a(this).prev('input[type="text"]').val(""),a(this).parent().slideUp("medium",function(){a(this).remove()})}),b.find(".redux-multi-text-add").click(function(){for(var c=parseInt(a(this).attr("data-add_number")),d=a(this).attr("data-id"),e=a(this).attr("data-name"),f=0;c>f;f++){var g=a("#"+d+" li:last-child").clone();b.find("#"+d).append(g),b.find("#"+d+" li:last-child").removeAttr("style"),b.find("#"+d+' li:last-child input[type="text"]').val(""),b.find("#"+d+' li:last-child input[type="text"]').attr("name",e)}}))})}}(jQuery);
includes/options/redux-core/inc/fields/multi_text/field_multi_text.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Multi_Text
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @version 3.0.0
20
+ */
21
+
22
+ // Exit if accessed directly
23
+ if ( ! defined( 'ABSPATH' ) ) {
24
+ exit;
25
+ }
26
+
27
+ // Don't duplicate me!
28
+ if ( ! class_exists( 'ReduxFramework_multi_text' ) ) {
29
+
30
+ /**
31
+ * Main ReduxFramework_multi_text class
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ class ReduxFramework_multi_text {
36
+
37
+ /**
38
+ * Field Constructor.
39
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
40
+ *
41
+ * @since 1.0.0
42
+ * @access public
43
+ * @return void
44
+ */
45
+ function __construct( $field = array(), $value = '', $parent ) {
46
+ $this->parent = $parent;
47
+ $this->field = $field;
48
+ $this->value = $value;
49
+ }
50
+
51
+ /**
52
+ * Field Render Function.
53
+ * Takes the vars and outputs the HTML for the field in the settings
54
+ *
55
+ * @since 1.0.0
56
+ * @access public
57
+ * @return void
58
+ */
59
+ public function render() {
60
+
61
+ $this->add_text = ( isset( $this->field['add_text'] ) ) ? $this->field['add_text'] : __( 'Add More', 'redux-framework' );
62
+ $this->show_empty = ( isset( $this->field['show_empty'] ) ) ? $this->field['show_empty'] : true;
63
+
64
+ echo '<ul id="' . $this->field['id'] . '-ul" class="redux-multi-text">';
65
+
66
+ if ( isset( $this->value ) && is_array( $this->value ) ) {
67
+ foreach ( $this->value as $k => $value ) {
68
+ if ( $value != '' ) {
69
+ echo '<li><input type="text" id="' . $this->field['id'] . '-' . $k . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[]' . '" value="' . esc_attr( $value ) . '" class="regular-text ' . $this->field['class'] . '" /> <a href="javascript:void(0);" class="deletion redux-multi-text-remove">' . __( 'Remove', 'redux-framework' ) . '</a></li>';
70
+ }
71
+ }
72
+ } elseif ( $this->show_empty == true ) {
73
+ echo '<li><input type="text" id="' . $this->field['id'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[]' . '" value="" class="regular-text ' . $this->field['class'] . '" /> <a href="javascript:void(0);" class="deletion redux-multi-text-remove">' . __( 'Remove', 'redux-framework' ) . '</a></li>';
74
+ }
75
+
76
+ echo '<li style="display:none;"><input type="text" id="' . $this->field['id'] . '" name="" value="" class="regular-text" /> <a href="javascript:void(0);" class="deletion redux-multi-text-remove">' . __( 'Remove', 'redux-framework' ) . '</a></li>';
77
+
78
+ echo '</ul>';
79
+ echo '<span style="clear:both;display:block;height:0;" /></span>';
80
+ $this->field['add_number'] = ( isset( $this->field['add_number'] ) && is_numeric( $this->field['add_number'] ) ) ? $this->field['add_number'] : 1;
81
+ echo '<a href="javascript:void(0);" class="button button-primary redux-multi-text-add" data-add_number="' . $this->field['add_number'] . '" data-id="' . $this->field['id'] . '-ul" data-name="' . $this->field['name'] . $this->field['name_suffix'] . '[]">' . $this->add_text . '</a><br/>';
82
+ }
83
+
84
+ /**
85
+ * Enqueue Function.
86
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
87
+ *
88
+ * @since 1.0.0
89
+ * @access public
90
+ * @return void
91
+ */
92
+ public function enqueue() {
93
+
94
+ wp_enqueue_script(
95
+ 'redux-field-multi-text-js',
96
+ ReduxFramework::$_url . 'inc/fields/multi_text/field_multi_text' . Redux_Functions::isMin() . '.js',
97
+ array( 'jquery', 'redux-js' ),
98
+ time(),
99
+ true
100
+ );
101
+
102
+ if ($this->parent->args['dev_mode']) {
103
+ wp_enqueue_style(
104
+ 'redux-field-multi-text-css',
105
+ ReduxFramework::$_url . 'inc/fields/multi_text/field_multi_text.css',
106
+ array(),
107
+ time(),
108
+ 'all'
109
+ );
110
+ }
111
+ }
112
+ }
113
+ }
includes/options/redux-core/inc/fields/multi_text/field_multi_text.scss ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-multi_text {
2
+ ul.redux-multi-text {
3
+ margin: 0;
4
+ padding: 0;
5
+ }
6
+
7
+ .redux-multi-text-add {
8
+ clear: both;
9
+ margin: 5px 0;
10
+ }
11
+
12
+ a.redux-multi-text-remove {
13
+ &.deletion {
14
+ color: #F00;
15
+ padding: 2px 4px;
16
+ margin-left: 5px;
17
+
18
+ &:hover {
19
+ background: red;
20
+ color: #fff;
21
+ text-decoration: none;
22
+ }
23
+ }
24
+ }
25
+ }
26
+
27
+ @media screen and (max-width: 782px) {
28
+ .redux-container-multi_text {
29
+ input {
30
+ clear: both;
31
+ }
32
+
33
+ .redux-multi-text-remove {
34
+ margin: 0;
35
+ float: right;
36
+ }
37
+ }
38
+ }
39
+
40
+ .wp-customizer {
41
+ .redux-container-multi_text {
42
+ .button {
43
+ float: right;
44
+ }
45
+ .redux-multi-text-remove {
46
+ float: right;
47
+ margin-bottom: 5px;
48
+ }
49
+ ul.redux-multi-text input {
50
+ width: 100% !important;
51
+ }
52
+ }
53
+ }
includes/options/redux-core/inc/fields/palette/field_palette.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-palette label{border:3px solid transparent;border-color:transparent !important;border-radius:0;width:100% !important;display:block}.redux-container-palette label.ui-button.ui-widget{width:95%;background:none;padding:0}.redux-container-palette label.ui-button.ui-widget .ui-button-text{display:flex}.redux-container-palette label.ui-button.ui-widget .ui-button-text span{padding:10px;flex-grow:1;font-size:0;line-height:10px;color:transparent;-webkit-transition:all 200ms ease-in-out;-moz-transition:all 200ms ease-in-out;-ms-transition:all 200ms ease-in-out;-o-transition:all 200ms ease-in-out;transition:all 200ms ease-in-out;text-shadow:0}.redux-container-palette label.ui-button.ui-widget .ui-button-text span:hover{flex-grow:3;font-weight:bold;min-width:60px;font-size:12px;line-height:10px;color:#333;text-shadow:0 0 8px #fff, 0 0 8px #fff}.redux-container-palette label.ui-state-active{border:3px solid #333 !important}.wp-customizer .redux-main .redux-container-palette label{margin-bottom:3px}
includes/options/redux-core/inc/fields/palette/field_palette.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Field Palette (color)
3
+ */
4
+
5
+ /*global jQuery, document, redux_change, redux*/
6
+
7
+ (function( $ ) {
8
+ 'use strict';
9
+
10
+ redux.field_objects = redux.field_objects || {};
11
+ redux.field_objects.palette = redux.field_objects.palette || {};
12
+
13
+ redux.field_objects.palette.init = function( selector ) {
14
+
15
+ if ( !selector ) {
16
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-palette:visible' );
17
+ }
18
+
19
+ $( selector ).each(
20
+ function() {
21
+
22
+ var el = $( this );
23
+ var parent = el;
24
+
25
+ if ( !el.hasClass( 'redux-field-container' ) ) {
26
+ parent = el.parents( '.redux-field-container:first' );
27
+ }
28
+
29
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
30
+ return;
31
+ }
32
+
33
+ if ( parent.hasClass( 'redux-field-init' ) ) {
34
+ parent.removeClass( 'redux-field-init' );
35
+ } else {
36
+ return;
37
+ }
38
+
39
+ el.find( '.buttonset' ).each(
40
+ function() {
41
+ $( this ).buttonset();
42
+ }
43
+ );
44
+
45
+ // el.find('.redux-palette-set').click(
46
+ // function(){
47
+ // console.log($(this).val());
48
+ // }
49
+ // )
50
+ }
51
+ );
52
+ };
53
+ })( jQuery );
includes/options/redux-core/inc/fields/palette/field_palette.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.palette=redux.field_objects.palette||{},redux.field_objects.palette.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-palette:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".buttonset").each(function(){a(this).buttonset()}))})}}(jQuery);
includes/options/redux-core/inc/fields/palette/field_palette.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Palette
17
+ * @author Kevin Provance (kprovance)
18
+ * @version 3.5.4
19
+ */
20
+
21
+ // Exit if accessed directly
22
+ if ( ! defined( 'ABSPATH' ) ) {
23
+ exit;
24
+ }
25
+
26
+ if ( ! class_exists( 'ReduxFramework_palette' ) ) {
27
+ class ReduxFramework_palette {
28
+
29
+ /**
30
+ * Field Constructor.
31
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
32
+ *
33
+ * @since 1.0.0
34
+ * @access public
35
+ * @return void
36
+ */
37
+ function __construct( $field = array(), $value = '', $parent ) {
38
+ $this->parent = $parent;
39
+ $this->field = $field;
40
+ $this->value = $value;
41
+ }
42
+
43
+ /**
44
+ * Field Render Function.
45
+ * Takes the vars and outputs the HTML for the field in the settingss
46
+ *
47
+ * @since 1.0.0
48
+ * @access public
49
+ * @return void
50
+ */
51
+ public function render() {
52
+ if (empty($this->field['palettes'])) {
53
+ echo 'No palettes have been set.';
54
+ return;
55
+ }
56
+
57
+ echo '<div id="' . $this->field['id'] . '" class="buttonset">';
58
+
59
+ foreach ( $this->field['palettes'] as $value => $colorSet ) {
60
+ $checked = checked( $this->value , $value, false );
61
+ echo '<input type="radio" value="' . $value . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '" class="redux-palette-set ' . $this->field['class'] . '" id="' . $this->field['id'] . '-' . $value . '"' . $checked . '>';
62
+ echo '<label for="' . $this->field['id'] . '-' . $value . '">';
63
+
64
+ foreach ( $colorSet as $color ) {
65
+ printf( "<span style='background: {$color}'>{$color}</span>" );
66
+ }
67
+
68
+ echo '</label>';
69
+ echo '</input>';
70
+ }
71
+
72
+ echo '</div>';
73
+ }
74
+
75
+ /**
76
+ * Enqueue Function.
77
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
78
+ *
79
+ * @since 1.0.0
80
+ * @access public
81
+ * @return void
82
+ */
83
+ public function enqueue() {
84
+ $min = Redux_Functions::isMin();
85
+
86
+ wp_enqueue_script(
87
+ 'redux-field-palette-js',
88
+ ReduxFramework::$_url . 'inc/fields/palette/field_palette' . $min . '.js',
89
+ array( 'jquery', 'redux-js', 'jquery-ui-button', 'jquery-ui-core' ),
90
+ time(),
91
+ true
92
+ );
93
+
94
+ if ($this->parent->args['dev_mode']) {
95
+ wp_enqueue_style(
96
+ 'redux-field-palette-css',
97
+ ReduxFramework::$_url . 'inc/fields/palette/field_palette.css',
98
+ array(),
99
+ time(),
100
+ 'all'
101
+ );
102
+ }
103
+ }
104
+
105
+
106
+ public function output() {
107
+
108
+ }
109
+ }
110
+ }
includes/options/redux-core/inc/fields/palette/field_palette.scss ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-palette {
2
+ label {
3
+ border: 3px solid transparent;
4
+ border-color: transparent !important;
5
+ border-radius: 0;
6
+ //border: 0;
7
+ width: 100% !important;
8
+ display: block;
9
+ &.ui-button.ui-widget {
10
+ width: 95%;
11
+ background: none;
12
+ padding: 0;
13
+
14
+ .ui-button-text {
15
+ /* border-top: 3px solid transparent;
16
+ border-bottom: 3px solid transparent;
17
+ margin-bottom: 5px;*/
18
+ display: flex;
19
+
20
+ span {
21
+ padding: 10px;
22
+ flex-grow: 1;
23
+ font-size: 0;
24
+ line-height: 10px;
25
+ color: rgba(0,0,0,0);
26
+ -webkit-transition: all 200ms ease-in-out;
27
+ -moz-transition: all 200ms ease-in-out;
28
+ -ms-transition: all 200ms ease-in-out;
29
+ -o-transition: all 200ms ease-in-out;
30
+ transition: all 200ms ease-in-out;
31
+ text-shadow: 0;
32
+ &:hover {
33
+ flex-grow: 3;
34
+ font-weight: bold;
35
+ min-width: 60px;
36
+ font-size: 12px;
37
+ line-height: 10px;
38
+ color: #333;
39
+ text-shadow: 0 0 8px #fff, 0 0 8px #fff;
40
+ }
41
+ }
42
+ }
43
+ }
44
+
45
+ &.ui-state-active {
46
+ border: 3px solid #333 !important;
47
+ }
48
+ }
49
+ }
50
+
51
+ .wp-customizer {
52
+ .redux-main .redux-container-palette label {
53
+ margin-bottom: 3px;
54
+ }
55
+ }
includes/options/redux-core/inc/fields/password/field_password.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class ReduxFramework_password
5
+ */
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ if ( ! class_exists( 'ReduxFramework_password' ) ) {
13
+ class ReduxFramework_password {
14
+
15
+ /**
16
+ * Field Constructor.
17
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
18
+ *
19
+ * @since ReduxFramework 1.0.1
20
+ */
21
+ function __construct( $field = array(), $value = '', $parent ) {
22
+ $this->parent = $parent;
23
+ $this->field = $field;
24
+ $this->value = $value;
25
+ }
26
+
27
+ /**
28
+ * Field Render Function.
29
+ * Takes the vars and outputs the HTML for the field in the settings
30
+ *
31
+ * @since ReduxFramework 1.0.1
32
+ */
33
+ function render() {
34
+ if ( ! empty( $this->field['username'] ) && $this->field['username'] === true ) {
35
+ $this->_render_combined_field();
36
+ } else {
37
+ $this->_render_single_field();
38
+ }
39
+ }
40
+
41
+ /**
42
+ * This will render a combined User/Password field
43
+ *
44
+ * @since ReduxFramework 3.0.9
45
+ * @example
46
+ * <code>
47
+ * array(
48
+ * 'id' => 'smtp_account',
49
+ * 'type' => 'password',
50
+ * 'username' => true,
51
+ * 'title' => 'SMTP Account',
52
+ * 'placeholder' => array('username' => 'Username')
53
+ * )
54
+ * </code>
55
+ */
56
+ private function _render_combined_field() {
57
+
58
+ $defaults = array(
59
+ 'username' => '',
60
+ 'password' => '',
61
+ 'placeholder' => array(
62
+ 'password' => __( 'Password', 'redux-framework' ),
63
+ 'username' => __( 'Username', 'redux-framework' )
64
+ )
65
+ );
66
+
67
+ $this->value = wp_parse_args( $this->value, $defaults );
68
+
69
+ if ( ! empty( $this->field['placeholder'] ) ) {
70
+ if ( is_array( $this->field['placeholder'] ) ) {
71
+ if ( ! empty( $this->field['placeholder']['password'] ) ) {
72
+ $this->value['placeholder']['password'] = $this->field['placeholder']['password'];
73
+ }
74
+ if ( ! empty( $this->field['placeholder']['username'] ) ) {
75
+ $this->value['placeholder']['username'] = $this->field['placeholder']['username'];
76
+ }
77
+ } else {
78
+ $this->value['placeholder']['password'] = $this->field['placeholder'];
79
+ }
80
+ }
81
+
82
+ // Username field
83
+ echo '<input type="text" autocomplete="off" placeholder="' . $this->value['placeholder']['username'] . '" id="' . $this->field['id'] . '[username]" name="' . $this->field['name'] . $this->field['name_suffix'] . '[username]' . '" value="' . esc_attr( $this->value['username'] ) . '" class="' . $this->field['class'] . '" />&nbsp;';
84
+
85
+ // Password field
86
+ echo '<input type="password" autocomplete="off" placeholder="' . $this->value['placeholder']['password'] . '" id="' . $this->field['id'] . '[password]" name="' . $this->field['name'] . $this->field['name_suffix'] . '[password]' . '" value="' . esc_attr( $this->value['password'] ) . '" class="' . $this->field['class'] . '" />';
87
+ }
88
+
89
+ /**
90
+ * This will render a single Password field
91
+ *
92
+ * @since ReduxFramework 3.0.9
93
+ * @example
94
+ * <code>
95
+ * array(
96
+ * 'id' => 'smtp_password',
97
+ * 'type' => 'password',
98
+ * 'title' => 'SMTP Password'
99
+ * )
100
+ * </code>
101
+ */
102
+ private function _render_single_field() {
103
+ echo '<input type="password" id="' . $this->field['id'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '" value="' . esc_attr( $this->value ) . '" class="' . $this->field['class'] . '" />';
104
+ }
105
+ }
106
+ }
includes/options/redux-core/inc/fields/radio/field_radio.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ if ( ! class_exists( 'ReduxFramework_radio' ) ) {
9
+ class ReduxFramework_radio {
10
+
11
+ /**
12
+ * Field Constructor.
13
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
14
+ *
15
+ * @since ReduxFramework 1.0.0
16
+ */
17
+ function __construct( $field = array(), $value = '', $parent ) {
18
+ $this->parent = $parent;
19
+ $this->field = $field;
20
+ $this->value = $value;
21
+ }
22
+
23
+ /**
24
+ * Field Render Function.
25
+ * Takes the vars and outputs the HTML for the field in the settings
26
+ *
27
+ * @since ReduxFramework 1.0.0
28
+ */
29
+ function render() {
30
+
31
+ if ( ! empty( $this->field['data'] ) && empty( $this->field['options'] ) ) {
32
+ if ( empty( $this->field['args'] ) ) {
33
+ $this->field['args'] = array();
34
+ }
35
+ $this->field['options'] = $this->parent->get_wordpress_data( $this->field['data'], $this->field['args'] );
36
+ }
37
+
38
+ $this->field['data_class'] = ( isset( $this->field['multi_layout'] ) ) ? 'data-' . $this->field['multi_layout'] : 'data-full';
39
+
40
+ if ( ! empty( $this->field['options'] ) ) {
41
+ echo '<ul class="' . $this->field['data_class'] . '">';
42
+
43
+ foreach ( $this->field['options'] as $k => $v ) {
44
+ echo '<li>';
45
+ echo '<label for="' . $this->field['id'] . '_' . array_search( $k, array_keys( $this->field['options'] ) ) . '">';
46
+ echo '<input type="radio" class="radio ' . $this->field['class'] . '" id="' . $this->field['id'] . '_' . array_search( $k, array_keys( $this->field['options'] ) ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '" value="' . $k . '" ' . checked( $this->value, $k, false ) . '/>';
47
+ echo ' <span>' . $v . '</span>';
48
+ echo '</label>';
49
+ echo '</li>';
50
+ }
51
+ //foreach
52
+
53
+ echo '</ul>';
54
+ }
55
+ } //function
56
+ } //class
57
+ }
includes/options/redux-core/inc/fields/raw/field_raw.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ if ( ! class_exists( 'ReduxFramework_raw' ) ) {
9
+ class ReduxFramework_raw {
10
+
11
+ /**
12
+ * Field Constructor.
13
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
14
+ *
15
+ * @since ReduxFramework 3.0.4
16
+ */
17
+ function __construct( $field = array(), $value = '', $parent ) {
18
+ $this->parent = $parent;
19
+ $this->field = $field;
20
+ $this->value = $value;
21
+ }
22
+
23
+ /**
24
+ * Field Render Function.
25
+ * Takes the vars and outputs the HTML for the field in the settings
26
+ *
27
+ * @since ReduxFramework 1.0.0
28
+ */
29
+ function render() {
30
+
31
+ if ( ! empty( $this->field['include'] ) && file_exists( $this->field['include'] ) ) {
32
+ require_once $this->field['include'];
33
+ }
34
+
35
+ if ( isset( $this->field['content_path'] ) && ! empty( $this->field['content_path'] ) && file_exists( $this->field['content_path'] ) ) {
36
+ $this->field['content'] = $this->parent->filesystem->execute( 'get_contents', $this->field['content_path'] );
37
+ }
38
+
39
+ if ( ! empty( $this->field['content'] ) && isset( $this->field['content'] ) ) {
40
+ if ( isset( $this->field['markdown'] ) && $this->field['markdown'] == true && ! empty( $this->field['content'] ) ) {
41
+ require_once dirname( __FILE__ ) . "/parsedown.php";
42
+ $Parsedown = new Parsedown();
43
+ echo $Parsedown->text( $this->field['content'] );
44
+ } else {
45
+ echo $this->field['content'];
46
+ }
47
+ }
48
+
49
+ do_action( 'redux-field-raw-' . $this->parent->args['opt_name'] . '-' . $this->field['id'] );
50
+
51
+ }
52
+ }
53
+ }
includes/options/redux-core/inc/fields/raw/parsedown.php ADDED
@@ -0,0 +1,1542 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ #
4
+ #
5
+ # Parsedown
6
+ # http://parsedown.org
7
+ #
8
+ # (c) Emanuil Rusev
9
+ # http://erusev.com
10
+ #
11
+ # For the full license information, view the LICENSE file that was distributed
12
+ # with this source code.
13
+ #
14
+ #
15
+
16
+ class Parsedown
17
+ {
18
+ # ~
19
+
20
+ const version = '1.6.0';
21
+
22
+ # ~
23
+
24
+ function text($text)
25
+ {
26
+ # make sure no definitions are set
27
+ $this->DefinitionData = array();
28
+
29
+ # standardize line breaks
30
+ $text = str_replace(array("\r\n", "\r"), "\n", $text);
31
+
32
+ # remove surrounding line breaks
33
+ $text = trim($text, "\n");
34
+
35
+ # split text into lines
36
+ $lines = explode("\n", $text);
37
+
38
+ # iterate through lines to identify blocks
39
+ $markup = $this->lines($lines);
40
+
41
+ # trim line breaks
42
+ $markup = trim($markup, "\n");
43
+
44
+ return $markup;
45
+ }
46
+
47
+ #
48
+ # Setters
49
+ #
50
+
51
+ function setBreaksEnabled($breaksEnabled)
52
+ {
53
+ $this->breaksEnabled = $breaksEnabled;
54
+
55
+ return $this;
56
+ }
57
+
58
+ protected $breaksEnabled;
59
+
60
+ function setMarkupEscaped($markupEscaped)
61
+ {
62
+ $this->markupEscaped = $markupEscaped;
63
+
64
+ return $this;
65
+ }
66
+
67
+ protected $markupEscaped;
68
+
69
+ function setUrlsLinked($urlsLinked)
70
+ {
71
+ $this->urlsLinked = $urlsLinked;
72
+
73
+ return $this;
74
+ }
75
+
76
+ protected $urlsLinked = true;
77
+
78
+ #
79
+ # Lines
80
+ #
81
+
82
+ protected $BlockTypes = array(
83
+ '#' => array('Header'),
84
+ '*' => array('Rule', 'List'),
85
+ '+' => array('List'),
86
+ '-' => array('SetextHeader', 'Table', 'Rule', 'List'),
87
+ '0' => array('List'),
88
+ '1' => array('List'),
89
+ '2' => array('List'),
90
+ '3' => array('List'),
91
+ '4' => array('List'),
92
+ '5' => array('List'),
93
+ '6' => array('List'),
94
+ '7' => array('List'),
95
+ '8' => array('List'),
96
+ '9' => array('List'),
97
+ ':' => array('Table'),
98
+ '<' => array('Comment', 'Markup'),
99
+ '=' => array('SetextHeader'),
100
+ '>' => array('Quote'),
101
+ '[' => array('Reference'),
102
+ '_' => array('Rule'),
103
+ '`' => array('FencedCode'),
104
+ '|' => array('Table'),
105
+ '~' => array('FencedCode'),
106
+ );
107
+
108
+ # ~
109
+
110
+ protected $unmarkedBlockTypes = array(
111
+ 'Code',
112
+ );
113
+
114
+ #
115
+ # Blocks
116
+ #
117
+
118
+ protected function lines(array $lines)
119
+ {
120
+ $CurrentBlock = null;
121
+
122
+ foreach ($lines as $line)
123
+ {
124
+ if (chop($line) === '')
125
+ {
126
+ if (isset($CurrentBlock))
127
+ {
128
+ $CurrentBlock['interrupted'] = true;
129
+ }
130
+
131
+ continue;
132
+ }
133
+
134
+ if (strpos($line, "\t") !== false)
135
+ {
136
+ $parts = explode("\t", $line);
137
+
138
+ $line = $parts[0];
139
+
140
+ unset($parts[0]);
141
+
142
+ foreach ($parts as $part)
143
+ {
144
+ $shortage = 4 - mb_strlen($line, 'utf-8') % 4;
145
+
146
+ $line .= str_repeat(' ', $shortage);
147
+ $line .= $part;
148
+ }
149
+ }
150
+
151
+ $indent = 0;
152
+
153
+ while (isset($line[$indent]) and $line[$indent] === ' ')
154
+ {
155
+ $indent ++;
156
+ }
157
+
158
+ $text = $indent > 0 ? substr($line, $indent) : $line;
159
+
160
+ # ~
161
+
162
+ $Line = array('body' => $line, 'indent' => $indent, 'text' => $text);
163
+
164
+ # ~
165
+
166
+ if (isset($CurrentBlock['continuable']))
167
+ {
168
+ $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock);
169
+
170
+ if (isset($Block))
171
+ {
172
+ $CurrentBlock = $Block;
173
+
174
+ continue;
175
+ }
176
+ else
177
+ {
178
+ if ($this->isBlockCompletable($CurrentBlock['type']))
179
+ {
180
+ $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock);
181
+ }
182
+ }
183
+ }
184
+
185
+ # ~
186
+
187
+ $marker = $text[0];
188
+
189
+ # ~
190
+
191
+ $blockTypes = $this->unmarkedBlockTypes;
192
+
193
+ if (isset($this->BlockTypes[$marker]))
194
+ {
195
+ foreach ($this->BlockTypes[$marker] as $blockType)
196
+ {
197
+ $blockTypes []= $blockType;
198
+ }
199
+ }
200
+
201
+ #
202
+ # ~
203
+
204
+ foreach ($blockTypes as $blockType)
205
+ {
206
+ $Block = $this->{'block'.$blockType}($Line, $CurrentBlock);
207
+
208
+ if (isset($Block))
209
+ {
210
+ $Block['type'] = $blockType;
211
+
212
+ if ( ! isset($Block['identified']))
213
+ {
214
+ $Blocks []= $CurrentBlock;
215
+
216
+ $Block['identified'] = true;
217
+ }
218
+
219
+ if ($this->isBlockContinuable($blockType))
220
+ {
221
+ $Block['continuable'] = true;
222
+ }
223
+
224
+ $CurrentBlock = $Block;
225
+
226
+ continue 2;
227
+ }
228
+ }
229
+
230
+ # ~
231
+
232
+ if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted']))
233
+ {
234
+ $CurrentBlock['element']['text'] .= "\n".$text;
235
+ }
236
+ else
237
+ {
238
+ $Blocks []= $CurrentBlock;
239
+
240
+ $CurrentBlock = $this->paragraph($Line);
241
+
242
+ $CurrentBlock['identified'] = true;
243
+ }
244
+ }
245
+
246
+ # ~
247
+
248
+ if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type']))
249
+ {
250
+ $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock);
251
+ }
252
+
253
+ # ~
254
+
255
+ $Blocks []= $CurrentBlock;
256
+
257
+ unset($Blocks[0]);
258
+
259
+ # ~
260
+
261
+ $markup = '';
262
+
263
+ foreach ($Blocks as $Block)
264
+ {
265
+ if (isset($Block['hidden']))
266
+ {
267
+ continue;
268
+ }
269
+
270
+ $markup .= "\n";
271
+ $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']);
272
+ }
273
+
274
+ $markup .= "\n";
275
+
276
+ # ~
277
+
278
+ return $markup;
279
+ }
280
+
281
+ #
282
+ # Allow for plugin extensibility
283
+ #
284
+ protected function isBlockContinuable($Type)
285
+ {
286
+ return method_exists($this, 'block'.$Type.'Continue');
287
+ }
288
+
289
+ protected function isBlockCompletable($Type)
290
+ {
291
+ return method_exists($this, 'block'.$Type.'Complete');
292
+ }
293
+
294
+ #
295
+ # Code
296
+
297
+ protected function blockCode($Line, $Block = null)
298
+ {
299
+ if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted']))
300
+ {
301
+ return;
302
+ }
303
+
304
+ if ($Line['indent'] >= 4)
305
+ {
306
+ $text = substr($Line['body'], 4);
307
+
308
+ $Block = array(
309
+ 'element' => array(
310
+ 'name' => 'pre',
311
+ 'handler' => 'element',
312
+ 'text' => array(
313
+ 'name' => 'code',
314
+ 'text' => $text,
315
+ ),
316
+ ),
317
+ );
318
+
319
+ return $Block;
320
+ }
321
+ }
322
+
323
+ protected function blockCodeContinue($Line, $Block)
324
+ {
325
+ if ($Line['indent'] >= 4)
326
+ {
327
+ if (isset($Block['interrupted']))
328
+ {
329
+ $Block['element']['text']['text'] .= "\n";
330
+
331
+ unset($Block['interrupted']);
332
+ }
333
+
334
+ $Block['element']['text']['text'] .= "\n";
335
+
336
+ $text = substr($Line['body'], 4);
337
+
338
+ $Block['element']['text']['text'] .= $text;
339
+
340
+ return $Block;
341
+ }
342
+ }
343
+
344
+ protected function blockCodeComplete($Block)
345
+ {
346
+ $text = $Block['element']['text']['text'];
347
+
348
+ $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
349
+
350
+ $Block['element']['text']['text'] = $text;
351
+
352
+ return $Block;
353
+ }
354
+
355
+ #
356
+ # Comment
357
+
358
+ protected function blockComment($Line)
359
+ {
360
+ if ($this->markupEscaped)
361
+ {
362
+ return;
363
+ }
364
+
365
+ if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!')
366
+ {
367
+ $Block = array(
368
+ 'markup' => $Line['body'],
369
+ );
370
+
371
+ if (preg_match('/-->$/', $Line['text']))
372
+ {
373
+ $Block['closed'] = true;
374
+ }
375
+
376
+ return $Block;
377
+ }
378
+ }
379
+
380
+ protected function blockCommentContinue($Line, array $Block)
381
+ {
382
+ if (isset($Block['closed']))
383
+ {
384
+ return;
385
+ }
386
+
387
+ $Block['markup'] .= "\n" . $Line['body'];
388
+
389
+ if (preg_match('/-->$/', $Line['text']))
390
+ {
391
+ $Block['closed'] = true;
392
+ }
393
+
394
+ return $Block;
395
+ }
396
+
397
+ #
398
+ # Fenced Code
399
+
400
+ protected function blockFencedCode($Line)
401
+ {
402
+ if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches))
403
+ {
404
+ $Element = array(
405
+ 'name' => 'code',
406
+ 'text' => '',
407
+ );
408
+
409
+ if (isset($matches[1]))
410
+ {
411
+ $class = 'language-'.$matches[1];
412
+
413
+ $Element['attributes'] = array(
414
+ 'class' => $class,
415
+ );
416
+ }
417
+
418
+ $Block = array(
419
+ 'char' => $Line['text'][0],
420
+ 'element' => array(
421
+ 'name' => 'pre',
422
+ 'handler' => 'element',
423
+ 'text' => $Element,
424
+ ),
425
+ );
426
+
427
+ return $Block;
428
+ }
429
+ }
430
+
431
+ protected function blockFencedCodeContinue($Line, $Block)
432
+ {
433
+ if (isset($Block['complete']))
434
+ {
435
+ return;
436
+ }
437
+
438
+ if (isset($Block['interrupted']))
439
+ {
440
+ $Block['element']['text']['text'] .= "\n";
441
+
442
+ unset($Block['interrupted']);
443
+ }
444
+
445
+ if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text']))
446
+ {
447
+ $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1);
448
+
449
+ $Block['complete'] = true;
450
+
451
+ return $Block;
452
+ }
453
+
454
+ $Block['element']['text']['text'] .= "\n".$Line['body'];;
455
+
456
+ return $Block;
457
+ }
458
+
459
+ protected function blockFencedCodeComplete($Block)
460
+ {
461
+ $text = $Block['element']['text']['text'];
462
+
463
+ $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
464
+
465
+ $Block['element']['text']['text'] = $text;
466
+
467
+ return $Block;
468
+ }
469
+
470
+ #
471
+ # Header
472
+
473
+ protected function blockHeader($Line)
474
+ {
475
+ if (isset($Line['text'][1]))
476
+ {
477
+ $level = 1;
478
+
479
+ while (isset($Line['text'][$level]) and $Line['text'][$level] === '#')
480
+ {
481
+ $level ++;
482
+ }
483
+
484
+ if ($level > 6)
485
+ {
486
+ return;
487
+ }
488
+
489
+ $text = trim($Line['text'], '# ');
490
+
491
+ $Block = array(
492
+ 'element' => array(
493
+ 'name' => 'h' . min(6, $level),
494
+ 'text' => $text,
495
+ 'handler' => 'line',
496
+ ),
497
+ );
498
+
499
+ return $Block;
500
+ }
501
+ }
502
+
503
+ #
504
+ # List
505
+
506
+ protected function blockList($Line)
507
+ {
508
+ list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]');
509
+
510
+ if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches))
511
+ {
512
+ $Block = array(
513
+ 'indent' => $Line['indent'],
514
+ 'pattern' => $pattern,
515
+ 'element' => array(
516
+ 'name' => $name,
517
+ 'handler' => 'elements',
518
+ ),
519
+ );
520
+
521
+ $Block['li'] = array(
522
+ 'name' => 'li',
523
+ 'handler' => 'li',
524
+ 'text' => array(
525
+ $matches[2],
526
+ ),
527
+ );
528
+
529
+ $Block['element']['text'] []= & $Block['li'];
530
+
531
+ return $Block;
532
+ }
533
+ }
534
+
535
+ protected function blockListContinue($Line, array $Block)
536
+ {
537
+ if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches))
538
+ {
539
+ if (isset($Block['interrupted']))
540
+ {
541
+ $Block['li']['text'] []= '';
542
+
543
+ unset($Block['interrupted']);
544
+ }
545
+
546
+ unset($Block['li']);
547
+
548
+ $text = isset($matches[1]) ? $matches[1] : '';
549
+
550
+ $Block['li'] = array(
551
+ 'name' => 'li',
552
+ 'handler' => 'li',
553
+ 'text' => array(
554
+ $text,
555
+ ),
556
+ );
557
+
558
+ $Block['element']['text'] []= & $Block['li'];
559
+
560
+ return $Block;
561
+ }
562
+
563
+ if ($Line['text'][0] === '[' and $this->blockReference($Line))
564
+ {
565
+ return $Block;
566
+ }
567
+
568
+ if ( ! isset($Block['interrupted']))
569
+ {
570
+ $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']);
571
+
572
+ $Block['li']['text'] []= $text;
573
+
574
+ return $Block;
575
+ }
576
+
577
+ if ($Line['indent'] > 0)
578
+ {
579
+ $Block['li']['text'] []= '';
580
+
581
+ $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']);
582
+
583
+ $Block['li']['text'] []= $text;
584
+
585
+ unset($Block['interrupted']);
586
+
587
+ return $Block;
588
+ }
589
+ }
590
+
591
+ #
592
+ # Quote
593
+
594
+ protected function blockQuote($Line)
595
+ {
596
+ if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches))
597
+ {
598
+ $Block = array(
599
+ 'element' => array(
600
+ 'name' => 'blockquote',
601
+ 'handler' => 'lines',
602
+ 'text' => (array) $matches[1],
603
+ ),
604
+ );
605
+
606
+ return $Block;
607
+ }
608
+ }
609
+
610
+ protected function blockQuoteContinue($Line, array $Block)
611
+ {
612
+ if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches))
613
+ {
614
+ if (isset($Block['interrupted']))
615
+ {
616
+ $Block['element']['text'] []= '';
617
+
618
+ unset($Block['interrupted']);
619
+ }
620
+
621
+ $Block['element']['text'] []= $matches[1];
622
+
623
+ return $Block;
624
+ }
625
+
626
+ if ( ! isset($Block['interrupted']))
627
+ {
628
+ $Block['element']['text'] []= $Line['text'];
629
+
630
+ return $Block;
631
+ }
632
+ }
633
+
634
+ #
635
+ # Rule
636
+
637
+ protected function blockRule($Line)
638
+ {
639
+ if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text']))
640
+ {
641
+ $Block = array(
642
+ 'element' => array(
643
+ 'name' => 'hr'
644
+ ),
645
+ );
646
+
647
+ return $Block;
648
+ }
649
+ }
650
+
651
+ #
652
+ # Setext
653
+
654
+ protected function blockSetextHeader($Line, array $Block = null)
655
+ {
656
+ if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted']))
657
+ {
658
+ return;
659
+ }
660
+
661
+ if (chop($Line['text'], $Line['text'][0]) === '')
662
+ {
663
+ $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2';
664
+
665
+ return $Block;
666
+ }
667
+ }
668
+
669
+ #
670
+ # Markup
671
+
672
+ protected function blockMarkup($Line)
673
+ {
674
+ if ($this->markupEscaped)
675
+ {
676
+ return;
677
+ }
678
+
679
+ if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches))
680
+ {
681
+ $element = strtolower($matches[1]);
682
+
683
+ if (in_array($element, $this->textLevelElements))
684
+ {
685
+ return;
686
+ }
687
+
688
+ $Block = array(
689
+ 'name' => $matches[1],
690
+ 'depth' => 0,
691
+ 'markup' => $Line['text'],
692
+ );
693
+
694
+ $length = strlen($matches[0]);
695
+
696
+ $remainder = substr($Line['text'], $length);
697
+
698
+ if (trim($remainder) === '')
699
+ {
700
+ if (isset($matches[2]) or in_array($matches[1], $this->voidElements))
701
+ {
702
+ $Block['closed'] = true;
703
+
704
+ $Block['void'] = true;
705
+ }
706
+ }
707
+ else
708
+ {
709
+ if (isset($matches[2]) or in_array($matches[1], $this->voidElements))
710
+ {
711
+ return;
712
+ }
713
+
714
+ if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder))
715
+ {
716
+ $Block['closed'] = true;
717
+ }
718
+ }
719
+
720
+ return $Block;
721
+ }
722
+ }
723
+
724
+ protected function blockMarkupContinue($Line, array $Block)
725
+ {
726
+ if (isset($Block['closed']))
727
+ {
728
+ return;
729
+ }
730
+
731
+ if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open
732
+ {
733
+ $Block['depth'] ++;
734
+ }
735
+
736
+ if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close
737
+ {
738
+ if ($Block['depth'] > 0)
739
+ {
740
+ $Block['depth'] --;
741
+ }
742
+ else
743
+ {
744
+ $Block['closed'] = true;
745
+ }
746
+ }
747
+
748
+ if (isset($Block['interrupted']))
749
+ {
750
+ $Block['markup'] .= "\n";
751
+
752
+ unset($Block['interrupted']);
753
+ }
754
+
755
+ $Block['markup'] .= "\n".$Line['body'];
756
+
757
+ return $Block;
758
+ }
759
+
760
+ #
761
+ # Reference
762
+
763
+ protected function blockReference($Line)
764
+ {
765
+ # ReduxFramework added string alerting to remove themecheck error.
766
+ if (preg_match('/^\[(.+?)\]:[ ]*<'.'?'.'(\S+?)>?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches))
767
+ {
768
+ $id = strtolower($matches[1]);
769
+
770
+ $Data = array(
771
+ 'url' => $matches[2],
772
+ 'title' => null,
773
+ );
774
+
775
+ if (isset($matches[3]))
776
+ {
777
+ $Data['title'] = $matches[3];
778
+ }
779
+
780
+ $this->DefinitionData['Reference'][$id] = $Data;
781
+
782
+ $Block = array(
783
+ 'hidden' => true,
784
+ );
785
+
786
+ return $Block;
787
+ }
788
+ }
789
+
790
+ #
791
+ # Table
792
+
793
+ protected function blockTable($Line, array $Block = null)
794
+ {
795
+ if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted']))
796
+ {
797
+ return;
798
+ }
799
+
800
+ if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '')
801
+ {
802
+ $alignments = array();
803
+
804
+ $divider = $Line['text'];
805
+
806
+ $divider = trim($divider);
807
+ $divider = trim($divider, '|');
808
+
809
+ $dividerCells = explode('|', $divider);
810
+
811
+ foreach ($dividerCells as $dividerCell)
812
+ {
813
+ $dividerCell = trim($dividerCell);
814
+
815
+ if ($dividerCell === '')
816
+ {
817
+ continue;
818
+ }
819
+
820
+ $alignment = null;
821
+
822
+ if ($dividerCell[0] === ':')
823
+ {
824
+ $alignment = 'left';
825
+ }
826
+
827
+ if (substr($dividerCell, - 1) === ':')
828
+ {
829
+ $alignment = $alignment === 'left' ? 'center' : 'right';
830
+ }
831
+
832
+ $alignments []= $alignment;
833
+ }
834
+
835
+ # ~
836
+
837
+ $HeaderElements = array();
838
+
839
+ $header = $Block['element']['text'];
840
+
841
+ $header = trim($header);
842
+ $header = trim($header, '|');
843
+
844
+ $headerCells = explode('|', $header);
845
+
846
+ foreach ($headerCells as $index => $headerCell)
847
+ {
848
+ $headerCell = trim($headerCell);
849
+
850
+ $HeaderElement = array(
851
+ 'name' => 'th',
852
+ 'text' => $headerCell,
853
+ 'handler' => 'line',
854
+ );
855
+
856
+ if (isset($alignments[$index]))
857
+ {
858
+ $alignment = $alignments[$index];
859
+
860
+ $HeaderElement['attributes'] = array(
861
+ 'style' => 'text-align: '.$alignment.';',
862
+ );
863
+ }
864
+
865
+ $HeaderElements []= $HeaderElement;
866
+ }
867
+
868
+ # ~
869
+
870
+ $Block = array(
871
+ 'alignments' => $alignments,
872
+ 'identified' => true,
873
+ 'element' => array(
874
+ 'name' => 'table',
875
+ 'handler' => 'elements',
876
+ ),
877
+ );
878
+
879
+ $Block['element']['text'] []= array(
880
+ 'name' => 'thead',
881
+ 'handler' => 'elements',
882
+ );
883
+
884
+ $Block['element']['text'] []= array(
885
+ 'name' => 'tbody',
886
+ 'handler' => 'elements',
887
+ 'text' => array(),
888
+ );
889
+
890
+ $Block['element']['text'][0]['text'] []= array(
891
+ 'name' => 'tr',
892
+ 'handler' => 'elements',
893
+ 'text' => $HeaderElements,
894
+ );
895
+
896
+ return $Block;
897
+ }
898
+ }
899
+
900
+ protected function blockTableContinue($Line, array $Block)
901
+ {
902
+ if (isset($Block['interrupted']))
903
+ {
904
+ return;
905
+ }
906
+
907
+ if ($Line['text'][0] === '|' or strpos($Line['text'], '|'))
908
+ {
909
+ $Elements = array();
910
+
911
+ $row = $Line['text'];
912
+
913
+ $row = trim($row);
914
+ $row = trim($row, '|');
915
+
916
+ preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches);
917
+
918
+ foreach ($matches[0] as $index => $cell)
919
+ {
920
+ $cell = trim($cell);
921
+
922
+ $Element = array(
923
+ 'name' => 'td',
924
+ 'handler' => 'line',
925
+ 'text' => $cell,
926
+ );
927
+
928
+ if (isset($Block['alignments'][$index]))
929
+ {
930
+ $Element['attributes'] = array(
931
+ 'style' => 'text-align: '.$Block['alignments'][$index].';',
932
+ );
933
+ }
934
+
935
+ $Elements []= $Element;
936
+ }
937
+
938
+ $Element = array(
939
+ 'name' => 'tr',
940
+ 'handler' => 'elements',
941
+ 'text' => $Elements,
942
+ );
943
+
944
+ $Block['element']['text'][1]['text'] []= $Element;
945
+
946
+ return $Block;
947
+ }
948
+ }
949
+
950
+ #
951
+ # ~
952
+ #
953
+
954
+ protected function paragraph($Line)
955
+ {
956
+ $Block = array(
957
+ 'element' => array(
958
+ 'name' => 'p',
959
+ 'text' => $Line['text'],
960
+ 'handler' => 'line',
961
+ ),
962
+ );
963
+
964
+ return $Block;
965
+ }
966
+
967
+ #
968
+ # Inline Elements
969
+ #
970
+
971
+ protected $InlineTypes = array(
972
+ '"' => array('SpecialCharacter'),
973
+ '!' => array('Image'),
974
+ '&' => array('SpecialCharacter'),
975
+ '*' => array('Emphasis'),
976
+ ':' => array('Url'),
977
+ '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'),
978
+ '>' => array('SpecialCharacter'),
979
+ '[' => array('Link'),
980
+ '_' => array('Emphasis'),
981
+ '`' => array('Code'),
982
+ '~' => array('Strikethrough'),
983
+ '\\' => array('EscapeSequence'),
984
+ );
985
+
986
+ # ~
987
+
988
+ protected $inlineMarkerList = '!"*_&[:<>`~\\';
989
+
990
+ #
991
+ # ~
992
+ #
993
+
994
+ public function line($text)
995
+ {
996
+ $markup = '';
997
+
998
+ # $excerpt is based on the first occurrence of a marker
999
+
1000
+ while ($excerpt = strpbrk($text, $this->inlineMarkerList))
1001
+ {
1002
+ $marker = $excerpt[0];
1003
+
1004
+ $markerPosition = strpos($text, $marker);
1005
+
1006
+ $Excerpt = array('text' => $excerpt, 'context' => $text);
1007
+
1008
+ foreach ($this->InlineTypes[$marker] as $inlineType)
1009
+ {
1010
+ $Inline = $this->{'inline'.$inlineType}($Excerpt);
1011
+
1012
+ if ( ! isset($Inline))
1013
+ {
1014
+ continue;
1015
+ }
1016
+
1017
+ # makes sure that the inline belongs to "our" marker
1018
+
1019
+ if (isset($Inline['position']) and $Inline['position'] > $markerPosition)
1020
+ {
1021
+ continue;
1022
+ }
1023
+
1024
+ # sets a default inline position
1025
+
1026
+ if ( ! isset($Inline['position']))
1027
+ {
1028
+ $Inline['position'] = $markerPosition;
1029
+ }
1030
+
1031
+ # the text that comes before the inline
1032
+ $unmarkedText = substr($text, 0, $Inline['position']);
1033
+
1034
+ # compile the unmarked text
1035
+ $markup .= $this->unmarkedText($unmarkedText);
1036
+
1037
+ # compile the inline
1038
+ $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']);
1039
+
1040
+ # remove the examined text
1041
+ $text = substr($text, $Inline['position'] + $Inline['extent']);
1042
+
1043
+ continue 2;
1044
+ }
1045
+
1046
+ # the marker does not belong to an inline
1047
+
1048
+ $unmarkedText = substr($text, 0, $markerPosition + 1);
1049
+
1050
+ $markup .= $this->unmarkedText($unmarkedText);
1051
+
1052
+ $text = substr($text, $markerPosition + 1);
1053
+ }
1054
+
1055
+ $markup .= $this->unmarkedText($text);
1056
+
1057
+ return $markup;
1058
+ }
1059
+
1060
+ #
1061
+ # ~
1062
+ #
1063
+
1064
+ protected function inlineCode($Excerpt)
1065
+ {
1066
+ $marker = $Excerpt['text'][0];
1067
+
1068
+ if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(?<!'.$marker.')\1(?!'.$marker.')/s', $Excerpt['text'], $matches))
1069
+ {
1070
+ $text = $matches[2];
1071
+ $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
1072
+ $text = preg_replace("/[ ]*\n/", ' ', $text);
1073
+
1074
+ return array(
1075
+ 'extent' => strlen($matches[0]),
1076
+ 'element' => array(
1077
+ 'name' => 'code',
1078
+ 'text' => $text,
1079
+ ),
1080
+ );
1081
+ }
1082
+ }
1083
+
1084
+ protected function inlineEmailTag($Excerpt)
1085
+ {
1086
+ if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches))
1087
+ {
1088
+ $url = $matches[1];
1089
+
1090
+ if ( ! isset($matches[2]))
1091
+ {
1092
+ $url = 'mailto:' . $url;
1093
+ }
1094
+
1095
+ return array(
1096
+ 'extent' => strlen($matches[0]),
1097
+ 'element' => array(
1098
+ 'name' => 'a',
1099
+ 'text' => $matches[1],
1100
+ 'attributes' => array(
1101
+ 'href' => $url,
1102
+ ),
1103
+ ),
1104
+ );
1105
+ }
1106
+ }
1107
+
1108
+ protected function inlineEmphasis($Excerpt)
1109
+ {
1110
+ if ( ! isset($Excerpt['text'][1]))
1111
+ {
1112
+ return;
1113
+ }
1114
+
1115
+ $marker = $Excerpt['text'][0];
1116
+
1117
+ if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches))
1118
+ {
1119
+ $emphasis = 'strong';
1120
+ }
1121
+ elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches))
1122
+ {
1123
+ $emphasis = 'em';
1124
+ }
1125
+ else
1126
+ {
1127
+ return;
1128
+ }
1129
+
1130
+ return array(
1131
+ 'extent' => strlen($matches[0]),
1132
+ 'element' => array(
1133
+ 'name' => $emphasis,
1134
+ 'handler' => 'line',
1135
+ 'text' => $matches[1],
1136
+ ),
1137
+ );
1138
+ }
1139
+
1140
+ protected function inlineEscapeSequence($Excerpt)
1141
+ {
1142
+ if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters))
1143
+ {
1144
+ return array(
1145
+ 'markup' => $Excerpt['text'][1],
1146
+ 'extent' => 2,
1147
+ );
1148
+ }
1149
+ }
1150
+
1151
+ protected function inlineImage($Excerpt)
1152
+ {
1153
+ if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[')
1154
+ {
1155
+ return;
1156
+ }
1157
+
1158
+ $Excerpt['text']= substr($Excerpt['text'], 1);
1159
+
1160
+ $Link = $this->inlineLink($Excerpt);
1161
+
1162
+ if ($Link === null)
1163
+ {
1164
+ return;
1165
+ }
1166
+
1167
+ $Inline = array(
1168
+ 'extent' => $Link['extent'] + 1,
1169
+ 'element' => array(
1170
+ 'name' => 'img',
1171
+ 'attributes' => array(
1172
+ 'src' => $Link['element']['attributes']['href'],
1173
+ 'alt' => $Link['element']['text'],
1174
+ ),
1175
+ ),
1176
+ );
1177
+
1178
+ $Inline['element']['attributes'] += $Link['element']['attributes'];
1179
+
1180
+ unset($Inline['element']['attributes']['href']);
1181
+
1182
+ return $Inline;
1183
+ }
1184
+
1185
+ protected function inlineLink($Excerpt)
1186
+ {
1187
+ $Element = array(
1188
+ 'name' => 'a',
1189
+ 'handler' => 'line',
1190
+ 'text' => null,
1191
+ 'attributes' => array(
1192
+ 'href' => null,
1193
+ 'title' => null,
1194
+ ),
1195
+ );
1196
+
1197
+ $extent = 0;
1198
+
1199
+ $remainder = $Excerpt['text'];
1200
+
1201
+ if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches))
1202
+ {
1203
+ $Element['text'] = $matches[1];
1204
+
1205
+ $extent += strlen($matches[0]);
1206
+
1207
+ $remainder = substr($remainder, $extent);
1208
+ }
1209
+ else
1210
+ {
1211
+ return;
1212
+ }
1213
+
1214
+ if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches))
1215
+ {
1216
+ $Element['attributes']['href'] = $matches[1];
1217
+
1218
+ if (isset($matches[2]))
1219
+ {
1220
+ $Element['attributes']['title'] = substr($matches[2], 1, - 1);
1221
+ }
1222
+
1223
+ $extent += strlen($matches[0]);
1224
+ }
1225
+ else
1226
+ {
1227
+ if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches))
1228
+ {
1229
+ $definition = strlen($matches[1]) ? $matches[1] : $Element['text'];
1230
+ $definition = strtolower($definition);
1231
+
1232
+ $extent += strlen($matches[0]);
1233
+ }
1234
+ else
1235
+ {
1236
+ $definition = strtolower($Element['text']);
1237
+ }
1238
+
1239
+ if ( ! isset($this->DefinitionData['Reference'][$definition]))
1240
+ {
1241
+ return;
1242
+ }
1243
+
1244
+ $Definition = $this->DefinitionData['Reference'][$definition];
1245
+
1246
+ $Element['attributes']['href'] = $Definition['url'];
1247
+ $Element['attributes']['title'] = $Definition['title'];
1248
+ }
1249
+
1250
+ $Element['attributes']['href'] = str_replace(array('&', '<'), array('&amp;', '&lt;'), $Element['attributes']['href']);
1251
+
1252
+ return array(
1253
+ 'extent' => $extent,
1254
+ 'element' => $Element,
1255
+ );
1256
+ }
1257
+
1258
+ protected function inlineMarkup($Excerpt)
1259
+ {
1260
+ if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false)
1261
+ {
1262
+ return;
1263
+ }
1264
+
1265
+ if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches))
1266
+ {
1267
+ return array(
1268
+ 'markup' => $matches[0],
1269
+ 'extent' => strlen($matches[0]),
1270
+ );
1271
+ }
1272
+
1273
+ if ($Excerpt['text'][1] === '!' and preg_match('/^<!---?[^>-](?:-?[^-])*-->/s', $Excerpt['text'], $matches))
1274
+ {
1275
+ return array(
1276
+ 'markup' => $matches[0],
1277
+ 'extent' => strlen($matches[0]),
1278
+ );
1279
+ }
1280
+
1281
+ if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches))
1282
+ {
1283
+ return array(
1284
+ 'markup' => $matches[0],
1285
+ 'extent' => strlen($matches[0]),
1286
+ );
1287
+ }
1288
+ }
1289
+
1290
+ protected function inlineSpecialCharacter($Excerpt)
1291
+ {
1292
+ if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text']))
1293
+ {
1294
+ return array(
1295
+ 'markup' => '&amp;',
1296
+ 'extent' => 1,
1297
+ );
1298
+ }
1299
+
1300
+ $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot');
1301
+
1302
+ if (isset($SpecialCharacter[$Excerpt['text'][0]]))
1303
+ {
1304
+ return array(
1305
+ 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';',
1306
+ 'extent' => 1,
1307
+ );
1308
+ }
1309
+ }
1310
+
1311
+ protected function inlineStrikethrough($Excerpt)
1312
+ {
1313
+ if ( ! isset($Excerpt['text'][1]))
1314
+ {
1315
+ return;
1316
+ }
1317
+
1318
+ if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches))
1319
+ {
1320
+ return array(
1321
+ 'extent' => strlen($matches[0]),
1322
+ 'element' => array(
1323
+ 'name' => 'del',
1324
+ 'text' => $matches[1],
1325
+ 'handler' => 'line',
1326
+ ),
1327
+ );
1328
+ }
1329
+ }
1330
+
1331
+ protected function inlineUrl($Excerpt)
1332
+ {
1333
+ if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/')
1334
+ {
1335
+ return;
1336
+ }
1337
+
1338
+ if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE))
1339
+ {
1340
+ $Inline = array(
1341
+ 'extent' => strlen($matches[0][0]),
1342
+ 'position' => $matches[0][1],
1343
+ 'element' => array(
1344
+ 'name' => 'a',
1345
+ 'text' => $matches[0][0],
1346
+ 'attributes' => array(
1347
+ 'href' => $matches[0][0],
1348
+ ),
1349
+ ),
1350
+ );
1351
+
1352
+ return $Inline;
1353
+ }
1354
+ }
1355
+
1356
+ protected function inlineUrlTag($Excerpt)
1357
+ {
1358
+ if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches))
1359
+ {
1360
+ $url = str_replace(array('&', '<'), array('&amp;', '&lt;'), $matches[1]);
1361
+
1362
+ return array(
1363
+ 'extent' => strlen($matches[0]),
1364
+ 'element' => array(
1365
+ 'name' => 'a',
1366
+ 'text' => $url,
1367
+ 'attributes' => array(
1368
+ 'href' => $url,
1369
+ ),
1370
+ ),
1371
+ );
1372
+ }
1373
+ }
1374
+
1375
+ # ~
1376
+
1377
+ protected function unmarkedText($text)
1378
+ {
1379
+ if ($this->breaksEnabled)
1380
+ {
1381
+ $text = preg_replace('/[ ]*\n/', "<br />\n", $text);
1382
+ }
1383
+ else
1384
+ {
1385
+ $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "<br />\n", $text);
1386
+ $text = str_replace(" \n", "\n", $text);
1387
+ }
1388
+
1389
+ return $text;
1390
+ }
1391
+
1392
+ #
1393
+ # Handlers
1394
+ #
1395
+
1396
+ protected function element(array $Element)
1397
+ {
1398
+ $markup = '<'.$Element['name'];
1399
+
1400
+ if (isset($Element['attributes']))
1401
+ {
1402
+ foreach ($Element['attributes'] as $name => $value)
1403
+ {
1404
+ if ($value === null)
1405
+ {
1406
+ continue;
1407
+ }
1408
+
1409
+ $markup .= ' '.$name.'="'.$value.'"';
1410
+ }
1411
+ }
1412
+
1413
+ if (isset($Element['text']))
1414
+ {
1415
+ $markup .= '>';
1416
+
1417
+ if (isset($Element['handler']))
1418
+ {
1419
+ $markup .= $this->{$Element['handler']}($Element['text']);
1420
+ }
1421
+ else
1422
+ {
1423
+ $markup .= $Element['text'];
1424
+ }
1425
+
1426
+ $markup .= '</'.$Element['name'].'>';
1427
+ }
1428
+ else
1429
+ {
1430
+ $markup .= ' />';
1431
+ }
1432
+
1433
+ return $markup;
1434
+ }
1435
+
1436
+ protected function elements(array $Elements)
1437
+ {
1438
+ $markup = '';
1439
+
1440
+ foreach ($Elements as $Element)
1441
+ {
1442
+ $markup .= "\n" . $this->element($Element);
1443
+ }
1444
+
1445
+ $markup .= "\n";
1446
+
1447
+ return $markup;
1448
+ }
1449
+
1450
+ # ~
1451
+
1452
+ protected function li($lines)
1453
+ {
1454
+ $markup = $this->lines($lines);
1455
+
1456
+ $trimmedMarkup = trim($markup);
1457
+
1458
+ if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '<p>')
1459
+ {
1460
+ $markup = $trimmedMarkup;
1461
+ $markup = substr($markup, 3);
1462
+
1463
+ $position = strpos($markup, "</p>");
1464
+
1465
+ $markup = substr_replace($markup, '', $position, 4);
1466
+ }
1467
+
1468
+ return $markup;
1469
+ }
1470
+
1471
+ #
1472
+ # Deprecated Methods
1473
+ #
1474
+
1475
+ function parse($text)
1476
+ {
1477
+ $markup = $this->text($text);
1478
+
1479
+ return $markup;
1480
+ }
1481
+
1482
+ #
1483
+ # Static Methods
1484
+ #
1485
+
1486
+ static function instance($name = 'default')
1487
+ {
1488
+ if (isset(self::$instances[$name]))
1489
+ {
1490
+ return self::$instances[$name];
1491
+ }
1492
+
1493
+ $instance = new static();
1494
+
1495
+ self::$instances[$name] = $instance;
1496
+
1497
+ return $instance;
1498
+ }
1499
+
1500
+ private static $instances = array();
1501
+
1502
+ #
1503
+ # Fields
1504
+ #
1505
+
1506
+ protected $DefinitionData;
1507
+
1508
+ #
1509
+ # Read-Only
1510
+
1511
+ protected $specialCharacters = array(
1512
+ '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|',
1513
+ );
1514
+
1515
+ protected $StrongRegex = array(
1516
+ '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s',
1517
+ '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us',
1518
+ );
1519
+
1520
+ protected $EmRegex = array(
1521
+ '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s',
1522
+ '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us',
1523
+ );
1524
+
1525
+ protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?';
1526
+
1527
+ protected $voidElements = array(
1528
+ 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source',
1529
+ );
1530
+
1531
+ protected $textLevelElements = array(
1532
+ 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont',
1533
+ 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing',
1534
+ 'i', 'rp', 'del', 'code', 'strike', 'marquee',
1535
+ 'q', 'rt', 'ins', 'font', 'strong',
1536
+ 's', 'tt', 'sub', 'mark',
1537
+ 'u', 'xm', 'sup', 'nobr',
1538
+ 'var', 'ruby',
1539
+ 'wbr', 'span',
1540
+ 'time',
1541
+ );
1542
+ }
includes/options/redux-core/inc/fields/section/field_section.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-main .form-table-section-indented{width:95%;margin-left:5%}.redux-main .form-table-section tr:first-of-type th:first-of-type{padding:0px !important}.redux-main h3{margin-top:10px}.redux-main .form-table-section-indented>tbody>tr:first-child{display:none}.redux-main .form-table-section-indented>tbody>tr:nth-last-child(2){border-bottom:0}
includes/options/redux-core/inc/fields/section/field_section.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Redux Framework is free software: you can redistribute it and/or modify
4
+ * it under the terms of the GNU General Public License as published by
5
+ * the Free Software Foundation, either version 2 of the License, or
6
+ * any later version.
7
+ * Redux Framework is distributed in the hope that it will be useful,
8
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
+ * GNU General Public License for more details.
11
+ * You should have received a copy of the GNU General Public License
12
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
13
+ *
14
+ * @package ReduxFramework
15
+ * @subpackage Field_Section
16
+ * @author Tobias Karnetze (athoss.de)
17
+ * @version 1.0.0
18
+ */
19
+
20
+ // Exit if accessed directly
21
+ if ( ! defined( 'ABSPATH' ) ) {
22
+ exit;
23
+ }
24
+
25
+ // Don't duplicate me!
26
+ if ( ! class_exists( 'ReduxFramework_section' ) ) {
27
+
28
+ /**
29
+ * Main ReduxFramework_heading class
30
+ *
31
+ * @since 1.0.0
32
+ */
33
+ class ReduxFramework_section {
34
+
35
+ /**
36
+ * Field Constructor.
37
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
38
+ *
39
+ * @since 1.0.0
40
+ * @access public
41
+ * @return void
42
+ */
43
+ public function __construct( $field = array(), $value = '', $parent ) {
44
+ $this->parent = $parent;
45
+ $this->field = $field;
46
+ $this->value = $value;
47
+ }
48
+
49
+ /**
50
+ * Field Render Function.
51
+ * Takes the vars and outputs the HTML for the field in the settings
52
+ *
53
+ * @since 1.0.0
54
+ * @access public
55
+ * @return void
56
+ */
57
+ public function render() {
58
+
59
+ // No errors please
60
+ $defaults = array(
61
+ 'indent' => '',
62
+ 'style' => '',
63
+ 'class' => '',
64
+ 'title' => '',
65
+ 'subtitle' => '',
66
+ );
67
+ $this->field = wp_parse_args( $this->field, $defaults );
68
+
69
+ $guid = uniqid();
70
+
71
+ $add_class = '';
72
+ if ( isset( $this->field['indent'] ) && true === $this->field['indent'] ) {
73
+ $add_class = ' form-table-section-indented';
74
+ } elseif( !isset( $this->field['indent'] ) || ( isset( $this->field['indent'] ) && false !== $this->field['indent'] ) ) {
75
+ $add_class = " hide";
76
+ }
77
+
78
+ echo '<input type="hidden" id="' . esc_attr($this->field['id']) . '-marker"></td></tr></table>';
79
+
80
+ echo '<div id="section-' . esc_attr($this->field['id']) . '" class="redux-section-field redux-field ' . esc_attr($this->field['style']) . ' ' . esc_attr($this->field['class']) . ' ">';
81
+
82
+ if ( ! empty( $this->field['title'] ) ) {
83
+ echo '<h3>' . esc_html($this->field['title']) . '</h3>';
84
+ }
85
+
86
+ if ( ! empty( $this->field['subtitle'] ) ) {
87
+ echo '<div class="redux-section-desc">' . esc_html($this->field['subtitle']) . '</div>';
88
+ }
89
+
90
+ echo '</div><table id="section-table-' . esc_attr($this->field['id']) . '" data-id="' . esc_attr($this->field['id']) . '" class="form-table form-table-section no-border' . esc_attr($add_class) . '"><tbody><tr><th></th><td id="' . esc_attr($guid) . '">';
91
+
92
+ // delete the tr afterwards
93
+ ?>
94
+ <script type="text/javascript">
95
+ jQuery( document ).ready(
96
+ function() {
97
+ jQuery( '#<?php echo esc_js($this->field['id']); ?>-marker' ).parents( 'tr:first' ).css( {display: 'none'} ).prev('tr' ).css('border-bottom','none');;
98
+ var group = jQuery( '#<?php echo esc_js($this->field['id']); ?>-marker' ).parents( '.redux-group-tab:first' );
99
+ if ( !group.hasClass( 'sectionsChecked' ) ) {
100
+ group.addClass( 'sectionsChecked' );
101
+ var test = group.find( '.redux-section-indent-start h3' );
102
+ jQuery.each(
103
+ test, function( key, value ) {
104
+ jQuery( value ).css( 'margin-top', '20px' )
105
+ }
106
+ );
107
+ if ( group.find( 'h3:first' ).css( 'margin-top' ) == "20px" ) {
108
+ group.find( 'h3:first' ).css( 'margin-top', '0' );
109
+ }
110
+ }
111
+ }
112
+ );
113
+ </script>
114
+ <?php
115
+
116
+ }
117
+
118
+ public function enqueue() {
119
+ if ( $this->parent->args['dev_mode'] ) {
120
+ wp_enqueue_style(
121
+ 'redux-field-section-css',
122
+ ReduxFramework::$_url . 'inc/fields/section/field_section.css',
123
+ array(),
124
+ time(),
125
+ 'all'
126
+ );
127
+ }
128
+ }
129
+ }
130
+ }
includes/options/redux-core/inc/fields/section/field_section.scss ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-main {
2
+ .form-table-section-indented {
3
+ width: 95%;
4
+ margin-left: 5%;
5
+ }
6
+
7
+ .form-table-section tr:first-of-type th:first-of-type {
8
+ padding: 0px !important;
9
+ }
10
+
11
+ h3 {
12
+ margin-top: 10px;
13
+ }
14
+
15
+ .form-table-section-indented > tbody > tr{
16
+ &:first-child {
17
+ display: none;
18
+ }
19
+
20
+ &:nth-last-child(2) {
21
+ border-bottom: 0;
22
+ }
23
+ }
24
+ }
includes/options/{redux-framework → redux-core}/inc/fields/select/elusive-icons.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/select/field_select.scss RENAMED
File without changes
includes/options/redux-core/inc/fields/select_image/field_select_image.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-select_image{margin-top:2px;margin-left:5px;width:100%;margin-bottom:0}.redux-preview-image{max-height:250px;max-width:250px;padding:5px;margin-top:10px;border:1px solid #e3e3e3;background:#f7f7f7;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}
includes/options/redux-core/inc/fields/select_image/field_select_image.js ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.select_image = redux.field_objects.select_image || {};
8
+
9
+ $( document ).ready(
10
+ function() {
11
+ //redux.field_objects.select_image.init();
12
+ }
13
+ );
14
+
15
+ redux.field_objects.select_image.init = function( selector ) {
16
+
17
+ if ( !selector ) {
18
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-select_image:visible' );
19
+ }
20
+
21
+ $( selector ).each(
22
+ function() {
23
+ var el = $( this );
24
+ var parent = el;
25
+ if ( !el.hasClass( 'redux-field-container' ) ) {
26
+ parent = el.parents( '.redux-field-container:first' );
27
+ }
28
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
29
+ return;
30
+ }
31
+ if ( parent.hasClass( 'redux-field-init' ) ) {
32
+ parent.removeClass( 'redux-field-init' );
33
+ } else {
34
+ return;
35
+ }
36
+ var default_params = {
37
+ width: 'resolve',
38
+ triggerChange: true,
39
+ allowClear: true
40
+ };
41
+
42
+ var select2_handle = el.find( '.redux-container-select_image' ).find( '.select2_params' );
43
+
44
+ if ( select2_handle.size() > 0 ) {
45
+ var select2_params = select2_handle.val();
46
+
47
+ select2_params = JSON.parse( select2_params );
48
+ default_params = $.extend( {}, default_params, select2_params );
49
+ }
50
+
51
+ el.find( 'select.redux-select-images' ).select2( default_params );
52
+
53
+ el.find( '.redux-select-images' ).on(
54
+ 'change', function() {
55
+ var preview = $( this ).parents( '.redux-field:first' ).find( '.redux-preview-image' );
56
+
57
+ if ( $( this ).val() === "" ) {
58
+ preview.fadeOut(
59
+ 'medium', function() {
60
+ preview.attr( 'src', '' );
61
+ }
62
+ );
63
+ } else {
64
+ preview.attr( 'src', $( this ).val() );
65
+ preview.fadeIn().css( 'visibility', 'visible' );
66
+ }
67
+ }
68
+ );
69
+ }
70
+ );
71
+ };
72
+ })( jQuery );
includes/options/redux-core/inc/fields/select_image/field_select_image.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.select_image=redux.field_objects.select_image||{},a(document).ready(function(){}),redux.field_objects.select_image.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-select_image:visible")),a(b).each(function(){var b=a(this),c=b;if(b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),!c.is(":hidden")&&c.hasClass("redux-field-init")){c.removeClass("redux-field-init");var d={width:"resolve",triggerChange:!0,allowClear:!0},e=b.find(".redux-container-select_image").find(".select2_params");if(e.size()>0){var f=e.val();f=JSON.parse(f),d=a.extend({},d,f)}b.find("select.redux-select-images").select2(d),b.find(".redux-select-images").on("change",function(){var b=a(this).parents(".redux-field:first").find(".redux-preview-image");""===a(this).val()?b.fadeOut("medium",function(){b.attr("src","")}):(b.attr("src",a(this).val()),b.fadeIn().css("visibility","visible"))})}})}}(jQuery);
includes/options/redux-core/inc/fields/select_image/field_select_image.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Field Select Image
5
+ *
6
+ * @package Wordpress
7
+ * @subpackage ReduxFramework
8
+ * @since 3.1.2
9
+ * @author Kevin Provance <kprovance>
10
+ */
11
+
12
+ // Exit if accessed directly
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit;
15
+ }
16
+
17
+ if ( ! class_exists( 'ReduxFramework_select_image' ) ) {
18
+ class ReduxFramework_select_image {
19
+
20
+ /**
21
+ * Field Constructor.
22
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
23
+ *
24
+ * @since ReduxFramework 1.0.0
25
+ */
26
+ function __construct( $field = array(), $value = '', $parent ) {
27
+ $this->parent = $parent;
28
+ $this->field = $field;
29
+ $this->value = $value;
30
+ }
31
+
32
+ /**
33
+ * Field Render Function.
34
+ * Takes the vars and outputs the HTML for the field in the settings
35
+ *
36
+ * @since ReduxFramework 1.0.0
37
+ */
38
+ function render() {
39
+
40
+ // If options is NOT empty, the process
41
+ if ( ! empty( $this->field['options'] ) ) {
42
+
43
+ // Strip off the file ext
44
+ if ( isset( $this->value ) ) {
45
+ $name = explode( ".", $this->value );
46
+ $name = str_replace( '.' . end( $name ), '', $this->value );
47
+ $name = basename( $name );
48
+ //$this->value = trim( $name );
49
+ $filename = trim($name);
50
+ }
51
+
52
+ // beancounter
53
+ $x = 1;
54
+
55
+ // Process width
56
+ if ( ! empty( $this->field['width'] ) ) {
57
+ $width = ' style="width:' . $this->field['width'] . ';"';
58
+ } else {
59
+ $width = ' style="width: 40%;"';
60
+ }
61
+
62
+ // Process placeholder
63
+ $placeholder = ( isset( $this->field['placeholder'] ) ) ? esc_attr( $this->field['placeholder'] ) : __( 'Select an item', 'redux-framework' );
64
+
65
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
66
+ $select2_params = json_encode( $this->field['select2'] );
67
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
68
+
69
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
70
+ }
71
+
72
+ // Begin the <select> tag
73
+ echo '<select data-id="' . $this->field['id'] . '" data-placeholder="' . $placeholder . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '" class="redux-select-item redux-select-images ' . $this->field['class'] . '"' . $width . ' rows="6">';
74
+ echo '<option></option>';
75
+
76
+
77
+ // Enum through the options array
78
+ foreach ( $this->field['options'] as $k => $v ) {
79
+
80
+ // No array? No problem!
81
+ if ( ! is_array( $v ) ) {
82
+ $v = array( 'img' => $v );
83
+ }
84
+
85
+ // No title set? Make it blank.
86
+ if ( ! isset( $v['title'] ) ) {
87
+ $v['title'] = '';
88
+ }
89
+
90
+ // No alt? Set it to title. We do this so the alt tag shows
91
+ // something. It also makes HTML/SEO purists happy.
92
+ if ( ! isset( $v['alt'] ) ) {
93
+ $v['alt'] = $v['title'];
94
+ }
95
+
96
+ // Set the selected entry
97
+ $selected = selected( $this->value, $v['img'], false );
98
+
99
+ // If selected returns something other than a blank space, we
100
+ // found our default/saved name. Save the array number in a
101
+ // variable to use later on when we want to extract its associted
102
+ // url.
103
+ if ( '' != $selected ) {
104
+ $arrNum = $x;
105
+ }
106
+
107
+ // Add the option tag, with values.
108
+ echo '<option value="' . $v['img'] . '" ' . $selected . '>' . $v['alt'] . '</option>';
109
+
110
+ // Add a bean
111
+ $x ++;
112
+ }
113
+
114
+ // Close the <select> tag
115
+ echo '</select>';
116
+
117
+ // Some space
118
+ echo '<br /><br />';
119
+
120
+ // Show the preview image.
121
+ echo '<div>';
122
+
123
+ // just in case. You never know.
124
+ if ( ! isset( $arrNum ) ) {
125
+ $this->value = '';
126
+ }
127
+
128
+ // Set the default image. To get the url from the default name,
129
+ // we save the array count from the for/each loop, when the default image
130
+ // is mark as selected. Since the for/each loop starts at one, we must
131
+ // substract one from the saved array number. We then pull the url
132
+ // out of the options array, and there we go.
133
+ if ( '' == $this->value ) {
134
+ echo '<img src="#" class="redux-preview-image" style="visibility:hidden;" id="image_' . $this->field['id'] . '">';
135
+ } else {
136
+ echo '<img src=' . $this->field['options'][ $arrNum - 1 ]['img'] . ' class="redux-preview-image" id="image_' . $this->field['id'] . '">';
137
+ }
138
+
139
+ // Close the <div> tag.
140
+ echo '</div>';
141
+ } else {
142
+
143
+ // No options specified. Really?
144
+ echo '<strong>' . __( 'No items of this type were found.', 'redux-framework' ) . '</strong>';
145
+ }
146
+ } //function
147
+
148
+ /**
149
+ * Enqueue Function.
150
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
151
+ *
152
+ * @since ReduxFramework 1.0.0
153
+ */
154
+ function enqueue() {
155
+ wp_enqueue_style( 'select2-css' );
156
+
157
+ wp_enqueue_script(
158
+ 'field-select-image-js',
159
+ ReduxFramework::$_url . 'inc/fields/select_image/field_select_image' . Redux_Functions::isMin() . '.js',
160
+ array('jquery', 'select2-js', 'redux-js'),
161
+ time(),
162
+ true
163
+ );
164
+
165
+ if ($this->parent->args['dev_mode']) {
166
+ wp_enqueue_style(
167
+ 'redux-field-select-image-css',
168
+ ReduxFramework::$_url . 'inc/fields/select_image/field_select_image.css',
169
+ array(),
170
+ time(),
171
+ 'all'
172
+ );
173
+ }
174
+ } //function
175
+ } //class
176
+ }
includes/options/redux-core/inc/fields/select_image/field_select_image.scss ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-select_image {
2
+ margin-top: 2px;
3
+ margin-left: 5px;
4
+ width: 100%;
5
+ margin-bottom: 0;
6
+ }
7
+
8
+ .redux-preview-image {
9
+ max-height: 250px;
10
+ max-width: 250px;
11
+ padding: 5px;
12
+ margin-top: 10px;
13
+ border: 1px solid #e3e3e3;
14
+ background: #f7f7f7;
15
+ -moz-border-radius: 3px;
16
+ -khtml-border-radius: 3px;
17
+ -webkit-border-radius: 3px;
18
+ border-radius: 3px;
19
+ }
includes/options/redux-core/inc/fields/slider/field_slider.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-slider .redux-slider-container{margin-left:25px;margin-right:25px;width:200px;display:inline-block;vertical-align:middle}.redux-container-slider .redux-slider-input,.redux-container-slider .redux-slider-select-one,.redux-container-slider .redux-slider-select-two{width:100px !important;text-align:center}.redux-container-slider .redux-slider-label{position:absolute;margin-left:-5px}.redux-container-slider .redux-slider-label-one{position:absolute;margin-left:-22px}.redux-container-slider .redux-slider-label-two{position:absolute;margin-top:-21px;margin-left:245px}@media screen and (max-width: 782px){.redux-container-slider input{display:inline-block !important}}@media screen and (max-width: 570px){.redux-container-slider{text-align:center}.redux-container-slider input,.redux-container-slider select,.redux-container-slider .redux-slider-label,.redux-container-slider .select2-container{display:block !important;position:inherit;margin:10px auto}.redux-container-slider .redux-slider-container{margin-top:3px;width:80%}}.wp-customizer .redux-container-slider .redux-slider-label{float:left;position:inherit;width:25%;text-align:center;margin-left:0}.wp-customizer .redux-container-slider .redux-slider-input,.wp-customizer .redux-container-slider .redux-slider-select-one,.wp-customizer .redux-container-slider .redux-slider-select-two{width:25% !important}.wp-customizer .redux-container-slider .redux-slider-container{width:70%;margin-right:0;margin-left:5%}
includes/options/redux-core/inc/fields/slider/field_slider.js ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.slider = redux.field_objects.slider || {};
8
+
9
+ $( document ).ready(
10
+ function() {
11
+
12
+ }
13
+ );
14
+
15
+ redux.field_objects.slider.init = function( selector ) {
16
+
17
+ if ( !selector ) {
18
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-slider:visible' );
19
+ }
20
+
21
+ $( selector ).each(
22
+ function() {
23
+ var el = $( this );
24
+ var parent = el;
25
+
26
+ if ( !el.hasClass( 'redux-field-container' ) ) {
27
+ parent = el.parents( '.redux-field-container:first' );
28
+ }
29
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
30
+ return;
31
+ }
32
+ if ( parent.hasClass( 'redux-field-init' ) ) {
33
+ parent.removeClass( 'redux-field-init' );
34
+ } else {
35
+ return;
36
+ }
37
+
38
+ el.find( 'div.redux-slider-container' ).each(
39
+ function() {
40
+
41
+ var start, toClass, defClassOne, defClassTwo, connectVal;
42
+ var DISPLAY_NONE = 0;
43
+ var DISPLAY_LABEL = 1;
44
+ var DISPLAY_TEXT = 2;
45
+ var DISPLAY_SELECT = 3;
46
+
47
+ var mainID = $( this ).data( 'id' );
48
+ var minVal = $( this ).data( 'min' );
49
+ var maxVal = $( this ).data( 'max' );
50
+ var stepVal = $( this ).data( 'step' );
51
+ var handles = $( this ).data( 'handles' );
52
+ var defValOne = $( this ).data( 'default-one' );
53
+ var defValTwo = $( this ).data( 'default-two' );
54
+ var resVal = $( this ).data( 'resolution' );
55
+ var displayValue = parseInt( ($( this ).data( 'display' )) );
56
+ var rtlVal = Boolean( $( this ).data( 'rtl' ) );
57
+ var floatMark = ($( this ).data( 'float-mark' ));
58
+ var forced = Boolean($( this ).data( 'forced' ));
59
+
60
+ var rtl;
61
+ if ( rtlVal === true ) {
62
+ rtl = 'rtl';
63
+ } else {
64
+ rtl = 'ltr';
65
+ }
66
+
67
+ // range array
68
+ var range = [minVal, maxVal];
69
+
70
+ // Set default values for dual slides.
71
+ var startTwo = [defValOne, defValTwo];
72
+
73
+ // Set default value for single slide
74
+ var startOne = [defValOne];
75
+
76
+ var inputOne, inputTwo;
77
+ if ( displayValue == DISPLAY_TEXT ) {
78
+ defClassOne = el.find( '.redux-slider-input-one-' + mainID );
79
+ defClassTwo = el.find( '.redux-slider-input-two-' + mainID );
80
+
81
+ inputOne = defClassOne;
82
+ inputTwo = defClassTwo;
83
+ } else if ( displayValue == DISPLAY_SELECT ) {
84
+ defClassOne = el.find( '.redux-slider-select-one-' + mainID );
85
+ defClassTwo = el.find( '.redux-slider-select-two-' + mainID );
86
+
87
+ redux.field_objects.slider.loadSelect( defClassOne, minVal, maxVal, resVal, stepVal );
88
+
89
+ if ( handles === 2 ) {
90
+ redux.field_objects.slider.loadSelect( defClassTwo, minVal, maxVal, resVal, stepVal );
91
+ }
92
+
93
+ } else if ( displayValue == DISPLAY_LABEL ) {
94
+ defClassOne = el.find( '#redux-slider-label-one-' + mainID );
95
+ defClassTwo = el.find( '#redux-slider-label-two-' + mainID );
96
+ } else if ( displayValue == DISPLAY_NONE ) {
97
+ defClassOne = el.find( '.redux-slider-value-one-' + mainID );
98
+ defClassTwo = el.find( '.redux-slider-value-two-' + mainID );
99
+ }
100
+
101
+ var classOne, classTwo;
102
+ if ( displayValue == DISPLAY_LABEL ) {
103
+ var x = [defClassOne, 'html'];
104
+ var y = [defClassTwo, 'html'];
105
+
106
+ classOne = [x];
107
+ classTwo = [x, y];
108
+ } else {
109
+ classOne = [defClassOne];
110
+ classTwo = [defClassOne, defClassTwo];
111
+ }
112
+
113
+ if ( handles === 2 ) {
114
+ start = startTwo;
115
+ toClass = classTwo;
116
+ connectVal = true;
117
+ } else {
118
+ start = startOne;
119
+ toClass = classOne;
120
+ connectVal = 'lower';
121
+ }
122
+
123
+ var slider = $( this ).noUiSlider(
124
+ {
125
+ range: range,
126
+ start: start,
127
+ handles: handles,
128
+ step: stepVal,
129
+ connect: connectVal,
130
+ behaviour: "tap-drag",
131
+ direction: rtl,
132
+ serialization: {
133
+ resolution: resVal,
134
+ to: toClass,
135
+ mark: floatMark,
136
+ },
137
+ slide: function() {
138
+ if ( displayValue == DISPLAY_LABEL ) {
139
+ if ( handles === 2 ) {
140
+ var inpSliderVal = slider.val();
141
+ el.find( 'input.redux-slider-value-one-' + mainID ).attr(
142
+ 'value', inpSliderVal[0]
143
+ );
144
+ el.find( 'input.redux-slider-value-two-' + mainID ).attr(
145
+ 'value', inpSliderVal[1]
146
+ );
147
+ } else {
148
+ el.find( 'input.redux-slider-value-one-' + mainID ).attr(
149
+ 'value', slider.val()
150
+ );
151
+ }
152
+ }
153
+
154
+ if ( displayValue == DISPLAY_SELECT ) {
155
+ if ( handles === 2 ) {
156
+ el.find( '.redux-slider-select-one' ).select2( 'val', slider.val()[0] );
157
+ el.find( '.redux-slider-select-two' ).select2( 'val', slider.val()[1] );
158
+ } else {
159
+ el.find( '.redux-slider-select-one' ).select2( 'val', slider.val() );
160
+ }
161
+ }
162
+
163
+ redux_change( $( this ).parents( '.redux-field-container:first' ).find( 'input' ) );
164
+ }
165
+ }
166
+ );
167
+
168
+ if ( displayValue === DISPLAY_TEXT ) {
169
+ inputOne.keydown(
170
+ function( e ) {
171
+
172
+ var sliderOne = slider.val();
173
+ var value = parseInt( sliderOne[0] );
174
+
175
+ switch ( e.which ) {
176
+ case 38:
177
+ slider.val( [value + 1, null] );
178
+ break;
179
+ case 40:
180
+ slider.val( [value - 1, null] );
181
+ break;
182
+ case 13:
183
+ e.preventDefault();
184
+ break;
185
+ }
186
+ }
187
+ );
188
+
189
+ if ( handles === 2 ) {
190
+ inputTwo.keydown(
191
+ function( e ) {
192
+ var sliderTwo = slider.val();
193
+ var value = parseInt( sliderTwo[1] );
194
+
195
+ switch ( e.which ) {
196
+ case 38:
197
+ slider.val( [null, value + 1] );
198
+ break;
199
+ case 40:
200
+ slider.val( [null, value - 1] );
201
+ break;
202
+ case 13:
203
+ e.preventDefault();
204
+ break;
205
+ }
206
+ }
207
+ );
208
+ }
209
+ }
210
+ }
211
+ );
212
+
213
+ var default_params = {
214
+ width: 'resolve',
215
+ triggerChange: true,
216
+ allowClear: true
217
+ };
218
+
219
+ var select2_handle = el.find( '.select2_params' );
220
+ if ( select2_handle.size() > 0 ) {
221
+ var select2_params = select2_handle.val();
222
+
223
+ select2_params = JSON.parse( select2_params );
224
+ default_params = $.extend( {}, default_params, select2_params );
225
+ }
226
+
227
+ el.find( 'select.redux-slider-select-one, select.redux-slider-select-two' ).select2( default_params );
228
+
229
+ }
230
+ );
231
+
232
+ };
233
+
234
+ // Return true for float value, false otherwise
235
+ redux.field_objects.slider.isFloat = function( mixed_var ) {
236
+ return +mixed_var === mixed_var && (!(isFinite( mixed_var ))) || Boolean( (mixed_var % 1) );
237
+ };
238
+
239
+ // Return number of integers after the decimal point.
240
+ redux.field_objects.slider.decimalCount = function( res ) {
241
+ var q = res.toString().split( '.' );
242
+ return q[1].length;
243
+ };
244
+
245
+ redux.field_objects.slider.loadSelect = function( myClass, min, max, res, step ) {
246
+
247
+ //var j = step + ((decCount ) - (step )); // 18;
248
+
249
+ for ( var i = min; i <= max; i = i + res ) {
250
+ //var step = 2;
251
+
252
+ //if (j === (step + ((decCount ) - (step )))) {
253
+ var n = i;
254
+ if ( redux.field_objects.slider.isFloat( res ) ) {
255
+ var decCount = redux.field_objects.slider.decimalCount( res );
256
+ n = i.toFixed( decCount );
257
+ }
258
+
259
+ $( myClass ).append(
260
+ '<option value="' + n + '">' + n + '</option>'
261
+ );
262
+ //j = 0;
263
+ //}
264
+ //j++;
265
+ }
266
+ };
267
+
268
+
269
+ })( jQuery );
includes/options/redux-core/inc/fields/slider/field_slider.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.slider=redux.field_objects.slider||{},a(document).ready(function(){}),redux.field_objects.slider.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-slider:visible")),a(b).each(function(){var b=a(this),c=b;if(b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),!c.is(":hidden")&&c.hasClass("redux-field-init")){c.removeClass("redux-field-init"),b.find("div.redux-slider-container").each(function(){var c,d,e,f,g,h,i=0,j=1,k=2,l=3,m=a(this).data("id"),n=a(this).data("min"),o=a(this).data("max"),p=a(this).data("step"),q=a(this).data("handles"),r=a(this).data("default-one"),s=a(this).data("default-two"),t=a(this).data("resolution"),u=parseInt(a(this).data("display")),v=Boolean(a(this).data("rtl")),w=a(this).data("float-mark");Boolean(a(this).data("forced"));h=v===!0?"rtl":"ltr";var x,y,z=[n,o],A=[r,s],B=[r];u==k?(e=b.find(".redux-slider-input-one-"+m),f=b.find(".redux-slider-input-two-"+m),x=e,y=f):u==l?(e=b.find(".redux-slider-select-one-"+m),f=b.find(".redux-slider-select-two-"+m),redux.field_objects.slider.loadSelect(e,n,o,t,p),2===q&&redux.field_objects.slider.loadSelect(f,n,o,t,p)):u==j?(e=b.find("#redux-slider-label-one-"+m),f=b.find("#redux-slider-label-two-"+m)):u==i&&(e=b.find(".redux-slider-value-one-"+m),f=b.find(".redux-slider-value-two-"+m));var C,D;if(u==j){var E=[e,"html"],F=[f,"html"];C=[E],D=[E,F]}else C=[e],D=[e,f];2===q?(c=A,d=D,g=!0):(c=B,d=C,g="lower");var G=a(this).noUiSlider({range:z,start:c,handles:q,step:p,connect:g,behaviour:"tap-drag",direction:h,serialization:{resolution:t,to:d,mark:w},slide:function(){if(u==j)if(2===q){var c=G.val();b.find("input.redux-slider-value-one-"+m).attr("value",c[0]),b.find("input.redux-slider-value-two-"+m).attr("value",c[1])}else b.find("input.redux-slider-value-one-"+m).attr("value",G.val());u==l&&(2===q?(b.find(".redux-slider-select-one").select2("val",G.val()[0]),b.find(".redux-slider-select-two").select2("val",G.val()[1])):b.find(".redux-slider-select-one").select2("val",G.val())),redux_change(a(this).parents(".redux-field-container:first").find("input"))}});u===k&&(x.keydown(function(a){var b=G.val(),c=parseInt(b[0]);switch(a.which){case 38:G.val([c+1,null]);break;case 40:G.val([c-1,null]);break;case 13:a.preventDefault()}}),2===q&&y.keydown(function(a){var b=G.val(),c=parseInt(b[1]);switch(a.which){case 38:G.val([null,c+1]);break;case 40:G.val([null,c-1]);break;case 13:a.preventDefault()}}))});var d={width:"resolve",triggerChange:!0,allowClear:!0},e=b.find(".select2_params");if(e.size()>0){var f=e.val();f=JSON.parse(f),d=a.extend({},d,f)}b.find("select.redux-slider-select-one, select.redux-slider-select-two").select2(d)}})},redux.field_objects.slider.isFloat=function(a){return+a===a&&!isFinite(a)||Boolean(a%1)},redux.field_objects.slider.decimalCount=function(a){var b=a.toString().split(".");return b[1].length},redux.field_objects.slider.loadSelect=function(b,c,d,e,f){for(var g=c;d>=g;g+=e){var h=g;if(redux.field_objects.slider.isFloat(e)){var i=redux.field_objects.slider.decimalCount(e);h=g.toFixed(i)}a(b).append('<option value="'+h+'">'+h+"</option>")}}}(jQuery);
includes/options/redux-core/inc/fields/slider/field_slider.php ADDED
@@ -0,0 +1,414 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Slider
17
+ * @author Kevin Provance (kprovance)
18
+ * @version 2.0.0
19
+ */
20
+
21
+ // Exit if accessed directly
22
+ if ( ! defined( 'ABSPATH' ) ) {
23
+ exit;
24
+ }
25
+
26
+ if ( ! class_exists( 'ReduxFramework_slider' ) ) {
27
+ class ReduxFramework_slider {
28
+
29
+ /**
30
+ * Field Constructor.
31
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
32
+ *
33
+ * @since ReduxFramework 3.1.8
34
+ */
35
+ private $display_none = 0;
36
+ private $display_label = 1;
37
+ private $display_text = 2;
38
+ private $display_select = 3;
39
+
40
+ function __construct( $field = array(), $value = '', $parent ) {
41
+
42
+ //parent::__construct( $parent->sections, $parent->args );
43
+ $this->parent = $parent;
44
+ $this->field = $field;
45
+ $this->value = $value;
46
+
47
+ // Set defaults
48
+ $defaults = array(
49
+ 'handles' => 1,
50
+ 'resolution' => 1,
51
+ 'display_value' => 'text',
52
+ 'float_mark' => '.',
53
+ 'forced' => true
54
+ );
55
+
56
+ $this->field = wp_parse_args( $this->field, $defaults );
57
+
58
+ // Sanitize float mark
59
+ switch ( $this->field['float_mark'] ) {
60
+ case ',':
61
+ case '.':
62
+ break;
63
+ default:
64
+ $this->field['float_mark'] = '.';
65
+ break;
66
+ }
67
+
68
+ // Sanitize resolution value
69
+ $this->field['resolution'] = $this->cleanVal( $this->field['resolution'] );
70
+
71
+ // Sanitize handle value
72
+ switch ( $this->field['handles'] ) {
73
+ case 0:
74
+ case 1:
75
+ $this->field['handles'] = 1;
76
+ break;
77
+ default:
78
+ $this->field['handles'] = 2;
79
+ break;
80
+ }
81
+
82
+ // Sanitize display value
83
+ switch ( $this->field['display_value'] ) {
84
+ case 'label':
85
+ $this->field['display_value'] = $this->display_label;
86
+ break;
87
+ case 'text':
88
+ default:
89
+ $this->field['display_value'] = $this->display_text;
90
+ break;
91
+ case 'select':
92
+ $this->field['display_value'] = $this->display_select;
93
+ break;
94
+ case 'none':
95
+ $this->field['display_value'] = $this->display_none;
96
+ break;
97
+ }
98
+ }
99
+
100
+ private function cleanVal( $var ) {
101
+ if ( is_float( $var ) ) {
102
+ $cleanVar = floatval( $var );
103
+ } else {
104
+ $cleanVar = intval( $var );
105
+ }
106
+
107
+ return $cleanVar;
108
+ }
109
+
110
+ private function cleanDefault( $val ) {
111
+ if ( empty( $val ) && ! empty( $this->field['default'] ) && $this->cleanVal( $this->field['min'] ) >= 1 ) {
112
+ $val = $this->cleanVal( $this->field['default'] );
113
+ }
114
+
115
+ if ( empty( $val ) && $this->cleanVal( $this->field['min'] ) >= 1 ) {
116
+ $val = $this->cleanVal( $this->field['min'] );
117
+ }
118
+
119
+ if ( empty( $val ) ) {
120
+ $val = 0;
121
+ }
122
+
123
+ // Extra Validation
124
+ if ( $val < $this->field['min'] ) {
125
+ $val = $this->cleanVal( $this->field['min'] );
126
+ } else if ( $val > $this->field['max'] ) {
127
+ $val = $this->cleanVal( $this->field['max'] );
128
+ }
129
+
130
+ return $val;
131
+ }
132
+
133
+ private function cleanDefaultArray( $val ) {
134
+ $one = $this->value[1];
135
+ $two = $this->value[2];
136
+
137
+ if ( empty( $one ) && ! empty( $this->field['default'][1] ) && $this->cleanVal( $this->field['min'] ) >= 1 ) {
138
+ $one = $this->cleanVal( $this->field['default'][1] );
139
+ }
140
+
141
+ if ( empty( $one ) && $this->cleanVal( $this->field['min'] ) >= 1 ) {
142
+ $one = $this->cleanVal( $this->field['min'] );
143
+ }
144
+
145
+ if ( empty( $one ) ) {
146
+ $one = 0;
147
+ }
148
+
149
+ if ( empty( $two ) && ! empty( $this->field['default'][2] ) && $this->cleanVal( $this->field['min'] ) >= 1 ) {
150
+ $two = $this->cleanVal( $this->field['default'][1] + 1 );
151
+ }
152
+
153
+ if ( empty( $two ) && $this->cleanVal( $this->field['min'] ) >= 1 ) {
154
+ $two = $this->cleanVal( $this->field['default'][1] + 1 );
155
+ }
156
+
157
+ if ( empty( $two ) ) {
158
+ $two = $this->field['default'][1] + 1;
159
+ }
160
+
161
+ $val[0] = $one;
162
+ $val[1] = $two;
163
+
164
+ return $val;
165
+ }
166
+
167
+
168
+ /**
169
+ * Clean the field data to the fields defaults given the parameters.
170
+ *
171
+ * @since Redux_Framework 3.1.8
172
+ */
173
+ function clean() {
174
+
175
+ // Set min to 0 if no value is set.
176
+ $this->field['min'] = empty( $this->field['min'] ) ? 0 : $this->cleanVal( $this->field['min'] );
177
+
178
+ // Set max to min + 1 if empty.
179
+ $this->field['max'] = empty( $this->field['max'] ) ? $this->field['min'] + 1 : $this->cleanVal( $this->field['max'] );
180
+
181
+ // Set step to 1 if step is empty ot step > max.
182
+ $this->field['step'] = empty( $this->field['step'] ) || $this->field['step'] > $this->field['max'] ? 1 : $this->cleanVal( $this->field['step'] );
183
+
184
+ if ( 2 == $this->field['handles'] ) {
185
+ if ( ! is_array( $this->value ) ) {
186
+ $this->value[1] = 0;
187
+ $this->value[2] = 1;
188
+ }
189
+ $this->value = $this->cleanDefaultArray( $this->value );
190
+ } else {
191
+ if ( is_array( $this->value ) ) {
192
+ $this->value = 0;
193
+ }
194
+ $this->value = $this->cleanDefault( $this->value );
195
+ }
196
+
197
+ // More dummy checks
198
+ //if ( ! is_array( $this->field['default'] ) && 2 == $this->field['handles'] ) {
199
+ if ( ! is_array( $this->value ) && 2 == $this->field['handles'] ) {
200
+ $this->value[0] = $this->field['min'];
201
+ $this->value[1] = $this->field['min'] + 1;
202
+ }
203
+
204
+ //if ( is_array( $this->field['default'] ) && 1 == $this->field['handles'] ) {
205
+ if ( is_array( $this->value ) && 1 == $this->field['handles'] ) {
206
+ $this->value = $this->field['min'];
207
+ }
208
+
209
+ }
210
+
211
+ /**
212
+ * Enqueue Function.
213
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
214
+ *
215
+ * @since ReduxFramework 3.1.8
216
+ */
217
+ function enqueue() {
218
+
219
+ $min = Redux_Functions::isMin();
220
+
221
+ wp_enqueue_style( 'select2-css' );
222
+
223
+ wp_enqueue_style(
224
+ 'redux-nouislider-css',
225
+ ReduxFramework::$_url . 'inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.css',
226
+ array(),
227
+ '5.0.0',
228
+ 'all'
229
+ );
230
+
231
+ wp_register_script(
232
+ 'redux-nouislider-js',
233
+ ReduxFramework::$_url . 'inc/fields/slider/vendor/nouislider/redux.jquery.nouislider' . $min . '.js',
234
+ array( 'jquery' ),
235
+ '5.0.0',
236
+ true
237
+ );
238
+
239
+ wp_enqueue_script(
240
+ 'redux-field-slider-js',
241
+ ReduxFramework::$_url . 'inc/fields/slider/field_slider' . $min . '.js',
242
+ array( 'jquery', 'redux-nouislider-js', 'redux-js', 'select2-js' ),
243
+ time(),
244
+ true
245
+ );
246
+
247
+ if ($this->parent->args['dev_mode']) {
248
+ wp_enqueue_style(
249
+ 'redux-field-slider-css',
250
+ ReduxFramework::$_url . 'inc/fields/slider/field_slider.css',
251
+ array(),
252
+ time(),
253
+ 'all'
254
+ );
255
+ }
256
+ }
257
+
258
+ //function
259
+
260
+ /**
261
+ * Field Render Function.
262
+ * Takes the vars and outputs the HTML for the field in the settings
263
+ *
264
+ * @since ReduxFramework 0.0.4
265
+ */
266
+ function render() {
267
+
268
+ $this->clean();
269
+
270
+ $fieldID = $this->field['id'];
271
+ $fieldName = $this->field['name'] . $this->field['name_suffix'];
272
+ //$fieldName = $this->parent->args['opt_name'] . '[' . $this->field['id'] . ']';
273
+
274
+ // Set handle number variable.
275
+ $twoHandles = false;
276
+ if ( 2 == $this->field['handles'] ) {
277
+ $twoHandles = true;
278
+ }
279
+
280
+ // Set default values(s)
281
+ if ( true == $twoHandles ) {
282
+ $valOne = $this->value[0];
283
+ $valTwo = $this->value[1];
284
+
285
+ $html = 'data-default-one="' . $valOne . '" ';
286
+ $html .= 'data-default-two="' . $valTwo . '" ';
287
+
288
+ $nameOne = $fieldName . '[1]';
289
+ $nameTwo = $fieldName . '[2]';
290
+
291
+ $idOne = $fieldID . '[1]';
292
+ $idTwo = $fieldID . '[2]';
293
+ } else {
294
+ $valOne = $this->value;
295
+ $valTwo = '';
296
+
297
+ $html = 'data-default-one="' . $valOne . '"';
298
+
299
+ $nameOne = $fieldName;
300
+ $nameTwo = '';
301
+
302
+ $idOne = $fieldID;
303
+ $idTwo = '';
304
+ }
305
+
306
+ $showInput = false;
307
+ $showLabel = false;
308
+ $showSelect = false;
309
+
310
+ // TEXT output
311
+ if ( $this->display_text == $this->field['display_value'] ) {
312
+ $showInput = true;
313
+ echo '<input type="text"
314
+ name="' . $nameOne . '"
315
+ id="' . $idOne . '"
316
+ value="' . $valOne . '"
317
+ class="redux-slider-input redux-slider-input-one-' . $fieldID . ' ' . $this->field['class'] . '"/>';
318
+
319
+ // LABEL output
320
+ } elseif ( $this->display_label == $this->field['display_value'] ) {
321
+ $showLabel = true;
322
+
323
+ $labelNum = $twoHandles ? '-one' : '';
324
+
325
+ echo '<div class="redux-slider-label' . $labelNum . '"
326
+ id="redux-slider-label-one-' . $fieldID . '"
327
+ name="' . $nameOne . '">
328
+ </div>';
329
+
330
+ // SELECT output
331
+ } elseif ( $this->display_select == $this->field['display_value'] ) {
332
+ $showSelect = true;
333
+
334
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
335
+ $select2_params = json_encode( $this->field['select2'] );
336
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
337
+
338
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
339
+ }
340
+
341
+
342
+ echo '<select class="redux-slider-select-one redux-slider-select-one-' . $fieldID . ' ' . $this->field['class'] . '"
343
+ name="' . $nameOne . '"
344
+ id="' . $idOne . '">
345
+ </select>';
346
+ }
347
+
348
+ // DIV output
349
+ echo
350
+ '<div
351
+ class="redux-slider-container ' . $this->field['class'] . '"
352
+ id="' . $fieldID . '"
353
+ data-id="' . $fieldID . '"
354
+ data-min="' . $this->field['min'] . '"
355
+ data-max="' . $this->field['max'] . '"
356
+ data-step="' . $this->field['step'] . '"
357
+ data-handles="' . $this->field['handles'] . '"
358
+ data-display="' . $this->field['display_value'] . '"
359
+ data-rtl="' . is_rtl() . '"
360
+ data-forced="' . $this->field['forced'] . '"
361
+ data-float-mark="' . $this->field['float_mark'] . '"
362
+ data-resolution="' . $this->field['resolution'] . '" ' . $html . '>
363
+ </div>';
364
+
365
+ // Double slider output
366
+ if ( true == $twoHandles ) {
367
+
368
+ // TEXT
369
+ if ( true == $showInput ) {
370
+ echo '<input type="text"
371
+ name="' . $nameTwo . '"
372
+ id="' . $idTwo . '"
373
+ value="' . $valTwo . '"
374
+ class="redux-slider-input redux-slider-input-two-' . $fieldID . ' ' . $this->field['class'] . '"/>';
375
+ }
376
+
377
+ // LABEL
378
+ if ( true == $showLabel ) {
379
+ echo '<div class="redux-slider-label-two"
380
+ id="redux-slider-label-two-' . $fieldID . '"
381
+ name="' . $nameTwo . '">
382
+ </div>';
383
+ }
384
+
385
+ // SELECT
386
+ if ( true == $showSelect ) {
387
+ echo '<select class="redux-slider-select-two redux-slider-select-two-' . $fieldID . ' ' . $this->field['class'] . '"
388
+ name="' . $nameTwo . '"
389
+ id="' . $idTwo . '">
390
+ </select>';
391
+
392
+ }
393
+ }
394
+
395
+ // NO output (input hidden)
396
+ if ( $this->display_none == $this->field['display_value'] || $this->display_label == $this->field['display_value'] ) {
397
+ echo '<input type="hidden"
398
+ class="redux-slider-value-one-' . $fieldID . ' ' . $this->field['class'] . '"
399
+ name="' . $nameOne . '"
400
+ id="' . $idOne . '"
401
+ value="' . $valOne . '"/>';
402
+
403
+ // double slider hidden output
404
+ if ( true == $twoHandles ) {
405
+ echo '<input type="hidden"
406
+ class="redux-slider-value-two-' . $fieldID . ' ' . $this->field['class'] . '"
407
+ name="' . $nameTwo . '"
408
+ id="' . $idTwo . '"
409
+ value="' . $valTwo . '"/>';
410
+ }
411
+ }
412
+ }
413
+ }
414
+ }
includes/options/redux-core/inc/fields/slider/field_slider.scss ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-slider {
2
+ .redux-slider-container {
3
+ margin-left: 25px;
4
+ margin-right: 25px;
5
+ width: 200px;
6
+ display: inline-block;
7
+ vertical-align: middle;
8
+ }
9
+
10
+ .redux-slider-input,
11
+ .redux-slider-select-one,
12
+ .redux-slider-select-two {
13
+ width: 100px !important;
14
+ text-align: center;
15
+ }
16
+
17
+ .redux-slider-label {
18
+ position: absolute;
19
+ margin-left: -5px;
20
+ }
21
+
22
+ .redux-slider-label-one {
23
+ position: absolute;
24
+ margin-left: -22px;
25
+ }
26
+
27
+ .redux-slider-label-two {
28
+ position: absolute;
29
+ margin-top: -21px;
30
+ margin-left: 245px;
31
+ }
32
+ }
33
+
34
+ @media screen and (max-width: 782px) {
35
+ .redux-container-slider {
36
+ input {
37
+ display: inline-block !important;
38
+ }
39
+ }
40
+ }
41
+
42
+ // Select Slider
43
+ @media screen and (max-width: 570px) {
44
+ .redux-container-slider {
45
+ text-align: center;
46
+
47
+ input,
48
+ select,
49
+ .redux-slider-label,
50
+ .select2-container {
51
+ display: block !important;
52
+ position: inherit;
53
+ margin: 10px auto;
54
+ }
55
+
56
+ .redux-slider-container {
57
+ margin-top: 3px;
58
+ width: 80%;
59
+ }
60
+ }
61
+ }
62
+
63
+ .wp-customizer {
64
+ .redux-container-slider {
65
+ .redux-slider-label {
66
+ float: left;
67
+ position: inherit;
68
+ width: 25%;
69
+ text-align: center;
70
+ margin-left:0;
71
+ }
72
+ .redux-slider-input, .redux-slider-select-one, .redux-slider-select-two {
73
+ width: 25% !important;
74
+ }
75
+ .redux-slider-container {
76
+ width: 70%;
77
+ margin-right: 0;
78
+ margin-left: 5%;
79
+ }
80
+ }
81
+ }
includes/options/redux-core/inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.css ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Functional styling;
3
+ * These styles are required for noUiSlider to function.
4
+ * You don't need to change these rules to apply your design.
5
+ */
6
+ .noUi-target,
7
+ .noUi-target * {
8
+ -webkit-touch-callout: none;
9
+ -webkit-user-select: none;
10
+ -ms-touch-action: none;
11
+ -ms-user-select: none;
12
+ -moz-user-select: none;
13
+ -moz-box-sizing: border-box;
14
+ box-sizing: border-box;
15
+ }
16
+ .noUi-base {
17
+ width: 100%;
18
+ height: 100%;
19
+ position: relative;
20
+ }
21
+ .noUi-origin {
22
+ position: absolute;
23
+ right: 0;
24
+ top: 0;
25
+ left: 0;
26
+ bottom: 0;
27
+ }
28
+ .noUi-handle {
29
+ position: relative;
30
+ z-index: 1;
31
+ }
32
+ .noUi-stacking .noUi-handle {
33
+ /* This class is applied to the lower origin when
34
+ its values is > 50%. */
35
+ z-index: 10;
36
+ }
37
+ .noUi-stacking + .noUi-origin {
38
+ /* Fix stacking order in IE7, which incorrectly
39
+ creates a new context for the origins. */
40
+ *z-index: -1;
41
+ }
42
+ .noUi-state-tap .noUi-origin {
43
+ -webkit-transition: left 0.3s, top 0.3s;
44
+ transition: left 0.3s, top 0.3s;
45
+ }
46
+ .noUi-state-drag * {
47
+ cursor: inherit !important;
48
+ }
49
+
50
+ /* Slider size and handle placement;
51
+ */
52
+ .noUi-horizontal {
53
+ height: 18px;
54
+ }
55
+ .noUi-horizontal .noUi-handle {
56
+ width: 34px;
57
+ height: 28px;
58
+ left: -17px;
59
+ top: -6px;
60
+ }
61
+ .noUi-horizontal.noUi-extended {
62
+ padding: 0 15px;
63
+ }
64
+ .noUi-horizontal.noUi-extended .noUi-origin {
65
+ right: -15px;
66
+ }
67
+ .noUi-vertical {
68
+ width: 18px;
69
+ }
70
+ .noUi-vertical .noUi-handle {
71
+ width: 28px;
72
+ height: 34px;
73
+ left: -6px;
74
+ top: -17px;
75
+ }
76
+ .noUi-vertical.noUi-extended {
77
+ padding: 15px 0;
78
+ }
79
+ .noUi-vertical.noUi-extended .noUi-origin {
80
+ bottom: -15px;
81
+ }
82
+
83
+ /* Styling;
84
+ */
85
+ .noUi-background {
86
+ background: #FAFAFA;
87
+ box-shadow: inset 0 1px 1px #f0f0f0;
88
+ }
89
+ .noUi-connect {
90
+ background: #3FB8AF;
91
+ box-shadow: inset 0 0 3px rgba(51,51,51,0.45);
92
+ -webkit-transition: background 450ms;
93
+ transition: background 450ms;
94
+ }
95
+ .noUi-origin {
96
+ border-radius: 2px;
97
+ }
98
+ .noUi-target {
99
+ border-radius: 4px;
100
+ border: 1px solid #D3D3D3;
101
+ box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB;
102
+ }
103
+ .noUi-target.noUi-connect {
104
+ box-shadow: inset 0 0 3px rgba(51,51,51,0.45), 0 3px 6px -5px #BBB;
105
+ }
106
+
107
+ /* Handles and cursors;
108
+ */
109
+ .noUi-dragable {
110
+ cursor: w-resize;
111
+ }
112
+ .noUi-vertical .noUi-dragable {
113
+ cursor: n-resize;
114
+ }
115
+ .noUi-handle {
116
+ border: 1px solid #D9D9D9;
117
+ border-radius: 3px;
118
+ background: #FFF;
119
+ cursor: default;
120
+ box-shadow: inset 0 0 1px #FFF,
121
+ inset 0 1px 7px #EBEBEB,
122
+ 0 3px 6px -3px #BBB;
123
+ }
124
+ .noUi-active {
125
+ box-shadow: inset 0 0 1px #FFF,
126
+ inset 0 1px 7px #DDD,
127
+ 0 3px 6px -3px #BBB;
128
+ }
129
+
130
+ /* Handle stripes;
131
+ */
132
+ .noUi-handle:before,
133
+ .noUi-handle:after {
134
+ content: "";
135
+ display: block;
136
+ position: absolute;
137
+ height: 14px;
138
+ width: 1px;
139
+ background: #E8E7E6;
140
+ left: 14px;
141
+ top: 6px;
142
+ }
143
+ .noUi-handle:after {
144
+ left: 17px;
145
+ }
146
+ .noUi-vertical .noUi-handle:before,
147
+ .noUi-vertical .noUi-handle:after {
148
+ width: 14px;
149
+ height: 1px;
150
+ left: 6px;
151
+ top: 14px;
152
+ }
153
+ .noUi-vertical .noUi-handle:after {
154
+ top: 17px;
155
+ }
156
+
157
+ /* Disabled state;
158
+ */
159
+ [disabled].noUi-connect,
160
+ [disabled] .noUi-connect {
161
+ background: #B8B8B8;
162
+ }
163
+ [disabled] .noUi-handle {
164
+ cursor: not-allowed;
165
+ }
166
+
167
+ /* Blocked state;
168
+ */
169
+ .noUi-state-blocked.noUi-connect,
170
+ .noUi-state-blocked .noUi-connect {
171
+ background: #4FDACF;
172
+ }
includes/options/redux-core/inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.js ADDED
@@ -0,0 +1,1420 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! $.noUiSlider
2
+ @version 5.0.0
3
+ @author Leon Gersen https://twitter.com/LeonGersen
4
+ @license WTFPL http://www.wtfpl.net/about/
5
+ @documentation http://refreshless.com/nouislider/
6
+ */
7
+
8
+ // ==ClosureCompiler==
9
+ // @externs_url http://refreshless.com/externs/jquery-1.8.js
10
+ // @compilation_level ADVANCED_OPTIMIZATIONS
11
+ // @warning_level VERBOSE
12
+ // ==/ClosureCompiler==
13
+
14
+ /*jshint laxcomma: true */
15
+ /*jshint smarttabs: true */
16
+ /*jshint sub: true */
17
+
18
+ /*jslint browser: true */
19
+ /*jslint continue: true */
20
+ /*jslint plusplus: true */
21
+ /*jslint white: true */
22
+ /*jslint sub: true */
23
+
24
+ (function( $ ){
25
+
26
+ 'use strict';
27
+
28
+ if ( $['zepto'] && !$.fn.removeData ) {
29
+ throw new ReferenceError('Zepto is loaded without the data module.');
30
+ }
31
+
32
+ $.fn['noUiSlider'] = function( options, rebuild ){
33
+
34
+ var
35
+ // Cache the document and body selectors;
36
+ doc = $(document)
37
+ ,body = $('body')
38
+
39
+ // Namespace for binding and unbinding slider events;
40
+ ,namespace = '.nui'
41
+
42
+ // Copy of the current value function;
43
+ ,$VAL = $.fn.val
44
+
45
+ // Re-usable list of classes;
46
+ ,clsList = [
47
+ /* 0 */ 'noUi-base'
48
+ /* 1 */ ,'noUi-origin'
49
+ /* 2 */ ,'noUi-handle'
50
+ /* 3 */ ,'noUi-input'
51
+ /* 4 */ ,'noUi-active'
52
+ /* 5 */ ,'noUi-state-tap'
53
+ /* 6 */ ,'noUi-target'
54
+ /* 7 */ ,'-lower'
55
+ /* 8 */ ,'-upper'
56
+ /* 9 */ ,'noUi-connect'
57
+ /* 10 */ ,'noUi-horizontal'
58
+ /* 11 */ ,'noUi-vertical'
59
+ /* 12 */ ,'noUi-background'
60
+ /* 13 */ ,'noUi-stacking'
61
+ /* 14 */ ,'noUi-block'
62
+ /* 15 */ ,'noUi-state-blocked'
63
+ /* 16 */ ,'noUi-ltr'
64
+ /* 17 */ ,'noUi-rtl'
65
+ /* 18 */ ,'noUi-dragable'
66
+ /* 19 */ ,'noUi-extended'
67
+ /* 20 */ ,'noUi-state-drag'
68
+ ]
69
+
70
+ // Determine the events to bind. IE11 implements pointerEvents without
71
+ // a prefix, which breaks compatibility with the IE10 implementation.
72
+ ,actions = window.navigator['pointerEnabled'] ? {
73
+ start: 'pointerdown'
74
+ ,move: 'pointermove'
75
+ ,end: 'pointerup'
76
+ } : window.navigator['msPointerEnabled'] ? {
77
+ start: 'MSPointerDown'
78
+ ,move: 'MSPointerMove'
79
+ ,end: 'MSPointerUp'
80
+ } : {
81
+ start: 'mousedown touchstart'
82
+ ,move: 'mousemove touchmove'
83
+ ,end: 'mouseup touchend'
84
+ };
85
+
86
+
87
+ // Percentage calculation
88
+
89
+ // (percentage) How many percent is this value of this range?
90
+ function fromPercentage ( range, value ) {
91
+ return (value * 100) / ( range[1] - range[0] );
92
+ }
93
+
94
+ // (percentage) Where is this value on this range?
95
+ function toPercentage ( range, value ) {
96
+ return fromPercentage( range, range[0] < 0 ?
97
+ value + Math.abs(range[0]) :
98
+ value - range[0] );
99
+ }
100
+
101
+ // (value) How much is this percentage on this range?
102
+ function isPercentage ( range, value ) {
103
+ return ((value * ( range[1] - range[0] )) / 100) + range[0];
104
+ }
105
+
106
+
107
+ // Type tests
108
+
109
+ // Test in an object is an instance of jQuery or Zepto.
110
+ function isInstance ( a ) {
111
+ return a instanceof $ || ( $['zepto'] && $['zepto']['isZ'](a) );
112
+ }
113
+
114
+ // Checks whether a value is numerical.
115
+ function isNumeric ( a ) {
116
+ return !isNaN( parseFloat( a ) ) && isFinite( a );
117
+ }
118
+
119
+
120
+ // General helper functions
121
+
122
+ // Test an array of objects, and calls them if they are a function.
123
+ function call ( functions, scope ) {
124
+
125
+ // Allow the passing of an unwrapped function.
126
+ // Leaves other code a more comprehensible.
127
+ if( !$.isArray( functions ) ){
128
+ functions = [ functions ];
129
+ }
130
+
131
+ $.each( functions, function(){
132
+ if (typeof this === 'function') {
133
+ this.call(scope);
134
+ }
135
+ });
136
+ }
137
+
138
+ // Returns a proxy to set a target using the public value method.
139
+ function setN ( target, number ) {
140
+
141
+ return function(){
142
+
143
+ // Determine the correct position to set,
144
+ // leave the other one unchanged.
145
+ var val = [null, null];
146
+ val[ number ] = $(this).val();
147
+
148
+ // Trigger the 'set' callback
149
+ target.val(val, true);
150
+ };
151
+ }
152
+
153
+ // Round a value to the closest 'to'.
154
+ function closest ( value, to ){
155
+ return Math.round(value / to) * to;
156
+ }
157
+
158
+ // Format output value to specified standards.
159
+ function format ( value, options ) {
160
+
161
+ // Round the value to the resolution that was set
162
+ // with the serialization options.
163
+ value = value.toFixed( options['decimals'] );
164
+
165
+ // Rounding away decimals might cause a value of -0
166
+ // when using very small ranges. Remove those cases.
167
+ if ( parseFloat(value) === 0 ) {
168
+ value = value.replace('-0', '0');
169
+ }
170
+
171
+ // Apply the proper decimal mark to the value.
172
+ return value.replace( '.', options['serialization']['mark'] );
173
+ }
174
+
175
+ // Determine the handle closest to an event.
176
+ function closestHandle ( handles, location, style ) {
177
+
178
+ if ( handles.length === 1 ) {
179
+ return handles[0];
180
+ }
181
+
182
+ var total = handles[0].offset()[style] +
183
+ handles[1].offset()[style];
184
+
185
+ return handles[ location < total / 2 ? 0 : 1 ];
186
+ }
187
+
188
+ // Round away small numbers in floating point implementation.
189
+ function digits ( value, round ) {
190
+ return parseFloat(value.toFixed(round));
191
+ }
192
+
193
+ // Event abstraction
194
+
195
+ // Provide a clean event with standardized offset values.
196
+ function fixEvent ( e ) {
197
+
198
+ // Prevent scrolling and panning on touch events, while
199
+ // attempting to slide. The tap event also depends on this.
200
+ e.preventDefault();
201
+
202
+ // Filter the event to register the type, which can be
203
+ // touch, mouse or pointer. Offset changes need to be
204
+ // made on an event specific basis.
205
+ var touch = e.type.indexOf('touch') === 0
206
+ ,mouse = e.type.indexOf('mouse') === 0
207
+ ,pointer = e.type.indexOf('pointer') === 0
208
+ ,x,y, event = e;
209
+
210
+ // IE10 implemented pointer events with a prefix;
211
+ if ( e.type.indexOf('MSPointer') === 0 ) {
212
+ pointer = true;
213
+ }
214
+
215
+ // Get the originalEvent, if the event has been wrapped
216
+ // by jQuery. Zepto doesn't wrap the event.
217
+ if ( e.originalEvent ) {
218
+ e = e.originalEvent;
219
+ }
220
+
221
+ if ( touch ) {
222
+ // noUiSlider supports one movement at a time,
223
+ // so we can select the first 'changedTouch'.
224
+ x = e.changedTouches[0].pageX;
225
+ y = e.changedTouches[0].pageY;
226
+ }
227
+ if ( mouse || pointer ) {
228
+
229
+ // Polyfill the pageXOffset and pageYOffset
230
+ // variables for IE7 and IE8;
231
+ if( !pointer && window.pageXOffset === undefined ){
232
+ window.pageXOffset = document.documentElement.scrollLeft;
233
+ window.pageYOffset = document.documentElement.scrollTop;
234
+ }
235
+
236
+ x = e.clientX + window.pageXOffset;
237
+ y = e.clientY + window.pageYOffset;
238
+ }
239
+
240
+ return $.extend( event, {
241
+ 'pointX': x
242
+ ,'pointY': y
243
+ ,cursor: mouse
244
+ });
245
+ }
246
+
247
+ // Handler for attaching events trough a proxy
248
+ function attach ( events, element, callback, pass ) {
249
+
250
+ var target = pass.target;
251
+
252
+ // Add the noUiSlider namespace to all events.
253
+ events = events.replace( /\s/g, namespace + ' ' ) + namespace;
254
+
255
+ // Bind a closure on the target.
256
+ return element.on( events, function( e ){
257
+
258
+ // jQuery and Zepto handle unset attributes differently.
259
+ var disabled = target.attr('disabled');
260
+ disabled = !( disabled === undefined || disabled === null );
261
+
262
+ // Test if there is anything that should prevent an event
263
+ // from being handled, such as a disabled state or an active
264
+ // 'tap' transition.
265
+ if( target.hasClass('noUi-state-tap') || disabled ) {
266
+ return false;
267
+ }
268
+
269
+ // Call the event handler with three arguments:
270
+ // - The event;
271
+ // - An object with data for the event;
272
+ // - The slider options;
273
+ // Having the slider options as a function parameter prevents
274
+ // getting it in every function, which muddies things up.
275
+ callback (
276
+ fixEvent( e )
277
+ ,pass
278
+ ,target.data('base').data('options')
279
+ );
280
+ });
281
+ }
282
+
283
+
284
+ // Serialization and value storage
285
+
286
+ // Store a value on all serialization targets, or get the current value.
287
+ function serialize ( a ) {
288
+
289
+ /*jshint validthis: true */
290
+
291
+ // Re-scope target for availability within .each;
292
+ var target = this.target;
293
+
294
+ // Get the value for this handle
295
+ if ( a === undefined ) {
296
+ return this.element.data('value');
297
+ }
298
+
299
+ // Write the value to all serialization objects
300
+ // or store a new value on the handle
301
+ if ( a === true ) {
302
+ a = this.element.data('value');
303
+ } else {
304
+ this.element.data('value', a);
305
+ }
306
+
307
+ // Prevent a serialization call if the value wasn't initialized.
308
+ if ( a === undefined ) {
309
+ return;
310
+ }
311
+
312
+ // If the provided element was a function,
313
+ // call it with the slider as scope. Otherwise,
314
+ // simply call the function on the object.
315
+ $.each( this.elements, function() {
316
+ if ( typeof this === 'function' ) {
317
+ this.call(target, a);
318
+ } else {
319
+ this[0][this[1]](a);
320
+ }
321
+ });
322
+ }
323
+
324
+ // Map serialization to [ element, method ]. Attach events where required.
325
+ function storeElement ( handle, item, number ) {
326
+
327
+ // Add a change event to the supplied jQuery objects,
328
+ // which triggers the value-setting function on the target.
329
+ if ( isInstance( item ) ) {
330
+
331
+ var elements = [], target = handle.data('target');
332
+
333
+ // Link the field to the other handle if the
334
+ // slider is inverted.
335
+ if ( handle.data('options').direction ) {
336
+ number = number ? 0 : 1;
337
+ }
338
+
339
+ // Loop all items so the change event is properly bound,
340
+ // and the items can individually be added to the array.
341
+ item.each(function(){
342
+
343
+ // Bind the change event.
344
+ $(this).on('change' + namespace, setN( target, number ));
345
+
346
+ // Store the element with the proper handler.
347
+ elements.push([ $(this), 'val' ]);
348
+ });
349
+
350
+ return elements;
351
+ }
352
+
353
+ // Append a new input to the noUiSlider base.
354
+ // Prevent the change event from flowing upward.
355
+ if ( typeof item === 'string' ) {
356
+
357
+ item = [ $('<input type="hidden" name="'+ item +'">')
358
+ .appendTo(handle)
359
+ .addClass(clsList[3])
360
+ .change(function ( e ) {
361
+ e.stopPropagation();
362
+ }), 'val'];
363
+ }
364
+
365
+ return [item];
366
+ }
367
+
368
+ // Access point and abstraction for serialization.
369
+ function store ( handle, i, serialization ) {
370
+
371
+ var elements = [];
372
+
373
+ // Loops all items in the provided serialization setting,
374
+ // add the proper events to them or create new input fields,
375
+ // and add them as data to the handle so they can be kept
376
+ // in sync with the slider value.
377
+ $.each( serialization['to'][i], function( index ){
378
+ elements = elements.concat(
379
+ storeElement( handle, serialization['to'][i][index], i )
380
+ );
381
+ });
382
+
383
+ return {
384
+ element: handle
385
+ ,elements: elements
386
+ ,target: handle.data('target')
387
+ ,'val': serialize
388
+ };
389
+ }
390
+
391
+
392
+ // Handle placement
393
+
394
+ // Fire callback on unsuccessful handle movement.
395
+ function block ( base, stateless ) {
396
+
397
+ var target = base.data('target');
398
+
399
+ if ( !target.hasClass(clsList[14]) ){
400
+
401
+ // The visual effects should not always be applied.
402
+ if ( !stateless ) {
403
+ target.addClass(clsList[15]);
404
+ setTimeout(function(){
405
+ target.removeClass(clsList[15]);
406
+ }, 450);
407
+ }
408
+
409
+ target.addClass(clsList[14]);
410
+ call( base.data('options').block, target );
411
+ }
412
+ }
413
+
414
+ // Change inline style and apply proper classes.
415
+ function placeHandle ( handle, to ) {
416
+
417
+ var settings = handle.data('options');
418
+
419
+ to = digits(to, 7);
420
+
421
+ // If the slider can move, remove the class
422
+ // indicating the block state.
423
+ handle.data('target').removeClass(clsList[14]);
424
+
425
+ // Set handle to new location
426
+ handle.css( settings['style'], to + '%' ).data('pct', to);
427
+
428
+ // Force proper handle stacking
429
+ if ( handle.is(':first-child') ) {
430
+ handle.toggleClass(clsList[13], to > 50 );
431
+ }
432
+
433
+ if ( settings['direction'] ) {
434
+ to = 100 - to;
435
+ }
436
+
437
+ // Write the value to the serialization object.
438
+ handle.data('store').val(
439
+ format ( isPercentage( settings['range'], to ), settings )
440
+ );
441
+ }
442
+
443
+ // Test suggested values and apply margin, step.
444
+ function setHandle ( handle, to ) {
445
+
446
+ var base = handle.data('base'), settings = base.data('options'),
447
+ handles = base.data('handles'), lower = 0, upper = 100;
448
+
449
+ // Catch invalid user input
450
+ if ( !isNumeric( to ) ){
451
+ return false;
452
+ }
453
+
454
+ // Handle the step option.
455
+ if ( settings['step'] ){
456
+ to = closest( to, settings['step'] );
457
+ }
458
+
459
+ if ( handles.length > 1 ){
460
+ if ( handle[0] !== handles[0][0] ) {
461
+ lower = digits(handles[0].data('pct')+settings['margin'],7);
462
+ } else {
463
+ upper = digits(handles[1].data('pct')-settings['margin'],7);
464
+ }
465
+ }
466
+
467
+ // Limit position to boundaries. When the handles aren't set yet,
468
+ // they return -1 as a percentage value.
469
+ to = Math.min( Math.max( to, lower ), upper < 0 ? 100 : upper );
470
+
471
+ // Stop handling this call if the handle can't move past another.
472
+ // Return an array containing the hit limit, so the caller can
473
+ // provide feedback. ( block callback ).
474
+ if ( to === handle.data('pct') ) {
475
+ return [!lower ? false : lower, upper === 100 ? false : upper];
476
+ }
477
+
478
+ placeHandle ( handle, to );
479
+ return true;
480
+ }
481
+
482
+ // Handles movement by tapping
483
+ function jump ( base, handle, to, callbacks ) {
484
+
485
+ // Flag the slider as it is now in a transitional state.
486
+ // Transition takes 300 ms, so re-enable the slider afterwards.
487
+ base.addClass(clsList[5]);
488
+ setTimeout(function(){
489
+ base.removeClass(clsList[5]);
490
+ }, 300);
491
+
492
+ // Move the handle to the new position.
493
+ setHandle( handle, to );
494
+
495
+ // Trigger the 'slide' and 'set' callbacks,
496
+ // pass the target so that it is 'this'.
497
+ call( callbacks, base.data('target') );
498
+
499
+ base.data('target').change();
500
+ }
501
+
502
+
503
+ // Event handlers
504
+
505
+ // Handle movement on document for handle and range drag.
506
+ function move ( event, Dt, Op ) {
507
+
508
+ // Map event movement to a slider percentage.
509
+ var handles = Dt.handles, limits,
510
+ proposal = event[ Dt.point ] - Dt.start[ Dt.point ];
511
+
512
+ proposal = ( proposal * 100 ) / Dt.size;
513
+
514
+ if ( handles.length === 1 ) {
515
+
516
+ // Run handle placement, receive true for success or an
517
+ // array with potential limits.
518
+ limits = setHandle( handles[0], Dt.positions[0] + proposal );
519
+
520
+ if ( limits !== true ) {
521
+
522
+ if ( $.inArray ( handles[0].data('pct'), limits ) >= 0 ){
523
+ block ( Dt.base, !Op['margin'] );
524
+ }
525
+ return;
526
+ }
527
+
528
+ } else {
529
+
530
+ // Dragging the range could be implemented by forcing the
531
+ // 'move' event on both handles, but this solution proved
532
+ // lagging on slower devices, resulting in range errors. The
533
+ // slightly ugly solution below is considerably faster, and
534
+ // it can't move the handle out of sync. Bypass the standard
535
+ // setting method, as other checks are needed.
536
+
537
+ var l1, u1, l2, u2;
538
+
539
+ // Round the proposal to the step setting.
540
+ if ( Op['step'] ) {
541
+ proposal = closest( proposal, Op['step'] );
542
+ }
543
+
544
+ // Determine the new position, store it twice. Once for
545
+ // limiting, once for checking whether placement should occur.
546
+ l1 = l2 = Dt.positions[0] + proposal;
547
+ u1 = u2 = Dt.positions[1] + proposal;
548
+
549
+ // Round the values within a sensible range.
550
+ if ( l1 < 0 ) {
551
+ u1 += -1 * l1;
552
+ l1 = 0;
553
+ } else if ( u1 > 100 ) {
554
+ l1 -= ( u1 - 100 );
555
+ u1 = 100;
556
+ }
557
+
558
+ // Don't perform placement if no handles are to be changed.
559
+ // Check if the lowest value is set to zero.
560
+ if ( l2 < 0 && !l1 && !handles[0].data('pct') ) {
561
+ return;
562
+ }
563
+ // The highest value is limited to 100%.
564
+ if ( u1 === 100 && u2 > 100 && handles[1].data('pct') === 100 ){
565
+ return;
566
+ }
567
+
568
+ placeHandle ( handles[0], l1 );
569
+ placeHandle ( handles[1], u1 );
570
+ }
571
+
572
+ // Trigger the 'slide' event, if the handle was moved.
573
+ call( Op['slide'], Dt.target );
574
+ }
575
+
576
+ // Unbind move events on document, call callbacks.
577
+ function end ( event, Dt, Op ) {
578
+
579
+ // The handle is no longer active, so remove the class.
580
+ if ( Dt.handles.length === 1 ) {
581
+ Dt.handles[0].data('grab').removeClass(clsList[4]);
582
+ }
583
+
584
+ // Remove cursor styles and text-selection events bound to the body.
585
+ if ( event.cursor ) {
586
+ body.css('cursor', '').off( namespace );
587
+ }
588
+
589
+ // Unbind the move and end events, which are added on 'start'.
590
+ doc.off( namespace );
591
+
592
+ // Trigger the change event.
593
+ Dt.target.removeClass( clsList[14] +' '+ clsList[20]).change();
594
+
595
+ // Trigger the 'end' callback.
596
+ call( Op['set'], Dt.target );
597
+ }
598
+
599
+ // Bind move events on document.
600
+ function start ( event, Dt, Op ) {
601
+
602
+ // Mark the handle as 'active' so it can be styled.
603
+ if( Dt.handles.length === 1 ) {
604
+ Dt.handles[0].data('grab').addClass(clsList[4]);
605
+ }
606
+
607
+ // A drag should never propagate up to the 'tap' event.
608
+ event.stopPropagation();
609
+
610
+ // Attach the move event.
611
+ attach ( actions.move, doc, move, {
612
+ start: event
613
+ ,base: Dt.base
614
+ ,target: Dt.target
615
+ ,handles: Dt.handles
616
+ ,positions: [ Dt.handles[0].data('pct')
617
+ ,Dt.handles[ Dt.handles.length - 1 ].data('pct') ]
618
+ ,point: Op['orientation'] ? 'pointY' : 'pointX'
619
+ ,size: Op['orientation'] ? Dt.base.height() : Dt.base.width()
620
+ });
621
+
622
+ // Unbind all movement when the drag ends.
623
+ attach ( actions.end, doc, end, {
624
+ target: Dt.target
625
+ ,handles: Dt.handles
626
+ });
627
+
628
+ // Text selection isn't an issue on touch devices,
629
+ // so adding additional callbacks isn't required.
630
+ if ( event.cursor ) {
631
+
632
+ // Prevent the 'I' cursor and extend the range-drag cursor.
633
+ body.css('cursor', $(event.target).css('cursor'));
634
+
635
+ // Mark the target with a dragging state.
636
+ if ( Dt.handles.length > 1 ) {
637
+ Dt.target.addClass(clsList[20]);
638
+ }
639
+
640
+ // Prevent text selection when dragging the handles.
641
+ body.on('selectstart' + namespace, function( ){
642
+ return false;
643
+ });
644
+ }
645
+ }
646
+
647
+ // Move closest handle to tapped location.
648
+ function tap ( event, Dt, Op ) {
649
+
650
+ var base = Dt.base, handle, to, point, size;
651
+
652
+ // The tap event shouldn't propagate up to trigger 'edge'.
653
+ event.stopPropagation();
654
+
655
+ // Determine the direction of the slider.
656
+ if ( Op['orientation'] ) {
657
+ point = event['pointY'];
658
+ size = base.height();
659
+ } else {
660
+ point = event['pointX'];
661
+ size = base.width();
662
+ }
663
+
664
+ // Find the closest handle and calculate the tapped point.
665
+ handle = closestHandle( base.data('handles'), point, Op['style'] );
666
+ to = (( point - base.offset()[ Op['style'] ] ) * 100 ) / size;
667
+
668
+ // The set handle to the new position.
669
+ jump( base, handle, to, [ Op['slide'], Op['set'] ]);
670
+ }
671
+
672
+ // Move handle to edges when target gets tapped.
673
+ function edge ( event, Dt, Op ) {
674
+
675
+ var handles = Dt.base.data('handles'), to, i;
676
+
677
+ i = Op['orientation'] ? event['pointY'] : event['pointX'];
678
+ i = i < Dt.base.offset()[Op['style']];
679
+
680
+ to = i ? 0 : 100;
681
+ i = i ? 0 : handles.length - 1;
682
+
683
+ jump ( Dt.base, handles[i], to, [ Op['slide'], Op['set'] ]);
684
+ }
685
+
686
+ // API
687
+
688
+ // Validate and standardize input.
689
+ function test ( input, sliders ){
690
+
691
+ /* Every input option is tested and parsed. This'll prevent
692
+ endless validation in internal methods. These tests are
693
+ structured with an item for every option available. An
694
+ option can be marked as required by setting the 'r' flag.
695
+ The testing function is provided with three arguments:
696
+ - The provided value for the option;
697
+ - A reference to the options object;
698
+ - The name for the option;
699
+
700
+ The testing function returns false when an error is detected,
701
+ or true when everything is OK. It can also modify the option
702
+ object, to make sure all values can be correctly looped elsewhere. */
703
+
704
+ function values ( a ) {
705
+
706
+ if ( a.length !== 2 ){
707
+ return false;
708
+ }
709
+
710
+ // Convert the array to floats
711
+ a = [ parseFloat(a[0]), parseFloat(a[1]) ];
712
+
713
+ // Test if all values are numerical
714
+ if( !isNumeric(a[0]) || !isNumeric(a[1]) ){
715
+ return false;
716
+ }
717
+
718
+ // The lowest value must really be the lowest value.
719
+ if( a[1] < a[0] ){
720
+ return false;
721
+ }
722
+
723
+ return a;
724
+ }
725
+
726
+ var serialization = {
727
+ resolution: function(q,o){
728
+
729
+ // Parse the syntactic sugar that is the serialization
730
+ // resolution option to a usable integer.
731
+ // Checking for a string '1', since the resolution needs
732
+ // to be cast to a string to split in on the period.
733
+ switch( q ){
734
+ case 1:
735
+ case 0.1:
736
+ case 0.01:
737
+ case 0.001:
738
+ case 0.0001:
739
+ case 0.00001:
740
+ q = q.toString().split('.');
741
+ o['decimals'] = q[0] === '1' ? 0 : q[1].length;
742
+ break;
743
+ case undefined:
744
+ o['decimals'] = 2;
745
+ break;
746
+ default:
747
+ return false;
748
+ }
749
+
750
+ return true;
751
+ }
752
+ ,mark: function(q,o,w){
753
+
754
+ if ( !q ) {
755
+ o[w]['mark'] = '.';
756
+ return true;
757
+ }
758
+
759
+ switch( q ){
760
+ case '.':
761
+ case ',':
762
+ return true;
763
+ default:
764
+ return false;
765
+ }
766
+ }
767
+ ,to: function(q,o,w){
768
+
769
+ // Checks whether a variable is a candidate to be a
770
+ // valid serialization target.
771
+ function ser(r){
772
+ return isInstance ( r ) ||
773
+ typeof r === 'string' ||
774
+ typeof r === 'function' ||
775
+ r === false ||
776
+ ( isInstance ( r[0] ) &&
777
+ typeof r[0][r[1]] === 'function' );
778
+ }
779
+
780
+ // Flatten the serialization array into a reliable
781
+ // set of elements, which can be tested and looped.
782
+ function filter ( value ) {
783
+
784
+ var items = [[],[]];
785
+
786
+ // If a single value is provided it can be pushed
787
+ // immediately.
788
+ if ( ser(value) ) {
789
+ items[0].push(value);
790
+ } else {
791
+
792
+ // Otherwise, determine whether this is an
793
+ // array of single elements or sets.
794
+ $.each(value, function(i, val) {
795
+
796
+ // Don't handle an overflow of elements.
797
+ if( i > 1 ){
798
+ return;
799
+ }
800
+
801
+ // Decide if this is a group or not
802
+ if( ser(val) ){
803
+ items[i].push(val);
804
+ } else {
805
+ items[i] = items[i].concat(val);
806
+ }
807
+ });
808
+ }
809
+
810
+ return items;
811
+ }
812
+
813
+ if ( !q ) {
814
+ o[w]['to'] = [[],[]];
815
+ } else {
816
+
817
+ var i, j;
818
+
819
+ // Flatten the serialization array
820
+ q = filter ( q );
821
+
822
+ // Reverse the API for RTL sliders.
823
+ if ( o['direction'] && q[1].length ) {
824
+ q.reverse();
825
+ }
826
+
827
+ // Test all elements in the flattened array.
828
+ for ( i = 0; i < o['handles']; i++ ) {
829
+ for ( j = 0; j < q[i].length; j++ ) {
830
+
831
+ // Return false on invalid input
832
+ if( !ser(q[i][j]) ){
833
+ return false;
834
+ }
835
+
836
+ // Remove 'false' elements, since those
837
+ // won't be handled anyway.
838
+ if( !q[i][j] ){
839
+ q[i].splice(j, 1);
840
+ }
841
+ }
842
+ }
843
+
844
+ // Write the new values back
845
+ o[w]['to'] = q;
846
+ }
847
+
848
+ return true;
849
+ }
850
+ }, tests = {
851
+ /* Handles.
852
+ * Has default, can be 1 or 2.
853
+ */
854
+ 'handles': {
855
+ 'r': true
856
+ ,'t': function(q){
857
+ q = parseInt(q, 10);
858
+ return ( q === 1 || q === 2 );
859
+ }
860
+ }
861
+ /* Range.
862
+ * Must be an array of two numerical floats,
863
+ * which can't be identical.
864
+ */
865
+ ,'range': {
866
+ 'r': true
867
+ ,'t': function(q,o,w){
868
+
869
+ o[w] = values(q);
870
+
871
+ // The values can't be identical.
872
+ return o[w] && o[w][0] !== o[w][1];
873
+ }
874
+ }
875
+ /* Start.
876
+ * Must be an array of two numerical floats when handles = 2;
877
+ * Uses 'range' test.
878
+ * When handles = 1, a single float is also allowed.
879
+ */
880
+ ,'start': {
881
+ 'r': true
882
+ ,'t': function(q,o,w){
883
+ if( o['handles'] === 1 ){
884
+ if( $.isArray(q) ){
885
+ q = q[0];
886
+ }
887
+ q = parseFloat(q);
888
+ o.start = [q];
889
+ return isNumeric(q);
890
+ }
891
+
892
+ o[w] = values(q);
893
+ return !!o[w];
894
+ }
895
+ }
896
+ /* Connect.
897
+ * Must be true or false when handles = 2;
898
+ * Can use 'lower' and 'upper' when handles = 1.
899
+ */
900
+ ,'connect': {
901
+ 'r': true
902
+ ,'t': function(q,o,w){
903
+
904
+ if ( q === 'lower' ) {
905
+ o[w] = 1;
906
+ } else if ( q === 'upper' ) {
907
+ o[w] = 2;
908
+ } else if ( q === true ) {
909
+ o[w] = 3;
910
+ } else if ( q === false ) {
911
+ o[w] = 0;
912
+ } else {
913
+ return false;
914
+ }
915
+
916
+ return true;
917
+ }
918
+ }
919
+ /* Connect.
920
+ * Will default to horizontal, not required.
921
+ */
922
+ ,'orientation': {
923
+ 't': function(q,o,w){
924
+ switch (q){
925
+ case 'horizontal':
926
+ o[w] = 0;
927
+ break;
928
+ case 'vertical':
929
+ o[w] = 1;
930
+ break;
931
+ default: return false;
932
+ }
933
+ return true;
934
+ }
935
+ }
936
+ /* Margin.
937
+ * Must be a float, has a default value.
938
+ */
939
+ ,'margin': {
940
+ 'r': true
941
+ ,'t': function(q,o,w){
942
+ q = parseFloat(q);
943
+ o[w] = fromPercentage(o['range'], q);
944
+ return isNumeric(q);
945
+ }
946
+ }
947
+ /* Direction.
948
+ * Required, can be 'ltr' or 'rtl'.
949
+ */
950
+ ,'direction': {
951
+ 'r': true
952
+ ,'t': function(q,o,w){
953
+
954
+ switch ( q ) {
955
+ case 'ltr': o[w] = 0;
956
+ break;
957
+ case 'rtl': o[w] = 1;
958
+ // Invert connection for RTL sliders;
959
+ o['connect'] = [0,2,1,3][o['connect']];
960
+ break;
961
+ default:
962
+ return false;
963
+ }
964
+
965
+ return true;
966
+ }
967
+ }
968
+ /* Behaviour.
969
+ * Required, defines responses to tapping and
970
+ * dragging elements.
971
+ */
972
+ ,'behaviour': {
973
+ 'r': true
974
+ ,'t': function(q,o,w){
975
+
976
+ o[w] = {
977
+ 'tap': q !== (q = q.replace('tap', ''))
978
+ ,'extend': q !== (q = q.replace('extend', ''))
979
+ ,'drag': q !== (q = q.replace('drag', ''))
980
+ ,'fixed': q !== (q = q.replace('fixed', ''))
981
+ };
982
+
983
+ return !q.replace('none','').replace(/\-/g,'');
984
+ }
985
+ }
986
+ /* Serialization.
987
+ * Required, but has default. Must be an array
988
+ * when using two handles, can be a single value when using
989
+ * one handle. 'mark' can be period (.) or comma (,).
990
+ */
991
+ ,'serialization': {
992
+ 'r': true
993
+ ,'t': function(q,o,w){
994
+
995
+ return serialization.to( q['to'], o, w ) &&
996
+ serialization.resolution( q['resolution'], o ) &&
997
+ serialization.mark( q['mark'], o, w );
998
+ }
999
+ }
1000
+ /* Slide.
1001
+ * Not required. Must be a function.
1002
+ */
1003
+ ,'slide': {
1004
+ 't': function(q){
1005
+ return $.isFunction(q);
1006
+ }
1007
+ }
1008
+ /* Set.
1009
+ * Not required. Must be a function.
1010
+ * Tested using the 'slide' test.
1011
+ */
1012
+ ,'set': {
1013
+ 't': function(q){
1014
+ return $.isFunction(q);
1015
+ }
1016
+ }
1017
+ /* Block.
1018
+ * Not required. Must be a function.
1019
+ * Tested using the 'slide' test.
1020
+ */
1021
+ ,'block': {
1022
+ 't': function(q){
1023
+ return $.isFunction(q);
1024
+ }
1025
+ }
1026
+ /* Step.
1027
+ * Not required.
1028
+ */
1029
+ ,'step': {
1030
+ 't': function(q,o,w){
1031
+ q = parseFloat(q);
1032
+ o[w] = fromPercentage ( o['range'], q );
1033
+ return isNumeric(q);
1034
+ }
1035
+ }
1036
+ };
1037
+
1038
+ $.each( tests, function( name, test ){
1039
+
1040
+ /*jslint devel: true */
1041
+
1042
+ var value = input[name], isSet = value !== undefined;
1043
+
1044
+ // If the value is required but not set, fail.
1045
+ if( ( test['r'] && !isSet ) ||
1046
+ // If the test returns false, fail.
1047
+ ( isSet && !test['t']( value, input, name ) ) ){
1048
+
1049
+ // For debugging purposes it might be very useful to know
1050
+ // what option caused the trouble. Since throwing an error
1051
+ // will prevent further script execution, log the error
1052
+ // first. Test for console, as it might not be available.
1053
+ if( console && console.log && console.group ){
1054
+ console.group( 'Invalid noUiSlider initialisation:' );
1055
+ console.log( 'Option:\t', name );
1056
+ console.log( 'Value:\t', value );
1057
+ console.log( 'Slider(s):\t', sliders );
1058
+ console.groupEnd();
1059
+ }
1060
+
1061
+ throw new RangeError('noUiSlider');
1062
+ }
1063
+ });
1064
+ }
1065
+
1066
+ // Parse options, add classes, attach events, create HTML.
1067
+ function create ( options ) {
1068
+
1069
+ /*jshint validthis: true */
1070
+
1071
+ // Store the original set of options on all targets,
1072
+ // so they can be re-used and re-tested later.
1073
+ // Make sure to break the relation with the options,
1074
+ // which will be changed by the 'test' function.
1075
+ this.data('options', $.extend(true, {}, options));
1076
+
1077
+ // Set defaults where applicable;
1078
+ options = $.extend({
1079
+ 'handles': 2
1080
+ ,'margin': 0
1081
+ ,'connect': false
1082
+ ,'direction': 'ltr'
1083
+ ,'behaviour': 'tap'
1084
+ ,'orientation': 'horizontal'
1085
+ }, options);
1086
+
1087
+ // Make sure the test for serialization runs.
1088
+ options['serialization'] = options['serialization'] || {};
1089
+
1090
+ // Run all options through a testing mechanism to ensure correct
1091
+ // input. The test function will throw errors, so there is
1092
+ // no need to capture the result of this call. It should be noted
1093
+ // that options might get modified to be handled properly. E.g.
1094
+ // wrapping integers in arrays.
1095
+ test( options, this );
1096
+
1097
+ // Pre-define the styles.
1098
+ options['style'] = options['orientation'] ? 'top' : 'left';
1099
+
1100
+ return this.each(function(){
1101
+
1102
+ var target = $(this), i, dragable, handles = [], handle,
1103
+ base = $('<div/>').appendTo(target);
1104
+
1105
+ // Throw an error if the slider was already initialized.
1106
+ if ( target.data('base') ) {
1107
+ throw new Error('Slider was already initialized.');
1108
+ }
1109
+
1110
+ // Apply classes and data to the target.
1111
+ target.data('base', base).addClass([
1112
+ clsList[6]
1113
+ ,clsList[16 + options['direction']]
1114
+ ,clsList[10 + options['orientation']] ].join(' '));
1115
+
1116
+ for (i = 0; i < options['handles']; i++ ) {
1117
+
1118
+ handle = $('<div><div/></div>').appendTo(base);
1119
+
1120
+ // Add all default and option-specific classes to the
1121
+ // origins and handles.
1122
+ handle.addClass( clsList[1] );
1123
+
1124
+ handle.children().addClass([
1125
+ clsList[2]
1126
+ ,clsList[2] + clsList[ 7 + options['direction'] +
1127
+ ( options['direction'] ? -1 * i : i ) ]].join(' ') );
1128
+
1129
+ // Make sure every handle has access to all variables.
1130
+ handle.data({
1131
+ 'base': base
1132
+ ,'target': target
1133
+ ,'options': options
1134
+ ,'grab': handle.children()
1135
+ ,'pct': -1
1136
+ }).attr('data-style', options['style']);
1137
+
1138
+ // Every handle has a storage point, which takes care
1139
+ // of triggering the proper serialization callbacks.
1140
+ handle.data({
1141
+ 'store': store(handle, i, options['serialization'])
1142
+ });
1143
+
1144
+ // Store handles on the base
1145
+ handles.push(handle);
1146
+ }
1147
+
1148
+ // Apply the required connection classes to the elements
1149
+ // that need them. Some classes are made up for several
1150
+ // segments listed in the class list, to allow easy
1151
+ // renaming and provide a minor compression benefit.
1152
+ switch ( options['connect'] ) {
1153
+ case 1: target.addClass( clsList[9] );
1154
+ handles[0].addClass( clsList[12] );
1155
+ break;
1156
+ case 3: handles[1].addClass( clsList[12] );
1157
+ /* falls through */
1158
+ case 2: handles[0].addClass( clsList[9] );
1159
+ /* falls through */
1160
+ case 0: target.addClass(clsList[12]);
1161
+ break;
1162
+ }
1163
+
1164
+ // Merge base classes with default,
1165
+ // and store relevant data on the base element.
1166
+ base.addClass( clsList[0] ).data({
1167
+ 'target': target
1168
+ ,'options': options
1169
+ ,'handles': handles
1170
+ });
1171
+
1172
+ // Use the public value method to set the start values.
1173
+ target.val( options['start'] );
1174
+
1175
+ // Attach the standard drag event to the handles.
1176
+ if ( !options['behaviour']['fixed'] ) {
1177
+ for ( i = 0; i < handles.length; i++ ) {
1178
+
1179
+ // These events are only bound to the visual handle
1180
+ // element, not the 'real' origin element.
1181
+ attach ( actions.start, handles[i].children(), start, {
1182
+ base: base
1183
+ ,target: target
1184
+ ,handles: [ handles[i] ]
1185
+ });
1186
+ }
1187
+ }
1188
+
1189
+ // Attach the tap event to the slider base.
1190
+ if ( options['behaviour']['tap'] ) {
1191
+ attach ( actions.start, base, tap, {
1192
+ base: base
1193
+ ,target: target
1194
+ });
1195
+ }
1196
+
1197
+ // Extend tapping behaviour to target
1198
+ if ( options['behaviour']['extend'] ) {
1199
+
1200
+ target.addClass( clsList[19] );
1201
+
1202
+ if ( options['behaviour']['tap'] ) {
1203
+ attach ( actions.start, target, edge, {
1204
+ base: base
1205
+ ,target: target
1206
+ });
1207
+ }
1208
+ }
1209
+
1210
+ // Make the range dragable.
1211
+ if ( options['behaviour']['drag'] ){
1212
+
1213
+ dragable = base.find('.'+clsList[9]).addClass(clsList[18]);
1214
+
1215
+ // When the range is fixed, the entire range can
1216
+ // be dragged by the handles. The handle in the first
1217
+ // origin will propagate the start event upward,
1218
+ // but it needs to be bound manually on the other.
1219
+ if ( options['behaviour']['fixed'] ) {
1220
+ dragable = dragable
1221
+ .add( base.children().not(dragable).data('grab') );
1222
+ }
1223
+
1224
+ attach ( actions.start, dragable, start, {
1225
+ base: base
1226
+ ,target: target
1227
+ ,handles: handles
1228
+ });
1229
+ }
1230
+ });
1231
+ }
1232
+
1233
+ // Return value for the slider, relative to 'range'.
1234
+ function getValue ( ) {
1235
+
1236
+ /*jshint validthis: true */
1237
+
1238
+ var base = $(this).data('base'), answer = [];
1239
+
1240
+ // Loop the handles, and get the value from the input
1241
+ // for every handle on its' own.
1242
+ $.each( base.data('handles'), function(){
1243
+ answer.push( $(this).data('store').val() );
1244
+ });
1245
+
1246
+ // If the slider has just one handle, return a single value.
1247
+ // Otherwise, return an array, which is in reverse order
1248
+ // if the slider is used RTL.
1249
+ if ( answer.length === 1 ) {
1250
+ return answer[0];
1251
+ }
1252
+
1253
+ if ( base.data('options').direction ) {
1254
+ return answer.reverse();
1255
+ }
1256
+
1257
+ return answer;
1258
+ }
1259
+
1260
+ // Set value for the slider, relative to 'range'.
1261
+ function setValue ( args, set ) {
1262
+
1263
+ /*jshint validthis: true */
1264
+
1265
+ // If the value is to be set to a number, which is valid
1266
+ // when using a one-handle slider, wrap it in an array.
1267
+ if( !$.isArray(args) ){
1268
+ args = [args];
1269
+ }
1270
+
1271
+ // Setting is handled properly for each slider in the data set.
1272
+ return this.each(function(){
1273
+
1274
+ var b = $(this).data('base'), to, i,
1275
+ handles = Array.prototype.slice.call(b.data('handles'),0),
1276
+ settings = b.data('options');
1277
+
1278
+ // If there are multiple handles to be set run the setting
1279
+ // mechanism twice for the first handle, to make sure it
1280
+ // can be bounced of the second one properly.
1281
+ if ( handles.length > 1) {
1282
+ handles[2] = handles[0];
1283
+ }
1284
+
1285
+ // The RTL settings is implemented by reversing the front-end,
1286
+ // internal mechanisms are the same.
1287
+ if ( settings['direction'] ) {
1288
+ args.reverse();
1289
+ }
1290
+
1291
+ for ( i = 0; i < handles.length; i++ ){
1292
+
1293
+ // Calculate a new position for the handle.
1294
+ to = args[ i%2 ];
1295
+
1296
+ // The set request might want to ignore this handle.
1297
+ // Test for 'undefined' too, as a two-handle slider
1298
+ // can still be set with an integer.
1299
+ if( to === null || to === undefined ) {
1300
+ continue;
1301
+ }
1302
+
1303
+ // Add support for the comma (,) as a decimal symbol.
1304
+ // Replace it by a period so it is handled properly by
1305
+ // parseFloat. Omitting this would result in a removal
1306
+ // of decimals. This way, the developer can also
1307
+ // input a comma separated string.
1308
+ if( $.type(to) === 'string' ) {
1309
+ to = to.replace(',', '.');
1310
+ }
1311
+
1312
+ // Calculate the new handle position
1313
+ to = toPercentage( settings['range'], parseFloat( to ) );
1314
+
1315
+ // Invert the value if this is an right-to-left slider.
1316
+ if ( settings['direction'] ) {
1317
+ to = 100 - to;
1318
+ }
1319
+
1320
+ // If the value of the input doesn't match the slider,
1321
+ // reset it. Sometimes the input is changed to a value the
1322
+ // slider has rejected. This can occur when using 'select'
1323
+ // or 'input[type="number"]' elements. In this case, set
1324
+ // the value back to the input.
1325
+ if ( setHandle( handles[i], to ) !== true ){
1326
+ handles[i].data('store').val( true );
1327
+ }
1328
+
1329
+ // Optionally trigger the 'set' event.
1330
+ if( set === true ) {
1331
+ call( settings['set'], $(this) );
1332
+ }
1333
+ }
1334
+ });
1335
+ }
1336
+
1337
+ // Unbind all attached events, remove classed and HTML.
1338
+ function destroy ( target ) {
1339
+
1340
+ // Start the list of elements to be unbound with the target.
1341
+ var elements = [[target,'']];
1342
+
1343
+ // Get the fields bound to both handles.
1344
+ $.each(target.data('base').data('handles'), function(){
1345
+ elements = elements.concat( $(this).data('store').elements );
1346
+ });
1347
+
1348
+ // Remove all events added by noUiSlider.
1349
+ $.each(elements, function(){
1350
+ if( this.length > 1 ){
1351
+ this[0].off( namespace );
1352
+ }
1353
+ });
1354
+
1355
+ // Remove all classes from the target.
1356
+ target.removeClass(clsList.join(' '));
1357
+
1358
+ // Empty the target and remove all data.
1359
+ target.empty().removeData('base options');
1360
+ }
1361
+
1362
+ // Merge options with current initialization, destroy slider
1363
+ // and reinitialize.
1364
+ function build ( options ) {
1365
+
1366
+ /*jshint validthis: true */
1367
+
1368
+ return this.each(function(){
1369
+
1370
+ // When uninitialised, jQuery will return '',
1371
+ // Zepto returns undefined. Both are falsy.
1372
+ var values = $(this).val() || false,
1373
+ current = $(this).data('options'),
1374
+ // Extend the current setup with the new options.
1375
+ setup = $.extend( {}, current, options );
1376
+
1377
+ // If there was a slider initialised, remove it first.
1378
+ if ( values !== false ) {
1379
+ destroy( $(this) );
1380
+ }
1381
+
1382
+ // Make the destroy method publicly accessible.
1383
+ if( !options ) {
1384
+ return;
1385
+ }
1386
+
1387
+ // Create a new slider
1388
+ $(this)['noUiSlider']( setup );
1389
+
1390
+ // Set the slider values back. If the start options changed,
1391
+ // it gets precedence.
1392
+ if ( values !== false && setup.start === current.start ) {
1393
+ $(this).val( values );
1394
+ }
1395
+ });
1396
+ }
1397
+
1398
+ // Overwrite the native jQuery value function
1399
+ // with a simple handler. noUiSlider will use the internal
1400
+ // value method, anything else will use the standard method.
1401
+ $.fn.val = function(){
1402
+
1403
+ // If the function is called without arguments,
1404
+ // act as a 'getter'. Call the getValue function
1405
+ // in the same scope as this call.
1406
+ if ( this.hasClass( clsList[6] ) ){
1407
+ return arguments.length ?
1408
+ setValue.apply( this, arguments ) :
1409
+ getValue.apply( this );
1410
+ }
1411
+
1412
+ // If this isn't noUiSlider, continue with jQuery's
1413
+ // original method.
1414
+ return $VAL.apply( this, arguments );
1415
+ };
1416
+
1417
+ return ( rebuild ? build : create ).call( this, options );
1418
+ };
1419
+
1420
+ }( window['jQuery'] || window['Zepto'] ));
includes/options/redux-core/inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.min.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(f){if(f.zepto&&!f.fn.removeData)throw new ReferenceError("Zepto is loaded without the data module.");f.fn.noUiSlider=function(C,D){function s(a,b){return 100*b/(a[1]-a[0])}function E(a,b){return b*(a[1]-a[0])/100+a[0]}function t(a){return a instanceof f||f.zepto&&f.zepto.isZ(a)}function n(a){return!isNaN(parseFloat(a))&&isFinite(a)}function r(a,b){f.isArray(a)||(a=[a]);f.each(a,function(){"function"===typeof this&&this.call(b)})}function F(a,b){return function(){var c=[null,null];c[b]=f(this).val();
2
+ a.val(c,!0)}}function G(a,b){a=a.toFixed(b.decimals);0===parseFloat(a)&&(a=a.replace("-0","0"));return a.replace(".",b.serialization.mark)}function u(a){return parseFloat(a.toFixed(7))}function p(a,b,c,d){var e=d.target;a=a.replace(/\s/g,h+" ")+h;b.on(a,function(a){var b=e.attr("disabled");if(e.hasClass("noUi-state-tap")||void 0!==b&&null!==b)return!1;var g;a.preventDefault();var b=0===a.type.indexOf("touch"),h=0===a.type.indexOf("mouse"),l=0===a.type.indexOf("pointer"),v,H=a;0===a.type.indexOf("MSPointer")&&
3
+ (l=!0);a.originalEvent&&(a=a.originalEvent);b&&(g=a.changedTouches[0].pageX,v=a.changedTouches[0].pageY);if(h||l)l||void 0!==window.pageXOffset||(window.pageXOffset=document.documentElement.scrollLeft,window.pageYOffset=document.documentElement.scrollTop),g=a.clientX+window.pageXOffset,v=a.clientY+window.pageYOffset;g=f.extend(H,{pointX:g,pointY:v,cursor:h});c(g,d,e.data("base").data("options"))})}function I(a){var b=this.target;if(void 0===a)return this.element.data("value");!0===a?a=this.element.data("value"):
4
+ this.element.data("value",a);void 0!==a&&f.each(this.elements,function(){if("function"===typeof this)this.call(b,a);else this[0][this[1]](a)})}function J(a,b,c){if(t(b)){var d=[],e=a.data("target");a.data("options").direction&&(c=c?0:1);b.each(function(){f(this).on("change"+h,F(e,c));d.push([f(this),"val"])});return d}"string"===typeof b&&(b=[f('<input type="hidden" name="'+b+'">').appendTo(a).addClass(g[3]).change(function(a){a.stopPropagation()}),"val"]);return[b]}function K(a,b,c){var d=[];f.each(c.to[b],
5
+ function(e){d=d.concat(J(a,c.to[b][e],b))});return{element:a,elements:d,target:a.data("target"),val:I}}function L(a,b){var c=a.data("target");c.hasClass(g[14])||(b||(c.addClass(g[15]),setTimeout(function(){c.removeClass(g[15])},450)),c.addClass(g[14]),r(a.data("options").h,c))}function w(a,b){var c=a.data("options");b=u(b);a.data("target").removeClass(g[14]);a.css(c.style,b+"%").data("pct",b);a.is(":first-child")&&a.toggleClass(g[13],50<b);c.direction&&(b=100-b);a.data("store").val(G(E(c.range,b),
6
+ c))}function x(a,b){var c=a.data("base"),d=c.data("options"),c=c.data("handles"),e=0,k=100;if(!n(b))return!1;if(d.step){var m=d.step;b=Math.round(b/m)*m}1<c.length&&(a[0]!==c[0][0]?e=u(c[0].data("pct")+d.margin):k=u(c[1].data("pct")-d.margin));b=Math.min(Math.max(b,e),0>k?100:k);if(b===a.data("pct"))return[e?e:!1,100===k?!1:k];w(a,b);return!0}function A(a,b,c,d){a.addClass(g[5]);setTimeout(function(){a.removeClass(g[5])},300);x(b,c);r(d,a.data("target"));a.data("target").change()}function M(a,b,c){var d=
7
+ b.a,e=a[b.d]-b.start[b.d],e=100*e/b.size;if(1===d.length){if(a=x(d[0],b.c[0]+e),!0!==a){0<=f.inArray(d[0].data("pct"),a)&&L(b.b,!c.margin);return}}else{var k,m;c.step&&(a=c.step,e=Math.round(e/a)*a);a=k=b.c[0]+e;e=m=b.c[1]+e;0>a?(e+=-1*a,a=0):100<e&&(a-=e-100,e=100);if(0>k&&!a&&!d[0].data("pct")||100===e&&100<m&&100===d[1].data("pct"))return;w(d[0],a);w(d[1],e)}r(c.slide,b.target)}function N(a,b,c){1===b.a.length&&b.a[0].data("grab").removeClass(g[4]);a.cursor&&y.css("cursor","").off(h);z.off(h);
8
+ b.target.removeClass(g[14]+" "+g[20]).change();r(c.set,b.target)}function B(a,b,c){1===b.a.length&&b.a[0].data("grab").addClass(g[4]);a.stopPropagation();p(q.move,z,M,{start:a,b:b.b,target:b.target,a:b.a,c:[b.a[0].data("pct"),b.a[b.a.length-1].data("pct")],d:c.orientation?"pointY":"pointX",size:c.orientation?b.b.height():b.b.width()});p(q.end,z,N,{target:b.target,a:b.a});a.cursor&&(y.css("cursor",f(a.target).css("cursor")),1<b.a.length&&b.target.addClass(g[20]),y.on("selectstart"+h,function(){return!1}))}
9
+ function O(a,b,c){b=b.b;var d,e;a.stopPropagation();c.orientation?(a=a.pointY,e=b.height()):(a=a.pointX,e=b.width());d=b.data("handles");var k=a,m=c.style;1===d.length?d=d[0]:(m=d[0].offset()[m]+d[1].offset()[m],d=d[k<m/2?0:1]);a=100*(a-b.offset()[c.style])/e;A(b,d,a,[c.slide,c.set])}function P(a,b,c){var d=b.b.data("handles"),e;e=c.orientation?a.pointY:a.pointX;a=(e=e<b.b.offset()[c.style])?0:100;e=e?0:d.length-1;A(b.b,d[e],a,[c.slide,c.set])}function Q(a,b){function c(a){if(2!==a.length)return!1;
10
+ a=[parseFloat(a[0]),parseFloat(a[1])];return!n(a[0])||!n(a[1])||a[1]<a[0]?!1:a}var d={f:function(a,b){switch(a){case 1:case 0.1:case 0.01:case 0.001:case 1E-4:case 1E-5:a=a.toString().split(".");b.decimals="1"===a[0]?0:a[1].length;break;case void 0:b.decimals=2;break;default:return!1}return!0},e:function(a,b,c){if(!a)return b[c].mark=".",!0;switch(a){case ".":case ",":return!0;default:return!1}},g:function(a,b,c){function d(a){return t(a)||"string"===typeof a||"function"===typeof a||!1===a||t(a[0])&&
11
+ "function"===typeof a[0][a[1]]}function g(a){var b=[[],[]];d(a)?b[0].push(a):f.each(a,function(a,e){1<a||(d(e)?b[a].push(e):b[a]=b[a].concat(e))});return b}if(a){var l,h;a=g(a);b.direction&&a[1].length&&a.reverse();for(l=0;l<b.handles;l++)for(h=0;h<a[l].length;h++){if(!d(a[l][h]))return!1;a[l][h]||a[l].splice(h,1)}b[c].to=a}else b[c].to=[[],[]];return!0}};f.each({handles:{r:!0,t:function(a){a=parseInt(a,10);return 1===a||2===a}},range:{r:!0,t:function(a,b,d){b[d]=c(a);return b[d]&&b[d][0]!==b[d][1]}},
12
+ start:{r:!0,t:function(a,b,d){if(1===b.handles)return f.isArray(a)&&(a=a[0]),a=parseFloat(a),b.start=[a],n(a);b[d]=c(a);return!!b[d]}},connect:{r:!0,t:function(a,b,c){if("lower"===a)b[c]=1;else if("upper"===a)b[c]=2;else if(!0===a)b[c]=3;else if(!1===a)b[c]=0;else return!1;return!0}},orientation:{t:function(a,b,c){switch(a){case "horizontal":b[c]=0;break;case "vertical":b[c]=1;break;default:return!1}return!0}},margin:{r:!0,t:function(a,b,c){a=parseFloat(a);b[c]=s(b.range,a);return n(a)}},direction:{r:!0,
13
+ t:function(a,b,c){switch(a){case "ltr":b[c]=0;break;case "rtl":b[c]=1;b.connect=[0,2,1,3][b.connect];break;default:return!1}return!0}},behaviour:{r:!0,t:function(a,b,c){b[c]={tap:a!==(a=a.replace("tap","")),extend:a!==(a=a.replace("extend","")),drag:a!==(a=a.replace("drag","")),fixed:a!==(a=a.replace("fixed",""))};return!a.replace("none","").replace(/\-/g,"")}},serialization:{r:!0,t:function(a,b,c){return d.g(a.to,b,c)&&d.f(a.resolution,b)&&d.e(a.mark,b,c)}},slide:{t:function(a){return f.isFunction(a)}},
14
+ set:{t:function(a){return f.isFunction(a)}},block:{t:function(a){return f.isFunction(a)}},step:{t:function(a,b,c){a=parseFloat(a);b[c]=s(b.range,a);return n(a)}}},function(c,d){var f=a[c],g=void 0!==f;if(d.r&&!g||g&&!d.t(f,a,c))throw console&&console.log&&console.group&&(console.group("Invalid noUiSlider initialisation:"),console.log("Option:\t",c),console.log("Value:\t",f),console.log("Slider(s):\t",b),console.groupEnd()),new RangeError("noUiSlider");})}function R(a){this.data("options",f.extend(!0,
15
+ {},a));a=f.extend({handles:2,margin:0,connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"},a);a.serialization=a.serialization||{};Q(a,this);a.style=a.orientation?"top":"left";return this.each(function(){var b=f(this),c,d=[],e,k=f("<div/>").appendTo(b);if(b.data("base"))throw Error("Slider was already initialized.");b.data("base",k).addClass([g[6],g[16+a.direction],g[10+a.orientation]].join(" "));for(c=0;c<a.handles;c++)e=f("<div><div/></div>").appendTo(k),e.addClass(g[1]),e.children().addClass([g[2],
16
+ g[2]+g[7+a.direction+(a.direction?-1*c:c)]].join(" ")),e.data({base:k,target:b,options:a,grab:e.children(),pct:-1}).attr("data-style",a.style),e.data({store:K(e,c,a.serialization)}),d.push(e);switch(a.connect){case 1:b.addClass(g[9]);d[0].addClass(g[12]);break;case 3:d[1].addClass(g[12]);case 2:d[0].addClass(g[9]);case 0:b.addClass(g[12])}k.addClass(g[0]).data({target:b,options:a,handles:d});b.val(a.start);if(!a.behaviour.fixed)for(c=0;c<d.length;c++)p(q.start,d[c].children(),B,{b:k,target:b,a:[d[c]]});
17
+ a.behaviour.tap&&p(q.start,k,O,{b:k,target:b});a.behaviour.extend&&(b.addClass(g[19]),a.behaviour.tap&&p(q.start,b,P,{b:k,target:b}));a.behaviour.drag&&(c=k.find("."+g[9]).addClass(g[18]),a.behaviour.fixed&&(c=c.add(k.children().not(c).data("grab"))),p(q.start,c,B,{b:k,target:b,a:d}))})}function S(){var a=f(this).data("base"),b=[];f.each(a.data("handles"),function(){b.push(f(this).data("store").val())});return 1===b.length?b[0]:a.data("options").direction?b.reverse():b}function T(a,b){f.isArray(a)||
18
+ (a=[a]);return this.each(function(){var c=f(this).data("base"),d,e=Array.prototype.slice.call(c.data("handles"),0),g=c.data("options");1<e.length&&(e[2]=e[0]);g.direction&&a.reverse();for(c=0;c<e.length;c++)if(d=a[c%2],null!==d&&void 0!==d){"string"===f.type(d)&&(d=d.replace(",","."));var h=g.range;d=parseFloat(d);d=s(h,0>h[0]?d+Math.abs(h[0]):d-h[0]);g.direction&&(d=100-d);!0!==x(e[c],d)&&e[c].data("store").val(!0);!0===b&&r(g.set,f(this))}})}function U(a){var b=[[a,""]];f.each(a.data("base").data("handles"),
19
+ function(){b=b.concat(f(this).data("store").elements)});f.each(b,function(){1<this.length&&this[0].off(h)});a.removeClass(g.join(" "));a.empty().removeData("base options")}function V(a){return this.each(function(){var b=f(this).val()||!1,c=f(this).data("options"),d=f.extend({},c,a);!1!==b&&U(f(this));a&&(f(this).noUiSlider(d),!1!==b&&d.start===c.start&&f(this).val(b))})}var z=f(document),y=f("body"),h=".nui",W=f.fn.val,g="noUi-base noUi-origin noUi-handle noUi-input noUi-active noUi-state-tap noUi-target -lower -upper noUi-connect noUi-horizontal noUi-vertical noUi-background noUi-stacking noUi-block noUi-state-blocked noUi-ltr noUi-rtl noUi-dragable noUi-extended noUi-state-drag".split(" "),
20
+ q=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"};f.fn.val=function(){return this.hasClass(g[6])?arguments.length?T.apply(this,arguments):S.apply(this):W.apply(this,arguments)};return(D?V:R).call(this,C)}})(window.jQuery||window.Zepto);
includes/options/redux-core/inc/fields/slides/field_slides.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-slides .redux-slides-list .select2-container{margin-bottom:10px;width:100%}.redux-container-slides .ui-accordion-header{margin-bottom:0}.redux-container-slides .full-text,.redux-container-slides .large-text{width:100%}.redux-container-slides .redux-slides-accordion-group{border:1px solid #dfdfdf !important;border-radius:3px !important;margin-top:0px !important;margin-bottom:10px;background:#f9f9f9;padding:5px}.redux-container-slides .redux-slides-accordion-group h3{border:1px solid #dfdfdf;cursor:move !important;font-weight:bold;padding:0 10px !important;height:40px;line-height:40px !important;background-color:#f1f1f1;background-image:-ms-linear-gradient(top, #f9f9f9, #ececec);background-image:-moz-linear-gradient(top, #f9f9f9, #ececec);background-image:-o-linear-gradient(top, #f9f9f9, #ececec);background-image:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));background-image:-webkit-linear-gradient(top, #f9f9f9, #ececec);background-image:linear-gradient(top, #f9f9f9, #ececec);overflow:hidden;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;text-align:center}.redux-container-slides #redux-slides-accordion .redux-slides-image{height:250px;padding:5px;margin-top:10px;margin-bottom:10px;border:1px solid #e3e3e3;background:#f7f7f7;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.redux-container-slides .redux-slides-add{float:right;margin-right:10%;display:block;margin-bottom:10px}.redux-container-slides .redux-slides-remove{color:#ef521d !important;float:right;margin-top:5px}.redux-container-slides .redux-slides-header{font-weight:bold}.redux-container-slides .redux_slides_add_remove{margin-bottom:10px}.redux-container-slides input{width:100% !important}.wp-customizer .redux-container-slides .ui-accordion .ui-accordion-content{padding:10px}
includes/options/redux-core/inc/fields/slides/field_slides.js ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, wp, redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.slides = redux.field_objects.slides || {};
8
+
9
+ $( document ).ready(
10
+ function() {
11
+ //redux.field_objects.slides.init();
12
+ }
13
+ );
14
+
15
+ redux.field_objects.slides.init = function( selector ) {
16
+
17
+ if ( !selector ) {
18
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-slides:visible' );
19
+ }
20
+
21
+ $( selector ).each(
22
+ function() {
23
+ var el = $( this );
24
+
25
+ redux.field_objects.media.init(el);
26
+
27
+ var parent = el;
28
+ if ( !el.hasClass( 'redux-field-container' ) ) {
29
+ parent = el.parents( '.redux-field-container:first' );
30
+ }
31
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
32
+ return;
33
+ }
34
+
35
+ if ( parent.hasClass( 'redux-container-slides' ) ) {
36
+ parent.addClass( 'redux-field-init' );
37
+ }
38
+
39
+ if ( parent.hasClass( 'redux-field-init' ) ) {
40
+ parent.removeClass( 'redux-field-init' );
41
+ } else {
42
+ return;
43
+ }
44
+
45
+ el.find( '.redux-slides-remove' ).live(
46
+ 'click', function() {
47
+ redux_change( $( this ) );
48
+
49
+ $( this ).parent().siblings().find( 'input[type="text"]' ).val( '' );
50
+ $( this ).parent().siblings().find( 'textarea' ).val( '' );
51
+ $( this ).parent().siblings().find( 'input[type="hidden"]' ).val( '' );
52
+
53
+ var slideCount = $( this ).parents( '.redux-container-slides:first' ).find( '.redux-slides-accordion-group' ).length;
54
+
55
+ if ( slideCount > 1 ) {
56
+ $( this ).parents( '.redux-slides-accordion-group:first' ).slideUp(
57
+ 'medium', function() {
58
+ $( this ).remove();
59
+ }
60
+ );
61
+ } else {
62
+ var content_new_title = $( this ).parent( '.redux-slides-accordion' ).data( 'new-content-title' );
63
+
64
+ $( this ).parents( '.redux-slides-accordion-group:first' ).find( '.remove-image' ).click();
65
+ $( this ).parents( '.redux-container-slides:first' ).find( '.redux-slides-accordion-group:last' ).find( '.redux-slides-header' ).text( content_new_title );
66
+ }
67
+ }
68
+ );
69
+
70
+ //el.find( '.redux-slides-add' ).click(
71
+ el.find( '.redux-slides-add' ).off('click').click(
72
+ function() {
73
+ var newSlide = $( this ).prev().find( '.redux-slides-accordion-group:last' ).clone( true );
74
+
75
+ var slideCount = $( newSlide ).find( '.slide-title' ).attr( "name" ).match( /[0-9]+(?!.*[0-9])/ );
76
+ var slideCount1 = slideCount * 1 + 1;
77
+
78
+ $( newSlide ).find( 'input[type="text"], input[type="hidden"], textarea' ).each(
79
+ function() {
80
+
81
+ $( this ).attr(
82
+ "name", jQuery( this ).attr( "name" ).replace( /[0-9]+(?!.*[0-9])/, slideCount1 )
83
+ ).attr( "id", $( this ).attr( "id" ).replace( /[0-9]+(?!.*[0-9])/, slideCount1 ) );
84
+ $( this ).val( '' );
85
+ if ( $( this ).hasClass( 'slide-sort' ) ) {
86
+ $( this ).val( slideCount1 );
87
+ }
88
+ }
89
+ );
90
+
91
+ var content_new_title = $( this ).prev().data( 'new-content-title' );
92
+
93
+ $( newSlide ).find( '.screenshot' ).removeAttr( 'style' );
94
+ $( newSlide ).find( '.screenshot' ).addClass( 'hide' );
95
+ $( newSlide ).find( '.screenshot a' ).attr( 'href', '' );
96
+ $( newSlide ).find( '.remove-image' ).addClass( 'hide' );
97
+ $( newSlide ).find( '.redux-slides-image' ).attr( 'src', '' ).removeAttr( 'id' );
98
+ $( newSlide ).find( 'h3' ).text( '' ).append( '<span class="redux-slides-header">' + content_new_title + '</span><span class="ui-accordion-header-icon ui-icon ui-icon-plus"></span>' );
99
+ $( this ).prev().append( newSlide );
100
+ }
101
+ );
102
+
103
+ el.find( '.slide-title' ).keyup(
104
+ function( event ) {
105
+ var newTitle = event.target.value;
106
+ $( this ).parents().eq( 3 ).find( '.redux-slides-header' ).text( newTitle );
107
+ }
108
+ );
109
+
110
+
111
+ el.find( ".redux-slides-accordion" )
112
+ .accordion(
113
+ {
114
+ header: "> div > fieldset > h3",
115
+ collapsible: true,
116
+ active: false,
117
+ heightStyle: "content",
118
+ icons: {
119
+ "header": "ui-icon-plus",
120
+ "activeHeader": "ui-icon-minus"
121
+ }
122
+ }
123
+ )
124
+ .sortable(
125
+ {
126
+ axis: "y",
127
+ handle: "h3",
128
+ connectWith: ".redux-slides-accordion",
129
+ start: function( e, ui ) {
130
+ ui.placeholder.height( ui.item.height() );
131
+ ui.placeholder.width( ui.item.width() );
132
+ },
133
+ placeholder: "ui-state-highlight",
134
+ stop: function( event, ui ) {
135
+ // IE doesn't register the blur when sorting
136
+ // so trigger focusout handlers to remove .ui-state-focus
137
+ ui.item.children( "h3" ).triggerHandler( "focusout" );
138
+ var inputs = $( 'input.slide-sort' );
139
+ inputs.each(
140
+ function( idx ) {
141
+ $( this ).val( idx );
142
+ }
143
+ );
144
+ }
145
+ }
146
+ );
147
+ }
148
+ );
149
+ };
150
+ })( jQuery );
includes/options/redux-core/inc/fields/slides/field_slides.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.slides=redux.field_objects.slides||{},a(document).ready(function(){}),redux.field_objects.slides.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-slides:visible")),a(b).each(function(){var b=a(this);redux.field_objects.media.init(b);var c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||(c.hasClass("redux-container-slides")&&c.addClass("redux-field-init"),c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".redux-slides-remove").live("click",function(){redux_change(a(this)),a(this).parent().siblings().find('input[type="text"]').val(""),a(this).parent().siblings().find("textarea").val(""),a(this).parent().siblings().find('input[type="hidden"]').val("");var b=a(this).parents(".redux-container-slides:first").find(".redux-slides-accordion-group").length;if(b>1)a(this).parents(".redux-slides-accordion-group:first").slideUp("medium",function(){a(this).remove()});else{var c=a(this).parent(".redux-slides-accordion").data("new-content-title");a(this).parents(".redux-slides-accordion-group:first").find(".remove-image").click(),a(this).parents(".redux-container-slides:first").find(".redux-slides-accordion-group:last").find(".redux-slides-header").text(c)}}),b.find(".redux-slides-add").off("click").click(function(){var b=a(this).prev().find(".redux-slides-accordion-group:last").clone(!0),c=a(b).find(".slide-title").attr("name").match(/[0-9]+(?!.*[0-9])/),d=1*c+1;a(b).find('input[type="text"], input[type="hidden"], textarea').each(function(){a(this).attr("name",jQuery(this).attr("name").replace(/[0-9]+(?!.*[0-9])/,d)).attr("id",a(this).attr("id").replace(/[0-9]+(?!.*[0-9])/,d)),a(this).val(""),a(this).hasClass("slide-sort")&&a(this).val(d)});var e=a(this).prev().data("new-content-title");a(b).find(".screenshot").removeAttr("style"),a(b).find(".screenshot").addClass("hide"),a(b).find(".screenshot a").attr("href",""),a(b).find(".remove-image").addClass("hide"),a(b).find(".redux-slides-image").attr("src","").removeAttr("id"),a(b).find("h3").text("").append('<span class="redux-slides-header">'+e+'</span><span class="ui-accordion-header-icon ui-icon ui-icon-plus"></span>'),a(this).prev().append(b)}),b.find(".slide-title").keyup(function(b){var c=b.target.value;a(this).parents().eq(3).find(".redux-slides-header").text(c)}),b.find(".redux-slides-accordion").accordion({header:"> div > fieldset > h3",collapsible:!0,active:!1,heightStyle:"content",icons:{header:"ui-icon-plus",activeHeader:"ui-icon-minus"}}).sortable({axis:"y",handle:"h3",connectWith:".redux-slides-accordion",start:function(a,b){b.placeholder.height(b.item.height()),b.placeholder.width(b.item.width())},placeholder:"ui-state-highlight",stop:function(b,c){c.item.children("h3").triggerHandler("focusout");var d=a("input.slide-sort");d.each(function(b){a(this).val(b)})}})))})}}(jQuery);
includes/options/redux-core/inc/fields/slides/field_slides.php ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_slides
17
+ * @author Luciano "WebCaos" Ubertini
18
+ * @author Daniel J Griffiths (Ghost1227)
19
+ * @author Dovy Paukstys
20
+ * @version 3.0.0
21
+ */
22
+
23
+ // Exit if accessed directly
24
+ if ( !defined ( 'ABSPATH' ) ) {
25
+ exit;
26
+ }
27
+
28
+ // Don't duplicate me!
29
+ if ( !class_exists ( 'ReduxFramework_slides' ) ) {
30
+
31
+ /**
32
+ * Main ReduxFramework_slides class
33
+ *
34
+ * @since 1.0.0
35
+ */
36
+ class ReduxFramework_slides {
37
+
38
+ /**
39
+ * Field Constructor.
40
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
41
+ *
42
+ * @since 1.0.0
43
+ * @access public
44
+ * @return void
45
+ */
46
+ function __construct ( $field = array(), $value = '', $parent ) {
47
+ $this->parent = $parent;
48
+ $this->field = $field;
49
+ $this->value = $value;
50
+ }
51
+
52
+ /**
53
+ * Field Render Function.
54
+ * Takes the vars and outputs the HTML for the field in the settings
55
+ *
56
+ * @since 1.0.0
57
+ * @access public
58
+ * @return void
59
+ */
60
+ public function render () {
61
+
62
+ $defaults = array(
63
+ 'show' => array(
64
+ 'title' => true,
65
+ 'description' => true,
66
+ 'url' => true,
67
+ ),
68
+ 'content_title' => __ ( 'Slide', 'redux-framework' )
69
+ );
70
+
71
+ $this->field = wp_parse_args ( $this->field, $defaults );
72
+
73
+ echo '<div class="redux-slides-accordion" data-new-content-title="' . esc_attr ( sprintf ( __ ( 'New %s', 'redux-framework' ), $this->field[ 'content_title' ] ) ) . '">';
74
+
75
+ $x = 0;
76
+
77
+ $multi = ( isset ( $this->field[ 'multi' ] ) && $this->field[ 'multi' ] ) ? ' multiple="multiple"' : "";
78
+
79
+ if ( isset ( $this->value ) && is_array ( $this->value ) && !empty ( $this->value ) ) {
80
+
81
+ $slides = $this->value;
82
+
83
+ foreach ( $slides as $slide ) {
84
+
85
+ if ( empty ( $slide ) ) {
86
+ continue;
87
+ }
88
+
89
+ $defaults = array(
90
+ 'title' => '',
91
+ 'description' => '',
92
+ 'sort' => '',
93
+ 'url' => '',
94
+ 'image' => '',
95
+ 'thumb' => '',
96
+ 'attachment_id' => '',
97
+ 'height' => '',
98
+ 'width' => '',
99
+ 'select' => array(),
100
+ );
101
+ $slide = wp_parse_args ( $slide, $defaults );
102
+
103
+ if ( empty ( $slide[ 'thumb' ] ) && !empty ( $slide[ 'attachment_id' ] ) ) {
104
+ $img = wp_get_attachment_image_src ( $slide[ 'attachment_id' ], 'full' );
105
+ $slide[ 'image' ] = $img[ 0 ];
106
+ $slide[ 'width' ] = $img[ 1 ];
107
+ $slide[ 'height' ] = $img[ 2 ];
108
+ }
109
+
110
+ echo '<div class="redux-slides-accordion-group"><fieldset class="redux-field" data-id="' . $this->field[ 'id' ] . '"><h3><span class="redux-slides-header">' . $slide[ 'title' ] . '</span></h3><div>';
111
+
112
+ $hide = '';
113
+ if ( empty ( $slide[ 'image' ] ) ) {
114
+ $hide = ' hide';
115
+ }
116
+
117
+
118
+ echo '<div class="screenshot' . $hide . '">';
119
+ echo '<a class="of-uploaded-image" href="' . $slide[ 'image' ] . '">';
120
+ echo '<img class="redux-slides-image" id="image_image_id_' . $x . '" src="' . $slide[ 'thumb' ] . '" alt="" target="_blank" rel="external" />';
121
+ echo '</a>';
122
+ echo '</div>';
123
+
124
+ echo '<div class="redux_slides_add_remove">';
125
+
126
+ echo '<span class="button media_upload_button" id="add_' . $x . '">' . __ ( 'Upload', 'redux-framework' ) . '</span>';
127
+
128
+ $hide = '';
129
+ if ( empty ( $slide[ 'image' ] ) || $slide[ 'image' ] == '' ) {
130
+ $hide = ' hide';
131
+ }
132
+
133
+ echo '<span class="button remove-image' . $hide . '" id="reset_' . $x . '" rel="' . $slide[ 'attachment_id' ] . '">' . __ ( 'Remove', 'redux-framework' ) . '</span>';
134
+
135
+ echo '</div>' . "\n";
136
+
137
+ echo '<ul id="' . $this->field[ 'id' ] . '-ul" class="redux-slides-list">';
138
+
139
+ if ( $this->field[ 'show' ][ 'title' ] ) {
140
+ $title_type = "text";
141
+ } else {
142
+ $title_type = "hidden";
143
+ }
144
+
145
+ $placeholder = ( isset ( $this->field[ 'placeholder' ][ 'title' ] ) ) ? esc_attr ( $this->field[ 'placeholder' ][ 'title' ] ) : __ ( 'Title', 'redux-framework' );
146
+ echo '<li><input type="' . $title_type . '" id="' . $this->field[ 'id' ] . '-title_' . $x . '" name="' . $this->field[ 'name' ] . '[' . $x . '][title]' . $this->field['name_suffix'] . '" value="' . esc_attr ( $slide[ 'title' ] ) . '" placeholder="' . $placeholder . '" class="full-text slide-title" /></li>';
147
+
148
+ if ( $this->field[ 'show' ][ 'description' ] ) {
149
+ $placeholder = ( isset ( $this->field[ 'placeholder' ][ 'description' ] ) ) ? esc_attr ( $this->field[ 'placeholder' ][ 'description' ] ) : __ ( 'Description', 'redux-framework' );
150
+ echo '<li><textarea name="' . $this->field[ 'name' ] . '[' . $x . '][description]' . $this->field['name_suffix'] . '" id="' . $this->field[ 'id' ] . '-description_' . $x . '" placeholder="' . $placeholder . '" class="large-text" rows="6">' . esc_attr ( $slide[ 'description' ] ) . '</textarea></li>';
151
+ }
152
+
153
+ $placeholder = ( isset ( $this->field[ 'placeholder' ][ 'url' ] ) ) ? esc_attr ( $this->field[ 'placeholder' ][ 'url' ] ) : __ ( 'URL', 'redux-framework' );
154
+ if ( $this->field[ 'show' ][ 'url' ] ) {
155
+ $url_type = "text";
156
+ } else {
157
+ $url_type = "hidden";
158
+ }
159
+
160
+ echo '<li><input type="' . $url_type . '" id="' . $this->field[ 'id' ] . '-url_' . $x . '" name="' . $this->field[ 'name' ] . '[' . $x . '][url]' . $this->field['name_suffix'] .'" value="' . esc_attr ( $slide[ 'url' ] ) . '" class="full-text" placeholder="' . $placeholder . '" /></li>';
161
+ echo '<li><input type="hidden" class="slide-sort" name="' . $this->field[ 'name' ] . '[' . $x . '][sort]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-sort_' . $x . '" value="' . $slide[ 'sort' ] . '" />';
162
+ echo '<li><input type="hidden" class="upload-id" name="' . $this->field[ 'name' ] . '[' . $x . '][attachment_id]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-image_id_' . $x . '" value="' . $slide[ 'attachment_id' ] . '" />';
163
+ echo '<input type="hidden" class="upload-thumbnail" name="' . $this->field[ 'name' ] . '[' . $x . '][thumb]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-thumb_url_' . $x . '" value="' . $slide[ 'thumb' ] . '" readonly="readonly" />';
164
+ echo '<input type="hidden" class="upload" name="' . $this->field[ 'name' ] . '[' . $x . '][image]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-image_url_' . $x . '" value="' . $slide[ 'image' ] . '" readonly="readonly" />';
165
+ echo '<input type="hidden" class="upload-height" name="' . $this->field[ 'name' ] . '[' . $x . '][height]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-image_height_' . $x . '" value="' . $slide[ 'height' ] . '" />';
166
+ echo '<input type="hidden" class="upload-width" name="' . $this->field[ 'name' ] . '[' . $x . '][width]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-image_width_' . $x . '" value="' . $slide[ 'width' ] . '" /></li>';
167
+ echo '<li><a href="javascript:void(0);" class="button deletion redux-slides-remove">' . __ ( 'Delete', 'redux-framework' ) . '</a></li>';
168
+ echo '</ul></div></fieldset></div>';
169
+ $x ++;
170
+ }
171
+ }
172
+
173
+ if ( $x == 0 ) {
174
+ echo '<div class="redux-slides-accordion-group"><fieldset class="redux-field" data-id="' . $this->field[ 'id' ] . '"><h3><span class="redux-slides-header">' . esc_attr ( sprintf ( __ ( 'New %s', 'redux-framework' ), $this->field[ 'content_title' ] ) ) . '</span></h3><div>';
175
+
176
+ $hide = ' hide';
177
+
178
+ echo '<div class="screenshot' . $hide . '">';
179
+ echo '<a class="of-uploaded-image" href="">';
180
+ echo '<img class="redux-slides-image" id="image_image_id_' . $x . '" src="" alt="" target="_blank" rel="external" />';
181
+ echo '</a>';
182
+ echo '</div>';
183
+
184
+ //Upload controls DIV
185
+ echo '<div class="upload_button_div">';
186
+
187
+ //If the user has WP3.5+ show upload/remove button
188
+ echo '<span class="button media_upload_button" id="add_' . $x . '">' . __ ( 'Upload', 'redux-framework' ) . '</span>';
189
+
190
+ echo '<span class="button remove-image' . $hide . '" id="reset_' . $x . '" rel="' . $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][attachment_id]">' . __ ( 'Remove', 'redux-framework' ) . '</span>';
191
+
192
+ echo '</div>' . "\n";
193
+
194
+ echo '<ul id="' . $this->field[ 'id' ] . '-ul" class="redux-slides-list">';
195
+ if ( $this->field[ 'show' ][ 'title' ] ) {
196
+ $title_type = "text";
197
+ } else {
198
+ $title_type = "hidden";
199
+ }
200
+ $placeholder = ( isset ( $this->field[ 'placeholder' ][ 'title' ] ) ) ? esc_attr ( $this->field[ 'placeholder' ][ 'title' ] ) : __ ( 'Title', 'redux-framework' );
201
+ echo '<li><input type="' . $title_type . '" id="' . $this->field[ 'id' ] . '-title_' . $x . '" name="' . $this->field[ 'name' ] . '[' . $x . '][title]' . $this->field['name_suffix'] .'" value="" placeholder="' . $placeholder . '" class="full-text slide-title" /></li>';
202
+
203
+ if ( $this->field[ 'show' ][ 'description' ] ) {
204
+ $placeholder = ( isset ( $this->field[ 'placeholder' ][ 'description' ] ) ) ? esc_attr ( $this->field[ 'placeholder' ][ 'description' ] ) : __ ( 'Description', 'redux-framework' );
205
+ echo '<li><textarea name="' . $this->field[ 'name' ] . '[' . $x . '][description]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-description_' . $x . '" placeholder="' . $placeholder . '" class="large-text" rows="6"></textarea></li>';
206
+ }
207
+ $placeholder = ( isset ( $this->field[ 'placeholder' ][ 'url' ] ) ) ? esc_attr ( $this->field[ 'placeholder' ][ 'url' ] ) : __ ( 'URL', 'redux-framework' );
208
+ if ( $this->field[ 'show' ][ 'url' ] ) {
209
+ $url_type = "text";
210
+ } else {
211
+ $url_type = "hidden";
212
+ }
213
+ echo '<li><input type="' . $url_type . '" id="' . $this->field[ 'id' ] . '-url_' . $x . '" name="' . $this->field[ 'name' ] . '[' . $x . '][url]' . $this->field['name_suffix'] .'" value="" class="full-text" placeholder="' . $placeholder . '" /></li>';
214
+ echo '<li><input type="hidden" class="slide-sort" name="' . $this->field[ 'name' ] . '[' . $x . '][sort]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-sort_' . $x . '" value="' . $x . '" />';
215
+ echo '<li><input type="hidden" class="upload-id" name="' . $this->field[ 'name' ] . '[' . $x . '][attachment_id]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-image_id_' . $x . '" value="" />';
216
+ echo '<input type="hidden" class="upload" name="' . $this->field[ 'name' ] . '[' . $x . '][image]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-image_url_' . $x . '" value="" readonly="readonly" />';
217
+ echo '<input type="hidden" class="upload-height" name="' . $this->field[ 'name' ] . '[' . $x . '][height]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-image_height_' . $x . '" value="" />';
218
+ echo '<input type="hidden" class="upload-width" name="' . $this->field[ 'name' ] . '[' . $x . '][width]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-image_width_' . $x . '" value="" /></li>';
219
+ echo '<input type="hidden" class="upload-thumbnail" name="' . $this->field[ 'name' ] . '[' . $x . '][thumb]' . $this->field['name_suffix'] .'" id="' . $this->field[ 'id' ] . '-thumb_url_' . $x . '" value="" /></li>';
220
+ echo '<li><a href="javascript:void(0);" class="button deletion redux-slides-remove">' . __ ( 'Delete', 'redux-framework' ) . '</a></li>';
221
+ echo '</ul></div></fieldset></div>';
222
+ }
223
+ echo '</div><a href="javascript:void(0);" class="button redux-slides-add button-primary" rel-id="' . $this->field[ 'id' ] . '-ul" rel-name="' . $this->field[ 'name' ] . '[title][]' . $this->field['name_suffix'] .'">' . sprintf ( __ ( 'Add %s', 'redux-framework' ), $this->field[ 'content_title' ] ) . '</a><br/>';
224
+ }
225
+
226
+ /**
227
+ * Enqueue Function.
228
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
229
+ *
230
+ * @since 1.0.0
231
+ * @access public
232
+ * @return void
233
+ */
234
+ public function enqueue () {
235
+ if ( function_exists( 'wp_enqueue_media' ) ) {
236
+ wp_enqueue_media();
237
+ } else {
238
+ wp_enqueue_script( 'media-upload' );
239
+ }
240
+
241
+ if ($this->parent->args['dev_mode']){
242
+ wp_enqueue_style ('redux-field-media-css');
243
+
244
+ wp_enqueue_style (
245
+ 'redux-field-slides-css',
246
+ ReduxFramework::$_url . 'inc/fields/slides/field_slides.css',
247
+ array(),
248
+ time (),
249
+ 'all'
250
+ );
251
+ }
252
+
253
+ wp_enqueue_script(
254
+ 'redux-field-media-js',
255
+ ReduxFramework::$_url . 'assets/js/media/media' . Redux_Functions::isMin() . '.js',
256
+ array( 'jquery', 'redux-js' ),
257
+ time(),
258
+ true
259
+ );
260
+
261
+ wp_enqueue_script (
262
+ 'redux-field-slides-js',
263
+ ReduxFramework::$_url . 'inc/fields/slides/field_slides' . Redux_Functions::isMin () . '.js',
264
+ array( 'jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'jquery-ui-sortable', 'redux-field-media-js' ),
265
+ time (),
266
+ true
267
+ );
268
+ }
269
+ }
270
+ }
includes/options/redux-core/inc/fields/slides/field_slides.scss ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-slides {
2
+ .redux-slides-list .select2-container {
3
+ margin-bottom: 10px;
4
+ width: 100%;
5
+ }
6
+
7
+ .ui-accordion-header {
8
+ margin-bottom: 0;
9
+ }
10
+
11
+ .full-text,
12
+ .large-text {
13
+ width: 100%;
14
+ }
15
+
16
+ .redux-slides-accordion-group {
17
+ border: 1px solid #dfdfdf !important;
18
+ border-radius: 3px !important;
19
+ margin-top: 0px !important;
20
+ margin-bottom: 10px;
21
+ background: #f9f9f9;
22
+ padding: 5px;
23
+
24
+ h3 {
25
+ border: 1px solid #dfdfdf;
26
+ cursor: move !important;
27
+ font-weight: bold;
28
+ padding: 0 10px !important;
29
+ height: 40px;
30
+ line-height: 40px !important;
31
+ background-color: #f1f1f1;
32
+ background-image: -ms-linear-gradient(top, #f9f9f9, #ececec);
33
+ background-image: -moz-linear-gradient(top, #f9f9f9, #ececec);
34
+ background-image: -o-linear-gradient(top, #f9f9f9, #ececec);
35
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));
36
+ background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec);
37
+ background-image: linear-gradient(top, #f9f9f9, #ececec);
38
+ overflow: hidden;
39
+ -webkit-border-radius: 3px;
40
+ -moz-border-radius: 3px;
41
+ border-radius: 3px;
42
+ -moz-box-shadow: inset 0 1px 0 #fff;
43
+ -webkit-box-shadow: inset 0 1px 0 #fff;
44
+ box-shadow: inset 0 1px 0 #fff;
45
+ text-align: center;
46
+ }
47
+ }
48
+
49
+ #redux-slides-accordion .redux-slides-image {
50
+ height: 250px;
51
+ padding: 5px;
52
+ margin-top: 10px;
53
+ margin-bottom: 10px;
54
+ border: 1px solid #e3e3e3;
55
+ background: #f7f7f7;
56
+ -moz-border-radius: 3px;
57
+ -khtml-border-radius: 3px;
58
+ -webkit-border-radius: 3px;
59
+ border-radius: 3px;
60
+ }
61
+
62
+ .redux-slides-add {
63
+ float: right;
64
+ margin-right: 10%;
65
+ display: block;
66
+ margin-bottom: 10px;
67
+ }
68
+
69
+ .redux-slides-remove {
70
+ color: #ef521d !important;
71
+ float: right;
72
+ margin-top: 5px;
73
+ }
74
+
75
+ .redux-slides-header {
76
+ font-weight: bold;
77
+ }
78
+
79
+ .redux_slides_add_remove {
80
+ margin-bottom: 10px;
81
+ }
82
+ input {
83
+ width: 100% !important;
84
+ }
85
+
86
+ }
87
+
88
+ .wp-customizer {
89
+ .redux-container-slides .ui-accordion .ui-accordion-content {
90
+ padding: 10px;
91
+ }
92
+ }
includes/options/redux-core/inc/fields/sortable/field_sortable.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-sortable i.el{cursor:move}.redux-container-sortable label{margin-right:10px;width:300px}.redux-container-sortable label.bugger{margin-bottom:0px !important;font-size:12px !important;color:#999999}.redux-container-sortable input{margin-right:10px}.redux-container-sortable .checkbox-container{width:364px}.redux-container-sortable .checkbox-container .drag{float:right;margin-left:10px}.redux-container-sortable ul.labeled li{line-height:1.4em !important}.redux-container-sortable li{line-height:30px !important}.redux-container-sortable li.ui-state-highlight{height:30px;width:364px;margin-bottom:13px}.redux-container-sortable li.placeholder{height:30px;margin:10px 0}.wp-customizer .redux-sortable input[type="text"]{width:92%}.wp-customizer .redux-sortable i.el{margin-left:5px}.wp-customizer .redux-container-sortable .checkbox-container{width:inherit}.wp-customizer .redux-container-sortable .ui-draggable-handle{margin-left:3%}
includes/options/redux-core/inc/fields/sortable/field_sortable.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global jQuery, document, redux_change, redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.sortable = redux.field_objects.sortable || {};
8
+
9
+ var scroll = '';
10
+
11
+ redux.field_objects.sortable.init = function( selector ) {
12
+
13
+ if ( !selector ) {
14
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-sortable:visible' );
15
+ }
16
+
17
+ $( selector ).each(
18
+ function() {
19
+ var el = $( this );
20
+ var parent = el;
21
+ if ( !el.hasClass( 'redux-field-container' ) ) {
22
+ parent = el.parents( '.redux-field-container:first' );
23
+ }
24
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
25
+ return;
26
+ }
27
+ if ( parent.hasClass( 'redux-field-init' ) ) {
28
+ parent.removeClass( 'redux-field-init' );
29
+ } else {
30
+ return;
31
+ }
32
+ el.find( ".redux-sortable" ).sortable(
33
+ {
34
+ handle: ".drag",
35
+ placeholder: "placeholder",
36
+ opacity: 0.7,
37
+ scroll: false,
38
+ out: function( event, ui ) {
39
+ if ( !ui.helper ) return;
40
+ if ( ui.offset.top > 0 ) {
41
+ scroll = 'down';
42
+ } else {
43
+ scroll = 'up';
44
+ }
45
+ redux.field_objects.sortable.scrolling( $( this ).parents( '.redux-field-container:first' ) );
46
+ },
47
+
48
+ over: function( event, ui ) {
49
+ scroll = '';
50
+ },
51
+
52
+ deactivate: function( event, ui ) {
53
+ scroll = '';
54
+ },
55
+
56
+ update: function() {
57
+ redux_change( $( this ) );
58
+ }
59
+ }
60
+ );
61
+
62
+ el.find( '.checkbox_sortable' ).on(
63
+ 'click', function() {
64
+ if ( $( this ).is( ":checked" ) ) {
65
+ el.find( '#' + $( this ).attr( 'rel' ) ).val( 1 );
66
+ } else {
67
+ el.find( '#' + $( this ).attr( 'rel' ) ).val( '' );
68
+ }
69
+ }
70
+ );
71
+ }
72
+ );
73
+ };
74
+
75
+ redux.field_objects.sortable.scrolling = function( selector ) {
76
+ if (selector === undefined) {
77
+ return;
78
+ }
79
+
80
+ var $scrollable = selector.find( ".redux-sorter" );
81
+
82
+ if ( scroll == 'up' ) {
83
+ $scrollable.scrollTop( $scrollable.scrollTop() - 20 );
84
+ setTimeout( redux.field_objects.sortable.scrolling, 50 );
85
+ } else if ( scroll == 'down' ) {
86
+ $scrollable.scrollTop( $scrollable.scrollTop() + 20 );
87
+ setTimeout( redux.field_objects.sortable.scrolling, 50 );
88
+ }
89
+ };
90
+
91
+ })( jQuery );
includes/options/redux-core/inc/fields/sortable/field_sortable.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.sortable=redux.field_objects.sortable||{};var b="";redux.field_objects.sortable.init=function(c){c||(c=a(document).find(".redux-group-tab:visible").find(".redux-container-sortable:visible")),a(c).each(function(){var c=a(this),d=c;c.hasClass("redux-field-container")||(d=c.parents(".redux-field-container:first")),d.is(":hidden")||d.hasClass("redux-field-init")&&(d.removeClass("redux-field-init"),c.find(".redux-sortable").sortable({handle:".drag",placeholder:"placeholder",opacity:.7,scroll:!1,out:function(c,d){d.helper&&(b=d.offset.top>0?"down":"up",redux.field_objects.sortable.scrolling(a(this).parents(".redux-field-container:first")))},over:function(a,c){b=""},deactivate:function(a,c){b=""},update:function(){redux_change(a(this))}}),c.find(".checkbox_sortable").on("click",function(){a(this).is(":checked")?c.find("#"+a(this).attr("rel")).val(1):c.find("#"+a(this).attr("rel")).val("")}))})},redux.field_objects.sortable.scrolling=function(a){if(void 0!==a){var c=a.find(".redux-sorter");"up"==b?(c.scrollTop(c.scrollTop()-20),setTimeout(redux.field_objects.sortable.scrolling,50)):"down"==b&&(c.scrollTop(c.scrollTop()+20),setTimeout(redux.field_objects.sortable.scrolling,50))}}}(jQuery);
includes/options/redux-core/inc/fields/sortable/field_sortable.php ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ if ( ! class_exists( 'ReduxFramework_sortable' ) ) {
9
+ class ReduxFramework_sortable {
10
+
11
+ /**
12
+ * Field Constructor.
13
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
14
+ *
15
+ * @since Redux_Options 2.0.1
16
+ */
17
+ function __construct( $field = array(), $value = '', $parent ) {
18
+ $this->parent = $parent;
19
+ $this->field = $field;
20
+ $this->value = $value;
21
+ }
22
+
23
+ /**
24
+ * Field Render Function.
25
+ * Takes the vars and outputs the HTML for the field in the settings
26
+ *
27
+ * @since Redux_Options 2.0.1
28
+ */
29
+ function render() {
30
+ if ( empty( $this->field['mode'] ) ) {
31
+ $this->field['mode'] = "text";
32
+ }
33
+
34
+ if ( $this->field['mode'] != "checkbox" && $this->field['mode'] != "text" ) {
35
+ $this->field['mode'] = "text";
36
+ }
37
+
38
+ $class = ( isset( $this->field['class'] ) ) ? $this->field['class'] : '';
39
+ $options = $this->field['options'];
40
+
41
+ // This is to weed out missing options that might be in the default
42
+ // Why? Who knows. Call it a dummy check.
43
+ if ( ! empty( $this->value ) ) {
44
+ foreach ( $this->value as $k => $v ) {
45
+ if ( ! isset( $options[ $k ] ) ) {
46
+ unset( $this->value[ $k ] );
47
+ }
48
+ }
49
+ }
50
+
51
+ $noSort = false;
52
+ foreach ( $options as $k => $v ) {
53
+ if ( ! isset( $this->value[ $k ] ) ) {
54
+
55
+ // A save has previously been done.
56
+ if ( is_array( $this->value ) && array_key_exists( $k, $this->value ) ) {
57
+ $this->value[ $k ] = $v;
58
+
59
+ // Missing database entry, meaning no save has yet been done.
60
+ } else {
61
+ $noSort = true;
62
+ $this->value[ $k ] = '';
63
+ }
64
+ }
65
+ }
66
+
67
+ // If missing database entries are found, it means no save has been done
68
+ // and therefore no sort should be done. Set the default array in the same
69
+ // order as the options array. Why? The sort order is based on the
70
+ // saved default array. If entries are missing, the sort is messed up.
71
+ // - kp
72
+ if ( true == $noSort ) {
73
+ $dummyArr = array();
74
+
75
+ foreach ( $options as $k => $v ) {
76
+ $dummyArr[ $k ] = $this->value[ $k ];
77
+ }
78
+ unset( $this->value );
79
+ $this->value = $dummyArr;
80
+ unset( $dummyArr );
81
+ }
82
+
83
+ $use_labels = false;
84
+ $label_class = '';
85
+ if ( $this->field['mode'] != "checkbox" ) {
86
+ if ( ( isset( $this->field['label'] ) && $this->field['label'] == true ) ) {
87
+ $use_labels = true;
88
+ $label_class = ' labeled';
89
+ }
90
+ }
91
+
92
+ echo '<ul id="' . $this->field['id'] . '-list" class="redux-sortable ' . $class . ' ' . $label_class . '">';
93
+
94
+
95
+ foreach ( $this->value as $k => $nicename ) {
96
+ echo '<li>';
97
+
98
+ $checked = "";
99
+ $name = 'name="' . $this->field['name'] . $this->field['name_suffix'] . '[' . $k . ']' . '" ';
100
+ if ( $this->field['mode'] == "checkbox" ) {
101
+ $value_display = $this->value[ $k ];
102
+
103
+ if ( ! empty( $this->value[ $k ] ) ) {
104
+ $checked = 'checked="checked" ';
105
+ }
106
+ $class .= " checkbox_sortable";
107
+ $name = "";
108
+ echo '<input type="hidden" name="' . $this->field['name'] . $this->field['name_suffix'] . '[' . $k . ']' . '" id="' . $this->field['id'] . '-' . $k . '-hidden" value="' . $value_display . '" />';
109
+
110
+ echo '<div class="checkbox-container">';
111
+ } else {
112
+ $value_display = isset( $this->value[ $k ] ) ? $this->value[ $k ] : '';
113
+ $nicename = $this->field['options'][$k];
114
+
115
+ }
116
+
117
+ if ($this->field['mode'] != "checkbox") {
118
+ if ($use_labels) {
119
+ echo '<label class="bugger" for="' . $this->field['id'] . '[' . $k . ']"><strong>' . $k . '</strong></label>';
120
+ echo "<br />";
121
+ }
122
+ }
123
+
124
+ echo '<input rel="' . $this->field['id'] . '-' . $k . '-hidden" class="' . $class . '" ' . $checked . 'type="' . $this->field['mode'] . '" ' . $name . 'id="' . $this->field['id'] . '[' . $k . ']" value="' . esc_attr( $value_display ) . '" placeholder="' . $nicename . '" />';
125
+
126
+ echo '<span class="compact drag"><i class="el el-move icon-large"></i></span>';
127
+ //if ( ( isset( $this->field['label'] ) && $this->field['label'] == true ) ) {
128
+ if ($this->field['mode'] == "checkbox") {
129
+ if ( $this->field['mode'] != "checkbox" ) {
130
+ //echo "<br />";
131
+ //echo '<label for="' . $this->field['id'] . '[' . $k . ']"><strong>' . $k . '</strong></label>';
132
+ } else {
133
+ echo '<label for="' . $this->field['id'] . '[' . $k . ']"><strong>' . $options[$k] . '</strong></label>';
134
+ }
135
+ }
136
+ if ( $this->field['mode'] == "checkbox" ) {
137
+ echo '</div>';
138
+ }
139
+ echo '</li>';
140
+ }
141
+ echo '</ul>';
142
+ }
143
+
144
+ function enqueue() {
145
+ if ($this->parent->args['dev_mode']) {
146
+ wp_enqueue_style(
147
+ 'redux-field-sortable-css',
148
+ ReduxFramework::$_url . 'inc/fields/sortable/field_sortable.css',
149
+ array(),
150
+ time(),
151
+ 'all'
152
+ );
153
+ }
154
+
155
+ wp_enqueue_script(
156
+ 'redux-field-sortable-js',
157
+ ReduxFramework::$_url . 'inc/fields/sortable/field_sortable' . Redux_Functions::isMin() . '.js',
158
+ array( 'jquery', 'redux-js', 'jquery-ui-sortable' ),
159
+ time(),
160
+ true
161
+ );
162
+ }
163
+ }
164
+ }
includes/options/redux-core/inc/fields/sortable/field_sortable.scss ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-sortable {
2
+ i {
3
+ &.el {
4
+ cursor: move;
5
+ }
6
+ }
7
+
8
+ label {
9
+ margin-right: 10px;
10
+ width: 300px;
11
+
12
+ &.bugger {
13
+ margin-bottom: 0px !important;
14
+ font-size: 12px !important;
15
+ color: #999999;
16
+ }
17
+ }
18
+
19
+ input {
20
+ margin-right: 10px;
21
+ }
22
+
23
+ .checkbox-container {
24
+ width: 364px;
25
+
26
+ .drag {
27
+ float: right;
28
+ margin-left: 10px;
29
+ }
30
+ }
31
+
32
+ ul {
33
+ &.labeled {
34
+ li {
35
+ line-height: 1.4em !important;
36
+ }
37
+ }
38
+ }
39
+
40
+ li {
41
+ line-height: 30px !important;
42
+
43
+ &.ui-state-highlight {
44
+ height: 30px;
45
+ width: 364px;
46
+ margin-bottom: 13px;
47
+ }
48
+
49
+ &.placeholder {
50
+ height: 30px;
51
+ margin: 10px 0;
52
+ }
53
+ }
54
+ }
55
+
56
+ .wp-customizer {
57
+ .redux-sortable {
58
+ input[type="text"] {
59
+ width: 92%;
60
+ }
61
+ i.el {
62
+ margin-left: 5px;
63
+ }
64
+ }
65
+ .redux-container-sortable {
66
+ .checkbox-container {
67
+ width: inherit;
68
+ }
69
+ .ui-draggable-handle {
70
+ margin-left: 3%;
71
+ }
72
+ }
73
+ }
includes/options/redux-core/inc/fields/sorter/field_sorter.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-sorter{margin-right:-20px}.redux-container-sorter ul{background:#F9F9F9;border:1px solid #E3E3E3;min-height:40px;padding:10px 10px 0;width:145px;float:left;margin:0 15px 0 0}.redux-container-sorter ul.filled{opacity:.7;filter:alpha(opacity=70);background:#efecec}.redux-container-sorter ul li{border:1px solid #DFDFDF;cursor:move;font-weight:bold;margin-bottom:10px !important;padding:0 10px;height:40px;line-height:40px !important;background-color:#F1F1F1;background-image:-ms-linear-gradient(top, #f9f9f9, #ececec);background-image:-moz-linear-gradient(top, #f9f9f9, #ececec);background-image:-o-linear-gradient(top, #f9f9f9, #ececec);background-image:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));background-image:-webkit-linear-gradient(top, #f9f9f9, #ececec);background-image:linear-gradient(top, #f9f9f9, #ececec);overflow:hidden;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;text-align:center}.redux-container-sorter ul li h3{margin:0 0 10px;text-align:center;color:#777;text-transform:capitalize;word-wrap:break-word}.redux-container-sorter ul li.placeholder{height:40px}.wp-customizer .redux-container-sorter ul{width:85%;margin:0 0 5px 0}
includes/options/redux-core/inc/fields/sorter/field_sorter.js ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux, redux_opts*/
2
+ /*
3
+ * Field Sorter jquery function
4
+ * Based on
5
+ * [SMOF - Slightly Modded Options Framework](http://aquagraphite.com/2011/09/slightly-modded-options-framework/)
6
+ * Version 1.4.2
7
+ */
8
+
9
+ (function( $ ) {
10
+ "use strict";
11
+
12
+ redux.field_objects = redux.field_objects || {};
13
+ redux.field_objects.sorter = redux.field_objects.sorter || {};
14
+
15
+ var scroll = '';
16
+
17
+ $( document ).ready(
18
+ function() {
19
+ //redux.field_objects.sorter.init();
20
+ }
21
+ );
22
+
23
+ redux.field_objects.sorter.init = function( selector ) {
24
+
25
+ if ( !selector ) {
26
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-sorter:visible' );
27
+ }
28
+
29
+ $( selector ).each(
30
+ function() {
31
+ var el = $( this );
32
+ var parent = el;
33
+
34
+ if ( !el.hasClass( 'redux-field-container' ) ) {
35
+ parent = el.parents( '.redux-field-container:first' );
36
+ }
37
+
38
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
39
+ return;
40
+ }
41
+
42
+ if ( parent.hasClass( 'redux-field-init' ) ) {
43
+ parent.removeClass( 'redux-field-init' );
44
+ } else {
45
+ return;
46
+ }
47
+
48
+ /** Sorter (Layout Manager) */
49
+ el.find( '.redux-sorter' ).each(
50
+ function() {
51
+ var id = $( this ).attr( 'id' );
52
+
53
+ el.find( '#' + id ).find( 'ul' ).sortable(
54
+ {
55
+ items: 'li',
56
+ placeholder: "placeholder",
57
+ connectWith: '.sortlist_' + id,
58
+ opacity: 0.8,
59
+ scroll: false,
60
+ out: function( event, ui ) {
61
+ if ( !ui.helper ) return;
62
+ if ( ui.offset.top > 0 ) {
63
+ scroll = 'down';
64
+ } else {
65
+ scroll = 'up';
66
+ }
67
+ redux.field_objects.sorter.scrolling( $( this ).parents( '.redux-field-container:first' ) );
68
+
69
+ },
70
+ over: function( event, ui ) {
71
+ scroll = '';
72
+ },
73
+
74
+ deactivate: function( event, ui ) {
75
+ scroll = '';
76
+ },
77
+
78
+ stop: function( event, ui ) {
79
+ var sorter = redux.sorter[$( this ).attr( 'data-id' )];
80
+ var id = $( this ).find( 'h3' ).text();
81
+
82
+ if ( sorter.limits && id && sorter.limits[id] ) {
83
+ if ( $( this ).children( 'li' ).length >= sorter.limits[id] ) {
84
+ $( this ).addClass( 'filled' );
85
+ if ( $( this ).children( 'li' ).length > sorter.limits[id] ) {
86
+ $( ui.sender ).sortable( 'cancel' );
87
+ }
88
+ } else {
89
+ $( this ).removeClass( 'filled' );
90
+ }
91
+ }
92
+ },
93
+
94
+ update: function( event, ui ) {
95
+ var sorter = redux.sorter[$( this ).attr( 'data-id' )];
96
+ var id = $( this ).find( 'h3' ).text();
97
+
98
+ if ( sorter.limits && id && sorter.limits[id] ) {
99
+ if ( $( this ).children( 'li' ).length >= sorter.limits[id] ) {
100
+ $( this ).addClass( 'filled' );
101
+ if ( $( this ).children( 'li' ).length > sorter.limits[id] ) {
102
+ $( ui.sender ).sortable( 'cancel' );
103
+ }
104
+ } else {
105
+ $( this ).removeClass( 'filled' );
106
+ }
107
+ }
108
+
109
+ $( this ).find( '.position' ).each(
110
+ function() {
111
+ //var listID = $( this ).parent().attr( 'id' );
112
+ var listID = $( this ).parent().attr( 'data-id' );
113
+ var parentID = $( this ).parent().parent().attr( 'data-group-id' );
114
+
115
+ redux_change( $( this ) );
116
+
117
+ var optionID = $( this ).parent().parent().parent().attr( 'id' );
118
+
119
+ $( this ).prop(
120
+ "name",
121
+ redux.args.opt_name + '[' + optionID + '][' + parentID + '][' + listID + ']'
122
+ );
123
+ }
124
+ );
125
+ }
126
+ }
127
+ );
128
+ el.find( ".redux-sorter" ).disableSelection();
129
+ }
130
+ );
131
+ }
132
+ );
133
+ };
134
+
135
+ redux.field_objects.sorter.scrolling = function( selector ) {
136
+ if (selector === undefined) {
137
+ return;
138
+ }
139
+
140
+ var scrollable = selector.find( ".redux-sorter" );
141
+
142
+ if ( scroll == 'up' ) {
143
+ scrollable.scrollTop( scrollable.scrollTop() - 20 );
144
+ setTimeout( redux.field_objects.sorter.scrolling, 50 );
145
+ } else if ( scroll == 'down' ) {
146
+ scrollable.scrollTop( scrollable.scrollTop() + 20 );
147
+ setTimeout( redux.field_objects.sorter.scrolling, 50 );
148
+ }
149
+ };
150
+
151
+ })( jQuery );
includes/options/redux-core/inc/fields/sorter/field_sorter.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.sorter=redux.field_objects.sorter||{};var b="";a(document).ready(function(){}),redux.field_objects.sorter.init=function(c){c||(c=a(document).find(".redux-group-tab:visible").find(".redux-container-sorter:visible")),a(c).each(function(){var c=a(this),d=c;c.hasClass("redux-field-container")||(d=c.parents(".redux-field-container:first")),d.is(":hidden")||d.hasClass("redux-field-init")&&(d.removeClass("redux-field-init"),c.find(".redux-sorter").each(function(){var d=a(this).attr("id");c.find("#"+d).find("ul").sortable({items:"li",placeholder:"placeholder",connectWith:".sortlist_"+d,opacity:.8,scroll:!1,out:function(c,d){d.helper&&(b=d.offset.top>0?"down":"up",redux.field_objects.sorter.scrolling(a(this).parents(".redux-field-container:first")))},over:function(a,c){b=""},deactivate:function(a,c){b=""},stop:function(b,c){var d=redux.sorter[a(this).attr("data-id")],e=a(this).find("h3").text();d.limits&&e&&d.limits[e]&&(a(this).children("li").length>=d.limits[e]?(a(this).addClass("filled"),a(this).children("li").length>d.limits[e]&&a(c.sender).sortable("cancel")):a(this).removeClass("filled"))},update:function(b,c){var d=redux.sorter[a(this).attr("data-id")],e=a(this).find("h3").text();d.limits&&e&&d.limits[e]&&(a(this).children("li").length>=d.limits[e]?(a(this).addClass("filled"),a(this).children("li").length>d.limits[e]&&a(c.sender).sortable("cancel")):a(this).removeClass("filled")),a(this).find(".position").each(function(){var b=a(this).parent().attr("data-id"),c=a(this).parent().parent().attr("data-group-id");redux_change(a(this));var d=a(this).parent().parent().parent().attr("id");a(this).prop("name",redux.args.opt_name+"["+d+"]["+c+"]["+b+"]")})}}),c.find(".redux-sorter").disableSelection()}))})},redux.field_objects.sorter.scrolling=function(a){if(void 0!==a){var c=a.find(".redux-sorter");"up"==b?(c.scrollTop(c.scrollTop()-20),setTimeout(redux.field_objects.sorter.scrolling,50)):"down"==b&&(c.scrollTop(c.scrollTop()+20),setTimeout(redux.field_objects.sorter.scrolling,50))}}}(jQuery);
includes/options/redux-core/inc/fields/sorter/field_sorter.php ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ if ( ! class_exists( 'ReduxFramework_sorter' ) ) {
9
+ class ReduxFramework_sorter {
10
+
11
+ /**
12
+ * Field Constructor.
13
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
14
+ *
15
+ * @since Redux_Options 1.0.0
16
+ */
17
+ function __construct( $field = array(), $value = '', $parent ) {
18
+ $this->parent = $parent;
19
+ $this->field = $field;
20
+ $this->value = $value;
21
+ }
22
+
23
+ private function replace_id_with_slug( $arr ) {
24
+ $new_arr = array();
25
+ if ( ! empty( $arr ) ) {
26
+ foreach ( $arr as $id => $name ) {
27
+
28
+ if ( is_numeric( $id ) ) {
29
+ $slug = strtolower( $name );
30
+ $slug = str_replace( ' ', '-', $slug );
31
+
32
+ $new_arr[ $slug ] = $name;
33
+ } else {
34
+ $new_arr[ $id ] = $name;
35
+ }
36
+ }
37
+ }
38
+
39
+ return $new_arr;
40
+ }
41
+
42
+ private function is_value_empty( $val ) {
43
+ if ( ! empty( $val ) ) {
44
+ foreach ( $val as $section => $arr ) {
45
+ if ( ! empty( $arr ) ) {
46
+ return false;
47
+ }
48
+ }
49
+ }
50
+
51
+
52
+ return true;
53
+ }
54
+
55
+ /**
56
+ * Field Render Function.
57
+ * Takes the vars and outputs the HTML for the field in the settings
58
+ *
59
+ * @since 1.0.0
60
+ */
61
+ function render() {
62
+
63
+ if ( ! is_array( $this->value ) && isset( $this->field['options'] ) ) {
64
+ $this->value = $this->field['options'];
65
+ }
66
+
67
+ if ( ! isset( $this->field['args'] ) ) {
68
+ $this->field['args'] = array();
69
+ }
70
+
71
+ if ( isset( $this->field['data'] ) ) {
72
+ $this->field['options'] = $this->parent->options_defaults[ $this->field['id'] ];
73
+ }
74
+
75
+ // Make sure to get list of all the default blocks first
76
+ $all_blocks = ! empty( $this->field['options'] ) ? $this->field['options'] : array();
77
+ $temp = array(); // holds default blocks
78
+ $temp2 = array(); // holds saved blocks
79
+
80
+ foreach ( $all_blocks as $blocks ) {
81
+ $temp = array_merge( $temp, $blocks );
82
+ }
83
+
84
+ $temp = $this->replace_id_with_slug( $temp );
85
+
86
+ if ( $this->is_value_empty( $this->value ) ) {
87
+ if ( ! empty( $this->field['options'] ) ) {
88
+ $this->value = $this->field['options'];
89
+ }
90
+ }
91
+
92
+ $sortlists = $this->value;
93
+ if ( ! empty( $sortlists ) ) {
94
+ foreach ( $sortlists as $section => $arr ) {
95
+ $sortlists[ $section ] = $this->replace_id_with_slug( $arr );
96
+ }
97
+ }
98
+
99
+ if ( is_array( $sortlists ) ) {
100
+ foreach ( $sortlists as $sortlist ) {
101
+ $temp2 = array_merge( $temp2, $sortlist );
102
+ }
103
+
104
+ // now let's compare if we have anything missing
105
+ foreach ( $temp as $k => $v ) {
106
+ // k = id/slug
107
+ // v = name
108
+
109
+ if ( ! empty( $temp2 ) ) {
110
+ if ( ! array_key_exists( $k, $temp2 ) ) {
111
+ if (isset($sortlists['Disabled'])) {
112
+ $sortlists['Disabled'][ $k ] = $v;
113
+ } else {
114
+ $sortlists['disabled'][ $k ] = $v;
115
+ }
116
+ }
117
+ }
118
+ }
119
+
120
+ // now check if saved blocks has blocks not registered under default blocks
121
+ foreach ( $sortlists as $key => $sortlist ) {
122
+ // key = enabled, disabled, backup
123
+ // sortlist = id => name
124
+
125
+ foreach ( $sortlist as $k => $v ) {
126
+ // k = id
127
+ // v = name
128
+ if ( ! array_key_exists( $k, $temp ) ) {
129
+ unset( $sortlist[ $k ] );
130
+ }
131
+ }
132
+ $sortlists[ $key ] = $sortlist;
133
+ }
134
+
135
+ // assuming all sync'ed, now get the correct naming for each block
136
+ foreach ( $sortlists as $key => $sortlist ) {
137
+ foreach ( $sortlist as $k => $v ) {
138
+ $sortlist[ $k ] = $temp[ $k ];
139
+ }
140
+ $sortlists[ $key ] = $sortlist;
141
+ }
142
+
143
+ if ( $sortlists ) {
144
+ echo '<fieldset id="' . esc_attr($this->field['id']) . '" class="redux-sorter-container redux-sorter">';
145
+
146
+ foreach ( $sortlists as $group => $sortlist ) {
147
+ $filled = "";
148
+
149
+ if ( isset( $this->field['limits'][ $group ] ) && count( $sortlist ) >= $this->field['limits'][ $group ] ) {
150
+ $filled = " filled";
151
+ }
152
+
153
+ echo '<ul id="' . esc_attr($this->field['id'] . '_' . $group) . '" class="sortlist_' . esc_attr($this->field['id'] . $filled) . '" data-id="' . esc_attr($this->field['id']) . '" data-group-id="' . esc_attr($group) . '">';
154
+ echo '<h3>' . esc_html($group) . '</h3>';
155
+
156
+ if ( ! isset( $sortlist['placebo'] ) ) {
157
+ array_unshift( $sortlist, array( "placebo" => "placebo" ) );
158
+ }
159
+
160
+ foreach ( $sortlist as $key => $list ) {
161
+
162
+ echo '<input class="sorter-placebo" type="hidden" name="' . esc_attr($this->field['name']) . '[' . $group . '][placebo]' . esc_attr($this->field['name_suffix']) . '" value="placebo">';
163
+
164
+ if ( $key != "placebo" ) {
165
+
166
+ //echo '<li id="' . $key . '" class="sortee">';
167
+ echo '<li id="sortee-' . esc_attr($key) . '" class="sortee" data-id="' . esc_attr($key) . '">';
168
+ echo '<input class="position ' . esc_attr($this->field['class']) . '" type="hidden" name="' . esc_attr($this->field['name'] . '[' . $group . '][' . $key . ']' . $this->field['name_suffix']) . '" value="' . esc_attr($list) . '">';
169
+ echo esc_html($list);
170
+ echo '</li>';
171
+ }
172
+ }
173
+
174
+ echo '</ul>';
175
+ }
176
+ echo '</fieldset>';
177
+ }
178
+ }
179
+ }
180
+
181
+ function enqueue() {
182
+ if ( $this->parent->args['dev_mode'] ) {
183
+ wp_enqueue_style(
184
+ 'redux-field-sorder-css',
185
+ ReduxFramework::$_url . 'inc/fields/sorter/field_sorter.css',
186
+ array(),
187
+ time(),
188
+ 'all'
189
+ );
190
+ }
191
+
192
+ wp_enqueue_script(
193
+ 'redux-field-sorter-js',
194
+ ReduxFramework::$_url . 'inc/fields/sorter/field_sorter' . Redux_Functions::isMin() . '.js',
195
+ array( 'jquery', 'redux-js', 'jquery-ui-sortable' ),
196
+ time(),
197
+ true
198
+ );
199
+ }
200
+
201
+ /**
202
+ * Functions to pass data from the PHP to the JS at render time.
203
+ *
204
+ * @return array Params to be saved as a javascript object accessable to the UI.
205
+ * @since Redux_Framework 3.1.5
206
+ */
207
+ function localize( $field, $value = "" ) {
208
+
209
+ $params = array();
210
+
211
+ if ( isset( $field['limits'] ) && ! empty( $field['limits'] ) ) {
212
+ $params['limits'] = $field['limits'];
213
+ }
214
+
215
+ if ( empty( $value ) ) {
216
+ $value = $this->value;
217
+ }
218
+ $params['val'] = $value;
219
+
220
+ return $params;
221
+ }
222
+ }
223
+ }
includes/options/redux-core/inc/fields/sorter/field_sorter.scss ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-sorter {
2
+ margin-right: -20px;
3
+
4
+ ul {
5
+ background: #F9F9F9;
6
+ border: 1px solid #E3E3E3;
7
+ min-height: 40px;
8
+ padding: 10px 10px 0;
9
+ width: 145px;
10
+ float: left;
11
+ margin: 0 15px 0 0;
12
+
13
+ &.filled {
14
+ opacity: .7;
15
+ filter: alpha(opacity=70); /* For IE8 and earlier */
16
+ background: #efecec;
17
+ }
18
+
19
+ li {
20
+ border: 1px solid #DFDFDF;
21
+ cursor: move;
22
+ font-weight: bold;
23
+ margin-bottom: 10px !important;
24
+ padding: 0 10px;
25
+ height: 40px;
26
+ line-height: 40px !important;
27
+ background-color: #F1F1F1;
28
+ background-image: -ms-linear-gradient(top, #f9f9f9, #ececec);
29
+ background-image: -moz-linear-gradient(top, #f9f9f9, #ececec);
30
+ background-image: -o-linear-gradient(top, #f9f9f9, #ececec);
31
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));
32
+ background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec);
33
+ background-image: linear-gradient(top, #f9f9f9, #ececec);
34
+ overflow: hidden;
35
+ -webkit-border-radius: 3px;
36
+ -moz-border-radius: 3px;
37
+ border-radius: 3px;
38
+ -moz-box-shadow: inset 0 1px 0 #fff;
39
+ -webkit-box-shadow: inset 0 1px 0 #fff;
40
+ box-shadow: inset 0 1px 0 #fff;
41
+ text-align: center;
42
+
43
+ h3 {
44
+ margin: 0 0 10px;
45
+ text-align: center;
46
+ color: #777;
47
+ text-transform: capitalize;
48
+ word-wrap: break-word;
49
+ }
50
+
51
+ &.placeholder {
52
+ height: 40px;
53
+ }
54
+ }
55
+ }
56
+ }
57
+
58
+ .wp-customizer {
59
+ .redux-container-sorter ul {
60
+ width: 85%;
61
+ margin: 0 0 5px 0;
62
+ }
63
+ }
includes/options/redux-core/inc/fields/spacing/field_spacing.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-spacing select,.redux-container-spacing .select_wrapper{width:80px !important;float:left}.redux-container-spacing .field-spacing-input{margin-right:10px;margin-bottom:7px}@media screen and (max-width: 782px){.redux-container-spacing .field-spacing-input input{display:inline-block !important;width:70px !important}.redux-container-spacing .field-spacing-input .add-on{padding:7px 4px;font-size:16px;line-height:1.5}.redux-container-spacing .select_wrapper{margin-top:6px}}
includes/options/redux-core/inc/fields/spacing/field_spacing.js ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.spacing = redux.field_objects.spacing || {};
8
+
9
+ $( document ).ready(
10
+ function() {
11
+ //redux.field_objects.spacing.init();
12
+ }
13
+ );
14
+
15
+ redux.field_objects.spacing.init = function( selector ) {
16
+
17
+ if ( !selector ) {
18
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-spacing:visible' );
19
+ }
20
+
21
+ $( selector ).each(
22
+ function() {
23
+ var el = $( this );
24
+ var parent = el;
25
+ if ( !el.hasClass( 'redux-field-container' ) ) {
26
+ parent = el.parents( '.redux-field-container:first' );
27
+ }
28
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
29
+ return;
30
+ }
31
+ if ( parent.hasClass( 'redux-field-init' ) ) {
32
+ parent.removeClass( 'redux-field-init' );
33
+ } else {
34
+ return;
35
+ }
36
+ var default_params = {
37
+ width: 'resolve',
38
+ triggerChange: true,
39
+ allowClear: true
40
+ };
41
+
42
+ var select2_handle = el.find( '.select2_params' );
43
+ if ( select2_handle.size() > 0 ) {
44
+ var select2_params = select2_handle.val();
45
+
46
+ select2_params = JSON.parse( select2_params );
47
+ default_params = $.extend( {}, default_params, select2_params );
48
+ }
49
+
50
+ el.find( ".redux-spacing-units" ).select2( default_params );
51
+
52
+ el.find( '.redux-spacing-input' ).on(
53
+ 'change', function() {
54
+ var units = $( this ).parents( '.redux-field:first' ).find( '.field-units' ).val();
55
+
56
+ if ( $( this ).parents( '.redux-field:first' ).find( '.redux-spacing-units' ).length !== 0 ) {
57
+ units = $( this ).parents( '.redux-field:first' ).find( '.redux-spacing-units option:selected' ).val();
58
+ }
59
+
60
+ var value = $( this ).val();
61
+
62
+ if ( typeof units !== 'undefined' && value ) {
63
+ value += units;
64
+ }
65
+
66
+ if ( $( this ).hasClass( 'redux-spacing-all' ) ) {
67
+ $( this ).parents( '.redux-field:first' ).find( '.redux-spacing-value' ).each(
68
+ function() {
69
+ $( this ).val( value );
70
+ }
71
+ );
72
+ } else {
73
+ $( '#' + $( this ).attr( 'rel' ) ).val( value );
74
+ }
75
+ }
76
+ );
77
+
78
+ el.find( '.redux-spacing-units' ).on(
79
+ 'change', function() {
80
+ $( this ).parents( '.redux-field:first' ).find( '.redux-spacing-input' ).change();
81
+ }
82
+ );
83
+ }
84
+ );
85
+ };
86
+ })( jQuery );
includes/options/redux-core/inc/fields/spacing/field_spacing.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.spacing=redux.field_objects.spacing||{},a(document).ready(function(){}),redux.field_objects.spacing.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-spacing:visible")),a(b).each(function(){var b=a(this),c=b;if(b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),!c.is(":hidden")&&c.hasClass("redux-field-init")){c.removeClass("redux-field-init");var d={width:"resolve",triggerChange:!0,allowClear:!0},e=b.find(".select2_params");if(e.size()>0){var f=e.val();f=JSON.parse(f),d=a.extend({},d,f)}b.find(".redux-spacing-units").select2(d),b.find(".redux-spacing-input").on("change",function(){var b=a(this).parents(".redux-field:first").find(".field-units").val();0!==a(this).parents(".redux-field:first").find(".redux-spacing-units").length&&(b=a(this).parents(".redux-field:first").find(".redux-spacing-units option:selected").val());var c=a(this).val();"undefined"!=typeof b&&c&&(c+=b),a(this).hasClass("redux-spacing-all")?a(this).parents(".redux-field:first").find(".redux-spacing-value").each(function(){a(this).val(c)}):a("#"+a(this).attr("rel")).val(c)}),b.find(".redux-spacing-units").on("change",function(){a(this).parents(".redux-field:first").find(".redux-spacing-input").change()})}})}}(jQuery);
includes/options/redux-core/inc/fields/spacing/field_spacing.php ADDED
@@ -0,0 +1,385 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ if ( ! class_exists( 'ReduxFramework_spacing' ) ) {
9
+ class ReduxFramework_spacing {
10
+
11
+ /**
12
+ * Field Constructor.
13
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
14
+ *
15
+ * @since ReduxFramework 1.0.0
16
+ */
17
+ function __construct( $field = array(), $value = '', $parent ) {
18
+ $this->parent = $parent;
19
+ $this->field = $field;
20
+ $this->value = $value;
21
+ }
22
+
23
+ /**
24
+ * Field Render Function.
25
+ * Takes the vars and outputs the HTML for the field in the settings
26
+ *
27
+ * @since ReduxFramework 1.0.0
28
+ */
29
+ function render() {
30
+ /*
31
+ * So, in_array() wasn't doing it's job for checking a passed array for a proper value.
32
+ * It's wonky. It only wants to check the keys against our array of acceptable values, and not the key's
33
+ * value. So we'll use this instead. Fortunately, a single no array value can be passed and it won't
34
+ * take a dump.
35
+ */
36
+
37
+ // No errors please
38
+ // Set field values
39
+ $defaults = array(
40
+ 'units' => '',
41
+ 'mode' => 'padding',
42
+ 'top' => true,
43
+ 'bottom' => true,
44
+ 'all' => false,
45
+ 'left' => true,
46
+ 'right' => true,
47
+ 'units_extended' => false,
48
+ 'display_units' => true
49
+ );
50
+
51
+ $this->field = wp_parse_args( $this->field, $defaults );
52
+
53
+ // Set default values
54
+ $defaults = array(
55
+ 'top' => '',
56
+ 'right' => '',
57
+ 'bottom' => '',
58
+ 'left' => '',
59
+ 'units' => 'px'
60
+ );
61
+
62
+ $this->value = wp_parse_args( $this->value, $defaults );
63
+
64
+ /*
65
+ * Acceptable values checks. If the passed variable doesn't pass muster, we unset them
66
+ * and reset them with default values to avoid errors.
67
+ */
68
+
69
+ // If units field has a value but is not an acceptable value, unset the variable
70
+ if ( isset( $this->field['units'] ) && ! Redux_Helpers::array_in_array( $this->field['units'], array(
71
+ '',
72
+ false,
73
+ '%',
74
+ 'in',
75
+ 'cm',
76
+ 'mm',
77
+ 'em',
78
+ 'rem',
79
+ 'ex',
80
+ 'pt',
81
+ 'pc',
82
+ 'px'
83
+ ) )
84
+ ) {
85
+ unset( $this->field['units'] );
86
+ }
87
+
88
+ //if there is a default unit value but is not an accepted value, unset the variable
89
+ if ( isset( $this->value['units'] ) && ! Redux_Helpers::array_in_array( $this->value['units'], array(
90
+ '',
91
+ '%',
92
+ 'in',
93
+ 'cm',
94
+ 'mm',
95
+ 'em',
96
+ 'rem',
97
+ 'ex',
98
+ 'pt',
99
+ 'pc',
100
+ 'px'
101
+ ) )
102
+ ) {
103
+ unset( $this->value['units'] );
104
+ }
105
+
106
+ // if ($this->field['mode'] == "absolute") {
107
+ // $this->field['units'] = "";
108
+ // $this->value['units'] = "";
109
+ // }
110
+
111
+ if ( $this->field['units'] == false ) {
112
+ $this->value == "";
113
+ }
114
+
115
+ if ( isset( $this->field['mode'] ) && ! in_array( $this->field['mode'], array(
116
+ 'margin',
117
+ 'padding'
118
+ ) )
119
+ ) {
120
+ if ( $this->field['mode'] == "absolute" ) {
121
+ $absolute = true;
122
+ }
123
+ $this->field['mode'] = "";
124
+ }
125
+
126
+ $value = array(
127
+ 'top' => isset( $this->value[ $this->field['mode'] . '-top' ] ) ? filter_var( $this->value[ $this->field['mode'] . '-top' ], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : filter_var( $this->value['top'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ),
128
+ 'right' => isset( $this->value[ $this->field['mode'] . '-right' ] ) ? filter_var( $this->value[ $this->field['mode'] . '-right' ], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : filter_var( $this->value['right'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ),
129
+ 'bottom' => isset( $this->value[ $this->field['mode'] . '-bottom' ] ) ? filter_var( $this->value[ $this->field['mode'] . '-bottom' ], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : filter_var( $this->value['bottom'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ),
130
+ 'left' => isset( $this->value[ $this->field['mode'] . '-left' ] ) ? filter_var( $this->value[ $this->field['mode'] . '-left' ], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : filter_var( $this->value['left'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION )
131
+ );
132
+
133
+ // if field units has a value and is NOT an array, then evaluate as needed.
134
+ if ( isset( $this->field['units'] ) && ! is_array( $this->field['units'] ) ) {
135
+
136
+ //if units fields has a value and is not empty but units value does not then make units value the field value
137
+ if ( isset( $this->field['units'] ) && $this->field['units'] != "" && ! isset( $this->value['units'] ) || $this->field['units'] == false ) {
138
+ $this->value['units'] = $this->field['units'];
139
+
140
+ // If units field does NOT have a value and units value does NOT have a value, set both to blank (default?)
141
+ } else if ( ! isset( $this->field['units'] ) && ! isset( $this->value['units'] ) ) {
142
+ $this->field['units'] = 'px';
143
+ $this->value['units'] = 'px';
144
+
145
+ // If units field has NO value but units value does, then set unit field to value field
146
+ } else if ( ! isset( $this->field['units'] ) && isset( $this->value['units'] ) ) { // If Value is defined
147
+ $this->field['units'] = $this->value['units'];
148
+
149
+ // if unit value is set and unit value doesn't equal unit field (coz who knows why)
150
+ // then set unit value to unit field
151
+ } elseif ( isset( $this->value['units'] ) && $this->value['units'] !== $this->field['units'] ) {
152
+ $this->value['units'] = $this->field['units'];
153
+ }
154
+
155
+ // do stuff based on unit field NOT set as an array
156
+ } elseif ( isset( $this->field['units'] ) && is_array( $this->field['units'] ) ) {
157
+ // nothing to do here, but I'm leaving the construct just in case I have to debug this again.
158
+ }
159
+
160
+ if ( isset( $this->field['units'] ) ) {
161
+ $value['units'] = $this->value['units'];
162
+ }
163
+
164
+ $this->value = $value;
165
+
166
+ if ( ! empty( $this->field['mode'] ) ) {
167
+ $this->field['mode'] = $this->field['mode'] . "-";
168
+ }
169
+
170
+
171
+ $defaults = array(
172
+ 'top' => '',
173
+ 'right' => '',
174
+ 'bottom' => '',
175
+ 'left' => '',
176
+ 'units' => ''
177
+ );
178
+
179
+ $this->value = wp_parse_args( $this->value, $defaults );
180
+
181
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
182
+ $select2_params = json_encode( $this->field['select2'] );
183
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
184
+
185
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
186
+ }
187
+
188
+ echo '<input type="hidden" class="field-units" value="' . $this->value['units'] . '">';
189
+
190
+ if ( isset( $this->field['all'] ) && $this->field['all'] == true ) {
191
+ echo '<div class="field-spacing-input input-prepend"><span class="add-on"><i class="el el-fullscreen icon-large"></i></span><input type="text" class="redux-spacing-all redux-spacing-input mini ' . $this->field['class'] . '" placeholder="' . __( 'All', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-all" value="' . $this->value['top'] . '"></div>';
192
+ }
193
+
194
+ if ( $this->field['top'] === true ) {
195
+ echo '<input type="hidden" class="redux-spacing-value" id="' . $this->field['id'] . '-top" name="' . $this->field['name'] . $this->field['name_suffix'] . '[' . $this->field['mode'] . 'top]' . '" value="' . $this->value['top'] . ( ! empty( $this->value['top'] ) ? $this->value['units'] : '' ) . '">';
196
+ }
197
+
198
+ if ( $this->field['right'] === true ) {
199
+ echo '<input type="hidden" class="redux-spacing-value" id="' . $this->field['id'] . '-right" name="' . $this->field['name'] . $this->field['name_suffix'] . '[' . $this->field['mode'] . 'right]' . '" value="' . $this->value['right'] . ( ! empty( $this->value['right'] ) ? $this->value['units'] : '' ) . '">';
200
+ }
201
+
202
+ if ( $this->field['bottom'] === true ) {
203
+ echo '<input type="hidden" class="redux-spacing-value" id="' . $this->field['id'] . '-bottom" name="' . $this->field['name'] . $this->field['name_suffix'] . '[' . $this->field['mode'] . 'bottom]' . '" value="' . $this->value['bottom'] . ( ! empty( $this->value['bottom'] ) ? $this->value['units'] : '' ) . '">';
204
+ }
205
+
206
+ if ( $this->field['left'] === true ) {
207
+ echo '<input type="hidden" class="redux-spacing-value" id="' . $this->field['id'] . '-left" name="' . $this->field['name'] . $this->field['name_suffix'] . '[' . $this->field['mode'] . 'left]' . '" value="' . $this->value['left'] . ( ! empty( $this->value['left'] ) ? $this->value['units'] : '' ) . '">';
208
+ }
209
+
210
+ if ( ! isset( $this->field['all'] ) || $this->field['all'] !== true ) {
211
+ /**
212
+ * Top
213
+ * */
214
+ if ( $this->field['top'] === true ) {
215
+ echo '<div class="field-spacing-input input-prepend"><span class="add-on"><i class="el el-arrow-up icon-large"></i></span><input type="text" class="redux-spacing-top redux-spacing-input mini ' . $this->field['class'] . '" placeholder="' . __( 'Top', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-top" value="' . $this->value['top'] . '"></div>';
216
+ }
217
+
218
+ /**
219
+ * Right
220
+ * */
221
+ if ( $this->field['right'] === true ) {
222
+ echo '<div class="field-spacing-input input-prepend"><span class="add-on"><i class="el el-arrow-right icon-large"></i></span><input type="text" class="redux-spacing-right redux-spacing-input mini ' . $this->field['class'] . '" placeholder="' . __( 'Right', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-right" value="' . $this->value['right'] . '"></div>';
223
+ }
224
+
225
+ /**
226
+ * Bottom
227
+ * */
228
+ if ( $this->field['bottom'] === true ) {
229
+ echo '<div class="field-spacing-input input-prepend"><span class="add-on"><i class="el el-arrow-down icon-large"></i></span><input type="text" class="redux-spacing-bottom redux-spacing-input mini ' . $this->field['class'] . '" placeholder="' . __( 'Bottom', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-bottom" value="' . $this->value['bottom'] . '"></div>';
230
+ }
231
+
232
+ /**
233
+ * Left
234
+ * */
235
+ if ( $this->field['left'] === true ) {
236
+ echo '<div class="field-spacing-input input-prepend"><span class="add-on"><i class="el el-arrow-left icon-large"></i></span><input type="text" class="redux-spacing-left redux-spacing-input mini ' . $this->field['class'] . '" placeholder="' . __( 'Left', 'redux-framework' ) . '" rel="' . $this->field['id'] . '-left" value="' . $this->value['left'] . '"></div>';
237
+ }
238
+ }
239
+
240
+ /**
241
+ * Units
242
+ * */
243
+ if ( $this->field['units'] !== false && is_array( $this->field['units'] ) /* && !isset($absolute) */ && $this->field['display_units'] == true ) {
244
+
245
+ echo '<div class="select_wrapper spacing-units" original-title="' . __( 'Units', 'redux-framework' ) . '">';
246
+ echo '<select data-placeholder="' . __( 'Units', 'redux-framework' ) . '" class="redux-spacing redux-spacing-units select ' . $this->field['class'] . '" original-title="' . __( 'Units', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[units]' . '" id="' . $this->field['id'] . '_units">';
247
+
248
+ if ( $this->field['units_extended'] ) {
249
+ $testUnits = array( 'px', 'em', 'rem', '%', 'in', 'cm', 'mm', 'ex', 'pt', 'pc' );
250
+ } else {
251
+ $testUnits = array( 'px', 'em', 'pt', 'rem', '%' );
252
+ }
253
+
254
+ if ( $this->field['units'] != "" || is_array( $this->field['units'] ) ) {
255
+ $testUnits = $this->field['units'];
256
+ }
257
+
258
+ echo '<option></option>';
259
+
260
+ if ( in_array( $this->field['units'], $testUnits ) ) {
261
+ echo '<option value="' . $this->field['units'] . '" selected="selected">' . $this->field['units'] . '</option>';
262
+ } else {
263
+ foreach ( $testUnits as $aUnit ) {
264
+ echo '<option value="' . $aUnit . '" ' . selected( $this->value['units'], $aUnit, false ) . '>' . $aUnit . '</option>';
265
+ }
266
+ }
267
+ echo '</select></div>';
268
+
269
+ }
270
+ }
271
+
272
+ /**
273
+ * Enqueue Function.
274
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
275
+ *
276
+ * @since ReduxFramework 1.0.0
277
+ */
278
+ function enqueue() {
279
+ wp_enqueue_style( 'select2-css' );
280
+
281
+ wp_enqueue_script(
282
+ 'redux-field-spacing-js',
283
+ ReduxFramework::$_url . 'inc/fields/spacing/field_spacing' . Redux_Functions::isMin() . '.js',
284
+ array( 'jquery', 'select2-js', 'redux-js' ),
285
+ time(),
286
+ true
287
+ );
288
+
289
+ if ($this->parent->args['dev_mode']) {
290
+ wp_enqueue_style(
291
+ 'redux-field-spacing-css',
292
+ ReduxFramework::$_url . 'inc/fields/spacing/field_spacing.css',
293
+ array(),
294
+ time(),
295
+ 'all'
296
+ );
297
+ }
298
+ } //function
299
+
300
+ public function output() {
301
+
302
+ if ( ! isset( $this->field['mode'] ) ) {
303
+ $this->field['mode'] = "padding";
304
+ }
305
+
306
+ if ( isset( $this->field['mode'] ) && ! in_array( $this->field['mode'], array(
307
+ 'padding',
308
+ 'absolute',
309
+ 'margin'
310
+ ) )
311
+ ) {
312
+ $this->field['mode'] = "";
313
+ }
314
+
315
+ $mode = ( $this->field['mode'] != "absolute" ) ? $this->field['mode'] : "";
316
+ $units = isset( $this->value['units'] ) ? $this->value['units'] : "";
317
+ $style = '';
318
+
319
+ if ( ! empty( $mode ) ) {
320
+ foreach ( $this->value as $key => $value ) {
321
+ if ( $key == "units" ) {
322
+ continue;
323
+ }
324
+
325
+ // Strip off any alpha for is_numeric test - kp
326
+ $num_no_alpha = preg_replace('/[^\d.-]/', '', $value);
327
+
328
+ // Output if it's a numeric entry
329
+ if ( isset( $value ) && is_numeric( $num_no_alpha ) ) {
330
+ $style .= $key . ':' . $value . ';';
331
+ }
332
+
333
+ }
334
+ } else {
335
+ $this->value['top'] = isset( $this->value['top'] ) ? $this->value['top'] : 0;
336
+ $this->value['bottom'] = isset( $this->value['bottom'] ) ? $this->value['bottom'] : 0;
337
+ $this->value['left'] = isset( $this->value['left'] ) ? $this->value['left'] : 0;
338
+ $this->value['right'] = isset( $this->value['right'] ) ? $this->value['right'] : 0;
339
+
340
+ $cleanValue = array(
341
+ 'top' => isset( $this->value[ $mode . '-top' ] ) ? filter_var( $this->value[ $mode . '-top' ], FILTER_SANITIZE_NUMBER_INT ) : filter_var( $this->value['top'], FILTER_SANITIZE_NUMBER_INT ),
342
+ 'right' => isset( $this->value[ $mode . '-right' ] ) ? filter_var( $this->value[ $mode . '-right' ], FILTER_SANITIZE_NUMBER_INT ) : filter_var( $this->value['right'], FILTER_SANITIZE_NUMBER_INT ),
343
+ 'bottom' => isset( $this->value[ $mode . '-bottom' ] ) ? filter_var( $this->value[ $mode . '-bottom' ], FILTER_SANITIZE_NUMBER_INT ) : filter_var( $this->value['bottom'], FILTER_SANITIZE_NUMBER_INT ),
344
+ 'left' => isset( $this->value[ $mode . '-left' ] ) ? filter_var( $this->value[ $mode . '-left' ], FILTER_SANITIZE_NUMBER_INT ) : filter_var( $this->value['left'], FILTER_SANITIZE_NUMBER_INT )
345
+ );
346
+
347
+ if ( isset( $this->field['all'] ) && true == $this->field['all'] ) {
348
+ $style .= $mode . 'top:' . $cleanValue['top'] . $units . ';';
349
+ $style .= $mode . 'bottom:' . $cleanValue['top'] . $units . ';';
350
+ $style .= $mode . 'right:' . $cleanValue['top'] . $units . ';';
351
+ $style .= $mode . 'left:' . $cleanValue['top'] . $units . ';';
352
+ } else {
353
+ if ( true == $this->field['top'] ) {
354
+ $style .= $mode . 'top:' . $cleanValue['top'] . $units . ';';
355
+ }
356
+
357
+ if ( true == $this->field['bottom'] ) {
358
+ $style .= $mode . 'bottom:' . $cleanValue['bottom'] . $units . ';';
359
+ }
360
+
361
+ if ( true == $this->field['left'] ) {
362
+ $style .= $mode . 'left:' . $cleanValue['left'] . $units . ';';
363
+ }
364
+
365
+ if ( true == $this->field['right'] ) {
366
+ $style .= $mode . 'right:' . $cleanValue['right'] . $units . ';';
367
+ }
368
+ }
369
+ }
370
+
371
+ if ( ! empty( $style ) ) {
372
+
373
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
374
+ $keys = implode( ",", $this->field['output'] );
375
+ $this->parent->outputCSS .= $keys . "{" . $style . '}';
376
+ }
377
+
378
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
379
+ $keys = implode( ",", $this->field['compiler'] );
380
+ $this->parent->compilerCSS .= $keys . "{" . $style . '}';
381
+ }
382
+ }
383
+ }
384
+ }
385
+ }
includes/options/redux-core/inc/fields/spacing/field_spacing.scss ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-spacing {
2
+ select,
3
+ .select_wrapper {
4
+ width: 80px !important;
5
+ float: left;
6
+ }
7
+
8
+ .field-spacing-input {
9
+ margin-right: 10px;
10
+ margin-bottom: 7px;
11
+ }
12
+ }
13
+
14
+ @media screen and (max-width: 782px) {
15
+ .redux-container-spacing {
16
+ .field-spacing-input {
17
+ input {
18
+ display: inline-block !important;
19
+ width: 70px !important;
20
+ }
21
+
22
+ .add-on {
23
+ padding: 7px 4px;
24
+ font-size: 16px;
25
+ line-height: 1.5;
26
+ }
27
+ }
28
+
29
+ .select_wrapper {
30
+ margin-top: 6px;
31
+ }
32
+ }
33
+ }
includes/options/redux-core/inc/fields/spinner/arrow_left.png ADDED
Binary file
includes/options/redux-core/inc/fields/spinner/arrow_right.png ADDED
Binary file
includes/options/redux-core/inc/fields/spinner/field_spinner.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-spinner .spinner-wrpr{position:relative;display:block;height:30px;overflow:hidden}.redux-container-spinner .spinner-wrpr .spinner-input{position:relative !important;z-index:1;width:45px !important;height:30px !important;background:#e7e7e7 !important;border:1px solid #bfbfbf !important;border-right:0 !important;border-left:0 !important;-webkit-border-radius:0 !important;-moz-border-radius:0 !important;border-radius:0 !important}.redux-container-spinner .ui-spinner{position:static;display:inline}.redux-container-spinner .ui-spinner-buttons{position:absolute;padding:0}.redux-container-spinner .ui-widget .ui-spinner-button{position:absolute;top:0;padding:0 0 30px;overflow:hidden;cursor:pointer;background:-moz-linear-gradient(#fff, #f3f3f3);background:-o-linear-gradient(#fff, #f3f3f3);background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));background:linear-gradient(#fff, #f3f3f3);background-color:#ffffff;border:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.redux-container-spinner .ui-spinner-button:hover,.redux-container-spinner .ui-state-hover{background:-moz-linear-gradient(#f3f3f3, #fff);background:-o-linear-gradient(#f3f3f3, #fff);background:-webkit-gradient(linear, left top, left bottom, from(#f3f3f3), to(#fff));background:linear-gradient(#f3f3f3, #fff);background-color:#f3f3f3}.redux-container-spinner .ui-corner-tr,.redux-container-spinner .ui-spinner-button .ui-icon-triangle-1-n{-webkit-border-radius:0 5px 5px 0;-moz-border-radius:0 5px 5px 0;border-radius:0 5px 5px 0}.redux-container-spinner .ui-corner-br,.redux-container-spinner .ui-spinner-button .ui-icon-triangle-1-s{-webkit-border-radius:5px 0 0 5px;-moz-border-radius:5px 0 0 5px;border-radius:5px 0 0 5px}.redux-container-spinner .ui-spinner-button .ui-icon{top:0;display:block;width:28px;height:28px;margin:0;border:1px solid #b7b7b7}.redux-container-spinner .ui-spinner-button .ui-icon-triangle-1-n{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAKCAYAAACXDi8zAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADxJREFUeNpsjwsKADAIQu3u3tsRY6M5gz7w0AqSQFLdZ3ZRgmf44JQ/EOZ9oYOsiDviVemP2oYoWCwBBgDpO6VXVo3RyQAAAABJRU5ErkJggg==) 10px 10px no-repeat !important}.redux-container-spinner .ui-spinner-button .ui-icon-triangle-1-s{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAKCAYAAACXDi8zAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADhJREFUeNpi+P//PwM6bmlpwS4IorEKokggC8Il0AVhEv9x6sAmiaz9P05XIUsygmVRAUiAESDAAFHcpVdWtdj/AAAAAElFTkSuQmCC) 10px 10px no-repeat !important}
includes/options/redux-core/inc/fields/spinner/field_spinner.js ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.spinner = redux.field_objects.spinner || {};
8
+
9
+ $( document ).ready(
10
+ function() {
11
+ //redux.field_objects.spinner.init();
12
+ }
13
+ );
14
+
15
+ redux.field_objects.spinner.init = function( selector ) {
16
+
17
+ if ( !selector ) {
18
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-spinner:visible' );
19
+ }
20
+
21
+ $( selector ).each(
22
+ function() {
23
+ var el = $( this );
24
+ var parent = el;
25
+ if ( !el.hasClass( 'redux-field-container' ) ) {
26
+ parent = el.parents( '.redux-field-container:first' );
27
+ }
28
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
29
+ return;
30
+ }
31
+ if ( parent.hasClass( 'redux-field-init' ) ) {
32
+ parent.removeClass( 'redux-field-init' );
33
+ } else {
34
+ return;
35
+ }
36
+ el.find( '.redux_spinner' ).each(
37
+ function() {
38
+ //slider init
39
+ var spinner = $( this ).find( '.spinner-input' ).data();
40
+ spinner.id = $( this ).find( '.spinner-input' ).attr( 'id' );
41
+
42
+ el.find( "#" + spinner.id ).spinner(
43
+ {
44
+ value: parseFloat( spinner.val, null ),
45
+ min: parseFloat( spinner.min, null ),
46
+ max: parseFloat( spinner.max, null ),
47
+ step: parseFloat( spinner.step, null ),
48
+ range: "min",
49
+
50
+ slide: function( event, ui ) {
51
+ var input = $( "#" + spinner.id );
52
+ input.val( ui.value );
53
+ redux_change( input );
54
+ }
55
+ }
56
+ );
57
+
58
+ // Limit input for negative
59
+ var neg = false;
60
+ if ( parseInt( spinner.min, null ) < 0 ) {
61
+ neg = true;
62
+ }
63
+
64
+ //el.find( "#" + spinner.id ).numeric(
65
+ // {
66
+ // allowMinus: neg,
67
+ // min: spinner.min,
68
+ // max: spinner.max
69
+ // }
70
+ //);
71
+
72
+ }
73
+ );
74
+
75
+ // Update the slider from the input and vice versa
76
+ el.find( ".spinner-input" ).keyup(
77
+ function() {
78
+ $( this ).addClass( 'spinnerInputChange' );
79
+ }
80
+ );
81
+
82
+ el.find( ".spinner-input" ).focus(
83
+ function() {
84
+ redux.field_objects.spinner.clean(
85
+ $( this ).val(), $( this )
86
+ );
87
+ }
88
+ );
89
+
90
+ el.find( '.spinner-input' ).typeWatch(
91
+ {
92
+ callback: function( value ) {
93
+ redux.field_objects.spinner.clean(
94
+ value, $( this )
95
+ );
96
+ },
97
+
98
+ wait: 500,
99
+ highlight: false,
100
+ captureLength: 1
101
+ }
102
+ );
103
+ }
104
+ );
105
+ };
106
+
107
+ redux.field_objects.spinner.clean = function( value, selector ) {
108
+
109
+ if ( !selector.hasClass( 'spinnerInputChange' ) ) {
110
+ return;
111
+ }
112
+ selector.removeClass( 'spinnerInputChange' );
113
+
114
+ var spinner = selector.data();
115
+ value = parseFloat( value );
116
+
117
+ if ( value === "" || value === null ) {
118
+ value = spinner.min;
119
+ } else if ( value >= parseInt( spinner.max ) ) {
120
+ value = spinner.max;
121
+ } else if ( value <= parseInt( spinner.min ) ) {
122
+ value = spinner.min;
123
+ } else {
124
+ value = Math.round( value / spinner.step ) * spinner.step;
125
+ }
126
+ selector.val( value ).trigger( 'change' );
127
+ };
128
+
129
+ })( jQuery );
includes/options/redux-core/inc/fields/spinner/field_spinner.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.spinner=redux.field_objects.spinner||{},a(document).ready(function(){}),redux.field_objects.spinner.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-spinner:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".redux_spinner").each(function(){var c=a(this).find(".spinner-input").data();c.id=a(this).find(".spinner-input").attr("id"),b.find("#"+c.id).spinner({value:parseFloat(c.val,null),min:parseFloat(c.min,null),max:parseFloat(c.max,null),step:parseFloat(c.step,null),range:"min",slide:function(b,d){var e=a("#"+c.id);e.val(d.value),redux_change(e)}});var d=!1;parseInt(c.min,null)<0&&(d=!0)}),b.find(".spinner-input").keyup(function(){a(this).addClass("spinnerInputChange")}),b.find(".spinner-input").focus(function(){redux.field_objects.spinner.clean(a(this).val(),a(this))}),b.find(".spinner-input").typeWatch({callback:function(b){redux.field_objects.spinner.clean(b,a(this))},wait:500,highlight:!1,captureLength:1}))})},redux.field_objects.spinner.clean=function(a,b){if(b.hasClass("spinnerInputChange")){b.removeClass("spinnerInputChange");var c=b.data();a=parseFloat(a),a=""===a||null===a?c.min:a>=parseInt(c.max)?c.max:a<=parseInt(c.min)?c.min:Math.round(a/c.step)*c.step,b.val(a).trigger("change")}}}(jQuery);
includes/options/redux-core/inc/fields/spinner/field_spinner.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ if ( ! class_exists( 'ReduxFramework_spinner' ) ) {
9
+ class ReduxFramework_spinner {
10
+
11
+ /**
12
+ * Field Constructor.
13
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
14
+ *
15
+ * @since ReduxFramework 3.0.0
16
+ */
17
+ function __construct( $field = array(), $value = '', $parent ) {
18
+ $this->parent = $parent;
19
+ $this->field = $field;
20
+ $this->value = $value;
21
+ } //function
22
+
23
+ /**
24
+ * Field Render Function.
25
+ * Takes the vars and outputs the HTML for the field in the settings
26
+ *
27
+ * @since ReduxFramework 3.0.0
28
+ */
29
+ function render() {
30
+
31
+ $params = array(
32
+ 'min' => '',
33
+ 'max' => '',
34
+ 'step' => '',
35
+ 'default' => '',
36
+ );
37
+
38
+ $this->field = wp_parse_args( $this->field, $params );
39
+ $data_string = "";
40
+ foreach($this->field as $key => $val) {
41
+ if (in_array($key, array('min', 'max', 'step', 'default'))) {
42
+ $data_string.= " data-".$key.'="'.$val.'"';
43
+ }
44
+ }
45
+ $data_string .= ' data-val="'.$val.'"';
46
+
47
+
48
+ // Don't allow input edit if there's a step
49
+ $readonly = "";
50
+ if ( isset( $this->field['edit'] ) && $this->field['edit'] == false ) {
51
+ $readonly = ' readonly="readonly"';
52
+ }
53
+
54
+
55
+ echo '<div id="' . $this->field['id'] . '-spinner" class="redux_spinner" rel="' . $this->field['id'] . '">';
56
+ echo '<input type="text" '.$data_string.' name="' . $this->field['name'] . $this->field['name_suffix'] . '" id="' . $this->field['id'] . '" value="' . $this->value . '" class="mini spinner-input ' . $this->field['class'] . '"' . $readonly . '/>';
57
+ echo '</div>';
58
+ } //function
59
+
60
+ /**
61
+ * Clean the field data to the fields defaults given the parameters.
62
+ *
63
+ * @since Redux_Framework 3.1.1
64
+ */
65
+ function clean() {
66
+
67
+ if ( empty( $this->field['min'] ) ) {
68
+ $this->field['min'] = 0;
69
+ } else {
70
+ $this->field['min'] = intval( $this->field['min'] );
71
+ }
72
+
73
+ if ( empty( $this->field['max'] ) ) {
74
+ $this->field['max'] = intval( $this->field['min'] ) + 1;
75
+ } else {
76
+ $this->field['max'] = intval( $this->field['max'] );
77
+ }
78
+
79
+ if ( empty( $this->field['step'] ) || $this->field['step'] > $this->field['max'] ) {
80
+ $this->field['step'] = 1;
81
+ } else {
82
+ $this->field['step'] = intval( $this->field['step'] );
83
+ }
84
+
85
+ if ( empty( $this->value ) && ! empty( $this->field['default'] ) && intval( $this->field['min'] ) >= 1 ) {
86
+ $this->value = intval( $this->field['default'] );
87
+ }
88
+
89
+ if ( empty( $this->value ) && intval( $this->field['min'] ) >= 1 ) {
90
+ $this->value = intval( $this->field['min'] );
91
+ }
92
+
93
+ if ( empty( $this->value ) ) {
94
+ $this->value = 0;
95
+ }
96
+
97
+ // Extra Validation
98
+ if ( $this->value < $this->field['min'] ) {
99
+ $this->value = intval( $this->field['min'] );
100
+ } else if ( $this->value > $this->field['max'] ) {
101
+ $this->value = intval( $this->field['max'] );
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Enqueue Function.
107
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
108
+ *
109
+ * @since ReduxFramework 3.0.0
110
+ */
111
+ function enqueue() {
112
+
113
+ wp_enqueue_script(
114
+ 'redux-field-spinner-custom-js',
115
+ ReduxFramework::$_url . 'inc/fields/spinner/vendor/spinner_custom.js',
116
+ array( 'jquery' ),
117
+ time(),
118
+ true
119
+ );
120
+
121
+ wp_enqueue_script(
122
+ 'redux-field-spinner-js',
123
+ ReduxFramework::$_url . 'inc/fields/spinner/field_spinner' . Redux_Functions::isMin() . '.js',
124
+ array(
125
+ 'jquery',
126
+ 'redux-field-spinner-custom-js',
127
+ 'jquery-ui-core',
128
+ 'jquery-ui-dialog',
129
+ 'redux-js'
130
+ ),
131
+ time(),
132
+ true
133
+ );
134
+
135
+ if ($this->parent->args['dev_mode']) {
136
+ wp_enqueue_style(
137
+ 'redux-field-spinner-css',
138
+ ReduxFramework::$_url . 'inc/fields/spinner/field_spinner.css',
139
+ array(),
140
+ time(),
141
+ 'all'
142
+ );
143
+ }
144
+ }
145
+
146
+ public function output() {
147
+ $style = '';
148
+
149
+ if ( ! empty( $this->value ) ) {
150
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
151
+ $css = $this->parseCSS($this->value, $this->field['output']);
152
+ $this->parent->outputCSS .= $css;
153
+ }
154
+
155
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
156
+ $css = $this->parseCSS($this->value, $this->field['output']);
157
+ $this->parent->compilerCSS .= $css;
158
+
159
+ }
160
+ }
161
+ }
162
+
163
+ private function parseCSS($value, $output){
164
+ // No notices
165
+ $css = '';
166
+
167
+ $unit = isset($this->field['output_unit']) ? $this->field['output_unit'] : 'px';
168
+
169
+ // Must be an array
170
+ if (is_numeric($value)) {
171
+ if (is_array($output)) {
172
+ foreach($output as $mode => $selector) {
173
+ if (!empty($mode) && !empty($selector)) {
174
+ $css .= $selector . '{' . $mode . ': ' . $value . $unit . ';}';
175
+ }
176
+ }
177
+ }
178
+ }
179
+
180
+ return $css;
181
+ }
182
+ }
183
+ }
includes/options/redux-core/inc/fields/spinner/field_spinner.scss ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-spinner {
2
+ .spinner-wrpr {
3
+ position: relative;
4
+ display: block;
5
+ height: 30px;
6
+ overflow: hidden;
7
+
8
+ .spinner-input {
9
+ position: relative !important;
10
+ z-index: 1;
11
+ width: 45px !important;
12
+ height: 30px !important;
13
+ background: #e7e7e7 !important;
14
+ border: 1px solid #bfbfbf !important;
15
+ border-right: 0 !important;
16
+ border-left: 0 !important;
17
+ -webkit-border-radius: 0 !important;
18
+ -moz-border-radius: 0 !important;
19
+ border-radius: 0 !important;
20
+ }
21
+ }
22
+
23
+ .ui-spinner {
24
+ position: static;
25
+ display: inline;
26
+ }
27
+
28
+
29
+ .ui-spinner-buttons {
30
+ position: absolute;
31
+ padding: 0;
32
+ }
33
+
34
+ .ui-widget .ui-spinner-button {
35
+ position: absolute;
36
+ top: 0;
37
+ padding: 0 0 30px;
38
+ overflow: hidden;
39
+ cursor: pointer;
40
+ background: -moz-linear-gradient(#ffffff, #f3f3f3);
41
+ background: -o-linear-gradient(#ffffff, #f3f3f3);
42
+ background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f3f3f3));
43
+ background: linear-gradient(#ffffff, #f3f3f3);
44
+ background-color: #ffffff;
45
+ border: none;
46
+ -webkit-box-shadow: none;
47
+ -moz-box-shadow: none;
48
+ box-shadow: none;
49
+ }
50
+
51
+ .ui-spinner-button:hover,
52
+ .ui-state-hover {
53
+ background: -moz-linear-gradient(#f3f3f3, #ffffff);
54
+ background: -o-linear-gradient(#f3f3f3, #ffffff);
55
+ background: -webkit-gradient(linear, left top, left bottom, from(#f3f3f3), to(#ffffff));
56
+ background: linear-gradient(#f3f3f3, #ffffff);
57
+ background-color: #f3f3f3;
58
+ }
59
+
60
+ .ui-corner-tr,
61
+ .ui-spinner-button .ui-icon-triangle-1-n {
62
+ -webkit-border-radius: 0 5px 5px 0;
63
+ -moz-border-radius: 0 5px 5px 0;
64
+ border-radius: 0 5px 5px 0;
65
+ }
66
+
67
+ .ui-corner-br,
68
+ .ui-spinner-button .ui-icon-triangle-1-s {
69
+ -webkit-border-radius: 5px 0 0 5px;
70
+ -moz-border-radius: 5px 0 0 5px;
71
+ border-radius: 5px 0 0 5px;
72
+ }
73
+
74
+ .ui-spinner-button {
75
+ .ui-icon {
76
+ top: 0;
77
+ display: block;
78
+ width: 28px;
79
+ height: 28px;
80
+ margin: 0;
81
+ border: 1px solid #b7b7b7;
82
+ }
83
+
84
+ .ui-icon-triangle-1-n {
85
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAKCAYAAACXDi8zAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADxJREFUeNpsjwsKADAIQu3u3tsRY6M5gz7w0AqSQFLdZ3ZRgmf44JQ/EOZ9oYOsiDviVemP2oYoWCwBBgDpO6VXVo3RyQAAAABJRU5ErkJggg==) 10px 10px no-repeat!important;
86
+ }
87
+
88
+ .ui-icon-triangle-1-s {
89
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAKCAYAAACXDi8zAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADhJREFUeNpi+P//PwM6bmlpwS4IorEKokggC8Il0AVhEv9x6sAmiaz9P05XIUsygmVRAUiAESDAAFHcpVdWtdj/AAAAAElFTkSuQmCC) 10px 10px no-repeat!important;
90
+ }
91
+ }
92
+ }
93
+
94
+ @media screen and (max-width: 570px) {
95
+ .redux-container-spinner {
96
+ .spinner-wrpr {
97
+ //text-align: center;
98
+ // Need to center align this SOMEHOW
99
+ }
100
+ }
101
+ }
includes/options/redux-core/inc/fields/spinner/vendor/spinner_custom.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(a,b){var c="ui-state-active",d="ui-state-hover",e="ui-state-disabled",f=a.ui.keyCode,g=f.UP,h=f.DOWN,i=f.RIGHT,j=f.LEFT,k=f.PAGE_UP,l=f.PAGE_DOWN,m=f.HOME,n=f.END,o=a.browser.msie,p=a.browser.mozilla?"DOMMouseScroll":"mousewheel",q=".uispinner",r=[g,h,i,j,k,l,m,n,f.BACKSPACE,f.DELETE,f.TAB],s;a.widget("ui.spinner",{options:{min:null,max:null,allowNull:false,group:"",point:".",prefix:"",suffix:"",places:null,defaultStep:1,largeStep:10,mouseWheel:true,increment:"slow",className:null,showOn:"always",width:95,upIconClass:"ui-icon-triangle-1-n",downIconClass:"ui-icon-triangle-1-s",format:function(a,b){var c=this,d=/(\d+)(\d{3})/,e=(isNaN(a)?0:Math.abs(a)).toFixed(b)+"";for(e=e.replace(".",c.point);d.test(e)&&c.group;e=e.replace(d,"$1"+c.group+"$2")){}return(a<0?"-":"")+c.prefix+e+c.suffix},parse:function(a){var b=this;if(b.group==".")a=a.replace(".","");if(b.point!=".")a=a.replace(b.point,".");return parseFloat(a.replace(/[^0-9\-\.]/g,""))}},_create:function(){var a=this,b=a.element,c=b.attr("type");if(!b.is("input")||c!="text"&&c!="number"){console.error("Invalid target for ui.spinner");return}a._procOptions(true);a._createButtons(b);if(!b.is(":enabled"))a.disable()},_createButtons:function(b){function R(){if(L){a(this).removeClass(c);p._stopSpin();L=false}return false}function Q(){if(!t.disabled){var b=p.element[0],d=this===C?1:-1;b.focus();b.select();a(this).addClass(c);L=true;p._startSpin(d)}return false}function P(a){function b(){G=0;a()}if(G){if(a===H)return;clearTimeout(G)}H=a;G=setTimeout(b,100)}function O(a,b){if(K)return false;var c=String.fromCharCode(b||a),d=p.options;if(c>="0"&&c<="9"||c=="-")return false;if(p.places>0&&c==d.point||c==d.group)return false;return true}function N(a){for(var b=0;b<r.length;b++)if(r[b]==a)return true;return false}function e(a){return a=="auto"?0:parseInt(a)}var p=this,t=p.options,u=t.className,v=t.width,w=t.showOn,x=a.support.boxModel,y=b.outerHeight(),z=p.oMargin=e(b.css("margin-right")),A=p.wrapper=b.wrap('<span class="spinner-wrpr" />').css({width:(p.oWidth=x?b.width():b.outerWidth())-v,marginRight:"30px",marginLeft:"30px",textAlign:"center","float":"none",marginTop:0}).after('<span class="ui-spinner ui-widget"></span>').next(),B=p.btnContainer=a('<div class="ui-spinner-buttons">'+'<div class="ui-spinner-up ui-spinner-button ui-state-default ui-corner-tr"><span class="ui-icon '+t.upIconClass+'"> </span></div>'+'<div class="ui-spinner-down ui-spinner-button ui-state-default ui-corner-br"><span class="ui-icon '+t.downIconClass+'"> </span></div>'+"</div>"),C,D,E,F,G,H,I,J,K,L,M=b[0].dir=="rtl";if(u)A.addClass(u);A.append(B.css({height:y,left:0,top:0}));E=p.buttons=B.find(".ui-spinner-button");E.css({width:"30px",height:y-(x?E.outerHeight()-E.height():0)});E.eq(0).css({right:"0"});E.eq(1).css({left:"0"});C=E[0];D=E[1];F=E.find(".ui-icon");B.width("105px");if(w!="always")B.css("opacity",0);if(w=="hover"||w=="both")E.add(b).bind("mouseenter"+q,function(){P(function(){I=true;if(!p.focused||w=="hover")p.showButtons()})}).bind("mouseleave"+q,function S(){P(function(){I=false;if(!p.focused||w=="hover")p.hideButtons()})});E.hover(function(){p.buttons.removeClass(d);if(!t.disabled)a(this).addClass(d)},function(){a(this).removeClass(d)}).mousedown(Q).mouseup(R).mouseout(R);if(o)E.dblclick(function(){if(!t.disabled){p._change();p._doSpin((this===C?1:-1)*t.step)}return false}).bind("selectstart",function(){return false});b.bind("keydown"+q,function(b){var d,e,f,o=b.keyCode;if(b.ctrl||b.alt)return true;if(N(o))K=true;if(J)return false;switch(o){case g:case k:d=1;e=o==k;break;case h:case l:d=-1;e=o==l;break;case i:case j:d=o==i^M?1:-1;break;case m:f=p.options.min;if(f!=null)p._setValue(f);return false;case n:f=p.options.max;f=p.options.max;if(f!=null)p._setValue(f);return false}if(d){if(!J&&!t.disabled){keyDir=d;a(d>0?C:D).addClass(c);J=true;p._startSpin(d,e)}return false}}).bind("keyup"+q,function(a){if(a.ctrl||a.alt)return true;if(N(f))K=false;switch(a.keyCode){case g:case i:case k:case h:case j:case l:E.removeClass(c);p._stopSpin();J=false;return false}}).bind("keypress"+q,function(a){if(O(a.keyCode,a.charCode))return false}).bind("change"+q,function(){p._change()}).bind("focus"+q,function(){function a(){p.element.select()}o?a():setTimeout(a,0);p.focused=true;s=p;if(!I&&(w=="focus"||w=="both"))p.showButtons()}).bind("blur"+q,function(){p.focused=false;if(!I&&(w=="focus"||w=="both"))p.hideButtons()})},_procOptions:function(a){var b=this,c=b.element,d=b.options,e=d.min,f=d.max,g=d.step,h=d.places,i=-1,j;if(d.increment=="slow")d.increment=[{count:1,mult:1,delay:250},{count:3,mult:1,delay:100},{count:0,mult:1,delay:50}];else if(d.increment=="fast")d.increment=[{count:1,mult:1,delay:250},{count:19,mult:1,delay:100},{count:80,mult:1,delay:20},{count:100,mult:10,delay:20},{count:0,mult:100,delay:20}];if(e==null&&(j=c.attr("min"))!=null)e=parseFloat(j);if(f==null&&(j=c.attr("max"))!=null)f=parseFloat(j);if(!g&&(j=c.attr("step"))!=null)if(j!="any"){g=parseFloat(j);d.largeStep*=g}d.step=g=g||d.defaultStep;if(h==null&&(j=g+"").indexOf(".")!=-1)h=j.length-j.indexOf(".")-1;b.places=h;if(f!=null&&e!=null){if(e>f)e=f;i=Math.max(Math.max(i,d.format(f,h,c).length),d.format(e,h,c).length)}if(a)b.inputMaxLength=c[0].maxLength;j=b.inputMaxLength;if(j>0){i=i>0?Math.min(j,i):j;j=Math.pow(10,i)-1;if(f==null||f>j)f=j;j=-(j+1)/10+1;if(e==null||e<j)e=j}if(i>0)c.attr("maxlength",i);d.min=e;d.max=f;b._change();c.unbind(p+q);if(d.mouseWheel)c.bind(p+q,b._mouseWheel)},_mouseWheel:function(b){var c=a.data(this,"spinner");if(!c.options.disabled&&c.focused&&s===c){c._change();c._doSpin(((b.wheelDelta||-b.detail)>0?1:-1)*c.options.step);return false}},_setTimer:function(a,b,c){function e(){d._spin(b,c)}var d=this;d._stopSpin();d.timer=setInterval(e,a)},_stopSpin:function(){if(this.timer){clearInterval(this.timer);this.timer=0}},_startSpin:function(a,b){var c=this,d=c.options,e=d.increment;c._change();c._doSpin(a*(b?c.options.largeStep:c.options.step));if(e&&e.length>0){c.counter=0;c.incCounter=0;c._setTimer(e[0].delay,a,b)}},_spin:function(a,b){var c=this,d=c.options.increment,e=d[c.incCounter];c._doSpin(a*e.mult*(b?c.options.largeStep:c.options.step));c.counter++;if(c.counter>e.count&&c.incCounter<d.length-1){c.counter=0;e=d[++c.incCounter];c._setTimer(e.delay,a,b)}},_doSpin:function(a){var b=this,c=b.curvalue;if(c==null)c=(a>0?b.options.min:b.options.max)||0;b._setValue(c+a)},_parseValue:function(){var a=this.element.val();return a?this.options.parse(a,this.element):null},_validate:function(a){var b=this.options,c=b.min,d=b.max;if(a==null&&!b.allowNull)a=this.curvalue!=null?this.curvalue:c||d||0;if(d!=null&&a>d)return d;else if(c!=null&&a<c)return c;else return a},_change:function(){var a=this,b=a._parseValue(),c=a.options.min,d=a.options.max;if(!a.selfChange){if(isNaN(b))b=a.curvalue;a._setValue(b,true)}},_setOption:function(b,c){a.Widget.prototype._setOption.call(this,b,c);this._procOptions()},increment:function(){this._doSpin(this.options.step)},decrement:function(){this._doSpin(-this.options.step)},showButtons:function(a){var b=this.btnContainer.stop();if(a)b.css("opacity",1);else b.fadeTo("fast",1)},hideButtons:function(a){var b=this.btnContainer.stop();if(a)b.css("opacity",0);else b.fadeTo("fast",0);this.buttons.removeClass(d)},_setValue:function(a,b){var c=this;c.curvalue=a=c._validate(a);c.element.val(a!=null?c.options.format(a,c.places,c.element):"");if(!b){c.selfChange=true;c.element.change();c.selfChange=false}},value:function(a){if(arguments.length){this._setValue(a);return this.element}return this.curvalue},enable:function(){this.buttons.removeClass(e);this.element[0].disabled=false;a.Widget.prototype.enable.call(this)},disable:function(){this.buttons.addClass(e).removeClass(d);this.element[0].disabled=true;a.Widget.prototype.disable.call(this)},destroy:function(b){this.wrapper.remove();this.element.unbind(q).css({width:this.oWidth,marginRight:this.oMargin});a.Widget.prototype.destroy.call(this)}})})(jQuery)
includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.min.js RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/switch/field_switch.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/switch/slider-control.png RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/switch/switch.gif RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/text/field_text.css RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/text/field_text.php RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/text/field_text.scss RENAMED
File without changes
includes/options/{redux-framework → redux-core}/inc/fields/textarea/field_textarea.php RENAMED
@@ -76,4 +76,4 @@
76
  return $value;
77
  }
78
  }
79
- }
76
  return $value;
77
  }
78
  }
79
+ }
includes/options/redux-core/inc/fields/typography/field_typography.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-main .redux-typography-container{display:block;position:relative;margin:0;padding:0;width:100%;max-width:660px}.redux-main .redux-typography-container .clearfix{clear:both}.redux-main .redux-typography-container .clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.redux-main .redux-typography-container input.wp-picker-default,.redux-main .redux-typography-container .redux-typography-color{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;height:24px;padding:0px 14px !important;margin-top:0;margin-bottom:0;margin-left:4px !important;font-size:12px !important}.redux-main .redux-typography-container .select_wrapper{display:block;position:relative;float:left;clear:none;margin:0 10px 0 0;width:48% !important;min-width:210px !important;max-width:324px !important;height:57px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box}.redux-main .redux-typography-container .select_wrapper:nth-child(odd){margin-right:10px !important}.redux-main .redux-typography-container .select_wrapper:nth-child(even){margin-right:10px !important}.redux-main .redux-typography-container .select_wrapper.typography-family .select2-container{width:100%}.redux-main .redux-typography-container .select_wrapper .redux-typography{font-size:14px !important;display:block;float:left;height:28px !important;line-height:50px !important;padding:0px !important;width:100% !important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box}.redux-main .redux-typography-container .wp-picker-container{float:left;clear:left;margin-bottom:12px;padding:3px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.redux-main .redux-typography-container .input_wrapper{display:block;position:relative;margin:0 4px 0 5px;padding:0;width:23%;max-width:23%;min-width:70px;float:left;clear:none;height:57px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;vertical-align:baseline}.redux-main .redux-typography-container .input_wrapper.font-size{margin-left:0px}.redux-main .redux-typography-container .input_wrapper input.mini{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;width:78%;text-align:center;margin:0;height:28px;top:3px;padding:0 2px 0 5px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.redux-main .redux-typography-container .picker-wrapper{display:block;display:block;position:relative;margin:0 4px 0 5px;margin:0;padding:0;width:23%;width:100%;max-width:23%;min-width:70px;min-width:100%;clear:none;height:57px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;vertical-align:baseline}.redux-main .redux-typography-container label{display:block;position:relative;font-size:12px !important;text-align:left;color:#999999;margin:4px 0 2px 0 !important;cursor:default}.redux-main .redux-typography-container .typography-preview{display:none;width:100%;border:1px dotted lightgray;max-width:850px;padding:10px;font-size:10pt;height:auto;margin:5px 0 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.redux-main .redux-typography-container .typography-color{border:0 none;margin:0}.redux-main .redux-typography-container ::-webkit-input-placeholder{line-height:19px}@media screen and (max-width: 540px){.redux-main .redux-main .redux-typography-container{max-width:230px;margin:0 auto}.redux-main .redux-main .redux-typography-container .select_wrapper{max-width:210px;min-width:210px;width:210px;margin-left:0 !important;margin-right:0 !important}.redux-main .redux-main .redux-typography-container .input_wrapper{max-width:101px;min-width:101px;width:101px;margin-left:0 !important;margin-right:5px !important}.redux-main .redux-main .redux-typography-container .input_wrapper input.mini{width:73%}.redux-main .redux-main .redux-typography-container .input-append .add-on{width:30%;padding:5px !important}.redux-main .redux-main .redux-main .wp-picker-container .wp-picker-input-wrap{margin-top:7px}}@media screen and (max-width: 360px){.redux-main .redux-typography-container .iris-picker .iris-square{margin-right:3%}}.wp-customizer .redux-typography-container .input_wrapper{width:40%;max-width:40%;min-width:20%}.wp-customizer .redux-typography-container .input_wrapper input.mini{width:70%}.wp-customizer .redux-typography-container .select_wrapper{width:100% !important}
includes/options/redux-core/inc/fields/typography/field_typography.js ADDED
@@ -0,0 +1,655 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, redux*/
2
+
3
+ /**
4
+ * Typography
5
+ * Dependencies: google.com, jquery, select2
6
+ * Feature added by: Dovy Paukstys - http://simplerain.com/
7
+ * Date: 06.14.2013
8
+ *
9
+ * Rewrite: Kevin Provance (kprovance)
10
+ * Date: May 25, 2014
11
+ */
12
+
13
+ (function( $ ) {
14
+ "use strict";
15
+
16
+ redux.field_objects = redux.field_objects || {};
17
+ redux.field_objects.typography = redux.field_objects.typography || {};
18
+
19
+ var selVals = [];
20
+ var isSelecting = false;
21
+
22
+ var default_params = {
23
+ width: 'resolve',
24
+ triggerChange: true,
25
+ allowClear: true
26
+ };
27
+
28
+ $( document ).ready(
29
+ function() {
30
+ //redux.field_objects.typography.init();
31
+ }
32
+ );
33
+
34
+ redux.field_objects.typography.init = function( selector, skipCheck) {
35
+
36
+ if ( !selector ) {
37
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-typography:visible' );
38
+ }
39
+
40
+ $( selector ).each(
41
+ function() {
42
+ var el = $( this );
43
+ var parent = el;
44
+
45
+ if ( !el.hasClass( 'redux-field-container' ) ) {
46
+ parent = el.parents( '.redux-field-container:first' );
47
+ }
48
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
49
+ return;
50
+ }
51
+ if ( parent.hasClass( 'redux-field-init' ) ) {
52
+ parent.removeClass( 'redux-field-init' );
53
+ } else {
54
+ return;
55
+ }
56
+
57
+ var fontClear;
58
+
59
+ el.each(
60
+ function() {
61
+ // init each typography field
62
+ $( this ).find( '.redux-typography-container' ).each(
63
+ function() {
64
+ var family = $( this ).find( '.redux-typography-family' );
65
+
66
+ if ( family.data( 'value' ) === undefined ) {
67
+ family = $( this );
68
+ } else if ( family.data( 'value' ) !== "" ) {
69
+ $( family ).val( family.data( 'value' ) );
70
+ }
71
+
72
+ var select2_handle = $( this ).find( '.select2_params' );
73
+ if ( select2_handle.size() > 0 ) {
74
+ var select2_params = select2_handle.val();
75
+
76
+ select2_params = JSON.parse( select2_params );
77
+ default_params = $.extend( {}, default_params, select2_params );
78
+ }
79
+
80
+ fontClear = Boolean( $( this ).find( '.redux-font-clear' ).val() );
81
+
82
+ redux.field_objects.typography.select( family, true );
83
+
84
+ window.onbeforeunload = null;
85
+ }
86
+ );
87
+
88
+ //init when value is changed
89
+ $( this ).find( '.redux-typography' ).on(
90
+ 'change', function() {
91
+ redux.field_objects.typography.select( $( this ) ); //.parents('.redux-container-typography:first'));
92
+ }
93
+ );
94
+
95
+ //init when value is changed
96
+ $( this ).find( '.redux-typography-size, .redux-typography-height, .redux-typography-word, .redux-typography-letter, .redux-typography-align, .redux-typography-transform, .redux-typography-font-variant, .redux-typography-decoration' ).keyup(
97
+ function() {
98
+ redux.field_objects.typography.select( $( this ).parents( '.redux-container-typography:first' ) );
99
+ }
100
+ );
101
+
102
+ // Have to redeclare the wpColorPicker to get a callback function
103
+ $( this ).find( '.redux-typography-color' ).wpColorPicker(
104
+ {
105
+ change: function( e, ui ) {
106
+ $( this ).val( ui.color.toString() );
107
+ redux.field_objects.typography.select( $( this ).parents( '.redux-container-typography:first' ) );
108
+ }
109
+ }
110
+ );
111
+
112
+ // Don't allow negative numbers for size field
113
+ $( this ).find( ".redux-typography-size" ).numeric(
114
+ {
115
+ allowMinus: false
116
+ }
117
+ );
118
+
119
+ // Allow negative numbers for indicated fields
120
+ $( this ).find( ".redux-typography-height, .redux-typography-word, .redux-typography-letter" ).numeric(
121
+ {
122
+ allowMinus: true
123
+ }
124
+ );
125
+
126
+ // select2 magic, to load font-family dynamically
127
+ var data = [{id: 'none', text: 'none'}];
128
+
129
+ $( this ).find( ".redux-typography-family" ).select2(
130
+ {
131
+ matcher: function( term, text ) {
132
+ return text.toUpperCase().indexOf( term.toUpperCase() ) === 0;
133
+ },
134
+
135
+ query: function( query ) {
136
+ return window.Select2.query.local( data )( query );
137
+ },
138
+
139
+ initSelection: function( element, callback ) {
140
+ var data = {id: element.val(), text: element.val()};
141
+ callback( data );
142
+ },
143
+ allowClear: fontClear,
144
+ // when one clicks on the font-family select box
145
+ }
146
+ ).on(
147
+ "select2-opening", function( e ) {
148
+
149
+ // Get field ID
150
+ var thisID = $( this ).parents( '.redux-container-typography:first' ).attr( 'data-id' );
151
+
152
+ // User included fonts?
153
+ var isUserFonts = $( '#' + thisID + ' .redux-typography-font-family' ).data( 'user-fonts' );
154
+ isUserFonts = isUserFonts ? 1 : 0;
155
+
156
+ // Google font isn use?
157
+ var usingGoogleFonts = $( '#' + thisID + ' .redux-typography-google' ).val();
158
+ usingGoogleFonts = usingGoogleFonts ? 1 : 0;
159
+
160
+ // Set up data array
161
+ var buildData = [];
162
+
163
+ // If custom fonts, push onto array
164
+ if ( redux.customfonts !== undefined ) {
165
+ buildData.push( redux.customfonts );
166
+ }
167
+
168
+ // If standard fonts, push onto array
169
+ if ( redux.stdfonts !== undefined && isUserFonts === 0 ) {
170
+ buildData.push( redux.stdfonts );
171
+ }
172
+
173
+ // If user fonts, pull from localize and push into array
174
+ if ( isUserFonts == 1 ) {
175
+ var fontKids = [];
176
+
177
+ // <option>
178
+ for ( var key in redux.typography[thisID] ) {
179
+ var obj = redux.typography[thisID].std_font;
180
+
181
+ for ( var prop in obj ) {
182
+ if ( obj.hasOwnProperty( prop ) ) {
183
+ fontKids.push(
184
+ {
185
+ id: prop,
186
+ text: prop,
187
+ 'data-google': 'false'
188
+ }
189
+ );
190
+ }
191
+ }
192
+ }
193
+
194
+ // <optgroup>
195
+ var fontData = {
196
+ text: 'Standard Fonts',
197
+ children: fontKids
198
+ };
199
+
200
+ buildData.push( fontData );
201
+ }
202
+
203
+ // If googfonts on and had data, push into array
204
+ if ( usingGoogleFonts == 1 || usingGoogleFonts === true && redux.googlefonts !== undefined ) {
205
+ buildData.push( redux.googlefonts );
206
+ }
207
+
208
+ // output data to drop down
209
+ data = buildData;
210
+
211
+ // get placeholder
212
+ var selFamily = $( '#' + thisID + ' #' + thisID + '-family' ).attr( 'placeholder' );
213
+ if ( !selFamily ) {
214
+ selFamily = null;
215
+ }
216
+
217
+ // select current font
218
+ $( '#' + thisID + " .redux-typography-family" ).select2( 'val', selFamily );
219
+
220
+ // When selection is made.
221
+ }
222
+ ).on(
223
+ 'select2-selecting', function( val, object ) {
224
+ var fontName = val.object.text;
225
+ var thisID = $( this ).parents( '.redux-container-typography:first' ).attr( 'data-id' );
226
+
227
+ $( '#' + thisID + ' #' + thisID + '-family' ).data( 'value', fontName );
228
+ $( '#' + thisID + ' #' + thisID + '-family' ).attr( 'placeholder', fontName );
229
+
230
+ // option values
231
+ selVals = val;
232
+ isSelecting = true;
233
+
234
+ redux.field_objects.typography.select( $( this ).parents( '.redux-container-typography:first' ) );
235
+ }
236
+ ).on(
237
+ 'select2-clearing', function( val, choice ) {
238
+ var thisID = $( this ).parents( '.redux-container-typography:first' ).attr( 'data-id' );
239
+
240
+ $( '#' + thisID + ' #' + thisID + '-family' ).attr( 'data-value', '' );
241
+ $( '#' + thisID + ' #' + thisID + '-family' ).attr( 'placeholder', 'Font Family' );
242
+
243
+ $( '#' + thisID + ' #' + thisID + '-google-font' ).val( 'false' );
244
+
245
+ redux.field_objects.typography.select( $( this ).parents( '.redux-container-typography:first' ) );
246
+ }
247
+ );
248
+
249
+ var xx = el.find( ".redux-typography-family" );
250
+ if ( !xx.hasClass( 'redux-typography-family' ) ) {
251
+ el.find( ".redux-typography-style" ).select2( default_params );
252
+ }
253
+
254
+ // Init select2 for indicated fields
255
+ el.find( ".redux-typography-family-backup, .redux-typography-align, .redux-typography-transform, .redux-typography-font-variant, .redux-typography-decoration" ).select2( default_params );
256
+
257
+ }
258
+ );
259
+ }
260
+ );
261
+ };
262
+
263
+ // Return font size
264
+ redux.field_objects.typography.size = function( obj ) {
265
+ var size = 0,
266
+ key;
267
+
268
+ for ( key in obj ) {
269
+ if ( obj.hasOwnProperty( key ) ) {
270
+ size++;
271
+ }
272
+ }
273
+
274
+ return size;
275
+ };
276
+
277
+ // Return proper bool value
278
+ redux.field_objects.typography.makeBool = function( val ) {
279
+ if ( val == 'false' || val == '0' || val === false || val === 0 ) {
280
+ return false;
281
+ } else if ( val == 'true' || val == '1' || val === true || val == 1 ) {
282
+ return true;
283
+ }
284
+ };
285
+
286
+ redux.field_objects.typography.contrastColour = function( hexcolour ) {
287
+ // default value is black.
288
+ var retVal = '#444444';
289
+
290
+ // In case - for some reason - a blank value is passed.
291
+ // This should *not* happen. If a function passing a value
292
+ // is canceled, it should pass the current value instead of
293
+ // a blank. This is how the Windows Common Controls do it. :P
294
+ if ( hexcolour !== '' ) {
295
+
296
+ // Replace the hash with a blank.
297
+ hexcolour = hexcolour.replace( '#', '' );
298
+
299
+ var r = parseInt( hexcolour.substr( 0, 2 ), 16 );
300
+ var g = parseInt( hexcolour.substr( 2, 2 ), 16 );
301
+ var b = parseInt( hexcolour.substr( 4, 2 ), 16 );
302
+ var res = ((r * 299) + (g * 587) + (b * 114)) / 1000;
303
+
304
+ // Instead of pure black, I opted to use WP 3.8 black, so it looks uniform. :) - kp
305
+ retVal = (res >= 128) ? '#444444' : '#ffffff';
306
+ }
307
+
308
+ return retVal;
309
+ };
310
+
311
+
312
+ // Sync up font options
313
+ redux.field_objects.typography.select = function( selector, skipCheck ) {
314
+ var mainID;
315
+
316
+ // Main id for selected field
317
+ mainID = $( selector ).parents( '.redux-container-typography:first' ).attr( 'data-id' );
318
+ if (mainID === undefined) {
319
+ mainID = $(selector).attr( 'data-id' );
320
+ }
321
+
322
+ var parent = $( selector ).parents( '.redux-container-typography:first' );
323
+ var data = [];
324
+ //$.each(parent.find('.redux-typography-field'), function() {
325
+ // console.log();
326
+ //});
327
+ //console.log( selector );
328
+ // Set all the variables to be checked against
329
+ var family = $( '#' + mainID + ' #' + mainID + '-family' ).val();
330
+
331
+ if ( !family ) {
332
+ family = null; //"inherit";
333
+ }
334
+
335
+ var familyBackup = $( '#' + mainID + ' select.redux-typography-family-backup' ).val();
336
+ var size = $( '#' + mainID + ' .redux-typography-size' ).val();
337
+ var height = $( '#' + mainID + ' .redux-typography-height' ).val();
338
+ var word = $( '#' + mainID + ' .redux-typography-word' ).val();
339
+ var letter = $( '#' + mainID + ' .redux-typography-letter' ).val();
340
+ var align = $( '#' + mainID + ' select.redux-typography-align' ).val();
341
+ var transform = $( '#' + mainID + ' select.redux-typography-transform' ).val();
342
+ var fontVariant = $( '#' + mainID + ' select.redux-typography-font-variant' ).val();
343
+ var decoration = $( '#' + mainID + ' select.redux-typography-decoration' ).val();
344
+ var style = $( '#' + mainID + ' select.redux-typography-style' ).val();
345
+ var script = $( '#' + mainID + ' select.redux-typography-subsets' ).val();
346
+ var color = $( '#' + mainID + ' .redux-typography-color' ).val();
347
+ var units = $( '#' + mainID ).data( 'units' );
348
+ //console.log('here3');
349
+ //console.log(color);
350
+
351
+ //var output = family;
352
+
353
+ // Is selected font a google font?
354
+ var google;
355
+ if ( isSelecting === true ) {
356
+ google = redux.field_objects.typography.makeBool( selVals.object['data-google'] );
357
+ $( '#' + mainID + ' .redux-typography-google-font' ).val( google );
358
+ } else {
359
+ google = redux.field_objects.typography.makeBool( $( '#' + mainID + ' .redux-typography-google-font' ).val() ); // Check if font is a google font
360
+ }
361
+
362
+ // Page load. Speeds things up memory wise to offload to client
363
+ if ( !$( '#' + mainID ).hasClass( 'typography-initialized' ) ) {
364
+ style = $( '#' + mainID + ' select.redux-typography-style' ).data( 'value' );
365
+ script = $( '#' + mainID + ' select.redux-typography-subsets' ).data( 'value' );
366
+
367
+ if ( style !== "" ) {
368
+ style = String( style );
369
+ }
370
+
371
+ if ( typeof (script) !== undefined ) {
372
+ script = String( script );
373
+ }
374
+ }
375
+
376
+ // Something went wrong trying to read google fonts, so turn google off
377
+ if ( redux.fonts.google === undefined ) {
378
+ google = false;
379
+ }
380
+
381
+ // Get font details
382
+ var details = '';
383
+ if ( google === true && ( family in redux.fonts.google) ) {
384
+ details = redux.fonts.google[family];
385
+ } else {
386
+ details = {
387
+ '400': 'Normal 400',
388
+ '700': 'Bold 700',
389
+ '400italic': 'Normal 400 Italic',
390
+ '700italic': 'Bold 700 Italic'
391
+ };
392
+ }
393
+
394
+ if ( $( selector ).hasClass( 'redux-typography-subsets' ) ) {
395
+ $( '#' + mainID + ' input.typography-subsets' ).val( script );
396
+ }
397
+
398
+ // If we changed the font
399
+ if ( $( selector ).hasClass( 'redux-typography-family' ) ) {
400
+ var html = '<option value=""></option>';
401
+
402
+ // Google specific stuff
403
+ if ( google === true ) {
404
+
405
+ // STYLES
406
+ var selected = "";
407
+ $.each(
408
+ details.variants, function( index, variant ) {
409
+ if ( variant.id === style || redux.field_objects.typography.size( details.variants ) === 1 ) {
410
+ selected = ' selected="selected"';
411
+ style = variant.id;
412
+ } else {
413
+ selected = "";
414
+ }
415
+
416
+ html += '<option value="' + variant.id + '"' + selected + '>' + variant.name.replace(
417
+ /\+/g, " "
418
+ ) + '</option>';
419
+ }
420
+ );
421
+
422
+ // destroy select2
423
+ $( '#' + mainID + ' .redux-typography-style' ).select2( "destroy" );
424
+
425
+ // Instert new HTML
426
+ $( '#' + mainID + ' .redux-typography-style' ).html( html );
427
+
428
+ // Init select2
429
+ $( '#' + mainID + ' .redux-typography-style' ).select2( default_params );
430
+
431
+
432
+ // SUBSETS
433
+ selected = "";
434
+ html = '<option value=""></option>';
435
+
436
+ $.each(
437
+ details.subsets, function( index, subset ) {
438
+ if ( subset.id === script || redux.field_objects.typography.size( details.subsets ) === 1 ) {
439
+ selected = ' selected="selected"';
440
+ script = subset.id;
441
+ $( '#' + mainID + ' input.typography-subsets' ).val( script );
442
+ } else {
443
+ selected = "";
444
+ }
445
+ html += '<option value="' + subset.id + '"' + selected + '>' + subset.name.replace(
446
+ /\+/g, " "
447
+ ) + '</option>';
448
+ }
449
+ );
450
+
451
+ //if (typeof (familyBackup) !== "undefined" && familyBackup !== "") {
452
+ // output += ', ' + familyBackup;
453
+ //}
454
+
455
+ // Destroy select2
456
+ $( '#' + mainID + ' .redux-typography-subsets' ).select2( "destroy" );
457
+
458
+ // Inset new HTML
459
+ $( '#' + mainID + ' .redux-typography-subsets' ).html( html );
460
+
461
+ // Init select2
462
+ $( '#' + mainID + ' .redux-typography-subsets' ).select2( default_params );
463
+
464
+ $( '#' + mainID + ' .redux-typography-subsets' ).parent().fadeIn( 'fast' );
465
+ $( '#' + mainID + ' .typography-family-backup' ).fadeIn( 'fast' );
466
+ } else {
467
+ if ( details ) {
468
+ $.each(
469
+ details, function( index, value ) {
470
+ if ( index === style || index === "normal" ) {
471
+ selected = ' selected="selected"';
472
+ $( '#' + mainID + ' .typography-style .select2-chosen' ).text( value );
473
+ } else {
474
+ selected = "";
475
+ }
476
+
477
+ html += '<option value="' + index + '"' + selected + '>' + value.replace(
478
+ '+', ' '
479
+ ) + '</option>';
480
+ }
481
+ );
482
+
483
+ // Destory select2
484
+ $( '#' + mainID + ' .redux-typography-style' ).select2( "destroy" );
485
+
486
+ // Insert new HTML
487
+ $( '#' + mainID + ' .redux-typography-style' ).html( html );
488
+
489
+ // Init select2
490
+ $( '#' + mainID + ' .redux-typography-style' ).select2( default_params );
491
+
492
+ // Prettify things
493
+ $( '#' + mainID + ' .redux-typography-subsets' ).parent().fadeOut( 'fast' );
494
+ $( '#' + mainID + ' .typography-family-backup' ).fadeOut( 'fast' );
495
+ }
496
+ }
497
+
498
+ $( '#' + mainID + ' .redux-typography-font-family' ).val( family );
499
+ } else if ( $( selector ).hasClass( 'redux-typography-family-backup' ) && familyBackup !== "" ) {
500
+ $( '#' + mainID + ' .redux-typography-font-family-backup' ).val( familyBackup );
501
+ }
502
+
503
+ // Check if the selected value exists. If not, empty it. Else, apply it.
504
+ if ( $( '#' + mainID + " select.redux-typography-style option[value='" + style + "']" ).length === 0 ) {
505
+ style = "";
506
+ $( '#' + mainID + ' select.redux-typography-style' ).select2( 'val', '' );
507
+ } else if ( style === "400" ) {
508
+ $( '#' + mainID + ' select.redux-typography-style' ).select2( 'val', style );
509
+ }
510
+
511
+ // Handle empty subset select
512
+ if ( $( '#' + mainID + " select.redux-typography-subsets option[value='" + script + "']" ).length === 0 ) {
513
+ script = "";
514
+ $( '#' + mainID + ' select.redux-typography-subsets' ).select2( 'val', '' );
515
+ $( '#' + mainID + ' input.typography-subsets' ).val( script );
516
+ }
517
+
518
+ var _linkclass = 'style_link_' + mainID;
519
+
520
+ //remove other elements crested in <head>
521
+ $( '.' + _linkclass ).remove();
522
+ if ( family !== null && family !== "inherit" && $( '#' + mainID ).hasClass( 'typography-initialized' ) ) {
523
+
524
+ //replace spaces with "+" sign
525
+ var the_font = family.replace( /\s+/g, '+' );
526
+ if ( google === true ) {
527
+
528
+ //add reference to google font family
529
+ var link = the_font;
530
+
531
+ if ( style && style !== "" ) {
532
+ link += ':' + style.replace( /\-/g, " " );
533
+ }
534
+
535
+ if ( script && script !== "" ) {
536
+ link += '&subset=' + script;
537
+ }
538
+
539
+ if (isSelecting === false) {
540
+ if ( typeof (WebFont) !== "undefined" && WebFont ) {
541
+ WebFont.load( {google: {families: [link]}} );
542
+ }
543
+ }
544
+ $( '#' + mainID + ' .redux-typography-google' ).val( true );
545
+ } else {
546
+ $( '#' + mainID + ' .redux-typography-google' ).val( false );
547
+ }
548
+ }
549
+
550
+ // Weight and italic
551
+ if ( style.indexOf( "italic" ) !== -1 ) {
552
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-style', 'italic' );
553
+ $( '#' + mainID + ' .typography-font-style' ).val( 'italic' );
554
+ style = style.replace( 'italic', '' );
555
+ } else {
556
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-style', "normal" );
557
+ $( '#' + mainID + ' .typography-font-style' ).val( '' );
558
+ }
559
+
560
+ $( '#' + mainID + ' .typography-font-weight' ).val( style );
561
+
562
+ if ( !height ) {
563
+ height = size;
564
+ }
565
+
566
+ if ( size === '' || size === undefined ) {
567
+ $( '#' + mainID + ' .typography-font-size' ).val( '' );
568
+ } else {
569
+ $( '#' + mainID + ' .typography-font-size' ).val( size + units );
570
+ }
571
+
572
+ if ( height === '' || height === undefined ) {
573
+ $( '#' + mainID + ' .typography-line-height' ).val( '' );
574
+ } else {
575
+ $( '#' + mainID + ' .typography-line-height' ).val( height + units );
576
+ }
577
+
578
+ if ( word === '' || word === undefined ) {
579
+ $( '#' + mainID + ' .typography-word-spacing' ).val( '' );
580
+ } else {
581
+ $( '#' + mainID + ' .typography-word-spacing' ).val( word + units );
582
+ }
583
+
584
+ if ( letter === '' || letter === undefined ) {
585
+ $( '#' + mainID + ' .typography-letter-spacing' ).val( '' );
586
+ } else {
587
+ $( '#' + mainID + ' .typography-letter-spacing' ).val( letter + units );
588
+ }
589
+
590
+ // Show more preview stuff
591
+ if ( $( '#' + mainID ).hasClass( 'typography-initialized' ) ) {
592
+ //console.log('here2');
593
+ var isPreviewSize = $( '#' + mainID + ' .typography-preview' ).data( 'preview-size' );
594
+
595
+ if ( isPreviewSize == '0' ) {
596
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-size', size + units );
597
+ }
598
+
599
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-weight', style );
600
+
601
+ //show in the preview box the font
602
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-family', family + ', sans-serif' );
603
+
604
+ if ( family === 'none' && family === '' ) {
605
+ //if selected is not a font remove style "font-family" at preview box
606
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-family', 'inherit' );
607
+ }
608
+
609
+ $( '#' + mainID + ' .typography-preview' ).css( 'line-height', height + units );
610
+ $( '#' + mainID + ' .typography-preview' ).css( 'word-spacing', word + units );
611
+ $( '#' + mainID + ' .typography-preview' ).css( 'letter-spacing', letter + units );
612
+
613
+ if ( color ) {
614
+ $( '#' + mainID + ' .typography-preview' ).css( 'color', color );
615
+ $( '#' + mainID + ' .typography-preview' ).css(
616
+ 'background-color', redux.field_objects.typography.contrastColour( color )
617
+ );
618
+ }
619
+
620
+ $( '#' + mainID + ' .typography-style .select2-chosen' ).text( $( '#' + mainID + ' .redux-typography-style option:selected' ).text() );
621
+ $( '#' + mainID + ' .typography-script .select2-chosen' ).text( $( '#' + mainID + ' .redux-typography-subsets option:selected' ).text() );
622
+
623
+ if ( align ) {
624
+ $( '#' + mainID + ' .typography-preview' ).css( 'text-align', align );
625
+ }
626
+
627
+ if ( transform ) {
628
+ $( '#' + mainID + ' .typography-preview' ).css( 'text-transform', transform );
629
+ }
630
+
631
+ if ( fontVariant ) {
632
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-variant', fontVariant );
633
+ }
634
+
635
+ if ( decoration ) {
636
+ $( '#' + mainID + ' .typography-preview' ).css( 'text-decoration', decoration );
637
+ }
638
+ $( '#' + mainID + ' .typography-preview' ).slideDown();
639
+ }
640
+ // end preview stuff
641
+
642
+ // if not preview showing, then set preview to show
643
+ if ( !$( '#' + mainID ).hasClass( 'typography-initialized' ) ) {
644
+ $( '#' + mainID ).addClass( 'typography-initialized' );
645
+ }
646
+
647
+ isSelecting = false;
648
+
649
+ if ( ! skipCheck ) {
650
+ redux_change( selector );
651
+ }
652
+
653
+
654
+ };
655
+ })( jQuery );
includes/options/redux-core/inc/fields/typography/field_typography.json ADDED
@@ -0,0 +1,1093 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class and Function List:
5
+ * Function list:
6
+ * - __construct()
7
+ * - render()
8
+ * - enqueue()
9
+ * - makeGoogleWebfontLink()
10
+ * - makeGoogleWebfontString()
11
+ * - output()
12
+ * - getGoogleArray()
13
+ * - getSubsets()
14
+ * - getVariants()
15
+ * Classes list:
16
+ * - ReduxFramework_typography
17
+ */
18
+
19
+ if ( ! class_exists( 'ReduxFramework_typography' ) ) {
20
+ class ReduxFramework_typography {
21
+
22
+ private $std_fonts = array(
23
+ "Arial, Helvetica, sans-serif" => "Arial, Helvetica, sans-serif",
24
+ "'Arial Black', Gadget, sans-serif" => "'Arial Black', Gadget, sans-serif",
25
+ "'Bookman Old Style', serif" => "'Bookman Old Style', serif",
26
+ "'Comic Sans MS', cursive" => "'Comic Sans MS', cursive",
27
+ "Courier, monospace" => "Courier, monospace",
28
+ "Garamond, serif" => "Garamond, serif",
29
+ "Georgia, serif" => "Georgia, serif",
30
+ "Impact, Charcoal, sans-serif" => "Impact, Charcoal, sans-serif",
31
+ "'Lucida Console', Monaco, monospace" => "'Lucida Console', Monaco, monospace",
32
+ "'Lucida Sans Unicode', 'Lucida Grande', sans-serif" => "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
33
+ "'MS Sans Serif', Geneva, sans-serif" => "'MS Sans Serif', Geneva, sans-serif",
34
+ "'MS Serif', 'New York', sans-serif" => "'MS Serif', 'New York', sans-serif",
35
+ "'Palatino Linotype', 'Book Antiqua', Palatino, serif" => "'Palatino Linotype', 'Book Antiqua', Palatino, serif",
36
+ "Tahoma,Geneva, sans-serif" => "Tahoma, Geneva, sans-serif",
37
+ "'Times New Roman', Times,serif" => "'Times New Roman', Times, serif",
38
+ "'Trebuchet MS', Helvetica, sans-serif" => "'Trebuchet MS', Helvetica, sans-serif",
39
+ "Verdana, Geneva, sans-serif" => "Verdana, Geneva, sans-serif",
40
+ );
41
+
42
+ private $user_fonts = true;
43
+
44
+ /**
45
+ * Field Constructor.
46
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
47
+ *
48
+ * @since ReduxFramework 1.0.0
49
+ */
50
+ function __construct( $field = array(), $value = '', $parent ) {
51
+ $this->parent = $parent;
52
+ $this->field = $field;
53
+ $this->value = $value;
54
+
55
+ // Shim out old arg to new
56
+ if ( isset( $this->field['all_styles'] ) && ! empty( $this->field['all_styles'] ) ) {
57
+ $this->field['all-styles'] = $this->field['all_styles'];
58
+ unset ( $this->field['all_styles'] );
59
+ }
60
+
61
+ // Set field array defaults. No errors please
62
+ $defaults = array(
63
+ 'font-family' => true,
64
+ 'font-size' => true,
65
+ 'font-weight' => true,
66
+ 'font-style' => true,
67
+ 'font-backup' => false,
68
+ 'subsets' => true,
69
+ 'custom_fonts' => true,
70
+ 'text-align' => true,
71
+ 'text-transform' => false,
72
+ 'font-variant' => false,
73
+ 'text-decoration' => false,
74
+ 'color' => true,
75
+ 'preview' => true,
76
+ 'line-height' => true,
77
+ 'multi' => array(
78
+ 'subset' => false,
79
+ 'weight' => false,
80
+ ),
81
+ 'word-spacing' => false,
82
+ 'letter-spacing' => false,
83
+ 'google' => true,
84
+ 'update_weekly' => false, // Enable to force updates of Google Fonts to be weekly
85
+ 'font_family_clear' => true
86
+ );
87
+ $this->field = wp_parse_args( $this->field, $defaults );
88
+
89
+ // Set value defaults.
90
+ $defaults = array(
91
+ 'font-family' => '',
92
+ 'font-options' => '',
93
+ 'font-backup' => '',
94
+ 'text-align' => '',
95
+ 'text-transform' => '',
96
+ 'font-variant' => '',
97
+ 'text-decoration' => '',
98
+ 'line-height' => '',
99
+ 'word-spacing' => '',
100
+ 'letter-spacing' => '',
101
+ 'subsets' => '',
102
+ 'google' => false,
103
+ 'font-script' => '',
104
+ 'font-weight' => '',
105
+ 'font-style' => '',
106
+ 'color' => '',
107
+ 'font-size' => '',
108
+ );
109
+ $this->value = wp_parse_args( $this->value, $defaults );
110
+
111
+ // Get the google array
112
+ $this->getGoogleArray();
113
+
114
+ if ( empty( $this->field['fonts'] ) ) {
115
+ $this->user_fonts = false;
116
+ $this->field['fonts'] = $this->std_fonts;
117
+ }
118
+
119
+ // Localize std fonts
120
+ $this->localizeStdFonts();
121
+
122
+ }
123
+
124
+ function localize( $field, $value = "" ) {
125
+ $params = array();
126
+
127
+ if ( true == $this->user_fonts && ! empty( $this->field['fonts'] ) ) {
128
+ $params['std_font'] = $this->field['fonts'];
129
+ }
130
+
131
+ return $params;
132
+ }
133
+
134
+
135
+ /**
136
+ * Field Render Function.
137
+ * Takes the vars and outputs the HTML for the field in the settings
138
+ *
139
+ * @since ReduxFramework 1.0.0
140
+ */
141
+ function render() {
142
+ // Since fonts declared is CSS (@font-face) are not rendered in the preview,
143
+ // they can be declared in a CSS file and passed here so they DO display in
144
+ // font preview. Do NOT pass style.css in your theme, as that will mess up
145
+ // admin page styling. It's recommended to pass a CSS file with ONLY font
146
+ // declarations.
147
+ // If field is set and not blank, then enqueue field
148
+ if ( isset( $this->field['ext-font-css'] ) && $this->field['ext-font-css'] != '' ) {
149
+ wp_register_style( 'redux-external-fonts', $this->field['ext-font-css'] );
150
+ wp_enqueue_style( 'redux-external-fonts' );
151
+ }
152
+
153
+ if ( empty( $this->field['units'] ) && ! empty( $this->field['default']['units'] ) ) {
154
+ $this->field['units'] = $this->field['default']['units'];
155
+ }
156
+
157
+ if ( empty( $this->field['units'] ) || ! in_array( $this->field['units'], array(
158
+ 'px',
159
+ 'em',
160
+ 'rem',
161
+ '%'
162
+ ) )
163
+ ) {
164
+ $this->field['units'] = 'px';
165
+ }
166
+
167
+ $unit = $this->field['units'];
168
+
169
+ echo '<div id="' . $this->field['id'] . '" class="redux-typography-container" id="' . $this->field['id'] . '" data-units="' . $unit . '">';
170
+ $val = json_encode( $this->value );
171
+ echo "<input type='hidden' name='{$this->field['name']}{$this->field['name_suffix']}' class='{$this->field['class']} typography-data-input' value='{$val}'>";
172
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
173
+ $select2_params = json_encode( $this->field['select2'] );
174
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
175
+
176
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
177
+ }
178
+
179
+ /* Font Family */
180
+ if ( $this->field['font-family'] === true ) {
181
+
182
+ // font family clear
183
+ echo '<input type="hidden" class="redux-font-clear" value="' . $this->field['font_family_clear'] . '">';
184
+
185
+ //if (filter_var($this->value['google'], FILTER_VALIDATE_BOOLEAN)) {
186
+ if ( filter_var( $this->value['google'], FILTER_VALIDATE_BOOLEAN ) ) {
187
+
188
+ // Divide and conquer
189
+ $fontFamily = explode( ', ', $this->value['font-family'], 2 );
190
+
191
+ // If array 0 is empty and array 1 is not
192
+ if ( empty( $fontFamily[0] ) && ! empty( $fontFamily[1] ) ) {
193
+
194
+ // Make array 0 = array 1
195
+ $fontFamily[0] = $fontFamily[1];
196
+
197
+ // Clear array 1
198
+ $fontFamily[1] = "";
199
+ }
200
+ }
201
+
202
+ // If no fontFamily array exists, create one and set array 0
203
+ // with font value
204
+ if ( ! isset( $fontFamily ) ) {
205
+ $fontFamily = array();
206
+ $fontFamily[0] = $this->value['font-family'];
207
+ $fontFamily[1] = "";
208
+ }
209
+
210
+ // Is selected font a Google font
211
+ $isGoogleFont = '0';
212
+ if ( isset( $this->parent->fonts['google'][ $fontFamily[0] ] ) ) {
213
+ $isGoogleFont = '1';
214
+ }
215
+
216
+ // If not a Google font, show all font families
217
+ if ( $isGoogleFont != '1' ) {
218
+ $fontFamily[0] = $this->value['font-family'];
219
+ }
220
+
221
+ $userFonts = '0';
222
+ if ( true == $this->user_fonts ) {
223
+ $userFonts = '1';
224
+ }
225
+
226
+ echo '<input type="hidden" class="redux-typography-input redux-typography-font-family ' . $this->field['class'] . '" data-user-fonts="' . $userFonts . '" data-name="font-family" value="' . $this->value['font-family'] . '" data-id="' . $this->field['id'] . '" />';
227
+ echo '<input type="hidden" class="redux-typography-input redux-typography-font-options ' . $this->field['class'] . '" data-name="font-options" value="' . $this->value['font-options'] . '" data-id="' . $this->field['id'] . '" />';
228
+
229
+ echo '<input type="hidden" class="redux-typography-google-font" value="' . $isGoogleFont . '" id="' . $this->field['id'] . '-google-font">';
230
+
231
+ echo '<div class="select_wrapper typography-family" style="width: 220px; margin-right: 5px;">';
232
+ echo '<label>' . __( 'Font Family', 'redux-framework' ) . '</label>';
233
+ $placeholder = $fontFamily[0] ? $fontFamily[0] : __( 'Font family', 'redux-framework' );
234
+
235
+ echo '<div class=" redux-typography redux-typography-family select2-container ' . $this->field['class'] . '" id="' . $this->field['id'] . '-family" placeholder="' . $placeholder . '" data-id="' . $this->field['id'] . '" data-value="' . $fontFamily[0] . '">';
236
+
237
+ echo '</div>';
238
+ echo '</div>';
239
+
240
+ $googleSet = false;
241
+ if ( $this->field['google'] === true ) {
242
+
243
+ // Set a flag so we know to set a header style or not
244
+ echo '<input type="hidden" class="redux-typography-input redux-typography-google ' . $this->field['class'] . '" id="' . $this->field['id'] . '-google" data-name="google" type="text" value="' . $this->field['google'] . '" data-id="' . $this->field['id'] . '" />';
245
+ $googleSet = true;
246
+ }
247
+ }
248
+
249
+ /* Backup Font */
250
+ if ( $this->field['font-family'] === true && $this->field['google'] === true ) {
251
+
252
+ if ( false == $googleSet ) {
253
+ // Set a flag so we know to set a header style or not
254
+ echo '<input type="hidden" class="redux-typography-input redux-typography-google ' . $this->field['class'] . '" id="' . $this->field['id'] . '-google" data-name="google" type="text" value="' . $this->field['google'] . '" data-id="' . $this->field['id'] . '" />';
255
+ }
256
+
257
+ if ( $this->field['font-backup'] === true ) {
258
+ echo '<div class="select_wrapper typography-family-backup" style="width: 220px; margin-right: 5px;">';
259
+ echo '<label>' . __( 'Backup Font Family', 'redux-framework' ) . '</label>';
260
+ echo '<select data-placeholder="' . __( 'Backup Font Family', 'redux-framework' ) . '" data-name="font-backup" class="redux-typography-input redux-typography redux-typography-family-backup ' . $this->field['class'] . '" id="' . $this->field['id'] . '-family-backup" data-id="' . $this->field['id'] . '" data-value="' . $this->value['font-backup'] . '">';
261
+ echo '<option data-google="false" data-details="" value=""></option>';
262
+
263
+ foreach ( $this->field['fonts'] as $i => $family ) {
264
+ echo '<option data-google="true" value="' . $i . '"' . selected( $this->value['font-backup'], $i, false ) . '>' . $family . '</option>';
265
+ }
266
+
267
+ echo '</select></div>';
268
+ }
269
+ }
270
+
271
+ /* Font Style/Weight */
272
+ if ( $this->field['font-style'] === true || $this->field['font-weight'] === true ) {
273
+
274
+ echo '<div class="select_wrapper typography-style" original-title="' . __( 'Font style', 'redux-framework' ) . '">';
275
+ echo '<label>' . __( 'Font Weight &amp; Style', 'redux-framework' ) . '</label>';
276
+
277
+ $style = $this->value['font-weight'] . $this->value['font-style'];
278
+
279
+ echo '<input type="hidden" class="redux-typography-input typography-font-weight" data-name="font-weight" value="' . $this->value['font-weight'] . '" data-id="' . $this->field['id'] . '" /> ';
280
+ echo '<input type="hidden" class="redux-typography-input typography-font-style" data-name="font-style" value="' . $this->value['font-style'] . '" data-id="' . $this->field['id'] . '" /> ';
281
+ $multi = ( isset( $this->field['multi']['weight'] ) && $this->field['multi']['weight'] ) ? ' multiple="multiple"' : "";
282
+ echo '<select' . $multi . ' data-placeholder="' . __( 'Style', 'redux-framework' ) . '" class="redux-typography redux-typography-style select ' . $this->field['class'] . '" original-title="' . __( 'Font style', 'redux-framework' ) . '" id="' . $this->field['id'] . '_style" data-id="' . $this->field['id'] . '" data-value="' . $style . '">';
283
+
284
+ if ( empty( $this->value['subset'] ) || empty( $this->value['font-weight'] ) ) {
285
+ echo '<option value=""></option>';
286
+ }
287
+
288
+ $nonGStyles = array(
289
+ '200' => 'Lighter',
290
+ '400' => 'Normal',
291
+ '700' => 'Bold',
292
+ '900' => 'Bolder'
293
+ );
294
+
295
+ if ( isset( $gfonts[ $this->value['font-family'] ] ) ) {
296
+ foreach ( $gfonts[ $this->value['font-family'] ]['variants'] as $v ) {
297
+ echo '<option value="' . $v['id'] . '" ' . selected( $this->value['subset'], $v['id'], false ) . '>' . $v['name'] . '</option>';
298
+ }
299
+ } else {
300
+ if ( ! isset( $this->value['font-weight'] ) && isset( $this->value['subset'] ) ) {
301
+ $this->value['font-weight'] = $this->value['subset'];
302
+ }
303
+
304
+ foreach ( $nonGStyles as $i => $style ) {
305
+ if ( ! isset( $this->value['font-weight'] ) ) {
306
+ $this->value['font-weight'] = false;
307
+ }
308
+
309
+ if ( ! isset( $this->value['subset'] ) ) {
310
+ $this->value['subset'] = false;
311
+ }
312
+
313
+ echo '<option value="' . $i . '" ' . selected( $this->value['font-weight'], $i, false ) . '>' . $style . '</option>';
314
+ }
315
+ }
316
+
317
+ echo '</select></div>';
318
+ }
319
+
320
+ /* Font Script */
321
+ if ( $this->field['font-family'] == true && $this->field['subsets'] == true && $this->field['google'] == true ) {
322
+ echo '<div class="select_wrapper typography-script tooltip" original-title="' . __( 'Font subsets', 'redux-framework' ) . '">';
323
+ echo '<input type="hidden" class="redux-typography-input typography-subsets" data-name="subsets" value="' . $this->value['subsets'] . '" data-id="' . $this->field['id'] . '" /> ';
324
+ echo '<label>' . __( 'Font Subsets', 'redux-framework' ) . '</label>';
325
+ $multi = ( isset( $this->field['multi']['subset'] ) && $this->field['multi']['subset'] ) ? ' multiple="multiple"' : "";
326
+ echo '<select' . $multi . ' data-placeholder="' . __( 'Subsets', 'redux-framework' ) . '" class="redux-typography redux-typography-subsets ' . $this->field['class'] . '" original-title="' . __( 'Font script', 'redux-framework' ) . '" id="' . $this->field['id'] . '-subsets" data-value="' . $this->value['subsets'] . '" data-id="' . $this->field['id'] . '" >';
327
+
328
+ if ( empty( $this->value['subsets'] ) ) {
329
+ echo '<option value=""></option>';
330
+ }
331
+
332
+ if ( isset( $gfonts[ $this->value['font-family'] ] ) ) {
333
+ foreach ( $gfonts[ $this->value['font-family'] ]['subsets'] as $v ) {
334
+ echo '<option value="' . $v['id'] . '" ' . selected( $this->value['subset'], $v['id'], false ) . '>' . $v['name'] . '</option>';
335
+ }
336
+ }
337
+
338
+ echo '</select></div>';
339
+ }
340
+
341
+ /* Font Align */
342
+ if ( $this->field['text-align'] === true ) {
343
+ echo '<div class="select_wrapper typography-align tooltip" original-title="' . __( 'Text Align', 'redux-framework' ) . '">';
344
+ echo '<label>' . __( 'Text Align', 'redux-framework' ) . '</label>';
345
+ echo '<select data-placeholder="' . __( 'Text Align', 'redux-framework' ) . '" class="redux-typography-input redux-typography redux-typography-align ' . $this->field['class'] . '" original-title="' . __( 'Text Align', 'redux-framework' ) . '" id="' . $this->field['id'] . '-align" data-name="text-align" data-value="' . $this->value['text-align'] . '" data-id="' . $this->field['id'] . '" >';
346
+ echo '<option value=""></option>';
347
+
348
+ $align = array(
349
+ 'inherit',
350
+ 'left',
351
+ 'right',
352
+ 'center',
353
+ 'justify',
354
+ 'initial'
355
+ );
356
+
357
+ foreach ( $align as $v ) {
358
+ echo '<option value="' . $v . '" ' . selected( $this->value['text-align'], $v, false ) . '>' . ucfirst( $v ) . '</option>';
359
+ }
360
+
361
+ echo '</select></div>';
362
+ }
363
+
364
+ /* Text Transform */
365
+ if ( $this->field['text-transform'] === true ) {
366
+ echo '<div class="select_wrapper typography-transform tooltip" original-title="' . __( 'Text Transform', 'redux-framework' ) . '">';
367
+ echo '<label>' . __( 'Text Transform', 'redux-framework' ) . '</label>';
368
+ echo '<select data-placeholder="' . __( 'Text Transform', 'redux-framework' ) . '" class="redux-typography-input redux-typography redux-typography-transform ' . $this->field['class'] . '" original-title="' . __( 'Text Transform', 'redux-framework' ) . '" id="' . $this->field['id'] . '-transform" data-name="text-transform" data-value="' . $this->value['text-transform'] . '" data-id="' . $this->field['id'] . '" >';
369
+ echo '<option value=""></option>';
370
+
371
+ $values = array(
372
+ 'none',
373
+ 'capitalize',
374
+ 'uppercase',
375
+ 'lowercase',
376
+ 'initial',
377
+ 'inherit'
378
+ );
379
+
380
+ foreach ( $values as $v ) {
381
+ echo '<option value="' . $v . '" ' . selected( $this->value['text-transform'], $v, false ) . '>' . ucfirst( $v ) . '</option>';
382
+ }
383
+
384
+ echo '</select></div>';
385
+ }
386
+
387
+ /* Font Variant */
388
+ if ( $this->field['font-variant'] === true ) {
389
+ echo '<div class="select_wrapper typography-font-variant tooltip" original-title="' . __( 'Font Variant', 'redux-framework' ) . '">';
390
+ echo '<label>' . __( 'Font Variant', 'redux-framework' ) . '</label>';
391
+ echo '<select data-placeholder="' . __( 'Font Variant', 'redux-framework' ) . '" class="redux-typography-input redux-typography redux-typography-font-variant ' . $this->field['class'] . '" original-title="' . __( 'Font Variant', 'redux-framework' ) . '" id="' . $this->field['id'] . '-font-variant" data-name="font-variant" data-value="' . $this->value['font-variant'] . '" data-id="' . $this->field['id'] . '" >';
392
+ echo '<option value=""></option>';
393
+
394
+ $values = array(
395
+ 'inherit',
396
+ 'normal',
397
+ 'small-caps'
398
+ );
399
+
400
+ foreach ( $values as $v ) {
401
+ echo '<option value="' . $v . '" ' . selected( $this->value['font-variant'], $v, false ) . '>' . ucfirst( $v ) . '</option>';
402
+ }
403
+
404
+ echo '</select></div>';
405
+ }
406
+
407
+ /* Text Decoration */
408
+ if ( $this->field['text-decoration'] === true ) {
409
+ echo '<div class="select_wrapper typography-decoration tooltip" original-title="' . __( 'Text Decoration', 'redux-framework' ) . '">';
410
+ echo '<label>' . __( 'Text Decoration', 'redux-framework' ) . '</label>';
411
+ echo '<select data-placeholder="' . __( 'Text Decoration', 'redux-framework' ) . '" class="redux-typography-input redux-typography redux-typography-decoration ' . $this->field['class'] . '" original-title="' . __( 'Text Decoration', 'redux-framework' ) . '" id="' . $this->field['id'] . '-decoration" data-name="text-decoration" data-value="' . $this->value['text-decoration'] . '" data-id="' . $this->field['id'] . '" >';
412
+ echo '<option value=""></option>';
413
+
414
+ $values = array(
415
+ 'none',
416
+ 'inherit',
417
+ 'underline',
418
+ 'overline',
419
+ 'line-through',
420
+ 'blink'
421
+ );
422
+
423
+ foreach ( $values as $v ) {
424
+ echo '<option value="' . $v . '" ' . selected( $this->value['text-decoration'], $v, false ) . '>' . ucfirst( $v ) . '</option>';
425
+ }
426
+
427
+ echo '</select></div>';
428
+ }
429
+
430
+ /* Font Size */
431
+ if ( $this->field['font-size'] === true ) {
432
+ echo '<div class="input_wrapper font-size redux-container-typography">';
433
+ echo '<label>' . __( 'Font Size', 'redux-framework' ) . '</label>';
434
+ echo '<div class="input-append"><input type="text" class="span2 redux-typography-input redux-typography redux-typography-size mini typography-input ' . $this->field['class'] . '" title="' . __( 'Font Size', 'redux-framework' ) . '" placeholder="' . __( 'Size', 'redux-framework' ) . '" id="' . $this->field['id'] . '-size" data-name="font-size" value="' . str_replace( $unit, '', $this->value['font-size'] ) . '" data-value="' . str_replace( $unit, '', $this->value['font-size'] ) . '"><span class="add-on">' . $unit . '</span></div>';
435
+ echo '<input type="hidden" class="redux-typography-input typography-font-size" data-name="font-size" value="' . $this->value['font-size'] . '" data-id="' . $this->field['id'] . '" />';
436
+ echo '</div>';
437
+ }
438
+
439
+ /* Line Height */
440
+ if ( $this->field['line-height'] === true ) {
441
+ echo '<div class="input_wrapper line-height redux-container-typography">';
442
+ echo '<label>' . __( 'Line Height', 'redux-framework' ) . '</label>';
443
+ echo '<div class="input-append"><input type="text" class="span2 redux-typography redux-typography-height mini typography-input ' . $this->field['class'] . '" title="' . __( 'Line Height', 'redux-framework' ) . '" placeholder="' . __( 'Height', 'redux-framework' ) . '" id="' . $this->field['id'] . '-height" value="' . str_replace( $unit, '', $this->value['line-height'] ) . '" data-value="' . str_replace( $unit, '', $this->value['line-height'] ) . '"><span class="add-on">' . $unit . '</span></div>';
444
+ echo '<input type="hidden" class="redux-typography-input typography-line-height" data-name="line-height" value="' . $this->value['line-height'] . '" data-id="' . $this->field['id'] . '" />';
445
+ echo '</div>';
446
+ }
447
+
448
+ /* Word Spacing */
449
+ if ( $this->field['word-spacing'] === true ) {
450
+ echo '<div class="input_wrapper word-spacing redux-container-typography">';
451
+ echo '<label>' . __( 'Word Spacing', 'redux-framework' ) . '</label>';
452
+ echo '<div class="input-append"><input type="text" class="span2 redux-typography redux-typography-word mini typography-input ' . $this->field['class'] . '" title="' . __( 'Word Spacing', 'redux-framework' ) . '" placeholder="' . __( 'Word Spacing', 'redux-framework' ) . '" id="' . $this->field['id'] . '-word" value="' . str_replace( $unit, '', $this->value['word-spacing'] ) . '" data-value="' . str_replace( $unit, '', $this->value['word-spacing'] ) . '"><span class="add-on">' . $unit . '</span></div>';
453
+ echo '<input type="hidden" class="redux-typography-input typography-word-spacing" data-name="word-spacing" value="' . $this->value['word-spacing'] . '" data-id="' . $this->field['id'] . '" />';
454
+ echo '</div>';
455
+ }
456
+
457
+ /* Letter Spacing */
458
+ if ( $this->field['letter-spacing'] === true ) {
459
+ echo '<div class="input_wrapper letter-spacing redux-container-typography">';
460
+ echo '<label>' . __( 'Letter Spacing', 'redux-framework' ) . '</label>';
461
+ echo '<div class="input-append"><input type="text" class="span2 redux-typography redux-typography-letter mini typography-input ' . $this->field['class'] . '" title="' . __( 'Letter Spacing', 'redux-framework' ) . '" placeholder="' . __( 'Letter Spacing', 'redux-framework' ) . '" id="' . $this->field['id'] . '-letter" value="' . str_replace( $unit, '', $this->value['letter-spacing'] ) . '" data-value="' . str_replace( $unit, '', $this->value['letter-spacing'] ) . '"><span class="add-on">' . $unit . '</span></div>';
462
+ echo '<input type="hidden" class="redux-typography-input typography-letter-spacing" data-name="letter-spacing" value="' . $this->value['letter-spacing'] . '" data-id="' . $this->field['id'] . '" />';
463
+ echo '</div>';
464
+ }
465
+
466
+ echo '<div class="clearfix"></div>';
467
+
468
+ /* Font Color */
469
+ if ( $this->field['color'] === true ) {
470
+ $default = "";
471
+
472
+ if ( empty( $this->field['default']['color'] ) && ! empty( $this->field['color'] ) ) {
473
+ $default = $this->value['color'];
474
+ } else if ( ! empty( $this->field['default']['color'] ) ) {
475
+ $default = $this->field['default']['color'];
476
+ }
477
+
478
+ echo '<div class="picker-wrapper">';
479
+ echo '<label>' . __( 'Font Color', 'redux-framework' ) . '</label>';
480
+ echo '<div id="' . $this->field['id'] . '_color_picker" class="colorSelector typography-color"><div style="background-color: ' . $this->value['color'] . '"></div></div>';
481
+ echo '<input data-default-color="' . $default . '" class="redux-typography-input redux-color redux-typography-color ' . $this->field['class'] . '" original-title="' . __( 'Font color', 'redux-framework' ) . '" id="' . $this->field['id'] . '-color" data-name="color" type="text" value="' . $this->value['color'] . '" data-id="' . $this->field['id'] . '" />';
482
+ echo '</div>';
483
+ }
484
+
485
+ echo '<div class="clearfix"></div>';
486
+
487
+ /* Font Preview */
488
+ if ( ! isset( $this->field['preview'] ) || $this->field['preview'] !== false ) {
489
+ if ( isset( $this->field['preview']['text'] ) ) {
490
+ $g_text = $this->field['preview']['text'];
491
+ } else {
492
+ $g_text = '1 2 3 4 5 6 7 8 9 0 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z';
493
+ }
494
+
495
+ $style = '';
496
+ if ( isset( $this->field['preview']['always_display'] ) ) {
497
+ if ( true === filter_var( $this->field['preview']['always_display'], FILTER_VALIDATE_BOOLEAN ) ) {
498
+ if ( $isGoogleFont == true ) {
499
+ $this->parent->typography_preview[ $fontFamily[0] ] = array(
500
+ 'font-style' => array( $this->value['font-weight'] . $this->value['font-style'] ),
501
+ 'subset' => array( $this->value['subset'] )
502
+ );
503
+
504
+ $protocol = ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ) ? "https:" : "http:";
505
+
506
+ wp_deregister_style( 'redux-typography-preview' );
507
+ wp_dequeue_style( 'redux-typography-preview' );
508
+
509
+ wp_register_style( 'redux-typography-preview', $protocol . $this->makeGoogleWebfontLink( $this->parent->typography_preview ), '', time() );
510
+ wp_enqueue_style( 'redux-typography-preview' );
511
+ }
512
+
513
+ $style = 'display: block; font-family: ' . $this->value['font-family'] . '; font-weight: ' . $this->value['font-weight'] . ';';
514
+ }
515
+ }
516
+
517
+ if ( isset( $this->field['preview']['font-size'] ) ) {
518
+ $style .= 'font-size: ' . $this->field['preview']['font-size'] . ';';
519
+ $inUse = '1';
520
+ } else {
521
+ //$g_size = '';
522
+ $inUse = '0';
523
+ }
524
+
525
+ echo '<p data-preview-size="' . $inUse . '" class="clear ' . $this->field['id'] . '_previewer typography-preview" ' . 'style="' . $style . '">' . $g_text . '</p>';
526
+ echo '</div>'; // end typography container
527
+ }
528
+ } //function
529
+
530
+ /**
531
+ * Enqueue Function.
532
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
533
+ *
534
+ * @since ReduxFramework 1.0.0
535
+ */
536
+ function enqueue() {
537
+ if ( ! wp_style_is( 'select2-css' ) ) {
538
+ wp_enqueue_style( 'select2-css' );
539
+ }
540
+
541
+ if ( ! wp_style_is( 'wp-color-picker' ) ) {
542
+ wp_enqueue_style( 'wp-color-picker' );
543
+ }
544
+
545
+ if ( ! wp_script_is( 'redux-field-typography-js' ) ) {
546
+ wp_enqueue_script(
547
+ 'redux-field-typography-js',
548
+ ReduxFramework::$_url . 'inc/fields/typography/field_typography' . Redux_Functions::isMin() . '.js',
549
+ array( 'jquery', 'wp-color-picker', 'select2-js', 'redux-js' ),
550
+ time(),
551
+ true
552
+ );
553
+ }
554
+
555
+ wp_localize_script(
556
+ 'redux-field-typography-js',
557
+ 'redux_ajax_script',
558
+ array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) )
559
+ );
560
+
561
+ if ( $this->parent->args['dev_mode'] ) {
562
+ if ( ! wp_style_is( 'redux-color-picker-css' ) ) {
563
+ wp_enqueue_style( 'redux-color-picker-css' );
564
+ }
565
+
566
+ if ( ! wp_style_is( 'redux-field-typography-css' ) ) {
567
+ wp_enqueue_style(
568
+ 'redux-field-typography-css',
569
+ ReduxFramework::$_url . 'inc/fields/typography/field_typography.css',
570
+ array(),
571
+ time(),
572
+ 'all'
573
+ );
574
+ }
575
+ }
576
+ } //function
577
+
578
+ /**
579
+ * makeGoogleWebfontLink Function.
580
+ * Creates the google fonts link.
581
+ *
582
+ * @since ReduxFramework 3.0.0
583
+ */
584
+ function makeGoogleWebfontLink( $fonts ) {
585
+ $link = "";
586
+ $subsets = array();
587
+
588
+ foreach ( $fonts as $family => $font ) {
589
+ if ( ! empty( $link ) ) {
590
+ $link .= "%7C"; // Append a new font to the string
591
+ }
592
+ $link .= $family;
593
+
594
+ if ( ! empty( $font['font-style'] ) || ! empty( $font['all-styles'] ) ) {
595
+ $link .= ':';
596
+ if ( ! empty( $font['all-styles'] ) ) {
597
+ $link .= implode( ',', $font['all-styles'] );
598
+ } else if ( ! empty( $font['font-style'] ) ) {
599
+ $link .= implode( ',', $font['font-style'] );
600
+ }
601
+ }
602
+
603
+ if ( ! empty( $font['subset'] ) ) {
604
+ foreach ( $font['subset'] as $subset ) {
605
+ if ( ! in_array( $subset, $subsets ) ) {
606
+ array_push( $subsets, $subset );
607
+ }
608
+ }
609
+ }
610
+ }
611
+
612
+ if ( ! empty( $subsets ) ) {
613
+ $link .= "&amp;subset=" . implode( ',', $subsets );
614
+ }
615
+
616
+
617
+ return '//fonts.googleapis.com/css?family=' . str_replace( '|', '%7C', $link );
618
+ }
619
+
620
+ /**
621
+ * makeGoogleWebfontString Function.
622
+ * Creates the google fonts link.
623
+ *
624
+ * @since ReduxFramework 3.1.8
625
+ */
626
+ function makeGoogleWebfontString( $fonts ) {
627
+ $link = "";
628
+ $subsets = array();
629
+
630
+ foreach ( $fonts as $family => $font ) {
631
+ if ( ! empty( $link ) ) {
632
+ $link .= "', '"; // Append a new font to the string
633
+ }
634
+ $link .= $family;
635
+
636
+ if ( ! empty( $font['font-style'] ) || ! empty( $font['all-styles'] ) ) {
637
+ $link .= ':';
638
+ if ( ! empty( $font['all-styles'] ) ) {
639
+ $link .= implode( ',', $font['all-styles'] );
640
+ } else if ( ! empty( $font['font-style'] ) ) {
641
+ $link .= implode( ',', $font['font-style'] );
642
+ }
643
+ }
644
+
645
+ if ( ! empty( $font['subset'] ) ) {
646
+ foreach ( $font['subset'] as $subset ) {
647
+ if ( ! in_array( $subset, $subsets ) ) {
648
+ array_push( $subsets, $subset );
649
+ }
650
+ }
651
+ }
652
+ }
653
+
654
+ if ( ! empty( $subsets ) ) {
655
+ $link .= "&amp;subset=" . implode( ',', $subsets );
656
+ }
657
+
658
+ return "'" . $link . "'";
659
+ }
660
+
661
+ function output() {
662
+ $font = $this->value;
663
+
664
+ // Shim out old arg to new
665
+ if ( isset( $this->field['all_styles'] ) && ! empty( $this->field['all_styles'] ) ) {
666
+ $this->field['all-styles'] = $this->field['all_styles'];
667
+ unset ( $this->field['all_styles'] );
668
+ }
669
+
670
+ // Check for font-backup. If it's set, stick it on a variabhle for
671
+ // later use.
672
+ if ( ! empty( $font['font-family'] ) && ! empty( $font['font-backup'] ) ) {
673
+ $font['font-family'] = str_replace( ', ' . $font['font-backup'], '', $font['font-family'] );
674
+ $fontBackup = ',' . $font['font-backup'];
675
+ }
676
+
677
+ // if (strpos($font['font-family'], ' ')) {
678
+ // $font['font-family'] = '"' . $font['font-family'] . '"';
679
+ // }
680
+
681
+ $style = '';
682
+
683
+ $fontValueSet = false;
684
+
685
+ if ( ! empty( $font ) ) {
686
+ foreach ( $font as $key => $value ) {
687
+ if ( ! empty( $value ) && in_array( $key, array( 'font-family', 'font-weight' ) ) ) {
688
+ $fontValueSet = true;
689
+ }
690
+ }
691
+ }
692
+
693
+ if ( ! empty( $font ) ) {
694
+ foreach ( $font as $key => $value ) {
695
+ if ( $key == 'font-options' ) {
696
+ continue;
697
+ }
698
+ // Check for font-family key
699
+ if ( 'font-family' == $key ) {
700
+
701
+ // Enclose font family in quotes if spaces are in the
702
+ // name. This is necessary because if there are numerics
703
+ // in the font name, they will not render properly.
704
+ // Google should know better.
705
+ if ( strpos( $value, ' ' ) && ! strpos( $value, ',' ) ) {
706
+ $value = '"' . $value . '"';
707
+ }
708
+
709
+ // Ensure fontBackup isn't empty (we already option
710
+ // checked this earlier. No need to do it again.
711
+ if ( ! empty( $fontBackup ) ) {
712
+
713
+ // Apply the backup font to the font-family element
714
+ // via the saved variable. We do this here so it
715
+ // doesn't get appended to the Google stuff below.
716
+ $value .= $fontBackup;
717
+ }
718
+ }
719
+
720
+ if ( empty( $value ) && in_array( $key, array(
721
+ 'font-weight',
722
+ 'font-style'
723
+ ) ) && $fontValueSet == true
724
+ ) {
725
+ $value = "normal";
726
+ }
727
+
728
+ if ( $key == 'font-weight' && $this->field['font-weight'] == false ) {
729
+ continue;
730
+ }
731
+
732
+ if ( $key == 'font-style' && $this->field['font-style'] == false ) {
733
+ continue;
734
+ }
735
+
736
+
737
+ if ( $key == "google" || $key == "subsets" || $key == "font-backup" || empty( $value ) ) {
738
+ continue;
739
+ }
740
+ $style .= $key . ':' . $value . ';';
741
+ }
742
+ if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
743
+ $style .= 'opacity: 1;visibility: visible;-webkit-transition: opacity 0.24s ease-in-out;-moz-transition: opacity 0.24s ease-in-out;transition: opacity 0.24s ease-in-out;';
744
+ }
745
+ }
746
+
747
+ if ( ! empty( $style ) ) {
748
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
749
+ $keys = implode( ",", $this->field['output'] );
750
+ $this->parent->outputCSS .= $keys . "{" . $style . '}';
751
+ if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
752
+ $key_string = "";
753
+ $key_string_ie = "";
754
+ foreach ( $this->field['output'] as $value ) {
755
+ $key_string .= ".wf-loading " . $value . ',';
756
+ $key_string_ie .= ".ie.wf-loading " . $value . ',';
757
+ }
758
+ $this->parent->outputCSS .= $key_string . "{opacity: 0;}";
759
+ $this->parent->outputCSS .= $key_string_ie . "{visibility: hidden;}";
760
+ }
761
+ }
762
+
763
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
764
+ $keys = implode( ",", $this->field['compiler'] );
765
+ $this->parent->compilerCSS .= $keys . "{" . $style . '}';
766
+ if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
767
+ $key_string = "";
768
+ $key_string_ie = "";
769
+ foreach ( $this->field['compiler'] as $value ) {
770
+ $key_string .= ".wf-loading " . $value . ',';
771
+ $key_string_ie .= ".ie.wf-loading " . $value . ',';
772
+ }
773
+ $this->parent->compilerCSS .= $key_string . "{opacity: 0;}";
774
+ $this->parent->compilerCSS .= $key_string_ie . "{visibility: hidden;}";
775
+ }
776
+ }
777
+ }
778
+
779
+ // Google only stuff!
780
+ if ( ! empty( $font['font-family'] ) && ! empty( $this->field['google'] ) && filter_var( $this->field['google'], FILTER_VALIDATE_BOOLEAN ) ) {
781
+
782
+ // Added standard font matching check to avoid output to Google fonts call - kp
783
+ // If no custom font array was supplied, the load it with default
784
+ // standard fonts.
785
+ if ( empty( $this->field['fonts'] ) ) {
786
+ $this->field['fonts'] = $this->std_fonts;
787
+ }
788
+
789
+ // Ensure the fonts array is NOT empty
790
+ if ( ! empty( $this->field['fonts'] ) ) {
791
+
792
+ //Make the font keys in the array lowercase, for case-insensitive matching
793
+ $lcFonts = array_change_key_case( $this->field['fonts'] );
794
+
795
+ // Rebuild font array with all keys stripped of spaces
796
+ $arr = array();
797
+ foreach ( $lcFonts as $key => $value ) {
798
+ $key = str_replace( ', ', ',', $key );
799
+ $arr[ $key ] = $value;
800
+ }
801
+
802
+ $lcFonts = array_change_key_case( $this->field['custom_fonts'] );
803
+ foreach ( $lcFonts as $group => $fontArr ) {
804
+ foreach ( $fontArr as $key => $value ) {
805
+ $arr[ strtolower( $key ) ] = $key;
806
+ }
807
+ }
808
+
809
+ $lcFonts = $arr;
810
+
811
+ unset( $arr );
812
+
813
+ // lowercase chosen font for matching purposes
814
+ $lcFont = strtolower( $font['font-family'] );
815
+
816
+ // Remove spaces after commas in chosen font for mathcing purposes.
817
+ $lcFont = str_replace( ', ', ',', $lcFont );
818
+
819
+ // If the lower cased passed font-family is NOT found in the standard font array
820
+ // Then it's a Google font, so process it for output.
821
+ if ( ! array_key_exists( $lcFont, $lcFonts ) ) {
822
+ $family = $font['font-family'];
823
+
824
+ // Strip out spaces in font names and replace with with plus signs
825
+ // TODO?: This method doesn't respect spaces after commas, hence the reason
826
+ // for the std_font array keys having no spaces after commas. This could be
827
+ // fixed with RegEx in the future.
828
+ $font['font-family'] = str_replace( ' ', '+', $font['font-family'] );
829
+
830
+ // Push data to parent typography variable.
831
+ if ( empty( $this->parent->typography[ $font['font-family'] ] ) ) {
832
+ $this->parent->typography[ $font['font-family'] ] = array();
833
+ }
834
+
835
+ if ( isset( $this->field['all-styles'] ) ) {
836
+ if ( ! isset( $font['font-options'] ) || empty( $font['font-options'] ) ) {
837
+ $this->getGoogleArray();
838
+
839
+ if ( isset( $this->parent->googleArray ) && ! empty( $this->parent->googleArray ) && isset( $this->parent->googleArray[ $family ] ) ) {
840
+ $font['font-options'] = $this->parent->googleArray[ $family ];
841
+ }
842
+ } else {
843
+ $font['font-options'] = json_decode( $font['font-options'], true );
844
+ }
845
+ //print_r($font['font-options']);
846
+ //exit();
847
+ }
848
+
849
+ if ( isset( $font['font-options'] ) && ! empty( $font['font-options'] ) && isset( $this->field['all-styles'] ) && filter_var( $this->field['all-styles'], FILTER_VALIDATE_BOOLEAN ) ) {
850
+ if ( isset( $font['font-options'] ) && ! empty( $font['font-options']['variants'] ) ) {
851
+ if ( ! isset( $this->parent->typography[ $font['font-family'] ]['all-styles'] ) || empty( $this->parent->typography[ $font['font-family'] ]['all-styles'] ) ) {
852
+ $this->parent->typography[ $font['font-family'] ]['all-styles'] = array();
853
+ foreach ( $font['font-options']['variants'] as $variant ) {
854
+ $this->parent->typography[ $font['font-family'] ]['all-styles'][] = $variant['id'];
855
+ }
856
+ }
857
+ }
858
+ }
859
+
860
+ if ( ! empty( $font['font-weight'] ) ) {
861
+ if ( empty( $this->parent->typography[ $font['font-family'] ]['font-weight'] ) || ! in_array( $font['font-weight'], $this->parent->typography[ $font['font-family'] ]['font-weight'] ) ) {
862
+ $style = $font['font-weight'];
863
+ }
864
+
865
+ if ( ! empty( $font['font-style'] ) ) {
866
+ $style .= $font['font-style'];
867
+ }
868
+
869
+ if ( empty( $this->parent->typography[ $font['font-family'] ]['font-style'] ) || ! in_array( $style, $this->parent->typography[ $font['font-family'] ]['font-style'] ) ) {
870
+ $this->parent->typography[ $font['font-family'] ]['font-style'][] = $style;
871
+ }
872
+ }
873
+
874
+ if ( ! empty( $font['subsets'] ) ) {
875
+ if ( empty( $this->parent->typography[ $font['font-family'] ]['subset'] ) || ! in_array( $font['subsets'], $this->parent->typography[ $font['font-family'] ]['subset'] ) ) {
876
+ $this->parent->typography[ $font['font-family'] ]['subset'][] = $font['subsets'];
877
+ }
878
+ }
879
+ } // !array_key_exists
880
+ } //!empty fonts array
881
+ } // Typography not set
882
+ }
883
+
884
+ private function localizeStdFonts() {
885
+ if ( false == $this->user_fonts ) {
886
+ if ( isset( $this->parent->fonts['std'] ) && ! empty( $this->parent->fonts['std'] ) ) {
887
+ return;
888
+ }
889
+
890
+ $this->parent->font_groups['std'] = array(
891
+ 'text' => __( 'Standard Fonts', 'redux-framework' ),
892
+ 'children' => array(),
893
+ );
894
+
895
+ foreach ( $this->field['fonts'] as $font => $extra ) {
896
+ $this->parent->font_groups['std']['children'][] = array(
897
+ 'id' => $font,
898
+ 'text' => $font,
899
+ 'data-google' => 'false',
900
+ );
901
+ }
902
+ }
903
+
904
+ if ( $this->field['custom_fonts'] !== false ) {
905
+ $this->field['custom_fonts'] = apply_filters( "redux/{$this->parent->args['opt_name']}/field/typography/custom_fonts", array() );
906
+
907
+ if ( ! empty( $this->field['custom_fonts'] ) ) {
908
+ foreach ( $this->field['custom_fonts'] as $group => $fonts ) {
909
+ $this->parent->font_groups['customfonts'] = array(
910
+ 'text' => $group,
911
+ 'children' => array(),
912
+ );
913
+
914
+ foreach ( $fonts as $family => $v ) {
915
+ $this->parent->font_groups['customfonts']['children'][] = array(
916
+ 'id' => $family,
917
+ 'text' => $family,
918
+ 'data-google' => 'false',
919
+ );
920
+ }
921
+ }
922
+ }
923
+ }
924
+ }
925
+
926
+ /**
927
+ * Construct the google array from the stored JSON/HTML
928
+ */
929
+ function getGoogleArray() {
930
+
931
+ if ( ( isset( $this->parent->fonts['google'] ) && ! empty( $this->parent->fonts['google'] ) ) || isset( $this->parent->fonts['google'] ) && $this->parent->fonts['google'] == false ) {
932
+ return;
933
+ }
934
+
935
+ $gFile = dirname( __FILE__ ) . '/googlefonts.php';
936
+
937
+ // Weekly update
938
+ if ( isset( $this->parent->args['google_update_weekly'] ) && $this->parent->args['google_update_weekly'] && ! empty( $this->parent->args['google_api_key'] ) ) {
939
+
940
+ if ( file_exists( $gFile ) ) {
941
+ // Keep the fonts updated weekly
942
+ $weekback = strtotime( date( 'jS F Y', time() + ( 60 * 60 * 24 * - 7 ) ) );
943
+ $last_updated = filemtime( $gFile );
944
+ if ( $last_updated < $weekback ) {
945
+ unlink( $gFile );
946
+ }
947
+ }
948
+ }
949
+
950
+ if ( ! file_exists( $gFile ) ) {
951
+
952
+ $result = @wp_remote_get( apply_filters( 'redux-google-fonts-api-url', 'https://www.googleapis.com/webfonts/v1/webfonts?key=' ) . $this->parent->args['google_api_key'], array( 'sslverify' => false ) );
953
+
954
+ if ( ! is_wp_error( $result ) && $result['response']['code'] == 200 ) {
955
+ $result = json_decode( $result['body'] );
956
+ foreach ( $result->items as $font ) {
957
+ $this->parent->googleArray[ $font->family ] = array(
958
+ 'variants' => $this->getVariants( $font->variants ),
959
+ 'subsets' => $this->getSubsets( $font->subsets )
960
+ );
961
+ }
962
+
963
+ if ( ! empty( $this->parent->googleArray ) ) {
964
+ $this->parent->filesystem->execute( 'put_contents', $gFile, array( 'content' => "<?php return json_decode( '" . json_encode( $this->parent->googleArray ) . "', true );" ) );
965
+ }
966
+ }
967
+ }
968
+
969
+ if ( ! file_exists( $gFile ) ) {
970
+ $this->parent->fonts['google'] = false;
971
+
972
+ return;
973
+ }
974
+
975
+ if ( ! isset( $this->parent->fonts['google'] ) || empty( $this->parent->fonts['google'] ) ) {
976
+
977
+ $fonts = include $gFile;
978
+
979
+ if ( $fonts === true ) {
980
+ $this->parent->fonts['google'] = false;
981
+
982
+ return;
983
+ }
984
+
985
+ if ( isset( $fonts ) && ! empty( $fonts ) && is_array( $fonts ) && $fonts != false ) {
986
+ $this->parent->fonts['google'] = $fonts;
987
+ $this->parent->googleArray = $fonts;
988
+
989
+ // optgroup
990
+ $this->parent->font_groups['google'] = array(
991
+ 'text' => __( 'Google Webfonts', 'redux-framework' ),
992
+ 'children' => array(),
993
+ );
994
+
995
+ // options
996
+ foreach ( $this->parent->fonts['google'] as $font => $extra ) {
997
+ $this->parent->font_groups['google']['children'][] = array(
998
+ 'id' => $font,
999
+ 'text' => $font,
1000
+ 'data-google' => 'true'
1001
+ );
1002
+ }
1003
+ }
1004
+ }
1005
+ }
1006
+
1007
+ /**
1008
+ * getSubsets Function.
1009
+ * Clean up the Google Webfonts subsets to be human readable
1010
+ *
1011
+ * @since ReduxFramework 0.2.0
1012
+ */
1013
+ private function getSubsets( $var ) {
1014
+ $result = array();
1015
+
1016
+ foreach ( $var as $v ) {
1017
+ if ( strpos( $v, "-ext" ) ) {
1018
+ $name = ucfirst( str_replace( "-ext", " Extended", $v ) );
1019
+ } else {
1020
+ $name = ucfirst( $v );
1021
+ }
1022
+
1023
+ array_push( $result, array(
1024
+ 'id' => $v,
1025
+ 'name' => $name
1026
+ ) );
1027
+ }
1028
+
1029
+ return array_filter( $result );
1030
+ } //function
1031
+
1032
+ /**
1033
+ * getVariants Function.
1034
+ * Clean up the Google Webfonts variants to be human readable
1035
+ *
1036
+ * @since ReduxFramework 0.2.0
1037
+ */
1038
+ private function getVariants( $var ) {
1039
+ $result = array();
1040
+ $italic = array();
1041
+
1042
+ foreach ( $var as $v ) {
1043
+ $name = "";
1044
+ if ( $v[0] == 1 ) {
1045
+ $name = 'Ultra-Light 100';
1046
+ } else if ( $v[0] == 2 ) {
1047
+ $name = 'Light 200';
1048
+ } else if ( $v[0] == 3 ) {
1049
+ $name = 'Book 300';
1050
+ } else if ( $v[0] == 4 || $v[0] == "r" || $v[0] == "i" ) {
1051
+ $name = 'Normal 400';
1052
+ } else if ( $v[0] == 5 ) {
1053
+ $name = 'Medium 500';
1054
+ } else if ( $v[0] == 6 ) {
1055
+ $name = 'Semi-Bold 600';
1056
+ } else if ( $v[0] == 7 ) {
1057
+ $name = 'Bold 700';
1058
+ } else if ( $v[0] == 8 ) {
1059
+ $name = 'Extra-Bold 800';
1060
+ } else if ( $v[0] == 9 ) {
1061
+ $name = 'Ultra-Bold 900';
1062
+ }
1063
+
1064
+ if ( $v == "regular" ) {
1065
+ $v = "400";
1066
+ }
1067
+
1068
+ if ( strpos( $v, "italic" ) || $v == "italic" ) {
1069
+ $name .= " Italic";
1070
+ $name = trim( $name );
1071
+ if ( $v == "italic" ) {
1072
+ $v = "400italic";
1073
+ }
1074
+ $italic[] = array(
1075
+ 'id' => $v,
1076
+ 'name' => $name
1077
+ );
1078
+ } else {
1079
+ $result[] = array(
1080
+ 'id' => $v,
1081
+ 'name' => $name
1082
+ );
1083
+ }
1084
+ }
1085
+
1086
+ foreach ( $italic as $item ) {
1087
+ $result[] = $item;
1088
+ }
1089
+
1090
+ return array_filter( $result );
1091
+ } //function
1092
+ } //class
1093
+ } //class exists
includes/options/redux-core/inc/fields/typography/field_typography.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.typography=redux.field_objects.typography||{};var b=[],c=!1,d={width:"resolve",triggerChange:!0,allowClear:!0};a(document).ready(function(){}),redux.field_objects.typography.init=function(e,f){e||(e=a(document).find(".redux-group-tab:visible").find(".redux-container-typography:visible")),a(e).each(function(){var e=a(this),f=e;if(e.hasClass("redux-field-container")||(f=e.parents(".redux-field-container:first")),!f.is(":hidden")&&f.hasClass("redux-field-init")){f.removeClass("redux-field-init");var g;e.each(function(){a(this).find(".redux-typography-container").each(function(){var b=a(this).find(".redux-typography-family");void 0===b.data("value")?b=a(this):""!==b.data("value")&&a(b).val(b.data("value"));var c=a(this).find(".select2_params");if(c.size()>0){var e=c.val();e=JSON.parse(e),d=a.extend({},d,e)}g=Boolean(a(this).find(".redux-font-clear").val()),redux.field_objects.typography.select(b,!0),window.onbeforeunload=null}),a(this).find(".redux-typography").on("change",function(){redux.field_objects.typography.select(a(this))}),a(this).find(".redux-typography-size, .redux-typography-height, .redux-typography-word, .redux-typography-letter, .redux-typography-align, .redux-typography-transform, .redux-typography-font-variant, .redux-typography-decoration").keyup(function(){redux.field_objects.typography.select(a(this).parents(".redux-container-typography:first"))}),a(this).find(".redux-typography-color").wpColorPicker({change:function(b,c){a(this).val(c.color.toString()),redux.field_objects.typography.select(a(this).parents(".redux-container-typography:first"))}}),a(this).find(".redux-typography-size").numeric({allowMinus:!1}),a(this).find(".redux-typography-height, .redux-typography-word, .redux-typography-letter").numeric({allowMinus:!0});var f=[{id:"none",text:"none"}];a(this).find(".redux-typography-family").select2({matcher:function(a,b){return 0===b.toUpperCase().indexOf(a.toUpperCase())},query:function(a){return window.Select2.query.local(f)(a)},initSelection:function(a,b){var c={id:a.val(),text:a.val()};b(c)},allowClear:g}).on("select2-opening",function(b){var c=a(this).parents(".redux-container-typography:first").attr("data-id"),d=a("#"+c+" .redux-typography-font-family").data("user-fonts");d=d?1:0;var e=a("#"+c+" .redux-typography-google").val();e=e?1:0;var g=[];if(void 0!==redux.customfonts&&g.push(redux.customfonts),void 0!==redux.stdfonts&&0===d&&g.push(redux.stdfonts),1==d){var h=[];for(var i in redux.typography[c]){var j=redux.typography[c].std_font;for(var k in j)j.hasOwnProperty(k)&&h.push({id:k,text:k,"data-google":"false"})}var l={text:"Standard Fonts",children:h};g.push(l)}(1==e||e===!0&&void 0!==redux.googlefonts)&&g.push(redux.googlefonts),f=g;var m=a("#"+c+" #"+c+"-family").attr("placeholder");m||(m=null),a("#"+c+" .redux-typography-family").select2("val",m)}).on("select2-selecting",function(d,e){var f=d.object.text,g=a(this).parents(".redux-container-typography:first").attr("data-id");a("#"+g+" #"+g+"-family").data("value",f),a("#"+g+" #"+g+"-family").attr("placeholder",f),b=d,c=!0,redux.field_objects.typography.select(a(this).parents(".redux-container-typography:first"))}).on("select2-clearing",function(b,c){var d=a(this).parents(".redux-container-typography:first").attr("data-id");a("#"+d+" #"+d+"-family").attr("data-value",""),a("#"+d+" #"+d+"-family").attr("placeholder","Font Family"),a("#"+d+" #"+d+"-google-font").val("false"),redux.field_objects.typography.select(a(this).parents(".redux-container-typography:first"))});var h=e.find(".redux-typography-family");h.hasClass("redux-typography-family")||e.find(".redux-typography-style").select2(d),e.find(".redux-typography-family-backup, .redux-typography-align, .redux-typography-transform, .redux-typography-font-variant, .redux-typography-decoration").select2(d)})}})},redux.field_objects.typography.size=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++;return c},redux.field_objects.typography.makeBool=function(a){return"false"==a||"0"==a||a===!1||0===a?!1:"true"==a||"1"==a||a===!0||1==a?!0:void 0},redux.field_objects.typography.contrastColour=function(a){var b="#444444";if(""!==a){a=a.replace("#","");var c=parseInt(a.substr(0,2),16),d=parseInt(a.substr(2,2),16),e=parseInt(a.substr(4,2),16),f=(299*c+587*d+114*e)/1e3;b=f>=128?"#444444":"#ffffff"}return b},redux.field_objects.typography.select=function(e,f){var g;g=a(e).parents(".redux-container-typography:first").attr("data-id"),void 0===g&&(g=a(e).attr("data-id"));var h=(a(e).parents(".redux-container-typography:first"),a("#"+g+" #"+g+"-family").val());h||(h=null);var i,j=a("#"+g+" select.redux-typography-family-backup").val(),k=a("#"+g+" .redux-typography-size").val(),l=a("#"+g+" .redux-typography-height").val(),m=a("#"+g+" .redux-typography-word").val(),n=a("#"+g+" .redux-typography-letter").val(),o=a("#"+g+" select.redux-typography-align").val(),p=a("#"+g+" select.redux-typography-transform").val(),q=a("#"+g+" select.redux-typography-font-variant").val(),r=a("#"+g+" select.redux-typography-decoration").val(),s=a("#"+g+" select.redux-typography-style").val(),t=a("#"+g+" select.redux-typography-subsets").val(),u=a("#"+g+" .redux-typography-color").val(),v=a("#"+g).data("units");c===!0?(i=redux.field_objects.typography.makeBool(b.object["data-google"]),a("#"+g+" .redux-typography-google-font").val(i)):i=redux.field_objects.typography.makeBool(a("#"+g+" .redux-typography-google-font").val()),a("#"+g).hasClass("typography-initialized")||(s=a("#"+g+" select.redux-typography-style").data("value"),t=a("#"+g+" select.redux-typography-subsets").data("value"),""!==s&&(s=String(s)),void 0!==typeof t&&(t=String(t))),void 0===redux.fonts.google&&(i=!1);var w="";if(w=i===!0&&h in redux.fonts.google?redux.fonts.google[h]:{400:"Normal 400",700:"Bold 700","400italic":"Normal 400 Italic","700italic":"Bold 700 Italic"},a(e).hasClass("redux-typography-subsets")&&a("#"+g+" input.typography-subsets").val(t),a(e).hasClass("redux-typography-family")){var x='<option value=""></option>';if(i===!0){var y="";a.each(w.variants,function(a,b){b.id===s||1===redux.field_objects.typography.size(w.variants)?(y=' selected="selected"',s=b.id):y="",x+='<option value="'+b.id+'"'+y+">"+b.name.replace(/\+/g," ")+"</option>"}),a("#"+g+" .redux-typography-style").select2("destroy"),a("#"+g+" .redux-typography-style").html(x),a("#"+g+" .redux-typography-style").select2(d),y="",x='<option value=""></option>',a.each(w.subsets,function(b,c){c.id===t||1===redux.field_objects.typography.size(w.subsets)?(y=' selected="selected"',t=c.id,a("#"+g+" input.typography-subsets").val(t)):y="",x+='<option value="'+c.id+'"'+y+">"+c.name.replace(/\+/g," ")+"</option>"}),a("#"+g+" .redux-typography-subsets").select2("destroy"),a("#"+g+" .redux-typography-subsets").html(x),a("#"+g+" .redux-typography-subsets").select2(d),a("#"+g+" .redux-typography-subsets").parent().fadeIn("fast"),a("#"+g+" .typography-family-backup").fadeIn("fast")}else w&&(a.each(w,function(b,c){b===s||"normal"===b?(y=' selected="selected"',a("#"+g+" .typography-style .select2-chosen").text(c)):y="",x+='<option value="'+b+'"'+y+">"+c.replace("+"," ")+"</option>"}),a("#"+g+" .redux-typography-style").select2("destroy"),a("#"+g+" .redux-typography-style").html(x),a("#"+g+" .redux-typography-style").select2(d),a("#"+g+" .redux-typography-subsets").parent().fadeOut("fast"),a("#"+g+" .typography-family-backup").fadeOut("fast"));a("#"+g+" .redux-typography-font-family").val(h)}else a(e).hasClass("redux-typography-family-backup")&&""!==j&&a("#"+g+" .redux-typography-font-family-backup").val(j);0===a("#"+g+" select.redux-typography-style option[value='"+s+"']").length?(s="",a("#"+g+" select.redux-typography-style").select2("val","")):"400"===s&&a("#"+g+" select.redux-typography-style").select2("val",s),0===a("#"+g+" select.redux-typography-subsets option[value='"+t+"']").length&&(t="",a("#"+g+" select.redux-typography-subsets").select2("val",""),a("#"+g+" input.typography-subsets").val(t));var z="style_link_"+g;if(a("."+z).remove(),null!==h&&"inherit"!==h&&a("#"+g).hasClass("typography-initialized")){var A=h.replace(/\s+/g,"+");if(i===!0){var B=A;s&&""!==s&&(B+=":"+s.replace(/\-/g," ")),t&&""!==t&&(B+="&subset="+t),c===!1&&"undefined"!=typeof WebFont&&WebFont&&WebFont.load({google:{families:[B]}}),a("#"+g+" .redux-typography-google").val(!0)}else a("#"+g+" .redux-typography-google").val(!1)}if(-1!==s.indexOf("italic")?(a("#"+g+" .typography-preview").css("font-style","italic"),a("#"+g+" .typography-font-style").val("italic"),s=s.replace("italic","")):(a("#"+g+" .typography-preview").css("font-style","normal"),a("#"+g+" .typography-font-style").val("")),a("#"+g+" .typography-font-weight").val(s),l||(l=k),""===k||void 0===k?a("#"+g+" .typography-font-size").val(""):a("#"+g+" .typography-font-size").val(k+v),""===l||void 0===l?a("#"+g+" .typography-line-height").val(""):a("#"+g+" .typography-line-height").val(l+v),""===m||void 0===m?a("#"+g+" .typography-word-spacing").val(""):a("#"+g+" .typography-word-spacing").val(m+v),""===n||void 0===n?a("#"+g+" .typography-letter-spacing").val(""):a("#"+g+" .typography-letter-spacing").val(n+v),a("#"+g).hasClass("typography-initialized")){var C=a("#"+g+" .typography-preview").data("preview-size");"0"==C&&a("#"+g+" .typography-preview").css("font-size",k+v),a("#"+g+" .typography-preview").css("font-weight",s),a("#"+g+" .typography-preview").css("font-family",h+", sans-serif"),"none"===h&&""===h&&a("#"+g+" .typography-preview").css("font-family","inherit"),a("#"+g+" .typography-preview").css("line-height",l+v),a("#"+g+" .typography-preview").css("word-spacing",m+v),a("#"+g+" .typography-preview").css("letter-spacing",n+v),u&&(a("#"+g+" .typography-preview").css("color",u),a("#"+g+" .typography-preview").css("background-color",redux.field_objects.typography.contrastColour(u))),a("#"+g+" .typography-style .select2-chosen").text(a("#"+g+" .redux-typography-style option:selected").text()),a("#"+g+" .typography-script .select2-chosen").text(a("#"+g+" .redux-typography-subsets option:selected").text()),o&&a("#"+g+" .typography-preview").css("text-align",o),p&&a("#"+g+" .typography-preview").css("text-transform",p),q&&a("#"+g+" .typography-preview").css("font-variant",q),r&&a("#"+g+" .typography-preview").css("text-decoration",r),a("#"+g+" .typography-preview").slideDown()}a("#"+g).hasClass("typography-initialized")||a("#"+g).addClass("typography-initialized"),c=!1,f||redux_change(e)}}(jQuery);
includes/options/redux-core/inc/fields/typography/field_typography.php ADDED
@@ -0,0 +1,1093 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class and Function List:
5
+ * Function list:
6
+ * - __construct()
7
+ * - render()
8
+ * - enqueue()
9
+ * - makeGoogleWebfontLink()
10
+ * - makeGoogleWebfontString()
11
+ * - output()
12
+ * - getGoogleArray()
13
+ * - getSubsets()
14
+ * - getVariants()
15
+ * Classes list:
16
+ * - ReduxFramework_typography
17
+ */
18
+
19
+ if ( ! class_exists( 'ReduxFramework_typography' ) ) {
20
+ class ReduxFramework_typography {
21
+
22
+ private $std_fonts = array(
23
+ "Arial, Helvetica, sans-serif" => "Arial, Helvetica, sans-serif",
24
+ "'Arial Black', Gadget, sans-serif" => "'Arial Black', Gadget, sans-serif",
25
+ "'Bookman Old Style', serif" => "'Bookman Old Style', serif",
26
+ "'Comic Sans MS', cursive" => "'Comic Sans MS', cursive",
27
+ "Courier, monospace" => "Courier, monospace",
28
+ "Garamond, serif" => "Garamond, serif",
29
+ "Georgia, serif" => "Georgia, serif",
30
+ "Impact, Charcoal, sans-serif" => "Impact, Charcoal, sans-serif",
31
+ "'Lucida Console', Monaco, monospace" => "'Lucida Console', Monaco, monospace",
32
+ "'Lucida Sans Unicode', 'Lucida Grande', sans-serif" => "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
33
+ "'MS Sans Serif', Geneva, sans-serif" => "'MS Sans Serif', Geneva, sans-serif",
34
+ "'MS Serif', 'New York', sans-serif" => "'MS Serif', 'New York', sans-serif",
35
+ "'Palatino Linotype', 'Book Antiqua', Palatino, serif" => "'Palatino Linotype', 'Book Antiqua', Palatino, serif",
36
+ "Tahoma,Geneva, sans-serif" => "Tahoma, Geneva, sans-serif",
37
+ "'Times New Roman', Times,serif" => "'Times New Roman', Times, serif",
38
+ "'Trebuchet MS', Helvetica, sans-serif" => "'Trebuchet MS', Helvetica, sans-serif",
39
+ "Verdana, Geneva, sans-serif" => "Verdana, Geneva, sans-serif",
40
+ );
41
+
42
+ private $user_fonts = true;
43
+
44
+ /**
45
+ * Field Constructor.
46
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
47
+ *
48
+ * @since ReduxFramework 1.0.0
49
+ */
50
+ function __construct( $field = array(), $value = '', $parent ) {
51
+ $this->parent = $parent;
52
+ $this->field = $field;
53
+ $this->value = $value;
54
+
55
+ // Shim out old arg to new
56
+ if ( isset( $this->field['all_styles'] ) && ! empty( $this->field['all_styles'] ) ) {
57
+ $this->field['all-styles'] = $this->field['all_styles'];
58
+ unset ( $this->field['all_styles'] );
59
+ }
60
+
61
+ // Set field array defaults. No errors please
62
+ $defaults = array(
63
+ 'font-family' => true,
64
+ 'font-size' => true,
65
+ 'font-weight' => true,
66
+ 'font-style' => true,
67
+ 'font-backup' => false,
68
+ 'subsets' => true,
69
+ 'custom_fonts' => true,
70
+ 'text-align' => true,
71
+ 'text-transform' => false,
72
+ 'font-variant' => false,
73
+ 'text-decoration' => false,
74
+ 'color' => true,
75
+ 'preview' => true,
76
+ 'line-height' => true,
77
+ 'multi' => array(
78
+ 'subset' => false,
79
+ 'weight' => false,
80
+ ),
81
+ 'word-spacing' => false,
82
+ 'letter-spacing' => false,
83
+ 'google' => true,
84
+ 'update_weekly' => false, // Enable to force updates of Google Fonts to be weekly
85
+ 'font_family_clear' => true
86
+ );
87
+ $this->field = wp_parse_args( $this->field, $defaults );
88
+
89
+ // Set value defaults.
90
+ $defaults = array(
91
+ 'font-family' => '',
92
+ 'font-options' => '',
93
+ 'font-backup' => '',
94
+ 'text-align' => '',
95
+ 'text-transform' => '',
96
+ 'font-variant' => '',
97
+ 'text-decoration' => '',
98
+ 'line-height' => '',
99
+ 'word-spacing' => '',
100
+ 'letter-spacing' => '',
101
+ 'subsets' => '',
102
+ 'google' => false,
103
+ 'font-script' => '',
104
+ 'font-weight' => '',
105
+ 'font-style' => '',
106
+ 'color' => '',
107
+ 'font-size' => '',
108
+ );
109
+ $this->value = wp_parse_args( $this->value, $defaults );
110
+
111
+ // Get the google array
112
+ $this->getGoogleArray();
113
+
114
+ if ( empty( $this->field['fonts'] ) ) {
115
+ $this->user_fonts = false;
116
+ $this->field['fonts'] = $this->std_fonts;
117
+ }
118
+
119
+ // Localize std fonts
120
+ $this->localizeStdFonts();
121
+
122
+ }
123
+
124
+ function localize( $field, $value = "" ) {
125
+ $params = array();
126
+
127
+ if ( true == $this->user_fonts && ! empty( $this->field['fonts'] ) ) {
128
+ $params['std_font'] = $this->field['fonts'];
129
+ }
130
+
131
+ return $params;
132
+ }
133
+
134
+
135
+ /**
136
+ * Field Render Function.
137
+ * Takes the vars and outputs the HTML for the field in the settings
138
+ *
139
+ * @since ReduxFramework 1.0.0
140
+ */
141
+ function render() {
142
+ // Since fonts declared is CSS (@font-face) are not rendered in the preview,
143
+ // they can be declared in a CSS file and passed here so they DO display in
144
+ // font preview. Do NOT pass style.css in your theme, as that will mess up
145
+ // admin page styling. It's recommended to pass a CSS file with ONLY font
146
+ // declarations.
147
+ // If field is set and not blank, then enqueue field
148
+ if ( isset( $this->field['ext-font-css'] ) && $this->field['ext-font-css'] != '' ) {
149
+ wp_register_style( 'redux-external-fonts', $this->field['ext-font-css'] );
150
+ wp_enqueue_style( 'redux-external-fonts' );
151
+ }
152
+
153
+ if ( empty( $this->field['units'] ) && ! empty( $this->field['default']['units'] ) ) {
154
+ $this->field['units'] = $this->field['default']['units'];
155
+ }
156
+
157
+ if ( empty( $this->field['units'] ) || ! in_array( $this->field['units'], array(
158
+ 'px',
159
+ 'em',
160
+ 'rem',
161
+ '%'
162
+ ) )
163
+ ) {
164
+ $this->field['units'] = 'px';
165
+ }
166
+
167
+ $unit = $this->field['units'];
168
+
169
+ echo '<div id="' . $this->field['id'] . '" class="redux-typography-container" data-id="' . $this->field['id'] . '" data-units="' . $unit . '">';
170
+
171
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
172
+ $select2_params = json_encode( $this->field['select2'] );
173
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
174
+
175
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
176
+ }
177
+
178
+ /* Font Family */
179
+ if ( $this->field['font-family'] === true ) {
180
+
181
+ // font family clear
182
+ echo '<input type="hidden" class="redux-font-clear" value="' . $this->field['font_family_clear'] . '">';
183
+
184
+ //if (filter_var($this->value['google'], FILTER_VALIDATE_BOOLEAN)) {
185
+ if ( filter_var( $this->value['google'], FILTER_VALIDATE_BOOLEAN ) ) {
186
+
187
+ // Divide and conquer
188
+ $fontFamily = explode( ', ', $this->value['font-family'], 2 );
189
+
190
+ // If array 0 is empty and array 1 is not
191
+ if ( empty( $fontFamily[0] ) && ! empty( $fontFamily[1] ) ) {
192
+
193
+ // Make array 0 = array 1
194
+ $fontFamily[0] = $fontFamily[1];
195
+
196
+ // Clear array 1
197
+ $fontFamily[1] = "";
198
+ }
199
+ }
200
+
201
+ // If no fontFamily array exists, create one and set array 0
202
+ // with font value
203
+ if ( ! isset( $fontFamily ) ) {
204
+ $fontFamily = array();
205
+ $fontFamily[0] = $this->value['font-family'];
206
+ $fontFamily[1] = "";
207
+ }
208
+
209
+ // Is selected font a Google font
210
+ $isGoogleFont = '0';
211
+ if ( isset( $this->parent->fonts['google'][ $fontFamily[0] ] ) ) {
212
+ $isGoogleFont = '1';
213
+ }
214
+
215
+ // If not a Google font, show all font families
216
+ if ( $isGoogleFont != '1' ) {
217
+ $fontFamily[0] = $this->value['font-family'];
218
+ }
219
+
220
+ $userFonts = '0';
221
+ if ( true == $this->user_fonts ) {
222
+ $userFonts = '1';
223
+ }
224
+
225
+ echo '<input type="hidden" class="redux-typography-font-family ' . $this->field['class'] . '" data-user-fonts="' . $userFonts . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[font-family]' . '" value="' . $this->value['font-family'] . '" data-id="' . $this->field['id'] . '" />';
226
+ echo '<input type="hidden" class="redux-typography-font-options ' . $this->field['class'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[font-options]' . '" value="' . $this->value['font-options'] . '" data-id="' . $this->field['id'] . '" />';
227
+
228
+ echo '<input type="hidden" class="redux-typography-google-font" value="' . $isGoogleFont . '" id="' . $this->field['id'] . '-google-font">';
229
+
230
+ echo '<div class="select_wrapper typography-family" style="width: 220px; margin-right: 5px;">';
231
+ echo '<label>' . __( 'Font Family', 'redux-framework' ) . '</label>';
232
+ $placeholder = $fontFamily[0] ? $fontFamily[0] : __( 'Font family', 'redux-framework' );
233
+
234
+ echo '<div class=" redux-typography redux-typography-family select2-container ' . $this->field['class'] . '" id="' . $this->field['id'] . '-family" placeholder="' . $placeholder . '" data-id="' . $this->field['id'] . '" data-value="' . $fontFamily[0] . '">';
235
+
236
+ echo '</div>';
237
+ echo '</div>';
238
+
239
+ $googleSet = false;
240
+ if ( $this->field['google'] === true ) {
241
+
242
+ // Set a flag so we know to set a header style or not
243
+ echo '<input type="hidden" class="redux-typography-google ' . $this->field['class'] . '" id="' . $this->field['id'] . '-google" name="' . $this->field['name'] . $this->field['name_suffix'] . '[google]' . '" type="text" value="' . $this->field['google'] . '" data-id="' . $this->field['id'] . '" />';
244
+ $googleSet = true;
245
+ }
246
+ }
247
+
248
+ /* Backup Font */
249
+ if ( $this->field['font-family'] === true && $this->field['google'] === true ) {
250
+
251
+ if ( false == $googleSet ) {
252
+ // Set a flag so we know to set a header style or not
253
+ echo '<input type="hidden" class="redux-typography-google ' . $this->field['class'] . '" id="' . $this->field['id'] . '-google" name="' . $this->field['name'] . $this->field['name_suffix'] . '[google]' . '" type="text" value="' . $this->field['google'] . '" data-id="' . $this->field['id'] . '" />';
254
+ }
255
+
256
+ if ( $this->field['font-backup'] === true ) {
257
+ echo '<div class="select_wrapper typography-family-backup" style="width: 220px; margin-right: 5px;">';
258
+ echo '<label>' . __( 'Backup Font Family', 'redux-framework' ) . '</label>';
259
+ echo '<select data-placeholder="' . __( 'Backup Font Family', 'redux-framework' ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[font-backup]' . '" class="redux-typography redux-typography-family-backup ' . $this->field['class'] . '" id="' . $this->field['id'] . '-family-backup" data-id="' . $this->field['id'] . '" data-value="' . $this->value['font-backup'] . '">';
260
+ echo '<option data-google="false" data-details="" value=""></option>';
261
+
262
+ foreach ( $this->field['fonts'] as $i => $family ) {
263
+ echo '<option data-google="true" value="' . $i . '"' . selected( $this->value['font-backup'], $i, false ) . '>' . $family . '</option>';
264
+ }
265
+
266
+ echo '</select></div>';
267
+ }
268
+ }
269
+
270
+ /* Font Style/Weight */
271
+ if ( $this->field['font-style'] === true || $this->field['font-weight'] === true ) {
272
+
273
+ echo '<div class="select_wrapper typography-style" original-title="' . __( 'Font style', 'redux-framework' ) . '">';
274
+ echo '<label>' . __( 'Font Weight &amp; Style', 'redux-framework' ) . '</label>';
275
+
276
+ $style = $this->value['font-weight'] . $this->value['font-style'];
277
+
278
+ echo '<input type="hidden" class="typography-font-weight" name="' . $this->field['name'] . $this->field['name_suffix'] . '[font-weight]' . '" value="' . $this->value['font-weight'] . '" data-id="' . $this->field['id'] . '" /> ';
279
+ echo '<input type="hidden" class="typography-font-style" name="' . $this->field['name'] . $this->field['name_suffix'] . '[font-style]' . '" value="' . $this->value['font-style'] . '" data-id="' . $this->field['id'] . '" /> ';
280
+ $multi = ( isset( $this->field['multi']['weight'] ) && $this->field['multi']['weight'] ) ? ' multiple="multiple"' : "";
281
+ echo '<select' . $multi . ' data-placeholder="' . __( 'Style', 'redux-framework' ) . '" class="redux-typography redux-typography-style select ' . $this->field['class'] . '" original-title="' . __( 'Font style', 'redux-framework' ) . '" id="' . $this->field['id'] . '_style" data-id="' . $this->field['id'] . '" data-value="' . $style . '">';
282
+
283
+ if ( empty( $this->value['subsets'] ) || empty( $this->value['font-weight'] ) ) {
284
+ echo '<option value=""></option>';
285
+ }
286
+
287
+ $nonGStyles = array(
288
+ '200' => 'Lighter',
289
+ '400' => 'Normal',
290
+ '700' => 'Bold',
291
+ '900' => 'Bolder'
292
+ );
293
+
294
+ if ( isset( $gfonts[ $this->value['font-family'] ] ) ) {
295
+ foreach ( $gfonts[ $this->value['font-family'] ]['variants'] as $v ) {
296
+ echo '<option value="' . $v['id'] . '" ' . selected( $this->value['subsets'], $v['id'], false ) . '>' . $v['name'] . '</option>';
297
+ }
298
+ } else {
299
+ if ( ! isset( $this->value['font-weight'] ) && isset( $this->value['subsets'] ) ) {
300
+ $this->value['font-weight'] = $this->value['subsets'];
301
+ }
302
+
303
+ foreach ( $nonGStyles as $i => $style ) {
304
+ if ( ! isset( $this->value['font-weight'] ) ) {
305
+ $this->value['font-weight'] = false;
306
+ }
307
+
308
+ if ( ! isset( $this->value['subsets'] ) ) {
309
+ $this->value['subsets'] = false;
310
+ }
311
+
312
+ echo '<option value="' . $i . '" ' . selected( $this->value['font-weight'], $i, false ) . '>' . $style . '</option>';
313
+ }
314
+ }
315
+
316
+ echo '</select></div>';
317
+ }
318
+
319
+ /* Font Script */
320
+ if ( $this->field['font-family'] == true && $this->field['subsets'] == true && $this->field['google'] == true ) {
321
+ echo '<div class="select_wrapper typography-script tooltip" original-title="' . __( 'Font subsets', 'redux-framework' ) . '">';
322
+ echo '<input type="hidden" class="typography-subsets" name="' . $this->field['name'] . $this->field['name_suffix'] . '[subsets]' . '" value="' . $this->value['subsets'] . '" data-id="' . $this->field['id'] . '" /> ';
323
+ echo '<label>' . __( 'Font Subsets', 'redux-framework' ) . '</label>';
324
+ $multi = ( isset( $this->field['multi']['subset'] ) && $this->field['multi']['subset'] ) ? ' multiple="multiple"' : "";
325
+ echo '<select'.$multi.' data-placeholder="' . __( 'Subsets', 'redux-framework' ) . '" class="redux-typography redux-typography-subsets ' . $this->field['class'] . '" original-title="' . __( 'Font script', 'redux-framework' ) . '" id="' . $this->field['id'] . '-subsets" data-value="' . $this->value['subsets'] . '" data-id="' . $this->field['id'] . '" >';
326
+
327
+ if ( empty( $this->value['subsets'] ) ) {
328
+ echo '<option value=""></option>';
329
+ }
330
+
331
+ if ( isset( $gfonts[ $this->value['font-family'] ] ) ) {
332
+ foreach ( $gfonts[ $this->value['font-family'] ]['subsets'] as $v ) {
333
+ echo '<option value="' . $v['id'] . '" ' . selected( $this->value['subsets'], $v['id'], false ) . '>' . $v['name'] . '</option>';
334
+ }
335
+ }
336
+
337
+ echo '</select></div>';
338
+ }
339
+
340
+ /* Font Align */
341
+ if ( $this->field['text-align'] === true ) {
342
+ echo '<div class="select_wrapper typography-align tooltip" original-title="' . __( 'Text Align', 'redux-framework' ) . '">';
343
+ echo '<label>' . __( 'Text Align', 'redux-framework' ) . '</label>';
344
+ echo '<select data-placeholder="' . __( 'Text Align', 'redux-framework' ) . '" class="redux-typography redux-typography-align ' . $this->field['class'] . '" original-title="' . __( 'Text Align', 'redux-framework' ) . '" id="' . $this->field['id'] . '-align" name="' . $this->field['name'] . $this->field['name_suffix'] . '[text-align]' . '" data-value="' . $this->value['text-align'] . '" data-id="' . $this->field['id'] . '" >';
345
+ echo '<option value=""></option>';
346
+
347
+ $align = array(
348
+ 'inherit',
349
+ 'left',
350
+ 'right',
351
+ 'center',
352
+ 'justify',
353
+ 'initial'
354
+ );
355
+
356
+ foreach ( $align as $v ) {
357
+ echo '<option value="' . $v . '" ' . selected( $this->value['text-align'], $v, false ) . '>' . ucfirst( $v ) . '</option>';
358
+ }
359
+
360
+ echo '</select></div>';
361
+ }
362
+
363
+ /* Text Transform */
364
+ if ( $this->field['text-transform'] === true ) {
365
+ echo '<div class="select_wrapper typography-transform tooltip" original-title="' . __( 'Text Transform', 'redux-framework' ) . '">';
366
+ echo '<label>' . __( 'Text Transform', 'redux-framework' ) . '</label>';
367
+ echo '<select data-placeholder="' . __( 'Text Transform', 'redux-framework' ) . '" class="redux-typography redux-typography-transform ' . $this->field['class'] . '" original-title="' . __( 'Text Transform', 'redux-framework' ) . '" id="' . $this->field['id'] . '-transform" name="' . $this->field['name'] . $this->field['name_suffix'] . '[text-transform]' . '" data-value="' . $this->value['text-transform'] . '" data-id="' . $this->field['id'] . '" >';
368
+ echo '<option value=""></option>';
369
+
370
+ $values = array(
371
+ 'none',
372
+ 'capitalize',
373
+ 'uppercase',
374
+ 'lowercase',
375
+ 'initial',
376
+ 'inherit'
377
+ );
378
+
379
+ foreach ( $values as $v ) {
380
+ echo '<option value="' . $v . '" ' . selected( $this->value['text-transform'], $v, false ) . '>' . ucfirst( $v ) . '</option>';
381
+ }
382
+
383
+ echo '</select></div>';
384
+ }
385
+
386
+ /* Font Variant */
387
+ if ( $this->field['font-variant'] === true ) {
388
+ echo '<div class="select_wrapper typography-font-variant tooltip" original-title="' . __( 'Font Variant', 'redux-framework' ) . '">';
389
+ echo '<label>' . __( 'Font Variant', 'redux-framework' ) . '</label>';
390
+ echo '<select data-placeholder="' . __( 'Font Variant', 'redux-framework' ) . '" class="redux-typography redux-typography-font-variant ' . $this->field['class'] . '" original-title="' . __( 'Font Variant', 'redux-framework' ) . '" id="' . $this->field['id'] . '-font-variant" name="' . $this->field['name'] . $this->field['name_suffix'] . '[font-variant]' . '" data-value="' . $this->value['font-variant'] . '" data-id="' . $this->field['id'] . '" >';
391
+ echo '<option value=""></option>';
392
+
393
+ $values = array(
394
+ 'inherit',
395
+ 'normal',
396
+ 'small-caps'
397
+ );
398
+
399
+ foreach ( $values as $v ) {
400
+ echo '<option value="' . $v . '" ' . selected( $this->value['font-variant'], $v, false ) . '>' . ucfirst( $v ) . '</option>';
401
+ }
402
+
403
+ echo '</select></div>';
404
+ }
405
+
406
+ /* Text Decoration */
407
+ if ( $this->field['text-decoration'] === true ) {
408
+ echo '<div class="select_wrapper typography-decoration tooltip" original-title="' . __( 'Text Decoration', 'redux-framework' ) . '">';
409
+ echo '<label>' . __( 'Text Decoration', 'redux-framework' ) . '</label>';
410
+ echo '<select data-placeholder="' . __( 'Text Decoration', 'redux-framework' ) . '" class="redux-typography redux-typography-decoration ' . $this->field['class'] . '" original-title="' . __( 'Text Decoration', 'redux-framework' ) . '" id="' . $this->field['id'] . '-decoration" name="' . $this->field['name'] . $this->field['name_suffix'] . '[text-decoration]' . '" data-value="' . $this->value['text-decoration'] . '" data-id="' . $this->field['id'] . '" >';
411
+ echo '<option value=""></option>';
412
+
413
+ $values = array(
414
+ 'none',
415
+ 'inherit',
416
+ 'underline',
417
+ 'overline',
418
+ 'line-through',
419
+ 'blink'
420
+ );
421
+
422
+ foreach ( $values as $v ) {
423
+ echo '<option value="' . $v . '" ' . selected( $this->value['text-decoration'], $v, false ) . '>' . ucfirst( $v ) . '</option>';
424
+ }
425
+
426
+ echo '</select></div>';
427
+ }
428
+
429
+ /* Font Size */
430
+ if ( $this->field['font-size'] === true ) {
431
+ echo '<div class="input_wrapper font-size redux-container-typography">';
432
+ echo '<label>' . __( 'Font Size', 'redux-framework' ) . '</label>';
433
+ echo '<div class="input-append"><input type="text" class="span2 redux-typography redux-typography-size mini typography-input ' . $this->field['class'] . '" title="' . __( 'Font Size', 'redux-framework' ) . '" placeholder="' . __( 'Size', 'redux-framework' ) . '" id="' . $this->field['id'] . '-size" name="' . $this->field['name'] . $this->field['name_suffix'] . '[font-size]' . '" value="' . str_replace( $unit, '', $this->value['font-size'] ) . '" data-value="' . str_replace( $unit, '', $this->value['font-size'] ) . '"><span class="add-on">' . $unit . '</span></div>';
434
+ echo '<input type="hidden" class="typography-font-size" name="' . $this->field['name'] . $this->field['name_suffix'] . '[font-size]' . '" value="' . $this->value['font-size'] . '" data-id="' . $this->field['id'] . '" />';
435
+ echo '</div>';
436
+ }
437
+
438
+ /* Line Height */
439
+ if ( $this->field['line-height'] === true ) {
440
+ echo '<div class="input_wrapper line-height redux-container-typography">';
441
+ echo '<label>' . __( 'Line Height', 'redux-framework' ) . '</label>';
442
+ echo '<div class="input-append"><input type="text" class="span2 redux-typography redux-typography-height mini typography-input ' . $this->field['class'] . '" title="' . __( 'Line Height', 'redux-framework' ) . '" placeholder="' . __( 'Height', 'redux-framework' ) . '" id="' . $this->field['id'] . '-height" value="' . str_replace( $unit, '', $this->value['line-height'] ) . '" data-value="' . str_replace( $unit, '', $this->value['line-height'] ) . '"><span class="add-on">' . $unit . '</span></div>';
443
+ echo '<input type="hidden" class="typography-line-height" name="' . $this->field['name'] . $this->field['name_suffix'] . '[line-height]' . '" value="' . $this->value['line-height'] . '" data-id="' . $this->field['id'] . '" />';
444
+ echo '</div>';
445
+ }
446
+
447
+ /* Word Spacing */
448
+ if ( $this->field['word-spacing'] === true ) {
449
+ echo '<div class="input_wrapper word-spacing redux-container-typography">';
450
+ echo '<label>' . __( 'Word Spacing', 'redux-framework' ) . '</label>';
451
+ echo '<div class="input-append"><input type="text" class="span2 redux-typography redux-typography-word mini typography-input ' . $this->field['class'] . '" title="' . __( 'Word Spacing', 'redux-framework' ) . '" placeholder="' . __( 'Word Spacing', 'redux-framework' ) . '" id="' . $this->field['id'] . '-word" value="' . str_replace( $unit, '', $this->value['word-spacing'] ) . '" data-value="' . str_replace( $unit, '', $this->value['word-spacing'] ) . '"><span class="add-on">' . $unit . '</span></div>';
452
+ echo '<input type="hidden" class="typography-word-spacing" name="' . $this->field['name'] . $this->field['name_suffix'] . '[word-spacing]' . '" value="' . $this->value['word-spacing'] . '" data-id="' . $this->field['id'] . '" />';
453
+ echo '</div>';
454
+ }
455
+
456
+ /* Letter Spacing */
457
+ if ( $this->field['letter-spacing'] === true ) {
458
+ echo '<div class="input_wrapper letter-spacing redux-container-typography">';
459
+ echo '<label>' . __( 'Letter Spacing', 'redux-framework' ) . '</label>';
460
+ echo '<div class="input-append"><input type="text" class="span2 redux-typography redux-typography-letter mini typography-input ' . $this->field['class'] . '" title="' . __( 'Letter Spacing', 'redux-framework' ) . '" placeholder="' . __( 'Letter Spacing', 'redux-framework' ) . '" id="' . $this->field['id'] . '-letter" value="' . str_replace( $unit, '', $this->value['letter-spacing'] ) . '" data-value="' . str_replace( $unit, '', $this->value['letter-spacing'] ) . '"><span class="add-on">' . $unit . '</span></div>';
461
+ echo '<input type="hidden" class="typography-letter-spacing" name="' . $this->field['name'] . $this->field['name_suffix'] . '[letter-spacing]' . '" value="' . $this->value['letter-spacing'] . '" data-id="' . $this->field['id'] . '" />';
462
+ echo '</div>';
463
+ }
464
+
465
+ echo '<div class="clearfix"></div>';
466
+
467
+ /* Font Color */
468
+ if ( $this->field['color'] === true ) {
469
+ $default = "";
470
+
471
+ if ( empty( $this->field['default']['color'] ) && ! empty( $this->field['color'] ) ) {
472
+ $default = $this->value['color'];
473
+ } else if ( ! empty( $this->field['default']['color'] ) ) {
474
+ $default = $this->field['default']['color'];
475
+ }
476
+
477
+ echo '<div class="picker-wrapper">';
478
+ echo '<label>' . __( 'Font Color', 'redux-framework' ) . '</label>';
479
+ echo '<div id="' . $this->field['id'] . '_color_picker" class="colorSelector typography-color"><div style="background-color: ' . $this->value['color'] . '"></div></div>';
480
+ echo '<input data-default-color="' . $default . '" class="redux-color redux-typography-color ' . $this->field['class'] . '" original-title="' . __( 'Font color', 'redux-framework' ) . '" id="' . $this->field['id'] . '-color" name="' . $this->field['name'] . $this->field['name_suffix'] . '[color]' . '" type="text" value="' . $this->value['color'] . '" data-id="' . $this->field['id'] . '" />';
481
+ echo '</div>';
482
+ }
483
+
484
+ echo '<div class="clearfix"></div>';
485
+
486
+ /* Font Preview */
487
+ if ( ! isset( $this->field['preview'] ) || $this->field['preview'] !== false ) {
488
+ if ( isset( $this->field['preview']['text'] ) ) {
489
+ $g_text = $this->field['preview']['text'];
490
+ } else {
491
+ $g_text = '1 2 3 4 5 6 7 8 9 0 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z';
492
+ }
493
+
494
+ $style = '';
495
+ if ( isset( $this->field['preview']['always_display'] ) ) {
496
+ if ( true === filter_var( $this->field['preview']['always_display'], FILTER_VALIDATE_BOOLEAN ) ) {
497
+ if ( $isGoogleFont == true ) {
498
+ $this->parent->typography_preview[ $fontFamily[0] ] = array(
499
+ 'font-style' => array( $this->value['font-weight'] . $this->value['font-style'] ),
500
+ 'subset' => array( $this->value['subsets'] )
501
+ );
502
+
503
+ $protocol = ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ) ? "https:" : "http:";
504
+
505
+ wp_deregister_style( 'redux-typography-preview' );
506
+ wp_dequeue_style( 'redux-typography-preview' );
507
+
508
+ wp_register_style( 'redux-typography-preview', $protocol . $this->makeGoogleWebfontLink( $this->parent->typography_preview ), '', time() );
509
+ wp_enqueue_style( 'redux-typography-preview' );
510
+ }
511
+
512
+ $style = 'display: block; font-family: ' . $this->value['font-family'] . '; font-weight: ' . $this->value['font-weight'] . ';';
513
+ }
514
+ }
515
+
516
+ if ( isset( $this->field['preview']['font-size'] ) ) {
517
+ $style .= 'font-size: ' . $this->field['preview']['font-size'] . ';';
518
+ $inUse = '1';
519
+ } else {
520
+ //$g_size = '';
521
+ $inUse = '0';
522
+ }
523
+
524
+ echo '<p data-preview-size="' . $inUse . '" class="clear ' . $this->field['id'] . '_previewer typography-preview" ' . 'style="' . $style . '">' . $g_text . '</p>';
525
+ echo '</div>'; // end typography container
526
+ }
527
+ } //function
528
+
529
+ /**
530
+ * Enqueue Function.
531
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
532
+ *
533
+ * @since ReduxFramework 1.0.0
534
+ */
535
+ function enqueue() {
536
+ if (!wp_style_is('select2-css')) {
537
+ wp_enqueue_style( 'select2-css' );
538
+ }
539
+
540
+ if (!wp_style_is('wp-color-picker')) {
541
+ wp_enqueue_style( 'wp-color-picker' );
542
+ }
543
+
544
+ if (!wp_script_is ( 'redux-field-typography-js' )) {
545
+ wp_enqueue_script(
546
+ 'redux-field-typography-js',
547
+ ReduxFramework::$_url . 'inc/fields/typography/field_typography' . Redux_Functions::isMin() . '.js',
548
+ array( 'jquery', 'wp-color-picker', 'select2-js', 'redux-js' ),
549
+ time(),
550
+ true
551
+ );
552
+ }
553
+
554
+ wp_localize_script(
555
+ 'redux-field-typography-js',
556
+ 'redux_ajax_script',
557
+ array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) )
558
+ );
559
+
560
+ if ($this->parent->args['dev_mode']) {
561
+ if (!wp_style_is('redux-color-picker-css')) {
562
+ wp_enqueue_style( 'redux-color-picker-css' );
563
+ }
564
+
565
+ if (!wp_style_is('redux-field-typography-css')) {
566
+ wp_enqueue_style(
567
+ 'redux-field-typography-css',
568
+ ReduxFramework::$_url . 'inc/fields/typography/field_typography.css',
569
+ array(),
570
+ time(),
571
+ 'all'
572
+ );
573
+ }
574
+ }
575
+ } //function
576
+
577
+ /**
578
+ * makeGoogleWebfontLink Function.
579
+ * Creates the google fonts link.
580
+ *
581
+ * @since ReduxFramework 3.0.0
582
+ */
583
+ function makeGoogleWebfontLink( $fonts ) {
584
+ $link = "";
585
+ $subsets = array();
586
+
587
+ foreach ( $fonts as $family => $font ) {
588
+ if ( ! empty( $link ) ) {
589
+ $link .= "%7C"; // Append a new font to the string
590
+ }
591
+ $link .= $family;
592
+
593
+ if ( ! empty( $font['font-style'] ) || ! empty( $font['all-styles'] ) ) {
594
+ $link .= ':';
595
+ if ( ! empty( $font['all-styles'] ) ) {
596
+ $link .= implode( ',', $font['all-styles'] );
597
+ } else if ( ! empty( $font['font-style'] ) ) {
598
+ $link .= implode( ',', $font['font-style'] );
599
+ }
600
+ }
601
+
602
+ if ( ! empty( $font['subset'] ) ) {
603
+ foreach ( $font['subset'] as $subset ) {
604
+ if ( ! in_array( $subset, $subsets ) ) {
605
+ array_push( $subsets, $subset );
606
+ }
607
+ }
608
+ }
609
+ }
610
+
611
+ if ( ! empty( $subsets ) ) {
612
+ $link .= "&amp;subset=" . implode( ',', $subsets );
613
+ }
614
+
615
+
616
+ return '//fonts.googleapis.com/css?family=' . str_replace( '|', '%7C', $link );
617
+ }
618
+
619
+ /**
620
+ * makeGoogleWebfontString Function.
621
+ * Creates the google fonts link.
622
+ *
623
+ * @since ReduxFramework 3.1.8
624
+ */
625
+ function makeGoogleWebfontString( $fonts ) {
626
+ $link = "";
627
+ $subsets = array();
628
+
629
+ foreach ( $fonts as $family => $font ) {
630
+ if ( ! empty( $link ) ) {
631
+ $link .= "', '"; // Append a new font to the string
632
+ }
633
+ $link .= $family;
634
+
635
+ if ( ! empty( $font['font-style'] ) || ! empty( $font['all-styles'] ) ) {
636
+ $link .= ':';
637
+ if ( ! empty( $font['all-styles'] ) ) {
638
+ $link .= implode( ',', $font['all-styles'] );
639
+ } else if ( ! empty( $font['font-style'] ) ) {
640
+ $link .= implode( ',', $font['font-style'] );
641
+ }
642
+ }
643
+
644
+ if ( ! empty( $font['subset'] ) ) {
645
+ foreach ( $font['subset'] as $subset ) {
646
+ if ( ! in_array( $subset, $subsets ) ) {
647
+ array_push( $subsets, $subset );
648
+ }
649
+ }
650
+ }
651
+ }
652
+
653
+ if ( ! empty( $subsets ) ) {
654
+ $link .= "&amp;subset=" . implode( ',', $subsets );
655
+ }
656
+
657
+ return "'" . $link . "'";
658
+ }
659
+
660
+ function output() {
661
+ $font = $this->value;
662
+
663
+ // Shim out old arg to new
664
+ if ( isset( $this->field['all_styles'] ) && ! empty( $this->field['all_styles'] ) ) {
665
+ $this->field['all-styles'] = $this->field['all_styles'];
666
+ unset ( $this->field['all_styles'] );
667
+ }
668
+
669
+ // Check for font-backup. If it's set, stick it on a variabhle for
670
+ // later use.
671
+ if ( ! empty( $font['font-family'] ) && ! empty( $font['font-backup'] ) ) {
672
+ $font['font-family'] = str_replace( ', ' . $font['font-backup'], '', $font['font-family'] );
673
+ $fontBackup = ',' . $font['font-backup'];
674
+ }
675
+
676
+ // if (strpos($font['font-family'], ' ')) {
677
+ // $font['font-family'] = '"' . $font['font-family'] . '"';
678
+ // }
679
+
680
+ $style = '';
681
+
682
+ $fontValueSet = false;
683
+
684
+ if ( ! empty( $font ) ) {
685
+ foreach ( $font as $key => $value ) {
686
+ if ( ! empty( $value ) && in_array( $key, array( 'font-family', 'font-weight' ) ) ) {
687
+ $fontValueSet = true;
688
+ }
689
+ }
690
+ }
691
+
692
+ if ( ! empty( $font ) ) {
693
+ foreach ( $font as $key => $value ) {
694
+ if ( $key == 'font-options' ) {
695
+ continue;
696
+ }
697
+ // Check for font-family key
698
+ if ( 'font-family' == $key ) {
699
+
700
+ // Enclose font family in quotes if spaces are in the
701
+ // name. This is necessary because if there are numerics
702
+ // in the font name, they will not render properly.
703
+ // Google should know better.
704
+ if (strpos($value, ' ') && !strpos($value, ',')){
705
+ $value = '"' . $value . '"';
706
+ }
707
+
708
+ // Ensure fontBackup isn't empty (we already option
709
+ // checked this earlier. No need to do it again.
710
+ if ( ! empty( $fontBackup ) ) {
711
+
712
+ // Apply the backup font to the font-family element
713
+ // via the saved variable. We do this here so it
714
+ // doesn't get appended to the Google stuff below.
715
+ $value .= $fontBackup;
716
+ }
717
+ }
718
+
719
+ if ( empty( $value ) && in_array( $key, array(
720
+ 'font-weight',
721
+ 'font-style'
722
+ ) ) && $fontValueSet == true
723
+ ) {
724
+ $value = "normal";
725
+ }
726
+
727
+ if ($key == 'font-weight' && $this->field['font-weight'] == false) {
728
+ continue;
729
+ }
730
+
731
+ if ($key == 'font-style' && $this->field['font-style'] == false) {
732
+ continue;
733
+ }
734
+
735
+
736
+ if ( $key == "google" || $key == "subsets" || $key == "font-backup" || empty( $value ) ) {
737
+ continue;
738
+ }
739
+ $style .= $key . ':' . $value . ';';
740
+ }
741
+ if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
742
+ $style .= 'opacity: 1;visibility: visible;-webkit-transition: opacity 0.24s ease-in-out;-moz-transition: opacity 0.24s ease-in-out;transition: opacity 0.24s ease-in-out;';
743
+ }
744
+ }
745
+
746
+ if ( ! empty( $style ) ) {
747
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
748
+ $keys = implode( ",", $this->field['output'] );
749
+ $this->parent->outputCSS .= $keys . "{" . $style . '}';
750
+ if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
751
+ $key_string = "";
752
+ $key_string_ie = "";
753
+ foreach ( $this->field['output'] as $value ) {
754
+ $key_string .= ".wf-loading " . $value . ',';
755
+ $key_string_ie .= ".ie.wf-loading " . $value . ',';
756
+ }
757
+ $this->parent->outputCSS .= $key_string . "{opacity: 0;}";
758
+ $this->parent->outputCSS .= $key_string_ie . "{visibility: hidden;}";
759
+ }
760
+ }
761
+
762
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
763
+ $keys = implode( ",", $this->field['compiler'] );
764
+ $this->parent->compilerCSS .= $keys . "{" . $style . '}';
765
+ if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
766
+ $key_string = "";
767
+ $key_string_ie = "";
768
+ foreach ( $this->field['compiler'] as $value ) {
769
+ $key_string .= ".wf-loading " . $value . ',';
770
+ $key_string_ie .= ".ie.wf-loading " . $value . ',';
771
+ }
772
+ $this->parent->compilerCSS .= $key_string . "{opacity: 0;}";
773
+ $this->parent->compilerCSS .= $key_string_ie . "{visibility: hidden;}";
774
+ }
775
+ }
776
+ }
777
+
778
+ // Google only stuff!
779
+ if ( ! empty( $font['font-family'] ) && ! empty( $this->field['google'] ) && filter_var( $this->field['google'], FILTER_VALIDATE_BOOLEAN ) ) {
780
+
781
+ // Added standard font matching check to avoid output to Google fonts call - kp
782
+ // If no custom font array was supplied, the load it with default
783
+ // standard fonts.
784
+ if ( empty( $this->field['fonts'] ) ) {
785
+ $this->field['fonts'] = $this->std_fonts;
786
+ }
787
+
788
+ // Ensure the fonts array is NOT empty
789
+ if ( ! empty( $this->field['fonts'] ) ) {
790
+
791
+ //Make the font keys in the array lowercase, for case-insensitive matching
792
+ $lcFonts = array_change_key_case( $this->field['fonts'] );
793
+
794
+ // Rebuild font array with all keys stripped of spaces
795
+ $arr = array();
796
+ foreach ( $lcFonts as $key => $value ) {
797
+ $key = str_replace( ', ', ',', $key );
798
+ $arr[ $key ] = $value;
799
+ }
800
+
801
+ $lcFonts = array_change_key_case( $this->field['custom_fonts'] );
802
+ foreach ( $lcFonts as $group => $fontArr ) {
803
+ foreach ( $fontArr as $key => $value ) {
804
+ $arr[ strtolower( $key ) ] = $key;
805
+ }
806
+ }
807
+
808
+ $lcFonts = $arr;
809
+
810
+ unset( $arr );
811
+
812
+ // lowercase chosen font for matching purposes
813
+ $lcFont = strtolower( $font['font-family'] );
814
+
815
+ // Remove spaces after commas in chosen font for mathcing purposes.
816
+ $lcFont = str_replace( ', ', ',', $lcFont );
817
+
818
+ // If the lower cased passed font-family is NOT found in the standard font array
819
+ // Then it's a Google font, so process it for output.
820
+ if ( ! array_key_exists( $lcFont, $lcFonts ) ) {
821
+ $family = $font['font-family'];
822
+
823
+ // Strip out spaces in font names and replace with with plus signs
824
+ // TODO?: This method doesn't respect spaces after commas, hence the reason
825
+ // for the std_font array keys having no spaces after commas. This could be
826
+ // fixed with RegEx in the future.
827
+ $font['font-family'] = str_replace( ' ', '+', $font['font-family'] );
828
+
829
+ // Push data to parent typography variable.
830
+ if ( empty( $this->parent->typography[ $font['font-family'] ] ) ) {
831
+ $this->parent->typography[ $font['font-family'] ] = array();
832
+ }
833
+
834
+ if ( isset( $this->field['all-styles'] ) ) {
835
+ if ( ! isset( $font['font-options'] ) || empty( $font['font-options'] ) ) {
836
+ $this->getGoogleArray();
837
+
838
+ if ( isset( $this->parent->googleArray ) && ! empty( $this->parent->googleArray ) && isset( $this->parent->googleArray[ $family ] ) ) {
839
+ $font['font-options'] = $this->parent->googleArray[ $family ];
840
+ }
841
+ } else {
842
+ $font['font-options'] = json_decode( $font['font-options'], true );
843
+ }
844
+ //print_r($font['font-options']);
845
+ //exit();
846
+ }
847
+
848
+ if ( isset( $font['font-options'] ) && ! empty( $font['font-options'] ) && isset( $this->field['all-styles'] ) && filter_var( $this->field['all-styles'], FILTER_VALIDATE_BOOLEAN ) ) {
849
+ if ( isset( $font['font-options'] ) && ! empty( $font['font-options']['variants'] ) ) {
850
+ if ( ! isset( $this->parent->typography[ $font['font-family'] ]['all-styles'] ) || empty( $this->parent->typography[ $font['font-family'] ]['all-styles'] ) ) {
851
+ $this->parent->typography[ $font['font-family'] ]['all-styles'] = array();
852
+ foreach ( $font['font-options']['variants'] as $variant ) {
853
+ $this->parent->typography[ $font['font-family'] ]['all-styles'][] = $variant['id'];
854
+ }
855
+ }
856
+ }
857
+ }
858
+
859
+ if ( ! empty( $font['font-weight'] ) ) {
860
+ if ( empty( $this->parent->typography[ $font['font-family'] ]['font-weight'] ) || ! in_array( $font['font-weight'], $this->parent->typography[ $font['font-family'] ]['font-weight'] ) ) {
861
+ $style = $font['font-weight'];
862
+ }
863
+
864
+ if ( ! empty( $font['font-style'] ) ) {
865
+ $style .= $font['font-style'];
866
+ }
867
+
868
+ if ( empty( $this->parent->typography[ $font['font-family'] ]['font-style'] ) || ! in_array( $style, $this->parent->typography[ $font['font-family'] ]['font-style'] ) ) {
869
+ $this->parent->typography[ $font['font-family'] ]['font-style'][] = $style;
870
+ }
871
+ }
872
+
873
+ if ( ! empty( $font['subsets'] ) ) {
874
+ if ( empty( $this->parent->typography[ $font['font-family'] ]['subset'] ) || ! in_array( $font['subsets'], $this->parent->typography[ $font['font-family'] ]['subset'] ) ) {
875
+ $this->parent->typography[ $font['font-family'] ]['subset'][] = $font['subsets'];
876
+ }
877
+ }
878
+ } // !array_key_exists
879
+ } //!empty fonts array
880
+ } // Typography not set
881
+ }
882
+
883
+ private function localizeStdFonts() {
884
+ if ( false == $this->user_fonts ) {
885
+ if ( isset( $this->parent->fonts['std'] ) && ! empty( $this->parent->fonts['std'] ) ) {
886
+ return;
887
+ }
888
+
889
+ $this->parent->font_groups['std'] = array(
890
+ 'text' => __( 'Standard Fonts', 'redux-framework' ),
891
+ 'children' => array(),
892
+ );
893
+
894
+ foreach ( $this->field['fonts'] as $font => $extra ) {
895
+ $this->parent->font_groups['std']['children'][] = array(
896
+ 'id' => $font,
897
+ 'text' => $font,
898
+ 'data-google' => 'false',
899
+ );
900
+ }
901
+ }
902
+
903
+ if ( $this->field['custom_fonts'] !== false ) {
904
+ $this->field['custom_fonts'] = apply_filters( "redux/{$this->parent->args['opt_name']}/field/typography/custom_fonts", array() );
905
+
906
+ if ( ! empty( $this->field['custom_fonts'] ) ) {
907
+ foreach ( $this->field['custom_fonts'] as $group => $fonts ) {
908
+ $this->parent->font_groups['customfonts'] = array(
909
+ 'text' => $group,
910
+ 'children' => array(),
911
+ );
912
+
913
+ foreach ( $fonts as $family => $v ) {
914
+ $this->parent->font_groups['customfonts']['children'][] = array(
915
+ 'id' => $family,
916
+ 'text' => $family,
917
+ 'data-google' => 'false',
918
+ );
919
+ }
920
+ }
921
+ }
922
+ }
923
+ }
924
+
925
+ /**
926
+ * Construct the google array from the stored JSON/HTML
927
+
928
+ */
929
+ function getGoogleArray() {
930
+
931
+ if ( ( isset( $this->parent->fonts['google'] ) && ! empty( $this->parent->fonts['google'] ) ) || isset( $this->parent->fonts['google'] ) && $this->parent->fonts['google'] == false ) {
932
+ return;
933
+ }
934
+
935
+ $gFile = dirname( __FILE__ ) . '/googlefonts.php';
936
+
937
+ // Weekly update
938
+ if ( isset( $this->parent->args['google_update_weekly'] ) && $this->parent->args['google_update_weekly'] && ! empty( $this->parent->args['google_api_key'] ) ) {
939
+
940
+ if ( file_exists( $gFile ) ) {
941
+ // Keep the fonts updated weekly
942
+ $weekback = strtotime( date( 'jS F Y', time() + ( 60 * 60 * 24 * - 7 ) ) );
943
+ $last_updated = filemtime( $gFile );
944
+ if ( $last_updated < $weekback ) {
945
+ unlink( $gFile );
946
+ }
947
+ }
948
+ }
949
+
950
+ if ( ! file_exists( $gFile ) ) {
951
+
952
+ $result = @wp_remote_get( apply_filters( 'redux-google-fonts-api-url', 'https://www.googleapis.com/webfonts/v1/webfonts?key=' ) . $this->parent->args['google_api_key'], array( 'sslverify' => false ) );
953
+
954
+ if ( ! is_wp_error( $result ) && $result['response']['code'] == 200 ) {
955
+ $result = json_decode( $result['body'] );
956
+ foreach ( $result->items as $font ) {
957
+ $this->parent->googleArray[ $font->family ] = array(
958
+ 'variants' => $this->getVariants( $font->variants ),
959
+ 'subsets' => $this->getSubsets( $font->subsets )
960
+ );
961
+ }
962
+
963
+ if ( ! empty( $this->parent->googleArray ) ) {
964
+ $this->parent->filesystem->execute( 'put_contents', $gFile, array( 'content' => "<?php return json_decode( '" . json_encode( $this->parent->googleArray ) . "', true );" ) );
965
+ }
966
+ }
967
+ }
968
+
969
+ if ( ! file_exists( $gFile ) ) {
970
+ $this->parent->fonts['google'] = false;
971
+
972
+ return;
973
+ }
974
+
975
+ if ( ! isset( $this->parent->fonts['google'] ) || empty( $this->parent->fonts['google'] ) ) {
976
+
977
+ $fonts = include $gFile;
978
+
979
+ if ( $fonts === true ) {
980
+ $this->parent->fonts['google'] = false;
981
+
982
+ return;
983
+ }
984
+
985
+ if ( isset( $fonts ) && ! empty( $fonts ) && is_array( $fonts ) && $fonts != false ) {
986
+ $this->parent->fonts['google'] = $fonts;
987
+ $this->parent->googleArray = $fonts;
988
+
989
+ // optgroup
990
+ $this->parent->font_groups['google'] = array(
991
+ 'text' => __( 'Google Webfonts', 'redux-framework' ),
992
+ 'children' => array(),
993
+ );
994
+
995
+ // options
996
+ foreach ( $this->parent->fonts['google'] as $font => $extra ) {
997
+ $this->parent->font_groups['google']['children'][] = array(
998
+ 'id' => $font,
999
+ 'text' => $font,
1000
+ 'data-google' => 'true'
1001
+ );
1002
+ }
1003
+ }
1004
+ }
1005
+ }
1006
+
1007
+ /**
1008
+ * getSubsets Function.
1009
+ * Clean up the Google Webfonts subsets to be human readable
1010
+ *
1011
+ * @since ReduxFramework 0.2.0
1012
+ */
1013
+ private function getSubsets( $var ) {
1014
+ $result = array();
1015
+
1016
+ foreach ( $var as $v ) {
1017
+ if ( strpos( $v, "-ext" ) ) {
1018
+ $name = ucfirst( str_replace( "-ext", " Extended", $v ) );
1019
+ } else {
1020
+ $name = ucfirst( $v );
1021
+ }
1022
+
1023
+ array_push( $result, array(
1024
+ 'id' => $v,
1025
+ 'name' => $name
1026
+ ) );
1027
+ }
1028
+
1029
+ return array_filter( $result );
1030
+ } //function
1031
+
1032
+ /**
1033
+ * getVariants Function.
1034
+ * Clean up the Google Webfonts variants to be human readable
1035
+ *
1036
+ * @since ReduxFramework 0.2.0
1037
+ */
1038
+ private function getVariants( $var ) {
1039
+ $result = array();
1040
+ $italic = array();
1041
+
1042
+ foreach ( $var as $v ) {
1043
+ $name = "";
1044
+ if ( $v[0] == 1 ) {
1045
+ $name = 'Ultra-Light 100';
1046
+ } else if ( $v[0] == 2 ) {
1047
+ $name = 'Light 200';
1048
+ } else if ( $v[0] == 3 ) {
1049
+ $name = 'Book 300';
1050
+ } else if ( $v[0] == 4 || $v[0] == "r" || $v[0] == "i" ) {
1051
+ $name = 'Normal 400';
1052
+ } else if ( $v[0] == 5 ) {
1053
+ $name = 'Medium 500';
1054
+ } else if ( $v[0] == 6 ) {
1055
+ $name = 'Semi-Bold 600';
1056
+ } else if ( $v[0] == 7 ) {
1057
+ $name = 'Bold 700';
1058
+ } else if ( $v[0] == 8 ) {
1059
+ $name = 'Extra-Bold 800';
1060
+ } else if ( $v[0] == 9 ) {
1061
+ $name = 'Ultra-Bold 900';
1062
+ }
1063
+
1064
+ if ( $v == "regular" ) {
1065
+ $v = "400";
1066
+ }
1067
+
1068
+ if ( strpos( $v, "italic" ) || $v == "italic" ) {
1069
+ $name .= " Italic";
1070
+ $name = trim( $name );
1071
+ if ( $v == "italic" ) {
1072
+ $v = "400italic";
1073
+ }
1074
+ $italic[] = array(
1075
+ 'id' => $v,
1076
+ 'name' => $name
1077
+ );
1078
+ } else {
1079
+ $result[] = array(
1080
+ 'id' => $v,
1081
+ 'name' => $name
1082
+ );
1083
+ }
1084
+ }
1085
+
1086
+ foreach ( $italic as $item ) {
1087
+ $result[] = $item;
1088
+ }
1089
+
1090
+ return array_filter( $result );
1091
+ } //function
1092
+ } //class
1093
+ } //class exists
includes/options/redux-core/inc/fields/typography/field_typography.scss ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-main {
2
+ .redux-typography-container {
3
+ display: block;
4
+ position: relative;
5
+ margin: 0;
6
+ padding: 0;
7
+ width: 100%;
8
+ max-width: 660px;
9
+
10
+ .clearfix {
11
+ clear: both;
12
+
13
+ &:after {
14
+ visibility: hidden;
15
+ display: block;
16
+ font-size: 0;
17
+ content: " ";
18
+ clear: both;
19
+ height: 0;
20
+ }
21
+ }
22
+
23
+ input.wp-picker-default,
24
+ .redux-typography-color {
25
+ -webkit-box-sizing: border-box;
26
+ -moz-box-sizing: border-box;
27
+ -o-box-sizing: border-box;
28
+ box-sizing: border-box;
29
+ height: 24px;
30
+ padding: 0px 14px !important;
31
+ margin-top: 0;
32
+ margin-bottom: 0;
33
+ margin-left: 4px !important;
34
+ font-size: 12px !important;
35
+ }
36
+
37
+ .select_wrapper {
38
+ display: block;
39
+ position: relative;
40
+ float: left;
41
+ clear: none;
42
+ margin: 0 10px 0 0;
43
+ width: 48% !important;
44
+ min-width: 210px !important;
45
+ max-width: 324px !important;
46
+ height: 57px;
47
+ -webkit-box-sizing: border-box;
48
+ -moz-box-sizing: border-box;
49
+ -o-box-sizing: border-box;
50
+ box-sizing: border-box;
51
+
52
+ &:nth-child(odd) {
53
+ margin-right: 10px !important;
54
+ }
55
+
56
+ &:nth-child(even) {
57
+ margin-right: 10px !important;
58
+ }
59
+
60
+ &.typography-family {
61
+ .select2-container {
62
+ width: 100%
63
+ }
64
+ }
65
+
66
+ .redux-typography {
67
+ font-size: 14px !important;
68
+ display: block;
69
+ float: left;
70
+ height: 28px !important;
71
+ line-height: 50px !important;
72
+ padding: 0px !important;
73
+ width: 100% !important;
74
+ -webkit-box-sizing: border-box;
75
+ -moz-box-sizing: border-box;
76
+ -o-box-sizing: border-box;
77
+ box-sizing: border-box;
78
+ }
79
+ }
80
+
81
+ .wp-picker-container {
82
+ float: left;
83
+ clear: left;
84
+ margin-bottom: 12px;
85
+ padding: 3px;
86
+ -webkit-border-radius: 3px;
87
+ -moz-border-radius: 3px;
88
+ border-radius: 3px;
89
+ }
90
+
91
+ .input_wrapper {
92
+ display: block;
93
+ position: relative;
94
+ margin: 0 4px 0 5px;
95
+ padding: 0;
96
+ width: 23%;
97
+ max-width: 23%;
98
+ min-width: 70px;
99
+ float: left;
100
+ clear: none;
101
+ height: 57px;
102
+ -webkit-box-sizing: border-box;
103
+ -moz-box-sizing: border-box;
104
+ -o-box-sizing: border-box;
105
+ box-sizing: border-box;
106
+ vertical-align: baseline;
107
+
108
+ &.font-size {
109
+ margin-left: 0px;
110
+ }
111
+
112
+ input.mini {
113
+ -webkit-box-sizing: border-box;
114
+ -moz-box-sizing: border-box;
115
+ -o-box-sizing: border-box;
116
+ box-sizing: border-box;
117
+ width: 78%;
118
+ text-align: center;
119
+ margin: 0;
120
+ height: 28px;
121
+ top: 3px;
122
+ padding: 0 2px 0 5px;
123
+ text-decoration: none;
124
+ -webkit-border-radius: 4px;
125
+ -moz-border-radius: 4px;
126
+ border-radius: 4px;
127
+ }
128
+ }
129
+
130
+ .picker-wrapper {
131
+ display: block;
132
+ display: block;
133
+ position: relative;
134
+ margin: 0 4px 0 5px;
135
+ margin: 0;
136
+ padding: 0;
137
+ width: 23%;
138
+ width: 100%;
139
+ max-width: 23%;
140
+ min-width: 70px;
141
+ min-width: 100%;
142
+ clear: none;
143
+ height: 57px;
144
+ -webkit-box-sizing: border-box;
145
+ -moz-box-sizing: border-box;
146
+ -o-box-sizing: border-box;
147
+ box-sizing: border-box;
148
+ vertical-align: baseline;
149
+ }
150
+
151
+ label {
152
+ display: block;
153
+ position: relative;
154
+ font-size: 12px !important;
155
+ text-align: left;
156
+ color: #999999;
157
+ margin: 4px 0 2px 0 !important;
158
+ cursor: default;
159
+ }
160
+
161
+ .typography-preview {
162
+ display: none;
163
+ width: 100%;
164
+ border: 1px dotted lightgray;
165
+ max-width: 850px;
166
+ padding: 10px;
167
+ font-size: 10pt;
168
+ height: auto;
169
+ margin: 5px 0 10px;
170
+ -webkit-box-sizing: border-box;
171
+ -moz-box-sizing: border-box;
172
+ box-sizing: border-box;
173
+ overflow: hidden;
174
+ }
175
+
176
+ .typography-color {
177
+ border: 0 none;
178
+ margin: 0;
179
+ }
180
+
181
+ ::-webkit-input-placeholder {
182
+ line-height: 19px;
183
+ }
184
+ }
185
+
186
+ @media screen and (max-width: 540px) {
187
+ .redux-main {
188
+ .redux-typography-container {
189
+ max-width: 230px;
190
+ margin: 0 auto;
191
+
192
+ .select_wrapper {
193
+ max-width: 210px;
194
+ min-width: 210px;
195
+ width: 210px;
196
+ margin-left: 0 !important;
197
+ margin-right: 0 !important;
198
+ }
199
+
200
+ .input_wrapper {
201
+ max-width: 101px;
202
+ min-width: 101px;
203
+ width: 101px;
204
+ margin-left: 0 !important;
205
+ margin-right: 5px !important;
206
+ input.mini {
207
+ width: 73%;
208
+ }
209
+ }
210
+
211
+ .input-append .add-on {
212
+ width: 30%;
213
+ padding: 5px !important;
214
+ }
215
+
216
+ }
217
+
218
+ .redux-main .wp-picker-container .wp-picker-input-wrap {
219
+ margin-top: 7px;
220
+ }
221
+ }
222
+ }
223
+ }
224
+
225
+ @media screen and (max-width: 360px) {
226
+ .redux-main {
227
+ .redux-typography-container .iris-picker .iris-square {
228
+ margin-right: 3%;
229
+ }
230
+ }
231
+ }
232
+
233
+ .wp-customizer {
234
+ .redux-typography-container {
235
+ .input_wrapper {
236
+ width: 40%;
237
+ max-width: 40%;
238
+ min-width: 20%;
239
+ input.mini {
240
+ width: 70%;
241
+ }
242
+ }
243
+ .select_wrapper {
244
+ width: 100% !important;
245
+ }
246
+ }
247
+ }
includes/options/redux-core/inc/fields/typography/field_typography_json.js ADDED
@@ -0,0 +1,669 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, redux*/
2
+
3
+ /**
4
+ * Typography
5
+ * Dependencies: google.com, jquery, select2
6
+ * Feature added by: Dovy Paukstys - http://simplerain.com/
7
+ * Date: 06.14.2013
8
+ *
9
+ * Rewrite: Kevin Provance (kprovance)
10
+ * Date: May 25, 2014
11
+ */
12
+
13
+ (function( $ ) {
14
+ "use strict";
15
+
16
+ redux.field_objects = redux.field_objects || {};
17
+ redux.field_objects.typography = redux.field_objects.typography || {};
18
+
19
+ var selVals = [];
20
+ var isSelecting = false;
21
+
22
+ var default_params = {
23
+ width: 'resolve',
24
+ triggerChange: true,
25
+ allowClear: true
26
+ };
27
+
28
+ $( document ).ready(
29
+ function() {
30
+ //redux.field_objects.typography.init();
31
+ }
32
+ );
33
+
34
+ redux.field_objects.typography.init = function( selector, skipCheck ) {
35
+
36
+ if ( !selector ) {
37
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-typography:visible' );
38
+ }
39
+
40
+ $( selector ).each(
41
+ function() {
42
+ var el = $( this );
43
+ var parent = el;
44
+
45
+ if ( !el.hasClass( 'redux-field-container' ) ) {
46
+ parent = el.parents( '.redux-field-container:first' );
47
+ }
48
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
49
+ return;
50
+ }
51
+ if ( parent.hasClass( 'redux-field-init' ) ) {
52
+ parent.removeClass( 'redux-field-init' );
53
+ } else {
54
+ return;
55
+ }
56
+
57
+ var fontClear;
58
+
59
+ el.each(
60
+ function() {
61
+ // init each typography field
62
+ $( this ).find( '.redux-typography-container' ).each(
63
+ function() {
64
+ var family = $( this ).find( '.redux-typography-family' );
65
+
66
+ if ( family.data( 'value' ) === undefined ) {
67
+ family = $( this );
68
+ } else if ( family.data( 'value' ) !== "" ) {
69
+ $( family ).val( family.data( 'value' ) );
70
+ }
71
+
72
+ var select2_handle = $( this ).find( '.select2_params' );
73
+ if ( select2_handle.size() > 0 ) {
74
+ var select2_params = select2_handle.val();
75
+
76
+ select2_params = JSON.parse( select2_params );
77
+ default_params = $.extend( {}, default_params, select2_params );
78
+ }
79
+
80
+ fontClear = Boolean( $( this ).find( '.redux-font-clear' ).val() );
81
+
82
+ redux.field_objects.typography.select( family, true );
83
+
84
+ window.onbeforeunload = null;
85
+ }
86
+ );
87
+
88
+ //init when value is changed
89
+ $( this ).find( '.redux-typography' ).on(
90
+ 'change', function() {
91
+ redux.field_objects.typography.select( $( this ) ); //.parents('.redux-container-typography:first'));
92
+ }
93
+ );
94
+
95
+ //init when value is changed
96
+ $( this ).find( '.redux-typography-size, .redux-typography-height, .redux-typography-word, .redux-typography-letter, .redux-typography-align, .redux-typography-transform, .redux-typography-font-variant, .redux-typography-decoration' ).keyup(
97
+ function() {
98
+ redux.field_objects.typography.select( $( this ).parents( '.redux-container-typography:first' ) );
99
+ }
100
+ );
101
+
102
+ // Have to redeclare the wpColorPicker to get a callback function
103
+ $( this ).find( '.redux-typography-color' ).wpColorPicker(
104
+ {
105
+ change: function( e, ui ) {
106
+ $( this ).val( ui.color.toString() );
107
+ redux.field_objects.typography.select( $( this ).parents( '.redux-container-typography:first' ) );
108
+ }
109
+ }
110
+ );
111
+
112
+ // Don't allow negative numbers for size field
113
+ $( this ).find( ".redux-typography-size" ).numeric(
114
+ {
115
+ allowMinus: false
116
+ }
117
+ );
118
+
119
+ // Allow negative numbers for indicated fields
120
+ $( this ).find( ".redux-typography-height, .redux-typography-word, .redux-typography-letter" ).numeric(
121
+ {
122
+ allowMinus: true
123
+ }
124
+ );
125
+
126
+ // select2 magic, to load font-family dynamically
127
+ var data = [{id: 'none', text: 'none'}];
128
+
129
+ $( this ).find( ".redux-typography-family" ).select2(
130
+ {
131
+ matcher: function( term, text ) {
132
+ return text.toUpperCase().indexOf( term.toUpperCase() ) === 0;
133
+ },
134
+
135
+ query: function( query ) {
136
+ return window.Select2.query.local( data )( query );
137
+ },
138
+
139
+ initSelection: function( element, callback ) {
140
+ var data = {id: element.val(), text: element.val()};
141
+ callback( data );
142
+ },
143
+ allowClear: fontClear,
144
+ // when one clicks on the font-family select box
145
+ }
146
+ ).on(
147
+ "select2-opening", function( e ) {
148
+
149
+ // Get field ID
150
+ var thisID = $( this ).parents( '.redux-container-typography:first' ).attr( 'data-id' );
151
+
152
+ // User included fonts?
153
+ var isUserFonts = $( '#' + thisID + ' .redux-typography-font-family' ).data( 'user-fonts' );
154
+ isUserFonts = isUserFonts ? 1 : 0;
155
+
156
+ // Google font isn use?
157
+ var usingGoogleFonts = $( '#' + thisID + ' .redux-typography-google' ).val();
158
+ usingGoogleFonts = usingGoogleFonts ? 1 : 0;
159
+
160
+ // Set up data array
161
+ var buildData = [];
162
+
163
+ // If custom fonts, push onto array
164
+ if ( redux.customfonts !== undefined ) {
165
+ buildData.push( redux.customfonts );
166
+ }
167
+
168
+ // If standard fonts, push onto array
169
+ if ( redux.stdfonts !== undefined && isUserFonts === 0 ) {
170
+ buildData.push( redux.stdfonts );
171
+ }
172
+
173
+ // If user fonts, pull from localize and push into array
174
+ if ( isUserFonts == 1 ) {
175
+ var fontKids = [];
176
+
177
+ // <option>
178
+ for ( var key in redux.typography[thisID] ) {
179
+ var obj = redux.typography[thisID].std_font;
180
+
181
+ for ( var prop in obj ) {
182
+ if ( obj.hasOwnProperty( prop ) ) {
183
+ fontKids.push(
184
+ {
185
+ id: prop,
186
+ text: prop,
187
+ 'data-google': 'false'
188
+ }
189
+ );
190
+ }
191
+ }
192
+ }
193
+
194
+ // <optgroup>
195
+ var fontData = {
196
+ text: 'Standard Fonts',
197
+ children: fontKids
198
+ };
199
+
200
+ buildData.push( fontData );
201
+ }
202
+
203
+ // If googfonts on and had data, push into array
204
+ if ( usingGoogleFonts == 1 || usingGoogleFonts === true && redux.googlefonts !== undefined ) {
205
+ buildData.push( redux.googlefonts );
206
+ }
207
+
208
+ // output data to drop down
209
+ data = buildData;
210
+
211
+ // get placeholder
212
+ var selFamily = $( '#' + thisID + ' #' + thisID + '-family' ).attr( 'placeholder' );
213
+ if ( !selFamily ) {
214
+ selFamily = null;
215
+ }
216
+
217
+ // select current font
218
+ $( '#' + thisID + " .redux-typography-family" ).select2( 'val', selFamily );
219
+
220
+ // When selection is made.
221
+ }
222
+ ).on(
223
+ 'select2-selecting', function( val, object ) {
224
+ var fontName = val.object.text;
225
+ var thisID = $( this ).parents( '.redux-container-typography:first' ).attr( 'data-id' );
226
+
227
+ $( '#' + thisID + ' #' + thisID + '-family' ).data( 'value', fontName );
228
+ $( '#' + thisID + ' #' + thisID + '-family' ).attr( 'placeholder', fontName );
229
+
230
+ // option values
231
+ selVals = val;
232
+ isSelecting = true;
233
+
234
+ redux.field_objects.typography.select( $( this ).parents( '.redux-container-typography:first' ) );
235
+ }
236
+ ).on(
237
+ 'select2-clearing', function( val, choice ) {
238
+ var thisID = $( this ).parents( '.redux-container-typography:first' ).attr( 'data-id' );
239
+
240
+ $( '#' + thisID + ' #' + thisID + '-family' ).attr( 'data-value', '' );
241
+ $( '#' + thisID + ' #' + thisID + '-family' ).attr( 'placeholder', 'Font Family' );
242
+
243
+ $( '#' + thisID + ' #' + thisID + '-google-font' ).val( 'false' );
244
+
245
+ redux.field_objects.typography.select( $( this ).parents( '.redux-container-typography:first' ) );
246
+ }
247
+ );
248
+
249
+ var xx = el.find( ".redux-typography-family" );
250
+ if ( !xx.hasClass( 'redux-typography-family' ) ) {
251
+ el.find( ".redux-typography-style" ).select2( default_params );
252
+ }
253
+
254
+ // Init select2 for indicated fields
255
+ el.find( ".redux-typography-family-backup, .redux-typography-align, .redux-typography-transform, .redux-typography-font-variant, .redux-typography-decoration" ).select2( default_params );
256
+
257
+ }
258
+ );
259
+ }
260
+ );
261
+ };
262
+
263
+ // Return font size
264
+ redux.field_objects.typography.size = function( obj ) {
265
+ var size = 0,
266
+ key;
267
+
268
+ for ( key in obj ) {
269
+ if ( obj.hasOwnProperty( key ) ) {
270
+ size++;
271
+ }
272
+ }
273
+
274
+ return size;
275
+ };
276
+
277
+ // Return proper bool value
278
+ redux.field_objects.typography.makeBool = function( val ) {
279
+ if ( val == 'false' || val == '0' || val === false || val === 0 ) {
280
+ return false;
281
+ } else if ( val == 'true' || val == '1' || val === true || val == 1 ) {
282
+ return true;
283
+ }
284
+ };
285
+
286
+ redux.field_objects.typography.change = function( container ) {
287
+ var $data = {};
288
+ jQuery( container ).find( '.redux-typography-input' ).each(
289
+ function() {
290
+ if ( jQuery( this ).data( 'name' ) === undefined ) {
291
+ return;
292
+ }
293
+ $data[jQuery( this ).data( 'name' )] = jQuery( this ).val();
294
+ }
295
+ );
296
+ var $input = jQuery( container ).find( '.typography-data-input:first-child' );
297
+ $input.val( JSON.stringify( $data ) );
298
+ };
299
+
300
+ redux.field_objects.typography.contrastColour = function( hexcolour ) {
301
+ // default value is black.
302
+ var retVal = '#444444';
303
+
304
+ // In case - for some reason - a blank value is passed.
305
+ // This should *not* happen. If a function passing a value
306
+ // is canceled, it should pass the current value instead of
307
+ // a blank. This is how the Windows Common Controls do it. :P
308
+ if ( hexcolour !== '' ) {
309
+
310
+ // Replace the hash with a blank.
311
+ hexcolour = hexcolour.replace( '#', '' );
312
+
313
+ var r = parseInt( hexcolour.substr( 0, 2 ), 16 );
314
+ var g = parseInt( hexcolour.substr( 2, 2 ), 16 );
315
+ var b = parseInt( hexcolour.substr( 4, 2 ), 16 );
316
+ var res = ((r * 299) + (g * 587) + (b * 114)) / 1000;
317
+
318
+ // Instead of pure black, I opted to use WP 3.8 black, so it looks uniform. :) - kp
319
+ retVal = (res >= 128) ? '#444444' : '#ffffff';
320
+ }
321
+
322
+ return retVal;
323
+ };
324
+
325
+
326
+ // Sync up font options
327
+ redux.field_objects.typography.select = function( selector, skipCheck ) {
328
+ var mainID;
329
+
330
+ // Main id for selected field
331
+ mainID = $( selector ).parents( '.redux-container-typography:first' ).attr( 'data-id' );
332
+ if ( mainID === undefined ) {
333
+ mainID = $( selector ).attr( 'data-id' );
334
+ }
335
+
336
+ var parent = $( selector ).parents( '.redux-container-typography:first' );
337
+ var data = [];
338
+ //$.each(parent.find('.redux-typography-field'), function() {
339
+ // console.log();
340
+ //});
341
+ //console.log( selector );
342
+ // Set all the variables to be checked against
343
+ var family = $( '#' + mainID + ' #' + mainID + '-family' ).val();
344
+
345
+ if ( !family ) {
346
+ family = null; //"inherit";
347
+ }
348
+
349
+ var familyBackup = $( '#' + mainID + ' select.redux-typography-family-backup' ).val();
350
+ var size = $( '#' + mainID + ' .redux-typography-size' ).val();
351
+ var height = $( '#' + mainID + ' .redux-typography-height' ).val();
352
+ var word = $( '#' + mainID + ' .redux-typography-word' ).val();
353
+ var letter = $( '#' + mainID + ' .redux-typography-letter' ).val();
354
+ var align = $( '#' + mainID + ' select.redux-typography-align' ).val();
355
+ var transform = $( '#' + mainID + ' select.redux-typography-transform' ).val();
356
+ var fontVariant = $( '#' + mainID + ' select.redux-typography-font-variant' ).val();
357
+ var decoration = $( '#' + mainID + ' select.redux-typography-decoration' ).val();
358
+ var style = $( '#' + mainID + ' select.redux-typography-style' ).val();
359
+ var script = $( '#' + mainID + ' select.redux-typography-subsets' ).val();
360
+ var color = $( '#' + mainID + ' .redux-typography-color' ).val();
361
+ var units = $( '#' + mainID ).data( 'units' );
362
+ //console.log('here3');
363
+ //console.log(color);
364
+
365
+ //var output = family;
366
+
367
+ // Is selected font a google font?
368
+ var google;
369
+ if ( isSelecting === true ) {
370
+ google = redux.field_objects.typography.makeBool( selVals.object['data-google'] );
371
+ $( '#' + mainID + ' .redux-typography-google-font' ).val( google );
372
+ } else {
373
+ google = redux.field_objects.typography.makeBool( $( '#' + mainID + ' .redux-typography-google-font' ).val() ); // Check if font is a google font
374
+ }
375
+
376
+ // Page load. Speeds things up memory wise to offload to client
377
+ if ( !$( '#' + mainID ).hasClass( 'typography-initialized' ) ) {
378
+ style = $( '#' + mainID + ' select.redux-typography-style' ).data( 'value' );
379
+ script = $( '#' + mainID + ' select.redux-typography-subsets' ).data( 'value' );
380
+
381
+ if ( style !== "" ) {
382
+ style = String( style );
383
+ }
384
+
385
+ if ( typeof (script) !== undefined ) {
386
+ script = String( script );
387
+ }
388
+ }
389
+
390
+ // Something went wrong trying to read google fonts, so turn google off
391
+ if ( redux.fonts.google === undefined ) {
392
+ google = false;
393
+ }
394
+
395
+ // Get font details
396
+ var details = '';
397
+ if ( google === true && ( family in redux.fonts.google) ) {
398
+ details = redux.fonts.google[family];
399
+ } else {
400
+ details = {
401
+ '400': 'Normal 400',
402
+ '700': 'Bold 700',
403
+ '400italic': 'Normal 400 Italic',
404
+ '700italic': 'Bold 700 Italic'
405
+ };
406
+ }
407
+
408
+ if ( $( selector ).hasClass( 'redux-typography-subsets' ) ) {
409
+ $( '#' + mainID + ' input.typography-subsets' ).val( script );
410
+ }
411
+
412
+ // If we changed the font
413
+ if ( $( selector ).hasClass( 'redux-typography-family' ) ) {
414
+ var html = '<option value=""></option>';
415
+
416
+ // Google specific stuff
417
+ if ( google === true ) {
418
+
419
+ // STYLES
420
+ var selected = "";
421
+ $.each(
422
+ details.variants, function( index, variant ) {
423
+ if ( variant.id === style || redux.field_objects.typography.size( details.variants ) === 1 ) {
424
+ selected = ' selected="selected"';
425
+ style = variant.id;
426
+ } else {
427
+ selected = "";
428
+ }
429
+
430
+ html += '<option value="' + variant.id + '"' + selected + '>' + variant.name.replace(
431
+ /\+/g, " "
432
+ ) + '</option>';
433
+ }
434
+ );
435
+
436
+ // destroy select2
437
+ $( '#' + mainID + ' .redux-typography-style' ).select2( "destroy" );
438
+
439
+ // Instert new HTML
440
+ $( '#' + mainID + ' .redux-typography-style' ).html( html );
441
+
442
+ // Init select2
443
+ $( '#' + mainID + ' .redux-typography-style' ).select2( default_params );
444
+
445
+
446
+ // SUBSETS
447
+ selected = "";
448
+ html = '<option value=""></option>';
449
+
450
+ $.each(
451
+ details.subsets, function( index, subset ) {
452
+ if ( subset.id === script || redux.field_objects.typography.size( details.subsets ) === 1 ) {
453
+ selected = ' selected="selected"';
454
+ script = subset.id;
455
+ $( '#' + mainID + ' input.typography-subsets' ).val( script );
456
+ } else {
457
+ selected = "";
458
+ }
459
+ html += '<option value="' + subset.id + '"' + selected + '>' + subset.name.replace(
460
+ /\+/g, " "
461
+ ) + '</option>';
462
+ }
463
+ );
464
+
465
+ //if (typeof (familyBackup) !== "undefined" && familyBackup !== "") {
466
+ // output += ', ' + familyBackup;
467
+ //}
468
+
469
+ // Destroy select2
470
+ $( '#' + mainID + ' .redux-typography-subsets' ).select2( "destroy" );
471
+
472
+ // Inset new HTML
473
+ $( '#' + mainID + ' .redux-typography-subsets' ).html( html );
474
+
475
+ // Init select2
476
+ $( '#' + mainID + ' .redux-typography-subsets' ).select2( default_params );
477
+
478
+ $( '#' + mainID + ' .redux-typography-subsets' ).parent().fadeIn( 'fast' );
479
+ $( '#' + mainID + ' .typography-family-backup' ).fadeIn( 'fast' );
480
+ } else {
481
+ if ( details ) {
482
+ $.each(
483
+ details, function( index, value ) {
484
+ if ( index === style || index === "normal" ) {
485
+ selected = ' selected="selected"';
486
+ $( '#' + mainID + ' .typography-style .select2-chosen' ).text( value );
487
+ } else {
488
+ selected = "";
489
+ }
490
+
491
+ html += '<option value="' + index + '"' + selected + '>' + value.replace(
492
+ '+', ' '
493
+ ) + '</option>';
494
+ }
495
+ );
496
+
497
+ // Destory select2
498
+ $( '#' + mainID + ' .redux-typography-style' ).select2( "destroy" );
499
+
500
+ // Insert new HTML
501
+ $( '#' + mainID + ' .redux-typography-style' ).html( html );
502
+
503
+ // Init select2
504
+ $( '#' + mainID + ' .redux-typography-style' ).select2( default_params );
505
+
506
+ // Prettify things
507
+ $( '#' + mainID + ' .redux-typography-subsets' ).parent().fadeOut( 'fast' );
508
+ $( '#' + mainID + ' .typography-family-backup' ).fadeOut( 'fast' );
509
+ }
510
+ }
511
+
512
+ $( '#' + mainID + ' .redux-typography-font-family' ).val( family );
513
+ } else if ( $( selector ).hasClass( 'redux-typography-family-backup' ) && familyBackup !== "" ) {
514
+ $( '#' + mainID + ' .redux-typography-font-family-backup' ).val( familyBackup );
515
+ }
516
+
517
+ // Check if the selected value exists. If not, empty it. Else, apply it.
518
+ if ( $( '#' + mainID + " select.redux-typography-style option[value='" + style + "']" ).length === 0 ) {
519
+ style = "";
520
+ $( '#' + mainID + ' select.redux-typography-style' ).select2( 'val', '' );
521
+ } else if ( style === "400" ) {
522
+ $( '#' + mainID + ' select.redux-typography-style' ).select2( 'val', style );
523
+ }
524
+
525
+ // Handle empty subset select
526
+ if ( $( '#' + mainID + " select.redux-typography-subsets option[value='" + script + "']" ).length === 0 ) {
527
+ script = "";
528
+ $( '#' + mainID + ' select.redux-typography-subsets' ).select2( 'val', '' );
529
+ $( '#' + mainID + ' input.typography-subsets' ).val( script );
530
+ }
531
+
532
+ var _linkclass = 'style_link_' + mainID;
533
+
534
+ //remove other elements crested in <head>
535
+ $( '.' + _linkclass ).remove();
536
+ if ( family !== null && family !== "inherit" && $( '#' + mainID ).hasClass( 'typography-initialized' ) ) {
537
+
538
+ //replace spaces with "+" sign
539
+ var the_font = family.replace( /\s+/g, '+' );
540
+ if ( google === true ) {
541
+
542
+ //add reference to google font family
543
+ var link = the_font;
544
+
545
+ if ( style && style !== "" ) {
546
+ link += ':' + style.replace( /\-/g, " " );
547
+ }
548
+
549
+ if ( script && script !== "" ) {
550
+ link += '&subset=' + script;
551
+ }
552
+
553
+ if ( isSelecting === false ) {
554
+ if ( typeof (WebFont) !== "undefined" && WebFont ) {
555
+ WebFont.load( {google: {families: [link]}} );
556
+ }
557
+ }
558
+ $( '#' + mainID + ' .redux-typography-google' ).val( true );
559
+ } else {
560
+ $( '#' + mainID + ' .redux-typography-google' ).val( false );
561
+ }
562
+ }
563
+
564
+ // Weight and italic
565
+ if ( style.indexOf( "italic" ) !== -1 ) {
566
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-style', 'italic' );
567
+ $( '#' + mainID + ' .typography-font-style' ).val( 'italic' );
568
+ style = style.replace( 'italic', '' );
569
+ } else {
570
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-style', "normal" );
571
+ $( '#' + mainID + ' .typography-font-style' ).val( '' );
572
+ }
573
+
574
+ $( '#' + mainID + ' .typography-font-weight' ).val( style );
575
+
576
+ if ( !height ) {
577
+ height = size;
578
+ }
579
+
580
+ if ( size === '' || size === undefined ) {
581
+ $( '#' + mainID + ' .typography-font-size' ).val( '' );
582
+ } else {
583
+ $( '#' + mainID + ' .typography-font-size' ).val( size + units );
584
+ }
585
+
586
+ if ( height === '' || height === undefined ) {
587
+ $( '#' + mainID + ' .typography-line-height' ).val( '' );
588
+ } else {
589
+ $( '#' + mainID + ' .typography-line-height' ).val( height + units );
590
+ }
591
+
592
+ if ( word === '' || word === undefined ) {
593
+ $( '#' + mainID + ' .typography-word-spacing' ).val( '' );
594
+ } else {
595
+ $( '#' + mainID + ' .typography-word-spacing' ).val( word + units );
596
+ }
597
+
598
+ if ( letter === '' || letter === undefined ) {
599
+ $( '#' + mainID + ' .typography-letter-spacing' ).val( '' );
600
+ } else {
601
+ $( '#' + mainID + ' .typography-letter-spacing' ).val( letter + units );
602
+ }
603
+
604
+ // Show more preview stuff
605
+ if ( $( '#' + mainID ).hasClass( 'typography-initialized' ) ) {
606
+ //console.log('here2');
607
+ var isPreviewSize = $( '#' + mainID + ' .typography-preview' ).data( 'preview-size' );
608
+
609
+ if ( isPreviewSize == '0' ) {
610
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-size', size + units );
611
+ }
612
+
613
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-weight', style );
614
+
615
+ //show in the preview box the font
616
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-family', family + ', sans-serif' );
617
+
618
+ if ( family === 'none' && family === '' ) {
619
+ //if selected is not a font remove style "font-family" at preview box
620
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-family', 'inherit' );
621
+ }
622
+
623
+ $( '#' + mainID + ' .typography-preview' ).css( 'line-height', height + units );
624
+ $( '#' + mainID + ' .typography-preview' ).css( 'word-spacing', word + units );
625
+ $( '#' + mainID + ' .typography-preview' ).css( 'letter-spacing', letter + units );
626
+
627
+ if ( color ) {
628
+ $( '#' + mainID + ' .typography-preview' ).css( 'color', color );
629
+ $( '#' + mainID + ' .typography-preview' ).css(
630
+ 'background-color', redux.field_objects.typography.contrastColour( color )
631
+ );
632
+ }
633
+
634
+ $( '#' + mainID + ' .typography-style .select2-chosen' ).text( $( '#' + mainID + ' .redux-typography-style option:selected' ).text() );
635
+ $( '#' + mainID + ' .typography-script .select2-chosen' ).text( $( '#' + mainID + ' .redux-typography-subsets option:selected' ).text() );
636
+
637
+ if ( align ) {
638
+ $( '#' + mainID + ' .typography-preview' ).css( 'text-align', align );
639
+ }
640
+
641
+ if ( transform ) {
642
+ $( '#' + mainID + ' .typography-preview' ).css( 'text-transform', transform );
643
+ }
644
+
645
+ if ( fontVariant ) {
646
+ $( '#' + mainID + ' .typography-preview' ).css( 'font-variant', fontVariant );
647
+ }
648
+
649
+ if ( decoration ) {
650
+ $( '#' + mainID + ' .typography-preview' ).css( 'text-decoration', decoration );
651
+ }
652
+ $( '#' + mainID + ' .typography-preview' ).slideDown();
653
+ }
654
+ // end preview stuff
655
+
656
+ // if not preview showing, then set preview to show
657
+ if ( !$( '#' + mainID ).hasClass( 'typography-initialized' ) ) {
658
+ $( '#' + mainID ).addClass( 'typography-initialized' );
659
+ }
660
+
661
+ isSelecting = false;
662
+
663
+ if ( !skipCheck ) {
664
+ redux_change( selector );
665
+ }
666
+
667
+
668
+ };
669
+ })( jQuery );
includes/options/redux-core/inc/fields/typography/field_typography_json.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.typography=redux.field_objects.typography||{};var b=[],c=!1,d={width:"resolve",triggerChange:!0,allowClear:!0};a(document).ready(function(){}),redux.field_objects.typography.init=function(e,f){e||(e=a(document).find(".redux-group-tab:visible").find(".redux-container-typography:visible")),a(e).each(function(){var e=a(this),f=e;if(e.hasClass("redux-field-container")||(f=e.parents(".redux-field-container:first")),!f.is(":hidden")&&f.hasClass("redux-field-init")){f.removeClass("redux-field-init");var g;e.each(function(){a(this).find(".redux-typography-container").each(function(){var b=a(this).find(".redux-typography-family");void 0===b.data("value")?b=a(this):""!==b.data("value")&&a(b).val(b.data("value"));var c=a(this).find(".select2_params");if(c.size()>0){var e=c.val();e=JSON.parse(e),d=a.extend({},d,e)}g=Boolean(a(this).find(".redux-font-clear").val()),redux.field_objects.typography.select(b,!0),window.onbeforeunload=null}),a(this).find(".redux-typography").on("change",function(){redux.field_objects.typography.select(a(this))}),a(this).find(".redux-typography-size, .redux-typography-height, .redux-typography-word, .redux-typography-letter, .redux-typography-align, .redux-typography-transform, .redux-typography-font-variant, .redux-typography-decoration").keyup(function(){redux.field_objects.typography.select(a(this).parents(".redux-container-typography:first"))}),a(this).find(".redux-typography-color").wpColorPicker({change:function(b,c){a(this).val(c.color.toString()),redux.field_objects.typography.select(a(this).parents(".redux-container-typography:first"))}}),a(this).find(".redux-typography-size").numeric({allowMinus:!1}),a(this).find(".redux-typography-height, .redux-typography-word, .redux-typography-letter").numeric({allowMinus:!0});var f=[{id:"none",text:"none"}];a(this).find(".redux-typography-family").select2({matcher:function(a,b){return 0===b.toUpperCase().indexOf(a.toUpperCase())},query:function(a){return window.Select2.query.local(f)(a)},initSelection:function(a,b){var c={id:a.val(),text:a.val()};b(c)},allowClear:g}).on("select2-opening",function(b){var c=a(this).parents(".redux-container-typography:first").attr("data-id"),d=a("#"+c+" .redux-typography-font-family").data("user-fonts");d=d?1:0;var e=a("#"+c+" .redux-typography-google").val();e=e?1:0;var g=[];if(void 0!==redux.customfonts&&g.push(redux.customfonts),void 0!==redux.stdfonts&&0===d&&g.push(redux.stdfonts),1==d){var h=[];for(var i in redux.typography[c]){var j=redux.typography[c].std_font;for(var k in j)j.hasOwnProperty(k)&&h.push({id:k,text:k,"data-google":"false"})}var l={text:"Standard Fonts",children:h};g.push(l)}(1==e||e===!0&&void 0!==redux.googlefonts)&&g.push(redux.googlefonts),f=g;var m=a("#"+c+" #"+c+"-family").attr("placeholder");m||(m=null),a("#"+c+" .redux-typography-family").select2("val",m)}).on("select2-selecting",function(d,e){var f=d.object.text,g=a(this).parents(".redux-container-typography:first").attr("data-id");a("#"+g+" #"+g+"-family").data("value",f),a("#"+g+" #"+g+"-family").attr("placeholder",f),b=d,c=!0,redux.field_objects.typography.select(a(this).parents(".redux-container-typography:first"))}).on("select2-clearing",function(b,c){var d=a(this).parents(".redux-container-typography:first").attr("data-id");a("#"+d+" #"+d+"-family").attr("data-value",""),a("#"+d+" #"+d+"-family").attr("placeholder","Font Family"),a("#"+d+" #"+d+"-google-font").val("false"),redux.field_objects.typography.select(a(this).parents(".redux-container-typography:first"))});var h=e.find(".redux-typography-family");h.hasClass("redux-typography-family")||e.find(".redux-typography-style").select2(d),e.find(".redux-typography-family-backup, .redux-typography-align, .redux-typography-transform, .redux-typography-font-variant, .redux-typography-decoration").select2(d)})}})},redux.field_objects.typography.size=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++;return c},redux.field_objects.typography.makeBool=function(a){return"false"==a||"0"==a||a===!1||0===a?!1:"true"==a||"1"==a||a===!0||1==a?!0:void 0},redux.field_objects.typography.change=function(a){var b={};jQuery(a).find(".redux-typography-input").each(function(){void 0!==jQuery(this).data("name")&&(b[jQuery(this).data("name")]=jQuery(this).val())});var c=jQuery(a).find(".typography-data-input:first-child");c.val(JSON.stringify(b))},redux.field_objects.typography.contrastColour=function(a){var b="#444444";if(""!==a){a=a.replace("#","");var c=parseInt(a.substr(0,2),16),d=parseInt(a.substr(2,2),16),e=parseInt(a.substr(4,2),16),f=(299*c+587*d+114*e)/1e3;b=f>=128?"#444444":"#ffffff"}return b},redux.field_objects.typography.select=function(e,f){var g;g=a(e).parents(".redux-container-typography:first").attr("data-id"),void 0===g&&(g=a(e).attr("data-id"));var h=(a(e).parents(".redux-container-typography:first"),a("#"+g+" #"+g+"-family").val());h||(h=null);var i,j=a("#"+g+" select.redux-typography-family-backup").val(),k=a("#"+g+" .redux-typography-size").val(),l=a("#"+g+" .redux-typography-height").val(),m=a("#"+g+" .redux-typography-word").val(),n=a("#"+g+" .redux-typography-letter").val(),o=a("#"+g+" select.redux-typography-align").val(),p=a("#"+g+" select.redux-typography-transform").val(),q=a("#"+g+" select.redux-typography-font-variant").val(),r=a("#"+g+" select.redux-typography-decoration").val(),s=a("#"+g+" select.redux-typography-style").val(),t=a("#"+g+" select.redux-typography-subsets").val(),u=a("#"+g+" .redux-typography-color").val(),v=a("#"+g).data("units");c===!0?(i=redux.field_objects.typography.makeBool(b.object["data-google"]),a("#"+g+" .redux-typography-google-font").val(i)):i=redux.field_objects.typography.makeBool(a("#"+g+" .redux-typography-google-font").val()),a("#"+g).hasClass("typography-initialized")||(s=a("#"+g+" select.redux-typography-style").data("value"),t=a("#"+g+" select.redux-typography-subsets").data("value"),""!==s&&(s=String(s)),void 0!==typeof t&&(t=String(t))),void 0===redux.fonts.google&&(i=!1);var w="";if(w=i===!0&&h in redux.fonts.google?redux.fonts.google[h]:{400:"Normal 400",700:"Bold 700","400italic":"Normal 400 Italic","700italic":"Bold 700 Italic"},a(e).hasClass("redux-typography-subsets")&&a("#"+g+" input.typography-subsets").val(t),a(e).hasClass("redux-typography-family")){var x='<option value=""></option>';if(i===!0){var y="";a.each(w.variants,function(a,b){b.id===s||1===redux.field_objects.typography.size(w.variants)?(y=' selected="selected"',s=b.id):y="",x+='<option value="'+b.id+'"'+y+">"+b.name.replace(/\+/g," ")+"</option>"}),a("#"+g+" .redux-typography-style").select2("destroy"),a("#"+g+" .redux-typography-style").html(x),a("#"+g+" .redux-typography-style").select2(d),y="",x='<option value=""></option>',a.each(w.subsets,function(b,c){c.id===t||1===redux.field_objects.typography.size(w.subsets)?(y=' selected="selected"',t=c.id,a("#"+g+" input.typography-subsets").val(t)):y="",x+='<option value="'+c.id+'"'+y+">"+c.name.replace(/\+/g," ")+"</option>"}),a("#"+g+" .redux-typography-subsets").select2("destroy"),a("#"+g+" .redux-typography-subsets").html(x),a("#"+g+" .redux-typography-subsets").select2(d),a("#"+g+" .redux-typography-subsets").parent().fadeIn("fast"),a("#"+g+" .typography-family-backup").fadeIn("fast")}else w&&(a.each(w,function(b,c){b===s||"normal"===b?(y=' selected="selected"',a("#"+g+" .typography-style .select2-chosen").text(c)):y="",x+='<option value="'+b+'"'+y+">"+c.replace("+"," ")+"</option>"}),a("#"+g+" .redux-typography-style").select2("destroy"),a("#"+g+" .redux-typography-style").html(x),a("#"+g+" .redux-typography-style").select2(d),a("#"+g+" .redux-typography-subsets").parent().fadeOut("fast"),a("#"+g+" .typography-family-backup").fadeOut("fast"));a("#"+g+" .redux-typography-font-family").val(h)}else a(e).hasClass("redux-typography-family-backup")&&""!==j&&a("#"+g+" .redux-typography-font-family-backup").val(j);0===a("#"+g+" select.redux-typography-style option[value='"+s+"']").length?(s="",a("#"+g+" select.redux-typography-style").select2("val","")):"400"===s&&a("#"+g+" select.redux-typography-style").select2("val",s),0===a("#"+g+" select.redux-typography-subsets option[value='"+t+"']").length&&(t="",a("#"+g+" select.redux-typography-subsets").select2("val",""),a("#"+g+" input.typography-subsets").val(t));var z="style_link_"+g;if(a("."+z).remove(),null!==h&&"inherit"!==h&&a("#"+g).hasClass("typography-initialized")){var A=h.replace(/\s+/g,"+");if(i===!0){var B=A;s&&""!==s&&(B+=":"+s.replace(/\-/g," ")),t&&""!==t&&(B+="&subset="+t),c===!1&&"undefined"!=typeof WebFont&&WebFont&&WebFont.load({google:{families:[B]}}),a("#"+g+" .redux-typography-google").val(!0)}else a("#"+g+" .redux-typography-google").val(!1)}if(-1!==s.indexOf("italic")?(a("#"+g+" .typography-preview").css("font-style","italic"),a("#"+g+" .typography-font-style").val("italic"),s=s.replace("italic","")):(a("#"+g+" .typography-preview").css("font-style","normal"),a("#"+g+" .typography-font-style").val("")),a("#"+g+" .typography-font-weight").val(s),l||(l=k),""===k||void 0===k?a("#"+g+" .typography-font-size").val(""):a("#"+g+" .typography-font-size").val(k+v),""===l||void 0===l?a("#"+g+" .typography-line-height").val(""):a("#"+g+" .typography-line-height").val(l+v),""===m||void 0===m?a("#"+g+" .typography-word-spacing").val(""):a("#"+g+" .typography-word-spacing").val(m+v),""===n||void 0===n?a("#"+g+" .typography-letter-spacing").val(""):a("#"+g+" .typography-letter-spacing").val(n+v),a("#"+g).hasClass("typography-initialized")){var C=a("#"+g+" .typography-preview").data("preview-size");"0"==C&&a("#"+g+" .typography-preview").css("font-size",k+v),a("#"+g+" .typography-preview").css("font-weight",s),a("#"+g+" .typography-preview").css("font-family",h+", sans-serif"),"none"===h&&""===h&&a("#"+g+" .typography-preview").css("font-family","inherit"),a("#"+g+" .typography-preview").css("line-height",l+v),a("#"+g+" .typography-preview").css("word-spacing",m+v),a("#"+g+" .typography-preview").css("letter-spacing",n+v),u&&(a("#"+g+" .typography-preview").css("color",u),a("#"+g+" .typography-preview").css("background-color",redux.field_objects.typography.contrastColour(u))),a("#"+g+" .typography-style .select2-chosen").text(a("#"+g+" .redux-typography-style option:selected").text()),a("#"+g+" .typography-script .select2-chosen").text(a("#"+g+" .redux-typography-subsets option:selected").text()),o&&a("#"+g+" .typography-preview").css("text-align",o),p&&a("#"+g+" .typography-preview").css("text-transform",p),q&&a("#"+g+" .typography-preview").css("font-variant",q),r&&a("#"+g+" .typography-preview").css("text-decoration",r),a("#"+g+" .typography-preview").slideDown()}a("#"+g).hasClass("typography-initialized")||a("#"+g).addClass("typography-initialized"),c=!1,f||redux_change(e)}}(jQuery);
includes/options/redux-core/inc/fields/typography/googlefonts.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return json_decode( '{"ABeeZee":{"variants":[{"id":"400","name":"Normal 400"},{"id":"400italic","name":"Normal 400 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Abel":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Abril Fatface":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Aclonica":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Acme":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Actor":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Adamina":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Advent Pro":{"variants":[{"id":"100","name":"Ultra-Light 100"},{"id":"200","name":"Light 200"},{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"500","name":"Medium 500"},{"id":"600","name":"Semi-Bold 600"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"greek","name":"Greek"},{"id":"latin-ext","name":"Latin Extended"}]},"Aguafina Script":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Akronim":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Aladin":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Aldrich":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Alef":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"hebrew","name":"Hebrew"}]},"Alegreya":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"900","name":"Ultra-Bold 900"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"},{"id":"900italic","name":"Ultra-Bold 900 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Alegreya SC":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"900","name":"Ultra-Bold 900"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"},{"id":"900italic","name":"Ultra-Bold 900 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Alegreya Sans":{"variants":[{"id":"100","name":"Ultra-Light 100"},{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"500","name":"Medium 500"},{"id":"700","name":"Bold 700"},{"id":"800","name":"Extra-Bold 800"},{"id":"900","name":"Ultra-Bold 900"},{"id":"100italic","name":"Ultra-Light 100 Italic"},{"id":"300italic","name":"Book 300 Italic"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"500italic","name":"Medium 500 Italic"},{"id":"700italic","name":"Bold 700 Italic"},{"id":"800italic","name":"Extra-Bold 800 Italic"},{"id":"900italic","name":"Ultra-Bold 900 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"vietnamese","name":"Vietnamese"},{"id":"latin-ext","name":"Latin Extended"}]},"Alegreya Sans SC":{"variants":[{"id":"100","name":"Ultra-Light 100"},{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"500","name":"Medium 500"},{"id":"700","name":"Bold 700"},{"id":"800","name":"Extra-Bold 800"},{"id":"900","name":"Ultra-Bold 900"},{"id":"100italic","name":"Ultra-Light 100 Italic"},{"id":"300italic","name":"Book 300 Italic"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"500italic","name":"Medium 500 Italic"},{"id":"700italic","name":"Bold 700 Italic"},{"id":"800italic","name":"Extra-Bold 800 Italic"},{"id":"900italic","name":"Ultra-Bold 900 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"vietnamese","name":"Vietnamese"},{"id":"latin-ext","name":"Latin Extended"}]},"Alex Brush":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Alfa Slab One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Alice":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Alike":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Alike Angular":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Allan":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Allerta":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Allerta Stencil":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Allura":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Almendra":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Almendra Display":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Almendra SC":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Amarante":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Amaranth":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Amatic SC":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Amethysta":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Amiri":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"arabic","name":"Arabic"},{"id":"latin","name":"Latin"}]},"Amita":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"devanagari","name":"Devanagari"},{"id":"latin-ext","name":"Latin Extended"}]},"Anaheim":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Andada":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Andika":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"cyrillic","name":"Cyrillic"},{"id":"cyrillic-ext","name":"Cyrillic Extended"},{"id":"latin-ext","name":"Latin Extended"}]},"Angkor":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"khmer","name":"Khmer"}]},"Annie Use Your Telescope":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Anonymous Pro":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"greek","name":"Greek"},{"id":"cyrillic","name":"Cyrillic"},{"id":"latin-ext","name":"Latin Extended"}]},"Antic":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Antic Didone":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Antic Slab":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Anton":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Arapey":{"variants":[{"id":"400","name":"Normal 400"},{"id":"400italic","name":"Normal 400 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Arbutus":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Arbutus Slab":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Architects Daughter":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Archivo Black":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Archivo Narrow":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Arimo":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"vietnamese","name":"Vietnamese"},{"id":"greek","name":"Greek"},{"id":"cyrillic","name":"Cyrillic"},{"id":"greek-ext","name":"Greek Extended"},{"id":"cyrillic-ext","name":"Cyrillic Extended"},{"id":"latin-ext","name":"Latin Extended"},{"id":"hebrew","name":"Hebrew"}]},"Arizonia":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Armata":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Artifika":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Arvo":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Arya":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"devanagari","name":"Devanagari"},{"id":"latin-ext","name":"Latin Extended"}]},"Asap":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Asar":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"devanagari","name":"Devanagari"},{"id":"latin-ext","name":"Latin Extended"}]},"Asset":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Astloch":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"}]},"Asul":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"}]},"Atomic Age":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Aubrey":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Audiowide":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Autour One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Average":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Average Sans":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Averia Gruesa Libre":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Averia Libre":{"variants":[{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"300italic","name":"Book 300 Italic"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Averia Sans Libre":{"variants":[{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"300italic","name":"Book 300 Italic"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Averia Serif Libre":{"variants":[{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"300italic","name":"Book 300 Italic"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Bad Script":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"cyrillic","name":"Cyrillic"}]},"Balthazar":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Bangers":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Basic":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Battambang":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"khmer","name":"Khmer"}]},"Baumans":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Bayon":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"khmer","name":"Khmer"}]},"Belgrano":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Belleza":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"BenchNine":{"variants":[{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Bentham":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Berkshire Swash":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Bevan":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Bigelow Rules":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Bigshot One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Bilbo":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Bilbo Swash Caps":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Biryani":{"variants":[{"id":"200","name":"Light 200"},{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"600","name":"Semi-Bold 600"},{"id":"700","name":"Bold 700"},{"id":"800","name":"Extra-Bold 800"},{"id":"900","name":"Ultra-Bold 900"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"devanagari","name":"Devanagari"},{"id":"latin-ext","name":"Latin Extended"}]},"Bitter":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Black Ops One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Bokor":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"khmer","name":"Khmer"}]},"Bonbon":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Boogaloo":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Bowlby One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Bowlby One SC":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Brawler":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Bree Serif":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Bubblegum Sans":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Bubbler One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Buda":{"variants":[{"id":"300","name":"Book 300"}],"subsets":[{"id":"latin","name":"Latin"}]},"Buenard":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Butcherman":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Butterfly Kids":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Cabin":{"variants":[{"id":"400","name":"Normal 400"},{"id":"500","name":"Medium 500"},{"id":"600","name":"Semi-Bold 600"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"500italic","name":"Medium 500 Italic"},{"id":"600italic","name":"Semi-Bold 600 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cabin Condensed":{"variants":[{"id":"400","name":"Normal 400"},{"id":"500","name":"Medium 500"},{"id":"600","name":"Semi-Bold 600"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cabin Sketch":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"}]},"Caesar Dressing":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cagliostro":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Calligraffitti":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cambay":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"devanagari","name":"Devanagari"},{"id":"latin-ext","name":"Latin Extended"}]},"Cambo":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Candal":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cantarell":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cantata One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Cantora One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Capriola":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Cardo":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"greek","name":"Greek"},{"id":"greek-ext","name":"Greek Extended"},{"id":"latin-ext","name":"Latin Extended"}]},"Carme":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Carrois Gothic":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Carrois Gothic SC":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Carter One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Catamaran":{"variants":[{"id":"100","name":"Ultra-Light 100"},{"id":"200","name":"Light 200"},{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"500","name":"Medium 500"},{"id":"600","name":"Semi-Bold 600"},{"id":"700","name":"Bold 700"},{"id":"800","name":"Extra-Bold 800"},{"id":"900","name":"Ultra-Bold 900"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"},{"id":"tamil","name":"Tamil"}]},"Caudex":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"greek","name":"Greek"},{"id":"greek-ext","name":"Greek Extended"},{"id":"latin-ext","name":"Latin Extended"}]},"Caveat":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Caveat Brush":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Cedarville Cursive":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Ceviche One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Changa One":{"variants":[{"id":"400","name":"Normal 400"},{"id":"400italic","name":"Normal 400 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Chango":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Chau Philomene One":{"variants":[{"id":"400","name":"Normal 400"},{"id":"400italic","name":"Normal 400 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Chela One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Chelsea Market":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Chenla":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"khmer","name":"Khmer"}]},"Cherry Cream Soda":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cherry Swash":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Chewy":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Chicle":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Chivo":{"variants":[{"id":"400","name":"Normal 400"},{"id":"900","name":"Ultra-Bold 900"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"900italic","name":"Ultra-Bold 900 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Chonburi":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"vietnamese","name":"Vietnamese"},{"id":"latin-ext","name":"Latin Extended"},{"id":"thai","name":"Thai"}]},"Cinzel":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"900","name":"Ultra-Bold 900"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cinzel Decorative":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"900","name":"Ultra-Bold 900"}],"subsets":[{"id":"latin","name":"Latin"}]},"Clicker Script":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Coda":{"variants":[{"id":"400","name":"Normal 400"},{"id":"800","name":"Extra-Bold 800"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Coda Caption":{"variants":[{"id":"800","name":"Extra-Bold 800"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Codystar":{"variants":[{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Combo":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Comfortaa":{"variants":[{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"greek","name":"Greek"},{"id":"cyrillic","name":"Cyrillic"},{"id":"cyrillic-ext","name":"Cyrillic Extended"},{"id":"latin-ext","name":"Latin Extended"}]},"Coming Soon":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Concert One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Condiment":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Content":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"khmer","name":"Khmer"}]},"Contrail One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Convergence":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cookie":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Copse":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Corben":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Courgette":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Cousine":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"vietnamese","name":"Vietnamese"},{"id":"greek","name":"Greek"},{"id":"cyrillic","name":"Cyrillic"},{"id":"greek-ext","name":"Greek Extended"},{"id":"cyrillic-ext","name":"Cyrillic Extended"},{"id":"latin-ext","name":"Latin Extended"},{"id":"hebrew","name":"Hebrew"}]},"Coustard":{"variants":[{"id":"400","name":"Normal 400"},{"id":"900","name":"Ultra-Bold 900"}],"subsets":[{"id":"latin","name":"Latin"}]},"Covered By Your Grace":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Crafty Girls":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Creepster":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Crete Round":{"variants":[{"id":"400","name":"Normal 400"},{"id":"400italic","name":"Normal 400 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Crimson Text":{"variants":[{"id":"400","name":"Normal 400"},{"id":"600","name":"Semi-Bold 600"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"600italic","name":"Semi-Bold 600 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Croissant One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Crushed":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Cuprum":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"cyrillic","name":"Cyrillic"},{"id":"latin-ext","name":"Latin Extended"}]},"Cutive":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Cutive Mono":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Damion":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Dancing Script":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"}]},"Dangrek":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"khmer","name":"Khmer"}]},"Dawning of a New Day":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Days One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Dekko":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"devanagari","name":"Devanagari"},{"id":"latin-ext","name":"Latin Extended"}]},"Delius":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Delius Swash Caps":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Delius Unicase":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"}]},"Della Respira":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Denk One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Devonshire":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Dhurjati":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"telugu","name":"Telugu"}]},"Didact Gothic":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"greek","name":"Greek"},{"id":"cyrillic","name":"Cyrillic"},{"id":"greek-ext","name":"Greek Extended"},{"id":"cyrillic-ext","name":"Cyrillic Extended"},{"id":"latin-ext","name":"Latin Extended"}]},"Diplomata":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Diplomata SC":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Domine":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Donegal One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Doppio One":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Dorsa":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Dosis":{"variants":[{"id":"200","name":"Light 200"},{"id":"300","name":"Book 300"},{"id":"400","name":"Normal 400"},{"id":"500","name":"Medium 500"},{"id":"600","name":"Semi-Bold 600"},{"id":"700","name":"Bold 700"},{"id":"800","name":"Extra-Bold 800"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Dr Sugiyama":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Droid Sans":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"}],"subsets":[{"id":"latin","name":"Latin"}]},"Droid Sans Mono":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"}]},"Droid Serif":{"variants":[{"id":"400","name":"Normal 400"},{"id":"700","name":"Bold 700"},{"id":"400italic","name":"Normal 400 Italic"},{"id":"700italic","name":"Bold 700 Italic"}],"subsets":[{"id":"latin","name":"Latin"}]},"Duru Sans":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"Dynalight":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"latin-ext","name":"Latin Extended"}]},"EB Garamond":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id":"latin","name":"Latin"},{"id":"vietnamese","name":"Vietnamese"},{"id":"cyrillic","name":"Cyrillic"},{"id":"cyrillic-ext","name":"Cyrillic Extended"},{"id":"latin-ext","name":"Latin Extended"}]},"Eagle Lake":{"variants":[{"id":"400","name":"Normal 400"}],"subsets":[{"id"