stump-cli 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1310) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +3 -16
  6. data/Rakefile +2 -0
  7. data/bin/stump-cli +58 -0
  8. data/lib/stump-cli/version.rb +3 -0
  9. data/lib/stump.rb +5 -0
  10. data/lib/wp/Movefile-example +62 -0
  11. data/lib/wp/README.md +25 -0
  12. data/lib/wp/index.php +17 -0
  13. data/lib/wp/license.txt +385 -0
  14. data/lib/wp/readme.html +96 -0
  15. data/lib/wp/wp-activate.php +131 -0
  16. data/lib/wp/wp-admin/about.php +193 -0
  17. data/lib/wp/wp-admin/admin-ajax.php +98 -0
  18. data/lib/wp/wp-admin/admin-footer.php +99 -0
  19. data/lib/wp/wp-admin/admin-functions.php +15 -0
  20. data/lib/wp/wp-admin/admin-header.php +243 -0
  21. data/lib/wp/wp-admin/admin-post.php +71 -0
  22. data/lib/wp/wp-admin/admin.php +347 -0
  23. data/lib/wp/wp-admin/async-upload.php +114 -0
  24. data/lib/wp/wp-admin/comment.php +299 -0
  25. data/lib/wp/wp-admin/credits.php +192 -0
  26. data/lib/wp/wp-admin/css/about-rtl.css +446 -0
  27. data/lib/wp/wp-admin/css/about.css +446 -0
  28. data/lib/wp/wp-admin/css/admin-menu-rtl.css +917 -0
  29. data/lib/wp/wp-admin/css/admin-menu.css +917 -0
  30. data/lib/wp/wp-admin/css/color-picker-rtl.css +127 -0
  31. data/lib/wp/wp-admin/css/color-picker-rtl.min.css +1 -0
  32. data/lib/wp/wp-admin/css/color-picker.css +127 -0
  33. data/lib/wp/wp-admin/css/color-picker.min.css +1 -0
  34. data/lib/wp/wp-admin/css/colors/_admin.scss +525 -0
  35. data/lib/wp/wp-admin/css/colors/_mixins.scss +43 -0
  36. data/lib/wp/wp-admin/css/colors/_variables.scss +58 -0
  37. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.css +341 -0
  38. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.min.css +1 -0
  39. data/lib/wp/wp-admin/css/colors/blue/colors.css +341 -0
  40. data/lib/wp/wp-admin/css/colors/blue/colors.min.css +1 -0
  41. data/lib/wp/wp-admin/css/colors/blue/colors.scss +11 -0
  42. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.css +341 -0
  43. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.min.css +1 -0
  44. data/lib/wp/wp-admin/css/colors/coffee/colors.css +341 -0
  45. data/lib/wp/wp-admin/css/colors/coffee/colors.min.css +1 -0
  46. data/lib/wp/wp-admin/css/colors/coffee/colors.scss +7 -0
  47. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.css +341 -0
  48. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.min.css +1 -0
  49. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.css +341 -0
  50. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.min.css +1 -0
  51. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.scss +8 -0
  52. data/lib/wp/wp-admin/css/colors/light/colors-rtl.css +349 -0
  53. data/lib/wp/wp-admin/css/colors/light/colors-rtl.min.css +1 -0
  54. data/lib/wp/wp-admin/css/colors/light/colors.css +349 -0
  55. data/lib/wp/wp-admin/css/colors/light/colors.min.css +1 -0
  56. data/lib/wp/wp-admin/css/colors/light/colors.scss +38 -0
  57. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.css +341 -0
  58. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.min.css +1 -0
  59. data/lib/wp/wp-admin/css/colors/midnight/colors.css +341 -0
  60. data/lib/wp/wp-admin/css/colors/midnight/colors.min.css +1 -0
  61. data/lib/wp/wp-admin/css/colors/midnight/colors.scss +5 -0
  62. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.css +341 -0
  63. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.min.css +1 -0
  64. data/lib/wp/wp-admin/css/colors/ocean/colors.css +341 -0
  65. data/lib/wp/wp-admin/css/colors/ocean/colors.min.css +1 -0
  66. data/lib/wp/wp-admin/css/colors/ocean/colors.scss +8 -0
  67. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.css +341 -0
  68. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.min.css +1 -0
  69. data/lib/wp/wp-admin/css/colors/sunrise/colors.css +341 -0
  70. data/lib/wp/wp-admin/css/colors/sunrise/colors.min.css +1 -0
  71. data/lib/wp/wp-admin/css/colors/sunrise/colors.scss +6 -0
  72. data/lib/wp/wp-admin/css/common-rtl.css +3212 -0
  73. data/lib/wp/wp-admin/css/common.css +3212 -0
  74. data/lib/wp/wp-admin/css/customize-controls-rtl.css +889 -0
  75. data/lib/wp/wp-admin/css/customize-controls-rtl.min.css +1 -0
  76. data/lib/wp/wp-admin/css/customize-controls.css +889 -0
  77. data/lib/wp/wp-admin/css/customize-controls.min.css +1 -0
  78. data/lib/wp/wp-admin/css/customize-widgets-rtl.css +603 -0
  79. data/lib/wp/wp-admin/css/customize-widgets-rtl.min.css +1 -0
  80. data/lib/wp/wp-admin/css/customize-widgets.css +603 -0
  81. data/lib/wp/wp-admin/css/customize-widgets.min.css +1 -0
  82. data/lib/wp/wp-admin/css/dashboard-rtl.css +1116 -0
  83. data/lib/wp/wp-admin/css/dashboard.css +1116 -0
  84. data/lib/wp/wp-admin/css/deprecated-media-rtl.css +371 -0
  85. data/lib/wp/wp-admin/css/deprecated-media-rtl.min.css +1 -0
  86. data/lib/wp/wp-admin/css/deprecated-media.css +371 -0
  87. data/lib/wp/wp-admin/css/deprecated-media.min.css +1 -0
  88. data/lib/wp/wp-admin/css/edit-rtl.css +1501 -0
  89. data/lib/wp/wp-admin/css/edit.css +1501 -0
  90. data/lib/wp/wp-admin/css/farbtastic-rtl.css +41 -0
  91. data/lib/wp/wp-admin/css/farbtastic.css +41 -0
  92. data/lib/wp/wp-admin/css/forms-rtl.css +992 -0
  93. data/lib/wp/wp-admin/css/forms.css +992 -0
  94. data/lib/wp/wp-admin/css/ie-rtl.css +785 -0
  95. data/lib/wp/wp-admin/css/ie-rtl.min.css +1 -0
  96. data/lib/wp/wp-admin/css/ie.css +785 -0
  97. data/lib/wp/wp-admin/css/ie.min.css +1 -0
  98. data/lib/wp/wp-admin/css/install-rtl.css +389 -0
  99. data/lib/wp/wp-admin/css/install-rtl.min.css +1 -0
  100. data/lib/wp/wp-admin/css/install.css +389 -0
  101. data/lib/wp/wp-admin/css/install.min.css +1 -0
  102. data/lib/wp/wp-admin/css/l10n-rtl.css +101 -0
  103. data/lib/wp/wp-admin/css/l10n.css +101 -0
  104. data/lib/wp/wp-admin/css/list-tables-rtl.css +1875 -0
  105. data/lib/wp/wp-admin/css/list-tables.css +1875 -0
  106. data/lib/wp/wp-admin/css/login-rtl.css +269 -0
  107. data/lib/wp/wp-admin/css/login-rtl.min.css +1 -0
  108. data/lib/wp/wp-admin/css/login.css +269 -0
  109. data/lib/wp/wp-admin/css/login.min.css +1 -0
  110. data/lib/wp/wp-admin/css/media-rtl.css +1196 -0
  111. data/lib/wp/wp-admin/css/media.css +1196 -0
  112. data/lib/wp/wp-admin/css/nav-menus-rtl.css +857 -0
  113. data/lib/wp/wp-admin/css/nav-menus.css +857 -0
  114. data/lib/wp/wp-admin/css/press-this-rtl.css +458 -0
  115. data/lib/wp/wp-admin/css/press-this.css +458 -0
  116. data/lib/wp/wp-admin/css/revisions-rtl.css +574 -0
  117. data/lib/wp/wp-admin/css/revisions.css +574 -0
  118. data/lib/wp/wp-admin/css/themes-rtl.css +1732 -0
  119. data/lib/wp/wp-admin/css/themes.css +1732 -0
  120. data/lib/wp/wp-admin/css/widgets-rtl.css +577 -0
  121. data/lib/wp/wp-admin/css/widgets.css +577 -0
  122. data/lib/wp/wp-admin/css/wp-admin-rtl.css +14 -0
  123. data/lib/wp/wp-admin/css/wp-admin-rtl.min.css +1 -0
  124. data/lib/wp/wp-admin/css/wp-admin.css +14 -0
  125. data/lib/wp/wp-admin/css/wp-admin.min.css +1 -0
  126. data/lib/wp/wp-admin/custom-background.php +482 -0
  127. data/lib/wp/wp-admin/custom-header.php +1366 -0
  128. data/lib/wp/wp-admin/customize.php +278 -0
  129. data/lib/wp/wp-admin/edit-comments.php +254 -0
  130. data/lib/wp/wp-admin/edit-form-advanced.php +636 -0
  131. data/lib/wp/wp-admin/edit-form-comment.php +160 -0
  132. data/lib/wp/wp-admin/edit-link-form.php +150 -0
  133. data/lib/wp/wp-admin/edit-tag-form.php +204 -0
  134. data/lib/wp/wp-admin/edit-tags.php +591 -0
  135. data/lib/wp/wp-admin/edit.php +330 -0
  136. data/lib/wp/wp-admin/export.php +243 -0
  137. data/lib/wp/wp-admin/freedoms.php +57 -0
  138. data/lib/wp/wp-admin/images/align-center-2x.png +0 -0
  139. data/lib/wp/wp-admin/images/align-center.png +0 -0
  140. data/lib/wp/wp-admin/images/align-left-2x.png +0 -0
  141. data/lib/wp/wp-admin/images/align-left.png +0 -0
  142. data/lib/wp/wp-admin/images/align-none-2x.png +0 -0
  143. data/lib/wp/wp-admin/images/align-none.png +0 -0
  144. data/lib/wp/wp-admin/images/align-right-2x.png +0 -0
  145. data/lib/wp/wp-admin/images/align-right.png +0 -0
  146. data/lib/wp/wp-admin/images/arrows-2x.png +0 -0
  147. data/lib/wp/wp-admin/images/arrows.png +0 -0
  148. data/lib/wp/wp-admin/images/bubble_bg-2x.gif +0 -0
  149. data/lib/wp/wp-admin/images/bubble_bg.gif +0 -0
  150. data/lib/wp/wp-admin/images/comment-grey-bubble-2x.png +0 -0
  151. data/lib/wp/wp-admin/images/comment-grey-bubble.png +0 -0
  152. data/lib/wp/wp-admin/images/date-button-2x.gif +0 -0
  153. data/lib/wp/wp-admin/images/date-button.gif +0 -0
  154. data/lib/wp/wp-admin/images/generic.png +0 -0
  155. data/lib/wp/wp-admin/images/icons32-2x.png +0 -0
  156. data/lib/wp/wp-admin/images/icons32-vs-2x.png +0 -0
  157. data/lib/wp/wp-admin/images/icons32-vs.png +0 -0
  158. data/lib/wp/wp-admin/images/icons32.png +0 -0
  159. data/lib/wp/wp-admin/images/imgedit-icons-2x.png +0 -0
  160. data/lib/wp/wp-admin/images/imgedit-icons.png +0 -0
  161. data/lib/wp/wp-admin/images/list-2x.png +0 -0
  162. data/lib/wp/wp-admin/images/list.png +0 -0
  163. data/lib/wp/wp-admin/images/loading.gif +0 -0
  164. data/lib/wp/wp-admin/images/marker.png +0 -0
  165. data/lib/wp/wp-admin/images/mask.png +0 -0
  166. data/lib/wp/wp-admin/images/media-button-2x.png +0 -0
  167. data/lib/wp/wp-admin/images/media-button-image.gif +0 -0
  168. data/lib/wp/wp-admin/images/media-button-music.gif +0 -0
  169. data/lib/wp/wp-admin/images/media-button-other.gif +0 -0
  170. data/lib/wp/wp-admin/images/media-button-video.gif +0 -0
  171. data/lib/wp/wp-admin/images/media-button.png +0 -0
  172. data/lib/wp/wp-admin/images/menu-2x.png +0 -0
  173. data/lib/wp/wp-admin/images/menu-vs-2x.png +0 -0
  174. data/lib/wp/wp-admin/images/menu-vs.png +0 -0
  175. data/lib/wp/wp-admin/images/menu.png +0 -0
  176. data/lib/wp/wp-admin/images/no.png +0 -0
  177. data/lib/wp/wp-admin/images/post-formats-vs.png +0 -0
  178. data/lib/wp/wp-admin/images/post-formats.png +0 -0
  179. data/lib/wp/wp-admin/images/post-formats32-vs.png +0 -0
  180. data/lib/wp/wp-admin/images/post-formats32.png +0 -0
  181. data/lib/wp/wp-admin/images/resize-2x.gif +0 -0
  182. data/lib/wp/wp-admin/images/resize-rtl-2x.gif +0 -0
  183. data/lib/wp/wp-admin/images/resize-rtl.gif +0 -0
  184. data/lib/wp/wp-admin/images/resize.gif +0 -0
  185. data/lib/wp/wp-admin/images/se.png +0 -0
  186. data/lib/wp/wp-admin/images/sort-2x.gif +0 -0
  187. data/lib/wp/wp-admin/images/sort.gif +0 -0
  188. data/lib/wp/wp-admin/images/spinner-2x.gif +0 -0
  189. data/lib/wp/wp-admin/images/spinner.gif +0 -0
  190. data/lib/wp/wp-admin/images/stars-2x.png +0 -0
  191. data/lib/wp/wp-admin/images/stars.png +0 -0
  192. data/lib/wp/wp-admin/images/w-logo-blue.png +0 -0
  193. data/lib/wp/wp-admin/images/w-logo-white.png +0 -0
  194. data/lib/wp/wp-admin/images/wheel.png +0 -0
  195. data/lib/wp/wp-admin/images/wordpress-logo-white.svg +1 -0
  196. data/lib/wp/wp-admin/images/wordpress-logo.png +0 -0
  197. data/lib/wp/wp-admin/images/wordpress-logo.svg +1 -0
  198. data/lib/wp/wp-admin/images/wpspin_light-2x.gif +0 -0
  199. data/lib/wp/wp-admin/images/wpspin_light.gif +0 -0
  200. data/lib/wp/wp-admin/images/xit-2x.gif +0 -0
  201. data/lib/wp/wp-admin/images/xit.gif +0 -0
  202. data/lib/wp/wp-admin/images/yes.png +0 -0
  203. data/lib/wp/wp-admin/import.php +132 -0
  204. data/lib/wp/wp-admin/includes/admin.php +74 -0
  205. data/lib/wp/wp-admin/includes/ajax-actions.php +2762 -0
  206. data/lib/wp/wp-admin/includes/bookmark.php +305 -0
  207. data/lib/wp/wp-admin/includes/class-ftp-pure.php +190 -0
  208. data/lib/wp/wp-admin/includes/class-ftp-sockets.php +250 -0
  209. data/lib/wp/wp-admin/includes/class-ftp.php +907 -0
  210. data/lib/wp/wp-admin/includes/class-pclzip.php +5687 -0
  211. data/lib/wp/wp-admin/includes/class-wp-comments-list-table.php +637 -0
  212. data/lib/wp/wp-admin/includes/class-wp-filesystem-base.php +815 -0
  213. data/lib/wp/wp-admin/includes/class-wp-filesystem-direct.php +384 -0
  214. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpext.php +415 -0
  215. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpsockets.php +352 -0
  216. data/lib/wp/wp-admin/includes/class-wp-filesystem-ssh2.php +392 -0
  217. data/lib/wp/wp-admin/includes/class-wp-importer.php +302 -0
  218. data/lib/wp/wp-admin/includes/class-wp-links-list-table.php +207 -0
  219. data/lib/wp/wp-admin/includes/class-wp-list-table.php +1080 -0
  220. data/lib/wp/wp-admin/includes/class-wp-media-list-table.php +574 -0
  221. data/lib/wp/wp-admin/includes/class-wp-ms-sites-list-table.php +402 -0
  222. data/lib/wp/wp-admin/includes/class-wp-ms-themes-list-table.php +459 -0
  223. data/lib/wp/wp-admin/includes/class-wp-ms-users-list-table.php +303 -0
  224. data/lib/wp/wp-admin/includes/class-wp-plugin-install-list-table.php +490 -0
  225. data/lib/wp/wp-admin/includes/class-wp-plugins-list-table.php +605 -0
  226. data/lib/wp/wp-admin/includes/class-wp-posts-list-table.php +1306 -0
  227. data/lib/wp/wp-admin/includes/class-wp-terms-list-table.php +466 -0
  228. data/lib/wp/wp-admin/includes/class-wp-theme-install-list-table.php +431 -0
  229. data/lib/wp/wp-admin/includes/class-wp-themes-list-table.php +279 -0
  230. data/lib/wp/wp-admin/includes/class-wp-upgrader-skins.php +767 -0
  231. data/lib/wp/wp-admin/includes/class-wp-upgrader.php +2676 -0
  232. data/lib/wp/wp-admin/includes/class-wp-users-list-table.php +459 -0
  233. data/lib/wp/wp-admin/includes/comment.php +171 -0
  234. data/lib/wp/wp-admin/includes/continents-cities.php +493 -0
  235. data/lib/wp/wp-admin/includes/dashboard.php +1333 -0
  236. data/lib/wp/wp-admin/includes/deprecated.php +1190 -0
  237. data/lib/wp/wp-admin/includes/export.php +508 -0
  238. data/lib/wp/wp-admin/includes/file.php +1152 -0
  239. data/lib/wp/wp-admin/includes/image-edit.php +828 -0
  240. data/lib/wp/wp-admin/includes/image.php +598 -0
  241. data/lib/wp/wp-admin/includes/import.php +206 -0
  242. data/lib/wp/wp-admin/includes/list-table.php +113 -0
  243. data/lib/wp/wp-admin/includes/media.php +3012 -0
  244. data/lib/wp/wp-admin/includes/menu.php +322 -0
  245. data/lib/wp/wp-admin/includes/meta-boxes.php +1119 -0
  246. data/lib/wp/wp-admin/includes/misc.php +845 -0
  247. data/lib/wp/wp-admin/includes/ms-deprecated.php +78 -0
  248. data/lib/wp/wp-admin/includes/ms.php +814 -0
  249. data/lib/wp/wp-admin/includes/nav-menu.php +1328 -0
  250. data/lib/wp/wp-admin/includes/plugin-install.php +550 -0
  251. data/lib/wp/wp-admin/includes/plugin.php +1899 -0
  252. data/lib/wp/wp-admin/includes/post.php +1661 -0
  253. data/lib/wp/wp-admin/includes/revision.php +228 -0
  254. data/lib/wp/wp-admin/includes/schema.php +1038 -0
  255. data/lib/wp/wp-admin/includes/screen.php +1179 -0
  256. data/lib/wp/wp-admin/includes/taxonomy.php +284 -0
  257. data/lib/wp/wp-admin/includes/template.php +2157 -0
  258. data/lib/wp/wp-admin/includes/theme-install.php +205 -0
  259. data/lib/wp/wp-admin/includes/theme.php +474 -0
  260. data/lib/wp/wp-admin/includes/translation-install.php +240 -0
  261. data/lib/wp/wp-admin/includes/update-core.php +1186 -0
  262. data/lib/wp/wp-admin/includes/update.php +432 -0
  263. data/lib/wp/wp-admin/includes/upgrade.php +2218 -0
  264. data/lib/wp/wp-admin/includes/user.php +442 -0
  265. data/lib/wp/wp-admin/includes/widgets.php +245 -0
  266. data/lib/wp/wp-admin/index.php +131 -0
  267. data/lib/wp/wp-admin/install-helper.php +199 -0
  268. data/lib/wp/wp-admin/install.php +305 -0
  269. data/lib/wp/wp-admin/js/accordion.js +143 -0
  270. data/lib/wp/wp-admin/js/accordion.min.js +1 -0
  271. data/lib/wp/wp-admin/js/color-picker.js +155 -0
  272. data/lib/wp/wp-admin/js/color-picker.min.js +1 -0
  273. data/lib/wp/wp-admin/js/comment.js +50 -0
  274. data/lib/wp/wp-admin/js/comment.min.js +1 -0
  275. data/lib/wp/wp-admin/js/common.js +804 -0
  276. data/lib/wp/wp-admin/js/common.min.js +1 -0
  277. data/lib/wp/wp-admin/js/custom-background.js +75 -0
  278. data/lib/wp/wp-admin/js/custom-background.min.js +1 -0
  279. data/lib/wp/wp-admin/js/custom-header.js +61 -0
  280. data/lib/wp/wp-admin/js/customize-controls.js +1305 -0
  281. data/lib/wp/wp-admin/js/customize-controls.min.js +1 -0
  282. data/lib/wp/wp-admin/js/customize-widgets.js +1882 -0
  283. data/lib/wp/wp-admin/js/customize-widgets.min.js +1 -0
  284. data/lib/wp/wp-admin/js/dashboard.js +190 -0
  285. data/lib/wp/wp-admin/js/dashboard.min.js +1 -0
  286. data/lib/wp/wp-admin/js/edit-comments.js +625 -0
  287. data/lib/wp/wp-admin/js/edit-comments.min.js +1 -0
  288. data/lib/wp/wp-admin/js/editor-expand.js +705 -0
  289. data/lib/wp/wp-admin/js/editor-expand.min.js +1 -0
  290. data/lib/wp/wp-admin/js/editor.js +324 -0
  291. data/lib/wp/wp-admin/js/editor.min.js +1 -0
  292. data/lib/wp/wp-admin/js/farbtastic.js +276 -0
  293. data/lib/wp/wp-admin/js/gallery.js +237 -0
  294. data/lib/wp/wp-admin/js/gallery.min.js +1 -0
  295. data/lib/wp/wp-admin/js/image-edit.js +633 -0
  296. data/lib/wp/wp-admin/js/image-edit.min.js +1 -0
  297. data/lib/wp/wp-admin/js/inline-edit-post.js +359 -0
  298. data/lib/wp/wp-admin/js/inline-edit-post.min.js +1 -0
  299. data/lib/wp/wp-admin/js/inline-edit-tax.js +142 -0
  300. data/lib/wp/wp-admin/js/inline-edit-tax.min.js +1 -0
  301. data/lib/wp/wp-admin/js/iris.min.js +4 -0
  302. data/lib/wp/wp-admin/js/language-chooser.js +26 -0
  303. data/lib/wp/wp-admin/js/language-chooser.min.js +1 -0
  304. data/lib/wp/wp-admin/js/link.js +69 -0
  305. data/lib/wp/wp-admin/js/link.min.js +1 -0
  306. data/lib/wp/wp-admin/js/media-gallery.js +26 -0
  307. data/lib/wp/wp-admin/js/media-gallery.min.js +1 -0
  308. data/lib/wp/wp-admin/js/media-upload.js +69 -0
  309. data/lib/wp/wp-admin/js/media-upload.min.js +1 -0
  310. data/lib/wp/wp-admin/js/media.js +111 -0
  311. data/lib/wp/wp-admin/js/media.min.js +1 -0
  312. data/lib/wp/wp-admin/js/nav-menu.js +1205 -0
  313. data/lib/wp/wp-admin/js/nav-menu.min.js +1 -0
  314. data/lib/wp/wp-admin/js/password-strength-meter.js +75 -0
  315. data/lib/wp/wp-admin/js/password-strength-meter.min.js +1 -0
  316. data/lib/wp/wp-admin/js/plugin-install.js +76 -0
  317. data/lib/wp/wp-admin/js/plugin-install.min.js +1 -0
  318. data/lib/wp/wp-admin/js/post.js +1094 -0
  319. data/lib/wp/wp-admin/js/post.min.js +1 -0
  320. data/lib/wp/wp-admin/js/postbox.js +199 -0
  321. data/lib/wp/wp-admin/js/postbox.min.js +1 -0
  322. data/lib/wp/wp-admin/js/revisions.js +1110 -0
  323. data/lib/wp/wp-admin/js/revisions.min.js +1 -0
  324. data/lib/wp/wp-admin/js/set-post-thumbnail.js +24 -0
  325. data/lib/wp/wp-admin/js/set-post-thumbnail.min.js +1 -0
  326. data/lib/wp/wp-admin/js/svg-painter.js +240 -0
  327. data/lib/wp/wp-admin/js/svg-painter.min.js +1 -0
  328. data/lib/wp/wp-admin/js/tags.js +72 -0
  329. data/lib/wp/wp-admin/js/tags.min.js +1 -0
  330. data/lib/wp/wp-admin/js/theme.js +1691 -0
  331. data/lib/wp/wp-admin/js/theme.min.js +1 -0
  332. data/lib/wp/wp-admin/js/updates.js +65 -0
  333. data/lib/wp/wp-admin/js/updates.min.js +1 -0
  334. data/lib/wp/wp-admin/js/user-profile.js +127 -0
  335. data/lib/wp/wp-admin/js/user-profile.min.js +1 -0
  336. data/lib/wp/wp-admin/js/user-suggest.js +30 -0
  337. data/lib/wp/wp-admin/js/user-suggest.min.js +1 -0
  338. data/lib/wp/wp-admin/js/widgets.js +494 -0
  339. data/lib/wp/wp-admin/js/widgets.min.js +1 -0
  340. data/lib/wp/wp-admin/js/word-count.js +44 -0
  341. data/lib/wp/wp-admin/js/word-count.min.js +1 -0
  342. data/lib/wp/wp-admin/js/wp-fullscreen.js +704 -0
  343. data/lib/wp/wp-admin/js/wp-fullscreen.min.js +1 -0
  344. data/lib/wp/wp-admin/js/xfn.js +17 -0
  345. data/lib/wp/wp-admin/js/xfn.min.js +1 -0
  346. data/lib/wp/wp-admin/link-add.php +29 -0
  347. data/lib/wp/wp-admin/link-manager.php +99 -0
  348. data/lib/wp/wp-admin/link-parse-opml.php +84 -0
  349. data/lib/wp/wp-admin/link.php +117 -0
  350. data/lib/wp/wp-admin/load-scripts.php +162 -0
  351. data/lib/wp/wp-admin/load-styles.php +153 -0
  352. data/lib/wp/wp-admin/maint/repair.php +124 -0
  353. data/lib/wp/wp-admin/media-new.php +84 -0
  354. data/lib/wp/wp-admin/media-upload.php +100 -0
  355. data/lib/wp/wp-admin/media.php +146 -0
  356. data/lib/wp/wp-admin/menu-header.php +227 -0
  357. data/lib/wp/wp-admin/menu.php +255 -0
  358. data/lib/wp/wp-admin/moderation.php +12 -0
  359. data/lib/wp/wp-admin/ms-admin.php +13 -0
  360. data/lib/wp/wp-admin/ms-delete-site.php +91 -0
  361. data/lib/wp/wp-admin/ms-edit.php +13 -0
  362. data/lib/wp/wp-admin/ms-options.php +12 -0
  363. data/lib/wp/wp-admin/ms-sites.php +13 -0
  364. data/lib/wp/wp-admin/ms-themes.php +13 -0
  365. data/lib/wp/wp-admin/ms-upgrade-network.php +13 -0
  366. data/lib/wp/wp-admin/ms-users.php +13 -0
  367. data/lib/wp/wp-admin/my-sites.php +145 -0
  368. data/lib/wp/wp-admin/nav-menus.php +798 -0
  369. data/lib/wp/wp-admin/network.php +561 -0
  370. data/lib/wp/wp-admin/network/about.php +16 -0
  371. data/lib/wp/wp-admin/network/admin.php +32 -0
  372. data/lib/wp/wp-admin/network/credits.php +16 -0
  373. data/lib/wp/wp-admin/network/edit.php +42 -0
  374. data/lib/wp/wp-admin/network/freedoms.php +16 -0
  375. data/lib/wp/wp-admin/network/index.php +79 -0
  376. data/lib/wp/wp-admin/network/menu.php +63 -0
  377. data/lib/wp/wp-admin/network/plugin-editor.php +16 -0
  378. data/lib/wp/wp-admin/network/plugin-install.php +19 -0
  379. data/lib/wp/wp-admin/network/plugins.php +16 -0
  380. data/lib/wp/wp-admin/network/profile.php +16 -0
  381. data/lib/wp/wp-admin/network/settings.php +347 -0
  382. data/lib/wp/wp-admin/network/setup.php +16 -0
  383. data/lib/wp/wp-admin/network/site-info.php +178 -0
  384. data/lib/wp/wp-admin/network/site-new.php +153 -0
  385. data/lib/wp/wp-admin/network/site-settings.php +173 -0
  386. data/lib/wp/wp-admin/network/site-themes.php +185 -0
  387. data/lib/wp/wp-admin/network/site-users.php +319 -0
  388. data/lib/wp/wp-admin/network/sites.php +275 -0
  389. data/lib/wp/wp-admin/network/theme-editor.php +16 -0
  390. data/lib/wp/wp-admin/network/theme-install.php +19 -0
  391. data/lib/wp/wp-admin/network/themes.php +291 -0
  392. data/lib/wp/wp-admin/network/update-core.php +16 -0
  393. data/lib/wp/wp-admin/network/update.php +19 -0
  394. data/lib/wp/wp-admin/network/upgrade.php +120 -0
  395. data/lib/wp/wp-admin/network/user-edit.php +16 -0
  396. data/lib/wp/wp-admin/network/user-new.php +106 -0
  397. data/lib/wp/wp-admin/network/users.php +296 -0
  398. data/lib/wp/wp-admin/options-discussion.php +273 -0
  399. data/lib/wp/wp-admin/options-general.php +355 -0
  400. data/lib/wp/wp-admin/options-head.php +18 -0
  401. data/lib/wp/wp-admin/options-media.php +136 -0
  402. data/lib/wp/wp-admin/options-permalink.php +289 -0
  403. data/lib/wp/wp-admin/options-reading.php +184 -0
  404. data/lib/wp/wp-admin/options-writing.php +194 -0
  405. data/lib/wp/wp-admin/options.php +265 -0
  406. data/lib/wp/wp-admin/plugin-editor.php +279 -0
  407. data/lib/wp/wp-admin/plugin-install.php +134 -0
  408. data/lib/wp/wp-admin/plugins.php +474 -0
  409. data/lib/wp/wp-admin/post-new.php +74 -0
  410. data/lib/wp/wp-admin/post.php +318 -0
  411. data/lib/wp/wp-admin/press-this.php +691 -0
  412. data/lib/wp/wp-admin/profile.php +18 -0
  413. data/lib/wp/wp-admin/revision.php +221 -0
  414. data/lib/wp/wp-admin/setup-config.php +345 -0
  415. data/lib/wp/wp-admin/theme-editor.php +243 -0
  416. data/lib/wp/wp-admin/theme-install.php +278 -0
  417. data/lib/wp/wp-admin/themes.php +374 -0
  418. data/lib/wp/wp-admin/tools.php +75 -0
  419. data/lib/wp/wp-admin/update-core.php +653 -0
  420. data/lib/wp/wp-admin/update.php +272 -0
  421. data/lib/wp/wp-admin/upgrade-functions.php +12 -0
  422. data/lib/wp/wp-admin/upgrade.php +116 -0
  423. data/lib/wp/wp-admin/upload.php +292 -0
  424. data/lib/wp/wp-admin/user-edit.php +557 -0
  425. data/lib/wp/wp-admin/user-new.php +439 -0
  426. data/lib/wp/wp-admin/user/about.php +13 -0
  427. data/lib/wp/wp-admin/user/admin.php +32 -0
  428. data/lib/wp/wp-admin/user/credits.php +13 -0
  429. data/lib/wp/wp-admin/user/freedoms.php +13 -0
  430. data/lib/wp/wp-admin/user/index.php +12 -0
  431. data/lib/wp/wp-admin/user/menu.php +22 -0
  432. data/lib/wp/wp-admin/user/profile.php +12 -0
  433. data/lib/wp/wp-admin/user/user-edit.php +12 -0
  434. data/lib/wp/wp-admin/users.php +460 -0
  435. data/lib/wp/wp-admin/widgets.php +442 -0
  436. data/lib/wp/wp-blog-header.php +18 -0
  437. data/lib/wp/wp-comments-post.php +164 -0
  438. data/lib/wp/wp-config-sample.php +80 -0
  439. data/lib/wp/wp-content/index.php +2 -0
  440. data/lib/wp/wp-content/plugins/hello.php +82 -0
  441. data/lib/wp/wp-content/plugins/index.php +2 -0
  442. data/lib/wp/wp-content/themes/index.php +2 -0
  443. data/lib/wp/wp-content/themes/stump/.editorconfig +11 -0
  444. data/lib/wp/wp-content/themes/stump/.jshintrc +16 -0
  445. data/lib/wp/wp-content/themes/stump/404.php +13 -0
  446. data/lib/wp/wp-content/themes/stump/CHANGELOG.md +333 -0
  447. data/lib/wp/wp-content/themes/stump/CONTRIBUTING.md +121 -0
  448. data/lib/wp/wp-content/themes/stump/Gruntfile.js +151 -0
  449. data/lib/wp/wp-content/themes/stump/LICENSE.md +19 -0
  450. data/lib/wp/wp-content/themes/stump/assets/coffee/build/.gitkeep +0 -0
  451. data/lib/wp/wp-content/themes/stump/assets/coffee/build/site.js +6 -0
  452. data/lib/wp/wp-content/themes/stump/assets/css/editor-style.css +548 -0
  453. data/lib/wp/wp-content/themes/stump/assets/css/main.min.css +4 -0
  454. data/lib/wp/wp-content/themes/stump/assets/css/main.min.css.map +7 -0
  455. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  456. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  457. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  458. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  459. data/lib/wp/wp-content/themes/stump/assets/img/.gitignore +0 -0
  460. data/lib/wp/wp-content/themes/stump/assets/js/_main.js +63 -0
  461. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/affix.js +137 -0
  462. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/alert.js +88 -0
  463. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/button.js +107 -0
  464. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/carousel.js +205 -0
  465. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/collapse.js +170 -0
  466. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/dropdown.js +147 -0
  467. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/modal.js +243 -0
  468. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/popover.js +110 -0
  469. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/scrollspy.js +153 -0
  470. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tab.js +125 -0
  471. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tooltip.js +399 -0
  472. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/transition.js +48 -0
  473. data/lib/wp/wp-content/themes/stump/assets/js/scripts.min.js +1 -0
  474. data/lib/wp/wp-content/themes/stump/assets/js/vendor/jquery-1.11.0.min.js +4 -0
  475. data/lib/wp/wp-content/themes/stump/assets/js/vendor/modernizr-2.7.0.min.js +4 -0
  476. data/lib/wp/wp-content/themes/stump/assets/sass/app.scss +9 -0
  477. data/lib/wp/wp-content/themes/stump/assets/sass/core/_variables.scss +1 -0
  478. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_alerts.scss +67 -0
  479. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_badges.scss +55 -0
  480. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_bootstrap.scss +49 -0
  481. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_breadcrumbs.scss +26 -0
  482. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_button-groups.scss +226 -0
  483. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_buttons.scss +159 -0
  484. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_carousel.scss +232 -0
  485. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_close.scss +35 -0
  486. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_code.scss +63 -0
  487. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_component-animations.scss +29 -0
  488. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_dropdowns.scss +213 -0
  489. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_forms.scss +436 -0
  490. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_glyphicons.scss +233 -0
  491. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_grid.scss +84 -0
  492. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_input-groups.scss +162 -0
  493. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_jumbotron.scss +44 -0
  494. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_labels.scss +64 -0
  495. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_list-group.scss +110 -0
  496. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_media.scss +56 -0
  497. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_mixins.scss +947 -0
  498. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_modals.scss +139 -0
  499. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navbar.scss +620 -0
  500. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navs.scss +242 -0
  501. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_normalize.scss +423 -0
  502. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pager.scss +55 -0
  503. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pagination.scss +88 -0
  504. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_panels.scss +241 -0
  505. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_popovers.scss +133 -0
  506. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_print.scss +101 -0
  507. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_progress-bars.scss +80 -0
  508. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_responsive-utilities.scss +74 -0
  509. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_scaffolding.scss +134 -0
  510. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tables.scss +233 -0
  511. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_theme.scss +247 -0
  512. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_thumbnails.scss +38 -0
  513. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tooltip.scss +95 -0
  514. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_type.scss +284 -0
  515. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_utilities.scss +56 -0
  516. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_variables.scss +833 -0
  517. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_wells.scss +29 -0
  518. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon-deprecated-upcoming.scss +13 -0
  519. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon.scss +59 -0
  520. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_button.scss +273 -0
  521. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_clearfix.scss +29 -0
  522. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_font-family.scss +5 -0
  523. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_hide-text.scss +5 -0
  524. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_html5-input-types.scss +56 -0
  525. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_position.scss +42 -0
  526. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_prefixer.scss +49 -0
  527. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_retina-image.scss +32 -0
  528. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_size.scss +44 -0
  529. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_timing-functions.scss +32 -0
  530. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_triangle.scss +45 -0
  531. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_animation.scss +52 -0
  532. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_appearance.scss +3 -0
  533. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_backface-visibility.scss +6 -0
  534. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background-image.scss +48 -0
  535. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background.scss +103 -0
  536. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-image.scss +55 -0
  537. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-radius.scss +22 -0
  538. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_box-sizing.scss +4 -0
  539. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_columns.scss +47 -0
  540. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_flex-box.scss +52 -0
  541. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_font-face.scss +23 -0
  542. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_hidpi-media-query.scss +10 -0
  543. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_image-rendering.scss +13 -0
  544. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_inline-block.scss +8 -0
  545. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_keyframes.scss +43 -0
  546. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_linear-gradient.scss +41 -0
  547. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_perspective.scss +8 -0
  548. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_placeholder.scss +29 -0
  549. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_radial-gradient.scss +44 -0
  550. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transform.scss +15 -0
  551. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transition.scss +34 -0
  552. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_user-select.scss +3 -0
  553. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_compact.scss +11 -0
  554. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_flex-grid.scss +39 -0
  555. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_grid-width.scss +13 -0
  556. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_linear-gradient.scss +13 -0
  557. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_modular-scale.scss +40 -0
  558. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_px-to-em.scss +8 -0
  559. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_radial-gradient.scss +23 -0
  560. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_tint-shade.scss +9 -0
  561. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_transition-property-name.scss +22 -0
  562. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_deprecated-webkit-gradient.scss +39 -0
  563. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  564. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_linear-positions-parser.scss +61 -0
  565. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss +69 -0
  566. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-positions-parser.scss +18 -0
  567. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_render-gradients.scss +26 -0
  568. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_shape-size-stripper.scss +10 -0
  569. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan.sass +11 -0
  570. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_grid.sass +161 -0
  571. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass +63 -0
  572. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_utilities.sass +24 -0
  573. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_variables.sass +42 -0
  574. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat-helpers.scss +8 -0
  575. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat.scss +21 -0
  576. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_new-breakpoint.scss +16 -0
  577. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_private.scss +107 -0
  578. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_px-to-em.scss +3 -0
  579. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_fill-parent.scss +7 -0
  580. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_grid.scss +5 -0
  581. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_media.scss +51 -0
  582. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_omega.scss +79 -0
  583. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_outer-container.scss +8 -0
  584. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_pad.scss +8 -0
  585. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_private.scss +50 -0
  586. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_reset.scss +12 -0
  587. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_row.scss +17 -0
  588. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_shift.scss +9 -0
  589. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_span-columns.scss +38 -0
  590. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_to-deprecate.scss +57 -0
  591. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_visual-grid.scss +41 -0
  592. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_grid.scss +7 -0
  593. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_visual-grid.scss +5 -0
  594. data/lib/wp/wp-content/themes/stump/base.php +36 -0
  595. data/lib/wp/wp-content/themes/stump/functions.php +19 -0
  596. data/lib/wp/wp-content/themes/stump/index.php +21 -0
  597. data/lib/wp/wp-content/themes/stump/lang/ar.mo +0 -0
  598. data/lib/wp/wp-content/themes/stump/lang/ar.po +270 -0
  599. data/lib/wp/wp-content/themes/stump/lang/bg_BG.mo +0 -0
  600. data/lib/wp/wp-content/themes/stump/lang/bg_BG.po +338 -0
  601. data/lib/wp/wp-content/themes/stump/lang/ca.mo +0 -0
  602. data/lib/wp/wp-content/themes/stump/lang/ca.po +517 -0
  603. data/lib/wp/wp-content/themes/stump/lang/da_DK.mo +0 -0
  604. data/lib/wp/wp-content/themes/stump/lang/da_DK.po +305 -0
  605. data/lib/wp/wp-content/themes/stump/lang/de_DE.mo +0 -0
  606. data/lib/wp/wp-content/themes/stump/lang/de_DE.po +271 -0
  607. data/lib/wp/wp-content/themes/stump/lang/el.mo +0 -0
  608. data/lib/wp/wp-content/themes/stump/lang/el.po +319 -0
  609. data/lib/wp/wp-content/themes/stump/lang/es_ES.mo +0 -0
  610. data/lib/wp/wp-content/themes/stump/lang/es_ES.po +270 -0
  611. data/lib/wp/wp-content/themes/stump/lang/et.mo +0 -0
  612. data/lib/wp/wp-content/themes/stump/lang/et.po +262 -0
  613. data/lib/wp/wp-content/themes/stump/lang/fa_IR.mo +0 -0
  614. data/lib/wp/wp-content/themes/stump/lang/fa_IR.po +273 -0
  615. data/lib/wp/wp-content/themes/stump/lang/fi_FI.mo +0 -0
  616. data/lib/wp/wp-content/themes/stump/lang/fi_FI.po +367 -0
  617. data/lib/wp/wp-content/themes/stump/lang/fr_FR.mo +0 -0
  618. data/lib/wp/wp-content/themes/stump/lang/fr_FR.po +336 -0
  619. data/lib/wp/wp-content/themes/stump/lang/he_IL.mo +0 -0
  620. data/lib/wp/wp-content/themes/stump/lang/he_IL.po +336 -0
  621. data/lib/wp/wp-content/themes/stump/lang/hu_HU.mo +0 -0
  622. data/lib/wp/wp-content/themes/stump/lang/hu_HU.po +271 -0
  623. data/lib/wp/wp-content/themes/stump/lang/id_ID.mo +0 -0
  624. data/lib/wp/wp-content/themes/stump/lang/id_ID.po +278 -0
  625. data/lib/wp/wp-content/themes/stump/lang/it_IT.mo +0 -0
  626. data/lib/wp/wp-content/themes/stump/lang/it_IT.po +269 -0
  627. data/lib/wp/wp-content/themes/stump/lang/ja.mo +0 -0
  628. data/lib/wp/wp-content/themes/stump/lang/ja.po +267 -0
  629. data/lib/wp/wp-content/themes/stump/lang/ko_KR.mo +0 -0
  630. data/lib/wp/wp-content/themes/stump/lang/ko_KR.po +282 -0
  631. data/lib/wp/wp-content/themes/stump/lang/mk_MK.mo +0 -0
  632. data/lib/wp/wp-content/themes/stump/lang/mk_MK.po +297 -0
  633. data/lib/wp/wp-content/themes/stump/lang/ms_MY.mo +0 -0
  634. data/lib/wp/wp-content/themes/stump/lang/ms_MY.po +342 -0
  635. data/lib/wp/wp-content/themes/stump/lang/nb_NO.mo +0 -0
  636. data/lib/wp/wp-content/themes/stump/lang/nb_NO.po +517 -0
  637. data/lib/wp/wp-content/themes/stump/lang/nl_NL.mo +0 -0
  638. data/lib/wp/wp-content/themes/stump/lang/nl_NL.po +261 -0
  639. data/lib/wp/wp-content/themes/stump/lang/nn_NO.mo +0 -0
  640. data/lib/wp/wp-content/themes/stump/lang/nn_NO.po +517 -0
  641. data/lib/wp/wp-content/themes/stump/lang/pl_PL.mo +0 -0
  642. data/lib/wp/wp-content/themes/stump/lang/pl_PL.po +283 -0
  643. data/lib/wp/wp-content/themes/stump/lang/pt_BR.mo +0 -0
  644. data/lib/wp/wp-content/themes/stump/lang/pt_BR.po +394 -0
  645. data/lib/wp/wp-content/themes/stump/lang/ro_RO.mo +0 -0
  646. data/lib/wp/wp-content/themes/stump/lang/ro_RO.po +271 -0
  647. data/lib/wp/wp-content/themes/stump/lang/roots.pot +244 -0
  648. data/lib/wp/wp-content/themes/stump/lang/ru_RU.mo +0 -0
  649. data/lib/wp/wp-content/themes/stump/lang/ru_RU.po +255 -0
  650. data/lib/wp/wp-content/themes/stump/lang/sk_SK.mo +0 -0
  651. data/lib/wp/wp-content/themes/stump/lang/sk_SK.po +267 -0
  652. data/lib/wp/wp-content/themes/stump/lang/sr_RS.mo +0 -0
  653. data/lib/wp/wp-content/themes/stump/lang/sr_RS.pot +261 -0
  654. data/lib/wp/wp-content/themes/stump/lang/sv_SE.mo +0 -0
  655. data/lib/wp/wp-content/themes/stump/lang/sv_SE.po +323 -0
  656. data/lib/wp/wp-content/themes/stump/lang/tr_TR.mo +0 -0
  657. data/lib/wp/wp-content/themes/stump/lang/tr_TR.po +405 -0
  658. data/lib/wp/wp-content/themes/stump/lang/vi_VN.mo +0 -0
  659. data/lib/wp/wp-content/themes/stump/lang/vi_VN.po +516 -0
  660. data/lib/wp/wp-content/themes/stump/lang/zh_CN.mo +0 -0
  661. data/lib/wp/wp-content/themes/stump/lang/zh_CN.po +329 -0
  662. data/lib/wp/wp-content/themes/stump/lang/zh_TW.mo +0 -0
  663. data/lib/wp/wp-content/themes/stump/lang/zh_TW.po +261 -0
  664. data/lib/wp/wp-content/themes/stump/lib/activation.php +215 -0
  665. data/lib/wp/wp-content/themes/stump/lib/cleanup.php +261 -0
  666. data/lib/wp/wp-content/themes/stump/lib/comments.php +52 -0
  667. data/lib/wp/wp-content/themes/stump/lib/config.php +79 -0
  668. data/lib/wp/wp-content/themes/stump/lib/custom.php +4 -0
  669. data/lib/wp/wp-content/themes/stump/lib/gallery.php +130 -0
  670. data/lib/wp/wp-content/themes/stump/lib/init.php +25 -0
  671. data/lib/wp/wp-content/themes/stump/lib/nav.php +93 -0
  672. data/lib/wp/wp-content/themes/stump/lib/relative-urls.php +50 -0
  673. data/lib/wp/wp-content/themes/stump/lib/scripts.php +67 -0
  674. data/lib/wp/wp-content/themes/stump/lib/sidebar.php +43 -0
  675. data/lib/wp/wp-content/themes/stump/lib/titles.php +37 -0
  676. data/lib/wp/wp-content/themes/stump/lib/utils.php +14 -0
  677. data/lib/wp/wp-content/themes/stump/lib/widgets.php +133 -0
  678. data/lib/wp/wp-content/themes/stump/lib/wrapper.php +49 -0
  679. data/lib/wp/wp-content/themes/stump/package.json +32 -0
  680. data/lib/wp/wp-content/themes/stump/page.php +2 -0
  681. data/lib/wp/wp-content/themes/stump/screenshot.png +0 -0
  682. data/lib/wp/wp-content/themes/stump/single.php +1 -0
  683. data/lib/wp/wp-content/themes/stump/style.css +11 -0
  684. data/lib/wp/wp-content/themes/stump/template-custom.php +8 -0
  685. data/lib/wp/wp-content/themes/stump/templates/comment.php +14 -0
  686. data/lib/wp/wp-content/themes/stump/templates/comments.php +80 -0
  687. data/lib/wp/wp-content/themes/stump/templates/content-page.php +4 -0
  688. data/lib/wp/wp-content/themes/stump/templates/content-single.php +15 -0
  689. data/lib/wp/wp-content/themes/stump/templates/content.php +9 -0
  690. data/lib/wp/wp-content/themes/stump/templates/entry-meta.php +2 -0
  691. data/lib/wp/wp-content/themes/stump/templates/footer.php +8 -0
  692. data/lib/wp/wp-content/themes/stump/templates/head.php +12 -0
  693. data/lib/wp/wp-content/themes/stump/templates/header-top-navbar.php +21 -0
  694. data/lib/wp/wp-content/themes/stump/templates/header.php +14 -0
  695. data/lib/wp/wp-content/themes/stump/templates/page-header.php +5 -0
  696. data/lib/wp/wp-content/themes/stump/templates/searchform.php +9 -0
  697. data/lib/wp/wp-content/themes/stump/templates/sidebar.php +1 -0
  698. data/lib/wp/wp-content/themes/twentyfourteen/404.php +32 -0
  699. data/lib/wp/wp-content/themes/twentyfourteen/archive.php +74 -0
  700. data/lib/wp/wp-content/themes/twentyfourteen/author.php +74 -0
  701. data/lib/wp/wp-content/themes/twentyfourteen/category.php +58 -0
  702. data/lib/wp/wp-content/themes/twentyfourteen/comments.php +66 -0
  703. data/lib/wp/wp-content/themes/twentyfourteen/content-aside.php +57 -0
  704. data/lib/wp/wp-content/themes/twentyfourteen/content-audio.php +57 -0
  705. data/lib/wp/wp-content/themes/twentyfourteen/content-featured-post.php +34 -0
  706. data/lib/wp/wp-content/themes/twentyfourteen/content-gallery.php +57 -0
  707. data/lib/wp/wp-content/themes/twentyfourteen/content-image.php +57 -0
  708. data/lib/wp/wp-content/themes/twentyfourteen/content-link.php +57 -0
  709. data/lib/wp/wp-content/themes/twentyfourteen/content-none.php +31 -0
  710. data/lib/wp/wp-content/themes/twentyfourteen/content-page.php +31 -0
  711. data/lib/wp/wp-content/themes/twentyfourteen/content-quote.php +57 -0
  712. data/lib/wp/wp-content/themes/twentyfourteen/content-video.php +57 -0
  713. data/lib/wp/wp-content/themes/twentyfourteen/content.php +66 -0
  714. data/lib/wp/wp-content/themes/twentyfourteen/css/editor-style.css +717 -0
  715. data/lib/wp/wp-content/themes/twentyfourteen/css/ie.css +1335 -0
  716. data/lib/wp/wp-content/themes/twentyfourteen/featured-content.php +39 -0
  717. data/lib/wp/wp-content/themes/twentyfourteen/footer.php +28 -0
  718. data/lib/wp/wp-content/themes/twentyfourteen/functions.php +519 -0
  719. data/lib/wp/wp-content/themes/twentyfourteen/genericons/COPYING.txt +9 -0
  720. data/lib/wp/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf +0 -0
  721. data/lib/wp/wp-content/themes/twentyfourteen/genericons/LICENSE.txt +339 -0
  722. data/lib/wp/wp-content/themes/twentyfourteen/genericons/README.txt +123 -0
  723. data/lib/wp/wp-content/themes/twentyfourteen/genericons/example.html +464 -0
  724. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot +0 -0
  725. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg +135 -0
  726. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf +0 -0
  727. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff +0 -0
  728. data/lib/wp/wp-content/themes/twentyfourteen/genericons/genericons.css +197 -0
  729. data/lib/wp/wp-content/themes/twentyfourteen/header.php +65 -0
  730. data/lib/wp/wp-content/themes/twentyfourteen/image.php +79 -0
  731. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-dark.svg +16 -0
  732. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-light.svg +6 -0
  733. data/lib/wp/wp-content/themes/twentyfourteen/inc/back-compat.php +63 -0
  734. data/lib/wp/wp-content/themes/twentyfourteen/inc/custom-header.php +147 -0
  735. data/lib/wp/wp-content/themes/twentyfourteen/inc/customizer.php +114 -0
  736. data/lib/wp/wp-content/themes/twentyfourteen/inc/featured-content.php +531 -0
  737. data/lib/wp/wp-content/themes/twentyfourteen/inc/template-tags.php +203 -0
  738. data/lib/wp/wp-content/themes/twentyfourteen/inc/widgets.php +269 -0
  739. data/lib/wp/wp-content/themes/twentyfourteen/index.php +61 -0
  740. data/lib/wp/wp-content/themes/twentyfourteen/js/customizer.js +38 -0
  741. data/lib/wp/wp-content/themes/twentyfourteen/js/featured-content-admin.js +9 -0
  742. data/lib/wp/wp-content/themes/twentyfourteen/js/functions.js +134 -0
  743. data/lib/wp/wp-content/themes/twentyfourteen/js/html5.js +8 -0
  744. data/lib/wp/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js +21 -0
  745. data/lib/wp/wp-content/themes/twentyfourteen/js/slider.js +598 -0
  746. data/lib/wp/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot +467 -0
  747. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/contributors.php +52 -0
  748. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/full-width.php +42 -0
  749. data/lib/wp/wp-content/themes/twentyfourteen/page.php +48 -0
  750. data/lib/wp/wp-content/themes/twentyfourteen/rtl.css +854 -0
  751. data/lib/wp/wp-content/themes/twentyfourteen/screenshot.png +0 -0
  752. data/lib/wp/wp-content/themes/twentyfourteen/search.php +49 -0
  753. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-content.php +16 -0
  754. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-footer.php +19 -0
  755. data/lib/wp/wp-content/themes/twentyfourteen/sidebar.php +29 -0
  756. data/lib/wp/wp-content/themes/twentyfourteen/single.php +40 -0
  757. data/lib/wp/wp-content/themes/twentyfourteen/style.css +4321 -0
  758. data/lib/wp/wp-content/themes/twentyfourteen/tag.php +60 -0
  759. data/lib/wp/wp-content/themes/twentyfourteen/taxonomy-post_format.php +85 -0
  760. data/lib/wp/wp-cron.php +115 -0
  761. data/lib/wp/wp-includes/ID3/getid3.lib.php +1376 -0
  762. data/lib/wp/wp-includes/ID3/getid3.php +1796 -0
  763. data/lib/wp/wp-includes/ID3/license.commercial.txt +27 -0
  764. data/lib/wp/wp-includes/ID3/license.txt +29 -0
  765. data/lib/wp/wp-includes/ID3/module.audio-video.asf.php +2013 -0
  766. data/lib/wp/wp-includes/ID3/module.audio-video.flv.php +745 -0
  767. data/lib/wp/wp-includes/ID3/module.audio-video.matroska.php +1751 -0
  768. data/lib/wp/wp-includes/ID3/module.audio-video.quicktime.php +2246 -0
  769. data/lib/wp/wp-includes/ID3/module.audio-video.riff.php +2586 -0
  770. data/lib/wp/wp-includes/ID3/module.audio.ac3.php +474 -0
  771. data/lib/wp/wp-includes/ID3/module.audio.dts.php +291 -0
  772. data/lib/wp/wp-includes/ID3/module.audio.flac.php +443 -0
  773. data/lib/wp/wp-includes/ID3/module.audio.mp3.php +2012 -0
  774. data/lib/wp/wp-includes/ID3/module.audio.ogg.php +756 -0
  775. data/lib/wp/wp-includes/ID3/module.tag.apetag.php +371 -0
  776. data/lib/wp/wp-includes/ID3/module.tag.id3v1.php +360 -0
  777. data/lib/wp/wp-includes/ID3/module.tag.id3v2.php +3424 -0
  778. data/lib/wp/wp-includes/ID3/module.tag.lyrics3.php +294 -0
  779. data/lib/wp/wp-includes/ID3/readme.txt +604 -0
  780. data/lib/wp/wp-includes/SimplePie/Author.php +157 -0
  781. data/lib/wp/wp-includes/SimplePie/Cache.php +133 -0
  782. data/lib/wp/wp-includes/SimplePie/Cache/Base.php +114 -0
  783. data/lib/wp/wp-includes/SimplePie/Cache/DB.php +137 -0
  784. data/lib/wp/wp-includes/SimplePie/Cache/File.php +173 -0
  785. data/lib/wp/wp-includes/SimplePie/Cache/Memcache.php +183 -0
  786. data/lib/wp/wp-includes/SimplePie/Cache/MySQL.php +438 -0
  787. data/lib/wp/wp-includes/SimplePie/Caption.php +210 -0
  788. data/lib/wp/wp-includes/SimplePie/Category.php +157 -0
  789. data/lib/wp/wp-includes/SimplePie/Content/Type/Sniffer.php +332 -0
  790. data/lib/wp/wp-includes/SimplePie/Copyright.php +130 -0
  791. data/lib/wp/wp-includes/SimplePie/Core.php +57 -0
  792. data/lib/wp/wp-includes/SimplePie/Credit.php +156 -0
  793. data/lib/wp/wp-includes/SimplePie/Decode/HTML/Entities.php +617 -0
  794. data/lib/wp/wp-includes/SimplePie/Enclosure.php +1380 -0
  795. data/lib/wp/wp-includes/SimplePie/Exception.php +52 -0
  796. data/lib/wp/wp-includes/SimplePie/File.php +292 -0
  797. data/lib/wp/wp-includes/SimplePie/HTTP/Parser.php +500 -0
  798. data/lib/wp/wp-includes/SimplePie/IRI.php +1238 -0
  799. data/lib/wp/wp-includes/SimplePie/Item.php +2964 -0
  800. data/lib/wp/wp-includes/SimplePie/Locator.php +372 -0
  801. data/lib/wp/wp-includes/SimplePie/Misc.php +2247 -0
  802. data/lib/wp/wp-includes/SimplePie/Net/IPv6.php +276 -0
  803. data/lib/wp/wp-includes/SimplePie/Parse/Date.php +983 -0
  804. data/lib/wp/wp-includes/SimplePie/Parser.php +407 -0
  805. data/lib/wp/wp-includes/SimplePie/Rating.php +129 -0
  806. data/lib/wp/wp-includes/SimplePie/Registry.php +225 -0
  807. data/lib/wp/wp-includes/SimplePie/Restriction.php +155 -0
  808. data/lib/wp/wp-includes/SimplePie/Sanitize.php +554 -0
  809. data/lib/wp/wp-includes/SimplePie/Source.php +611 -0
  810. data/lib/wp/wp-includes/SimplePie/XML/Declaration/Parser.php +362 -0
  811. data/lib/wp/wp-includes/SimplePie/gzdecode.php +371 -0
  812. data/lib/wp/wp-includes/Text/Diff.php +450 -0
  813. data/lib/wp/wp-includes/Text/Diff/Engine/native.php +436 -0
  814. data/lib/wp/wp-includes/Text/Diff/Engine/shell.php +162 -0
  815. data/lib/wp/wp-includes/Text/Diff/Engine/string.php +248 -0
  816. data/lib/wp/wp-includes/Text/Diff/Engine/xdiff.php +64 -0
  817. data/lib/wp/wp-includes/Text/Diff/Renderer.php +235 -0
  818. data/lib/wp/wp-includes/Text/Diff/Renderer/inline.php +206 -0
  819. data/lib/wp/wp-includes/admin-bar.php +870 -0
  820. data/lib/wp/wp-includes/atomlib.php +352 -0
  821. data/lib/wp/wp-includes/author-template.php +471 -0
  822. data/lib/wp/wp-includes/bookmark-template.php +298 -0
  823. data/lib/wp/wp-includes/bookmark.php +416 -0
  824. data/lib/wp/wp-includes/cache.php +704 -0
  825. data/lib/wp/wp-includes/canonical.php +586 -0
  826. data/lib/wp/wp-includes/capabilities.php +1539 -0
  827. data/lib/wp/wp-includes/category-template.php +1407 -0
  828. data/lib/wp/wp-includes/category.php +343 -0
  829. data/lib/wp/wp-includes/certificates/ca-bundle.crt +3785 -0
  830. data/lib/wp/wp-includes/class-IXR.php +1100 -0
  831. data/lib/wp/wp-includes/class-feed.php +140 -0
  832. data/lib/wp/wp-includes/class-http.php +2245 -0
  833. data/lib/wp/wp-includes/class-json.php +936 -0
  834. data/lib/wp/wp-includes/class-oembed.php +579 -0
  835. data/lib/wp/wp-includes/class-phpass.php +260 -0
  836. data/lib/wp/wp-includes/class-phpmailer.php +3265 -0
  837. data/lib/wp/wp-includes/class-pop3.php +652 -0
  838. data/lib/wp/wp-includes/class-simplepie.php +3119 -0
  839. data/lib/wp/wp-includes/class-smtp.php +943 -0
  840. data/lib/wp/wp-includes/class-snoopy.php +1256 -0
  841. data/lib/wp/wp-includes/class-wp-admin-bar.php +517 -0
  842. data/lib/wp/wp-includes/class-wp-ajax-response.php +199 -0
  843. data/lib/wp/wp-includes/class-wp-customize-control.php +1124 -0
  844. data/lib/wp/wp-includes/class-wp-customize-manager.php +1272 -0
  845. data/lib/wp/wp-includes/class-wp-customize-panel.php +200 -0
  846. data/lib/wp/wp-includes/class-wp-customize-section.php +196 -0
  847. data/lib/wp/wp-includes/class-wp-customize-setting.php +554 -0
  848. data/lib/wp/wp-includes/class-wp-customize-widgets.php +1556 -0
  849. data/lib/wp/wp-includes/class-wp-editor.php +1435 -0
  850. data/lib/wp/wp-includes/class-wp-embed.php +373 -0
  851. data/lib/wp/wp-includes/class-wp-error.php +276 -0
  852. data/lib/wp/wp-includes/class-wp-http-ixr-client.php +97 -0
  853. data/lib/wp/wp-includes/class-wp-image-editor-gd.php +459 -0
  854. data/lib/wp/wp-includes/class-wp-image-editor-imagick.php +512 -0
  855. data/lib/wp/wp-includes/class-wp-image-editor.php +475 -0
  856. data/lib/wp/wp-includes/class-wp-theme.php +1235 -0
  857. data/lib/wp/wp-includes/class-wp-walker.php +471 -0
  858. data/lib/wp/wp-includes/class-wp-xmlrpc-server.php +5984 -0
  859. data/lib/wp/wp-includes/class-wp.php +782 -0
  860. data/lib/wp/wp-includes/class.wp-dependencies.php +509 -0
  861. data/lib/wp/wp-includes/class.wp-scripts.php +247 -0
  862. data/lib/wp/wp-includes/class.wp-styles.php +210 -0
  863. data/lib/wp/wp-includes/comment-template.php +2286 -0
  864. data/lib/wp/wp-includes/comment.php +2606 -0
  865. data/lib/wp/wp-includes/compat.php +125 -0
  866. data/lib/wp/wp-includes/cron.php +469 -0
  867. data/lib/wp/wp-includes/css/admin-bar-rtl.css +1099 -0
  868. data/lib/wp/wp-includes/css/admin-bar-rtl.min.css +1 -0
  869. data/lib/wp/wp-includes/css/admin-bar.css +1099 -0
  870. data/lib/wp/wp-includes/css/admin-bar.min.css +1 -0
  871. data/lib/wp/wp-includes/css/buttons-rtl.css +364 -0
  872. data/lib/wp/wp-includes/css/buttons-rtl.min.css +1 -0
  873. data/lib/wp/wp-includes/css/buttons.css +364 -0
  874. data/lib/wp/wp-includes/css/buttons.min.css +1 -0
  875. data/lib/wp/wp-includes/css/dashicons.css +893 -0
  876. data/lib/wp/wp-includes/css/dashicons.min.css +1 -0
  877. data/lib/wp/wp-includes/css/editor-rtl.css +1993 -0
  878. data/lib/wp/wp-includes/css/editor-rtl.min.css +1 -0
  879. data/lib/wp/wp-includes/css/editor.css +1993 -0
  880. data/lib/wp/wp-includes/css/editor.min.css +1 -0
  881. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.css +343 -0
  882. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.min.css +19 -0
  883. data/lib/wp/wp-includes/css/jquery-ui-dialog.css +343 -0
  884. data/lib/wp/wp-includes/css/jquery-ui-dialog.min.css +19 -0
  885. data/lib/wp/wp-includes/css/media-views-rtl.css +2568 -0
  886. data/lib/wp/wp-includes/css/media-views-rtl.min.css +1 -0
  887. data/lib/wp/wp-includes/css/media-views.css +2568 -0
  888. data/lib/wp/wp-includes/css/media-views.min.css +1 -0
  889. data/lib/wp/wp-includes/css/wp-auth-check-rtl.css +100 -0
  890. data/lib/wp/wp-includes/css/wp-auth-check-rtl.min.css +1 -0
  891. data/lib/wp/wp-includes/css/wp-auth-check.css +100 -0
  892. data/lib/wp/wp-includes/css/wp-auth-check.min.css +1 -0
  893. data/lib/wp/wp-includes/css/wp-pointer-rtl.css +212 -0
  894. data/lib/wp/wp-includes/css/wp-pointer-rtl.min.css +1 -0
  895. data/lib/wp/wp-includes/css/wp-pointer.css +212 -0
  896. data/lib/wp/wp-includes/css/wp-pointer.min.css +1 -0
  897. data/lib/wp/wp-includes/date.php +475 -0
  898. data/lib/wp/wp-includes/default-constants.php +323 -0
  899. data/lib/wp/wp-includes/default-filters.php +307 -0
  900. data/lib/wp/wp-includes/default-widgets.php +1423 -0
  901. data/lib/wp/wp-includes/deprecated.php +3501 -0
  902. data/lib/wp/wp-includes/feed-atom-comments.php +115 -0
  903. data/lib/wp/wp-includes/feed-atom.php +87 -0
  904. data/lib/wp/wp-includes/feed-rdf.php +81 -0
  905. data/lib/wp/wp-includes/feed-rss.php +46 -0
  906. data/lib/wp/wp-includes/feed-rss2-comments.php +97 -0
  907. data/lib/wp/wp-includes/feed-rss2.php +115 -0
  908. data/lib/wp/wp-includes/feed.php +659 -0
  909. data/lib/wp/wp-includes/fonts/dashicons.eot +0 -0
  910. data/lib/wp/wp-includes/fonts/dashicons.svg +250 -0
  911. data/lib/wp/wp-includes/fonts/dashicons.ttf +0 -0
  912. data/lib/wp/wp-includes/fonts/dashicons.woff +0 -0
  913. data/lib/wp/wp-includes/formatting.php +4006 -0
  914. data/lib/wp/wp-includes/functions.php +4631 -0
  915. data/lib/wp/wp-includes/functions.wp-scripts.php +258 -0
  916. data/lib/wp/wp-includes/functions.wp-styles.php +245 -0
  917. data/lib/wp/wp-includes/general-template.php +2982 -0
  918. data/lib/wp/wp-includes/http.php +551 -0
  919. data/lib/wp/wp-includes/images/admin-bar-sprite-2x.png +0 -0
  920. data/lib/wp/wp-includes/images/admin-bar-sprite.png +0 -0
  921. data/lib/wp/wp-includes/images/arrow-pointer-blue-2x.png +0 -0
  922. data/lib/wp/wp-includes/images/arrow-pointer-blue.png +0 -0
  923. data/lib/wp/wp-includes/images/blank.gif +0 -0
  924. data/lib/wp/wp-includes/images/crystal/archive.png +0 -0
  925. data/lib/wp/wp-includes/images/crystal/audio.png +0 -0
  926. data/lib/wp/wp-includes/images/crystal/code.png +0 -0
  927. data/lib/wp/wp-includes/images/crystal/default.png +0 -0
  928. data/lib/wp/wp-includes/images/crystal/document.png +0 -0
  929. data/lib/wp/wp-includes/images/crystal/interactive.png +0 -0
  930. data/lib/wp/wp-includes/images/crystal/license.txt +9 -0
  931. data/lib/wp/wp-includes/images/crystal/spreadsheet.png +0 -0
  932. data/lib/wp/wp-includes/images/crystal/text.png +0 -0
  933. data/lib/wp/wp-includes/images/crystal/video.png +0 -0
  934. data/lib/wp/wp-includes/images/down_arrow-2x.gif +0 -0
  935. data/lib/wp/wp-includes/images/down_arrow.gif +0 -0
  936. data/lib/wp/wp-includes/images/icon-pointer-flag-2x.png +0 -0
  937. data/lib/wp/wp-includes/images/icon-pointer-flag.png +0 -0
  938. data/lib/wp/wp-includes/images/media/archive.png +0 -0
  939. data/lib/wp/wp-includes/images/media/audio.png +0 -0
  940. data/lib/wp/wp-includes/images/media/code.png +0 -0
  941. data/lib/wp/wp-includes/images/media/default.png +0 -0
  942. data/lib/wp/wp-includes/images/media/document.png +0 -0
  943. data/lib/wp/wp-includes/images/media/interactive.png +0 -0
  944. data/lib/wp/wp-includes/images/media/spreadsheet.png +0 -0
  945. data/lib/wp/wp-includes/images/media/text.png +0 -0
  946. data/lib/wp/wp-includes/images/media/video.png +0 -0
  947. data/lib/wp/wp-includes/images/rss-2x.png +0 -0
  948. data/lib/wp/wp-includes/images/rss.png +0 -0
  949. data/lib/wp/wp-includes/images/smilies/icon_arrow.gif +0 -0
  950. data/lib/wp/wp-includes/images/smilies/icon_biggrin.gif +0 -0
  951. data/lib/wp/wp-includes/images/smilies/icon_confused.gif +0 -0
  952. data/lib/wp/wp-includes/images/smilies/icon_cool.gif +0 -0
  953. data/lib/wp/wp-includes/images/smilies/icon_cry.gif +0 -0
  954. data/lib/wp/wp-includes/images/smilies/icon_eek.gif +0 -0
  955. data/lib/wp/wp-includes/images/smilies/icon_evil.gif +0 -0
  956. data/lib/wp/wp-includes/images/smilies/icon_exclaim.gif +0 -0
  957. data/lib/wp/wp-includes/images/smilies/icon_idea.gif +0 -0
  958. data/lib/wp/wp-includes/images/smilies/icon_lol.gif +0 -0
  959. data/lib/wp/wp-includes/images/smilies/icon_mad.gif +0 -0
  960. data/lib/wp/wp-includes/images/smilies/icon_mrgreen.gif +0 -0
  961. data/lib/wp/wp-includes/images/smilies/icon_neutral.gif +0 -0
  962. data/lib/wp/wp-includes/images/smilies/icon_question.gif +0 -0
  963. data/lib/wp/wp-includes/images/smilies/icon_razz.gif +0 -0
  964. data/lib/wp/wp-includes/images/smilies/icon_redface.gif +0 -0
  965. data/lib/wp/wp-includes/images/smilies/icon_rolleyes.gif +0 -0
  966. data/lib/wp/wp-includes/images/smilies/icon_sad.gif +0 -0
  967. data/lib/wp/wp-includes/images/smilies/icon_smile.gif +0 -0
  968. data/lib/wp/wp-includes/images/smilies/icon_surprised.gif +0 -0
  969. data/lib/wp/wp-includes/images/smilies/icon_twisted.gif +0 -0
  970. data/lib/wp/wp-includes/images/smilies/icon_wink.gif +0 -0
  971. data/lib/wp/wp-includes/images/spinner-2x.gif +0 -0
  972. data/lib/wp/wp-includes/images/spinner.gif +0 -0
  973. data/lib/wp/wp-includes/images/toggle-arrow-2x.png +0 -0
  974. data/lib/wp/wp-includes/images/toggle-arrow.png +0 -0
  975. data/lib/wp/wp-includes/images/uploader-icons-2x.png +0 -0
  976. data/lib/wp/wp-includes/images/uploader-icons.png +0 -0
  977. data/lib/wp/wp-includes/images/wlw/wp-comments.png +0 -0
  978. data/lib/wp/wp-includes/images/wlw/wp-icon.png +0 -0
  979. data/lib/wp/wp-includes/images/wlw/wp-watermark.png +0 -0
  980. data/lib/wp/wp-includes/images/wpicons-2x.png +0 -0
  981. data/lib/wp/wp-includes/images/wpicons.png +0 -0
  982. data/lib/wp/wp-includes/images/wpspin-2x.gif +0 -0
  983. data/lib/wp/wp-includes/images/wpspin.gif +0 -0
  984. data/lib/wp/wp-includes/images/xit-2x.gif +0 -0
  985. data/lib/wp/wp-includes/images/xit.gif +0 -0
  986. data/lib/wp/wp-includes/js/admin-bar.js +365 -0
  987. data/lib/wp/wp-includes/js/admin-bar.min.js +1 -0
  988. data/lib/wp/wp-includes/js/autosave.js +589 -0
  989. data/lib/wp/wp-includes/js/autosave.min.js +1 -0
  990. data/lib/wp/wp-includes/js/backbone.min.js +1 -0
  991. data/lib/wp/wp-includes/js/colorpicker.js +707 -0
  992. data/lib/wp/wp-includes/js/colorpicker.min.js +1 -0
  993. data/lib/wp/wp-includes/js/comment-reply.js +47 -0
  994. data/lib/wp/wp-includes/js/comment-reply.min.js +1 -0
  995. data/lib/wp/wp-includes/js/crop/cropper.css +165 -0
  996. data/lib/wp/wp-includes/js/crop/cropper.js +516 -0
  997. data/lib/wp/wp-includes/js/crop/marqueeHoriz.gif +0 -0
  998. data/lib/wp/wp-includes/js/crop/marqueeVert.gif +0 -0
  999. data/lib/wp/wp-includes/js/customize-base.js +617 -0
  1000. data/lib/wp/wp-includes/js/customize-base.min.js +1 -0
  1001. data/lib/wp/wp-includes/js/customize-loader.js +246 -0
  1002. data/lib/wp/wp-includes/js/customize-loader.min.js +1 -0
  1003. data/lib/wp/wp-includes/js/customize-models.js +247 -0
  1004. data/lib/wp/wp-includes/js/customize-models.min.js +1 -0
  1005. data/lib/wp/wp-includes/js/customize-preview-widgets.js +129 -0
  1006. data/lib/wp/wp-includes/js/customize-preview-widgets.min.js +1 -0
  1007. data/lib/wp/wp-includes/js/customize-preview.js +154 -0
  1008. data/lib/wp/wp-includes/js/customize-preview.min.js +1 -0
  1009. data/lib/wp/wp-includes/js/customize-views.js +231 -0
  1010. data/lib/wp/wp-includes/js/customize-views.min.js +1 -0
  1011. data/lib/wp/wp-includes/js/heartbeat.js +738 -0
  1012. data/lib/wp/wp-includes/js/heartbeat.min.js +1 -0
  1013. data/lib/wp/wp-includes/js/hoverIntent.js +115 -0
  1014. data/lib/wp/wp-includes/js/hoverIntent.min.js +1 -0
  1015. data/lib/wp/wp-includes/js/imgareaselect/border-anim-h.gif +0 -0
  1016. data/lib/wp/wp-includes/js/imgareaselect/border-anim-v.gif +0 -0
  1017. data/lib/wp/wp-includes/js/imgareaselect/imgareaselect.css +41 -0
  1018. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js +1205 -0
  1019. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js +1 -0
  1020. data/lib/wp/wp-includes/js/jcrop/Jcrop.gif +0 -0
  1021. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.css +29 -0
  1022. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.js +22 -0
  1023. data/lib/wp/wp-includes/js/jquery/jquery-migrate.js +521 -0
  1024. data/lib/wp/wp-includes/js/jquery/jquery-migrate.min.js +2 -0
  1025. data/lib/wp/wp-includes/js/jquery/jquery.color.min.js +2 -0
  1026. data/lib/wp/wp-includes/js/jquery/jquery.form.js +1193 -0
  1027. data/lib/wp/wp-includes/js/jquery/jquery.form.min.js +11 -0
  1028. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.js +134 -0
  1029. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.min.js +1 -0
  1030. data/lib/wp/wp-includes/js/jquery/jquery.js +5 -0
  1031. data/lib/wp/wp-includes/js/jquery/jquery.masonry.min.js +11 -0
  1032. data/lib/wp/wp-includes/js/jquery/jquery.query.js +11 -0
  1033. data/lib/wp/wp-includes/js/jquery/jquery.schedule.js +36 -0
  1034. data/lib/wp/wp-includes/js/jquery/jquery.serialize-object.js +31 -0
  1035. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.js +99 -0
  1036. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.min.js +1 -0
  1037. data/lib/wp/wp-includes/js/jquery/jquery.ui.touch-punch.js +11 -0
  1038. data/lib/wp/wp-includes/js/jquery/suggest.js +316 -0
  1039. data/lib/wp/wp-includes/js/jquery/suggest.min.js +1 -0
  1040. data/lib/wp/wp-includes/js/jquery/ui/accordion.min.js +11 -0
  1041. data/lib/wp/wp-includes/js/jquery/ui/autocomplete.min.js +11 -0
  1042. data/lib/wp/wp-includes/js/jquery/ui/button.min.js +11 -0
  1043. data/lib/wp/wp-includes/js/jquery/ui/core.min.js +11 -0
  1044. data/lib/wp/wp-includes/js/jquery/ui/datepicker.min.js +12 -0
  1045. data/lib/wp/wp-includes/js/jquery/ui/dialog.min.js +11 -0
  1046. data/lib/wp/wp-includes/js/jquery/ui/draggable.min.js +11 -0
  1047. data/lib/wp/wp-includes/js/jquery/ui/droppable.min.js +11 -0
  1048. data/lib/wp/wp-includes/js/jquery/ui/effect-blind.min.js +11 -0
  1049. data/lib/wp/wp-includes/js/jquery/ui/effect-bounce.min.js +11 -0
  1050. data/lib/wp/wp-includes/js/jquery/ui/effect-clip.min.js +11 -0
  1051. data/lib/wp/wp-includes/js/jquery/ui/effect-drop.min.js +11 -0
  1052. data/lib/wp/wp-includes/js/jquery/ui/effect-explode.min.js +11 -0
  1053. data/lib/wp/wp-includes/js/jquery/ui/effect-fade.min.js +11 -0
  1054. data/lib/wp/wp-includes/js/jquery/ui/effect-fold.min.js +11 -0
  1055. data/lib/wp/wp-includes/js/jquery/ui/effect-highlight.min.js +11 -0
  1056. data/lib/wp/wp-includes/js/jquery/ui/effect-puff.min.js +11 -0
  1057. data/lib/wp/wp-includes/js/jquery/ui/effect-pulsate.min.js +11 -0
  1058. data/lib/wp/wp-includes/js/jquery/ui/effect-scale.min.js +11 -0
  1059. data/lib/wp/wp-includes/js/jquery/ui/effect-shake.min.js +11 -0
  1060. data/lib/wp/wp-includes/js/jquery/ui/effect-size.min.js +11 -0
  1061. data/lib/wp/wp-includes/js/jquery/ui/effect-slide.min.js +11 -0
  1062. data/lib/wp/wp-includes/js/jquery/ui/effect-transfer.min.js +11 -0
  1063. data/lib/wp/wp-includes/js/jquery/ui/effect.min.js +21 -0
  1064. data/lib/wp/wp-includes/js/jquery/ui/menu.min.js +11 -0
  1065. data/lib/wp/wp-includes/js/jquery/ui/mouse.min.js +11 -0
  1066. data/lib/wp/wp-includes/js/jquery/ui/position.min.js +11 -0
  1067. data/lib/wp/wp-includes/js/jquery/ui/progressbar.min.js +11 -0
  1068. data/lib/wp/wp-includes/js/jquery/ui/resizable.min.js +11 -0
  1069. data/lib/wp/wp-includes/js/jquery/ui/selectable.min.js +11 -0
  1070. data/lib/wp/wp-includes/js/jquery/ui/selectmenu.min.js +11 -0
  1071. data/lib/wp/wp-includes/js/jquery/ui/slider.min.js +11 -0
  1072. data/lib/wp/wp-includes/js/jquery/ui/sortable.min.js +11 -0
  1073. data/lib/wp/wp-includes/js/jquery/ui/spinner.min.js +11 -0
  1074. data/lib/wp/wp-includes/js/jquery/ui/tabs.min.js +11 -0
  1075. data/lib/wp/wp-includes/js/jquery/ui/tooltip.min.js +11 -0
  1076. data/lib/wp/wp-includes/js/jquery/ui/widget.min.js +11 -0
  1077. data/lib/wp/wp-includes/js/json2.js +480 -0
  1078. data/lib/wp/wp-includes/js/json2.min.js +1 -0
  1079. data/lib/wp/wp-includes/js/masonry.min.js +1 -0
  1080. data/lib/wp/wp-includes/js/mce-view.js +829 -0
  1081. data/lib/wp/wp-includes/js/mce-view.min.js +1 -0
  1082. data/lib/wp/wp-includes/js/media-audiovideo.js +831 -0
  1083. data/lib/wp/wp-includes/js/media-audiovideo.min.js +1 -0
  1084. data/lib/wp/wp-includes/js/media-editor.js +1114 -0
  1085. data/lib/wp/wp-includes/js/media-editor.min.js +1 -0
  1086. data/lib/wp/wp-includes/js/media-grid.js +732 -0
  1087. data/lib/wp/wp-includes/js/media-grid.min.js +1 -0
  1088. data/lib/wp/wp-includes/js/media-models.js +1362 -0
  1089. data/lib/wp/wp-includes/js/media-models.min.js +1 -0
  1090. data/lib/wp/wp-includes/js/media-views.js +7484 -0
  1091. data/lib/wp/wp-includes/js/media-views.min.js +3 -0
  1092. data/lib/wp/wp-includes/js/mediaelement/background.png +0 -0
  1093. data/lib/wp/wp-includes/js/mediaelement/bigplay.png +0 -0
  1094. data/lib/wp/wp-includes/js/mediaelement/bigplay.svg +1 -0
  1095. data/lib/wp/wp-includes/js/mediaelement/controls.png +0 -0
  1096. data/lib/wp/wp-includes/js/mediaelement/controls.svg +1 -0
  1097. data/lib/wp/wp-includes/js/mediaelement/flashmediaelement.swf +0 -0
  1098. data/lib/wp/wp-includes/js/mediaelement/loading.gif +0 -0
  1099. data/lib/wp/wp-includes/js/mediaelement/mediaelement-and-player.min.js +181 -0
  1100. data/lib/wp/wp-includes/js/mediaelement/mediaelementplayer.min.css +1 -0
  1101. data/lib/wp/wp-includes/js/mediaelement/silverlightmediaelement.xap +0 -0
  1102. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.css +274 -0
  1103. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.js +34 -0
  1104. data/lib/wp/wp-includes/js/mediaelement/wp-playlist.js +175 -0
  1105. data/lib/wp/wp-includes/js/plupload/handlers.js +488 -0
  1106. data/lib/wp/wp-includes/js/plupload/handlers.min.js +1 -0
  1107. data/lib/wp/wp-includes/js/plupload/license.txt +339 -0
  1108. data/lib/wp/wp-includes/js/plupload/plupload.flash.swf +0 -0
  1109. data/lib/wp/wp-includes/js/plupload/plupload.full.min.js +28 -0
  1110. data/lib/wp/wp-includes/js/plupload/plupload.silverlight.xap +0 -0
  1111. data/lib/wp/wp-includes/js/plupload/wp-plupload.js +376 -0
  1112. data/lib/wp/wp-includes/js/plupload/wp-plupload.min.js +1 -0
  1113. data/lib/wp/wp-includes/js/quicktags.js +652 -0
  1114. data/lib/wp/wp-includes/js/quicktags.min.js +1 -0
  1115. data/lib/wp/wp-includes/js/shortcode.js +356 -0
  1116. data/lib/wp/wp-includes/js/shortcode.min.js +1 -0
  1117. data/lib/wp/wp-includes/js/swfobject.js +4 -0
  1118. data/lib/wp/wp-includes/js/swfupload/handlers.js +376 -0
  1119. data/lib/wp/wp-includes/js/swfupload/handlers.min.js +1 -0
  1120. data/lib/wp/wp-includes/js/swfupload/license.txt +32 -0
  1121. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.cookies.js +53 -0
  1122. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.queue.js +98 -0
  1123. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.speed.js +342 -0
  1124. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.swfobject.js +105 -0
  1125. data/lib/wp/wp-includes/js/swfupload/swfupload.js +980 -0
  1126. data/lib/wp/wp-includes/js/swfupload/swfupload.swf +0 -0
  1127. data/lib/wp/wp-includes/js/thickbox/loadingAnimation.gif +0 -0
  1128. data/lib/wp/wp-includes/js/thickbox/macFFBgHack.png +0 -0
  1129. data/lib/wp/wp-includes/js/thickbox/thickbox.css +138 -0
  1130. data/lib/wp/wp-includes/js/thickbox/thickbox.js +314 -0
  1131. data/lib/wp/wp-includes/js/tinymce/langs/wp-langs-en.js +519 -0
  1132. data/lib/wp/wp-includes/js/tinymce/license.txt +504 -0
  1133. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.js +370 -0
  1134. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.min.js +1 -0
  1135. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.js +112 -0
  1136. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.min.js +1 -0
  1137. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css +212 -0
  1138. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.js +304 -0
  1139. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js +1 -0
  1140. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.js +64 -0
  1141. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.min.js +1 -0
  1142. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.js +136 -0
  1143. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  1144. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.js +30 -0
  1145. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.min.js +1 -0
  1146. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.js +450 -0
  1147. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.min.js +1 -0
  1148. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.js +786 -0
  1149. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.min.js +1 -0
  1150. data/lib/wp/wp-includes/js/tinymce/plugins/media/moxieplayer.swf +0 -0
  1151. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.js +774 -0
  1152. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.min.js +1 -0
  1153. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.js +1553 -0
  1154. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.min.js +1 -0
  1155. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.js +125 -0
  1156. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js +1 -0
  1157. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.js +272 -0
  1158. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js +1 -0
  1159. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.js +513 -0
  1160. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js +1 -0
  1161. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js +207 -0
  1162. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js +1 -0
  1163. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js +92 -0
  1164. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js +1 -0
  1165. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +1035 -0
  1166. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js +1 -0
  1167. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js +78 -0
  1168. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.min.js +1 -0
  1169. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.js +130 -0
  1170. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.min.js +1 -0
  1171. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.js +63 -0
  1172. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.min.js +1 -0
  1173. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.js +694 -0
  1174. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +1 -0
  1175. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css +1 -0
  1176. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.min.css +1 -0
  1177. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md +1 -0
  1178. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  1179. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +62 -0
  1180. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  1181. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  1182. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  1183. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg +63 -0
  1184. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  1185. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  1186. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
  1187. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/loader.gif +0 -0
  1188. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/object.gif +0 -0
  1189. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/trans.gif +0 -0
  1190. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  1191. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.min.css +1 -0
  1192. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/audio.png +0 -0
  1193. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png +0 -0
  1194. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png +0 -0
  1195. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/embedded.png +0 -0
  1196. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery-2x.png +0 -0
  1197. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery.png +0 -0
  1198. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more-2x.png +0 -0
  1199. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more.png +0 -0
  1200. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak-2x.png +0 -0
  1201. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak.png +0 -0
  1202. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-audio.png +0 -0
  1203. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-video.png +0 -0
  1204. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/video.png +0 -0
  1205. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/wp-content.css +618 -0
  1206. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.js +617 -0
  1207. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.min.js +1 -0
  1208. data/lib/wp/wp-includes/js/tinymce/tiny_mce_popup.js +539 -0
  1209. data/lib/wp/wp-includes/js/tinymce/tinymce.min.js +11 -0
  1210. data/lib/wp/wp-includes/js/tinymce/utils/editable_selects.js +70 -0
  1211. data/lib/wp/wp-includes/js/tinymce/utils/form_utils.js +210 -0
  1212. data/lib/wp/wp-includes/js/tinymce/utils/mctabs.js +164 -0
  1213. data/lib/wp/wp-includes/js/tinymce/utils/validate.js +252 -0
  1214. data/lib/wp/wp-includes/js/tinymce/wp-mce-help.php +145 -0
  1215. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.js.gz +0 -0
  1216. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.php +39 -0
  1217. data/lib/wp/wp-includes/js/tw-sack.js +193 -0
  1218. data/lib/wp/wp-includes/js/tw-sack.min.js +1 -0
  1219. data/lib/wp/wp-includes/js/underscore.min.js +1 -0
  1220. data/lib/wp/wp-includes/js/utils.js +197 -0
  1221. data/lib/wp/wp-includes/js/utils.min.js +1 -0
  1222. data/lib/wp/wp-includes/js/wp-ajax-response.js +64 -0
  1223. data/lib/wp/wp-includes/js/wp-ajax-response.min.js +1 -0
  1224. data/lib/wp/wp-includes/js/wp-auth-check.js +112 -0
  1225. data/lib/wp/wp-includes/js/wp-auth-check.min.js +1 -0
  1226. data/lib/wp/wp-includes/js/wp-backbone.js +386 -0
  1227. data/lib/wp/wp-includes/js/wp-backbone.min.js +1 -0
  1228. data/lib/wp/wp-includes/js/wp-list-revisions.js +24 -0
  1229. data/lib/wp/wp-includes/js/wp-list-revisions.min.js +1 -0
  1230. data/lib/wp/wp-includes/js/wp-lists.js +469 -0
  1231. data/lib/wp/wp-includes/js/wp-lists.min.js +1 -0
  1232. data/lib/wp/wp-includes/js/wp-pointer.js +282 -0
  1233. data/lib/wp/wp-includes/js/wp-pointer.min.js +1 -0
  1234. data/lib/wp/wp-includes/js/wp-util.js +106 -0
  1235. data/lib/wp/wp-includes/js/wp-util.min.js +1 -0
  1236. data/lib/wp/wp-includes/js/wpdialog.js +19 -0
  1237. data/lib/wp/wp-includes/js/wpdialog.min.js +1 -0
  1238. data/lib/wp/wp-includes/js/wplink.js +615 -0
  1239. data/lib/wp/wp-includes/js/wplink.min.js +1 -0
  1240. data/lib/wp/wp-includes/js/zxcvbn-async.js +18 -0
  1241. data/lib/wp/wp-includes/js/zxcvbn-async.min.js +1 -0
  1242. data/lib/wp/wp-includes/js/zxcvbn.min.js +47 -0
  1243. data/lib/wp/wp-includes/kses.php +1526 -0
  1244. data/lib/wp/wp-includes/l10n.php +908 -0
  1245. data/lib/wp/wp-includes/link-template.php +3141 -0
  1246. data/lib/wp/wp-includes/load.php +828 -0
  1247. data/lib/wp/wp-includes/locale.php +368 -0
  1248. data/lib/wp/wp-includes/media-template.php +1235 -0
  1249. data/lib/wp/wp-includes/media.php +3329 -0
  1250. data/lib/wp/wp-includes/meta.php +1221 -0
  1251. data/lib/wp/wp-includes/ms-blogs.php +939 -0
  1252. data/lib/wp/wp-includes/ms-default-constants.php +153 -0
  1253. data/lib/wp/wp-includes/ms-default-filters.php +82 -0
  1254. data/lib/wp/wp-includes/ms-deprecated.php +347 -0
  1255. data/lib/wp/wp-includes/ms-files.php +82 -0
  1256. data/lib/wp/wp-includes/ms-functions.php +2476 -0
  1257. data/lib/wp/wp-includes/ms-load.php +458 -0
  1258. data/lib/wp/wp-includes/ms-settings.php +213 -0
  1259. data/lib/wp/wp-includes/nav-menu-template.php +678 -0
  1260. data/lib/wp/wp-includes/nav-menu.php +895 -0
  1261. data/lib/wp/wp-includes/option.php +1440 -0
  1262. data/lib/wp/wp-includes/pluggable-deprecated.php +192 -0
  1263. data/lib/wp/wp-includes/pluggable.php +2283 -0
  1264. data/lib/wp/wp-includes/plugin.php +920 -0
  1265. data/lib/wp/wp-includes/pomo/entry.php +78 -0
  1266. data/lib/wp/wp-includes/pomo/mo.php +262 -0
  1267. data/lib/wp/wp-includes/pomo/po.php +384 -0
  1268. data/lib/wp/wp-includes/pomo/streams.php +209 -0
  1269. data/lib/wp/wp-includes/pomo/translations.php +275 -0
  1270. data/lib/wp/wp-includes/post-formats.php +243 -0
  1271. data/lib/wp/wp-includes/post-template.php +1766 -0
  1272. data/lib/wp/wp-includes/post-thumbnail-template.php +142 -0
  1273. data/lib/wp/wp-includes/post.php +5842 -0
  1274. data/lib/wp/wp-includes/query.php +4666 -0
  1275. data/lib/wp/wp-includes/registration-functions.php +7 -0
  1276. data/lib/wp/wp-includes/registration.php +7 -0
  1277. data/lib/wp/wp-includes/revision.php +657 -0
  1278. data/lib/wp/wp-includes/rewrite.php +2180 -0
  1279. data/lib/wp/wp-includes/rss-functions.php +9 -0
  1280. data/lib/wp/wp-includes/rss.php +936 -0
  1281. data/lib/wp/wp-includes/script-loader.php +1045 -0
  1282. data/lib/wp/wp-includes/session.php +430 -0
  1283. data/lib/wp/wp-includes/shortcodes.php +410 -0
  1284. data/lib/wp/wp-includes/taxonomy.php +4006 -0
  1285. data/lib/wp/wp-includes/template-loader.php +76 -0
  1286. data/lib/wp/wp-includes/template.php +505 -0
  1287. data/lib/wp/wp-includes/theme-compat/comments-popup.php +128 -0
  1288. data/lib/wp/wp-includes/theme-compat/comments.php +101 -0
  1289. data/lib/wp/wp-includes/theme-compat/footer.php +30 -0
  1290. data/lib/wp/wp-includes/theme-compat/header.php +49 -0
  1291. data/lib/wp/wp-includes/theme-compat/sidebar.php +83 -0
  1292. data/lib/wp/wp-includes/theme.php +2014 -0
  1293. data/lib/wp/wp-includes/update.php +674 -0
  1294. data/lib/wp/wp-includes/user.php +2292 -0
  1295. data/lib/wp/wp-includes/vars.php +144 -0
  1296. data/lib/wp/wp-includes/version.php +35 -0
  1297. data/lib/wp/wp-includes/widgets.php +1514 -0
  1298. data/lib/wp/wp-includes/wlwmanifest.xml +43 -0
  1299. data/lib/wp/wp-includes/wp-db.php +2190 -0
  1300. data/lib/wp/wp-includes/wp-diff.php +523 -0
  1301. data/lib/wp/wp-links-opml.php +80 -0
  1302. data/lib/wp/wp-load.php +73 -0
  1303. data/lib/wp/wp-login.php +952 -0
  1304. data/lib/wp/wp-mail.php +260 -0
  1305. data/lib/wp/wp-settings.php +374 -0
  1306. data/lib/wp/wp-signup.php +749 -0
  1307. data/lib/wp/wp-trackback.php +127 -0
  1308. data/lib/wp/xmlrpc.php +101 -0
  1309. data/stump-cli.gemspec +26 -0
  1310. metadata +1332 -4
@@ -0,0 +1,284 @@
1
+ <?php
2
+ /**
3
+ * WordPress Taxonomy Administration API.
4
+ *
5
+ * @package WordPress
6
+ * @subpackage Administration
7
+ */
8
+
9
+ //
10
+ // Category
11
+ //
12
+
13
+ /**
14
+ * {@internal Missing Short Description}}
15
+ *
16
+ * @since 2.0.0
17
+ *
18
+ * @param unknown_type $cat_name
19
+ * @return unknown
20
+ */
21
+ function category_exists($cat_name, $parent = 0) {
22
+ $id = term_exists($cat_name, 'category', $parent);
23
+ if ( is_array($id) )
24
+ $id = $id['term_id'];
25
+ return $id;
26
+ }
27
+
28
+ /**
29
+ * {@internal Missing Short Description}}
30
+ *
31
+ * @since 2.0.0
32
+ *
33
+ * @param unknown_type $id
34
+ * @return unknown
35
+ */
36
+ function get_category_to_edit( $id ) {
37
+ $category = get_term( $id, 'category', OBJECT, 'edit' );
38
+ _make_cat_compat( $category );
39
+ return $category;
40
+ }
41
+
42
+ /**
43
+ * {@internal Missing Short Description}}
44
+ *
45
+ * @since 2.0.0
46
+ *
47
+ * @param unknown_type $cat_name
48
+ * @param unknown_type $parent
49
+ * @return unknown
50
+ */
51
+ function wp_create_category( $cat_name, $parent = 0 ) {
52
+ if ( $id = category_exists($cat_name, $parent) )
53
+ return $id;
54
+
55
+ return wp_insert_category( array('cat_name' => $cat_name, 'category_parent' => $parent) );
56
+ }
57
+
58
+ /**
59
+ * Create categories for the given post.
60
+ *
61
+ * @since 2.0.0
62
+ *
63
+ * @param array $categories List of categories to create.
64
+ * @param int $post_id Optional. The post ID. Default empty.
65
+ * @return List of categories to create for the given post.
66
+ */
67
+ function wp_create_categories( $categories, $post_id = '' ) {
68
+ $cat_ids = array ();
69
+ foreach ($categories as $category) {
70
+ if ($id = category_exists($category))
71
+ $cat_ids[] = $id;
72
+ else
73
+ if ($id = wp_create_category($category))
74
+ $cat_ids[] = $id;
75
+ }
76
+
77
+ if ( $post_id )
78
+ wp_set_post_categories($post_id, $cat_ids);
79
+
80
+ return $cat_ids;
81
+ }
82
+
83
+ /**
84
+ * Updates an existing Category or creates a new Category.
85
+ *
86
+ * @since 2.0.0
87
+ * @since 2.5.0 $wp_error parameter was added.
88
+ * @since 3.0.0 The 'taxonomy' argument was added.
89
+ *
90
+ * @param array $catarr {
91
+ * Array of arguments for inserting a new category.
92
+ *
93
+ * @type int $cat_ID Categoriy ID. A non-zero value updates an existing category.
94
+ * Default 0.
95
+ * @type string $taxonomy Taxonomy slug. Defualt 'category'.
96
+ * @type string $cat_nam Category name. Default empty.
97
+ * @type string $category_description Category description. Default empty.
98
+ * @type string $category_nicename Category nice (display) name. Default empty.
99
+ * @type int|string $category_parent Category parent ID. Default empty.
100
+ * }
101
+ * @param bool $wp_error Optional. Default false.
102
+ * @return int|object The ID number of the new or updated Category on success. Zero or a WP_Error on failure,
103
+ * depending on param $wp_error.
104
+ */
105
+ function wp_insert_category( $catarr, $wp_error = false ) {
106
+ $cat_defaults = array( 'cat_ID' => 0, 'taxonomy' => 'category', 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => '' );
107
+ $catarr = wp_parse_args( $catarr, $cat_defaults );
108
+
109
+ if ( trim( $catarr['cat_name'] ) == '' ) {
110
+ if ( ! $wp_error ) {
111
+ return 0;
112
+ } else {
113
+ return new WP_Error( 'cat_name', __( 'You did not enter a category name.' ) );
114
+ }
115
+ }
116
+
117
+ $catarr['cat_ID'] = (int) $catarr['cat_ID'];
118
+
119
+ // Are we updating or creating?
120
+ $update = ! empty ( $catarr['cat_ID'] );
121
+
122
+ $name = $catarr['cat_name'];
123
+ $description = $catarr['category_description'];
124
+ $slug = $catarr['category_nicename'];
125
+ $parent = (int) $catarr['category_parent'];
126
+ if ( $parent < 0 ) {
127
+ $parent = 0;
128
+ }
129
+
130
+ if ( empty( $parent )
131
+ || ! term_exists( $parent, $catarr['taxonomy'] )
132
+ || ( $catarr['cat_ID'] && term_is_ancestor_of( $catarr['cat_ID'], $parent, $catarr['taxonomy'] ) ) ) {
133
+ $parent = 0;
134
+ }
135
+
136
+ $args = compact('name', 'slug', 'parent', 'description');
137
+
138
+ if ( $update ) {
139
+ $catarr['cat_ID'] = wp_update_term( $catarr['cat_ID'], $catarr['taxonomy'], $args );
140
+ } else {
141
+ $catarr['cat_ID'] = wp_insert_term( $catarr['cat_name'], $catarr['taxonomy'], $args );
142
+ }
143
+
144
+ if ( is_wp_error( $catarr['cat_ID'] ) ) {
145
+ if ( $wp_error ) {
146
+ return $catarr['cat_ID'];
147
+ } else {
148
+ return 0;
149
+ }
150
+ }
151
+ return $catarr['cat_ID']['term_id'];
152
+ }
153
+
154
+ /**
155
+ * Aliases wp_insert_category() with minimal args.
156
+ *
157
+ * If you want to update only some fields of an existing category, call this
158
+ * function with only the new values set inside $catarr.
159
+ *
160
+ * @since 2.0.0
161
+ *
162
+ * @param array $catarr The 'cat_ID' value is required. All other keys are optional.
163
+ * @return int|bool The ID number of the new or updated Category on success. Zero or FALSE on failure.
164
+ */
165
+ function wp_update_category($catarr) {
166
+ $cat_ID = (int) $catarr['cat_ID'];
167
+
168
+ if ( isset($catarr['category_parent']) && ($cat_ID == $catarr['category_parent']) )
169
+ return false;
170
+
171
+ // First, get all of the original fields
172
+ $category = get_term( $cat_ID, 'category', ARRAY_A );
173
+ _make_cat_compat( $category );
174
+
175
+ // Escape data pulled from DB.
176
+ $category = wp_slash($category);
177
+
178
+ // Merge old and new fields with new fields overwriting old ones.
179
+ $catarr = array_merge($category, $catarr);
180
+
181
+ return wp_insert_category($catarr);
182
+ }
183
+
184
+ //
185
+ // Tags
186
+ //
187
+
188
+ /**
189
+ * {@internal Missing Short Description}}
190
+ *
191
+ * @since 2.3.0
192
+ *
193
+ * @param unknown_type $tag_name
194
+ * @return unknown
195
+ */
196
+ function tag_exists($tag_name) {
197
+ return term_exists($tag_name, 'post_tag');
198
+ }
199
+
200
+ /**
201
+ * {@internal Missing Short Description}}
202
+ *
203
+ * @since 2.3.0
204
+ *
205
+ * @param unknown_type $tag_name
206
+ * @return unknown
207
+ */
208
+ function wp_create_tag($tag_name) {
209
+ return wp_create_term( $tag_name, 'post_tag');
210
+ }
211
+
212
+ /**
213
+ * {@internal Missing Short Description}}
214
+ *
215
+ * @since 2.3.0
216
+ *
217
+ * @param unknown_type $post_id
218
+ * @return unknown
219
+ */
220
+ function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {
221
+ return get_terms_to_edit( $post_id, $taxonomy);
222
+ }
223
+
224
+ /**
225
+ * {@internal Missing Short Description}}
226
+ *
227
+ * @since 2.8.0
228
+ *
229
+ * @param unknown_type $post_id
230
+ * @return unknown
231
+ */
232
+ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
233
+ $post_id = (int) $post_id;
234
+ if ( !$post_id )
235
+ return false;
236
+
237
+ $terms = get_object_term_cache( $post_id, $taxonomy );
238
+ if ( false === $terms ) {
239
+ $terms = wp_get_object_terms( $post_id, $taxonomy );
240
+ wp_cache_add( $post_id, $terms, $taxonomy . '_relationships' );
241
+ }
242
+
243
+ if ( ! $terms ) {
244
+ return false;
245
+ }
246
+ if ( is_wp_error( $terms ) ) {
247
+ return $terms;
248
+ }
249
+ $term_names = array();
250
+ foreach ( $terms as $term ) {
251
+ $term_names[] = $term->name;
252
+ }
253
+
254
+ $terms_to_edit = esc_attr( join( ',', $term_names ) );
255
+
256
+ /**
257
+ * Filter the comma-separated list of terms available to edit.
258
+ *
259
+ * @since 2.8.0
260
+ *
261
+ * @see get_terms_to_edit()
262
+ *
263
+ * @param array $terms_to_edit An array of terms.
264
+ * @param string $taxonomy The taxonomy for which to retrieve terms. Default 'post_tag'.
265
+ */
266
+ $terms_to_edit = apply_filters( 'terms_to_edit', $terms_to_edit, $taxonomy );
267
+
268
+ return $terms_to_edit;
269
+ }
270
+
271
+ /**
272
+ * {@internal Missing Short Description}}
273
+ *
274
+ * @since 2.8.0
275
+ *
276
+ * @param unknown_type $tag_name
277
+ * @return unknown
278
+ */
279
+ function wp_create_term($tag_name, $taxonomy = 'post_tag') {
280
+ if ( $id = term_exists($tag_name, $taxonomy) )
281
+ return $id;
282
+
283
+ return wp_insert_term($tag_name, $taxonomy);
284
+ }
@@ -0,0 +1,2157 @@
1
+ <?php
2
+ /**
3
+ * Template WordPress Administration API.
4
+ *
5
+ * A Big Mess. Also some neat functions that are nicely written.
6
+ *
7
+ * @package WordPress
8
+ * @subpackage Administration
9
+ */
10
+
11
+ //
12
+ // Category Checklists
13
+ //
14
+
15
+ /**
16
+ * Walker to output an unordered list of category checkbox <input> elements.
17
+ *
18
+ * @see Walker
19
+ * @see wp_category_checklist()
20
+ * @see wp_terms_checklist()
21
+ * @since 2.5.1
22
+ */
23
+ class Walker_Category_Checklist extends Walker {
24
+ public $tree_type = 'category';
25
+ public $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
26
+
27
+ /**
28
+ * Starts the list before the elements are added.
29
+ *
30
+ * @see Walker:start_lvl()
31
+ *
32
+ * @since 2.5.1
33
+ *
34
+ * @param string $output Passed by reference. Used to append additional content.
35
+ * @param int $depth Depth of category. Used for tab indentation.
36
+ * @param array $args An array of arguments. @see wp_terms_checklist()
37
+ */
38
+ public function start_lvl( &$output, $depth = 0, $args = array() ) {
39
+ $indent = str_repeat("\t", $depth);
40
+ $output .= "$indent<ul class='children'>\n";
41
+ }
42
+
43
+ /**
44
+ * Ends the list of after the elements are added.
45
+ *
46
+ * @see Walker::end_lvl()
47
+ *
48
+ * @since 2.5.1
49
+ *
50
+ * @param string $output Passed by reference. Used to append additional content.
51
+ * @param int $depth Depth of category. Used for tab indentation.
52
+ * @param array $args An array of arguments. @see wp_terms_checklist()
53
+ */
54
+ public function end_lvl( &$output, $depth = 0, $args = array() ) {
55
+ $indent = str_repeat("\t", $depth);
56
+ $output .= "$indent</ul>\n";
57
+ }
58
+
59
+ /**
60
+ * Start the element output.
61
+ *
62
+ * @see Walker::start_el()
63
+ *
64
+ * @since 2.5.1
65
+ *
66
+ * @param string $output Passed by reference. Used to append additional content.
67
+ * @param object $category The current term object.
68
+ * @param int $depth Depth of the term in reference to parents. Default 0.
69
+ * @param array $args An array of arguments. @see wp_terms_checklist()
70
+ * @param int $id ID of the current term.
71
+ */
72
+ public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
73
+ if ( empty( $args['taxonomy'] ) ) {
74
+ $taxonomy = 'category';
75
+ } else {
76
+ $taxonomy = $args['taxonomy'];
77
+ }
78
+
79
+ if ( $taxonomy == 'category' ) {
80
+ $name = 'post_category';
81
+ } else {
82
+ $name = 'tax_input[' . $taxonomy . ']';
83
+ }
84
+ $args['popular_cats'] = empty( $args['popular_cats'] ) ? array() : $args['popular_cats'];
85
+ $class = in_array( $category->term_id, $args['popular_cats'] ) ? ' class="popular-category"' : '';
86
+
87
+ $args['selected_cats'] = empty( $args['selected_cats'] ) ? array() : $args['selected_cats'];
88
+
89
+ /** This filter is documented in wp-includes/category-template.php */
90
+ $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" .
91
+ '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' .
92
+ checked( in_array( $category->term_id, $args['selected_cats'] ), true, false ) .
93
+ disabled( empty( $args['disabled'] ), false, false ) . ' /> ' .
94
+ esc_html( apply_filters( 'the_category', $category->name ) ) . '</label>';
95
+ }
96
+
97
+ /**
98
+ * Ends the element output, if needed.
99
+ *
100
+ * @see Walker::end_el()
101
+ *
102
+ * @since 2.5.1
103
+ *
104
+ * @param string $output Passed by reference. Used to append additional content.
105
+ * @param object $category The current term object.
106
+ * @param int $depth Depth of the term in reference to parents. Default 0.
107
+ * @param array $args An array of arguments. @see wp_terms_checklist()
108
+ */
109
+ public function end_el( &$output, $category, $depth = 0, $args = array() ) {
110
+ $output .= "</li>\n";
111
+ }
112
+ }
113
+
114
+ /**
115
+ * Output an unordered list of checkbox <input> elements labelled
116
+ * with category names.
117
+ *
118
+ * @see wp_terms_checklist()
119
+ * @since 2.5.1
120
+ *
121
+ * @param int $post_id Mark categories associated with this post as checked. $selected_cats must not be an array.
122
+ * @param int $descendants_and_self ID of the category to output along with its descendents.
123
+ * @param bool|array $selected_cats List of categories to mark as checked.
124
+ * @param bool|array $popular_cats Override the list of categories that receive the "popular-category" class.
125
+ * @param object $walker Walker object to use to build the output.
126
+ * @param bool $checked_ontop Move checked items out of the hierarchy and to the top of the list.
127
+ */
128
+ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) {
129
+ wp_terms_checklist( $post_id, array(
130
+ 'taxonomy' => 'category',
131
+ 'descendants_and_self' => $descendants_and_self,
132
+ 'selected_cats' => $selected_cats,
133
+ 'popular_cats' => $popular_cats,
134
+ 'walker' => $walker,
135
+ 'checked_ontop' => $checked_ontop
136
+ ) );
137
+ }
138
+
139
+ /**
140
+ * Output an unordered list of checkbox <input> elements labelled
141
+ * with term names. Taxonomy independent version of wp_category_checklist().
142
+ *
143
+ * @since 3.0.0
144
+ *
145
+ * @param int $post_id
146
+ * @param array $args
147
+ */
148
+ function wp_terms_checklist( $post_id = 0, $args = array() ) {
149
+ $defaults = array(
150
+ 'descendants_and_self' => 0,
151
+ 'selected_cats' => false,
152
+ 'popular_cats' => false,
153
+ 'walker' => null,
154
+ 'taxonomy' => 'category',
155
+ 'checked_ontop' => true
156
+ );
157
+
158
+ /**
159
+ * Filter the taxonomy terms checklist arguments.
160
+ *
161
+ * @since 3.4.0
162
+ *
163
+ * @see wp_terms_checklist()
164
+ *
165
+ * @param array $args An array of arguments.
166
+ * @param int $post_id The post ID.
167
+ */
168
+ $params = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
169
+
170
+ $r = wp_parse_args( $params, $defaults );
171
+
172
+ if ( empty( $r['walker'] ) || ! is_a( $r['walker'], 'Walker' ) ) {
173
+ $walker = new Walker_Category_Checklist;
174
+ } else {
175
+ $walker = $r['walker'];
176
+ }
177
+
178
+ $taxonomy = $r['taxonomy'];
179
+ $descendants_and_self = (int) $r['descendants_and_self'];
180
+
181
+ $args = array( 'taxonomy' => $taxonomy );
182
+
183
+ $tax = get_taxonomy( $taxonomy );
184
+ $args['disabled'] = ! current_user_can( $tax->cap->assign_terms );
185
+
186
+ if ( is_array( $r['selected_cats'] ) ) {
187
+ $args['selected_cats'] = $r['selected_cats'];
188
+ } elseif ( $post_id ) {
189
+ $args['selected_cats'] = wp_get_object_terms( $post_id, $taxonomy, array_merge( $args, array( 'fields' => 'ids' ) ) );
190
+ } else {
191
+ $args['selected_cats'] = array();
192
+ }
193
+ if ( is_array( $r['popular_cats'] ) ) {
194
+ $args['popular_cats'] = $r['popular_cats'];
195
+ } else {
196
+ $args['popular_cats'] = get_terms( $taxonomy, array(
197
+ 'fields' => 'ids',
198
+ 'orderby' => 'count',
199
+ 'order' => 'DESC',
200
+ 'number' => 10,
201
+ 'hierarchical' => false
202
+ ) );
203
+ }
204
+ if ( $descendants_and_self ) {
205
+ $categories = (array) get_terms( $taxonomy, array(
206
+ 'child_of' => $descendants_and_self,
207
+ 'hierarchical' => 0,
208
+ 'hide_empty' => 0
209
+ ) );
210
+ $self = get_term( $descendants_and_self, $taxonomy );
211
+ array_unshift( $categories, $self );
212
+ } else {
213
+ $categories = (array) get_terms( $taxonomy, array( 'get' => 'all' ) );
214
+ }
215
+
216
+ if ( $r['checked_ontop'] ) {
217
+ // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache)
218
+ $checked_categories = array();
219
+ $keys = array_keys( $categories );
220
+
221
+ foreach( $keys as $k ) {
222
+ if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) {
223
+ $checked_categories[] = $categories[$k];
224
+ unset( $categories[$k] );
225
+ }
226
+ }
227
+
228
+ // Put checked cats on top
229
+ echo call_user_func_array( array( $walker, 'walk' ), array( $checked_categories, 0, $args ) );
230
+ }
231
+ // Then the rest of them
232
+ echo call_user_func_array( array( $walker, 'walk' ), array( $categories, 0, $args ) );
233
+ }
234
+
235
+ /**
236
+ * Retrieve a list of the most popular terms from the specified taxonomy.
237
+ *
238
+ * If the $echo argument is true then the elements for a list of checkbox
239
+ * <input> elements labelled with the names of the selected terms is output.
240
+ * If the $post_ID global isn't empty then the terms associated with that
241
+ * post will be marked as checked.
242
+ *
243
+ * @since 2.5.0
244
+ *
245
+ * @param string $taxonomy Taxonomy to retrieve terms from.
246
+ * @param int $default Unused.
247
+ * @param int $number Number of terms to retrieve. Defaults to 10.
248
+ * @param bool $echo Optionally output the list as well. Defaults to true.
249
+ * @return array List of popular term IDs.
250
+ */
251
+ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
252
+ $post = get_post();
253
+
254
+ if ( $post && $post->ID )
255
+ $checked_terms = wp_get_object_terms($post->ID, $taxonomy, array('fields'=>'ids'));
256
+ else
257
+ $checked_terms = array();
258
+
259
+ $terms = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) );
260
+
261
+ $tax = get_taxonomy($taxonomy);
262
+
263
+ $popular_ids = array();
264
+ foreach ( (array) $terms as $term ) {
265
+ $popular_ids[] = $term->term_id;
266
+ if ( !$echo ) // hack for AJAX use
267
+ continue;
268
+ $id = "popular-$taxonomy-$term->term_id";
269
+ $checked = in_array( $term->term_id, $checked_terms ) ? 'checked="checked"' : '';
270
+ ?>
271
+
272
+ <li id="<?php echo $id; ?>" class="popular-category">
273
+ <label class="selectit">
274
+ <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
275
+ <?php
276
+ /** This filter is documented in wp-includes/category-template.php */
277
+ echo esc_html( apply_filters( 'the_category', $term->name ) );
278
+ ?>
279
+ </label>
280
+ </li>
281
+
282
+ <?php
283
+ }
284
+ return $popular_ids;
285
+ }
286
+
287
+ /**
288
+ * {@internal Missing Short Description}}
289
+ *
290
+ * @since 2.5.1
291
+ *
292
+ * @param unknown_type $link_id
293
+ */
294
+ function wp_link_category_checklist( $link_id = 0 ) {
295
+ $default = 1;
296
+
297
+ if ( $link_id ) {
298
+ $checked_categories = wp_get_link_cats( $link_id );
299
+ // No selected categories, strange
300
+ if ( ! count( $checked_categories ) )
301
+ $checked_categories[] = $default;
302
+ } else {
303
+ $checked_categories[] = $default;
304
+ }
305
+
306
+ $categories = get_terms( 'link_category', array( 'orderby' => 'name', 'hide_empty' => 0 ) );
307
+
308
+ if ( empty( $categories ) )
309
+ return;
310
+
311
+ foreach ( $categories as $category ) {
312
+ $cat_id = $category->term_id;
313
+
314
+ /** This filter is documented in wp-includes/category-template.php */
315
+ $name = esc_html( apply_filters( 'the_category', $category->name ) );
316
+ $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : '';
317
+ echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, "</label></li>";
318
+ }
319
+ }
320
+
321
+ // adds hidden fields with the data for use in the inline editor for posts and pages
322
+ /**
323
+ * {@internal Missing Short Description}}
324
+ *
325
+ * @since 2.7.0
326
+ *
327
+ * @param unknown_type $post
328
+ */
329
+ function get_inline_data($post) {
330
+ $post_type_object = get_post_type_object($post->post_type);
331
+ if ( ! current_user_can( 'edit_post', $post->ID ) )
332
+ return;
333
+
334
+ $title = esc_textarea( trim( $post->post_title ) );
335
+
336
+ /** This filter is documented in wp-admin/edit-tag-form.php */
337
+ echo '
338
+ <div class="hidden" id="inline_' . $post->ID . '">
339
+ <div class="post_title">' . $title . '</div>
340
+ <div class="post_name">' . apply_filters( 'editable_slug', $post->post_name ) . '</div>
341
+ <div class="post_author">' . $post->post_author . '</div>
342
+ <div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
343
+ <div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
344
+ <div class="_status">' . esc_html( $post->post_status ) . '</div>
345
+ <div class="jj">' . mysql2date( 'd', $post->post_date, false ) . '</div>
346
+ <div class="mm">' . mysql2date( 'm', $post->post_date, false ) . '</div>
347
+ <div class="aa">' . mysql2date( 'Y', $post->post_date, false ) . '</div>
348
+ <div class="hh">' . mysql2date( 'H', $post->post_date, false ) . '</div>
349
+ <div class="mn">' . mysql2date( 'i', $post->post_date, false ) . '</div>
350
+ <div class="ss">' . mysql2date( 's', $post->post_date, false ) . '</div>
351
+ <div class="post_password">' . esc_html( $post->post_password ) . '</div>';
352
+
353
+ if ( $post_type_object->hierarchical )
354
+ echo '<div class="post_parent">' . $post->post_parent . '</div>';
355
+
356
+ if ( $post->post_type == 'page' )
357
+ echo '<div class="page_template">' . esc_html( get_post_meta( $post->ID, '_wp_page_template', true ) ) . '</div>';
358
+
359
+ if ( post_type_supports( $post->post_type, 'page-attributes' ) )
360
+ echo '<div class="menu_order">' . $post->menu_order . '</div>';
361
+
362
+ $taxonomy_names = get_object_taxonomies( $post->post_type );
363
+ foreach ( $taxonomy_names as $taxonomy_name) {
364
+ $taxonomy = get_taxonomy( $taxonomy_name );
365
+
366
+ if ( $taxonomy->hierarchical && $taxonomy->show_ui ) {
367
+
368
+ $terms = get_object_term_cache( $post->ID, $taxonomy_name );
369
+ if ( false === $terms ) {
370
+ $terms = wp_get_object_terms( $post->ID, $taxonomy_name );
371
+ wp_cache_add( $post->ID, $terms, $taxonomy_name . '_relationships' );
372
+ }
373
+ $term_ids = empty( $terms ) ? array() : wp_list_pluck( $terms, 'term_id' );
374
+
375
+ echo '<div class="post_category" id="' . $taxonomy_name . '_' . $post->ID . '">' . implode( ',', $term_ids ) . '</div>';
376
+
377
+ } elseif ( $taxonomy->show_ui ) {
378
+
379
+ echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">'
380
+ . esc_html( str_replace( ',', ', ', get_terms_to_edit( $post->ID, $taxonomy_name ) ) ) . '</div>';
381
+
382
+ }
383
+ }
384
+
385
+ if ( !$post_type_object->hierarchical )
386
+ echo '<div class="sticky">' . (is_sticky($post->ID) ? 'sticky' : '') . '</div>';
387
+
388
+ if ( post_type_supports( $post->post_type, 'post-formats' ) )
389
+ echo '<div class="post_format">' . esc_html( get_post_format( $post->ID ) ) . '</div>';
390
+
391
+ echo '</div>';
392
+ }
393
+
394
+ /**
395
+ * {@internal Missing Short Description}}
396
+ *
397
+ * @since 2.7.0
398
+ *
399
+ * @param unknown_type $position
400
+ * @param unknown_type $checkbox
401
+ * @param unknown_type $mode
402
+ */
403
+ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) {
404
+
405
+ /**
406
+ * Filter the in-line comment reply-to form output in the Comments
407
+ * list table.
408
+ *
409
+ * Returning a non-empty value here will short-circuit display
410
+ * of the in-line comment-reply form in the Comments list table,
411
+ * echoing the returned value instead.
412
+ *
413
+ * @since 2.7.0
414
+ *
415
+ * @see wp_comment_reply()
416
+ *
417
+ * @param string $content The reply-to form content.
418
+ * @param array $args An array of default args.
419
+ */
420
+ $content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) );
421
+
422
+ if ( ! empty($content) ) {
423
+ echo $content;
424
+ return;
425
+ }
426
+
427
+ if ( $mode == 'single' ) {
428
+ $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
429
+ } else {
430
+ $wp_list_table = _get_list_table('WP_Comments_List_Table');
431
+ }
432
+
433
+ ?>
434
+ <form method="get" action="">
435
+ <?php if ( $table_row ) : ?>
436
+ <table style="display:none;"><tbody id="com-reply"><tr id="replyrow" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange">
437
+ <?php else : ?>
438
+ <div id="com-reply" style="display:none;"><div id="replyrow" style="display:none;">
439
+ <?php endif; ?>
440
+ <div id="replyhead" style="display:none;"><h5><?php _e( 'Reply to Comment' ); ?></h5></div>
441
+ <div id="addhead" style="display:none;"><h5><?php _e('Add new Comment'); ?></h5></div>
442
+ <div id="edithead" style="display:none;">
443
+ <div class="inside">
444
+ <label for="author"><?php _e('Name') ?></label>
445
+ <input type="text" name="newcomment_author" size="50" value="" id="author" />
446
+ </div>
447
+
448
+ <div class="inside">
449
+ <label for="author-email"><?php _e('E-mail') ?></label>
450
+ <input type="text" name="newcomment_author_email" size="50" value="" id="author-email" />
451
+ </div>
452
+
453
+ <div class="inside">
454
+ <label for="author-url"><?php _e('URL') ?></label>
455
+ <input type="text" id="author-url" name="newcomment_author_url" class="code" size="103" value="" />
456
+ </div>
457
+ <div style="clear:both;"></div>
458
+ </div>
459
+
460
+ <div id="replycontainer">
461
+ <?php
462
+ $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
463
+ wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
464
+ ?>
465
+ </div>
466
+
467
+ <p id="replysubmit" class="submit">
468
+ <a href="#comments-form" class="save button-primary alignright">
469
+ <span id="addbtn" style="display:none;"><?php _e('Add Comment'); ?></span>
470
+ <span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span>
471
+ <span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a>
472
+ <a href="#comments-form" class="cancel button-secondary alignleft"><?php _e('Cancel'); ?></a>
473
+ <span class="waiting spinner"></span>
474
+ <span class="error" style="display:none;"></span>
475
+ <br class="clear" />
476
+ </p>
477
+
478
+ <input type="hidden" name="user_ID" id="user_ID" value="<?php echo get_current_user_id(); ?>" />
479
+ <input type="hidden" name="action" id="action" value="" />
480
+ <input type="hidden" name="comment_ID" id="comment_ID" value="" />
481
+ <input type="hidden" name="comment_post_ID" id="comment_post_ID" value="" />
482
+ <input type="hidden" name="status" id="status" value="" />
483
+ <input type="hidden" name="position" id="position" value="<?php echo $position; ?>" />
484
+ <input type="hidden" name="checkbox" id="checkbox" value="<?php echo $checkbox ? 1 : 0; ?>" />
485
+ <input type="hidden" name="mode" id="mode" value="<?php echo esc_attr($mode); ?>" />
486
+ <?php
487
+ wp_nonce_field( 'replyto-comment', '_ajax_nonce-replyto-comment', false );
488
+ if ( current_user_can( 'unfiltered_html' ) )
489
+ wp_nonce_field( 'unfiltered-html-comment', '_wp_unfiltered_html_comment', false );
490
+ ?>
491
+ <?php if ( $table_row ) : ?>
492
+ </td></tr></tbody></table>
493
+ <?php else : ?>
494
+ </div></div>
495
+ <?php endif; ?>
496
+ </form>
497
+ <?php
498
+ }
499
+
500
+ /**
501
+ * Output 'undo move to trash' text for comments
502
+ *
503
+ * @since 2.9.0
504
+ */
505
+ function wp_comment_trashnotice() {
506
+ ?>
507
+ <div class="hidden" id="trash-undo-holder">
508
+ <div class="trash-undo-inside"><?php printf(__('Comment by %s moved to the trash.'), '<strong></strong>'); ?> <span class="undo untrash"><a href="#"><?php _e('Undo'); ?></a></span></div>
509
+ </div>
510
+ <div class="hidden" id="spam-undo-holder">
511
+ <div class="spam-undo-inside"><?php printf(__('Comment by %s marked as spam.'), '<strong></strong>'); ?> <span class="undo unspam"><a href="#"><?php _e('Undo'); ?></a></span></div>
512
+ </div>
513
+ <?php
514
+ }
515
+
516
+ /**
517
+ * {@internal Missing Short Description}}
518
+ *
519
+ * @since 1.2.0
520
+ *
521
+ * @param unknown_type $meta
522
+ */
523
+ function list_meta( $meta ) {
524
+ // Exit if no meta
525
+ if ( ! $meta ) {
526
+ echo '
527
+ <table id="list-table" style="display: none;">
528
+ <thead>
529
+ <tr>
530
+ <th class="left">' . _x( 'Name', 'meta name' ) . '</th>
531
+ <th>' . __( 'Value' ) . '</th>
532
+ </tr>
533
+ </thead>
534
+ <tbody id="the-list" data-wp-lists="list:meta">
535
+ <tr><td></td></tr>
536
+ </tbody>
537
+ </table>'; //TBODY needed for list-manipulation JS
538
+ return;
539
+ }
540
+ $count = 0;
541
+ ?>
542
+ <table id="list-table">
543
+ <thead>
544
+ <tr>
545
+ <th class="left"><?php _ex( 'Name', 'meta name' ) ?></th>
546
+ <th><?php _e( 'Value' ) ?></th>
547
+ </tr>
548
+ </thead>
549
+ <tbody id='the-list' data-wp-lists='list:meta'>
550
+ <?php
551
+ foreach ( $meta as $entry )
552
+ echo _list_meta_row( $entry, $count );
553
+ ?>
554
+ </tbody>
555
+ </table>
556
+ <?php
557
+ }
558
+
559
+ /**
560
+ * {@internal Missing Short Description}}
561
+ *
562
+ * @since 2.5.0
563
+ *
564
+ * @param unknown_type $entry
565
+ * @param unknown_type $count
566
+ * @return unknown
567
+ */
568
+ function _list_meta_row( $entry, &$count ) {
569
+ static $update_nonce = false;
570
+
571
+ if ( is_protected_meta( $entry['meta_key'], 'post' ) )
572
+ return;
573
+
574
+ if ( !$update_nonce )
575
+ $update_nonce = wp_create_nonce( 'add-meta' );
576
+
577
+ $r = '';
578
+ ++ $count;
579
+ if ( $count % 2 )
580
+ $style = 'alternate';
581
+ else
582
+ $style = '';
583
+
584
+ if ( is_serialized( $entry['meta_value'] ) ) {
585
+ if ( is_serialized_string( $entry['meta_value'] ) ) {
586
+ // This is a serialized string, so we should display it.
587
+ $entry['meta_value'] = maybe_unserialize( $entry['meta_value'] );
588
+ } else {
589
+ // This is a serialized array/object so we should NOT display it.
590
+ --$count;
591
+ return;
592
+ }
593
+ }
594
+
595
+ $entry['meta_key'] = esc_attr($entry['meta_key']);
596
+ $entry['meta_value'] = esc_textarea( $entry['meta_value'] ); // using a <textarea />
597
+ $entry['meta_id'] = (int) $entry['meta_id'];
598
+
599
+ $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] );
600
+
601
+ $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";
602
+ $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta-{$entry['meta_id']}-key'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta-{$entry['meta_id']}-key' type='text' size='20' value='{$entry['meta_key']}' />";
603
+
604
+ $r .= "\n\t\t<div class='submit'>";
605
+ $r .= get_submit_button( __( 'Delete' ), 'deletemeta small', "deletemeta[{$entry['meta_id']}]", false, array( 'data-wp-lists' => "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce" ) );
606
+ $r .= "\n\t\t";
607
+ $r .= get_submit_button( __( 'Update' ), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array( 'data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce" ) );
608
+ $r .= "</div>";
609
+ $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
610
+ $r .= "</td>";
611
+
612
+ $r .= "\n\t\t<td><label class='screen-reader-text' for='meta-{$entry['meta_id']}-value'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta-{$entry['meta_id']}-value' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
613
+ return $r;
614
+ }
615
+
616
+ /**
617
+ * Prints the form in the Custom Fields meta box.
618
+ *
619
+ * @since 1.2.0
620
+ *
621
+ * @param WP_Post $post Optional. The post being edited.
622
+ */
623
+ function meta_form( $post = null ) {
624
+ global $wpdb;
625
+ $post = get_post( $post );
626
+
627
+ /**
628
+ * Filter the number of custom fields to retrieve for the drop-down
629
+ * in the Custom Fields meta box.
630
+ *
631
+ * @since 2.1.0
632
+ *
633
+ * @param int $limit Number of custom fields to retrieve. Default 30.
634
+ */
635
+ $limit = apply_filters( 'postmeta_form_limit', 30 );
636
+ $sql = "SELECT meta_key
637
+ FROM $wpdb->postmeta
638
+ GROUP BY meta_key
639
+ HAVING meta_key NOT LIKE %s
640
+ ORDER BY meta_key
641
+ LIMIT %d";
642
+ $keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( '_' ) . '%', $limit ) );
643
+ if ( $keys ) {
644
+ natcasesort( $keys );
645
+ $meta_key_input_id = 'metakeyselect';
646
+ } else {
647
+ $meta_key_input_id = 'metakeyinput';
648
+ }
649
+ ?>
650
+ <p><strong><?php _e( 'Add New Custom Field:' ) ?></strong></p>
651
+ <table id="newmeta">
652
+ <thead>
653
+ <tr>
654
+ <th class="left"><label for="<?php echo $meta_key_input_id; ?>"><?php _ex( 'Name', 'meta name' ) ?></label></th>
655
+ <th><label for="metavalue"><?php _e( 'Value' ) ?></label></th>
656
+ </tr>
657
+ </thead>
658
+
659
+ <tbody>
660
+ <tr>
661
+ <td id="newmetaleft" class="left">
662
+ <?php if ( $keys ) { ?>
663
+ <select id="metakeyselect" name="metakeyselect">
664
+ <option value="#NONE#"><?php _e( '&mdash; Select &mdash;' ); ?></option>
665
+ <?php
666
+
667
+ foreach ( $keys as $key ) {
668
+ if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'add_post_meta', $post->ID, $key ) )
669
+ continue;
670
+ echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . "</option>";
671
+ }
672
+ ?>
673
+ </select>
674
+ <input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" value="" />
675
+ <a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
676
+ <span id="enternew"><?php _e('Enter new'); ?></span>
677
+ <span id="cancelnew" class="hidden"><?php _e('Cancel'); ?></span></a>
678
+ <?php } else { ?>
679
+ <input type="text" id="metakeyinput" name="metakeyinput" value="" />
680
+ <?php } ?>
681
+ </td>
682
+ <td><textarea id="metavalue" name="metavalue" rows="2" cols="25"></textarea></td>
683
+ </tr>
684
+
685
+ <tr><td colspan="2">
686
+ <div class="submit">
687
+ <?php submit_button( __( 'Add Custom Field' ), 'secondary', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
688
+ </div>
689
+ <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
690
+ </td></tr>
691
+ </tbody>
692
+ </table>
693
+ <?php
694
+
695
+ }
696
+
697
+ /**
698
+ * Print out HTML form date elements for editing post or comment publish date.
699
+ *
700
+ * @since 0.71
701
+ *
702
+ * @param int|bool $edit Accepts 1|true for editing the date, 0|false for adding the date.
703
+ * @param int|bool $for_post Accepts 1|true for applying the date to a post, 0|false for a comment.
704
+ * @param int|bool $tab_index The tabindex attribute to add. Default 0.
705
+ * @param int|bool $multi Optional. Whether the additional fields and buttons should be added.
706
+ * Default 0|false.
707
+ */
708
+ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
709
+ global $wp_locale, $comment;
710
+ $post = get_post();
711
+
712
+ if ( $for_post )
713
+ $edit = ! ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) );
714
+
715
+ $tab_index_attribute = '';
716
+ if ( (int) $tab_index > 0 )
717
+ $tab_index_attribute = " tabindex=\"$tab_index\"";
718
+
719
+ // todo: Remove this?
720
+ // echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />';
721
+
722
+ $time_adj = current_time('timestamp');
723
+ $post_date = ($for_post) ? $post->post_date : $comment->comment_date;
724
+ $jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj );
725
+ $mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj );
726
+ $aa = ($edit) ? mysql2date( 'Y', $post_date, false ) : gmdate( 'Y', $time_adj );
727
+ $hh = ($edit) ? mysql2date( 'H', $post_date, false ) : gmdate( 'H', $time_adj );
728
+ $mn = ($edit) ? mysql2date( 'i', $post_date, false ) : gmdate( 'i', $time_adj );
729
+ $ss = ($edit) ? mysql2date( 's', $post_date, false ) : gmdate( 's', $time_adj );
730
+
731
+ $cur_jj = gmdate( 'd', $time_adj );
732
+ $cur_mm = gmdate( 'm', $time_adj );
733
+ $cur_aa = gmdate( 'Y', $time_adj );
734
+ $cur_hh = gmdate( 'H', $time_adj );
735
+ $cur_mn = gmdate( 'i', $time_adj );
736
+
737
+ $month = '<label for="mm" class="screen-reader-text">' . __( 'Month' ) . '</label><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
738
+ for ( $i = 1; $i < 13; $i = $i +1 ) {
739
+ $monthnum = zeroise($i, 2);
740
+ $month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $monthnum, $mm, false ) . '>';
741
+ /* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
742
+ $month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
743
+ }
744
+ $month .= '</select>';
745
+
746
+ $day = '<label for="jj" class="screen-reader-text">' . __( 'Day' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
747
+ $year = '<label for="aa" class="screen-reader-text">' . __( 'Year' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
748
+ $hour = '<label for="hh" class="screen-reader-text">' . __( 'Hour' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
749
+ $minute = '<label for="mn" class="screen-reader-text">' . __( 'Minute' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
750
+
751
+ echo '<div class="timestamp-wrap">';
752
+ /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
753
+ printf( __( '%1$s %2$s, %3$s @ %4$s : %5$s' ), $month, $day, $year, $hour, $minute );
754
+
755
+ echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
756
+
757
+ if ( $multi ) return;
758
+
759
+ echo "\n\n";
760
+ $map = array(
761
+ 'mm' => array( $mm, $cur_mm ),
762
+ 'jj' => array( $jj, $cur_jj ),
763
+ 'aa' => array( $aa, $cur_aa ),
764
+ 'hh' => array( $hh, $cur_hh ),
765
+ 'mn' => array( $mn, $cur_mn ),
766
+ );
767
+ foreach ( $map as $timeunit => $value ) {
768
+ list( $unit, $curr ) = $value;
769
+
770
+ echo '<input type="hidden" id="hidden_' . $timeunit . '" name="hidden_' . $timeunit . '" value="' . $unit . '" />' . "\n";
771
+ $cur_timeunit = 'cur_' . $timeunit;
772
+ echo '<input type="hidden" id="' . $cur_timeunit . '" name="' . $cur_timeunit . '" value="' . $curr . '" />' . "\n";
773
+ }
774
+ ?>
775
+
776
+ <p>
777
+ <a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e('OK'); ?></a>
778
+ <a href="#edit_timestamp" class="cancel-timestamp hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a>
779
+ </p>
780
+ <?php
781
+ }
782
+
783
+ /**
784
+ * Print out <option> HTML elements for the page templates drop-down.
785
+ *
786
+ * @since 1.5.0
787
+ *
788
+ * @param string $default Optional. The template file name. Default empty.
789
+ */
790
+ function page_template_dropdown( $default = '' ) {
791
+ $templates = get_page_templates( get_post() );
792
+ ksort( $templates );
793
+ foreach ( array_keys( $templates ) as $template ) {
794
+ $selected = selected( $default, $templates[ $template ], false );
795
+ echo "\n\t<option value='" . $templates[ $template ] . "' $selected>$template</option>";
796
+ }
797
+ }
798
+
799
+ /**
800
+ * Print out <option> HTML elements for the page parents drop-down.
801
+ *
802
+ * @since 1.5.0
803
+ *
804
+ * @param int $default Optional. The default page ID to be pre-selected. Default 0.
805
+ * @param int $parent Optional. The parent page ID. Default 0.
806
+ * @param int $level Optional. Page depth level. Default 0.
807
+ *
808
+ * @return void|bool Boolean False if page has no children, otherwise print out html elements
809
+ */
810
+ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
811
+ global $wpdb;
812
+ $post = get_post();
813
+ $items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) );
814
+
815
+ if ( $items ) {
816
+ foreach ( $items as $item ) {
817
+ // A page cannot be its own parent.
818
+ if ( $post && $post->ID && $item->ID == $post->ID )
819
+ continue;
820
+
821
+ $pad = str_repeat( '&nbsp;', $level * 3 );
822
+ $selected = selected( $default, $item->ID, false );
823
+
824
+ echo "\n\t<option class='level-$level' value='$item->ID' $selected>$pad " . esc_html($item->post_title) . "</option>";
825
+ parent_dropdown( $default, $item->ID, $level +1 );
826
+ }
827
+ } else {
828
+ return false;
829
+ }
830
+ }
831
+
832
+ /**
833
+ * Print out <option> html elements for role selectors
834
+ *
835
+ * @since 2.1.0
836
+ *
837
+ * @param string $selected slug for the role that should be already selected
838
+ */
839
+ function wp_dropdown_roles( $selected = false ) {
840
+ $p = '';
841
+ $r = '';
842
+
843
+ $editable_roles = array_reverse( get_editable_roles() );
844
+
845
+ foreach ( $editable_roles as $role => $details ) {
846
+ $name = translate_user_role($details['name'] );
847
+ if ( $selected == $role ) // preselect specified role
848
+ $p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>";
849
+ else
850
+ $r .= "\n\t<option value='" . esc_attr($role) . "'>$name</option>";
851
+ }
852
+ echo $p . $r;
853
+ }
854
+
855
+ /**
856
+ * Outputs the form used by the importers to accept the data to be imported
857
+ *
858
+ * @since 2.0.0
859
+ *
860
+ * @param string $action The action attribute for the form.
861
+ */
862
+ function wp_import_upload_form( $action ) {
863
+
864
+ /**
865
+ * Filter the maximum allowed upload size for import files.
866
+ *
867
+ * @since 2.3.0
868
+ *
869
+ * @see wp_max_upload_size()
870
+ *
871
+ * @param int $max_upload_size Allowed upload size. Default 1 MB.
872
+ */
873
+ $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
874
+ $size = size_format( $bytes );
875
+ $upload_dir = wp_upload_dir();
876
+ if ( ! empty( $upload_dir['error'] ) ) :
877
+ ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>
878
+ <p><strong><?php echo $upload_dir['error']; ?></strong></p></div><?php
879
+ else :
880
+ ?>
881
+ <form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_url( wp_nonce_url( $action, 'import-upload' ) ); ?>">
882
+ <p>
883
+ <label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __('Maximum size: %s' ), $size ); ?>)
884
+ <input type="file" id="upload" name="import" size="25" />
885
+ <input type="hidden" name="action" value="save" />
886
+ <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
887
+ </p>
888
+ <?php submit_button( __('Upload file and import'), 'button' ); ?>
889
+ </form>
890
+ <?php
891
+ endif;
892
+ }
893
+
894
+ /**
895
+ * Add a meta box to an edit form.
896
+ *
897
+ * @since 2.5.0
898
+ *
899
+ * @param string $id String for use in the 'id' attribute of tags.
900
+ * @param string $title Title of the meta box.
901
+ * @param callback $callback Function that fills the box with the desired content.
902
+ * The function should echo its output.
903
+ * @param string|WP_Screen $screen Optional. The screen on which to show the box (like a post
904
+ * type, 'link', or 'comment'). Default is the current screen.
905
+ * @param string $context Optional. The context within the screen where the boxes
906
+ * should display. Available contexts vary from screen to
907
+ * screen. Post edit screen contexts include 'normal', 'side',
908
+ * and 'advanced'. Comments screen contexts include 'normal'
909
+ * and 'side'. Menus meta boxes (accordion sections) all use
910
+ * the 'side' context. Global default is 'advanced'.
911
+ * @param string $priority Optional. The priority within the context where the boxes
912
+ * should show ('high', 'low'). Default 'default'.
913
+ * @param array $callback_args Optional. Data that should be set as the $args property
914
+ * of the box array (which is the second parameter passed
915
+ * to your callback). Default null.
916
+ */
917
+ function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null ) {
918
+ global $wp_meta_boxes;
919
+
920
+ if ( empty( $screen ) )
921
+ $screen = get_current_screen();
922
+ elseif ( is_string( $screen ) )
923
+ $screen = convert_to_screen( $screen );
924
+
925
+ $page = $screen->id;
926
+
927
+ if ( !isset($wp_meta_boxes) )
928
+ $wp_meta_boxes = array();
929
+ if ( !isset($wp_meta_boxes[$page]) )
930
+ $wp_meta_boxes[$page] = array();
931
+ if ( !isset($wp_meta_boxes[$page][$context]) )
932
+ $wp_meta_boxes[$page][$context] = array();
933
+
934
+ foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) {
935
+ foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
936
+ if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
937
+ continue;
938
+
939
+ // If a core box was previously added or removed by a plugin, don't add.
940
+ if ( 'core' == $priority ) {
941
+ // If core box previously deleted, don't add
942
+ if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
943
+ return;
944
+
945
+ /*
946
+ * If box was added with default priority, give it core priority to
947
+ * maintain sort order.
948
+ */
949
+ if ( 'default' == $a_priority ) {
950
+ $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id];
951
+ unset($wp_meta_boxes[$page][$a_context]['default'][$id]);
952
+ }
953
+ return;
954
+ }
955
+ // If no priority given and id already present, use existing priority.
956
+ if ( empty($priority) ) {
957
+ $priority = $a_priority;
958
+ /*
959
+ * Else, if we're adding to the sorted priority, we don't know the title
960
+ * or callback. Grab them from the previously added context/priority.
961
+ */
962
+ } elseif ( 'sorted' == $priority ) {
963
+ $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
964
+ $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback'];
965
+ $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args'];
966
+ }
967
+ // An id can be in only one priority and one context.
968
+ if ( $priority != $a_priority || $context != $a_context )
969
+ unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]);
970
+ }
971
+ }
972
+
973
+ if ( empty($priority) )
974
+ $priority = 'low';
975
+
976
+ if ( !isset($wp_meta_boxes[$page][$context][$priority]) )
977
+ $wp_meta_boxes[$page][$context][$priority] = array();
978
+
979
+ $wp_meta_boxes[$page][$context][$priority][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $callback_args);
980
+ }
981
+
982
+ /**
983
+ * Meta-Box template function
984
+ *
985
+ * @since 2.5.0
986
+ *
987
+ * @param string|object $screen Screen identifier
988
+ * @param string $context box context
989
+ * @param mixed $object gets passed to the box callback function as first parameter
990
+ * @return int number of meta_boxes
991
+ */
992
+ function do_meta_boxes( $screen, $context, $object ) {
993
+ global $wp_meta_boxes;
994
+ static $already_sorted = false;
995
+
996
+ if ( empty( $screen ) )
997
+ $screen = get_current_screen();
998
+ elseif ( is_string( $screen ) )
999
+ $screen = convert_to_screen( $screen );
1000
+
1001
+ $page = $screen->id;
1002
+
1003
+ $hidden = get_hidden_meta_boxes( $screen );
1004
+
1005
+ printf('<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars($context));
1006
+
1007
+ $i = 0;
1008
+ do {
1009
+ // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose
1010
+ if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) {
1011
+ foreach ( $sorted as $box_context => $ids ) {
1012
+ foreach ( explode(',', $ids ) as $id ) {
1013
+ if ( $id && 'dashboard_browser_nag' !== $id )
1014
+ add_meta_box( $id, null, null, $screen, $box_context, 'sorted' );
1015
+ }
1016
+ }
1017
+ }
1018
+ $already_sorted = true;
1019
+
1020
+ if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$page]) || !isset($wp_meta_boxes[$page][$context]) )
1021
+ break;
1022
+
1023
+ foreach ( array('high', 'sorted', 'core', 'default', 'low') as $priority ) {
1024
+ if ( isset($wp_meta_boxes[$page][$context][$priority]) ) {
1025
+ foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) {
1026
+ if ( false == $box || ! $box['title'] )
1027
+ continue;
1028
+ $i++;
1029
+ $hidden_class = in_array($box['id'], $hidden) ? ' hide-if-js' : '';
1030
+ echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . $hidden_class . '" ' . '>' . "\n";
1031
+ if ( 'dashboard_browser_nag' != $box['id'] )
1032
+ echo '<div class="handlediv" title="' . esc_attr__('Click to toggle') . '"><br /></div>';
1033
+ echo "<h3 class='hndle'><span>{$box['title']}</span></h3>\n";
1034
+ echo '<div class="inside">' . "\n";
1035
+ call_user_func($box['callback'], $object, $box);
1036
+ echo "</div>\n";
1037
+ echo "</div>\n";
1038
+ }
1039
+ }
1040
+ }
1041
+ } while(0);
1042
+
1043
+ echo "</div>";
1044
+
1045
+ return $i;
1046
+
1047
+ }
1048
+
1049
+ /**
1050
+ * Remove a meta box from an edit form.
1051
+ *
1052
+ * @since 2.6.0
1053
+ *
1054
+ * @param string $id String for use in the 'id' attribute of tags.
1055
+ * @param string|object $screen The screen on which to show the box (post, page, link).
1056
+ * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
1057
+ */
1058
+ function remove_meta_box($id, $screen, $context) {
1059
+ global $wp_meta_boxes;
1060
+
1061
+ if ( empty( $screen ) )
1062
+ $screen = get_current_screen();
1063
+ elseif ( is_string( $screen ) )
1064
+ $screen = convert_to_screen( $screen );
1065
+
1066
+ $page = $screen->id;
1067
+
1068
+ if ( !isset($wp_meta_boxes) )
1069
+ $wp_meta_boxes = array();
1070
+ if ( !isset($wp_meta_boxes[$page]) )
1071
+ $wp_meta_boxes[$page] = array();
1072
+ if ( !isset($wp_meta_boxes[$page][$context]) )
1073
+ $wp_meta_boxes[$page][$context] = array();
1074
+
1075
+ foreach ( array('high', 'core', 'default', 'low') as $priority )
1076
+ $wp_meta_boxes[$page][$context][$priority][$id] = false;
1077
+ }
1078
+
1079
+ /**
1080
+ * Meta Box Accordion Template Function
1081
+ *
1082
+ * Largely made up of abstracted code from {@link do_meta_boxes()}, this
1083
+ * function serves to build meta boxes as list items for display as
1084
+ * a collapsible accordion.
1085
+ *
1086
+ * @since 3.6.0
1087
+ *
1088
+ * @uses global $wp_meta_boxes Used to retrieve registered meta boxes.
1089
+ *
1090
+ * @param string|object $screen The screen identifier.
1091
+ * @param string $context The meta box context.
1092
+ * @param mixed $object gets passed to the section callback function as first parameter.
1093
+ * @return int number of meta boxes as accordion sections.
1094
+ */
1095
+ function do_accordion_sections( $screen, $context, $object ) {
1096
+ global $wp_meta_boxes;
1097
+
1098
+ wp_enqueue_script( 'accordion' );
1099
+
1100
+ if ( empty( $screen ) )
1101
+ $screen = get_current_screen();
1102
+ elseif ( is_string( $screen ) )
1103
+ $screen = convert_to_screen( $screen );
1104
+
1105
+ $page = $screen->id;
1106
+
1107
+ $hidden = get_hidden_meta_boxes( $screen );
1108
+ ?>
1109
+ <div id="side-sortables" class="accordion-container">
1110
+ <ul class="outer-border">
1111
+ <?php
1112
+ $i = 0;
1113
+ $first_open = false;
1114
+ do {
1115
+ if ( ! isset( $wp_meta_boxes ) || ! isset( $wp_meta_boxes[$page] ) || ! isset( $wp_meta_boxes[$page][$context] ) )
1116
+ break;
1117
+
1118
+ foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
1119
+ if ( isset( $wp_meta_boxes[$page][$context][$priority] ) ) {
1120
+ foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) {
1121
+ if ( false == $box || ! $box['title'] )
1122
+ continue;
1123
+ $i++;
1124
+ $hidden_class = in_array( $box['id'], $hidden ) ? 'hide-if-js' : '';
1125
+
1126
+ $open_class = '';
1127
+ if ( ! $first_open && empty( $hidden_class ) ) {
1128
+ $first_open = true;
1129
+ $open_class = 'open';
1130
+ }
1131
+ ?>
1132
+ <li class="control-section accordion-section <?php echo $hidden_class; ?> <?php echo $open_class; ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>">
1133
+ <h3 class="accordion-section-title hndle" tabindex="0">
1134
+ <?php echo esc_html( $box['title'] ); ?>
1135
+ <span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span>
1136
+ </h3>
1137
+ <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>">
1138
+ <div class="inside">
1139
+ <?php call_user_func( $box['callback'], $object, $box ); ?>
1140
+ </div><!-- .inside -->
1141
+ </div><!-- .accordion-section-content -->
1142
+ </li><!-- .accordion-section -->
1143
+ <?php
1144
+ }
1145
+ }
1146
+ }
1147
+ } while(0);
1148
+ ?>
1149
+ </ul><!-- .outer-border -->
1150
+ </div><!-- .accordion-container -->
1151
+ <?php
1152
+ return $i;
1153
+ }
1154
+
1155
+ /**
1156
+ * Add a new section to a settings page.
1157
+ *
1158
+ * Part of the Settings API. Use this to define new settings sections for an admin page.
1159
+ * Show settings sections in your admin page callback function with do_settings_sections().
1160
+ * Add settings fields to your section with add_settings_field()
1161
+ *
1162
+ * The $callback argument should be the name of a function that echoes out any
1163
+ * content you want to show at the top of the settings section before the actual
1164
+ * fields. It can output nothing if you want.
1165
+ *
1166
+ * @since 2.7.0
1167
+ *
1168
+ * @global $wp_settings_sections Storage array of all settings sections added to admin pages
1169
+ *
1170
+ * @param string $id Slug-name to identify the section. Used in the 'id' attribute of tags.
1171
+ * @param string $title Formatted title of the section. Shown as the heading for the section.
1172
+ * @param string $callback Function that echos out any content at the top of the section (between heading and fields).
1173
+ * @param string $page The slug-name of the settings page on which to show the section. Built-in pages include 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using add_options_page();
1174
+ */
1175
+ function add_settings_section($id, $title, $callback, $page) {
1176
+ global $wp_settings_sections;
1177
+
1178
+ if ( 'misc' == $page ) {
1179
+ _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
1180
+ $page = 'general';
1181
+ }
1182
+
1183
+ if ( 'privacy' == $page ) {
1184
+ _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
1185
+ $page = 'reading';
1186
+ }
1187
+
1188
+ $wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback);
1189
+ }
1190
+
1191
+ /**
1192
+ * Add a new field to a section of a settings page
1193
+ *
1194
+ * Part of the Settings API. Use this to define a settings field that will show
1195
+ * as part of a settings section inside a settings page. The fields are shown using
1196
+ * do_settings_fields() in do_settings-sections()
1197
+ *
1198
+ * The $callback argument should be the name of a function that echoes out the
1199
+ * html input tags for this setting field. Use get_option() to retrieve existing
1200
+ * values to show.
1201
+ *
1202
+ * @since 2.7.0
1203
+ *
1204
+ * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
1205
+ *
1206
+ * @param string $id Slug-name to identify the field. Used in the 'id' attribute of tags.
1207
+ * @param string $title Formatted title of the field. Shown as the label for the field during output.
1208
+ * @param string $callback Function that fills the field with the desired form inputs. The function should echo its output.
1209
+ * @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...).
1210
+ * @param string $section The slug-name of the section of the settings page in which to show the box (default, ...).
1211
+ * @param array $args Additional arguments
1212
+ */
1213
+ function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) {
1214
+ global $wp_settings_fields;
1215
+
1216
+ if ( 'misc' == $page ) {
1217
+ _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
1218
+ $page = 'general';
1219
+ }
1220
+
1221
+ if ( 'privacy' == $page ) {
1222
+ _deprecated_argument( __FUNCTION__, '3.5', __( 'The privacy options group has been removed. Use another settings group.' ) );
1223
+ $page = 'reading';
1224
+ }
1225
+
1226
+ $wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args);
1227
+ }
1228
+
1229
+ /**
1230
+ * Prints out all settings sections added to a particular settings page
1231
+ *
1232
+ * Part of the Settings API. Use this in a settings page callback function
1233
+ * to output all the sections and fields that were added to that $page with
1234
+ * add_settings_section() and add_settings_field()
1235
+ *
1236
+ * @global $wp_settings_sections Storage array of all settings sections added to admin pages
1237
+ * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
1238
+ * @since 2.7.0
1239
+ *
1240
+ * @param string $page The slug name of the page whos settings sections you want to output
1241
+ */
1242
+ function do_settings_sections( $page ) {
1243
+ global $wp_settings_sections, $wp_settings_fields;
1244
+
1245
+ if ( ! isset( $wp_settings_sections[$page] ) )
1246
+ return;
1247
+
1248
+ foreach ( (array) $wp_settings_sections[$page] as $section ) {
1249
+ if ( $section['title'] )
1250
+ echo "<h3>{$section['title']}</h3>\n";
1251
+
1252
+ if ( $section['callback'] )
1253
+ call_user_func( $section['callback'], $section );
1254
+
1255
+ if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) )
1256
+ continue;
1257
+ echo '<table class="form-table">';
1258
+ do_settings_fields( $page, $section['id'] );
1259
+ echo '</table>';
1260
+ }
1261
+ }
1262
+
1263
+ /**
1264
+ * Print out the settings fields for a particular settings section
1265
+ *
1266
+ * Part of the Settings API. Use this in a settings page to output
1267
+ * a specific section. Should normally be called by do_settings_sections()
1268
+ * rather than directly.
1269
+ *
1270
+ * @global $wp_settings_fields Storage array of settings fields and their pages/sections
1271
+ *
1272
+ * @since 2.7.0
1273
+ *
1274
+ * @param string $page Slug title of the admin page who's settings fields you want to show.
1275
+ * @param section $section Slug title of the settings section who's fields you want to show.
1276
+ */
1277
+ function do_settings_fields($page, $section) {
1278
+ global $wp_settings_fields;
1279
+
1280
+ if ( ! isset( $wp_settings_fields[$page][$section] ) )
1281
+ return;
1282
+
1283
+ foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
1284
+ echo '<tr>';
1285
+ if ( !empty($field['args']['label_for']) )
1286
+ echo '<th scope="row"><label for="' . esc_attr( $field['args']['label_for'] ) . '">' . $field['title'] . '</label></th>';
1287
+ else
1288
+ echo '<th scope="row">' . $field['title'] . '</th>';
1289
+ echo '<td>';
1290
+ call_user_func($field['callback'], $field['args']);
1291
+ echo '</td>';
1292
+ echo '</tr>';
1293
+ }
1294
+ }
1295
+
1296
+ /**
1297
+ * Register a settings error to be displayed to the user
1298
+ *
1299
+ * Part of the Settings API. Use this to show messages to users about settings validation
1300
+ * problems, missing settings or anything else.
1301
+ *
1302
+ * Settings errors should be added inside the $sanitize_callback function defined in
1303
+ * register_setting() for a given setting to give feedback about the submission.
1304
+ *
1305
+ * By default messages will show immediately after the submission that generated the error.
1306
+ * Additional calls to settings_errors() can be used to show errors even when the settings
1307
+ * page is first accessed.
1308
+ *
1309
+ * @since 3.0.0
1310
+ *
1311
+ * @global array $wp_settings_errors Storage array of errors registered during this pageload
1312
+ *
1313
+ * @param string $setting Slug title of the setting to which this error applies
1314
+ * @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
1315
+ * @param string $message The formatted message text to display to the user (will be shown inside styled <div> and <p>)
1316
+ * @param string $type The type of message it is, controls HTML class. Use 'error' or 'updated'.
1317
+ */
1318
+ function add_settings_error( $setting, $code, $message, $type = 'error' ) {
1319
+ global $wp_settings_errors;
1320
+
1321
+ $wp_settings_errors[] = array(
1322
+ 'setting' => $setting,
1323
+ 'code' => $code,
1324
+ 'message' => $message,
1325
+ 'type' => $type
1326
+ );
1327
+ }
1328
+
1329
+ /**
1330
+ * Fetch settings errors registered by add_settings_error()
1331
+ *
1332
+ * Checks the $wp_settings_errors array for any errors declared during the current
1333
+ * pageload and returns them.
1334
+ *
1335
+ * If changes were just submitted ($_GET['settings-updated']) and settings errors were saved
1336
+ * to the 'settings_errors' transient then those errors will be returned instead. This
1337
+ * is used to pass errors back across pageloads.
1338
+ *
1339
+ * Use the $sanitize argument to manually re-sanitize the option before returning errors.
1340
+ * This is useful if you have errors or notices you want to show even when the user
1341
+ * hasn't submitted data (i.e. when they first load an options page, or in admin_notices action hook)
1342
+ *
1343
+ * @since 3.0.0
1344
+ *
1345
+ * @global array $wp_settings_errors Storage array of errors registered during this pageload
1346
+ *
1347
+ * @param string $setting Optional slug title of a specific setting who's errors you want.
1348
+ * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
1349
+ * @return array Array of settings errors
1350
+ */
1351
+ function get_settings_errors( $setting = '', $sanitize = false ) {
1352
+ global $wp_settings_errors;
1353
+
1354
+ /*
1355
+ * If $sanitize is true, manually re-run the sanitization for this option
1356
+ * This allows the $sanitize_callback from register_setting() to run, adding
1357
+ * any settings errors you want to show by default.
1358
+ */
1359
+ if ( $sanitize )
1360
+ sanitize_option( $setting, get_option( $setting ) );
1361
+
1362
+ // If settings were passed back from options.php then use them.
1363
+ if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && get_transient( 'settings_errors' ) ) {
1364
+ $wp_settings_errors = array_merge( (array) $wp_settings_errors, get_transient( 'settings_errors' ) );
1365
+ delete_transient( 'settings_errors' );
1366
+ }
1367
+
1368
+ // Check global in case errors have been added on this pageload.
1369
+ if ( ! count( $wp_settings_errors ) )
1370
+ return array();
1371
+
1372
+ // Filter the results to those of a specific setting if one was set.
1373
+ if ( $setting ) {
1374
+ $setting_errors = array();
1375
+ foreach ( (array) $wp_settings_errors as $key => $details ) {
1376
+ if ( $setting == $details['setting'] )
1377
+ $setting_errors[] = $wp_settings_errors[$key];
1378
+ }
1379
+ return $setting_errors;
1380
+ }
1381
+
1382
+ return $wp_settings_errors;
1383
+ }
1384
+
1385
+ /**
1386
+ * Display settings errors registered by add_settings_error()
1387
+ *
1388
+ * Part of the Settings API. Outputs a <div> for each error retrieved by get_settings_errors().
1389
+ *
1390
+ * This is called automatically after a settings page based on the Settings API is submitted.
1391
+ * Errors should be added during the validation callback function for a setting defined in register_setting()
1392
+ *
1393
+ * The $sanitize option is passed into get_settings_errors() and will re-run the setting sanitization
1394
+ * on its current value.
1395
+ *
1396
+ * The $hide_on_update option will cause errors to only show when the settings page is first loaded.
1397
+ * if the user has already saved new values it will be hidden to avoid repeating messages already
1398
+ * shown in the default error reporting after submission. This is useful to show general errors like missing
1399
+ * settings when the user arrives at the settings page.
1400
+ *
1401
+ * @since 3.0.0
1402
+ *
1403
+ * @param string $setting Optional slug title of a specific setting who's errors you want.
1404
+ * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
1405
+ * @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
1406
+ */
1407
+ function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
1408
+
1409
+ if ( $hide_on_update && ! empty( $_GET['settings-updated'] ) )
1410
+ return;
1411
+
1412
+ $settings_errors = get_settings_errors( $setting, $sanitize );
1413
+
1414
+ if ( empty( $settings_errors ) )
1415
+ return;
1416
+
1417
+ $output = '';
1418
+ foreach ( $settings_errors as $key => $details ) {
1419
+ $css_id = 'setting-error-' . $details['code'];
1420
+ $css_class = $details['type'] . ' settings-error';
1421
+ $output .= "<div id='$css_id' class='$css_class'> \n";
1422
+ $output .= "<p><strong>{$details['message']}</strong></p>";
1423
+ $output .= "</div> \n";
1424
+ }
1425
+ echo $output;
1426
+ }
1427
+
1428
+ /**
1429
+ * {@internal Missing Short Description}}
1430
+ *
1431
+ * @since 2.7.0
1432
+ *
1433
+ * @param unknown_type $found_action
1434
+ */
1435
+ function find_posts_div($found_action = '') {
1436
+ ?>
1437
+ <div id="find-posts" class="find-box" style="display: none;">
1438
+ <div id="find-posts-head" class="find-box-head">
1439
+ <?php _e( 'Find Posts or Pages' ); ?>
1440
+ <div id="find-posts-close"></div>
1441
+ </div>
1442
+ <div class="find-box-inside">
1443
+ <div class="find-box-search">
1444
+ <?php if ( $found_action ) { ?>
1445
+ <input type="hidden" name="found_action" value="<?php echo esc_attr($found_action); ?>" />
1446
+ <?php } ?>
1447
+ <input type="hidden" name="affected" id="affected" value="" />
1448
+ <?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>
1449
+ <label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label>
1450
+ <input type="text" id="find-posts-input" name="ps" value="" />
1451
+ <span class="spinner"></span>
1452
+ <input type="button" id="find-posts-search" value="<?php esc_attr_e( 'Search' ); ?>" class="button" />
1453
+ <div class="clear"></div>
1454
+ </div>
1455
+ <div id="find-posts-response"></div>
1456
+ </div>
1457
+ <div class="find-box-buttons">
1458
+ <?php submit_button( __( 'Select' ), 'button-primary alignright', 'find-posts-submit', false ); ?>
1459
+ <div class="clear"></div>
1460
+ </div>
1461
+ </div>
1462
+ <?php
1463
+ }
1464
+
1465
+ /**
1466
+ * Display the post password.
1467
+ *
1468
+ * The password is passed through {@link esc_attr()} to ensure that it
1469
+ * is safe for placing in an html attribute.
1470
+ *
1471
+ * @uses attr
1472
+ * @since 2.7.0
1473
+ */
1474
+ function the_post_password() {
1475
+ $post = get_post();
1476
+ if ( isset( $post->post_password ) )
1477
+ echo esc_attr( $post->post_password );
1478
+ }
1479
+
1480
+ /**
1481
+ * Get the post title.
1482
+ *
1483
+ * The post title is fetched and if it is blank then a default string is
1484
+ * returned.
1485
+ *
1486
+ * @since 2.7.0
1487
+ *
1488
+ * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
1489
+ * @return string The post title if set.
1490
+ */
1491
+ function _draft_or_post_title( $post = 0 ) {
1492
+ $title = get_the_title( $post );
1493
+ if ( empty( $title ) )
1494
+ $title = __( '(no title)' );
1495
+ return $title;
1496
+ }
1497
+
1498
+ /**
1499
+ * Display the search query.
1500
+ *
1501
+ * A simple wrapper to display the "s" parameter in a GET URI. This function
1502
+ * should only be used when {@link the_search_query()} cannot.
1503
+ *
1504
+ * @uses attr
1505
+ * @since 2.7.0
1506
+ *
1507
+ */
1508
+ function _admin_search_query() {
1509
+ echo isset($_REQUEST['s']) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
1510
+ }
1511
+
1512
+ /**
1513
+ * Generic Iframe header for use with Thickbox
1514
+ *
1515
+ * @since 2.7.0
1516
+ * @param string $title Title of the Iframe page.
1517
+ * @param bool $limit_styles Limit styles to colour-related styles only (unless others are enqueued).
1518
+ *
1519
+ */
1520
+ function iframe_header( $title = '', $limit_styles = false ) {
1521
+ show_admin_bar( false );
1522
+ global $hook_suffix, $current_user, $admin_body_class, $wp_locale;
1523
+ $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
1524
+
1525
+ $current_screen = get_current_screen();
1526
+
1527
+ @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
1528
+ _wp_admin_html_begin();
1529
+ ?>
1530
+ <title><?php bloginfo('name') ?> &rsaquo; <?php echo $title ?> &#8212; <?php _e('WordPress'); ?></title>
1531
+ <?php
1532
+ wp_enqueue_style( 'colors' );
1533
+ ?>
1534
+ <script type="text/javascript">
1535
+ //<![CDATA[
1536
+ addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
1537
+ function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
1538
+ var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
1539
+ pagenow = '<?php echo $current_screen->id; ?>',
1540
+ typenow = '<?php echo $current_screen->post_type; ?>',
1541
+ adminpage = '<?php echo $admin_body_class; ?>',
1542
+ thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
1543
+ decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
1544
+ isRtl = <?php echo (int) is_rtl(); ?>;
1545
+ //]]>
1546
+ </script>
1547
+ <?php
1548
+ /** This action is documented in wp-admin/admin-header.php */
1549
+ do_action( 'admin_enqueue_scripts', $hook_suffix );
1550
+
1551
+ /** This action is documented in wp-admin/admin-header.php */
1552
+ do_action( "admin_print_styles-$hook_suffix" );
1553
+
1554
+ /** This action is documented in wp-admin/admin-header.php */
1555
+ do_action( 'admin_print_styles' );
1556
+
1557
+ /** This action is documented in wp-admin/admin-header.php */
1558
+ do_action( "admin_print_scripts-$hook_suffix" );
1559
+
1560
+ /** This action is documented in wp-admin/admin-header.php */
1561
+ do_action( 'admin_print_scripts' );
1562
+
1563
+ /** This action is documented in wp-admin/admin-header.php */
1564
+ do_action( "admin_head-$hook_suffix" );
1565
+
1566
+ /** This action is documented in wp-admin/admin-header.php */
1567
+ do_action( 'admin_head' );
1568
+
1569
+ $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
1570
+
1571
+ if ( is_rtl() )
1572
+ $admin_body_class .= ' rtl';
1573
+
1574
+ ?>
1575
+ </head>
1576
+ <?php /** This filter is documented in wp-admin/admin-header.php */ ?>
1577
+ <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class; ?>">
1578
+ <script type="text/javascript">
1579
+ //<![CDATA[
1580
+ (function(){
1581
+ var c = document.body.className;
1582
+ c = c.replace(/no-js/, 'js');
1583
+ document.body.className = c;
1584
+ })();
1585
+ //]]>
1586
+ </script>
1587
+ <?php
1588
+ }
1589
+
1590
+ /**
1591
+ * Generic Iframe footer for use with Thickbox
1592
+ *
1593
+ * @since 2.7.0
1594
+ *
1595
+ */
1596
+ function iframe_footer() {
1597
+ /*
1598
+ * We're going to hide any footer output on iFrame pages,
1599
+ * but run the hooks anyway since they output Javascript
1600
+ * or other needed content.
1601
+ */
1602
+ ?>
1603
+ <div class="hidden">
1604
+ <?php
1605
+ /** This action is documented in wp-admin/admin-footer.php */
1606
+ do_action( 'admin_footer', '' );
1607
+
1608
+ /** This action is documented in wp-admin/admin-footer.php */
1609
+ do_action( 'admin_print_footer_scripts' );
1610
+ ?>
1611
+ </div>
1612
+ <script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
1613
+ </body>
1614
+ </html>
1615
+ <?php
1616
+ }
1617
+
1618
+ function _post_states($post) {
1619
+ $post_states = array();
1620
+ if ( isset( $_REQUEST['post_status'] ) )
1621
+ $post_status = $_REQUEST['post_status'];
1622
+ else
1623
+ $post_status = '';
1624
+
1625
+ if ( !empty($post->post_password) )
1626
+ $post_states['protected'] = __('Password protected');
1627
+ if ( 'private' == $post->post_status && 'private' != $post_status )
1628
+ $post_states['private'] = __('Private');
1629
+ if ( 'draft' == $post->post_status && 'draft' != $post_status )
1630
+ $post_states['draft'] = __('Draft');
1631
+ if ( 'pending' == $post->post_status && 'pending' != $post_status )
1632
+ /* translators: post state */
1633
+ $post_states['pending'] = _x('Pending', 'post state');
1634
+ if ( is_sticky($post->ID) )
1635
+ $post_states['sticky'] = __('Sticky');
1636
+
1637
+ /**
1638
+ * Filter the default post display states used in the Posts list table.
1639
+ *
1640
+ * @since 2.8.0
1641
+ *
1642
+ * @param array $post_states An array of post display states. Values include 'Password protected',
1643
+ * 'Private', 'Draft', 'Pending', and 'Sticky'.
1644
+ * @param int $post The post ID.
1645
+ */
1646
+ $post_states = apply_filters( 'display_post_states', $post_states, $post );
1647
+
1648
+ if ( ! empty($post_states) ) {
1649
+ $state_count = count($post_states);
1650
+ $i = 0;
1651
+ echo ' - ';
1652
+ foreach ( $post_states as $state ) {
1653
+ ++$i;
1654
+ ( $i == $state_count ) ? $sep = '' : $sep = ', ';
1655
+ echo "<span class='post-state'>$state$sep</span>";
1656
+ }
1657
+ }
1658
+
1659
+ }
1660
+
1661
+ function _media_states( $post ) {
1662
+ $media_states = array();
1663
+ $stylesheet = get_option('stylesheet');
1664
+
1665
+ if ( current_theme_supports( 'custom-header') ) {
1666
+ $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true );
1667
+ if ( ! empty( $meta_header ) && $meta_header == $stylesheet )
1668
+ $media_states[] = __( 'Header Image' );
1669
+ }
1670
+
1671
+ if ( current_theme_supports( 'custom-background') ) {
1672
+ $meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true );
1673
+ if ( ! empty( $meta_background ) && $meta_background == $stylesheet )
1674
+ $media_states[] = __( 'Background Image' );
1675
+ }
1676
+
1677
+ /**
1678
+ * Filter the default media display states for items in the Media list table.
1679
+ *
1680
+ * @since 3.2.0
1681
+ *
1682
+ * @param array $media_states An array of media states. Default 'Header Image',
1683
+ * 'Background Image'.
1684
+ */
1685
+ $media_states = apply_filters( 'display_media_states', $media_states );
1686
+
1687
+ if ( ! empty( $media_states ) ) {
1688
+ $state_count = count( $media_states );
1689
+ $i = 0;
1690
+ echo ' - ';
1691
+ foreach ( $media_states as $state ) {
1692
+ ++$i;
1693
+ ( $i == $state_count ) ? $sep = '' : $sep = ', ';
1694
+ echo "<span class='post-state'>$state$sep</span>";
1695
+ }
1696
+ }
1697
+ }
1698
+
1699
+ /**
1700
+ * Test support for compressing JavaScript from PHP
1701
+ *
1702
+ * Outputs JavaScript that tests if compression from PHP works as expected
1703
+ * and sets an option with the result. Has no effect when the current user
1704
+ * is not an administrator. To run the test again the option 'can_compress_scripts'
1705
+ * has to be deleted.
1706
+ *
1707
+ * @since 2.8.0
1708
+ */
1709
+ function compression_test() {
1710
+ ?>
1711
+ <script type="text/javascript">
1712
+ /* <![CDATA[ */
1713
+ var testCompression = {
1714
+ get : function(test) {
1715
+ var x;
1716
+ if ( window.XMLHttpRequest ) {
1717
+ x = new XMLHttpRequest();
1718
+ } else {
1719
+ try{x=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{x=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){};}
1720
+ }
1721
+
1722
+ if (x) {
1723
+ x.onreadystatechange = function() {
1724
+ var r, h;
1725
+ if ( x.readyState == 4 ) {
1726
+ r = x.responseText.substr(0, 18);
1727
+ h = x.getResponseHeader('Content-Encoding');
1728
+ testCompression.check(r, h, test);
1729
+ }
1730
+ }
1731
+
1732
+ x.open('GET', ajaxurl + '?action=wp-compression-test&test='+test+'&'+(new Date()).getTime(), true);
1733
+ x.send('');
1734
+ }
1735
+ },
1736
+
1737
+ check : function(r, h, test) {
1738
+ if ( ! r && ! test )
1739
+ this.get(1);
1740
+
1741
+ if ( 1 == test ) {
1742
+ if ( h && ( h.match(/deflate/i) || h.match(/gzip/i) ) )
1743
+ this.get('no');
1744
+ else
1745
+ this.get(2);
1746
+
1747
+ return;
1748
+ }
1749
+
1750
+ if ( 2 == test ) {
1751
+ if ( '"wpCompressionTest' == r )
1752
+ this.get('yes');
1753
+ else
1754
+ this.get('no');
1755
+ }
1756
+ }
1757
+ };
1758
+ testCompression.check();
1759
+ /* ]]> */
1760
+ </script>
1761
+ <?php
1762
+ }
1763
+
1764
+ /**
1765
+ * Echoes a submit button, with provided text and appropriate class(es).
1766
+ *
1767
+ * @since 3.1.0
1768
+ *
1769
+ * @see get_submit_button()
1770
+ *
1771
+ * @param string $text The text of the button (defaults to 'Save Changes')
1772
+ * @param string $type Optional. The type and CSS class(es) of the button. Core values
1773
+ * include 'primary', 'secondary', 'delete'. Default 'primary'
1774
+ * @param string $name The HTML name of the submit button. Defaults to "submit". If no
1775
+ * id attribute is given in $other_attributes below, $name will be
1776
+ * used as the button's id.
1777
+ * @param bool $wrap True if the output button should be wrapped in a paragraph tag,
1778
+ * false otherwise. Defaults to true
1779
+ * @param array|string $other_attributes Other attributes that should be output with the button, mapping
1780
+ * attributes to their values, such as setting tabindex to 1, etc.
1781
+ * These key/value attribute pairs will be output as attribute="value",
1782
+ * where attribute is the key. Other attributes can also be provided
1783
+ * as a string such as 'tabindex="1"', though the array format is
1784
+ * preferred. Default null.
1785
+ */
1786
+ function submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) {
1787
+ echo get_submit_button( $text, $type, $name, $wrap, $other_attributes );
1788
+ }
1789
+
1790
+ /**
1791
+ * Returns a submit button, with provided text and appropriate class
1792
+ *
1793
+ * @since 3.1.0
1794
+ *
1795
+ * @param string $text The text of the button (defaults to 'Save Changes')
1796
+ * @param string $type The type of button. One of: primary, secondary, delete
1797
+ * @param string $name The HTML name of the submit button. Defaults to "submit". If no id attribute
1798
+ * is given in $other_attributes below, $name will be used as the button's id.
1799
+ * @param bool $wrap True if the output button should be wrapped in a paragraph tag,
1800
+ * false otherwise. Defaults to true
1801
+ * @param array|string $other_attributes Other attributes that should be output with the button,
1802
+ * mapping attributes to their values, such as array( 'tabindex' => '1' ).
1803
+ * These attributes will be output as attribute="value", such as tabindex="1".
1804
+ * Defaults to no other attributes. Other attributes can also be provided as a
1805
+ * string such as 'tabindex="1"', though the array format is typically cleaner.
1806
+ */
1807
+ function get_submit_button( $text = null, $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = null ) {
1808
+ if ( ! is_array( $type ) )
1809
+ $type = explode( ' ', $type );
1810
+
1811
+ $button_shorthand = array( 'primary', 'small', 'large' );
1812
+ $classes = array( 'button' );
1813
+ foreach ( $type as $t ) {
1814
+ if ( 'secondary' === $t || 'button-secondary' === $t )
1815
+ continue;
1816
+ $classes[] = in_array( $t, $button_shorthand ) ? 'button-' . $t : $t;
1817
+ }
1818
+ $class = implode( ' ', array_unique( $classes ) );
1819
+
1820
+ if ( 'delete' === $type )
1821
+ $class = 'button-secondary delete';
1822
+
1823
+ $text = $text ? $text : __( 'Save Changes' );
1824
+
1825
+ // Default the id attribute to $name unless an id was specifically provided in $other_attributes
1826
+ $id = $name;
1827
+ if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) {
1828
+ $id = $other_attributes['id'];
1829
+ unset( $other_attributes['id'] );
1830
+ }
1831
+
1832
+ $attributes = '';
1833
+ if ( is_array( $other_attributes ) ) {
1834
+ foreach ( $other_attributes as $attribute => $value ) {
1835
+ $attributes .= $attribute . '="' . esc_attr( $value ) . '" '; // Trailing space is important
1836
+ }
1837
+ } else if ( !empty( $other_attributes ) ) { // Attributes provided as a string
1838
+ $attributes = $other_attributes;
1839
+ }
1840
+
1841
+ $button = '<input type="submit" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" class="' . esc_attr( $class );
1842
+ $button .= '" value="' . esc_attr( $text ) . '" ' . $attributes . ' />';
1843
+
1844
+ if ( $wrap ) {
1845
+ $button = '<p class="submit">' . $button . '</p>';
1846
+ }
1847
+
1848
+ return $button;
1849
+ }
1850
+
1851
+ function _wp_admin_html_begin() {
1852
+ global $is_IE;
1853
+
1854
+ $admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
1855
+
1856
+ if ( $is_IE )
1857
+ @header('X-UA-Compatible: IE=edge');
1858
+
1859
+ /**
1860
+ * Fires inside the HTML tag in the admin header.
1861
+ *
1862
+ * @since 2.2.0
1863
+ */
1864
+ ?>
1865
+ <!DOCTYPE html>
1866
+ <!--[if IE 8]>
1867
+ <html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>>
1868
+ <![endif]-->
1869
+ <!--[if !(IE 8) ]><!-->
1870
+ <?php /** This action is documented in wp-admin/includes/template.php */ ?>
1871
+ <html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>>
1872
+ <!--<![endif]-->
1873
+ <head>
1874
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
1875
+ <?php
1876
+ }
1877
+
1878
+ final class WP_Internal_Pointers {
1879
+ /**
1880
+ * Initializes the new feature pointers.
1881
+ *
1882
+ * @since 3.3.0
1883
+ *
1884
+ * All pointers can be disabled using the following:
1885
+ * remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
1886
+ *
1887
+ * Individual pointers (e.g. wp390_widgets) can be disabled using the following:
1888
+ * remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' ) );
1889
+ */
1890
+ public static function enqueue_scripts( $hook_suffix ) {
1891
+ /*
1892
+ * Register feature pointers
1893
+ * Format: array( hook_suffix => pointer_id )
1894
+ */
1895
+
1896
+ $registered_pointers = array(
1897
+ 'post-new.php' => 'wp350_media',
1898
+ 'post.php' => array( 'wp350_media', 'wp360_revisions' ),
1899
+ 'edit.php' => 'wp360_locks',
1900
+ 'widgets.php' => 'wp390_widgets',
1901
+ 'themes.php' => 'wp390_widgets',
1902
+ );
1903
+
1904
+ // Check if screen related pointer is registered
1905
+ if ( empty( $registered_pointers[ $hook_suffix ] ) )
1906
+ return;
1907
+
1908
+ $pointers = (array) $registered_pointers[ $hook_suffix ];
1909
+
1910
+ $caps_required = array(
1911
+ 'wp350_media' => array( 'upload_files' ),
1912
+ 'wp390_widgets' => array( 'edit_theme_options' ),
1913
+ );
1914
+
1915
+ // Get dismissed pointers
1916
+ $dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
1917
+
1918
+ $got_pointers = false;
1919
+ foreach ( array_diff( $pointers, $dismissed ) as $pointer ) {
1920
+ if ( isset( $caps_required[ $pointer ] ) ) {
1921
+ foreach ( $caps_required[ $pointer ] as $cap ) {
1922
+ if ( ! current_user_can( $cap ) )
1923
+ continue 2;
1924
+ }
1925
+ }
1926
+
1927
+ // Bind pointer print function
1928
+ add_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_' . $pointer ) );
1929
+ $got_pointers = true;
1930
+ }
1931
+
1932
+ if ( ! $got_pointers )
1933
+ return;
1934
+
1935
+ // Add pointers script and style to queue
1936
+ wp_enqueue_style( 'wp-pointer' );
1937
+ wp_enqueue_script( 'wp-pointer' );
1938
+ }
1939
+
1940
+ /**
1941
+ * Print the pointer javascript data.
1942
+ *
1943
+ * @since 3.3.0
1944
+ *
1945
+ * @param string $pointer_id The pointer ID.
1946
+ * @param string $selector The HTML elements, on which the pointer should be attached.
1947
+ * @param array $args Arguments to be passed to the pointer JS (see wp-pointer.js).
1948
+ */
1949
+ private static function print_js( $pointer_id, $selector, $args ) {
1950
+ if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) )
1951
+ return;
1952
+
1953
+ ?>
1954
+ <script type="text/javascript">
1955
+ //<![CDATA[
1956
+ (function($){
1957
+ var options = <?php echo json_encode( $args ); ?>, setup;
1958
+
1959
+ if ( ! options )
1960
+ return;
1961
+
1962
+ options = $.extend( options, {
1963
+ close: function() {
1964
+ $.post( ajaxurl, {
1965
+ pointer: '<?php echo $pointer_id; ?>',
1966
+ action: 'dismiss-wp-pointer'
1967
+ });
1968
+ }
1969
+ });
1970
+
1971
+ setup = function() {
1972
+ $('<?php echo $selector; ?>').first().pointer( options ).pointer('open');
1973
+ };
1974
+
1975
+ if ( options.position && options.position.defer_loading )
1976
+ $(window).bind( 'load.wp-pointers', setup );
1977
+ else
1978
+ $(document).ready( setup );
1979
+
1980
+ })( jQuery );
1981
+ //]]>
1982
+ </script>
1983
+ <?php
1984
+ }
1985
+
1986
+ public static function pointer_wp330_toolbar() {}
1987
+ public static function pointer_wp330_media_uploader() {}
1988
+ public static function pointer_wp330_saving_widgets() {}
1989
+ public static function pointer_wp340_customize_current_theme_link() {}
1990
+ public static function pointer_wp340_choose_image_from_library() {}
1991
+
1992
+ public static function pointer_wp350_media() {
1993
+ $content = '<h3>' . __( 'New Media Manager' ) . '</h3>';
1994
+ $content .= '<p>' . __( 'Uploading files and creating image galleries has a whole new look. Check it out!' ) . '</p>';
1995
+
1996
+ self::print_js( 'wp350_media', '.insert-media', array(
1997
+ 'content' => $content,
1998
+ 'position' => array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center' ),
1999
+ ) );
2000
+ }
2001
+
2002
+ public static function pointer_wp360_revisions() {
2003
+ $content = '<h3>' . __( 'Compare Revisions' ) . '</h3>';
2004
+ $content .= '<p>' . __( 'View, compare, and restore other versions of this content on the improved revisions screen.' ) . '</p>';
2005
+
2006
+ self::print_js( 'wp360_revisions', '.misc-pub-section.misc-pub-revisions', array(
2007
+ 'content' => $content,
2008
+ 'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => 'center' ),
2009
+ ) );
2010
+ }
2011
+
2012
+ public static function pointer_wp360_locks() {
2013
+ if ( ! is_multi_author() ) {
2014
+ return;
2015
+ }
2016
+
2017
+ $content = '<h3>' . __( 'Edit Lock' ) . '</h3>';
2018
+ $content .= '<p>' . __( 'Someone else is editing this. No need to refresh; the lock will disappear when they&#8217;re done.' ) . '</p>';
2019
+
2020
+ self::print_js( 'wp360_locks', 'tr.wp-locked .locked-indicator', array(
2021
+ 'content' => $content,
2022
+ 'position' => array( 'edge' => 'left', 'align' => 'left' ),
2023
+ ) );
2024
+ }
2025
+
2026
+ public static function pointer_wp390_widgets() {
2027
+ if ( ! current_theme_supports( 'widgets' ) ) {
2028
+ return;
2029
+ }
2030
+
2031
+ $content = '<h3>' . __( 'New Feature: Live Widget Previews' ) . '</h3>';
2032
+ $content .= '<p>' . __( 'Add, edit, and play around with your widgets from the theme customizer.' ) . ' ' . __( 'Preview your changes in real-time and only save them when you&#8217;re ready.' ) . '</p>';
2033
+
2034
+ if ( 'themes' === get_current_screen()->id ) {
2035
+ $selector = '.theme.active .customize';
2036
+ $position = array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center' );
2037
+ } else {
2038
+ $selector = 'a[href="customize.php"]';
2039
+ if ( is_rtl() ) {
2040
+ $position = array( 'edge' => 'right', 'align' => 'center', 'my' => 'right-5px' );
2041
+ } else {
2042
+ $position = array( 'edge' => 'left', 'align' => 'center', 'my' => 'left-5px' );
2043
+ }
2044
+ }
2045
+
2046
+ self::print_js( 'wp390_widgets', $selector, array(
2047
+ 'content' => $content,
2048
+ 'position' => $position,
2049
+ ) );
2050
+ }
2051
+
2052
+ /**
2053
+ * Prevents new users from seeing existing 'new feature' pointers.
2054
+ *
2055
+ * @since 3.3.0
2056
+ */
2057
+ public static function dismiss_pointers_for_new_users( $user_id ) {
2058
+ add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp350_media,wp360_revisions,wp360_locks,wp390_widgets' );
2059
+ }
2060
+ }
2061
+
2062
+ add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
2063
+ add_action( 'user_register', array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
2064
+
2065
+ /**
2066
+ * Convert a screen string to a screen object
2067
+ *
2068
+ * @since 3.0.0
2069
+ *
2070
+ * @param string $hook_name The hook name (also known as the hook suffix) used to determine the screen.
2071
+ * @return WP_Screen Screen object.
2072
+ */
2073
+ function convert_to_screen( $hook_name ) {
2074
+ if ( ! class_exists( 'WP_Screen' ) ) {
2075
+ _doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3' );
2076
+ return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' );
2077
+ }
2078
+
2079
+ return WP_Screen::get( $hook_name );
2080
+ }
2081
+
2082
+ /**
2083
+ * Output the HTML for restoring the post data from DOM storage
2084
+ *
2085
+ * @since 3.6.0
2086
+ * @access private
2087
+ */
2088
+ function _local_storage_notice() {
2089
+ ?>
2090
+ <div id="local-storage-notice" class="hidden">
2091
+ <p class="local-restore">
2092
+ <?php _e('The backup of this post in your browser is different from the version below.'); ?>
2093
+ <a class="restore-backup" href="#"><?php _e('Restore the backup.'); ?></a>
2094
+ </p>
2095
+ <p class="undo-restore hidden">
2096
+ <?php _e('Post restored successfully.'); ?>
2097
+ <a class="undo-restore-backup" href="#"><?php _e('Undo.'); ?></a>
2098
+ </p>
2099
+ </div>
2100
+ <?php
2101
+ }
2102
+
2103
+ /**
2104
+ * Output a HTML element with a star rating for a given rating.
2105
+ *
2106
+ * Outputs a HTML element with the star rating exposed on a 0..5 scale in
2107
+ * half star increments (ie. 1, 1.5, 2 stars). Optionally, if specified, the
2108
+ * number of ratings may also be displayed by passing the $number parameter.
2109
+ *
2110
+ * @since 3.8.0
2111
+ * @param array $args {
2112
+ * Optional. Array of star ratings arguments.
2113
+ *
2114
+ * @type int $rating The rating to display, expressed in either a 0.5 rating increment,
2115
+ * or percentage. Default 0.
2116
+ * @type string $type Format that the $rating is in. Valid values are 'rating' (default),
2117
+ * or, 'percent'. Default 'rating'.
2118
+ * @type int $number The number of ratings that makes up this rating. Default 0.
2119
+ * }
2120
+ */
2121
+ function wp_star_rating( $args = array() ) {
2122
+ $defaults = array(
2123
+ 'rating' => 0,
2124
+ 'type' => 'rating',
2125
+ 'number' => 0,
2126
+ );
2127
+ $r = wp_parse_args( $args, $defaults );
2128
+
2129
+ // Non-english decimal places when the $rating is coming from a string
2130
+ $rating = str_replace( ',', '.', $r['rating'] );
2131
+
2132
+ // Convert Percentage to star rating, 0..5 in .5 increments
2133
+ if ( 'percent' == $r['type'] ) {
2134
+ $rating = round( $rating / 10, 0 ) / 2;
2135
+ }
2136
+
2137
+ // Calculate the number of each type of star needed
2138
+ $full_stars = floor( $rating );
2139
+ $half_stars = ceil( $rating - $full_stars );
2140
+ $empty_stars = 5 - $full_stars - $half_stars;
2141
+
2142
+ if ( $r['number'] ) {
2143
+ /* translators: 1: The rating, 2: The number of ratings */
2144
+ $format = _n( '%1$s rating based on %2$s rating', '%1$s rating based on %2$s ratings', $r['number'] );
2145
+ $title = sprintf( $format, number_format_i18n( $rating, 1 ), number_format_i18n( $r['number'] ) );
2146
+ } else {
2147
+ /* translators: 1: The rating */
2148
+ $title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) );
2149
+ }
2150
+
2151
+ echo '<div class="star-rating" title="' . esc_attr( $title ) . '">';
2152
+ echo '<span class="screen-reader-text">' . $title . '</span>';
2153
+ echo str_repeat( '<div class="star star-full"></div>', $full_stars );
2154
+ echo str_repeat( '<div class="star star-half"></div>', $half_stars );
2155
+ echo str_repeat( '<div class="star star-empty"></div>', $empty_stars);
2156
+ echo '</div>';
2157
+ }