stump-cli 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1310) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +3 -16
  6. data/Rakefile +2 -0
  7. data/bin/stump-cli +58 -0
  8. data/lib/stump-cli/version.rb +3 -0
  9. data/lib/stump.rb +5 -0
  10. data/lib/wp/Movefile-example +62 -0
  11. data/lib/wp/README.md +25 -0
  12. data/lib/wp/index.php +17 -0
  13. data/lib/wp/license.txt +385 -0
  14. data/lib/wp/readme.html +96 -0
  15. data/lib/wp/wp-activate.php +131 -0
  16. data/lib/wp/wp-admin/about.php +193 -0
  17. data/lib/wp/wp-admin/admin-ajax.php +98 -0
  18. data/lib/wp/wp-admin/admin-footer.php +99 -0
  19. data/lib/wp/wp-admin/admin-functions.php +15 -0
  20. data/lib/wp/wp-admin/admin-header.php +243 -0
  21. data/lib/wp/wp-admin/admin-post.php +71 -0
  22. data/lib/wp/wp-admin/admin.php +347 -0
  23. data/lib/wp/wp-admin/async-upload.php +114 -0
  24. data/lib/wp/wp-admin/comment.php +299 -0
  25. data/lib/wp/wp-admin/credits.php +192 -0
  26. data/lib/wp/wp-admin/css/about-rtl.css +446 -0
  27. data/lib/wp/wp-admin/css/about.css +446 -0
  28. data/lib/wp/wp-admin/css/admin-menu-rtl.css +917 -0
  29. data/lib/wp/wp-admin/css/admin-menu.css +917 -0
  30. data/lib/wp/wp-admin/css/color-picker-rtl.css +127 -0
  31. data/lib/wp/wp-admin/css/color-picker-rtl.min.css +1 -0
  32. data/lib/wp/wp-admin/css/color-picker.css +127 -0
  33. data/lib/wp/wp-admin/css/color-picker.min.css +1 -0
  34. data/lib/wp/wp-admin/css/colors/_admin.scss +525 -0
  35. data/lib/wp/wp-admin/css/colors/_mixins.scss +43 -0
  36. data/lib/wp/wp-admin/css/colors/_variables.scss +58 -0
  37. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.css +341 -0
  38. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.min.css +1 -0
  39. data/lib/wp/wp-admin/css/colors/blue/colors.css +341 -0
  40. data/lib/wp/wp-admin/css/colors/blue/colors.min.css +1 -0
  41. data/lib/wp/wp-admin/css/colors/blue/colors.scss +11 -0
  42. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.css +341 -0
  43. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.min.css +1 -0
  44. data/lib/wp/wp-admin/css/colors/coffee/colors.css +341 -0
  45. data/lib/wp/wp-admin/css/colors/coffee/colors.min.css +1 -0
  46. data/lib/wp/wp-admin/css/colors/coffee/colors.scss +7 -0
  47. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.css +341 -0
  48. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.min.css +1 -0
  49. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.css +341 -0
  50. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.min.css +1 -0
  51. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.scss +8 -0
  52. data/lib/wp/wp-admin/css/colors/light/colors-rtl.css +349 -0
  53. data/lib/wp/wp-admin/css/colors/light/colors-rtl.min.css +1 -0
  54. data/lib/wp/wp-admin/css/colors/light/colors.css +349 -0
  55. data/lib/wp/wp-admin/css/colors/light/colors.min.css +1 -0
  56. data/lib/wp/wp-admin/css/colors/light/colors.scss +38 -0
  57. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.css +341 -0
  58. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.min.css +1 -0
  59. data/lib/wp/wp-admin/css/colors/midnight/colors.css +341 -0
  60. data/lib/wp/wp-admin/css/colors/midnight/colors.min.css +1 -0
  61. data/lib/wp/wp-admin/css/colors/midnight/colors.scss +5 -0
  62. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.css +341 -0
  63. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.min.css +1 -0
  64. data/lib/wp/wp-admin/css/colors/ocean/colors.css +341 -0
  65. data/lib/wp/wp-admin/css/colors/ocean/colors.min.css +1 -0
  66. data/lib/wp/wp-admin/css/colors/ocean/colors.scss +8 -0
  67. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.css +341 -0
  68. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.min.css +1 -0
  69. data/lib/wp/wp-admin/css/colors/sunrise/colors.css +341 -0
  70. data/lib/wp/wp-admin/css/colors/sunrise/colors.min.css +1 -0
  71. data/lib/wp/wp-admin/css/colors/sunrise/colors.scss +6 -0
  72. data/lib/wp/wp-admin/css/common-rtl.css +3212 -0
  73. data/lib/wp/wp-admin/css/common.css +3212 -0
  74. data/lib/wp/wp-admin/css/customize-controls-rtl.css +889 -0
  75. data/lib/wp/wp-admin/css/customize-controls-rtl.min.css +1 -0
  76. data/lib/wp/wp-admin/css/customize-controls.css +889 -0
  77. data/lib/wp/wp-admin/css/customize-controls.min.css +1 -0
  78. data/lib/wp/wp-admin/css/customize-widgets-rtl.css +603 -0
  79. data/lib/wp/wp-admin/css/customize-widgets-rtl.min.css +1 -0
  80. data/lib/wp/wp-admin/css/customize-widgets.css +603 -0
  81. data/lib/wp/wp-admin/css/customize-widgets.min.css +1 -0
  82. data/lib/wp/wp-admin/css/dashboard-rtl.css +1116 -0
  83. data/lib/wp/wp-admin/css/dashboard.css +1116 -0
  84. data/lib/wp/wp-admin/css/deprecated-media-rtl.css +371 -0
  85. data/lib/wp/wp-admin/css/deprecated-media-rtl.min.css +1 -0
  86. data/lib/wp/wp-admin/css/deprecated-media.css +371 -0
  87. data/lib/wp/wp-admin/css/deprecated-media.min.css +1 -0
  88. data/lib/wp/wp-admin/css/edit-rtl.css +1501 -0
  89. data/lib/wp/wp-admin/css/edit.css +1501 -0
  90. data/lib/wp/wp-admin/css/farbtastic-rtl.css +41 -0
  91. data/lib/wp/wp-admin/css/farbtastic.css +41 -0
  92. data/lib/wp/wp-admin/css/forms-rtl.css +992 -0
  93. data/lib/wp/wp-admin/css/forms.css +992 -0
  94. data/lib/wp/wp-admin/css/ie-rtl.css +785 -0
  95. data/lib/wp/wp-admin/css/ie-rtl.min.css +1 -0
  96. data/lib/wp/wp-admin/css/ie.css +785 -0
  97. data/lib/wp/wp-admin/css/ie.min.css +1 -0
  98. data/lib/wp/wp-admin/css/install-rtl.css +389 -0
  99. data/lib/wp/wp-admin/css/install-rtl.min.css +1 -0
  100. data/lib/wp/wp-admin/css/install.css +389 -0
  101. data/lib/wp/wp-admin/css/install.min.css +1 -0
  102. data/lib/wp/wp-admin/css/l10n-rtl.css +101 -0
  103. data/lib/wp/wp-admin/css/l10n.css +101 -0
  104. data/lib/wp/wp-admin/css/list-tables-rtl.css +1875 -0
  105. data/lib/wp/wp-admin/css/list-tables.css +1875 -0
  106. data/lib/wp/wp-admin/css/login-rtl.css +269 -0
  107. data/lib/wp/wp-admin/css/login-rtl.min.css +1 -0
  108. data/lib/wp/wp-admin/css/login.css +269 -0
  109. data/lib/wp/wp-admin/css/login.min.css +1 -0
  110. data/lib/wp/wp-admin/css/media-rtl.css +1196 -0
  111. data/lib/wp/wp-admin/css/media.css +1196 -0
  112. data/lib/wp/wp-admin/css/nav-menus-rtl.css +857 -0
  113. data/lib/wp/wp-admin/css/nav-menus.css +857 -0
  114. data/lib/wp/wp-admin/css/press-this-rtl.css +458 -0
  115. data/lib/wp/wp-admin/css/press-this.css +458 -0
  116. data/lib/wp/wp-admin/css/revisions-rtl.css +574 -0
  117. data/lib/wp/wp-admin/css/revisions.css +574 -0
  118. data/lib/wp/wp-admin/css/themes-rtl.css +1732 -0
  119. data/lib/wp/wp-admin/css/themes.css +1732 -0
  120. data/lib/wp/wp-admin/css/widgets-rtl.css +577 -0
  121. data/lib/wp/wp-admin/css/widgets.css +577 -0
  122. data/lib/wp/wp-admin/css/wp-admin-rtl.css +14 -0
  123. data/lib/wp/wp-admin/css/wp-admin-rtl.min.css +1 -0
  124. data/lib/wp/wp-admin/css/wp-admin.css +14 -0
  125. data/lib/wp/wp-admin/css/wp-admin.min.css +1 -0
  126. data/lib/wp/wp-admin/custom-background.php +482 -0
  127. data/lib/wp/wp-admin/custom-header.php +1366 -0
  128. data/lib/wp/wp-admin/customize.php +278 -0
  129. data/lib/wp/wp-admin/edit-comments.php +254 -0
  130. data/lib/wp/wp-admin/edit-form-advanced.php +636 -0
  131. data/lib/wp/wp-admin/edit-form-comment.php +160 -0
  132. data/lib/wp/wp-admin/edit-link-form.php +150 -0
  133. data/lib/wp/wp-admin/edit-tag-form.php +204 -0
  134. data/lib/wp/wp-admin/edit-tags.php +591 -0
  135. data/lib/wp/wp-admin/edit.php +330 -0
  136. data/lib/wp/wp-admin/export.php +243 -0
  137. data/lib/wp/wp-admin/freedoms.php +57 -0
  138. data/lib/wp/wp-admin/images/align-center-2x.png +0 -0
  139. data/lib/wp/wp-admin/images/align-center.png +0 -0
  140. data/lib/wp/wp-admin/images/align-left-2x.png +0 -0
  141. data/lib/wp/wp-admin/images/align-left.png +0 -0
  142. data/lib/wp/wp-admin/images/align-none-2x.png +0 -0
  143. data/lib/wp/wp-admin/images/align-none.png +0 -0
  144. data/lib/wp/wp-admin/images/align-right-2x.png +0 -0
  145. data/lib/wp/wp-admin/images/align-right.png +0 -0
  146. data/lib/wp/wp-admin/images/arrows-2x.png +0 -0
  147. data/lib/wp/wp-admin/images/arrows.png +0 -0
  148. data/lib/wp/wp-admin/images/bubble_bg-2x.gif +0 -0
  149. data/lib/wp/wp-admin/images/bubble_bg.gif +0 -0
  150. data/lib/wp/wp-admin/images/comment-grey-bubble-2x.png +0 -0
  151. data/lib/wp/wp-admin/images/comment-grey-bubble.png +0 -0
  152. data/lib/wp/wp-admin/images/date-button-2x.gif +0 -0
  153. data/lib/wp/wp-admin/images/date-button.gif +0 -0
  154. data/lib/wp/wp-admin/images/generic.png +0 -0
  155. data/lib/wp/wp-admin/images/icons32-2x.png +0 -0
  156. data/lib/wp/wp-admin/images/icons32-vs-2x.png +0 -0
  157. data/lib/wp/wp-admin/images/icons32-vs.png +0 -0
  158. data/lib/wp/wp-admin/images/icons32.png +0 -0
  159. data/lib/wp/wp-admin/images/imgedit-icons-2x.png +0 -0
  160. data/lib/wp/wp-admin/images/imgedit-icons.png +0 -0
  161. data/lib/wp/wp-admin/images/list-2x.png +0 -0
  162. data/lib/wp/wp-admin/images/list.png +0 -0
  163. data/lib/wp/wp-admin/images/loading.gif +0 -0
  164. data/lib/wp/wp-admin/images/marker.png +0 -0
  165. data/lib/wp/wp-admin/images/mask.png +0 -0
  166. data/lib/wp/wp-admin/images/media-button-2x.png +0 -0
  167. data/lib/wp/wp-admin/images/media-button-image.gif +0 -0
  168. data/lib/wp/wp-admin/images/media-button-music.gif +0 -0
  169. data/lib/wp/wp-admin/images/media-button-other.gif +0 -0
  170. data/lib/wp/wp-admin/images/media-button-video.gif +0 -0
  171. data/lib/wp/wp-admin/images/media-button.png +0 -0
  172. data/lib/wp/wp-admin/images/menu-2x.png +0 -0
  173. data/lib/wp/wp-admin/images/menu-vs-2x.png +0 -0
  174. data/lib/wp/wp-admin/images/menu-vs.png +0 -0
  175. data/lib/wp/wp-admin/images/menu.png +0 -0
  176. data/lib/wp/wp-admin/images/no.png +0 -0
  177. data/lib/wp/wp-admin/images/post-formats-vs.png +0 -0
  178. data/lib/wp/wp-admin/images/post-formats.png +0 -0
  179. data/lib/wp/wp-admin/images/post-formats32-vs.png +0 -0
  180. data/lib/wp/wp-admin/images/post-formats32.png +0 -0
  181. data/lib/wp/wp-admin/images/resize-2x.gif +0 -0
  182. data/lib/wp/wp-admin/images/resize-rtl-2x.gif +0 -0
  183. data/lib/wp/wp-admin/images/resize-rtl.gif +0 -0
  184. data/lib/wp/wp-admin/images/resize.gif +0 -0
  185. data/lib/wp/wp-admin/images/se.png +0 -0
  186. data/lib/wp/wp-admin/images/sort-2x.gif +0 -0
  187. data/lib/wp/wp-admin/images/sort.gif +0 -0
  188. data/lib/wp/wp-admin/images/spinner-2x.gif +0 -0
  189. data/lib/wp/wp-admin/images/spinner.gif +0 -0
  190. data/lib/wp/wp-admin/images/stars-2x.png +0 -0
  191. data/lib/wp/wp-admin/images/stars.png +0 -0
  192. data/lib/wp/wp-admin/images/w-logo-blue.png +0 -0
  193. data/lib/wp/wp-admin/images/w-logo-white.png +0 -0
  194. data/lib/wp/wp-admin/images/wheel.png +0 -0
  195. data/lib/wp/wp-admin/images/wordpress-logo-white.svg +1 -0
  196. data/lib/wp/wp-admin/images/wordpress-logo.png +0 -0
  197. data/lib/wp/wp-admin/images/wordpress-logo.svg +1 -0
  198. data/lib/wp/wp-admin/images/wpspin_light-2x.gif +0 -0
  199. data/lib/wp/wp-admin/images/wpspin_light.gif +0 -0
  200. data/lib/wp/wp-admin/images/xit-2x.gif +0 -0
  201. data/lib/wp/wp-admin/images/xit.gif +0 -0
  202. data/lib/wp/wp-admin/images/yes.png +0 -0
  203. data/lib/wp/wp-admin/import.php +132 -0
  204. data/lib/wp/wp-admin/includes/admin.php +74 -0
  205. data/lib/wp/wp-admin/includes/ajax-actions.php +2762 -0
  206. data/lib/wp/wp-admin/includes/bookmark.php +305 -0
  207. data/lib/wp/wp-admin/includes/class-ftp-pure.php +190 -0
  208. data/lib/wp/wp-admin/includes/class-ftp-sockets.php +250 -0
  209. data/lib/wp/wp-admin/includes/class-ftp.php +907 -0
  210. data/lib/wp/wp-admin/includes/class-pclzip.php +5687 -0
  211. data/lib/wp/wp-admin/includes/class-wp-comments-list-table.php +637 -0
  212. data/lib/wp/wp-admin/includes/class-wp-filesystem-base.php +815 -0
  213. data/lib/wp/wp-admin/includes/class-wp-filesystem-direct.php +384 -0
  214. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpext.php +415 -0
  215. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpsockets.php +352 -0
  216. data/lib/wp/wp-admin/includes/class-wp-filesystem-ssh2.php +392 -0
  217. data/lib/wp/wp-admin/includes/class-wp-importer.php +302 -0
  218. data/lib/wp/wp-admin/includes/class-wp-links-list-table.php +207 -0
  219. data/lib/wp/wp-admin/includes/class-wp-list-table.php +1080 -0
  220. data/lib/wp/wp-admin/includes/class-wp-media-list-table.php +574 -0
  221. data/lib/wp/wp-admin/includes/class-wp-ms-sites-list-table.php +402 -0
  222. data/lib/wp/wp-admin/includes/class-wp-ms-themes-list-table.php +459 -0
  223. data/lib/wp/wp-admin/includes/class-wp-ms-users-list-table.php +303 -0
  224. data/lib/wp/wp-admin/includes/class-wp-plugin-install-list-table.php +490 -0
  225. data/lib/wp/wp-admin/includes/class-wp-plugins-list-table.php +605 -0
  226. data/lib/wp/wp-admin/includes/class-wp-posts-list-table.php +1306 -0
  227. data/lib/wp/wp-admin/includes/class-wp-terms-list-table.php +466 -0
  228. data/lib/wp/wp-admin/includes/class-wp-theme-install-list-table.php +431 -0
  229. data/lib/wp/wp-admin/includes/class-wp-themes-list-table.php +279 -0
  230. data/lib/wp/wp-admin/includes/class-wp-upgrader-skins.php +767 -0
  231. data/lib/wp/wp-admin/includes/class-wp-upgrader.php +2676 -0
  232. data/lib/wp/wp-admin/includes/class-wp-users-list-table.php +459 -0
  233. data/lib/wp/wp-admin/includes/comment.php +171 -0
  234. data/lib/wp/wp-admin/includes/continents-cities.php +493 -0
  235. data/lib/wp/wp-admin/includes/dashboard.php +1333 -0
  236. data/lib/wp/wp-admin/includes/deprecated.php +1190 -0
  237. data/lib/wp/wp-admin/includes/export.php +508 -0
  238. data/lib/wp/wp-admin/includes/file.php +1152 -0
  239. data/lib/wp/wp-admin/includes/image-edit.php +828 -0
  240. data/lib/wp/wp-admin/includes/image.php +598 -0
  241. data/lib/wp/wp-admin/includes/import.php +206 -0
  242. data/lib/wp/wp-admin/includes/list-table.php +113 -0
  243. data/lib/wp/wp-admin/includes/media.php +3012 -0
  244. data/lib/wp/wp-admin/includes/menu.php +322 -0
  245. data/lib/wp/wp-admin/includes/meta-boxes.php +1119 -0
  246. data/lib/wp/wp-admin/includes/misc.php +845 -0
  247. data/lib/wp/wp-admin/includes/ms-deprecated.php +78 -0
  248. data/lib/wp/wp-admin/includes/ms.php +814 -0
  249. data/lib/wp/wp-admin/includes/nav-menu.php +1328 -0
  250. data/lib/wp/wp-admin/includes/plugin-install.php +550 -0
  251. data/lib/wp/wp-admin/includes/plugin.php +1899 -0
  252. data/lib/wp/wp-admin/includes/post.php +1661 -0
  253. data/lib/wp/wp-admin/includes/revision.php +228 -0
  254. data/lib/wp/wp-admin/includes/schema.php +1038 -0
  255. data/lib/wp/wp-admin/includes/screen.php +1179 -0
  256. data/lib/wp/wp-admin/includes/taxonomy.php +284 -0
  257. data/lib/wp/wp-admin/includes/template.php +2157 -0
  258. data/lib/wp/wp-admin/includes/theme-install.php +205 -0
  259. data/lib/wp/wp-admin/includes/theme.php +474 -0
  260. data/lib/wp/wp-admin/includes/translation-install.php +240 -0
  261. data/lib/wp/wp-admin/includes/update-core.php +1186 -0
  262. data/lib/wp/wp-admin/includes/update.php +432 -0
  263. data/lib/wp/wp-admin/includes/upgrade.php +2218 -0
  264. data/lib/wp/wp-admin/includes/user.php +442 -0
  265. data/lib/wp/wp-admin/includes/widgets.php +245 -0
  266. data/lib/wp/wp-admin/index.php +131 -0
  267. data/lib/wp/wp-admin/install-helper.php +199 -0
  268. data/lib/wp/wp-admin/install.php +305 -0
  269. data/lib/wp/wp-admin/js/accordion.js +143 -0
  270. data/lib/wp/wp-admin/js/accordion.min.js +1 -0
  271. data/lib/wp/wp-admin/js/color-picker.js +155 -0
  272. data/lib/wp/wp-admin/js/color-picker.min.js +1 -0
  273. data/lib/wp/wp-admin/js/comment.js +50 -0
  274. data/lib/wp/wp-admin/js/comment.min.js +1 -0
  275. data/lib/wp/wp-admin/js/common.js +804 -0
  276. data/lib/wp/wp-admin/js/common.min.js +1 -0
  277. data/lib/wp/wp-admin/js/custom-background.js +75 -0
  278. data/lib/wp/wp-admin/js/custom-background.min.js +1 -0
  279. data/lib/wp/wp-admin/js/custom-header.js +61 -0
  280. data/lib/wp/wp-admin/js/customize-controls.js +1305 -0
  281. data/lib/wp/wp-admin/js/customize-controls.min.js +1 -0
  282. data/lib/wp/wp-admin/js/customize-widgets.js +1882 -0
  283. data/lib/wp/wp-admin/js/customize-widgets.min.js +1 -0
  284. data/lib/wp/wp-admin/js/dashboard.js +190 -0
  285. data/lib/wp/wp-admin/js/dashboard.min.js +1 -0
  286. data/lib/wp/wp-admin/js/edit-comments.js +625 -0
  287. data/lib/wp/wp-admin/js/edit-comments.min.js +1 -0
  288. data/lib/wp/wp-admin/js/editor-expand.js +705 -0
  289. data/lib/wp/wp-admin/js/editor-expand.min.js +1 -0
  290. data/lib/wp/wp-admin/js/editor.js +324 -0
  291. data/lib/wp/wp-admin/js/editor.min.js +1 -0
  292. data/lib/wp/wp-admin/js/farbtastic.js +276 -0
  293. data/lib/wp/wp-admin/js/gallery.js +237 -0
  294. data/lib/wp/wp-admin/js/gallery.min.js +1 -0
  295. data/lib/wp/wp-admin/js/image-edit.js +633 -0
  296. data/lib/wp/wp-admin/js/image-edit.min.js +1 -0
  297. data/lib/wp/wp-admin/js/inline-edit-post.js +359 -0
  298. data/lib/wp/wp-admin/js/inline-edit-post.min.js +1 -0
  299. data/lib/wp/wp-admin/js/inline-edit-tax.js +142 -0
  300. data/lib/wp/wp-admin/js/inline-edit-tax.min.js +1 -0
  301. data/lib/wp/wp-admin/js/iris.min.js +4 -0
  302. data/lib/wp/wp-admin/js/language-chooser.js +26 -0
  303. data/lib/wp/wp-admin/js/language-chooser.min.js +1 -0
  304. data/lib/wp/wp-admin/js/link.js +69 -0
  305. data/lib/wp/wp-admin/js/link.min.js +1 -0
  306. data/lib/wp/wp-admin/js/media-gallery.js +26 -0
  307. data/lib/wp/wp-admin/js/media-gallery.min.js +1 -0
  308. data/lib/wp/wp-admin/js/media-upload.js +69 -0
  309. data/lib/wp/wp-admin/js/media-upload.min.js +1 -0
  310. data/lib/wp/wp-admin/js/media.js +111 -0
  311. data/lib/wp/wp-admin/js/media.min.js +1 -0
  312. data/lib/wp/wp-admin/js/nav-menu.js +1205 -0
  313. data/lib/wp/wp-admin/js/nav-menu.min.js +1 -0
  314. data/lib/wp/wp-admin/js/password-strength-meter.js +75 -0
  315. data/lib/wp/wp-admin/js/password-strength-meter.min.js +1 -0
  316. data/lib/wp/wp-admin/js/plugin-install.js +76 -0
  317. data/lib/wp/wp-admin/js/plugin-install.min.js +1 -0
  318. data/lib/wp/wp-admin/js/post.js +1094 -0
  319. data/lib/wp/wp-admin/js/post.min.js +1 -0
  320. data/lib/wp/wp-admin/js/postbox.js +199 -0
  321. data/lib/wp/wp-admin/js/postbox.min.js +1 -0
  322. data/lib/wp/wp-admin/js/revisions.js +1110 -0
  323. data/lib/wp/wp-admin/js/revisions.min.js +1 -0
  324. data/lib/wp/wp-admin/js/set-post-thumbnail.js +24 -0
  325. data/lib/wp/wp-admin/js/set-post-thumbnail.min.js +1 -0
  326. data/lib/wp/wp-admin/js/svg-painter.js +240 -0
  327. data/lib/wp/wp-admin/js/svg-painter.min.js +1 -0
  328. data/lib/wp/wp-admin/js/tags.js +72 -0
  329. data/lib/wp/wp-admin/js/tags.min.js +1 -0
  330. data/lib/wp/wp-admin/js/theme.js +1691 -0
  331. data/lib/wp/wp-admin/js/theme.min.js +1 -0
  332. data/lib/wp/wp-admin/js/updates.js +65 -0
  333. data/lib/wp/wp-admin/js/updates.min.js +1 -0
  334. data/lib/wp/wp-admin/js/user-profile.js +127 -0
  335. data/lib/wp/wp-admin/js/user-profile.min.js +1 -0
  336. data/lib/wp/wp-admin/js/user-suggest.js +30 -0
  337. data/lib/wp/wp-admin/js/user-suggest.min.js +1 -0
  338. data/lib/wp/wp-admin/js/widgets.js +494 -0
  339. data/lib/wp/wp-admin/js/widgets.min.js +1 -0
  340. data/lib/wp/wp-admin/js/word-count.js +44 -0
  341. data/lib/wp/wp-admin/js/word-count.min.js +1 -0
  342. data/lib/wp/wp-admin/js/wp-fullscreen.js +704 -0
  343. data/lib/wp/wp-admin/js/wp-fullscreen.min.js +1 -0
  344. data/lib/wp/wp-admin/js/xfn.js +17 -0
  345. data/lib/wp/wp-admin/js/xfn.min.js +1 -0
  346. data/lib/wp/wp-admin/link-add.php +29 -0
  347. data/lib/wp/wp-admin/link-manager.php +99 -0
  348. data/lib/wp/wp-admin/link-parse-opml.php +84 -0
  349. data/lib/wp/wp-admin/link.php +117 -0
  350. data/lib/wp/wp-admin/load-scripts.php +162 -0
  351. data/lib/wp/wp-admin/load-styles.php +153 -0
  352. data/lib/wp/wp-admin/maint/repair.php +124 -0
  353. data/lib/wp/wp-admin/media-new.php +84 -0
  354. data/lib/wp/wp-admin/media-upload.php +100 -0
  355. data/lib/wp/wp-admin/media.php +146 -0
  356. data/lib/wp/wp-admin/menu-header.php +227 -0
  357. data/lib/wp/wp-admin/menu.php +255 -0
  358. data/lib/wp/wp-admin/moderation.php +12 -0
  359. data/lib/wp/wp-admin/ms-admin.php +13 -0
  360. data/lib/wp/wp-admin/ms-delete-site.php +91 -0
  361. data/lib/wp/wp-admin/ms-edit.php +13 -0
  362. data/lib/wp/wp-admin/ms-options.php +12 -0
  363. data/lib/wp/wp-admin/ms-sites.php +13 -0
  364. data/lib/wp/wp-admin/ms-themes.php +13 -0
  365. data/lib/wp/wp-admin/ms-upgrade-network.php +13 -0
  366. data/lib/wp/wp-admin/ms-users.php +13 -0
  367. data/lib/wp/wp-admin/my-sites.php +145 -0
  368. data/lib/wp/wp-admin/nav-menus.php +798 -0
  369. data/lib/wp/wp-admin/network.php +561 -0
  370. data/lib/wp/wp-admin/network/about.php +16 -0
  371. data/lib/wp/wp-admin/network/admin.php +32 -0
  372. data/lib/wp/wp-admin/network/credits.php +16 -0
  373. data/lib/wp/wp-admin/network/edit.php +42 -0
  374. data/lib/wp/wp-admin/network/freedoms.php +16 -0
  375. data/lib/wp/wp-admin/network/index.php +79 -0
  376. data/lib/wp/wp-admin/network/menu.php +63 -0
  377. data/lib/wp/wp-admin/network/plugin-editor.php +16 -0
  378. data/lib/wp/wp-admin/network/plugin-install.php +19 -0
  379. data/lib/wp/wp-admin/network/plugins.php +16 -0
  380. data/lib/wp/wp-admin/network/profile.php +16 -0
  381. data/lib/wp/wp-admin/network/settings.php +347 -0
  382. data/lib/wp/wp-admin/network/setup.php +16 -0
  383. data/lib/wp/wp-admin/network/site-info.php +178 -0
  384. data/lib/wp/wp-admin/network/site-new.php +153 -0
  385. data/lib/wp/wp-admin/network/site-settings.php +173 -0
  386. data/lib/wp/wp-admin/network/site-themes.php +185 -0
  387. data/lib/wp/wp-admin/network/site-users.php +319 -0
  388. data/lib/wp/wp-admin/network/sites.php +275 -0
  389. data/lib/wp/wp-admin/network/theme-editor.php +16 -0
  390. data/lib/wp/wp-admin/network/theme-install.php +19 -0
  391. data/lib/wp/wp-admin/network/themes.php +291 -0
  392. data/lib/wp/wp-admin/network/update-core.php +16 -0
  393. data/lib/wp/wp-admin/network/update.php +19 -0
  394. data/lib/wp/wp-admin/network/upgrade.php +120 -0
  395. data/lib/wp/wp-admin/network/user-edit.php +16 -0
  396. data/lib/wp/wp-admin/network/user-new.php +106 -0
  397. data/lib/wp/wp-admin/network/users.php +296 -0
  398. data/lib/wp/wp-admin/options-discussion.php +273 -0
  399. data/lib/wp/wp-admin/options-general.php +355 -0
  400. data/lib/wp/wp-admin/options-head.php +18 -0
  401. data/lib/wp/wp-admin/options-media.php +136 -0
  402. data/lib/wp/wp-admin/options-permalink.php +289 -0
  403. data/lib/wp/wp-admin/options-reading.php +184 -0
  404. data/lib/wp/wp-admin/options-writing.php +194 -0
  405. data/lib/wp/wp-admin/options.php +265 -0
  406. data/lib/wp/wp-admin/plugin-editor.php +279 -0
  407. data/lib/wp/wp-admin/plugin-install.php +134 -0
  408. data/lib/wp/wp-admin/plugins.php +474 -0
  409. data/lib/wp/wp-admin/post-new.php +74 -0
  410. data/lib/wp/wp-admin/post.php +318 -0
  411. data/lib/wp/wp-admin/press-this.php +691 -0
  412. data/lib/wp/wp-admin/profile.php +18 -0
  413. data/lib/wp/wp-admin/revision.php +221 -0
  414. data/lib/wp/wp-admin/setup-config.php +345 -0
  415. data/lib/wp/wp-admin/theme-editor.php +243 -0
  416. data/lib/wp/wp-admin/theme-install.php +278 -0
  417. data/lib/wp/wp-admin/themes.php +374 -0
  418. data/lib/wp/wp-admin/tools.php +75 -0
  419. data/lib/wp/wp-admin/update-core.php +653 -0
  420. data/lib/wp/wp-admin/update.php +272 -0
  421. data/lib/wp/wp-admin/upgrade-functions.php +12 -0
  422. data/lib/wp/wp-admin/upgrade.php +116 -0
  423. data/lib/wp/wp-admin/upload.php +292 -0
  424. data/lib/wp/wp-admin/user-edit.php +557 -0
  425. data/lib/wp/wp-admin/user-new.php +439 -0
  426. data/lib/wp/wp-admin/user/about.php +13 -0
  427. data/lib/wp/wp-admin/user/admin.php +32 -0
  428. data/lib/wp/wp-admin/user/credits.php +13 -0
  429. data/lib/wp/wp-admin/user/freedoms.php +13 -0
  430. data/lib/wp/wp-admin/user/index.php +12 -0
  431. data/lib/wp/wp-admin/user/menu.php +22 -0
  432. data/lib/wp/wp-admin/user/profile.php +12 -0
  433. data/lib/wp/wp-admin/user/user-edit.php +12 -0
  434. data/lib/wp/wp-admin/users.php +460 -0
  435. data/lib/wp/wp-admin/widgets.php +442 -0
  436. data/lib/wp/wp-blog-header.php +18 -0
  437. data/lib/wp/wp-comments-post.php +164 -0
  438. data/lib/wp/wp-config-sample.php +80 -0
  439. data/lib/wp/wp-content/index.php +2 -0
  440. data/lib/wp/wp-content/plugins/hello.php +82 -0
  441. data/lib/wp/wp-content/plugins/index.php +2 -0
  442. data/lib/wp/wp-content/themes/index.php +2 -0
  443. data/lib/wp/wp-content/themes/stump/.editorconfig +11 -0
  444. data/lib/wp/wp-content/themes/stump/.jshintrc +16 -0
  445. data/lib/wp/wp-content/themes/stump/404.php +13 -0
  446. data/lib/wp/wp-content/themes/stump/CHANGELOG.md +333 -0
  447. data/lib/wp/wp-content/themes/stump/CONTRIBUTING.md +121 -0
  448. data/lib/wp/wp-content/themes/stump/Gruntfile.js +151 -0
  449. data/lib/wp/wp-content/themes/stump/LICENSE.md +19 -0
  450. data/lib/wp/wp-content/themes/stump/assets/coffee/build/.gitkeep +0 -0
  451. data/lib/wp/wp-content/themes/stump/assets/coffee/build/site.js +6 -0
  452. data/lib/wp/wp-content/themes/stump/assets/css/editor-style.css +548 -0
  453. data/lib/wp/wp-content/themes/stump/assets/css/main.min.css +4 -0
  454. data/lib/wp/wp-content/themes/stump/assets/css/main.min.css.map +7 -0
  455. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  456. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  457. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  458. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  459. data/lib/wp/wp-content/themes/stump/assets/img/.gitignore +0 -0
  460. data/lib/wp/wp-content/themes/stump/assets/js/_main.js +63 -0
  461. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/affix.js +137 -0
  462. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/alert.js +88 -0
  463. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/button.js +107 -0
  464. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/carousel.js +205 -0
  465. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/collapse.js +170 -0
  466. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/dropdown.js +147 -0
  467. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/modal.js +243 -0
  468. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/popover.js +110 -0
  469. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/scrollspy.js +153 -0
  470. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tab.js +125 -0
  471. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tooltip.js +399 -0
  472. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/transition.js +48 -0
  473. data/lib/wp/wp-content/themes/stump/assets/js/scripts.min.js +1 -0
  474. data/lib/wp/wp-content/themes/stump/assets/js/vendor/jquery-1.11.0.min.js +4 -0
  475. data/lib/wp/wp-content/themes/stump/assets/js/vendor/modernizr-2.7.0.min.js +4 -0
  476. data/lib/wp/wp-content/themes/stump/assets/sass/app.scss +9 -0
  477. data/lib/wp/wp-content/themes/stump/assets/sass/core/_variables.scss +1 -0
  478. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_alerts.scss +67 -0
  479. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_badges.scss +55 -0
  480. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_bootstrap.scss +49 -0
  481. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_breadcrumbs.scss +26 -0
  482. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_button-groups.scss +226 -0
  483. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_buttons.scss +159 -0
  484. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_carousel.scss +232 -0
  485. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_close.scss +35 -0
  486. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_code.scss +63 -0
  487. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_component-animations.scss +29 -0
  488. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_dropdowns.scss +213 -0
  489. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_forms.scss +436 -0
  490. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_glyphicons.scss +233 -0
  491. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_grid.scss +84 -0
  492. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_input-groups.scss +162 -0
  493. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_jumbotron.scss +44 -0
  494. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_labels.scss +64 -0
  495. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_list-group.scss +110 -0
  496. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_media.scss +56 -0
  497. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_mixins.scss +947 -0
  498. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_modals.scss +139 -0
  499. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navbar.scss +620 -0
  500. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navs.scss +242 -0
  501. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_normalize.scss +423 -0
  502. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pager.scss +55 -0
  503. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pagination.scss +88 -0
  504. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_panels.scss +241 -0
  505. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_popovers.scss +133 -0
  506. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_print.scss +101 -0
  507. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_progress-bars.scss +80 -0
  508. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_responsive-utilities.scss +74 -0
  509. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_scaffolding.scss +134 -0
  510. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tables.scss +233 -0
  511. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_theme.scss +247 -0
  512. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_thumbnails.scss +38 -0
  513. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tooltip.scss +95 -0
  514. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_type.scss +284 -0
  515. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_utilities.scss +56 -0
  516. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_variables.scss +833 -0
  517. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_wells.scss +29 -0
  518. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon-deprecated-upcoming.scss +13 -0
  519. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon.scss +59 -0
  520. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_button.scss +273 -0
  521. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_clearfix.scss +29 -0
  522. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_font-family.scss +5 -0
  523. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_hide-text.scss +5 -0
  524. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_html5-input-types.scss +56 -0
  525. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_position.scss +42 -0
  526. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_prefixer.scss +49 -0
  527. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_retina-image.scss +32 -0
  528. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_size.scss +44 -0
  529. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_timing-functions.scss +32 -0
  530. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_triangle.scss +45 -0
  531. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_animation.scss +52 -0
  532. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_appearance.scss +3 -0
  533. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_backface-visibility.scss +6 -0
  534. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background-image.scss +48 -0
  535. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background.scss +103 -0
  536. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-image.scss +55 -0
  537. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-radius.scss +22 -0
  538. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_box-sizing.scss +4 -0
  539. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_columns.scss +47 -0
  540. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_flex-box.scss +52 -0
  541. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_font-face.scss +23 -0
  542. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_hidpi-media-query.scss +10 -0
  543. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_image-rendering.scss +13 -0
  544. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_inline-block.scss +8 -0
  545. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_keyframes.scss +43 -0
  546. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_linear-gradient.scss +41 -0
  547. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_perspective.scss +8 -0
  548. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_placeholder.scss +29 -0
  549. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_radial-gradient.scss +44 -0
  550. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transform.scss +15 -0
  551. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transition.scss +34 -0
  552. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_user-select.scss +3 -0
  553. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_compact.scss +11 -0
  554. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_flex-grid.scss +39 -0
  555. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_grid-width.scss +13 -0
  556. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_linear-gradient.scss +13 -0
  557. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_modular-scale.scss +40 -0
  558. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_px-to-em.scss +8 -0
  559. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_radial-gradient.scss +23 -0
  560. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_tint-shade.scss +9 -0
  561. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_transition-property-name.scss +22 -0
  562. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_deprecated-webkit-gradient.scss +39 -0
  563. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  564. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_linear-positions-parser.scss +61 -0
  565. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss +69 -0
  566. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-positions-parser.scss +18 -0
  567. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_render-gradients.scss +26 -0
  568. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_shape-size-stripper.scss +10 -0
  569. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan.sass +11 -0
  570. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_grid.sass +161 -0
  571. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass +63 -0
  572. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_utilities.sass +24 -0
  573. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_variables.sass +42 -0
  574. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat-helpers.scss +8 -0
  575. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat.scss +21 -0
  576. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_new-breakpoint.scss +16 -0
  577. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_private.scss +107 -0
  578. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_px-to-em.scss +3 -0
  579. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_fill-parent.scss +7 -0
  580. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_grid.scss +5 -0
  581. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_media.scss +51 -0
  582. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_omega.scss +79 -0
  583. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_outer-container.scss +8 -0
  584. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_pad.scss +8 -0
  585. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_private.scss +50 -0
  586. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_reset.scss +12 -0
  587. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_row.scss +17 -0
  588. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_shift.scss +9 -0
  589. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_span-columns.scss +38 -0
  590. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_to-deprecate.scss +57 -0
  591. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_visual-grid.scss +41 -0
  592. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_grid.scss +7 -0
  593. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_visual-grid.scss +5 -0
  594. data/lib/wp/wp-content/themes/stump/base.php +36 -0
  595. data/lib/wp/wp-content/themes/stump/functions.php +19 -0
  596. data/lib/wp/wp-content/themes/stump/index.php +21 -0
  597. data/lib/wp/wp-content/themes/stump/lang/ar.mo +0 -0
  598. data/lib/wp/wp-content/themes/stump/lang/ar.po +270 -0
  599. data/lib/wp/wp-content/themes/stump/lang/bg_BG.mo +0 -0
  600. data/lib/wp/wp-content/themes/stump/lang/bg_BG.po +338 -0
  601. data/lib/wp/wp-content/themes/stump/lang/ca.mo +0 -0
  602. data/lib/wp/wp-content/themes/stump/lang/ca.po +517 -0
  603. data/lib/wp/wp-content/themes/stump/lang/da_DK.mo +0 -0
  604. data/lib/wp/wp-content/themes/stump/lang/da_DK.po +305 -0
  605. data/lib/wp/wp-content/themes/stump/lang/de_DE.mo +0 -0
  606. data/lib/wp/wp-content/themes/stump/lang/de_DE.po +271 -0
  607. data/lib/wp/wp-content/themes/stump/lang/el.mo +0 -0
  608. data/lib/wp/wp-content/themes/stump/lang/el.po +319 -0
  609. data/lib/wp/wp-content/themes/stump/lang/es_ES.mo +0 -0
  610. data/lib/wp/wp-content/themes/stump/lang/es_ES.po +270 -0
  611. data/lib/wp/wp-content/themes/stump/lang/et.mo +0 -0
  612. data/lib/wp/wp-content/themes/stump/lang/et.po +262 -0
  613. data/lib/wp/wp-content/themes/stump/lang/fa_IR.mo +0 -0
  614. data/lib/wp/wp-content/themes/stump/lang/fa_IR.po +273 -0
  615. data/lib/wp/wp-content/themes/stump/lang/fi_FI.mo +0 -0
  616. data/lib/wp/wp-content/themes/stump/lang/fi_FI.po +367 -0
  617. data/lib/wp/wp-content/themes/stump/lang/fr_FR.mo +0 -0
  618. data/lib/wp/wp-content/themes/stump/lang/fr_FR.po +336 -0
  619. data/lib/wp/wp-content/themes/stump/lang/he_IL.mo +0 -0
  620. data/lib/wp/wp-content/themes/stump/lang/he_IL.po +336 -0
  621. data/lib/wp/wp-content/themes/stump/lang/hu_HU.mo +0 -0
  622. data/lib/wp/wp-content/themes/stump/lang/hu_HU.po +271 -0
  623. data/lib/wp/wp-content/themes/stump/lang/id_ID.mo +0 -0
  624. data/lib/wp/wp-content/themes/stump/lang/id_ID.po +278 -0
  625. data/lib/wp/wp-content/themes/stump/lang/it_IT.mo +0 -0
  626. data/lib/wp/wp-content/themes/stump/lang/it_IT.po +269 -0
  627. data/lib/wp/wp-content/themes/stump/lang/ja.mo +0 -0
  628. data/lib/wp/wp-content/themes/stump/lang/ja.po +267 -0
  629. data/lib/wp/wp-content/themes/stump/lang/ko_KR.mo +0 -0
  630. data/lib/wp/wp-content/themes/stump/lang/ko_KR.po +282 -0
  631. data/lib/wp/wp-content/themes/stump/lang/mk_MK.mo +0 -0
  632. data/lib/wp/wp-content/themes/stump/lang/mk_MK.po +297 -0
  633. data/lib/wp/wp-content/themes/stump/lang/ms_MY.mo +0 -0
  634. data/lib/wp/wp-content/themes/stump/lang/ms_MY.po +342 -0
  635. data/lib/wp/wp-content/themes/stump/lang/nb_NO.mo +0 -0
  636. data/lib/wp/wp-content/themes/stump/lang/nb_NO.po +517 -0
  637. data/lib/wp/wp-content/themes/stump/lang/nl_NL.mo +0 -0
  638. data/lib/wp/wp-content/themes/stump/lang/nl_NL.po +261 -0
  639. data/lib/wp/wp-content/themes/stump/lang/nn_NO.mo +0 -0
  640. data/lib/wp/wp-content/themes/stump/lang/nn_NO.po +517 -0
  641. data/lib/wp/wp-content/themes/stump/lang/pl_PL.mo +0 -0
  642. data/lib/wp/wp-content/themes/stump/lang/pl_PL.po +283 -0
  643. data/lib/wp/wp-content/themes/stump/lang/pt_BR.mo +0 -0
  644. data/lib/wp/wp-content/themes/stump/lang/pt_BR.po +394 -0
  645. data/lib/wp/wp-content/themes/stump/lang/ro_RO.mo +0 -0
  646. data/lib/wp/wp-content/themes/stump/lang/ro_RO.po +271 -0
  647. data/lib/wp/wp-content/themes/stump/lang/roots.pot +244 -0
  648. data/lib/wp/wp-content/themes/stump/lang/ru_RU.mo +0 -0
  649. data/lib/wp/wp-content/themes/stump/lang/ru_RU.po +255 -0
  650. data/lib/wp/wp-content/themes/stump/lang/sk_SK.mo +0 -0
  651. data/lib/wp/wp-content/themes/stump/lang/sk_SK.po +267 -0
  652. data/lib/wp/wp-content/themes/stump/lang/sr_RS.mo +0 -0
  653. data/lib/wp/wp-content/themes/stump/lang/sr_RS.pot +261 -0
  654. data/lib/wp/wp-content/themes/stump/lang/sv_SE.mo +0 -0
  655. data/lib/wp/wp-content/themes/stump/lang/sv_SE.po +323 -0
  656. data/lib/wp/wp-content/themes/stump/lang/tr_TR.mo +0 -0
  657. data/lib/wp/wp-content/themes/stump/lang/tr_TR.po +405 -0
  658. data/lib/wp/wp-content/themes/stump/lang/vi_VN.mo +0 -0
  659. data/lib/wp/wp-content/themes/stump/lang/vi_VN.po +516 -0
  660. data/lib/wp/wp-content/themes/stump/lang/zh_CN.mo +0 -0
  661. data/lib/wp/wp-content/themes/stump/lang/zh_CN.po +329 -0
  662. data/lib/wp/wp-content/themes/stump/lang/zh_TW.mo +0 -0
  663. data/lib/wp/wp-content/themes/stump/lang/zh_TW.po +261 -0
  664. data/lib/wp/wp-content/themes/stump/lib/activation.php +215 -0
  665. data/lib/wp/wp-content/themes/stump/lib/cleanup.php +261 -0
  666. data/lib/wp/wp-content/themes/stump/lib/comments.php +52 -0
  667. data/lib/wp/wp-content/themes/stump/lib/config.php +79 -0
  668. data/lib/wp/wp-content/themes/stump/lib/custom.php +4 -0
  669. data/lib/wp/wp-content/themes/stump/lib/gallery.php +130 -0
  670. data/lib/wp/wp-content/themes/stump/lib/init.php +25 -0
  671. data/lib/wp/wp-content/themes/stump/lib/nav.php +93 -0
  672. data/lib/wp/wp-content/themes/stump/lib/relative-urls.php +50 -0
  673. data/lib/wp/wp-content/themes/stump/lib/scripts.php +67 -0
  674. data/lib/wp/wp-content/themes/stump/lib/sidebar.php +43 -0
  675. data/lib/wp/wp-content/themes/stump/lib/titles.php +37 -0
  676. data/lib/wp/wp-content/themes/stump/lib/utils.php +14 -0
  677. data/lib/wp/wp-content/themes/stump/lib/widgets.php +133 -0
  678. data/lib/wp/wp-content/themes/stump/lib/wrapper.php +49 -0
  679. data/lib/wp/wp-content/themes/stump/package.json +32 -0
  680. data/lib/wp/wp-content/themes/stump/page.php +2 -0
  681. data/lib/wp/wp-content/themes/stump/screenshot.png +0 -0
  682. data/lib/wp/wp-content/themes/stump/single.php +1 -0
  683. data/lib/wp/wp-content/themes/stump/style.css +11 -0
  684. data/lib/wp/wp-content/themes/stump/template-custom.php +8 -0
  685. data/lib/wp/wp-content/themes/stump/templates/comment.php +14 -0
  686. data/lib/wp/wp-content/themes/stump/templates/comments.php +80 -0
  687. data/lib/wp/wp-content/themes/stump/templates/content-page.php +4 -0
  688. data/lib/wp/wp-content/themes/stump/templates/content-single.php +15 -0
  689. data/lib/wp/wp-content/themes/stump/templates/content.php +9 -0
  690. data/lib/wp/wp-content/themes/stump/templates/entry-meta.php +2 -0
  691. data/lib/wp/wp-content/themes/stump/templates/footer.php +8 -0
  692. data/lib/wp/wp-content/themes/stump/templates/head.php +12 -0
  693. data/lib/wp/wp-content/themes/stump/templates/header-top-navbar.php +21 -0
  694. data/lib/wp/wp-content/themes/stump/templates/header.php +14 -0
  695. data/lib/wp/wp-content/themes/stump/templates/page-header.php +5 -0
  696. data/lib/wp/wp-content/themes/stump/templates/searchform.php +9 -0
  697. data/lib/wp/wp-content/themes/stump/templates/sidebar.php +1 -0
  698. data/lib/wp/wp-content/themes/twentyfourteen/404.php +32 -0
  699. data/lib/wp/wp-content/themes/twentyfourteen/archive.php +74 -0
  700. data/lib/wp/wp-content/themes/twentyfourteen/author.php +74 -0
  701. data/lib/wp/wp-content/themes/twentyfourteen/category.php +58 -0
  702. data/lib/wp/wp-content/themes/twentyfourteen/comments.php +66 -0
  703. data/lib/wp/wp-content/themes/twentyfourteen/content-aside.php +57 -0
  704. data/lib/wp/wp-content/themes/twentyfourteen/content-audio.php +57 -0
  705. data/lib/wp/wp-content/themes/twentyfourteen/content-featured-post.php +34 -0
  706. data/lib/wp/wp-content/themes/twentyfourteen/content-gallery.php +57 -0
  707. data/lib/wp/wp-content/themes/twentyfourteen/content-image.php +57 -0
  708. data/lib/wp/wp-content/themes/twentyfourteen/content-link.php +57 -0
  709. data/lib/wp/wp-content/themes/twentyfourteen/content-none.php +31 -0
  710. data/lib/wp/wp-content/themes/twentyfourteen/content-page.php +31 -0
  711. data/lib/wp/wp-content/themes/twentyfourteen/content-quote.php +57 -0
  712. data/lib/wp/wp-content/themes/twentyfourteen/content-video.php +57 -0
  713. data/lib/wp/wp-content/themes/twentyfourteen/content.php +66 -0
  714. data/lib/wp/wp-content/themes/twentyfourteen/css/editor-style.css +717 -0
  715. data/lib/wp/wp-content/themes/twentyfourteen/css/ie.css +1335 -0
  716. data/lib/wp/wp-content/themes/twentyfourteen/featured-content.php +39 -0
  717. data/lib/wp/wp-content/themes/twentyfourteen/footer.php +28 -0
  718. data/lib/wp/wp-content/themes/twentyfourteen/functions.php +519 -0
  719. data/lib/wp/wp-content/themes/twentyfourteen/genericons/COPYING.txt +9 -0
  720. data/lib/wp/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf +0 -0
  721. data/lib/wp/wp-content/themes/twentyfourteen/genericons/LICENSE.txt +339 -0
  722. data/lib/wp/wp-content/themes/twentyfourteen/genericons/README.txt +123 -0
  723. data/lib/wp/wp-content/themes/twentyfourteen/genericons/example.html +464 -0
  724. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot +0 -0
  725. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg +135 -0
  726. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf +0 -0
  727. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff +0 -0
  728. data/lib/wp/wp-content/themes/twentyfourteen/genericons/genericons.css +197 -0
  729. data/lib/wp/wp-content/themes/twentyfourteen/header.php +65 -0
  730. data/lib/wp/wp-content/themes/twentyfourteen/image.php +79 -0
  731. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-dark.svg +16 -0
  732. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-light.svg +6 -0
  733. data/lib/wp/wp-content/themes/twentyfourteen/inc/back-compat.php +63 -0
  734. data/lib/wp/wp-content/themes/twentyfourteen/inc/custom-header.php +147 -0
  735. data/lib/wp/wp-content/themes/twentyfourteen/inc/customizer.php +114 -0
  736. data/lib/wp/wp-content/themes/twentyfourteen/inc/featured-content.php +531 -0
  737. data/lib/wp/wp-content/themes/twentyfourteen/inc/template-tags.php +203 -0
  738. data/lib/wp/wp-content/themes/twentyfourteen/inc/widgets.php +269 -0
  739. data/lib/wp/wp-content/themes/twentyfourteen/index.php +61 -0
  740. data/lib/wp/wp-content/themes/twentyfourteen/js/customizer.js +38 -0
  741. data/lib/wp/wp-content/themes/twentyfourteen/js/featured-content-admin.js +9 -0
  742. data/lib/wp/wp-content/themes/twentyfourteen/js/functions.js +134 -0
  743. data/lib/wp/wp-content/themes/twentyfourteen/js/html5.js +8 -0
  744. data/lib/wp/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js +21 -0
  745. data/lib/wp/wp-content/themes/twentyfourteen/js/slider.js +598 -0
  746. data/lib/wp/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot +467 -0
  747. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/contributors.php +52 -0
  748. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/full-width.php +42 -0
  749. data/lib/wp/wp-content/themes/twentyfourteen/page.php +48 -0
  750. data/lib/wp/wp-content/themes/twentyfourteen/rtl.css +854 -0
  751. data/lib/wp/wp-content/themes/twentyfourteen/screenshot.png +0 -0
  752. data/lib/wp/wp-content/themes/twentyfourteen/search.php +49 -0
  753. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-content.php +16 -0
  754. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-footer.php +19 -0
  755. data/lib/wp/wp-content/themes/twentyfourteen/sidebar.php +29 -0
  756. data/lib/wp/wp-content/themes/twentyfourteen/single.php +40 -0
  757. data/lib/wp/wp-content/themes/twentyfourteen/style.css +4321 -0
  758. data/lib/wp/wp-content/themes/twentyfourteen/tag.php +60 -0
  759. data/lib/wp/wp-content/themes/twentyfourteen/taxonomy-post_format.php +85 -0
  760. data/lib/wp/wp-cron.php +115 -0
  761. data/lib/wp/wp-includes/ID3/getid3.lib.php +1376 -0
  762. data/lib/wp/wp-includes/ID3/getid3.php +1796 -0
  763. data/lib/wp/wp-includes/ID3/license.commercial.txt +27 -0
  764. data/lib/wp/wp-includes/ID3/license.txt +29 -0
  765. data/lib/wp/wp-includes/ID3/module.audio-video.asf.php +2013 -0
  766. data/lib/wp/wp-includes/ID3/module.audio-video.flv.php +745 -0
  767. data/lib/wp/wp-includes/ID3/module.audio-video.matroska.php +1751 -0
  768. data/lib/wp/wp-includes/ID3/module.audio-video.quicktime.php +2246 -0
  769. data/lib/wp/wp-includes/ID3/module.audio-video.riff.php +2586 -0
  770. data/lib/wp/wp-includes/ID3/module.audio.ac3.php +474 -0
  771. data/lib/wp/wp-includes/ID3/module.audio.dts.php +291 -0
  772. data/lib/wp/wp-includes/ID3/module.audio.flac.php +443 -0
  773. data/lib/wp/wp-includes/ID3/module.audio.mp3.php +2012 -0
  774. data/lib/wp/wp-includes/ID3/module.audio.ogg.php +756 -0
  775. data/lib/wp/wp-includes/ID3/module.tag.apetag.php +371 -0
  776. data/lib/wp/wp-includes/ID3/module.tag.id3v1.php +360 -0
  777. data/lib/wp/wp-includes/ID3/module.tag.id3v2.php +3424 -0
  778. data/lib/wp/wp-includes/ID3/module.tag.lyrics3.php +294 -0
  779. data/lib/wp/wp-includes/ID3/readme.txt +604 -0
  780. data/lib/wp/wp-includes/SimplePie/Author.php +157 -0
  781. data/lib/wp/wp-includes/SimplePie/Cache.php +133 -0
  782. data/lib/wp/wp-includes/SimplePie/Cache/Base.php +114 -0
  783. data/lib/wp/wp-includes/SimplePie/Cache/DB.php +137 -0
  784. data/lib/wp/wp-includes/SimplePie/Cache/File.php +173 -0
  785. data/lib/wp/wp-includes/SimplePie/Cache/Memcache.php +183 -0
  786. data/lib/wp/wp-includes/SimplePie/Cache/MySQL.php +438 -0
  787. data/lib/wp/wp-includes/SimplePie/Caption.php +210 -0
  788. data/lib/wp/wp-includes/SimplePie/Category.php +157 -0
  789. data/lib/wp/wp-includes/SimplePie/Content/Type/Sniffer.php +332 -0
  790. data/lib/wp/wp-includes/SimplePie/Copyright.php +130 -0
  791. data/lib/wp/wp-includes/SimplePie/Core.php +57 -0
  792. data/lib/wp/wp-includes/SimplePie/Credit.php +156 -0
  793. data/lib/wp/wp-includes/SimplePie/Decode/HTML/Entities.php +617 -0
  794. data/lib/wp/wp-includes/SimplePie/Enclosure.php +1380 -0
  795. data/lib/wp/wp-includes/SimplePie/Exception.php +52 -0
  796. data/lib/wp/wp-includes/SimplePie/File.php +292 -0
  797. data/lib/wp/wp-includes/SimplePie/HTTP/Parser.php +500 -0
  798. data/lib/wp/wp-includes/SimplePie/IRI.php +1238 -0
  799. data/lib/wp/wp-includes/SimplePie/Item.php +2964 -0
  800. data/lib/wp/wp-includes/SimplePie/Locator.php +372 -0
  801. data/lib/wp/wp-includes/SimplePie/Misc.php +2247 -0
  802. data/lib/wp/wp-includes/SimplePie/Net/IPv6.php +276 -0
  803. data/lib/wp/wp-includes/SimplePie/Parse/Date.php +983 -0
  804. data/lib/wp/wp-includes/SimplePie/Parser.php +407 -0
  805. data/lib/wp/wp-includes/SimplePie/Rating.php +129 -0
  806. data/lib/wp/wp-includes/SimplePie/Registry.php +225 -0
  807. data/lib/wp/wp-includes/SimplePie/Restriction.php +155 -0
  808. data/lib/wp/wp-includes/SimplePie/Sanitize.php +554 -0
  809. data/lib/wp/wp-includes/SimplePie/Source.php +611 -0
  810. data/lib/wp/wp-includes/SimplePie/XML/Declaration/Parser.php +362 -0
  811. data/lib/wp/wp-includes/SimplePie/gzdecode.php +371 -0
  812. data/lib/wp/wp-includes/Text/Diff.php +450 -0
  813. data/lib/wp/wp-includes/Text/Diff/Engine/native.php +436 -0
  814. data/lib/wp/wp-includes/Text/Diff/Engine/shell.php +162 -0
  815. data/lib/wp/wp-includes/Text/Diff/Engine/string.php +248 -0
  816. data/lib/wp/wp-includes/Text/Diff/Engine/xdiff.php +64 -0
  817. data/lib/wp/wp-includes/Text/Diff/Renderer.php +235 -0
  818. data/lib/wp/wp-includes/Text/Diff/Renderer/inline.php +206 -0
  819. data/lib/wp/wp-includes/admin-bar.php +870 -0
  820. data/lib/wp/wp-includes/atomlib.php +352 -0
  821. data/lib/wp/wp-includes/author-template.php +471 -0
  822. data/lib/wp/wp-includes/bookmark-template.php +298 -0
  823. data/lib/wp/wp-includes/bookmark.php +416 -0
  824. data/lib/wp/wp-includes/cache.php +704 -0
  825. data/lib/wp/wp-includes/canonical.php +586 -0
  826. data/lib/wp/wp-includes/capabilities.php +1539 -0
  827. data/lib/wp/wp-includes/category-template.php +1407 -0
  828. data/lib/wp/wp-includes/category.php +343 -0
  829. data/lib/wp/wp-includes/certificates/ca-bundle.crt +3785 -0
  830. data/lib/wp/wp-includes/class-IXR.php +1100 -0
  831. data/lib/wp/wp-includes/class-feed.php +140 -0
  832. data/lib/wp/wp-includes/class-http.php +2245 -0
  833. data/lib/wp/wp-includes/class-json.php +936 -0
  834. data/lib/wp/wp-includes/class-oembed.php +579 -0
  835. data/lib/wp/wp-includes/class-phpass.php +260 -0
  836. data/lib/wp/wp-includes/class-phpmailer.php +3265 -0
  837. data/lib/wp/wp-includes/class-pop3.php +652 -0
  838. data/lib/wp/wp-includes/class-simplepie.php +3119 -0
  839. data/lib/wp/wp-includes/class-smtp.php +943 -0
  840. data/lib/wp/wp-includes/class-snoopy.php +1256 -0
  841. data/lib/wp/wp-includes/class-wp-admin-bar.php +517 -0
  842. data/lib/wp/wp-includes/class-wp-ajax-response.php +199 -0
  843. data/lib/wp/wp-includes/class-wp-customize-control.php +1124 -0
  844. data/lib/wp/wp-includes/class-wp-customize-manager.php +1272 -0
  845. data/lib/wp/wp-includes/class-wp-customize-panel.php +200 -0
  846. data/lib/wp/wp-includes/class-wp-customize-section.php +196 -0
  847. data/lib/wp/wp-includes/class-wp-customize-setting.php +554 -0
  848. data/lib/wp/wp-includes/class-wp-customize-widgets.php +1556 -0
  849. data/lib/wp/wp-includes/class-wp-editor.php +1435 -0
  850. data/lib/wp/wp-includes/class-wp-embed.php +373 -0
  851. data/lib/wp/wp-includes/class-wp-error.php +276 -0
  852. data/lib/wp/wp-includes/class-wp-http-ixr-client.php +97 -0
  853. data/lib/wp/wp-includes/class-wp-image-editor-gd.php +459 -0
  854. data/lib/wp/wp-includes/class-wp-image-editor-imagick.php +512 -0
  855. data/lib/wp/wp-includes/class-wp-image-editor.php +475 -0
  856. data/lib/wp/wp-includes/class-wp-theme.php +1235 -0
  857. data/lib/wp/wp-includes/class-wp-walker.php +471 -0
  858. data/lib/wp/wp-includes/class-wp-xmlrpc-server.php +5984 -0
  859. data/lib/wp/wp-includes/class-wp.php +782 -0
  860. data/lib/wp/wp-includes/class.wp-dependencies.php +509 -0
  861. data/lib/wp/wp-includes/class.wp-scripts.php +247 -0
  862. data/lib/wp/wp-includes/class.wp-styles.php +210 -0
  863. data/lib/wp/wp-includes/comment-template.php +2286 -0
  864. data/lib/wp/wp-includes/comment.php +2606 -0
  865. data/lib/wp/wp-includes/compat.php +125 -0
  866. data/lib/wp/wp-includes/cron.php +469 -0
  867. data/lib/wp/wp-includes/css/admin-bar-rtl.css +1099 -0
  868. data/lib/wp/wp-includes/css/admin-bar-rtl.min.css +1 -0
  869. data/lib/wp/wp-includes/css/admin-bar.css +1099 -0
  870. data/lib/wp/wp-includes/css/admin-bar.min.css +1 -0
  871. data/lib/wp/wp-includes/css/buttons-rtl.css +364 -0
  872. data/lib/wp/wp-includes/css/buttons-rtl.min.css +1 -0
  873. data/lib/wp/wp-includes/css/buttons.css +364 -0
  874. data/lib/wp/wp-includes/css/buttons.min.css +1 -0
  875. data/lib/wp/wp-includes/css/dashicons.css +893 -0
  876. data/lib/wp/wp-includes/css/dashicons.min.css +1 -0
  877. data/lib/wp/wp-includes/css/editor-rtl.css +1993 -0
  878. data/lib/wp/wp-includes/css/editor-rtl.min.css +1 -0
  879. data/lib/wp/wp-includes/css/editor.css +1993 -0
  880. data/lib/wp/wp-includes/css/editor.min.css +1 -0
  881. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.css +343 -0
  882. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.min.css +19 -0
  883. data/lib/wp/wp-includes/css/jquery-ui-dialog.css +343 -0
  884. data/lib/wp/wp-includes/css/jquery-ui-dialog.min.css +19 -0
  885. data/lib/wp/wp-includes/css/media-views-rtl.css +2568 -0
  886. data/lib/wp/wp-includes/css/media-views-rtl.min.css +1 -0
  887. data/lib/wp/wp-includes/css/media-views.css +2568 -0
  888. data/lib/wp/wp-includes/css/media-views.min.css +1 -0
  889. data/lib/wp/wp-includes/css/wp-auth-check-rtl.css +100 -0
  890. data/lib/wp/wp-includes/css/wp-auth-check-rtl.min.css +1 -0
  891. data/lib/wp/wp-includes/css/wp-auth-check.css +100 -0
  892. data/lib/wp/wp-includes/css/wp-auth-check.min.css +1 -0
  893. data/lib/wp/wp-includes/css/wp-pointer-rtl.css +212 -0
  894. data/lib/wp/wp-includes/css/wp-pointer-rtl.min.css +1 -0
  895. data/lib/wp/wp-includes/css/wp-pointer.css +212 -0
  896. data/lib/wp/wp-includes/css/wp-pointer.min.css +1 -0
  897. data/lib/wp/wp-includes/date.php +475 -0
  898. data/lib/wp/wp-includes/default-constants.php +323 -0
  899. data/lib/wp/wp-includes/default-filters.php +307 -0
  900. data/lib/wp/wp-includes/default-widgets.php +1423 -0
  901. data/lib/wp/wp-includes/deprecated.php +3501 -0
  902. data/lib/wp/wp-includes/feed-atom-comments.php +115 -0
  903. data/lib/wp/wp-includes/feed-atom.php +87 -0
  904. data/lib/wp/wp-includes/feed-rdf.php +81 -0
  905. data/lib/wp/wp-includes/feed-rss.php +46 -0
  906. data/lib/wp/wp-includes/feed-rss2-comments.php +97 -0
  907. data/lib/wp/wp-includes/feed-rss2.php +115 -0
  908. data/lib/wp/wp-includes/feed.php +659 -0
  909. data/lib/wp/wp-includes/fonts/dashicons.eot +0 -0
  910. data/lib/wp/wp-includes/fonts/dashicons.svg +250 -0
  911. data/lib/wp/wp-includes/fonts/dashicons.ttf +0 -0
  912. data/lib/wp/wp-includes/fonts/dashicons.woff +0 -0
  913. data/lib/wp/wp-includes/formatting.php +4006 -0
  914. data/lib/wp/wp-includes/functions.php +4631 -0
  915. data/lib/wp/wp-includes/functions.wp-scripts.php +258 -0
  916. data/lib/wp/wp-includes/functions.wp-styles.php +245 -0
  917. data/lib/wp/wp-includes/general-template.php +2982 -0
  918. data/lib/wp/wp-includes/http.php +551 -0
  919. data/lib/wp/wp-includes/images/admin-bar-sprite-2x.png +0 -0
  920. data/lib/wp/wp-includes/images/admin-bar-sprite.png +0 -0
  921. data/lib/wp/wp-includes/images/arrow-pointer-blue-2x.png +0 -0
  922. data/lib/wp/wp-includes/images/arrow-pointer-blue.png +0 -0
  923. data/lib/wp/wp-includes/images/blank.gif +0 -0
  924. data/lib/wp/wp-includes/images/crystal/archive.png +0 -0
  925. data/lib/wp/wp-includes/images/crystal/audio.png +0 -0
  926. data/lib/wp/wp-includes/images/crystal/code.png +0 -0
  927. data/lib/wp/wp-includes/images/crystal/default.png +0 -0
  928. data/lib/wp/wp-includes/images/crystal/document.png +0 -0
  929. data/lib/wp/wp-includes/images/crystal/interactive.png +0 -0
  930. data/lib/wp/wp-includes/images/crystal/license.txt +9 -0
  931. data/lib/wp/wp-includes/images/crystal/spreadsheet.png +0 -0
  932. data/lib/wp/wp-includes/images/crystal/text.png +0 -0
  933. data/lib/wp/wp-includes/images/crystal/video.png +0 -0
  934. data/lib/wp/wp-includes/images/down_arrow-2x.gif +0 -0
  935. data/lib/wp/wp-includes/images/down_arrow.gif +0 -0
  936. data/lib/wp/wp-includes/images/icon-pointer-flag-2x.png +0 -0
  937. data/lib/wp/wp-includes/images/icon-pointer-flag.png +0 -0
  938. data/lib/wp/wp-includes/images/media/archive.png +0 -0
  939. data/lib/wp/wp-includes/images/media/audio.png +0 -0
  940. data/lib/wp/wp-includes/images/media/code.png +0 -0
  941. data/lib/wp/wp-includes/images/media/default.png +0 -0
  942. data/lib/wp/wp-includes/images/media/document.png +0 -0
  943. data/lib/wp/wp-includes/images/media/interactive.png +0 -0
  944. data/lib/wp/wp-includes/images/media/spreadsheet.png +0 -0
  945. data/lib/wp/wp-includes/images/media/text.png +0 -0
  946. data/lib/wp/wp-includes/images/media/video.png +0 -0
  947. data/lib/wp/wp-includes/images/rss-2x.png +0 -0
  948. data/lib/wp/wp-includes/images/rss.png +0 -0
  949. data/lib/wp/wp-includes/images/smilies/icon_arrow.gif +0 -0
  950. data/lib/wp/wp-includes/images/smilies/icon_biggrin.gif +0 -0
  951. data/lib/wp/wp-includes/images/smilies/icon_confused.gif +0 -0
  952. data/lib/wp/wp-includes/images/smilies/icon_cool.gif +0 -0
  953. data/lib/wp/wp-includes/images/smilies/icon_cry.gif +0 -0
  954. data/lib/wp/wp-includes/images/smilies/icon_eek.gif +0 -0
  955. data/lib/wp/wp-includes/images/smilies/icon_evil.gif +0 -0
  956. data/lib/wp/wp-includes/images/smilies/icon_exclaim.gif +0 -0
  957. data/lib/wp/wp-includes/images/smilies/icon_idea.gif +0 -0
  958. data/lib/wp/wp-includes/images/smilies/icon_lol.gif +0 -0
  959. data/lib/wp/wp-includes/images/smilies/icon_mad.gif +0 -0
  960. data/lib/wp/wp-includes/images/smilies/icon_mrgreen.gif +0 -0
  961. data/lib/wp/wp-includes/images/smilies/icon_neutral.gif +0 -0
  962. data/lib/wp/wp-includes/images/smilies/icon_question.gif +0 -0
  963. data/lib/wp/wp-includes/images/smilies/icon_razz.gif +0 -0
  964. data/lib/wp/wp-includes/images/smilies/icon_redface.gif +0 -0
  965. data/lib/wp/wp-includes/images/smilies/icon_rolleyes.gif +0 -0
  966. data/lib/wp/wp-includes/images/smilies/icon_sad.gif +0 -0
  967. data/lib/wp/wp-includes/images/smilies/icon_smile.gif +0 -0
  968. data/lib/wp/wp-includes/images/smilies/icon_surprised.gif +0 -0
  969. data/lib/wp/wp-includes/images/smilies/icon_twisted.gif +0 -0
  970. data/lib/wp/wp-includes/images/smilies/icon_wink.gif +0 -0
  971. data/lib/wp/wp-includes/images/spinner-2x.gif +0 -0
  972. data/lib/wp/wp-includes/images/spinner.gif +0 -0
  973. data/lib/wp/wp-includes/images/toggle-arrow-2x.png +0 -0
  974. data/lib/wp/wp-includes/images/toggle-arrow.png +0 -0
  975. data/lib/wp/wp-includes/images/uploader-icons-2x.png +0 -0
  976. data/lib/wp/wp-includes/images/uploader-icons.png +0 -0
  977. data/lib/wp/wp-includes/images/wlw/wp-comments.png +0 -0
  978. data/lib/wp/wp-includes/images/wlw/wp-icon.png +0 -0
  979. data/lib/wp/wp-includes/images/wlw/wp-watermark.png +0 -0
  980. data/lib/wp/wp-includes/images/wpicons-2x.png +0 -0
  981. data/lib/wp/wp-includes/images/wpicons.png +0 -0
  982. data/lib/wp/wp-includes/images/wpspin-2x.gif +0 -0
  983. data/lib/wp/wp-includes/images/wpspin.gif +0 -0
  984. data/lib/wp/wp-includes/images/xit-2x.gif +0 -0
  985. data/lib/wp/wp-includes/images/xit.gif +0 -0
  986. data/lib/wp/wp-includes/js/admin-bar.js +365 -0
  987. data/lib/wp/wp-includes/js/admin-bar.min.js +1 -0
  988. data/lib/wp/wp-includes/js/autosave.js +589 -0
  989. data/lib/wp/wp-includes/js/autosave.min.js +1 -0
  990. data/lib/wp/wp-includes/js/backbone.min.js +1 -0
  991. data/lib/wp/wp-includes/js/colorpicker.js +707 -0
  992. data/lib/wp/wp-includes/js/colorpicker.min.js +1 -0
  993. data/lib/wp/wp-includes/js/comment-reply.js +47 -0
  994. data/lib/wp/wp-includes/js/comment-reply.min.js +1 -0
  995. data/lib/wp/wp-includes/js/crop/cropper.css +165 -0
  996. data/lib/wp/wp-includes/js/crop/cropper.js +516 -0
  997. data/lib/wp/wp-includes/js/crop/marqueeHoriz.gif +0 -0
  998. data/lib/wp/wp-includes/js/crop/marqueeVert.gif +0 -0
  999. data/lib/wp/wp-includes/js/customize-base.js +617 -0
  1000. data/lib/wp/wp-includes/js/customize-base.min.js +1 -0
  1001. data/lib/wp/wp-includes/js/customize-loader.js +246 -0
  1002. data/lib/wp/wp-includes/js/customize-loader.min.js +1 -0
  1003. data/lib/wp/wp-includes/js/customize-models.js +247 -0
  1004. data/lib/wp/wp-includes/js/customize-models.min.js +1 -0
  1005. data/lib/wp/wp-includes/js/customize-preview-widgets.js +129 -0
  1006. data/lib/wp/wp-includes/js/customize-preview-widgets.min.js +1 -0
  1007. data/lib/wp/wp-includes/js/customize-preview.js +154 -0
  1008. data/lib/wp/wp-includes/js/customize-preview.min.js +1 -0
  1009. data/lib/wp/wp-includes/js/customize-views.js +231 -0
  1010. data/lib/wp/wp-includes/js/customize-views.min.js +1 -0
  1011. data/lib/wp/wp-includes/js/heartbeat.js +738 -0
  1012. data/lib/wp/wp-includes/js/heartbeat.min.js +1 -0
  1013. data/lib/wp/wp-includes/js/hoverIntent.js +115 -0
  1014. data/lib/wp/wp-includes/js/hoverIntent.min.js +1 -0
  1015. data/lib/wp/wp-includes/js/imgareaselect/border-anim-h.gif +0 -0
  1016. data/lib/wp/wp-includes/js/imgareaselect/border-anim-v.gif +0 -0
  1017. data/lib/wp/wp-includes/js/imgareaselect/imgareaselect.css +41 -0
  1018. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js +1205 -0
  1019. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js +1 -0
  1020. data/lib/wp/wp-includes/js/jcrop/Jcrop.gif +0 -0
  1021. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.css +29 -0
  1022. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.js +22 -0
  1023. data/lib/wp/wp-includes/js/jquery/jquery-migrate.js +521 -0
  1024. data/lib/wp/wp-includes/js/jquery/jquery-migrate.min.js +2 -0
  1025. data/lib/wp/wp-includes/js/jquery/jquery.color.min.js +2 -0
  1026. data/lib/wp/wp-includes/js/jquery/jquery.form.js +1193 -0
  1027. data/lib/wp/wp-includes/js/jquery/jquery.form.min.js +11 -0
  1028. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.js +134 -0
  1029. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.min.js +1 -0
  1030. data/lib/wp/wp-includes/js/jquery/jquery.js +5 -0
  1031. data/lib/wp/wp-includes/js/jquery/jquery.masonry.min.js +11 -0
  1032. data/lib/wp/wp-includes/js/jquery/jquery.query.js +11 -0
  1033. data/lib/wp/wp-includes/js/jquery/jquery.schedule.js +36 -0
  1034. data/lib/wp/wp-includes/js/jquery/jquery.serialize-object.js +31 -0
  1035. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.js +99 -0
  1036. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.min.js +1 -0
  1037. data/lib/wp/wp-includes/js/jquery/jquery.ui.touch-punch.js +11 -0
  1038. data/lib/wp/wp-includes/js/jquery/suggest.js +316 -0
  1039. data/lib/wp/wp-includes/js/jquery/suggest.min.js +1 -0
  1040. data/lib/wp/wp-includes/js/jquery/ui/accordion.min.js +11 -0
  1041. data/lib/wp/wp-includes/js/jquery/ui/autocomplete.min.js +11 -0
  1042. data/lib/wp/wp-includes/js/jquery/ui/button.min.js +11 -0
  1043. data/lib/wp/wp-includes/js/jquery/ui/core.min.js +11 -0
  1044. data/lib/wp/wp-includes/js/jquery/ui/datepicker.min.js +12 -0
  1045. data/lib/wp/wp-includes/js/jquery/ui/dialog.min.js +11 -0
  1046. data/lib/wp/wp-includes/js/jquery/ui/draggable.min.js +11 -0
  1047. data/lib/wp/wp-includes/js/jquery/ui/droppable.min.js +11 -0
  1048. data/lib/wp/wp-includes/js/jquery/ui/effect-blind.min.js +11 -0
  1049. data/lib/wp/wp-includes/js/jquery/ui/effect-bounce.min.js +11 -0
  1050. data/lib/wp/wp-includes/js/jquery/ui/effect-clip.min.js +11 -0
  1051. data/lib/wp/wp-includes/js/jquery/ui/effect-drop.min.js +11 -0
  1052. data/lib/wp/wp-includes/js/jquery/ui/effect-explode.min.js +11 -0
  1053. data/lib/wp/wp-includes/js/jquery/ui/effect-fade.min.js +11 -0
  1054. data/lib/wp/wp-includes/js/jquery/ui/effect-fold.min.js +11 -0
  1055. data/lib/wp/wp-includes/js/jquery/ui/effect-highlight.min.js +11 -0
  1056. data/lib/wp/wp-includes/js/jquery/ui/effect-puff.min.js +11 -0
  1057. data/lib/wp/wp-includes/js/jquery/ui/effect-pulsate.min.js +11 -0
  1058. data/lib/wp/wp-includes/js/jquery/ui/effect-scale.min.js +11 -0
  1059. data/lib/wp/wp-includes/js/jquery/ui/effect-shake.min.js +11 -0
  1060. data/lib/wp/wp-includes/js/jquery/ui/effect-size.min.js +11 -0
  1061. data/lib/wp/wp-includes/js/jquery/ui/effect-slide.min.js +11 -0
  1062. data/lib/wp/wp-includes/js/jquery/ui/effect-transfer.min.js +11 -0
  1063. data/lib/wp/wp-includes/js/jquery/ui/effect.min.js +21 -0
  1064. data/lib/wp/wp-includes/js/jquery/ui/menu.min.js +11 -0
  1065. data/lib/wp/wp-includes/js/jquery/ui/mouse.min.js +11 -0
  1066. data/lib/wp/wp-includes/js/jquery/ui/position.min.js +11 -0
  1067. data/lib/wp/wp-includes/js/jquery/ui/progressbar.min.js +11 -0
  1068. data/lib/wp/wp-includes/js/jquery/ui/resizable.min.js +11 -0
  1069. data/lib/wp/wp-includes/js/jquery/ui/selectable.min.js +11 -0
  1070. data/lib/wp/wp-includes/js/jquery/ui/selectmenu.min.js +11 -0
  1071. data/lib/wp/wp-includes/js/jquery/ui/slider.min.js +11 -0
  1072. data/lib/wp/wp-includes/js/jquery/ui/sortable.min.js +11 -0
  1073. data/lib/wp/wp-includes/js/jquery/ui/spinner.min.js +11 -0
  1074. data/lib/wp/wp-includes/js/jquery/ui/tabs.min.js +11 -0
  1075. data/lib/wp/wp-includes/js/jquery/ui/tooltip.min.js +11 -0
  1076. data/lib/wp/wp-includes/js/jquery/ui/widget.min.js +11 -0
  1077. data/lib/wp/wp-includes/js/json2.js +480 -0
  1078. data/lib/wp/wp-includes/js/json2.min.js +1 -0
  1079. data/lib/wp/wp-includes/js/masonry.min.js +1 -0
  1080. data/lib/wp/wp-includes/js/mce-view.js +829 -0
  1081. data/lib/wp/wp-includes/js/mce-view.min.js +1 -0
  1082. data/lib/wp/wp-includes/js/media-audiovideo.js +831 -0
  1083. data/lib/wp/wp-includes/js/media-audiovideo.min.js +1 -0
  1084. data/lib/wp/wp-includes/js/media-editor.js +1114 -0
  1085. data/lib/wp/wp-includes/js/media-editor.min.js +1 -0
  1086. data/lib/wp/wp-includes/js/media-grid.js +732 -0
  1087. data/lib/wp/wp-includes/js/media-grid.min.js +1 -0
  1088. data/lib/wp/wp-includes/js/media-models.js +1362 -0
  1089. data/lib/wp/wp-includes/js/media-models.min.js +1 -0
  1090. data/lib/wp/wp-includes/js/media-views.js +7484 -0
  1091. data/lib/wp/wp-includes/js/media-views.min.js +3 -0
  1092. data/lib/wp/wp-includes/js/mediaelement/background.png +0 -0
  1093. data/lib/wp/wp-includes/js/mediaelement/bigplay.png +0 -0
  1094. data/lib/wp/wp-includes/js/mediaelement/bigplay.svg +1 -0
  1095. data/lib/wp/wp-includes/js/mediaelement/controls.png +0 -0
  1096. data/lib/wp/wp-includes/js/mediaelement/controls.svg +1 -0
  1097. data/lib/wp/wp-includes/js/mediaelement/flashmediaelement.swf +0 -0
  1098. data/lib/wp/wp-includes/js/mediaelement/loading.gif +0 -0
  1099. data/lib/wp/wp-includes/js/mediaelement/mediaelement-and-player.min.js +181 -0
  1100. data/lib/wp/wp-includes/js/mediaelement/mediaelementplayer.min.css +1 -0
  1101. data/lib/wp/wp-includes/js/mediaelement/silverlightmediaelement.xap +0 -0
  1102. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.css +274 -0
  1103. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.js +34 -0
  1104. data/lib/wp/wp-includes/js/mediaelement/wp-playlist.js +175 -0
  1105. data/lib/wp/wp-includes/js/plupload/handlers.js +488 -0
  1106. data/lib/wp/wp-includes/js/plupload/handlers.min.js +1 -0
  1107. data/lib/wp/wp-includes/js/plupload/license.txt +339 -0
  1108. data/lib/wp/wp-includes/js/plupload/plupload.flash.swf +0 -0
  1109. data/lib/wp/wp-includes/js/plupload/plupload.full.min.js +28 -0
  1110. data/lib/wp/wp-includes/js/plupload/plupload.silverlight.xap +0 -0
  1111. data/lib/wp/wp-includes/js/plupload/wp-plupload.js +376 -0
  1112. data/lib/wp/wp-includes/js/plupload/wp-plupload.min.js +1 -0
  1113. data/lib/wp/wp-includes/js/quicktags.js +652 -0
  1114. data/lib/wp/wp-includes/js/quicktags.min.js +1 -0
  1115. data/lib/wp/wp-includes/js/shortcode.js +356 -0
  1116. data/lib/wp/wp-includes/js/shortcode.min.js +1 -0
  1117. data/lib/wp/wp-includes/js/swfobject.js +4 -0
  1118. data/lib/wp/wp-includes/js/swfupload/handlers.js +376 -0
  1119. data/lib/wp/wp-includes/js/swfupload/handlers.min.js +1 -0
  1120. data/lib/wp/wp-includes/js/swfupload/license.txt +32 -0
  1121. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.cookies.js +53 -0
  1122. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.queue.js +98 -0
  1123. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.speed.js +342 -0
  1124. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.swfobject.js +105 -0
  1125. data/lib/wp/wp-includes/js/swfupload/swfupload.js +980 -0
  1126. data/lib/wp/wp-includes/js/swfupload/swfupload.swf +0 -0
  1127. data/lib/wp/wp-includes/js/thickbox/loadingAnimation.gif +0 -0
  1128. data/lib/wp/wp-includes/js/thickbox/macFFBgHack.png +0 -0
  1129. data/lib/wp/wp-includes/js/thickbox/thickbox.css +138 -0
  1130. data/lib/wp/wp-includes/js/thickbox/thickbox.js +314 -0
  1131. data/lib/wp/wp-includes/js/tinymce/langs/wp-langs-en.js +519 -0
  1132. data/lib/wp/wp-includes/js/tinymce/license.txt +504 -0
  1133. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.js +370 -0
  1134. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.min.js +1 -0
  1135. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.js +112 -0
  1136. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.min.js +1 -0
  1137. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css +212 -0
  1138. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.js +304 -0
  1139. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js +1 -0
  1140. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.js +64 -0
  1141. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.min.js +1 -0
  1142. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.js +136 -0
  1143. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  1144. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.js +30 -0
  1145. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.min.js +1 -0
  1146. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.js +450 -0
  1147. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.min.js +1 -0
  1148. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.js +786 -0
  1149. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.min.js +1 -0
  1150. data/lib/wp/wp-includes/js/tinymce/plugins/media/moxieplayer.swf +0 -0
  1151. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.js +774 -0
  1152. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.min.js +1 -0
  1153. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.js +1553 -0
  1154. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.min.js +1 -0
  1155. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.js +125 -0
  1156. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js +1 -0
  1157. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.js +272 -0
  1158. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js +1 -0
  1159. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.js +513 -0
  1160. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js +1 -0
  1161. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js +207 -0
  1162. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js +1 -0
  1163. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js +92 -0
  1164. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js +1 -0
  1165. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +1035 -0
  1166. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js +1 -0
  1167. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js +78 -0
  1168. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.min.js +1 -0
  1169. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.js +130 -0
  1170. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.min.js +1 -0
  1171. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.js +63 -0
  1172. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.min.js +1 -0
  1173. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.js +694 -0
  1174. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +1 -0
  1175. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css +1 -0
  1176. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.min.css +1 -0
  1177. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md +1 -0
  1178. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  1179. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +62 -0
  1180. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  1181. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  1182. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  1183. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg +63 -0
  1184. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  1185. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  1186. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
  1187. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/loader.gif +0 -0
  1188. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/object.gif +0 -0
  1189. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/trans.gif +0 -0
  1190. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  1191. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.min.css +1 -0
  1192. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/audio.png +0 -0
  1193. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png +0 -0
  1194. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png +0 -0
  1195. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/embedded.png +0 -0
  1196. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery-2x.png +0 -0
  1197. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery.png +0 -0
  1198. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more-2x.png +0 -0
  1199. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more.png +0 -0
  1200. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak-2x.png +0 -0
  1201. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak.png +0 -0
  1202. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-audio.png +0 -0
  1203. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-video.png +0 -0
  1204. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/video.png +0 -0
  1205. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/wp-content.css +618 -0
  1206. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.js +617 -0
  1207. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.min.js +1 -0
  1208. data/lib/wp/wp-includes/js/tinymce/tiny_mce_popup.js +539 -0
  1209. data/lib/wp/wp-includes/js/tinymce/tinymce.min.js +11 -0
  1210. data/lib/wp/wp-includes/js/tinymce/utils/editable_selects.js +70 -0
  1211. data/lib/wp/wp-includes/js/tinymce/utils/form_utils.js +210 -0
  1212. data/lib/wp/wp-includes/js/tinymce/utils/mctabs.js +164 -0
  1213. data/lib/wp/wp-includes/js/tinymce/utils/validate.js +252 -0
  1214. data/lib/wp/wp-includes/js/tinymce/wp-mce-help.php +145 -0
  1215. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.js.gz +0 -0
  1216. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.php +39 -0
  1217. data/lib/wp/wp-includes/js/tw-sack.js +193 -0
  1218. data/lib/wp/wp-includes/js/tw-sack.min.js +1 -0
  1219. data/lib/wp/wp-includes/js/underscore.min.js +1 -0
  1220. data/lib/wp/wp-includes/js/utils.js +197 -0
  1221. data/lib/wp/wp-includes/js/utils.min.js +1 -0
  1222. data/lib/wp/wp-includes/js/wp-ajax-response.js +64 -0
  1223. data/lib/wp/wp-includes/js/wp-ajax-response.min.js +1 -0
  1224. data/lib/wp/wp-includes/js/wp-auth-check.js +112 -0
  1225. data/lib/wp/wp-includes/js/wp-auth-check.min.js +1 -0
  1226. data/lib/wp/wp-includes/js/wp-backbone.js +386 -0
  1227. data/lib/wp/wp-includes/js/wp-backbone.min.js +1 -0
  1228. data/lib/wp/wp-includes/js/wp-list-revisions.js +24 -0
  1229. data/lib/wp/wp-includes/js/wp-list-revisions.min.js +1 -0
  1230. data/lib/wp/wp-includes/js/wp-lists.js +469 -0
  1231. data/lib/wp/wp-includes/js/wp-lists.min.js +1 -0
  1232. data/lib/wp/wp-includes/js/wp-pointer.js +282 -0
  1233. data/lib/wp/wp-includes/js/wp-pointer.min.js +1 -0
  1234. data/lib/wp/wp-includes/js/wp-util.js +106 -0
  1235. data/lib/wp/wp-includes/js/wp-util.min.js +1 -0
  1236. data/lib/wp/wp-includes/js/wpdialog.js +19 -0
  1237. data/lib/wp/wp-includes/js/wpdialog.min.js +1 -0
  1238. data/lib/wp/wp-includes/js/wplink.js +615 -0
  1239. data/lib/wp/wp-includes/js/wplink.min.js +1 -0
  1240. data/lib/wp/wp-includes/js/zxcvbn-async.js +18 -0
  1241. data/lib/wp/wp-includes/js/zxcvbn-async.min.js +1 -0
  1242. data/lib/wp/wp-includes/js/zxcvbn.min.js +47 -0
  1243. data/lib/wp/wp-includes/kses.php +1526 -0
  1244. data/lib/wp/wp-includes/l10n.php +908 -0
  1245. data/lib/wp/wp-includes/link-template.php +3141 -0
  1246. data/lib/wp/wp-includes/load.php +828 -0
  1247. data/lib/wp/wp-includes/locale.php +368 -0
  1248. data/lib/wp/wp-includes/media-template.php +1235 -0
  1249. data/lib/wp/wp-includes/media.php +3329 -0
  1250. data/lib/wp/wp-includes/meta.php +1221 -0
  1251. data/lib/wp/wp-includes/ms-blogs.php +939 -0
  1252. data/lib/wp/wp-includes/ms-default-constants.php +153 -0
  1253. data/lib/wp/wp-includes/ms-default-filters.php +82 -0
  1254. data/lib/wp/wp-includes/ms-deprecated.php +347 -0
  1255. data/lib/wp/wp-includes/ms-files.php +82 -0
  1256. data/lib/wp/wp-includes/ms-functions.php +2476 -0
  1257. data/lib/wp/wp-includes/ms-load.php +458 -0
  1258. data/lib/wp/wp-includes/ms-settings.php +213 -0
  1259. data/lib/wp/wp-includes/nav-menu-template.php +678 -0
  1260. data/lib/wp/wp-includes/nav-menu.php +895 -0
  1261. data/lib/wp/wp-includes/option.php +1440 -0
  1262. data/lib/wp/wp-includes/pluggable-deprecated.php +192 -0
  1263. data/lib/wp/wp-includes/pluggable.php +2283 -0
  1264. data/lib/wp/wp-includes/plugin.php +920 -0
  1265. data/lib/wp/wp-includes/pomo/entry.php +78 -0
  1266. data/lib/wp/wp-includes/pomo/mo.php +262 -0
  1267. data/lib/wp/wp-includes/pomo/po.php +384 -0
  1268. data/lib/wp/wp-includes/pomo/streams.php +209 -0
  1269. data/lib/wp/wp-includes/pomo/translations.php +275 -0
  1270. data/lib/wp/wp-includes/post-formats.php +243 -0
  1271. data/lib/wp/wp-includes/post-template.php +1766 -0
  1272. data/lib/wp/wp-includes/post-thumbnail-template.php +142 -0
  1273. data/lib/wp/wp-includes/post.php +5842 -0
  1274. data/lib/wp/wp-includes/query.php +4666 -0
  1275. data/lib/wp/wp-includes/registration-functions.php +7 -0
  1276. data/lib/wp/wp-includes/registration.php +7 -0
  1277. data/lib/wp/wp-includes/revision.php +657 -0
  1278. data/lib/wp/wp-includes/rewrite.php +2180 -0
  1279. data/lib/wp/wp-includes/rss-functions.php +9 -0
  1280. data/lib/wp/wp-includes/rss.php +936 -0
  1281. data/lib/wp/wp-includes/script-loader.php +1045 -0
  1282. data/lib/wp/wp-includes/session.php +430 -0
  1283. data/lib/wp/wp-includes/shortcodes.php +410 -0
  1284. data/lib/wp/wp-includes/taxonomy.php +4006 -0
  1285. data/lib/wp/wp-includes/template-loader.php +76 -0
  1286. data/lib/wp/wp-includes/template.php +505 -0
  1287. data/lib/wp/wp-includes/theme-compat/comments-popup.php +128 -0
  1288. data/lib/wp/wp-includes/theme-compat/comments.php +101 -0
  1289. data/lib/wp/wp-includes/theme-compat/footer.php +30 -0
  1290. data/lib/wp/wp-includes/theme-compat/header.php +49 -0
  1291. data/lib/wp/wp-includes/theme-compat/sidebar.php +83 -0
  1292. data/lib/wp/wp-includes/theme.php +2014 -0
  1293. data/lib/wp/wp-includes/update.php +674 -0
  1294. data/lib/wp/wp-includes/user.php +2292 -0
  1295. data/lib/wp/wp-includes/vars.php +144 -0
  1296. data/lib/wp/wp-includes/version.php +35 -0
  1297. data/lib/wp/wp-includes/widgets.php +1514 -0
  1298. data/lib/wp/wp-includes/wlwmanifest.xml +43 -0
  1299. data/lib/wp/wp-includes/wp-db.php +2190 -0
  1300. data/lib/wp/wp-includes/wp-diff.php +523 -0
  1301. data/lib/wp/wp-links-opml.php +80 -0
  1302. data/lib/wp/wp-load.php +73 -0
  1303. data/lib/wp/wp-login.php +952 -0
  1304. data/lib/wp/wp-mail.php +260 -0
  1305. data/lib/wp/wp-settings.php +374 -0
  1306. data/lib/wp/wp-signup.php +749 -0
  1307. data/lib/wp/wp-trackback.php +127 -0
  1308. data/lib/wp/xmlrpc.php +101 -0
  1309. data/stump-cli.gemspec +26 -0
  1310. metadata +1332 -4
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+
3
+ <manifest xmlns="http://schemas.microsoft.com/wlw/manifest/weblog">
4
+
5
+ <options>
6
+ <clientType>WordPress</clientType>
7
+ <supportsKeywords>Yes</supportsKeywords>
8
+ <supportsGetTags>Yes</supportsGetTags>
9
+ </options>
10
+
11
+ <weblog>
12
+ <serviceName>WordPress</serviceName>
13
+ <imageUrl>images/wlw/wp-icon.png</imageUrl>
14
+ <watermarkImageUrl>images/wlw/wp-watermark.png</watermarkImageUrl>
15
+ <homepageLinkText>View site</homepageLinkText>
16
+ <adminLinkText>Dashboard</adminLinkText>
17
+ <adminUrl>
18
+ <![CDATA[
19
+ {blog-postapi-url}/../wp-admin/
20
+ ]]>
21
+ </adminUrl>
22
+ <postEditingUrl>
23
+ <![CDATA[
24
+ {blog-postapi-url}/../wp-admin/post.php?action=edit&post={post-id}
25
+ ]]>
26
+ </postEditingUrl>
27
+ </weblog>
28
+
29
+ <buttons>
30
+ <button>
31
+ <id>0</id>
32
+ <text>Manage Comments</text>
33
+ <imageUrl>images/wlw/wp-comments.png</imageUrl>
34
+ <clickUrl>
35
+ <![CDATA[
36
+ {blog-postapi-url}/../wp-admin/edit-comments.php
37
+ ]]>
38
+ </clickUrl>
39
+ </button>
40
+
41
+ </buttons>
42
+
43
+ </manifest>
@@ -0,0 +1,2190 @@
1
+ <?php
2
+ /**
3
+ * WordPress DB Class
4
+ *
5
+ * Original code from {@link http://php.justinvincent.com Justin Vincent (justin@visunet.ie)}
6
+ *
7
+ * @package WordPress
8
+ * @subpackage Database
9
+ * @since 0.71
10
+ */
11
+
12
+ /**
13
+ * @since 0.71
14
+ */
15
+ define( 'EZSQL_VERSION', 'WP1.25' );
16
+
17
+ /**
18
+ * @since 0.71
19
+ */
20
+ define( 'OBJECT', 'OBJECT' );
21
+ define( 'object', 'OBJECT' ); // Back compat.
22
+
23
+ /**
24
+ * @since 2.5.0
25
+ */
26
+ define( 'OBJECT_K', 'OBJECT_K' );
27
+
28
+ /**
29
+ * @since 0.71
30
+ */
31
+ define( 'ARRAY_A', 'ARRAY_A' );
32
+
33
+ /**
34
+ * @since 0.71
35
+ */
36
+ define( 'ARRAY_N', 'ARRAY_N' );
37
+
38
+ /**
39
+ * WordPress Database Access Abstraction Object
40
+ *
41
+ * It is possible to replace this class with your own
42
+ * by setting the $wpdb global variable in wp-content/db.php
43
+ * file to your class. The wpdb class will still be included,
44
+ * so you can extend it or simply use your own.
45
+ *
46
+ * @link http://codex.wordpress.org/Function_Reference/wpdb_Class
47
+ *
48
+ * @package WordPress
49
+ * @subpackage Database
50
+ * @since 0.71
51
+ */
52
+ class wpdb {
53
+
54
+ /**
55
+ * Whether to show SQL/DB errors.
56
+ *
57
+ * Default behavior is to show errors if both WP_DEBUG and WP_DEBUG_DISPLAY
58
+ * evaluated to true.
59
+ *
60
+ * @since 0.71
61
+ * @access private
62
+ * @var bool
63
+ */
64
+ var $show_errors = false;
65
+
66
+ /**
67
+ * Whether to suppress errors during the DB bootstrapping.
68
+ *
69
+ * @access private
70
+ * @since 2.5.0
71
+ * @var bool
72
+ */
73
+ var $suppress_errors = false;
74
+
75
+ /**
76
+ * The last error during query.
77
+ *
78
+ * @since 2.5.0
79
+ * @var string
80
+ */
81
+ public $last_error = '';
82
+
83
+ /**
84
+ * Amount of queries made
85
+ *
86
+ * @since 1.2.0
87
+ * @access private
88
+ * @var int
89
+ */
90
+ var $num_queries = 0;
91
+
92
+ /**
93
+ * Count of rows returned by previous query
94
+ *
95
+ * @since 0.71
96
+ * @access private
97
+ * @var int
98
+ */
99
+ var $num_rows = 0;
100
+
101
+ /**
102
+ * Count of affected rows by previous query
103
+ *
104
+ * @since 0.71
105
+ * @access private
106
+ * @var int
107
+ */
108
+ var $rows_affected = 0;
109
+
110
+ /**
111
+ * The ID generated for an AUTO_INCREMENT column by the previous query (usually INSERT).
112
+ *
113
+ * @since 0.71
114
+ * @access public
115
+ * @var int
116
+ */
117
+ var $insert_id = 0;
118
+
119
+ /**
120
+ * Last query made
121
+ *
122
+ * @since 0.71
123
+ * @access private
124
+ * @var array
125
+ */
126
+ var $last_query;
127
+
128
+ /**
129
+ * Results of the last query made
130
+ *
131
+ * @since 0.71
132
+ * @access private
133
+ * @var array|null
134
+ */
135
+ var $last_result;
136
+
137
+ /**
138
+ * MySQL result, which is either a resource or boolean.
139
+ *
140
+ * @since 0.71
141
+ * @access protected
142
+ * @var mixed
143
+ */
144
+ protected $result;
145
+
146
+ /**
147
+ * Saved info on the table column
148
+ *
149
+ * @since 0.71
150
+ * @access protected
151
+ * @var array
152
+ */
153
+ protected $col_info;
154
+
155
+ /**
156
+ * Saved queries that were executed
157
+ *
158
+ * @since 1.5.0
159
+ * @access private
160
+ * @var array
161
+ */
162
+ var $queries;
163
+
164
+ /**
165
+ * The number of times to retry reconnecting before dying.
166
+ *
167
+ * @since 3.9.0
168
+ * @access protected
169
+ * @see wpdb::check_connection()
170
+ * @var int
171
+ */
172
+ protected $reconnect_retries = 5;
173
+
174
+ /**
175
+ * WordPress table prefix
176
+ *
177
+ * You can set this to have multiple WordPress installations
178
+ * in a single database. The second reason is for possible
179
+ * security precautions.
180
+ *
181
+ * @since 2.5.0
182
+ * @access private
183
+ * @var string
184
+ */
185
+ var $prefix = '';
186
+
187
+ /**
188
+ * WordPress base table prefix.
189
+ *
190
+ * @since 3.0.0
191
+ * @access public
192
+ * @var string
193
+ */
194
+ public $base_prefix;
195
+
196
+ /**
197
+ * Whether the database queries are ready to start executing.
198
+ *
199
+ * @since 2.3.2
200
+ * @access private
201
+ * @var bool
202
+ */
203
+ var $ready = false;
204
+
205
+ /**
206
+ * {@internal Missing Description}}
207
+ *
208
+ * @since 3.0.0
209
+ * @access public
210
+ * @var int
211
+ */
212
+ public $blogid = 0;
213
+
214
+ /**
215
+ * {@internal Missing Description}}
216
+ *
217
+ * @since 3.0.0
218
+ * @access public
219
+ * @var int
220
+ */
221
+ public $siteid = 0;
222
+
223
+ /**
224
+ * List of WordPress per-blog tables
225
+ *
226
+ * @since 2.5.0
227
+ * @access private
228
+ * @see wpdb::tables()
229
+ * @var array
230
+ */
231
+ var $tables = array( 'posts', 'comments', 'links', 'options', 'postmeta',
232
+ 'terms', 'term_taxonomy', 'term_relationships', 'commentmeta' );
233
+
234
+ /**
235
+ * List of deprecated WordPress tables
236
+ *
237
+ * categories, post2cat, and link2cat were deprecated in 2.3.0, db version 5539
238
+ *
239
+ * @since 2.9.0
240
+ * @access private
241
+ * @see wpdb::tables()
242
+ * @var array
243
+ */
244
+ var $old_tables = array( 'categories', 'post2cat', 'link2cat' );
245
+
246
+ /**
247
+ * List of WordPress global tables
248
+ *
249
+ * @since 3.0.0
250
+ * @access private
251
+ * @see wpdb::tables()
252
+ * @var array
253
+ */
254
+ var $global_tables = array( 'users', 'usermeta' );
255
+
256
+ /**
257
+ * List of Multisite global tables
258
+ *
259
+ * @since 3.0.0
260
+ * @access private
261
+ * @see wpdb::tables()
262
+ * @var array
263
+ */
264
+ var $ms_global_tables = array( 'blogs', 'signups', 'site', 'sitemeta',
265
+ 'sitecategories', 'registration_log', 'blog_versions' );
266
+
267
+ /**
268
+ * WordPress Comments table
269
+ *
270
+ * @since 1.5.0
271
+ * @access public
272
+ * @var string
273
+ */
274
+ public $comments;
275
+
276
+ /**
277
+ * WordPress Comment Metadata table
278
+ *
279
+ * @since 2.9.0
280
+ * @access public
281
+ * @var string
282
+ */
283
+ public $commentmeta;
284
+
285
+ /**
286
+ * WordPress Links table
287
+ *
288
+ * @since 1.5.0
289
+ * @access public
290
+ * @var string
291
+ */
292
+ public $links;
293
+
294
+ /**
295
+ * WordPress Options table
296
+ *
297
+ * @since 1.5.0
298
+ * @access public
299
+ * @var string
300
+ */
301
+ public $options;
302
+
303
+ /**
304
+ * WordPress Post Metadata table
305
+ *
306
+ * @since 1.5.0
307
+ * @access public
308
+ * @var string
309
+ */
310
+ public $postmeta;
311
+
312
+ /**
313
+ * WordPress Posts table
314
+ *
315
+ * @since 1.5.0
316
+ * @access public
317
+ * @var string
318
+ */
319
+ public $posts;
320
+
321
+ /**
322
+ * WordPress Terms table
323
+ *
324
+ * @since 2.3.0
325
+ * @access public
326
+ * @var string
327
+ */
328
+ public $terms;
329
+
330
+ /**
331
+ * WordPress Term Relationships table
332
+ *
333
+ * @since 2.3.0
334
+ * @access public
335
+ * @var string
336
+ */
337
+ public $term_relationships;
338
+
339
+ /**
340
+ * WordPress Term Taxonomy table
341
+ *
342
+ * @since 2.3.0
343
+ * @access public
344
+ * @var string
345
+ */
346
+ public $term_taxonomy;
347
+
348
+ /*
349
+ * Global and Multisite tables
350
+ */
351
+
352
+ /**
353
+ * WordPress User Metadata table
354
+ *
355
+ * @since 2.3.0
356
+ * @access public
357
+ * @var string
358
+ */
359
+ public $usermeta;
360
+
361
+ /**
362
+ * WordPress Users table
363
+ *
364
+ * @since 1.5.0
365
+ * @access public
366
+ * @var string
367
+ */
368
+ public $users;
369
+
370
+ /**
371
+ * Multisite Blogs table
372
+ *
373
+ * @since 3.0.0
374
+ * @access public
375
+ * @var string
376
+ */
377
+ public $blogs;
378
+
379
+ /**
380
+ * Multisite Blog Versions table
381
+ *
382
+ * @since 3.0.0
383
+ * @access public
384
+ * @var string
385
+ */
386
+ public $blog_versions;
387
+
388
+ /**
389
+ * Multisite Registration Log table
390
+ *
391
+ * @since 3.0.0
392
+ * @access public
393
+ * @var string
394
+ */
395
+ public $registration_log;
396
+
397
+ /**
398
+ * Multisite Signups table
399
+ *
400
+ * @since 3.0.0
401
+ * @access public
402
+ * @var string
403
+ */
404
+ public $signups;
405
+
406
+ /**
407
+ * Multisite Sites table
408
+ *
409
+ * @since 3.0.0
410
+ * @access public
411
+ * @var string
412
+ */
413
+ public $site;
414
+
415
+ /**
416
+ * Multisite Sitewide Terms table
417
+ *
418
+ * @since 3.0.0
419
+ * @access public
420
+ * @var string
421
+ */
422
+ public $sitecategories;
423
+
424
+ /**
425
+ * Multisite Site Metadata table
426
+ *
427
+ * @since 3.0.0
428
+ * @access public
429
+ * @var string
430
+ */
431
+ public $sitemeta;
432
+
433
+ /**
434
+ * Format specifiers for DB columns. Columns not listed here default to %s. Initialized during WP load.
435
+ *
436
+ * Keys are column names, values are format types: 'ID' => '%d'
437
+ *
438
+ * @since 2.8.0
439
+ * @see wpdb::prepare()
440
+ * @see wpdb::insert()
441
+ * @see wpdb::update()
442
+ * @see wpdb::delete()
443
+ * @see wp_set_wpdb_vars()
444
+ * @access public
445
+ * @var array
446
+ */
447
+ public $field_types = array();
448
+
449
+ /**
450
+ * Database table columns charset
451
+ *
452
+ * @since 2.2.0
453
+ * @access public
454
+ * @var string
455
+ */
456
+ public $charset;
457
+
458
+ /**
459
+ * Database table columns collate
460
+ *
461
+ * @since 2.2.0
462
+ * @access public
463
+ * @var string
464
+ */
465
+ public $collate;
466
+
467
+ /**
468
+ * Database Username
469
+ *
470
+ * @since 2.9.0
471
+ * @access protected
472
+ * @var string
473
+ */
474
+ protected $dbuser;
475
+
476
+ /**
477
+ * Database Password
478
+ *
479
+ * @since 3.1.0
480
+ * @access protected
481
+ * @var string
482
+ */
483
+ protected $dbpassword;
484
+
485
+ /**
486
+ * Database Name
487
+ *
488
+ * @since 3.1.0
489
+ * @access protected
490
+ * @var string
491
+ */
492
+ protected $dbname;
493
+
494
+ /**
495
+ * Database Host
496
+ *
497
+ * @since 3.1.0
498
+ * @access protected
499
+ * @var string
500
+ */
501
+ protected $dbhost;
502
+
503
+ /**
504
+ * Database Handle
505
+ *
506
+ * @since 0.71
507
+ * @access protected
508
+ * @var string
509
+ */
510
+ protected $dbh;
511
+
512
+ /**
513
+ * A textual description of the last query/get_row/get_var call
514
+ *
515
+ * @since 3.0.0
516
+ * @access public
517
+ * @var string
518
+ */
519
+ public $func_call;
520
+
521
+ /**
522
+ * Whether MySQL is used as the database engine.
523
+ *
524
+ * Set in WPDB::db_connect() to true, by default. This is used when checking
525
+ * against the required MySQL version for WordPress. Normally, a replacement
526
+ * database drop-in (db.php) will skip these checks, but setting this to true
527
+ * will force the checks to occur.
528
+ *
529
+ * @since 3.3.0
530
+ * @access public
531
+ * @var bool
532
+ */
533
+ public $is_mysql = null;
534
+
535
+ /**
536
+ * A list of incompatible SQL modes.
537
+ *
538
+ * @since 3.9.0
539
+ * @access protected
540
+ * @var array
541
+ */
542
+ protected $incompatible_modes = array( 'NO_ZERO_DATE', 'ONLY_FULL_GROUP_BY',
543
+ 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'TRADITIONAL' );
544
+
545
+ /**
546
+ * Whether to use mysqli over mysql.
547
+ *
548
+ * @since 3.9.0
549
+ * @access private
550
+ * @var bool
551
+ */
552
+ private $use_mysqli = false;
553
+
554
+ /**
555
+ * Whether we've managed to successfully connect at some point
556
+ *
557
+ * @since 3.9.0
558
+ * @access private
559
+ * @var bool
560
+ */
561
+ private $has_connected = false;
562
+
563
+ /**
564
+ * Connects to the database server and selects a database
565
+ *
566
+ * PHP5 style constructor for compatibility with PHP5. Does
567
+ * the actual setting up of the class properties and connection
568
+ * to the database.
569
+ *
570
+ * @link https://core.trac.wordpress.org/ticket/3354
571
+ * @since 2.0.8
572
+ *
573
+ * @param string $dbuser MySQL database user
574
+ * @param string $dbpassword MySQL database password
575
+ * @param string $dbname MySQL database name
576
+ * @param string $dbhost MySQL database host
577
+ */
578
+ public function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
579
+ register_shutdown_function( array( $this, '__destruct' ) );
580
+
581
+ if ( WP_DEBUG && WP_DEBUG_DISPLAY )
582
+ $this->show_errors();
583
+
584
+ /* Use ext/mysqli if it exists and:
585
+ * - WP_USE_EXT_MYSQL is defined as false, or
586
+ * - We are a development version of WordPress, or
587
+ * - We are running PHP 5.5 or greater, or
588
+ * - ext/mysql is not loaded.
589
+ */
590
+ if ( function_exists( 'mysqli_connect' ) ) {
591
+ if ( defined( 'WP_USE_EXT_MYSQL' ) ) {
592
+ $this->use_mysqli = ! WP_USE_EXT_MYSQL;
593
+ } elseif ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) {
594
+ $this->use_mysqli = true;
595
+ } elseif ( false !== strpos( $GLOBALS['wp_version'], '-' ) ) {
596
+ $this->use_mysqli = true;
597
+ }
598
+ }
599
+
600
+ $this->init_charset();
601
+
602
+ $this->dbuser = $dbuser;
603
+ $this->dbpassword = $dbpassword;
604
+ $this->dbname = $dbname;
605
+ $this->dbhost = $dbhost;
606
+
607
+ // wp-config.php creation will manually connect when ready.
608
+ if ( defined( 'WP_SETUP_CONFIG' ) ) {
609
+ return;
610
+ }
611
+
612
+ $this->db_connect();
613
+ }
614
+
615
+ /**
616
+ * PHP5 style destructor and will run when database object is destroyed.
617
+ *
618
+ * @see wpdb::__construct()
619
+ * @since 2.0.8
620
+ * @return bool true
621
+ */
622
+ public function __destruct() {
623
+ return true;
624
+ }
625
+
626
+ /**
627
+ * PHP5 style magic getter, used to lazy-load expensive data.
628
+ *
629
+ * @since 3.5.0
630
+ *
631
+ * @param string $name The private member to get, and optionally process
632
+ * @return mixed The private member
633
+ */
634
+ public function __get( $name ) {
635
+ if ( 'col_info' == $name )
636
+ $this->load_col_info();
637
+
638
+ return $this->$name;
639
+ }
640
+
641
+ /**
642
+ * Magic function, for backwards compatibility.
643
+ *
644
+ * @since 3.5.0
645
+ *
646
+ * @param string $name The private member to set
647
+ * @param mixed $value The value to set
648
+ */
649
+ public function __set( $name, $value ) {
650
+ $this->$name = $value;
651
+ }
652
+
653
+ /**
654
+ * Magic function, for backwards compatibility.
655
+ *
656
+ * @since 3.5.0
657
+ *
658
+ * @param string $name The private member to check
659
+ *
660
+ * @return bool If the member is set or not
661
+ */
662
+ public function __isset( $name ) {
663
+ return isset( $this->$name );
664
+ }
665
+
666
+ /**
667
+ * Magic function, for backwards compatibility.
668
+ *
669
+ * @since 3.5.0
670
+ *
671
+ * @param string $name The private member to unset
672
+ */
673
+ public function __unset( $name ) {
674
+ unset( $this->$name );
675
+ }
676
+
677
+ /**
678
+ * Set $this->charset and $this->collate
679
+ *
680
+ * @since 3.1.0
681
+ */
682
+ public function init_charset() {
683
+ if ( function_exists('is_multisite') && is_multisite() ) {
684
+ $this->charset = 'utf8';
685
+ if ( defined( 'DB_COLLATE' ) && DB_COLLATE )
686
+ $this->collate = DB_COLLATE;
687
+ else
688
+ $this->collate = 'utf8_general_ci';
689
+ } elseif ( defined( 'DB_COLLATE' ) ) {
690
+ $this->collate = DB_COLLATE;
691
+ }
692
+
693
+ if ( defined( 'DB_CHARSET' ) )
694
+ $this->charset = DB_CHARSET;
695
+ }
696
+
697
+ /**
698
+ * Sets the connection's character set.
699
+ *
700
+ * @since 3.1.0
701
+ *
702
+ * @param resource $dbh The resource given by mysql_connect
703
+ * @param string $charset The character set (optional)
704
+ * @param string $collate The collation (optional)
705
+ */
706
+ public function set_charset( $dbh, $charset = null, $collate = null ) {
707
+ if ( ! isset( $charset ) )
708
+ $charset = $this->charset;
709
+ if ( ! isset( $collate ) )
710
+ $collate = $this->collate;
711
+ if ( $this->has_cap( 'collation' ) && ! empty( $charset ) ) {
712
+ if ( $this->use_mysqli ) {
713
+ if ( function_exists( 'mysqli_set_charset' ) && $this->has_cap( 'set_charset' ) ) {
714
+ mysqli_set_charset( $dbh, $charset );
715
+ } else {
716
+ $query = $this->prepare( 'SET NAMES %s', $charset );
717
+ if ( ! empty( $collate ) )
718
+ $query .= $this->prepare( ' COLLATE %s', $collate );
719
+ mysqli_query( $query, $dbh );
720
+ }
721
+ } else {
722
+ if ( function_exists( 'mysql_set_charset' ) && $this->has_cap( 'set_charset' ) ) {
723
+ mysql_set_charset( $charset, $dbh );
724
+ } else {
725
+ $query = $this->prepare( 'SET NAMES %s', $charset );
726
+ if ( ! empty( $collate ) )
727
+ $query .= $this->prepare( ' COLLATE %s', $collate );
728
+ mysql_query( $query, $dbh );
729
+ }
730
+ }
731
+ }
732
+ }
733
+
734
+ /**
735
+ * Change the current SQL mode, and ensure its WordPress compatibility.
736
+ *
737
+ * If no modes are passed, it will ensure the current MySQL server
738
+ * modes are compatible.
739
+ *
740
+ * @since 3.9.0
741
+ *
742
+ * @param array $modes Optional. A list of SQL modes to set.
743
+ */
744
+ public function set_sql_mode( $modes = array() ) {
745
+ if ( empty( $modes ) ) {
746
+ if ( $this->use_mysqli ) {
747
+ $res = mysqli_query( $this->dbh, 'SELECT @@SESSION.sql_mode' );
748
+ } else {
749
+ $res = mysql_query( 'SELECT @@SESSION.sql_mode', $this->dbh );
750
+ }
751
+
752
+ if ( empty( $res ) ) {
753
+ return;
754
+ }
755
+
756
+ if ( $this->use_mysqli ) {
757
+ $modes_array = mysqli_fetch_array( $res );
758
+ if ( empty( $modes_array[0] ) ) {
759
+ return;
760
+ }
761
+ $modes_str = $modes_array[0];
762
+ } else {
763
+ $modes_str = mysql_result( $res, 0 );
764
+ }
765
+
766
+ if ( empty( $modes_str ) ) {
767
+ return;
768
+ }
769
+
770
+ $modes = explode( ',', $modes_str );
771
+ }
772
+
773
+ $modes = array_change_key_case( $modes, CASE_UPPER );
774
+
775
+ /**
776
+ * Filter the list of incompatible SQL modes to exclude.
777
+ *
778
+ * @since 3.9.0
779
+ *
780
+ * @see wpdb::$incompatible_modes
781
+ *
782
+ * @param array $incompatible_modes An array of incompatible modes.
783
+ */
784
+ $incompatible_modes = (array) apply_filters( 'incompatible_sql_modes', $this->incompatible_modes );
785
+
786
+ foreach( $modes as $i => $mode ) {
787
+ if ( in_array( $mode, $incompatible_modes ) ) {
788
+ unset( $modes[ $i ] );
789
+ }
790
+ }
791
+
792
+ $modes_str = implode( ',', $modes );
793
+
794
+ if ( $this->use_mysqli ) {
795
+ mysqli_query( $this->dbh, "SET SESSION sql_mode='$modes_str'" );
796
+ } else {
797
+ mysql_query( "SET SESSION sql_mode='$modes_str'", $this->dbh );
798
+ }
799
+ }
800
+
801
+ /**
802
+ * Sets the table prefix for the WordPress tables.
803
+ *
804
+ * @since 2.5.0
805
+ *
806
+ * @param string $prefix Alphanumeric name for the new prefix.
807
+ * @param bool $set_table_names Optional. Whether the table names, e.g. wpdb::$posts, should be updated or not.
808
+ * @return string|WP_Error Old prefix or WP_Error on error
809
+ */
810
+ public function set_prefix( $prefix, $set_table_names = true ) {
811
+
812
+ if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
813
+ return new WP_Error('invalid_db_prefix', 'Invalid database prefix' );
814
+
815
+ $old_prefix = is_multisite() ? '' : $prefix;
816
+
817
+ if ( isset( $this->base_prefix ) )
818
+ $old_prefix = $this->base_prefix;
819
+
820
+ $this->base_prefix = $prefix;
821
+
822
+ if ( $set_table_names ) {
823
+ foreach ( $this->tables( 'global' ) as $table => $prefixed_table )
824
+ $this->$table = $prefixed_table;
825
+
826
+ if ( is_multisite() && empty( $this->blogid ) )
827
+ return $old_prefix;
828
+
829
+ $this->prefix = $this->get_blog_prefix();
830
+
831
+ foreach ( $this->tables( 'blog' ) as $table => $prefixed_table )
832
+ $this->$table = $prefixed_table;
833
+
834
+ foreach ( $this->tables( 'old' ) as $table => $prefixed_table )
835
+ $this->$table = $prefixed_table;
836
+ }
837
+ return $old_prefix;
838
+ }
839
+
840
+ /**
841
+ * Sets blog id.
842
+ *
843
+ * @since 3.0.0
844
+ * @access public
845
+ * @param int $blog_id
846
+ * @param int $site_id Optional.
847
+ * @return string previous blog id
848
+ */
849
+ public function set_blog_id( $blog_id, $site_id = 0 ) {
850
+ if ( ! empty( $site_id ) )
851
+ $this->siteid = $site_id;
852
+
853
+ $old_blog_id = $this->blogid;
854
+ $this->blogid = $blog_id;
855
+
856
+ $this->prefix = $this->get_blog_prefix();
857
+
858
+ foreach ( $this->tables( 'blog' ) as $table => $prefixed_table )
859
+ $this->$table = $prefixed_table;
860
+
861
+ foreach ( $this->tables( 'old' ) as $table => $prefixed_table )
862
+ $this->$table = $prefixed_table;
863
+
864
+ return $old_blog_id;
865
+ }
866
+
867
+ /**
868
+ * Gets blog prefix.
869
+ *
870
+ * @uses is_multisite()
871
+ * @since 3.0.0
872
+ * @param int $blog_id Optional.
873
+ * @return string Blog prefix.
874
+ */
875
+ public function get_blog_prefix( $blog_id = null ) {
876
+ if ( is_multisite() ) {
877
+ if ( null === $blog_id )
878
+ $blog_id = $this->blogid;
879
+ $blog_id = (int) $blog_id;
880
+ if ( defined( 'MULTISITE' ) && ( 0 == $blog_id || 1 == $blog_id ) )
881
+ return $this->base_prefix;
882
+ else
883
+ return $this->base_prefix . $blog_id . '_';
884
+ } else {
885
+ return $this->base_prefix;
886
+ }
887
+ }
888
+
889
+ /**
890
+ * Returns an array of WordPress tables.
891
+ *
892
+ * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to
893
+ * override the WordPress users and usermeta tables that would otherwise
894
+ * be determined by the prefix.
895
+ *
896
+ * The scope argument can take one of the following:
897
+ *
898
+ * 'all' - returns 'all' and 'global' tables. No old tables are returned.
899
+ * 'blog' - returns the blog-level tables for the queried blog.
900
+ * 'global' - returns the global tables for the installation, returning multisite tables only if running multisite.
901
+ * 'ms_global' - returns the multisite global tables, regardless if current installation is multisite.
902
+ * 'old' - returns tables which are deprecated.
903
+ *
904
+ * @since 3.0.0
905
+ * @uses wpdb::$tables
906
+ * @uses wpdb::$old_tables
907
+ * @uses wpdb::$global_tables
908
+ * @uses wpdb::$ms_global_tables
909
+ * @uses is_multisite()
910
+ *
911
+ * @param string $scope Optional. Can be all, global, ms_global, blog, or old tables. Defaults to all.
912
+ * @param bool $prefix Optional. Whether to include table prefixes. Default true. If blog
913
+ * prefix is requested, then the custom users and usermeta tables will be mapped.
914
+ * @param int $blog_id Optional. The blog_id to prefix. Defaults to wpdb::$blogid. Used only when prefix is requested.
915
+ * @return array Table names. When a prefix is requested, the key is the unprefixed table name.
916
+ */
917
+ public function tables( $scope = 'all', $prefix = true, $blog_id = 0 ) {
918
+ switch ( $scope ) {
919
+ case 'all' :
920
+ $tables = array_merge( $this->global_tables, $this->tables );
921
+ if ( is_multisite() )
922
+ $tables = array_merge( $tables, $this->ms_global_tables );
923
+ break;
924
+ case 'blog' :
925
+ $tables = $this->tables;
926
+ break;
927
+ case 'global' :
928
+ $tables = $this->global_tables;
929
+ if ( is_multisite() )
930
+ $tables = array_merge( $tables, $this->ms_global_tables );
931
+ break;
932
+ case 'ms_global' :
933
+ $tables = $this->ms_global_tables;
934
+ break;
935
+ case 'old' :
936
+ $tables = $this->old_tables;
937
+ break;
938
+ default :
939
+ return array();
940
+ }
941
+
942
+ if ( $prefix ) {
943
+ if ( ! $blog_id )
944
+ $blog_id = $this->blogid;
945
+ $blog_prefix = $this->get_blog_prefix( $blog_id );
946
+ $base_prefix = $this->base_prefix;
947
+ $global_tables = array_merge( $this->global_tables, $this->ms_global_tables );
948
+ foreach ( $tables as $k => $table ) {
949
+ if ( in_array( $table, $global_tables ) )
950
+ $tables[ $table ] = $base_prefix . $table;
951
+ else
952
+ $tables[ $table ] = $blog_prefix . $table;
953
+ unset( $tables[ $k ] );
954
+ }
955
+
956
+ if ( isset( $tables['users'] ) && defined( 'CUSTOM_USER_TABLE' ) )
957
+ $tables['users'] = CUSTOM_USER_TABLE;
958
+
959
+ if ( isset( $tables['usermeta'] ) && defined( 'CUSTOM_USER_META_TABLE' ) )
960
+ $tables['usermeta'] = CUSTOM_USER_META_TABLE;
961
+ }
962
+
963
+ return $tables;
964
+ }
965
+
966
+ /**
967
+ * Selects a database using the current database connection.
968
+ *
969
+ * The database name will be changed based on the current database
970
+ * connection. On failure, the execution will bail and display an DB error.
971
+ *
972
+ * @since 0.71
973
+ *
974
+ * @param string $db MySQL database name
975
+ * @param resource $dbh Optional link identifier.
976
+ * @return null Always null.
977
+ */
978
+ public function select( $db, $dbh = null ) {
979
+ if ( is_null($dbh) )
980
+ $dbh = $this->dbh;
981
+
982
+ if ( $this->use_mysqli ) {
983
+ $success = @mysqli_select_db( $dbh, $db );
984
+ } else {
985
+ $success = @mysql_select_db( $db, $dbh );
986
+ }
987
+ if ( ! $success ) {
988
+ $this->ready = false;
989
+ if ( ! did_action( 'template_redirect' ) ) {
990
+ wp_load_translations_early();
991
+ $this->bail( sprintf( __( '<h1>Can&#8217;t select database</h1>
992
+ <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p>
993
+ <ul>
994
+ <li>Are you sure it exists?</li>
995
+ <li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li>
996
+ <li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li>
997
+ </ul>
998
+ <p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="https://wordpress.org/support/">WordPress Support Forums</a>.</p>' ), htmlspecialchars( $db, ENT_QUOTES ), htmlspecialchars( $this->dbuser, ENT_QUOTES ) ), 'db_select_fail' );
999
+ }
1000
+ return;
1001
+ }
1002
+ }
1003
+
1004
+ /**
1005
+ * Do not use, deprecated.
1006
+ *
1007
+ * Use esc_sql() or wpdb::prepare() instead.
1008
+ *
1009
+ * @since 2.8.0
1010
+ * @deprecated 3.6.0
1011
+ * @see wpdb::prepare
1012
+ * @see esc_sql()
1013
+ * @access private
1014
+ *
1015
+ * @param string $string
1016
+ * @return string
1017
+ */
1018
+ function _weak_escape( $string ) {
1019
+ if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) )
1020
+ _deprecated_function( __METHOD__, '3.6', 'wpdb::prepare() or esc_sql()' );
1021
+ return addslashes( $string );
1022
+ }
1023
+
1024
+ /**
1025
+ * Real escape, using mysqli_real_escape_string() or mysql_real_escape_string()
1026
+ *
1027
+ * @see mysqli_real_escape_string()
1028
+ * @see mysql_real_escape_string()
1029
+ * @since 2.8.0
1030
+ * @access private
1031
+ *
1032
+ * @param string $string to escape
1033
+ * @return string escaped
1034
+ */
1035
+ function _real_escape( $string ) {
1036
+ if ( $this->dbh ) {
1037
+ if ( $this->use_mysqli ) {
1038
+ return mysqli_real_escape_string( $this->dbh, $string );
1039
+ } else {
1040
+ return mysql_real_escape_string( $string, $this->dbh );
1041
+ }
1042
+ }
1043
+
1044
+ $class = get_class( $this );
1045
+ if ( function_exists( '__' ) ) {
1046
+ _doing_it_wrong( $class, sprintf( __( '%s must set a database connection for use with escaping.' ), $class ), E_USER_NOTICE );
1047
+ } else {
1048
+ _doing_it_wrong( $class, sprintf( '%s must set a database connection for use with escaping.', $class ), E_USER_NOTICE );
1049
+ }
1050
+ return addslashes( $string );
1051
+ }
1052
+
1053
+ /**
1054
+ * Escape data. Works on arrays.
1055
+ *
1056
+ * @uses wpdb::_real_escape()
1057
+ * @since 2.8.0
1058
+ * @access private
1059
+ *
1060
+ * @param string|array $data
1061
+ * @return string|array escaped
1062
+ */
1063
+ function _escape( $data ) {
1064
+ if ( is_array( $data ) ) {
1065
+ foreach ( $data as $k => $v ) {
1066
+ if ( is_array($v) )
1067
+ $data[$k] = $this->_escape( $v );
1068
+ else
1069
+ $data[$k] = $this->_real_escape( $v );
1070
+ }
1071
+ } else {
1072
+ $data = $this->_real_escape( $data );
1073
+ }
1074
+
1075
+ return $data;
1076
+ }
1077
+
1078
+ /**
1079
+ * Do not use, deprecated.
1080
+ *
1081
+ * Use esc_sql() or wpdb::prepare() instead.
1082
+ *
1083
+ * @since 0.71
1084
+ * @deprecated 3.6.0
1085
+ * @see wpdb::prepare()
1086
+ * @see esc_sql()
1087
+ *
1088
+ * @param mixed $data
1089
+ * @return mixed
1090
+ */
1091
+ public function escape( $data ) {
1092
+ if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) )
1093
+ _deprecated_function( __METHOD__, '3.6', 'wpdb::prepare() or esc_sql()' );
1094
+ if ( is_array( $data ) ) {
1095
+ foreach ( $data as $k => $v ) {
1096
+ if ( is_array( $v ) )
1097
+ $data[$k] = $this->escape( $v, 'recursive' );
1098
+ else
1099
+ $data[$k] = $this->_weak_escape( $v, 'internal' );
1100
+ }
1101
+ } else {
1102
+ $data = $this->_weak_escape( $data, 'internal' );
1103
+ }
1104
+
1105
+ return $data;
1106
+ }
1107
+
1108
+ /**
1109
+ * Escapes content by reference for insertion into the database, for security
1110
+ *
1111
+ * @uses wpdb::_real_escape()
1112
+ * @since 2.3.0
1113
+ * @param string $string to escape
1114
+ * @return void
1115
+ */
1116
+ public function escape_by_ref( &$string ) {
1117
+ if ( ! is_float( $string ) )
1118
+ $string = $this->_real_escape( $string );
1119
+ }
1120
+
1121
+ /**
1122
+ * Prepares a SQL query for safe execution. Uses sprintf()-like syntax.
1123
+ *
1124
+ * The following directives can be used in the query format string:
1125
+ * %d (integer)
1126
+ * %f (float)
1127
+ * %s (string)
1128
+ * %% (literal percentage sign - no argument needed)
1129
+ *
1130
+ * All of %d, %f, and %s are to be left unquoted in the query string and they need an argument passed for them.
1131
+ * Literals (%) as parts of the query must be properly written as %%.
1132
+ *
1133
+ * This function only supports a small subset of the sprintf syntax; it only supports %d (integer), %f (float), and %s (string).
1134
+ * Does not support sign, padding, alignment, width or precision specifiers.
1135
+ * Does not support argument numbering/swapping.
1136
+ *
1137
+ * May be called like {@link http://php.net/sprintf sprintf()} or like {@link http://php.net/vsprintf vsprintf()}.
1138
+ *
1139
+ * Both %d and %s should be left unquoted in the query string.
1140
+ *
1141
+ * <code>
1142
+ * wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 )
1143
+ * wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
1144
+ * </code>
1145
+ *
1146
+ * @link http://php.net/sprintf Description of syntax.
1147
+ * @since 2.3.0
1148
+ *
1149
+ * @param string $query Query statement with sprintf()-like placeholders
1150
+ * @param array|mixed $args The array of variables to substitute into the query's placeholders if being called like
1151
+ * {@link http://php.net/vsprintf vsprintf()}, or the first variable to substitute into the query's placeholders if
1152
+ * being called like {@link http://php.net/sprintf sprintf()}.
1153
+ * @param mixed $args,... further variables to substitute into the query's placeholders if being called like
1154
+ * {@link http://php.net/sprintf sprintf()}.
1155
+ * @return null|false|string Sanitized query string, null if there is no query, false if there is an error and string
1156
+ * if there was something to prepare
1157
+ */
1158
+ public function prepare( $query, $args ) {
1159
+ if ( is_null( $query ) )
1160
+ return;
1161
+
1162
+ // This is not meant to be foolproof -- but it will catch obviously incorrect usage.
1163
+ if ( strpos( $query, '%' ) === false ) {
1164
+ _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9' );
1165
+ }
1166
+
1167
+ $args = func_get_args();
1168
+ array_shift( $args );
1169
+ // If args were passed as an array (as in vsprintf), move them up
1170
+ if ( isset( $args[0] ) && is_array($args[0]) )
1171
+ $args = $args[0];
1172
+ $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it
1173
+ $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
1174
+ $query = preg_replace( '|(?<!%)%f|' , '%F', $query ); // Force floats to be locale unaware
1175
+ $query = preg_replace( '|(?<!%)%s|', "'%s'", $query ); // quote the strings, avoiding escaped strings like %%s
1176
+ array_walk( $args, array( $this, 'escape_by_ref' ) );
1177
+ return @vsprintf( $query, $args );
1178
+ }
1179
+
1180
+ /**
1181
+ * First half of escaping for LIKE special characters % and _ before preparing for MySQL.
1182
+ *
1183
+ * Use this only before wpdb::prepare() or esc_sql(). Reversing the order is very bad for security.
1184
+ *
1185
+ * Example Prepared Statement:
1186
+ * $wild = '%';
1187
+ * $find = 'only 43% of planets';
1188
+ * $like = $wild . $wpdb->esc_like( $find ) . $wild;
1189
+ * $sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content LIKE %s", $like );
1190
+ *
1191
+ * Example Escape Chain:
1192
+ * $sql = esc_sql( $wpdb->esc_like( $input ) );
1193
+ *
1194
+ * @since 4.0.0
1195
+ * @access public
1196
+ *
1197
+ * @param string $text The raw text to be escaped. The input typed by the user should have no
1198
+ * extra or deleted slashes.
1199
+ * @return string Text in the form of a LIKE phrase. The output is not SQL safe. Call $wpdb::prepare()
1200
+ * or real_escape next.
1201
+ */
1202
+ public function esc_like( $text ) {
1203
+ return addcslashes( $text, '_%\\' );
1204
+ }
1205
+
1206
+ /**
1207
+ * Print SQL/DB error.
1208
+ *
1209
+ * @since 0.71
1210
+ * @global array $EZSQL_ERROR Stores error information of query and error string
1211
+ *
1212
+ * @param string $str The error to display
1213
+ * @return bool False if the showing of errors is disabled.
1214
+ */
1215
+ public function print_error( $str = '' ) {
1216
+ global $EZSQL_ERROR;
1217
+
1218
+ if ( !$str ) {
1219
+ if ( $this->use_mysqli ) {
1220
+ $str = mysqli_error( $this->dbh );
1221
+ } else {
1222
+ $str = mysql_error( $this->dbh );
1223
+ }
1224
+ }
1225
+ $EZSQL_ERROR[] = array( 'query' => $this->last_query, 'error_str' => $str );
1226
+
1227
+ if ( $this->suppress_errors )
1228
+ return false;
1229
+
1230
+ wp_load_translations_early();
1231
+
1232
+ if ( $caller = $this->get_caller() )
1233
+ $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller );
1234
+ else
1235
+ $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query );
1236
+
1237
+ error_log( $error_str );
1238
+
1239
+ // Are we showing errors?
1240
+ if ( ! $this->show_errors )
1241
+ return false;
1242
+
1243
+ // If there is an error then take note of it
1244
+ if ( is_multisite() ) {
1245
+ $msg = "WordPress database error: [$str]\n{$this->last_query}\n";
1246
+ if ( defined( 'ERRORLOGFILE' ) )
1247
+ error_log( $msg, 3, ERRORLOGFILE );
1248
+ if ( defined( 'DIEONDBERROR' ) )
1249
+ wp_die( $msg );
1250
+ } else {
1251
+ $str = htmlspecialchars( $str, ENT_QUOTES );
1252
+ $query = htmlspecialchars( $this->last_query, ENT_QUOTES );
1253
+
1254
+ print "<div id='error'>
1255
+ <p class='wpdberror'><strong>WordPress database error:</strong> [$str]<br />
1256
+ <code>$query</code></p>
1257
+ </div>";
1258
+ }
1259
+ }
1260
+
1261
+ /**
1262
+ * Enables showing of database errors.
1263
+ *
1264
+ * This function should be used only to enable showing of errors.
1265
+ * wpdb::hide_errors() should be used instead for hiding of errors. However,
1266
+ * this function can be used to enable and disable showing of database
1267
+ * errors.
1268
+ *
1269
+ * @since 0.71
1270
+ * @see wpdb::hide_errors()
1271
+ *
1272
+ * @param bool $show Whether to show or hide errors
1273
+ * @return bool Old value for showing errors.
1274
+ */
1275
+ public function show_errors( $show = true ) {
1276
+ $errors = $this->show_errors;
1277
+ $this->show_errors = $show;
1278
+ return $errors;
1279
+ }
1280
+
1281
+ /**
1282
+ * Disables showing of database errors.
1283
+ *
1284
+ * By default database errors are not shown.
1285
+ *
1286
+ * @since 0.71
1287
+ * @see wpdb::show_errors()
1288
+ *
1289
+ * @return bool Whether showing of errors was active
1290
+ */
1291
+ public function hide_errors() {
1292
+ $show = $this->show_errors;
1293
+ $this->show_errors = false;
1294
+ return $show;
1295
+ }
1296
+
1297
+ /**
1298
+ * Whether to suppress database errors.
1299
+ *
1300
+ * By default database errors are suppressed, with a simple
1301
+ * call to this function they can be enabled.
1302
+ *
1303
+ * @since 2.5.0
1304
+ * @see wpdb::hide_errors()
1305
+ * @param bool $suppress Optional. New value. Defaults to true.
1306
+ * @return bool Old value
1307
+ */
1308
+ public function suppress_errors( $suppress = true ) {
1309
+ $errors = $this->suppress_errors;
1310
+ $this->suppress_errors = (bool) $suppress;
1311
+ return $errors;
1312
+ }
1313
+
1314
+ /**
1315
+ * Kill cached query results.
1316
+ *
1317
+ * @since 0.71
1318
+ * @return void
1319
+ */
1320
+ public function flush() {
1321
+ $this->last_result = array();
1322
+ $this->col_info = null;
1323
+ $this->last_query = null;
1324
+ $this->rows_affected = $this->num_rows = 0;
1325
+ $this->last_error = '';
1326
+
1327
+ if ( is_resource( $this->result ) ) {
1328
+ if ( $this->use_mysqli ) {
1329
+ mysqli_free_result( $this->result );
1330
+ } else {
1331
+ mysql_free_result( $this->result );
1332
+ }
1333
+ }
1334
+ }
1335
+
1336
+ /**
1337
+ * Connect to and select database.
1338
+ *
1339
+ * If $allow_bail is false, the lack of database connection will need
1340
+ * to be handled manually.
1341
+ *
1342
+ * @since 3.0.0
1343
+ * @since 3.9.0 $allow_bail parameter added.
1344
+ *
1345
+ * @param bool $allow_bail Optional. Allows the function to bail. Default true.
1346
+ * @return bool True with a successful connection, false on failure.
1347
+ */
1348
+ public function db_connect( $allow_bail = true ) {
1349
+
1350
+ $this->is_mysql = true;
1351
+
1352
+ /*
1353
+ * Deprecated in 3.9+ when using MySQLi. No equivalent
1354
+ * $new_link parameter exists for mysqli_* functions.
1355
+ */
1356
+ $new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : true;
1357
+ $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
1358
+
1359
+ if ( $this->use_mysqli ) {
1360
+ $this->dbh = mysqli_init();
1361
+
1362
+ // mysqli_real_connect doesn't support the host param including a port or socket
1363
+ // like mysql_connect does. This duplicates how mysql_connect detects a port and/or socket file.
1364
+ $port = null;
1365
+ $socket = null;
1366
+ $host = $this->dbhost;
1367
+ $port_or_socket = strstr( $host, ':' );
1368
+ if ( ! empty( $port_or_socket ) ) {
1369
+ $host = substr( $host, 0, strpos( $host, ':' ) );
1370
+ $port_or_socket = substr( $port_or_socket, 1 );
1371
+ if ( 0 !== strpos( $port_or_socket, '/' ) ) {
1372
+ $port = intval( $port_or_socket );
1373
+ $maybe_socket = strstr( $port_or_socket, ':' );
1374
+ if ( ! empty( $maybe_socket ) ) {
1375
+ $socket = substr( $maybe_socket, 1 );
1376
+ }
1377
+ } else {
1378
+ $socket = $port_or_socket;
1379
+ }
1380
+ }
1381
+
1382
+ if ( WP_DEBUG ) {
1383
+ mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
1384
+ } else {
1385
+ @mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
1386
+ }
1387
+
1388
+ if ( $this->dbh->connect_errno ) {
1389
+ $this->dbh = null;
1390
+
1391
+ /* It's possible ext/mysqli is misconfigured. Fall back to ext/mysql if:
1392
+ * - We haven't previously connected, and
1393
+ * - WP_USE_EXT_MYSQL isn't set to false, and
1394
+ * - ext/mysql is loaded.
1395
+ */
1396
+ $attempt_fallback = true;
1397
+
1398
+ if ( $this->has_connected ) {
1399
+ $attempt_fallback = false;
1400
+ } else if ( defined( 'WP_USE_EXT_MYSQL' ) && ! WP_USE_EXT_MYSQL ) {
1401
+ $attempt_fallback = false;
1402
+ } else if ( ! function_exists( 'mysql_connect' ) ) {
1403
+ $attempt_fallback = false;
1404
+ }
1405
+
1406
+ if ( $attempt_fallback ) {
1407
+ $this->use_mysqli = false;
1408
+ $this->db_connect();
1409
+ }
1410
+ }
1411
+ } else {
1412
+ if ( WP_DEBUG ) {
1413
+ $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
1414
+ } else {
1415
+ $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
1416
+ }
1417
+ }
1418
+
1419
+ if ( ! $this->dbh && $allow_bail ) {
1420
+ wp_load_translations_early();
1421
+
1422
+ // Load custom DB error template, if present.
1423
+ if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) {
1424
+ require_once( WP_CONTENT_DIR . '/db-error.php' );
1425
+ die();
1426
+ }
1427
+
1428
+ $this->bail( sprintf( __( "
1429
+ <h1>Error establishing a database connection</h1>
1430
+ <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>
1431
+ <ul>
1432
+ <li>Are you sure you have the correct username and password?</li>
1433
+ <li>Are you sure that you have typed the correct hostname?</li>
1434
+ <li>Are you sure that the database server is running?</li>
1435
+ </ul>
1436
+ <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='https://wordpress.org/support/'>WordPress Support Forums</a>.</p>
1437
+ " ), htmlspecialchars( $this->dbhost, ENT_QUOTES ) ), 'db_connect_fail' );
1438
+
1439
+ return false;
1440
+ } else if ( $this->dbh ) {
1441
+ $this->has_connected = true;
1442
+ $this->set_charset( $this->dbh );
1443
+ $this->set_sql_mode();
1444
+ $this->ready = true;
1445
+ $this->select( $this->dbname, $this->dbh );
1446
+
1447
+ return true;
1448
+ }
1449
+
1450
+ return false;
1451
+ }
1452
+
1453
+ /**
1454
+ * Check that the connection to the database is still up. If not, try to reconnect.
1455
+ *
1456
+ * If this function is unable to reconnect, it will forcibly die, or if after the
1457
+ * the template_redirect hook has been fired, return false instead.
1458
+ *
1459
+ * If $allow_bail is false, the lack of database connection will need
1460
+ * to be handled manually.
1461
+ *
1462
+ * @since 3.9.0
1463
+ *
1464
+ * @param bool $allow_bail Optional. Allows the function to bail. Default true.
1465
+ * @return bool True if the connection is up.
1466
+ */
1467
+ public function check_connection( $allow_bail = true ) {
1468
+ if ( $this->use_mysqli ) {
1469
+ if ( @mysqli_ping( $this->dbh ) ) {
1470
+ return true;
1471
+ }
1472
+ } else {
1473
+ if ( @mysql_ping( $this->dbh ) ) {
1474
+ return true;
1475
+ }
1476
+ }
1477
+
1478
+ $error_reporting = false;
1479
+
1480
+ // Disable warnings, as we don't want to see a multitude of "unable to connect" messages
1481
+ if ( WP_DEBUG ) {
1482
+ $error_reporting = error_reporting();
1483
+ error_reporting( $error_reporting & ~E_WARNING );
1484
+ }
1485
+
1486
+ for ( $tries = 1; $tries <= $this->reconnect_retries; $tries++ ) {
1487
+ // On the last try, re-enable warnings. We want to see a single instance of the
1488
+ // "unable to connect" message on the bail() screen, if it appears.
1489
+ if ( $this->reconnect_retries === $tries && WP_DEBUG ) {
1490
+ error_reporting( $error_reporting );
1491
+ }
1492
+
1493
+ if ( $this->db_connect( false ) ) {
1494
+ if ( $error_reporting ) {
1495
+ error_reporting( $error_reporting );
1496
+ }
1497
+
1498
+ return true;
1499
+ }
1500
+
1501
+ sleep( 1 );
1502
+ }
1503
+
1504
+ // If template_redirect has already happened, it's too late for wp_die()/dead_db().
1505
+ // Let's just return and hope for the best.
1506
+ if ( did_action( 'template_redirect' ) ) {
1507
+ return false;
1508
+ }
1509
+
1510
+ if ( ! $allow_bail ) {
1511
+ return false;
1512
+ }
1513
+
1514
+ // We weren't able to reconnect, so we better bail.
1515
+ $this->bail( sprintf( ( "
1516
+ <h1>Error reconnecting to the database</h1>
1517
+ <p>This means that we lost contact with the database server at <code>%s</code>. This could mean your host's database server is down.</p>
1518
+ <ul>
1519
+ <li>Are you sure that the database server is running?</li>
1520
+ <li>Are you sure that the database server is not under particularly heavy load?</li>
1521
+ </ul>
1522
+ <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='https://wordpress.org/support/'>WordPress Support Forums</a>.</p>
1523
+ " ), htmlspecialchars( $this->dbhost, ENT_QUOTES ) ), 'db_connect_fail' );
1524
+
1525
+ // Call dead_db() if bail didn't die, because this database is no more. It has ceased to be (at least temporarily).
1526
+ dead_db();
1527
+ }
1528
+
1529
+ /**
1530
+ * Perform a MySQL database query, using current database connection.
1531
+ *
1532
+ * More information can be found on the codex page.
1533
+ *
1534
+ * @since 0.71
1535
+ *
1536
+ * @param string $query Database query
1537
+ * @return int|false Number of rows affected/selected or false on error
1538
+ */
1539
+ public function query( $query ) {
1540
+ if ( ! $this->ready )
1541
+ return false;
1542
+
1543
+ /**
1544
+ * Filter the database query.
1545
+ *
1546
+ * Some queries are made before the plugins have been loaded,
1547
+ * and thus cannot be filtered with this method.
1548
+ *
1549
+ * @since 2.1.0
1550
+ *
1551
+ * @param string $query Database query.
1552
+ */
1553
+ $query = apply_filters( 'query', $query );
1554
+
1555
+ $this->flush();
1556
+
1557
+ // Log how the function was called
1558
+ $this->func_call = "\$db->query(\"$query\")";
1559
+
1560
+ // Keep track of the last query for debug..
1561
+ $this->last_query = $query;
1562
+
1563
+ $this->_do_query( $query );
1564
+
1565
+ // MySQL server has gone away, try to reconnect
1566
+ $mysql_errno = 0;
1567
+ if ( ! empty( $this->dbh ) ) {
1568
+ if ( $this->use_mysqli ) {
1569
+ $mysql_errno = mysqli_errno( $this->dbh );
1570
+ } else {
1571
+ $mysql_errno = mysql_errno( $this->dbh );
1572
+ }
1573
+ }
1574
+
1575
+ if ( empty( $this->dbh ) || 2006 == $mysql_errno ) {
1576
+ if ( $this->check_connection() ) {
1577
+ $this->_do_query( $query );
1578
+ } else {
1579
+ $this->insert_id = 0;
1580
+ return false;
1581
+ }
1582
+ }
1583
+
1584
+ // If there is an error then take note of it..
1585
+ if ( $this->use_mysqli ) {
1586
+ $this->last_error = mysqli_error( $this->dbh );
1587
+ } else {
1588
+ $this->last_error = mysql_error( $this->dbh );
1589
+ }
1590
+
1591
+ if ( $this->last_error ) {
1592
+ // Clear insert_id on a subsequent failed insert.
1593
+ if ( $this->insert_id && preg_match( '/^\s*(insert|replace)\s/i', $query ) )
1594
+ $this->insert_id = 0;
1595
+
1596
+ $this->print_error();
1597
+ return false;
1598
+ }
1599
+
1600
+ if ( preg_match( '/^\s*(create|alter|truncate|drop)\s/i', $query ) ) {
1601
+ $return_val = $this->result;
1602
+ } elseif ( preg_match( '/^\s*(insert|delete|update|replace)\s/i', $query ) ) {
1603
+ if ( $this->use_mysqli ) {
1604
+ $this->rows_affected = mysqli_affected_rows( $this->dbh );
1605
+ } else {
1606
+ $this->rows_affected = mysql_affected_rows( $this->dbh );
1607
+ }
1608
+ // Take note of the insert_id
1609
+ if ( preg_match( '/^\s*(insert|replace)\s/i', $query ) ) {
1610
+ if ( $this->use_mysqli ) {
1611
+ $this->insert_id = mysqli_insert_id( $this->dbh );
1612
+ } else {
1613
+ $this->insert_id = mysql_insert_id( $this->dbh );
1614
+ }
1615
+ }
1616
+ // Return number of rows affected
1617
+ $return_val = $this->rows_affected;
1618
+ } else {
1619
+ $num_rows = 0;
1620
+ if ( $this->use_mysqli ) {
1621
+ while ( $row = @mysqli_fetch_object( $this->result ) ) {
1622
+ $this->last_result[$num_rows] = $row;
1623
+ $num_rows++;
1624
+ }
1625
+ } else {
1626
+ while ( $row = @mysql_fetch_object( $this->result ) ) {
1627
+ $this->last_result[$num_rows] = $row;
1628
+ $num_rows++;
1629
+ }
1630
+ }
1631
+
1632
+ // Log number of rows the query returned
1633
+ // and return number of rows selected
1634
+ $this->num_rows = $num_rows;
1635
+ $return_val = $num_rows;
1636
+ }
1637
+
1638
+ return $return_val;
1639
+ }
1640
+
1641
+ /**
1642
+ * Internal function to perform the mysql_query() call.
1643
+ *
1644
+ * @since 3.9.0
1645
+ *
1646
+ * @access private
1647
+ * @see wpdb::query()
1648
+ *
1649
+ * @param string $query The query to run.
1650
+ */
1651
+ private function _do_query( $query ) {
1652
+ if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
1653
+ $this->timer_start();
1654
+ }
1655
+
1656
+ if ( $this->use_mysqli ) {
1657
+ $this->result = @mysqli_query( $this->dbh, $query );
1658
+ } else {
1659
+ $this->result = @mysql_query( $query, $this->dbh );
1660
+ }
1661
+ $this->num_queries++;
1662
+
1663
+ if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
1664
+ $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() );
1665
+ }
1666
+ }
1667
+
1668
+ /**
1669
+ * Insert a row into a table.
1670
+ *
1671
+ * <code>
1672
+ * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
1673
+ * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
1674
+ * </code>
1675
+ *
1676
+ * @since 2.5.0
1677
+ * @see wpdb::prepare()
1678
+ * @see wpdb::$field_types
1679
+ * @see wp_set_wpdb_vars()
1680
+ *
1681
+ * @param string $table table name
1682
+ * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
1683
+ * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
1684
+ * A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
1685
+ * @return int|false The number of rows inserted, or false on error.
1686
+ */
1687
+ public function insert( $table, $data, $format = null ) {
1688
+ return $this->_insert_replace_helper( $table, $data, $format, 'INSERT' );
1689
+ }
1690
+
1691
+ /**
1692
+ * Replace a row into a table.
1693
+ *
1694
+ * <code>
1695
+ * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
1696
+ * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
1697
+ * </code>
1698
+ *
1699
+ * @since 3.0.0
1700
+ * @see wpdb::prepare()
1701
+ * @see wpdb::$field_types
1702
+ * @see wp_set_wpdb_vars()
1703
+ *
1704
+ * @param string $table table name
1705
+ * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
1706
+ * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
1707
+ * A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
1708
+ * @return int|false The number of rows affected, or false on error.
1709
+ */
1710
+ public function replace( $table, $data, $format = null ) {
1711
+ return $this->_insert_replace_helper( $table, $data, $format, 'REPLACE' );
1712
+ }
1713
+
1714
+ /**
1715
+ * Helper function for insert and replace.
1716
+ *
1717
+ * Runs an insert or replace query based on $type argument.
1718
+ *
1719
+ * @access private
1720
+ * @since 3.0.0
1721
+ * @see wpdb::prepare()
1722
+ * @see wpdb::$field_types
1723
+ * @see wp_set_wpdb_vars()
1724
+ *
1725
+ * @param string $table table name
1726
+ * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
1727
+ * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
1728
+ * A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
1729
+ * @param string $type Optional. What type of operation is this? INSERT or REPLACE. Defaults to INSERT.
1730
+ * @return int|false The number of rows affected, or false on error.
1731
+ */
1732
+ function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
1733
+ if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ) ) )
1734
+ return false;
1735
+ $this->insert_id = 0;
1736
+ $formats = $format = (array) $format;
1737
+ $fields = array_keys( $data );
1738
+ $formatted_fields = array();
1739
+ foreach ( $fields as $field ) {
1740
+ if ( !empty( $format ) )
1741
+ $form = ( $form = array_shift( $formats ) ) ? $form : $format[0];
1742
+ elseif ( isset( $this->field_types[$field] ) )
1743
+ $form = $this->field_types[$field];
1744
+ else
1745
+ $form = '%s';
1746
+ $formatted_fields[] = $form;
1747
+ }
1748
+ $sql = "{$type} INTO `$table` (`" . implode( '`,`', $fields ) . "`) VALUES (" . implode( ",", $formatted_fields ) . ")";
1749
+ return $this->query( $this->prepare( $sql, $data ) );
1750
+ }
1751
+
1752
+ /**
1753
+ * Update a row in the table
1754
+ *
1755
+ * <code>
1756
+ * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) )
1757
+ * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) )
1758
+ * </code>
1759
+ *
1760
+ * @since 2.5.0
1761
+ * @see wpdb::prepare()
1762
+ * @see wpdb::$field_types
1763
+ * @see wp_set_wpdb_vars()
1764
+ *
1765
+ * @param string $table table name
1766
+ * @param array $data Data to update (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
1767
+ * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw".
1768
+ * @param array|string $format Optional. An array of formats to be mapped to each of the values in $data. If string, that format will be used for all of the values in $data.
1769
+ * A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
1770
+ * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings.
1771
+ * @return int|false The number of rows updated, or false on error.
1772
+ */
1773
+ public function update( $table, $data, $where, $format = null, $where_format = null ) {
1774
+ if ( ! is_array( $data ) || ! is_array( $where ) )
1775
+ return false;
1776
+
1777
+ $formats = $format = (array) $format;
1778
+ $bits = $wheres = array();
1779
+ foreach ( (array) array_keys( $data ) as $field ) {
1780
+ if ( !empty( $format ) )
1781
+ $form = ( $form = array_shift( $formats ) ) ? $form : $format[0];
1782
+ elseif ( isset($this->field_types[$field]) )
1783
+ $form = $this->field_types[$field];
1784
+ else
1785
+ $form = '%s';
1786
+ $bits[] = "`$field` = {$form}";
1787
+ }
1788
+
1789
+ $where_formats = $where_format = (array) $where_format;
1790
+ foreach ( (array) array_keys( $where ) as $field ) {
1791
+ if ( !empty( $where_format ) )
1792
+ $form = ( $form = array_shift( $where_formats ) ) ? $form : $where_format[0];
1793
+ elseif ( isset( $this->field_types[$field] ) )
1794
+ $form = $this->field_types[$field];
1795
+ else
1796
+ $form = '%s';
1797
+ $wheres[] = "`$field` = {$form}";
1798
+ }
1799
+
1800
+ $sql = "UPDATE `$table` SET " . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres );
1801
+ return $this->query( $this->prepare( $sql, array_merge( array_values( $data ), array_values( $where ) ) ) );
1802
+ }
1803
+
1804
+ /**
1805
+ * Delete a row in the table
1806
+ *
1807
+ * <code>
1808
+ * wpdb::delete( 'table', array( 'ID' => 1 ) )
1809
+ * wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) )
1810
+ * </code>
1811
+ *
1812
+ * @since 3.4.0
1813
+ * @see wpdb::prepare()
1814
+ * @see wpdb::$field_types
1815
+ * @see wp_set_wpdb_vars()
1816
+ *
1817
+ * @param string $table table name
1818
+ * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw".
1819
+ * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings unless otherwise specified in wpdb::$field_types.
1820
+ * @return int|false The number of rows updated, or false on error.
1821
+ */
1822
+ public function delete( $table, $where, $where_format = null ) {
1823
+ if ( ! is_array( $where ) )
1824
+ return false;
1825
+
1826
+ $wheres = array();
1827
+
1828
+ $where_formats = $where_format = (array) $where_format;
1829
+
1830
+ foreach ( array_keys( $where ) as $field ) {
1831
+ if ( !empty( $where_format ) ) {
1832
+ $form = ( $form = array_shift( $where_formats ) ) ? $form : $where_format[0];
1833
+ } elseif ( isset( $this->field_types[ $field ] ) ) {
1834
+ $form = $this->field_types[ $field ];
1835
+ } else {
1836
+ $form = '%s';
1837
+ }
1838
+
1839
+ $wheres[] = "$field = $form";
1840
+ }
1841
+
1842
+ $sql = "DELETE FROM $table WHERE " . implode( ' AND ', $wheres );
1843
+ return $this->query( $this->prepare( $sql, $where ) );
1844
+ }
1845
+
1846
+
1847
+ /**
1848
+ * Retrieve one variable from the database.
1849
+ *
1850
+ * Executes a SQL query and returns the value from the SQL result.
1851
+ * If the SQL result contains more than one column and/or more than one row, this function returns the value in the column and row specified.
1852
+ * If $query is null, this function returns the value in the specified column and row from the previous SQL result.
1853
+ *
1854
+ * @since 0.71
1855
+ *
1856
+ * @param string|null $query Optional. SQL query. Defaults to null, use the result from the previous query.
1857
+ * @param int $x Optional. Column of value to return. Indexed from 0.
1858
+ * @param int $y Optional. Row of value to return. Indexed from 0.
1859
+ * @return string|null Database query result (as string), or null on failure
1860
+ */
1861
+ public function get_var( $query = null, $x = 0, $y = 0 ) {
1862
+ $this->func_call = "\$db->get_var(\"$query\", $x, $y)";
1863
+ if ( $query )
1864
+ $this->query( $query );
1865
+
1866
+ // Extract var out of cached results based x,y vals
1867
+ if ( !empty( $this->last_result[$y] ) ) {
1868
+ $values = array_values( get_object_vars( $this->last_result[$y] ) );
1869
+ }
1870
+
1871
+ // If there is a value return it else return null
1872
+ return ( isset( $values[$x] ) && $values[$x] !== '' ) ? $values[$x] : null;
1873
+ }
1874
+
1875
+ /**
1876
+ * Retrieve one row from the database.
1877
+ *
1878
+ * Executes a SQL query and returns the row from the SQL result.
1879
+ *
1880
+ * @since 0.71
1881
+ *
1882
+ * @param string|null $query SQL query.
1883
+ * @param string $output Optional. one of ARRAY_A | ARRAY_N | OBJECT constants. Return an associative array (column => value, ...),
1884
+ * a numerically indexed array (0 => value, ...) or an object ( ->column = value ), respectively.
1885
+ * @param int $y Optional. Row to return. Indexed from 0.
1886
+ * @return mixed Database query result in format specified by $output or null on failure
1887
+ */
1888
+ public function get_row( $query = null, $output = OBJECT, $y = 0 ) {
1889
+ $this->func_call = "\$db->get_row(\"$query\",$output,$y)";
1890
+ if ( $query )
1891
+ $this->query( $query );
1892
+ else
1893
+ return null;
1894
+
1895
+ if ( !isset( $this->last_result[$y] ) )
1896
+ return null;
1897
+
1898
+ if ( $output == OBJECT ) {
1899
+ return $this->last_result[$y] ? $this->last_result[$y] : null;
1900
+ } elseif ( $output == ARRAY_A ) {
1901
+ return $this->last_result[$y] ? get_object_vars( $this->last_result[$y] ) : null;
1902
+ } elseif ( $output == ARRAY_N ) {
1903
+ return $this->last_result[$y] ? array_values( get_object_vars( $this->last_result[$y] ) ) : null;
1904
+ } elseif ( strtoupper( $output ) === OBJECT ) {
1905
+ // Back compat for OBJECT being previously case insensitive.
1906
+ return $this->last_result[$y] ? $this->last_result[$y] : null;
1907
+ } else {
1908
+ $this->print_error( " \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N" );
1909
+ }
1910
+ }
1911
+
1912
+ /**
1913
+ * Retrieve one column from the database.
1914
+ *
1915
+ * Executes a SQL query and returns the column from the SQL result.
1916
+ * If the SQL result contains more than one column, this function returns the column specified.
1917
+ * If $query is null, this function returns the specified column from the previous SQL result.
1918
+ *
1919
+ * @since 0.71
1920
+ *
1921
+ * @param string|null $query Optional. SQL query. Defaults to previous query.
1922
+ * @param int $x Optional. Column to return. Indexed from 0.
1923
+ * @return array Database query result. Array indexed from 0 by SQL result row number.
1924
+ */
1925
+ public function get_col( $query = null , $x = 0 ) {
1926
+ if ( $query )
1927
+ $this->query( $query );
1928
+
1929
+ $new_array = array();
1930
+ // Extract the column values
1931
+ for ( $i = 0, $j = count( $this->last_result ); $i < $j; $i++ ) {
1932
+ $new_array[$i] = $this->get_var( null, $x, $i );
1933
+ }
1934
+ return $new_array;
1935
+ }
1936
+
1937
+ /**
1938
+ * Retrieve an entire SQL result set from the database (i.e., many rows)
1939
+ *
1940
+ * Executes a SQL query and returns the entire SQL result.
1941
+ *
1942
+ * @since 0.71
1943
+ *
1944
+ * @param string $query SQL query.
1945
+ * @param string $output Optional. Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants. With one of the first three, return an array of rows indexed from 0 by SQL result row number.
1946
+ * Each row is an associative array (column => value, ...), a numerically indexed array (0 => value, ...), or an object. ( ->column = value ), respectively.
1947
+ * With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value. Duplicate keys are discarded.
1948
+ * @return mixed Database query results
1949
+ */
1950
+ public function get_results( $query = null, $output = OBJECT ) {
1951
+ $this->func_call = "\$db->get_results(\"$query\", $output)";
1952
+
1953
+ if ( $query )
1954
+ $this->query( $query );
1955
+ else
1956
+ return null;
1957
+
1958
+ $new_array = array();
1959
+ if ( $output == OBJECT ) {
1960
+ // Return an integer-keyed array of row objects
1961
+ return $this->last_result;
1962
+ } elseif ( $output == OBJECT_K ) {
1963
+ // Return an array of row objects with keys from column 1
1964
+ // (Duplicates are discarded)
1965
+ foreach ( $this->last_result as $row ) {
1966
+ $var_by_ref = get_object_vars( $row );
1967
+ $key = array_shift( $var_by_ref );
1968
+ if ( ! isset( $new_array[ $key ] ) )
1969
+ $new_array[ $key ] = $row;
1970
+ }
1971
+ return $new_array;
1972
+ } elseif ( $output == ARRAY_A || $output == ARRAY_N ) {
1973
+ // Return an integer-keyed array of...
1974
+ if ( $this->last_result ) {
1975
+ foreach( (array) $this->last_result as $row ) {
1976
+ if ( $output == ARRAY_N ) {
1977
+ // ...integer-keyed row arrays
1978
+ $new_array[] = array_values( get_object_vars( $row ) );
1979
+ } else {
1980
+ // ...column name-keyed row arrays
1981
+ $new_array[] = get_object_vars( $row );
1982
+ }
1983
+ }
1984
+ }
1985
+ return $new_array;
1986
+ } elseif ( strtoupper( $output ) === OBJECT ) {
1987
+ // Back compat for OBJECT being previously case insensitive.
1988
+ return $this->last_result;
1989
+ }
1990
+ return null;
1991
+ }
1992
+
1993
+ /**
1994
+ * Load the column metadata from the last query.
1995
+ *
1996
+ * @since 3.5.0
1997
+ *
1998
+ * @access protected
1999
+ */
2000
+ protected function load_col_info() {
2001
+ if ( $this->col_info )
2002
+ return;
2003
+
2004
+ if ( $this->use_mysqli ) {
2005
+ for ( $i = 0; $i < @mysqli_num_fields( $this->result ); $i++ ) {
2006
+ $this->col_info[ $i ] = @mysqli_fetch_field( $this->result );
2007
+ }
2008
+ } else {
2009
+ for ( $i = 0; $i < @mysql_num_fields( $this->result ); $i++ ) {
2010
+ $this->col_info[ $i ] = @mysql_fetch_field( $this->result, $i );
2011
+ }
2012
+ }
2013
+ }
2014
+
2015
+ /**
2016
+ * Retrieve column metadata from the last query.
2017
+ *
2018
+ * @since 0.71
2019
+ *
2020
+ * @param string $info_type Optional. Type one of name, table, def, max_length, not_null, primary_key, multiple_key, unique_key, numeric, blob, type, unsigned, zerofill
2021
+ * @param int $col_offset Optional. 0: col name. 1: which table the col's in. 2: col's max length. 3: if the col is numeric. 4: col's type
2022
+ * @return mixed Column Results
2023
+ */
2024
+ public function get_col_info( $info_type = 'name', $col_offset = -1 ) {
2025
+ $this->load_col_info();
2026
+
2027
+ if ( $this->col_info ) {
2028
+ if ( $col_offset == -1 ) {
2029
+ $i = 0;
2030
+ $new_array = array();
2031
+ foreach( (array) $this->col_info as $col ) {
2032
+ $new_array[$i] = $col->{$info_type};
2033
+ $i++;
2034
+ }
2035
+ return $new_array;
2036
+ } else {
2037
+ return $this->col_info[$col_offset]->{$info_type};
2038
+ }
2039
+ }
2040
+ }
2041
+
2042
+ /**
2043
+ * Starts the timer, for debugging purposes.
2044
+ *
2045
+ * @since 1.5.0
2046
+ *
2047
+ * @return true
2048
+ */
2049
+ public function timer_start() {
2050
+ $this->time_start = microtime( true );
2051
+ return true;
2052
+ }
2053
+
2054
+ /**
2055
+ * Stops the debugging timer.
2056
+ *
2057
+ * @since 1.5.0
2058
+ *
2059
+ * @return float Total time spent on the query, in seconds
2060
+ */
2061
+ public function timer_stop() {
2062
+ return ( microtime( true ) - $this->time_start );
2063
+ }
2064
+
2065
+ /**
2066
+ * Wraps errors in a nice header and footer and dies.
2067
+ *
2068
+ * Will not die if wpdb::$show_errors is false.
2069
+ *
2070
+ * @since 1.5.0
2071
+ *
2072
+ * @param string $message The Error message
2073
+ * @param string $error_code Optional. A Computer readable string to identify the error.
2074
+ * @return false|void
2075
+ */
2076
+ public function bail( $message, $error_code = '500' ) {
2077
+ if ( !$this->show_errors ) {
2078
+ if ( class_exists( 'WP_Error' ) )
2079
+ $this->error = new WP_Error($error_code, $message);
2080
+ else
2081
+ $this->error = $message;
2082
+ return false;
2083
+ }
2084
+ wp_die($message);
2085
+ }
2086
+
2087
+ /**
2088
+ * Whether MySQL database is at least the required minimum version.
2089
+ *
2090
+ * @since 2.5.0
2091
+ * @uses $wp_version
2092
+ * @uses $required_mysql_version
2093
+ *
2094
+ * @return WP_Error
2095
+ */
2096
+ public function check_database_version() {
2097
+ global $wp_version, $required_mysql_version;
2098
+ // Make sure the server has the required MySQL version
2099
+ if ( version_compare($this->db_version(), $required_mysql_version, '<') )
2100
+ return new WP_Error('database_version', sprintf( __( '<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ));
2101
+ }
2102
+
2103
+ /**
2104
+ * Whether the database supports collation.
2105
+ *
2106
+ * Called when WordPress is generating the table scheme.
2107
+ *
2108
+ * @since 2.5.0
2109
+ * @deprecated 3.5.0
2110
+ * @deprecated Use wpdb::has_cap( 'collation' )
2111
+ *
2112
+ * @return bool True if collation is supported, false if version does not
2113
+ */
2114
+ public function supports_collation() {
2115
+ _deprecated_function( __FUNCTION__, '3.5', 'wpdb::has_cap( \'collation\' )' );
2116
+ return $this->has_cap( 'collation' );
2117
+ }
2118
+
2119
+ /**
2120
+ * The database character collate.
2121
+ *
2122
+ * @since 3.5.0
2123
+ *
2124
+ * @return string The database character collate.
2125
+ */
2126
+ public function get_charset_collate() {
2127
+ $charset_collate = '';
2128
+
2129
+ if ( ! empty( $this->charset ) )
2130
+ $charset_collate = "DEFAULT CHARACTER SET $this->charset";
2131
+ if ( ! empty( $this->collate ) )
2132
+ $charset_collate .= " COLLATE $this->collate";
2133
+
2134
+ return $charset_collate;
2135
+ }
2136
+
2137
+ /**
2138
+ * Determine if a database supports a particular feature.
2139
+ *
2140
+ * @since 2.7.0
2141
+ * @see wpdb::db_version()
2142
+ *
2143
+ * @param string $db_cap The feature to check for.
2144
+ * @return bool
2145
+ */
2146
+ public function has_cap( $db_cap ) {
2147
+ $version = $this->db_version();
2148
+
2149
+ switch ( strtolower( $db_cap ) ) {
2150
+ case 'collation' : // @since 2.5.0
2151
+ case 'group_concat' : // @since 2.7.0
2152
+ case 'subqueries' : // @since 2.7.0
2153
+ return version_compare( $version, '4.1', '>=' );
2154
+ case 'set_charset' :
2155
+ return version_compare( $version, '5.0.7', '>=' );
2156
+ }
2157
+
2158
+ return false;
2159
+ }
2160
+
2161
+ /**
2162
+ * Retrieve the name of the function that called wpdb.
2163
+ *
2164
+ * Searches up the list of functions until it reaches
2165
+ * the one that would most logically had called this method.
2166
+ *
2167
+ * @since 2.5.0
2168
+ *
2169
+ * @return string The name of the calling function
2170
+ */
2171
+ public function get_caller() {
2172
+ return wp_debug_backtrace_summary( __CLASS__ );
2173
+ }
2174
+
2175
+ /**
2176
+ * The database version number.
2177
+ *
2178
+ * @since 2.7.0
2179
+ *
2180
+ * @return false|string false on failure, version number on success
2181
+ */
2182
+ public function db_version() {
2183
+ if ( $this->use_mysqli ) {
2184
+ $server_info = mysqli_get_server_info( $this->dbh );
2185
+ } else {
2186
+ $server_info = mysql_get_server_info( $this->dbh );
2187
+ }
2188
+ return preg_replace( '/[^0-9.].*/', '', $server_info );
2189
+ }
2190
+ }