stump-cli 0.1.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,2606 +0,0 @@
1
- <?php
2
- /**
3
- * Manages WordPress comments
4
- *
5
- * @package WordPress
6
- * @subpackage Comment
7
- */
8
-
9
- /**
10
- * Check whether a comment passes internal checks to be allowed to add.
11
- *
12
- * If manual comment moderation is set in the administration, then all checks,
13
- * regardless of their type and whitelist, will fail and the function will
14
- * return false.
15
- *
16
- * If the number of links exceeds the amount in the administration, then the
17
- * check fails. If any of the parameter contents match the blacklist of words,
18
- * then the check fails.
19
- *
20
- * If the comment author was approved before, then the comment is automatically
21
- * whitelisted.
22
- *
23
- * If all checks pass, the function will return true.
24
- *
25
- * @since 1.2.0
26
- *
27
- * @global wpdb $wpdb WordPress database access abstraction object.
28
- *
29
- * @param string $author Comment author name.
30
- * @param string $email Comment author email.
31
- * @param string $url Comment author URL.
32
- * @param string $comment Content of the comment.
33
- * @param string $user_ip Comment author IP address.
34
- * @param string $user_agent Comment author User-Agent.
35
- * @param string $comment_type Comment type, either user-submitted comment,
36
- * trackback, or pingback.
37
- * @return bool If all checks pass, true, otherwise false.
38
- */
39
- function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) {
40
- global $wpdb;
41
-
42
- // If manual moderation is enabled, skip all checks and return false.
43
- if ( 1 == get_option('comment_moderation') )
44
- return false;
45
-
46
- /** This filter is documented in wp-includes/comment-template.php */
47
- $comment = apply_filters( 'comment_text', $comment );
48
-
49
- // Check for the number of external links if a max allowed number is set.
50
- if ( $max_links = get_option( 'comment_max_links' ) ) {
51
- $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
52
-
53
- /**
54
- * Filter the maximum number of links allowed in a comment.
55
- *
56
- * @since 3.0.0
57
- *
58
- * @param int $num_links The number of links allowed.
59
- * @param string $url Comment author's URL. Included in allowed links total.
60
- */
61
- $num_links = apply_filters( 'comment_max_links_url', $num_links, $url );
62
-
63
- /*
64
- * If the number of links in the comment exceeds the allowed amount,
65
- * fail the check by returning false.
66
- */
67
- if ( $num_links >= $max_links )
68
- return false;
69
- }
70
-
71
- $mod_keys = trim(get_option('moderation_keys'));
72
-
73
- // If moderation 'keys' (keywords) are set, process them.
74
- if ( !empty($mod_keys) ) {
75
- $words = explode("\n", $mod_keys );
76
-
77
- foreach ( (array) $words as $word) {
78
- $word = trim($word);
79
-
80
- // Skip empty lines.
81
- if ( empty($word) )
82
- continue;
83
-
84
- /*
85
- * Do some escaping magic so that '#' (number of) characters in the spam
86
- * words don't break things:
87
- */
88
- $word = preg_quote($word, '#');
89
-
90
- /*
91
- * Check the comment fields for moderation keywords. If any are found,
92
- * fail the check for the given field by returning false.
93
- */
94
- $pattern = "#$word#i";
95
- if ( preg_match($pattern, $author) ) return false;
96
- if ( preg_match($pattern, $email) ) return false;
97
- if ( preg_match($pattern, $url) ) return false;
98
- if ( preg_match($pattern, $comment) ) return false;
99
- if ( preg_match($pattern, $user_ip) ) return false;
100
- if ( preg_match($pattern, $user_agent) ) return false;
101
- }
102
- }
103
-
104
- /*
105
- * Check if the option to approve comments by previously-approved authors is enabled.
106
- *
107
- * If it is enabled, check whether the comment author has a previously-approved comment,
108
- * as well as whether there are any moderation keywords (if set) present in the author
109
- * email address. If both checks pass, return true. Otherwise, return false.
110
- */
111
- if ( 1 == get_option('comment_whitelist')) {
112
- if ( 'trackback' != $comment_type && 'pingback' != $comment_type && $author != '' && $email != '' ) {
113
- // expected_slashed ($author, $email)
114
- $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1");
115
- if ( ( 1 == $ok_to_comment ) &&
116
- ( empty($mod_keys) || false === strpos( $email, $mod_keys) ) )
117
- return true;
118
- else
119
- return false;
120
- } else {
121
- return false;
122
- }
123
- }
124
- return true;
125
- }
126
-
127
- /**
128
- * Retrieve the approved comments for post $post_id.
129
- *
130
- * @since 2.0.0
131
- * @uses $wpdb
132
- *
133
- * @param int $post_id The ID of the post
134
- * @return array $comments The approved comments
135
- */
136
- function get_approved_comments($post_id) {
137
- global $wpdb;
138
- return $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' ORDER BY comment_date", $post_id));
139
- }
140
-
141
- /**
142
- * Retrieves comment data given a comment ID or comment object.
143
- *
144
- * If an object is passed then the comment data will be cached and then returned
145
- * after being passed through a filter. If the comment is empty, then the global
146
- * comment variable will be used, if it is set.
147
- *
148
- * @since 2.0.0
149
- * @uses $wpdb
150
- *
151
- * @param object|string|int $comment Comment to retrieve.
152
- * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants.
153
- * @return object|array|null Depends on $output value.
154
- */
155
- function get_comment(&$comment, $output = OBJECT) {
156
- global $wpdb;
157
-
158
- if ( empty($comment) ) {
159
- if ( isset($GLOBALS['comment']) )
160
- $_comment = & $GLOBALS['comment'];
161
- else
162
- $_comment = null;
163
- } elseif ( is_object($comment) ) {
164
- wp_cache_add($comment->comment_ID, $comment, 'comment');
165
- $_comment = $comment;
166
- } else {
167
- if ( isset($GLOBALS['comment']) && ($GLOBALS['comment']->comment_ID == $comment) ) {
168
- $_comment = & $GLOBALS['comment'];
169
- } elseif ( ! $_comment = wp_cache_get($comment, 'comment') ) {
170
- $_comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment));
171
- if ( ! $_comment )
172
- return null;
173
- wp_cache_add($_comment->comment_ID, $_comment, 'comment');
174
- }
175
- }
176
-
177
- /**
178
- * Fires after a comment is retrieved.
179
- *
180
- * @since 2.3.0
181
- *
182
- * @param mixed $_comment Comment data.
183
- */
184
- $_comment = apply_filters( 'get_comment', $_comment );
185
-
186
- if ( $output == OBJECT ) {
187
- return $_comment;
188
- } elseif ( $output == ARRAY_A ) {
189
- $__comment = get_object_vars($_comment);
190
- return $__comment;
191
- } elseif ( $output == ARRAY_N ) {
192
- $__comment = array_values(get_object_vars($_comment));
193
- return $__comment;
194
- } else {
195
- return $_comment;
196
- }
197
- }
198
-
199
- /**
200
- * Retrieve a list of comments.
201
- *
202
- * The comment list can be for the blog as a whole or for an individual post.
203
- *
204
- * The list of comment arguments are 'status', 'orderby', 'comment_date_gmt',
205
- * 'order', 'number', 'offset', and 'post_id'.
206
- *
207
- * @since 2.7.0
208
- * @uses $wpdb
209
- *
210
- * @param mixed $args Optional. Array or string of options to override defaults.
211
- * @return array List of comments.
212
- */
213
- function get_comments( $args = '' ) {
214
- $query = new WP_Comment_Query;
215
- return $query->query( $args );
216
- }
217
-
218
- /**
219
- * WordPress Comment Query class.
220
- *
221
- * @since 3.1.0
222
- */
223
- class WP_Comment_Query {
224
- /**
225
- * Metadata query container
226
- *
227
- * @since 3.5.0
228
- * @access public
229
- * @var object WP_Meta_Query
230
- */
231
- public $meta_query = false;
232
-
233
- /**
234
- * Date query container
235
- *
236
- * @since 3.7.0
237
- * @access public
238
- * @var object WP_Date_Query
239
- */
240
- public $date_query = false;
241
-
242
- /**
243
- * Make private/protected methods readable for backwards compatibility.
244
- *
245
- * @since 4.0.0
246
- * @access public
247
- *
248
- * @param callable $name Method to call.
249
- * @param array $arguments Arguments to pass when calling.
250
- * @return mixed|bool Return value of the callback, false otherwise.
251
- */
252
- public function __call( $name, $arguments ) {
253
- return call_user_func_array( array( $this, $name ), $arguments );
254
- }
255
-
256
- /**
257
- * Execute the query
258
- *
259
- * @since 3.1.0
260
- * @since 4.1.0 Introduced 'comment__in', 'comment__not_in',
261
- * 'post__in', and 'post__not_in' to $query_vars.
262
- *
263
- * @param string|array $query_vars
264
- * @return int|array
265
- */
266
- public function query( $query_vars ) {
267
- global $wpdb;
268
-
269
- $defaults = array(
270
- 'author_email' => '',
271
- 'fields' => '',
272
- 'ID' => '',
273
- 'comment__in' => '',
274
- 'comment__not_in' => '',
275
- 'karma' => '',
276
- 'number' => '',
277
- 'offset' => '',
278
- 'orderby' => '',
279
- 'order' => 'DESC',
280
- 'parent' => '',
281
- 'post_ID' => '',
282
- 'post_id' => 0,
283
- 'post__in' => '',
284
- 'post__not_in' => '',
285
- 'post_author' => '',
286
- 'post_name' => '',
287
- 'post_parent' => '',
288
- 'post_status' => '',
289
- 'post_type' => '',
290
- 'status' => '',
291
- 'type' => '',
292
- 'user_id' => '',
293
- 'search' => '',
294
- 'count' => false,
295
- 'meta_key' => '',
296
- 'meta_value' => '',
297
- 'meta_query' => '',
298
- 'date_query' => null, // See WP_Date_Query
299
- );
300
-
301
- $groupby = '';
302
-
303
- $this->query_vars = wp_parse_args( $query_vars, $defaults );
304
-
305
- // Parse meta query
306
- $this->meta_query = new WP_Meta_Query();
307
- $this->meta_query->parse_query_vars( $this->query_vars );
308
-
309
- /**
310
- * Fires before comments are retrieved.
311
- *
312
- * @since 3.1.0
313
- *
314
- * @param WP_Comment_Query &$this Current instance of WP_Comment_Query, passed by reference.
315
- */
316
- do_action_ref_array( 'pre_get_comments', array( &$this ) );
317
-
318
- // $args can be whatever, only use the args defined in defaults to compute the key
319
- $key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $defaults ) ) ) );
320
- $last_changed = wp_cache_get( 'last_changed', 'comment' );
321
- if ( ! $last_changed ) {
322
- $last_changed = microtime();
323
- wp_cache_set( 'last_changed', $last_changed, 'comment' );
324
- }
325
- $cache_key = "get_comments:$key:$last_changed";
326
-
327
- if ( $cache = wp_cache_get( $cache_key, 'comment' ) ) {
328
- return $cache;
329
- }
330
-
331
- $status = $this->query_vars['status'];
332
- if ( 'hold' == $status ) {
333
- $approved = "comment_approved = '0'";
334
- } elseif ( 'approve' == $status ) {
335
- $approved = "comment_approved = '1'";
336
- } elseif ( ! empty( $status ) && 'all' != $status ) {
337
- $approved = $wpdb->prepare( "comment_approved = %s", $status );
338
- } else {
339
- $approved = "( comment_approved = '0' OR comment_approved = '1' )";
340
- }
341
- $order = ( 'ASC' == strtoupper( $this->query_vars['order'] ) ) ? 'ASC' : 'DESC';
342
-
343
- if ( ! empty( $this->query_vars['orderby'] ) ) {
344
- $ordersby = is_array( $this->query_vars['orderby'] ) ?
345
- $this->query_vars['orderby'] :
346
- preg_split( '/[,\s]/', $this->query_vars['orderby'] );
347
-
348
- $allowed_keys = array(
349
- 'comment_agent',
350
- 'comment_approved',
351
- 'comment_author',
352
- 'comment_author_email',
353
- 'comment_author_IP',
354
- 'comment_author_url',
355
- 'comment_content',
356
- 'comment_date',
357
- 'comment_date_gmt',
358
- 'comment_ID',
359
- 'comment_karma',
360
- 'comment_parent',
361
- 'comment_post_ID',
362
- 'comment_type',
363
- 'user_id',
364
- );
365
- if ( ! empty( $this->query_vars['meta_key'] ) ) {
366
- $allowed_keys[] = $this->query_vars['meta_key'];
367
- $allowed_keys[] = 'meta_value';
368
- $allowed_keys[] = 'meta_value_num';
369
- }
370
- $ordersby = array_intersect( $ordersby, $allowed_keys );
371
- foreach ( $ordersby as $key => $value ) {
372
- if ( $value == $this->query_vars['meta_key'] || $value == 'meta_value' ) {
373
- $ordersby[ $key ] = "$wpdb->commentmeta.meta_value";
374
- } elseif ( $value == 'meta_value_num' ) {
375
- $ordersby[ $key ] = "$wpdb->commentmeta.meta_value+0";
376
- }
377
- }
378
- $orderby = empty( $ordersby ) ? 'comment_date_gmt' : implode(', ', $ordersby);
379
- } else {
380
- $orderby = 'comment_date_gmt';
381
- }
382
-
383
- $number = absint( $this->query_vars['number'] );
384
- $offset = absint( $this->query_vars['offset'] );
385
-
386
- if ( ! empty( $number ) ) {
387
- if ( $offset ) {
388
- $limits = 'LIMIT ' . $offset . ',' . $number;
389
- } else {
390
- $limits = 'LIMIT ' . $number;
391
- }
392
- } else {
393
- $limits = '';
394
- }
395
-
396
- if ( $this->query_vars['count'] ) {
397
- $fields = 'COUNT(*)';
398
- } else {
399
- switch ( strtolower( $this->query_vars['fields'] ) ) {
400
- case 'ids':
401
- $fields = "$wpdb->comments.comment_ID";
402
- break;
403
- default:
404
- $fields = "*";
405
- break;
406
- }
407
- }
408
-
409
- $join = '';
410
- $where = $approved;
411
-
412
- $post_id = absint( $this->query_vars['post_id'] );
413
- if ( ! empty( $post_id ) ) {
414
- $where .= $wpdb->prepare( ' AND comment_post_ID = %d', $post_id );
415
- }
416
-
417
- // Parse comment IDs for an IN clause.
418
- if ( ! empty( $this->query_vars['comment__in'] ) ) {
419
- $where .= ' AND comment_ID IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['comment__in'] ) ) . ' )';
420
- }
421
-
422
- // Parse comment IDs for a NOT IN clause.
423
- if ( ! empty( $this->query_vars['comment__not_in'] ) ) {
424
- $where .= ' AND comment_ID NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['comment__not_in'] ) ) . ' )';
425
- }
426
-
427
- // Parse comment post IDs for an IN clause.
428
- if ( ! empty( $this->query_vars['post__in'] ) ) {
429
- $where .= ' AND comment_post_ID IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['post__in'] ) ) . ' )';
430
- }
431
-
432
- // Parse comment post IDs for a NOT IN clause.
433
- if ( ! empty( $this->query_vars['post__not_in'] ) ) {
434
- $where .= ' AND comment_post_ID NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['post__not_in'] ) ) . ' )';
435
- }
436
-
437
- if ( '' !== $this->query_vars['author_email'] ) {
438
- $where .= $wpdb->prepare( ' AND comment_author_email = %s', $this->query_vars['author_email'] );
439
- }
440
-
441
- if ( '' !== $this->query_vars['karma'] ) {
442
- $where .= $wpdb->prepare( ' AND comment_karma = %d', $this->query_vars['karma'] );
443
- }
444
-
445
- if ( 'comment' == $this->query_vars['type'] ) {
446
- $where .= " AND comment_type = ''";
447
- } elseif( 'pings' == $this->query_vars['type'] ) {
448
- $where .= ' AND comment_type IN ("pingback", "trackback")';
449
- } elseif ( ! empty( $this->query_vars['type'] ) ) {
450
- $where .= $wpdb->prepare( ' AND comment_type = %s', $this->query_vars['type'] );
451
- }
452
-
453
- if ( '' !== $this->query_vars['parent'] ) {
454
- $where .= $wpdb->prepare( ' AND comment_parent = %d', $this->query_vars['parent'] );
455
- }
456
-
457
- if ( is_array( $this->query_vars['user_id'] ) ) {
458
- $where .= ' AND user_id IN (' . implode( ',', array_map( 'absint', $this->query_vars['user_id'] ) ) . ')';
459
- } elseif ( '' !== $this->query_vars['user_id'] ) {
460
- $where .= $wpdb->prepare( ' AND user_id = %d', $this->query_vars['user_id'] );
461
- }
462
-
463
- if ( '' !== $this->query_vars['search'] ) {
464
- $where .= $this->get_search_sql(
465
- $this->query_vars['search'],
466
- array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_content' )
467
- );
468
- }
469
-
470
- $plucked = wp_array_slice_assoc( $this->query_vars, array( 'post_author', 'post_name', 'post_parent', 'post_status', 'post_type' ) );
471
- $post_fields = array_filter( $plucked );
472
-
473
- if ( ! empty( $post_fields ) ) {
474
- $join = "JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID";
475
- foreach( $post_fields as $field_name => $field_value )
476
- $where .= $wpdb->prepare( " AND {$wpdb->posts}.{$field_name} = %s", $field_value );
477
- }
478
-
479
- if ( ! empty( $this->meta_query->queries ) ) {
480
- $clauses = $this->meta_query->get_sql( 'comment', $wpdb->comments, 'comment_ID', $this );
481
- $join .= $clauses['join'];
482
- $where .= $clauses['where'];
483
- $groupby = "{$wpdb->comments}.comment_ID";
484
- }
485
-
486
- $date_query = $this->query_vars['date_query'];
487
- if ( ! empty( $date_query ) && is_array( $date_query ) ) {
488
- $date_query_object = new WP_Date_Query( $date_query, 'comment_date' );
489
- $where .= $date_query_object->get_sql();
490
- }
491
-
492
- $pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits', 'groupby' );
493
- /**
494
- * Filter the comment query clauses.
495
- *
496
- * @since 3.1.0
497
- *
498
- * @param array $pieces A compacted array of comment query clauses.
499
- * @param WP_Comment_Query &$this Current instance of WP_Comment_Query, passed by reference.
500
- */
501
- $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) );
502
-
503
- $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
504
- $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
505
- $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : '';
506
- $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : '';
507
- $order = isset( $clauses[ 'order' ] ) ? $clauses[ 'order' ] : '';
508
- $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
509
- $groupby = isset( $clauses[ 'groupby' ] ) ? $clauses[ 'groupby' ] : '';
510
-
511
- if ( $groupby ) {
512
- $groupby = 'GROUP BY ' . $groupby;
513
- }
514
- $query = "SELECT $fields FROM $wpdb->comments $join WHERE $where $groupby ORDER BY $orderby $order $limits";
515
-
516
- if ( $this->query_vars['count'] ) {
517
- return $wpdb->get_var( $query );
518
- }
519
-
520
- if ( 'ids' == $this->query_vars['fields'] ) {
521
- $this->comments = $wpdb->get_col( $query );
522
- return array_map( 'intval', $this->comments );
523
- }
524
-
525
- $results = $wpdb->get_results( $query );
526
- /**
527
- * Filter the comment query results.
528
- *
529
- * @since 3.1.0
530
- *
531
- * @param array $results An array of comments.
532
- * @param WP_Comment_Query &$this Current instance of WP_Comment_Query, passed by reference.
533
- */
534
- $comments = apply_filters_ref_array( 'the_comments', array( $results, &$this ) );
535
-
536
- wp_cache_add( $cache_key, $comments, 'comment' );
537
-
538
- return $comments;
539
- }
540
-
541
- /**
542
- * Used internally to generate an SQL string for searching across multiple columns
543
- *
544
- * @access protected
545
- * @since 3.1.0
546
- *
547
- * @param string $string
548
- * @param array $cols
549
- * @return string
550
- */
551
- protected function get_search_sql( $string, $cols ) {
552
- global $wpdb;
553
-
554
- $like = '%' . $wpdb->esc_like( $string ) . '%';
555
-
556
- $searches = array();
557
- foreach ( $cols as $col ) {
558
- $searches[] = $wpdb->prepare( "$col LIKE %s", $like );
559
- }
560
-
561
- return ' AND (' . implode(' OR ', $searches) . ')';
562
- }
563
- }
564
-
565
- /**
566
- * Retrieve all of the WordPress supported comment statuses.
567
- *
568
- * Comments have a limited set of valid status values, this provides the comment
569
- * status values and descriptions.
570
- *
571
- * @since 2.7.0
572
- *
573
- * @return array List of comment statuses.
574
- */
575
- function get_comment_statuses() {
576
- $status = array(
577
- 'hold' => __('Unapproved'),
578
- /* translators: comment status */
579
- 'approve' => _x('Approved', 'adjective'),
580
- /* translators: comment status */
581
- 'spam' => _x('Spam', 'adjective'),
582
- );
583
-
584
- return $status;
585
- }
586
-
587
- /**
588
- * The date the last comment was modified.
589
- *
590
- * @since 1.5.0
591
- * @uses $wpdb
592
- *
593
- * @param string $timezone Which timezone to use in reference to 'gmt', 'blog',
594
- * or 'server' locations.
595
- * @return string Last comment modified date.
596
- */
597
- function get_lastcommentmodified($timezone = 'server') {
598
- global $wpdb;
599
- static $cache_lastcommentmodified = array();
600
-
601
- if ( isset($cache_lastcommentmodified[$timezone]) )
602
- return $cache_lastcommentmodified[$timezone];
603
-
604
- $add_seconds_server = date('Z');
605
-
606
- switch ( strtolower($timezone)) {
607
- case 'gmt':
608
- $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
609
- break;
610
- case 'blog':
611
- $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
612
- break;
613
- case 'server':
614
- $lastcommentmodified = $wpdb->get_var($wpdb->prepare("SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server));
615
- break;
616
- }
617
-
618
- $cache_lastcommentmodified[$timezone] = $lastcommentmodified;
619
-
620
- return $lastcommentmodified;
621
- }
622
-
623
- /**
624
- * The amount of comments in a post or total comments.
625
- *
626
- * A lot like {@link wp_count_comments()}, in that they both return comment
627
- * stats (albeit with different types). The {@link wp_count_comments()} actual
628
- * caches, but this function does not.
629
- *
630
- * @since 2.0.0
631
- * @uses $wpdb
632
- *
633
- * @param int $post_id Optional. Comment amount in post if > 0, else total comments blog wide.
634
- * @return array The amount of spam, approved, awaiting moderation, and total comments.
635
- */
636
- function get_comment_count( $post_id = 0 ) {
637
- global $wpdb;
638
-
639
- $post_id = (int) $post_id;
640
-
641
- $where = '';
642
- if ( $post_id > 0 ) {
643
- $where = $wpdb->prepare("WHERE comment_post_ID = %d", $post_id);
644
- }
645
-
646
- $totals = (array) $wpdb->get_results("
647
- SELECT comment_approved, COUNT( * ) AS total
648
- FROM {$wpdb->comments}
649
- {$where}
650
- GROUP BY comment_approved
651
- ", ARRAY_A);
652
-
653
- $comment_count = array(
654
- "approved" => 0,
655
- "awaiting_moderation" => 0,
656
- "spam" => 0,
657
- "total_comments" => 0
658
- );
659
-
660
- foreach ( $totals as $row ) {
661
- switch ( $row['comment_approved'] ) {
662
- case 'spam':
663
- $comment_count['spam'] = $row['total'];
664
- $comment_count["total_comments"] += $row['total'];
665
- break;
666
- case 1:
667
- $comment_count['approved'] = $row['total'];
668
- $comment_count['total_comments'] += $row['total'];
669
- break;
670
- case 0:
671
- $comment_count['awaiting_moderation'] = $row['total'];
672
- $comment_count['total_comments'] += $row['total'];
673
- break;
674
- default:
675
- break;
676
- }
677
- }
678
-
679
- return $comment_count;
680
- }
681
-
682
- //
683
- // Comment meta functions
684
- //
685
-
686
- /**
687
- * Add meta data field to a comment.
688
- *
689
- * @since 2.9.0
690
- * @uses add_metadata
691
- * @link http://codex.wordpress.org/Function_Reference/add_comment_meta
692
- *
693
- * @param int $comment_id Comment ID.
694
- * @param string $meta_key Metadata name.
695
- * @param mixed $meta_value Metadata value.
696
- * @param bool $unique Optional, default is false. Whether the same key should not be added.
697
- * @return int|bool Meta ID on success, false on failure.
698
- */
699
- function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = false) {
700
- return add_metadata('comment', $comment_id, $meta_key, $meta_value, $unique);
701
- }
702
-
703
- /**
704
- * Remove metadata matching criteria from a comment.
705
- *
706
- * You can match based on the key, or key and value. Removing based on key and
707
- * value, will keep from removing duplicate metadata with the same key. It also
708
- * allows removing all metadata matching key, if needed.
709
- *
710
- * @since 2.9.0
711
- * @uses delete_metadata
712
- * @link http://codex.wordpress.org/Function_Reference/delete_comment_meta
713
- *
714
- * @param int $comment_id comment ID
715
- * @param string $meta_key Metadata name.
716
- * @param mixed $meta_value Optional. Metadata value.
717
- * @return bool True on success, false on failure.
718
- */
719
- function delete_comment_meta($comment_id, $meta_key, $meta_value = '') {
720
- return delete_metadata('comment', $comment_id, $meta_key, $meta_value);
721
- }
722
-
723
- /**
724
- * Retrieve comment meta field for a comment.
725
- *
726
- * @since 2.9.0
727
- * @uses get_metadata
728
- * @link http://codex.wordpress.org/Function_Reference/get_comment_meta
729
- *
730
- * @param int $comment_id Comment ID.
731
- * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys.
732
- * @param bool $single Whether to return a single value.
733
- * @return mixed Will be an array if $single is false. Will be value of meta data field if $single
734
- * is true.
735
- */
736
- function get_comment_meta($comment_id, $key = '', $single = false) {
737
- return get_metadata('comment', $comment_id, $key, $single);
738
- }
739
-
740
- /**
741
- * Update comment meta field based on comment ID.
742
- *
743
- * Use the $prev_value parameter to differentiate between meta fields with the
744
- * same key and comment ID.
745
- *
746
- * If the meta field for the comment does not exist, it will be added.
747
- *
748
- * @since 2.9.0
749
- * @uses update_metadata
750
- * @link http://codex.wordpress.org/Function_Reference/update_comment_meta
751
- *
752
- * @param int $comment_id Comment ID.
753
- * @param string $meta_key Metadata key.
754
- * @param mixed $meta_value Metadata value.
755
- * @param mixed $prev_value Optional. Previous value to check before removing.
756
- * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
757
- */
758
- function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') {
759
- return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value);
760
- }
761
-
762
- /**
763
- * Sets the cookies used to store an unauthenticated commentator's identity. Typically used
764
- * to recall previous comments by this commentator that are still held in moderation.
765
- *
766
- * @param object $comment Comment object.
767
- * @param object $user Comment author's object.
768
- *
769
- * @since 3.4.0
770
- */
771
- function wp_set_comment_cookies($comment, $user) {
772
- if ( $user->exists() )
773
- return;
774
-
775
- /**
776
- * Filter the lifetime of the comment cookie in seconds.
777
- *
778
- * @since 2.8.0
779
- *
780
- * @param int $seconds Comment cookie lifetime. Default 30000000.
781
- */
782
- $comment_cookie_lifetime = apply_filters( 'comment_cookie_lifetime', 30000000 );
783
- $secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );
784
- setcookie( 'comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN, $secure );
785
- setcookie( 'comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN, $secure );
786
- setcookie( 'comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN, $secure );
787
- }
788
-
789
- /**
790
- * Sanitizes the cookies sent to the user already.
791
- *
792
- * Will only do anything if the cookies have already been created for the user.
793
- * Mostly used after cookies had been sent to use elsewhere.
794
- *
795
- * @since 2.0.4
796
- */
797
- function sanitize_comment_cookies() {
798
- if ( isset( $_COOKIE['comment_author_' . COOKIEHASH] ) ) {
799
- /**
800
- * Filter the comment author's name cookie before it is set.
801
- *
802
- * When this filter hook is evaluated in wp_filter_comment(),
803
- * the comment author's name string is passed.
804
- *
805
- * @since 1.5.0
806
- *
807
- * @param string $author_cookie The comment author name cookie.
808
- */
809
- $comment_author = apply_filters( 'pre_comment_author_name', $_COOKIE['comment_author_' . COOKIEHASH] );
810
- $comment_author = wp_unslash($comment_author);
811
- $comment_author = esc_attr($comment_author);
812
- $_COOKIE['comment_author_' . COOKIEHASH] = $comment_author;
813
- }
814
-
815
- if ( isset( $_COOKIE['comment_author_email_' . COOKIEHASH] ) ) {
816
- /**
817
- * Filter the comment author's email cookie before it is set.
818
- *
819
- * When this filter hook is evaluated in wp_filter_comment(),
820
- * the comment author's email string is passed.
821
- *
822
- * @since 1.5.0
823
- *
824
- * @param string $author_email_cookie The comment author email cookie.
825
- */
826
- $comment_author_email = apply_filters( 'pre_comment_author_email', $_COOKIE['comment_author_email_' . COOKIEHASH] );
827
- $comment_author_email = wp_unslash($comment_author_email);
828
- $comment_author_email = esc_attr($comment_author_email);
829
- $_COOKIE['comment_author_email_'.COOKIEHASH] = $comment_author_email;
830
- }
831
-
832
- if ( isset( $_COOKIE['comment_author_url_' . COOKIEHASH] ) ) {
833
- /**
834
- * Filter the comment author's URL cookie before it is set.
835
- *
836
- * When this filter hook is evaluated in wp_filter_comment(),
837
- * the comment author's URL string is passed.
838
- *
839
- * @since 1.5.0
840
- *
841
- * @param string $author_url_cookie The comment author URL cookie.
842
- */
843
- $comment_author_url = apply_filters( 'pre_comment_author_url', $_COOKIE['comment_author_url_' . COOKIEHASH] );
844
- $comment_author_url = wp_unslash($comment_author_url);
845
- $_COOKIE['comment_author_url_'.COOKIEHASH] = $comment_author_url;
846
- }
847
- }
848
-
849
- /**
850
- * Validates whether this comment is allowed to be made.
851
- *
852
- * @since 2.0.0
853
- * @uses $wpdb
854
- *
855
- * @param array $commentdata Contains information on the comment
856
- * @return mixed Signifies the approval status (0|1|'spam')
857
- */
858
- function wp_allow_comment( $commentdata ) {
859
- global $wpdb;
860
-
861
- // Simple duplicate check
862
- // expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content)
863
- $dupe = $wpdb->prepare(
864
- "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = %s AND comment_approved != 'trash' AND ( comment_author = %s ",
865
- wp_unslash( $commentdata['comment_post_ID'] ),
866
- wp_unslash( $commentdata['comment_parent'] ),
867
- wp_unslash( $commentdata['comment_author'] )
868
- );
869
- if ( $commentdata['comment_author_email'] ) {
870
- $dupe .= $wpdb->prepare(
871
- "OR comment_author_email = %s ",
872
- wp_unslash( $commentdata['comment_author_email'] )
873
- );
874
- }
875
- $dupe .= $wpdb->prepare(
876
- ") AND comment_content = %s LIMIT 1",
877
- wp_unslash( $commentdata['comment_content'] )
878
- );
879
- if ( $wpdb->get_var( $dupe ) ) {
880
- /**
881
- * Fires immediately after a duplicate comment is detected.
882
- *
883
- * @since 3.0.0
884
- *
885
- * @param array $commentdata Comment data.
886
- */
887
- do_action( 'comment_duplicate_trigger', $commentdata );
888
- if ( defined( 'DOING_AJAX' ) ) {
889
- die( __('Duplicate comment detected; it looks as though you&#8217;ve already said that!') );
890
- }
891
- wp_die( __('Duplicate comment detected; it looks as though you&#8217;ve already said that!') );
892
- }
893
-
894
- /**
895
- * Fires immediately before a comment is marked approved.
896
- *
897
- * Allows checking for comment flooding.
898
- *
899
- * @since 2.3.0
900
- *
901
- * @param string $comment_author_IP Comment author's IP address.
902
- * @param string $comment_author_email Comment author's email.
903
- * @param string $comment_date_gmt GMT date the comment was posted.
904
- */
905
- do_action(
906
- 'check_comment_flood',
907
- $commentdata['comment_author_IP'],
908
- $commentdata['comment_author_email'],
909
- $commentdata['comment_date_gmt']
910
- );
911
-
912
- if ( ! empty( $commentdata['user_id'] ) ) {
913
- $user = get_userdata( $commentdata['user_id'] );
914
- $post_author = $wpdb->get_var( $wpdb->prepare(
915
- "SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1",
916
- $commentdata['comment_post_ID']
917
- ) );
918
- }
919
-
920
- if ( isset( $user ) && ( $commentdata['user_id'] == $post_author || $user->has_cap( 'moderate_comments' ) ) ) {
921
- // The author and the admins get respect.
922
- $approved = 1;
923
- } else {
924
- // Everyone else's comments will be checked.
925
- if ( check_comment(
926
- $commentdata['comment_author'],
927
- $commentdata['comment_author_email'],
928
- $commentdata['comment_author_url'],
929
- $commentdata['comment_content'],
930
- $commentdata['comment_author_IP'],
931
- $commentdata['comment_agent'],
932
- $commentdata['comment_type']
933
- ) ) {
934
- $approved = 1;
935
- } else {
936
- $approved = 0;
937
- }
938
-
939
- if ( wp_blacklist_check(
940
- $commentdata['comment_author'],
941
- $commentdata['comment_author_email'],
942
- $commentdata['comment_author_url'],
943
- $commentdata['comment_content'],
944
- $commentdata['comment_author_IP'],
945
- $commentdata['comment_agent']
946
- ) ) {
947
- $approved = 'spam';
948
- }
949
- }
950
-
951
- /**
952
- * Filter a comment's approval status before it is set.
953
- *
954
- * @since 2.1.0
955
- *
956
- * @param bool|string $approved The approval status. Accepts 1, 0, or 'spam'.
957
- * @param array $commentdata Comment data.
958
- */
959
- $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata );
960
- return $approved;
961
- }
962
-
963
- /**
964
- * Check whether comment flooding is occurring.
965
- *
966
- * Won't run, if current user can manage options, so to not block
967
- * administrators.
968
- *
969
- * @since 2.3.0
970
- * @uses $wpdb
971
- *
972
- * @param string $ip Comment IP.
973
- * @param string $email Comment author email address.
974
- * @param string $date MySQL time string.
975
- */
976
- function check_comment_flood_db( $ip, $email, $date ) {
977
- global $wpdb;
978
- if ( current_user_can( 'manage_options' ) )
979
- return; // don't throttle admins
980
- $hour_ago = gmdate( 'Y-m-d H:i:s', time() - HOUR_IN_SECONDS );
981
- if ( $lasttime = $wpdb->get_var( $wpdb->prepare( "SELECT `comment_date_gmt` FROM `$wpdb->comments` WHERE `comment_date_gmt` >= %s AND ( `comment_author_IP` = %s OR `comment_author_email` = %s ) ORDER BY `comment_date_gmt` DESC LIMIT 1", $hour_ago, $ip, $email ) ) ) {
982
- $time_lastcomment = mysql2date('U', $lasttime, false);
983
- $time_newcomment = mysql2date('U', $date, false);
984
- /**
985
- * Filter the comment flood status.
986
- *
987
- * @since 2.1.0
988
- *
989
- * @param bool $bool Whether a comment flood is occurring. Default false.
990
- * @param int $time_lastcomment Timestamp of when the last comment was posted.
991
- * @param int $time_newcomment Timestamp of when the new comment was posted.
992
- */
993
- $flood_die = apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment );
994
- if ( $flood_die ) {
995
- /**
996
- * Fires before the comment flood message is triggered.
997
- *
998
- * @since 1.5.0
999
- *
1000
- * @param int $time_lastcomment Timestamp of when the last comment was posted.
1001
- * @param int $time_newcomment Timestamp of when the new comment was posted.
1002
- */
1003
- do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment );
1004
-
1005
- if ( defined('DOING_AJAX') )
1006
- die( __('You are posting comments too quickly. Slow down.') );
1007
-
1008
- wp_die( __('You are posting comments too quickly. Slow down.'), '', array('response' => 403) );
1009
- }
1010
- }
1011
- }
1012
-
1013
- /**
1014
- * Separates an array of comments into an array keyed by comment_type.
1015
- *
1016
- * @since 2.7.0
1017
- *
1018
- * @param array $comments Array of comments
1019
- * @return array Array of comments keyed by comment_type.
1020
- */
1021
- function separate_comments(&$comments) {
1022
- $comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array());
1023
- $count = count($comments);
1024
- for ( $i = 0; $i < $count; $i++ ) {
1025
- $type = $comments[$i]->comment_type;
1026
- if ( empty($type) )
1027
- $type = 'comment';
1028
- $comments_by_type[$type][] = &$comments[$i];
1029
- if ( 'trackback' == $type || 'pingback' == $type )
1030
- $comments_by_type['pings'][] = &$comments[$i];
1031
- }
1032
-
1033
- return $comments_by_type;
1034
- }
1035
-
1036
- /**
1037
- * Calculate the total number of comment pages.
1038
- *
1039
- * @since 2.7.0
1040
- *
1041
- * @uses Walker_Comment
1042
- *
1043
- * @param array $comments Optional array of comment objects. Defaults to $wp_query->comments
1044
- * @param int $per_page Optional comments per page.
1045
- * @param boolean $threaded Optional control over flat or threaded comments.
1046
- * @return int Number of comment pages.
1047
- */
1048
- function get_comment_pages_count( $comments = null, $per_page = null, $threaded = null ) {
1049
- global $wp_query;
1050
-
1051
- if ( null === $comments && null === $per_page && null === $threaded && !empty($wp_query->max_num_comment_pages) )
1052
- return $wp_query->max_num_comment_pages;
1053
-
1054
- if ( ( ! $comments || ! is_array( $comments ) ) && ! empty( $wp_query->comments ) )
1055
- $comments = $wp_query->comments;
1056
-
1057
- if ( empty($comments) )
1058
- return 0;
1059
-
1060
- if ( ! get_option( 'page_comments' ) )
1061
- return 1;
1062
-
1063
- if ( !isset($per_page) )
1064
- $per_page = (int) get_query_var('comments_per_page');
1065
- if ( 0 === $per_page )
1066
- $per_page = (int) get_option('comments_per_page');
1067
- if ( 0 === $per_page )
1068
- return 1;
1069
-
1070
- if ( !isset($threaded) )
1071
- $threaded = get_option('thread_comments');
1072
-
1073
- if ( $threaded ) {
1074
- $walker = new Walker_Comment;
1075
- $count = ceil( $walker->get_number_of_root_elements( $comments ) / $per_page );
1076
- } else {
1077
- $count = ceil( count( $comments ) / $per_page );
1078
- }
1079
-
1080
- return $count;
1081
- }
1082
-
1083
- /**
1084
- * Calculate what page number a comment will appear on for comment paging.
1085
- *
1086
- * @since 2.7.0
1087
- * @uses get_comment() Gets the full comment of the $comment_ID parameter.
1088
- * @uses get_option() Get various settings to control function and defaults.
1089
- * @uses get_page_of_comment() Used to loop up to top level comment.
1090
- *
1091
- * @param int $comment_ID Comment ID.
1092
- * @param array $args Optional args.
1093
- * @return int|null Comment page number or null on error.
1094
- */
1095
- function get_page_of_comment( $comment_ID, $args = array() ) {
1096
- global $wpdb;
1097
-
1098
- if ( !$comment = get_comment( $comment_ID ) )
1099
- return;
1100
-
1101
- $defaults = array( 'type' => 'all', 'page' => '', 'per_page' => '', 'max_depth' => '' );
1102
- $args = wp_parse_args( $args, $defaults );
1103
-
1104
- if ( '' === $args['per_page'] && get_option('page_comments') )
1105
- $args['per_page'] = get_query_var('comments_per_page');
1106
- if ( empty($args['per_page']) ) {
1107
- $args['per_page'] = 0;
1108
- $args['page'] = 0;
1109
- }
1110
- if ( $args['per_page'] < 1 )
1111
- return 1;
1112
-
1113
- if ( '' === $args['max_depth'] ) {
1114
- if ( get_option('thread_comments') )
1115
- $args['max_depth'] = get_option('thread_comments_depth');
1116
- else
1117
- $args['max_depth'] = -1;
1118
- }
1119
-
1120
- // Find this comment's top level parent if threading is enabled
1121
- if ( $args['max_depth'] > 1 && 0 != $comment->comment_parent )
1122
- return get_page_of_comment( $comment->comment_parent, $args );
1123
-
1124
- $allowedtypes = array(
1125
- 'comment' => '',
1126
- 'pingback' => 'pingback',
1127
- 'trackback' => 'trackback',
1128
- );
1129
-
1130
- $comtypewhere = ( 'all' != $args['type'] && isset($allowedtypes[$args['type']]) ) ? " AND comment_type = '" . $allowedtypes[$args['type']] . "'" : '';
1131
-
1132
- // Count comments older than this one
1133
- $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_approved = '1' AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) );
1134
-
1135
- // No older comments? Then it's page #1.
1136
- if ( 0 == $oldercoms )
1137
- return 1;
1138
-
1139
- // Divide comments older than this one by comments per page to get this comment's page number
1140
- return ceil( ( $oldercoms + 1 ) / $args['per_page'] );
1141
- }
1142
-
1143
- /**
1144
- * Does comment contain blacklisted characters or words.
1145
- *
1146
- * @since 1.5.0
1147
- *
1148
- * @param string $author The author of the comment
1149
- * @param string $email The email of the comment
1150
- * @param string $url The url used in the comment
1151
- * @param string $comment The comment content
1152
- * @param string $user_ip The comment author IP address
1153
- * @param string $user_agent The author's browser user agent
1154
- * @return bool True if comment contains blacklisted content, false if comment does not
1155
- */
1156
- function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) {
1157
- /**
1158
- * Fires before the comment is tested for blacklisted characters or words.
1159
- *
1160
- * @since 1.5.0
1161
- *
1162
- * @param string $author Comment author.
1163
- * @param string $email Comment author's email.
1164
- * @param string $url Comment author's URL.
1165
- * @param string $comment Comment content.
1166
- * @param string $user_ip Comment author's IP address.
1167
- * @param string $user_agent Comment author's browser user agent.
1168
- */
1169
- do_action( 'wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent );
1170
-
1171
- $mod_keys = trim( get_option('blacklist_keys') );
1172
- if ( '' == $mod_keys )
1173
- return false; // If moderation keys are empty
1174
- $words = explode("\n", $mod_keys );
1175
-
1176
- foreach ( (array) $words as $word ) {
1177
- $word = trim($word);
1178
-
1179
- // Skip empty lines
1180
- if ( empty($word) ) { continue; }
1181
-
1182
- // Do some escaping magic so that '#' chars in the
1183
- // spam words don't break things:
1184
- $word = preg_quote($word, '#');
1185
-
1186
- $pattern = "#$word#i";
1187
- if (
1188
- preg_match($pattern, $author)
1189
- || preg_match($pattern, $email)
1190
- || preg_match($pattern, $url)
1191
- || preg_match($pattern, $comment)
1192
- || preg_match($pattern, $user_ip)
1193
- || preg_match($pattern, $user_agent)
1194
- )
1195
- return true;
1196
- }
1197
- return false;
1198
- }
1199
-
1200
- /**
1201
- * Retrieve total comments for blog or single post.
1202
- *
1203
- * The properties of the returned object contain the 'moderated', 'approved',
1204
- * and spam comments for either the entire blog or single post. Those properties
1205
- * contain the amount of comments that match the status. The 'total_comments'
1206
- * property contains the integer of total comments.
1207
- *
1208
- * The comment stats are cached and then retrieved, if they already exist in the
1209
- * cache.
1210
- *
1211
- * @since 2.5.0
1212
- *
1213
- * @param int $post_id Optional. Post ID.
1214
- * @return object Comment stats.
1215
- */
1216
- function wp_count_comments( $post_id = 0 ) {
1217
- global $wpdb;
1218
-
1219
- $post_id = (int) $post_id;
1220
-
1221
- /**
1222
- * Filter the comments count for a given post.
1223
- *
1224
- * @since 2.7.0
1225
- *
1226
- * @param array $count An empty array.
1227
- * @param int $post_id The post ID.
1228
- */
1229
- $stats = apply_filters( 'wp_count_comments', array(), $post_id );
1230
- if ( !empty($stats) )
1231
- return $stats;
1232
-
1233
- $count = wp_cache_get("comments-{$post_id}", 'counts');
1234
-
1235
- if ( false !== $count )
1236
- return $count;
1237
-
1238
- $where = '';
1239
- if ( $post_id > 0 )
1240
- $where = $wpdb->prepare( "WHERE comment_post_ID = %d", $post_id );
1241
-
1242
- $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} {$where} GROUP BY comment_approved", ARRAY_A );
1243
-
1244
- $total = 0;
1245
- $approved = array('0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed');
1246
- foreach ( (array) $count as $row ) {
1247
- // Don't count post-trashed toward totals
1248
- if ( 'post-trashed' != $row['comment_approved'] && 'trash' != $row['comment_approved'] )
1249
- $total += $row['num_comments'];
1250
- if ( isset( $approved[$row['comment_approved']] ) )
1251
- $stats[$approved[$row['comment_approved']]] = $row['num_comments'];
1252
- }
1253
-
1254
- $stats['total_comments'] = $total;
1255
- foreach ( $approved as $key ) {
1256
- if ( empty($stats[$key]) )
1257
- $stats[$key] = 0;
1258
- }
1259
-
1260
- $stats = (object) $stats;
1261
- wp_cache_set("comments-{$post_id}", $stats, 'counts');
1262
-
1263
- return $stats;
1264
- }
1265
-
1266
- /**
1267
- * Trashes or deletes a comment.
1268
- *
1269
- * The comment is moved to trash instead of permanently deleted unless trash is
1270
- * disabled, item is already in the trash, or $force_delete is true.
1271
- *
1272
- * The post comment count will be updated if the comment was approved and has a
1273
- * post ID available.
1274
- *
1275
- * @since 2.0.0
1276
- * @uses $wpdb
1277
- * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object
1278
- *
1279
- * @param int $comment_id Comment ID
1280
- * @param bool $force_delete Whether to bypass trash and force deletion. Default is false.
1281
- * @return bool True on success, false on failure.
1282
- */
1283
- function wp_delete_comment($comment_id, $force_delete = false) {
1284
- global $wpdb;
1285
- if (!$comment = get_comment($comment_id))
1286
- return false;
1287
-
1288
- if ( !$force_delete && EMPTY_TRASH_DAYS && !in_array( wp_get_comment_status($comment_id), array( 'trash', 'spam' ) ) )
1289
- return wp_trash_comment($comment_id);
1290
-
1291
- /**
1292
- * Fires immediately before a comment is deleted from the database.
1293
- *
1294
- * @since 1.2.0
1295
- *
1296
- * @param int $comment_id The comment ID.
1297
- */
1298
- do_action( 'delete_comment', $comment_id );
1299
-
1300
- // Move children up a level.
1301
- $children = $wpdb->get_col( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment_id) );
1302
- if ( !empty($children) ) {
1303
- $wpdb->update($wpdb->comments, array('comment_parent' => $comment->comment_parent), array('comment_parent' => $comment_id));
1304
- clean_comment_cache($children);
1305
- }
1306
-
1307
- // Delete metadata
1308
- $meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d", $comment_id ) );
1309
- foreach ( $meta_ids as $mid )
1310
- delete_metadata_by_mid( 'comment', $mid );
1311
-
1312
- if ( ! $wpdb->delete( $wpdb->comments, array( 'comment_ID' => $comment_id ) ) )
1313
- return false;
1314
-
1315
- /**
1316
- * Fires immediately after a comment is deleted from the database.
1317
- *
1318
- * @since 2.9.0
1319
- *
1320
- * @param int $comment_id The comment ID.
1321
- */
1322
- do_action( 'deleted_comment', $comment_id );
1323
-
1324
- $post_id = $comment->comment_post_ID;
1325
- if ( $post_id && $comment->comment_approved == 1 )
1326
- wp_update_comment_count($post_id);
1327
-
1328
- clean_comment_cache($comment_id);
1329
-
1330
- /** This action is documented in wp-includes/comment.php */
1331
- do_action( 'wp_set_comment_status', $comment_id, 'delete' );
1332
-
1333
- wp_transition_comment_status('delete', $comment->comment_approved, $comment);
1334
- return true;
1335
- }
1336
-
1337
- /**
1338
- * Moves a comment to the Trash
1339
- *
1340
- * If trash is disabled, comment is permanently deleted.
1341
- *
1342
- * @since 2.9.0
1343
- *
1344
- * @uses wp_delete_comment() if trash is disabled
1345
- *
1346
- * @param int $comment_id Comment ID.
1347
- * @return bool True on success, false on failure.
1348
- */
1349
- function wp_trash_comment($comment_id) {
1350
- if ( !EMPTY_TRASH_DAYS )
1351
- return wp_delete_comment($comment_id, true);
1352
-
1353
- if ( !$comment = get_comment($comment_id) )
1354
- return false;
1355
-
1356
- /**
1357
- * Fires immediately before a comment is sent to the Trash.
1358
- *
1359
- * @since 2.9.0
1360
- *
1361
- * @param int $comment_id The comment ID.
1362
- */
1363
- do_action( 'trash_comment', $comment_id );
1364
-
1365
- if ( wp_set_comment_status($comment_id, 'trash') ) {
1366
- add_comment_meta($comment_id, '_wp_trash_meta_status', $comment->comment_approved);
1367
- add_comment_meta($comment_id, '_wp_trash_meta_time', time() );
1368
-
1369
- /**
1370
- * Fires immediately after a comment is sent to Trash.
1371
- *
1372
- * @since 2.9.0
1373
- *
1374
- * @param int $comment_id The comment ID.
1375
- */
1376
- do_action( 'trashed_comment', $comment_id );
1377
- return true;
1378
- }
1379
-
1380
- return false;
1381
- }
1382
-
1383
- /**
1384
- * Removes a comment from the Trash
1385
- *
1386
- * @since 2.9.0
1387
- *
1388
- * @param int $comment_id Comment ID.
1389
- * @return bool True on success, false on failure.
1390
- */
1391
- function wp_untrash_comment($comment_id) {
1392
- if ( ! (int)$comment_id )
1393
- return false;
1394
-
1395
- /**
1396
- * Fires immediately before a comment is restored from the Trash.
1397
- *
1398
- * @since 2.9.0
1399
- *
1400
- * @param int $comment_id The comment ID.
1401
- */
1402
- do_action( 'untrash_comment', $comment_id );
1403
-
1404
- $status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true);
1405
- if ( empty($status) )
1406
- $status = '0';
1407
-
1408
- if ( wp_set_comment_status($comment_id, $status) ) {
1409
- delete_comment_meta($comment_id, '_wp_trash_meta_time');
1410
- delete_comment_meta($comment_id, '_wp_trash_meta_status');
1411
- /**
1412
- * Fires immediately after a comment is restored from the Trash.
1413
- *
1414
- * @since 2.9.0
1415
- *
1416
- * @param int $comment_id The comment ID.
1417
- */
1418
- do_action( 'untrashed_comment', $comment_id );
1419
- return true;
1420
- }
1421
-
1422
- return false;
1423
- }
1424
-
1425
- /**
1426
- * Marks a comment as Spam
1427
- *
1428
- * @since 2.9.0
1429
- *
1430
- * @param int $comment_id Comment ID.
1431
- * @return bool True on success, false on failure.
1432
- */
1433
- function wp_spam_comment($comment_id) {
1434
- if ( !$comment = get_comment($comment_id) )
1435
- return false;
1436
-
1437
- /**
1438
- * Fires immediately before a comment is marked as Spam.
1439
- *
1440
- * @since 2.9.0
1441
- *
1442
- * @param int $comment_id The comment ID.
1443
- */
1444
- do_action( 'spam_comment', $comment_id );
1445
-
1446
- if ( wp_set_comment_status($comment_id, 'spam') ) {
1447
- add_comment_meta($comment_id, '_wp_trash_meta_status', $comment->comment_approved);
1448
- /**
1449
- * Fires immediately after a comment is marked as Spam.
1450
- *
1451
- * @since 2.9.0
1452
- *
1453
- * @param int $comment_id The comment ID.
1454
- */
1455
- do_action( 'spammed_comment', $comment_id );
1456
- return true;
1457
- }
1458
-
1459
- return false;
1460
- }
1461
-
1462
- /**
1463
- * Removes a comment from the Spam
1464
- *
1465
- * @since 2.9.0
1466
- *
1467
- * @param int $comment_id Comment ID.
1468
- * @return bool True on success, false on failure.
1469
- */
1470
- function wp_unspam_comment($comment_id) {
1471
- if ( ! (int)$comment_id )
1472
- return false;
1473
-
1474
- /**
1475
- * Fires immediately before a comment is unmarked as Spam.
1476
- *
1477
- * @since 2.9.0
1478
- *
1479
- * @param int $comment_id The comment ID.
1480
- */
1481
- do_action( 'unspam_comment', $comment_id );
1482
-
1483
- $status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true);
1484
- if ( empty($status) )
1485
- $status = '0';
1486
-
1487
- if ( wp_set_comment_status($comment_id, $status) ) {
1488
- delete_comment_meta($comment_id, '_wp_trash_meta_status');
1489
- /**
1490
- * Fires immediately after a comment is unmarked as Spam.
1491
- *
1492
- * @since 2.9.0
1493
- *
1494
- * @param int $comment_id The comment ID.
1495
- */
1496
- do_action( 'unspammed_comment', $comment_id );
1497
- return true;
1498
- }
1499
-
1500
- return false;
1501
- }
1502
-
1503
- /**
1504
- * The status of a comment by ID.
1505
- *
1506
- * @since 1.0.0
1507
- *
1508
- * @param int $comment_id Comment ID
1509
- * @return string|bool Status might be 'trash', 'approved', 'unapproved', 'spam'. False on failure.
1510
- */
1511
- function wp_get_comment_status($comment_id) {
1512
- $comment = get_comment($comment_id);
1513
- if ( !$comment )
1514
- return false;
1515
-
1516
- $approved = $comment->comment_approved;
1517
-
1518
- if ( $approved == null )
1519
- return false;
1520
- elseif ( $approved == '1' )
1521
- return 'approved';
1522
- elseif ( $approved == '0' )
1523
- return 'unapproved';
1524
- elseif ( $approved == 'spam' )
1525
- return 'spam';
1526
- elseif ( $approved == 'trash' )
1527
- return 'trash';
1528
- else
1529
- return false;
1530
- }
1531
-
1532
- /**
1533
- * Call hooks for when a comment status transition occurs.
1534
- *
1535
- * Calls hooks for comment status transitions. If the new comment status is not the same
1536
- * as the previous comment status, then two hooks will be ran, the first is
1537
- * 'transition_comment_status' with new status, old status, and comment data. The
1538
- * next action called is 'comment_OLDSTATUS_to_NEWSTATUS' the NEWSTATUS is the
1539
- * $new_status parameter and the OLDSTATUS is $old_status parameter; it has the
1540
- * comment data.
1541
- *
1542
- * The final action will run whether or not the comment statuses are the same. The
1543
- * action is named 'comment_NEWSTATUS_COMMENTTYPE', NEWSTATUS is from the $new_status
1544
- * parameter and COMMENTTYPE is comment_type comment data.
1545
- *
1546
- * @since 2.7.0
1547
- *
1548
- * @param string $new_status New comment status.
1549
- * @param string $old_status Previous comment status.
1550
- * @param object $comment Comment data.
1551
- */
1552
- function wp_transition_comment_status($new_status, $old_status, $comment) {
1553
- /*
1554
- * Translate raw statuses to human readable formats for the hooks.
1555
- * This is not a complete list of comment status, it's only the ones
1556
- * that need to be renamed
1557
- */
1558
- $comment_statuses = array(
1559
- 0 => 'unapproved',
1560
- 'hold' => 'unapproved', // wp_set_comment_status() uses "hold"
1561
- 1 => 'approved',
1562
- 'approve' => 'approved', // wp_set_comment_status() uses "approve"
1563
- );
1564
- if ( isset($comment_statuses[$new_status]) ) $new_status = $comment_statuses[$new_status];
1565
- if ( isset($comment_statuses[$old_status]) ) $old_status = $comment_statuses[$old_status];
1566
-
1567
- // Call the hooks
1568
- if ( $new_status != $old_status ) {
1569
- /**
1570
- * Fires when the comment status is in transition.
1571
- *
1572
- * @since 2.7.0
1573
- *
1574
- * @param int|string $new_status The new comment status.
1575
- * @param int|string $old_status The old comment status.
1576
- * @param object $comment The comment data.
1577
- */
1578
- do_action( 'transition_comment_status', $new_status, $old_status, $comment );
1579
- /**
1580
- * Fires when the comment status is in transition from one specific status to another.
1581
- *
1582
- * The dynamic portions of the hook name, $old_status, and $new_status,
1583
- * refer to the old and new comment statuses, respectively.
1584
- *
1585
- * @since 2.7.0
1586
- *
1587
- * @param object $comment Comment object.
1588
- */
1589
- do_action( "comment_{$old_status}_to_{$new_status}", $comment );
1590
- }
1591
- /**
1592
- * Fires when the status of a specific comment type is in transition.
1593
- *
1594
- * The dynamic portions of the hook name, $new_status, and $comment->comment_type,
1595
- * refer to the new comment status, and the type of comment, respectively.
1596
- *
1597
- * Typical comment types include an empty string (standard comment), 'pingback',
1598
- * or 'trackback'.
1599
- *
1600
- * @since 2.7.0
1601
- *
1602
- * @param int $comment_ID The comment ID.
1603
- * @param obj $comment Comment object.
1604
- */
1605
- do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );
1606
- }
1607
-
1608
- /**
1609
- * Get current commenter's name, email, and URL.
1610
- *
1611
- * Expects cookies content to already be sanitized. User of this function might
1612
- * wish to recheck the returned array for validity.
1613
- *
1614
- * @see sanitize_comment_cookies() Use to sanitize cookies
1615
- *
1616
- * @since 2.0.4
1617
- *
1618
- * @return array Comment author, email, url respectively.
1619
- */
1620
- function wp_get_current_commenter() {
1621
- // Cookies should already be sanitized.
1622
-
1623
- $comment_author = '';
1624
- if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) )
1625
- $comment_author = $_COOKIE['comment_author_'.COOKIEHASH];
1626
-
1627
- $comment_author_email = '';
1628
- if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) )
1629
- $comment_author_email = $_COOKIE['comment_author_email_'.COOKIEHASH];
1630
-
1631
- $comment_author_url = '';
1632
- if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) )
1633
- $comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH];
1634
-
1635
- /**
1636
- * Filter the current commenter's name, email, and URL.
1637
- *
1638
- * @since 3.1.0
1639
- *
1640
- * @param string $comment_author Comment author's name.
1641
- * @param string $comment_author_email Comment author's email.
1642
- * @param string $comment_author_url Comment author's URL.
1643
- */
1644
- return apply_filters( 'wp_get_current_commenter', compact('comment_author', 'comment_author_email', 'comment_author_url') );
1645
- }
1646
-
1647
- /**
1648
- * Inserts a comment to the database.
1649
- *
1650
- * The available comment data key names are 'comment_author_IP', 'comment_date',
1651
- * 'comment_date_gmt', 'comment_parent', 'comment_approved', and 'user_id'.
1652
- *
1653
- * @since 2.0.0
1654
- * @uses $wpdb
1655
- *
1656
- * @param array $commentdata Contains information on the comment.
1657
- * @return int|bool The new comment's ID on success, false on failure.
1658
- */
1659
- function wp_insert_comment( $commentdata ) {
1660
- global $wpdb;
1661
- $data = wp_unslash( $commentdata );
1662
-
1663
- $comment_author = ! isset( $data['comment_author'] ) ? '' : $data['comment_author'];
1664
- $comment_author_email = ! isset( $data['comment_author_email'] ) ? '' : $data['comment_author_email'];
1665
- $comment_author_url = ! isset( $data['comment_author_url'] ) ? '' : $data['comment_author_url'];
1666
- $comment_author_IP = ! isset( $data['comment_author_IP'] ) ? '' : $data['comment_author_IP'];
1667
-
1668
- $comment_date = ! isset( $data['comment_date'] ) ? current_time( 'mysql' ) : $data['comment_date'];
1669
- $comment_date_gmt = ! isset( $data['comment_date_gmt'] ) ? get_gmt_from_date( $comment_date ) : $data['comment_date_gmt'];
1670
-
1671
- $comment_post_ID = ! isset( $data['comment_post_ID'] ) ? '' : $data['comment_post_ID'];
1672
- $comment_content = ! isset( $data['comment_content'] ) ? '' : $data['comment_content'];
1673
- $comment_karma = ! isset( $data['comment_karma'] ) ? 0 : $data['comment_karma'];
1674
- $comment_approved = ! isset( $data['comment_approved'] ) ? 1 : $data['comment_approved'];
1675
- $comment_agent = ! isset( $data['comment_agent'] ) ? '' : $data['comment_agent'];
1676
- $comment_type = ! isset( $data['comment_type'] ) ? '' : $data['comment_type'];
1677
- $comment_parent = ! isset( $data['comment_parent'] ) ? 0 : $data['comment_parent'];
1678
-
1679
- $user_id = ! isset( $data['user_id'] ) ? 0 : $data['user_id'];
1680
-
1681
- $compacted = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_content', 'comment_karma', 'comment_approved', 'comment_agent', 'comment_type', 'comment_parent', 'user_id' );
1682
- if ( ! $wpdb->insert( $wpdb->comments, $compacted ) ) {
1683
- return false;
1684
- }
1685
-
1686
- $id = (int) $wpdb->insert_id;
1687
-
1688
- if ( $comment_approved == 1 ) {
1689
- wp_update_comment_count( $comment_post_ID );
1690
- }
1691
- $comment = get_comment( $id );
1692
-
1693
- /**
1694
- * Fires immediately after a comment is inserted into the database.
1695
- *
1696
- * @since 2.8.0
1697
- *
1698
- * @param int $id The comment ID.
1699
- * @param obj $comment Comment object.
1700
- */
1701
- do_action( 'wp_insert_comment', $id, $comment );
1702
-
1703
- wp_cache_set( 'last_changed', microtime(), 'comment' );
1704
-
1705
- return $id;
1706
- }
1707
-
1708
- /**
1709
- * Filters and sanitizes comment data.
1710
- *
1711
- * Sets the comment data 'filtered' field to true when finished. This can be
1712
- * checked as to whether the comment should be filtered and to keep from
1713
- * filtering the same comment more than once.
1714
- *
1715
- * @since 2.0.0
1716
- *
1717
- * @param array $commentdata Contains information on the comment.
1718
- * @return array Parsed comment information.
1719
- */
1720
- function wp_filter_comment($commentdata) {
1721
- if ( isset( $commentdata['user_ID'] ) ) {
1722
- /**
1723
- * Filter the comment author's user id before it is set.
1724
- *
1725
- * The first time this filter is evaluated, 'user_ID' is checked
1726
- * (for back-compat), followed by the standard 'user_id' value.
1727
- *
1728
- * @since 1.5.0
1729
- *
1730
- * @param int $user_ID The comment author's user ID.
1731
- */
1732
- $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] );
1733
- } elseif ( isset( $commentdata['user_id'] ) ) {
1734
- /** This filter is documented in wp-includes/comment.php */
1735
- $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_id'] );
1736
- }
1737
-
1738
- /**
1739
- * Filter the comment author's browser user agent before it is set.
1740
- *
1741
- * @since 1.5.0
1742
- *
1743
- * @param int $comment_agent The comment author's browser user agent.
1744
- */
1745
- $commentdata['comment_agent'] = apply_filters( 'pre_comment_user_agent', ( isset( $commentdata['comment_agent'] ) ? $commentdata['comment_agent'] : '' ) );
1746
- /** This filter is documented in wp-includes/comment.php */
1747
- $commentdata['comment_author'] = apply_filters( 'pre_comment_author_name', $commentdata['comment_author'] );
1748
- /**
1749
- * Filter the comment content before it is set.
1750
- *
1751
- * @since 1.5.0
1752
- *
1753
- * @param int $comment_content The comment content.
1754
- */
1755
- $commentdata['comment_content'] = apply_filters( 'pre_comment_content', $commentdata['comment_content'] );
1756
- /**
1757
- * Filter the comment author's IP before it is set.
1758
- *
1759
- * @since 1.5.0
1760
- *
1761
- * @param int $comment_author_ip The comment author's IP.
1762
- */
1763
- $commentdata['comment_author_IP'] = apply_filters( 'pre_comment_user_ip', $commentdata['comment_author_IP'] );
1764
- /** This filter is documented in wp-includes/comment.php */
1765
- $commentdata['comment_author_url'] = apply_filters( 'pre_comment_author_url', $commentdata['comment_author_url'] );
1766
- /** This filter is documented in wp-includes/comment.php */
1767
- $commentdata['comment_author_email'] = apply_filters( 'pre_comment_author_email', $commentdata['comment_author_email'] );
1768
- $commentdata['filtered'] = true;
1769
- return $commentdata;
1770
- }
1771
-
1772
- /**
1773
- * Whether a comment should be blocked because of comment flood.
1774
- *
1775
- * @since 2.1.0
1776
- *
1777
- * @param bool $block Whether plugin has already blocked comment.
1778
- * @param int $time_lastcomment Timestamp for last comment.
1779
- * @param int $time_newcomment Timestamp for new comment.
1780
- * @return bool Whether comment should be blocked.
1781
- */
1782
- function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment) {
1783
- if ( $block ) // a plugin has already blocked... we'll let that decision stand
1784
- return $block;
1785
- if ( ($time_newcomment - $time_lastcomment) < 15 )
1786
- return true;
1787
- return false;
1788
- }
1789
-
1790
- /**
1791
- * Adds a new comment to the database.
1792
- *
1793
- * Filters new comment to ensure that the fields are sanitized and valid before
1794
- * inserting comment into database. Calls 'comment_post' action with comment ID
1795
- * and whether comment is approved by WordPress. Also has 'preprocess_comment'
1796
- * filter for processing the comment data before the function handles it.
1797
- *
1798
- * We use REMOTE_ADDR here directly. If you are behind a proxy, you should ensure
1799
- * that it is properly set, such as in wp-config.php, for your environment.
1800
- * See {@link https://core.trac.wordpress.org/ticket/9235}
1801
- *
1802
- * @since 1.5.0
1803
- * @param array $commentdata Contains information on the comment.
1804
- * @return int|bool The ID of the comment on success, false on failure.
1805
- */
1806
- function wp_new_comment( $commentdata ) {
1807
- if ( isset( $commentdata['user_ID'] ) ) {
1808
- $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID'];
1809
- }
1810
-
1811
- $prefiltered_user_id = ( isset( $commentdata['user_id'] ) ) ? (int) $commentdata['user_id'] : 0;
1812
-
1813
- /**
1814
- * Filter a comment's data before it is sanitized and inserted into the database.
1815
- *
1816
- * @since 1.5.0
1817
- *
1818
- * @param array $commentdata Comment data.
1819
- */
1820
- $commentdata = apply_filters( 'preprocess_comment', $commentdata );
1821
-
1822
- $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID'];
1823
- if ( isset( $commentdata['user_ID'] ) && $prefiltered_user_id !== (int) $commentdata['user_ID'] ) {
1824
- $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID'];
1825
- } elseif ( isset( $commentdata['user_id'] ) ) {
1826
- $commentdata['user_id'] = (int) $commentdata['user_id'];
1827
- }
1828
-
1829
- $commentdata['comment_parent'] = isset($commentdata['comment_parent']) ? absint($commentdata['comment_parent']) : 0;
1830
- $parent_status = ( 0 < $commentdata['comment_parent'] ) ? wp_get_comment_status($commentdata['comment_parent']) : '';
1831
- $commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0;
1832
-
1833
- $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] );
1834
- $commentdata['comment_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? substr( $_SERVER['HTTP_USER_AGENT'], 0, 254 ) : '';
1835
-
1836
- $commentdata['comment_date'] = current_time('mysql');
1837
- $commentdata['comment_date_gmt'] = current_time('mysql', 1);
1838
-
1839
- $commentdata = wp_filter_comment($commentdata);
1840
-
1841
- $commentdata['comment_approved'] = wp_allow_comment($commentdata);
1842
-
1843
- $comment_ID = wp_insert_comment($commentdata);
1844
- if ( ! $comment_ID ) {
1845
- return false;
1846
- }
1847
-
1848
- /**
1849
- * Fires immediately after a comment is inserted into the database.
1850
- *
1851
- * @since 1.2.0
1852
- *
1853
- * @param int $comment_ID The comment ID.
1854
- * @param int $comment_approved 1 (true) if the comment is approved, 0 (false) if not.
1855
- */
1856
- do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'] );
1857
-
1858
- if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching
1859
- if ( '0' == $commentdata['comment_approved'] ) {
1860
- wp_notify_moderator( $comment_ID );
1861
- }
1862
-
1863
- // wp_notify_postauthor() checks if notifying the author of their own comment.
1864
- // By default, it won't, but filters can override this.
1865
- if ( get_option( 'comments_notify' ) && $commentdata['comment_approved'] ) {
1866
- wp_notify_postauthor( $comment_ID );
1867
- }
1868
- }
1869
-
1870
- return $comment_ID;
1871
- }
1872
-
1873
- /**
1874
- * Sets the status of a comment.
1875
- *
1876
- * The 'wp_set_comment_status' action is called after the comment is handled.
1877
- * If the comment status is not in the list, then false is returned.
1878
- *
1879
- * @since 1.0.0
1880
- * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object
1881
- *
1882
- * @param int $comment_id Comment ID.
1883
- * @param string $comment_status New comment status, either 'hold', 'approve', 'spam', or 'trash'.
1884
- * @param bool $wp_error Whether to return a WP_Error object if there is a failure. Default is false.
1885
- * @return bool|WP_Error True on success, false or WP_Error on failure.
1886
- */
1887
- function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) {
1888
- global $wpdb;
1889
-
1890
- switch ( $comment_status ) {
1891
- case 'hold':
1892
- case '0':
1893
- $status = '0';
1894
- break;
1895
- case 'approve':
1896
- case '1':
1897
- $status = '1';
1898
- if ( get_option('comments_notify') ) {
1899
- wp_notify_postauthor( $comment_id );
1900
- }
1901
- break;
1902
- case 'spam':
1903
- $status = 'spam';
1904
- break;
1905
- case 'trash':
1906
- $status = 'trash';
1907
- break;
1908
- default:
1909
- return false;
1910
- }
1911
-
1912
- $comment_old = clone get_comment($comment_id);
1913
-
1914
- if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) {
1915
- if ( $wp_error )
1916
- return new WP_Error('db_update_error', __('Could not update comment status'), $wpdb->last_error);
1917
- else
1918
- return false;
1919
- }
1920
-
1921
- clean_comment_cache($comment_id);
1922
-
1923
- $comment = get_comment($comment_id);
1924
-
1925
- /**
1926
- * Fires immediately before transitioning a comment's status from one to another
1927
- * in the database.
1928
- *
1929
- * @since 1.5.0
1930
- *
1931
- * @param int $comment_id Comment ID.
1932
- * @param string|bool $comment_status Current comment status. Possible values include
1933
- * 'hold', 'approve', 'spam', 'trash', or false.
1934
- */
1935
- do_action( 'wp_set_comment_status', $comment_id, $comment_status );
1936
-
1937
- wp_transition_comment_status($comment_status, $comment_old->comment_approved, $comment);
1938
-
1939
- wp_update_comment_count($comment->comment_post_ID);
1940
-
1941
- return true;
1942
- }
1943
-
1944
- /**
1945
- * Updates an existing comment in the database.
1946
- *
1947
- * Filters the comment and makes sure certain fields are valid before updating.
1948
- *
1949
- * @since 2.0.0
1950
- * @uses $wpdb
1951
- * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object
1952
- *
1953
- * @param array $commentarr Contains information on the comment.
1954
- * @return int Comment was updated if value is 1, or was not updated if value is 0.
1955
- */
1956
- function wp_update_comment($commentarr) {
1957
- global $wpdb;
1958
-
1959
- // First, get all of the original fields
1960
- $comment = get_comment($commentarr['comment_ID'], ARRAY_A);
1961
- if ( empty( $comment ) ) {
1962
- return 0;
1963
- }
1964
- // Escape data pulled from DB.
1965
- $comment = wp_slash($comment);
1966
-
1967
- $old_status = $comment['comment_approved'];
1968
-
1969
- // Merge old and new fields with new fields overwriting old ones.
1970
- $commentarr = array_merge($comment, $commentarr);
1971
-
1972
- $commentarr = wp_filter_comment( $commentarr );
1973
-
1974
- // Now extract the merged array.
1975
- $data = wp_unslash( $commentarr );
1976
-
1977
- /**
1978
- * Filter the comment content before it is updated in the database.
1979
- *
1980
- * @since 1.5.0
1981
- *
1982
- * @param string $comment_content The comment data.
1983
- */
1984
- $data['comment_content'] = apply_filters( 'comment_save_pre', $data['comment_content'] );
1985
-
1986
- $data['comment_date_gmt'] = get_gmt_from_date( $data['comment_date'] );
1987
-
1988
- if ( ! isset( $data['comment_approved'] ) ) {
1989
- $data['comment_approved'] = 1;
1990
- } else if ( 'hold' == $data['comment_approved'] ) {
1991
- $data['comment_approved'] = 0;
1992
- } else if ( 'approve' == $data['comment_approved'] ) {
1993
- $data['comment_approved'] = 1;
1994
- }
1995
-
1996
- $comment_ID = $data['comment_ID'];
1997
- $comment_post_ID = $data['comment_post_ID'];
1998
- $keys = array( 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_parent' );
1999
- $data = wp_array_slice_assoc( $data, $keys );
2000
- $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
2001
-
2002
- clean_comment_cache( $comment_ID );
2003
- wp_update_comment_count( $comment_post_ID );
2004
- /**
2005
- * Fires immediately after a comment is updated in the database.
2006
- *
2007
- * The hook also fires immediately before comment status transition hooks are fired.
2008
- *
2009
- * @since 1.2.0
2010
- *
2011
- * @param int $comment_ID The comment ID.
2012
- */
2013
- do_action( 'edit_comment', $comment_ID );
2014
- $comment = get_comment($comment_ID);
2015
- wp_transition_comment_status($comment->comment_approved, $old_status, $comment);
2016
- return $rval;
2017
- }
2018
-
2019
- /**
2020
- * Whether to defer comment counting.
2021
- *
2022
- * When setting $defer to true, all post comment counts will not be updated
2023
- * until $defer is set to false. When $defer is set to false, then all
2024
- * previously deferred updated post comment counts will then be automatically
2025
- * updated without having to call wp_update_comment_count() after.
2026
- *
2027
- * @since 2.5.0
2028
- * @staticvar bool $_defer
2029
- *
2030
- * @param bool $defer
2031
- * @return unknown
2032
- */
2033
- function wp_defer_comment_counting($defer=null) {
2034
- static $_defer = false;
2035
-
2036
- if ( is_bool($defer) ) {
2037
- $_defer = $defer;
2038
- // flush any deferred counts
2039
- if ( !$defer )
2040
- wp_update_comment_count( null, true );
2041
- }
2042
-
2043
- return $_defer;
2044
- }
2045
-
2046
- /**
2047
- * Updates the comment count for post(s).
2048
- *
2049
- * When $do_deferred is false (is by default) and the comments have been set to
2050
- * be deferred, the post_id will be added to a queue, which will be updated at a
2051
- * later date and only updated once per post ID.
2052
- *
2053
- * If the comments have not be set up to be deferred, then the post will be
2054
- * updated. When $do_deferred is set to true, then all previous deferred post
2055
- * IDs will be updated along with the current $post_id.
2056
- *
2057
- * @since 2.1.0
2058
- * @see wp_update_comment_count_now() For what could cause a false return value
2059
- *
2060
- * @param int $post_id Post ID
2061
- * @param bool $do_deferred Whether to process previously deferred post comment counts
2062
- * @return bool True on success, false on failure
2063
- */
2064
- function wp_update_comment_count($post_id, $do_deferred=false) {
2065
- static $_deferred = array();
2066
-
2067
- if ( $do_deferred ) {
2068
- $_deferred = array_unique($_deferred);
2069
- foreach ( $_deferred as $i => $_post_id ) {
2070
- wp_update_comment_count_now($_post_id);
2071
- unset( $_deferred[$i] ); /** @todo Move this outside of the foreach and reset $_deferred to an array instead */
2072
- }
2073
- }
2074
-
2075
- if ( wp_defer_comment_counting() ) {
2076
- $_deferred[] = $post_id;
2077
- return true;
2078
- }
2079
- elseif ( $post_id ) {
2080
- return wp_update_comment_count_now($post_id);
2081
- }
2082
-
2083
- }
2084
-
2085
- /**
2086
- * Updates the comment count for the post.
2087
- *
2088
- * @since 2.5.0
2089
- * @uses $wpdb
2090
- *
2091
- * @param int $post_id Post ID
2092
- * @return bool True on success, false on '0' $post_id or if post with ID does not exist.
2093
- */
2094
- function wp_update_comment_count_now($post_id) {
2095
- global $wpdb;
2096
- $post_id = (int) $post_id;
2097
- if ( !$post_id )
2098
- return false;
2099
- if ( !$post = get_post($post_id) )
2100
- return false;
2101
-
2102
- $old = (int) $post->comment_count;
2103
- $new = (int) $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1'", $post_id) );
2104
- $wpdb->update( $wpdb->posts, array('comment_count' => $new), array('ID' => $post_id) );
2105
-
2106
- clean_post_cache( $post );
2107
-
2108
- /**
2109
- * Fires immediately after a post's comment count is updated in the database.
2110
- *
2111
- * @since 2.3.0
2112
- *
2113
- * @param int $post_id Post ID.
2114
- * @param int $new The new comment count.
2115
- * @param int $old The old comment count.
2116
- */
2117
- do_action( 'wp_update_comment_count', $post_id, $new, $old );
2118
- /** This action is documented in wp-includes/post.php */
2119
- do_action( 'edit_post', $post_id, $post );
2120
-
2121
- return true;
2122
- }
2123
-
2124
- //
2125
- // Ping and trackback functions.
2126
- //
2127
-
2128
- /**
2129
- * Finds a pingback server URI based on the given URL.
2130
- *
2131
- * Checks the HTML for the rel="pingback" link and x-pingback headers. It does
2132
- * a check for the x-pingback headers first and returns that, if available. The
2133
- * check for the rel="pingback" has more overhead than just the header.
2134
- *
2135
- * @since 1.5.0
2136
- *
2137
- * @param string $url URL to ping.
2138
- * @param int $deprecated Not Used.
2139
- * @return bool|string False on failure, string containing URI on success.
2140
- */
2141
- function discover_pingback_server_uri( $url, $deprecated = '' ) {
2142
- if ( !empty( $deprecated ) )
2143
- _deprecated_argument( __FUNCTION__, '2.7' );
2144
-
2145
- $pingback_str_dquote = 'rel="pingback"';
2146
- $pingback_str_squote = 'rel=\'pingback\'';
2147
-
2148
- /** @todo Should use Filter Extension or custom preg_match instead. */
2149
- $parsed_url = parse_url($url);
2150
-
2151
- if ( ! isset( $parsed_url['host'] ) ) // Not an URL. This should never happen.
2152
- return false;
2153
-
2154
- //Do not search for a pingback server on our own uploads
2155
- $uploads_dir = wp_upload_dir();
2156
- if ( 0 === strpos($url, $uploads_dir['baseurl']) )
2157
- return false;
2158
-
2159
- $response = wp_safe_remote_head( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) );
2160
-
2161
- if ( is_wp_error( $response ) )
2162
- return false;
2163
-
2164
- if ( wp_remote_retrieve_header( $response, 'x-pingback' ) )
2165
- return wp_remote_retrieve_header( $response, 'x-pingback' );
2166
-
2167
- // Not an (x)html, sgml, or xml page, no use going further.
2168
- if ( preg_match('#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'content-type' )) )
2169
- return false;
2170
-
2171
- // Now do a GET since we're going to look in the html headers (and we're sure it's not a binary file)
2172
- $response = wp_safe_remote_get( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) );
2173
-
2174
- if ( is_wp_error( $response ) )
2175
- return false;
2176
-
2177
- $contents = wp_remote_retrieve_body( $response );
2178
-
2179
- $pingback_link_offset_dquote = strpos($contents, $pingback_str_dquote);
2180
- $pingback_link_offset_squote = strpos($contents, $pingback_str_squote);
2181
- if ( $pingback_link_offset_dquote || $pingback_link_offset_squote ) {
2182
- $quote = ($pingback_link_offset_dquote) ? '"' : '\'';
2183
- $pingback_link_offset = ($quote=='"') ? $pingback_link_offset_dquote : $pingback_link_offset_squote;
2184
- $pingback_href_pos = @strpos($contents, 'href=', $pingback_link_offset);
2185
- $pingback_href_start = $pingback_href_pos+6;
2186
- $pingback_href_end = @strpos($contents, $quote, $pingback_href_start);
2187
- $pingback_server_url_len = $pingback_href_end - $pingback_href_start;
2188
- $pingback_server_url = substr($contents, $pingback_href_start, $pingback_server_url_len);
2189
-
2190
- // We may find rel="pingback" but an incomplete pingback URL
2191
- if ( $pingback_server_url_len > 0 ) { // We got it!
2192
- return $pingback_server_url;
2193
- }
2194
- }
2195
-
2196
- return false;
2197
- }
2198
-
2199
- /**
2200
- * Perform all pingbacks, enclosures, trackbacks, and send to pingback services.
2201
- *
2202
- * @since 2.1.0
2203
- * @uses $wpdb
2204
- */
2205
- function do_all_pings() {
2206
- global $wpdb;
2207
-
2208
- // Do pingbacks
2209
- while ($ping = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) {
2210
- delete_metadata_by_mid( 'post', $ping->meta_id );
2211
- pingback( $ping->post_content, $ping->ID );
2212
- }
2213
-
2214
- // Do Enclosures
2215
- while ($enclosure = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) {
2216
- delete_metadata_by_mid( 'post', $enclosure->meta_id );
2217
- do_enclose( $enclosure->post_content, $enclosure->ID );
2218
- }
2219
-
2220
- // Do Trackbacks
2221
- $trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'");
2222
- if ( is_array($trackbacks) )
2223
- foreach ( $trackbacks as $trackback )
2224
- do_trackbacks($trackback);
2225
-
2226
- //Do Update Services/Generic Pings
2227
- generic_ping();
2228
- }
2229
-
2230
- /**
2231
- * Perform trackbacks.
2232
- *
2233
- * @since 1.5.0
2234
- * @uses $wpdb
2235
- *
2236
- * @param int $post_id Post ID to do trackbacks on.
2237
- */
2238
- function do_trackbacks($post_id) {
2239
- global $wpdb;
2240
-
2241
- $post = get_post( $post_id );
2242
- $to_ping = get_to_ping($post_id);
2243
- $pinged = get_pung($post_id);
2244
- if ( empty($to_ping) ) {
2245
- $wpdb->update($wpdb->posts, array('to_ping' => ''), array('ID' => $post_id) );
2246
- return;
2247
- }
2248
-
2249
- if ( empty($post->post_excerpt) ) {
2250
- /** This filter is documented in wp-includes/post-template.php */
2251
- $excerpt = apply_filters( 'the_content', $post->post_content, $post->ID );
2252
- } else {
2253
- /** This filter is documented in wp-includes/post-template.php */
2254
- $excerpt = apply_filters( 'the_excerpt', $post->post_excerpt );
2255
- }
2256
-
2257
- $excerpt = str_replace(']]>', ']]&gt;', $excerpt);
2258
- $excerpt = wp_html_excerpt($excerpt, 252, '&#8230;');
2259
-
2260
- /** This filter is documented in wp-includes/post-template.php */
2261
- $post_title = apply_filters( 'the_title', $post->post_title, $post->ID );
2262
- $post_title = strip_tags($post_title);
2263
-
2264
- if ( $to_ping ) {
2265
- foreach ( (array) $to_ping as $tb_ping ) {
2266
- $tb_ping = trim($tb_ping);
2267
- if ( !in_array($tb_ping, $pinged) ) {
2268
- trackback($tb_ping, $post_title, $excerpt, $post_id);
2269
- $pinged[] = $tb_ping;
2270
- } else {
2271
- $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id) );
2272
- }
2273
- }
2274
- }
2275
- }
2276
-
2277
- /**
2278
- * Sends pings to all of the ping site services.
2279
- *
2280
- * @since 1.2.0
2281
- *
2282
- * @param int $post_id Post ID.
2283
- * @return int Same as Post ID from parameter
2284
- */
2285
- function generic_ping( $post_id = 0 ) {
2286
- $services = get_option('ping_sites');
2287
-
2288
- $services = explode("\n", $services);
2289
- foreach ( (array) $services as $service ) {
2290
- $service = trim($service);
2291
- if ( '' != $service )
2292
- weblog_ping($service);
2293
- }
2294
-
2295
- return $post_id;
2296
- }
2297
-
2298
- /**
2299
- * Pings back the links found in a post.
2300
- *
2301
- * @since 0.71
2302
- * @uses $wp_version
2303
- * @uses IXR_Client
2304
- *
2305
- * @param string $content Post content to check for links.
2306
- * @param int $post_ID Post ID.
2307
- */
2308
- function pingback($content, $post_ID) {
2309
- global $wp_version;
2310
- include_once(ABSPATH . WPINC . '/class-IXR.php');
2311
- include_once(ABSPATH . WPINC . '/class-wp-http-ixr-client.php');
2312
-
2313
- // original code by Mort (http://mort.mine.nu:8080)
2314
- $post_links = array();
2315
-
2316
- $pung = get_pung($post_ID);
2317
-
2318
- // Step 1
2319
- // Parsing the post, external links (if any) are stored in the $post_links array
2320
- $post_links_temp = wp_extract_urls( $content );
2321
-
2322
- // Step 2.
2323
- // Walking thru the links array
2324
- // first we get rid of links pointing to sites, not to specific files
2325
- // Example:
2326
- // http://dummy-weblog.org
2327
- // http://dummy-weblog.org/
2328
- // http://dummy-weblog.org/post.php
2329
- // We don't wanna ping first and second types, even if they have a valid <link/>
2330
-
2331
- foreach ( (array) $post_links_temp as $link_test ) :
2332
- if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself
2333
- && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments.
2334
- if ( $test = @parse_url($link_test) ) {
2335
- if ( isset($test['query']) )
2336
- $post_links[] = $link_test;
2337
- elseif ( isset( $test['path'] ) && ( $test['path'] != '/' ) && ( $test['path'] != '' ) )
2338
- $post_links[] = $link_test;
2339
- }
2340
- endif;
2341
- endforeach;
2342
-
2343
- $post_links = array_unique( $post_links );
2344
- /**
2345
- * Fires just before pinging back links found in a post.
2346
- *
2347
- * @since 2.0.0
2348
- *
2349
- * @param array &$post_links An array of post links to be checked, passed by reference.
2350
- * @param array &$pung Whether a link has already been pinged, passed by reference.
2351
- * @param int $post_ID The post ID.
2352
- */
2353
- do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post_ID ) );
2354
-
2355
- foreach ( (array) $post_links as $pagelinkedto ) {
2356
- $pingback_server_url = discover_pingback_server_uri( $pagelinkedto );
2357
-
2358
- if ( $pingback_server_url ) {
2359
- @ set_time_limit( 60 );
2360
- // Now, the RPC call
2361
- $pagelinkedfrom = get_permalink($post_ID);
2362
-
2363
- // using a timeout of 3 seconds should be enough to cover slow servers
2364
- $client = new WP_HTTP_IXR_Client($pingback_server_url);
2365
- $client->timeout = 3;
2366
- /**
2367
- * Filter the user agent sent when pinging-back a URL.
2368
- *
2369
- * @since 2.9.0
2370
- *
2371
- * @param string $concat_useragent The user agent concatenated with ' -- WordPress/'
2372
- * and the WordPress version.
2373
- * @param string $useragent The useragent.
2374
- * @param string $pingback_server_url The server URL being linked to.
2375
- * @param string $pagelinkedto URL of page linked to.
2376
- * @param string $pagelinkedfrom URL of page linked from.
2377
- */
2378
- $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom );
2379
- // when set to true, this outputs debug messages by itself
2380
- $client->debug = false;
2381
-
2382
- if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto) || ( isset($client->error->code) && 48 == $client->error->code ) ) // Already registered
2383
- add_ping( $post_ID, $pagelinkedto );
2384
- }
2385
- }
2386
- }
2387
-
2388
- /**
2389
- * Check whether blog is public before returning sites.
2390
- *
2391
- * @since 2.1.0
2392
- *
2393
- * @param mixed $sites Will return if blog is public, will not return if not public.
2394
- * @return mixed Empty string if blog is not public, returns $sites, if site is public.
2395
- */
2396
- function privacy_ping_filter($sites) {
2397
- if ( '0' != get_option('blog_public') )
2398
- return $sites;
2399
- else
2400
- return '';
2401
- }
2402
-
2403
- /**
2404
- * Send a Trackback.
2405
- *
2406
- * Updates database when sending trackback to prevent duplicates.
2407
- *
2408
- * @since 0.71
2409
- * @uses $wpdb
2410
- *
2411
- * @param string $trackback_url URL to send trackbacks.
2412
- * @param string $title Title of post.
2413
- * @param string $excerpt Excerpt of post.
2414
- * @param int $ID Post ID.
2415
- * @return mixed Database query from update.
2416
- */
2417
- function trackback($trackback_url, $title, $excerpt, $ID) {
2418
- global $wpdb;
2419
-
2420
- if ( empty($trackback_url) )
2421
- return;
2422
-
2423
- $options = array();
2424
- $options['timeout'] = 4;
2425
- $options['body'] = array(
2426
- 'title' => $title,
2427
- 'url' => get_permalink($ID),
2428
- 'blog_name' => get_option('blogname'),
2429
- 'excerpt' => $excerpt
2430
- );
2431
-
2432
- $response = wp_safe_remote_post( $trackback_url, $options );
2433
-
2434
- if ( is_wp_error( $response ) )
2435
- return;
2436
-
2437
- $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', %s) WHERE ID = %d", $trackback_url, $ID) );
2438
- return $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $trackback_url, $ID) );
2439
- }
2440
-
2441
- /**
2442
- * Send a pingback.
2443
- *
2444
- * @since 1.2.0
2445
- * @uses $wp_version
2446
- * @uses IXR_Client
2447
- *
2448
- * @param string $server Host of blog to connect to.
2449
- * @param string $path Path to send the ping.
2450
- */
2451
- function weblog_ping($server = '', $path = '') {
2452
- global $wp_version;
2453
- include_once(ABSPATH . WPINC . '/class-IXR.php');
2454
- include_once(ABSPATH . WPINC . '/class-wp-http-ixr-client.php');
2455
-
2456
- // using a timeout of 3 seconds should be enough to cover slow servers
2457
- $client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path));
2458
- $client->timeout = 3;
2459
- $client->useragent .= ' -- WordPress/'.$wp_version;
2460
-
2461
- // when set to true, this outputs debug messages by itself
2462
- $client->debug = false;
2463
- $home = trailingslashit( home_url() );
2464
- if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping
2465
- $client->query('weblogUpdates.ping', get_option('blogname'), $home);
2466
- }
2467
-
2468
- /**
2469
- * Default filter attached to pingback_ping_source_uri to validate the pingback's Source URI
2470
- *
2471
- * @since 3.5.1
2472
- * @see wp_http_validate_url()
2473
- *
2474
- * @param string $source_uri
2475
- * @return string
2476
- */
2477
- function pingback_ping_source_uri( $source_uri ) {
2478
- return (string) wp_http_validate_url( $source_uri );
2479
- }
2480
-
2481
- /**
2482
- * Default filter attached to xmlrpc_pingback_error.
2483
- *
2484
- * Returns a generic pingback error code unless the error code is 48,
2485
- * which reports that the pingback is already registered.
2486
- *
2487
- * @since 3.5.1
2488
- * @link http://www.hixie.ch/specs/pingback/pingback#TOC3
2489
- *
2490
- * @param IXR_Error $ixr_error
2491
- * @return IXR_Error
2492
- */
2493
- function xmlrpc_pingback_error( $ixr_error ) {
2494
- if ( $ixr_error->code === 48 )
2495
- return $ixr_error;
2496
- return new IXR_Error( 0, '' );
2497
- }
2498
-
2499
- //
2500
- // Cache
2501
- //
2502
-
2503
- /**
2504
- * Removes comment ID from the comment cache.
2505
- *
2506
- * @since 2.3.0
2507
- *
2508
- * @param int|array $ids Comment ID or array of comment IDs to remove from cache
2509
- */
2510
- function clean_comment_cache($ids) {
2511
- foreach ( (array) $ids as $id )
2512
- wp_cache_delete($id, 'comment');
2513
-
2514
- wp_cache_set( 'last_changed', microtime(), 'comment' );
2515
- }
2516
-
2517
- /**
2518
- * Updates the comment cache of given comments.
2519
- *
2520
- * Will add the comments in $comments to the cache. If comment ID already exists
2521
- * in the comment cache then it will not be updated. The comment is added to the
2522
- * cache using the comment group with the key using the ID of the comments.
2523
- *
2524
- * @since 2.3.0
2525
- *
2526
- * @param array $comments Array of comment row objects
2527
- */
2528
- function update_comment_cache($comments) {
2529
- foreach ( (array) $comments as $comment )
2530
- wp_cache_add($comment->comment_ID, $comment, 'comment');
2531
- }
2532
-
2533
- //
2534
- // Internal
2535
- //
2536
-
2537
- /**
2538
- * Close comments on old posts on the fly, without any extra DB queries. Hooked to the_posts.
2539
- *
2540
- * @access private
2541
- * @since 2.7.0
2542
- *
2543
- * @param object $posts Post data object.
2544
- * @param object $query Query object.
2545
- * @return object
2546
- */
2547
- function _close_comments_for_old_posts( $posts, $query ) {
2548
- if ( empty( $posts ) || ! $query->is_singular() || ! get_option( 'close_comments_for_old_posts' ) )
2549
- return $posts;
2550
-
2551
- /**
2552
- * Filter the list of post types to automatically close comments for.
2553
- *
2554
- * @since 3.2.0
2555
- *
2556
- * @param array $post_types An array of registered post types. Default array with 'post'.
2557
- */
2558
- $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
2559
- if ( ! in_array( $posts[0]->post_type, $post_types ) )
2560
- return $posts;
2561
-
2562
- $days_old = (int) get_option( 'close_comments_days_old' );
2563
- if ( ! $days_old )
2564
- return $posts;
2565
-
2566
- if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) {
2567
- $posts[0]->comment_status = 'closed';
2568
- $posts[0]->ping_status = 'closed';
2569
- }
2570
-
2571
- return $posts;
2572
- }
2573
-
2574
- /**
2575
- * Close comments on an old post. Hooked to comments_open and pings_open.
2576
- *
2577
- * @access private
2578
- * @since 2.7.0
2579
- *
2580
- * @param bool $open Comments open or closed
2581
- * @param int $post_id Post ID
2582
- * @return bool $open
2583
- */
2584
- function _close_comments_for_old_post( $open, $post_id ) {
2585
- if ( ! $open )
2586
- return $open;
2587
-
2588
- if ( !get_option('close_comments_for_old_posts') )
2589
- return $open;
2590
-
2591
- $days_old = (int) get_option('close_comments_days_old');
2592
- if ( !$days_old )
2593
- return $open;
2594
-
2595
- $post = get_post($post_id);
2596
-
2597
- /** This filter is documented in wp-includes/comment.php */
2598
- $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
2599
- if ( ! in_array( $post->post_type, $post_types ) )
2600
- return $open;
2601
-
2602
- if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) )
2603
- return false;
2604
-
2605
- return $open;
2606
- }