stump-cli 0.1.3 → 1.0.0

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 (1243) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/README.md +9 -5
  4. data/bin/stump-cli +77 -27
  5. data/lib/{wp/.gitignore → .gitignore.erb} +2 -2
  6. data/lib/stump-cli/version.rb +1 -1
  7. data/lib/style.erb +11 -0
  8. data/stump-cli.gemspec +2 -0
  9. metadata +56 -1268
  10. data/lib/wp/Movefile-example +0 -62
  11. data/lib/wp/README.md +0 -25
  12. data/lib/wp/index.php +0 -17
  13. data/lib/wp/license.txt +0 -385
  14. data/lib/wp/readme.html +0 -96
  15. data/lib/wp/wp-activate.php +0 -131
  16. data/lib/wp/wp-admin/about.php +0 -193
  17. data/lib/wp/wp-admin/admin-ajax.php +0 -98
  18. data/lib/wp/wp-admin/admin-footer.php +0 -99
  19. data/lib/wp/wp-admin/admin-functions.php +0 -15
  20. data/lib/wp/wp-admin/admin-header.php +0 -243
  21. data/lib/wp/wp-admin/admin-post.php +0 -71
  22. data/lib/wp/wp-admin/admin.php +0 -347
  23. data/lib/wp/wp-admin/async-upload.php +0 -114
  24. data/lib/wp/wp-admin/comment.php +0 -299
  25. data/lib/wp/wp-admin/credits.php +0 -192
  26. data/lib/wp/wp-admin/css/about-rtl.css +0 -446
  27. data/lib/wp/wp-admin/css/about.css +0 -446
  28. data/lib/wp/wp-admin/css/admin-menu-rtl.css +0 -917
  29. data/lib/wp/wp-admin/css/admin-menu.css +0 -917
  30. data/lib/wp/wp-admin/css/color-picker-rtl.css +0 -127
  31. data/lib/wp/wp-admin/css/color-picker-rtl.min.css +0 -1
  32. data/lib/wp/wp-admin/css/color-picker.css +0 -127
  33. data/lib/wp/wp-admin/css/color-picker.min.css +0 -1
  34. data/lib/wp/wp-admin/css/colors/_admin.scss +0 -525
  35. data/lib/wp/wp-admin/css/colors/_mixins.scss +0 -43
  36. data/lib/wp/wp-admin/css/colors/_variables.scss +0 -58
  37. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.css +0 -341
  38. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.min.css +0 -1
  39. data/lib/wp/wp-admin/css/colors/blue/colors.css +0 -341
  40. data/lib/wp/wp-admin/css/colors/blue/colors.min.css +0 -1
  41. data/lib/wp/wp-admin/css/colors/blue/colors.scss +0 -11
  42. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.css +0 -341
  43. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.min.css +0 -1
  44. data/lib/wp/wp-admin/css/colors/coffee/colors.css +0 -341
  45. data/lib/wp/wp-admin/css/colors/coffee/colors.min.css +0 -1
  46. data/lib/wp/wp-admin/css/colors/coffee/colors.scss +0 -7
  47. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.css +0 -341
  48. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.min.css +0 -1
  49. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.css +0 -341
  50. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.min.css +0 -1
  51. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.scss +0 -8
  52. data/lib/wp/wp-admin/css/colors/light/colors-rtl.css +0 -349
  53. data/lib/wp/wp-admin/css/colors/light/colors-rtl.min.css +0 -1
  54. data/lib/wp/wp-admin/css/colors/light/colors.css +0 -349
  55. data/lib/wp/wp-admin/css/colors/light/colors.min.css +0 -1
  56. data/lib/wp/wp-admin/css/colors/light/colors.scss +0 -38
  57. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.css +0 -341
  58. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.min.css +0 -1
  59. data/lib/wp/wp-admin/css/colors/midnight/colors.css +0 -341
  60. data/lib/wp/wp-admin/css/colors/midnight/colors.min.css +0 -1
  61. data/lib/wp/wp-admin/css/colors/midnight/colors.scss +0 -5
  62. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.css +0 -341
  63. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.min.css +0 -1
  64. data/lib/wp/wp-admin/css/colors/ocean/colors.css +0 -341
  65. data/lib/wp/wp-admin/css/colors/ocean/colors.min.css +0 -1
  66. data/lib/wp/wp-admin/css/colors/ocean/colors.scss +0 -8
  67. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.css +0 -341
  68. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.min.css +0 -1
  69. data/lib/wp/wp-admin/css/colors/sunrise/colors.css +0 -341
  70. data/lib/wp/wp-admin/css/colors/sunrise/colors.min.css +0 -1
  71. data/lib/wp/wp-admin/css/colors/sunrise/colors.scss +0 -6
  72. data/lib/wp/wp-admin/css/common-rtl.css +0 -3212
  73. data/lib/wp/wp-admin/css/common.css +0 -3212
  74. data/lib/wp/wp-admin/css/customize-controls-rtl.css +0 -889
  75. data/lib/wp/wp-admin/css/customize-controls-rtl.min.css +0 -1
  76. data/lib/wp/wp-admin/css/customize-controls.css +0 -889
  77. data/lib/wp/wp-admin/css/customize-controls.min.css +0 -1
  78. data/lib/wp/wp-admin/css/customize-widgets-rtl.css +0 -603
  79. data/lib/wp/wp-admin/css/customize-widgets-rtl.min.css +0 -1
  80. data/lib/wp/wp-admin/css/customize-widgets.css +0 -603
  81. data/lib/wp/wp-admin/css/customize-widgets.min.css +0 -1
  82. data/lib/wp/wp-admin/css/dashboard-rtl.css +0 -1116
  83. data/lib/wp/wp-admin/css/dashboard.css +0 -1116
  84. data/lib/wp/wp-admin/css/deprecated-media-rtl.css +0 -371
  85. data/lib/wp/wp-admin/css/deprecated-media-rtl.min.css +0 -1
  86. data/lib/wp/wp-admin/css/deprecated-media.css +0 -371
  87. data/lib/wp/wp-admin/css/deprecated-media.min.css +0 -1
  88. data/lib/wp/wp-admin/css/edit-rtl.css +0 -1501
  89. data/lib/wp/wp-admin/css/edit.css +0 -1501
  90. data/lib/wp/wp-admin/css/farbtastic-rtl.css +0 -41
  91. data/lib/wp/wp-admin/css/farbtastic.css +0 -41
  92. data/lib/wp/wp-admin/css/forms-rtl.css +0 -992
  93. data/lib/wp/wp-admin/css/forms.css +0 -992
  94. data/lib/wp/wp-admin/css/ie-rtl.css +0 -785
  95. data/lib/wp/wp-admin/css/ie-rtl.min.css +0 -1
  96. data/lib/wp/wp-admin/css/ie.css +0 -785
  97. data/lib/wp/wp-admin/css/ie.min.css +0 -1
  98. data/lib/wp/wp-admin/css/install-rtl.css +0 -389
  99. data/lib/wp/wp-admin/css/install-rtl.min.css +0 -1
  100. data/lib/wp/wp-admin/css/install.css +0 -389
  101. data/lib/wp/wp-admin/css/install.min.css +0 -1
  102. data/lib/wp/wp-admin/css/l10n-rtl.css +0 -101
  103. data/lib/wp/wp-admin/css/l10n.css +0 -101
  104. data/lib/wp/wp-admin/css/list-tables-rtl.css +0 -1875
  105. data/lib/wp/wp-admin/css/list-tables.css +0 -1875
  106. data/lib/wp/wp-admin/css/login-rtl.css +0 -269
  107. data/lib/wp/wp-admin/css/login-rtl.min.css +0 -1
  108. data/lib/wp/wp-admin/css/login.css +0 -269
  109. data/lib/wp/wp-admin/css/login.min.css +0 -1
  110. data/lib/wp/wp-admin/css/media-rtl.css +0 -1196
  111. data/lib/wp/wp-admin/css/media.css +0 -1196
  112. data/lib/wp/wp-admin/css/nav-menus-rtl.css +0 -857
  113. data/lib/wp/wp-admin/css/nav-menus.css +0 -857
  114. data/lib/wp/wp-admin/css/press-this-rtl.css +0 -458
  115. data/lib/wp/wp-admin/css/press-this.css +0 -458
  116. data/lib/wp/wp-admin/css/revisions-rtl.css +0 -574
  117. data/lib/wp/wp-admin/css/revisions.css +0 -574
  118. data/lib/wp/wp-admin/css/themes-rtl.css +0 -1732
  119. data/lib/wp/wp-admin/css/themes.css +0 -1732
  120. data/lib/wp/wp-admin/css/widgets-rtl.css +0 -577
  121. data/lib/wp/wp-admin/css/widgets.css +0 -577
  122. data/lib/wp/wp-admin/css/wp-admin-rtl.css +0 -14
  123. data/lib/wp/wp-admin/css/wp-admin-rtl.min.css +0 -1
  124. data/lib/wp/wp-admin/css/wp-admin.css +0 -14
  125. data/lib/wp/wp-admin/css/wp-admin.min.css +0 -1
  126. data/lib/wp/wp-admin/custom-background.php +0 -482
  127. data/lib/wp/wp-admin/custom-header.php +0 -1366
  128. data/lib/wp/wp-admin/customize.php +0 -278
  129. data/lib/wp/wp-admin/edit-comments.php +0 -254
  130. data/lib/wp/wp-admin/edit-form-advanced.php +0 -636
  131. data/lib/wp/wp-admin/edit-form-comment.php +0 -160
  132. data/lib/wp/wp-admin/edit-link-form.php +0 -150
  133. data/lib/wp/wp-admin/edit-tag-form.php +0 -204
  134. data/lib/wp/wp-admin/edit-tags.php +0 -591
  135. data/lib/wp/wp-admin/edit.php +0 -330
  136. data/lib/wp/wp-admin/export.php +0 -243
  137. data/lib/wp/wp-admin/freedoms.php +0 -57
  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 +0 -1
  196. data/lib/wp/wp-admin/images/wordpress-logo.png +0 -0
  197. data/lib/wp/wp-admin/images/wordpress-logo.svg +0 -1
  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 +0 -132
  204. data/lib/wp/wp-admin/includes/admin.php +0 -74
  205. data/lib/wp/wp-admin/includes/ajax-actions.php +0 -2762
  206. data/lib/wp/wp-admin/includes/bookmark.php +0 -305
  207. data/lib/wp/wp-admin/includes/class-ftp-pure.php +0 -190
  208. data/lib/wp/wp-admin/includes/class-ftp-sockets.php +0 -250
  209. data/lib/wp/wp-admin/includes/class-ftp.php +0 -907
  210. data/lib/wp/wp-admin/includes/class-pclzip.php +0 -5687
  211. data/lib/wp/wp-admin/includes/class-wp-comments-list-table.php +0 -637
  212. data/lib/wp/wp-admin/includes/class-wp-filesystem-base.php +0 -815
  213. data/lib/wp/wp-admin/includes/class-wp-filesystem-direct.php +0 -384
  214. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpext.php +0 -415
  215. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpsockets.php +0 -352
  216. data/lib/wp/wp-admin/includes/class-wp-filesystem-ssh2.php +0 -392
  217. data/lib/wp/wp-admin/includes/class-wp-importer.php +0 -302
  218. data/lib/wp/wp-admin/includes/class-wp-links-list-table.php +0 -207
  219. data/lib/wp/wp-admin/includes/class-wp-list-table.php +0 -1080
  220. data/lib/wp/wp-admin/includes/class-wp-media-list-table.php +0 -574
  221. data/lib/wp/wp-admin/includes/class-wp-ms-sites-list-table.php +0 -402
  222. data/lib/wp/wp-admin/includes/class-wp-ms-themes-list-table.php +0 -459
  223. data/lib/wp/wp-admin/includes/class-wp-ms-users-list-table.php +0 -303
  224. data/lib/wp/wp-admin/includes/class-wp-plugin-install-list-table.php +0 -490
  225. data/lib/wp/wp-admin/includes/class-wp-plugins-list-table.php +0 -605
  226. data/lib/wp/wp-admin/includes/class-wp-posts-list-table.php +0 -1306
  227. data/lib/wp/wp-admin/includes/class-wp-terms-list-table.php +0 -466
  228. data/lib/wp/wp-admin/includes/class-wp-theme-install-list-table.php +0 -431
  229. data/lib/wp/wp-admin/includes/class-wp-themes-list-table.php +0 -279
  230. data/lib/wp/wp-admin/includes/class-wp-upgrader-skins.php +0 -767
  231. data/lib/wp/wp-admin/includes/class-wp-upgrader.php +0 -2676
  232. data/lib/wp/wp-admin/includes/class-wp-users-list-table.php +0 -459
  233. data/lib/wp/wp-admin/includes/comment.php +0 -171
  234. data/lib/wp/wp-admin/includes/continents-cities.php +0 -493
  235. data/lib/wp/wp-admin/includes/dashboard.php +0 -1333
  236. data/lib/wp/wp-admin/includes/deprecated.php +0 -1190
  237. data/lib/wp/wp-admin/includes/export.php +0 -508
  238. data/lib/wp/wp-admin/includes/file.php +0 -1152
  239. data/lib/wp/wp-admin/includes/image-edit.php +0 -828
  240. data/lib/wp/wp-admin/includes/image.php +0 -598
  241. data/lib/wp/wp-admin/includes/import.php +0 -206
  242. data/lib/wp/wp-admin/includes/list-table.php +0 -113
  243. data/lib/wp/wp-admin/includes/media.php +0 -3012
  244. data/lib/wp/wp-admin/includes/menu.php +0 -322
  245. data/lib/wp/wp-admin/includes/meta-boxes.php +0 -1119
  246. data/lib/wp/wp-admin/includes/misc.php +0 -845
  247. data/lib/wp/wp-admin/includes/ms-deprecated.php +0 -78
  248. data/lib/wp/wp-admin/includes/ms.php +0 -814
  249. data/lib/wp/wp-admin/includes/nav-menu.php +0 -1328
  250. data/lib/wp/wp-admin/includes/plugin-install.php +0 -550
  251. data/lib/wp/wp-admin/includes/plugin.php +0 -1899
  252. data/lib/wp/wp-admin/includes/post.php +0 -1661
  253. data/lib/wp/wp-admin/includes/revision.php +0 -228
  254. data/lib/wp/wp-admin/includes/schema.php +0 -1038
  255. data/lib/wp/wp-admin/includes/screen.php +0 -1179
  256. data/lib/wp/wp-admin/includes/taxonomy.php +0 -284
  257. data/lib/wp/wp-admin/includes/template.php +0 -2157
  258. data/lib/wp/wp-admin/includes/theme-install.php +0 -205
  259. data/lib/wp/wp-admin/includes/theme.php +0 -474
  260. data/lib/wp/wp-admin/includes/translation-install.php +0 -240
  261. data/lib/wp/wp-admin/includes/update-core.php +0 -1186
  262. data/lib/wp/wp-admin/includes/update.php +0 -432
  263. data/lib/wp/wp-admin/includes/upgrade.php +0 -2218
  264. data/lib/wp/wp-admin/includes/user.php +0 -442
  265. data/lib/wp/wp-admin/includes/widgets.php +0 -245
  266. data/lib/wp/wp-admin/index.php +0 -131
  267. data/lib/wp/wp-admin/install-helper.php +0 -199
  268. data/lib/wp/wp-admin/install.php +0 -305
  269. data/lib/wp/wp-admin/js/accordion.js +0 -143
  270. data/lib/wp/wp-admin/js/accordion.min.js +0 -1
  271. data/lib/wp/wp-admin/js/color-picker.js +0 -155
  272. data/lib/wp/wp-admin/js/color-picker.min.js +0 -1
  273. data/lib/wp/wp-admin/js/comment.js +0 -50
  274. data/lib/wp/wp-admin/js/comment.min.js +0 -1
  275. data/lib/wp/wp-admin/js/common.js +0 -804
  276. data/lib/wp/wp-admin/js/common.min.js +0 -1
  277. data/lib/wp/wp-admin/js/custom-background.js +0 -75
  278. data/lib/wp/wp-admin/js/custom-background.min.js +0 -1
  279. data/lib/wp/wp-admin/js/custom-header.js +0 -61
  280. data/lib/wp/wp-admin/js/customize-controls.js +0 -1305
  281. data/lib/wp/wp-admin/js/customize-controls.min.js +0 -1
  282. data/lib/wp/wp-admin/js/customize-widgets.js +0 -1882
  283. data/lib/wp/wp-admin/js/customize-widgets.min.js +0 -1
  284. data/lib/wp/wp-admin/js/dashboard.js +0 -190
  285. data/lib/wp/wp-admin/js/dashboard.min.js +0 -1
  286. data/lib/wp/wp-admin/js/edit-comments.js +0 -625
  287. data/lib/wp/wp-admin/js/edit-comments.min.js +0 -1
  288. data/lib/wp/wp-admin/js/editor-expand.js +0 -705
  289. data/lib/wp/wp-admin/js/editor-expand.min.js +0 -1
  290. data/lib/wp/wp-admin/js/editor.js +0 -324
  291. data/lib/wp/wp-admin/js/editor.min.js +0 -1
  292. data/lib/wp/wp-admin/js/farbtastic.js +0 -276
  293. data/lib/wp/wp-admin/js/gallery.js +0 -237
  294. data/lib/wp/wp-admin/js/gallery.min.js +0 -1
  295. data/lib/wp/wp-admin/js/image-edit.js +0 -633
  296. data/lib/wp/wp-admin/js/image-edit.min.js +0 -1
  297. data/lib/wp/wp-admin/js/inline-edit-post.js +0 -359
  298. data/lib/wp/wp-admin/js/inline-edit-post.min.js +0 -1
  299. data/lib/wp/wp-admin/js/inline-edit-tax.js +0 -142
  300. data/lib/wp/wp-admin/js/inline-edit-tax.min.js +0 -1
  301. data/lib/wp/wp-admin/js/iris.min.js +0 -4
  302. data/lib/wp/wp-admin/js/language-chooser.js +0 -26
  303. data/lib/wp/wp-admin/js/language-chooser.min.js +0 -1
  304. data/lib/wp/wp-admin/js/link.js +0 -69
  305. data/lib/wp/wp-admin/js/link.min.js +0 -1
  306. data/lib/wp/wp-admin/js/media-gallery.js +0 -26
  307. data/lib/wp/wp-admin/js/media-gallery.min.js +0 -1
  308. data/lib/wp/wp-admin/js/media-upload.js +0 -69
  309. data/lib/wp/wp-admin/js/media-upload.min.js +0 -1
  310. data/lib/wp/wp-admin/js/media.js +0 -111
  311. data/lib/wp/wp-admin/js/media.min.js +0 -1
  312. data/lib/wp/wp-admin/js/nav-menu.js +0 -1205
  313. data/lib/wp/wp-admin/js/nav-menu.min.js +0 -1
  314. data/lib/wp/wp-admin/js/password-strength-meter.js +0 -75
  315. data/lib/wp/wp-admin/js/password-strength-meter.min.js +0 -1
  316. data/lib/wp/wp-admin/js/plugin-install.js +0 -76
  317. data/lib/wp/wp-admin/js/plugin-install.min.js +0 -1
  318. data/lib/wp/wp-admin/js/post.js +0 -1094
  319. data/lib/wp/wp-admin/js/post.min.js +0 -1
  320. data/lib/wp/wp-admin/js/postbox.js +0 -199
  321. data/lib/wp/wp-admin/js/postbox.min.js +0 -1
  322. data/lib/wp/wp-admin/js/revisions.js +0 -1110
  323. data/lib/wp/wp-admin/js/revisions.min.js +0 -1
  324. data/lib/wp/wp-admin/js/set-post-thumbnail.js +0 -24
  325. data/lib/wp/wp-admin/js/set-post-thumbnail.min.js +0 -1
  326. data/lib/wp/wp-admin/js/svg-painter.js +0 -240
  327. data/lib/wp/wp-admin/js/svg-painter.min.js +0 -1
  328. data/lib/wp/wp-admin/js/tags.js +0 -72
  329. data/lib/wp/wp-admin/js/tags.min.js +0 -1
  330. data/lib/wp/wp-admin/js/theme.js +0 -1691
  331. data/lib/wp/wp-admin/js/theme.min.js +0 -1
  332. data/lib/wp/wp-admin/js/updates.js +0 -65
  333. data/lib/wp/wp-admin/js/updates.min.js +0 -1
  334. data/lib/wp/wp-admin/js/user-profile.js +0 -127
  335. data/lib/wp/wp-admin/js/user-profile.min.js +0 -1
  336. data/lib/wp/wp-admin/js/user-suggest.js +0 -30
  337. data/lib/wp/wp-admin/js/user-suggest.min.js +0 -1
  338. data/lib/wp/wp-admin/js/widgets.js +0 -494
  339. data/lib/wp/wp-admin/js/widgets.min.js +0 -1
  340. data/lib/wp/wp-admin/js/word-count.js +0 -44
  341. data/lib/wp/wp-admin/js/word-count.min.js +0 -1
  342. data/lib/wp/wp-admin/js/wp-fullscreen.js +0 -704
  343. data/lib/wp/wp-admin/js/wp-fullscreen.min.js +0 -1
  344. data/lib/wp/wp-admin/js/xfn.js +0 -17
  345. data/lib/wp/wp-admin/js/xfn.min.js +0 -1
  346. data/lib/wp/wp-admin/link-add.php +0 -29
  347. data/lib/wp/wp-admin/link-manager.php +0 -99
  348. data/lib/wp/wp-admin/link-parse-opml.php +0 -84
  349. data/lib/wp/wp-admin/link.php +0 -117
  350. data/lib/wp/wp-admin/load-scripts.php +0 -162
  351. data/lib/wp/wp-admin/load-styles.php +0 -153
  352. data/lib/wp/wp-admin/maint/repair.php +0 -124
  353. data/lib/wp/wp-admin/media-new.php +0 -84
  354. data/lib/wp/wp-admin/media-upload.php +0 -100
  355. data/lib/wp/wp-admin/media.php +0 -146
  356. data/lib/wp/wp-admin/menu-header.php +0 -227
  357. data/lib/wp/wp-admin/menu.php +0 -255
  358. data/lib/wp/wp-admin/moderation.php +0 -12
  359. data/lib/wp/wp-admin/ms-admin.php +0 -13
  360. data/lib/wp/wp-admin/ms-delete-site.php +0 -91
  361. data/lib/wp/wp-admin/ms-edit.php +0 -13
  362. data/lib/wp/wp-admin/ms-options.php +0 -12
  363. data/lib/wp/wp-admin/ms-sites.php +0 -13
  364. data/lib/wp/wp-admin/ms-themes.php +0 -13
  365. data/lib/wp/wp-admin/ms-upgrade-network.php +0 -13
  366. data/lib/wp/wp-admin/ms-users.php +0 -13
  367. data/lib/wp/wp-admin/my-sites.php +0 -145
  368. data/lib/wp/wp-admin/nav-menus.php +0 -798
  369. data/lib/wp/wp-admin/network.php +0 -561
  370. data/lib/wp/wp-admin/network/about.php +0 -16
  371. data/lib/wp/wp-admin/network/admin.php +0 -32
  372. data/lib/wp/wp-admin/network/credits.php +0 -16
  373. data/lib/wp/wp-admin/network/edit.php +0 -42
  374. data/lib/wp/wp-admin/network/freedoms.php +0 -16
  375. data/lib/wp/wp-admin/network/index.php +0 -79
  376. data/lib/wp/wp-admin/network/menu.php +0 -63
  377. data/lib/wp/wp-admin/network/plugin-editor.php +0 -16
  378. data/lib/wp/wp-admin/network/plugin-install.php +0 -19
  379. data/lib/wp/wp-admin/network/plugins.php +0 -16
  380. data/lib/wp/wp-admin/network/profile.php +0 -16
  381. data/lib/wp/wp-admin/network/settings.php +0 -347
  382. data/lib/wp/wp-admin/network/setup.php +0 -16
  383. data/lib/wp/wp-admin/network/site-info.php +0 -178
  384. data/lib/wp/wp-admin/network/site-new.php +0 -153
  385. data/lib/wp/wp-admin/network/site-settings.php +0 -173
  386. data/lib/wp/wp-admin/network/site-themes.php +0 -185
  387. data/lib/wp/wp-admin/network/site-users.php +0 -319
  388. data/lib/wp/wp-admin/network/sites.php +0 -275
  389. data/lib/wp/wp-admin/network/theme-editor.php +0 -16
  390. data/lib/wp/wp-admin/network/theme-install.php +0 -19
  391. data/lib/wp/wp-admin/network/themes.php +0 -291
  392. data/lib/wp/wp-admin/network/update-core.php +0 -16
  393. data/lib/wp/wp-admin/network/update.php +0 -19
  394. data/lib/wp/wp-admin/network/upgrade.php +0 -120
  395. data/lib/wp/wp-admin/network/user-edit.php +0 -16
  396. data/lib/wp/wp-admin/network/user-new.php +0 -106
  397. data/lib/wp/wp-admin/network/users.php +0 -296
  398. data/lib/wp/wp-admin/options-discussion.php +0 -273
  399. data/lib/wp/wp-admin/options-general.php +0 -355
  400. data/lib/wp/wp-admin/options-head.php +0 -18
  401. data/lib/wp/wp-admin/options-media.php +0 -136
  402. data/lib/wp/wp-admin/options-permalink.php +0 -289
  403. data/lib/wp/wp-admin/options-reading.php +0 -184
  404. data/lib/wp/wp-admin/options-writing.php +0 -194
  405. data/lib/wp/wp-admin/options.php +0 -265
  406. data/lib/wp/wp-admin/plugin-editor.php +0 -279
  407. data/lib/wp/wp-admin/plugin-install.php +0 -134
  408. data/lib/wp/wp-admin/plugins.php +0 -474
  409. data/lib/wp/wp-admin/post-new.php +0 -74
  410. data/lib/wp/wp-admin/post.php +0 -318
  411. data/lib/wp/wp-admin/press-this.php +0 -691
  412. data/lib/wp/wp-admin/profile.php +0 -18
  413. data/lib/wp/wp-admin/revision.php +0 -221
  414. data/lib/wp/wp-admin/setup-config.php +0 -345
  415. data/lib/wp/wp-admin/theme-editor.php +0 -243
  416. data/lib/wp/wp-admin/theme-install.php +0 -278
  417. data/lib/wp/wp-admin/themes.php +0 -374
  418. data/lib/wp/wp-admin/tools.php +0 -75
  419. data/lib/wp/wp-admin/update-core.php +0 -653
  420. data/lib/wp/wp-admin/update.php +0 -272
  421. data/lib/wp/wp-admin/upgrade-functions.php +0 -12
  422. data/lib/wp/wp-admin/upgrade.php +0 -116
  423. data/lib/wp/wp-admin/upload.php +0 -292
  424. data/lib/wp/wp-admin/user-edit.php +0 -557
  425. data/lib/wp/wp-admin/user-new.php +0 -439
  426. data/lib/wp/wp-admin/user/about.php +0 -13
  427. data/lib/wp/wp-admin/user/admin.php +0 -32
  428. data/lib/wp/wp-admin/user/credits.php +0 -13
  429. data/lib/wp/wp-admin/user/freedoms.php +0 -13
  430. data/lib/wp/wp-admin/user/index.php +0 -12
  431. data/lib/wp/wp-admin/user/menu.php +0 -22
  432. data/lib/wp/wp-admin/user/profile.php +0 -12
  433. data/lib/wp/wp-admin/user/user-edit.php +0 -12
  434. data/lib/wp/wp-admin/users.php +0 -460
  435. data/lib/wp/wp-admin/widgets.php +0 -442
  436. data/lib/wp/wp-blog-header.php +0 -18
  437. data/lib/wp/wp-comments-post.php +0 -164
  438. data/lib/wp/wp-config-sample.php +0 -80
  439. data/lib/wp/wp-content/index.php +0 -2
  440. data/lib/wp/wp-content/plugins/hello.php +0 -82
  441. data/lib/wp/wp-content/plugins/index.php +0 -2
  442. data/lib/wp/wp-content/themes/index.php +0 -2
  443. data/lib/wp/wp-content/themes/stump/.editorconfig +0 -11
  444. data/lib/wp/wp-content/themes/stump/.jshintrc +0 -16
  445. data/lib/wp/wp-content/themes/stump/404.php +0 -13
  446. data/lib/wp/wp-content/themes/stump/CHANGELOG.md +0 -333
  447. data/lib/wp/wp-content/themes/stump/CONTRIBUTING.md +0 -121
  448. data/lib/wp/wp-content/themes/stump/Gruntfile.js +0 -151
  449. data/lib/wp/wp-content/themes/stump/LICENSE.md +0 -19
  450. data/lib/wp/wp-content/themes/stump/assets/coffee/build/.gitkeep +0 -0
  451. data/lib/wp/wp-content/themes/stump/assets/css/editor-style.css +0 -548
  452. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  453. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.svg +0 -229
  454. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  455. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  456. data/lib/wp/wp-content/themes/stump/assets/img/.gitignore +0 -0
  457. data/lib/wp/wp-content/themes/stump/assets/js/_main.js +0 -63
  458. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/affix.js +0 -137
  459. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/alert.js +0 -88
  460. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/button.js +0 -107
  461. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/carousel.js +0 -205
  462. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/collapse.js +0 -170
  463. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/dropdown.js +0 -147
  464. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/modal.js +0 -243
  465. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/popover.js +0 -110
  466. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/scrollspy.js +0 -153
  467. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tab.js +0 -125
  468. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tooltip.js +0 -399
  469. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/transition.js +0 -48
  470. data/lib/wp/wp-content/themes/stump/assets/js/scripts.min.js +0 -1
  471. data/lib/wp/wp-content/themes/stump/assets/js/vendor/jquery-1.11.0.min.js +0 -4
  472. data/lib/wp/wp-content/themes/stump/assets/js/vendor/modernizr-2.7.0.min.js +0 -4
  473. data/lib/wp/wp-content/themes/stump/assets/sass/app.scss +0 -9
  474. data/lib/wp/wp-content/themes/stump/assets/sass/core/_variables.scss +0 -1
  475. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_alerts.scss +0 -67
  476. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_badges.scss +0 -55
  477. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_bootstrap.scss +0 -49
  478. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_breadcrumbs.scss +0 -26
  479. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_button-groups.scss +0 -226
  480. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_buttons.scss +0 -159
  481. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_carousel.scss +0 -232
  482. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_close.scss +0 -35
  483. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_code.scss +0 -63
  484. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_component-animations.scss +0 -29
  485. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_dropdowns.scss +0 -213
  486. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_forms.scss +0 -436
  487. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_glyphicons.scss +0 -233
  488. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_grid.scss +0 -84
  489. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_input-groups.scss +0 -162
  490. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_jumbotron.scss +0 -44
  491. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_labels.scss +0 -64
  492. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_list-group.scss +0 -110
  493. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_media.scss +0 -56
  494. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_mixins.scss +0 -947
  495. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_modals.scss +0 -139
  496. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navbar.scss +0 -620
  497. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navs.scss +0 -242
  498. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_normalize.scss +0 -423
  499. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pager.scss +0 -55
  500. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pagination.scss +0 -88
  501. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_panels.scss +0 -241
  502. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_popovers.scss +0 -133
  503. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_print.scss +0 -101
  504. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_progress-bars.scss +0 -80
  505. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_responsive-utilities.scss +0 -74
  506. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_scaffolding.scss +0 -134
  507. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tables.scss +0 -233
  508. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_theme.scss +0 -247
  509. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_thumbnails.scss +0 -38
  510. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tooltip.scss +0 -95
  511. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_type.scss +0 -284
  512. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_utilities.scss +0 -56
  513. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_variables.scss +0 -833
  514. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_wells.scss +0 -29
  515. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon-deprecated-upcoming.scss +0 -13
  516. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon.scss +0 -59
  517. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_button.scss +0 -273
  518. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_clearfix.scss +0 -29
  519. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_font-family.scss +0 -5
  520. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_hide-text.scss +0 -5
  521. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_html5-input-types.scss +0 -56
  522. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_position.scss +0 -42
  523. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_prefixer.scss +0 -49
  524. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_retina-image.scss +0 -32
  525. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_size.scss +0 -44
  526. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_timing-functions.scss +0 -32
  527. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_triangle.scss +0 -45
  528. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_animation.scss +0 -52
  529. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_appearance.scss +0 -3
  530. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_backface-visibility.scss +0 -6
  531. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background-image.scss +0 -48
  532. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background.scss +0 -103
  533. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-image.scss +0 -55
  534. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-radius.scss +0 -22
  535. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_box-sizing.scss +0 -4
  536. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_columns.scss +0 -47
  537. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_flex-box.scss +0 -52
  538. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_font-face.scss +0 -23
  539. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_hidpi-media-query.scss +0 -10
  540. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_image-rendering.scss +0 -13
  541. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_inline-block.scss +0 -8
  542. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_keyframes.scss +0 -43
  543. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_linear-gradient.scss +0 -41
  544. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_perspective.scss +0 -8
  545. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_placeholder.scss +0 -29
  546. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_radial-gradient.scss +0 -44
  547. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transform.scss +0 -15
  548. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transition.scss +0 -34
  549. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_user-select.scss +0 -3
  550. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_compact.scss +0 -11
  551. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_flex-grid.scss +0 -39
  552. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_grid-width.scss +0 -13
  553. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_linear-gradient.scss +0 -13
  554. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_modular-scale.scss +0 -40
  555. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_px-to-em.scss +0 -8
  556. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_radial-gradient.scss +0 -23
  557. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_tint-shade.scss +0 -9
  558. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_transition-property-name.scss +0 -22
  559. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_deprecated-webkit-gradient.scss +0 -39
  560. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_gradient-positions-parser.scss +0 -13
  561. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_linear-positions-parser.scss +0 -61
  562. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss +0 -69
  563. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-positions-parser.scss +0 -18
  564. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_render-gradients.scss +0 -26
  565. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_shape-size-stripper.scss +0 -10
  566. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan.sass +0 -11
  567. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_grid.sass +0 -161
  568. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass +0 -63
  569. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_utilities.sass +0 -24
  570. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_variables.sass +0 -42
  571. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat-helpers.scss +0 -8
  572. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat.scss +0 -21
  573. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_new-breakpoint.scss +0 -16
  574. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_private.scss +0 -107
  575. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_px-to-em.scss +0 -3
  576. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_fill-parent.scss +0 -7
  577. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_grid.scss +0 -5
  578. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_media.scss +0 -51
  579. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_omega.scss +0 -79
  580. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_outer-container.scss +0 -8
  581. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_pad.scss +0 -8
  582. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_private.scss +0 -50
  583. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_reset.scss +0 -12
  584. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_row.scss +0 -17
  585. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_shift.scss +0 -9
  586. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_span-columns.scss +0 -38
  587. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_to-deprecate.scss +0 -57
  588. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_visual-grid.scss +0 -41
  589. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_grid.scss +0 -7
  590. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_visual-grid.scss +0 -5
  591. data/lib/wp/wp-content/themes/stump/base.php +0 -36
  592. data/lib/wp/wp-content/themes/stump/functions.php +0 -19
  593. data/lib/wp/wp-content/themes/stump/index.php +0 -21
  594. data/lib/wp/wp-content/themes/stump/lang/ar.mo +0 -0
  595. data/lib/wp/wp-content/themes/stump/lang/ar.po +0 -270
  596. data/lib/wp/wp-content/themes/stump/lang/bg_BG.mo +0 -0
  597. data/lib/wp/wp-content/themes/stump/lang/bg_BG.po +0 -338
  598. data/lib/wp/wp-content/themes/stump/lang/ca.mo +0 -0
  599. data/lib/wp/wp-content/themes/stump/lang/ca.po +0 -517
  600. data/lib/wp/wp-content/themes/stump/lang/da_DK.mo +0 -0
  601. data/lib/wp/wp-content/themes/stump/lang/da_DK.po +0 -305
  602. data/lib/wp/wp-content/themes/stump/lang/de_DE.mo +0 -0
  603. data/lib/wp/wp-content/themes/stump/lang/de_DE.po +0 -271
  604. data/lib/wp/wp-content/themes/stump/lang/el.mo +0 -0
  605. data/lib/wp/wp-content/themes/stump/lang/el.po +0 -319
  606. data/lib/wp/wp-content/themes/stump/lang/es_ES.mo +0 -0
  607. data/lib/wp/wp-content/themes/stump/lang/es_ES.po +0 -270
  608. data/lib/wp/wp-content/themes/stump/lang/et.mo +0 -0
  609. data/lib/wp/wp-content/themes/stump/lang/et.po +0 -262
  610. data/lib/wp/wp-content/themes/stump/lang/fa_IR.mo +0 -0
  611. data/lib/wp/wp-content/themes/stump/lang/fa_IR.po +0 -273
  612. data/lib/wp/wp-content/themes/stump/lang/fi_FI.mo +0 -0
  613. data/lib/wp/wp-content/themes/stump/lang/fi_FI.po +0 -367
  614. data/lib/wp/wp-content/themes/stump/lang/fr_FR.mo +0 -0
  615. data/lib/wp/wp-content/themes/stump/lang/fr_FR.po +0 -336
  616. data/lib/wp/wp-content/themes/stump/lang/he_IL.mo +0 -0
  617. data/lib/wp/wp-content/themes/stump/lang/he_IL.po +0 -336
  618. data/lib/wp/wp-content/themes/stump/lang/hu_HU.mo +0 -0
  619. data/lib/wp/wp-content/themes/stump/lang/hu_HU.po +0 -271
  620. data/lib/wp/wp-content/themes/stump/lang/id_ID.mo +0 -0
  621. data/lib/wp/wp-content/themes/stump/lang/id_ID.po +0 -278
  622. data/lib/wp/wp-content/themes/stump/lang/it_IT.mo +0 -0
  623. data/lib/wp/wp-content/themes/stump/lang/it_IT.po +0 -269
  624. data/lib/wp/wp-content/themes/stump/lang/ja.mo +0 -0
  625. data/lib/wp/wp-content/themes/stump/lang/ja.po +0 -267
  626. data/lib/wp/wp-content/themes/stump/lang/ko_KR.mo +0 -0
  627. data/lib/wp/wp-content/themes/stump/lang/ko_KR.po +0 -282
  628. data/lib/wp/wp-content/themes/stump/lang/mk_MK.mo +0 -0
  629. data/lib/wp/wp-content/themes/stump/lang/mk_MK.po +0 -297
  630. data/lib/wp/wp-content/themes/stump/lang/ms_MY.mo +0 -0
  631. data/lib/wp/wp-content/themes/stump/lang/ms_MY.po +0 -342
  632. data/lib/wp/wp-content/themes/stump/lang/nb_NO.mo +0 -0
  633. data/lib/wp/wp-content/themes/stump/lang/nb_NO.po +0 -517
  634. data/lib/wp/wp-content/themes/stump/lang/nl_NL.mo +0 -0
  635. data/lib/wp/wp-content/themes/stump/lang/nl_NL.po +0 -261
  636. data/lib/wp/wp-content/themes/stump/lang/nn_NO.mo +0 -0
  637. data/lib/wp/wp-content/themes/stump/lang/nn_NO.po +0 -517
  638. data/lib/wp/wp-content/themes/stump/lang/pl_PL.mo +0 -0
  639. data/lib/wp/wp-content/themes/stump/lang/pl_PL.po +0 -283
  640. data/lib/wp/wp-content/themes/stump/lang/pt_BR.mo +0 -0
  641. data/lib/wp/wp-content/themes/stump/lang/pt_BR.po +0 -394
  642. data/lib/wp/wp-content/themes/stump/lang/ro_RO.mo +0 -0
  643. data/lib/wp/wp-content/themes/stump/lang/ro_RO.po +0 -271
  644. data/lib/wp/wp-content/themes/stump/lang/roots.pot +0 -244
  645. data/lib/wp/wp-content/themes/stump/lang/ru_RU.mo +0 -0
  646. data/lib/wp/wp-content/themes/stump/lang/ru_RU.po +0 -255
  647. data/lib/wp/wp-content/themes/stump/lang/sk_SK.mo +0 -0
  648. data/lib/wp/wp-content/themes/stump/lang/sk_SK.po +0 -267
  649. data/lib/wp/wp-content/themes/stump/lang/sr_RS.mo +0 -0
  650. data/lib/wp/wp-content/themes/stump/lang/sr_RS.pot +0 -261
  651. data/lib/wp/wp-content/themes/stump/lang/sv_SE.mo +0 -0
  652. data/lib/wp/wp-content/themes/stump/lang/sv_SE.po +0 -323
  653. data/lib/wp/wp-content/themes/stump/lang/tr_TR.mo +0 -0
  654. data/lib/wp/wp-content/themes/stump/lang/tr_TR.po +0 -405
  655. data/lib/wp/wp-content/themes/stump/lang/vi_VN.mo +0 -0
  656. data/lib/wp/wp-content/themes/stump/lang/vi_VN.po +0 -516
  657. data/lib/wp/wp-content/themes/stump/lang/zh_CN.mo +0 -0
  658. data/lib/wp/wp-content/themes/stump/lang/zh_CN.po +0 -329
  659. data/lib/wp/wp-content/themes/stump/lang/zh_TW.mo +0 -0
  660. data/lib/wp/wp-content/themes/stump/lang/zh_TW.po +0 -261
  661. data/lib/wp/wp-content/themes/stump/lib/activation.php +0 -215
  662. data/lib/wp/wp-content/themes/stump/lib/cleanup.php +0 -261
  663. data/lib/wp/wp-content/themes/stump/lib/comments.php +0 -52
  664. data/lib/wp/wp-content/themes/stump/lib/config.php +0 -79
  665. data/lib/wp/wp-content/themes/stump/lib/custom.php +0 -4
  666. data/lib/wp/wp-content/themes/stump/lib/gallery.php +0 -130
  667. data/lib/wp/wp-content/themes/stump/lib/init.php +0 -25
  668. data/lib/wp/wp-content/themes/stump/lib/nav.php +0 -93
  669. data/lib/wp/wp-content/themes/stump/lib/relative-urls.php +0 -50
  670. data/lib/wp/wp-content/themes/stump/lib/scripts.php +0 -67
  671. data/lib/wp/wp-content/themes/stump/lib/sidebar.php +0 -43
  672. data/lib/wp/wp-content/themes/stump/lib/titles.php +0 -37
  673. data/lib/wp/wp-content/themes/stump/lib/utils.php +0 -14
  674. data/lib/wp/wp-content/themes/stump/lib/widgets.php +0 -133
  675. data/lib/wp/wp-content/themes/stump/lib/wrapper.php +0 -49
  676. data/lib/wp/wp-content/themes/stump/package.json +0 -32
  677. data/lib/wp/wp-content/themes/stump/page.php +0 -2
  678. data/lib/wp/wp-content/themes/stump/screenshot.png +0 -0
  679. data/lib/wp/wp-content/themes/stump/single.php +0 -1
  680. data/lib/wp/wp-content/themes/stump/style.css +0 -11
  681. data/lib/wp/wp-content/themes/stump/template-custom.php +0 -8
  682. data/lib/wp/wp-content/themes/stump/templates/comment.php +0 -14
  683. data/lib/wp/wp-content/themes/stump/templates/comments.php +0 -80
  684. data/lib/wp/wp-content/themes/stump/templates/content-page.php +0 -4
  685. data/lib/wp/wp-content/themes/stump/templates/content-single.php +0 -15
  686. data/lib/wp/wp-content/themes/stump/templates/content.php +0 -9
  687. data/lib/wp/wp-content/themes/stump/templates/entry-meta.php +0 -2
  688. data/lib/wp/wp-content/themes/stump/templates/footer.php +0 -8
  689. data/lib/wp/wp-content/themes/stump/templates/head.php +0 -12
  690. data/lib/wp/wp-content/themes/stump/templates/header-top-navbar.php +0 -21
  691. data/lib/wp/wp-content/themes/stump/templates/header.php +0 -14
  692. data/lib/wp/wp-content/themes/stump/templates/page-header.php +0 -5
  693. data/lib/wp/wp-content/themes/stump/templates/searchform.php +0 -9
  694. data/lib/wp/wp-content/themes/stump/templates/sidebar.php +0 -1
  695. data/lib/wp/wp-cron.php +0 -115
  696. data/lib/wp/wp-includes/ID3/getid3.lib.php +0 -1376
  697. data/lib/wp/wp-includes/ID3/getid3.php +0 -1796
  698. data/lib/wp/wp-includes/ID3/license.commercial.txt +0 -27
  699. data/lib/wp/wp-includes/ID3/license.txt +0 -29
  700. data/lib/wp/wp-includes/ID3/module.audio-video.asf.php +0 -2013
  701. data/lib/wp/wp-includes/ID3/module.audio-video.flv.php +0 -745
  702. data/lib/wp/wp-includes/ID3/module.audio-video.matroska.php +0 -1751
  703. data/lib/wp/wp-includes/ID3/module.audio-video.quicktime.php +0 -2246
  704. data/lib/wp/wp-includes/ID3/module.audio-video.riff.php +0 -2586
  705. data/lib/wp/wp-includes/ID3/module.audio.ac3.php +0 -474
  706. data/lib/wp/wp-includes/ID3/module.audio.dts.php +0 -291
  707. data/lib/wp/wp-includes/ID3/module.audio.flac.php +0 -443
  708. data/lib/wp/wp-includes/ID3/module.audio.mp3.php +0 -2012
  709. data/lib/wp/wp-includes/ID3/module.audio.ogg.php +0 -756
  710. data/lib/wp/wp-includes/ID3/module.tag.apetag.php +0 -371
  711. data/lib/wp/wp-includes/ID3/module.tag.id3v1.php +0 -360
  712. data/lib/wp/wp-includes/ID3/module.tag.id3v2.php +0 -3424
  713. data/lib/wp/wp-includes/ID3/module.tag.lyrics3.php +0 -294
  714. data/lib/wp/wp-includes/ID3/readme.txt +0 -604
  715. data/lib/wp/wp-includes/SimplePie/Author.php +0 -157
  716. data/lib/wp/wp-includes/SimplePie/Cache.php +0 -133
  717. data/lib/wp/wp-includes/SimplePie/Cache/Base.php +0 -114
  718. data/lib/wp/wp-includes/SimplePie/Cache/DB.php +0 -137
  719. data/lib/wp/wp-includes/SimplePie/Cache/File.php +0 -173
  720. data/lib/wp/wp-includes/SimplePie/Cache/Memcache.php +0 -183
  721. data/lib/wp/wp-includes/SimplePie/Cache/MySQL.php +0 -438
  722. data/lib/wp/wp-includes/SimplePie/Caption.php +0 -210
  723. data/lib/wp/wp-includes/SimplePie/Category.php +0 -157
  724. data/lib/wp/wp-includes/SimplePie/Content/Type/Sniffer.php +0 -332
  725. data/lib/wp/wp-includes/SimplePie/Copyright.php +0 -130
  726. data/lib/wp/wp-includes/SimplePie/Core.php +0 -57
  727. data/lib/wp/wp-includes/SimplePie/Credit.php +0 -156
  728. data/lib/wp/wp-includes/SimplePie/Decode/HTML/Entities.php +0 -617
  729. data/lib/wp/wp-includes/SimplePie/Enclosure.php +0 -1380
  730. data/lib/wp/wp-includes/SimplePie/Exception.php +0 -52
  731. data/lib/wp/wp-includes/SimplePie/File.php +0 -292
  732. data/lib/wp/wp-includes/SimplePie/HTTP/Parser.php +0 -500
  733. data/lib/wp/wp-includes/SimplePie/IRI.php +0 -1238
  734. data/lib/wp/wp-includes/SimplePie/Item.php +0 -2964
  735. data/lib/wp/wp-includes/SimplePie/Locator.php +0 -372
  736. data/lib/wp/wp-includes/SimplePie/Misc.php +0 -2247
  737. data/lib/wp/wp-includes/SimplePie/Net/IPv6.php +0 -276
  738. data/lib/wp/wp-includes/SimplePie/Parse/Date.php +0 -983
  739. data/lib/wp/wp-includes/SimplePie/Parser.php +0 -407
  740. data/lib/wp/wp-includes/SimplePie/Rating.php +0 -129
  741. data/lib/wp/wp-includes/SimplePie/Registry.php +0 -225
  742. data/lib/wp/wp-includes/SimplePie/Restriction.php +0 -155
  743. data/lib/wp/wp-includes/SimplePie/Sanitize.php +0 -554
  744. data/lib/wp/wp-includes/SimplePie/Source.php +0 -611
  745. data/lib/wp/wp-includes/SimplePie/XML/Declaration/Parser.php +0 -362
  746. data/lib/wp/wp-includes/SimplePie/gzdecode.php +0 -371
  747. data/lib/wp/wp-includes/Text/Diff.php +0 -450
  748. data/lib/wp/wp-includes/Text/Diff/Engine/native.php +0 -436
  749. data/lib/wp/wp-includes/Text/Diff/Engine/shell.php +0 -162
  750. data/lib/wp/wp-includes/Text/Diff/Engine/string.php +0 -248
  751. data/lib/wp/wp-includes/Text/Diff/Engine/xdiff.php +0 -64
  752. data/lib/wp/wp-includes/Text/Diff/Renderer.php +0 -235
  753. data/lib/wp/wp-includes/Text/Diff/Renderer/inline.php +0 -206
  754. data/lib/wp/wp-includes/admin-bar.php +0 -870
  755. data/lib/wp/wp-includes/atomlib.php +0 -352
  756. data/lib/wp/wp-includes/author-template.php +0 -471
  757. data/lib/wp/wp-includes/bookmark-template.php +0 -298
  758. data/lib/wp/wp-includes/bookmark.php +0 -416
  759. data/lib/wp/wp-includes/cache.php +0 -704
  760. data/lib/wp/wp-includes/canonical.php +0 -586
  761. data/lib/wp/wp-includes/capabilities.php +0 -1539
  762. data/lib/wp/wp-includes/category-template.php +0 -1407
  763. data/lib/wp/wp-includes/category.php +0 -343
  764. data/lib/wp/wp-includes/certificates/ca-bundle.crt +0 -3785
  765. data/lib/wp/wp-includes/class-IXR.php +0 -1100
  766. data/lib/wp/wp-includes/class-feed.php +0 -140
  767. data/lib/wp/wp-includes/class-http.php +0 -2245
  768. data/lib/wp/wp-includes/class-json.php +0 -936
  769. data/lib/wp/wp-includes/class-oembed.php +0 -579
  770. data/lib/wp/wp-includes/class-phpass.php +0 -260
  771. data/lib/wp/wp-includes/class-phpmailer.php +0 -3265
  772. data/lib/wp/wp-includes/class-pop3.php +0 -652
  773. data/lib/wp/wp-includes/class-simplepie.php +0 -3119
  774. data/lib/wp/wp-includes/class-smtp.php +0 -943
  775. data/lib/wp/wp-includes/class-snoopy.php +0 -1256
  776. data/lib/wp/wp-includes/class-wp-admin-bar.php +0 -517
  777. data/lib/wp/wp-includes/class-wp-ajax-response.php +0 -199
  778. data/lib/wp/wp-includes/class-wp-customize-control.php +0 -1124
  779. data/lib/wp/wp-includes/class-wp-customize-manager.php +0 -1272
  780. data/lib/wp/wp-includes/class-wp-customize-panel.php +0 -200
  781. data/lib/wp/wp-includes/class-wp-customize-section.php +0 -196
  782. data/lib/wp/wp-includes/class-wp-customize-setting.php +0 -554
  783. data/lib/wp/wp-includes/class-wp-customize-widgets.php +0 -1556
  784. data/lib/wp/wp-includes/class-wp-editor.php +0 -1435
  785. data/lib/wp/wp-includes/class-wp-embed.php +0 -373
  786. data/lib/wp/wp-includes/class-wp-error.php +0 -276
  787. data/lib/wp/wp-includes/class-wp-http-ixr-client.php +0 -97
  788. data/lib/wp/wp-includes/class-wp-image-editor-gd.php +0 -459
  789. data/lib/wp/wp-includes/class-wp-image-editor-imagick.php +0 -512
  790. data/lib/wp/wp-includes/class-wp-image-editor.php +0 -475
  791. data/lib/wp/wp-includes/class-wp-theme.php +0 -1235
  792. data/lib/wp/wp-includes/class-wp-walker.php +0 -471
  793. data/lib/wp/wp-includes/class-wp-xmlrpc-server.php +0 -5984
  794. data/lib/wp/wp-includes/class-wp.php +0 -782
  795. data/lib/wp/wp-includes/class.wp-dependencies.php +0 -509
  796. data/lib/wp/wp-includes/class.wp-scripts.php +0 -247
  797. data/lib/wp/wp-includes/class.wp-styles.php +0 -210
  798. data/lib/wp/wp-includes/comment-template.php +0 -2286
  799. data/lib/wp/wp-includes/comment.php +0 -2606
  800. data/lib/wp/wp-includes/compat.php +0 -125
  801. data/lib/wp/wp-includes/cron.php +0 -469
  802. data/lib/wp/wp-includes/css/admin-bar-rtl.css +0 -1099
  803. data/lib/wp/wp-includes/css/admin-bar-rtl.min.css +0 -1
  804. data/lib/wp/wp-includes/css/admin-bar.css +0 -1099
  805. data/lib/wp/wp-includes/css/admin-bar.min.css +0 -1
  806. data/lib/wp/wp-includes/css/buttons-rtl.css +0 -364
  807. data/lib/wp/wp-includes/css/buttons-rtl.min.css +0 -1
  808. data/lib/wp/wp-includes/css/buttons.css +0 -364
  809. data/lib/wp/wp-includes/css/buttons.min.css +0 -1
  810. data/lib/wp/wp-includes/css/dashicons.css +0 -893
  811. data/lib/wp/wp-includes/css/dashicons.min.css +0 -1
  812. data/lib/wp/wp-includes/css/editor-rtl.css +0 -1993
  813. data/lib/wp/wp-includes/css/editor-rtl.min.css +0 -1
  814. data/lib/wp/wp-includes/css/editor.css +0 -1993
  815. data/lib/wp/wp-includes/css/editor.min.css +0 -1
  816. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.css +0 -343
  817. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.min.css +0 -19
  818. data/lib/wp/wp-includes/css/jquery-ui-dialog.css +0 -343
  819. data/lib/wp/wp-includes/css/jquery-ui-dialog.min.css +0 -19
  820. data/lib/wp/wp-includes/css/media-views-rtl.css +0 -2568
  821. data/lib/wp/wp-includes/css/media-views-rtl.min.css +0 -1
  822. data/lib/wp/wp-includes/css/media-views.css +0 -2568
  823. data/lib/wp/wp-includes/css/media-views.min.css +0 -1
  824. data/lib/wp/wp-includes/css/wp-auth-check-rtl.css +0 -100
  825. data/lib/wp/wp-includes/css/wp-auth-check-rtl.min.css +0 -1
  826. data/lib/wp/wp-includes/css/wp-auth-check.css +0 -100
  827. data/lib/wp/wp-includes/css/wp-auth-check.min.css +0 -1
  828. data/lib/wp/wp-includes/css/wp-pointer-rtl.css +0 -212
  829. data/lib/wp/wp-includes/css/wp-pointer-rtl.min.css +0 -1
  830. data/lib/wp/wp-includes/css/wp-pointer.css +0 -212
  831. data/lib/wp/wp-includes/css/wp-pointer.min.css +0 -1
  832. data/lib/wp/wp-includes/date.php +0 -475
  833. data/lib/wp/wp-includes/default-constants.php +0 -323
  834. data/lib/wp/wp-includes/default-filters.php +0 -307
  835. data/lib/wp/wp-includes/default-widgets.php +0 -1423
  836. data/lib/wp/wp-includes/deprecated.php +0 -3501
  837. data/lib/wp/wp-includes/feed-atom-comments.php +0 -115
  838. data/lib/wp/wp-includes/feed-atom.php +0 -87
  839. data/lib/wp/wp-includes/feed-rdf.php +0 -81
  840. data/lib/wp/wp-includes/feed-rss.php +0 -46
  841. data/lib/wp/wp-includes/feed-rss2-comments.php +0 -97
  842. data/lib/wp/wp-includes/feed-rss2.php +0 -115
  843. data/lib/wp/wp-includes/feed.php +0 -659
  844. data/lib/wp/wp-includes/fonts/dashicons.eot +0 -0
  845. data/lib/wp/wp-includes/fonts/dashicons.svg +0 -250
  846. data/lib/wp/wp-includes/fonts/dashicons.ttf +0 -0
  847. data/lib/wp/wp-includes/fonts/dashicons.woff +0 -0
  848. data/lib/wp/wp-includes/formatting.php +0 -4006
  849. data/lib/wp/wp-includes/functions.php +0 -4631
  850. data/lib/wp/wp-includes/functions.wp-scripts.php +0 -258
  851. data/lib/wp/wp-includes/functions.wp-styles.php +0 -245
  852. data/lib/wp/wp-includes/general-template.php +0 -2982
  853. data/lib/wp/wp-includes/http.php +0 -551
  854. data/lib/wp/wp-includes/images/admin-bar-sprite-2x.png +0 -0
  855. data/lib/wp/wp-includes/images/admin-bar-sprite.png +0 -0
  856. data/lib/wp/wp-includes/images/arrow-pointer-blue-2x.png +0 -0
  857. data/lib/wp/wp-includes/images/arrow-pointer-blue.png +0 -0
  858. data/lib/wp/wp-includes/images/blank.gif +0 -0
  859. data/lib/wp/wp-includes/images/crystal/archive.png +0 -0
  860. data/lib/wp/wp-includes/images/crystal/audio.png +0 -0
  861. data/lib/wp/wp-includes/images/crystal/code.png +0 -0
  862. data/lib/wp/wp-includes/images/crystal/default.png +0 -0
  863. data/lib/wp/wp-includes/images/crystal/document.png +0 -0
  864. data/lib/wp/wp-includes/images/crystal/interactive.png +0 -0
  865. data/lib/wp/wp-includes/images/crystal/license.txt +0 -9
  866. data/lib/wp/wp-includes/images/crystal/spreadsheet.png +0 -0
  867. data/lib/wp/wp-includes/images/crystal/text.png +0 -0
  868. data/lib/wp/wp-includes/images/crystal/video.png +0 -0
  869. data/lib/wp/wp-includes/images/down_arrow-2x.gif +0 -0
  870. data/lib/wp/wp-includes/images/down_arrow.gif +0 -0
  871. data/lib/wp/wp-includes/images/icon-pointer-flag-2x.png +0 -0
  872. data/lib/wp/wp-includes/images/icon-pointer-flag.png +0 -0
  873. data/lib/wp/wp-includes/images/media/archive.png +0 -0
  874. data/lib/wp/wp-includes/images/media/audio.png +0 -0
  875. data/lib/wp/wp-includes/images/media/code.png +0 -0
  876. data/lib/wp/wp-includes/images/media/default.png +0 -0
  877. data/lib/wp/wp-includes/images/media/document.png +0 -0
  878. data/lib/wp/wp-includes/images/media/interactive.png +0 -0
  879. data/lib/wp/wp-includes/images/media/spreadsheet.png +0 -0
  880. data/lib/wp/wp-includes/images/media/text.png +0 -0
  881. data/lib/wp/wp-includes/images/media/video.png +0 -0
  882. data/lib/wp/wp-includes/images/rss-2x.png +0 -0
  883. data/lib/wp/wp-includes/images/rss.png +0 -0
  884. data/lib/wp/wp-includes/images/smilies/icon_arrow.gif +0 -0
  885. data/lib/wp/wp-includes/images/smilies/icon_biggrin.gif +0 -0
  886. data/lib/wp/wp-includes/images/smilies/icon_confused.gif +0 -0
  887. data/lib/wp/wp-includes/images/smilies/icon_cool.gif +0 -0
  888. data/lib/wp/wp-includes/images/smilies/icon_cry.gif +0 -0
  889. data/lib/wp/wp-includes/images/smilies/icon_eek.gif +0 -0
  890. data/lib/wp/wp-includes/images/smilies/icon_evil.gif +0 -0
  891. data/lib/wp/wp-includes/images/smilies/icon_exclaim.gif +0 -0
  892. data/lib/wp/wp-includes/images/smilies/icon_idea.gif +0 -0
  893. data/lib/wp/wp-includes/images/smilies/icon_lol.gif +0 -0
  894. data/lib/wp/wp-includes/images/smilies/icon_mad.gif +0 -0
  895. data/lib/wp/wp-includes/images/smilies/icon_mrgreen.gif +0 -0
  896. data/lib/wp/wp-includes/images/smilies/icon_neutral.gif +0 -0
  897. data/lib/wp/wp-includes/images/smilies/icon_question.gif +0 -0
  898. data/lib/wp/wp-includes/images/smilies/icon_razz.gif +0 -0
  899. data/lib/wp/wp-includes/images/smilies/icon_redface.gif +0 -0
  900. data/lib/wp/wp-includes/images/smilies/icon_rolleyes.gif +0 -0
  901. data/lib/wp/wp-includes/images/smilies/icon_sad.gif +0 -0
  902. data/lib/wp/wp-includes/images/smilies/icon_smile.gif +0 -0
  903. data/lib/wp/wp-includes/images/smilies/icon_surprised.gif +0 -0
  904. data/lib/wp/wp-includes/images/smilies/icon_twisted.gif +0 -0
  905. data/lib/wp/wp-includes/images/smilies/icon_wink.gif +0 -0
  906. data/lib/wp/wp-includes/images/spinner-2x.gif +0 -0
  907. data/lib/wp/wp-includes/images/spinner.gif +0 -0
  908. data/lib/wp/wp-includes/images/toggle-arrow-2x.png +0 -0
  909. data/lib/wp/wp-includes/images/toggle-arrow.png +0 -0
  910. data/lib/wp/wp-includes/images/uploader-icons-2x.png +0 -0
  911. data/lib/wp/wp-includes/images/uploader-icons.png +0 -0
  912. data/lib/wp/wp-includes/images/wlw/wp-comments.png +0 -0
  913. data/lib/wp/wp-includes/images/wlw/wp-icon.png +0 -0
  914. data/lib/wp/wp-includes/images/wlw/wp-watermark.png +0 -0
  915. data/lib/wp/wp-includes/images/wpicons-2x.png +0 -0
  916. data/lib/wp/wp-includes/images/wpicons.png +0 -0
  917. data/lib/wp/wp-includes/images/wpspin-2x.gif +0 -0
  918. data/lib/wp/wp-includes/images/wpspin.gif +0 -0
  919. data/lib/wp/wp-includes/images/xit-2x.gif +0 -0
  920. data/lib/wp/wp-includes/images/xit.gif +0 -0
  921. data/lib/wp/wp-includes/js/admin-bar.js +0 -365
  922. data/lib/wp/wp-includes/js/admin-bar.min.js +0 -1
  923. data/lib/wp/wp-includes/js/autosave.js +0 -589
  924. data/lib/wp/wp-includes/js/autosave.min.js +0 -1
  925. data/lib/wp/wp-includes/js/backbone.min.js +0 -1
  926. data/lib/wp/wp-includes/js/colorpicker.js +0 -707
  927. data/lib/wp/wp-includes/js/colorpicker.min.js +0 -1
  928. data/lib/wp/wp-includes/js/comment-reply.js +0 -47
  929. data/lib/wp/wp-includes/js/comment-reply.min.js +0 -1
  930. data/lib/wp/wp-includes/js/crop/cropper.css +0 -165
  931. data/lib/wp/wp-includes/js/crop/cropper.js +0 -516
  932. data/lib/wp/wp-includes/js/crop/marqueeHoriz.gif +0 -0
  933. data/lib/wp/wp-includes/js/crop/marqueeVert.gif +0 -0
  934. data/lib/wp/wp-includes/js/customize-base.js +0 -617
  935. data/lib/wp/wp-includes/js/customize-base.min.js +0 -1
  936. data/lib/wp/wp-includes/js/customize-loader.js +0 -246
  937. data/lib/wp/wp-includes/js/customize-loader.min.js +0 -1
  938. data/lib/wp/wp-includes/js/customize-models.js +0 -247
  939. data/lib/wp/wp-includes/js/customize-models.min.js +0 -1
  940. data/lib/wp/wp-includes/js/customize-preview-widgets.js +0 -129
  941. data/lib/wp/wp-includes/js/customize-preview-widgets.min.js +0 -1
  942. data/lib/wp/wp-includes/js/customize-preview.js +0 -154
  943. data/lib/wp/wp-includes/js/customize-preview.min.js +0 -1
  944. data/lib/wp/wp-includes/js/customize-views.js +0 -231
  945. data/lib/wp/wp-includes/js/customize-views.min.js +0 -1
  946. data/lib/wp/wp-includes/js/heartbeat.js +0 -738
  947. data/lib/wp/wp-includes/js/heartbeat.min.js +0 -1
  948. data/lib/wp/wp-includes/js/hoverIntent.js +0 -115
  949. data/lib/wp/wp-includes/js/hoverIntent.min.js +0 -1
  950. data/lib/wp/wp-includes/js/imgareaselect/border-anim-h.gif +0 -0
  951. data/lib/wp/wp-includes/js/imgareaselect/border-anim-v.gif +0 -0
  952. data/lib/wp/wp-includes/js/imgareaselect/imgareaselect.css +0 -41
  953. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js +0 -1205
  954. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js +0 -1
  955. data/lib/wp/wp-includes/js/jcrop/Jcrop.gif +0 -0
  956. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.css +0 -29
  957. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.js +0 -22
  958. data/lib/wp/wp-includes/js/jquery/jquery-migrate.js +0 -521
  959. data/lib/wp/wp-includes/js/jquery/jquery-migrate.min.js +0 -2
  960. data/lib/wp/wp-includes/js/jquery/jquery.color.min.js +0 -2
  961. data/lib/wp/wp-includes/js/jquery/jquery.form.js +0 -1193
  962. data/lib/wp/wp-includes/js/jquery/jquery.form.min.js +0 -11
  963. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.js +0 -134
  964. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.min.js +0 -1
  965. data/lib/wp/wp-includes/js/jquery/jquery.js +0 -5
  966. data/lib/wp/wp-includes/js/jquery/jquery.masonry.min.js +0 -11
  967. data/lib/wp/wp-includes/js/jquery/jquery.query.js +0 -11
  968. data/lib/wp/wp-includes/js/jquery/jquery.schedule.js +0 -36
  969. data/lib/wp/wp-includes/js/jquery/jquery.serialize-object.js +0 -31
  970. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.js +0 -99
  971. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.min.js +0 -1
  972. data/lib/wp/wp-includes/js/jquery/jquery.ui.touch-punch.js +0 -11
  973. data/lib/wp/wp-includes/js/jquery/suggest.js +0 -316
  974. data/lib/wp/wp-includes/js/jquery/suggest.min.js +0 -1
  975. data/lib/wp/wp-includes/js/jquery/ui/accordion.min.js +0 -11
  976. data/lib/wp/wp-includes/js/jquery/ui/autocomplete.min.js +0 -11
  977. data/lib/wp/wp-includes/js/jquery/ui/button.min.js +0 -11
  978. data/lib/wp/wp-includes/js/jquery/ui/core.min.js +0 -11
  979. data/lib/wp/wp-includes/js/jquery/ui/datepicker.min.js +0 -12
  980. data/lib/wp/wp-includes/js/jquery/ui/dialog.min.js +0 -11
  981. data/lib/wp/wp-includes/js/jquery/ui/draggable.min.js +0 -11
  982. data/lib/wp/wp-includes/js/jquery/ui/droppable.min.js +0 -11
  983. data/lib/wp/wp-includes/js/jquery/ui/effect-blind.min.js +0 -11
  984. data/lib/wp/wp-includes/js/jquery/ui/effect-bounce.min.js +0 -11
  985. data/lib/wp/wp-includes/js/jquery/ui/effect-clip.min.js +0 -11
  986. data/lib/wp/wp-includes/js/jquery/ui/effect-drop.min.js +0 -11
  987. data/lib/wp/wp-includes/js/jquery/ui/effect-explode.min.js +0 -11
  988. data/lib/wp/wp-includes/js/jquery/ui/effect-fade.min.js +0 -11
  989. data/lib/wp/wp-includes/js/jquery/ui/effect-fold.min.js +0 -11
  990. data/lib/wp/wp-includes/js/jquery/ui/effect-highlight.min.js +0 -11
  991. data/lib/wp/wp-includes/js/jquery/ui/effect-puff.min.js +0 -11
  992. data/lib/wp/wp-includes/js/jquery/ui/effect-pulsate.min.js +0 -11
  993. data/lib/wp/wp-includes/js/jquery/ui/effect-scale.min.js +0 -11
  994. data/lib/wp/wp-includes/js/jquery/ui/effect-shake.min.js +0 -11
  995. data/lib/wp/wp-includes/js/jquery/ui/effect-size.min.js +0 -11
  996. data/lib/wp/wp-includes/js/jquery/ui/effect-slide.min.js +0 -11
  997. data/lib/wp/wp-includes/js/jquery/ui/effect-transfer.min.js +0 -11
  998. data/lib/wp/wp-includes/js/jquery/ui/effect.min.js +0 -21
  999. data/lib/wp/wp-includes/js/jquery/ui/menu.min.js +0 -11
  1000. data/lib/wp/wp-includes/js/jquery/ui/mouse.min.js +0 -11
  1001. data/lib/wp/wp-includes/js/jquery/ui/position.min.js +0 -11
  1002. data/lib/wp/wp-includes/js/jquery/ui/progressbar.min.js +0 -11
  1003. data/lib/wp/wp-includes/js/jquery/ui/resizable.min.js +0 -11
  1004. data/lib/wp/wp-includes/js/jquery/ui/selectable.min.js +0 -11
  1005. data/lib/wp/wp-includes/js/jquery/ui/selectmenu.min.js +0 -11
  1006. data/lib/wp/wp-includes/js/jquery/ui/slider.min.js +0 -11
  1007. data/lib/wp/wp-includes/js/jquery/ui/sortable.min.js +0 -11
  1008. data/lib/wp/wp-includes/js/jquery/ui/spinner.min.js +0 -11
  1009. data/lib/wp/wp-includes/js/jquery/ui/tabs.min.js +0 -11
  1010. data/lib/wp/wp-includes/js/jquery/ui/tooltip.min.js +0 -11
  1011. data/lib/wp/wp-includes/js/jquery/ui/widget.min.js +0 -11
  1012. data/lib/wp/wp-includes/js/json2.js +0 -480
  1013. data/lib/wp/wp-includes/js/json2.min.js +0 -1
  1014. data/lib/wp/wp-includes/js/masonry.min.js +0 -1
  1015. data/lib/wp/wp-includes/js/mce-view.js +0 -829
  1016. data/lib/wp/wp-includes/js/mce-view.min.js +0 -1
  1017. data/lib/wp/wp-includes/js/media-audiovideo.js +0 -831
  1018. data/lib/wp/wp-includes/js/media-audiovideo.min.js +0 -1
  1019. data/lib/wp/wp-includes/js/media-editor.js +0 -1114
  1020. data/lib/wp/wp-includes/js/media-editor.min.js +0 -1
  1021. data/lib/wp/wp-includes/js/media-grid.js +0 -732
  1022. data/lib/wp/wp-includes/js/media-grid.min.js +0 -1
  1023. data/lib/wp/wp-includes/js/media-models.js +0 -1362
  1024. data/lib/wp/wp-includes/js/media-models.min.js +0 -1
  1025. data/lib/wp/wp-includes/js/media-views.js +0 -7484
  1026. data/lib/wp/wp-includes/js/media-views.min.js +0 -3
  1027. data/lib/wp/wp-includes/js/mediaelement/background.png +0 -0
  1028. data/lib/wp/wp-includes/js/mediaelement/bigplay.png +0 -0
  1029. data/lib/wp/wp-includes/js/mediaelement/bigplay.svg +0 -1
  1030. data/lib/wp/wp-includes/js/mediaelement/controls.png +0 -0
  1031. data/lib/wp/wp-includes/js/mediaelement/controls.svg +0 -1
  1032. data/lib/wp/wp-includes/js/mediaelement/flashmediaelement.swf +0 -0
  1033. data/lib/wp/wp-includes/js/mediaelement/loading.gif +0 -0
  1034. data/lib/wp/wp-includes/js/mediaelement/mediaelement-and-player.min.js +0 -181
  1035. data/lib/wp/wp-includes/js/mediaelement/mediaelementplayer.min.css +0 -1
  1036. data/lib/wp/wp-includes/js/mediaelement/silverlightmediaelement.xap +0 -0
  1037. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.css +0 -274
  1038. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.js +0 -34
  1039. data/lib/wp/wp-includes/js/mediaelement/wp-playlist.js +0 -175
  1040. data/lib/wp/wp-includes/js/plupload/handlers.js +0 -488
  1041. data/lib/wp/wp-includes/js/plupload/handlers.min.js +0 -1
  1042. data/lib/wp/wp-includes/js/plupload/license.txt +0 -339
  1043. data/lib/wp/wp-includes/js/plupload/plupload.flash.swf +0 -0
  1044. data/lib/wp/wp-includes/js/plupload/plupload.full.min.js +0 -28
  1045. data/lib/wp/wp-includes/js/plupload/plupload.silverlight.xap +0 -0
  1046. data/lib/wp/wp-includes/js/plupload/wp-plupload.js +0 -376
  1047. data/lib/wp/wp-includes/js/plupload/wp-plupload.min.js +0 -1
  1048. data/lib/wp/wp-includes/js/quicktags.js +0 -652
  1049. data/lib/wp/wp-includes/js/quicktags.min.js +0 -1
  1050. data/lib/wp/wp-includes/js/shortcode.js +0 -356
  1051. data/lib/wp/wp-includes/js/shortcode.min.js +0 -1
  1052. data/lib/wp/wp-includes/js/swfobject.js +0 -4
  1053. data/lib/wp/wp-includes/js/swfupload/handlers.js +0 -376
  1054. data/lib/wp/wp-includes/js/swfupload/handlers.min.js +0 -1
  1055. data/lib/wp/wp-includes/js/swfupload/license.txt +0 -32
  1056. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.cookies.js +0 -53
  1057. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.queue.js +0 -98
  1058. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.speed.js +0 -342
  1059. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.swfobject.js +0 -105
  1060. data/lib/wp/wp-includes/js/swfupload/swfupload.js +0 -980
  1061. data/lib/wp/wp-includes/js/swfupload/swfupload.swf +0 -0
  1062. data/lib/wp/wp-includes/js/thickbox/loadingAnimation.gif +0 -0
  1063. data/lib/wp/wp-includes/js/thickbox/macFFBgHack.png +0 -0
  1064. data/lib/wp/wp-includes/js/thickbox/thickbox.css +0 -138
  1065. data/lib/wp/wp-includes/js/thickbox/thickbox.js +0 -314
  1066. data/lib/wp/wp-includes/js/tinymce/langs/wp-langs-en.js +0 -519
  1067. data/lib/wp/wp-includes/js/tinymce/license.txt +0 -504
  1068. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.js +0 -370
  1069. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.min.js +0 -1
  1070. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.js +0 -112
  1071. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.min.js +0 -1
  1072. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css +0 -212
  1073. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.js +0 -304
  1074. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js +0 -1
  1075. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.js +0 -64
  1076. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.min.js +0 -1
  1077. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.js +0 -136
  1078. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js +0 -1
  1079. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.js +0 -30
  1080. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.min.js +0 -1
  1081. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.js +0 -450
  1082. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.min.js +0 -1
  1083. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.js +0 -786
  1084. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.min.js +0 -1
  1085. data/lib/wp/wp-includes/js/tinymce/plugins/media/moxieplayer.swf +0 -0
  1086. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.js +0 -774
  1087. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.min.js +0 -1
  1088. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.js +0 -1553
  1089. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.min.js +0 -1
  1090. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.js +0 -125
  1091. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js +0 -1
  1092. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.js +0 -272
  1093. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js +0 -1
  1094. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.js +0 -513
  1095. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js +0 -1
  1096. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js +0 -207
  1097. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js +0 -1
  1098. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js +0 -92
  1099. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js +0 -1
  1100. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +0 -1035
  1101. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js +0 -1
  1102. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js +0 -78
  1103. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.min.js +0 -1
  1104. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.js +0 -130
  1105. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.min.js +0 -1
  1106. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.js +0 -63
  1107. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.min.js +0 -1
  1108. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.js +0 -694
  1109. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +0 -1
  1110. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css +0 -1
  1111. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.min.css +0 -1
  1112. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md +0 -1
  1113. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  1114. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +0 -62
  1115. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  1116. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  1117. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  1118. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg +0 -63
  1119. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  1120. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  1121. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
  1122. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/loader.gif +0 -0
  1123. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/object.gif +0 -0
  1124. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/trans.gif +0 -0
  1125. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css +0 -1
  1126. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.min.css +0 -1
  1127. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/audio.png +0 -0
  1128. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png +0 -0
  1129. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png +0 -0
  1130. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/embedded.png +0 -0
  1131. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery-2x.png +0 -0
  1132. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery.png +0 -0
  1133. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more-2x.png +0 -0
  1134. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more.png +0 -0
  1135. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak-2x.png +0 -0
  1136. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak.png +0 -0
  1137. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-audio.png +0 -0
  1138. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-video.png +0 -0
  1139. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/video.png +0 -0
  1140. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/wp-content.css +0 -618
  1141. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.js +0 -617
  1142. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.min.js +0 -1
  1143. data/lib/wp/wp-includes/js/tinymce/tiny_mce_popup.js +0 -539
  1144. data/lib/wp/wp-includes/js/tinymce/tinymce.min.js +0 -11
  1145. data/lib/wp/wp-includes/js/tinymce/utils/editable_selects.js +0 -70
  1146. data/lib/wp/wp-includes/js/tinymce/utils/form_utils.js +0 -210
  1147. data/lib/wp/wp-includes/js/tinymce/utils/mctabs.js +0 -164
  1148. data/lib/wp/wp-includes/js/tinymce/utils/validate.js +0 -252
  1149. data/lib/wp/wp-includes/js/tinymce/wp-mce-help.php +0 -145
  1150. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.js.gz +0 -0
  1151. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.php +0 -39
  1152. data/lib/wp/wp-includes/js/tw-sack.js +0 -193
  1153. data/lib/wp/wp-includes/js/tw-sack.min.js +0 -1
  1154. data/lib/wp/wp-includes/js/underscore.min.js +0 -1
  1155. data/lib/wp/wp-includes/js/utils.js +0 -197
  1156. data/lib/wp/wp-includes/js/utils.min.js +0 -1
  1157. data/lib/wp/wp-includes/js/wp-ajax-response.js +0 -64
  1158. data/lib/wp/wp-includes/js/wp-ajax-response.min.js +0 -1
  1159. data/lib/wp/wp-includes/js/wp-auth-check.js +0 -112
  1160. data/lib/wp/wp-includes/js/wp-auth-check.min.js +0 -1
  1161. data/lib/wp/wp-includes/js/wp-backbone.js +0 -386
  1162. data/lib/wp/wp-includes/js/wp-backbone.min.js +0 -1
  1163. data/lib/wp/wp-includes/js/wp-list-revisions.js +0 -24
  1164. data/lib/wp/wp-includes/js/wp-list-revisions.min.js +0 -1
  1165. data/lib/wp/wp-includes/js/wp-lists.js +0 -469
  1166. data/lib/wp/wp-includes/js/wp-lists.min.js +0 -1
  1167. data/lib/wp/wp-includes/js/wp-pointer.js +0 -282
  1168. data/lib/wp/wp-includes/js/wp-pointer.min.js +0 -1
  1169. data/lib/wp/wp-includes/js/wp-util.js +0 -106
  1170. data/lib/wp/wp-includes/js/wp-util.min.js +0 -1
  1171. data/lib/wp/wp-includes/js/wpdialog.js +0 -19
  1172. data/lib/wp/wp-includes/js/wpdialog.min.js +0 -1
  1173. data/lib/wp/wp-includes/js/wplink.js +0 -615
  1174. data/lib/wp/wp-includes/js/wplink.min.js +0 -1
  1175. data/lib/wp/wp-includes/js/zxcvbn-async.js +0 -18
  1176. data/lib/wp/wp-includes/js/zxcvbn-async.min.js +0 -1
  1177. data/lib/wp/wp-includes/js/zxcvbn.min.js +0 -47
  1178. data/lib/wp/wp-includes/kses.php +0 -1526
  1179. data/lib/wp/wp-includes/l10n.php +0 -908
  1180. data/lib/wp/wp-includes/link-template.php +0 -3141
  1181. data/lib/wp/wp-includes/load.php +0 -828
  1182. data/lib/wp/wp-includes/locale.php +0 -368
  1183. data/lib/wp/wp-includes/media-template.php +0 -1235
  1184. data/lib/wp/wp-includes/media.php +0 -3329
  1185. data/lib/wp/wp-includes/meta.php +0 -1221
  1186. data/lib/wp/wp-includes/ms-blogs.php +0 -939
  1187. data/lib/wp/wp-includes/ms-default-constants.php +0 -153
  1188. data/lib/wp/wp-includes/ms-default-filters.php +0 -82
  1189. data/lib/wp/wp-includes/ms-deprecated.php +0 -347
  1190. data/lib/wp/wp-includes/ms-files.php +0 -82
  1191. data/lib/wp/wp-includes/ms-functions.php +0 -2476
  1192. data/lib/wp/wp-includes/ms-load.php +0 -458
  1193. data/lib/wp/wp-includes/ms-settings.php +0 -213
  1194. data/lib/wp/wp-includes/nav-menu-template.php +0 -678
  1195. data/lib/wp/wp-includes/nav-menu.php +0 -895
  1196. data/lib/wp/wp-includes/option.php +0 -1440
  1197. data/lib/wp/wp-includes/pluggable-deprecated.php +0 -192
  1198. data/lib/wp/wp-includes/pluggable.php +0 -2283
  1199. data/lib/wp/wp-includes/plugin.php +0 -920
  1200. data/lib/wp/wp-includes/pomo/entry.php +0 -78
  1201. data/lib/wp/wp-includes/pomo/mo.php +0 -262
  1202. data/lib/wp/wp-includes/pomo/po.php +0 -384
  1203. data/lib/wp/wp-includes/pomo/streams.php +0 -209
  1204. data/lib/wp/wp-includes/pomo/translations.php +0 -275
  1205. data/lib/wp/wp-includes/post-formats.php +0 -243
  1206. data/lib/wp/wp-includes/post-template.php +0 -1766
  1207. data/lib/wp/wp-includes/post-thumbnail-template.php +0 -142
  1208. data/lib/wp/wp-includes/post.php +0 -5842
  1209. data/lib/wp/wp-includes/query.php +0 -4666
  1210. data/lib/wp/wp-includes/registration-functions.php +0 -7
  1211. data/lib/wp/wp-includes/registration.php +0 -7
  1212. data/lib/wp/wp-includes/revision.php +0 -657
  1213. data/lib/wp/wp-includes/rewrite.php +0 -2180
  1214. data/lib/wp/wp-includes/rss-functions.php +0 -9
  1215. data/lib/wp/wp-includes/rss.php +0 -936
  1216. data/lib/wp/wp-includes/script-loader.php +0 -1045
  1217. data/lib/wp/wp-includes/session.php +0 -430
  1218. data/lib/wp/wp-includes/shortcodes.php +0 -410
  1219. data/lib/wp/wp-includes/taxonomy.php +0 -4006
  1220. data/lib/wp/wp-includes/template-loader.php +0 -76
  1221. data/lib/wp/wp-includes/template.php +0 -505
  1222. data/lib/wp/wp-includes/theme-compat/comments-popup.php +0 -128
  1223. data/lib/wp/wp-includes/theme-compat/comments.php +0 -101
  1224. data/lib/wp/wp-includes/theme-compat/footer.php +0 -30
  1225. data/lib/wp/wp-includes/theme-compat/header.php +0 -49
  1226. data/lib/wp/wp-includes/theme-compat/sidebar.php +0 -83
  1227. data/lib/wp/wp-includes/theme.php +0 -2014
  1228. data/lib/wp/wp-includes/update.php +0 -674
  1229. data/lib/wp/wp-includes/user.php +0 -2292
  1230. data/lib/wp/wp-includes/vars.php +0 -144
  1231. data/lib/wp/wp-includes/version.php +0 -35
  1232. data/lib/wp/wp-includes/widgets.php +0 -1514
  1233. data/lib/wp/wp-includes/wlwmanifest.xml +0 -43
  1234. data/lib/wp/wp-includes/wp-db.php +0 -2190
  1235. data/lib/wp/wp-includes/wp-diff.php +0 -523
  1236. data/lib/wp/wp-links-opml.php +0 -80
  1237. data/lib/wp/wp-load.php +0 -73
  1238. data/lib/wp/wp-login.php +0 -952
  1239. data/lib/wp/wp-mail.php +0 -260
  1240. data/lib/wp/wp-settings.php +0 -374
  1241. data/lib/wp/wp-signup.php +0 -749
  1242. data/lib/wp/wp-trackback.php +0 -127
  1243. data/lib/wp/xmlrpc.php +0 -101
@@ -1,140 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists('SimplePie') )
4
- require_once( ABSPATH . WPINC . '/class-simplepie.php' );
5
-
6
- class WP_Feed_Cache extends SimplePie_Cache {
7
- /**
8
- * Create a new SimplePie_Cache object
9
- *
10
- * @static
11
- * @access public
12
- */
13
- public function create($location, $filename, $extension) {
14
- return new WP_Feed_Cache_Transient($location, $filename, $extension);
15
- }
16
- }
17
-
18
- class WP_Feed_Cache_Transient {
19
- public $name;
20
- public $mod_name;
21
- public $lifetime = 43200; //Default lifetime in cache of 12 hours
22
-
23
- public function __construct($location, $filename, $extension) {
24
- $this->name = 'feed_' . $filename;
25
- $this->mod_name = 'feed_mod_' . $filename;
26
-
27
- $lifetime = $this->lifetime;
28
- /**
29
- * Filter the transient lifetime of the feed cache.
30
- *
31
- * @since 2.8.0
32
- *
33
- * @param int $lifetime Cache duration in seconds. Default is 43200 seconds (12 hours).
34
- * @param string $filename Unique identifier for the cache object.
35
- */
36
- $this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $filename);
37
- }
38
-
39
- public function save($data) {
40
- if ( is_a($data, 'SimplePie') )
41
- $data = $data->data;
42
-
43
- set_transient($this->name, $data, $this->lifetime);
44
- set_transient($this->mod_name, time(), $this->lifetime);
45
- return true;
46
- }
47
-
48
- public function load() {
49
- return get_transient($this->name);
50
- }
51
-
52
- public function mtime() {
53
- return get_transient($this->mod_name);
54
- }
55
-
56
- public function touch() {
57
- return set_transient($this->mod_name, time(), $this->lifetime);
58
- }
59
-
60
- public function unlink() {
61
- delete_transient($this->name);
62
- delete_transient($this->mod_name);
63
- return true;
64
- }
65
- }
66
-
67
- class WP_SimplePie_File extends SimplePie_File {
68
-
69
- public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
70
- $this->url = $url;
71
- $this->timeout = $timeout;
72
- $this->redirects = $redirects;
73
- $this->headers = $headers;
74
- $this->useragent = $useragent;
75
-
76
- $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE;
77
-
78
- if ( preg_match('/^http(s)?:\/\//i', $url) ) {
79
- $args = array(
80
- 'timeout' => $this->timeout,
81
- 'redirection' => $this->redirects,
82
- );
83
-
84
- if ( !empty($this->headers) )
85
- $args['headers'] = $this->headers;
86
-
87
- if ( SIMPLEPIE_USERAGENT != $this->useragent ) //Use default WP user agent unless custom has been specified
88
- $args['user-agent'] = $this->useragent;
89
-
90
- $res = wp_safe_remote_request($url, $args);
91
-
92
- if ( is_wp_error($res) ) {
93
- $this->error = 'WP HTTP Error: ' . $res->get_error_message();
94
- $this->success = false;
95
- } else {
96
- $this->headers = wp_remote_retrieve_headers( $res );
97
- $this->body = wp_remote_retrieve_body( $res );
98
- $this->status_code = wp_remote_retrieve_response_code( $res );
99
- }
100
- } else {
101
- $this->error = '';
102
- $this->success = false;
103
- }
104
- }
105
- }
106
-
107
- /**
108
- * WordPress SimplePie Sanitization Class
109
- *
110
- * Extension of the SimplePie_Sanitize class to use KSES, because
111
- * we cannot universally count on DOMDocument being available
112
- *
113
- * @package WordPress
114
- * @since 3.5.0
115
- */
116
- class WP_SimplePie_Sanitize_KSES extends SimplePie_Sanitize {
117
- public function sanitize( $data, $type, $base = '' ) {
118
- $data = trim( $data );
119
- if ( $type & SIMPLEPIE_CONSTRUCT_MAYBE_HTML ) {
120
- if (preg_match('/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data)) {
121
- $type |= SIMPLEPIE_CONSTRUCT_HTML;
122
- }
123
- else {
124
- $type |= SIMPLEPIE_CONSTRUCT_TEXT;
125
- }
126
- }
127
- if ( $type & SIMPLEPIE_CONSTRUCT_BASE64 ) {
128
- $data = base64_decode( $data );
129
- }
130
- if ( $type & ( SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML ) ) {
131
- $data = wp_kses_post( $data );
132
- if ( $this->output_encoding !== 'UTF-8' ) {
133
- $data = $this->registry->call( 'Misc', 'change_encoding', array( $data, 'UTF-8', $this->output_encoding ) );
134
- }
135
- return $data;
136
- } else {
137
- return parent::sanitize( $data, $type, $base );
138
- }
139
- }
140
- }
@@ -1,2245 +0,0 @@
1
- <?php
2
- /**
3
- * Simple and uniform HTTP request API.
4
- *
5
- * Standardizes the HTTP requests for WordPress. Handles cookies, gzip encoding and decoding, chunk
6
- * decoding, if HTTP 1.1 and various other difficult HTTP protocol implementations.
7
- *
8
- * @link https://core.trac.wordpress.org/ticket/4779 HTTP API Proposal
9
- *
10
- * @package WordPress
11
- * @subpackage HTTP
12
- * @since 2.7.0
13
- */
14
-
15
- /**
16
- * WordPress HTTP Class for managing HTTP Transports and making HTTP requests.
17
- *
18
- * This class is used to consistently make outgoing HTTP requests easy for developers
19
- * while still being compatible with the many PHP configurations under which
20
- * WordPress runs.
21
- *
22
- * Debugging includes several actions, which pass different variables for debugging the HTTP API.
23
- *
24
- * @package WordPress
25
- * @subpackage HTTP
26
- * @since 2.7.0
27
- */
28
- class WP_Http {
29
-
30
- /**
31
- * Send an HTTP request to a URI.
32
- *
33
- * Please note: The only URI that are supported in the HTTP Transport implementation
34
- * are the HTTP and HTTPS protocols.
35
- *
36
- * @access public
37
- * @since 2.7.0
38
- *
39
- * @param string $url The request URL.
40
- * @param string|array $args {
41
- * Optional. Array or string of HTTP request arguments.
42
- *
43
- * @type string $method Request method. Accepts 'GET', 'POST', 'HEAD', or 'PUT'.
44
- * Some transports technically allow others, but should not be
45
- * assumed. Default 'GET'.
46
- * @type int $timeout How long the connection should stay open in seconds. Default 5.
47
- * @type int $redirection Number of allowed redirects. Not supported by all transports
48
- * Default 5.
49
- * @type string $httpversion Version of the HTTP protocol to use. Accepts '1.0' and '1.1'.
50
- * Default '1.0'.
51
- * @type string $user-agent User-agent value sent.
52
- * Default WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ).
53
- * @type bool $reject_unsafe_urls Whether to pass URLs through {@see wp_http_validate_url()}.
54
- * Default false.
55
- * @type bool $blocking Whether the calling code requires the result of the request.
56
- * If set to false, the request will be sent to the remote server,
57
- * and processing returned to the calling code immediately, the caller
58
- * will know if the request succeeded or failed, but will not receive
59
- * any response from the remote server. Default true.
60
- * @type string|array $headers Array or string of headers to send with the request.
61
- * Default empty array.
62
- * @type array $cookies List of cookies to send with the request. Default empty array.
63
- * @type string|array $body Body to send with the request. Default null.
64
- * @type bool $compress Whether to compress the $body when sending the request.
65
- * Default false.
66
- * @type bool $decompress Whether to decompress a compressed response. If set to false and
67
- * compressed content is returned in the response anyway, it will
68
- * need to be separately decompressed. Default true.
69
- * @type bool $sslverify Whether to verify SSL for the request. Default true.
70
- * @type string sslcertificates Absolute path to an SSL certificate .crt file.
71
- * Default ABSPATH . WPINC . '/certificates/ca-bundle.crt'.
72
- * @type bool $stream Whether to stream to a file. If set to true and no filename was
73
- * given, it will be droped it in the WP temp dir and its name will
74
- * be set using the basename of the URL. Default false.
75
- * @type string $filename Filename of the file to write to when streaming. $stream must be
76
- * set to true. Default null.
77
- * @type int $limit_response_size Size in bytes to limit the response to. Default null.
78
- *
79
- * }
80
- * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
81
- * A WP_Error instance upon error.
82
- */
83
- public function request( $url, $args = array() ) {
84
- global $wp_version;
85
-
86
- $defaults = array(
87
- 'method' => 'GET',
88
- /**
89
- * Filter the timeout value for an HTTP request.
90
- *
91
- * @since 2.7.0
92
- *
93
- * @param int $timeout_value Time in seconds until a request times out.
94
- * Default 5.
95
- */
96
- 'timeout' => apply_filters( 'http_request_timeout', 5 ),
97
- /**
98
- * Filter the number of redirects allowed during an HTTP request.
99
- *
100
- * @since 2.7.0
101
- *
102
- * @param int $redirect_count Number of redirects allowed. Default 5.
103
- */
104
- 'redirection' => apply_filters( 'http_request_redirection_count', 5 ),
105
- /**
106
- * Filter the version of the HTTP protocol used in a request.
107
- *
108
- * @since 2.7.0
109
- *
110
- * @param string $version Version of HTTP used. Accepts '1.0' and '1.1'.
111
- * Default '1.0'.
112
- */
113
- 'httpversion' => apply_filters( 'http_request_version', '1.0' ),
114
- /**
115
- * Filter the user agent value sent with an HTTP request.
116
- *
117
- * @since 2.7.0
118
- *
119
- * @param string $user_agent WordPress user agent string.
120
- */
121
- 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ),
122
- /**
123
- * Filter whether to pass URLs through wp_http_validate_url() in an HTTP request.
124
- *
125
- * @since 3.6.0
126
- *
127
- * @param bool $pass_url Whether to pass URLs through wp_http_validate_url().
128
- * Default false.
129
- */
130
- 'reject_unsafe_urls' => apply_filters( 'http_request_reject_unsafe_urls', false ),
131
- 'blocking' => true,
132
- 'headers' => array(),
133
- 'cookies' => array(),
134
- 'body' => null,
135
- 'compress' => false,
136
- 'decompress' => true,
137
- 'sslverify' => true,
138
- 'sslcertificates' => ABSPATH . WPINC . '/certificates/ca-bundle.crt',
139
- 'stream' => false,
140
- 'filename' => null,
141
- 'limit_response_size' => null,
142
- );
143
-
144
- // Pre-parse for the HEAD checks.
145
- $args = wp_parse_args( $args );
146
-
147
- // By default, Head requests do not cause redirections.
148
- if ( isset($args['method']) && 'HEAD' == $args['method'] )
149
- $defaults['redirection'] = 0;
150
-
151
- $r = wp_parse_args( $args, $defaults );
152
- /**
153
- * Filter the arguments used in an HTTP request.
154
- *
155
- * @since 2.7.0
156
- *
157
- * @param array $r An array of HTTP request arguments.
158
- * @param string $url The request URL.
159
- */
160
- $r = apply_filters( 'http_request_args', $r, $url );
161
-
162
- // The transports decrement this, store a copy of the original value for loop purposes.
163
- if ( ! isset( $r['_redirection'] ) )
164
- $r['_redirection'] = $r['redirection'];
165
-
166
- /**
167
- * Filter whether to preempt an HTTP request's return.
168
- *
169
- * Returning a truthy value to the filter will short-circuit
170
- * the HTTP request and return early with that value.
171
- *
172
- * @since 2.9.0
173
- *
174
- * @param bool $preempt Whether to preempt an HTTP request return. Default false.
175
- * @param array $r HTTP request arguments.
176
- * @param string $url The request URL.
177
- */
178
- $pre = apply_filters( 'pre_http_request', false, $r, $url );
179
- if ( false !== $pre )
180
- return $pre;
181
-
182
- if ( function_exists( 'wp_kses_bad_protocol' ) ) {
183
- if ( $r['reject_unsafe_urls'] )
184
- $url = wp_http_validate_url( $url );
185
- $url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) );
186
- }
187
-
188
- $arrURL = @parse_url( $url );
189
-
190
- if ( empty( $url ) || empty( $arrURL['scheme'] ) )
191
- return new WP_Error('http_request_failed', __('A valid URL was not provided.'));
192
-
193
- if ( $this->block_request( $url ) )
194
- return new WP_Error( 'http_request_failed', __( 'User has blocked requests through HTTP.' ) );
195
-
196
- /*
197
- * Determine if this is a https call and pass that on to the transport functions
198
- * so that we can blacklist the transports that do not support ssl verification
199
- */
200
- $r['ssl'] = $arrURL['scheme'] == 'https' || $arrURL['scheme'] == 'ssl';
201
-
202
- // Determine if this request is to OUR install of WordPress.
203
- $homeURL = parse_url( get_bloginfo( 'url' ) );
204
- $r['local'] = 'localhost' == $arrURL['host'] || ( isset( $homeURL['host'] ) && $homeURL['host'] == $arrURL['host'] );
205
- unset( $homeURL );
206
-
207
- /*
208
- * If we are streaming to a file but no filename was given drop it in the WP temp dir
209
- * and pick its name using the basename of the $url.
210
- */
211
- if ( $r['stream'] && empty( $r['filename'] ) )
212
- $r['filename'] = get_temp_dir() . basename( $url );
213
-
214
- /*
215
- * Force some settings if we are streaming to a file and check for existence and perms
216
- * of destination directory.
217
- */
218
- if ( $r['stream'] ) {
219
- $r['blocking'] = true;
220
- if ( ! wp_is_writable( dirname( $r['filename'] ) ) )
221
- return new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) );
222
- }
223
-
224
- if ( is_null( $r['headers'] ) )
225
- $r['headers'] = array();
226
-
227
- if ( ! is_array( $r['headers'] ) ) {
228
- $processedHeaders = WP_Http::processHeaders( $r['headers'], $url );
229
- $r['headers'] = $processedHeaders['headers'];
230
- }
231
-
232
- if ( isset( $r['headers']['User-Agent'] ) ) {
233
- $r['user-agent'] = $r['headers']['User-Agent'];
234
- unset( $r['headers']['User-Agent'] );
235
- }
236
-
237
- if ( isset( $r['headers']['user-agent'] ) ) {
238
- $r['user-agent'] = $r['headers']['user-agent'];
239
- unset( $r['headers']['user-agent'] );
240
- }
241
-
242
- if ( '1.1' == $r['httpversion'] && !isset( $r['headers']['connection'] ) ) {
243
- $r['headers']['connection'] = 'close';
244
- }
245
-
246
- // Construct Cookie: header if any cookies are set.
247
- WP_Http::buildCookieHeader( $r );
248
-
249
- // Avoid issues where mbstring.func_overload is enabled.
250
- mbstring_binary_safe_encoding();
251
-
252
- if ( ! isset( $r['headers']['Accept-Encoding'] ) ) {
253
- if ( $encoding = WP_Http_Encoding::accept_encoding( $url, $r ) )
254
- $r['headers']['Accept-Encoding'] = $encoding;
255
- }
256
-
257
- if ( ( ! is_null( $r['body'] ) && '' != $r['body'] ) || 'POST' == $r['method'] || 'PUT' == $r['method'] ) {
258
- if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) {
259
- $r['body'] = http_build_query( $r['body'], null, '&' );
260
-
261
- if ( ! isset( $r['headers']['Content-Type'] ) )
262
- $r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' );
263
- }
264
-
265
- if ( '' === $r['body'] )
266
- $r['body'] = null;
267
-
268
- if ( ! isset( $r['headers']['Content-Length'] ) && ! isset( $r['headers']['content-length'] ) )
269
- $r['headers']['Content-Length'] = strlen( $r['body'] );
270
- }
271
-
272
- $response = $this->_dispatch_request( $url, $r );
273
-
274
- reset_mbstring_encoding();
275
-
276
- if ( is_wp_error( $response ) )
277
- return $response;
278
-
279
- // Append cookies that were used in this request to the response
280
- if ( ! empty( $r['cookies'] ) ) {
281
- $cookies_set = wp_list_pluck( $response['cookies'], 'name' );
282
- foreach ( $r['cookies'] as $cookie ) {
283
- if ( ! in_array( $cookie->name, $cookies_set ) && $cookie->test( $url ) ) {
284
- $response['cookies'][] = $cookie;
285
- }
286
- }
287
- }
288
-
289
- return $response;
290
- }
291
-
292
- /**
293
- * Tests which transports are capable of supporting the request.
294
- *
295
- * @since 3.2.0
296
- * @access private
297
- *
298
- * @param array $args Request arguments
299
- * @param string $url URL to Request
300
- *
301
- * @return string|bool Class name for the first transport that claims to support the request. False if no transport claims to support the request.
302
- */
303
- public function _get_first_available_transport( $args, $url = null ) {
304
- /**
305
- * Filter which HTTP transports are available and in what order.
306
- *
307
- * @since 3.7.0
308
- *
309
- * @param array $value Array of HTTP transports to check. Default array contains
310
- * 'curl', and 'streams', in that order.
311
- * @param array $args HTTP request arguments.
312
- * @param string $url The URL to request.
313
- */
314
- $request_order = apply_filters( 'http_api_transports', array( 'curl', 'streams' ), $args, $url );
315
-
316
- // Loop over each transport on each HTTP request looking for one which will serve this request's needs.
317
- foreach ( $request_order as $transport ) {
318
- $class = 'WP_HTTP_' . $transport;
319
-
320
- // Check to see if this transport is a possibility, calls the transport statically.
321
- if ( !call_user_func( array( $class, 'test' ), $args, $url ) )
322
- continue;
323
-
324
- return $class;
325
- }
326
-
327
- return false;
328
- }
329
-
330
- /**
331
- * Dispatches a HTTP request to a supporting transport.
332
- *
333
- * Tests each transport in order to find a transport which matches the request arguments.
334
- * Also caches the transport instance to be used later.
335
- *
336
- * The order for requests is cURL, and then PHP Streams.
337
- *
338
- * @since 3.2.0
339
- * @access private
340
- *
341
- * @param string $url URL to Request
342
- * @param array $args Request arguments
343
- * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
344
- */
345
- private function _dispatch_request( $url, $args ) {
346
- static $transports = array();
347
-
348
- $class = $this->_get_first_available_transport( $args, $url );
349
- if ( !$class )
350
- return new WP_Error( 'http_failure', __( 'There are no HTTP transports available which can complete the requested request.' ) );
351
-
352
- // Transport claims to support request, instantiate it and give it a whirl.
353
- if ( empty( $transports[$class] ) )
354
- $transports[$class] = new $class;
355
-
356
- $response = $transports[$class]->request( $url, $args );
357
-
358
- /**
359
- * Fires after an HTTP API response is received and before the response is returned.
360
- *
361
- * @since 2.8.0
362
- *
363
- * @param array|WP_Error $response HTTP response or WP_Error object.
364
- * @param string $context Context under which the hook is fired.
365
- * @param string $class HTTP transport used.
366
- * @param array $args HTTP request arguments.
367
- * @param string $url The request URL.
368
- */
369
- do_action( 'http_api_debug', $response, 'response', $class, $args, $url );
370
-
371
- if ( is_wp_error( $response ) )
372
- return $response;
373
-
374
- /**
375
- * Filter the HTTP API response immediately before the response is returned.
376
- *
377
- * @since 2.9.0
378
- *
379
- * @param array $response HTTP response.
380
- * @param array $args HTTP request arguments.
381
- * @param string $url The request URL.
382
- */
383
- return apply_filters( 'http_response', $response, $args, $url );
384
- }
385
-
386
- /**
387
- * Uses the POST HTTP method.
388
- *
389
- * Used for sending data that is expected to be in the body.
390
- *
391
- * @access public
392
- * @since 2.7.0
393
- *
394
- * @param string $url The request URL.
395
- * @param string|array $args Optional. Override the defaults.
396
- * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
397
- */
398
- public function post($url, $args = array()) {
399
- $defaults = array('method' => 'POST');
400
- $r = wp_parse_args( $args, $defaults );
401
- return $this->request($url, $r);
402
- }
403
-
404
- /**
405
- * Uses the GET HTTP method.
406
- *
407
- * Used for sending data that is expected to be in the body.
408
- *
409
- * @access public
410
- * @since 2.7.0
411
- *
412
- * @param string $url The request URL.
413
- * @param string|array $args Optional. Override the defaults.
414
- * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
415
- */
416
- public function get($url, $args = array()) {
417
- $defaults = array('method' => 'GET');
418
- $r = wp_parse_args( $args, $defaults );
419
- return $this->request($url, $r);
420
- }
421
-
422
- /**
423
- * Uses the HEAD HTTP method.
424
- *
425
- * Used for sending data that is expected to be in the body.
426
- *
427
- * @access public
428
- * @since 2.7.0
429
- *
430
- * @param string $url The request URL.
431
- * @param string|array $args Optional. Override the defaults.
432
- * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
433
- */
434
- public function head($url, $args = array()) {
435
- $defaults = array('method' => 'HEAD');
436
- $r = wp_parse_args( $args, $defaults );
437
- return $this->request($url, $r);
438
- }
439
-
440
- /**
441
- * Parses the responses and splits the parts into headers and body.
442
- *
443
- * @access public
444
- * @static
445
- * @since 2.7.0
446
- *
447
- * @param string $strResponse The full response string
448
- * @return array Array with 'headers' and 'body' keys.
449
- */
450
- public static function processResponse($strResponse) {
451
- $res = explode("\r\n\r\n", $strResponse, 2);
452
-
453
- return array('headers' => $res[0], 'body' => isset($res[1]) ? $res[1] : '');
454
- }
455
-
456
- /**
457
- * Transform header string into an array.
458
- *
459
- * If an array is given then it is assumed to be raw header data with numeric keys with the
460
- * headers as the values. No headers must be passed that were already processed.
461
- *
462
- * @access public
463
- * @static
464
- * @since 2.7.0
465
- *
466
- * @param string|array $headers
467
- * @param string $url The URL that was requested
468
- * @return array Processed string headers. If duplicate headers are encountered,
469
- * Then a numbered array is returned as the value of that header-key.
470
- */
471
- public static function processHeaders( $headers, $url = '' ) {
472
- // Split headers, one per array element.
473
- if ( is_string($headers) ) {
474
- // Tolerate line terminator: CRLF = LF (RFC 2616 19.3).
475
- $headers = str_replace("\r\n", "\n", $headers);
476
- /*
477
- * Unfold folded header fields. LWS = [CRLF] 1*( SP | HT ) <US-ASCII SP, space (32)>,
478
- * <US-ASCII HT, horizontal-tab (9)> (RFC 2616 2.2).
479
- */
480
- $headers = preg_replace('/\n[ \t]/', ' ', $headers);
481
- // Create the headers array.
482
- $headers = explode("\n", $headers);
483
- }
484
-
485
- $response = array('code' => 0, 'message' => '');
486
-
487
- /*
488
- * If a redirection has taken place, The headers for each page request may have been passed.
489
- * In this case, determine the final HTTP header and parse from there.
490
- */
491
- for ( $i = count($headers)-1; $i >= 0; $i-- ) {
492
- if ( !empty($headers[$i]) && false === strpos($headers[$i], ':') ) {
493
- $headers = array_splice($headers, $i);
494
- break;
495
- }
496
- }
497
-
498
- $cookies = array();
499
- $newheaders = array();
500
- foreach ( (array) $headers as $tempheader ) {
501
- if ( empty($tempheader) )
502
- continue;
503
-
504
- if ( false === strpos($tempheader, ':') ) {
505
- $stack = explode(' ', $tempheader, 3);
506
- $stack[] = '';
507
- list( , $response['code'], $response['message']) = $stack;
508
- continue;
509
- }
510
-
511
- list($key, $value) = explode(':', $tempheader, 2);
512
-
513
- $key = strtolower( $key );
514
- $value = trim( $value );
515
-
516
- if ( isset( $newheaders[ $key ] ) ) {
517
- if ( ! is_array( $newheaders[ $key ] ) )
518
- $newheaders[$key] = array( $newheaders[ $key ] );
519
- $newheaders[ $key ][] = $value;
520
- } else {
521
- $newheaders[ $key ] = $value;
522
- }
523
- if ( 'set-cookie' == $key )
524
- $cookies[] = new WP_Http_Cookie( $value, $url );
525
- }
526
-
527
- // Cast the Response Code to an int
528
- $response['code'] = intval( $response['code'] );
529
-
530
- return array('response' => $response, 'headers' => $newheaders, 'cookies' => $cookies);
531
- }
532
-
533
- /**
534
- * Takes the arguments for a ::request() and checks for the cookie array.
535
- *
536
- * If it's found, then it upgrades any basic name => value pairs to WP_Http_Cookie instances,
537
- * which are each parsed into strings and added to the Cookie: header (within the arguments array).
538
- * Edits the array by reference.
539
- *
540
- * @access public
541
- * @version 2.8.0
542
- * @static
543
- *
544
- * @param array $r Full array of args passed into ::request()
545
- */
546
- public static function buildCookieHeader( &$r ) {
547
- if ( ! empty($r['cookies']) ) {
548
- // Upgrade any name => value cookie pairs to WP_HTTP_Cookie instances.
549
- foreach ( $r['cookies'] as $name => $value ) {
550
- if ( ! is_object( $value ) )
551
- $r['cookies'][ $name ] = new WP_HTTP_Cookie( array( 'name' => $name, 'value' => $value ) );
552
- }
553
-
554
- $cookies_header = '';
555
- foreach ( (array) $r['cookies'] as $cookie ) {
556
- $cookies_header .= $cookie->getHeaderValue() . '; ';
557
- }
558
-
559
- $cookies_header = substr( $cookies_header, 0, -2 );
560
- $r['headers']['cookie'] = $cookies_header;
561
- }
562
- }
563
-
564
- /**
565
- * Decodes chunk transfer-encoding, based off the HTTP 1.1 specification.
566
- *
567
- * Based off the HTTP http_encoding_dechunk function.
568
- *
569
- * @link http://tools.ietf.org/html/rfc2616#section-19.4.6 Process for chunked decoding.
570
- *
571
- * @access public
572
- * @since 2.7.0
573
- * @static
574
- *
575
- * @param string $body Body content
576
- * @return string Chunked decoded body on success or raw body on failure.
577
- */
578
- public static function chunkTransferDecode( $body ) {
579
- // The body is not chunked encoded or is malformed.
580
- if ( ! preg_match( '/^([0-9a-f]+)[^\r\n]*\r\n/i', trim( $body ) ) )
581
- return $body;
582
-
583
- $parsed_body = '';
584
-
585
- // We'll be altering $body, so need a backup in case of error.
586
- $body_original = $body;
587
-
588
- while ( true ) {
589
- $has_chunk = (bool) preg_match( '/^([0-9a-f]+)[^\r\n]*\r\n/i', $body, $match );
590
- if ( ! $has_chunk || empty( $match[1] ) )
591
- return $body_original;
592
-
593
- $length = hexdec( $match[1] );
594
- $chunk_length = strlen( $match[0] );
595
-
596
- // Parse out the chunk of data.
597
- $parsed_body .= substr( $body, $chunk_length, $length );
598
-
599
- // Remove the chunk from the raw data.
600
- $body = substr( $body, $length + $chunk_length );
601
-
602
- // End of the document.
603
- if ( '0' === trim( $body ) )
604
- return $parsed_body;
605
- }
606
- }
607
-
608
- /**
609
- * Block requests through the proxy.
610
- *
611
- * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will
612
- * prevent plugins from working and core functionality, if you don't include api.wordpress.org.
613
- *
614
- * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL as true in your wp-config.php
615
- * file and this will only allow localhost and your blog to make requests. The constant
616
- * WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
617
- * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow, wildcard domains
618
- * are supported, eg *.wordpress.org will allow for all subdomains of wordpress.org to be contacted.
619
- *
620
- * @since 2.8.0
621
- * @link https://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
622
- * @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_ACCESSIBLE_HOSTS
623
- *
624
- * @param string $uri URI of url.
625
- * @return bool True to block, false to allow.
626
- */
627
- public function block_request($uri) {
628
- // We don't need to block requests, because nothing is blocked.
629
- if ( ! defined( 'WP_HTTP_BLOCK_EXTERNAL' ) || ! WP_HTTP_BLOCK_EXTERNAL )
630
- return false;
631
-
632
- $check = parse_url($uri);
633
- if ( ! $check )
634
- return true;
635
-
636
- $home = parse_url( get_option('siteurl') );
637
-
638
- // Don't block requests back to ourselves by default.
639
- if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) {
640
- /**
641
- * Filter whether to block local requests through the proxy.
642
- *
643
- * @since 2.8.0
644
- *
645
- * @param bool $block Whether to block local requests through proxy.
646
- * Default false.
647
- */
648
- return apply_filters( 'block_local_requests', false );
649
- }
650
-
651
- if ( !defined('WP_ACCESSIBLE_HOSTS') )
652
- return true;
653
-
654
- static $accessible_hosts;
655
- static $wildcard_regex = false;
656
- if ( null == $accessible_hosts ) {
657
- $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS);
658
-
659
- if ( false !== strpos(WP_ACCESSIBLE_HOSTS, '*') ) {
660
- $wildcard_regex = array();
661
- foreach ( $accessible_hosts as $host )
662
- $wildcard_regex[] = str_replace( '\*', '.+', preg_quote( $host, '/' ) );
663
- $wildcard_regex = '/^(' . implode('|', $wildcard_regex) . ')$/i';
664
- }
665
- }
666
-
667
- if ( !empty($wildcard_regex) )
668
- return !preg_match($wildcard_regex, $check['host']);
669
- else
670
- return !in_array( $check['host'], $accessible_hosts ); //Inverse logic, If it's in the array, then we can't access it.
671
-
672
- }
673
-
674
- /**
675
- * A wrapper for PHP's parse_url() function that handles edgecases in < PHP 5.4.7
676
- *
677
- * PHP 5.4.7 expanded parse_url()'s ability to handle non-absolute url's, including
678
- * schemeless and relative url's with :// in the path, this works around those limitations
679
- * providing a standard output on PHP 5.2~5.4+.
680
- *
681
- * Error suppression is used as prior to PHP 5.3.3, an E_WARNING would be generated when URL parsing failed.
682
- *
683
- * @since 4.1.0
684
- *
685
- * @access protected
686
- * @param string $url The URL to parse
687
- * @return bool|array False on failure; Array of URL components on success; See parse_url()'s return values.
688
- */
689
- protected static function parse_url( $url ) {
690
- $parts = @parse_url( $url );
691
- if ( ! $parts ) {
692
- // < PHP 5.4.7 compat, trouble with relative paths including a scheme break in the path
693
- if ( '/' == $url[0] && false !== strpos( $url, '://' ) ) {
694
- // Since we know it's a relative path, prefix with a scheme/host placeholder and try again
695
- if ( ! $parts = @parse_url( 'placeholder://placeholder' . $url ) ) {
696
- return $parts;
697
- }
698
- // Remove the placeholder values
699
- unset( $parts['scheme'], $parts['host'] );
700
- } else {
701
- return $parts;
702
- }
703
- }
704
-
705
- // < PHP 5.4.7 compat, doesn't detect schemeless URL's host field
706
- if ( '//' == substr( $url, 0, 2 ) && ! isset( $parts['host'] ) ) {
707
- list( $parts['host'], $slashless_path ) = explode( '/', substr( $parts['path'], 2 ), 2 );
708
- $parts['path'] = "/{$slashless_path}";
709
- }
710
-
711
- return $parts;
712
- }
713
-
714
- /**
715
- * Converts a relative URL to an absolute URL relative to a given URL.
716
- *
717
- * If an Absolute URL is provided, no processing of that URL is done.
718
- *
719
- * @since 3.4.0
720
- *
721
- * @access public
722
- * @param string $maybe_relative_path The URL which might be relative
723
- * @param string $url The URL which $maybe_relative_path is relative to
724
- * @return string An Absolute URL, in a failure condition where the URL cannot be parsed, the relative URL will be returned.
725
- */
726
- public static function make_absolute_url( $maybe_relative_path, $url ) {
727
- if ( empty( $url ) )
728
- return $maybe_relative_path;
729
-
730
- if ( ! $url_parts = WP_HTTP::parse_url( $url ) ) {
731
- return $maybe_relative_path;
732
- }
733
-
734
- if ( ! $relative_url_parts = WP_HTTP::parse_url( $maybe_relative_path ) ) {
735
- return $maybe_relative_path;
736
- }
737
-
738
- // Check for a scheme on the 'relative' url
739
- if ( ! empty( $relative_url_parts['scheme'] ) ) {
740
- return $maybe_relative_path;
741
- }
742
-
743
- $absolute_path = $url_parts['scheme'] . '://';
744
-
745
- // Schemeless URL's will make it this far, so we check for a host in the relative url and convert it to a protocol-url
746
- if ( isset( $relative_url_parts['host'] ) ) {
747
- $absolute_path .= $relative_url_parts['host'];
748
- if ( isset( $relative_url_parts['port'] ) )
749
- $absolute_path .= ':' . $relative_url_parts['port'];
750
- } else {
751
- $absolute_path .= $url_parts['host'];
752
- if ( isset( $url_parts['port'] ) )
753
- $absolute_path .= ':' . $url_parts['port'];
754
- }
755
-
756
- // Start off with the Absolute URL path.
757
- $path = ! empty( $url_parts['path'] ) ? $url_parts['path'] : '/';
758
-
759
- // If it's a root-relative path, then great.
760
- if ( ! empty( $relative_url_parts['path'] ) && '/' == $relative_url_parts['path'][0] ) {
761
- $path = $relative_url_parts['path'];
762
-
763
- // Else it's a relative path.
764
- } elseif ( ! empty( $relative_url_parts['path'] ) ) {
765
- // Strip off any file components from the absolute path.
766
- $path = substr( $path, 0, strrpos( $path, '/' ) + 1 );
767
-
768
- // Build the new path.
769
- $path .= $relative_url_parts['path'];
770
-
771
- // Strip all /path/../ out of the path.
772
- while ( strpos( $path, '../' ) > 1 ) {
773
- $path = preg_replace( '![^/]+/\.\./!', '', $path );
774
- }
775
-
776
- // Strip any final leading ../ from the path.
777
- $path = preg_replace( '!^/(\.\./)+!', '', $path );
778
- }
779
-
780
- // Add the Query string.
781
- if ( ! empty( $relative_url_parts['query'] ) )
782
- $path .= '?' . $relative_url_parts['query'];
783
-
784
- return $absolute_path . '/' . ltrim( $path, '/' );
785
- }
786
-
787
- /**
788
- * Handles HTTP Redirects and follows them if appropriate.
789
- *
790
- * @since 3.7.0
791
- *
792
- * @param string $url The URL which was requested.
793
- * @param array $args The Arguments which were used to make the request.
794
- * @param array $response The Response of the HTTP request.
795
- * @return false|object False if no redirect is present, a WP_HTTP or WP_Error result otherwise.
796
- */
797
- public static function handle_redirects( $url, $args, $response ) {
798
- // If no redirects are present, or, redirects were not requested, perform no action.
799
- if ( ! isset( $response['headers']['location'] ) || 0 === $args['_redirection'] )
800
- return false;
801
-
802
- // Only perform redirections on redirection http codes.
803
- if ( $response['response']['code'] > 399 || $response['response']['code'] < 300 )
804
- return false;
805
-
806
- // Don't redirect if we've run out of redirects.
807
- if ( $args['redirection']-- <= 0 )
808
- return new WP_Error( 'http_request_failed', __('Too many redirects.') );
809
-
810
- $redirect_location = $response['headers']['location'];
811
-
812
- // If there were multiple Location headers, use the last header specified.
813
- if ( is_array( $redirect_location ) )
814
- $redirect_location = array_pop( $redirect_location );
815
-
816
- $redirect_location = WP_HTTP::make_absolute_url( $redirect_location, $url );
817
-
818
- // POST requests should not POST to a redirected location.
819
- if ( 'POST' == $args['method'] ) {
820
- if ( in_array( $response['response']['code'], array( 302, 303 ) ) )
821
- $args['method'] = 'GET';
822
- }
823
-
824
- // Include valid cookies in the redirect process.
825
- if ( ! empty( $response['cookies'] ) ) {
826
- foreach ( $response['cookies'] as $cookie ) {
827
- if ( $cookie->test( $redirect_location ) )
828
- $args['cookies'][] = $cookie;
829
- }
830
- }
831
-
832
- return wp_remote_request( $redirect_location, $args );
833
- }
834
-
835
- /**
836
- * Determines if a specified string represents an IP address or not.
837
- *
838
- * This function also detects the type of the IP address, returning either
839
- * '4' or '6' to represent a IPv4 and IPv6 address respectively.
840
- * This does not verify if the IP is a valid IP, only that it appears to be
841
- * an IP address.
842
- *
843
- * @see http://home.deds.nl/~aeron/regex/ for IPv6 regex
844
- *
845
- * @since 3.7.0
846
- * @static
847
- *
848
- * @param string $maybe_ip A suspected IP address
849
- * @return integer|bool Upon success, '4' or '6' to represent a IPv4 or IPv6 address, false upon failure
850
- */
851
- public static function is_ip_address( $maybe_ip ) {
852
- if ( preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $maybe_ip ) )
853
- return 4;
854
-
855
- if ( false !== strpos( $maybe_ip, ':' ) && preg_match( '/^(((?=.*(::))(?!.*\3.+\3))\3?|([\dA-F]{1,4}(\3|:\b|$)|\2))(?4){5}((?4){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i', trim( $maybe_ip, ' []' ) ) )
856
- return 6;
857
-
858
- return false;
859
- }
860
-
861
- }
862
-
863
- /**
864
- * HTTP request method uses PHP Streams to retrieve the url.
865
- *
866
- * @since 2.7.0
867
- * @since 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().
868
- */
869
- class WP_Http_Streams {
870
- /**
871
- * Send a HTTP request to a URI using PHP Streams.
872
- *
873
- * @see WP_Http::request For default options descriptions.
874
- *
875
- * @since 2.7.0
876
- * @since 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().
877
- *
878
- * @access public
879
- * @param string $url The request URL.
880
- * @param string|array $args Optional. Override the defaults.
881
- * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
882
- */
883
- public function request($url, $args = array()) {
884
- $defaults = array(
885
- 'method' => 'GET', 'timeout' => 5,
886
- 'redirection' => 5, 'httpversion' => '1.0',
887
- 'blocking' => true,
888
- 'headers' => array(), 'body' => null, 'cookies' => array()
889
- );
890
-
891
- $r = wp_parse_args( $args, $defaults );
892
-
893
- if ( isset($r['headers']['User-Agent']) ) {
894
- $r['user-agent'] = $r['headers']['User-Agent'];
895
- unset($r['headers']['User-Agent']);
896
- } else if ( isset($r['headers']['user-agent']) ) {
897
- $r['user-agent'] = $r['headers']['user-agent'];
898
- unset($r['headers']['user-agent']);
899
- }
900
-
901
- // Construct Cookie: header if any cookies are set.
902
- WP_Http::buildCookieHeader( $r );
903
-
904
- $arrURL = parse_url($url);
905
-
906
- $connect_host = $arrURL['host'];
907
-
908
- $secure_transport = ( $arrURL['scheme'] == 'ssl' || $arrURL['scheme'] == 'https' );
909
- if ( ! isset( $arrURL['port'] ) ) {
910
- if ( $arrURL['scheme'] == 'ssl' || $arrURL['scheme'] == 'https' ) {
911
- $arrURL['port'] = 443;
912
- $secure_transport = true;
913
- } else {
914
- $arrURL['port'] = 80;
915
- }
916
- }
917
-
918
- // Always pass a Path, defaulting to the root in cases such as http://example.com
919
- if ( ! isset( $arrURL['path'] ) ) {
920
- $arrURL['path'] = '/';
921
- }
922
-
923
- if ( isset( $r['headers']['Host'] ) || isset( $r['headers']['host'] ) ) {
924
- if ( isset( $r['headers']['Host'] ) )
925
- $arrURL['host'] = $r['headers']['Host'];
926
- else
927
- $arrURL['host'] = $r['headers']['host'];
928
- unset( $r['headers']['Host'], $r['headers']['host'] );
929
- }
930
-
931
- /*
932
- * Certain versions of PHP have issues with 'localhost' and IPv6, It attempts to connect
933
- * to ::1, which fails when the server is not set up for it. For compatibility, always
934
- * connect to the IPv4 address.
935
- */
936
- if ( 'localhost' == strtolower( $connect_host ) )
937
- $connect_host = '127.0.0.1';
938
-
939
- $connect_host = $secure_transport ? 'ssl://' . $connect_host : 'tcp://' . $connect_host;
940
-
941
- $is_local = isset( $r['local'] ) && $r['local'];
942
- $ssl_verify = isset( $r['sslverify'] ) && $r['sslverify'];
943
- if ( $is_local ) {
944
- /**
945
- * Filter whether SSL should be verified for local requests.
946
- *
947
- * @since 2.8.0
948
- *
949
- * @param bool $ssl_verify Whether to verify the SSL connection. Default true.
950
- */
951
- $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );
952
- } elseif ( ! $is_local ) {
953
- /**
954
- * Filter whether SSL should be verified for non-local requests.
955
- *
956
- * @since 2.8.0
957
- *
958
- * @param bool $ssl_verify Whether to verify the SSL connection. Default true.
959
- */
960
- $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify );
961
- }
962
-
963
- $proxy = new WP_HTTP_Proxy();
964
-
965
- $context = stream_context_create( array(
966
- 'ssl' => array(
967
- 'verify_peer' => $ssl_verify,
968
- //'CN_match' => $arrURL['host'], // This is handled by self::verify_ssl_certificate()
969
- 'capture_peer_cert' => $ssl_verify,
970
- 'SNI_enabled' => true,
971
- 'cafile' => $r['sslcertificates'],
972
- 'allow_self_signed' => ! $ssl_verify,
973
- )
974
- ) );
975
-
976
- $timeout = (int) floor( $r['timeout'] );
977
- $utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000;
978
- $connect_timeout = max( $timeout, 1 );
979
-
980
- // Store error number.
981
- $connection_error = null;
982
-
983
- // Store error string.
984
- $connection_error_str = null;
985
-
986
- if ( !WP_DEBUG ) {
987
- // In the event that the SSL connection fails, silence the many PHP Warnings.
988
- if ( $secure_transport )
989
- $error_reporting = error_reporting(0);
990
-
991
- if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) )
992
- $handle = @stream_socket_client( 'tcp://' . $proxy->host() . ':' . $proxy->port(), $connection_error, $connection_error_str, $connect_timeout, STREAM_CLIENT_CONNECT, $context );
993
- else
994
- $handle = @stream_socket_client( $connect_host . ':' . $arrURL['port'], $connection_error, $connection_error_str, $connect_timeout, STREAM_CLIENT_CONNECT, $context );
995
-
996
- if ( $secure_transport )
997
- error_reporting( $error_reporting );
998
-
999
- } else {
1000
- if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) )
1001
- $handle = stream_socket_client( 'tcp://' . $proxy->host() . ':' . $proxy->port(), $connection_error, $connection_error_str, $connect_timeout, STREAM_CLIENT_CONNECT, $context );
1002
- else
1003
- $handle = stream_socket_client( $connect_host . ':' . $arrURL['port'], $connection_error, $connection_error_str, $connect_timeout, STREAM_CLIENT_CONNECT, $context );
1004
- }
1005
-
1006
- if ( false === $handle ) {
1007
- // SSL connection failed due to expired/invalid cert, or, OpenSSL configuration is broken.
1008
- if ( $secure_transport && 0 === $connection_error && '' === $connection_error_str )
1009
- return new WP_Error( 'http_request_failed', __( 'The SSL certificate for the host could not be verified.' ) );
1010
-
1011
- return new WP_Error('http_request_failed', $connection_error . ': ' . $connection_error_str );
1012
- }
1013
-
1014
- // Verify that the SSL certificate is valid for this request.
1015
- if ( $secure_transport && $ssl_verify && ! $proxy->is_enabled() ) {
1016
- if ( ! self::verify_ssl_certificate( $handle, $arrURL['host'] ) )
1017
- return new WP_Error( 'http_request_failed', __( 'The SSL certificate for the host could not be verified.' ) );
1018
- }
1019
-
1020
- stream_set_timeout( $handle, $timeout, $utimeout );
1021
-
1022
- if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) //Some proxies require full URL in this field.
1023
- $requestPath = $url;
1024
- else
1025
- $requestPath = $arrURL['path'] . ( isset($arrURL['query']) ? '?' . $arrURL['query'] : '' );
1026
-
1027
- $strHeaders = strtoupper($r['method']) . ' ' . $requestPath . ' HTTP/' . $r['httpversion'] . "\r\n";
1028
-
1029
- $include_port_in_host_header = (
1030
- ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) ||
1031
- ( 'http' == $arrURL['scheme'] && 80 != $arrURL['port'] ) ||
1032
- ( 'https' == $arrURL['scheme'] && 443 != $arrURL['port'] )
1033
- );
1034
-
1035
- if ( $include_port_in_host_header ) {
1036
- $strHeaders .= 'Host: ' . $arrURL['host'] . ':' . $arrURL['port'] . "\r\n";
1037
- } else {
1038
- $strHeaders .= 'Host: ' . $arrURL['host'] . "\r\n";
1039
- }
1040
-
1041
- if ( isset($r['user-agent']) )
1042
- $strHeaders .= 'User-agent: ' . $r['user-agent'] . "\r\n";
1043
-
1044
- if ( is_array($r['headers']) ) {
1045
- foreach ( (array) $r['headers'] as $header => $headerValue )
1046
- $strHeaders .= $header . ': ' . $headerValue . "\r\n";
1047
- } else {
1048
- $strHeaders .= $r['headers'];
1049
- }
1050
-
1051
- if ( $proxy->use_authentication() )
1052
- $strHeaders .= $proxy->authentication_header() . "\r\n";
1053
-
1054
- $strHeaders .= "\r\n";
1055
-
1056
- if ( ! is_null($r['body']) )
1057
- $strHeaders .= $r['body'];
1058
-
1059
- fwrite($handle, $strHeaders);
1060
-
1061
- if ( ! $r['blocking'] ) {
1062
- stream_set_blocking( $handle, 0 );
1063
- fclose( $handle );
1064
- return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() );
1065
- }
1066
-
1067
- $strResponse = '';
1068
- $bodyStarted = false;
1069
- $keep_reading = true;
1070
- $block_size = 4096;
1071
- if ( isset( $r['limit_response_size'] ) )
1072
- $block_size = min( $block_size, $r['limit_response_size'] );
1073
-
1074
- // If streaming to a file setup the file handle.
1075
- if ( $r['stream'] ) {
1076
- if ( ! WP_DEBUG )
1077
- $stream_handle = @fopen( $r['filename'], 'w+' );
1078
- else
1079
- $stream_handle = fopen( $r['filename'], 'w+' );
1080
- if ( ! $stream_handle )
1081
- return new WP_Error( 'http_request_failed', sprintf( __( 'Could not open handle for fopen() to %s' ), $r['filename'] ) );
1082
-
1083
- $bytes_written = 0;
1084
- while ( ! feof($handle) && $keep_reading ) {
1085
- $block = fread( $handle, $block_size );
1086
- if ( ! $bodyStarted ) {
1087
- $strResponse .= $block;
1088
- if ( strpos( $strResponse, "\r\n\r\n" ) ) {
1089
- $process = WP_Http::processResponse( $strResponse );
1090
- $bodyStarted = true;
1091
- $block = $process['body'];
1092
- unset( $strResponse );
1093
- $process['body'] = '';
1094
- }
1095
- }
1096
-
1097
- $this_block_size = strlen( $block );
1098
-
1099
- if ( isset( $r['limit_response_size'] ) && ( $bytes_written + $this_block_size ) > $r['limit_response_size'] )
1100
- $block = substr( $block, 0, ( $r['limit_response_size'] - $bytes_written ) );
1101
-
1102
- $bytes_written_to_file = fwrite( $stream_handle, $block );
1103
-
1104
- if ( $bytes_written_to_file != $this_block_size ) {
1105
- fclose( $handle );
1106
- fclose( $stream_handle );
1107
- return new WP_Error( 'http_request_failed', __( 'Failed to write request to temporary file.' ) );
1108
- }
1109
-
1110
- $bytes_written += $bytes_written_to_file;
1111
-
1112
- $keep_reading = !isset( $r['limit_response_size'] ) || $bytes_written < $r['limit_response_size'];
1113
- }
1114
-
1115
- fclose( $stream_handle );
1116
-
1117
- } else {
1118
- $header_length = 0;
1119
- while ( ! feof( $handle ) && $keep_reading ) {
1120
- $block = fread( $handle, $block_size );
1121
- $strResponse .= $block;
1122
- if ( ! $bodyStarted && strpos( $strResponse, "\r\n\r\n" ) ) {
1123
- $header_length = strpos( $strResponse, "\r\n\r\n" ) + 4;
1124
- $bodyStarted = true;
1125
- }
1126
- $keep_reading = ( ! $bodyStarted || !isset( $r['limit_response_size'] ) || strlen( $strResponse ) < ( $header_length + $r['limit_response_size'] ) );
1127
- }
1128
-
1129
- $process = WP_Http::processResponse( $strResponse );
1130
- unset( $strResponse );
1131
-
1132
- }
1133
-
1134
- fclose( $handle );
1135
-
1136
- $arrHeaders = WP_Http::processHeaders( $process['headers'], $url );
1137
-
1138
- $response = array(
1139
- 'headers' => $arrHeaders['headers'],
1140
- // Not yet processed.
1141
- 'body' => null,
1142
- 'response' => $arrHeaders['response'],
1143
- 'cookies' => $arrHeaders['cookies'],
1144
- 'filename' => $r['filename']
1145
- );
1146
-
1147
- // Handle redirects.
1148
- if ( false !== ( $redirect_response = WP_HTTP::handle_redirects( $url, $r, $response ) ) )
1149
- return $redirect_response;
1150
-
1151
- // If the body was chunk encoded, then decode it.
1152
- if ( ! empty( $process['body'] ) && isset( $arrHeaders['headers']['transfer-encoding'] ) && 'chunked' == $arrHeaders['headers']['transfer-encoding'] )
1153
- $process['body'] = WP_Http::chunkTransferDecode($process['body']);
1154
-
1155
- if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($arrHeaders['headers']) )
1156
- $process['body'] = WP_Http_Encoding::decompress( $process['body'] );
1157
-
1158
- if ( isset( $r['limit_response_size'] ) && strlen( $process['body'] ) > $r['limit_response_size'] )
1159
- $process['body'] = substr( $process['body'], 0, $r['limit_response_size'] );
1160
-
1161
- $response['body'] = $process['body'];
1162
-
1163
- return $response;
1164
- }
1165
-
1166
- /**
1167
- * Verifies the received SSL certificate against it's Common Names and subjectAltName fields
1168
- *
1169
- * PHP's SSL verifications only verify that it's a valid Certificate, it doesn't verify if
1170
- * the certificate is valid for the hostname which was requested.
1171
- * This function verifies the requested hostname against certificate's subjectAltName field,
1172
- * if that is empty, or contains no DNS entries, a fallback to the Common Name field is used.
1173
- *
1174
- * IP Address support is included if the request is being made to an IP address.
1175
- *
1176
- * @since 3.7.0
1177
- * @static
1178
- *
1179
- * @param stream $stream The PHP Stream which the SSL request is being made over
1180
- * @param string $host The hostname being requested
1181
- * @return bool If the cerficiate presented in $stream is valid for $host
1182
- */
1183
- public static function verify_ssl_certificate( $stream, $host ) {
1184
- $context_options = stream_context_get_options( $stream );
1185
-
1186
- if ( empty( $context_options['ssl']['peer_certificate'] ) )
1187
- return false;
1188
-
1189
- $cert = openssl_x509_parse( $context_options['ssl']['peer_certificate'] );
1190
- if ( ! $cert )
1191
- return false;
1192
-
1193
- /*
1194
- * If the request is being made to an IP address, we'll validate against IP fields
1195
- * in the cert (if they exist)
1196
- */
1197
- $host_type = ( WP_HTTP::is_ip_address( $host ) ? 'ip' : 'dns' );
1198
-
1199
- $certificate_hostnames = array();
1200
- if ( ! empty( $cert['extensions']['subjectAltName'] ) ) {
1201
- $match_against = preg_split( '/,\s*/', $cert['extensions']['subjectAltName'] );
1202
- foreach ( $match_against as $match ) {
1203
- list( $match_type, $match_host ) = explode( ':', $match );
1204
- if ( $host_type == strtolower( trim( $match_type ) ) ) // IP: or DNS:
1205
- $certificate_hostnames[] = strtolower( trim( $match_host ) );
1206
- }
1207
- } elseif ( !empty( $cert['subject']['CN'] ) ) {
1208
- // Only use the CN when the certificate includes no subjectAltName extension.
1209
- $certificate_hostnames[] = strtolower( $cert['subject']['CN'] );
1210
- }
1211
-
1212
- // Exact hostname/IP matches.
1213
- if ( in_array( strtolower( $host ), $certificate_hostnames ) )
1214
- return true;
1215
-
1216
- // IP's can't be wildcards, Stop processing.
1217
- if ( 'ip' == $host_type )
1218
- return false;
1219
-
1220
- // Test to see if the domain is at least 2 deep for wildcard support.
1221
- if ( substr_count( $host, '.' ) < 2 )
1222
- return false;
1223
-
1224
- // Wildcard subdomains certs (*.example.com) are valid for a.example.com but not a.b.example.com.
1225
- $wildcard_host = preg_replace( '/^[^.]+\./', '*.', $host );
1226
-
1227
- return in_array( strtolower( $wildcard_host ), $certificate_hostnames );
1228
- }
1229
-
1230
- /**
1231
- * Whether this class can be used for retrieving a URL.
1232
- *
1233
- * @static
1234
- * @access public
1235
- * @since 2.7.0
1236
- * @since 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().
1237
- *
1238
- * @return boolean False means this class can not be used, true means it can.
1239
- */
1240
- public static function test( $args = array() ) {
1241
- if ( ! function_exists( 'stream_socket_client' ) )
1242
- return false;
1243
-
1244
- $is_ssl = isset( $args['ssl'] ) && $args['ssl'];
1245
-
1246
- if ( $is_ssl ) {
1247
- if ( ! extension_loaded( 'openssl' ) )
1248
- return false;
1249
- if ( ! function_exists( 'openssl_x509_parse' ) )
1250
- return false;
1251
- }
1252
-
1253
- /**
1254
- * Filter whether streams can be used as a transport for retrieving a URL.
1255
- *
1256
- * @since 2.7.0
1257
- *
1258
- * @param bool $use_class Whether the class can be used. Default true.
1259
- * @param array $args Request arguments.
1260
- */
1261
- return apply_filters( 'use_streams_transport', true, $args );
1262
- }
1263
- }
1264
-
1265
- /**
1266
- * Deprecated HTTP Transport method which used fsockopen.
1267
- *
1268
- * This class is not used, and is included for backwards compatibility only.
1269
- * All code should make use of WP_HTTP directly through it's API.
1270
- *
1271
- * @see WP_HTTP::request
1272
- *
1273
- * @since 2.7.0
1274
- * @deprecated 3.7.0 Please use WP_HTTP::request() directly
1275
- */
1276
- class WP_HTTP_Fsockopen extends WP_HTTP_Streams {
1277
- // For backwards compatibility for users who are using the class directly.
1278
- }
1279
-
1280
- /**
1281
- * HTTP request method uses Curl extension to retrieve the url.
1282
- *
1283
- * Requires the Curl extension to be installed.
1284
- *
1285
- * @package WordPress
1286
- * @subpackage HTTP
1287
- * @since 2.7.0
1288
- */
1289
- class WP_Http_Curl {
1290
-
1291
- /**
1292
- * Temporary header storage for during requests.
1293
- *
1294
- * @since 3.2.0
1295
- * @access private
1296
- * @var string
1297
- */
1298
- private $headers = '';
1299
-
1300
- /**
1301
- * Temporary body storage for during requests.
1302
- *
1303
- * @since 3.6.0
1304
- * @access private
1305
- * @var string
1306
- */
1307
- private $body = '';
1308
-
1309
- /**
1310
- * The maximum amount of data to receive from the remote server.
1311
- *
1312
- * @since 3.6.0
1313
- * @access private
1314
- * @var int
1315
- */
1316
- private $max_body_length = false;
1317
-
1318
- /**
1319
- * The file resource used for streaming to file.
1320
- *
1321
- * @since 3.6.0
1322
- * @access private
1323
- * @var resource
1324
- */
1325
- private $stream_handle = false;
1326
-
1327
- /**
1328
- * Send a HTTP request to a URI using cURL extension.
1329
- *
1330
- * @access public
1331
- * @since 2.7.0
1332
- *
1333
- * @param string $url The request URL.
1334
- * @param string|array $args Optional. Override the defaults.
1335
- * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
1336
- */
1337
- public function request($url, $args = array()) {
1338
- $defaults = array(
1339
- 'method' => 'GET', 'timeout' => 5,
1340
- 'redirection' => 5, 'httpversion' => '1.0',
1341
- 'blocking' => true,
1342
- 'headers' => array(), 'body' => null, 'cookies' => array()
1343
- );
1344
-
1345
- $r = wp_parse_args( $args, $defaults );
1346
-
1347
- if ( isset($r['headers']['User-Agent']) ) {
1348
- $r['user-agent'] = $r['headers']['User-Agent'];
1349
- unset($r['headers']['User-Agent']);
1350
- } else if ( isset($r['headers']['user-agent']) ) {
1351
- $r['user-agent'] = $r['headers']['user-agent'];
1352
- unset($r['headers']['user-agent']);
1353
- }
1354
-
1355
- // Construct Cookie: header if any cookies are set.
1356
- WP_Http::buildCookieHeader( $r );
1357
-
1358
- $handle = curl_init();
1359
-
1360
- // cURL offers really easy proxy support.
1361
- $proxy = new WP_HTTP_Proxy();
1362
-
1363
- if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
1364
-
1365
- curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
1366
- curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
1367
- curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() );
1368
-
1369
- if ( $proxy->use_authentication() ) {
1370
- curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
1371
- curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() );
1372
- }
1373
- }
1374
-
1375
- $is_local = isset($r['local']) && $r['local'];
1376
- $ssl_verify = isset($r['sslverify']) && $r['sslverify'];
1377
- if ( $is_local ) {
1378
- /** This filter is documented in wp-includes/class-http.php */
1379
- $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );
1380
- } elseif ( ! $is_local ) {
1381
- /** This filter is documented in wp-includes/class-http.php */
1382
- $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify );
1383
- }
1384
-
1385
- /*
1386
- * CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since.
1387
- * a value of 0 will allow an unlimited timeout.
1388
- */
1389
- $timeout = (int) ceil( $r['timeout'] );
1390
- curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout );
1391
- curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout );
1392
-
1393
- curl_setopt( $handle, CURLOPT_URL, $url);
1394
- curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true );
1395
- curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( $ssl_verify === true ) ? 2 : false );
1396
- curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify );
1397
- curl_setopt( $handle, CURLOPT_CAINFO, $r['sslcertificates'] );
1398
- curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] );
1399
-
1400
- /*
1401
- * The option doesn't work with safe mode or when open_basedir is set, and there's
1402
- * a bug #17490 with redirected POST requests, so handle redirections outside Curl.
1403
- */
1404
- curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, false );
1405
- if ( defined( 'CURLOPT_PROTOCOLS' ) ) // PHP 5.2.10 / cURL 7.19.4
1406
- curl_setopt( $handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS );
1407
-
1408
- switch ( $r['method'] ) {
1409
- case 'HEAD':
1410
- curl_setopt( $handle, CURLOPT_NOBODY, true );
1411
- break;
1412
- case 'POST':
1413
- curl_setopt( $handle, CURLOPT_POST, true );
1414
- curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
1415
- break;
1416
- case 'PUT':
1417
- curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' );
1418
- curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
1419
- break;
1420
- default:
1421
- curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, $r['method'] );
1422
- if ( ! is_null( $r['body'] ) )
1423
- curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
1424
- break;
1425
- }
1426
-
1427
- if ( true === $r['blocking'] ) {
1428
- curl_setopt( $handle, CURLOPT_HEADERFUNCTION, array( $this, 'stream_headers' ) );
1429
- curl_setopt( $handle, CURLOPT_WRITEFUNCTION, array( $this, 'stream_body' ) );
1430
- }
1431
-
1432
- curl_setopt( $handle, CURLOPT_HEADER, false );
1433
-
1434
- if ( isset( $r['limit_response_size'] ) )
1435
- $this->max_body_length = intval( $r['limit_response_size'] );
1436
- else
1437
- $this->max_body_length = false;
1438
-
1439
- // If streaming to a file open a file handle, and setup our curl streaming handler.
1440
- if ( $r['stream'] ) {
1441
- if ( ! WP_DEBUG )
1442
- $this->stream_handle = @fopen( $r['filename'], 'w+' );
1443
- else
1444
- $this->stream_handle = fopen( $r['filename'], 'w+' );
1445
- if ( ! $this->stream_handle )
1446
- return new WP_Error( 'http_request_failed', sprintf( __( 'Could not open handle for fopen() to %s' ), $r['filename'] ) );
1447
- } else {
1448
- $this->stream_handle = false;
1449
- }
1450
-
1451
- if ( !empty( $r['headers'] ) ) {
1452
- // cURL expects full header strings in each element.
1453
- $headers = array();
1454
- foreach ( $r['headers'] as $name => $value ) {
1455
- $headers[] = "{$name}: $value";
1456
- }
1457
- curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers );
1458
- }
1459
-
1460
- if ( $r['httpversion'] == '1.0' )
1461
- curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 );
1462
- else
1463
- curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
1464
-
1465
- /**
1466
- * Fires before the cURL request is executed.
1467
- *
1468
- * Cookies are not currently handled by the HTTP API. This action allows
1469
- * plugins to handle cookies themselves.
1470
- *
1471
- * @since 2.8.0
1472
- *
1473
- * @param resource &$handle The cURL handle returned by curl_init().
1474
- * @param array $r The HTTP request arguments.
1475
- * @param string $url The request URL.
1476
- */
1477
- do_action_ref_array( 'http_api_curl', array( &$handle, $r, $url ) );
1478
-
1479
- // We don't need to return the body, so don't. Just execute request and return.
1480
- if ( ! $r['blocking'] ) {
1481
- curl_exec( $handle );
1482
-
1483
- if ( $curl_error = curl_error( $handle ) ) {
1484
- curl_close( $handle );
1485
- return new WP_Error( 'http_request_failed', $curl_error );
1486
- }
1487
- if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) {
1488
- curl_close( $handle );
1489
- return new WP_Error( 'http_request_failed', __( 'Too many redirects.' ) );
1490
- }
1491
-
1492
- curl_close( $handle );
1493
- return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() );
1494
- }
1495
-
1496
- curl_exec( $handle );
1497
- $theHeaders = WP_Http::processHeaders( $this->headers, $url );
1498
- $theBody = $this->body;
1499
-
1500
- $this->headers = '';
1501
- $this->body = '';
1502
-
1503
- $curl_error = curl_errno( $handle );
1504
-
1505
- // If an error occurred, or, no response.
1506
- if ( $curl_error || ( 0 == strlen( $theBody ) && empty( $theHeaders['headers'] ) ) ) {
1507
- if ( CURLE_WRITE_ERROR /* 23 */ == $curl_error && $r['stream'] ) {
1508
- fclose( $this->stream_handle );
1509
- return new WP_Error( 'http_request_failed', __( 'Failed to write request to temporary file.' ) );
1510
- }
1511
- if ( $curl_error = curl_error( $handle ) ) {
1512
- curl_close( $handle );
1513
- return new WP_Error( 'http_request_failed', $curl_error );
1514
- }
1515
- if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) {
1516
- curl_close( $handle );
1517
- return new WP_Error( 'http_request_failed', __( 'Too many redirects.' ) );
1518
- }
1519
- }
1520
-
1521
- curl_close( $handle );
1522
-
1523
- if ( $r['stream'] )
1524
- fclose( $this->stream_handle );
1525
-
1526
- $response = array(
1527
- 'headers' => $theHeaders['headers'],
1528
- 'body' => null,
1529
- 'response' => $theHeaders['response'],
1530
- 'cookies' => $theHeaders['cookies'],
1531
- 'filename' => $r['filename']
1532
- );
1533
-
1534
- // Handle redirects.
1535
- if ( false !== ( $redirect_response = WP_HTTP::handle_redirects( $url, $r, $response ) ) )
1536
- return $redirect_response;
1537
-
1538
- if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders['headers']) )
1539
- $theBody = WP_Http_Encoding::decompress( $theBody );
1540
-
1541
- $response['body'] = $theBody;
1542
-
1543
- return $response;
1544
- }
1545
-
1546
- /**
1547
- * Grab the headers of the cURL request
1548
- *
1549
- * Each header is sent individually to this callback, so we append to the $header property for temporary storage
1550
- *
1551
- * @since 3.2.0
1552
- * @access private
1553
- * @return int
1554
- */
1555
- private function stream_headers( $handle, $headers ) {
1556
- $this->headers .= $headers;
1557
- return strlen( $headers );
1558
- }
1559
-
1560
- /**
1561
- * Grab the body of the cURL request
1562
- *
1563
- * The contents of the document are passed in chunks, so we append to the $body property for temporary storage.
1564
- * Returning a length shorter than the length of $data passed in will cause cURL to abort the request as "completed"
1565
- *
1566
- * @since 3.6.0
1567
- * @access private
1568
- * @return int
1569
- */
1570
- private function stream_body( $handle, $data ) {
1571
- $data_length = strlen( $data );
1572
-
1573
- if ( $this->max_body_length && ( strlen( $this->body ) + $data_length ) > $this->max_body_length )
1574
- $data = substr( $data, 0, ( $this->max_body_length - $data_length ) );
1575
-
1576
- if ( $this->stream_handle ) {
1577
- $bytes_written = fwrite( $this->stream_handle, $data );
1578
- } else {
1579
- $this->body .= $data;
1580
- $bytes_written = $data_length;
1581
- }
1582
-
1583
- // Upon event of this function returning less than strlen( $data ) curl will error with CURLE_WRITE_ERROR.
1584
- return $bytes_written;
1585
- }
1586
-
1587
- /**
1588
- * Whether this class can be used for retrieving an URL.
1589
- *
1590
- * @static
1591
- * @since 2.7.0
1592
- *
1593
- * @return boolean False means this class can not be used, true means it can.
1594
- */
1595
- public static function test( $args = array() ) {
1596
- if ( ! function_exists( 'curl_init' ) || ! function_exists( 'curl_exec' ) )
1597
- return false;
1598
-
1599
- $is_ssl = isset( $args['ssl'] ) && $args['ssl'];
1600
-
1601
- if ( $is_ssl ) {
1602
- $curl_version = curl_version();
1603
- // Check whether this cURL version support SSL requests.
1604
- if ( ! (CURL_VERSION_SSL & $curl_version['features']) )
1605
- return false;
1606
- }
1607
-
1608
- /**
1609
- * Filter whether cURL can be used as a transport for retrieving a URL.
1610
- *
1611
- * @since 2.7.0
1612
- *
1613
- * @param bool $use_class Whether the class can be used. Default true.
1614
- * @param array $args An array of request arguments.
1615
- */
1616
- return apply_filters( 'use_curl_transport', true, $args );
1617
- }
1618
- }
1619
-
1620
- /**
1621
- * Adds Proxy support to the WordPress HTTP API.
1622
- *
1623
- * There are caveats to proxy support. It requires that defines be made in the wp-config.php file to
1624
- * enable proxy support. There are also a few filters that plugins can hook into for some of the
1625
- * constants.
1626
- *
1627
- * Please note that only BASIC authentication is supported by most transports.
1628
- * cURL MAY support more methods (such as NTLM authentication) depending on your environment.
1629
- *
1630
- * The constants are as follows:
1631
- * <ol>
1632
- * <li>WP_PROXY_HOST - Enable proxy support and host for connecting.</li>
1633
- * <li>WP_PROXY_PORT - Proxy port for connection. No default, must be defined.</li>
1634
- * <li>WP_PROXY_USERNAME - Proxy username, if it requires authentication.</li>
1635
- * <li>WP_PROXY_PASSWORD - Proxy password, if it requires authentication.</li>
1636
- * <li>WP_PROXY_BYPASS_HOSTS - Will prevent the hosts in this list from going through the proxy.
1637
- * You do not need to have localhost and the blog host in this list, because they will not be passed
1638
- * through the proxy. The list should be presented in a comma separated list, wildcards using * are supported, eg. *.wordpress.org</li>
1639
- * </ol>
1640
- *
1641
- * An example can be as seen below.
1642
- * <code>
1643
- * define('WP_PROXY_HOST', '192.168.84.101');
1644
- * define('WP_PROXY_PORT', '8080');
1645
- * define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, *.wordpress.org');
1646
- * </code>
1647
- *
1648
- * @link https://core.trac.wordpress.org/ticket/4011 Proxy support ticket in WordPress.
1649
- * @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_PROXY_BYPASS_HOSTS
1650
- * @since 2.8.0
1651
- */
1652
- class WP_HTTP_Proxy {
1653
-
1654
- /**
1655
- * Whether proxy connection should be used.
1656
- *
1657
- * @since 2.8.0
1658
- *
1659
- * @use WP_PROXY_HOST
1660
- * @use WP_PROXY_PORT
1661
- *
1662
- * @return bool
1663
- */
1664
- public function is_enabled() {
1665
- return defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT');
1666
- }
1667
-
1668
- /**
1669
- * Whether authentication should be used.
1670
- *
1671
- * @since 2.8.0
1672
- *
1673
- * @use WP_PROXY_USERNAME
1674
- * @use WP_PROXY_PASSWORD
1675
- *
1676
- * @return bool
1677
- */
1678
- public function use_authentication() {
1679
- return defined('WP_PROXY_USERNAME') && defined('WP_PROXY_PASSWORD');
1680
- }
1681
-
1682
- /**
1683
- * Retrieve the host for the proxy server.
1684
- *
1685
- * @since 2.8.0
1686
- *
1687
- * @return string
1688
- */
1689
- public function host() {
1690
- if ( defined('WP_PROXY_HOST') )
1691
- return WP_PROXY_HOST;
1692
-
1693
- return '';
1694
- }
1695
-
1696
- /**
1697
- * Retrieve the port for the proxy server.
1698
- *
1699
- * @since 2.8.0
1700
- *
1701
- * @return string
1702
- */
1703
- public function port() {
1704
- if ( defined('WP_PROXY_PORT') )
1705
- return WP_PROXY_PORT;
1706
-
1707
- return '';
1708
- }
1709
-
1710
- /**
1711
- * Retrieve the username for proxy authentication.
1712
- *
1713
- * @since 2.8.0
1714
- *
1715
- * @return string
1716
- */
1717
- public function username() {
1718
- if ( defined('WP_PROXY_USERNAME') )
1719
- return WP_PROXY_USERNAME;
1720
-
1721
- return '';
1722
- }
1723
-
1724
- /**
1725
- * Retrieve the password for proxy authentication.
1726
- *
1727
- * @since 2.8.0
1728
- *
1729
- * @return string
1730
- */
1731
- public function password() {
1732
- if ( defined('WP_PROXY_PASSWORD') )
1733
- return WP_PROXY_PASSWORD;
1734
-
1735
- return '';
1736
- }
1737
-
1738
- /**
1739
- * Retrieve authentication string for proxy authentication.
1740
- *
1741
- * @since 2.8.0
1742
- *
1743
- * @return string
1744
- */
1745
- public function authentication() {
1746
- return $this->username() . ':' . $this->password();
1747
- }
1748
-
1749
- /**
1750
- * Retrieve header string for proxy authentication.
1751
- *
1752
- * @since 2.8.0
1753
- *
1754
- * @return string
1755
- */
1756
- public function authentication_header() {
1757
- return 'Proxy-Authorization: Basic ' . base64_encode( $this->authentication() );
1758
- }
1759
-
1760
- /**
1761
- * Whether URL should be sent through the proxy server.
1762
- *
1763
- * We want to keep localhost and the blog URL from being sent through the proxy server, because
1764
- * some proxies can not handle this. We also have the constant available for defining other
1765
- * hosts that won't be sent through the proxy.
1766
- *
1767
- * @uses WP_PROXY_BYPASS_HOSTS
1768
- * @since 2.8.0
1769
- *
1770
- * @param string $uri URI to check.
1771
- * @return bool True, to send through the proxy and false if, the proxy should not be used.
1772
- */
1773
- public function send_through_proxy( $uri ) {
1774
- /*
1775
- * parse_url() only handles http, https type URLs, and will emit E_WARNING on failure.
1776
- * This will be displayed on blogs, which is not reasonable.
1777
- */
1778
- $check = @parse_url($uri);
1779
-
1780
- // Malformed URL, can not process, but this could mean ssl, so let through anyway.
1781
- if ( $check === false )
1782
- return true;
1783
-
1784
- $home = parse_url( get_option('siteurl') );
1785
-
1786
- /**
1787
- * Filter whether to preempt sending the request through the proxy server.
1788
- *
1789
- * Returning false will bypass the proxy; returning true will send
1790
- * the request through the proxy. Returning null bypasses the filter.
1791
- *
1792
- * @since 3.5.0
1793
- *
1794
- * @param null $override Whether to override the request result. Default null.
1795
- * @param string $uri URL to check.
1796
- * @param array $check Associative array result of parsing the URI.
1797
- * @param array $home Associative array result of parsing the site URL.
1798
- */
1799
- $result = apply_filters( 'pre_http_send_through_proxy', null, $uri, $check, $home );
1800
- if ( ! is_null( $result ) )
1801
- return $result;
1802
-
1803
- if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) )
1804
- return false;
1805
-
1806
- if ( !defined('WP_PROXY_BYPASS_HOSTS') )
1807
- return true;
1808
-
1809
- static $bypass_hosts;
1810
- static $wildcard_regex = false;
1811
- if ( null == $bypass_hosts ) {
1812
- $bypass_hosts = preg_split('|,\s*|', WP_PROXY_BYPASS_HOSTS);
1813
-
1814
- if ( false !== strpos(WP_PROXY_BYPASS_HOSTS, '*') ) {
1815
- $wildcard_regex = array();
1816
- foreach ( $bypass_hosts as $host )
1817
- $wildcard_regex[] = str_replace( '\*', '.+', preg_quote( $host, '/' ) );
1818
- $wildcard_regex = '/^(' . implode('|', $wildcard_regex) . ')$/i';
1819
- }
1820
- }
1821
-
1822
- if ( !empty($wildcard_regex) )
1823
- return !preg_match($wildcard_regex, $check['host']);
1824
- else
1825
- return !in_array( $check['host'], $bypass_hosts );
1826
- }
1827
- }
1828
- /**
1829
- * Internal representation of a single cookie.
1830
- *
1831
- * Returned cookies are represented using this class, and when cookies are set, if they are not
1832
- * already a WP_Http_Cookie() object, then they are turned into one.
1833
- *
1834
- * @todo The WordPress convention is to use underscores instead of camelCase for function and method
1835
- * names. Need to switch to use underscores instead for the methods.
1836
- *
1837
- * @package WordPress
1838
- * @subpackage HTTP
1839
- * @since 2.8.0
1840
- */
1841
- class WP_Http_Cookie {
1842
-
1843
- /**
1844
- * Cookie name.
1845
- *
1846
- * @since 2.8.0
1847
- * @var string
1848
- */
1849
- public $name;
1850
-
1851
- /**
1852
- * Cookie value.
1853
- *
1854
- * @since 2.8.0
1855
- * @var string
1856
- */
1857
- public $value;
1858
-
1859
- /**
1860
- * When the cookie expires.
1861
- *
1862
- * @since 2.8.0
1863
- * @var string
1864
- */
1865
- public $expires;
1866
-
1867
- /**
1868
- * Cookie URL path.
1869
- *
1870
- * @since 2.8.0
1871
- * @var string
1872
- */
1873
- public $path;
1874
-
1875
- /**
1876
- * Cookie Domain.
1877
- *
1878
- * @since 2.8.0
1879
- * @var string
1880
- */
1881
- public $domain;
1882
-
1883
- /**
1884
- * Sets up this cookie object.
1885
- *
1886
- * The parameter $data should be either an associative array containing the indices names below
1887
- * or a header string detailing it.
1888
- *
1889
- * @since 2.8.0
1890
- * @access public
1891
- *
1892
- * @param string|array $data {
1893
- * Raw cookie data as header string or data array.
1894
- *
1895
- * @type string $name Cookie name.
1896
- * @type mixed $value Value. Should NOT already be urlencoded.
1897
- * @type string|int $expires Optional. Unix timestamp or formatted date. Default null.
1898
- * @type string $path Optional. Path. Default '/'.
1899
- * @type string $domain Optional. Domain. Default host of parsed $requested_url.
1900
- * @type int $port Optional. Port. Default null.
1901
- * }
1902
- * @param string $requested_url The URL which the cookie was set on, used for default $domain
1903
- * and $port values.
1904
- */
1905
- public function __construct( $data, $requested_url = '' ) {
1906
- if ( $requested_url )
1907
- $arrURL = @parse_url( $requested_url );
1908
- if ( isset( $arrURL['host'] ) )
1909
- $this->domain = $arrURL['host'];
1910
- $this->path = isset( $arrURL['path'] ) ? $arrURL['path'] : '/';
1911
- if ( '/' != substr( $this->path, -1 ) )
1912
- $this->path = dirname( $this->path ) . '/';
1913
-
1914
- if ( is_string( $data ) ) {
1915
- // Assume it's a header string direct from a previous request.
1916
- $pairs = explode( ';', $data );
1917
-
1918
- // Special handling for first pair; name=value. Also be careful of "=" in value.
1919
- $name = trim( substr( $pairs[0], 0, strpos( $pairs[0], '=' ) ) );
1920
- $value = substr( $pairs[0], strpos( $pairs[0], '=' ) + 1 );
1921
- $this->name = $name;
1922
- $this->value = urldecode( $value );
1923
-
1924
- // Removes name=value from items.
1925
- array_shift( $pairs );
1926
-
1927
- // Set everything else as a property.
1928
- foreach ( $pairs as $pair ) {
1929
- $pair = rtrim($pair);
1930
-
1931
- // Handle the cookie ending in ; which results in a empty final pair.
1932
- if ( empty($pair) )
1933
- continue;
1934
-
1935
- list( $key, $val ) = strpos( $pair, '=' ) ? explode( '=', $pair ) : array( $pair, '' );
1936
- $key = strtolower( trim( $key ) );
1937
- if ( 'expires' == $key )
1938
- $val = strtotime( $val );
1939
- $this->$key = $val;
1940
- }
1941
- } else {
1942
- if ( !isset( $data['name'] ) )
1943
- return false;
1944
-
1945
- // Set properties based directly on parameters.
1946
- foreach ( array( 'name', 'value', 'path', 'domain', 'port' ) as $field ) {
1947
- if ( isset( $data[ $field ] ) )
1948
- $this->$field = $data[ $field ];
1949
- }
1950
-
1951
- if ( isset( $data['expires'] ) )
1952
- $this->expires = is_int( $data['expires'] ) ? $data['expires'] : strtotime( $data['expires'] );
1953
- else
1954
- $this->expires = null;
1955
- }
1956
- }
1957
-
1958
- /**
1959
- * Confirms that it's OK to send this cookie to the URL checked against.
1960
- *
1961
- * Decision is based on RFC 2109/2965, so look there for details on validity.
1962
- *
1963
- * @access public
1964
- * @since 2.8.0
1965
- *
1966
- * @param string $url URL you intend to send this cookie to
1967
- * @return boolean true if allowed, false otherwise.
1968
- */
1969
- public function test( $url ) {
1970
- if ( is_null( $this->name ) )
1971
- return false;
1972
-
1973
- // Expires - if expired then nothing else matters.
1974
- if ( isset( $this->expires ) && time() > $this->expires )
1975
- return false;
1976
-
1977
- // Get details on the URL we're thinking about sending to.
1978
- $url = parse_url( $url );
1979
- $url['port'] = isset( $url['port'] ) ? $url['port'] : ( 'https' == $url['scheme'] ? 443 : 80 );
1980
- $url['path'] = isset( $url['path'] ) ? $url['path'] : '/';
1981
-
1982
- // Values to use for comparison against the URL.
1983
- $path = isset( $this->path ) ? $this->path : '/';
1984
- $port = isset( $this->port ) ? $this->port : null;
1985
- $domain = isset( $this->domain ) ? strtolower( $this->domain ) : strtolower( $url['host'] );
1986
- if ( false === stripos( $domain, '.' ) )
1987
- $domain .= '.local';
1988
-
1989
- // Host - very basic check that the request URL ends with the domain restriction (minus leading dot).
1990
- $domain = substr( $domain, 0, 1 ) == '.' ? substr( $domain, 1 ) : $domain;
1991
- if ( substr( $url['host'], -strlen( $domain ) ) != $domain )
1992
- return false;
1993
-
1994
- // Port - supports "port-lists" in the format: "80,8000,8080".
1995
- if ( !empty( $port ) && !in_array( $url['port'], explode( ',', $port) ) )
1996
- return false;
1997
-
1998
- // Path - request path must start with path restriction.
1999
- if ( substr( $url['path'], 0, strlen( $path ) ) != $path )
2000
- return false;
2001
-
2002
- return true;
2003
- }
2004
-
2005
- /**
2006
- * Convert cookie name and value back to header string.
2007
- *
2008
- * @access public
2009
- * @since 2.8.0
2010
- *
2011
- * @return string Header encoded cookie name and value.
2012
- */
2013
- public function getHeaderValue() {
2014
- if ( ! isset( $this->name ) || ! isset( $this->value ) )
2015
- return '';
2016
-
2017
- /**
2018
- * Filter the header-encoded cookie value.
2019
- *
2020
- * @since 3.4.0
2021
- *
2022
- * @param string $value The cookie value.
2023
- * @param string $name The cookie name.
2024
- */
2025
- return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name );
2026
- }
2027
-
2028
- /**
2029
- * Retrieve cookie header for usage in the rest of the WordPress HTTP API.
2030
- *
2031
- * @access public
2032
- * @since 2.8.0
2033
- *
2034
- * @return string
2035
- */
2036
- public function getFullHeader() {
2037
- return 'Cookie: ' . $this->getHeaderValue();
2038
- }
2039
- }
2040
-
2041
- /**
2042
- * Implementation for deflate and gzip transfer encodings.
2043
- *
2044
- * Includes RFC 1950, RFC 1951, and RFC 1952.
2045
- *
2046
- * @since 2.8.0
2047
- * @package WordPress
2048
- * @subpackage HTTP
2049
- */
2050
- class WP_Http_Encoding {
2051
-
2052
- /**
2053
- * Compress raw string using the deflate format.
2054
- *
2055
- * Supports the RFC 1951 standard.
2056
- *
2057
- * @since 2.8.0
2058
- *
2059
- * @param string $raw String to compress.
2060
- * @param int $level Optional, default is 9. Compression level, 9 is highest.
2061
- * @param string $supports Optional, not used. When implemented it will choose the right compression based on what the server supports.
2062
- * @return string|bool False on failure.
2063
- */
2064
- public static function compress( $raw, $level = 9, $supports = null ) {
2065
- return gzdeflate( $raw, $level );
2066
- }
2067
-
2068
- /**
2069
- * Decompression of deflated string.
2070
- *
2071
- * Will attempt to decompress using the RFC 1950 standard, and if that fails
2072
- * then the RFC 1951 standard deflate will be attempted. Finally, the RFC
2073
- * 1952 standard gzip decode will be attempted. If all fail, then the
2074
- * original compressed string will be returned.
2075
- *
2076
- * @since 2.8.0
2077
- *
2078
- * @param string $compressed String to decompress.
2079
- * @param int $length The optional length of the compressed data.
2080
- * @return string|bool False on failure.
2081
- */
2082
- public static function decompress( $compressed, $length = null ) {
2083
-
2084
- if ( empty($compressed) )
2085
- return $compressed;
2086
-
2087
- if ( false !== ( $decompressed = @gzinflate( $compressed ) ) )
2088
- return $decompressed;
2089
-
2090
- if ( false !== ( $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ) ) )
2091
- return $decompressed;
2092
-
2093
- if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) )
2094
- return $decompressed;
2095
-
2096
- if ( function_exists('gzdecode') ) {
2097
- $decompressed = @gzdecode( $compressed );
2098
-
2099
- if ( false !== $decompressed )
2100
- return $decompressed;
2101
- }
2102
-
2103
- return $compressed;
2104
- }
2105
-
2106
- /**
2107
- * Decompression of deflated string while staying compatible with the majority of servers.
2108
- *
2109
- * Certain Servers will return deflated data with headers which PHP's gzinflate()
2110
- * function cannot handle out of the box. The following function has been created from
2111
- * various snippets on the gzinflate() PHP documentation.
2112
- *
2113
- * Warning: Magic numbers within. Due to the potential different formats that the compressed
2114
- * data may be returned in, some "magic offsets" are needed to ensure proper decompression
2115
- * takes place. For a simple progmatic way to determine the magic offset in use, see:
2116
- * https://core.trac.wordpress.org/ticket/18273
2117
- *
2118
- * @since 2.8.1
2119
- * @link https://core.trac.wordpress.org/ticket/18273
2120
- * @link http://au2.php.net/manual/en/function.gzinflate.php#70875
2121
- * @link http://au2.php.net/manual/en/function.gzinflate.php#77336
2122
- *
2123
- * @param string $gzData String to decompress.
2124
- * @return string|bool False on failure.
2125
- */
2126
- public static function compatible_gzinflate($gzData) {
2127
-
2128
- // Compressed data might contain a full header, if so strip it for gzinflate().
2129
- if ( substr($gzData, 0, 3) == "\x1f\x8b\x08" ) {
2130
- $i = 10;
2131
- $flg = ord( substr($gzData, 3, 1) );
2132
- if ( $flg > 0 ) {
2133
- if ( $flg & 4 ) {
2134
- list($xlen) = unpack('v', substr($gzData, $i, 2) );
2135
- $i = $i + 2 + $xlen;
2136
- }
2137
- if ( $flg & 8 )
2138
- $i = strpos($gzData, "\0", $i) + 1;
2139
- if ( $flg & 16 )
2140
- $i = strpos($gzData, "\0", $i) + 1;
2141
- if ( $flg & 2 )
2142
- $i = $i + 2;
2143
- }
2144
- $decompressed = @gzinflate( substr($gzData, $i, -8) );
2145
- if ( false !== $decompressed )
2146
- return $decompressed;
2147
- }
2148
-
2149
- // Compressed data from java.util.zip.Deflater amongst others.
2150
- $decompressed = @gzinflate( substr($gzData, 2) );
2151
- if ( false !== $decompressed )
2152
- return $decompressed;
2153
-
2154
- return false;
2155
- }
2156
-
2157
- /**
2158
- * What encoding types to accept and their priority values.
2159
- *
2160
- * @since 2.8.0
2161
- *
2162
- * @return string Types of encoding to accept.
2163
- */
2164
- public static function accept_encoding( $url, $args ) {
2165
- $type = array();
2166
- $compression_enabled = WP_Http_Encoding::is_available();
2167
-
2168
- if ( ! $args['decompress'] ) // Decompression specifically disabled.
2169
- $compression_enabled = false;
2170
- elseif ( $args['stream'] ) // Disable when streaming to file.
2171
- $compression_enabled = false;
2172
- elseif ( isset( $args['limit_response_size'] ) ) // If only partial content is being requested, we won't be able to decompress it.
2173
- $compression_enabled = false;
2174
-
2175
- if ( $compression_enabled ) {
2176
- if ( function_exists( 'gzinflate' ) )
2177
- $type[] = 'deflate;q=1.0';
2178
-
2179
- if ( function_exists( 'gzuncompress' ) )
2180
- $type[] = 'compress;q=0.5';
2181
-
2182
- if ( function_exists( 'gzdecode' ) )
2183
- $type[] = 'gzip;q=0.5';
2184
- }
2185
-
2186
- /**
2187
- * Filter the allowed encoding types.
2188
- *
2189
- * @since 3.6.0
2190
- *
2191
- * @param array $type Encoding types allowed. Accepts 'gzinflate',
2192
- * 'gzuncompress', 'gzdecode'.
2193
- * @param string $url URL of the HTTP request.
2194
- * @param array $args HTTP request arguments.
2195
- */
2196
- $type = apply_filters( 'wp_http_accept_encoding', $type, $url, $args );
2197
-
2198
- return implode(', ', $type);
2199
- }
2200
-
2201
- /**
2202
- * What encoding the content used when it was compressed to send in the headers.
2203
- *
2204
- * @since 2.8.0
2205
- *
2206
- * @return string Content-Encoding string to send in the header.
2207
- */
2208
- public static function content_encoding() {
2209
- return 'deflate';
2210
- }
2211
-
2212
- /**
2213
- * Whether the content be decoded based on the headers.
2214
- *
2215
- * @since 2.8.0
2216
- *
2217
- * @param array|string $headers All of the available headers.
2218
- * @return bool
2219
- */
2220
- public static function should_decode($headers) {
2221
- if ( is_array( $headers ) ) {
2222
- if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
2223
- return true;
2224
- } else if ( is_string( $headers ) ) {
2225
- return ( stripos($headers, 'content-encoding:') !== false );
2226
- }
2227
-
2228
- return false;
2229
- }
2230
-
2231
- /**
2232
- * Whether decompression and compression are supported by the PHP version.
2233
- *
2234
- * Each function is tested instead of checking for the zlib extension, to
2235
- * ensure that the functions all exist in the PHP version and aren't
2236
- * disabled.
2237
- *
2238
- * @since 2.8.0
2239
- *
2240
- * @return bool
2241
- */
2242
- public static function is_available() {
2243
- return ( function_exists('gzuncompress') || function_exists('gzdeflate') || function_exists('gzinflate') );
2244
- }
2245
- }