stump-cli 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,192 @@
1
+ <?php
2
+ /**
3
+ * Deprecated pluggable functions from past WordPress versions. You shouldn't use these
4
+ * functions and look for the alternatives instead. The functions will be removed in a
5
+ * later version.
6
+ *
7
+ * Deprecated warnings are also thrown if one of these functions is being defined by a plugin.
8
+ *
9
+ * @package WordPress
10
+ * @subpackage Deprecated
11
+ * @see pluggable.php
12
+ */
13
+
14
+ /*
15
+ * Deprecated functions come here to die.
16
+ */
17
+
18
+ if ( !function_exists('set_current_user') ) :
19
+ /**
20
+ * Changes the current user by ID or name.
21
+ *
22
+ * Set $id to null and specify a name if you do not know a user's ID.
23
+ *
24
+ * @since 2.0.1
25
+ * @see wp_set_current_user() An alias of wp_set_current_user()
26
+ * @deprecated 3.0.0
27
+ * @deprecated Use wp_set_current_user()
28
+ *
29
+ * @param int|null $id User ID.
30
+ * @param string $name Optional. The user's username
31
+ * @return object returns wp_set_current_user()
32
+ */
33
+ function set_current_user($id, $name = '') {
34
+ _deprecated_function( __FUNCTION__, '3.0', 'wp_set_current_user()' );
35
+ return wp_set_current_user($id, $name);
36
+ }
37
+ endif;
38
+
39
+ if ( !function_exists('get_userdatabylogin') ) :
40
+ /**
41
+ * Retrieve user info by login name.
42
+ *
43
+ * @since 0.71
44
+ * @deprecated 3.3.0
45
+ * @deprecated Use get_user_by('login')
46
+ *
47
+ * @param string $user_login User's username
48
+ * @return bool|object False on failure, User DB row object
49
+ */
50
+ function get_userdatabylogin($user_login) {
51
+ _deprecated_function( __FUNCTION__, '3.3', "get_user_by('login')" );
52
+ return get_user_by('login', $user_login);
53
+ }
54
+ endif;
55
+
56
+ if ( !function_exists('get_user_by_email') ) :
57
+ /**
58
+ * Retrieve user info by email.
59
+ *
60
+ * @since 2.5.0
61
+ * @deprecated 3.3.0
62
+ * @deprecated Use get_user_by('email')
63
+ *
64
+ * @param string $email User's email address
65
+ * @return bool|object False on failure, User DB row object
66
+ */
67
+ function get_user_by_email($email) {
68
+ _deprecated_function( __FUNCTION__, '3.3', "get_user_by('email')" );
69
+ return get_user_by('email', $email);
70
+ }
71
+ endif;
72
+
73
+ if ( !function_exists('wp_setcookie') ) :
74
+ /**
75
+ * Sets a cookie for a user who just logged in. This function is deprecated.
76
+ *
77
+ * @since 1.5.0
78
+ * @deprecated 2.5.0
79
+ * @deprecated Use wp_set_auth_cookie()
80
+ * @see wp_set_auth_cookie()
81
+ *
82
+ * @param string $username The user's username
83
+ * @param string $password Optional. The user's password
84
+ * @param bool $already_md5 Optional. Whether the password has already been through MD5
85
+ * @param string $home Optional. Will be used instead of COOKIEPATH if set
86
+ * @param string $siteurl Optional. Will be used instead of SITECOOKIEPATH if set
87
+ * @param bool $remember Optional. Remember that the user is logged in
88
+ */
89
+ function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
90
+ _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' );
91
+ $user = get_user_by('login', $username);
92
+ wp_set_auth_cookie($user->ID, $remember);
93
+ }
94
+ else :
95
+ _deprecated_function( 'wp_setcookie', '2.5', 'wp_set_auth_cookie()' );
96
+ endif;
97
+
98
+ if ( !function_exists('wp_clearcookie') ) :
99
+ /**
100
+ * Clears the authentication cookie, logging the user out. This function is deprecated.
101
+ *
102
+ * @since 1.5.0
103
+ * @deprecated 2.5.0
104
+ * @deprecated Use wp_clear_auth_cookie()
105
+ * @see wp_clear_auth_cookie()
106
+ */
107
+ function wp_clearcookie() {
108
+ _deprecated_function( __FUNCTION__, '2.5', 'wp_clear_auth_cookie()' );
109
+ wp_clear_auth_cookie();
110
+ }
111
+ else :
112
+ _deprecated_function( 'wp_clearcookie', '2.5', 'wp_clear_auth_cookie()' );
113
+ endif;
114
+
115
+ if ( !function_exists('wp_get_cookie_login') ):
116
+ /**
117
+ * Gets the user cookie login. This function is deprecated.
118
+ *
119
+ * This function is deprecated and should no longer be extended as it won't be
120
+ * used anywhere in WordPress. Also, plugins shouldn't use it either.
121
+ *
122
+ * @since 2.0.3
123
+ * @deprecated 2.5.0
124
+ * @deprecated No alternative
125
+ *
126
+ * @return bool Always returns false
127
+ */
128
+ function wp_get_cookie_login() {
129
+ _deprecated_function( __FUNCTION__, '2.5' );
130
+ return false;
131
+ }
132
+ else :
133
+ _deprecated_function( 'wp_get_cookie_login', '2.5' );
134
+ endif;
135
+
136
+ if ( !function_exists('wp_login') ) :
137
+ /**
138
+ * Checks a users login information and logs them in if it checks out. This function is deprecated.
139
+ *
140
+ * Use the global $error to get the reason why the login failed. If the username
141
+ * is blank, no error will be set, so assume blank username on that case.
142
+ *
143
+ * Plugins extending this function should also provide the global $error and set
144
+ * what the error is, so that those checking the global for why there was a
145
+ * failure can utilize it later.
146
+ *
147
+ * @since 1.2.2
148
+ * @deprecated Use wp_signon()
149
+ * @global string $error Error when false is returned
150
+ *
151
+ * @param string $username User's username
152
+ * @param string $password User's password
153
+ * @param bool $deprecated Not used
154
+ * @return bool False on login failure, true on successful check
155
+ */
156
+ function wp_login($username, $password, $deprecated = '') {
157
+ _deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' );
158
+ global $error;
159
+
160
+ $user = wp_authenticate($username, $password);
161
+
162
+ if ( ! is_wp_error($user) )
163
+ return true;
164
+
165
+ $error = $user->get_error_message();
166
+ return false;
167
+ }
168
+ else :
169
+ _deprecated_function( 'wp_login', '2.5', 'wp_signon()' );
170
+ endif;
171
+
172
+ /**
173
+ * WordPress AtomPub API implementation.
174
+ *
175
+ * Originally stored in wp-app.php, and later wp-includes/class-wp-atom-server.php.
176
+ * It is kept here in case a plugin directly referred to the class.
177
+ *
178
+ * @since 2.2.0
179
+ * @deprecated 3.5.0
180
+ * @link https://wordpress.org/plugins/atom-publishing-protocol/
181
+ */
182
+ if ( ! class_exists( 'wp_atom_server' ) ) {
183
+ class wp_atom_server {
184
+ public function __call( $name, $arguments ) {
185
+ _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
186
+ }
187
+
188
+ public static function __callStatic( $name, $arguments ) {
189
+ _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
190
+ }
191
+ }
192
+ }
@@ -0,0 +1,2283 @@
1
+ <?php
2
+ /**
3
+ * These functions can be replaced via plugins. If plugins do not redefine these
4
+ * functions, then these will be used instead.
5
+ *
6
+ * @package WordPress
7
+ */
8
+
9
+ if ( !function_exists('wp_set_current_user') ) :
10
+ /**
11
+ * Changes the current user by ID or name.
12
+ *
13
+ * Set $id to null and specify a name if you do not know a user's ID.
14
+ *
15
+ * Some WordPress functionality is based on the current user and not based on
16
+ * the signed in user. Therefore, it opens the ability to edit and perform
17
+ * actions on users who aren't signed in.
18
+ *
19
+ * @since 2.0.3
20
+ * @global object $current_user The current user object which holds the user data.
21
+ *
22
+ * @param int $id User ID
23
+ * @param string $name User's username
24
+ * @return WP_User Current user User object
25
+ */
26
+ function wp_set_current_user($id, $name = '') {
27
+ global $current_user;
28
+
29
+ if ( isset( $current_user ) && ( $current_user instanceof WP_User ) && ( $id == $current_user->ID ) )
30
+ return $current_user;
31
+
32
+ $current_user = new WP_User( $id, $name );
33
+
34
+ setup_userdata( $current_user->ID );
35
+
36
+ /**
37
+ * Fires after the current user is set.
38
+ *
39
+ * @since 2.0.1
40
+ */
41
+ do_action( 'set_current_user' );
42
+
43
+ return $current_user;
44
+ }
45
+ endif;
46
+
47
+ if ( !function_exists('wp_get_current_user') ) :
48
+ /**
49
+ * Retrieve the current user object.
50
+ *
51
+ * @since 2.0.3
52
+ *
53
+ * @return WP_User Current user WP_User object
54
+ */
55
+ function wp_get_current_user() {
56
+ global $current_user;
57
+
58
+ get_currentuserinfo();
59
+
60
+ return $current_user;
61
+ }
62
+ endif;
63
+
64
+ if ( !function_exists('get_currentuserinfo') ) :
65
+ /**
66
+ * Populate global variables with information about the currently logged in user.
67
+ *
68
+ * Will set the current user, if the current user is not set. The current user
69
+ * will be set to the logged-in person. If no user is logged-in, then it will
70
+ * set the current user to 0, which is invalid and won't have any permissions.
71
+ *
72
+ * @since 0.71
73
+ *
74
+ * @uses $current_user Checks if the current user is set
75
+ * @uses wp_validate_auth_cookie() Retrieves current logged in user.
76
+ *
77
+ * @return bool|null False on XML-RPC Request and invalid auth cookie. Null when current user set.
78
+ */
79
+ function get_currentuserinfo() {
80
+ global $current_user;
81
+
82
+ if ( ! empty( $current_user ) ) {
83
+ if ( $current_user instanceof WP_User )
84
+ return;
85
+
86
+ // Upgrade stdClass to WP_User
87
+ if ( is_object( $current_user ) && isset( $current_user->ID ) ) {
88
+ $cur_id = $current_user->ID;
89
+ $current_user = null;
90
+ wp_set_current_user( $cur_id );
91
+ return;
92
+ }
93
+
94
+ // $current_user has a junk value. Force to WP_User with ID 0.
95
+ $current_user = null;
96
+ wp_set_current_user( 0 );
97
+ return false;
98
+ }
99
+
100
+ if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) {
101
+ wp_set_current_user( 0 );
102
+ return false;
103
+ }
104
+
105
+ /**
106
+ * Filter the current user.
107
+ *
108
+ * The default filters use this to determine the current user from the
109
+ * request's cookies, if available.
110
+ *
111
+ * Returning a value of false will effectively short-circuit setting
112
+ * the current user.
113
+ *
114
+ * @since 3.9.0
115
+ *
116
+ * @param int|bool $user_id User ID if one has been determined, false otherwise.
117
+ */
118
+ $user_id = apply_filters( 'determine_current_user', false );
119
+ if ( ! $user_id ) {
120
+ wp_set_current_user( 0 );
121
+ return false;
122
+ }
123
+
124
+ wp_set_current_user( $user_id );
125
+ }
126
+ endif;
127
+
128
+ if ( !function_exists('get_userdata') ) :
129
+ /**
130
+ * Retrieve user info by user ID.
131
+ *
132
+ * @since 0.71
133
+ *
134
+ * @param int $user_id User ID
135
+ * @return WP_User|bool WP_User object on success, false on failure.
136
+ */
137
+ function get_userdata( $user_id ) {
138
+ return get_user_by( 'id', $user_id );
139
+ }
140
+ endif;
141
+
142
+ if ( !function_exists('get_user_by') ) :
143
+ /**
144
+ * Retrieve user info by a given field
145
+ *
146
+ * @since 2.8.0
147
+ *
148
+ * @param string $field The field to retrieve the user with. id | slug | email | login
149
+ * @param int|string $value A value for $field. A user ID, slug, email address, or login name.
150
+ * @return WP_User|bool WP_User object on success, false on failure.
151
+ */
152
+ function get_user_by( $field, $value ) {
153
+ $userdata = WP_User::get_data_by( $field, $value );
154
+
155
+ if ( !$userdata )
156
+ return false;
157
+
158
+ $user = new WP_User;
159
+ $user->init( $userdata );
160
+
161
+ return $user;
162
+ }
163
+ endif;
164
+
165
+ if ( !function_exists('cache_users') ) :
166
+ /**
167
+ * Retrieve info for user lists to prevent multiple queries by get_userdata()
168
+ *
169
+ * @since 3.0.0
170
+ *
171
+ * @param array $user_ids User ID numbers list
172
+ */
173
+ function cache_users( $user_ids ) {
174
+ global $wpdb;
175
+
176
+ $clean = _get_non_cached_ids( $user_ids, 'users' );
177
+
178
+ if ( empty( $clean ) )
179
+ return;
180
+
181
+ $list = implode( ',', $clean );
182
+
183
+ $users = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($list)" );
184
+
185
+ $ids = array();
186
+ foreach ( $users as $user ) {
187
+ update_user_caches( $user );
188
+ $ids[] = $user->ID;
189
+ }
190
+ update_meta_cache( 'user', $ids );
191
+ }
192
+ endif;
193
+
194
+ if ( !function_exists( 'wp_mail' ) ) :
195
+ /**
196
+ * Send mail, similar to PHP's mail
197
+ *
198
+ * A true return value does not automatically mean that the user received the
199
+ * email successfully. It just only means that the method used was able to
200
+ * process the request without any errors.
201
+ *
202
+ * Using the two 'wp_mail_from' and 'wp_mail_from_name' hooks allow from
203
+ * creating a from address like 'Name <email@address.com>' when both are set. If
204
+ * just 'wp_mail_from' is set, then just the email address will be used with no
205
+ * name.
206
+ *
207
+ * The default content type is 'text/plain' which does not allow using HTML.
208
+ * However, you can set the content type of the email by using the
209
+ * 'wp_mail_content_type' filter.
210
+ *
211
+ * The default charset is based on the charset used on the blog. The charset can
212
+ * be set using the 'wp_mail_charset' filter.
213
+ *
214
+ * @since 1.2.1
215
+ *
216
+ * @uses PHPMailer
217
+ *
218
+ * @param string|array $to Array or comma-separated list of email addresses to send message.
219
+ * @param string $subject Email subject
220
+ * @param string $message Message contents
221
+ * @param string|array $headers Optional. Additional headers.
222
+ * @param string|array $attachments Optional. Files to attach.
223
+ * @return bool Whether the email contents were sent successfully.
224
+ */
225
+ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
226
+ // Compact the input, apply the filters, and extract them back out
227
+
228
+ /**
229
+ * Filter the wp_mail() arguments.
230
+ *
231
+ * @since 2.2.0
232
+ *
233
+ * @param array $args A compacted array of wp_mail() arguments, including the "to" email,
234
+ * subject, message, headers, and attachments values.
235
+ */
236
+ $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
237
+
238
+ if ( isset( $atts['to'] ) ) {
239
+ $to = $atts['to'];
240
+ }
241
+
242
+ if ( isset( $atts['subject'] ) ) {
243
+ $subject = $atts['subject'];
244
+ }
245
+
246
+ if ( isset( $atts['message'] ) ) {
247
+ $message = $atts['message'];
248
+ }
249
+
250
+ if ( isset( $atts['headers'] ) ) {
251
+ $headers = $atts['headers'];
252
+ }
253
+
254
+ if ( isset( $atts['attachments'] ) ) {
255
+ $attachments = $atts['attachments'];
256
+ }
257
+
258
+ if ( ! is_array( $attachments ) ) {
259
+ $attachments = explode( "\n", str_replace( "\r\n", "\n", $attachments ) );
260
+ }
261
+ global $phpmailer;
262
+
263
+ // (Re)create it, if it's gone missing
264
+ if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
265
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
266
+ require_once ABSPATH . WPINC . '/class-smtp.php';
267
+ $phpmailer = new PHPMailer( true );
268
+ }
269
+
270
+ // Headers
271
+ if ( empty( $headers ) ) {
272
+ $headers = array();
273
+ } else {
274
+ if ( !is_array( $headers ) ) {
275
+ // Explode the headers out, so this function can take both
276
+ // string headers and an array of headers.
277
+ $tempheaders = explode( "\n", str_replace( "\r\n", "\n", $headers ) );
278
+ } else {
279
+ $tempheaders = $headers;
280
+ }
281
+ $headers = array();
282
+ $cc = array();
283
+ $bcc = array();
284
+
285
+ // If it's actually got contents
286
+ if ( !empty( $tempheaders ) ) {
287
+ // Iterate through the raw headers
288
+ foreach ( (array) $tempheaders as $header ) {
289
+ if ( strpos($header, ':') === false ) {
290
+ if ( false !== stripos( $header, 'boundary=' ) ) {
291
+ $parts = preg_split('/boundary=/i', trim( $header ) );
292
+ $boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) );
293
+ }
294
+ continue;
295
+ }
296
+ // Explode them out
297
+ list( $name, $content ) = explode( ':', trim( $header ), 2 );
298
+
299
+ // Cleanup crew
300
+ $name = trim( $name );
301
+ $content = trim( $content );
302
+
303
+ switch ( strtolower( $name ) ) {
304
+ // Mainly for legacy -- process a From: header if it's there
305
+ case 'from':
306
+ if ( strpos($content, '<' ) !== false ) {
307
+ // So... making my life hard again?
308
+ $from_name = substr( $content, 0, strpos( $content, '<' ) - 1 );
309
+ $from_name = str_replace( '"', '', $from_name );
310
+ $from_name = trim( $from_name );
311
+
312
+ $from_email = substr( $content, strpos( $content, '<' ) + 1 );
313
+ $from_email = str_replace( '>', '', $from_email );
314
+ $from_email = trim( $from_email );
315
+ } else {
316
+ $from_email = trim( $content );
317
+ }
318
+ break;
319
+ case 'content-type':
320
+ if ( strpos( $content, ';' ) !== false ) {
321
+ list( $type, $charset ) = explode( ';', $content );
322
+ $content_type = trim( $type );
323
+ if ( false !== stripos( $charset, 'charset=' ) ) {
324
+ $charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) );
325
+ } elseif ( false !== stripos( $charset, 'boundary=' ) ) {
326
+ $boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset ) );
327
+ $charset = '';
328
+ }
329
+ } else {
330
+ $content_type = trim( $content );
331
+ }
332
+ break;
333
+ case 'cc':
334
+ $cc = array_merge( (array) $cc, explode( ',', $content ) );
335
+ break;
336
+ case 'bcc':
337
+ $bcc = array_merge( (array) $bcc, explode( ',', $content ) );
338
+ break;
339
+ default:
340
+ // Add it to our grand headers array
341
+ $headers[trim( $name )] = trim( $content );
342
+ break;
343
+ }
344
+ }
345
+ }
346
+ }
347
+
348
+ // Empty out the values that may be set
349
+ $phpmailer->ClearAllRecipients();
350
+ $phpmailer->ClearAttachments();
351
+ $phpmailer->ClearCustomHeaders();
352
+ $phpmailer->ClearReplyTos();
353
+
354
+ // From email and name
355
+ // If we don't have a name from the input headers
356
+ if ( !isset( $from_name ) )
357
+ $from_name = 'WordPress';
358
+
359
+ /* If we don't have an email from the input headers default to wordpress@$sitename
360
+ * Some hosts will block outgoing mail from this address if it doesn't exist but
361
+ * there's no easy alternative. Defaulting to admin_email might appear to be another
362
+ * option but some hosts may refuse to relay mail from an unknown domain. See
363
+ * https://core.trac.wordpress.org/ticket/5007.
364
+ */
365
+
366
+ if ( !isset( $from_email ) ) {
367
+ // Get the site domain and get rid of www.
368
+ $sitename = strtolower( $_SERVER['SERVER_NAME'] );
369
+ if ( substr( $sitename, 0, 4 ) == 'www.' ) {
370
+ $sitename = substr( $sitename, 4 );
371
+ }
372
+
373
+ $from_email = 'wordpress@' . $sitename;
374
+ }
375
+
376
+ /**
377
+ * Filter the email address to send from.
378
+ *
379
+ * @since 2.2.0
380
+ *
381
+ * @param string $from_email Email address to send from.
382
+ */
383
+ $phpmailer->From = apply_filters( 'wp_mail_from', $from_email );
384
+
385
+ /**
386
+ * Filter the name to associate with the "from" email address.
387
+ *
388
+ * @since 2.3.0
389
+ *
390
+ * @param string $from_name Name associated with the "from" email address.
391
+ */
392
+ $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name );
393
+
394
+ // Set destination addresses
395
+ if ( !is_array( $to ) )
396
+ $to = explode( ',', $to );
397
+
398
+ foreach ( (array) $to as $recipient ) {
399
+ try {
400
+ // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
401
+ $recipient_name = '';
402
+ if( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
403
+ if ( count( $matches ) == 3 ) {
404
+ $recipient_name = $matches[1];
405
+ $recipient = $matches[2];
406
+ }
407
+ }
408
+ $phpmailer->AddAddress( $recipient, $recipient_name);
409
+ } catch ( phpmailerException $e ) {
410
+ continue;
411
+ }
412
+ }
413
+
414
+ // Set mail's subject and body
415
+ $phpmailer->Subject = $subject;
416
+ $phpmailer->Body = $message;
417
+
418
+ // Add any CC and BCC recipients
419
+ if ( !empty( $cc ) ) {
420
+ foreach ( (array) $cc as $recipient ) {
421
+ try {
422
+ // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
423
+ $recipient_name = '';
424
+ if( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
425
+ if ( count( $matches ) == 3 ) {
426
+ $recipient_name = $matches[1];
427
+ $recipient = $matches[2];
428
+ }
429
+ }
430
+ $phpmailer->AddCc( $recipient, $recipient_name );
431
+ } catch ( phpmailerException $e ) {
432
+ continue;
433
+ }
434
+ }
435
+ }
436
+
437
+ if ( !empty( $bcc ) ) {
438
+ foreach ( (array) $bcc as $recipient) {
439
+ try {
440
+ // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
441
+ $recipient_name = '';
442
+ if( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
443
+ if ( count( $matches ) == 3 ) {
444
+ $recipient_name = $matches[1];
445
+ $recipient = $matches[2];
446
+ }
447
+ }
448
+ $phpmailer->AddBcc( $recipient, $recipient_name );
449
+ } catch ( phpmailerException $e ) {
450
+ continue;
451
+ }
452
+ }
453
+ }
454
+
455
+ // Set to use PHP's mail()
456
+ $phpmailer->IsMail();
457
+
458
+ // Set Content-Type and charset
459
+ // If we don't have a content-type from the input headers
460
+ if ( !isset( $content_type ) )
461
+ $content_type = 'text/plain';
462
+
463
+ /**
464
+ * Filter the wp_mail() content type.
465
+ *
466
+ * @since 2.3.0
467
+ *
468
+ * @param string $content_type Default wp_mail() content type.
469
+ */
470
+ $content_type = apply_filters( 'wp_mail_content_type', $content_type );
471
+
472
+ $phpmailer->ContentType = $content_type;
473
+
474
+ // Set whether it's plaintext, depending on $content_type
475
+ if ( 'text/html' == $content_type )
476
+ $phpmailer->IsHTML( true );
477
+
478
+ // If we don't have a charset from the input headers
479
+ if ( !isset( $charset ) )
480
+ $charset = get_bloginfo( 'charset' );
481
+
482
+ // Set the content-type and charset
483
+
484
+ /**
485
+ * Filter the default wp_mail() charset.
486
+ *
487
+ * @since 2.3.0
488
+ *
489
+ * @param string $charset Default email charset.
490
+ */
491
+ $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset );
492
+
493
+ // Set custom headers
494
+ if ( !empty( $headers ) ) {
495
+ foreach( (array) $headers as $name => $content ) {
496
+ $phpmailer->AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
497
+ }
498
+
499
+ if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) )
500
+ $phpmailer->AddCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) );
501
+ }
502
+
503
+ if ( !empty( $attachments ) ) {
504
+ foreach ( $attachments as $attachment ) {
505
+ try {
506
+ $phpmailer->AddAttachment($attachment);
507
+ } catch ( phpmailerException $e ) {
508
+ continue;
509
+ }
510
+ }
511
+ }
512
+
513
+ /**
514
+ * Fires after PHPMailer is initialized.
515
+ *
516
+ * @since 2.2.0
517
+ *
518
+ * @param PHPMailer &$phpmailer The PHPMailer instance, passed by reference.
519
+ */
520
+ do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
521
+
522
+ // Send!
523
+ try {
524
+ return $phpmailer->Send();
525
+ } catch ( phpmailerException $e ) {
526
+ return false;
527
+ }
528
+ }
529
+ endif;
530
+
531
+ if ( !function_exists('wp_authenticate') ) :
532
+ /**
533
+ * Checks a user's login information and logs them in if it checks out.
534
+ *
535
+ * @since 2.5.0
536
+ *
537
+ * @param string $username User's username
538
+ * @param string $password User's password
539
+ * @return WP_User|WP_Error WP_User object if login successful, otherwise WP_Error object.
540
+ */
541
+ function wp_authenticate($username, $password) {
542
+ $username = sanitize_user($username);
543
+ $password = trim($password);
544
+
545
+ /**
546
+ * Filter the user to authenticate.
547
+ *
548
+ * If a non-null value is passed, the filter will effectively short-circuit
549
+ * authentication, returning an error instead.
550
+ *
551
+ * @since 2.8.0
552
+ *
553
+ * @param null|WP_User $user User to authenticate.
554
+ * @param string $username User login.
555
+ * @param string $password User password
556
+ */
557
+ $user = apply_filters( 'authenticate', null, $username, $password );
558
+
559
+ if ( $user == null ) {
560
+ // TODO what should the error message be? (Or would these even happen?)
561
+ // Only needed if all authentication handlers fail to return anything.
562
+ $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.'));
563
+ }
564
+
565
+ $ignore_codes = array('empty_username', 'empty_password');
566
+
567
+ if (is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) {
568
+ /**
569
+ * Fires after a user login has failed.
570
+ *
571
+ * @since 2.5.0
572
+ *
573
+ * @param string $username User login.
574
+ */
575
+ do_action( 'wp_login_failed', $username );
576
+ }
577
+
578
+ return $user;
579
+ }
580
+ endif;
581
+
582
+ if ( !function_exists('wp_logout') ) :
583
+ /**
584
+ * Log the current user out.
585
+ *
586
+ * @since 2.5.0
587
+ */
588
+ function wp_logout() {
589
+ wp_destroy_current_session();
590
+ wp_clear_auth_cookie();
591
+
592
+ /**
593
+ * Fires after a user is logged-out.
594
+ *
595
+ * @since 1.5.0
596
+ */
597
+ do_action( 'wp_logout' );
598
+ }
599
+ endif;
600
+
601
+ if ( !function_exists('wp_validate_auth_cookie') ) :
602
+ /**
603
+ * Validates authentication cookie.
604
+ *
605
+ * The checks include making sure that the authentication cookie is set and
606
+ * pulling in the contents (if $cookie is not used).
607
+ *
608
+ * Makes sure the cookie is not expired. Verifies the hash in cookie is what is
609
+ * should be and compares the two.
610
+ *
611
+ * @since 2.5.0
612
+ *
613
+ * @param string $cookie Optional. If used, will validate contents instead of cookie's
614
+ * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in
615
+ * @return bool|int False if invalid cookie, User ID if valid.
616
+ */
617
+ function wp_validate_auth_cookie($cookie = '', $scheme = '') {
618
+ if ( ! $cookie_elements = wp_parse_auth_cookie($cookie, $scheme) ) {
619
+ /**
620
+ * Fires if an authentication cookie is malformed.
621
+ *
622
+ * @since 2.7.0
623
+ *
624
+ * @param string $cookie Malformed auth cookie.
625
+ * @param string $scheme Authentication scheme. Values include 'auth', 'secure_auth',
626
+ * or 'logged_in'.
627
+ */
628
+ do_action( 'auth_cookie_malformed', $cookie, $scheme );
629
+ return false;
630
+ }
631
+
632
+ $scheme = $cookie_elements['scheme'];
633
+ $username = $cookie_elements['username'];
634
+ $hmac = $cookie_elements['hmac'];
635
+ $token = $cookie_elements['token'];
636
+ $expired = $expiration = $cookie_elements['expiration'];
637
+
638
+ // Allow a grace period for POST and AJAX requests
639
+ if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] ) {
640
+ $expired += HOUR_IN_SECONDS;
641
+ }
642
+
643
+ // Quick check to see if an honest cookie has expired
644
+ if ( $expired < time() ) {
645
+ /**
646
+ * Fires once an authentication cookie has expired.
647
+ *
648
+ * @since 2.7.0
649
+ *
650
+ * @param array $cookie_elements An array of data for the authentication cookie.
651
+ */
652
+ do_action( 'auth_cookie_expired', $cookie_elements );
653
+ return false;
654
+ }
655
+
656
+ $user = get_user_by('login', $username);
657
+ if ( ! $user ) {
658
+ /**
659
+ * Fires if a bad username is entered in the user authentication process.
660
+ *
661
+ * @since 2.7.0
662
+ *
663
+ * @param array $cookie_elements An array of data for the authentication cookie.
664
+ */
665
+ do_action( 'auth_cookie_bad_username', $cookie_elements );
666
+ return false;
667
+ }
668
+
669
+ $pass_frag = substr($user->user_pass, 8, 4);
670
+
671
+ $key = wp_hash( $username . '|' . $pass_frag . '|' . $expiration . '|' . $token, $scheme );
672
+
673
+ // If ext/hash is not present, compat.php's hash_hmac() does not support sha256.
674
+ $algo = function_exists( 'hash' ) ? 'sha256' : 'sha1';
675
+ $hash = hash_hmac( $algo, $username . '|' . $expiration . '|' . $token, $key );
676
+
677
+ if ( ! hash_equals( $hash, $hmac ) ) {
678
+ /**
679
+ * Fires if a bad authentication cookie hash is encountered.
680
+ *
681
+ * @since 2.7.0
682
+ *
683
+ * @param array $cookie_elements An array of data for the authentication cookie.
684
+ */
685
+ do_action( 'auth_cookie_bad_hash', $cookie_elements );
686
+ return false;
687
+ }
688
+
689
+ $manager = WP_Session_Tokens::get_instance( $user->ID );
690
+ if ( ! $manager->verify( $token ) ) {
691
+ do_action( 'auth_cookie_bad_session_token', $cookie_elements );
692
+ return false;
693
+ }
694
+
695
+ // AJAX/POST grace period set above
696
+ if ( $expiration < time() ) {
697
+ $GLOBALS['login_grace_period'] = 1;
698
+ }
699
+
700
+ /**
701
+ * Fires once an authentication cookie has been validated.
702
+ *
703
+ * @since 2.7.0
704
+ *
705
+ * @param array $cookie_elements An array of data for the authentication cookie.
706
+ * @param WP_User $user User object.
707
+ */
708
+ do_action( 'auth_cookie_valid', $cookie_elements, $user );
709
+
710
+ return $user->ID;
711
+ }
712
+ endif;
713
+
714
+ if ( !function_exists('wp_generate_auth_cookie') ) :
715
+ /**
716
+ * Generate authentication cookie contents.
717
+ *
718
+ * @since 2.5.0
719
+ *
720
+ * @param int $user_id User ID
721
+ * @param int $expiration Cookie expiration in seconds
722
+ * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in
723
+ * @param string $token User's session token to use for this cookie
724
+ * @return string Authentication cookie contents. Empty string if user does not exist.
725
+ */
726
+ function wp_generate_auth_cookie( $user_id, $expiration, $scheme = 'auth', $token = '' ) {
727
+ $user = get_userdata($user_id);
728
+ if ( ! $user ) {
729
+ return '';
730
+ }
731
+
732
+ if ( ! $token ) {
733
+ $manager = WP_Session_Tokens::get_instance( $user_id );
734
+ $token = $manager->create( $expiration );
735
+ }
736
+
737
+ $pass_frag = substr($user->user_pass, 8, 4);
738
+
739
+ $key = wp_hash( $user->user_login . '|' . $pass_frag . '|' . $expiration . '|' . $token, $scheme );
740
+
741
+ // If ext/hash is not present, compat.php's hash_hmac() does not support sha256.
742
+ $algo = function_exists( 'hash' ) ? 'sha256' : 'sha1';
743
+ $hash = hash_hmac( $algo, $user->user_login . '|' . $expiration . '|' . $token, $key );
744
+
745
+ $cookie = $user->user_login . '|' . $expiration . '|' . $token . '|' . $hash;
746
+
747
+ /**
748
+ * Filter the authentication cookie.
749
+ *
750
+ * @since 2.5.0
751
+ *
752
+ * @param string $cookie Authentication cookie.
753
+ * @param int $user_id User ID.
754
+ * @param int $expiration Authentication cookie expiration in seconds.
755
+ * @param string $scheme Cookie scheme used. Accepts 'auth', 'secure_auth', or 'logged_in'.
756
+ * @param string $token User's session token used.
757
+ */
758
+ return apply_filters( 'auth_cookie', $cookie, $user_id, $expiration, $scheme, $token );
759
+ }
760
+ endif;
761
+
762
+ if ( !function_exists('wp_parse_auth_cookie') ) :
763
+ /**
764
+ * Parse a cookie into its components
765
+ *
766
+ * @since 2.7.0
767
+ *
768
+ * @param string $cookie
769
+ * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in
770
+ * @return array Authentication cookie components
771
+ */
772
+ function wp_parse_auth_cookie($cookie = '', $scheme = '') {
773
+ if ( empty($cookie) ) {
774
+ switch ($scheme){
775
+ case 'auth':
776
+ $cookie_name = AUTH_COOKIE;
777
+ break;
778
+ case 'secure_auth':
779
+ $cookie_name = SECURE_AUTH_COOKIE;
780
+ break;
781
+ case "logged_in":
782
+ $cookie_name = LOGGED_IN_COOKIE;
783
+ break;
784
+ default:
785
+ if ( is_ssl() ) {
786
+ $cookie_name = SECURE_AUTH_COOKIE;
787
+ $scheme = 'secure_auth';
788
+ } else {
789
+ $cookie_name = AUTH_COOKIE;
790
+ $scheme = 'auth';
791
+ }
792
+ }
793
+
794
+ if ( empty($_COOKIE[$cookie_name]) )
795
+ return false;
796
+ $cookie = $_COOKIE[$cookie_name];
797
+ }
798
+
799
+ $cookie_elements = explode('|', $cookie);
800
+ if ( count( $cookie_elements ) !== 4 ) {
801
+ return false;
802
+ }
803
+
804
+ list( $username, $expiration, $token, $hmac ) = $cookie_elements;
805
+
806
+ return compact( 'username', 'expiration', 'token', 'hmac', 'scheme' );
807
+ }
808
+ endif;
809
+
810
+ if ( !function_exists('wp_set_auth_cookie') ) :
811
+ /**
812
+ * Sets the authentication cookies based on user ID.
813
+ *
814
+ * The $remember parameter increases the time that the cookie will be kept. The
815
+ * default the cookie is kept without remembering is two days. When $remember is
816
+ * set, the cookies will be kept for 14 days or two weeks.
817
+ *
818
+ * @since 2.5.0
819
+ *
820
+ * @param int $user_id User ID
821
+ * @param bool $remember Whether to remember the user
822
+ * @param mixed $secure Whether the admin cookies should only be sent over HTTPS.
823
+ * Default is_ssl().
824
+ */
825
+ function wp_set_auth_cookie($user_id, $remember = false, $secure = '') {
826
+ if ( $remember ) {
827
+ /**
828
+ * Filter the duration of the authentication cookie expiration period.
829
+ *
830
+ * @since 2.8.0
831
+ *
832
+ * @param int $length Duration of the expiration period in seconds.
833
+ * @param int $user_id User ID.
834
+ * @param bool $remember Whether to remember the user login. Default false.
835
+ */
836
+ $expiration = time() + apply_filters( 'auth_cookie_expiration', 14 * DAY_IN_SECONDS, $user_id, $remember );
837
+
838
+ /*
839
+ * Ensure the browser will continue to send the cookie after the expiration time is reached.
840
+ * Needed for the login grace period in wp_validate_auth_cookie().
841
+ */
842
+ $expire = $expiration + ( 12 * HOUR_IN_SECONDS );
843
+ } else {
844
+ /** This filter is documented in wp-includes/pluggable.php */
845
+ $expiration = time() + apply_filters( 'auth_cookie_expiration', 2 * DAY_IN_SECONDS, $user_id, $remember );
846
+ $expire = 0;
847
+ }
848
+
849
+ if ( '' === $secure ) {
850
+ $secure = is_ssl();
851
+ }
852
+
853
+ // Frontend cookie is secure when the auth cookie is secure and the site's home URL is forced HTTPS.
854
+ $secure_logged_in_cookie = $secure && 'https' === parse_url( get_option( 'home' ), PHP_URL_SCHEME );
855
+
856
+ /**
857
+ * Filter whether the connection is secure.
858
+ *
859
+ * @since 3.1.0
860
+ *
861
+ * @param bool $secure Whether the connection is secure.
862
+ * @param int $user_id User ID.
863
+ */
864
+ $secure = apply_filters( 'secure_auth_cookie', $secure, $user_id );
865
+
866
+ /**
867
+ * Filter whether to use a secure cookie when logged-in.
868
+ *
869
+ * @since 3.1.0
870
+ *
871
+ * @param bool $secure_logged_in_cookie Whether to use a secure cookie when logged-in.
872
+ * @param int $user_id User ID.
873
+ * @param bool $secure Whether the connection is secure.
874
+ */
875
+ $secure_logged_in_cookie = apply_filters( 'secure_logged_in_cookie', $secure_logged_in_cookie, $user_id, $secure );
876
+
877
+ if ( $secure ) {
878
+ $auth_cookie_name = SECURE_AUTH_COOKIE;
879
+ $scheme = 'secure_auth';
880
+ } else {
881
+ $auth_cookie_name = AUTH_COOKIE;
882
+ $scheme = 'auth';
883
+ }
884
+
885
+ $manager = WP_Session_Tokens::get_instance( $user_id );
886
+ $token = $manager->create( $expiration );
887
+
888
+ $auth_cookie = wp_generate_auth_cookie( $user_id, $expiration, $scheme, $token );
889
+ $logged_in_cookie = wp_generate_auth_cookie( $user_id, $expiration, 'logged_in', $token );
890
+
891
+ /**
892
+ * Fires immediately before the authentication cookie is set.
893
+ *
894
+ * @since 2.5.0
895
+ *
896
+ * @param string $auth_cookie Authentication cookie.
897
+ * @param int $expire Login grace period in seconds. Default 43,200 seconds, or 12 hours.
898
+ * @param int $expiration Duration in seconds the authentication cookie should be valid.
899
+ * Default 1,209,600 seconds, or 14 days.
900
+ * @param int $user_id User ID.
901
+ * @param string $scheme Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'.
902
+ */
903
+ do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme );
904
+
905
+ /**
906
+ * Fires immediately before the secure authentication cookie is set.
907
+ *
908
+ * @since 2.6.0
909
+ *
910
+ * @param string $logged_in_cookie The logged-in cookie.
911
+ * @param int $expire Login grace period in seconds. Default 43,200 seconds, or 12 hours.
912
+ * @param int $expiration Duration in seconds the authentication cookie should be valid.
913
+ * Default 1,209,600 seconds, or 14 days.
914
+ * @param int $user_id User ID.
915
+ * @param string $scheme Authentication scheme. Default 'logged_in'.
916
+ */
917
+ do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' );
918
+
919
+ setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
920
+ setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
921
+ setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true);
922
+ if ( COOKIEPATH != SITECOOKIEPATH )
923
+ setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true);
924
+ }
925
+ endif;
926
+
927
+ if ( !function_exists('wp_clear_auth_cookie') ) :
928
+ /**
929
+ * Removes all of the cookies associated with authentication.
930
+ *
931
+ * @since 2.5.0
932
+ */
933
+ function wp_clear_auth_cookie() {
934
+ /**
935
+ * Fires just before the authentication cookies are cleared.
936
+ *
937
+ * @since 2.7.0
938
+ */
939
+ do_action( 'clear_auth_cookie' );
940
+
941
+ setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN );
942
+ setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN );
943
+ setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN );
944
+ setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN );
945
+ setcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
946
+ setcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
947
+
948
+ // Old cookies
949
+ setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
950
+ setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
951
+ setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
952
+ setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
953
+
954
+ // Even older cookies
955
+ setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
956
+ setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
957
+ setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
958
+ setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
959
+ }
960
+ endif;
961
+
962
+ if ( !function_exists('is_user_logged_in') ) :
963
+ /**
964
+ * Checks if the current visitor is a logged in user.
965
+ *
966
+ * @since 2.0.0
967
+ *
968
+ * @return bool True if user is logged in, false if not logged in.
969
+ */
970
+ function is_user_logged_in() {
971
+ $user = wp_get_current_user();
972
+
973
+ if ( ! $user->exists() )
974
+ return false;
975
+
976
+ return true;
977
+ }
978
+ endif;
979
+
980
+ if ( !function_exists('auth_redirect') ) :
981
+ /**
982
+ * Checks if a user is logged in, if not it redirects them to the login page.
983
+ *
984
+ * @since 1.5.0
985
+ */
986
+ function auth_redirect() {
987
+ // Checks if a user is logged in, if not redirects them to the login page
988
+
989
+ $secure = ( is_ssl() || force_ssl_admin() );
990
+
991
+ /**
992
+ * Filter whether to use a secure authentication redirect.
993
+ *
994
+ * @since 3.1.0
995
+ *
996
+ * @param bool $secure Whether to use a secure authentication redirect. Default false.
997
+ */
998
+ $secure = apply_filters( 'secure_auth_redirect', $secure );
999
+
1000
+ // If https is required and request is http, redirect
1001
+ if ( $secure && !is_ssl() && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
1002
+ if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
1003
+ wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
1004
+ exit();
1005
+ } else {
1006
+ wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
1007
+ exit();
1008
+ }
1009
+ }
1010
+
1011
+ if ( is_user_admin() ) {
1012
+ $scheme = 'logged_in';
1013
+ } else {
1014
+ /**
1015
+ * Filter the authentication redirect scheme.
1016
+ *
1017
+ * @since 2.9.0
1018
+ *
1019
+ * @param string $scheme Authentication redirect scheme. Default empty.
1020
+ */
1021
+ $scheme = apply_filters( 'auth_redirect_scheme', '' );
1022
+ }
1023
+
1024
+ if ( $user_id = wp_validate_auth_cookie( '', $scheme) ) {
1025
+ /**
1026
+ * Fires before the authentication redirect.
1027
+ *
1028
+ * @since 2.8.0
1029
+ *
1030
+ * @param int $user_id User ID.
1031
+ */
1032
+ do_action( 'auth_redirect', $user_id );
1033
+
1034
+ // If the user wants ssl but the session is not ssl, redirect.
1035
+ if ( !$secure && get_user_option('use_ssl', $user_id) && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
1036
+ if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
1037
+ wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
1038
+ exit();
1039
+ } else {
1040
+ wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
1041
+ exit();
1042
+ }
1043
+ }
1044
+
1045
+ return; // The cookie is good so we're done
1046
+ }
1047
+
1048
+ // The cookie is no good so force login
1049
+ nocache_headers();
1050
+
1051
+ $redirect = ( strpos( $_SERVER['REQUEST_URI'], '/options.php' ) && wp_get_referer() ) ? wp_get_referer() : set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
1052
+
1053
+ $login_url = wp_login_url($redirect, true);
1054
+
1055
+ wp_redirect($login_url);
1056
+ exit();
1057
+ }
1058
+ endif;
1059
+
1060
+ if ( !function_exists('check_admin_referer') ) :
1061
+ /**
1062
+ * Makes sure that a user was referred from another admin page.
1063
+ *
1064
+ * To avoid security exploits.
1065
+ *
1066
+ * @since 1.2.0
1067
+ *
1068
+ * @param string $action Action nonce
1069
+ * @param string $query_arg where to look for nonce in $_REQUEST (since 2.5)
1070
+ */
1071
+ function check_admin_referer($action = -1, $query_arg = '_wpnonce') {
1072
+ if ( -1 == $action )
1073
+ _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' );
1074
+
1075
+ $adminurl = strtolower(admin_url());
1076
+ $referer = strtolower(wp_get_referer());
1077
+ $result = isset($_REQUEST[$query_arg]) ? wp_verify_nonce($_REQUEST[$query_arg], $action) : false;
1078
+ if ( !$result && !(-1 == $action && strpos($referer, $adminurl) === 0) ) {
1079
+ wp_nonce_ays($action);
1080
+ die();
1081
+ }
1082
+
1083
+ /**
1084
+ * Fires once the admin request has been validated or not.
1085
+ *
1086
+ * @since 1.5.1
1087
+ *
1088
+ * @param string $action The nonce action.
1089
+ * @param bool $result Whether the admin request nonce was validated.
1090
+ */
1091
+ do_action( 'check_admin_referer', $action, $result );
1092
+ return $result;
1093
+ }
1094
+ endif;
1095
+
1096
+ if ( !function_exists('check_ajax_referer') ) :
1097
+ /**
1098
+ * Verifies the AJAX request to prevent processing requests external of the blog.
1099
+ *
1100
+ * @since 2.0.3
1101
+ *
1102
+ * @param string $action Action nonce
1103
+ * @param string $query_arg where to look for nonce in $_REQUEST (since 2.5)
1104
+ */
1105
+ function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
1106
+ $nonce = '';
1107
+
1108
+ if ( $query_arg && isset( $_REQUEST[ $query_arg ] ) )
1109
+ $nonce = $_REQUEST[ $query_arg ];
1110
+ elseif ( isset( $_REQUEST['_ajax_nonce'] ) )
1111
+ $nonce = $_REQUEST['_ajax_nonce'];
1112
+ elseif ( isset( $_REQUEST['_wpnonce'] ) )
1113
+ $nonce = $_REQUEST['_wpnonce'];
1114
+
1115
+ $result = wp_verify_nonce( $nonce, $action );
1116
+
1117
+ if ( $die && false == $result ) {
1118
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
1119
+ wp_die( -1 );
1120
+ else
1121
+ die( '-1' );
1122
+ }
1123
+
1124
+ /**
1125
+ * Fires once the AJAX request has been validated or not.
1126
+ *
1127
+ * @since 2.1.0
1128
+ *
1129
+ * @param string $action The AJAX nonce action.
1130
+ * @param bool $result Whether the AJAX request nonce was validated.
1131
+ */
1132
+ do_action( 'check_ajax_referer', $action, $result );
1133
+
1134
+ return $result;
1135
+ }
1136
+ endif;
1137
+
1138
+ if ( !function_exists('wp_redirect') ) :
1139
+ /**
1140
+ * Redirects to another page.
1141
+ *
1142
+ * @since 1.5.1
1143
+ *
1144
+ * @param string $location The path to redirect to.
1145
+ * @param int $status Status code to use.
1146
+ * @return bool False if $location is not provided, true otherwise.
1147
+ */
1148
+ function wp_redirect($location, $status = 302) {
1149
+ global $is_IIS;
1150
+
1151
+ /**
1152
+ * Filter the redirect location.
1153
+ *
1154
+ * @since 2.1.0
1155
+ *
1156
+ * @param string $location The path to redirect to.
1157
+ * @param int $status Status code to use.
1158
+ */
1159
+ $location = apply_filters( 'wp_redirect', $location, $status );
1160
+
1161
+ /**
1162
+ * Filter the redirect status code.
1163
+ *
1164
+ * @since 2.3.0
1165
+ *
1166
+ * @param int $status Status code to use.
1167
+ * @param string $location The path to redirect to.
1168
+ */
1169
+ $status = apply_filters( 'wp_redirect_status', $status, $location );
1170
+
1171
+ if ( ! $location )
1172
+ return false;
1173
+
1174
+ $location = wp_sanitize_redirect($location);
1175
+
1176
+ if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
1177
+ status_header($status); // This causes problems on IIS and some FastCGI setups
1178
+
1179
+ header("Location: $location", true, $status);
1180
+
1181
+ return true;
1182
+ }
1183
+ endif;
1184
+
1185
+ if ( !function_exists('wp_sanitize_redirect') ) :
1186
+ /**
1187
+ * Sanitizes a URL for use in a redirect.
1188
+ *
1189
+ * @since 2.3.0
1190
+ *
1191
+ * @return string redirect-sanitized URL
1192
+ **/
1193
+ function wp_sanitize_redirect($location) {
1194
+ $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*]|i', '', $location);
1195
+ $location = wp_kses_no_null($location);
1196
+
1197
+ // remove %0d and %0a from location
1198
+ $strip = array('%0d', '%0a', '%0D', '%0A');
1199
+ $location = _deep_replace($strip, $location);
1200
+ return $location;
1201
+ }
1202
+ endif;
1203
+
1204
+ if ( !function_exists('wp_safe_redirect') ) :
1205
+ /**
1206
+ * Performs a safe (local) redirect, using wp_redirect().
1207
+ *
1208
+ * Checks whether the $location is using an allowed host, if it has an absolute
1209
+ * path. A plugin can therefore set or remove allowed host(s) to or from the
1210
+ * list.
1211
+ *
1212
+ * If the host is not allowed, then the redirect is to wp-admin on the siteurl
1213
+ * instead. This prevents malicious redirects which redirect to another host,
1214
+ * but only used in a few places.
1215
+ *
1216
+ * @since 2.3.0
1217
+ *
1218
+ * @uses wp_validate_redirect() To validate the redirect is to an allowed host.
1219
+ *
1220
+ * @return void Does not return anything
1221
+ **/
1222
+ function wp_safe_redirect($location, $status = 302) {
1223
+
1224
+ // Need to look at the URL the way it will end up in wp_redirect()
1225
+ $location = wp_sanitize_redirect($location);
1226
+
1227
+ $location = wp_validate_redirect($location, admin_url());
1228
+
1229
+ wp_redirect($location, $status);
1230
+ }
1231
+ endif;
1232
+
1233
+ if ( !function_exists('wp_validate_redirect') ) :
1234
+ /**
1235
+ * Validates a URL for use in a redirect.
1236
+ *
1237
+ * Checks whether the $location is using an allowed host, if it has an absolute
1238
+ * path. A plugin can therefore set or remove allowed host(s) to or from the
1239
+ * list.
1240
+ *
1241
+ * If the host is not allowed, then the redirect is to $default supplied
1242
+ *
1243
+ * @since 2.8.1
1244
+ *
1245
+ * @param string $location The redirect to validate
1246
+ * @param string $default The value to return if $location is not allowed
1247
+ * @return string redirect-sanitized URL
1248
+ **/
1249
+ function wp_validate_redirect($location, $default = '') {
1250
+ $location = trim( $location );
1251
+ // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'
1252
+ if ( substr($location, 0, 2) == '//' )
1253
+ $location = 'http:' . $location;
1254
+
1255
+ // In php 5 parse_url may fail if the URL query part contains http://, bug #38143
1256
+ $test = ( $cut = strpos($location, '?') ) ? substr( $location, 0, $cut ) : $location;
1257
+
1258
+ $lp = parse_url($test);
1259
+
1260
+ // Give up if malformed URL
1261
+ if ( false === $lp )
1262
+ return $default;
1263
+
1264
+ // Allow only http and https schemes. No data:, etc.
1265
+ if ( isset($lp['scheme']) && !('http' == $lp['scheme'] || 'https' == $lp['scheme']) )
1266
+ return $default;
1267
+
1268
+ // Reject if scheme is set but host is not. This catches urls like https:host.com for which parse_url does not set the host field.
1269
+ if ( isset($lp['scheme']) && !isset($lp['host']) )
1270
+ return $default;
1271
+
1272
+ $wpp = parse_url(home_url());
1273
+
1274
+ /**
1275
+ * Filter the whitelist of hosts to redirect to.
1276
+ *
1277
+ * @since 2.3.0
1278
+ *
1279
+ * @param array $hosts An array of allowed hosts.
1280
+ * @param bool|string $host The parsed host; empty if not isset.
1281
+ */
1282
+ $allowed_hosts = (array) apply_filters( 'allowed_redirect_hosts', array($wpp['host']), isset($lp['host']) ? $lp['host'] : '' );
1283
+
1284
+ if ( isset($lp['host']) && ( !in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host'])) )
1285
+ $location = $default;
1286
+
1287
+ return $location;
1288
+ }
1289
+ endif;
1290
+
1291
+ if ( ! function_exists('wp_notify_postauthor') ) :
1292
+ /**
1293
+ * Notify an author (and/or others) of a comment/trackback/pingback on a post.
1294
+ *
1295
+ * @since 1.0.0
1296
+ *
1297
+ * @param int $comment_id Comment ID
1298
+ * @param string $deprecated Not used
1299
+ * @return bool True on completion. False if no email addresses were specified.
1300
+ */
1301
+ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
1302
+ if ( null !== $deprecated ) {
1303
+ _deprecated_argument( __FUNCTION__, '3.8' );
1304
+ }
1305
+
1306
+ $comment = get_comment( $comment_id );
1307
+ if ( empty( $comment ) )
1308
+ return false;
1309
+
1310
+ $post = get_post( $comment->comment_post_ID );
1311
+ $author = get_userdata( $post->post_author );
1312
+
1313
+ // Who to notify? By default, just the post author, but others can be added.
1314
+ $emails = array();
1315
+ if ( $author ) {
1316
+ $emails[] = $author->user_email;
1317
+ }
1318
+
1319
+ /**
1320
+ * Filter the list of email addresses to receive a comment notification.
1321
+ *
1322
+ * By default, only post authors are notified of comments. This filter allows
1323
+ * others to be added.
1324
+ *
1325
+ * @since 3.7.0
1326
+ *
1327
+ * @param array $emails An array of email addresses to receive a comment notification.
1328
+ * @param int $comment_id The comment ID.
1329
+ */
1330
+ $emails = apply_filters( 'comment_notification_recipients', $emails, $comment_id );
1331
+ $emails = array_filter( $emails );
1332
+
1333
+ // If there are no addresses to send the comment to, bail.
1334
+ if ( ! count( $emails ) ) {
1335
+ return false;
1336
+ }
1337
+
1338
+ // Facilitate unsetting below without knowing the keys.
1339
+ $emails = array_flip( $emails );
1340
+
1341
+ /**
1342
+ * Filter whether to notify comment authors of their comments on their own posts.
1343
+ *
1344
+ * By default, comment authors aren't notified of their comments on their own
1345
+ * posts. This filter allows you to override that.
1346
+ *
1347
+ * @since 3.8.0
1348
+ *
1349
+ * @param bool $notify Whether to notify the post author of their own comment.
1350
+ * Default false.
1351
+ * @param int $comment_id The comment ID.
1352
+ */
1353
+ $notify_author = apply_filters( 'comment_notification_notify_author', false, $comment_id );
1354
+
1355
+ // The comment was left by the author
1356
+ if ( $author && ! $notify_author && $comment->user_id == $post->post_author ) {
1357
+ unset( $emails[ $author->user_email ] );
1358
+ }
1359
+
1360
+ // The author moderated a comment on their own post
1361
+ if ( $author && ! $notify_author && $post->post_author == get_current_user_id() ) {
1362
+ unset( $emails[ $author->user_email ] );
1363
+ }
1364
+
1365
+ // The post author is no longer a member of the blog
1366
+ if ( $author && ! $notify_author && ! user_can( $post->post_author, 'read_post', $post->ID ) ) {
1367
+ unset( $emails[ $author->user_email ] );
1368
+ }
1369
+
1370
+ // If there's no email to send the comment to, bail, otherwise flip array back around for use below
1371
+ if ( ! count( $emails ) ) {
1372
+ return false;
1373
+ } else {
1374
+ $emails = array_flip( $emails );
1375
+ }
1376
+
1377
+ $comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
1378
+
1379
+ // The blogname option is escaped with esc_html on the way into the database in sanitize_option
1380
+ // we want to reverse this for the plain text arena of emails.
1381
+ $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
1382
+
1383
+ switch ( $comment->comment_type ) {
1384
+ case 'trackback':
1385
+ $notify_message = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
1386
+ /* translators: 1: website name, 2: author IP, 3: author domain */
1387
+ $notify_message .= sprintf( __('Website: %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
1388
+ $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
1389
+ $notify_message .= __('Excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
1390
+ $notify_message .= __('You can see all trackbacks on this post here: ') . "\r\n";
1391
+ /* translators: 1: blog name, 2: post title */
1392
+ $subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title );
1393
+ break;
1394
+ case 'pingback':
1395
+ $notify_message = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n";
1396
+ /* translators: 1: comment author, 2: author IP, 3: author domain */
1397
+ $notify_message .= sprintf( __('Website: %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
1398
+ $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
1399
+ $notify_message .= __('Excerpt: ') . "\r\n" . sprintf('[...] %s [...]', $comment->comment_content ) . "\r\n\r\n";
1400
+ $notify_message .= __('You can see all pingbacks on this post here: ') . "\r\n";
1401
+ /* translators: 1: blog name, 2: post title */
1402
+ $subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title );
1403
+ break;
1404
+ default: // Comments
1405
+ $notify_message = sprintf( __( 'New comment on your post "%s"' ), $post->post_title ) . "\r\n";
1406
+ /* translators: 1: comment author, 2: author IP, 3: author domain */
1407
+ $notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
1408
+ $notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . "\r\n";
1409
+ $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
1410
+ $notify_message .= sprintf( __('Whois : http://whois.arin.net/rest/ip/%s'), $comment->comment_author_IP ) . "\r\n";
1411
+ $notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
1412
+ $notify_message .= __('You can see all comments on this post here: ') . "\r\n";
1413
+ /* translators: 1: blog name, 2: post title */
1414
+ $subject = sprintf( __('[%1$s] Comment: "%2$s"'), $blogname, $post->post_title );
1415
+ break;
1416
+ }
1417
+ $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
1418
+ $notify_message .= sprintf( __('Permalink: %s'), get_comment_link( $comment_id ) ) . "\r\n";
1419
+
1420
+ if ( user_can( $post->post_author, 'edit_comment', $comment_id ) ) {
1421
+ if ( EMPTY_TRASH_DAYS )
1422
+ $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n";
1423
+ else
1424
+ $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n";
1425
+ $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n";
1426
+ }
1427
+
1428
+ $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
1429
+
1430
+ if ( '' == $comment->comment_author ) {
1431
+ $from = "From: \"$blogname\" <$wp_email>";
1432
+ if ( '' != $comment->comment_author_email )
1433
+ $reply_to = "Reply-To: $comment->comment_author_email";
1434
+ } else {
1435
+ $from = "From: \"$comment->comment_author\" <$wp_email>";
1436
+ if ( '' != $comment->comment_author_email )
1437
+ $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>";
1438
+ }
1439
+
1440
+ $message_headers = "$from\n"
1441
+ . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
1442
+
1443
+ if ( isset($reply_to) )
1444
+ $message_headers .= $reply_to . "\n";
1445
+
1446
+ /**
1447
+ * Filter the comment notification email text.
1448
+ *
1449
+ * @since 1.5.2
1450
+ *
1451
+ * @param string $notify_message The comment notification email text.
1452
+ * @param int $comment_id Comment ID.
1453
+ */
1454
+ $notify_message = apply_filters( 'comment_notification_text', $notify_message, $comment_id );
1455
+
1456
+ /**
1457
+ * Filter the comment notification email subject.
1458
+ *
1459
+ * @since 1.5.2
1460
+ *
1461
+ * @param string $subject The comment notification email subject.
1462
+ * @param int $comment_id Comment ID.
1463
+ */
1464
+ $subject = apply_filters( 'comment_notification_subject', $subject, $comment_id );
1465
+
1466
+ /**
1467
+ * Filter the comment notification email headers.
1468
+ *
1469
+ * @since 1.5.2
1470
+ *
1471
+ * @param string $message_headers Headers for the comment notification email.
1472
+ * @param int $comment_id Comment ID.
1473
+ */
1474
+ $message_headers = apply_filters( 'comment_notification_headers', $message_headers, $comment_id );
1475
+
1476
+ foreach ( $emails as $email ) {
1477
+ @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
1478
+ }
1479
+
1480
+ return true;
1481
+ }
1482
+ endif;
1483
+
1484
+ if ( !function_exists('wp_notify_moderator') ) :
1485
+ /**
1486
+ * Notifies the moderator of the blog about a new comment that is awaiting approval.
1487
+ *
1488
+ * @since 1.0.0
1489
+ *
1490
+ * @uses $wpdb
1491
+ *
1492
+ * @param int $comment_id Comment ID
1493
+ * @return bool Always returns true
1494
+ */
1495
+ function wp_notify_moderator($comment_id) {
1496
+ global $wpdb;
1497
+
1498
+ if ( 0 == get_option( 'moderation_notify' ) )
1499
+ return true;
1500
+
1501
+ $comment = get_comment($comment_id);
1502
+ $post = get_post($comment->comment_post_ID);
1503
+ $user = get_userdata( $post->post_author );
1504
+ // Send to the administration and to the post author if the author can modify the comment.
1505
+ $emails = array( get_option( 'admin_email' ) );
1506
+ if ( user_can( $user->ID, 'edit_comment', $comment_id ) && ! empty( $user->user_email ) ) {
1507
+ if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) )
1508
+ $emails[] = $user->user_email;
1509
+ }
1510
+
1511
+ $comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
1512
+ $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
1513
+
1514
+ // The blogname option is escaped with esc_html on the way into the database in sanitize_option
1515
+ // we want to reverse this for the plain text arena of emails.
1516
+ $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
1517
+
1518
+ switch ( $comment->comment_type ) {
1519
+ case 'trackback':
1520
+ $notify_message = sprintf( __('A new trackback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
1521
+ $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
1522
+ $notify_message .= sprintf( __('Website : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
1523
+ $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
1524
+ $notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
1525
+ break;
1526
+ case 'pingback':
1527
+ $notify_message = sprintf( __('A new pingback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
1528
+ $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
1529
+ $notify_message .= sprintf( __('Website : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
1530
+ $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
1531
+ $notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
1532
+ break;
1533
+ default: // Comments
1534
+ $notify_message = sprintf( __('A new comment on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
1535
+ $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
1536
+ $notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
1537
+ $notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . "\r\n";
1538
+ $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
1539
+ $notify_message .= sprintf( __('Whois : http://whois.arin.net/rest/ip/%s'), $comment->comment_author_IP ) . "\r\n";
1540
+ $notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
1541
+ break;
1542
+ }
1543
+
1544
+ $notify_message .= sprintf( __('Approve it: %s'), admin_url("comment.php?action=approve&c=$comment_id") ) . "\r\n";
1545
+ if ( EMPTY_TRASH_DAYS )
1546
+ $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n";
1547
+ else
1548
+ $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n";
1549
+ $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n";
1550
+
1551
+ $notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:',
1552
+ 'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
1553
+ $notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n";
1554
+
1555
+ $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), $blogname, $post->post_title );
1556
+ $message_headers = '';
1557
+
1558
+ /**
1559
+ * Filter the list of recipients for comment moderation emails.
1560
+ *
1561
+ * @since 3.7.0
1562
+ *
1563
+ * @param array $emails List of email addresses to notify for comment moderation.
1564
+ * @param int $comment_id Comment ID.
1565
+ */
1566
+ $emails = apply_filters( 'comment_moderation_recipients', $emails, $comment_id );
1567
+
1568
+ /**
1569
+ * Filter the comment moderation email text.
1570
+ *
1571
+ * @since 1.5.2
1572
+ *
1573
+ * @param string $notify_message Text of the comment moderation email.
1574
+ * @param int $comment_id Comment ID.
1575
+ */
1576
+ $notify_message = apply_filters( 'comment_moderation_text', $notify_message, $comment_id );
1577
+
1578
+ /**
1579
+ * Filter the comment moderation email subject.
1580
+ *
1581
+ * @since 1.5.2
1582
+ *
1583
+ * @param string $subject Subject of the comment moderation email.
1584
+ * @param int $comment_id Comment ID.
1585
+ */
1586
+ $subject = apply_filters( 'comment_moderation_subject', $subject, $comment_id );
1587
+
1588
+ /**
1589
+ * Filter the comment moderation email headers.
1590
+ *
1591
+ * @since 2.8.0
1592
+ *
1593
+ * @param string $message_headers Headers for the comment moderation email.
1594
+ * @param int $comment_id Comment ID.
1595
+ */
1596
+ $message_headers = apply_filters( 'comment_moderation_headers', $message_headers, $comment_id );
1597
+
1598
+ foreach ( $emails as $email ) {
1599
+ @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
1600
+ }
1601
+
1602
+ return true;
1603
+ }
1604
+ endif;
1605
+
1606
+ if ( !function_exists('wp_password_change_notification') ) :
1607
+ /**
1608
+ * Notify the blog admin of a user changing password, normally via email.
1609
+ *
1610
+ * @since 2.7.0
1611
+ *
1612
+ * @param object $user User Object
1613
+ */
1614
+ function wp_password_change_notification(&$user) {
1615
+ // send a copy of password change notification to the admin
1616
+ // but check to see if it's the admin whose password we're changing, and skip this
1617
+ if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
1618
+ $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
1619
+ // The blogname option is escaped with esc_html on the way into the database in sanitize_option
1620
+ // we want to reverse this for the plain text arena of emails.
1621
+ $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
1622
+ wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message);
1623
+ }
1624
+ }
1625
+ endif;
1626
+
1627
+ if ( !function_exists('wp_new_user_notification') ) :
1628
+ /**
1629
+ * Email login credentials to a newly-registered user.
1630
+ *
1631
+ * A new user registration notification is also sent to admin email.
1632
+ *
1633
+ * @since 2.0.0
1634
+ *
1635
+ * @param int $user_id User ID.
1636
+ * @param string $plaintext_pass Optional. The user's plaintext password. Default empty.
1637
+ */
1638
+ function wp_new_user_notification($user_id, $plaintext_pass = '') {
1639
+ $user = get_userdata( $user_id );
1640
+
1641
+ // The blogname option is escaped with esc_html on the way into the database in sanitize_option
1642
+ // we want to reverse this for the plain text arena of emails.
1643
+ $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
1644
+
1645
+ $message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
1646
+ $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
1647
+ $message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n";
1648
+
1649
+ @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
1650
+
1651
+ if ( empty($plaintext_pass) )
1652
+ return;
1653
+
1654
+ $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
1655
+ $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
1656
+ $message .= wp_login_url() . "\r\n";
1657
+
1658
+ wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);
1659
+
1660
+ }
1661
+ endif;
1662
+
1663
+ if ( !function_exists('wp_nonce_tick') ) :
1664
+ /**
1665
+ * Get the time-dependent variable for nonce creation.
1666
+ *
1667
+ * A nonce has a lifespan of two ticks. Nonces in their second tick may be
1668
+ * updated, e.g. by autosave.
1669
+ *
1670
+ * @since 2.5.0
1671
+ *
1672
+ * @return int
1673
+ */
1674
+ function wp_nonce_tick() {
1675
+ /**
1676
+ * Filter the lifespan of nonces in seconds.
1677
+ *
1678
+ * @since 2.5.0
1679
+ *
1680
+ * @param int $lifespan Lifespan of nonces in seconds. Default 86,400 seconds, or one day.
1681
+ */
1682
+ $nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS );
1683
+
1684
+ return ceil(time() / ( $nonce_life / 2 ));
1685
+ }
1686
+ endif;
1687
+
1688
+ if ( !function_exists('wp_verify_nonce') ) :
1689
+ /**
1690
+ * Verify that correct nonce was used with time limit.
1691
+ *
1692
+ * The user is given an amount of time to use the token, so therefore, since the
1693
+ * UID and $action remain the same, the independent variable is the time.
1694
+ *
1695
+ * @since 2.0.3
1696
+ *
1697
+ * @param string $nonce Nonce that was used in the form to verify
1698
+ * @param string|int $action Should give context to what is taking place and be the same when nonce was created.
1699
+ * @return bool Whether the nonce check passed or failed.
1700
+ */
1701
+ function wp_verify_nonce($nonce, $action = -1) {
1702
+ $user = wp_get_current_user();
1703
+ $uid = (int) $user->ID;
1704
+ if ( ! $uid ) {
1705
+ /**
1706
+ * Filter whether the user who generated the nonce is logged out.
1707
+ *
1708
+ * @since 3.5.0
1709
+ *
1710
+ * @param int $uid ID of the nonce-owning user.
1711
+ * @param string $action The nonce action.
1712
+ */
1713
+ $uid = apply_filters( 'nonce_user_logged_out', $uid, $action );
1714
+ }
1715
+
1716
+ if ( empty( $nonce ) ) {
1717
+ return false;
1718
+ }
1719
+
1720
+ $token = wp_get_session_token();
1721
+ $i = wp_nonce_tick();
1722
+
1723
+ // Nonce generated 0-12 hours ago
1724
+ $expected = substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce'), -12, 10 );
1725
+ if ( hash_equals( $expected, $nonce ) ) {
1726
+ return 1;
1727
+ }
1728
+
1729
+ // Nonce generated 12-24 hours ago
1730
+ $expected = substr( wp_hash( ( $i - 1 ) . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), -12, 10 );
1731
+ if ( hash_equals( $expected, $nonce ) ) {
1732
+ return 2;
1733
+ }
1734
+
1735
+ // Invalid nonce
1736
+ return false;
1737
+ }
1738
+ endif;
1739
+
1740
+ if ( !function_exists('wp_create_nonce') ) :
1741
+ /**
1742
+ * Creates a cryptographic token tied to a specific action, user, and window of time.
1743
+ *
1744
+ * @since 2.0.3
1745
+ *
1746
+ * @param string $action Scalar value to add context to the nonce.
1747
+ * @return string The token.
1748
+ */
1749
+ function wp_create_nonce($action = -1) {
1750
+ $user = wp_get_current_user();
1751
+ $uid = (int) $user->ID;
1752
+ if ( ! $uid ) {
1753
+ /** This filter is documented in wp-includes/pluggable.php */
1754
+ $uid = apply_filters( 'nonce_user_logged_out', $uid, $action );
1755
+ }
1756
+
1757
+ $token = wp_get_session_token();
1758
+ $i = wp_nonce_tick();
1759
+
1760
+ return substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), -12, 10 );
1761
+ }
1762
+ endif;
1763
+
1764
+ if ( !function_exists('wp_salt') ) :
1765
+ /**
1766
+ * Get salt to add to hashes.
1767
+ *
1768
+ * Salts are created using secret keys. Secret keys are located in two places:
1769
+ * in the database and in the wp-config.php file. The secret key in the database
1770
+ * is randomly generated and will be appended to the secret keys in wp-config.php.
1771
+ *
1772
+ * The secret keys in wp-config.php should be updated to strong, random keys to maximize
1773
+ * security. Below is an example of how the secret key constants are defined.
1774
+ * Do not paste this example directly into wp-config.php. Instead, have a
1775
+ * {@link https://api.wordpress.org/secret-key/1.1/salt/ secret key created} just
1776
+ * for you.
1777
+ *
1778
+ * <code>
1779
+ * define('AUTH_KEY', ' Xakm<o xQy rw4EMsLKM-?!T+,PFF})H4lzcW57AF0U@N@< >M%G4Yt>f`z]MON');
1780
+ * define('SECURE_AUTH_KEY', 'LzJ}op]mr|6+![P}Ak:uNdJCJZd>(Hx.-Mh#Tz)pCIU#uGEnfFz|f ;;eU%/U^O~');
1781
+ * define('LOGGED_IN_KEY', '|i|Ux`9<p-h$aFf(qnT:sDO:D1P^wZ$$/Ra@miTJi9G;ddp_<q}6H1)o|a +&JCM');
1782
+ * define('NONCE_KEY', '%:R{[P|,s.KuMltH5}cI;/k<Gx~j!f0I)m_sIyu+&NJZ)-iO>z7X>QYR0Z_XnZ@|');
1783
+ * define('AUTH_SALT', 'eZyT)-Naw]F8CwA*VaW#q*|.)g@o}||wf~@C-YSt}(dh_r6EbI#A,y|nU2{B#JBW');
1784
+ * define('SECURE_AUTH_SALT', '!=oLUTXh,QW=H `}`L|9/^4-3 STz},T(w}W<I`.JjPi)<Bmf1v,HpGe}T1:Xt7n');
1785
+ * define('LOGGED_IN_SALT', '+XSqHc;@Q*K_b|Z?NC[3H!!EONbh.n<+=uKR:>*c(u`g~EJBf#8u#R{mUEZrozmm');
1786
+ * define('NONCE_SALT', 'h`GXHhD>SLWVfg1(1(N{;.V!MoE(SfbA_ksP@&`+AycHcAV$+?@3q+rxV{%^VyKT');
1787
+ * </code>
1788
+ *
1789
+ * Salting passwords helps against tools which has stored hashed values of
1790
+ * common dictionary strings. The added values makes it harder to crack.
1791
+ *
1792
+ * @since 2.5.0
1793
+ *
1794
+ * @link https://api.wordpress.org/secret-key/1.1/salt/ Create secrets for wp-config.php
1795
+ *
1796
+ * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce)
1797
+ * @return string Salt value
1798
+ */
1799
+ function wp_salt( $scheme = 'auth' ) {
1800
+ static $cached_salts = array();
1801
+ if ( isset( $cached_salts[ $scheme ] ) ) {
1802
+ /**
1803
+ * Filter the WordPress salt.
1804
+ *
1805
+ * @since 2.5.0
1806
+ *
1807
+ * @param string $cached_salt Cached salt for the given scheme.
1808
+ * @param string $scheme Authentication scheme. Values include 'auth',
1809
+ * 'secure_auth', 'logged_in', and 'nonce'.
1810
+ */
1811
+ return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme );
1812
+ }
1813
+
1814
+ static $duplicated_keys;
1815
+ if ( null === $duplicated_keys ) {
1816
+ $duplicated_keys = array( 'put your unique phrase here' => true );
1817
+ foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) {
1818
+ foreach ( array( 'KEY', 'SALT' ) as $second ) {
1819
+ if ( ! defined( "{$first}_{$second}" ) ) {
1820
+ continue;
1821
+ }
1822
+ $value = constant( "{$first}_{$second}" );
1823
+ $duplicated_keys[ $value ] = isset( $duplicated_keys[ $value ] );
1824
+ }
1825
+ }
1826
+ }
1827
+
1828
+ $values = array(
1829
+ 'key' => '',
1830
+ 'salt' => ''
1831
+ );
1832
+ if ( defined( 'SECRET_KEY' ) && SECRET_KEY && empty( $duplicated_keys[ SECRET_KEY ] ) ) {
1833
+ $values['key'] = SECRET_KEY;
1834
+ }
1835
+ if ( 'auth' == $scheme && defined( 'SECRET_SALT' ) && SECRET_SALT && empty( $duplicated_keys[ SECRET_SALT ] ) ) {
1836
+ $values['salt'] = SECRET_SALT;
1837
+ }
1838
+
1839
+ if ( in_array( $scheme, array( 'auth', 'secure_auth', 'logged_in', 'nonce' ) ) ) {
1840
+ foreach ( array( 'key', 'salt' ) as $type ) {
1841
+ $const = strtoupper( "{$scheme}_{$type}" );
1842
+ if ( defined( $const ) && constant( $const ) && empty( $duplicated_keys[ constant( $const ) ] ) ) {
1843
+ $values[ $type ] = constant( $const );
1844
+ } elseif ( ! $values[ $type ] ) {
1845
+ $values[ $type ] = get_site_option( "{$scheme}_{$type}" );
1846
+ if ( ! $values[ $type ] ) {
1847
+ $values[ $type ] = wp_generate_password( 64, true, true );
1848
+ update_site_option( "{$scheme}_{$type}", $values[ $type ] );
1849
+ }
1850
+ }
1851
+ }
1852
+ } else {
1853
+ if ( ! $values['key'] ) {
1854
+ $values['key'] = get_site_option( 'secret_key' );
1855
+ if ( ! $values['key'] ) {
1856
+ $values['key'] = wp_generate_password( 64, true, true );
1857
+ update_site_option( 'secret_key', $values['key'] );
1858
+ }
1859
+ }
1860
+ $values['salt'] = hash_hmac( 'md5', $scheme, $values['key'] );
1861
+ }
1862
+
1863
+ $cached_salts[ $scheme ] = $values['key'] . $values['salt'];
1864
+
1865
+ /** This filter is documented in wp-includes/pluggable.php */
1866
+ return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme );
1867
+ }
1868
+ endif;
1869
+
1870
+ if ( !function_exists('wp_hash') ) :
1871
+ /**
1872
+ * Get hash of given string.
1873
+ *
1874
+ * @since 2.0.3
1875
+ * @uses wp_salt() Get WordPress salt
1876
+ *
1877
+ * @param string $data Plain text to hash
1878
+ * @return string Hash of $data
1879
+ */
1880
+ function wp_hash($data, $scheme = 'auth') {
1881
+ $salt = wp_salt($scheme);
1882
+
1883
+ return hash_hmac('md5', $data, $salt);
1884
+ }
1885
+ endif;
1886
+
1887
+ if ( !function_exists('wp_hash_password') ) :
1888
+ /**
1889
+ * Create a hash (encrypt) of a plain text password.
1890
+ *
1891
+ * For integration with other applications, this function can be overwritten to
1892
+ * instead use the other package password checking algorithm.
1893
+ *
1894
+ * @since 2.5.0
1895
+ *
1896
+ * @global object $wp_hasher PHPass object
1897
+ * @uses PasswordHash::HashPassword
1898
+ *
1899
+ * @param string $password Plain text user password to hash
1900
+ * @return string The hash string of the password
1901
+ */
1902
+ function wp_hash_password($password) {
1903
+ global $wp_hasher;
1904
+
1905
+ if ( empty($wp_hasher) ) {
1906
+ require_once( ABSPATH . WPINC . '/class-phpass.php');
1907
+ // By default, use the portable hash from phpass
1908
+ $wp_hasher = new PasswordHash(8, true);
1909
+ }
1910
+
1911
+ return $wp_hasher->HashPassword( trim( $password ) );
1912
+ }
1913
+ endif;
1914
+
1915
+ if ( !function_exists('wp_check_password') ) :
1916
+ /**
1917
+ * Checks the plaintext password against the encrypted Password.
1918
+ *
1919
+ * Maintains compatibility between old version and the new cookie authentication
1920
+ * protocol using PHPass library. The $hash parameter is the encrypted password
1921
+ * and the function compares the plain text password when encrypted similarly
1922
+ * against the already encrypted password to see if they match.
1923
+ *
1924
+ * For integration with other applications, this function can be overwritten to
1925
+ * instead use the other package password checking algorithm.
1926
+ *
1927
+ * @since 2.5.0
1928
+ *
1929
+ * @global object $wp_hasher PHPass object used for checking the password
1930
+ * against the $hash + $password
1931
+ * @uses PasswordHash::CheckPassword
1932
+ *
1933
+ * @param string $password Plaintext user's password
1934
+ * @param string $hash Hash of the user's password to check against.
1935
+ * @return bool False, if the $password does not match the hashed password
1936
+ */
1937
+ function wp_check_password($password, $hash, $user_id = '') {
1938
+ global $wp_hasher;
1939
+
1940
+ // If the hash is still md5...
1941
+ if ( strlen($hash) <= 32 ) {
1942
+ $check = ( $hash == md5($password) );
1943
+ if ( $check && $user_id ) {
1944
+ // Rehash using new hash.
1945
+ wp_set_password($password, $user_id);
1946
+ $hash = wp_hash_password($password);
1947
+ }
1948
+
1949
+ /**
1950
+ * Filter whether the plaintext password matches the encrypted password.
1951
+ *
1952
+ * @since 2.5.0
1953
+ *
1954
+ * @param bool $check Whether the passwords match.
1955
+ * @param string $hash The hashed password.
1956
+ * @param int $user_id User ID.
1957
+ */
1958
+ return apply_filters( 'check_password', $check, $password, $hash, $user_id );
1959
+ }
1960
+
1961
+ // If the stored hash is longer than an MD5, presume the
1962
+ // new style phpass portable hash.
1963
+ if ( empty($wp_hasher) ) {
1964
+ require_once( ABSPATH . WPINC . '/class-phpass.php');
1965
+ // By default, use the portable hash from phpass
1966
+ $wp_hasher = new PasswordHash(8, true);
1967
+ }
1968
+
1969
+ $check = $wp_hasher->CheckPassword($password, $hash);
1970
+
1971
+ /** This filter is documented in wp-includes/pluggable.php */
1972
+ return apply_filters( 'check_password', $check, $password, $hash, $user_id );
1973
+ }
1974
+ endif;
1975
+
1976
+ if ( !function_exists('wp_generate_password') ) :
1977
+ /**
1978
+ * Generates a random password drawn from the defined set of characters.
1979
+ *
1980
+ * @since 2.5.0
1981
+ *
1982
+ * @param int $length The length of password to generate
1983
+ * @param bool $special_chars Whether to include standard special characters. Default true.
1984
+ * @param bool $extra_special_chars Whether to include other special characters. Used when
1985
+ * generating secret keys and salts. Default false.
1986
+ * @return string The random password
1987
+ **/
1988
+ function wp_generate_password( $length = 12, $special_chars = true, $extra_special_chars = false ) {
1989
+ $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
1990
+ if ( $special_chars )
1991
+ $chars .= '!@#$%^&*()';
1992
+ if ( $extra_special_chars )
1993
+ $chars .= '-_ []{}<>~`+=,.;:/?|';
1994
+
1995
+ $password = '';
1996
+ for ( $i = 0; $i < $length; $i++ ) {
1997
+ $password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1);
1998
+ }
1999
+
2000
+ /**
2001
+ * Filter the randomly-generated password.
2002
+ *
2003
+ * @since 3.0.0
2004
+ *
2005
+ * @param string $password The generated password.
2006
+ */
2007
+ return apply_filters( 'random_password', $password );
2008
+ }
2009
+ endif;
2010
+
2011
+ if ( !function_exists('wp_rand') ) :
2012
+ /**
2013
+ * Generates a random number
2014
+ *
2015
+ * @since 2.6.2
2016
+ *
2017
+ * @param int $min Lower limit for the generated number
2018
+ * @param int $max Upper limit for the generated number
2019
+ * @return int A random number between min and max
2020
+ */
2021
+ function wp_rand( $min = 0, $max = 0 ) {
2022
+ global $rnd_value;
2023
+
2024
+ // Reset $rnd_value after 14 uses
2025
+ // 32(md5) + 40(sha1) + 40(sha1) / 8 = 14 random numbers from $rnd_value
2026
+ if ( strlen($rnd_value) < 8 ) {
2027
+ if ( defined( 'WP_SETUP_CONFIG' ) )
2028
+ static $seed = '';
2029
+ else
2030
+ $seed = get_transient('random_seed');
2031
+ $rnd_value = md5( uniqid(microtime() . mt_rand(), true ) . $seed );
2032
+ $rnd_value .= sha1($rnd_value);
2033
+ $rnd_value .= sha1($rnd_value . $seed);
2034
+ $seed = md5($seed . $rnd_value);
2035
+ if ( ! defined( 'WP_SETUP_CONFIG' ) )
2036
+ set_transient('random_seed', $seed);
2037
+ }
2038
+
2039
+ // Take the first 8 digits for our value
2040
+ $value = substr($rnd_value, 0, 8);
2041
+
2042
+ // Strip the first eight, leaving the remainder for the next call to wp_rand().
2043
+ $rnd_value = substr($rnd_value, 8);
2044
+
2045
+ $value = abs(hexdec($value));
2046
+
2047
+ // Some misconfigured 32bit environments (Entropy PHP, for example) truncate integers larger than PHP_INT_MAX to PHP_INT_MAX rather than overflowing them to floats.
2048
+ $max_random_number = 3000000000 === 2147483647 ? (float) "4294967295" : 4294967295; // 4294967295 = 0xffffffff
2049
+
2050
+ // Reduce the value to be within the min - max range
2051
+ if ( $max != 0 )
2052
+ $value = $min + ( $max - $min + 1 ) * $value / ( $max_random_number + 1 );
2053
+
2054
+ return abs(intval($value));
2055
+ }
2056
+ endif;
2057
+
2058
+ if ( !function_exists('wp_set_password') ) :
2059
+ /**
2060
+ * Updates the user's password with a new encrypted one.
2061
+ *
2062
+ * For integration with other applications, this function can be overwritten to
2063
+ * instead use the other package password checking algorithm.
2064
+ *
2065
+ * Please note: This function should be used sparingly and is really only meant for single-time
2066
+ * application. Leveraging this improperly in a plugin or theme could result in an endless loop
2067
+ * of password resets if precautions are not taken to ensure it does not execute on every page load.
2068
+ *
2069
+ * @since 2.5.0
2070
+ *
2071
+ * @uses $wpdb WordPress database object for queries
2072
+ * @uses wp_hash_password() Used to encrypt the user's password before passing to the database
2073
+ *
2074
+ * @param string $password The plaintext new user password
2075
+ * @param int $user_id User ID
2076
+ */
2077
+ function wp_set_password( $password, $user_id ) {
2078
+ global $wpdb;
2079
+
2080
+ $hash = wp_hash_password( $password );
2081
+ $wpdb->update($wpdb->users, array('user_pass' => $hash, 'user_activation_key' => ''), array('ID' => $user_id) );
2082
+
2083
+ wp_cache_delete($user_id, 'users');
2084
+ }
2085
+ endif;
2086
+
2087
+ if ( !function_exists( 'get_avatar' ) ) :
2088
+ /**
2089
+ * Retrieve the avatar for a user who provided a user ID or email address.
2090
+ *
2091
+ * @since 2.5.0
2092
+ *
2093
+ * @param int|string|object $id_or_email A user ID, email address, or comment object
2094
+ * @param int $size Size of the avatar image
2095
+ * @param string $default URL to a default image to use if no avatar is available
2096
+ * @param string $alt Alternative text to use in image tag. Defaults to blank
2097
+ * @return string <img> tag for the user's avatar
2098
+ */
2099
+ function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
2100
+ if ( ! get_option('show_avatars') )
2101
+ return false;
2102
+
2103
+ if ( false === $alt)
2104
+ $safe_alt = '';
2105
+ else
2106
+ $safe_alt = esc_attr( $alt );
2107
+
2108
+ if ( !is_numeric($size) )
2109
+ $size = '96';
2110
+
2111
+ $email = '';
2112
+ if ( is_numeric($id_or_email) ) {
2113
+ $id = (int) $id_or_email;
2114
+ $user = get_userdata($id);
2115
+ if ( $user )
2116
+ $email = $user->user_email;
2117
+ } elseif ( is_object($id_or_email) ) {
2118
+ // No avatar for pingbacks or trackbacks
2119
+
2120
+ /**
2121
+ * Filter the list of allowed comment types for retrieving avatars.
2122
+ *
2123
+ * @since 3.0.0
2124
+ *
2125
+ * @param array $types An array of content types. Default only contains 'comment'.
2126
+ */
2127
+ $allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) );
2128
+ if ( ! empty( $id_or_email->comment_type ) && ! in_array( $id_or_email->comment_type, (array) $allowed_comment_types ) )
2129
+ return false;
2130
+
2131
+ if ( ! empty( $id_or_email->user_id ) ) {
2132
+ $id = (int) $id_or_email->user_id;
2133
+ $user = get_userdata($id);
2134
+ if ( $user )
2135
+ $email = $user->user_email;
2136
+ }
2137
+
2138
+ if ( ! $email && ! empty( $id_or_email->comment_author_email ) )
2139
+ $email = $id_or_email->comment_author_email;
2140
+ } else {
2141
+ $email = $id_or_email;
2142
+ }
2143
+
2144
+ if ( empty($default) ) {
2145
+ $avatar_default = get_option('avatar_default');
2146
+ if ( empty($avatar_default) )
2147
+ $default = 'mystery';
2148
+ else
2149
+ $default = $avatar_default;
2150
+ }
2151
+
2152
+ if ( !empty($email) )
2153
+ $email_hash = md5( strtolower( trim( $email ) ) );
2154
+
2155
+ if ( is_ssl() ) {
2156
+ $host = 'https://secure.gravatar.com';
2157
+ } else {
2158
+ if ( !empty($email) )
2159
+ $host = sprintf( "http://%d.gravatar.com", ( hexdec( $email_hash[0] ) % 2 ) );
2160
+ else
2161
+ $host = 'http://0.gravatar.com';
2162
+ }
2163
+
2164
+ if ( 'mystery' == $default )
2165
+ $default = "$host/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
2166
+ elseif ( 'blank' == $default )
2167
+ $default = $email ? 'blank' : includes_url( 'images/blank.gif' );
2168
+ elseif ( !empty($email) && 'gravatar_default' == $default )
2169
+ $default = '';
2170
+ elseif ( 'gravatar_default' == $default )
2171
+ $default = "$host/avatar/?s={$size}";
2172
+ elseif ( empty($email) )
2173
+ $default = "$host/avatar/?d=$default&amp;s={$size}";
2174
+ elseif ( strpos($default, 'http://') === 0 )
2175
+ $default = add_query_arg( 's', $size, $default );
2176
+
2177
+ if ( !empty($email) ) {
2178
+ $out = "$host/avatar/";
2179
+ $out .= $email_hash;
2180
+ $out .= '?s='.$size;
2181
+ $out .= '&amp;d=' . urlencode( $default );
2182
+
2183
+ $rating = get_option('avatar_rating');
2184
+ if ( !empty( $rating ) )
2185
+ $out .= "&amp;r={$rating}";
2186
+
2187
+ $out = str_replace( '&#038;', '&amp;', esc_url( $out ) );
2188
+ $avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
2189
+ } else {
2190
+ $out = esc_url( $default );
2191
+ $avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
2192
+ }
2193
+
2194
+ /**
2195
+ * Filter the avatar to retrieve.
2196
+ *
2197
+ * @since 2.5.0
2198
+ *
2199
+ * @param string $avatar Image tag for the user's avatar.
2200
+ * @param int|object|string $id_or_email A user ID, email address, or comment object.
2201
+ * @param int $size Square avatar width and height in pixels to retrieve.
2202
+ * @param string $alt Alternative text to use in the avatar image tag.
2203
+ * Default empty.
2204
+ */
2205
+ return apply_filters( 'get_avatar', $avatar, $id_or_email, $size, $default, $alt );
2206
+ }
2207
+ endif;
2208
+
2209
+ if ( !function_exists( 'wp_text_diff' ) ) :
2210
+ /**
2211
+ * Displays a human readable HTML representation of the difference between two strings.
2212
+ *
2213
+ * The Diff is available for getting the changes between versions. The output is
2214
+ * HTML, so the primary use is for displaying the changes. If the two strings
2215
+ * are equivalent, then an empty string will be returned.
2216
+ *
2217
+ * The arguments supported and can be changed are listed below.
2218
+ *
2219
+ * 'title' : Default is an empty string. Titles the diff in a manner compatible
2220
+ * with the output.
2221
+ * 'title_left' : Default is an empty string. Change the HTML to the left of the
2222
+ * title.
2223
+ * 'title_right' : Default is an empty string. Change the HTML to the right of
2224
+ * the title.
2225
+ *
2226
+ * @since 2.6.0
2227
+ *
2228
+ * @see wp_parse_args() Used to change defaults to user defined settings.
2229
+ * @uses Text_Diff
2230
+ * @uses WP_Text_Diff_Renderer_Table
2231
+ *
2232
+ * @param string $left_string "old" (left) version of string
2233
+ * @param string $right_string "new" (right) version of string
2234
+ * @param string|array $args Optional. Change 'title', 'title_left', and 'title_right' defaults.
2235
+ * @return string Empty string if strings are equivalent or HTML with differences.
2236
+ */
2237
+ function wp_text_diff( $left_string, $right_string, $args = null ) {
2238
+ $defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' );
2239
+ $args = wp_parse_args( $args, $defaults );
2240
+
2241
+ if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) )
2242
+ require( ABSPATH . WPINC . '/wp-diff.php' );
2243
+
2244
+ $left_string = normalize_whitespace($left_string);
2245
+ $right_string = normalize_whitespace($right_string);
2246
+
2247
+ $left_lines = explode("\n", $left_string);
2248
+ $right_lines = explode("\n", $right_string);
2249
+ $text_diff = new Text_Diff($left_lines, $right_lines);
2250
+ $renderer = new WP_Text_Diff_Renderer_Table( $args );
2251
+ $diff = $renderer->render($text_diff);
2252
+
2253
+ if ( !$diff )
2254
+ return '';
2255
+
2256
+ $r = "<table class='diff'>\n";
2257
+
2258
+ if ( ! empty( $args[ 'show_split_view' ] ) ) {
2259
+ $r .= "<col class='content diffsplit left' /><col class='content diffsplit middle' /><col class='content diffsplit right' />";
2260
+ } else {
2261
+ $r .= "<col class='content' />";
2262
+ }
2263
+
2264
+ if ( $args['title'] || $args['title_left'] || $args['title_right'] )
2265
+ $r .= "<thead>";
2266
+ if ( $args['title'] )
2267
+ $r .= "<tr class='diff-title'><th colspan='4'>$args[title]</th></tr>\n";
2268
+ if ( $args['title_left'] || $args['title_right'] ) {
2269
+ $r .= "<tr class='diff-sub-title'>\n";
2270
+ $r .= "\t<td></td><th>$args[title_left]</th>\n";
2271
+ $r .= "\t<td></td><th>$args[title_right]</th>\n";
2272
+ $r .= "</tr>\n";
2273
+ }
2274
+ if ( $args['title'] || $args['title_left'] || $args['title_right'] )
2275
+ $r .= "</thead>\n";
2276
+
2277
+ $r .= "<tbody>\n$diff\n</tbody>\n";
2278
+ $r .= "</table>";
2279
+
2280
+ return $r;
2281
+ }
2282
+ endif;
2283
+