stump-cli 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1310) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +3 -16
  6. data/Rakefile +2 -0
  7. data/bin/stump-cli +58 -0
  8. data/lib/stump-cli/version.rb +3 -0
  9. data/lib/stump.rb +5 -0
  10. data/lib/wp/Movefile-example +62 -0
  11. data/lib/wp/README.md +25 -0
  12. data/lib/wp/index.php +17 -0
  13. data/lib/wp/license.txt +385 -0
  14. data/lib/wp/readme.html +96 -0
  15. data/lib/wp/wp-activate.php +131 -0
  16. data/lib/wp/wp-admin/about.php +193 -0
  17. data/lib/wp/wp-admin/admin-ajax.php +98 -0
  18. data/lib/wp/wp-admin/admin-footer.php +99 -0
  19. data/lib/wp/wp-admin/admin-functions.php +15 -0
  20. data/lib/wp/wp-admin/admin-header.php +243 -0
  21. data/lib/wp/wp-admin/admin-post.php +71 -0
  22. data/lib/wp/wp-admin/admin.php +347 -0
  23. data/lib/wp/wp-admin/async-upload.php +114 -0
  24. data/lib/wp/wp-admin/comment.php +299 -0
  25. data/lib/wp/wp-admin/credits.php +192 -0
  26. data/lib/wp/wp-admin/css/about-rtl.css +446 -0
  27. data/lib/wp/wp-admin/css/about.css +446 -0
  28. data/lib/wp/wp-admin/css/admin-menu-rtl.css +917 -0
  29. data/lib/wp/wp-admin/css/admin-menu.css +917 -0
  30. data/lib/wp/wp-admin/css/color-picker-rtl.css +127 -0
  31. data/lib/wp/wp-admin/css/color-picker-rtl.min.css +1 -0
  32. data/lib/wp/wp-admin/css/color-picker.css +127 -0
  33. data/lib/wp/wp-admin/css/color-picker.min.css +1 -0
  34. data/lib/wp/wp-admin/css/colors/_admin.scss +525 -0
  35. data/lib/wp/wp-admin/css/colors/_mixins.scss +43 -0
  36. data/lib/wp/wp-admin/css/colors/_variables.scss +58 -0
  37. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.css +341 -0
  38. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.min.css +1 -0
  39. data/lib/wp/wp-admin/css/colors/blue/colors.css +341 -0
  40. data/lib/wp/wp-admin/css/colors/blue/colors.min.css +1 -0
  41. data/lib/wp/wp-admin/css/colors/blue/colors.scss +11 -0
  42. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.css +341 -0
  43. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.min.css +1 -0
  44. data/lib/wp/wp-admin/css/colors/coffee/colors.css +341 -0
  45. data/lib/wp/wp-admin/css/colors/coffee/colors.min.css +1 -0
  46. data/lib/wp/wp-admin/css/colors/coffee/colors.scss +7 -0
  47. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.css +341 -0
  48. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.min.css +1 -0
  49. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.css +341 -0
  50. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.min.css +1 -0
  51. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.scss +8 -0
  52. data/lib/wp/wp-admin/css/colors/light/colors-rtl.css +349 -0
  53. data/lib/wp/wp-admin/css/colors/light/colors-rtl.min.css +1 -0
  54. data/lib/wp/wp-admin/css/colors/light/colors.css +349 -0
  55. data/lib/wp/wp-admin/css/colors/light/colors.min.css +1 -0
  56. data/lib/wp/wp-admin/css/colors/light/colors.scss +38 -0
  57. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.css +341 -0
  58. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.min.css +1 -0
  59. data/lib/wp/wp-admin/css/colors/midnight/colors.css +341 -0
  60. data/lib/wp/wp-admin/css/colors/midnight/colors.min.css +1 -0
  61. data/lib/wp/wp-admin/css/colors/midnight/colors.scss +5 -0
  62. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.css +341 -0
  63. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.min.css +1 -0
  64. data/lib/wp/wp-admin/css/colors/ocean/colors.css +341 -0
  65. data/lib/wp/wp-admin/css/colors/ocean/colors.min.css +1 -0
  66. data/lib/wp/wp-admin/css/colors/ocean/colors.scss +8 -0
  67. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.css +341 -0
  68. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.min.css +1 -0
  69. data/lib/wp/wp-admin/css/colors/sunrise/colors.css +341 -0
  70. data/lib/wp/wp-admin/css/colors/sunrise/colors.min.css +1 -0
  71. data/lib/wp/wp-admin/css/colors/sunrise/colors.scss +6 -0
  72. data/lib/wp/wp-admin/css/common-rtl.css +3212 -0
  73. data/lib/wp/wp-admin/css/common.css +3212 -0
  74. data/lib/wp/wp-admin/css/customize-controls-rtl.css +889 -0
  75. data/lib/wp/wp-admin/css/customize-controls-rtl.min.css +1 -0
  76. data/lib/wp/wp-admin/css/customize-controls.css +889 -0
  77. data/lib/wp/wp-admin/css/customize-controls.min.css +1 -0
  78. data/lib/wp/wp-admin/css/customize-widgets-rtl.css +603 -0
  79. data/lib/wp/wp-admin/css/customize-widgets-rtl.min.css +1 -0
  80. data/lib/wp/wp-admin/css/customize-widgets.css +603 -0
  81. data/lib/wp/wp-admin/css/customize-widgets.min.css +1 -0
  82. data/lib/wp/wp-admin/css/dashboard-rtl.css +1116 -0
  83. data/lib/wp/wp-admin/css/dashboard.css +1116 -0
  84. data/lib/wp/wp-admin/css/deprecated-media-rtl.css +371 -0
  85. data/lib/wp/wp-admin/css/deprecated-media-rtl.min.css +1 -0
  86. data/lib/wp/wp-admin/css/deprecated-media.css +371 -0
  87. data/lib/wp/wp-admin/css/deprecated-media.min.css +1 -0
  88. data/lib/wp/wp-admin/css/edit-rtl.css +1501 -0
  89. data/lib/wp/wp-admin/css/edit.css +1501 -0
  90. data/lib/wp/wp-admin/css/farbtastic-rtl.css +41 -0
  91. data/lib/wp/wp-admin/css/farbtastic.css +41 -0
  92. data/lib/wp/wp-admin/css/forms-rtl.css +992 -0
  93. data/lib/wp/wp-admin/css/forms.css +992 -0
  94. data/lib/wp/wp-admin/css/ie-rtl.css +785 -0
  95. data/lib/wp/wp-admin/css/ie-rtl.min.css +1 -0
  96. data/lib/wp/wp-admin/css/ie.css +785 -0
  97. data/lib/wp/wp-admin/css/ie.min.css +1 -0
  98. data/lib/wp/wp-admin/css/install-rtl.css +389 -0
  99. data/lib/wp/wp-admin/css/install-rtl.min.css +1 -0
  100. data/lib/wp/wp-admin/css/install.css +389 -0
  101. data/lib/wp/wp-admin/css/install.min.css +1 -0
  102. data/lib/wp/wp-admin/css/l10n-rtl.css +101 -0
  103. data/lib/wp/wp-admin/css/l10n.css +101 -0
  104. data/lib/wp/wp-admin/css/list-tables-rtl.css +1875 -0
  105. data/lib/wp/wp-admin/css/list-tables.css +1875 -0
  106. data/lib/wp/wp-admin/css/login-rtl.css +269 -0
  107. data/lib/wp/wp-admin/css/login-rtl.min.css +1 -0
  108. data/lib/wp/wp-admin/css/login.css +269 -0
  109. data/lib/wp/wp-admin/css/login.min.css +1 -0
  110. data/lib/wp/wp-admin/css/media-rtl.css +1196 -0
  111. data/lib/wp/wp-admin/css/media.css +1196 -0
  112. data/lib/wp/wp-admin/css/nav-menus-rtl.css +857 -0
  113. data/lib/wp/wp-admin/css/nav-menus.css +857 -0
  114. data/lib/wp/wp-admin/css/press-this-rtl.css +458 -0
  115. data/lib/wp/wp-admin/css/press-this.css +458 -0
  116. data/lib/wp/wp-admin/css/revisions-rtl.css +574 -0
  117. data/lib/wp/wp-admin/css/revisions.css +574 -0
  118. data/lib/wp/wp-admin/css/themes-rtl.css +1732 -0
  119. data/lib/wp/wp-admin/css/themes.css +1732 -0
  120. data/lib/wp/wp-admin/css/widgets-rtl.css +577 -0
  121. data/lib/wp/wp-admin/css/widgets.css +577 -0
  122. data/lib/wp/wp-admin/css/wp-admin-rtl.css +14 -0
  123. data/lib/wp/wp-admin/css/wp-admin-rtl.min.css +1 -0
  124. data/lib/wp/wp-admin/css/wp-admin.css +14 -0
  125. data/lib/wp/wp-admin/css/wp-admin.min.css +1 -0
  126. data/lib/wp/wp-admin/custom-background.php +482 -0
  127. data/lib/wp/wp-admin/custom-header.php +1366 -0
  128. data/lib/wp/wp-admin/customize.php +278 -0
  129. data/lib/wp/wp-admin/edit-comments.php +254 -0
  130. data/lib/wp/wp-admin/edit-form-advanced.php +636 -0
  131. data/lib/wp/wp-admin/edit-form-comment.php +160 -0
  132. data/lib/wp/wp-admin/edit-link-form.php +150 -0
  133. data/lib/wp/wp-admin/edit-tag-form.php +204 -0
  134. data/lib/wp/wp-admin/edit-tags.php +591 -0
  135. data/lib/wp/wp-admin/edit.php +330 -0
  136. data/lib/wp/wp-admin/export.php +243 -0
  137. data/lib/wp/wp-admin/freedoms.php +57 -0
  138. data/lib/wp/wp-admin/images/align-center-2x.png +0 -0
  139. data/lib/wp/wp-admin/images/align-center.png +0 -0
  140. data/lib/wp/wp-admin/images/align-left-2x.png +0 -0
  141. data/lib/wp/wp-admin/images/align-left.png +0 -0
  142. data/lib/wp/wp-admin/images/align-none-2x.png +0 -0
  143. data/lib/wp/wp-admin/images/align-none.png +0 -0
  144. data/lib/wp/wp-admin/images/align-right-2x.png +0 -0
  145. data/lib/wp/wp-admin/images/align-right.png +0 -0
  146. data/lib/wp/wp-admin/images/arrows-2x.png +0 -0
  147. data/lib/wp/wp-admin/images/arrows.png +0 -0
  148. data/lib/wp/wp-admin/images/bubble_bg-2x.gif +0 -0
  149. data/lib/wp/wp-admin/images/bubble_bg.gif +0 -0
  150. data/lib/wp/wp-admin/images/comment-grey-bubble-2x.png +0 -0
  151. data/lib/wp/wp-admin/images/comment-grey-bubble.png +0 -0
  152. data/lib/wp/wp-admin/images/date-button-2x.gif +0 -0
  153. data/lib/wp/wp-admin/images/date-button.gif +0 -0
  154. data/lib/wp/wp-admin/images/generic.png +0 -0
  155. data/lib/wp/wp-admin/images/icons32-2x.png +0 -0
  156. data/lib/wp/wp-admin/images/icons32-vs-2x.png +0 -0
  157. data/lib/wp/wp-admin/images/icons32-vs.png +0 -0
  158. data/lib/wp/wp-admin/images/icons32.png +0 -0
  159. data/lib/wp/wp-admin/images/imgedit-icons-2x.png +0 -0
  160. data/lib/wp/wp-admin/images/imgedit-icons.png +0 -0
  161. data/lib/wp/wp-admin/images/list-2x.png +0 -0
  162. data/lib/wp/wp-admin/images/list.png +0 -0
  163. data/lib/wp/wp-admin/images/loading.gif +0 -0
  164. data/lib/wp/wp-admin/images/marker.png +0 -0
  165. data/lib/wp/wp-admin/images/mask.png +0 -0
  166. data/lib/wp/wp-admin/images/media-button-2x.png +0 -0
  167. data/lib/wp/wp-admin/images/media-button-image.gif +0 -0
  168. data/lib/wp/wp-admin/images/media-button-music.gif +0 -0
  169. data/lib/wp/wp-admin/images/media-button-other.gif +0 -0
  170. data/lib/wp/wp-admin/images/media-button-video.gif +0 -0
  171. data/lib/wp/wp-admin/images/media-button.png +0 -0
  172. data/lib/wp/wp-admin/images/menu-2x.png +0 -0
  173. data/lib/wp/wp-admin/images/menu-vs-2x.png +0 -0
  174. data/lib/wp/wp-admin/images/menu-vs.png +0 -0
  175. data/lib/wp/wp-admin/images/menu.png +0 -0
  176. data/lib/wp/wp-admin/images/no.png +0 -0
  177. data/lib/wp/wp-admin/images/post-formats-vs.png +0 -0
  178. data/lib/wp/wp-admin/images/post-formats.png +0 -0
  179. data/lib/wp/wp-admin/images/post-formats32-vs.png +0 -0
  180. data/lib/wp/wp-admin/images/post-formats32.png +0 -0
  181. data/lib/wp/wp-admin/images/resize-2x.gif +0 -0
  182. data/lib/wp/wp-admin/images/resize-rtl-2x.gif +0 -0
  183. data/lib/wp/wp-admin/images/resize-rtl.gif +0 -0
  184. data/lib/wp/wp-admin/images/resize.gif +0 -0
  185. data/lib/wp/wp-admin/images/se.png +0 -0
  186. data/lib/wp/wp-admin/images/sort-2x.gif +0 -0
  187. data/lib/wp/wp-admin/images/sort.gif +0 -0
  188. data/lib/wp/wp-admin/images/spinner-2x.gif +0 -0
  189. data/lib/wp/wp-admin/images/spinner.gif +0 -0
  190. data/lib/wp/wp-admin/images/stars-2x.png +0 -0
  191. data/lib/wp/wp-admin/images/stars.png +0 -0
  192. data/lib/wp/wp-admin/images/w-logo-blue.png +0 -0
  193. data/lib/wp/wp-admin/images/w-logo-white.png +0 -0
  194. data/lib/wp/wp-admin/images/wheel.png +0 -0
  195. data/lib/wp/wp-admin/images/wordpress-logo-white.svg +1 -0
  196. data/lib/wp/wp-admin/images/wordpress-logo.png +0 -0
  197. data/lib/wp/wp-admin/images/wordpress-logo.svg +1 -0
  198. data/lib/wp/wp-admin/images/wpspin_light-2x.gif +0 -0
  199. data/lib/wp/wp-admin/images/wpspin_light.gif +0 -0
  200. data/lib/wp/wp-admin/images/xit-2x.gif +0 -0
  201. data/lib/wp/wp-admin/images/xit.gif +0 -0
  202. data/lib/wp/wp-admin/images/yes.png +0 -0
  203. data/lib/wp/wp-admin/import.php +132 -0
  204. data/lib/wp/wp-admin/includes/admin.php +74 -0
  205. data/lib/wp/wp-admin/includes/ajax-actions.php +2762 -0
  206. data/lib/wp/wp-admin/includes/bookmark.php +305 -0
  207. data/lib/wp/wp-admin/includes/class-ftp-pure.php +190 -0
  208. data/lib/wp/wp-admin/includes/class-ftp-sockets.php +250 -0
  209. data/lib/wp/wp-admin/includes/class-ftp.php +907 -0
  210. data/lib/wp/wp-admin/includes/class-pclzip.php +5687 -0
  211. data/lib/wp/wp-admin/includes/class-wp-comments-list-table.php +637 -0
  212. data/lib/wp/wp-admin/includes/class-wp-filesystem-base.php +815 -0
  213. data/lib/wp/wp-admin/includes/class-wp-filesystem-direct.php +384 -0
  214. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpext.php +415 -0
  215. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpsockets.php +352 -0
  216. data/lib/wp/wp-admin/includes/class-wp-filesystem-ssh2.php +392 -0
  217. data/lib/wp/wp-admin/includes/class-wp-importer.php +302 -0
  218. data/lib/wp/wp-admin/includes/class-wp-links-list-table.php +207 -0
  219. data/lib/wp/wp-admin/includes/class-wp-list-table.php +1080 -0
  220. data/lib/wp/wp-admin/includes/class-wp-media-list-table.php +574 -0
  221. data/lib/wp/wp-admin/includes/class-wp-ms-sites-list-table.php +402 -0
  222. data/lib/wp/wp-admin/includes/class-wp-ms-themes-list-table.php +459 -0
  223. data/lib/wp/wp-admin/includes/class-wp-ms-users-list-table.php +303 -0
  224. data/lib/wp/wp-admin/includes/class-wp-plugin-install-list-table.php +490 -0
  225. data/lib/wp/wp-admin/includes/class-wp-plugins-list-table.php +605 -0
  226. data/lib/wp/wp-admin/includes/class-wp-posts-list-table.php +1306 -0
  227. data/lib/wp/wp-admin/includes/class-wp-terms-list-table.php +466 -0
  228. data/lib/wp/wp-admin/includes/class-wp-theme-install-list-table.php +431 -0
  229. data/lib/wp/wp-admin/includes/class-wp-themes-list-table.php +279 -0
  230. data/lib/wp/wp-admin/includes/class-wp-upgrader-skins.php +767 -0
  231. data/lib/wp/wp-admin/includes/class-wp-upgrader.php +2676 -0
  232. data/lib/wp/wp-admin/includes/class-wp-users-list-table.php +459 -0
  233. data/lib/wp/wp-admin/includes/comment.php +171 -0
  234. data/lib/wp/wp-admin/includes/continents-cities.php +493 -0
  235. data/lib/wp/wp-admin/includes/dashboard.php +1333 -0
  236. data/lib/wp/wp-admin/includes/deprecated.php +1190 -0
  237. data/lib/wp/wp-admin/includes/export.php +508 -0
  238. data/lib/wp/wp-admin/includes/file.php +1152 -0
  239. data/lib/wp/wp-admin/includes/image-edit.php +828 -0
  240. data/lib/wp/wp-admin/includes/image.php +598 -0
  241. data/lib/wp/wp-admin/includes/import.php +206 -0
  242. data/lib/wp/wp-admin/includes/list-table.php +113 -0
  243. data/lib/wp/wp-admin/includes/media.php +3012 -0
  244. data/lib/wp/wp-admin/includes/menu.php +322 -0
  245. data/lib/wp/wp-admin/includes/meta-boxes.php +1119 -0
  246. data/lib/wp/wp-admin/includes/misc.php +845 -0
  247. data/lib/wp/wp-admin/includes/ms-deprecated.php +78 -0
  248. data/lib/wp/wp-admin/includes/ms.php +814 -0
  249. data/lib/wp/wp-admin/includes/nav-menu.php +1328 -0
  250. data/lib/wp/wp-admin/includes/plugin-install.php +550 -0
  251. data/lib/wp/wp-admin/includes/plugin.php +1899 -0
  252. data/lib/wp/wp-admin/includes/post.php +1661 -0
  253. data/lib/wp/wp-admin/includes/revision.php +228 -0
  254. data/lib/wp/wp-admin/includes/schema.php +1038 -0
  255. data/lib/wp/wp-admin/includes/screen.php +1179 -0
  256. data/lib/wp/wp-admin/includes/taxonomy.php +284 -0
  257. data/lib/wp/wp-admin/includes/template.php +2157 -0
  258. data/lib/wp/wp-admin/includes/theme-install.php +205 -0
  259. data/lib/wp/wp-admin/includes/theme.php +474 -0
  260. data/lib/wp/wp-admin/includes/translation-install.php +240 -0
  261. data/lib/wp/wp-admin/includes/update-core.php +1186 -0
  262. data/lib/wp/wp-admin/includes/update.php +432 -0
  263. data/lib/wp/wp-admin/includes/upgrade.php +2218 -0
  264. data/lib/wp/wp-admin/includes/user.php +442 -0
  265. data/lib/wp/wp-admin/includes/widgets.php +245 -0
  266. data/lib/wp/wp-admin/index.php +131 -0
  267. data/lib/wp/wp-admin/install-helper.php +199 -0
  268. data/lib/wp/wp-admin/install.php +305 -0
  269. data/lib/wp/wp-admin/js/accordion.js +143 -0
  270. data/lib/wp/wp-admin/js/accordion.min.js +1 -0
  271. data/lib/wp/wp-admin/js/color-picker.js +155 -0
  272. data/lib/wp/wp-admin/js/color-picker.min.js +1 -0
  273. data/lib/wp/wp-admin/js/comment.js +50 -0
  274. data/lib/wp/wp-admin/js/comment.min.js +1 -0
  275. data/lib/wp/wp-admin/js/common.js +804 -0
  276. data/lib/wp/wp-admin/js/common.min.js +1 -0
  277. data/lib/wp/wp-admin/js/custom-background.js +75 -0
  278. data/lib/wp/wp-admin/js/custom-background.min.js +1 -0
  279. data/lib/wp/wp-admin/js/custom-header.js +61 -0
  280. data/lib/wp/wp-admin/js/customize-controls.js +1305 -0
  281. data/lib/wp/wp-admin/js/customize-controls.min.js +1 -0
  282. data/lib/wp/wp-admin/js/customize-widgets.js +1882 -0
  283. data/lib/wp/wp-admin/js/customize-widgets.min.js +1 -0
  284. data/lib/wp/wp-admin/js/dashboard.js +190 -0
  285. data/lib/wp/wp-admin/js/dashboard.min.js +1 -0
  286. data/lib/wp/wp-admin/js/edit-comments.js +625 -0
  287. data/lib/wp/wp-admin/js/edit-comments.min.js +1 -0
  288. data/lib/wp/wp-admin/js/editor-expand.js +705 -0
  289. data/lib/wp/wp-admin/js/editor-expand.min.js +1 -0
  290. data/lib/wp/wp-admin/js/editor.js +324 -0
  291. data/lib/wp/wp-admin/js/editor.min.js +1 -0
  292. data/lib/wp/wp-admin/js/farbtastic.js +276 -0
  293. data/lib/wp/wp-admin/js/gallery.js +237 -0
  294. data/lib/wp/wp-admin/js/gallery.min.js +1 -0
  295. data/lib/wp/wp-admin/js/image-edit.js +633 -0
  296. data/lib/wp/wp-admin/js/image-edit.min.js +1 -0
  297. data/lib/wp/wp-admin/js/inline-edit-post.js +359 -0
  298. data/lib/wp/wp-admin/js/inline-edit-post.min.js +1 -0
  299. data/lib/wp/wp-admin/js/inline-edit-tax.js +142 -0
  300. data/lib/wp/wp-admin/js/inline-edit-tax.min.js +1 -0
  301. data/lib/wp/wp-admin/js/iris.min.js +4 -0
  302. data/lib/wp/wp-admin/js/language-chooser.js +26 -0
  303. data/lib/wp/wp-admin/js/language-chooser.min.js +1 -0
  304. data/lib/wp/wp-admin/js/link.js +69 -0
  305. data/lib/wp/wp-admin/js/link.min.js +1 -0
  306. data/lib/wp/wp-admin/js/media-gallery.js +26 -0
  307. data/lib/wp/wp-admin/js/media-gallery.min.js +1 -0
  308. data/lib/wp/wp-admin/js/media-upload.js +69 -0
  309. data/lib/wp/wp-admin/js/media-upload.min.js +1 -0
  310. data/lib/wp/wp-admin/js/media.js +111 -0
  311. data/lib/wp/wp-admin/js/media.min.js +1 -0
  312. data/lib/wp/wp-admin/js/nav-menu.js +1205 -0
  313. data/lib/wp/wp-admin/js/nav-menu.min.js +1 -0
  314. data/lib/wp/wp-admin/js/password-strength-meter.js +75 -0
  315. data/lib/wp/wp-admin/js/password-strength-meter.min.js +1 -0
  316. data/lib/wp/wp-admin/js/plugin-install.js +76 -0
  317. data/lib/wp/wp-admin/js/plugin-install.min.js +1 -0
  318. data/lib/wp/wp-admin/js/post.js +1094 -0
  319. data/lib/wp/wp-admin/js/post.min.js +1 -0
  320. data/lib/wp/wp-admin/js/postbox.js +199 -0
  321. data/lib/wp/wp-admin/js/postbox.min.js +1 -0
  322. data/lib/wp/wp-admin/js/revisions.js +1110 -0
  323. data/lib/wp/wp-admin/js/revisions.min.js +1 -0
  324. data/lib/wp/wp-admin/js/set-post-thumbnail.js +24 -0
  325. data/lib/wp/wp-admin/js/set-post-thumbnail.min.js +1 -0
  326. data/lib/wp/wp-admin/js/svg-painter.js +240 -0
  327. data/lib/wp/wp-admin/js/svg-painter.min.js +1 -0
  328. data/lib/wp/wp-admin/js/tags.js +72 -0
  329. data/lib/wp/wp-admin/js/tags.min.js +1 -0
  330. data/lib/wp/wp-admin/js/theme.js +1691 -0
  331. data/lib/wp/wp-admin/js/theme.min.js +1 -0
  332. data/lib/wp/wp-admin/js/updates.js +65 -0
  333. data/lib/wp/wp-admin/js/updates.min.js +1 -0
  334. data/lib/wp/wp-admin/js/user-profile.js +127 -0
  335. data/lib/wp/wp-admin/js/user-profile.min.js +1 -0
  336. data/lib/wp/wp-admin/js/user-suggest.js +30 -0
  337. data/lib/wp/wp-admin/js/user-suggest.min.js +1 -0
  338. data/lib/wp/wp-admin/js/widgets.js +494 -0
  339. data/lib/wp/wp-admin/js/widgets.min.js +1 -0
  340. data/lib/wp/wp-admin/js/word-count.js +44 -0
  341. data/lib/wp/wp-admin/js/word-count.min.js +1 -0
  342. data/lib/wp/wp-admin/js/wp-fullscreen.js +704 -0
  343. data/lib/wp/wp-admin/js/wp-fullscreen.min.js +1 -0
  344. data/lib/wp/wp-admin/js/xfn.js +17 -0
  345. data/lib/wp/wp-admin/js/xfn.min.js +1 -0
  346. data/lib/wp/wp-admin/link-add.php +29 -0
  347. data/lib/wp/wp-admin/link-manager.php +99 -0
  348. data/lib/wp/wp-admin/link-parse-opml.php +84 -0
  349. data/lib/wp/wp-admin/link.php +117 -0
  350. data/lib/wp/wp-admin/load-scripts.php +162 -0
  351. data/lib/wp/wp-admin/load-styles.php +153 -0
  352. data/lib/wp/wp-admin/maint/repair.php +124 -0
  353. data/lib/wp/wp-admin/media-new.php +84 -0
  354. data/lib/wp/wp-admin/media-upload.php +100 -0
  355. data/lib/wp/wp-admin/media.php +146 -0
  356. data/lib/wp/wp-admin/menu-header.php +227 -0
  357. data/lib/wp/wp-admin/menu.php +255 -0
  358. data/lib/wp/wp-admin/moderation.php +12 -0
  359. data/lib/wp/wp-admin/ms-admin.php +13 -0
  360. data/lib/wp/wp-admin/ms-delete-site.php +91 -0
  361. data/lib/wp/wp-admin/ms-edit.php +13 -0
  362. data/lib/wp/wp-admin/ms-options.php +12 -0
  363. data/lib/wp/wp-admin/ms-sites.php +13 -0
  364. data/lib/wp/wp-admin/ms-themes.php +13 -0
  365. data/lib/wp/wp-admin/ms-upgrade-network.php +13 -0
  366. data/lib/wp/wp-admin/ms-users.php +13 -0
  367. data/lib/wp/wp-admin/my-sites.php +145 -0
  368. data/lib/wp/wp-admin/nav-menus.php +798 -0
  369. data/lib/wp/wp-admin/network.php +561 -0
  370. data/lib/wp/wp-admin/network/about.php +16 -0
  371. data/lib/wp/wp-admin/network/admin.php +32 -0
  372. data/lib/wp/wp-admin/network/credits.php +16 -0
  373. data/lib/wp/wp-admin/network/edit.php +42 -0
  374. data/lib/wp/wp-admin/network/freedoms.php +16 -0
  375. data/lib/wp/wp-admin/network/index.php +79 -0
  376. data/lib/wp/wp-admin/network/menu.php +63 -0
  377. data/lib/wp/wp-admin/network/plugin-editor.php +16 -0
  378. data/lib/wp/wp-admin/network/plugin-install.php +19 -0
  379. data/lib/wp/wp-admin/network/plugins.php +16 -0
  380. data/lib/wp/wp-admin/network/profile.php +16 -0
  381. data/lib/wp/wp-admin/network/settings.php +347 -0
  382. data/lib/wp/wp-admin/network/setup.php +16 -0
  383. data/lib/wp/wp-admin/network/site-info.php +178 -0
  384. data/lib/wp/wp-admin/network/site-new.php +153 -0
  385. data/lib/wp/wp-admin/network/site-settings.php +173 -0
  386. data/lib/wp/wp-admin/network/site-themes.php +185 -0
  387. data/lib/wp/wp-admin/network/site-users.php +319 -0
  388. data/lib/wp/wp-admin/network/sites.php +275 -0
  389. data/lib/wp/wp-admin/network/theme-editor.php +16 -0
  390. data/lib/wp/wp-admin/network/theme-install.php +19 -0
  391. data/lib/wp/wp-admin/network/themes.php +291 -0
  392. data/lib/wp/wp-admin/network/update-core.php +16 -0
  393. data/lib/wp/wp-admin/network/update.php +19 -0
  394. data/lib/wp/wp-admin/network/upgrade.php +120 -0
  395. data/lib/wp/wp-admin/network/user-edit.php +16 -0
  396. data/lib/wp/wp-admin/network/user-new.php +106 -0
  397. data/lib/wp/wp-admin/network/users.php +296 -0
  398. data/lib/wp/wp-admin/options-discussion.php +273 -0
  399. data/lib/wp/wp-admin/options-general.php +355 -0
  400. data/lib/wp/wp-admin/options-head.php +18 -0
  401. data/lib/wp/wp-admin/options-media.php +136 -0
  402. data/lib/wp/wp-admin/options-permalink.php +289 -0
  403. data/lib/wp/wp-admin/options-reading.php +184 -0
  404. data/lib/wp/wp-admin/options-writing.php +194 -0
  405. data/lib/wp/wp-admin/options.php +265 -0
  406. data/lib/wp/wp-admin/plugin-editor.php +279 -0
  407. data/lib/wp/wp-admin/plugin-install.php +134 -0
  408. data/lib/wp/wp-admin/plugins.php +474 -0
  409. data/lib/wp/wp-admin/post-new.php +74 -0
  410. data/lib/wp/wp-admin/post.php +318 -0
  411. data/lib/wp/wp-admin/press-this.php +691 -0
  412. data/lib/wp/wp-admin/profile.php +18 -0
  413. data/lib/wp/wp-admin/revision.php +221 -0
  414. data/lib/wp/wp-admin/setup-config.php +345 -0
  415. data/lib/wp/wp-admin/theme-editor.php +243 -0
  416. data/lib/wp/wp-admin/theme-install.php +278 -0
  417. data/lib/wp/wp-admin/themes.php +374 -0
  418. data/lib/wp/wp-admin/tools.php +75 -0
  419. data/lib/wp/wp-admin/update-core.php +653 -0
  420. data/lib/wp/wp-admin/update.php +272 -0
  421. data/lib/wp/wp-admin/upgrade-functions.php +12 -0
  422. data/lib/wp/wp-admin/upgrade.php +116 -0
  423. data/lib/wp/wp-admin/upload.php +292 -0
  424. data/lib/wp/wp-admin/user-edit.php +557 -0
  425. data/lib/wp/wp-admin/user-new.php +439 -0
  426. data/lib/wp/wp-admin/user/about.php +13 -0
  427. data/lib/wp/wp-admin/user/admin.php +32 -0
  428. data/lib/wp/wp-admin/user/credits.php +13 -0
  429. data/lib/wp/wp-admin/user/freedoms.php +13 -0
  430. data/lib/wp/wp-admin/user/index.php +12 -0
  431. data/lib/wp/wp-admin/user/menu.php +22 -0
  432. data/lib/wp/wp-admin/user/profile.php +12 -0
  433. data/lib/wp/wp-admin/user/user-edit.php +12 -0
  434. data/lib/wp/wp-admin/users.php +460 -0
  435. data/lib/wp/wp-admin/widgets.php +442 -0
  436. data/lib/wp/wp-blog-header.php +18 -0
  437. data/lib/wp/wp-comments-post.php +164 -0
  438. data/lib/wp/wp-config-sample.php +80 -0
  439. data/lib/wp/wp-content/index.php +2 -0
  440. data/lib/wp/wp-content/plugins/hello.php +82 -0
  441. data/lib/wp/wp-content/plugins/index.php +2 -0
  442. data/lib/wp/wp-content/themes/index.php +2 -0
  443. data/lib/wp/wp-content/themes/stump/.editorconfig +11 -0
  444. data/lib/wp/wp-content/themes/stump/.jshintrc +16 -0
  445. data/lib/wp/wp-content/themes/stump/404.php +13 -0
  446. data/lib/wp/wp-content/themes/stump/CHANGELOG.md +333 -0
  447. data/lib/wp/wp-content/themes/stump/CONTRIBUTING.md +121 -0
  448. data/lib/wp/wp-content/themes/stump/Gruntfile.js +151 -0
  449. data/lib/wp/wp-content/themes/stump/LICENSE.md +19 -0
  450. data/lib/wp/wp-content/themes/stump/assets/coffee/build/.gitkeep +0 -0
  451. data/lib/wp/wp-content/themes/stump/assets/coffee/build/site.js +6 -0
  452. data/lib/wp/wp-content/themes/stump/assets/css/editor-style.css +548 -0
  453. data/lib/wp/wp-content/themes/stump/assets/css/main.min.css +4 -0
  454. data/lib/wp/wp-content/themes/stump/assets/css/main.min.css.map +7 -0
  455. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  456. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  457. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  458. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  459. data/lib/wp/wp-content/themes/stump/assets/img/.gitignore +0 -0
  460. data/lib/wp/wp-content/themes/stump/assets/js/_main.js +63 -0
  461. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/affix.js +137 -0
  462. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/alert.js +88 -0
  463. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/button.js +107 -0
  464. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/carousel.js +205 -0
  465. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/collapse.js +170 -0
  466. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/dropdown.js +147 -0
  467. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/modal.js +243 -0
  468. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/popover.js +110 -0
  469. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/scrollspy.js +153 -0
  470. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tab.js +125 -0
  471. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tooltip.js +399 -0
  472. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/transition.js +48 -0
  473. data/lib/wp/wp-content/themes/stump/assets/js/scripts.min.js +1 -0
  474. data/lib/wp/wp-content/themes/stump/assets/js/vendor/jquery-1.11.0.min.js +4 -0
  475. data/lib/wp/wp-content/themes/stump/assets/js/vendor/modernizr-2.7.0.min.js +4 -0
  476. data/lib/wp/wp-content/themes/stump/assets/sass/app.scss +9 -0
  477. data/lib/wp/wp-content/themes/stump/assets/sass/core/_variables.scss +1 -0
  478. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_alerts.scss +67 -0
  479. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_badges.scss +55 -0
  480. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_bootstrap.scss +49 -0
  481. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_breadcrumbs.scss +26 -0
  482. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_button-groups.scss +226 -0
  483. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_buttons.scss +159 -0
  484. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_carousel.scss +232 -0
  485. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_close.scss +35 -0
  486. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_code.scss +63 -0
  487. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_component-animations.scss +29 -0
  488. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_dropdowns.scss +213 -0
  489. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_forms.scss +436 -0
  490. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_glyphicons.scss +233 -0
  491. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_grid.scss +84 -0
  492. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_input-groups.scss +162 -0
  493. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_jumbotron.scss +44 -0
  494. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_labels.scss +64 -0
  495. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_list-group.scss +110 -0
  496. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_media.scss +56 -0
  497. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_mixins.scss +947 -0
  498. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_modals.scss +139 -0
  499. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navbar.scss +620 -0
  500. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navs.scss +242 -0
  501. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_normalize.scss +423 -0
  502. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pager.scss +55 -0
  503. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pagination.scss +88 -0
  504. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_panels.scss +241 -0
  505. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_popovers.scss +133 -0
  506. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_print.scss +101 -0
  507. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_progress-bars.scss +80 -0
  508. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_responsive-utilities.scss +74 -0
  509. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_scaffolding.scss +134 -0
  510. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tables.scss +233 -0
  511. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_theme.scss +247 -0
  512. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_thumbnails.scss +38 -0
  513. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tooltip.scss +95 -0
  514. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_type.scss +284 -0
  515. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_utilities.scss +56 -0
  516. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_variables.scss +833 -0
  517. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_wells.scss +29 -0
  518. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon-deprecated-upcoming.scss +13 -0
  519. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon.scss +59 -0
  520. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_button.scss +273 -0
  521. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_clearfix.scss +29 -0
  522. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_font-family.scss +5 -0
  523. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_hide-text.scss +5 -0
  524. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_html5-input-types.scss +56 -0
  525. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_position.scss +42 -0
  526. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_prefixer.scss +49 -0
  527. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_retina-image.scss +32 -0
  528. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_size.scss +44 -0
  529. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_timing-functions.scss +32 -0
  530. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_triangle.scss +45 -0
  531. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_animation.scss +52 -0
  532. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_appearance.scss +3 -0
  533. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_backface-visibility.scss +6 -0
  534. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background-image.scss +48 -0
  535. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background.scss +103 -0
  536. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-image.scss +55 -0
  537. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-radius.scss +22 -0
  538. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_box-sizing.scss +4 -0
  539. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_columns.scss +47 -0
  540. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_flex-box.scss +52 -0
  541. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_font-face.scss +23 -0
  542. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_hidpi-media-query.scss +10 -0
  543. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_image-rendering.scss +13 -0
  544. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_inline-block.scss +8 -0
  545. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_keyframes.scss +43 -0
  546. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_linear-gradient.scss +41 -0
  547. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_perspective.scss +8 -0
  548. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_placeholder.scss +29 -0
  549. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_radial-gradient.scss +44 -0
  550. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transform.scss +15 -0
  551. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transition.scss +34 -0
  552. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_user-select.scss +3 -0
  553. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_compact.scss +11 -0
  554. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_flex-grid.scss +39 -0
  555. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_grid-width.scss +13 -0
  556. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_linear-gradient.scss +13 -0
  557. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_modular-scale.scss +40 -0
  558. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_px-to-em.scss +8 -0
  559. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_radial-gradient.scss +23 -0
  560. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_tint-shade.scss +9 -0
  561. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_transition-property-name.scss +22 -0
  562. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_deprecated-webkit-gradient.scss +39 -0
  563. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  564. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_linear-positions-parser.scss +61 -0
  565. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss +69 -0
  566. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-positions-parser.scss +18 -0
  567. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_render-gradients.scss +26 -0
  568. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_shape-size-stripper.scss +10 -0
  569. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan.sass +11 -0
  570. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_grid.sass +161 -0
  571. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass +63 -0
  572. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_utilities.sass +24 -0
  573. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_variables.sass +42 -0
  574. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat-helpers.scss +8 -0
  575. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat.scss +21 -0
  576. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_new-breakpoint.scss +16 -0
  577. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_private.scss +107 -0
  578. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_px-to-em.scss +3 -0
  579. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_fill-parent.scss +7 -0
  580. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_grid.scss +5 -0
  581. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_media.scss +51 -0
  582. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_omega.scss +79 -0
  583. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_outer-container.scss +8 -0
  584. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_pad.scss +8 -0
  585. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_private.scss +50 -0
  586. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_reset.scss +12 -0
  587. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_row.scss +17 -0
  588. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_shift.scss +9 -0
  589. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_span-columns.scss +38 -0
  590. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_to-deprecate.scss +57 -0
  591. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_visual-grid.scss +41 -0
  592. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_grid.scss +7 -0
  593. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_visual-grid.scss +5 -0
  594. data/lib/wp/wp-content/themes/stump/base.php +36 -0
  595. data/lib/wp/wp-content/themes/stump/functions.php +19 -0
  596. data/lib/wp/wp-content/themes/stump/index.php +21 -0
  597. data/lib/wp/wp-content/themes/stump/lang/ar.mo +0 -0
  598. data/lib/wp/wp-content/themes/stump/lang/ar.po +270 -0
  599. data/lib/wp/wp-content/themes/stump/lang/bg_BG.mo +0 -0
  600. data/lib/wp/wp-content/themes/stump/lang/bg_BG.po +338 -0
  601. data/lib/wp/wp-content/themes/stump/lang/ca.mo +0 -0
  602. data/lib/wp/wp-content/themes/stump/lang/ca.po +517 -0
  603. data/lib/wp/wp-content/themes/stump/lang/da_DK.mo +0 -0
  604. data/lib/wp/wp-content/themes/stump/lang/da_DK.po +305 -0
  605. data/lib/wp/wp-content/themes/stump/lang/de_DE.mo +0 -0
  606. data/lib/wp/wp-content/themes/stump/lang/de_DE.po +271 -0
  607. data/lib/wp/wp-content/themes/stump/lang/el.mo +0 -0
  608. data/lib/wp/wp-content/themes/stump/lang/el.po +319 -0
  609. data/lib/wp/wp-content/themes/stump/lang/es_ES.mo +0 -0
  610. data/lib/wp/wp-content/themes/stump/lang/es_ES.po +270 -0
  611. data/lib/wp/wp-content/themes/stump/lang/et.mo +0 -0
  612. data/lib/wp/wp-content/themes/stump/lang/et.po +262 -0
  613. data/lib/wp/wp-content/themes/stump/lang/fa_IR.mo +0 -0
  614. data/lib/wp/wp-content/themes/stump/lang/fa_IR.po +273 -0
  615. data/lib/wp/wp-content/themes/stump/lang/fi_FI.mo +0 -0
  616. data/lib/wp/wp-content/themes/stump/lang/fi_FI.po +367 -0
  617. data/lib/wp/wp-content/themes/stump/lang/fr_FR.mo +0 -0
  618. data/lib/wp/wp-content/themes/stump/lang/fr_FR.po +336 -0
  619. data/lib/wp/wp-content/themes/stump/lang/he_IL.mo +0 -0
  620. data/lib/wp/wp-content/themes/stump/lang/he_IL.po +336 -0
  621. data/lib/wp/wp-content/themes/stump/lang/hu_HU.mo +0 -0
  622. data/lib/wp/wp-content/themes/stump/lang/hu_HU.po +271 -0
  623. data/lib/wp/wp-content/themes/stump/lang/id_ID.mo +0 -0
  624. data/lib/wp/wp-content/themes/stump/lang/id_ID.po +278 -0
  625. data/lib/wp/wp-content/themes/stump/lang/it_IT.mo +0 -0
  626. data/lib/wp/wp-content/themes/stump/lang/it_IT.po +269 -0
  627. data/lib/wp/wp-content/themes/stump/lang/ja.mo +0 -0
  628. data/lib/wp/wp-content/themes/stump/lang/ja.po +267 -0
  629. data/lib/wp/wp-content/themes/stump/lang/ko_KR.mo +0 -0
  630. data/lib/wp/wp-content/themes/stump/lang/ko_KR.po +282 -0
  631. data/lib/wp/wp-content/themes/stump/lang/mk_MK.mo +0 -0
  632. data/lib/wp/wp-content/themes/stump/lang/mk_MK.po +297 -0
  633. data/lib/wp/wp-content/themes/stump/lang/ms_MY.mo +0 -0
  634. data/lib/wp/wp-content/themes/stump/lang/ms_MY.po +342 -0
  635. data/lib/wp/wp-content/themes/stump/lang/nb_NO.mo +0 -0
  636. data/lib/wp/wp-content/themes/stump/lang/nb_NO.po +517 -0
  637. data/lib/wp/wp-content/themes/stump/lang/nl_NL.mo +0 -0
  638. data/lib/wp/wp-content/themes/stump/lang/nl_NL.po +261 -0
  639. data/lib/wp/wp-content/themes/stump/lang/nn_NO.mo +0 -0
  640. data/lib/wp/wp-content/themes/stump/lang/nn_NO.po +517 -0
  641. data/lib/wp/wp-content/themes/stump/lang/pl_PL.mo +0 -0
  642. data/lib/wp/wp-content/themes/stump/lang/pl_PL.po +283 -0
  643. data/lib/wp/wp-content/themes/stump/lang/pt_BR.mo +0 -0
  644. data/lib/wp/wp-content/themes/stump/lang/pt_BR.po +394 -0
  645. data/lib/wp/wp-content/themes/stump/lang/ro_RO.mo +0 -0
  646. data/lib/wp/wp-content/themes/stump/lang/ro_RO.po +271 -0
  647. data/lib/wp/wp-content/themes/stump/lang/roots.pot +244 -0
  648. data/lib/wp/wp-content/themes/stump/lang/ru_RU.mo +0 -0
  649. data/lib/wp/wp-content/themes/stump/lang/ru_RU.po +255 -0
  650. data/lib/wp/wp-content/themes/stump/lang/sk_SK.mo +0 -0
  651. data/lib/wp/wp-content/themes/stump/lang/sk_SK.po +267 -0
  652. data/lib/wp/wp-content/themes/stump/lang/sr_RS.mo +0 -0
  653. data/lib/wp/wp-content/themes/stump/lang/sr_RS.pot +261 -0
  654. data/lib/wp/wp-content/themes/stump/lang/sv_SE.mo +0 -0
  655. data/lib/wp/wp-content/themes/stump/lang/sv_SE.po +323 -0
  656. data/lib/wp/wp-content/themes/stump/lang/tr_TR.mo +0 -0
  657. data/lib/wp/wp-content/themes/stump/lang/tr_TR.po +405 -0
  658. data/lib/wp/wp-content/themes/stump/lang/vi_VN.mo +0 -0
  659. data/lib/wp/wp-content/themes/stump/lang/vi_VN.po +516 -0
  660. data/lib/wp/wp-content/themes/stump/lang/zh_CN.mo +0 -0
  661. data/lib/wp/wp-content/themes/stump/lang/zh_CN.po +329 -0
  662. data/lib/wp/wp-content/themes/stump/lang/zh_TW.mo +0 -0
  663. data/lib/wp/wp-content/themes/stump/lang/zh_TW.po +261 -0
  664. data/lib/wp/wp-content/themes/stump/lib/activation.php +215 -0
  665. data/lib/wp/wp-content/themes/stump/lib/cleanup.php +261 -0
  666. data/lib/wp/wp-content/themes/stump/lib/comments.php +52 -0
  667. data/lib/wp/wp-content/themes/stump/lib/config.php +79 -0
  668. data/lib/wp/wp-content/themes/stump/lib/custom.php +4 -0
  669. data/lib/wp/wp-content/themes/stump/lib/gallery.php +130 -0
  670. data/lib/wp/wp-content/themes/stump/lib/init.php +25 -0
  671. data/lib/wp/wp-content/themes/stump/lib/nav.php +93 -0
  672. data/lib/wp/wp-content/themes/stump/lib/relative-urls.php +50 -0
  673. data/lib/wp/wp-content/themes/stump/lib/scripts.php +67 -0
  674. data/lib/wp/wp-content/themes/stump/lib/sidebar.php +43 -0
  675. data/lib/wp/wp-content/themes/stump/lib/titles.php +37 -0
  676. data/lib/wp/wp-content/themes/stump/lib/utils.php +14 -0
  677. data/lib/wp/wp-content/themes/stump/lib/widgets.php +133 -0
  678. data/lib/wp/wp-content/themes/stump/lib/wrapper.php +49 -0
  679. data/lib/wp/wp-content/themes/stump/package.json +32 -0
  680. data/lib/wp/wp-content/themes/stump/page.php +2 -0
  681. data/lib/wp/wp-content/themes/stump/screenshot.png +0 -0
  682. data/lib/wp/wp-content/themes/stump/single.php +1 -0
  683. data/lib/wp/wp-content/themes/stump/style.css +11 -0
  684. data/lib/wp/wp-content/themes/stump/template-custom.php +8 -0
  685. data/lib/wp/wp-content/themes/stump/templates/comment.php +14 -0
  686. data/lib/wp/wp-content/themes/stump/templates/comments.php +80 -0
  687. data/lib/wp/wp-content/themes/stump/templates/content-page.php +4 -0
  688. data/lib/wp/wp-content/themes/stump/templates/content-single.php +15 -0
  689. data/lib/wp/wp-content/themes/stump/templates/content.php +9 -0
  690. data/lib/wp/wp-content/themes/stump/templates/entry-meta.php +2 -0
  691. data/lib/wp/wp-content/themes/stump/templates/footer.php +8 -0
  692. data/lib/wp/wp-content/themes/stump/templates/head.php +12 -0
  693. data/lib/wp/wp-content/themes/stump/templates/header-top-navbar.php +21 -0
  694. data/lib/wp/wp-content/themes/stump/templates/header.php +14 -0
  695. data/lib/wp/wp-content/themes/stump/templates/page-header.php +5 -0
  696. data/lib/wp/wp-content/themes/stump/templates/searchform.php +9 -0
  697. data/lib/wp/wp-content/themes/stump/templates/sidebar.php +1 -0
  698. data/lib/wp/wp-content/themes/twentyfourteen/404.php +32 -0
  699. data/lib/wp/wp-content/themes/twentyfourteen/archive.php +74 -0
  700. data/lib/wp/wp-content/themes/twentyfourteen/author.php +74 -0
  701. data/lib/wp/wp-content/themes/twentyfourteen/category.php +58 -0
  702. data/lib/wp/wp-content/themes/twentyfourteen/comments.php +66 -0
  703. data/lib/wp/wp-content/themes/twentyfourteen/content-aside.php +57 -0
  704. data/lib/wp/wp-content/themes/twentyfourteen/content-audio.php +57 -0
  705. data/lib/wp/wp-content/themes/twentyfourteen/content-featured-post.php +34 -0
  706. data/lib/wp/wp-content/themes/twentyfourteen/content-gallery.php +57 -0
  707. data/lib/wp/wp-content/themes/twentyfourteen/content-image.php +57 -0
  708. data/lib/wp/wp-content/themes/twentyfourteen/content-link.php +57 -0
  709. data/lib/wp/wp-content/themes/twentyfourteen/content-none.php +31 -0
  710. data/lib/wp/wp-content/themes/twentyfourteen/content-page.php +31 -0
  711. data/lib/wp/wp-content/themes/twentyfourteen/content-quote.php +57 -0
  712. data/lib/wp/wp-content/themes/twentyfourteen/content-video.php +57 -0
  713. data/lib/wp/wp-content/themes/twentyfourteen/content.php +66 -0
  714. data/lib/wp/wp-content/themes/twentyfourteen/css/editor-style.css +717 -0
  715. data/lib/wp/wp-content/themes/twentyfourteen/css/ie.css +1335 -0
  716. data/lib/wp/wp-content/themes/twentyfourteen/featured-content.php +39 -0
  717. data/lib/wp/wp-content/themes/twentyfourteen/footer.php +28 -0
  718. data/lib/wp/wp-content/themes/twentyfourteen/functions.php +519 -0
  719. data/lib/wp/wp-content/themes/twentyfourteen/genericons/COPYING.txt +9 -0
  720. data/lib/wp/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf +0 -0
  721. data/lib/wp/wp-content/themes/twentyfourteen/genericons/LICENSE.txt +339 -0
  722. data/lib/wp/wp-content/themes/twentyfourteen/genericons/README.txt +123 -0
  723. data/lib/wp/wp-content/themes/twentyfourteen/genericons/example.html +464 -0
  724. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot +0 -0
  725. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg +135 -0
  726. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf +0 -0
  727. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff +0 -0
  728. data/lib/wp/wp-content/themes/twentyfourteen/genericons/genericons.css +197 -0
  729. data/lib/wp/wp-content/themes/twentyfourteen/header.php +65 -0
  730. data/lib/wp/wp-content/themes/twentyfourteen/image.php +79 -0
  731. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-dark.svg +16 -0
  732. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-light.svg +6 -0
  733. data/lib/wp/wp-content/themes/twentyfourteen/inc/back-compat.php +63 -0
  734. data/lib/wp/wp-content/themes/twentyfourteen/inc/custom-header.php +147 -0
  735. data/lib/wp/wp-content/themes/twentyfourteen/inc/customizer.php +114 -0
  736. data/lib/wp/wp-content/themes/twentyfourteen/inc/featured-content.php +531 -0
  737. data/lib/wp/wp-content/themes/twentyfourteen/inc/template-tags.php +203 -0
  738. data/lib/wp/wp-content/themes/twentyfourteen/inc/widgets.php +269 -0
  739. data/lib/wp/wp-content/themes/twentyfourteen/index.php +61 -0
  740. data/lib/wp/wp-content/themes/twentyfourteen/js/customizer.js +38 -0
  741. data/lib/wp/wp-content/themes/twentyfourteen/js/featured-content-admin.js +9 -0
  742. data/lib/wp/wp-content/themes/twentyfourteen/js/functions.js +134 -0
  743. data/lib/wp/wp-content/themes/twentyfourteen/js/html5.js +8 -0
  744. data/lib/wp/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js +21 -0
  745. data/lib/wp/wp-content/themes/twentyfourteen/js/slider.js +598 -0
  746. data/lib/wp/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot +467 -0
  747. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/contributors.php +52 -0
  748. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/full-width.php +42 -0
  749. data/lib/wp/wp-content/themes/twentyfourteen/page.php +48 -0
  750. data/lib/wp/wp-content/themes/twentyfourteen/rtl.css +854 -0
  751. data/lib/wp/wp-content/themes/twentyfourteen/screenshot.png +0 -0
  752. data/lib/wp/wp-content/themes/twentyfourteen/search.php +49 -0
  753. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-content.php +16 -0
  754. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-footer.php +19 -0
  755. data/lib/wp/wp-content/themes/twentyfourteen/sidebar.php +29 -0
  756. data/lib/wp/wp-content/themes/twentyfourteen/single.php +40 -0
  757. data/lib/wp/wp-content/themes/twentyfourteen/style.css +4321 -0
  758. data/lib/wp/wp-content/themes/twentyfourteen/tag.php +60 -0
  759. data/lib/wp/wp-content/themes/twentyfourteen/taxonomy-post_format.php +85 -0
  760. data/lib/wp/wp-cron.php +115 -0
  761. data/lib/wp/wp-includes/ID3/getid3.lib.php +1376 -0
  762. data/lib/wp/wp-includes/ID3/getid3.php +1796 -0
  763. data/lib/wp/wp-includes/ID3/license.commercial.txt +27 -0
  764. data/lib/wp/wp-includes/ID3/license.txt +29 -0
  765. data/lib/wp/wp-includes/ID3/module.audio-video.asf.php +2013 -0
  766. data/lib/wp/wp-includes/ID3/module.audio-video.flv.php +745 -0
  767. data/lib/wp/wp-includes/ID3/module.audio-video.matroska.php +1751 -0
  768. data/lib/wp/wp-includes/ID3/module.audio-video.quicktime.php +2246 -0
  769. data/lib/wp/wp-includes/ID3/module.audio-video.riff.php +2586 -0
  770. data/lib/wp/wp-includes/ID3/module.audio.ac3.php +474 -0
  771. data/lib/wp/wp-includes/ID3/module.audio.dts.php +291 -0
  772. data/lib/wp/wp-includes/ID3/module.audio.flac.php +443 -0
  773. data/lib/wp/wp-includes/ID3/module.audio.mp3.php +2012 -0
  774. data/lib/wp/wp-includes/ID3/module.audio.ogg.php +756 -0
  775. data/lib/wp/wp-includes/ID3/module.tag.apetag.php +371 -0
  776. data/lib/wp/wp-includes/ID3/module.tag.id3v1.php +360 -0
  777. data/lib/wp/wp-includes/ID3/module.tag.id3v2.php +3424 -0
  778. data/lib/wp/wp-includes/ID3/module.tag.lyrics3.php +294 -0
  779. data/lib/wp/wp-includes/ID3/readme.txt +604 -0
  780. data/lib/wp/wp-includes/SimplePie/Author.php +157 -0
  781. data/lib/wp/wp-includes/SimplePie/Cache.php +133 -0
  782. data/lib/wp/wp-includes/SimplePie/Cache/Base.php +114 -0
  783. data/lib/wp/wp-includes/SimplePie/Cache/DB.php +137 -0
  784. data/lib/wp/wp-includes/SimplePie/Cache/File.php +173 -0
  785. data/lib/wp/wp-includes/SimplePie/Cache/Memcache.php +183 -0
  786. data/lib/wp/wp-includes/SimplePie/Cache/MySQL.php +438 -0
  787. data/lib/wp/wp-includes/SimplePie/Caption.php +210 -0
  788. data/lib/wp/wp-includes/SimplePie/Category.php +157 -0
  789. data/lib/wp/wp-includes/SimplePie/Content/Type/Sniffer.php +332 -0
  790. data/lib/wp/wp-includes/SimplePie/Copyright.php +130 -0
  791. data/lib/wp/wp-includes/SimplePie/Core.php +57 -0
  792. data/lib/wp/wp-includes/SimplePie/Credit.php +156 -0
  793. data/lib/wp/wp-includes/SimplePie/Decode/HTML/Entities.php +617 -0
  794. data/lib/wp/wp-includes/SimplePie/Enclosure.php +1380 -0
  795. data/lib/wp/wp-includes/SimplePie/Exception.php +52 -0
  796. data/lib/wp/wp-includes/SimplePie/File.php +292 -0
  797. data/lib/wp/wp-includes/SimplePie/HTTP/Parser.php +500 -0
  798. data/lib/wp/wp-includes/SimplePie/IRI.php +1238 -0
  799. data/lib/wp/wp-includes/SimplePie/Item.php +2964 -0
  800. data/lib/wp/wp-includes/SimplePie/Locator.php +372 -0
  801. data/lib/wp/wp-includes/SimplePie/Misc.php +2247 -0
  802. data/lib/wp/wp-includes/SimplePie/Net/IPv6.php +276 -0
  803. data/lib/wp/wp-includes/SimplePie/Parse/Date.php +983 -0
  804. data/lib/wp/wp-includes/SimplePie/Parser.php +407 -0
  805. data/lib/wp/wp-includes/SimplePie/Rating.php +129 -0
  806. data/lib/wp/wp-includes/SimplePie/Registry.php +225 -0
  807. data/lib/wp/wp-includes/SimplePie/Restriction.php +155 -0
  808. data/lib/wp/wp-includes/SimplePie/Sanitize.php +554 -0
  809. data/lib/wp/wp-includes/SimplePie/Source.php +611 -0
  810. data/lib/wp/wp-includes/SimplePie/XML/Declaration/Parser.php +362 -0
  811. data/lib/wp/wp-includes/SimplePie/gzdecode.php +371 -0
  812. data/lib/wp/wp-includes/Text/Diff.php +450 -0
  813. data/lib/wp/wp-includes/Text/Diff/Engine/native.php +436 -0
  814. data/lib/wp/wp-includes/Text/Diff/Engine/shell.php +162 -0
  815. data/lib/wp/wp-includes/Text/Diff/Engine/string.php +248 -0
  816. data/lib/wp/wp-includes/Text/Diff/Engine/xdiff.php +64 -0
  817. data/lib/wp/wp-includes/Text/Diff/Renderer.php +235 -0
  818. data/lib/wp/wp-includes/Text/Diff/Renderer/inline.php +206 -0
  819. data/lib/wp/wp-includes/admin-bar.php +870 -0
  820. data/lib/wp/wp-includes/atomlib.php +352 -0
  821. data/lib/wp/wp-includes/author-template.php +471 -0
  822. data/lib/wp/wp-includes/bookmark-template.php +298 -0
  823. data/lib/wp/wp-includes/bookmark.php +416 -0
  824. data/lib/wp/wp-includes/cache.php +704 -0
  825. data/lib/wp/wp-includes/canonical.php +586 -0
  826. data/lib/wp/wp-includes/capabilities.php +1539 -0
  827. data/lib/wp/wp-includes/category-template.php +1407 -0
  828. data/lib/wp/wp-includes/category.php +343 -0
  829. data/lib/wp/wp-includes/certificates/ca-bundle.crt +3785 -0
  830. data/lib/wp/wp-includes/class-IXR.php +1100 -0
  831. data/lib/wp/wp-includes/class-feed.php +140 -0
  832. data/lib/wp/wp-includes/class-http.php +2245 -0
  833. data/lib/wp/wp-includes/class-json.php +936 -0
  834. data/lib/wp/wp-includes/class-oembed.php +579 -0
  835. data/lib/wp/wp-includes/class-phpass.php +260 -0
  836. data/lib/wp/wp-includes/class-phpmailer.php +3265 -0
  837. data/lib/wp/wp-includes/class-pop3.php +652 -0
  838. data/lib/wp/wp-includes/class-simplepie.php +3119 -0
  839. data/lib/wp/wp-includes/class-smtp.php +943 -0
  840. data/lib/wp/wp-includes/class-snoopy.php +1256 -0
  841. data/lib/wp/wp-includes/class-wp-admin-bar.php +517 -0
  842. data/lib/wp/wp-includes/class-wp-ajax-response.php +199 -0
  843. data/lib/wp/wp-includes/class-wp-customize-control.php +1124 -0
  844. data/lib/wp/wp-includes/class-wp-customize-manager.php +1272 -0
  845. data/lib/wp/wp-includes/class-wp-customize-panel.php +200 -0
  846. data/lib/wp/wp-includes/class-wp-customize-section.php +196 -0
  847. data/lib/wp/wp-includes/class-wp-customize-setting.php +554 -0
  848. data/lib/wp/wp-includes/class-wp-customize-widgets.php +1556 -0
  849. data/lib/wp/wp-includes/class-wp-editor.php +1435 -0
  850. data/lib/wp/wp-includes/class-wp-embed.php +373 -0
  851. data/lib/wp/wp-includes/class-wp-error.php +276 -0
  852. data/lib/wp/wp-includes/class-wp-http-ixr-client.php +97 -0
  853. data/lib/wp/wp-includes/class-wp-image-editor-gd.php +459 -0
  854. data/lib/wp/wp-includes/class-wp-image-editor-imagick.php +512 -0
  855. data/lib/wp/wp-includes/class-wp-image-editor.php +475 -0
  856. data/lib/wp/wp-includes/class-wp-theme.php +1235 -0
  857. data/lib/wp/wp-includes/class-wp-walker.php +471 -0
  858. data/lib/wp/wp-includes/class-wp-xmlrpc-server.php +5984 -0
  859. data/lib/wp/wp-includes/class-wp.php +782 -0
  860. data/lib/wp/wp-includes/class.wp-dependencies.php +509 -0
  861. data/lib/wp/wp-includes/class.wp-scripts.php +247 -0
  862. data/lib/wp/wp-includes/class.wp-styles.php +210 -0
  863. data/lib/wp/wp-includes/comment-template.php +2286 -0
  864. data/lib/wp/wp-includes/comment.php +2606 -0
  865. data/lib/wp/wp-includes/compat.php +125 -0
  866. data/lib/wp/wp-includes/cron.php +469 -0
  867. data/lib/wp/wp-includes/css/admin-bar-rtl.css +1099 -0
  868. data/lib/wp/wp-includes/css/admin-bar-rtl.min.css +1 -0
  869. data/lib/wp/wp-includes/css/admin-bar.css +1099 -0
  870. data/lib/wp/wp-includes/css/admin-bar.min.css +1 -0
  871. data/lib/wp/wp-includes/css/buttons-rtl.css +364 -0
  872. data/lib/wp/wp-includes/css/buttons-rtl.min.css +1 -0
  873. data/lib/wp/wp-includes/css/buttons.css +364 -0
  874. data/lib/wp/wp-includes/css/buttons.min.css +1 -0
  875. data/lib/wp/wp-includes/css/dashicons.css +893 -0
  876. data/lib/wp/wp-includes/css/dashicons.min.css +1 -0
  877. data/lib/wp/wp-includes/css/editor-rtl.css +1993 -0
  878. data/lib/wp/wp-includes/css/editor-rtl.min.css +1 -0
  879. data/lib/wp/wp-includes/css/editor.css +1993 -0
  880. data/lib/wp/wp-includes/css/editor.min.css +1 -0
  881. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.css +343 -0
  882. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.min.css +19 -0
  883. data/lib/wp/wp-includes/css/jquery-ui-dialog.css +343 -0
  884. data/lib/wp/wp-includes/css/jquery-ui-dialog.min.css +19 -0
  885. data/lib/wp/wp-includes/css/media-views-rtl.css +2568 -0
  886. data/lib/wp/wp-includes/css/media-views-rtl.min.css +1 -0
  887. data/lib/wp/wp-includes/css/media-views.css +2568 -0
  888. data/lib/wp/wp-includes/css/media-views.min.css +1 -0
  889. data/lib/wp/wp-includes/css/wp-auth-check-rtl.css +100 -0
  890. data/lib/wp/wp-includes/css/wp-auth-check-rtl.min.css +1 -0
  891. data/lib/wp/wp-includes/css/wp-auth-check.css +100 -0
  892. data/lib/wp/wp-includes/css/wp-auth-check.min.css +1 -0
  893. data/lib/wp/wp-includes/css/wp-pointer-rtl.css +212 -0
  894. data/lib/wp/wp-includes/css/wp-pointer-rtl.min.css +1 -0
  895. data/lib/wp/wp-includes/css/wp-pointer.css +212 -0
  896. data/lib/wp/wp-includes/css/wp-pointer.min.css +1 -0
  897. data/lib/wp/wp-includes/date.php +475 -0
  898. data/lib/wp/wp-includes/default-constants.php +323 -0
  899. data/lib/wp/wp-includes/default-filters.php +307 -0
  900. data/lib/wp/wp-includes/default-widgets.php +1423 -0
  901. data/lib/wp/wp-includes/deprecated.php +3501 -0
  902. data/lib/wp/wp-includes/feed-atom-comments.php +115 -0
  903. data/lib/wp/wp-includes/feed-atom.php +87 -0
  904. data/lib/wp/wp-includes/feed-rdf.php +81 -0
  905. data/lib/wp/wp-includes/feed-rss.php +46 -0
  906. data/lib/wp/wp-includes/feed-rss2-comments.php +97 -0
  907. data/lib/wp/wp-includes/feed-rss2.php +115 -0
  908. data/lib/wp/wp-includes/feed.php +659 -0
  909. data/lib/wp/wp-includes/fonts/dashicons.eot +0 -0
  910. data/lib/wp/wp-includes/fonts/dashicons.svg +250 -0
  911. data/lib/wp/wp-includes/fonts/dashicons.ttf +0 -0
  912. data/lib/wp/wp-includes/fonts/dashicons.woff +0 -0
  913. data/lib/wp/wp-includes/formatting.php +4006 -0
  914. data/lib/wp/wp-includes/functions.php +4631 -0
  915. data/lib/wp/wp-includes/functions.wp-scripts.php +258 -0
  916. data/lib/wp/wp-includes/functions.wp-styles.php +245 -0
  917. data/lib/wp/wp-includes/general-template.php +2982 -0
  918. data/lib/wp/wp-includes/http.php +551 -0
  919. data/lib/wp/wp-includes/images/admin-bar-sprite-2x.png +0 -0
  920. data/lib/wp/wp-includes/images/admin-bar-sprite.png +0 -0
  921. data/lib/wp/wp-includes/images/arrow-pointer-blue-2x.png +0 -0
  922. data/lib/wp/wp-includes/images/arrow-pointer-blue.png +0 -0
  923. data/lib/wp/wp-includes/images/blank.gif +0 -0
  924. data/lib/wp/wp-includes/images/crystal/archive.png +0 -0
  925. data/lib/wp/wp-includes/images/crystal/audio.png +0 -0
  926. data/lib/wp/wp-includes/images/crystal/code.png +0 -0
  927. data/lib/wp/wp-includes/images/crystal/default.png +0 -0
  928. data/lib/wp/wp-includes/images/crystal/document.png +0 -0
  929. data/lib/wp/wp-includes/images/crystal/interactive.png +0 -0
  930. data/lib/wp/wp-includes/images/crystal/license.txt +9 -0
  931. data/lib/wp/wp-includes/images/crystal/spreadsheet.png +0 -0
  932. data/lib/wp/wp-includes/images/crystal/text.png +0 -0
  933. data/lib/wp/wp-includes/images/crystal/video.png +0 -0
  934. data/lib/wp/wp-includes/images/down_arrow-2x.gif +0 -0
  935. data/lib/wp/wp-includes/images/down_arrow.gif +0 -0
  936. data/lib/wp/wp-includes/images/icon-pointer-flag-2x.png +0 -0
  937. data/lib/wp/wp-includes/images/icon-pointer-flag.png +0 -0
  938. data/lib/wp/wp-includes/images/media/archive.png +0 -0
  939. data/lib/wp/wp-includes/images/media/audio.png +0 -0
  940. data/lib/wp/wp-includes/images/media/code.png +0 -0
  941. data/lib/wp/wp-includes/images/media/default.png +0 -0
  942. data/lib/wp/wp-includes/images/media/document.png +0 -0
  943. data/lib/wp/wp-includes/images/media/interactive.png +0 -0
  944. data/lib/wp/wp-includes/images/media/spreadsheet.png +0 -0
  945. data/lib/wp/wp-includes/images/media/text.png +0 -0
  946. data/lib/wp/wp-includes/images/media/video.png +0 -0
  947. data/lib/wp/wp-includes/images/rss-2x.png +0 -0
  948. data/lib/wp/wp-includes/images/rss.png +0 -0
  949. data/lib/wp/wp-includes/images/smilies/icon_arrow.gif +0 -0
  950. data/lib/wp/wp-includes/images/smilies/icon_biggrin.gif +0 -0
  951. data/lib/wp/wp-includes/images/smilies/icon_confused.gif +0 -0
  952. data/lib/wp/wp-includes/images/smilies/icon_cool.gif +0 -0
  953. data/lib/wp/wp-includes/images/smilies/icon_cry.gif +0 -0
  954. data/lib/wp/wp-includes/images/smilies/icon_eek.gif +0 -0
  955. data/lib/wp/wp-includes/images/smilies/icon_evil.gif +0 -0
  956. data/lib/wp/wp-includes/images/smilies/icon_exclaim.gif +0 -0
  957. data/lib/wp/wp-includes/images/smilies/icon_idea.gif +0 -0
  958. data/lib/wp/wp-includes/images/smilies/icon_lol.gif +0 -0
  959. data/lib/wp/wp-includes/images/smilies/icon_mad.gif +0 -0
  960. data/lib/wp/wp-includes/images/smilies/icon_mrgreen.gif +0 -0
  961. data/lib/wp/wp-includes/images/smilies/icon_neutral.gif +0 -0
  962. data/lib/wp/wp-includes/images/smilies/icon_question.gif +0 -0
  963. data/lib/wp/wp-includes/images/smilies/icon_razz.gif +0 -0
  964. data/lib/wp/wp-includes/images/smilies/icon_redface.gif +0 -0
  965. data/lib/wp/wp-includes/images/smilies/icon_rolleyes.gif +0 -0
  966. data/lib/wp/wp-includes/images/smilies/icon_sad.gif +0 -0
  967. data/lib/wp/wp-includes/images/smilies/icon_smile.gif +0 -0
  968. data/lib/wp/wp-includes/images/smilies/icon_surprised.gif +0 -0
  969. data/lib/wp/wp-includes/images/smilies/icon_twisted.gif +0 -0
  970. data/lib/wp/wp-includes/images/smilies/icon_wink.gif +0 -0
  971. data/lib/wp/wp-includes/images/spinner-2x.gif +0 -0
  972. data/lib/wp/wp-includes/images/spinner.gif +0 -0
  973. data/lib/wp/wp-includes/images/toggle-arrow-2x.png +0 -0
  974. data/lib/wp/wp-includes/images/toggle-arrow.png +0 -0
  975. data/lib/wp/wp-includes/images/uploader-icons-2x.png +0 -0
  976. data/lib/wp/wp-includes/images/uploader-icons.png +0 -0
  977. data/lib/wp/wp-includes/images/wlw/wp-comments.png +0 -0
  978. data/lib/wp/wp-includes/images/wlw/wp-icon.png +0 -0
  979. data/lib/wp/wp-includes/images/wlw/wp-watermark.png +0 -0
  980. data/lib/wp/wp-includes/images/wpicons-2x.png +0 -0
  981. data/lib/wp/wp-includes/images/wpicons.png +0 -0
  982. data/lib/wp/wp-includes/images/wpspin-2x.gif +0 -0
  983. data/lib/wp/wp-includes/images/wpspin.gif +0 -0
  984. data/lib/wp/wp-includes/images/xit-2x.gif +0 -0
  985. data/lib/wp/wp-includes/images/xit.gif +0 -0
  986. data/lib/wp/wp-includes/js/admin-bar.js +365 -0
  987. data/lib/wp/wp-includes/js/admin-bar.min.js +1 -0
  988. data/lib/wp/wp-includes/js/autosave.js +589 -0
  989. data/lib/wp/wp-includes/js/autosave.min.js +1 -0
  990. data/lib/wp/wp-includes/js/backbone.min.js +1 -0
  991. data/lib/wp/wp-includes/js/colorpicker.js +707 -0
  992. data/lib/wp/wp-includes/js/colorpicker.min.js +1 -0
  993. data/lib/wp/wp-includes/js/comment-reply.js +47 -0
  994. data/lib/wp/wp-includes/js/comment-reply.min.js +1 -0
  995. data/lib/wp/wp-includes/js/crop/cropper.css +165 -0
  996. data/lib/wp/wp-includes/js/crop/cropper.js +516 -0
  997. data/lib/wp/wp-includes/js/crop/marqueeHoriz.gif +0 -0
  998. data/lib/wp/wp-includes/js/crop/marqueeVert.gif +0 -0
  999. data/lib/wp/wp-includes/js/customize-base.js +617 -0
  1000. data/lib/wp/wp-includes/js/customize-base.min.js +1 -0
  1001. data/lib/wp/wp-includes/js/customize-loader.js +246 -0
  1002. data/lib/wp/wp-includes/js/customize-loader.min.js +1 -0
  1003. data/lib/wp/wp-includes/js/customize-models.js +247 -0
  1004. data/lib/wp/wp-includes/js/customize-models.min.js +1 -0
  1005. data/lib/wp/wp-includes/js/customize-preview-widgets.js +129 -0
  1006. data/lib/wp/wp-includes/js/customize-preview-widgets.min.js +1 -0
  1007. data/lib/wp/wp-includes/js/customize-preview.js +154 -0
  1008. data/lib/wp/wp-includes/js/customize-preview.min.js +1 -0
  1009. data/lib/wp/wp-includes/js/customize-views.js +231 -0
  1010. data/lib/wp/wp-includes/js/customize-views.min.js +1 -0
  1011. data/lib/wp/wp-includes/js/heartbeat.js +738 -0
  1012. data/lib/wp/wp-includes/js/heartbeat.min.js +1 -0
  1013. data/lib/wp/wp-includes/js/hoverIntent.js +115 -0
  1014. data/lib/wp/wp-includes/js/hoverIntent.min.js +1 -0
  1015. data/lib/wp/wp-includes/js/imgareaselect/border-anim-h.gif +0 -0
  1016. data/lib/wp/wp-includes/js/imgareaselect/border-anim-v.gif +0 -0
  1017. data/lib/wp/wp-includes/js/imgareaselect/imgareaselect.css +41 -0
  1018. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js +1205 -0
  1019. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js +1 -0
  1020. data/lib/wp/wp-includes/js/jcrop/Jcrop.gif +0 -0
  1021. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.css +29 -0
  1022. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.js +22 -0
  1023. data/lib/wp/wp-includes/js/jquery/jquery-migrate.js +521 -0
  1024. data/lib/wp/wp-includes/js/jquery/jquery-migrate.min.js +2 -0
  1025. data/lib/wp/wp-includes/js/jquery/jquery.color.min.js +2 -0
  1026. data/lib/wp/wp-includes/js/jquery/jquery.form.js +1193 -0
  1027. data/lib/wp/wp-includes/js/jquery/jquery.form.min.js +11 -0
  1028. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.js +134 -0
  1029. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.min.js +1 -0
  1030. data/lib/wp/wp-includes/js/jquery/jquery.js +5 -0
  1031. data/lib/wp/wp-includes/js/jquery/jquery.masonry.min.js +11 -0
  1032. data/lib/wp/wp-includes/js/jquery/jquery.query.js +11 -0
  1033. data/lib/wp/wp-includes/js/jquery/jquery.schedule.js +36 -0
  1034. data/lib/wp/wp-includes/js/jquery/jquery.serialize-object.js +31 -0
  1035. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.js +99 -0
  1036. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.min.js +1 -0
  1037. data/lib/wp/wp-includes/js/jquery/jquery.ui.touch-punch.js +11 -0
  1038. data/lib/wp/wp-includes/js/jquery/suggest.js +316 -0
  1039. data/lib/wp/wp-includes/js/jquery/suggest.min.js +1 -0
  1040. data/lib/wp/wp-includes/js/jquery/ui/accordion.min.js +11 -0
  1041. data/lib/wp/wp-includes/js/jquery/ui/autocomplete.min.js +11 -0
  1042. data/lib/wp/wp-includes/js/jquery/ui/button.min.js +11 -0
  1043. data/lib/wp/wp-includes/js/jquery/ui/core.min.js +11 -0
  1044. data/lib/wp/wp-includes/js/jquery/ui/datepicker.min.js +12 -0
  1045. data/lib/wp/wp-includes/js/jquery/ui/dialog.min.js +11 -0
  1046. data/lib/wp/wp-includes/js/jquery/ui/draggable.min.js +11 -0
  1047. data/lib/wp/wp-includes/js/jquery/ui/droppable.min.js +11 -0
  1048. data/lib/wp/wp-includes/js/jquery/ui/effect-blind.min.js +11 -0
  1049. data/lib/wp/wp-includes/js/jquery/ui/effect-bounce.min.js +11 -0
  1050. data/lib/wp/wp-includes/js/jquery/ui/effect-clip.min.js +11 -0
  1051. data/lib/wp/wp-includes/js/jquery/ui/effect-drop.min.js +11 -0
  1052. data/lib/wp/wp-includes/js/jquery/ui/effect-explode.min.js +11 -0
  1053. data/lib/wp/wp-includes/js/jquery/ui/effect-fade.min.js +11 -0
  1054. data/lib/wp/wp-includes/js/jquery/ui/effect-fold.min.js +11 -0
  1055. data/lib/wp/wp-includes/js/jquery/ui/effect-highlight.min.js +11 -0
  1056. data/lib/wp/wp-includes/js/jquery/ui/effect-puff.min.js +11 -0
  1057. data/lib/wp/wp-includes/js/jquery/ui/effect-pulsate.min.js +11 -0
  1058. data/lib/wp/wp-includes/js/jquery/ui/effect-scale.min.js +11 -0
  1059. data/lib/wp/wp-includes/js/jquery/ui/effect-shake.min.js +11 -0
  1060. data/lib/wp/wp-includes/js/jquery/ui/effect-size.min.js +11 -0
  1061. data/lib/wp/wp-includes/js/jquery/ui/effect-slide.min.js +11 -0
  1062. data/lib/wp/wp-includes/js/jquery/ui/effect-transfer.min.js +11 -0
  1063. data/lib/wp/wp-includes/js/jquery/ui/effect.min.js +21 -0
  1064. data/lib/wp/wp-includes/js/jquery/ui/menu.min.js +11 -0
  1065. data/lib/wp/wp-includes/js/jquery/ui/mouse.min.js +11 -0
  1066. data/lib/wp/wp-includes/js/jquery/ui/position.min.js +11 -0
  1067. data/lib/wp/wp-includes/js/jquery/ui/progressbar.min.js +11 -0
  1068. data/lib/wp/wp-includes/js/jquery/ui/resizable.min.js +11 -0
  1069. data/lib/wp/wp-includes/js/jquery/ui/selectable.min.js +11 -0
  1070. data/lib/wp/wp-includes/js/jquery/ui/selectmenu.min.js +11 -0
  1071. data/lib/wp/wp-includes/js/jquery/ui/slider.min.js +11 -0
  1072. data/lib/wp/wp-includes/js/jquery/ui/sortable.min.js +11 -0
  1073. data/lib/wp/wp-includes/js/jquery/ui/spinner.min.js +11 -0
  1074. data/lib/wp/wp-includes/js/jquery/ui/tabs.min.js +11 -0
  1075. data/lib/wp/wp-includes/js/jquery/ui/tooltip.min.js +11 -0
  1076. data/lib/wp/wp-includes/js/jquery/ui/widget.min.js +11 -0
  1077. data/lib/wp/wp-includes/js/json2.js +480 -0
  1078. data/lib/wp/wp-includes/js/json2.min.js +1 -0
  1079. data/lib/wp/wp-includes/js/masonry.min.js +1 -0
  1080. data/lib/wp/wp-includes/js/mce-view.js +829 -0
  1081. data/lib/wp/wp-includes/js/mce-view.min.js +1 -0
  1082. data/lib/wp/wp-includes/js/media-audiovideo.js +831 -0
  1083. data/lib/wp/wp-includes/js/media-audiovideo.min.js +1 -0
  1084. data/lib/wp/wp-includes/js/media-editor.js +1114 -0
  1085. data/lib/wp/wp-includes/js/media-editor.min.js +1 -0
  1086. data/lib/wp/wp-includes/js/media-grid.js +732 -0
  1087. data/lib/wp/wp-includes/js/media-grid.min.js +1 -0
  1088. data/lib/wp/wp-includes/js/media-models.js +1362 -0
  1089. data/lib/wp/wp-includes/js/media-models.min.js +1 -0
  1090. data/lib/wp/wp-includes/js/media-views.js +7484 -0
  1091. data/lib/wp/wp-includes/js/media-views.min.js +3 -0
  1092. data/lib/wp/wp-includes/js/mediaelement/background.png +0 -0
  1093. data/lib/wp/wp-includes/js/mediaelement/bigplay.png +0 -0
  1094. data/lib/wp/wp-includes/js/mediaelement/bigplay.svg +1 -0
  1095. data/lib/wp/wp-includes/js/mediaelement/controls.png +0 -0
  1096. data/lib/wp/wp-includes/js/mediaelement/controls.svg +1 -0
  1097. data/lib/wp/wp-includes/js/mediaelement/flashmediaelement.swf +0 -0
  1098. data/lib/wp/wp-includes/js/mediaelement/loading.gif +0 -0
  1099. data/lib/wp/wp-includes/js/mediaelement/mediaelement-and-player.min.js +181 -0
  1100. data/lib/wp/wp-includes/js/mediaelement/mediaelementplayer.min.css +1 -0
  1101. data/lib/wp/wp-includes/js/mediaelement/silverlightmediaelement.xap +0 -0
  1102. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.css +274 -0
  1103. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.js +34 -0
  1104. data/lib/wp/wp-includes/js/mediaelement/wp-playlist.js +175 -0
  1105. data/lib/wp/wp-includes/js/plupload/handlers.js +488 -0
  1106. data/lib/wp/wp-includes/js/plupload/handlers.min.js +1 -0
  1107. data/lib/wp/wp-includes/js/plupload/license.txt +339 -0
  1108. data/lib/wp/wp-includes/js/plupload/plupload.flash.swf +0 -0
  1109. data/lib/wp/wp-includes/js/plupload/plupload.full.min.js +28 -0
  1110. data/lib/wp/wp-includes/js/plupload/plupload.silverlight.xap +0 -0
  1111. data/lib/wp/wp-includes/js/plupload/wp-plupload.js +376 -0
  1112. data/lib/wp/wp-includes/js/plupload/wp-plupload.min.js +1 -0
  1113. data/lib/wp/wp-includes/js/quicktags.js +652 -0
  1114. data/lib/wp/wp-includes/js/quicktags.min.js +1 -0
  1115. data/lib/wp/wp-includes/js/shortcode.js +356 -0
  1116. data/lib/wp/wp-includes/js/shortcode.min.js +1 -0
  1117. data/lib/wp/wp-includes/js/swfobject.js +4 -0
  1118. data/lib/wp/wp-includes/js/swfupload/handlers.js +376 -0
  1119. data/lib/wp/wp-includes/js/swfupload/handlers.min.js +1 -0
  1120. data/lib/wp/wp-includes/js/swfupload/license.txt +32 -0
  1121. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.cookies.js +53 -0
  1122. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.queue.js +98 -0
  1123. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.speed.js +342 -0
  1124. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.swfobject.js +105 -0
  1125. data/lib/wp/wp-includes/js/swfupload/swfupload.js +980 -0
  1126. data/lib/wp/wp-includes/js/swfupload/swfupload.swf +0 -0
  1127. data/lib/wp/wp-includes/js/thickbox/loadingAnimation.gif +0 -0
  1128. data/lib/wp/wp-includes/js/thickbox/macFFBgHack.png +0 -0
  1129. data/lib/wp/wp-includes/js/thickbox/thickbox.css +138 -0
  1130. data/lib/wp/wp-includes/js/thickbox/thickbox.js +314 -0
  1131. data/lib/wp/wp-includes/js/tinymce/langs/wp-langs-en.js +519 -0
  1132. data/lib/wp/wp-includes/js/tinymce/license.txt +504 -0
  1133. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.js +370 -0
  1134. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.min.js +1 -0
  1135. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.js +112 -0
  1136. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.min.js +1 -0
  1137. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css +212 -0
  1138. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.js +304 -0
  1139. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js +1 -0
  1140. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.js +64 -0
  1141. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.min.js +1 -0
  1142. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.js +136 -0
  1143. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  1144. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.js +30 -0
  1145. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.min.js +1 -0
  1146. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.js +450 -0
  1147. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.min.js +1 -0
  1148. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.js +786 -0
  1149. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.min.js +1 -0
  1150. data/lib/wp/wp-includes/js/tinymce/plugins/media/moxieplayer.swf +0 -0
  1151. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.js +774 -0
  1152. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.min.js +1 -0
  1153. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.js +1553 -0
  1154. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.min.js +1 -0
  1155. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.js +125 -0
  1156. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js +1 -0
  1157. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.js +272 -0
  1158. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js +1 -0
  1159. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.js +513 -0
  1160. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js +1 -0
  1161. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js +207 -0
  1162. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js +1 -0
  1163. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js +92 -0
  1164. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js +1 -0
  1165. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +1035 -0
  1166. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js +1 -0
  1167. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js +78 -0
  1168. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.min.js +1 -0
  1169. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.js +130 -0
  1170. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.min.js +1 -0
  1171. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.js +63 -0
  1172. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.min.js +1 -0
  1173. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.js +694 -0
  1174. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +1 -0
  1175. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css +1 -0
  1176. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.min.css +1 -0
  1177. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md +1 -0
  1178. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  1179. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +62 -0
  1180. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  1181. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  1182. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  1183. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg +63 -0
  1184. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  1185. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  1186. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
  1187. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/loader.gif +0 -0
  1188. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/object.gif +0 -0
  1189. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/trans.gif +0 -0
  1190. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  1191. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.min.css +1 -0
  1192. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/audio.png +0 -0
  1193. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png +0 -0
  1194. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png +0 -0
  1195. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/embedded.png +0 -0
  1196. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery-2x.png +0 -0
  1197. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery.png +0 -0
  1198. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more-2x.png +0 -0
  1199. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more.png +0 -0
  1200. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak-2x.png +0 -0
  1201. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak.png +0 -0
  1202. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-audio.png +0 -0
  1203. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-video.png +0 -0
  1204. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/video.png +0 -0
  1205. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/wp-content.css +618 -0
  1206. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.js +617 -0
  1207. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.min.js +1 -0
  1208. data/lib/wp/wp-includes/js/tinymce/tiny_mce_popup.js +539 -0
  1209. data/lib/wp/wp-includes/js/tinymce/tinymce.min.js +11 -0
  1210. data/lib/wp/wp-includes/js/tinymce/utils/editable_selects.js +70 -0
  1211. data/lib/wp/wp-includes/js/tinymce/utils/form_utils.js +210 -0
  1212. data/lib/wp/wp-includes/js/tinymce/utils/mctabs.js +164 -0
  1213. data/lib/wp/wp-includes/js/tinymce/utils/validate.js +252 -0
  1214. data/lib/wp/wp-includes/js/tinymce/wp-mce-help.php +145 -0
  1215. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.js.gz +0 -0
  1216. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.php +39 -0
  1217. data/lib/wp/wp-includes/js/tw-sack.js +193 -0
  1218. data/lib/wp/wp-includes/js/tw-sack.min.js +1 -0
  1219. data/lib/wp/wp-includes/js/underscore.min.js +1 -0
  1220. data/lib/wp/wp-includes/js/utils.js +197 -0
  1221. data/lib/wp/wp-includes/js/utils.min.js +1 -0
  1222. data/lib/wp/wp-includes/js/wp-ajax-response.js +64 -0
  1223. data/lib/wp/wp-includes/js/wp-ajax-response.min.js +1 -0
  1224. data/lib/wp/wp-includes/js/wp-auth-check.js +112 -0
  1225. data/lib/wp/wp-includes/js/wp-auth-check.min.js +1 -0
  1226. data/lib/wp/wp-includes/js/wp-backbone.js +386 -0
  1227. data/lib/wp/wp-includes/js/wp-backbone.min.js +1 -0
  1228. data/lib/wp/wp-includes/js/wp-list-revisions.js +24 -0
  1229. data/lib/wp/wp-includes/js/wp-list-revisions.min.js +1 -0
  1230. data/lib/wp/wp-includes/js/wp-lists.js +469 -0
  1231. data/lib/wp/wp-includes/js/wp-lists.min.js +1 -0
  1232. data/lib/wp/wp-includes/js/wp-pointer.js +282 -0
  1233. data/lib/wp/wp-includes/js/wp-pointer.min.js +1 -0
  1234. data/lib/wp/wp-includes/js/wp-util.js +106 -0
  1235. data/lib/wp/wp-includes/js/wp-util.min.js +1 -0
  1236. data/lib/wp/wp-includes/js/wpdialog.js +19 -0
  1237. data/lib/wp/wp-includes/js/wpdialog.min.js +1 -0
  1238. data/lib/wp/wp-includes/js/wplink.js +615 -0
  1239. data/lib/wp/wp-includes/js/wplink.min.js +1 -0
  1240. data/lib/wp/wp-includes/js/zxcvbn-async.js +18 -0
  1241. data/lib/wp/wp-includes/js/zxcvbn-async.min.js +1 -0
  1242. data/lib/wp/wp-includes/js/zxcvbn.min.js +47 -0
  1243. data/lib/wp/wp-includes/kses.php +1526 -0
  1244. data/lib/wp/wp-includes/l10n.php +908 -0
  1245. data/lib/wp/wp-includes/link-template.php +3141 -0
  1246. data/lib/wp/wp-includes/load.php +828 -0
  1247. data/lib/wp/wp-includes/locale.php +368 -0
  1248. data/lib/wp/wp-includes/media-template.php +1235 -0
  1249. data/lib/wp/wp-includes/media.php +3329 -0
  1250. data/lib/wp/wp-includes/meta.php +1221 -0
  1251. data/lib/wp/wp-includes/ms-blogs.php +939 -0
  1252. data/lib/wp/wp-includes/ms-default-constants.php +153 -0
  1253. data/lib/wp/wp-includes/ms-default-filters.php +82 -0
  1254. data/lib/wp/wp-includes/ms-deprecated.php +347 -0
  1255. data/lib/wp/wp-includes/ms-files.php +82 -0
  1256. data/lib/wp/wp-includes/ms-functions.php +2476 -0
  1257. data/lib/wp/wp-includes/ms-load.php +458 -0
  1258. data/lib/wp/wp-includes/ms-settings.php +213 -0
  1259. data/lib/wp/wp-includes/nav-menu-template.php +678 -0
  1260. data/lib/wp/wp-includes/nav-menu.php +895 -0
  1261. data/lib/wp/wp-includes/option.php +1440 -0
  1262. data/lib/wp/wp-includes/pluggable-deprecated.php +192 -0
  1263. data/lib/wp/wp-includes/pluggable.php +2283 -0
  1264. data/lib/wp/wp-includes/plugin.php +920 -0
  1265. data/lib/wp/wp-includes/pomo/entry.php +78 -0
  1266. data/lib/wp/wp-includes/pomo/mo.php +262 -0
  1267. data/lib/wp/wp-includes/pomo/po.php +384 -0
  1268. data/lib/wp/wp-includes/pomo/streams.php +209 -0
  1269. data/lib/wp/wp-includes/pomo/translations.php +275 -0
  1270. data/lib/wp/wp-includes/post-formats.php +243 -0
  1271. data/lib/wp/wp-includes/post-template.php +1766 -0
  1272. data/lib/wp/wp-includes/post-thumbnail-template.php +142 -0
  1273. data/lib/wp/wp-includes/post.php +5842 -0
  1274. data/lib/wp/wp-includes/query.php +4666 -0
  1275. data/lib/wp/wp-includes/registration-functions.php +7 -0
  1276. data/lib/wp/wp-includes/registration.php +7 -0
  1277. data/lib/wp/wp-includes/revision.php +657 -0
  1278. data/lib/wp/wp-includes/rewrite.php +2180 -0
  1279. data/lib/wp/wp-includes/rss-functions.php +9 -0
  1280. data/lib/wp/wp-includes/rss.php +936 -0
  1281. data/lib/wp/wp-includes/script-loader.php +1045 -0
  1282. data/lib/wp/wp-includes/session.php +430 -0
  1283. data/lib/wp/wp-includes/shortcodes.php +410 -0
  1284. data/lib/wp/wp-includes/taxonomy.php +4006 -0
  1285. data/lib/wp/wp-includes/template-loader.php +76 -0
  1286. data/lib/wp/wp-includes/template.php +505 -0
  1287. data/lib/wp/wp-includes/theme-compat/comments-popup.php +128 -0
  1288. data/lib/wp/wp-includes/theme-compat/comments.php +101 -0
  1289. data/lib/wp/wp-includes/theme-compat/footer.php +30 -0
  1290. data/lib/wp/wp-includes/theme-compat/header.php +49 -0
  1291. data/lib/wp/wp-includes/theme-compat/sidebar.php +83 -0
  1292. data/lib/wp/wp-includes/theme.php +2014 -0
  1293. data/lib/wp/wp-includes/update.php +674 -0
  1294. data/lib/wp/wp-includes/user.php +2292 -0
  1295. data/lib/wp/wp-includes/vars.php +144 -0
  1296. data/lib/wp/wp-includes/version.php +35 -0
  1297. data/lib/wp/wp-includes/widgets.php +1514 -0
  1298. data/lib/wp/wp-includes/wlwmanifest.xml +43 -0
  1299. data/lib/wp/wp-includes/wp-db.php +2190 -0
  1300. data/lib/wp/wp-includes/wp-diff.php +523 -0
  1301. data/lib/wp/wp-links-opml.php +80 -0
  1302. data/lib/wp/wp-load.php +73 -0
  1303. data/lib/wp/wp-login.php +952 -0
  1304. data/lib/wp/wp-mail.php +260 -0
  1305. data/lib/wp/wp-settings.php +374 -0
  1306. data/lib/wp/wp-signup.php +749 -0
  1307. data/lib/wp/wp-trackback.php +127 -0
  1308. data/lib/wp/xmlrpc.php +101 -0
  1309. data/stump-cli.gemspec +26 -0
  1310. metadata +1332 -4
@@ -0,0 +1 @@
1
+ window.wp=window.wp||{},function(a){var b;b=wp.revisions={model:{},view:{},controller:{}},b.settings=_.isUndefined(_wpRevisionsSettings)?{}:_wpRevisionsSettings,b.debug=!1,b.log=function(){window.console&&b.debug&&window.console.log.apply(window.console,arguments)},a.fn.allOffsets=function(){var b=this.offset()||{top:0,left:0},c=a(window);return _.extend(b,{right:c.width()-b.left-this.outerWidth(),bottom:c.height()-b.top-this.outerHeight()})},a.fn.allPositions=function(){var a=this.position()||{top:0,left:0},b=this.parent();return _.extend(a,{right:b.outerWidth()-a.left-this.outerWidth(),bottom:b.outerHeight()-a.top-this.outerHeight()})},b.settings.to&&(b.settings.to=parseInt(b.settings.to,10)),b.settings.from&&(b.settings.from=parseInt(b.settings.from,10)),b.settings.compareTwoMode&&(b.settings.compareTwoMode="1"===b.settings.compareTwoMode),b.model.Slider=Backbone.Model.extend({defaults:{value:null,values:null,min:0,max:1,step:1,range:!1,compareTwoMode:!1},initialize:function(a){this.frame=a.frame,this.revisions=a.revisions,this.listenTo(this.frame,"update:revisions",this.receiveRevisions),this.listenTo(this.frame,"change:compareTwoMode",this.updateMode),this.listenTo(this,"change:from",this.handleLocalChanges),this.listenTo(this,"change:to",this.handleLocalChanges),this.listenTo(this,"change:compareTwoMode",this.updateSliderSettings),this.listenTo(this,"update:revisions",this.updateSliderSettings),this.listenTo(this,"change:hoveredRevision",this.hoverRevision),this.set({max:this.revisions.length-1,compareTwoMode:this.frame.get("compareTwoMode"),from:this.frame.get("from"),to:this.frame.get("to")}),this.updateSliderSettings()},getSliderValue:function(a,b){return isRtl?this.revisions.length-this.revisions.indexOf(this.get(a))-1:this.revisions.indexOf(this.get(b))},updateSliderSettings:function(){this.set(this.get("compareTwoMode")?{values:[this.getSliderValue("to","from"),this.getSliderValue("from","to")],value:null,range:!0}:{value:this.getSliderValue("to","to"),values:null,range:!1}),this.trigger("update:slider")},hoverRevision:function(a,b){this.trigger("hovered:revision",b)},updateMode:function(a,b){this.set({compareTwoMode:b})},handleLocalChanges:function(){this.frame.set({from:this.get("from"),to:this.get("to")})},receiveRevisions:function(a,b){(this.get("from")!==a||this.get("to")!==b)&&(this.set({from:a,to:b},{silent:!0}),this.trigger("update:revisions",a,b))}}),b.model.Tooltip=Backbone.Model.extend({defaults:{revision:null,offset:{},hovering:!1,scrubbing:!1},initialize:function(a){this.frame=a.frame,this.revisions=a.revisions,this.slider=a.slider,this.listenTo(this.slider,"hovered:revision",this.updateRevision),this.listenTo(this.slider,"change:hovering",this.setHovering),this.listenTo(this.slider,"change:scrubbing",this.setScrubbing)},updateRevision:function(a){this.set({revision:a})},setHovering:function(a,b){this.set({hovering:b})},setScrubbing:function(a,b){this.set({scrubbing:b})}}),b.model.Revision=Backbone.Model.extend({}),b.model.Revisions=Backbone.Collection.extend({model:b.model.Revision,initialize:function(){_.bindAll(this,"next","prev")},next:function(a){var b=this.indexOf(a);return-1!==b&&b!==this.length-1?this.at(b+1):void 0},prev:function(a){var b=this.indexOf(a);return-1!==b&&0!==b?this.at(b-1):void 0}}),b.model.Field=Backbone.Model.extend({}),b.model.Fields=Backbone.Collection.extend({model:b.model.Field}),b.model.Diff=Backbone.Model.extend({initialize:function(){var a=this.get("fields");this.unset("fields"),this.fields=new b.model.Fields(a)}}),b.model.Diffs=Backbone.Collection.extend({initialize:function(a,b){_.bindAll(this,"getClosestUnloaded"),this.loadAll=_.once(this._loadAll),this.revisions=b.revisions,this.requests={}},model:b.model.Diff,ensure:function(b,c){var d=this.get(b),e=this.requests[b],f=a.Deferred(),g={},h=b.split(":")[0],i=b.split(":")[1];return g[b]=!0,wp.revisions.log("ensure",b),this.trigger("ensure",g,h,i,f.promise()),d?f.resolveWith(c,[d]):(this.trigger("ensure:load",g,h,i,f.promise()),_.each(g,_.bind(function(a){this.requests[a]&&delete g[a],this.get(a)&&delete g[a]},this)),e||(g[b]=!0,e=this.load(_.keys(g))),e.done(_.bind(function(){f.resolveWith(c,[this.get(b)])},this)).fail(_.bind(function(){f.reject()}))),f.promise()},getClosestUnloaded:function(a,b){var c=this;return _.chain([0].concat(a)).initial().zip(a).sortBy(function(a){return Math.abs(b-a[1])}).map(function(a){return a.join(":")}).filter(function(a){return _.isUndefined(c.get(a))&&!c.requests[a]}).value()},_loadAll:function(b,c,d){var e=this,f=a.Deferred(),g=_.first(this.getClosestUnloaded(b,c),d);return _.size(g)>0?this.load(g).done(function(){e._loadAll(b,c,d).done(function(){f.resolve()})}).fail(function(){1===d?f.reject():e._loadAll(b,c,Math.ceil(d/2)).done(function(){f.resolve()})}):f.resolve(),f},load:function(a){return wp.revisions.log("load",a),this.fetch({data:{compare:a},remove:!1}).done(function(){wp.revisions.log("load:complete",a)})},sync:function(a,c,d){if("read"===a){d=d||{},d.context=this,d.data=_.extend(d.data||{},{action:"get-revision-diffs",post_id:b.settings.postId});var e=wp.ajax.send(d),f=this.requests;return d.data.compare&&_.each(d.data.compare,function(a){f[a]=e}),e.always(function(){d.data.compare&&_.each(d.data.compare,function(a){delete f[a]})}),e}return Backbone.Model.prototype.sync.apply(this,arguments)}}),b.model.FrameState=Backbone.Model.extend({defaults:{loading:!1,error:!1,compareTwoMode:!1},initialize:function(a,c){var d={};_.bindAll(this,"receiveDiff"),this._debouncedEnsureDiff=_.debounce(this._ensureDiff,200),this.revisions=c.revisions,this.diffs=new b.model.Diffs([],{revisions:this.revisions}),this.diffs.set(b.settings.diffData),this.listenTo(this,"change:from",this.changeRevisionHandler),this.listenTo(this,"change:to",this.changeRevisionHandler),this.listenTo(this,"change:compareTwoMode",this.changeMode),this.listenTo(this,"update:revisions",this.updatedRevisions),this.listenTo(this.diffs,"ensure:load",this.updateLoadingStatus),this.listenTo(this,"update:diff",this.updateLoadingStatus),d.to=this.revisions.get(b.settings.to),d.from=this.revisions.get(b.settings.from),d.compareTwoMode=b.settings.compareTwoMode,d.baseUrl=b.settings.baseUrl,this.set(d),window.history&&window.history.pushState&&(this.router=new b.Router({model:this}),Backbone.history.start({pushState:!0}))},updateLoadingStatus:function(){this.set("error",!1),this.set("loading",!this.diff())},changeMode:function(a,b){var c=this.revisions.indexOf(this.get("to"));b&&0===c&&this.set({from:this.revisions.at(c),to:this.revisions.at(c+1)}),b||0===c||this.set({from:this.revisions.at(c-1),to:this.revisions.at(c)})},updatedRevisions:function(a,b){this.get("compareTwoMode")||this.diffs.loadAll(this.revisions.pluck("id"),b.id,40)},diff:function(){return this.diffs.get(this._diffId)},updateDiff:function(b){var c,d,e,f;return b=b||{},c=this.get("from"),d=this.get("to"),e=(c?c.id:0)+":"+d.id,this._diffId===e?a.Deferred().reject().promise():(this._diffId=e,this.trigger("update:revisions",c,d),f=this.diffs.get(e),f?(this.receiveDiff(f),a.Deferred().resolve().promise()):b.immediate?this._ensureDiff():(this._debouncedEnsureDiff(),a.Deferred().reject().promise()))},changeRevisionHandler:function(){this.updateDiff()},receiveDiff:function(a){_.isUndefined(a)||_.isUndefined(a.id)?this.set({loading:!1,error:!0}):this._diffId===a.id&&this.trigger("update:diff",a)},_ensureDiff:function(){return this.diffs.ensure(this._diffId,this).always(this.receiveDiff)}}),b.view.Frame=wp.Backbone.View.extend({className:"revisions",template:wp.template("revisions-frame"),initialize:function(){this.listenTo(this.model,"update:diff",this.renderDiff),this.listenTo(this.model,"change:compareTwoMode",this.updateCompareTwoMode),this.listenTo(this.model,"change:loading",this.updateLoadingStatus),this.listenTo(this.model,"change:error",this.updateErrorStatus),this.views.set(".revisions-control-frame",new b.view.Controls({model:this.model}))},render:function(){return wp.Backbone.View.prototype.render.apply(this,arguments),a("html").css("overflow-y","scroll"),a("#wpbody-content .wrap").append(this.el),this.updateCompareTwoMode(),this.renderDiff(this.model.diff()),this.views.ready(),this},renderDiff:function(a){this.views.set(".revisions-diff-frame",new b.view.Diff({model:a}))},updateLoadingStatus:function(){this.$el.toggleClass("loading",this.model.get("loading"))},updateErrorStatus:function(){this.$el.toggleClass("diff-error",this.model.get("error"))},updateCompareTwoMode:function(){this.$el.toggleClass("comparing-two-revisions",this.model.get("compareTwoMode"))}}),b.view.Controls=wp.Backbone.View.extend({className:"revisions-controls",initialize:function(){_.bindAll(this,"setWidth"),this.views.add(new b.view.Buttons({model:this.model})),this.views.add(new b.view.Checkbox({model:this.model}));var a=new b.model.Slider({frame:this.model,revisions:this.model.revisions}),c=new b.model.Tooltip({frame:this.model,revisions:this.model.revisions,slider:a});this.views.add(new b.view.Tooltip({model:c})),this.views.add(new b.view.Tickmarks({model:c})),this.views.add(new b.view.Slider({model:a})),this.views.add(new b.view.Metabox({model:this.model}))},ready:function(){this.top=this.$el.offset().top,this.window=a(window),this.window.on("scroll.wp.revisions",{controls:this},function(a){var b=a.data.controls,c=b.$el.parent(),d=b.window.scrollTop(),e=b.views.parent;d>=b.top?(e.$el.hasClass("pinned")||(b.setWidth(),c.css("height",c.height()+"px"),b.window.on("resize.wp.revisions.pinning click.wp.revisions.pinning",{controls:b},function(a){a.data.controls.setWidth()})),e.$el.addClass("pinned")):e.$el.hasClass("pinned")?(b.window.off(".wp.revisions.pinning"),b.$el.css("width","auto"),e.$el.removeClass("pinned"),c.css("height","auto"),b.top=b.$el.offset().top):b.top=b.$el.offset().top})},setWidth:function(){this.$el.css("width",this.$el.parent().width()+"px")}}),b.view.Tickmarks=wp.Backbone.View.extend({className:"revisions-tickmarks",direction:isRtl?"right":"left",initialize:function(){this.listenTo(this.model,"change:revision",this.reportTickPosition)},reportTickPosition:function(a,b){var c,d,e,f,g=this.model.revisions.indexOf(b);d=this.$el.allOffsets(),e=this.$el.parent().allOffsets(),g===this.model.revisions.length-1?c={rightPlusWidth:d.left-e.left+1,leftPlusWidth:d.right-e.right+1}:(f=this.$("div:nth-of-type("+(g+1)+")"),c=f.allPositions(),_.extend(c,{left:c.left+d.left-e.left,right:c.right+d.right-e.right}),_.extend(c,{leftPlusWidth:c.left+f.outerWidth(),rightPlusWidth:c.right+f.outerWidth()})),this.model.set({offset:c})},ready:function(){var a,b;a=this.model.revisions.length-1,b=1/a,this.$el.css("width",50*this.model.revisions.length+"px"),_(a).times(function(a){this.$el.append('<div style="'+this.direction+": "+100*b*a+'%"></div>')},this)}}),b.view.Metabox=wp.Backbone.View.extend({className:"revisions-meta",initialize:function(){this.views.add(new b.view.MetaFrom({model:this.model,className:"diff-meta diff-meta-from"})),this.views.add(new b.view.MetaTo({model:this.model}))}}),b.view.Meta=wp.Backbone.View.extend({template:wp.template("revisions-meta"),events:{"click .restore-revision":"restoreRevision"},initialize:function(){this.listenTo(this.model,"update:revisions",this.render)},prepare:function(){return _.extend(this.model.toJSON()[this.type]||{},{type:this.type})},restoreRevision:function(){document.location=this.model.get("to").attributes.restoreUrl}}),b.view.MetaFrom=b.view.Meta.extend({className:"diff-meta diff-meta-from",type:"from"}),b.view.MetaTo=b.view.Meta.extend({className:"diff-meta diff-meta-to",type:"to"}),b.view.Checkbox=wp.Backbone.View.extend({className:"revisions-checkbox",template:wp.template("revisions-checkbox"),events:{"click .compare-two-revisions":"compareTwoToggle"},initialize:function(){this.listenTo(this.model,"change:compareTwoMode",this.updateCompareTwoMode)},ready:function(){this.model.revisions.length<3&&a(".revision-toggle-compare-mode").hide()},updateCompareTwoMode:function(){this.$(".compare-two-revisions").prop("checked",this.model.get("compareTwoMode"))},compareTwoToggle:function(){this.model.set({compareTwoMode:a(".compare-two-revisions").prop("checked")})}}),b.view.Tooltip=wp.Backbone.View.extend({className:"revisions-tooltip",template:wp.template("revisions-meta"),initialize:function(){this.listenTo(this.model,"change:offset",this.render),this.listenTo(this.model,"change:hovering",this.toggleVisibility),this.listenTo(this.model,"change:scrubbing",this.toggleVisibility)},prepare:function(){return _.isNull(this.model.get("revision"))?void 0:_.extend({type:"tooltip"},{attributes:this.model.get("revision").toJSON()})},render:function(){var a,b,c,d,e={},f=this.model.revisions.indexOf(this.model.get("revision"))+1;d=f/this.model.revisions.length>.5,isRtl?(b=d?"left":"right",c=d?"leftPlusWidth":b):(b=d?"right":"left",c=d?"rightPlusWidth":b),a="right"===b?"left":"right",wp.Backbone.View.prototype.render.apply(this,arguments),e[b]=this.model.get("offset")[c]+"px",e[a]="",this.$el.toggleClass("flipped",d).css(e)},visible:function(){return this.model.get("scrubbing")||this.model.get("hovering")},toggleVisibility:function(){this.visible()?this.$el.stop().show().fadeTo(100-100*this.el.style.opacity,1):this.$el.stop().fadeTo(300*this.el.style.opacity,0,function(){a(this).hide()})}}),b.view.Buttons=wp.Backbone.View.extend({className:"revisions-buttons",template:wp.template("revisions-buttons"),events:{"click .revisions-next .button":"nextRevision","click .revisions-previous .button":"previousRevision"},initialize:function(){this.listenTo(this.model,"update:revisions",this.disabledButtonCheck)},ready:function(){this.disabledButtonCheck()},gotoModel:function(a){var b={to:this.model.revisions.at(a)};a?b.from=this.model.revisions.at(a-1):this.model.unset("from",{silent:!0}),this.model.set(b)},nextRevision:function(){var a=this.model.revisions.indexOf(this.model.get("to"))+1;this.gotoModel(a)},previousRevision:function(){var a=this.model.revisions.indexOf(this.model.get("to"))-1;this.gotoModel(a)},disabledButtonCheck:function(){var b=this.model.revisions.length-1,c=0,d=a(".revisions-next .button"),e=a(".revisions-previous .button"),f=this.model.revisions.indexOf(this.model.get("to"));d.prop("disabled",b===f),e.prop("disabled",c===f)}}),b.view.Slider=wp.Backbone.View.extend({className:"wp-slider",direction:isRtl?"right":"left",events:{mousemove:"mouseMove"},initialize:function(){_.bindAll(this,"start","slide","stop","mouseMove","mouseEnter","mouseLeave"),this.listenTo(this.model,"update:slider",this.applySliderSettings)},ready:function(){this.$el.css("width",50*this.model.revisions.length+"px"),this.$el.slider(_.extend(this.model.toJSON(),{start:this.start,slide:this.slide,stop:this.stop})),this.$el.hoverIntent({over:this.mouseEnter,out:this.mouseLeave,timeout:800}),this.applySliderSettings()},mouseMove:function(b){var c=this.model.revisions.length-1,d=this.$el.allOffsets()[this.direction],e=this.$el.width(),f=e/c,g=(isRtl?a(window).width()-b.pageX:b.pageX)-d,h=Math.floor((g+f/2)/f);0>h?h=0:h>=this.model.revisions.length&&(h=this.model.revisions.length-1),this.model.set({hoveredRevision:this.model.revisions.at(h)})},mouseLeave:function(){this.model.set({hovering:!1})},mouseEnter:function(){this.model.set({hovering:!0})},applySliderSettings:function(){this.$el.slider(_.pick(this.model.toJSON(),"value","values","range"));var a=this.$("a.ui-slider-handle");this.model.get("compareTwoMode")?(a.first().toggleClass("to-handle",!!isRtl).toggleClass("from-handle",!isRtl),a.last().toggleClass("from-handle",!!isRtl).toggleClass("to-handle",!isRtl)):a.removeClass("from-handle to-handle")},start:function(b,c){this.model.set({scrubbing:!0}),a(window).on("mousemove.wp.revisions",{view:this},function(b){var d,e=b.data.view,f=e.$el.offset().left,g=f,h=f+e.$el.width(),i=h,j="0",k="100%",l=a(c.handle);e.model.get("compareTwoMode")&&(d=l.parent().find(".ui-slider-handle"),l.is(d.first())?(i=d.last().offset().left,k=i-g):(f=d.first().offset().left+d.first().width(),j=f-g)),b.pageX<f?l.css("left",j):b.pageX>i?l.css("left",k):l.css("left",b.pageX-g)})},getPosition:function(a){return isRtl?this.model.revisions.length-a-1:a},slide:function(a,b){var c,d;if(this.model.get("compareTwoMode")){if(b.values[1]===b.values[0])return!1;isRtl&&b.values.reverse(),c={from:this.model.revisions.at(this.getPosition(b.values[0])),to:this.model.revisions.at(this.getPosition(b.values[1]))}}else c={to:this.model.revisions.at(this.getPosition(b.value))},c.from=this.getPosition(b.value)>0?this.model.revisions.at(this.getPosition(b.value)-1):void 0;d=this.model.revisions.at(this.getPosition(b.value)),this.model.get("scrubbing")&&(c.hoveredRevision=d),this.model.set(c)},stop:function(){a(window).off("mousemove.wp.revisions"),this.model.updateSliderSettings(),this.model.set({scrubbing:!1})}}),b.view.Diff=wp.Backbone.View.extend({className:"revisions-diff",template:wp.template("revisions-diff"),prepare:function(){return _.extend({fields:this.model.fields.toJSON()},this.options)}}),b.Router=Backbone.Router.extend({initialize:function(a){this.model=a.model,this.listenTo(this.model,"update:diff",_.debounce(this.updateUrl,250)),this.listenTo(this.model,"change:compareTwoMode",this.updateUrl)},baseUrl:function(a){return this.model.get("baseUrl")+a},updateUrl:function(){var a=this.model.has("from")?this.model.get("from").id:0,b=this.model.get("to").id;this.model.get("compareTwoMode")?this.navigate(this.baseUrl("?from="+a+"&to="+b),{replace:!0}):this.navigate(this.baseUrl("?revision="+b),{replace:!0})},handleRoute:function(a,b){var c=_.isUndefined(b);c||(b=this.model.revisions.get(a),a=this.model.revisions.prev(b),b=b?b.id:0,a=a?a.id:0)}}),b.init=function(){b.view.frame=new b.view.Frame({model:new b.model.FrameState({},{revisions:new b.model.Revisions(b.settings.revisionData)})}).render()},a(b.init)}(jQuery);
@@ -0,0 +1,24 @@
1
+ /* global setPostThumbnailL10n, ajaxurl, post_id, alert */
2
+ /* exported WPSetAsThumbnail */
3
+
4
+ function WPSetAsThumbnail( id, nonce ) {
5
+ var $link = jQuery('a#wp-post-thumbnail-' + id);
6
+
7
+ $link.text( setPostThumbnailL10n.saving );
8
+ jQuery.post(ajaxurl, {
9
+ action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
10
+ }, function(str){
11
+ var win = window.dialogArguments || opener || parent || top;
12
+ $link.text( setPostThumbnailL10n.setThumbnail );
13
+ if ( str == '0' ) {
14
+ alert( setPostThumbnailL10n.error );
15
+ } else {
16
+ jQuery('a.wp-post-thumbnail').show();
17
+ $link.text( setPostThumbnailL10n.done );
18
+ $link.fadeOut( 2000 );
19
+ win.WPSetThumbnailID(id);
20
+ win.WPSetThumbnailHTML(str);
21
+ }
22
+ }
23
+ );
24
+ }
@@ -0,0 +1 @@
1
+ function WPSetAsThumbnail(a,b){var c=jQuery("a#wp-post-thumbnail-"+a);c.text(setPostThumbnailL10n.saving),jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:a,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(b){var d=window.dialogArguments||opener||parent||top;c.text(setPostThumbnailL10n.setThumbnail),"0"==b?alert(setPostThumbnailL10n.error):(jQuery("a.wp-post-thumbnail").show(),c.text(setPostThumbnailL10n.done),c.fadeOut(2e3),d.WPSetThumbnailID(a),d.WPSetThumbnailHTML(b))})}
@@ -0,0 +1,240 @@
1
+ /**
2
+ * Attempt to re-color SVG icons used in the admin menu or the toolbar
3
+ *
4
+ */
5
+
6
+ window.wp = window.wp || {};
7
+
8
+ wp.svgPainter = ( function( $, window, document, undefined ) {
9
+ 'use strict';
10
+ var selector, base64, painter,
11
+ colorscheme = {},
12
+ elements = [];
13
+
14
+ $(document).ready( function() {
15
+ // detection for browser SVG capability
16
+ if ( document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) {
17
+ $( document.body ).removeClass( 'no-svg' ).addClass( 'svg' );
18
+ wp.svgPainter.init();
19
+ }
20
+ });
21
+
22
+ /**
23
+ * Needed only for IE9
24
+ *
25
+ * Based on jquery.base64.js 0.0.3 - https://github.com/yckart/jquery.base64.js
26
+ *
27
+ * Based on: https://gist.github.com/Yaffle/1284012
28
+ *
29
+ * Copyright (c) 2012 Yannick Albert (http://yckart.com)
30
+ * Licensed under the MIT license
31
+ * http://www.opensource.org/licenses/mit-license.php
32
+ */
33
+ base64 = ( function() {
34
+ var c,
35
+ b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
36
+ a256 = '',
37
+ r64 = [256],
38
+ r256 = [256],
39
+ i = 0;
40
+
41
+ function init() {
42
+ while( i < 256 ) {
43
+ c = String.fromCharCode(i);
44
+ a256 += c;
45
+ r256[i] = i;
46
+ r64[i] = b64.indexOf(c);
47
+ ++i;
48
+ }
49
+ }
50
+
51
+ function code( s, discard, alpha, beta, w1, w2 ) {
52
+ var tmp, length,
53
+ buffer = 0,
54
+ i = 0,
55
+ result = '',
56
+ bitsInBuffer = 0;
57
+
58
+ s = String(s);
59
+ length = s.length;
60
+
61
+ while( i < length ) {
62
+ c = s.charCodeAt(i);
63
+ c = c < 256 ? alpha[c] : -1;
64
+
65
+ buffer = ( buffer << w1 ) + c;
66
+ bitsInBuffer += w1;
67
+
68
+ while( bitsInBuffer >= w2 ) {
69
+ bitsInBuffer -= w2;
70
+ tmp = buffer >> bitsInBuffer;
71
+ result += beta.charAt(tmp);
72
+ buffer ^= tmp << bitsInBuffer;
73
+ }
74
+ ++i;
75
+ }
76
+
77
+ if ( ! discard && bitsInBuffer > 0 ) {
78
+ result += beta.charAt( buffer << ( w2 - bitsInBuffer ) );
79
+ }
80
+
81
+ return result;
82
+ }
83
+
84
+ function btoa( plain ) {
85
+ if ( ! c ) {
86
+ init();
87
+ }
88
+
89
+ plain = code( plain, false, r256, b64, 8, 6 );
90
+ return plain + '===='.slice( ( plain.length % 4 ) || 4 );
91
+ }
92
+
93
+ function atob( coded ) {
94
+ var i;
95
+
96
+ if ( ! c ) {
97
+ init();
98
+ }
99
+
100
+ coded = coded.replace( /[^A-Za-z0-9\+\/\=]/g, '' );
101
+ coded = String(coded).split('=');
102
+ i = coded.length;
103
+
104
+ do {
105
+ --i;
106
+ coded[i] = code( coded[i], true, r64, a256, 6, 8 );
107
+ } while ( i > 0 );
108
+
109
+ coded = coded.join('');
110
+ return coded;
111
+ }
112
+
113
+ return {
114
+ atob: atob,
115
+ btoa: btoa
116
+ };
117
+ })();
118
+
119
+ return {
120
+ init: function() {
121
+ painter = this;
122
+ selector = $( '#adminmenu .wp-menu-image, #wpadminbar .ab-item' );
123
+
124
+ this.setColors();
125
+ this.findElements();
126
+ this.paint();
127
+ },
128
+
129
+ setColors: function( colors ) {
130
+ if ( typeof colors === 'undefined' && typeof window._wpColorScheme !== 'undefined' ) {
131
+ colors = window._wpColorScheme;
132
+ }
133
+
134
+ if ( colors && colors.icons && colors.icons.base && colors.icons.current && colors.icons.focus ) {
135
+ colorscheme = colors.icons;
136
+ }
137
+ },
138
+
139
+ findElements: function() {
140
+ selector.each( function() {
141
+ var $this = $(this), bgImage = $this.css( 'background-image' );
142
+
143
+ if ( bgImage && bgImage.indexOf( 'data:image/svg+xml;base64' ) != -1 ) {
144
+ elements.push( $this );
145
+ }
146
+ });
147
+ },
148
+
149
+ paint: function() {
150
+ // loop through all elements
151
+ $.each( elements, function( index, $element ) {
152
+ var $menuitem = $element.parent().parent();
153
+
154
+ if ( $menuitem.hasClass( 'current' ) || $menuitem.hasClass( 'wp-has-current-submenu' ) ) {
155
+ // paint icon in 'current' color
156
+ painter.paintElement( $element, 'current' );
157
+ } else {
158
+ // paint icon in base color
159
+ painter.paintElement( $element, 'base' );
160
+
161
+ // set hover callbacks
162
+ $menuitem.hover(
163
+ function() {
164
+ painter.paintElement( $element, 'focus' );
165
+ },
166
+ function() {
167
+ // Match the delay from hoverIntent
168
+ window.setTimeout( function() {
169
+ painter.paintElement( $element, 'base' );
170
+ }, 100 );
171
+ }
172
+ );
173
+ }
174
+ });
175
+ },
176
+
177
+ paintElement: function( $element, colorType ) {
178
+ var xml, encoded, color;
179
+
180
+ if ( ! colorType || ! colorscheme.hasOwnProperty( colorType ) ) {
181
+ return;
182
+ }
183
+
184
+ color = colorscheme[ colorType ];
185
+
186
+ // only accept hex colors: #101 or #101010
187
+ if ( ! color.match( /^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i ) ) {
188
+ return;
189
+ }
190
+
191
+ xml = $element.data( 'wp-ui-svg-' + color );
192
+
193
+ if ( xml === 'none' ) {
194
+ return;
195
+ }
196
+
197
+ if ( ! xml ) {
198
+ encoded = $element.css( 'background-image' ).match( /.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/ );
199
+
200
+ if ( ! encoded || ! encoded[1] ) {
201
+ $element.data( 'wp-ui-svg-' + color, 'none' );
202
+ return;
203
+ }
204
+
205
+ try {
206
+ if ( 'atob' in window ) {
207
+ xml = window.atob( encoded[1] );
208
+ } else {
209
+ xml = base64.atob( encoded[1] );
210
+ }
211
+ } catch ( error ) {}
212
+
213
+ if ( xml ) {
214
+ // replace `fill` attributes
215
+ xml = xml.replace( /fill="(.+?)"/g, 'fill="' + color + '"');
216
+
217
+ // replace `style` attributes
218
+ xml = xml.replace( /style="(.+?)"/g, 'style="fill:' + color + '"');
219
+
220
+ // replace `fill` properties in `<style>` tags
221
+ xml = xml.replace( /fill:.*?;/g, 'fill: ' + color + ';');
222
+
223
+ if ( 'btoa' in window ) {
224
+ xml = window.btoa( xml );
225
+ } else {
226
+ xml = base64.btoa( xml );
227
+ }
228
+
229
+ $element.data( 'wp-ui-svg-' + color, xml );
230
+ } else {
231
+ $element.data( 'wp-ui-svg-' + color, 'none' );
232
+ return;
233
+ }
234
+ }
235
+
236
+ $element.attr( 'style', 'background-image: url("data:image/svg+xml;base64,' + xml + '") !important;' );
237
+ }
238
+ };
239
+
240
+ })( jQuery, window, document );
@@ -0,0 +1 @@
1
+ window.wp=window.wp||{},wp.svgPainter=function(a,b,c){"use strict";var d,e,f,g={},h=[];return a(c).ready(function(){c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")&&(a(c.body).removeClass("no-svg").addClass("svg"),wp.svgPainter.init())}),e=function(){function a(){for(;256>j;)e=String.fromCharCode(j),g+=e,i[j]=j,h[j]=f.indexOf(e),++j}function b(a,b,c,d,f,g){var h,i,j=0,k=0,l="",m=0;for(a=String(a),i=a.length;i>k;){for(e=a.charCodeAt(k),e=256>e?c[e]:-1,j=(j<<f)+e,m+=f;m>=g;)m-=g,h=j>>m,l+=d.charAt(h),j^=h<<m;++k}return!b&&m>0&&(l+=d.charAt(j<<g-m)),l}function c(c){return e||a(),c=b(c,!1,i,f,8,6),c+"====".slice(c.length%4||4)}function d(c){var d;e||a(),c=c.replace(/[^A-Za-z0-9\+\/\=]/g,""),c=String(c).split("="),d=c.length;do--d,c[d]=b(c[d],!0,h,g,6,8);while(d>0);return c=c.join("")}var e,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="",h=[256],i=[256],j=0;return{atob:d,btoa:c}}(),{init:function(){f=this,d=a("#adminmenu .wp-menu-image, #wpadminbar .ab-item"),this.setColors(),this.findElements(),this.paint()},setColors:function(a){"undefined"==typeof a&&"undefined"!=typeof b._wpColorScheme&&(a=b._wpColorScheme),a&&a.icons&&a.icons.base&&a.icons.current&&a.icons.focus&&(g=a.icons)},findElements:function(){d.each(function(){var b=a(this),c=b.css("background-image");c&&-1!=c.indexOf("data:image/svg+xml;base64")&&h.push(b)})},paint:function(){a.each(h,function(a,c){var d=c.parent().parent();d.hasClass("current")||d.hasClass("wp-has-current-submenu")?f.paintElement(c,"current"):(f.paintElement(c,"base"),d.hover(function(){f.paintElement(c,"focus")},function(){b.setTimeout(function(){f.paintElement(c,"base")},100)}))})},paintElement:function(a,c){var d,f,h;if(c&&g.hasOwnProperty(c)&&(h=g[c],h.match(/^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i)&&(d=a.data("wp-ui-svg-"+h),"none"!==d))){if(!d){if(f=a.css("background-image").match(/.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/),!f||!f[1])return void a.data("wp-ui-svg-"+h,"none");try{d="atob"in b?b.atob(f[1]):e.atob(f[1])}catch(i){}if(!d)return void a.data("wp-ui-svg-"+h,"none");d=d.replace(/fill="(.+?)"/g,'fill="'+h+'"'),d=d.replace(/style="(.+?)"/g,'style="fill:'+h+'"'),d=d.replace(/fill:.*?;/g,"fill: "+h+";"),d="btoa"in b?b.btoa(d):e.btoa(d),a.data("wp-ui-svg-"+h,d)}a.attr("style",'background-image: url("data:image/svg+xml;base64,'+d+'") !important;')}}}}(jQuery,window,document);
@@ -0,0 +1,72 @@
1
+ /* global ajaxurl, wpAjax, tagsl10n, showNotice, validateForm */
2
+
3
+ jQuery(document).ready(function($) {
4
+
5
+ $( '#the-list' ).on( 'click', '.delete-tag', function() {
6
+ var t = $(this), tr = t.parents('tr'), r = true, data;
7
+ if ( 'undefined' != showNotice )
8
+ r = showNotice.warn();
9
+ if ( r ) {
10
+ data = t.attr('href').replace(/[^?]*\?/, '').replace(/action=delete/, 'action=delete-tag');
11
+ $.post(ajaxurl, data, function(r){
12
+ if ( '1' == r ) {
13
+ $('#ajax-response').empty();
14
+ tr.fadeOut('normal', function(){ tr.remove(); });
15
+ // Remove the term from the parent box and tag cloud
16
+ $('select#parent option[value="' + data.match(/tag_ID=(\d+)/)[1] + '"]').remove();
17
+ $('a.tag-link-' + data.match(/tag_ID=(\d+)/)[1]).remove();
18
+ } else if ( '-1' == r ) {
19
+ $('#ajax-response').empty().append('<div class="error"><p>' + tagsl10n.noPerm + '</p></div>');
20
+ tr.children().css('backgroundColor', '');
21
+ } else {
22
+ $('#ajax-response').empty().append('<div class="error"><p>' + tagsl10n.broken + '</p></div>');
23
+ tr.children().css('backgroundColor', '');
24
+ }
25
+ });
26
+ tr.children().css('backgroundColor', '#f33');
27
+ }
28
+ return false;
29
+ });
30
+
31
+ $('#submit').click(function(){
32
+ var form = $(this).parents('form');
33
+
34
+ if ( ! validateForm( form ) )
35
+ return false;
36
+
37
+ $.post(ajaxurl, $('#addtag').serialize(), function(r){
38
+ var res, parent, term, indent, i;
39
+
40
+ $('#ajax-response').empty();
41
+ res = wpAjax.parseAjaxResponse( r, 'ajax-response' );
42
+ if ( ! res || res.errors )
43
+ return;
44
+
45
+ parent = form.find( 'select#parent' ).val();
46
+
47
+ if ( parent > 0 && $('#tag-' + parent ).length > 0 ) // If the parent exists on this page, insert it below. Else insert it at the top of the list.
48
+ $( '.tags #tag-' + parent ).after( res.responses[0].supplemental.noparents ); // As the parent exists, Insert the version with - - - prefixed
49
+ else
50
+ $( '.tags' ).prepend( res.responses[0].supplemental.parents ); // As the parent is not visible, Insert the version with Parent - Child - ThisTerm
51
+
52
+ $('.tags .no-items').remove();
53
+
54
+ if ( form.find('select#parent') ) {
55
+ // Parents field exists, Add new term to the list.
56
+ term = res.responses[1].supplemental;
57
+
58
+ // Create an indent for the Parent field
59
+ indent = '';
60
+ for ( i = 0; i < res.responses[1].position; i++ )
61
+ indent += '&nbsp;&nbsp;&nbsp;';
62
+
63
+ form.find( 'select#parent option:selected' ).after( '<option value="' + term.term_id + '">' + indent + term.name + '</option>' );
64
+ }
65
+
66
+ $('input[type="text"]:visible, textarea:visible', form).val('');
67
+ });
68
+
69
+ return false;
70
+ });
71
+
72
+ });
@@ -0,0 +1 @@
1
+ jQuery(document).ready(function(a){a("#the-list").on("click",".delete-tag",function(){var b,c=a(this),d=c.parents("tr"),e=!0;return"undefined"!=showNotice&&(e=showNotice.warn()),e&&(b=c.attr("href").replace(/[^?]*\?/,"").replace(/action=delete/,"action=delete-tag"),a.post(ajaxurl,b,function(c){"1"==c?(a("#ajax-response").empty(),d.fadeOut("normal",function(){d.remove()}),a('select#parent option[value="'+b.match(/tag_ID=(\d+)/)[1]+'"]').remove(),a("a.tag-link-"+b.match(/tag_ID=(\d+)/)[1]).remove()):"-1"==c?(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.noPerm+"</p></div>"),d.children().css("backgroundColor","")):(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.broken+"</p></div>"),d.children().css("backgroundColor",""))}),d.children().css("backgroundColor","#f33")),!1}),a("#submit").click(function(){var b=a(this).parents("form");return validateForm(b)?(a.post(ajaxurl,a("#addtag").serialize(),function(c){var d,e,f,g,h;if(a("#ajax-response").empty(),d=wpAjax.parseAjaxResponse(c,"ajax-response"),d&&!d.errors){if(e=b.find("select#parent").val(),e>0&&a("#tag-"+e).length>0?a(".tags #tag-"+e).after(d.responses[0].supplemental.noparents):a(".tags").prepend(d.responses[0].supplemental.parents),a(".tags .no-items").remove(),b.find("select#parent")){for(f=d.responses[1].supplemental,g="",h=0;h<d.responses[1].position;h++)g+="&nbsp;&nbsp;&nbsp;";b.find("select#parent option:selected").after('<option value="'+f.term_id+'">'+g+f.name+"</option>")}a('input[type="text"]:visible, textarea:visible',b).val("")}}),!1):!1})});
@@ -0,0 +1,1691 @@
1
+ /* global _wpThemeSettings, confirm */
2
+ window.wp = window.wp || {};
3
+
4
+ ( function($) {
5
+
6
+ // Set up our namespace...
7
+ var themes, l10n;
8
+ themes = wp.themes = wp.themes || {};
9
+
10
+ // Store the theme data and settings for organized and quick access
11
+ // themes.data.settings, themes.data.themes, themes.data.l10n
12
+ themes.data = _wpThemeSettings;
13
+ l10n = themes.data.l10n;
14
+
15
+ // Shortcut for isInstall check
16
+ themes.isInstall = !! themes.data.settings.isInstall;
17
+
18
+ // Setup app structure
19
+ _.extend( themes, { model: {}, view: {}, routes: {}, router: {}, template: wp.template });
20
+
21
+ themes.Model = Backbone.Model.extend({
22
+ // Adds attributes to the default data coming through the .org themes api
23
+ // Map `id` to `slug` for shared code
24
+ initialize: function() {
25
+ var description;
26
+
27
+ // If theme is already installed, set an attribute.
28
+ if ( _.indexOf( themes.data.installedThemes, this.get( 'slug' ) ) !== -1 ) {
29
+ this.set({ installed: true });
30
+ }
31
+
32
+ // Set the attributes
33
+ this.set({
34
+ // slug is for installation, id is for existing.
35
+ id: this.get( 'slug' ) || this.get( 'id' )
36
+ });
37
+
38
+ // Map `section.description` to `description`
39
+ // as the API sometimes returns it differently
40
+ if ( this.has( 'sections' ) ) {
41
+ description = this.get( 'sections' ).description;
42
+ this.set({ description: description });
43
+ }
44
+ }
45
+ });
46
+
47
+ // Main view controller for themes.php
48
+ // Unifies and renders all available views
49
+ themes.view.Appearance = wp.Backbone.View.extend({
50
+
51
+ el: '#wpbody-content .wrap .theme-browser',
52
+
53
+ window: $( window ),
54
+ // Pagination instance
55
+ page: 0,
56
+
57
+ // Sets up a throttler for binding to 'scroll'
58
+ initialize: function( options ) {
59
+ // Scroller checks how far the scroll position is
60
+ _.bindAll( this, 'scroller' );
61
+
62
+ this.SearchView = options.SearchView ? options.SearchView : themes.view.Search;
63
+ // Bind to the scroll event and throttle
64
+ // the results from this.scroller
65
+ this.window.bind( 'scroll', _.throttle( this.scroller, 300 ) );
66
+ },
67
+
68
+ // Main render control
69
+ render: function() {
70
+ // Setup the main theme view
71
+ // with the current theme collection
72
+ this.view = new themes.view.Themes({
73
+ collection: this.collection,
74
+ parent: this
75
+ });
76
+
77
+ // Render search form.
78
+ this.search();
79
+
80
+ // Render and append
81
+ this.view.render();
82
+ this.$el.empty().append( this.view.el ).addClass('rendered');
83
+ this.$el.append( '<br class="clear"/>' );
84
+ },
85
+
86
+ // Defines search element container
87
+ searchContainer: $( '#wpbody h2:first' ),
88
+
89
+ // Search input and view
90
+ // for current theme collection
91
+ search: function() {
92
+ var view,
93
+ self = this;
94
+
95
+ // Don't render the search if there is only one theme
96
+ if ( themes.data.themes.length === 1 ) {
97
+ return;
98
+ }
99
+
100
+ view = new this.SearchView({
101
+ collection: self.collection,
102
+ parent: this
103
+ });
104
+
105
+ // Render and append after screen title
106
+ view.render();
107
+ this.searchContainer
108
+ .append( $.parseHTML( '<label class="screen-reader-text" for="wp-filter-search-input">' + l10n.search + '</label>' ) )
109
+ .append( view.el );
110
+ },
111
+
112
+ // Checks when the user gets close to the bottom
113
+ // of the mage and triggers a theme:scroll event
114
+ scroller: function() {
115
+ var self = this,
116
+ bottom, threshold;
117
+
118
+ bottom = this.window.scrollTop() + self.window.height();
119
+ threshold = self.$el.offset().top + self.$el.outerHeight( false ) - self.window.height();
120
+ threshold = Math.round( threshold * 0.9 );
121
+
122
+ if ( bottom > threshold ) {
123
+ this.trigger( 'theme:scroll' );
124
+ }
125
+ }
126
+ });
127
+
128
+ // Set up the Collection for our theme data
129
+ // @has 'id' 'name' 'screenshot' 'author' 'authorURI' 'version' 'active' ...
130
+ themes.Collection = Backbone.Collection.extend({
131
+
132
+ model: themes.Model,
133
+
134
+ // Search terms
135
+ terms: '',
136
+
137
+ // Controls searching on the current theme collection
138
+ // and triggers an update event
139
+ doSearch: function( value ) {
140
+
141
+ // Don't do anything if we've already done this search
142
+ // Useful because the Search handler fires multiple times per keystroke
143
+ if ( this.terms === value ) {
144
+ return;
145
+ }
146
+
147
+ // Updates terms with the value passed
148
+ this.terms = value;
149
+
150
+ // If we have terms, run a search...
151
+ if ( this.terms.length > 0 ) {
152
+ this.search( this.terms );
153
+ }
154
+
155
+ // If search is blank, show all themes
156
+ // Useful for resetting the views when you clean the input
157
+ if ( this.terms === '' ) {
158
+ this.reset( themes.data.themes );
159
+ }
160
+
161
+ // Trigger an 'update' event
162
+ this.trigger( 'update' );
163
+ },
164
+
165
+ // Performs a search within the collection
166
+ // @uses RegExp
167
+ search: function( term ) {
168
+ var match, results, haystack;
169
+
170
+ // Start with a full collection
171
+ this.reset( themes.data.themes, { silent: true } );
172
+
173
+ // Escape the term string for RegExp meta characters
174
+ term = term.replace( /[-\/\\^$*+?.()|[\]{}]/g, '\\$&' );
175
+
176
+ // Consider spaces as word delimiters and match the whole string
177
+ // so matching terms can be combined
178
+ term = term.replace( / /g, ')(?=.*' );
179
+ match = new RegExp( '^(?=.*' + term + ').+', 'i' );
180
+
181
+ // Find results
182
+ // _.filter and .test
183
+ results = this.filter( function( data ) {
184
+ haystack = _.union( data.get( 'name' ), data.get( 'id' ), data.get( 'description' ), data.get( 'author' ), data.get( 'tags' ) );
185
+
186
+ if ( match.test( data.get( 'author' ) ) && term.length > 2 ) {
187
+ data.set( 'displayAuthor', true );
188
+ }
189
+
190
+ return match.test( haystack );
191
+ });
192
+
193
+ if ( results.length === 0 ) {
194
+ this.trigger( 'query:empty' );
195
+ } else {
196
+ $( 'body' ).removeClass( 'no-results' );
197
+ }
198
+
199
+ this.reset( results );
200
+ },
201
+
202
+ // Paginates the collection with a helper method
203
+ // that slices the collection
204
+ paginate: function( instance ) {
205
+ var collection = this;
206
+ instance = instance || 0;
207
+
208
+ // Themes per instance are set at 20
209
+ collection = _( collection.rest( 20 * instance ) );
210
+ collection = _( collection.first( 20 ) );
211
+
212
+ return collection;
213
+ },
214
+
215
+ count: false,
216
+
217
+ // Handles requests for more themes
218
+ // and caches results
219
+ //
220
+ // When we are missing a cache object we fire an apiCall()
221
+ // which triggers events of `query:success` or `query:fail`
222
+ query: function( request ) {
223
+ /**
224
+ * @static
225
+ * @type Array
226
+ */
227
+ var queries = this.queries,
228
+ self = this,
229
+ query, isPaginated, count;
230
+
231
+ // Store current query request args
232
+ // for later use with the event `theme:end`
233
+ this.currentQuery.request = request;
234
+
235
+ // Search the query cache for matches.
236
+ query = _.find( queries, function( query ) {
237
+ return _.isEqual( query.request, request );
238
+ });
239
+
240
+ // If the request matches the stored currentQuery.request
241
+ // it means we have a paginated request.
242
+ isPaginated = _.has( request, 'page' );
243
+
244
+ // Reset the internal api page counter for non paginated queries.
245
+ if ( ! isPaginated ) {
246
+ this.currentQuery.page = 1;
247
+ }
248
+
249
+ // Otherwise, send a new API call and add it to the cache.
250
+ if ( ! query && ! isPaginated ) {
251
+ query = this.apiCall( request ).done( function( data ) {
252
+
253
+ // Update the collection with the queried data.
254
+ if ( data.themes ) {
255
+ self.reset( data.themes );
256
+ count = data.info.results;
257
+ // Store the results and the query request
258
+ queries.push( { themes: data.themes, request: request, total: count } );
259
+ }
260
+
261
+ // Trigger a collection refresh event
262
+ // and a `query:success` event with a `count` argument.
263
+ self.trigger( 'update' );
264
+ self.trigger( 'query:success', count );
265
+
266
+ if ( data.themes && data.themes.length === 0 ) {
267
+ self.trigger( 'query:empty' );
268
+ }
269
+
270
+ }).fail( function() {
271
+ self.trigger( 'query:fail' );
272
+ });
273
+ } else {
274
+ // If it's a paginated request we need to fetch more themes...
275
+ if ( isPaginated ) {
276
+ return this.apiCall( request, isPaginated ).done( function( data ) {
277
+ // Add the new themes to the current collection
278
+ // @todo update counter
279
+ self.add( data.themes );
280
+ self.trigger( 'query:success' );
281
+
282
+ // We are done loading themes for now.
283
+ self.loadingThemes = false;
284
+
285
+ }).fail( function() {
286
+ self.trigger( 'query:fail' );
287
+ });
288
+ }
289
+
290
+ if ( query.themes.length === 0 ) {
291
+ self.trigger( 'query:empty' );
292
+ } else {
293
+ $( 'body' ).removeClass( 'no-results' );
294
+ }
295
+
296
+ // Only trigger an update event since we already have the themes
297
+ // on our cached object
298
+ if ( _.isNumber( query.total ) ) {
299
+ this.count = query.total;
300
+ }
301
+
302
+ this.reset( query.themes );
303
+ if ( ! query.total ) {
304
+ this.count = this.length;
305
+ }
306
+
307
+ this.trigger( 'update' );
308
+ this.trigger( 'query:success', this.count );
309
+ }
310
+ },
311
+
312
+ // Local cache array for API queries
313
+ queries: [],
314
+
315
+ // Keep track of current query so we can handle pagination
316
+ currentQuery: {
317
+ page: 1,
318
+ request: {}
319
+ },
320
+
321
+ // Send request to api.wordpress.org/themes
322
+ apiCall: function( request, paginated ) {
323
+ return wp.ajax.send( 'query-themes', {
324
+ data: {
325
+ // Request data
326
+ request: _.extend({
327
+ per_page: 100,
328
+ fields: {
329
+ description: true,
330
+ tested: true,
331
+ requires: true,
332
+ rating: true,
333
+ downloaded: true,
334
+ downloadLink: true,
335
+ last_updated: true,
336
+ homepage: true,
337
+ num_ratings: true
338
+ }
339
+ }, request)
340
+ },
341
+
342
+ beforeSend: function() {
343
+ if ( ! paginated ) {
344
+ // Spin it
345
+ $( 'body' ).addClass( 'loading-content' ).removeClass( 'no-results' );
346
+ }
347
+ }
348
+ });
349
+ },
350
+
351
+ // Static status controller for when we are loading themes.
352
+ loadingThemes: false
353
+ });
354
+
355
+ // This is the view that controls each theme item
356
+ // that will be displayed on the screen
357
+ themes.view.Theme = wp.Backbone.View.extend({
358
+
359
+ // Wrap theme data on a div.theme element
360
+ className: 'theme',
361
+
362
+ // Reflects which theme view we have
363
+ // 'grid' (default) or 'detail'
364
+ state: 'grid',
365
+
366
+ // The HTML template for each element to be rendered
367
+ html: themes.template( 'theme' ),
368
+
369
+ events: {
370
+ 'click': themes.isInstall ? 'preview': 'expand',
371
+ 'keydown': themes.isInstall ? 'preview': 'expand',
372
+ 'touchend': themes.isInstall ? 'preview': 'expand',
373
+ 'keyup': 'addFocus',
374
+ 'touchmove': 'preventExpand'
375
+ },
376
+
377
+ touchDrag: false,
378
+
379
+ render: function() {
380
+ var data = this.model.toJSON();
381
+ // Render themes using the html template
382
+ this.$el.html( this.html( data ) ).attr({
383
+ tabindex: 0,
384
+ 'aria-describedby' : data.id + '-action ' + data.id + '-name'
385
+ });
386
+
387
+ // Renders active theme styles
388
+ this.activeTheme();
389
+
390
+ if ( this.model.get( 'displayAuthor' ) ) {
391
+ this.$el.addClass( 'display-author' );
392
+ }
393
+
394
+ if ( this.model.get( 'installed' ) ) {
395
+ this.$el.addClass( 'is-installed' );
396
+ }
397
+ },
398
+
399
+ // Adds a class to the currently active theme
400
+ // and to the overlay in detailed view mode
401
+ activeTheme: function() {
402
+ if ( this.model.get( 'active' ) ) {
403
+ this.$el.addClass( 'active' );
404
+ }
405
+ },
406
+
407
+ // Add class of focus to the theme we are focused on.
408
+ addFocus: function() {
409
+ var $themeToFocus = ( $( ':focus' ).hasClass( 'theme' ) ) ? $( ':focus' ) : $(':focus').parents('.theme');
410
+
411
+ $('.theme.focus').removeClass('focus');
412
+ $themeToFocus.addClass('focus');
413
+ },
414
+
415
+ // Single theme overlay screen
416
+ // It's shown when clicking a theme
417
+ expand: function( event ) {
418
+ var self = this;
419
+
420
+ event = event || window.event;
421
+
422
+ // 'enter' and 'space' keys expand the details view when a theme is :focused
423
+ if ( event.type === 'keydown' && ( event.which !== 13 && event.which !== 32 ) ) {
424
+ return;
425
+ }
426
+
427
+ // Bail if the user scrolled on a touch device
428
+ if ( this.touchDrag === true ) {
429
+ return this.touchDrag = false;
430
+ }
431
+
432
+ // Prevent the modal from showing when the user clicks
433
+ // one of the direct action buttons
434
+ if ( $( event.target ).is( '.theme-actions a' ) ) {
435
+ return;
436
+ }
437
+
438
+ // Set focused theme to current element
439
+ themes.focusedTheme = this.$el;
440
+
441
+ this.trigger( 'theme:expand', self.model.cid );
442
+ },
443
+
444
+ preventExpand: function() {
445
+ this.touchDrag = true;
446
+ },
447
+
448
+ preview: function( event ) {
449
+ var self = this,
450
+ current, preview;
451
+
452
+ // Bail if the user scrolled on a touch device
453
+ if ( this.touchDrag === true ) {
454
+ return this.touchDrag = false;
455
+ }
456
+
457
+ // Allow direct link path to installing a theme.
458
+ if ( $( event.target ).hasClass( 'button-primary' ) ) {
459
+ return;
460
+ }
461
+
462
+ // 'enter' and 'space' keys expand the details view when a theme is :focused
463
+ if ( event.type === 'keydown' && ( event.which !== 13 && event.which !== 32 ) ) {
464
+ return;
465
+ }
466
+
467
+ // pressing enter while focused on the buttons shouldn't open the preview
468
+ if ( event.type === 'keydown' && event.which !== 13 && $( ':focus' ).hasClass( 'button' ) ) {
469
+ return;
470
+ }
471
+
472
+ event.preventDefault();
473
+
474
+ event = event || window.event;
475
+
476
+ // Set focus to current theme.
477
+ themes.focusedTheme = this.$el;
478
+
479
+ // Construct a new Preview view.
480
+ preview = new themes.view.Preview({
481
+ model: this.model
482
+ });
483
+
484
+ // Render the view and append it.
485
+ preview.render();
486
+ this.setNavButtonsState();
487
+
488
+ // Hide previous/next navigation if there is only one theme
489
+ if ( this.model.collection.length === 1 ) {
490
+ preview.$el.addClass( 'no-navigation' );
491
+ } else {
492
+ preview.$el.removeClass( 'no-navigation' );
493
+ }
494
+
495
+ // Append preview
496
+ $( 'div.wrap' ).append( preview.el );
497
+
498
+ // Listen to our preview object
499
+ // for `theme:next` and `theme:previous` events.
500
+ this.listenTo( preview, 'theme:next', function() {
501
+
502
+ // Keep local track of current theme model.
503
+ current = self.model;
504
+
505
+ // If we have ventured away from current model update the current model position.
506
+ if ( ! _.isUndefined( self.current ) ) {
507
+ current = self.current;
508
+ }
509
+
510
+ // Get next theme model.
511
+ self.current = self.model.collection.at( self.model.collection.indexOf( current ) + 1 );
512
+
513
+ // If we have no more themes, bail.
514
+ if ( _.isUndefined( self.current ) ) {
515
+ self.options.parent.parent.trigger( 'theme:end' );
516
+ return self.current = current;
517
+ }
518
+
519
+ preview.model = self.current;
520
+
521
+ // Render and append.
522
+ preview.render();
523
+ this.setNavButtonsState();
524
+ $( '.next-theme' ).focus();
525
+ })
526
+ .listenTo( preview, 'theme:previous', function() {
527
+
528
+ // Keep track of current theme model.
529
+ current = self.model;
530
+
531
+ // Bail early if we are at the beginning of the collection
532
+ if ( self.model.collection.indexOf( self.current ) === 0 ) {
533
+ return;
534
+ }
535
+
536
+ // If we have ventured away from current model update the current model position.
537
+ if ( ! _.isUndefined( self.current ) ) {
538
+ current = self.current;
539
+ }
540
+
541
+ // Get previous theme model.
542
+ self.current = self.model.collection.at( self.model.collection.indexOf( current ) - 1 );
543
+
544
+ // If we have no more themes, bail.
545
+ if ( _.isUndefined( self.current ) ) {
546
+ return;
547
+ }
548
+
549
+ preview.model = self.current;
550
+
551
+ // Render and append.
552
+ preview.render();
553
+ this.setNavButtonsState();
554
+ $( '.previous-theme' ).focus();
555
+ });
556
+
557
+ this.listenTo( preview, 'preview:close', function() {
558
+ self.current = self.model;
559
+ });
560
+ },
561
+
562
+ // Handles .disabled classes for previous/next buttons in theme installer preview
563
+ setNavButtonsState: function() {
564
+ var $themeInstaller = $( '.theme-install-overlay' ),
565
+ current = _.isUndefined( this.current ) ? this.model : this.current;
566
+
567
+ // Disable previous at the zero position
568
+ if ( 0 === this.model.collection.indexOf( current ) ) {
569
+ $themeInstaller.find( '.previous-theme' ).addClass( 'disabled' );
570
+ }
571
+
572
+ // Disable next if the next model is undefined
573
+ if ( _.isUndefined( this.model.collection.at( this.model.collection.indexOf( current ) + 1 ) ) ) {
574
+ $themeInstaller.find( '.next-theme' ).addClass( 'disabled' );
575
+ }
576
+ }
577
+ });
578
+
579
+ // Theme Details view
580
+ // Set ups a modal overlay with the expanded theme data
581
+ themes.view.Details = wp.Backbone.View.extend({
582
+
583
+ // Wrap theme data on a div.theme element
584
+ className: 'theme-overlay',
585
+
586
+ events: {
587
+ 'click': 'collapse',
588
+ 'click .delete-theme': 'deleteTheme',
589
+ 'click .left': 'previousTheme',
590
+ 'click .right': 'nextTheme'
591
+ },
592
+
593
+ // The HTML template for the theme overlay
594
+ html: themes.template( 'theme-single' ),
595
+
596
+ render: function() {
597
+ var data = this.model.toJSON();
598
+ this.$el.html( this.html( data ) );
599
+ // Renders active theme styles
600
+ this.activeTheme();
601
+ // Set up navigation events
602
+ this.navigation();
603
+ // Checks screenshot size
604
+ this.screenshotCheck( this.$el );
605
+ // Contain "tabbing" inside the overlay
606
+ this.containFocus( this.$el );
607
+ },
608
+
609
+ // Adds a class to the currently active theme
610
+ // and to the overlay in detailed view mode
611
+ activeTheme: function() {
612
+ // Check the model has the active property
613
+ this.$el.toggleClass( 'active', this.model.get( 'active' ) );
614
+ },
615
+
616
+ // Keeps :focus within the theme details elements
617
+ containFocus: function( $el ) {
618
+ var $target;
619
+
620
+ // Move focus to the primary action
621
+ _.delay( function() {
622
+ $( '.theme-wrap a.button-primary:visible' ).focus();
623
+ }, 500 );
624
+
625
+ $el.on( 'keydown.wp-themes', function( event ) {
626
+
627
+ // Tab key
628
+ if ( event.which === 9 ) {
629
+ $target = $( event.target );
630
+
631
+ // Keep focus within the overlay by making the last link on theme actions
632
+ // switch focus to button.left on tabbing and vice versa
633
+ if ( $target.is( 'button.left' ) && event.shiftKey ) {
634
+ $el.find( '.theme-actions a:last-child' ).focus();
635
+ event.preventDefault();
636
+ } else if ( $target.is( '.theme-actions a:last-child' ) ) {
637
+ $el.find( 'button.left' ).focus();
638
+ event.preventDefault();
639
+ }
640
+ }
641
+ });
642
+ },
643
+
644
+ // Single theme overlay screen
645
+ // It's shown when clicking a theme
646
+ collapse: function( event ) {
647
+ var self = this,
648
+ scroll;
649
+
650
+ event = event || window.event;
651
+
652
+ // Prevent collapsing detailed view when there is only one theme available
653
+ if ( themes.data.themes.length === 1 ) {
654
+ return;
655
+ }
656
+
657
+ // Detect if the click is inside the overlay
658
+ // and don't close it unless the target was
659
+ // the div.back button
660
+ if ( $( event.target ).is( '.theme-backdrop' ) || $( event.target ).is( '.close' ) || event.keyCode === 27 ) {
661
+
662
+ // Add a temporary closing class while overlay fades out
663
+ $( 'body' ).addClass( 'closing-overlay' );
664
+
665
+ // With a quick fade out animation
666
+ this.$el.fadeOut( 130, function() {
667
+ // Clicking outside the modal box closes the overlay
668
+ $( 'body' ).removeClass( 'closing-overlay' );
669
+ // Handle event cleanup
670
+ self.closeOverlay();
671
+
672
+ // Get scroll position to avoid jumping to the top
673
+ scroll = document.body.scrollTop;
674
+
675
+ // Clean the url structure
676
+ themes.router.navigate( themes.router.baseUrl( '' ) );
677
+
678
+ // Restore scroll position
679
+ document.body.scrollTop = scroll;
680
+
681
+ // Return focus to the theme div
682
+ if ( themes.focusedTheme ) {
683
+ themes.focusedTheme.focus();
684
+ }
685
+ });
686
+ }
687
+ },
688
+
689
+ // Handles .disabled classes for next/previous buttons
690
+ navigation: function() {
691
+
692
+ // Disable Left/Right when at the start or end of the collection
693
+ if ( this.model.cid === this.model.collection.at(0).cid ) {
694
+ this.$el.find( '.left' ).addClass( 'disabled' );
695
+ }
696
+ if ( this.model.cid === this.model.collection.at( this.model.collection.length - 1 ).cid ) {
697
+ this.$el.find( '.right' ).addClass( 'disabled' );
698
+ }
699
+ },
700
+
701
+ // Performs the actions to effectively close
702
+ // the theme details overlay
703
+ closeOverlay: function() {
704
+ $( 'body' ).removeClass( 'modal-open' );
705
+ this.remove();
706
+ this.unbind();
707
+ this.trigger( 'theme:collapse' );
708
+ },
709
+
710
+ // Confirmation dialog for deleting a theme
711
+ deleteTheme: function() {
712
+ return confirm( themes.data.settings.confirmDelete );
713
+ },
714
+
715
+ nextTheme: function() {
716
+ var self = this;
717
+ self.trigger( 'theme:next', self.model.cid );
718
+ return false;
719
+ },
720
+
721
+ previousTheme: function() {
722
+ var self = this;
723
+ self.trigger( 'theme:previous', self.model.cid );
724
+ return false;
725
+ },
726
+
727
+ // Checks if the theme screenshot is the old 300px width version
728
+ // and adds a corresponding class if it's true
729
+ screenshotCheck: function( el ) {
730
+ var screenshot, image;
731
+
732
+ screenshot = el.find( '.screenshot img' );
733
+ image = new Image();
734
+ image.src = screenshot.attr( 'src' );
735
+
736
+ // Width check
737
+ if ( image.width && image.width <= 300 ) {
738
+ el.addClass( 'small-screenshot' );
739
+ }
740
+ }
741
+ });
742
+
743
+ // Theme Preview view
744
+ // Set ups a modal overlay with the expanded theme data
745
+ themes.view.Preview = themes.view.Details.extend({
746
+
747
+ className: 'wp-full-overlay expanded',
748
+ el: '.theme-install-overlay',
749
+
750
+ events: {
751
+ 'click .close-full-overlay': 'close',
752
+ 'click .collapse-sidebar': 'collapse',
753
+ 'click .previous-theme': 'previousTheme',
754
+ 'click .next-theme': 'nextTheme',
755
+ 'keyup': 'keyEvent'
756
+ },
757
+
758
+ // The HTML template for the theme preview
759
+ html: themes.template( 'theme-preview' ),
760
+
761
+ render: function() {
762
+ var data = this.model.toJSON();
763
+
764
+ this.$el.html( this.html( data ) );
765
+
766
+ themes.router.navigate( themes.router.baseUrl( '?theme=' + this.model.get( 'id' ) ), { replace: true } );
767
+
768
+ this.$el.fadeIn( 200, function() {
769
+ $( 'body' ).addClass( 'theme-installer-active full-overlay-active' );
770
+ $( '.close-full-overlay' ).focus();
771
+ });
772
+ },
773
+
774
+ close: function() {
775
+ this.$el.fadeOut( 200, function() {
776
+ $( 'body' ).removeClass( 'theme-installer-active full-overlay-active' );
777
+
778
+ // Return focus to the theme div
779
+ if ( themes.focusedTheme ) {
780
+ themes.focusedTheme.focus();
781
+ }
782
+ });
783
+
784
+ themes.router.navigate( themes.router.baseUrl( '' ) );
785
+ this.trigger( 'preview:close' );
786
+ this.undelegateEvents();
787
+ this.unbind();
788
+ return false;
789
+ },
790
+
791
+ collapse: function() {
792
+
793
+ this.$el.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
794
+ return false;
795
+ },
796
+
797
+ keyEvent: function( event ) {
798
+ // The escape key closes the preview
799
+ if ( event.keyCode === 27 ) {
800
+ this.undelegateEvents();
801
+ this.close();
802
+ }
803
+ // The right arrow key, next theme
804
+ if ( event.keyCode === 39 ) {
805
+ _.once( this.nextTheme() );
806
+ }
807
+
808
+ // The left arrow key, previous theme
809
+ if ( event.keyCode === 37 ) {
810
+ this.previousTheme();
811
+ }
812
+ }
813
+ });
814
+
815
+ // Controls the rendering of div.themes,
816
+ // a wrapper that will hold all the theme elements
817
+ themes.view.Themes = wp.Backbone.View.extend({
818
+
819
+ className: 'themes',
820
+ $overlay: $( 'div.theme-overlay' ),
821
+
822
+ // Number to keep track of scroll position
823
+ // while in theme-overlay mode
824
+ index: 0,
825
+
826
+ // The theme count element
827
+ count: $( '.wp-filter .theme-count' ),
828
+
829
+ initialize: function( options ) {
830
+ var self = this;
831
+
832
+ // Set up parent
833
+ this.parent = options.parent;
834
+
835
+ // Set current view to [grid]
836
+ this.setView( 'grid' );
837
+
838
+ // Move the active theme to the beginning of the collection
839
+ self.currentTheme();
840
+
841
+ // When the collection is updated by user input...
842
+ this.listenTo( self.collection, 'update', function() {
843
+ self.parent.page = 0;
844
+ self.currentTheme();
845
+ self.render( this );
846
+ });
847
+
848
+ // Update theme count to full result set when available.
849
+ this.listenTo( self.collection, 'query:success', function( count ) {
850
+ if ( _.isNumber( count ) ) {
851
+ self.count.text( count );
852
+ } else {
853
+ self.count.text( self.collection.length );
854
+ }
855
+ });
856
+
857
+ this.listenTo( self.collection, 'query:empty', function() {
858
+ $( 'body' ).addClass( 'no-results' );
859
+ });
860
+
861
+ this.listenTo( this.parent, 'theme:scroll', function() {
862
+ self.renderThemes( self.parent.page );
863
+ });
864
+
865
+ this.listenTo( this.parent, 'theme:close', function() {
866
+ if ( self.overlay ) {
867
+ self.overlay.closeOverlay();
868
+ }
869
+ } );
870
+
871
+ // Bind keyboard events.
872
+ $( 'body' ).on( 'keyup', function( event ) {
873
+ if ( ! self.overlay ) {
874
+ return;
875
+ }
876
+
877
+ // Pressing the right arrow key fires a theme:next event
878
+ if ( event.keyCode === 39 ) {
879
+ self.overlay.nextTheme();
880
+ }
881
+
882
+ // Pressing the left arrow key fires a theme:previous event
883
+ if ( event.keyCode === 37 ) {
884
+ self.overlay.previousTheme();
885
+ }
886
+
887
+ // Pressing the escape key fires a theme:collapse event
888
+ if ( event.keyCode === 27 ) {
889
+ self.overlay.collapse( event );
890
+ }
891
+ });
892
+ },
893
+
894
+ // Manages rendering of theme pages
895
+ // and keeping theme count in sync
896
+ render: function() {
897
+ // Clear the DOM, please
898
+ this.$el.html( '' );
899
+
900
+ // If the user doesn't have switch capabilities
901
+ // or there is only one theme in the collection
902
+ // render the detailed view of the active theme
903
+ if ( themes.data.themes.length === 1 ) {
904
+
905
+ // Constructs the view
906
+ this.singleTheme = new themes.view.Details({
907
+ model: this.collection.models[0]
908
+ });
909
+
910
+ // Render and apply a 'single-theme' class to our container
911
+ this.singleTheme.render();
912
+ this.$el.addClass( 'single-theme' );
913
+ this.$el.append( this.singleTheme.el );
914
+ }
915
+
916
+ // Generate the themes
917
+ // Using page instance
918
+ // While checking the collection has items
919
+ if ( this.options.collection.size() > 0 ) {
920
+ this.renderThemes( this.parent.page );
921
+ }
922
+
923
+ // Display a live theme count for the collection
924
+ this.count.text( this.collection.count ? this.collection.count : this.collection.length );
925
+ },
926
+
927
+ // Iterates through each instance of the collection
928
+ // and renders each theme module
929
+ renderThemes: function( page ) {
930
+ var self = this;
931
+
932
+ self.instance = self.collection.paginate( page );
933
+
934
+ // If we have no more themes bail
935
+ if ( self.instance.size() === 0 ) {
936
+ // Fire a no-more-themes event.
937
+ this.parent.trigger( 'theme:end' );
938
+ return;
939
+ }
940
+
941
+ // Make sure the add-new stays at the end
942
+ if ( page >= 1 ) {
943
+ $( '.add-new-theme' ).remove();
944
+ }
945
+
946
+ // Loop through the themes and setup each theme view
947
+ self.instance.each( function( theme ) {
948
+ self.theme = new themes.view.Theme({
949
+ model: theme,
950
+ parent: self
951
+ });
952
+
953
+ // Render the views...
954
+ self.theme.render();
955
+ // and append them to div.themes
956
+ self.$el.append( self.theme.el );
957
+
958
+ // Binds to theme:expand to show the modal box
959
+ // with the theme details
960
+ self.listenTo( self.theme, 'theme:expand', self.expand, self );
961
+ });
962
+
963
+ // 'Add new theme' element shown at the end of the grid
964
+ if ( themes.data.settings.canInstall ) {
965
+ this.$el.append( '<div class="theme add-new-theme"><a href="' + themes.data.settings.installURI + '"><div class="theme-screenshot"><span></span></div><h3 class="theme-name">' + l10n.addNew + '</h3></a></div>' );
966
+ }
967
+
968
+ this.parent.page++;
969
+ },
970
+
971
+ // Grabs current theme and puts it at the beginning of the collection
972
+ currentTheme: function() {
973
+ var self = this,
974
+ current;
975
+
976
+ current = self.collection.findWhere({ active: true });
977
+
978
+ // Move the active theme to the beginning of the collection
979
+ if ( current ) {
980
+ self.collection.remove( current );
981
+ self.collection.add( current, { at:0 } );
982
+ }
983
+ },
984
+
985
+ // Sets current view
986
+ setView: function( view ) {
987
+ return view;
988
+ },
989
+
990
+ // Renders the overlay with the ThemeDetails view
991
+ // Uses the current model data
992
+ expand: function( id ) {
993
+ var self = this;
994
+
995
+ // Set the current theme model
996
+ this.model = self.collection.get( id );
997
+
998
+ // Trigger a route update for the current model
999
+ themes.router.navigate( themes.router.baseUrl( '?theme=' + this.model.id ) );
1000
+
1001
+ // Sets this.view to 'detail'
1002
+ this.setView( 'detail' );
1003
+ $( 'body' ).addClass( 'modal-open' );
1004
+
1005
+ // Set up the theme details view
1006
+ this.overlay = new themes.view.Details({
1007
+ model: self.model
1008
+ });
1009
+
1010
+ this.overlay.render();
1011
+ this.$overlay.html( this.overlay.el );
1012
+
1013
+ // Bind to theme:next and theme:previous
1014
+ // triggered by the arrow keys
1015
+ //
1016
+ // Keep track of the current model so we
1017
+ // can infer an index position
1018
+ this.listenTo( this.overlay, 'theme:next', function() {
1019
+ // Renders the next theme on the overlay
1020
+ self.next( [ self.model.cid ] );
1021
+
1022
+ })
1023
+ .listenTo( this.overlay, 'theme:previous', function() {
1024
+ // Renders the previous theme on the overlay
1025
+ self.previous( [ self.model.cid ] );
1026
+ });
1027
+ },
1028
+
1029
+ // This method renders the next theme on the overlay modal
1030
+ // based on the current position in the collection
1031
+ // @params [model cid]
1032
+ next: function( args ) {
1033
+ var self = this,
1034
+ model, nextModel;
1035
+
1036
+ // Get the current theme
1037
+ model = self.collection.get( args[0] );
1038
+ // Find the next model within the collection
1039
+ nextModel = self.collection.at( self.collection.indexOf( model ) + 1 );
1040
+
1041
+ // Sanity check which also serves as a boundary test
1042
+ if ( nextModel !== undefined ) {
1043
+
1044
+ // We have a new theme...
1045
+ // Close the overlay
1046
+ this.overlay.closeOverlay();
1047
+
1048
+ // Trigger a route update for the current model
1049
+ self.theme.trigger( 'theme:expand', nextModel.cid );
1050
+
1051
+ }
1052
+ },
1053
+
1054
+ // This method renders the previous theme on the overlay modal
1055
+ // based on the current position in the collection
1056
+ // @params [model cid]
1057
+ previous: function( args ) {
1058
+ var self = this,
1059
+ model, previousModel;
1060
+
1061
+ // Get the current theme
1062
+ model = self.collection.get( args[0] );
1063
+ // Find the previous model within the collection
1064
+ previousModel = self.collection.at( self.collection.indexOf( model ) - 1 );
1065
+
1066
+ if ( previousModel !== undefined ) {
1067
+
1068
+ // We have a new theme...
1069
+ // Close the overlay
1070
+ this.overlay.closeOverlay();
1071
+
1072
+ // Trigger a route update for the current model
1073
+ self.theme.trigger( 'theme:expand', previousModel.cid );
1074
+
1075
+ }
1076
+ }
1077
+ });
1078
+
1079
+ // Search input view controller.
1080
+ themes.view.Search = wp.Backbone.View.extend({
1081
+
1082
+ tagName: 'input',
1083
+ className: 'wp-filter-search',
1084
+ id: 'wp-filter-search-input',
1085
+ searching: false,
1086
+
1087
+ attributes: {
1088
+ placeholder: l10n.searchPlaceholder,
1089
+ type: 'search'
1090
+ },
1091
+
1092
+ events: {
1093
+ 'input': 'search',
1094
+ 'keyup': 'search',
1095
+ 'change': 'search',
1096
+ 'search': 'search',
1097
+ 'blur': 'pushState'
1098
+ },
1099
+
1100
+ initialize: function( options ) {
1101
+
1102
+ this.parent = options.parent;
1103
+
1104
+ this.listenTo( this.parent, 'theme:close', function() {
1105
+ this.searching = false;
1106
+ } );
1107
+
1108
+ },
1109
+
1110
+ // Runs a search on the theme collection.
1111
+ search: function( event ) {
1112
+ var options = {};
1113
+
1114
+ // Clear on escape.
1115
+ if ( event.type === 'keyup' && event.which === 27 ) {
1116
+ event.target.value = '';
1117
+ }
1118
+
1119
+ // Lose input focus when pressing enter
1120
+ if ( event.which === 13 ) {
1121
+ this.$el.trigger( 'blur' );
1122
+ }
1123
+
1124
+ this.collection.doSearch( event.target.value );
1125
+
1126
+ // if search is initiated and key is not return
1127
+ if ( this.searching && event.which !== 13 ) {
1128
+ options.replace = true;
1129
+ } else {
1130
+ this.searching = true;
1131
+ }
1132
+
1133
+ // Update the URL hash
1134
+ if ( event.target.value ) {
1135
+ themes.router.navigate( themes.router.baseUrl( '?search=' + event.target.value ), options );
1136
+ } else {
1137
+ themes.router.navigate( themes.router.baseUrl( '' ) );
1138
+ }
1139
+ },
1140
+
1141
+ pushState: function( event ) {
1142
+ var url = themes.router.baseUrl( '' );
1143
+
1144
+ if ( event.target.value ) {
1145
+ url = themes.router.baseUrl( '?search=' + event.target.value );
1146
+ }
1147
+
1148
+ this.searching = false;
1149
+ themes.router.navigate( url );
1150
+
1151
+ }
1152
+ });
1153
+
1154
+ // Sets up the routes events for relevant url queries
1155
+ // Listens to [theme] and [search] params
1156
+ themes.Router = Backbone.Router.extend({
1157
+
1158
+ routes: {
1159
+ 'themes.php?theme=:slug': 'theme',
1160
+ 'themes.php?search=:query': 'search',
1161
+ 'themes.php?s=:query': 'search',
1162
+ 'themes.php': 'themes',
1163
+ '': 'themes'
1164
+ },
1165
+
1166
+ baseUrl: function( url ) {
1167
+ return 'themes.php' + url;
1168
+ },
1169
+
1170
+ search: function( query ) {
1171
+ $( '.wp-filter-search' ).val( query );
1172
+ },
1173
+
1174
+ themes: function() {
1175
+ $( '.wp-filter-search' ).val( '' );
1176
+ },
1177
+
1178
+ navigate: function() {
1179
+ if ( Backbone.history._hasPushState ) {
1180
+ Backbone.Router.prototype.navigate.apply( this, arguments );
1181
+ }
1182
+ }
1183
+
1184
+ });
1185
+
1186
+ // Execute and setup the application
1187
+ themes.Run = {
1188
+ init: function() {
1189
+ // Initializes the blog's theme library view
1190
+ // Create a new collection with data
1191
+ this.themes = new themes.Collection( themes.data.themes );
1192
+
1193
+ // Set up the view
1194
+ this.view = new themes.view.Appearance({
1195
+ collection: this.themes
1196
+ });
1197
+
1198
+ this.render();
1199
+ },
1200
+
1201
+ render: function() {
1202
+
1203
+ // Render results
1204
+ this.view.render();
1205
+ this.routes();
1206
+
1207
+ Backbone.history.start({
1208
+ root: themes.data.settings.adminUrl,
1209
+ pushState: true,
1210
+ hashChange: false
1211
+ });
1212
+ },
1213
+
1214
+ routes: function() {
1215
+ var self = this;
1216
+ // Bind to our global thx object
1217
+ // so that the object is available to sub-views
1218
+ themes.router = new themes.Router();
1219
+
1220
+ // Handles theme details route event
1221
+ themes.router.on( 'route:theme', function( slug ) {
1222
+ self.view.view.expand( slug );
1223
+ });
1224
+
1225
+ themes.router.on( 'route:themes', function() {
1226
+ self.themes.doSearch( '' );
1227
+ self.view.trigger( 'theme:close' );
1228
+ });
1229
+
1230
+ // Handles search route event
1231
+ themes.router.on( 'route:search', function() {
1232
+ $( '.wp-filter-search' ).trigger( 'keyup' );
1233
+ });
1234
+
1235
+ this.extraRoutes();
1236
+ },
1237
+
1238
+ extraRoutes: function() {
1239
+ return false;
1240
+ }
1241
+ };
1242
+
1243
+ // Extend the main Search view
1244
+ themes.view.InstallerSearch = themes.view.Search.extend({
1245
+
1246
+ events: {
1247
+ 'keyup': 'search'
1248
+ },
1249
+
1250
+ // Handles Ajax request for searching through themes in public repo
1251
+ search: function( event ) {
1252
+
1253
+ // Tabbing or reverse tabbing into the search input shouldn't trigger a search
1254
+ if ( event.type === 'keyup' && ( event.which === 9 || event.which === 16 ) ) {
1255
+ return;
1256
+ }
1257
+
1258
+ this.collection = this.options.parent.view.collection;
1259
+
1260
+ // Clear on escape.
1261
+ if ( event.type === 'keyup' && event.which === 27 ) {
1262
+ event.target.value = '';
1263
+ }
1264
+
1265
+ _.debounce( _.bind( this.doSearch, this ), 300 )( event.target.value );
1266
+ },
1267
+
1268
+ doSearch: _.debounce( function( value ) {
1269
+ var request = {};
1270
+
1271
+ request.search = value;
1272
+
1273
+ // Intercept an [author] search.
1274
+ //
1275
+ // If input value starts with `author:` send a request
1276
+ // for `author` instead of a regular `search`
1277
+ if ( value.substring( 0, 7 ) === 'author:' ) {
1278
+ request.search = '';
1279
+ request.author = value.slice( 7 );
1280
+ }
1281
+
1282
+ // Intercept a [tag] search.
1283
+ //
1284
+ // If input value starts with `tag:` send a request
1285
+ // for `tag` instead of a regular `search`
1286
+ if ( value.substring( 0, 4 ) === 'tag:' ) {
1287
+ request.search = '';
1288
+ request.tag = [ value.slice( 4 ) ];
1289
+ }
1290
+
1291
+ $( '.filter-links li > a.current' ).removeClass( 'current' );
1292
+ $( 'body' ).removeClass( 'show-filters filters-applied' );
1293
+
1294
+ // Get the themes by sending Ajax POST request to api.wordpress.org/themes
1295
+ // or searching the local cache
1296
+ this.collection.query( request );
1297
+
1298
+ // Set route
1299
+ themes.router.navigate( themes.router.baseUrl( '?search=' + value ), { replace: true } );
1300
+ }, 300 )
1301
+ });
1302
+
1303
+ themes.view.Installer = themes.view.Appearance.extend({
1304
+
1305
+ el: '#wpbody-content .wrap',
1306
+
1307
+ // Register events for sorting and filters in theme-navigation
1308
+ events: {
1309
+ 'click .filter-links li > a': 'onSort',
1310
+ 'click .theme-filter': 'onFilter',
1311
+ 'click .drawer-toggle': 'moreFilters',
1312
+ 'click .filter-drawer .apply-filters': 'applyFilters',
1313
+ 'click .filter-group [type="checkbox"]': 'addFilter',
1314
+ 'click .filter-drawer .clear-filters': 'clearFilters',
1315
+ 'click .filtered-by': 'backToFilters'
1316
+ },
1317
+
1318
+ // Initial render method
1319
+ render: function() {
1320
+ var self = this;
1321
+
1322
+ this.search();
1323
+ this.uploader();
1324
+
1325
+ this.collection = new themes.Collection();
1326
+
1327
+ // Bump `collection.currentQuery.page` and request more themes if we hit the end of the page.
1328
+ this.listenTo( this, 'theme:end', function() {
1329
+
1330
+ // Make sure we are not already loading
1331
+ if ( self.collection.loadingThemes ) {
1332
+ return;
1333
+ }
1334
+
1335
+ // Set loadingThemes to true and bump page instance of currentQuery.
1336
+ self.collection.loadingThemes = true;
1337
+ self.collection.currentQuery.page++;
1338
+
1339
+ // Use currentQuery.page to build the themes request.
1340
+ _.extend( self.collection.currentQuery.request, { page: self.collection.currentQuery.page } );
1341
+ self.collection.query( self.collection.currentQuery.request );
1342
+ });
1343
+
1344
+ this.listenTo( this.collection, 'query:success', function() {
1345
+ $( 'body' ).removeClass( 'loading-content' );
1346
+ $( '.theme-browser' ).find( 'div.error' ).remove();
1347
+ });
1348
+
1349
+ this.listenTo( this.collection, 'query:fail', function() {
1350
+ $( 'body' ).removeClass( 'loading-content' );
1351
+ $( '.theme-browser' ).find( 'div.error' ).remove();
1352
+ $( '.theme-browser' ).find( 'div.themes' ).before( '<div class="error"><p>' + l10n.error + '</p></div>' );
1353
+ });
1354
+
1355
+ if ( this.view ) {
1356
+ this.view.remove();
1357
+ }
1358
+
1359
+ // Set ups the view and passes the section argument
1360
+ this.view = new themes.view.Themes({
1361
+ collection: this.collection,
1362
+ parent: this
1363
+ });
1364
+
1365
+ // Reset pagination every time the install view handler is run
1366
+ this.page = 0;
1367
+
1368
+ // Render and append
1369
+ this.$el.find( '.themes' ).remove();
1370
+ this.view.render();
1371
+ this.$el.find( '.theme-browser' ).append( this.view.el ).addClass( 'rendered' );
1372
+ },
1373
+
1374
+ // Handles all the rendering of the public theme directory
1375
+ browse: function( section ) {
1376
+ // Create a new collection with the proper theme data
1377
+ // for each section
1378
+ this.collection.query( { browse: section } );
1379
+ },
1380
+
1381
+ // Sorting navigation
1382
+ onSort: function( event ) {
1383
+ var $el = $( event.target ),
1384
+ sort = $el.data( 'sort' );
1385
+
1386
+ event.preventDefault();
1387
+
1388
+ $( 'body' ).removeClass( 'filters-applied show-filters' );
1389
+
1390
+ // Bail if this is already active
1391
+ if ( $el.hasClass( this.activeClass ) ) {
1392
+ return;
1393
+ }
1394
+
1395
+ this.sort( sort );
1396
+
1397
+ // Trigger a router.naviagte update
1398
+ themes.router.navigate( themes.router.baseUrl( '?browse=' + sort ) );
1399
+ },
1400
+
1401
+ sort: function( sort ) {
1402
+ this.clearSearch();
1403
+
1404
+ $( '.filter-links li > a, .theme-filter' ).removeClass( this.activeClass );
1405
+ $( '[data-sort="' + sort + '"]' ).addClass( this.activeClass );
1406
+
1407
+ this.browse( sort );
1408
+ },
1409
+
1410
+ // Filters and Tags
1411
+ onFilter: function( event ) {
1412
+ var request,
1413
+ $el = $( event.target ),
1414
+ filter = $el.data( 'filter' );
1415
+
1416
+ // Bail if this is already active
1417
+ if ( $el.hasClass( this.activeClass ) ) {
1418
+ return;
1419
+ }
1420
+
1421
+ $( '.filter-links li > a, .theme-section' ).removeClass( this.activeClass );
1422
+ $el.addClass( this.activeClass );
1423
+
1424
+ if ( ! filter ) {
1425
+ return;
1426
+ }
1427
+
1428
+ // Construct the filter request
1429
+ // using the default values
1430
+ filter = _.union( filter, this.filtersChecked() );
1431
+ request = { tag: [ filter ] };
1432
+
1433
+ // Get the themes by sending Ajax POST request to api.wordpress.org/themes
1434
+ // or searching the local cache
1435
+ this.collection.query( request );
1436
+ },
1437
+
1438
+ // Clicking on a checkbox to add another filter to the request
1439
+ addFilter: function() {
1440
+ this.filtersChecked();
1441
+ },
1442
+
1443
+ // Applying filters triggers a tag request
1444
+ applyFilters: function( event ) {
1445
+ var name,
1446
+ tags = this.filtersChecked(),
1447
+ request = { tag: tags },
1448
+ filteringBy = $( '.filtered-by .tags' );
1449
+
1450
+ if ( event ) {
1451
+ event.preventDefault();
1452
+ }
1453
+
1454
+ $( 'body' ).addClass( 'filters-applied' );
1455
+ $( '.filter-links li > a.current' ).removeClass( 'current' );
1456
+ filteringBy.empty();
1457
+
1458
+ _.each( tags, function( tag ) {
1459
+ name = $( 'label[for="filter-id-' + tag + '"]' ).text();
1460
+ filteringBy.append( '<span class="tag">' + name + '</span>' );
1461
+ });
1462
+
1463
+ // Get the themes by sending Ajax POST request to api.wordpress.org/themes
1464
+ // or searching the local cache
1465
+ this.collection.query( request );
1466
+ },
1467
+
1468
+ // Get the checked filters
1469
+ // @return {array} of tags or false
1470
+ filtersChecked: function() {
1471
+ var items = $( '.filter-group' ).find( ':checkbox' ),
1472
+ tags = [];
1473
+
1474
+ _.each( items.filter( ':checked' ), function( item ) {
1475
+ tags.push( $( item ).prop( 'value' ) );
1476
+ });
1477
+
1478
+ // When no filters are checked, restore initial state and return
1479
+ if ( tags.length === 0 ) {
1480
+ $( '.filter-drawer .apply-filters' ).find( 'span' ).text( '' );
1481
+ $( '.filter-drawer .clear-filters' ).hide();
1482
+ $( 'body' ).removeClass( 'filters-applied' );
1483
+ return false;
1484
+ }
1485
+
1486
+ $( '.filter-drawer .apply-filters' ).find( 'span' ).text( tags.length );
1487
+ $( '.filter-drawer .clear-filters' ).css( 'display', 'inline-block' );
1488
+
1489
+ return tags;
1490
+ },
1491
+
1492
+ activeClass: 'current',
1493
+
1494
+ // Overwrite search container class to append search
1495
+ // in new location
1496
+ searchContainer: $( '.wp-filter .search-form' ),
1497
+
1498
+ uploader: function() {
1499
+ $( 'a.upload' ).on( 'click', function( event ) {
1500
+ event.preventDefault();
1501
+ $( 'body' ).addClass( 'show-upload-theme' );
1502
+ themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true } );
1503
+ });
1504
+ $( 'a.browse-themes' ).on( 'click', function( event ) {
1505
+ event.preventDefault();
1506
+ $( 'body' ).removeClass( 'show-upload-theme' );
1507
+ themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } );
1508
+ });
1509
+ },
1510
+
1511
+ // Toggle the full filters navigation
1512
+ moreFilters: function( event ) {
1513
+ event.preventDefault();
1514
+
1515
+ if ( $( 'body' ).hasClass( 'filters-applied' ) ) {
1516
+ return this.backToFilters();
1517
+ }
1518
+
1519
+ // If the filters section is opened and filters are checked
1520
+ // run the relevant query collapsing to filtered-by state
1521
+ if ( $( 'body' ).hasClass( 'show-filters' ) && this.filtersChecked() ) {
1522
+ return this.addFilter();
1523
+ }
1524
+
1525
+ this.clearSearch();
1526
+
1527
+ themes.router.navigate( themes.router.baseUrl( '' ) );
1528
+ $( 'body' ).toggleClass( 'show-filters' );
1529
+ },
1530
+
1531
+ // Clears all the checked filters
1532
+ // @uses filtersChecked()
1533
+ clearFilters: function( event ) {
1534
+ var items = $( '.filter-group' ).find( ':checkbox' ),
1535
+ self = this;
1536
+
1537
+ event.preventDefault();
1538
+
1539
+ _.each( items.filter( ':checked' ), function( item ) {
1540
+ $( item ).prop( 'checked', false );
1541
+ return self.filtersChecked();
1542
+ });
1543
+ },
1544
+
1545
+ backToFilters: function( event ) {
1546
+ if ( event ) {
1547
+ event.preventDefault();
1548
+ }
1549
+
1550
+ $( 'body' ).removeClass( 'filters-applied' );
1551
+ },
1552
+
1553
+ clearSearch: function() {
1554
+ $( '#wp-filter-search-input').val( '' );
1555
+ }
1556
+ });
1557
+
1558
+ themes.InstallerRouter = Backbone.Router.extend({
1559
+ routes: {
1560
+ 'theme-install.php?theme=:slug': 'preview',
1561
+ 'theme-install.php?browse=:sort': 'sort',
1562
+ 'theme-install.php?upload': 'upload',
1563
+ 'theme-install.php?search=:query': 'search',
1564
+ 'theme-install.php': 'sort'
1565
+ },
1566
+
1567
+ baseUrl: function( url ) {
1568
+ return 'theme-install.php' + url;
1569
+ },
1570
+
1571
+ search: function( query ) {
1572
+ $( '.wp-filter-search' ).val( query );
1573
+ },
1574
+
1575
+ navigate: function() {
1576
+ if ( Backbone.history._hasPushState ) {
1577
+ Backbone.Router.prototype.navigate.apply( this, arguments );
1578
+ }
1579
+ }
1580
+ });
1581
+
1582
+
1583
+ themes.RunInstaller = {
1584
+
1585
+ init: function() {
1586
+ // Set up the view
1587
+ // Passes the default 'section' as an option
1588
+ this.view = new themes.view.Installer({
1589
+ section: 'featured',
1590
+ SearchView: themes.view.InstallerSearch
1591
+ });
1592
+
1593
+ // Render results
1594
+ this.render();
1595
+
1596
+ },
1597
+
1598
+ render: function() {
1599
+
1600
+ // Render results
1601
+ this.view.render();
1602
+ this.routes();
1603
+
1604
+ Backbone.history.start({
1605
+ root: themes.data.settings.adminUrl,
1606
+ pushState: true,
1607
+ hashChange: false
1608
+ });
1609
+ },
1610
+
1611
+ routes: function() {
1612
+ var self = this,
1613
+ request = {};
1614
+
1615
+ // Bind to our global `wp.themes` object
1616
+ // so that the router is available to sub-views
1617
+ themes.router = new themes.InstallerRouter();
1618
+
1619
+ // Handles `theme` route event
1620
+ // Queries the API for the passed theme slug
1621
+ themes.router.on( 'route:preview', function( slug ) {
1622
+ request.theme = slug;
1623
+ self.view.collection.query( request );
1624
+ });
1625
+
1626
+ // Handles sorting / browsing routes
1627
+ // Also handles the root URL triggering a sort request
1628
+ // for `featured`, the default view
1629
+ themes.router.on( 'route:sort', function( sort ) {
1630
+ if ( ! sort ) {
1631
+ sort = 'featured';
1632
+ }
1633
+ self.view.sort( sort );
1634
+ self.view.trigger( 'theme:close' );
1635
+ });
1636
+
1637
+ // Support the `upload` route by going straight to upload section
1638
+ themes.router.on( 'route:upload', function() {
1639
+ $( 'a.upload' ).trigger( 'click' );
1640
+ });
1641
+
1642
+ // The `search` route event. The router populates the input field.
1643
+ themes.router.on( 'route:search', function() {
1644
+ $( '.wp-filter-search' ).focus().trigger( 'keyup' );
1645
+ });
1646
+
1647
+ this.extraRoutes();
1648
+ },
1649
+
1650
+ extraRoutes: function() {
1651
+ return false;
1652
+ }
1653
+ };
1654
+
1655
+ // Ready...
1656
+ $( document ).ready(function() {
1657
+ if ( themes.isInstall ) {
1658
+ themes.RunInstaller.init();
1659
+ } else {
1660
+ themes.Run.init();
1661
+ }
1662
+ });
1663
+
1664
+ })( jQuery );
1665
+
1666
+ // Align theme browser thickbox
1667
+ var tb_position;
1668
+ jQuery(document).ready( function($) {
1669
+ tb_position = function() {
1670
+ var tbWindow = $('#TB_window'),
1671
+ width = $(window).width(),
1672
+ H = $(window).height(),
1673
+ W = ( 1040 < width ) ? 1040 : width,
1674
+ adminbar_height = 0;
1675
+
1676
+ if ( $('#wpadminbar').length ) {
1677
+ adminbar_height = parseInt( $('#wpadminbar').css('height'), 10 );
1678
+ }
1679
+
1680
+ if ( tbWindow.size() ) {
1681
+ tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
1682
+ $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
1683
+ tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
1684
+ if ( typeof document.body.style.maxWidth !== 'undefined' ) {
1685
+ tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'});
1686
+ }
1687
+ }
1688
+ };
1689
+
1690
+ $(window).resize(function(){ tb_position(); });
1691
+ });