stump-cli 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1310) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +3 -16
  6. data/Rakefile +2 -0
  7. data/bin/stump-cli +58 -0
  8. data/lib/stump-cli/version.rb +3 -0
  9. data/lib/stump.rb +5 -0
  10. data/lib/wp/Movefile-example +62 -0
  11. data/lib/wp/README.md +25 -0
  12. data/lib/wp/index.php +17 -0
  13. data/lib/wp/license.txt +385 -0
  14. data/lib/wp/readme.html +96 -0
  15. data/lib/wp/wp-activate.php +131 -0
  16. data/lib/wp/wp-admin/about.php +193 -0
  17. data/lib/wp/wp-admin/admin-ajax.php +98 -0
  18. data/lib/wp/wp-admin/admin-footer.php +99 -0
  19. data/lib/wp/wp-admin/admin-functions.php +15 -0
  20. data/lib/wp/wp-admin/admin-header.php +243 -0
  21. data/lib/wp/wp-admin/admin-post.php +71 -0
  22. data/lib/wp/wp-admin/admin.php +347 -0
  23. data/lib/wp/wp-admin/async-upload.php +114 -0
  24. data/lib/wp/wp-admin/comment.php +299 -0
  25. data/lib/wp/wp-admin/credits.php +192 -0
  26. data/lib/wp/wp-admin/css/about-rtl.css +446 -0
  27. data/lib/wp/wp-admin/css/about.css +446 -0
  28. data/lib/wp/wp-admin/css/admin-menu-rtl.css +917 -0
  29. data/lib/wp/wp-admin/css/admin-menu.css +917 -0
  30. data/lib/wp/wp-admin/css/color-picker-rtl.css +127 -0
  31. data/lib/wp/wp-admin/css/color-picker-rtl.min.css +1 -0
  32. data/lib/wp/wp-admin/css/color-picker.css +127 -0
  33. data/lib/wp/wp-admin/css/color-picker.min.css +1 -0
  34. data/lib/wp/wp-admin/css/colors/_admin.scss +525 -0
  35. data/lib/wp/wp-admin/css/colors/_mixins.scss +43 -0
  36. data/lib/wp/wp-admin/css/colors/_variables.scss +58 -0
  37. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.css +341 -0
  38. data/lib/wp/wp-admin/css/colors/blue/colors-rtl.min.css +1 -0
  39. data/lib/wp/wp-admin/css/colors/blue/colors.css +341 -0
  40. data/lib/wp/wp-admin/css/colors/blue/colors.min.css +1 -0
  41. data/lib/wp/wp-admin/css/colors/blue/colors.scss +11 -0
  42. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.css +341 -0
  43. data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.min.css +1 -0
  44. data/lib/wp/wp-admin/css/colors/coffee/colors.css +341 -0
  45. data/lib/wp/wp-admin/css/colors/coffee/colors.min.css +1 -0
  46. data/lib/wp/wp-admin/css/colors/coffee/colors.scss +7 -0
  47. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.css +341 -0
  48. data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.min.css +1 -0
  49. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.css +341 -0
  50. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.min.css +1 -0
  51. data/lib/wp/wp-admin/css/colors/ectoplasm/colors.scss +8 -0
  52. data/lib/wp/wp-admin/css/colors/light/colors-rtl.css +349 -0
  53. data/lib/wp/wp-admin/css/colors/light/colors-rtl.min.css +1 -0
  54. data/lib/wp/wp-admin/css/colors/light/colors.css +349 -0
  55. data/lib/wp/wp-admin/css/colors/light/colors.min.css +1 -0
  56. data/lib/wp/wp-admin/css/colors/light/colors.scss +38 -0
  57. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.css +341 -0
  58. data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.min.css +1 -0
  59. data/lib/wp/wp-admin/css/colors/midnight/colors.css +341 -0
  60. data/lib/wp/wp-admin/css/colors/midnight/colors.min.css +1 -0
  61. data/lib/wp/wp-admin/css/colors/midnight/colors.scss +5 -0
  62. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.css +341 -0
  63. data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.min.css +1 -0
  64. data/lib/wp/wp-admin/css/colors/ocean/colors.css +341 -0
  65. data/lib/wp/wp-admin/css/colors/ocean/colors.min.css +1 -0
  66. data/lib/wp/wp-admin/css/colors/ocean/colors.scss +8 -0
  67. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.css +341 -0
  68. data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.min.css +1 -0
  69. data/lib/wp/wp-admin/css/colors/sunrise/colors.css +341 -0
  70. data/lib/wp/wp-admin/css/colors/sunrise/colors.min.css +1 -0
  71. data/lib/wp/wp-admin/css/colors/sunrise/colors.scss +6 -0
  72. data/lib/wp/wp-admin/css/common-rtl.css +3212 -0
  73. data/lib/wp/wp-admin/css/common.css +3212 -0
  74. data/lib/wp/wp-admin/css/customize-controls-rtl.css +889 -0
  75. data/lib/wp/wp-admin/css/customize-controls-rtl.min.css +1 -0
  76. data/lib/wp/wp-admin/css/customize-controls.css +889 -0
  77. data/lib/wp/wp-admin/css/customize-controls.min.css +1 -0
  78. data/lib/wp/wp-admin/css/customize-widgets-rtl.css +603 -0
  79. data/lib/wp/wp-admin/css/customize-widgets-rtl.min.css +1 -0
  80. data/lib/wp/wp-admin/css/customize-widgets.css +603 -0
  81. data/lib/wp/wp-admin/css/customize-widgets.min.css +1 -0
  82. data/lib/wp/wp-admin/css/dashboard-rtl.css +1116 -0
  83. data/lib/wp/wp-admin/css/dashboard.css +1116 -0
  84. data/lib/wp/wp-admin/css/deprecated-media-rtl.css +371 -0
  85. data/lib/wp/wp-admin/css/deprecated-media-rtl.min.css +1 -0
  86. data/lib/wp/wp-admin/css/deprecated-media.css +371 -0
  87. data/lib/wp/wp-admin/css/deprecated-media.min.css +1 -0
  88. data/lib/wp/wp-admin/css/edit-rtl.css +1501 -0
  89. data/lib/wp/wp-admin/css/edit.css +1501 -0
  90. data/lib/wp/wp-admin/css/farbtastic-rtl.css +41 -0
  91. data/lib/wp/wp-admin/css/farbtastic.css +41 -0
  92. data/lib/wp/wp-admin/css/forms-rtl.css +992 -0
  93. data/lib/wp/wp-admin/css/forms.css +992 -0
  94. data/lib/wp/wp-admin/css/ie-rtl.css +785 -0
  95. data/lib/wp/wp-admin/css/ie-rtl.min.css +1 -0
  96. data/lib/wp/wp-admin/css/ie.css +785 -0
  97. data/lib/wp/wp-admin/css/ie.min.css +1 -0
  98. data/lib/wp/wp-admin/css/install-rtl.css +389 -0
  99. data/lib/wp/wp-admin/css/install-rtl.min.css +1 -0
  100. data/lib/wp/wp-admin/css/install.css +389 -0
  101. data/lib/wp/wp-admin/css/install.min.css +1 -0
  102. data/lib/wp/wp-admin/css/l10n-rtl.css +101 -0
  103. data/lib/wp/wp-admin/css/l10n.css +101 -0
  104. data/lib/wp/wp-admin/css/list-tables-rtl.css +1875 -0
  105. data/lib/wp/wp-admin/css/list-tables.css +1875 -0
  106. data/lib/wp/wp-admin/css/login-rtl.css +269 -0
  107. data/lib/wp/wp-admin/css/login-rtl.min.css +1 -0
  108. data/lib/wp/wp-admin/css/login.css +269 -0
  109. data/lib/wp/wp-admin/css/login.min.css +1 -0
  110. data/lib/wp/wp-admin/css/media-rtl.css +1196 -0
  111. data/lib/wp/wp-admin/css/media.css +1196 -0
  112. data/lib/wp/wp-admin/css/nav-menus-rtl.css +857 -0
  113. data/lib/wp/wp-admin/css/nav-menus.css +857 -0
  114. data/lib/wp/wp-admin/css/press-this-rtl.css +458 -0
  115. data/lib/wp/wp-admin/css/press-this.css +458 -0
  116. data/lib/wp/wp-admin/css/revisions-rtl.css +574 -0
  117. data/lib/wp/wp-admin/css/revisions.css +574 -0
  118. data/lib/wp/wp-admin/css/themes-rtl.css +1732 -0
  119. data/lib/wp/wp-admin/css/themes.css +1732 -0
  120. data/lib/wp/wp-admin/css/widgets-rtl.css +577 -0
  121. data/lib/wp/wp-admin/css/widgets.css +577 -0
  122. data/lib/wp/wp-admin/css/wp-admin-rtl.css +14 -0
  123. data/lib/wp/wp-admin/css/wp-admin-rtl.min.css +1 -0
  124. data/lib/wp/wp-admin/css/wp-admin.css +14 -0
  125. data/lib/wp/wp-admin/css/wp-admin.min.css +1 -0
  126. data/lib/wp/wp-admin/custom-background.php +482 -0
  127. data/lib/wp/wp-admin/custom-header.php +1366 -0
  128. data/lib/wp/wp-admin/customize.php +278 -0
  129. data/lib/wp/wp-admin/edit-comments.php +254 -0
  130. data/lib/wp/wp-admin/edit-form-advanced.php +636 -0
  131. data/lib/wp/wp-admin/edit-form-comment.php +160 -0
  132. data/lib/wp/wp-admin/edit-link-form.php +150 -0
  133. data/lib/wp/wp-admin/edit-tag-form.php +204 -0
  134. data/lib/wp/wp-admin/edit-tags.php +591 -0
  135. data/lib/wp/wp-admin/edit.php +330 -0
  136. data/lib/wp/wp-admin/export.php +243 -0
  137. data/lib/wp/wp-admin/freedoms.php +57 -0
  138. data/lib/wp/wp-admin/images/align-center-2x.png +0 -0
  139. data/lib/wp/wp-admin/images/align-center.png +0 -0
  140. data/lib/wp/wp-admin/images/align-left-2x.png +0 -0
  141. data/lib/wp/wp-admin/images/align-left.png +0 -0
  142. data/lib/wp/wp-admin/images/align-none-2x.png +0 -0
  143. data/lib/wp/wp-admin/images/align-none.png +0 -0
  144. data/lib/wp/wp-admin/images/align-right-2x.png +0 -0
  145. data/lib/wp/wp-admin/images/align-right.png +0 -0
  146. data/lib/wp/wp-admin/images/arrows-2x.png +0 -0
  147. data/lib/wp/wp-admin/images/arrows.png +0 -0
  148. data/lib/wp/wp-admin/images/bubble_bg-2x.gif +0 -0
  149. data/lib/wp/wp-admin/images/bubble_bg.gif +0 -0
  150. data/lib/wp/wp-admin/images/comment-grey-bubble-2x.png +0 -0
  151. data/lib/wp/wp-admin/images/comment-grey-bubble.png +0 -0
  152. data/lib/wp/wp-admin/images/date-button-2x.gif +0 -0
  153. data/lib/wp/wp-admin/images/date-button.gif +0 -0
  154. data/lib/wp/wp-admin/images/generic.png +0 -0
  155. data/lib/wp/wp-admin/images/icons32-2x.png +0 -0
  156. data/lib/wp/wp-admin/images/icons32-vs-2x.png +0 -0
  157. data/lib/wp/wp-admin/images/icons32-vs.png +0 -0
  158. data/lib/wp/wp-admin/images/icons32.png +0 -0
  159. data/lib/wp/wp-admin/images/imgedit-icons-2x.png +0 -0
  160. data/lib/wp/wp-admin/images/imgedit-icons.png +0 -0
  161. data/lib/wp/wp-admin/images/list-2x.png +0 -0
  162. data/lib/wp/wp-admin/images/list.png +0 -0
  163. data/lib/wp/wp-admin/images/loading.gif +0 -0
  164. data/lib/wp/wp-admin/images/marker.png +0 -0
  165. data/lib/wp/wp-admin/images/mask.png +0 -0
  166. data/lib/wp/wp-admin/images/media-button-2x.png +0 -0
  167. data/lib/wp/wp-admin/images/media-button-image.gif +0 -0
  168. data/lib/wp/wp-admin/images/media-button-music.gif +0 -0
  169. data/lib/wp/wp-admin/images/media-button-other.gif +0 -0
  170. data/lib/wp/wp-admin/images/media-button-video.gif +0 -0
  171. data/lib/wp/wp-admin/images/media-button.png +0 -0
  172. data/lib/wp/wp-admin/images/menu-2x.png +0 -0
  173. data/lib/wp/wp-admin/images/menu-vs-2x.png +0 -0
  174. data/lib/wp/wp-admin/images/menu-vs.png +0 -0
  175. data/lib/wp/wp-admin/images/menu.png +0 -0
  176. data/lib/wp/wp-admin/images/no.png +0 -0
  177. data/lib/wp/wp-admin/images/post-formats-vs.png +0 -0
  178. data/lib/wp/wp-admin/images/post-formats.png +0 -0
  179. data/lib/wp/wp-admin/images/post-formats32-vs.png +0 -0
  180. data/lib/wp/wp-admin/images/post-formats32.png +0 -0
  181. data/lib/wp/wp-admin/images/resize-2x.gif +0 -0
  182. data/lib/wp/wp-admin/images/resize-rtl-2x.gif +0 -0
  183. data/lib/wp/wp-admin/images/resize-rtl.gif +0 -0
  184. data/lib/wp/wp-admin/images/resize.gif +0 -0
  185. data/lib/wp/wp-admin/images/se.png +0 -0
  186. data/lib/wp/wp-admin/images/sort-2x.gif +0 -0
  187. data/lib/wp/wp-admin/images/sort.gif +0 -0
  188. data/lib/wp/wp-admin/images/spinner-2x.gif +0 -0
  189. data/lib/wp/wp-admin/images/spinner.gif +0 -0
  190. data/lib/wp/wp-admin/images/stars-2x.png +0 -0
  191. data/lib/wp/wp-admin/images/stars.png +0 -0
  192. data/lib/wp/wp-admin/images/w-logo-blue.png +0 -0
  193. data/lib/wp/wp-admin/images/w-logo-white.png +0 -0
  194. data/lib/wp/wp-admin/images/wheel.png +0 -0
  195. data/lib/wp/wp-admin/images/wordpress-logo-white.svg +1 -0
  196. data/lib/wp/wp-admin/images/wordpress-logo.png +0 -0
  197. data/lib/wp/wp-admin/images/wordpress-logo.svg +1 -0
  198. data/lib/wp/wp-admin/images/wpspin_light-2x.gif +0 -0
  199. data/lib/wp/wp-admin/images/wpspin_light.gif +0 -0
  200. data/lib/wp/wp-admin/images/xit-2x.gif +0 -0
  201. data/lib/wp/wp-admin/images/xit.gif +0 -0
  202. data/lib/wp/wp-admin/images/yes.png +0 -0
  203. data/lib/wp/wp-admin/import.php +132 -0
  204. data/lib/wp/wp-admin/includes/admin.php +74 -0
  205. data/lib/wp/wp-admin/includes/ajax-actions.php +2762 -0
  206. data/lib/wp/wp-admin/includes/bookmark.php +305 -0
  207. data/lib/wp/wp-admin/includes/class-ftp-pure.php +190 -0
  208. data/lib/wp/wp-admin/includes/class-ftp-sockets.php +250 -0
  209. data/lib/wp/wp-admin/includes/class-ftp.php +907 -0
  210. data/lib/wp/wp-admin/includes/class-pclzip.php +5687 -0
  211. data/lib/wp/wp-admin/includes/class-wp-comments-list-table.php +637 -0
  212. data/lib/wp/wp-admin/includes/class-wp-filesystem-base.php +815 -0
  213. data/lib/wp/wp-admin/includes/class-wp-filesystem-direct.php +384 -0
  214. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpext.php +415 -0
  215. data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpsockets.php +352 -0
  216. data/lib/wp/wp-admin/includes/class-wp-filesystem-ssh2.php +392 -0
  217. data/lib/wp/wp-admin/includes/class-wp-importer.php +302 -0
  218. data/lib/wp/wp-admin/includes/class-wp-links-list-table.php +207 -0
  219. data/lib/wp/wp-admin/includes/class-wp-list-table.php +1080 -0
  220. data/lib/wp/wp-admin/includes/class-wp-media-list-table.php +574 -0
  221. data/lib/wp/wp-admin/includes/class-wp-ms-sites-list-table.php +402 -0
  222. data/lib/wp/wp-admin/includes/class-wp-ms-themes-list-table.php +459 -0
  223. data/lib/wp/wp-admin/includes/class-wp-ms-users-list-table.php +303 -0
  224. data/lib/wp/wp-admin/includes/class-wp-plugin-install-list-table.php +490 -0
  225. data/lib/wp/wp-admin/includes/class-wp-plugins-list-table.php +605 -0
  226. data/lib/wp/wp-admin/includes/class-wp-posts-list-table.php +1306 -0
  227. data/lib/wp/wp-admin/includes/class-wp-terms-list-table.php +466 -0
  228. data/lib/wp/wp-admin/includes/class-wp-theme-install-list-table.php +431 -0
  229. data/lib/wp/wp-admin/includes/class-wp-themes-list-table.php +279 -0
  230. data/lib/wp/wp-admin/includes/class-wp-upgrader-skins.php +767 -0
  231. data/lib/wp/wp-admin/includes/class-wp-upgrader.php +2676 -0
  232. data/lib/wp/wp-admin/includes/class-wp-users-list-table.php +459 -0
  233. data/lib/wp/wp-admin/includes/comment.php +171 -0
  234. data/lib/wp/wp-admin/includes/continents-cities.php +493 -0
  235. data/lib/wp/wp-admin/includes/dashboard.php +1333 -0
  236. data/lib/wp/wp-admin/includes/deprecated.php +1190 -0
  237. data/lib/wp/wp-admin/includes/export.php +508 -0
  238. data/lib/wp/wp-admin/includes/file.php +1152 -0
  239. data/lib/wp/wp-admin/includes/image-edit.php +828 -0
  240. data/lib/wp/wp-admin/includes/image.php +598 -0
  241. data/lib/wp/wp-admin/includes/import.php +206 -0
  242. data/lib/wp/wp-admin/includes/list-table.php +113 -0
  243. data/lib/wp/wp-admin/includes/media.php +3012 -0
  244. data/lib/wp/wp-admin/includes/menu.php +322 -0
  245. data/lib/wp/wp-admin/includes/meta-boxes.php +1119 -0
  246. data/lib/wp/wp-admin/includes/misc.php +845 -0
  247. data/lib/wp/wp-admin/includes/ms-deprecated.php +78 -0
  248. data/lib/wp/wp-admin/includes/ms.php +814 -0
  249. data/lib/wp/wp-admin/includes/nav-menu.php +1328 -0
  250. data/lib/wp/wp-admin/includes/plugin-install.php +550 -0
  251. data/lib/wp/wp-admin/includes/plugin.php +1899 -0
  252. data/lib/wp/wp-admin/includes/post.php +1661 -0
  253. data/lib/wp/wp-admin/includes/revision.php +228 -0
  254. data/lib/wp/wp-admin/includes/schema.php +1038 -0
  255. data/lib/wp/wp-admin/includes/screen.php +1179 -0
  256. data/lib/wp/wp-admin/includes/taxonomy.php +284 -0
  257. data/lib/wp/wp-admin/includes/template.php +2157 -0
  258. data/lib/wp/wp-admin/includes/theme-install.php +205 -0
  259. data/lib/wp/wp-admin/includes/theme.php +474 -0
  260. data/lib/wp/wp-admin/includes/translation-install.php +240 -0
  261. data/lib/wp/wp-admin/includes/update-core.php +1186 -0
  262. data/lib/wp/wp-admin/includes/update.php +432 -0
  263. data/lib/wp/wp-admin/includes/upgrade.php +2218 -0
  264. data/lib/wp/wp-admin/includes/user.php +442 -0
  265. data/lib/wp/wp-admin/includes/widgets.php +245 -0
  266. data/lib/wp/wp-admin/index.php +131 -0
  267. data/lib/wp/wp-admin/install-helper.php +199 -0
  268. data/lib/wp/wp-admin/install.php +305 -0
  269. data/lib/wp/wp-admin/js/accordion.js +143 -0
  270. data/lib/wp/wp-admin/js/accordion.min.js +1 -0
  271. data/lib/wp/wp-admin/js/color-picker.js +155 -0
  272. data/lib/wp/wp-admin/js/color-picker.min.js +1 -0
  273. data/lib/wp/wp-admin/js/comment.js +50 -0
  274. data/lib/wp/wp-admin/js/comment.min.js +1 -0
  275. data/lib/wp/wp-admin/js/common.js +804 -0
  276. data/lib/wp/wp-admin/js/common.min.js +1 -0
  277. data/lib/wp/wp-admin/js/custom-background.js +75 -0
  278. data/lib/wp/wp-admin/js/custom-background.min.js +1 -0
  279. data/lib/wp/wp-admin/js/custom-header.js +61 -0
  280. data/lib/wp/wp-admin/js/customize-controls.js +1305 -0
  281. data/lib/wp/wp-admin/js/customize-controls.min.js +1 -0
  282. data/lib/wp/wp-admin/js/customize-widgets.js +1882 -0
  283. data/lib/wp/wp-admin/js/customize-widgets.min.js +1 -0
  284. data/lib/wp/wp-admin/js/dashboard.js +190 -0
  285. data/lib/wp/wp-admin/js/dashboard.min.js +1 -0
  286. data/lib/wp/wp-admin/js/edit-comments.js +625 -0
  287. data/lib/wp/wp-admin/js/edit-comments.min.js +1 -0
  288. data/lib/wp/wp-admin/js/editor-expand.js +705 -0
  289. data/lib/wp/wp-admin/js/editor-expand.min.js +1 -0
  290. data/lib/wp/wp-admin/js/editor.js +324 -0
  291. data/lib/wp/wp-admin/js/editor.min.js +1 -0
  292. data/lib/wp/wp-admin/js/farbtastic.js +276 -0
  293. data/lib/wp/wp-admin/js/gallery.js +237 -0
  294. data/lib/wp/wp-admin/js/gallery.min.js +1 -0
  295. data/lib/wp/wp-admin/js/image-edit.js +633 -0
  296. data/lib/wp/wp-admin/js/image-edit.min.js +1 -0
  297. data/lib/wp/wp-admin/js/inline-edit-post.js +359 -0
  298. data/lib/wp/wp-admin/js/inline-edit-post.min.js +1 -0
  299. data/lib/wp/wp-admin/js/inline-edit-tax.js +142 -0
  300. data/lib/wp/wp-admin/js/inline-edit-tax.min.js +1 -0
  301. data/lib/wp/wp-admin/js/iris.min.js +4 -0
  302. data/lib/wp/wp-admin/js/language-chooser.js +26 -0
  303. data/lib/wp/wp-admin/js/language-chooser.min.js +1 -0
  304. data/lib/wp/wp-admin/js/link.js +69 -0
  305. data/lib/wp/wp-admin/js/link.min.js +1 -0
  306. data/lib/wp/wp-admin/js/media-gallery.js +26 -0
  307. data/lib/wp/wp-admin/js/media-gallery.min.js +1 -0
  308. data/lib/wp/wp-admin/js/media-upload.js +69 -0
  309. data/lib/wp/wp-admin/js/media-upload.min.js +1 -0
  310. data/lib/wp/wp-admin/js/media.js +111 -0
  311. data/lib/wp/wp-admin/js/media.min.js +1 -0
  312. data/lib/wp/wp-admin/js/nav-menu.js +1205 -0
  313. data/lib/wp/wp-admin/js/nav-menu.min.js +1 -0
  314. data/lib/wp/wp-admin/js/password-strength-meter.js +75 -0
  315. data/lib/wp/wp-admin/js/password-strength-meter.min.js +1 -0
  316. data/lib/wp/wp-admin/js/plugin-install.js +76 -0
  317. data/lib/wp/wp-admin/js/plugin-install.min.js +1 -0
  318. data/lib/wp/wp-admin/js/post.js +1094 -0
  319. data/lib/wp/wp-admin/js/post.min.js +1 -0
  320. data/lib/wp/wp-admin/js/postbox.js +199 -0
  321. data/lib/wp/wp-admin/js/postbox.min.js +1 -0
  322. data/lib/wp/wp-admin/js/revisions.js +1110 -0
  323. data/lib/wp/wp-admin/js/revisions.min.js +1 -0
  324. data/lib/wp/wp-admin/js/set-post-thumbnail.js +24 -0
  325. data/lib/wp/wp-admin/js/set-post-thumbnail.min.js +1 -0
  326. data/lib/wp/wp-admin/js/svg-painter.js +240 -0
  327. data/lib/wp/wp-admin/js/svg-painter.min.js +1 -0
  328. data/lib/wp/wp-admin/js/tags.js +72 -0
  329. data/lib/wp/wp-admin/js/tags.min.js +1 -0
  330. data/lib/wp/wp-admin/js/theme.js +1691 -0
  331. data/lib/wp/wp-admin/js/theme.min.js +1 -0
  332. data/lib/wp/wp-admin/js/updates.js +65 -0
  333. data/lib/wp/wp-admin/js/updates.min.js +1 -0
  334. data/lib/wp/wp-admin/js/user-profile.js +127 -0
  335. data/lib/wp/wp-admin/js/user-profile.min.js +1 -0
  336. data/lib/wp/wp-admin/js/user-suggest.js +30 -0
  337. data/lib/wp/wp-admin/js/user-suggest.min.js +1 -0
  338. data/lib/wp/wp-admin/js/widgets.js +494 -0
  339. data/lib/wp/wp-admin/js/widgets.min.js +1 -0
  340. data/lib/wp/wp-admin/js/word-count.js +44 -0
  341. data/lib/wp/wp-admin/js/word-count.min.js +1 -0
  342. data/lib/wp/wp-admin/js/wp-fullscreen.js +704 -0
  343. data/lib/wp/wp-admin/js/wp-fullscreen.min.js +1 -0
  344. data/lib/wp/wp-admin/js/xfn.js +17 -0
  345. data/lib/wp/wp-admin/js/xfn.min.js +1 -0
  346. data/lib/wp/wp-admin/link-add.php +29 -0
  347. data/lib/wp/wp-admin/link-manager.php +99 -0
  348. data/lib/wp/wp-admin/link-parse-opml.php +84 -0
  349. data/lib/wp/wp-admin/link.php +117 -0
  350. data/lib/wp/wp-admin/load-scripts.php +162 -0
  351. data/lib/wp/wp-admin/load-styles.php +153 -0
  352. data/lib/wp/wp-admin/maint/repair.php +124 -0
  353. data/lib/wp/wp-admin/media-new.php +84 -0
  354. data/lib/wp/wp-admin/media-upload.php +100 -0
  355. data/lib/wp/wp-admin/media.php +146 -0
  356. data/lib/wp/wp-admin/menu-header.php +227 -0
  357. data/lib/wp/wp-admin/menu.php +255 -0
  358. data/lib/wp/wp-admin/moderation.php +12 -0
  359. data/lib/wp/wp-admin/ms-admin.php +13 -0
  360. data/lib/wp/wp-admin/ms-delete-site.php +91 -0
  361. data/lib/wp/wp-admin/ms-edit.php +13 -0
  362. data/lib/wp/wp-admin/ms-options.php +12 -0
  363. data/lib/wp/wp-admin/ms-sites.php +13 -0
  364. data/lib/wp/wp-admin/ms-themes.php +13 -0
  365. data/lib/wp/wp-admin/ms-upgrade-network.php +13 -0
  366. data/lib/wp/wp-admin/ms-users.php +13 -0
  367. data/lib/wp/wp-admin/my-sites.php +145 -0
  368. data/lib/wp/wp-admin/nav-menus.php +798 -0
  369. data/lib/wp/wp-admin/network.php +561 -0
  370. data/lib/wp/wp-admin/network/about.php +16 -0
  371. data/lib/wp/wp-admin/network/admin.php +32 -0
  372. data/lib/wp/wp-admin/network/credits.php +16 -0
  373. data/lib/wp/wp-admin/network/edit.php +42 -0
  374. data/lib/wp/wp-admin/network/freedoms.php +16 -0
  375. data/lib/wp/wp-admin/network/index.php +79 -0
  376. data/lib/wp/wp-admin/network/menu.php +63 -0
  377. data/lib/wp/wp-admin/network/plugin-editor.php +16 -0
  378. data/lib/wp/wp-admin/network/plugin-install.php +19 -0
  379. data/lib/wp/wp-admin/network/plugins.php +16 -0
  380. data/lib/wp/wp-admin/network/profile.php +16 -0
  381. data/lib/wp/wp-admin/network/settings.php +347 -0
  382. data/lib/wp/wp-admin/network/setup.php +16 -0
  383. data/lib/wp/wp-admin/network/site-info.php +178 -0
  384. data/lib/wp/wp-admin/network/site-new.php +153 -0
  385. data/lib/wp/wp-admin/network/site-settings.php +173 -0
  386. data/lib/wp/wp-admin/network/site-themes.php +185 -0
  387. data/lib/wp/wp-admin/network/site-users.php +319 -0
  388. data/lib/wp/wp-admin/network/sites.php +275 -0
  389. data/lib/wp/wp-admin/network/theme-editor.php +16 -0
  390. data/lib/wp/wp-admin/network/theme-install.php +19 -0
  391. data/lib/wp/wp-admin/network/themes.php +291 -0
  392. data/lib/wp/wp-admin/network/update-core.php +16 -0
  393. data/lib/wp/wp-admin/network/update.php +19 -0
  394. data/lib/wp/wp-admin/network/upgrade.php +120 -0
  395. data/lib/wp/wp-admin/network/user-edit.php +16 -0
  396. data/lib/wp/wp-admin/network/user-new.php +106 -0
  397. data/lib/wp/wp-admin/network/users.php +296 -0
  398. data/lib/wp/wp-admin/options-discussion.php +273 -0
  399. data/lib/wp/wp-admin/options-general.php +355 -0
  400. data/lib/wp/wp-admin/options-head.php +18 -0
  401. data/lib/wp/wp-admin/options-media.php +136 -0
  402. data/lib/wp/wp-admin/options-permalink.php +289 -0
  403. data/lib/wp/wp-admin/options-reading.php +184 -0
  404. data/lib/wp/wp-admin/options-writing.php +194 -0
  405. data/lib/wp/wp-admin/options.php +265 -0
  406. data/lib/wp/wp-admin/plugin-editor.php +279 -0
  407. data/lib/wp/wp-admin/plugin-install.php +134 -0
  408. data/lib/wp/wp-admin/plugins.php +474 -0
  409. data/lib/wp/wp-admin/post-new.php +74 -0
  410. data/lib/wp/wp-admin/post.php +318 -0
  411. data/lib/wp/wp-admin/press-this.php +691 -0
  412. data/lib/wp/wp-admin/profile.php +18 -0
  413. data/lib/wp/wp-admin/revision.php +221 -0
  414. data/lib/wp/wp-admin/setup-config.php +345 -0
  415. data/lib/wp/wp-admin/theme-editor.php +243 -0
  416. data/lib/wp/wp-admin/theme-install.php +278 -0
  417. data/lib/wp/wp-admin/themes.php +374 -0
  418. data/lib/wp/wp-admin/tools.php +75 -0
  419. data/lib/wp/wp-admin/update-core.php +653 -0
  420. data/lib/wp/wp-admin/update.php +272 -0
  421. data/lib/wp/wp-admin/upgrade-functions.php +12 -0
  422. data/lib/wp/wp-admin/upgrade.php +116 -0
  423. data/lib/wp/wp-admin/upload.php +292 -0
  424. data/lib/wp/wp-admin/user-edit.php +557 -0
  425. data/lib/wp/wp-admin/user-new.php +439 -0
  426. data/lib/wp/wp-admin/user/about.php +13 -0
  427. data/lib/wp/wp-admin/user/admin.php +32 -0
  428. data/lib/wp/wp-admin/user/credits.php +13 -0
  429. data/lib/wp/wp-admin/user/freedoms.php +13 -0
  430. data/lib/wp/wp-admin/user/index.php +12 -0
  431. data/lib/wp/wp-admin/user/menu.php +22 -0
  432. data/lib/wp/wp-admin/user/profile.php +12 -0
  433. data/lib/wp/wp-admin/user/user-edit.php +12 -0
  434. data/lib/wp/wp-admin/users.php +460 -0
  435. data/lib/wp/wp-admin/widgets.php +442 -0
  436. data/lib/wp/wp-blog-header.php +18 -0
  437. data/lib/wp/wp-comments-post.php +164 -0
  438. data/lib/wp/wp-config-sample.php +80 -0
  439. data/lib/wp/wp-content/index.php +2 -0
  440. data/lib/wp/wp-content/plugins/hello.php +82 -0
  441. data/lib/wp/wp-content/plugins/index.php +2 -0
  442. data/lib/wp/wp-content/themes/index.php +2 -0
  443. data/lib/wp/wp-content/themes/stump/.editorconfig +11 -0
  444. data/lib/wp/wp-content/themes/stump/.jshintrc +16 -0
  445. data/lib/wp/wp-content/themes/stump/404.php +13 -0
  446. data/lib/wp/wp-content/themes/stump/CHANGELOG.md +333 -0
  447. data/lib/wp/wp-content/themes/stump/CONTRIBUTING.md +121 -0
  448. data/lib/wp/wp-content/themes/stump/Gruntfile.js +151 -0
  449. data/lib/wp/wp-content/themes/stump/LICENSE.md +19 -0
  450. data/lib/wp/wp-content/themes/stump/assets/coffee/build/.gitkeep +0 -0
  451. data/lib/wp/wp-content/themes/stump/assets/coffee/build/site.js +6 -0
  452. data/lib/wp/wp-content/themes/stump/assets/css/editor-style.css +548 -0
  453. data/lib/wp/wp-content/themes/stump/assets/css/main.min.css +4 -0
  454. data/lib/wp/wp-content/themes/stump/assets/css/main.min.css.map +7 -0
  455. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  456. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  457. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  458. data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  459. data/lib/wp/wp-content/themes/stump/assets/img/.gitignore +0 -0
  460. data/lib/wp/wp-content/themes/stump/assets/js/_main.js +63 -0
  461. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/affix.js +137 -0
  462. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/alert.js +88 -0
  463. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/button.js +107 -0
  464. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/carousel.js +205 -0
  465. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/collapse.js +170 -0
  466. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/dropdown.js +147 -0
  467. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/modal.js +243 -0
  468. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/popover.js +110 -0
  469. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/scrollspy.js +153 -0
  470. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tab.js +125 -0
  471. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tooltip.js +399 -0
  472. data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/transition.js +48 -0
  473. data/lib/wp/wp-content/themes/stump/assets/js/scripts.min.js +1 -0
  474. data/lib/wp/wp-content/themes/stump/assets/js/vendor/jquery-1.11.0.min.js +4 -0
  475. data/lib/wp/wp-content/themes/stump/assets/js/vendor/modernizr-2.7.0.min.js +4 -0
  476. data/lib/wp/wp-content/themes/stump/assets/sass/app.scss +9 -0
  477. data/lib/wp/wp-content/themes/stump/assets/sass/core/_variables.scss +1 -0
  478. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_alerts.scss +67 -0
  479. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_badges.scss +55 -0
  480. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_bootstrap.scss +49 -0
  481. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_breadcrumbs.scss +26 -0
  482. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_button-groups.scss +226 -0
  483. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_buttons.scss +159 -0
  484. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_carousel.scss +232 -0
  485. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_close.scss +35 -0
  486. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_code.scss +63 -0
  487. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_component-animations.scss +29 -0
  488. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_dropdowns.scss +213 -0
  489. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_forms.scss +436 -0
  490. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_glyphicons.scss +233 -0
  491. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_grid.scss +84 -0
  492. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_input-groups.scss +162 -0
  493. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_jumbotron.scss +44 -0
  494. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_labels.scss +64 -0
  495. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_list-group.scss +110 -0
  496. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_media.scss +56 -0
  497. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_mixins.scss +947 -0
  498. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_modals.scss +139 -0
  499. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navbar.scss +620 -0
  500. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navs.scss +242 -0
  501. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_normalize.scss +423 -0
  502. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pager.scss +55 -0
  503. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pagination.scss +88 -0
  504. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_panels.scss +241 -0
  505. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_popovers.scss +133 -0
  506. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_print.scss +101 -0
  507. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_progress-bars.scss +80 -0
  508. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_responsive-utilities.scss +74 -0
  509. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_scaffolding.scss +134 -0
  510. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tables.scss +233 -0
  511. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_theme.scss +247 -0
  512. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_thumbnails.scss +38 -0
  513. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tooltip.scss +95 -0
  514. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_type.scss +284 -0
  515. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_utilities.scss +56 -0
  516. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_variables.scss +833 -0
  517. data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_wells.scss +29 -0
  518. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon-deprecated-upcoming.scss +13 -0
  519. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon.scss +59 -0
  520. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_button.scss +273 -0
  521. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_clearfix.scss +29 -0
  522. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_font-family.scss +5 -0
  523. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_hide-text.scss +5 -0
  524. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_html5-input-types.scss +56 -0
  525. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_position.scss +42 -0
  526. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_prefixer.scss +49 -0
  527. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_retina-image.scss +32 -0
  528. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_size.scss +44 -0
  529. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_timing-functions.scss +32 -0
  530. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_triangle.scss +45 -0
  531. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_animation.scss +52 -0
  532. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_appearance.scss +3 -0
  533. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_backface-visibility.scss +6 -0
  534. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background-image.scss +48 -0
  535. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background.scss +103 -0
  536. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-image.scss +55 -0
  537. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-radius.scss +22 -0
  538. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_box-sizing.scss +4 -0
  539. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_columns.scss +47 -0
  540. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_flex-box.scss +52 -0
  541. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_font-face.scss +23 -0
  542. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_hidpi-media-query.scss +10 -0
  543. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_image-rendering.scss +13 -0
  544. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_inline-block.scss +8 -0
  545. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_keyframes.scss +43 -0
  546. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_linear-gradient.scss +41 -0
  547. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_perspective.scss +8 -0
  548. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_placeholder.scss +29 -0
  549. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_radial-gradient.scss +44 -0
  550. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transform.scss +15 -0
  551. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transition.scss +34 -0
  552. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_user-select.scss +3 -0
  553. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_compact.scss +11 -0
  554. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_flex-grid.scss +39 -0
  555. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_grid-width.scss +13 -0
  556. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_linear-gradient.scss +13 -0
  557. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_modular-scale.scss +40 -0
  558. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_px-to-em.scss +8 -0
  559. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_radial-gradient.scss +23 -0
  560. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_tint-shade.scss +9 -0
  561. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_transition-property-name.scss +22 -0
  562. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_deprecated-webkit-gradient.scss +39 -0
  563. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  564. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_linear-positions-parser.scss +61 -0
  565. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss +69 -0
  566. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-positions-parser.scss +18 -0
  567. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_render-gradients.scss +26 -0
  568. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_shape-size-stripper.scss +10 -0
  569. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan.sass +11 -0
  570. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_grid.sass +161 -0
  571. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass +63 -0
  572. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_utilities.sass +24 -0
  573. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_variables.sass +42 -0
  574. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat-helpers.scss +8 -0
  575. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat.scss +21 -0
  576. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_new-breakpoint.scss +16 -0
  577. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_private.scss +107 -0
  578. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_px-to-em.scss +3 -0
  579. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_fill-parent.scss +7 -0
  580. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_grid.scss +5 -0
  581. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_media.scss +51 -0
  582. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_omega.scss +79 -0
  583. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_outer-container.scss +8 -0
  584. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_pad.scss +8 -0
  585. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_private.scss +50 -0
  586. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_reset.scss +12 -0
  587. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_row.scss +17 -0
  588. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_shift.scss +9 -0
  589. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_span-columns.scss +38 -0
  590. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_to-deprecate.scss +57 -0
  591. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_visual-grid.scss +41 -0
  592. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_grid.scss +7 -0
  593. data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_visual-grid.scss +5 -0
  594. data/lib/wp/wp-content/themes/stump/base.php +36 -0
  595. data/lib/wp/wp-content/themes/stump/functions.php +19 -0
  596. data/lib/wp/wp-content/themes/stump/index.php +21 -0
  597. data/lib/wp/wp-content/themes/stump/lang/ar.mo +0 -0
  598. data/lib/wp/wp-content/themes/stump/lang/ar.po +270 -0
  599. data/lib/wp/wp-content/themes/stump/lang/bg_BG.mo +0 -0
  600. data/lib/wp/wp-content/themes/stump/lang/bg_BG.po +338 -0
  601. data/lib/wp/wp-content/themes/stump/lang/ca.mo +0 -0
  602. data/lib/wp/wp-content/themes/stump/lang/ca.po +517 -0
  603. data/lib/wp/wp-content/themes/stump/lang/da_DK.mo +0 -0
  604. data/lib/wp/wp-content/themes/stump/lang/da_DK.po +305 -0
  605. data/lib/wp/wp-content/themes/stump/lang/de_DE.mo +0 -0
  606. data/lib/wp/wp-content/themes/stump/lang/de_DE.po +271 -0
  607. data/lib/wp/wp-content/themes/stump/lang/el.mo +0 -0
  608. data/lib/wp/wp-content/themes/stump/lang/el.po +319 -0
  609. data/lib/wp/wp-content/themes/stump/lang/es_ES.mo +0 -0
  610. data/lib/wp/wp-content/themes/stump/lang/es_ES.po +270 -0
  611. data/lib/wp/wp-content/themes/stump/lang/et.mo +0 -0
  612. data/lib/wp/wp-content/themes/stump/lang/et.po +262 -0
  613. data/lib/wp/wp-content/themes/stump/lang/fa_IR.mo +0 -0
  614. data/lib/wp/wp-content/themes/stump/lang/fa_IR.po +273 -0
  615. data/lib/wp/wp-content/themes/stump/lang/fi_FI.mo +0 -0
  616. data/lib/wp/wp-content/themes/stump/lang/fi_FI.po +367 -0
  617. data/lib/wp/wp-content/themes/stump/lang/fr_FR.mo +0 -0
  618. data/lib/wp/wp-content/themes/stump/lang/fr_FR.po +336 -0
  619. data/lib/wp/wp-content/themes/stump/lang/he_IL.mo +0 -0
  620. data/lib/wp/wp-content/themes/stump/lang/he_IL.po +336 -0
  621. data/lib/wp/wp-content/themes/stump/lang/hu_HU.mo +0 -0
  622. data/lib/wp/wp-content/themes/stump/lang/hu_HU.po +271 -0
  623. data/lib/wp/wp-content/themes/stump/lang/id_ID.mo +0 -0
  624. data/lib/wp/wp-content/themes/stump/lang/id_ID.po +278 -0
  625. data/lib/wp/wp-content/themes/stump/lang/it_IT.mo +0 -0
  626. data/lib/wp/wp-content/themes/stump/lang/it_IT.po +269 -0
  627. data/lib/wp/wp-content/themes/stump/lang/ja.mo +0 -0
  628. data/lib/wp/wp-content/themes/stump/lang/ja.po +267 -0
  629. data/lib/wp/wp-content/themes/stump/lang/ko_KR.mo +0 -0
  630. data/lib/wp/wp-content/themes/stump/lang/ko_KR.po +282 -0
  631. data/lib/wp/wp-content/themes/stump/lang/mk_MK.mo +0 -0
  632. data/lib/wp/wp-content/themes/stump/lang/mk_MK.po +297 -0
  633. data/lib/wp/wp-content/themes/stump/lang/ms_MY.mo +0 -0
  634. data/lib/wp/wp-content/themes/stump/lang/ms_MY.po +342 -0
  635. data/lib/wp/wp-content/themes/stump/lang/nb_NO.mo +0 -0
  636. data/lib/wp/wp-content/themes/stump/lang/nb_NO.po +517 -0
  637. data/lib/wp/wp-content/themes/stump/lang/nl_NL.mo +0 -0
  638. data/lib/wp/wp-content/themes/stump/lang/nl_NL.po +261 -0
  639. data/lib/wp/wp-content/themes/stump/lang/nn_NO.mo +0 -0
  640. data/lib/wp/wp-content/themes/stump/lang/nn_NO.po +517 -0
  641. data/lib/wp/wp-content/themes/stump/lang/pl_PL.mo +0 -0
  642. data/lib/wp/wp-content/themes/stump/lang/pl_PL.po +283 -0
  643. data/lib/wp/wp-content/themes/stump/lang/pt_BR.mo +0 -0
  644. data/lib/wp/wp-content/themes/stump/lang/pt_BR.po +394 -0
  645. data/lib/wp/wp-content/themes/stump/lang/ro_RO.mo +0 -0
  646. data/lib/wp/wp-content/themes/stump/lang/ro_RO.po +271 -0
  647. data/lib/wp/wp-content/themes/stump/lang/roots.pot +244 -0
  648. data/lib/wp/wp-content/themes/stump/lang/ru_RU.mo +0 -0
  649. data/lib/wp/wp-content/themes/stump/lang/ru_RU.po +255 -0
  650. data/lib/wp/wp-content/themes/stump/lang/sk_SK.mo +0 -0
  651. data/lib/wp/wp-content/themes/stump/lang/sk_SK.po +267 -0
  652. data/lib/wp/wp-content/themes/stump/lang/sr_RS.mo +0 -0
  653. data/lib/wp/wp-content/themes/stump/lang/sr_RS.pot +261 -0
  654. data/lib/wp/wp-content/themes/stump/lang/sv_SE.mo +0 -0
  655. data/lib/wp/wp-content/themes/stump/lang/sv_SE.po +323 -0
  656. data/lib/wp/wp-content/themes/stump/lang/tr_TR.mo +0 -0
  657. data/lib/wp/wp-content/themes/stump/lang/tr_TR.po +405 -0
  658. data/lib/wp/wp-content/themes/stump/lang/vi_VN.mo +0 -0
  659. data/lib/wp/wp-content/themes/stump/lang/vi_VN.po +516 -0
  660. data/lib/wp/wp-content/themes/stump/lang/zh_CN.mo +0 -0
  661. data/lib/wp/wp-content/themes/stump/lang/zh_CN.po +329 -0
  662. data/lib/wp/wp-content/themes/stump/lang/zh_TW.mo +0 -0
  663. data/lib/wp/wp-content/themes/stump/lang/zh_TW.po +261 -0
  664. data/lib/wp/wp-content/themes/stump/lib/activation.php +215 -0
  665. data/lib/wp/wp-content/themes/stump/lib/cleanup.php +261 -0
  666. data/lib/wp/wp-content/themes/stump/lib/comments.php +52 -0
  667. data/lib/wp/wp-content/themes/stump/lib/config.php +79 -0
  668. data/lib/wp/wp-content/themes/stump/lib/custom.php +4 -0
  669. data/lib/wp/wp-content/themes/stump/lib/gallery.php +130 -0
  670. data/lib/wp/wp-content/themes/stump/lib/init.php +25 -0
  671. data/lib/wp/wp-content/themes/stump/lib/nav.php +93 -0
  672. data/lib/wp/wp-content/themes/stump/lib/relative-urls.php +50 -0
  673. data/lib/wp/wp-content/themes/stump/lib/scripts.php +67 -0
  674. data/lib/wp/wp-content/themes/stump/lib/sidebar.php +43 -0
  675. data/lib/wp/wp-content/themes/stump/lib/titles.php +37 -0
  676. data/lib/wp/wp-content/themes/stump/lib/utils.php +14 -0
  677. data/lib/wp/wp-content/themes/stump/lib/widgets.php +133 -0
  678. data/lib/wp/wp-content/themes/stump/lib/wrapper.php +49 -0
  679. data/lib/wp/wp-content/themes/stump/package.json +32 -0
  680. data/lib/wp/wp-content/themes/stump/page.php +2 -0
  681. data/lib/wp/wp-content/themes/stump/screenshot.png +0 -0
  682. data/lib/wp/wp-content/themes/stump/single.php +1 -0
  683. data/lib/wp/wp-content/themes/stump/style.css +11 -0
  684. data/lib/wp/wp-content/themes/stump/template-custom.php +8 -0
  685. data/lib/wp/wp-content/themes/stump/templates/comment.php +14 -0
  686. data/lib/wp/wp-content/themes/stump/templates/comments.php +80 -0
  687. data/lib/wp/wp-content/themes/stump/templates/content-page.php +4 -0
  688. data/lib/wp/wp-content/themes/stump/templates/content-single.php +15 -0
  689. data/lib/wp/wp-content/themes/stump/templates/content.php +9 -0
  690. data/lib/wp/wp-content/themes/stump/templates/entry-meta.php +2 -0
  691. data/lib/wp/wp-content/themes/stump/templates/footer.php +8 -0
  692. data/lib/wp/wp-content/themes/stump/templates/head.php +12 -0
  693. data/lib/wp/wp-content/themes/stump/templates/header-top-navbar.php +21 -0
  694. data/lib/wp/wp-content/themes/stump/templates/header.php +14 -0
  695. data/lib/wp/wp-content/themes/stump/templates/page-header.php +5 -0
  696. data/lib/wp/wp-content/themes/stump/templates/searchform.php +9 -0
  697. data/lib/wp/wp-content/themes/stump/templates/sidebar.php +1 -0
  698. data/lib/wp/wp-content/themes/twentyfourteen/404.php +32 -0
  699. data/lib/wp/wp-content/themes/twentyfourteen/archive.php +74 -0
  700. data/lib/wp/wp-content/themes/twentyfourteen/author.php +74 -0
  701. data/lib/wp/wp-content/themes/twentyfourteen/category.php +58 -0
  702. data/lib/wp/wp-content/themes/twentyfourteen/comments.php +66 -0
  703. data/lib/wp/wp-content/themes/twentyfourteen/content-aside.php +57 -0
  704. data/lib/wp/wp-content/themes/twentyfourteen/content-audio.php +57 -0
  705. data/lib/wp/wp-content/themes/twentyfourteen/content-featured-post.php +34 -0
  706. data/lib/wp/wp-content/themes/twentyfourteen/content-gallery.php +57 -0
  707. data/lib/wp/wp-content/themes/twentyfourteen/content-image.php +57 -0
  708. data/lib/wp/wp-content/themes/twentyfourteen/content-link.php +57 -0
  709. data/lib/wp/wp-content/themes/twentyfourteen/content-none.php +31 -0
  710. data/lib/wp/wp-content/themes/twentyfourteen/content-page.php +31 -0
  711. data/lib/wp/wp-content/themes/twentyfourteen/content-quote.php +57 -0
  712. data/lib/wp/wp-content/themes/twentyfourteen/content-video.php +57 -0
  713. data/lib/wp/wp-content/themes/twentyfourteen/content.php +66 -0
  714. data/lib/wp/wp-content/themes/twentyfourteen/css/editor-style.css +717 -0
  715. data/lib/wp/wp-content/themes/twentyfourteen/css/ie.css +1335 -0
  716. data/lib/wp/wp-content/themes/twentyfourteen/featured-content.php +39 -0
  717. data/lib/wp/wp-content/themes/twentyfourteen/footer.php +28 -0
  718. data/lib/wp/wp-content/themes/twentyfourteen/functions.php +519 -0
  719. data/lib/wp/wp-content/themes/twentyfourteen/genericons/COPYING.txt +9 -0
  720. data/lib/wp/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf +0 -0
  721. data/lib/wp/wp-content/themes/twentyfourteen/genericons/LICENSE.txt +339 -0
  722. data/lib/wp/wp-content/themes/twentyfourteen/genericons/README.txt +123 -0
  723. data/lib/wp/wp-content/themes/twentyfourteen/genericons/example.html +464 -0
  724. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot +0 -0
  725. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg +135 -0
  726. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf +0 -0
  727. data/lib/wp/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff +0 -0
  728. data/lib/wp/wp-content/themes/twentyfourteen/genericons/genericons.css +197 -0
  729. data/lib/wp/wp-content/themes/twentyfourteen/header.php +65 -0
  730. data/lib/wp/wp-content/themes/twentyfourteen/image.php +79 -0
  731. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-dark.svg +16 -0
  732. data/lib/wp/wp-content/themes/twentyfourteen/images/pattern-light.svg +6 -0
  733. data/lib/wp/wp-content/themes/twentyfourteen/inc/back-compat.php +63 -0
  734. data/lib/wp/wp-content/themes/twentyfourteen/inc/custom-header.php +147 -0
  735. data/lib/wp/wp-content/themes/twentyfourteen/inc/customizer.php +114 -0
  736. data/lib/wp/wp-content/themes/twentyfourteen/inc/featured-content.php +531 -0
  737. data/lib/wp/wp-content/themes/twentyfourteen/inc/template-tags.php +203 -0
  738. data/lib/wp/wp-content/themes/twentyfourteen/inc/widgets.php +269 -0
  739. data/lib/wp/wp-content/themes/twentyfourteen/index.php +61 -0
  740. data/lib/wp/wp-content/themes/twentyfourteen/js/customizer.js +38 -0
  741. data/lib/wp/wp-content/themes/twentyfourteen/js/featured-content-admin.js +9 -0
  742. data/lib/wp/wp-content/themes/twentyfourteen/js/functions.js +134 -0
  743. data/lib/wp/wp-content/themes/twentyfourteen/js/html5.js +8 -0
  744. data/lib/wp/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js +21 -0
  745. data/lib/wp/wp-content/themes/twentyfourteen/js/slider.js +598 -0
  746. data/lib/wp/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot +467 -0
  747. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/contributors.php +52 -0
  748. data/lib/wp/wp-content/themes/twentyfourteen/page-templates/full-width.php +42 -0
  749. data/lib/wp/wp-content/themes/twentyfourteen/page.php +48 -0
  750. data/lib/wp/wp-content/themes/twentyfourteen/rtl.css +854 -0
  751. data/lib/wp/wp-content/themes/twentyfourteen/screenshot.png +0 -0
  752. data/lib/wp/wp-content/themes/twentyfourteen/search.php +49 -0
  753. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-content.php +16 -0
  754. data/lib/wp/wp-content/themes/twentyfourteen/sidebar-footer.php +19 -0
  755. data/lib/wp/wp-content/themes/twentyfourteen/sidebar.php +29 -0
  756. data/lib/wp/wp-content/themes/twentyfourteen/single.php +40 -0
  757. data/lib/wp/wp-content/themes/twentyfourteen/style.css +4321 -0
  758. data/lib/wp/wp-content/themes/twentyfourteen/tag.php +60 -0
  759. data/lib/wp/wp-content/themes/twentyfourteen/taxonomy-post_format.php +85 -0
  760. data/lib/wp/wp-cron.php +115 -0
  761. data/lib/wp/wp-includes/ID3/getid3.lib.php +1376 -0
  762. data/lib/wp/wp-includes/ID3/getid3.php +1796 -0
  763. data/lib/wp/wp-includes/ID3/license.commercial.txt +27 -0
  764. data/lib/wp/wp-includes/ID3/license.txt +29 -0
  765. data/lib/wp/wp-includes/ID3/module.audio-video.asf.php +2013 -0
  766. data/lib/wp/wp-includes/ID3/module.audio-video.flv.php +745 -0
  767. data/lib/wp/wp-includes/ID3/module.audio-video.matroska.php +1751 -0
  768. data/lib/wp/wp-includes/ID3/module.audio-video.quicktime.php +2246 -0
  769. data/lib/wp/wp-includes/ID3/module.audio-video.riff.php +2586 -0
  770. data/lib/wp/wp-includes/ID3/module.audio.ac3.php +474 -0
  771. data/lib/wp/wp-includes/ID3/module.audio.dts.php +291 -0
  772. data/lib/wp/wp-includes/ID3/module.audio.flac.php +443 -0
  773. data/lib/wp/wp-includes/ID3/module.audio.mp3.php +2012 -0
  774. data/lib/wp/wp-includes/ID3/module.audio.ogg.php +756 -0
  775. data/lib/wp/wp-includes/ID3/module.tag.apetag.php +371 -0
  776. data/lib/wp/wp-includes/ID3/module.tag.id3v1.php +360 -0
  777. data/lib/wp/wp-includes/ID3/module.tag.id3v2.php +3424 -0
  778. data/lib/wp/wp-includes/ID3/module.tag.lyrics3.php +294 -0
  779. data/lib/wp/wp-includes/ID3/readme.txt +604 -0
  780. data/lib/wp/wp-includes/SimplePie/Author.php +157 -0
  781. data/lib/wp/wp-includes/SimplePie/Cache.php +133 -0
  782. data/lib/wp/wp-includes/SimplePie/Cache/Base.php +114 -0
  783. data/lib/wp/wp-includes/SimplePie/Cache/DB.php +137 -0
  784. data/lib/wp/wp-includes/SimplePie/Cache/File.php +173 -0
  785. data/lib/wp/wp-includes/SimplePie/Cache/Memcache.php +183 -0
  786. data/lib/wp/wp-includes/SimplePie/Cache/MySQL.php +438 -0
  787. data/lib/wp/wp-includes/SimplePie/Caption.php +210 -0
  788. data/lib/wp/wp-includes/SimplePie/Category.php +157 -0
  789. data/lib/wp/wp-includes/SimplePie/Content/Type/Sniffer.php +332 -0
  790. data/lib/wp/wp-includes/SimplePie/Copyright.php +130 -0
  791. data/lib/wp/wp-includes/SimplePie/Core.php +57 -0
  792. data/lib/wp/wp-includes/SimplePie/Credit.php +156 -0
  793. data/lib/wp/wp-includes/SimplePie/Decode/HTML/Entities.php +617 -0
  794. data/lib/wp/wp-includes/SimplePie/Enclosure.php +1380 -0
  795. data/lib/wp/wp-includes/SimplePie/Exception.php +52 -0
  796. data/lib/wp/wp-includes/SimplePie/File.php +292 -0
  797. data/lib/wp/wp-includes/SimplePie/HTTP/Parser.php +500 -0
  798. data/lib/wp/wp-includes/SimplePie/IRI.php +1238 -0
  799. data/lib/wp/wp-includes/SimplePie/Item.php +2964 -0
  800. data/lib/wp/wp-includes/SimplePie/Locator.php +372 -0
  801. data/lib/wp/wp-includes/SimplePie/Misc.php +2247 -0
  802. data/lib/wp/wp-includes/SimplePie/Net/IPv6.php +276 -0
  803. data/lib/wp/wp-includes/SimplePie/Parse/Date.php +983 -0
  804. data/lib/wp/wp-includes/SimplePie/Parser.php +407 -0
  805. data/lib/wp/wp-includes/SimplePie/Rating.php +129 -0
  806. data/lib/wp/wp-includes/SimplePie/Registry.php +225 -0
  807. data/lib/wp/wp-includes/SimplePie/Restriction.php +155 -0
  808. data/lib/wp/wp-includes/SimplePie/Sanitize.php +554 -0
  809. data/lib/wp/wp-includes/SimplePie/Source.php +611 -0
  810. data/lib/wp/wp-includes/SimplePie/XML/Declaration/Parser.php +362 -0
  811. data/lib/wp/wp-includes/SimplePie/gzdecode.php +371 -0
  812. data/lib/wp/wp-includes/Text/Diff.php +450 -0
  813. data/lib/wp/wp-includes/Text/Diff/Engine/native.php +436 -0
  814. data/lib/wp/wp-includes/Text/Diff/Engine/shell.php +162 -0
  815. data/lib/wp/wp-includes/Text/Diff/Engine/string.php +248 -0
  816. data/lib/wp/wp-includes/Text/Diff/Engine/xdiff.php +64 -0
  817. data/lib/wp/wp-includes/Text/Diff/Renderer.php +235 -0
  818. data/lib/wp/wp-includes/Text/Diff/Renderer/inline.php +206 -0
  819. data/lib/wp/wp-includes/admin-bar.php +870 -0
  820. data/lib/wp/wp-includes/atomlib.php +352 -0
  821. data/lib/wp/wp-includes/author-template.php +471 -0
  822. data/lib/wp/wp-includes/bookmark-template.php +298 -0
  823. data/lib/wp/wp-includes/bookmark.php +416 -0
  824. data/lib/wp/wp-includes/cache.php +704 -0
  825. data/lib/wp/wp-includes/canonical.php +586 -0
  826. data/lib/wp/wp-includes/capabilities.php +1539 -0
  827. data/lib/wp/wp-includes/category-template.php +1407 -0
  828. data/lib/wp/wp-includes/category.php +343 -0
  829. data/lib/wp/wp-includes/certificates/ca-bundle.crt +3785 -0
  830. data/lib/wp/wp-includes/class-IXR.php +1100 -0
  831. data/lib/wp/wp-includes/class-feed.php +140 -0
  832. data/lib/wp/wp-includes/class-http.php +2245 -0
  833. data/lib/wp/wp-includes/class-json.php +936 -0
  834. data/lib/wp/wp-includes/class-oembed.php +579 -0
  835. data/lib/wp/wp-includes/class-phpass.php +260 -0
  836. data/lib/wp/wp-includes/class-phpmailer.php +3265 -0
  837. data/lib/wp/wp-includes/class-pop3.php +652 -0
  838. data/lib/wp/wp-includes/class-simplepie.php +3119 -0
  839. data/lib/wp/wp-includes/class-smtp.php +943 -0
  840. data/lib/wp/wp-includes/class-snoopy.php +1256 -0
  841. data/lib/wp/wp-includes/class-wp-admin-bar.php +517 -0
  842. data/lib/wp/wp-includes/class-wp-ajax-response.php +199 -0
  843. data/lib/wp/wp-includes/class-wp-customize-control.php +1124 -0
  844. data/lib/wp/wp-includes/class-wp-customize-manager.php +1272 -0
  845. data/lib/wp/wp-includes/class-wp-customize-panel.php +200 -0
  846. data/lib/wp/wp-includes/class-wp-customize-section.php +196 -0
  847. data/lib/wp/wp-includes/class-wp-customize-setting.php +554 -0
  848. data/lib/wp/wp-includes/class-wp-customize-widgets.php +1556 -0
  849. data/lib/wp/wp-includes/class-wp-editor.php +1435 -0
  850. data/lib/wp/wp-includes/class-wp-embed.php +373 -0
  851. data/lib/wp/wp-includes/class-wp-error.php +276 -0
  852. data/lib/wp/wp-includes/class-wp-http-ixr-client.php +97 -0
  853. data/lib/wp/wp-includes/class-wp-image-editor-gd.php +459 -0
  854. data/lib/wp/wp-includes/class-wp-image-editor-imagick.php +512 -0
  855. data/lib/wp/wp-includes/class-wp-image-editor.php +475 -0
  856. data/lib/wp/wp-includes/class-wp-theme.php +1235 -0
  857. data/lib/wp/wp-includes/class-wp-walker.php +471 -0
  858. data/lib/wp/wp-includes/class-wp-xmlrpc-server.php +5984 -0
  859. data/lib/wp/wp-includes/class-wp.php +782 -0
  860. data/lib/wp/wp-includes/class.wp-dependencies.php +509 -0
  861. data/lib/wp/wp-includes/class.wp-scripts.php +247 -0
  862. data/lib/wp/wp-includes/class.wp-styles.php +210 -0
  863. data/lib/wp/wp-includes/comment-template.php +2286 -0
  864. data/lib/wp/wp-includes/comment.php +2606 -0
  865. data/lib/wp/wp-includes/compat.php +125 -0
  866. data/lib/wp/wp-includes/cron.php +469 -0
  867. data/lib/wp/wp-includes/css/admin-bar-rtl.css +1099 -0
  868. data/lib/wp/wp-includes/css/admin-bar-rtl.min.css +1 -0
  869. data/lib/wp/wp-includes/css/admin-bar.css +1099 -0
  870. data/lib/wp/wp-includes/css/admin-bar.min.css +1 -0
  871. data/lib/wp/wp-includes/css/buttons-rtl.css +364 -0
  872. data/lib/wp/wp-includes/css/buttons-rtl.min.css +1 -0
  873. data/lib/wp/wp-includes/css/buttons.css +364 -0
  874. data/lib/wp/wp-includes/css/buttons.min.css +1 -0
  875. data/lib/wp/wp-includes/css/dashicons.css +893 -0
  876. data/lib/wp/wp-includes/css/dashicons.min.css +1 -0
  877. data/lib/wp/wp-includes/css/editor-rtl.css +1993 -0
  878. data/lib/wp/wp-includes/css/editor-rtl.min.css +1 -0
  879. data/lib/wp/wp-includes/css/editor.css +1993 -0
  880. data/lib/wp/wp-includes/css/editor.min.css +1 -0
  881. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.css +343 -0
  882. data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.min.css +19 -0
  883. data/lib/wp/wp-includes/css/jquery-ui-dialog.css +343 -0
  884. data/lib/wp/wp-includes/css/jquery-ui-dialog.min.css +19 -0
  885. data/lib/wp/wp-includes/css/media-views-rtl.css +2568 -0
  886. data/lib/wp/wp-includes/css/media-views-rtl.min.css +1 -0
  887. data/lib/wp/wp-includes/css/media-views.css +2568 -0
  888. data/lib/wp/wp-includes/css/media-views.min.css +1 -0
  889. data/lib/wp/wp-includes/css/wp-auth-check-rtl.css +100 -0
  890. data/lib/wp/wp-includes/css/wp-auth-check-rtl.min.css +1 -0
  891. data/lib/wp/wp-includes/css/wp-auth-check.css +100 -0
  892. data/lib/wp/wp-includes/css/wp-auth-check.min.css +1 -0
  893. data/lib/wp/wp-includes/css/wp-pointer-rtl.css +212 -0
  894. data/lib/wp/wp-includes/css/wp-pointer-rtl.min.css +1 -0
  895. data/lib/wp/wp-includes/css/wp-pointer.css +212 -0
  896. data/lib/wp/wp-includes/css/wp-pointer.min.css +1 -0
  897. data/lib/wp/wp-includes/date.php +475 -0
  898. data/lib/wp/wp-includes/default-constants.php +323 -0
  899. data/lib/wp/wp-includes/default-filters.php +307 -0
  900. data/lib/wp/wp-includes/default-widgets.php +1423 -0
  901. data/lib/wp/wp-includes/deprecated.php +3501 -0
  902. data/lib/wp/wp-includes/feed-atom-comments.php +115 -0
  903. data/lib/wp/wp-includes/feed-atom.php +87 -0
  904. data/lib/wp/wp-includes/feed-rdf.php +81 -0
  905. data/lib/wp/wp-includes/feed-rss.php +46 -0
  906. data/lib/wp/wp-includes/feed-rss2-comments.php +97 -0
  907. data/lib/wp/wp-includes/feed-rss2.php +115 -0
  908. data/lib/wp/wp-includes/feed.php +659 -0
  909. data/lib/wp/wp-includes/fonts/dashicons.eot +0 -0
  910. data/lib/wp/wp-includes/fonts/dashicons.svg +250 -0
  911. data/lib/wp/wp-includes/fonts/dashicons.ttf +0 -0
  912. data/lib/wp/wp-includes/fonts/dashicons.woff +0 -0
  913. data/lib/wp/wp-includes/formatting.php +4006 -0
  914. data/lib/wp/wp-includes/functions.php +4631 -0
  915. data/lib/wp/wp-includes/functions.wp-scripts.php +258 -0
  916. data/lib/wp/wp-includes/functions.wp-styles.php +245 -0
  917. data/lib/wp/wp-includes/general-template.php +2982 -0
  918. data/lib/wp/wp-includes/http.php +551 -0
  919. data/lib/wp/wp-includes/images/admin-bar-sprite-2x.png +0 -0
  920. data/lib/wp/wp-includes/images/admin-bar-sprite.png +0 -0
  921. data/lib/wp/wp-includes/images/arrow-pointer-blue-2x.png +0 -0
  922. data/lib/wp/wp-includes/images/arrow-pointer-blue.png +0 -0
  923. data/lib/wp/wp-includes/images/blank.gif +0 -0
  924. data/lib/wp/wp-includes/images/crystal/archive.png +0 -0
  925. data/lib/wp/wp-includes/images/crystal/audio.png +0 -0
  926. data/lib/wp/wp-includes/images/crystal/code.png +0 -0
  927. data/lib/wp/wp-includes/images/crystal/default.png +0 -0
  928. data/lib/wp/wp-includes/images/crystal/document.png +0 -0
  929. data/lib/wp/wp-includes/images/crystal/interactive.png +0 -0
  930. data/lib/wp/wp-includes/images/crystal/license.txt +9 -0
  931. data/lib/wp/wp-includes/images/crystal/spreadsheet.png +0 -0
  932. data/lib/wp/wp-includes/images/crystal/text.png +0 -0
  933. data/lib/wp/wp-includes/images/crystal/video.png +0 -0
  934. data/lib/wp/wp-includes/images/down_arrow-2x.gif +0 -0
  935. data/lib/wp/wp-includes/images/down_arrow.gif +0 -0
  936. data/lib/wp/wp-includes/images/icon-pointer-flag-2x.png +0 -0
  937. data/lib/wp/wp-includes/images/icon-pointer-flag.png +0 -0
  938. data/lib/wp/wp-includes/images/media/archive.png +0 -0
  939. data/lib/wp/wp-includes/images/media/audio.png +0 -0
  940. data/lib/wp/wp-includes/images/media/code.png +0 -0
  941. data/lib/wp/wp-includes/images/media/default.png +0 -0
  942. data/lib/wp/wp-includes/images/media/document.png +0 -0
  943. data/lib/wp/wp-includes/images/media/interactive.png +0 -0
  944. data/lib/wp/wp-includes/images/media/spreadsheet.png +0 -0
  945. data/lib/wp/wp-includes/images/media/text.png +0 -0
  946. data/lib/wp/wp-includes/images/media/video.png +0 -0
  947. data/lib/wp/wp-includes/images/rss-2x.png +0 -0
  948. data/lib/wp/wp-includes/images/rss.png +0 -0
  949. data/lib/wp/wp-includes/images/smilies/icon_arrow.gif +0 -0
  950. data/lib/wp/wp-includes/images/smilies/icon_biggrin.gif +0 -0
  951. data/lib/wp/wp-includes/images/smilies/icon_confused.gif +0 -0
  952. data/lib/wp/wp-includes/images/smilies/icon_cool.gif +0 -0
  953. data/lib/wp/wp-includes/images/smilies/icon_cry.gif +0 -0
  954. data/lib/wp/wp-includes/images/smilies/icon_eek.gif +0 -0
  955. data/lib/wp/wp-includes/images/smilies/icon_evil.gif +0 -0
  956. data/lib/wp/wp-includes/images/smilies/icon_exclaim.gif +0 -0
  957. data/lib/wp/wp-includes/images/smilies/icon_idea.gif +0 -0
  958. data/lib/wp/wp-includes/images/smilies/icon_lol.gif +0 -0
  959. data/lib/wp/wp-includes/images/smilies/icon_mad.gif +0 -0
  960. data/lib/wp/wp-includes/images/smilies/icon_mrgreen.gif +0 -0
  961. data/lib/wp/wp-includes/images/smilies/icon_neutral.gif +0 -0
  962. data/lib/wp/wp-includes/images/smilies/icon_question.gif +0 -0
  963. data/lib/wp/wp-includes/images/smilies/icon_razz.gif +0 -0
  964. data/lib/wp/wp-includes/images/smilies/icon_redface.gif +0 -0
  965. data/lib/wp/wp-includes/images/smilies/icon_rolleyes.gif +0 -0
  966. data/lib/wp/wp-includes/images/smilies/icon_sad.gif +0 -0
  967. data/lib/wp/wp-includes/images/smilies/icon_smile.gif +0 -0
  968. data/lib/wp/wp-includes/images/smilies/icon_surprised.gif +0 -0
  969. data/lib/wp/wp-includes/images/smilies/icon_twisted.gif +0 -0
  970. data/lib/wp/wp-includes/images/smilies/icon_wink.gif +0 -0
  971. data/lib/wp/wp-includes/images/spinner-2x.gif +0 -0
  972. data/lib/wp/wp-includes/images/spinner.gif +0 -0
  973. data/lib/wp/wp-includes/images/toggle-arrow-2x.png +0 -0
  974. data/lib/wp/wp-includes/images/toggle-arrow.png +0 -0
  975. data/lib/wp/wp-includes/images/uploader-icons-2x.png +0 -0
  976. data/lib/wp/wp-includes/images/uploader-icons.png +0 -0
  977. data/lib/wp/wp-includes/images/wlw/wp-comments.png +0 -0
  978. data/lib/wp/wp-includes/images/wlw/wp-icon.png +0 -0
  979. data/lib/wp/wp-includes/images/wlw/wp-watermark.png +0 -0
  980. data/lib/wp/wp-includes/images/wpicons-2x.png +0 -0
  981. data/lib/wp/wp-includes/images/wpicons.png +0 -0
  982. data/lib/wp/wp-includes/images/wpspin-2x.gif +0 -0
  983. data/lib/wp/wp-includes/images/wpspin.gif +0 -0
  984. data/lib/wp/wp-includes/images/xit-2x.gif +0 -0
  985. data/lib/wp/wp-includes/images/xit.gif +0 -0
  986. data/lib/wp/wp-includes/js/admin-bar.js +365 -0
  987. data/lib/wp/wp-includes/js/admin-bar.min.js +1 -0
  988. data/lib/wp/wp-includes/js/autosave.js +589 -0
  989. data/lib/wp/wp-includes/js/autosave.min.js +1 -0
  990. data/lib/wp/wp-includes/js/backbone.min.js +1 -0
  991. data/lib/wp/wp-includes/js/colorpicker.js +707 -0
  992. data/lib/wp/wp-includes/js/colorpicker.min.js +1 -0
  993. data/lib/wp/wp-includes/js/comment-reply.js +47 -0
  994. data/lib/wp/wp-includes/js/comment-reply.min.js +1 -0
  995. data/lib/wp/wp-includes/js/crop/cropper.css +165 -0
  996. data/lib/wp/wp-includes/js/crop/cropper.js +516 -0
  997. data/lib/wp/wp-includes/js/crop/marqueeHoriz.gif +0 -0
  998. data/lib/wp/wp-includes/js/crop/marqueeVert.gif +0 -0
  999. data/lib/wp/wp-includes/js/customize-base.js +617 -0
  1000. data/lib/wp/wp-includes/js/customize-base.min.js +1 -0
  1001. data/lib/wp/wp-includes/js/customize-loader.js +246 -0
  1002. data/lib/wp/wp-includes/js/customize-loader.min.js +1 -0
  1003. data/lib/wp/wp-includes/js/customize-models.js +247 -0
  1004. data/lib/wp/wp-includes/js/customize-models.min.js +1 -0
  1005. data/lib/wp/wp-includes/js/customize-preview-widgets.js +129 -0
  1006. data/lib/wp/wp-includes/js/customize-preview-widgets.min.js +1 -0
  1007. data/lib/wp/wp-includes/js/customize-preview.js +154 -0
  1008. data/lib/wp/wp-includes/js/customize-preview.min.js +1 -0
  1009. data/lib/wp/wp-includes/js/customize-views.js +231 -0
  1010. data/lib/wp/wp-includes/js/customize-views.min.js +1 -0
  1011. data/lib/wp/wp-includes/js/heartbeat.js +738 -0
  1012. data/lib/wp/wp-includes/js/heartbeat.min.js +1 -0
  1013. data/lib/wp/wp-includes/js/hoverIntent.js +115 -0
  1014. data/lib/wp/wp-includes/js/hoverIntent.min.js +1 -0
  1015. data/lib/wp/wp-includes/js/imgareaselect/border-anim-h.gif +0 -0
  1016. data/lib/wp/wp-includes/js/imgareaselect/border-anim-v.gif +0 -0
  1017. data/lib/wp/wp-includes/js/imgareaselect/imgareaselect.css +41 -0
  1018. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js +1205 -0
  1019. data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js +1 -0
  1020. data/lib/wp/wp-includes/js/jcrop/Jcrop.gif +0 -0
  1021. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.css +29 -0
  1022. data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.js +22 -0
  1023. data/lib/wp/wp-includes/js/jquery/jquery-migrate.js +521 -0
  1024. data/lib/wp/wp-includes/js/jquery/jquery-migrate.min.js +2 -0
  1025. data/lib/wp/wp-includes/js/jquery/jquery.color.min.js +2 -0
  1026. data/lib/wp/wp-includes/js/jquery/jquery.form.js +1193 -0
  1027. data/lib/wp/wp-includes/js/jquery/jquery.form.min.js +11 -0
  1028. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.js +134 -0
  1029. data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.min.js +1 -0
  1030. data/lib/wp/wp-includes/js/jquery/jquery.js +5 -0
  1031. data/lib/wp/wp-includes/js/jquery/jquery.masonry.min.js +11 -0
  1032. data/lib/wp/wp-includes/js/jquery/jquery.query.js +11 -0
  1033. data/lib/wp/wp-includes/js/jquery/jquery.schedule.js +36 -0
  1034. data/lib/wp/wp-includes/js/jquery/jquery.serialize-object.js +31 -0
  1035. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.js +99 -0
  1036. data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.min.js +1 -0
  1037. data/lib/wp/wp-includes/js/jquery/jquery.ui.touch-punch.js +11 -0
  1038. data/lib/wp/wp-includes/js/jquery/suggest.js +316 -0
  1039. data/lib/wp/wp-includes/js/jquery/suggest.min.js +1 -0
  1040. data/lib/wp/wp-includes/js/jquery/ui/accordion.min.js +11 -0
  1041. data/lib/wp/wp-includes/js/jquery/ui/autocomplete.min.js +11 -0
  1042. data/lib/wp/wp-includes/js/jquery/ui/button.min.js +11 -0
  1043. data/lib/wp/wp-includes/js/jquery/ui/core.min.js +11 -0
  1044. data/lib/wp/wp-includes/js/jquery/ui/datepicker.min.js +12 -0
  1045. data/lib/wp/wp-includes/js/jquery/ui/dialog.min.js +11 -0
  1046. data/lib/wp/wp-includes/js/jquery/ui/draggable.min.js +11 -0
  1047. data/lib/wp/wp-includes/js/jquery/ui/droppable.min.js +11 -0
  1048. data/lib/wp/wp-includes/js/jquery/ui/effect-blind.min.js +11 -0
  1049. data/lib/wp/wp-includes/js/jquery/ui/effect-bounce.min.js +11 -0
  1050. data/lib/wp/wp-includes/js/jquery/ui/effect-clip.min.js +11 -0
  1051. data/lib/wp/wp-includes/js/jquery/ui/effect-drop.min.js +11 -0
  1052. data/lib/wp/wp-includes/js/jquery/ui/effect-explode.min.js +11 -0
  1053. data/lib/wp/wp-includes/js/jquery/ui/effect-fade.min.js +11 -0
  1054. data/lib/wp/wp-includes/js/jquery/ui/effect-fold.min.js +11 -0
  1055. data/lib/wp/wp-includes/js/jquery/ui/effect-highlight.min.js +11 -0
  1056. data/lib/wp/wp-includes/js/jquery/ui/effect-puff.min.js +11 -0
  1057. data/lib/wp/wp-includes/js/jquery/ui/effect-pulsate.min.js +11 -0
  1058. data/lib/wp/wp-includes/js/jquery/ui/effect-scale.min.js +11 -0
  1059. data/lib/wp/wp-includes/js/jquery/ui/effect-shake.min.js +11 -0
  1060. data/lib/wp/wp-includes/js/jquery/ui/effect-size.min.js +11 -0
  1061. data/lib/wp/wp-includes/js/jquery/ui/effect-slide.min.js +11 -0
  1062. data/lib/wp/wp-includes/js/jquery/ui/effect-transfer.min.js +11 -0
  1063. data/lib/wp/wp-includes/js/jquery/ui/effect.min.js +21 -0
  1064. data/lib/wp/wp-includes/js/jquery/ui/menu.min.js +11 -0
  1065. data/lib/wp/wp-includes/js/jquery/ui/mouse.min.js +11 -0
  1066. data/lib/wp/wp-includes/js/jquery/ui/position.min.js +11 -0
  1067. data/lib/wp/wp-includes/js/jquery/ui/progressbar.min.js +11 -0
  1068. data/lib/wp/wp-includes/js/jquery/ui/resizable.min.js +11 -0
  1069. data/lib/wp/wp-includes/js/jquery/ui/selectable.min.js +11 -0
  1070. data/lib/wp/wp-includes/js/jquery/ui/selectmenu.min.js +11 -0
  1071. data/lib/wp/wp-includes/js/jquery/ui/slider.min.js +11 -0
  1072. data/lib/wp/wp-includes/js/jquery/ui/sortable.min.js +11 -0
  1073. data/lib/wp/wp-includes/js/jquery/ui/spinner.min.js +11 -0
  1074. data/lib/wp/wp-includes/js/jquery/ui/tabs.min.js +11 -0
  1075. data/lib/wp/wp-includes/js/jquery/ui/tooltip.min.js +11 -0
  1076. data/lib/wp/wp-includes/js/jquery/ui/widget.min.js +11 -0
  1077. data/lib/wp/wp-includes/js/json2.js +480 -0
  1078. data/lib/wp/wp-includes/js/json2.min.js +1 -0
  1079. data/lib/wp/wp-includes/js/masonry.min.js +1 -0
  1080. data/lib/wp/wp-includes/js/mce-view.js +829 -0
  1081. data/lib/wp/wp-includes/js/mce-view.min.js +1 -0
  1082. data/lib/wp/wp-includes/js/media-audiovideo.js +831 -0
  1083. data/lib/wp/wp-includes/js/media-audiovideo.min.js +1 -0
  1084. data/lib/wp/wp-includes/js/media-editor.js +1114 -0
  1085. data/lib/wp/wp-includes/js/media-editor.min.js +1 -0
  1086. data/lib/wp/wp-includes/js/media-grid.js +732 -0
  1087. data/lib/wp/wp-includes/js/media-grid.min.js +1 -0
  1088. data/lib/wp/wp-includes/js/media-models.js +1362 -0
  1089. data/lib/wp/wp-includes/js/media-models.min.js +1 -0
  1090. data/lib/wp/wp-includes/js/media-views.js +7484 -0
  1091. data/lib/wp/wp-includes/js/media-views.min.js +3 -0
  1092. data/lib/wp/wp-includes/js/mediaelement/background.png +0 -0
  1093. data/lib/wp/wp-includes/js/mediaelement/bigplay.png +0 -0
  1094. data/lib/wp/wp-includes/js/mediaelement/bigplay.svg +1 -0
  1095. data/lib/wp/wp-includes/js/mediaelement/controls.png +0 -0
  1096. data/lib/wp/wp-includes/js/mediaelement/controls.svg +1 -0
  1097. data/lib/wp/wp-includes/js/mediaelement/flashmediaelement.swf +0 -0
  1098. data/lib/wp/wp-includes/js/mediaelement/loading.gif +0 -0
  1099. data/lib/wp/wp-includes/js/mediaelement/mediaelement-and-player.min.js +181 -0
  1100. data/lib/wp/wp-includes/js/mediaelement/mediaelementplayer.min.css +1 -0
  1101. data/lib/wp/wp-includes/js/mediaelement/silverlightmediaelement.xap +0 -0
  1102. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.css +274 -0
  1103. data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.js +34 -0
  1104. data/lib/wp/wp-includes/js/mediaelement/wp-playlist.js +175 -0
  1105. data/lib/wp/wp-includes/js/plupload/handlers.js +488 -0
  1106. data/lib/wp/wp-includes/js/plupload/handlers.min.js +1 -0
  1107. data/lib/wp/wp-includes/js/plupload/license.txt +339 -0
  1108. data/lib/wp/wp-includes/js/plupload/plupload.flash.swf +0 -0
  1109. data/lib/wp/wp-includes/js/plupload/plupload.full.min.js +28 -0
  1110. data/lib/wp/wp-includes/js/plupload/plupload.silverlight.xap +0 -0
  1111. data/lib/wp/wp-includes/js/plupload/wp-plupload.js +376 -0
  1112. data/lib/wp/wp-includes/js/plupload/wp-plupload.min.js +1 -0
  1113. data/lib/wp/wp-includes/js/quicktags.js +652 -0
  1114. data/lib/wp/wp-includes/js/quicktags.min.js +1 -0
  1115. data/lib/wp/wp-includes/js/shortcode.js +356 -0
  1116. data/lib/wp/wp-includes/js/shortcode.min.js +1 -0
  1117. data/lib/wp/wp-includes/js/swfobject.js +4 -0
  1118. data/lib/wp/wp-includes/js/swfupload/handlers.js +376 -0
  1119. data/lib/wp/wp-includes/js/swfupload/handlers.min.js +1 -0
  1120. data/lib/wp/wp-includes/js/swfupload/license.txt +32 -0
  1121. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.cookies.js +53 -0
  1122. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.queue.js +98 -0
  1123. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.speed.js +342 -0
  1124. data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.swfobject.js +105 -0
  1125. data/lib/wp/wp-includes/js/swfupload/swfupload.js +980 -0
  1126. data/lib/wp/wp-includes/js/swfupload/swfupload.swf +0 -0
  1127. data/lib/wp/wp-includes/js/thickbox/loadingAnimation.gif +0 -0
  1128. data/lib/wp/wp-includes/js/thickbox/macFFBgHack.png +0 -0
  1129. data/lib/wp/wp-includes/js/thickbox/thickbox.css +138 -0
  1130. data/lib/wp/wp-includes/js/thickbox/thickbox.js +314 -0
  1131. data/lib/wp/wp-includes/js/tinymce/langs/wp-langs-en.js +519 -0
  1132. data/lib/wp/wp-includes/js/tinymce/license.txt +504 -0
  1133. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.js +370 -0
  1134. data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.min.js +1 -0
  1135. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.js +112 -0
  1136. data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.min.js +1 -0
  1137. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css +212 -0
  1138. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.js +304 -0
  1139. data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js +1 -0
  1140. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.js +64 -0
  1141. data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.min.js +1 -0
  1142. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.js +136 -0
  1143. data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  1144. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.js +30 -0
  1145. data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.min.js +1 -0
  1146. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.js +450 -0
  1147. data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.min.js +1 -0
  1148. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.js +786 -0
  1149. data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.min.js +1 -0
  1150. data/lib/wp/wp-includes/js/tinymce/plugins/media/moxieplayer.swf +0 -0
  1151. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.js +774 -0
  1152. data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.min.js +1 -0
  1153. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.js +1553 -0
  1154. data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.min.js +1 -0
  1155. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.js +125 -0
  1156. data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js +1 -0
  1157. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.js +272 -0
  1158. data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js +1 -0
  1159. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.js +513 -0
  1160. data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js +1 -0
  1161. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js +207 -0
  1162. data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js +1 -0
  1163. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js +92 -0
  1164. data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js +1 -0
  1165. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +1035 -0
  1166. data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js +1 -0
  1167. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js +78 -0
  1168. data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.min.js +1 -0
  1169. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.js +130 -0
  1170. data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.min.js +1 -0
  1171. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.js +63 -0
  1172. data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.min.js +1 -0
  1173. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.js +694 -0
  1174. data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +1 -0
  1175. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css +1 -0
  1176. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.min.css +1 -0
  1177. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md +1 -0
  1178. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  1179. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +62 -0
  1180. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  1181. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  1182. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  1183. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg +63 -0
  1184. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  1185. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  1186. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
  1187. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/loader.gif +0 -0
  1188. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/object.gif +0 -0
  1189. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/trans.gif +0 -0
  1190. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  1191. data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.min.css +1 -0
  1192. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/audio.png +0 -0
  1193. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png +0 -0
  1194. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png +0 -0
  1195. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/embedded.png +0 -0
  1196. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery-2x.png +0 -0
  1197. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery.png +0 -0
  1198. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more-2x.png +0 -0
  1199. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more.png +0 -0
  1200. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak-2x.png +0 -0
  1201. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak.png +0 -0
  1202. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-audio.png +0 -0
  1203. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-video.png +0 -0
  1204. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/video.png +0 -0
  1205. data/lib/wp/wp-includes/js/tinymce/skins/wordpress/wp-content.css +618 -0
  1206. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.js +617 -0
  1207. data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.min.js +1 -0
  1208. data/lib/wp/wp-includes/js/tinymce/tiny_mce_popup.js +539 -0
  1209. data/lib/wp/wp-includes/js/tinymce/tinymce.min.js +11 -0
  1210. data/lib/wp/wp-includes/js/tinymce/utils/editable_selects.js +70 -0
  1211. data/lib/wp/wp-includes/js/tinymce/utils/form_utils.js +210 -0
  1212. data/lib/wp/wp-includes/js/tinymce/utils/mctabs.js +164 -0
  1213. data/lib/wp/wp-includes/js/tinymce/utils/validate.js +252 -0
  1214. data/lib/wp/wp-includes/js/tinymce/wp-mce-help.php +145 -0
  1215. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.js.gz +0 -0
  1216. data/lib/wp/wp-includes/js/tinymce/wp-tinymce.php +39 -0
  1217. data/lib/wp/wp-includes/js/tw-sack.js +193 -0
  1218. data/lib/wp/wp-includes/js/tw-sack.min.js +1 -0
  1219. data/lib/wp/wp-includes/js/underscore.min.js +1 -0
  1220. data/lib/wp/wp-includes/js/utils.js +197 -0
  1221. data/lib/wp/wp-includes/js/utils.min.js +1 -0
  1222. data/lib/wp/wp-includes/js/wp-ajax-response.js +64 -0
  1223. data/lib/wp/wp-includes/js/wp-ajax-response.min.js +1 -0
  1224. data/lib/wp/wp-includes/js/wp-auth-check.js +112 -0
  1225. data/lib/wp/wp-includes/js/wp-auth-check.min.js +1 -0
  1226. data/lib/wp/wp-includes/js/wp-backbone.js +386 -0
  1227. data/lib/wp/wp-includes/js/wp-backbone.min.js +1 -0
  1228. data/lib/wp/wp-includes/js/wp-list-revisions.js +24 -0
  1229. data/lib/wp/wp-includes/js/wp-list-revisions.min.js +1 -0
  1230. data/lib/wp/wp-includes/js/wp-lists.js +469 -0
  1231. data/lib/wp/wp-includes/js/wp-lists.min.js +1 -0
  1232. data/lib/wp/wp-includes/js/wp-pointer.js +282 -0
  1233. data/lib/wp/wp-includes/js/wp-pointer.min.js +1 -0
  1234. data/lib/wp/wp-includes/js/wp-util.js +106 -0
  1235. data/lib/wp/wp-includes/js/wp-util.min.js +1 -0
  1236. data/lib/wp/wp-includes/js/wpdialog.js +19 -0
  1237. data/lib/wp/wp-includes/js/wpdialog.min.js +1 -0
  1238. data/lib/wp/wp-includes/js/wplink.js +615 -0
  1239. data/lib/wp/wp-includes/js/wplink.min.js +1 -0
  1240. data/lib/wp/wp-includes/js/zxcvbn-async.js +18 -0
  1241. data/lib/wp/wp-includes/js/zxcvbn-async.min.js +1 -0
  1242. data/lib/wp/wp-includes/js/zxcvbn.min.js +47 -0
  1243. data/lib/wp/wp-includes/kses.php +1526 -0
  1244. data/lib/wp/wp-includes/l10n.php +908 -0
  1245. data/lib/wp/wp-includes/link-template.php +3141 -0
  1246. data/lib/wp/wp-includes/load.php +828 -0
  1247. data/lib/wp/wp-includes/locale.php +368 -0
  1248. data/lib/wp/wp-includes/media-template.php +1235 -0
  1249. data/lib/wp/wp-includes/media.php +3329 -0
  1250. data/lib/wp/wp-includes/meta.php +1221 -0
  1251. data/lib/wp/wp-includes/ms-blogs.php +939 -0
  1252. data/lib/wp/wp-includes/ms-default-constants.php +153 -0
  1253. data/lib/wp/wp-includes/ms-default-filters.php +82 -0
  1254. data/lib/wp/wp-includes/ms-deprecated.php +347 -0
  1255. data/lib/wp/wp-includes/ms-files.php +82 -0
  1256. data/lib/wp/wp-includes/ms-functions.php +2476 -0
  1257. data/lib/wp/wp-includes/ms-load.php +458 -0
  1258. data/lib/wp/wp-includes/ms-settings.php +213 -0
  1259. data/lib/wp/wp-includes/nav-menu-template.php +678 -0
  1260. data/lib/wp/wp-includes/nav-menu.php +895 -0
  1261. data/lib/wp/wp-includes/option.php +1440 -0
  1262. data/lib/wp/wp-includes/pluggable-deprecated.php +192 -0
  1263. data/lib/wp/wp-includes/pluggable.php +2283 -0
  1264. data/lib/wp/wp-includes/plugin.php +920 -0
  1265. data/lib/wp/wp-includes/pomo/entry.php +78 -0
  1266. data/lib/wp/wp-includes/pomo/mo.php +262 -0
  1267. data/lib/wp/wp-includes/pomo/po.php +384 -0
  1268. data/lib/wp/wp-includes/pomo/streams.php +209 -0
  1269. data/lib/wp/wp-includes/pomo/translations.php +275 -0
  1270. data/lib/wp/wp-includes/post-formats.php +243 -0
  1271. data/lib/wp/wp-includes/post-template.php +1766 -0
  1272. data/lib/wp/wp-includes/post-thumbnail-template.php +142 -0
  1273. data/lib/wp/wp-includes/post.php +5842 -0
  1274. data/lib/wp/wp-includes/query.php +4666 -0
  1275. data/lib/wp/wp-includes/registration-functions.php +7 -0
  1276. data/lib/wp/wp-includes/registration.php +7 -0
  1277. data/lib/wp/wp-includes/revision.php +657 -0
  1278. data/lib/wp/wp-includes/rewrite.php +2180 -0
  1279. data/lib/wp/wp-includes/rss-functions.php +9 -0
  1280. data/lib/wp/wp-includes/rss.php +936 -0
  1281. data/lib/wp/wp-includes/script-loader.php +1045 -0
  1282. data/lib/wp/wp-includes/session.php +430 -0
  1283. data/lib/wp/wp-includes/shortcodes.php +410 -0
  1284. data/lib/wp/wp-includes/taxonomy.php +4006 -0
  1285. data/lib/wp/wp-includes/template-loader.php +76 -0
  1286. data/lib/wp/wp-includes/template.php +505 -0
  1287. data/lib/wp/wp-includes/theme-compat/comments-popup.php +128 -0
  1288. data/lib/wp/wp-includes/theme-compat/comments.php +101 -0
  1289. data/lib/wp/wp-includes/theme-compat/footer.php +30 -0
  1290. data/lib/wp/wp-includes/theme-compat/header.php +49 -0
  1291. data/lib/wp/wp-includes/theme-compat/sidebar.php +83 -0
  1292. data/lib/wp/wp-includes/theme.php +2014 -0
  1293. data/lib/wp/wp-includes/update.php +674 -0
  1294. data/lib/wp/wp-includes/user.php +2292 -0
  1295. data/lib/wp/wp-includes/vars.php +144 -0
  1296. data/lib/wp/wp-includes/version.php +35 -0
  1297. data/lib/wp/wp-includes/widgets.php +1514 -0
  1298. data/lib/wp/wp-includes/wlwmanifest.xml +43 -0
  1299. data/lib/wp/wp-includes/wp-db.php +2190 -0
  1300. data/lib/wp/wp-includes/wp-diff.php +523 -0
  1301. data/lib/wp/wp-links-opml.php +80 -0
  1302. data/lib/wp/wp-load.php +73 -0
  1303. data/lib/wp/wp-login.php +952 -0
  1304. data/lib/wp/wp-mail.php +260 -0
  1305. data/lib/wp/wp-settings.php +374 -0
  1306. data/lib/wp/wp-signup.php +749 -0
  1307. data/lib/wp/wp-trackback.php +127 -0
  1308. data/lib/wp/xmlrpc.php +101 -0
  1309. data/stump-cli.gemspec +26 -0
  1310. metadata +1332 -4
@@ -0,0 +1,2982 @@
1
+ <?php
2
+ /**
3
+ * General template tags that can go anywhere in a template.
4
+ *
5
+ * @package WordPress
6
+ * @subpackage Template
7
+ */
8
+
9
+ /**
10
+ * Load header template.
11
+ *
12
+ * Includes the header template for a theme or if a name is specified then a
13
+ * specialised header will be included.
14
+ *
15
+ * For the parameter, if the file is called "header-special.php" then specify
16
+ * "special".
17
+ *
18
+ * @since 1.5.0
19
+ *
20
+ * @uses locate_template()
21
+ *
22
+ * @param string $name The name of the specialised header.
23
+ */
24
+ function get_header( $name = null ) {
25
+ /**
26
+ * Fires before the header template file is loaded.
27
+ *
28
+ * The hook allows a specific header template file to be used in place of the
29
+ * default header template file. If your file is called header-new.php,
30
+ * you would specify the filename in the hook as get_header( 'new' ).
31
+ *
32
+ * @since 2.1.0
33
+ * @since 2.8.0 $name parameter added.
34
+ *
35
+ * @param string $name Name of the specific header file to use.
36
+ */
37
+ do_action( 'get_header', $name );
38
+
39
+ $templates = array();
40
+ $name = (string) $name;
41
+ if ( '' !== $name )
42
+ $templates[] = "header-{$name}.php";
43
+
44
+ $templates[] = 'header.php';
45
+
46
+ // Backward compat code will be removed in a future release
47
+ if ('' == locate_template($templates, true))
48
+ load_template( ABSPATH . WPINC . '/theme-compat/header.php');
49
+ }
50
+
51
+ /**
52
+ * Load footer template.
53
+ *
54
+ * Includes the footer template for a theme or if a name is specified then a
55
+ * specialised footer will be included.
56
+ *
57
+ * For the parameter, if the file is called "footer-special.php" then specify
58
+ * "special".
59
+ *
60
+ * @since 1.5.0
61
+ *
62
+ * @uses locate_template()
63
+ *
64
+ * @param string $name The name of the specialised footer.
65
+ */
66
+ function get_footer( $name = null ) {
67
+ /**
68
+ * Fires before the footer template file is loaded.
69
+ *
70
+ * The hook allows a specific footer template file to be used in place of the
71
+ * default footer template file. If your file is called footer-new.php,
72
+ * you would specify the filename in the hook as get_footer( 'new' ).
73
+ *
74
+ * @since 2.1.0
75
+ * @since 2.8.0 $name parameter added.
76
+ *
77
+ * @param string $name Name of the specific footer file to use.
78
+ */
79
+ do_action( 'get_footer', $name );
80
+
81
+ $templates = array();
82
+ $name = (string) $name;
83
+ if ( '' !== $name )
84
+ $templates[] = "footer-{$name}.php";
85
+
86
+ $templates[] = 'footer.php';
87
+
88
+ // Backward compat code will be removed in a future release
89
+ if ('' == locate_template($templates, true))
90
+ load_template( ABSPATH . WPINC . '/theme-compat/footer.php');
91
+ }
92
+
93
+ /**
94
+ * Load sidebar template.
95
+ *
96
+ * Includes the sidebar template for a theme or if a name is specified then a
97
+ * specialised sidebar will be included.
98
+ *
99
+ * For the parameter, if the file is called "sidebar-special.php" then specify
100
+ * "special".
101
+ *
102
+ * @since 1.5.0
103
+ *
104
+ * @uses locate_template()
105
+ *
106
+ * @param string $name The name of the specialised sidebar.
107
+ */
108
+ function get_sidebar( $name = null ) {
109
+ /**
110
+ * Fires before the sidebar template file is loaded.
111
+ *
112
+ * The hook allows a specific sidebar template file to be used in place of the
113
+ * default sidebar template file. If your file is called sidebar-new.php,
114
+ * you would specify the filename in the hook as get_sidebar( 'new' ).
115
+ *
116
+ * @since 2.2.0
117
+ * @since 2.8.0 $name parameter added.
118
+ *
119
+ * @param string $name Name of the specific sidebar file to use.
120
+ */
121
+ do_action( 'get_sidebar', $name );
122
+
123
+ $templates = array();
124
+ $name = (string) $name;
125
+ if ( '' !== $name )
126
+ $templates[] = "sidebar-{$name}.php";
127
+
128
+ $templates[] = 'sidebar.php';
129
+
130
+ // Backward compat code will be removed in a future release
131
+ if ('' == locate_template($templates, true))
132
+ load_template( ABSPATH . WPINC . '/theme-compat/sidebar.php');
133
+ }
134
+
135
+ /**
136
+ * Load a template part into a template
137
+ *
138
+ * Makes it easy for a theme to reuse sections of code in a easy to overload way
139
+ * for child themes.
140
+ *
141
+ * Includes the named template part for a theme or if a name is specified then a
142
+ * specialised part will be included. If the theme contains no {slug}.php file
143
+ * then no template will be included.
144
+ *
145
+ * The template is included using require, not require_once, so you may include the
146
+ * same template part multiple times.
147
+ *
148
+ * For the $name parameter, if the file is called "{slug}-special.php" then specify
149
+ * "special".
150
+ *
151
+ * @since 3.0.0
152
+ *
153
+ * @uses locate_template()
154
+ *
155
+ * @param string $slug The slug name for the generic template.
156
+ * @param string $name The name of the specialised template.
157
+ */
158
+ function get_template_part( $slug, $name = null ) {
159
+ /**
160
+ * Fires before the specified template part file is loaded.
161
+ *
162
+ * The dynamic portion of the hook name, $slug, refers to the slug name
163
+ * for the generic template part.
164
+ *
165
+ * @since 3.0.0
166
+ *
167
+ * @param string $slug The slug name for the generic template.
168
+ * @param string $name The name of the specialized template.
169
+ */
170
+ do_action( "get_template_part_{$slug}", $slug, $name );
171
+
172
+ $templates = array();
173
+ $name = (string) $name;
174
+ if ( '' !== $name )
175
+ $templates[] = "{$slug}-{$name}.php";
176
+
177
+ $templates[] = "{$slug}.php";
178
+
179
+ locate_template($templates, true, false);
180
+ }
181
+
182
+ /**
183
+ * Display search form.
184
+ *
185
+ * Will first attempt to locate the searchform.php file in either the child or
186
+ * the parent, then load it. If it doesn't exist, then the default search form
187
+ * will be displayed. The default search form is HTML, which will be displayed.
188
+ * There is a filter applied to the search form HTML in order to edit or replace
189
+ * it. The filter is 'get_search_form'.
190
+ *
191
+ * This function is primarily used by themes which want to hardcode the search
192
+ * form into the sidebar and also by the search widget in WordPress.
193
+ *
194
+ * There is also an action that is called whenever the function is run called,
195
+ * 'pre_get_search_form'. This can be useful for outputting JavaScript that the
196
+ * search relies on or various formatting that applies to the beginning of the
197
+ * search. To give a few examples of what it can be used for.
198
+ *
199
+ * @since 2.7.0
200
+ *
201
+ * @param boolean $echo Default to echo and not return the form.
202
+ * @return string|null String when retrieving, null when displaying or if searchform.php exists.
203
+ */
204
+ function get_search_form( $echo = true ) {
205
+ /**
206
+ * Fires before the search form is retrieved, at the start of get_search_form().
207
+ *
208
+ * @since 2.7.0 as 'get_search_form' action.
209
+ * @since 3.6.0
210
+ *
211
+ * @link https://core.trac.wordpress.org/ticket/19321
212
+ */
213
+ do_action( 'pre_get_search_form' );
214
+
215
+ $format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
216
+
217
+ /**
218
+ * Filter the HTML format of the search form.
219
+ *
220
+ * @since 3.6.0
221
+ *
222
+ * @param string $format The type of markup to use in the search form.
223
+ * Accepts 'html5', 'xhtml'.
224
+ */
225
+ $format = apply_filters( 'search_form_format', $format );
226
+
227
+ $search_form_template = locate_template( 'searchform.php' );
228
+ if ( '' != $search_form_template ) {
229
+ ob_start();
230
+ require( $search_form_template );
231
+ $form = ob_get_clean();
232
+ } else {
233
+ if ( 'html5' == $format ) {
234
+ $form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
235
+ <label>
236
+ <span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
237
+ <input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" title="' . esc_attr_x( 'Search for:', 'label' ) . '" />
238
+ </label>
239
+ <input type="submit" class="search-submit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
240
+ </form>';
241
+ } else {
242
+ $form = '<form role="search" method="get" id="searchform" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
243
+ <div>
244
+ <label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
245
+ <input type="text" value="' . get_search_query() . '" name="s" id="s" />
246
+ <input type="submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
247
+ </div>
248
+ </form>';
249
+ }
250
+ }
251
+
252
+ /**
253
+ * Filter the HTML output of the search form.
254
+ *
255
+ * @since 2.7.0
256
+ *
257
+ * @param string $form The search form HTML output.
258
+ */
259
+ $result = apply_filters( 'get_search_form', $form );
260
+
261
+ if ( null === $result )
262
+ $result = $form;
263
+
264
+ if ( $echo )
265
+ echo $result;
266
+ else
267
+ return $result;
268
+ }
269
+
270
+ /**
271
+ * Display the Log In/Out link.
272
+ *
273
+ * Displays a link, which allows users to navigate to the Log In page to log in
274
+ * or log out depending on whether they are currently logged in.
275
+ *
276
+ * @since 1.5.0
277
+ *
278
+ * @param string $redirect Optional path to redirect to on login/logout.
279
+ * @param boolean $echo Default to echo and not return the link.
280
+ * @return string|null String when retrieving, null when displaying.
281
+ */
282
+ function wp_loginout($redirect = '', $echo = true) {
283
+ if ( ! is_user_logged_in() )
284
+ $link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>';
285
+ else
286
+ $link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
287
+
288
+ if ( $echo ) {
289
+ /**
290
+ * Filter the HTML output for the Log In/Log Out link.
291
+ *
292
+ * @since 1.5.0
293
+ *
294
+ * @param string $link The HTML link content.
295
+ */
296
+ echo apply_filters( 'loginout', $link );
297
+ } else {
298
+ /** This filter is documented in wp-includes/general-template.php */
299
+ return apply_filters( 'loginout', $link );
300
+ }
301
+ }
302
+
303
+ /**
304
+ * Returns the Log Out URL.
305
+ *
306
+ * Returns the URL that allows the user to log out of the site.
307
+ *
308
+ * @since 2.7.0
309
+ *
310
+ * @uses wp_nonce_url() To protect against CSRF.
311
+ * @uses site_url() To generate the log out URL.
312
+ *
313
+ * @param string $redirect Path to redirect to on logout.
314
+ * @return string A log out URL.
315
+ */
316
+ function wp_logout_url($redirect = '') {
317
+ $args = array( 'action' => 'logout' );
318
+ if ( !empty($redirect) ) {
319
+ $args['redirect_to'] = urlencode( $redirect );
320
+ }
321
+
322
+ $logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
323
+ $logout_url = wp_nonce_url( $logout_url, 'log-out' );
324
+
325
+ /**
326
+ * Filter the logout URL.
327
+ *
328
+ * @since 2.8.0
329
+ *
330
+ * @param string $logout_url The Log Out URL.
331
+ * @param string $redirect Path to redirect to on logout.
332
+ */
333
+ return apply_filters( 'logout_url', $logout_url, $redirect );
334
+ }
335
+
336
+ /**
337
+ * Returns the Log In URL.
338
+ *
339
+ * Returns the URL that allows the user to log in to the site.
340
+ *
341
+ * @since 2.7.0
342
+ *
343
+ * @uses site_url() To generate the log in URL.
344
+ *
345
+ * @param string $redirect Path to redirect to on login.
346
+ * @param bool $force_reauth Whether to force reauthorization, even if a cookie is present. Default is false.
347
+ * @return string A log in URL.
348
+ */
349
+ function wp_login_url($redirect = '', $force_reauth = false) {
350
+ $login_url = site_url('wp-login.php', 'login');
351
+
352
+ if ( !empty($redirect) )
353
+ $login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url);
354
+
355
+ if ( $force_reauth )
356
+ $login_url = add_query_arg('reauth', '1', $login_url);
357
+
358
+ /**
359
+ * Filter the login URL.
360
+ *
361
+ * @since 2.8.0
362
+ *
363
+ * @param string $login_url The login URL.
364
+ * @param string $redirect The path to redirect to on login, if supplied.
365
+ */
366
+ return apply_filters( 'login_url', $login_url, $redirect );
367
+ }
368
+
369
+ /**
370
+ * Returns the user registration URL.
371
+ *
372
+ * Returns the URL that allows the user to register on the site.
373
+ *
374
+ * @since 3.6.0
375
+ *
376
+ * @uses site_url() To generate the registration URL.
377
+ *
378
+ * @return string User registration URL.
379
+ */
380
+ function wp_registration_url() {
381
+ /**
382
+ * Filter the user registration URL.
383
+ *
384
+ * @since 3.6.0
385
+ *
386
+ * @param string $register The user registration URL.
387
+ */
388
+ return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) );
389
+ }
390
+
391
+ /**
392
+ * Provides a simple login form for use anywhere within WordPress. By default, it echoes
393
+ * the HTML immediately. Pass array('echo'=>false) to return the string instead.
394
+ *
395
+ * @since 3.0.0
396
+ *
397
+ * @param array $args Configuration options to modify the form output.
398
+ * @return string|null String when retrieving, null when displaying.
399
+ */
400
+ function wp_login_form( $args = array() ) {
401
+ $defaults = array(
402
+ 'echo' => true,
403
+ 'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], // Default redirect is back to the current page
404
+ 'form_id' => 'loginform',
405
+ 'label_username' => __( 'Username' ),
406
+ 'label_password' => __( 'Password' ),
407
+ 'label_remember' => __( 'Remember Me' ),
408
+ 'label_log_in' => __( 'Log In' ),
409
+ 'id_username' => 'user_login',
410
+ 'id_password' => 'user_pass',
411
+ 'id_remember' => 'rememberme',
412
+ 'id_submit' => 'wp-submit',
413
+ 'remember' => true,
414
+ 'value_username' => '',
415
+ 'value_remember' => false, // Set this to true to default the "Remember me" checkbox to checked
416
+ );
417
+
418
+ /**
419
+ * Filter the default login form output arguments.
420
+ *
421
+ * @since 3.0.0
422
+ *
423
+ * @see wp_login_form()
424
+ *
425
+ * @param array $defaults An array of default login form arguments.
426
+ */
427
+ $args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
428
+
429
+ /**
430
+ * Filter content to display at the top of the login form.
431
+ *
432
+ * The filter evaluates just following the opening form tag element.
433
+ *
434
+ * @since 3.0.0
435
+ *
436
+ * @param string $content Content to display. Default empty.
437
+ * @param array $args Array of login form arguments.
438
+ */
439
+ $login_form_top = apply_filters( 'login_form_top', '', $args );
440
+
441
+ /**
442
+ * Filter content to display in the middle of the login form.
443
+ *
444
+ * The filter evaluates just following the location where the 'login-password'
445
+ * field is displayed.
446
+ *
447
+ * @since 3.0.0
448
+ *
449
+ * @param string $content Content to display. Default empty.
450
+ * @param array $args Array of login form arguments.
451
+ */
452
+ $login_form_middle = apply_filters( 'login_form_middle', '', $args );
453
+
454
+ /**
455
+ * Filter content to display at the bottom of the login form.
456
+ *
457
+ * The filter evaluates just preceding the closing form tag element.
458
+ *
459
+ * @since 3.0.0
460
+ *
461
+ * @param string $content Content to display. Default empty.
462
+ * @param array $args Array of login form arguments.
463
+ */
464
+ $login_form_bottom = apply_filters( 'login_form_bottom', '', $args );
465
+
466
+ $form = '
467
+ <form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( site_url( 'wp-login.php', 'login_post' ) ) . '" method="post">
468
+ ' . $login_form_top . '
469
+ <p class="login-username">
470
+ <label for="' . esc_attr( $args['id_username'] ) . '">' . esc_html( $args['label_username'] ) . '</label>
471
+ <input type="text" name="log" id="' . esc_attr( $args['id_username'] ) . '" class="input" value="' . esc_attr( $args['value_username'] ) . '" size="20" />
472
+ </p>
473
+ <p class="login-password">
474
+ <label for="' . esc_attr( $args['id_password'] ) . '">' . esc_html( $args['label_password'] ) . '</label>
475
+ <input type="password" name="pwd" id="' . esc_attr( $args['id_password'] ) . '" class="input" value="" size="20" />
476
+ </p>
477
+ ' . $login_form_middle . '
478
+ ' . ( $args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $args['id_remember'] ) . '" value="forever"' . ( $args['value_remember'] ? ' checked="checked"' : '' ) . ' /> ' . esc_html( $args['label_remember'] ) . '</label></p>' : '' ) . '
479
+ <p class="login-submit">
480
+ <input type="submit" name="wp-submit" id="' . esc_attr( $args['id_submit'] ) . '" class="button-primary" value="' . esc_attr( $args['label_log_in'] ) . '" />
481
+ <input type="hidden" name="redirect_to" value="' . esc_url( $args['redirect'] ) . '" />
482
+ </p>
483
+ ' . $login_form_bottom . '
484
+ </form>';
485
+
486
+ if ( $args['echo'] )
487
+ echo $form;
488
+ else
489
+ return $form;
490
+ }
491
+
492
+ /**
493
+ * Returns the Lost Password URL.
494
+ *
495
+ * Returns the URL that allows the user to retrieve the lost password
496
+ *
497
+ * @since 2.8.0
498
+ *
499
+ * @uses site_url() To generate the lost password URL
500
+ *
501
+ * @param string $redirect Path to redirect to on login.
502
+ * @return string Lost password URL.
503
+ */
504
+ function wp_lostpassword_url( $redirect = '' ) {
505
+ $args = array( 'action' => 'lostpassword' );
506
+ if ( !empty($redirect) ) {
507
+ $args['redirect_to'] = $redirect;
508
+ }
509
+
510
+ $lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') );
511
+
512
+ /**
513
+ * Filter the Lost Password URL.
514
+ *
515
+ * @since 2.8.0
516
+ *
517
+ * @param string $lostpassword_url The lost password page URL.
518
+ * @param string $redirect The path to redirect to on login.
519
+ */
520
+ return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
521
+ }
522
+
523
+ /**
524
+ * Display the Registration or Admin link.
525
+ *
526
+ * Display a link which allows the user to navigate to the registration page if
527
+ * not logged in and registration is enabled or to the dashboard if logged in.
528
+ *
529
+ * @since 1.5.0
530
+ *
531
+ * @param string $before Text to output before the link (defaults to <li>).
532
+ * @param string $after Text to output after the link (defaults to </li>).
533
+ * @param boolean $echo Default to echo and not return the link.
534
+ * @return string|null String when retrieving, null when displaying.
535
+ */
536
+ function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {
537
+
538
+ if ( ! is_user_logged_in() ) {
539
+ if ( get_option('users_can_register') )
540
+ $link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __('Register') . '</a>' . $after;
541
+ else
542
+ $link = '';
543
+ } else {
544
+ $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
545
+ }
546
+
547
+ /**
548
+ * Filter the HTML link to the Registration or Admin page.
549
+ *
550
+ * Users are sent to the admin page if logged-in, or the registration page
551
+ * if enabled and logged-out.
552
+ *
553
+ * @since 1.5.0
554
+ *
555
+ * @param string $link The HTML code for the link to the Registration or Admin page.
556
+ */
557
+ $link = apply_filters( 'register', $link );
558
+
559
+ if ( $echo ) {
560
+ echo $link;
561
+ } else {
562
+ return $link;
563
+ }
564
+ }
565
+
566
+ /**
567
+ * Theme container function for the 'wp_meta' action.
568
+ *
569
+ * The 'wp_meta' action can have several purposes, depending on how you use it,
570
+ * but one purpose might have been to allow for theme switching.
571
+ *
572
+ * @since 1.5.0
573
+ *
574
+ * @link https://core.trac.wordpress.org/ticket/1458 Explanation of 'wp_meta' action.
575
+ */
576
+ function wp_meta() {
577
+ /**
578
+ * Fires before displaying echoed content in the sidebar.
579
+ *
580
+ * @since 1.5.0
581
+ */
582
+ do_action( 'wp_meta' );
583
+ }
584
+
585
+ /**
586
+ * Display information about the blog.
587
+ *
588
+ * @see get_bloginfo() For possible values for the parameter.
589
+ * @since 0.71
590
+ *
591
+ * @param string $show What to display.
592
+ */
593
+ function bloginfo( $show='' ) {
594
+ echo get_bloginfo( $show, 'display' );
595
+ }
596
+
597
+ /**
598
+ * Retrieve information about the blog.
599
+ *
600
+ * Some show parameter values are deprecated and will be removed in future
601
+ * versions. These options will trigger the _deprecated_argument() function.
602
+ * The deprecated blog info options are listed in the function contents.
603
+ *
604
+ * The possible values for the 'show' parameter are listed below.
605
+ * <ol>
606
+ * <li><strong>url</strong> - Blog URI to homepage.</li>
607
+ * <li><strong>wpurl</strong> - Blog URI path to WordPress.</li>
608
+ * <li><strong>description</strong> - Secondary title</li>
609
+ * </ol>
610
+ *
611
+ * The feed URL options can be retrieved from 'rdf_url' (RSS 0.91),
612
+ * 'rss_url' (RSS 1.0), 'rss2_url' (RSS 2.0), or 'atom_url' (Atom feed). The
613
+ * comment feeds can be retrieved from the 'comments_atom_url' (Atom comment
614
+ * feed) or 'comments_rss2_url' (RSS 2.0 comment feed).
615
+ *
616
+ * @since 0.71
617
+ *
618
+ * @param string $show Blog info to retrieve.
619
+ * @param string $filter How to filter what is retrieved.
620
+ * @return string Mostly string values, might be empty.
621
+ */
622
+ function get_bloginfo( $show = '', $filter = 'raw' ) {
623
+
624
+ switch( $show ) {
625
+ case 'home' : // DEPRECATED
626
+ case 'siteurl' : // DEPRECATED
627
+ _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>%s</code> option is deprecated for the family of <code>bloginfo()</code> functions.' ), $show ) . ' ' . sprintf( __( 'Use the <code>%s</code> option instead.' ), 'url' ) );
628
+ case 'url' :
629
+ $output = home_url();
630
+ break;
631
+ case 'wpurl' :
632
+ $output = site_url();
633
+ break;
634
+ case 'description':
635
+ $output = get_option('blogdescription');
636
+ break;
637
+ case 'rdf_url':
638
+ $output = get_feed_link('rdf');
639
+ break;
640
+ case 'rss_url':
641
+ $output = get_feed_link('rss');
642
+ break;
643
+ case 'rss2_url':
644
+ $output = get_feed_link('rss2');
645
+ break;
646
+ case 'atom_url':
647
+ $output = get_feed_link('atom');
648
+ break;
649
+ case 'comments_atom_url':
650
+ $output = get_feed_link('comments_atom');
651
+ break;
652
+ case 'comments_rss2_url':
653
+ $output = get_feed_link('comments_rss2');
654
+ break;
655
+ case 'pingback_url':
656
+ $output = site_url( 'xmlrpc.php' );
657
+ break;
658
+ case 'stylesheet_url':
659
+ $output = get_stylesheet_uri();
660
+ break;
661
+ case 'stylesheet_directory':
662
+ $output = get_stylesheet_directory_uri();
663
+ break;
664
+ case 'template_directory':
665
+ case 'template_url':
666
+ $output = get_template_directory_uri();
667
+ break;
668
+ case 'admin_email':
669
+ $output = get_option('admin_email');
670
+ break;
671
+ case 'charset':
672
+ $output = get_option('blog_charset');
673
+ if ('' == $output) $output = 'UTF-8';
674
+ break;
675
+ case 'html_type' :
676
+ $output = get_option('html_type');
677
+ break;
678
+ case 'version':
679
+ global $wp_version;
680
+ $output = $wp_version;
681
+ break;
682
+ case 'language':
683
+ $output = get_locale();
684
+ $output = str_replace('_', '-', $output);
685
+ break;
686
+ case 'text_direction':
687
+ //_deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>%s</code> option is deprecated for the family of <code>bloginfo()</code> functions.' ), $show ) . ' ' . sprintf( __( 'Use the <code>%s</code> function instead.' ), 'is_rtl()' ) );
688
+ if ( function_exists( 'is_rtl' ) ) {
689
+ $output = is_rtl() ? 'rtl' : 'ltr';
690
+ } else {
691
+ $output = 'ltr';
692
+ }
693
+ break;
694
+ case 'name':
695
+ default:
696
+ $output = get_option('blogname');
697
+ break;
698
+ }
699
+
700
+ $url = true;
701
+ if (strpos($show, 'url') === false &&
702
+ strpos($show, 'directory') === false &&
703
+ strpos($show, 'home') === false)
704
+ $url = false;
705
+
706
+ if ( 'display' == $filter ) {
707
+ if ( $url ) {
708
+ /**
709
+ * Filter the URL returned by get_bloginfo().
710
+ *
711
+ * @since 2.0.5
712
+ *
713
+ * @param mixed $output The URL returned by bloginfo().
714
+ * @param mixed $show Type of information requested.
715
+ */
716
+ $output = apply_filters( 'bloginfo_url', $output, $show );
717
+ } else {
718
+ /**
719
+ * Filter the site information returned by get_bloginfo().
720
+ *
721
+ * @since 0.71
722
+ *
723
+ * @param mixed $output The requested non-URL site information.
724
+ * @param mixed $show Type of information requested.
725
+ */
726
+ $output = apply_filters( 'bloginfo', $output, $show );
727
+ }
728
+ }
729
+
730
+ return $output;
731
+ }
732
+
733
+ /**
734
+ * Display or retrieve page title for all areas of blog.
735
+ *
736
+ * By default, the page title will display the separator before the page title,
737
+ * so that the blog title will be before the page title. This is not good for
738
+ * title display, since the blog title shows up on most tabs and not what is
739
+ * important, which is the page that the user is looking at.
740
+ *
741
+ * There are also SEO benefits to having the blog title after or to the 'right'
742
+ * or the page title. However, it is mostly common sense to have the blog title
743
+ * to the right with most browsers supporting tabs. You can achieve this by
744
+ * using the seplocation parameter and setting the value to 'right'. This change
745
+ * was introduced around 2.5.0, in case backwards compatibility of themes is
746
+ * important.
747
+ *
748
+ * @since 1.0.0
749
+ *
750
+ * @param string $sep Optional, default is '&raquo;'. How to separate the various items within the page title.
751
+ * @param bool $display Optional, default is true. Whether to display or retrieve title.
752
+ * @param string $seplocation Optional. Direction to display title, 'right'.
753
+ * @return string|null String on retrieve, null when displaying.
754
+ */
755
+ function wp_title($sep = '&raquo;', $display = true, $seplocation = '') {
756
+ global $wp_locale;
757
+
758
+ $m = get_query_var('m');
759
+ $year = get_query_var('year');
760
+ $monthnum = get_query_var('monthnum');
761
+ $day = get_query_var('day');
762
+ $search = get_query_var('s');
763
+ $title = '';
764
+
765
+ $t_sep = '%WP_TITILE_SEP%'; // Temporary separator, for accurate flipping, if necessary
766
+
767
+ // If there is a post
768
+ if ( is_single() || ( is_home() && !is_front_page() ) || ( is_page() && !is_front_page() ) ) {
769
+ $title = single_post_title( '', false );
770
+ }
771
+
772
+ // If there's a post type archive
773
+ if ( is_post_type_archive() ) {
774
+ $post_type = get_query_var( 'post_type' );
775
+ if ( is_array( $post_type ) )
776
+ $post_type = reset( $post_type );
777
+ $post_type_object = get_post_type_object( $post_type );
778
+ if ( ! $post_type_object->has_archive )
779
+ $title = post_type_archive_title( '', false );
780
+ }
781
+
782
+ // If there's a category or tag
783
+ if ( is_category() || is_tag() ) {
784
+ $title = single_term_title( '', false );
785
+ }
786
+
787
+ // If there's a taxonomy
788
+ if ( is_tax() ) {
789
+ $term = get_queried_object();
790
+ if ( $term ) {
791
+ $tax = get_taxonomy( $term->taxonomy );
792
+ $title = single_term_title( $tax->labels->name . $t_sep, false );
793
+ }
794
+ }
795
+
796
+ // If there's an author
797
+ if ( is_author() && ! is_post_type_archive() ) {
798
+ $author = get_queried_object();
799
+ if ( $author )
800
+ $title = $author->display_name;
801
+ }
802
+
803
+ // Post type archives with has_archive should override terms.
804
+ if ( is_post_type_archive() && $post_type_object->has_archive )
805
+ $title = post_type_archive_title( '', false );
806
+
807
+ // If there's a month
808
+ if ( is_archive() && !empty($m) ) {
809
+ $my_year = substr($m, 0, 4);
810
+ $my_month = $wp_locale->get_month(substr($m, 4, 2));
811
+ $my_day = intval(substr($m, 6, 2));
812
+ $title = $my_year . ( $my_month ? $t_sep . $my_month : '' ) . ( $my_day ? $t_sep . $my_day : '' );
813
+ }
814
+
815
+ // If there's a year
816
+ if ( is_archive() && !empty($year) ) {
817
+ $title = $year;
818
+ if ( !empty($monthnum) )
819
+ $title .= $t_sep . $wp_locale->get_month($monthnum);
820
+ if ( !empty($day) )
821
+ $title .= $t_sep . zeroise($day, 2);
822
+ }
823
+
824
+ // If it's a search
825
+ if ( is_search() ) {
826
+ /* translators: 1: separator, 2: search phrase */
827
+ $title = sprintf(__('Search Results %1$s %2$s'), $t_sep, strip_tags($search));
828
+ }
829
+
830
+ // If it's a 404 page
831
+ if ( is_404() ) {
832
+ $title = __('Page not found');
833
+ }
834
+
835
+ $prefix = '';
836
+ if ( !empty($title) )
837
+ $prefix = " $sep ";
838
+
839
+ /**
840
+ * Filter the parts of the page title.
841
+ *
842
+ * @since 4.0.0
843
+ *
844
+ * @param array $title_array Parts of the page title.
845
+ */
846
+ $title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ) );
847
+
848
+ // Determines position of the separator and direction of the breadcrumb
849
+ if ( 'right' == $seplocation ) { // sep on right, so reverse the order
850
+ $title_array = array_reverse( $title_array );
851
+ $title = implode( " $sep ", $title_array ) . $prefix;
852
+ } else {
853
+ $title = $prefix . implode( " $sep ", $title_array );
854
+ }
855
+
856
+ /**
857
+ * Filter the text of the page title.
858
+ *
859
+ * @since 2.0.0
860
+ *
861
+ * @param string $title Page title.
862
+ * @param string $sep Title separator.
863
+ * @param string $seplocation Location of the separator (left or right).
864
+ */
865
+ $title = apply_filters( 'wp_title', $title, $sep, $seplocation );
866
+
867
+ // Send it out
868
+ if ( $display )
869
+ echo $title;
870
+ else
871
+ return $title;
872
+
873
+ }
874
+
875
+ /**
876
+ * Display or retrieve page title for post.
877
+ *
878
+ * This is optimized for single.php template file for displaying the post title.
879
+ *
880
+ * It does not support placing the separator after the title, but by leaving the
881
+ * prefix parameter empty, you can set the title separator manually. The prefix
882
+ * does not automatically place a space between the prefix, so if there should
883
+ * be a space, the parameter value will need to have it at the end.
884
+ *
885
+ * @since 0.71
886
+ *
887
+ * @param string $prefix Optional. What to display before the title.
888
+ * @param bool $display Optional, default is true. Whether to display or retrieve title.
889
+ * @return string|null Title when retrieving, null when displaying or failure.
890
+ */
891
+ function single_post_title($prefix = '', $display = true) {
892
+ $_post = get_queried_object();
893
+
894
+ if ( !isset($_post->post_title) )
895
+ return;
896
+
897
+ /**
898
+ * Filter the page title for a single post.
899
+ *
900
+ * @since 0.71
901
+ *
902
+ * @param string $_post_title The single post page title.
903
+ * @param object $_post The current queried object as returned by get_queried_object().
904
+ */
905
+ $title = apply_filters( 'single_post_title', $_post->post_title, $_post );
906
+ if ( $display )
907
+ echo $prefix . $title;
908
+ else
909
+ return $prefix . $title;
910
+ }
911
+
912
+ /**
913
+ * Display or retrieve title for a post type archive.
914
+ *
915
+ * This is optimized for archive.php and archive-{$post_type}.php template files
916
+ * for displaying the title of the post type.
917
+ *
918
+ * @since 3.1.0
919
+ *
920
+ * @param string $prefix Optional. What to display before the title.
921
+ * @param bool $display Optional, default is true. Whether to display or retrieve title.
922
+ * @return string|null Title when retrieving, null when displaying or failure.
923
+ */
924
+ function post_type_archive_title( $prefix = '', $display = true ) {
925
+ if ( ! is_post_type_archive() )
926
+ return;
927
+
928
+ $post_type = get_query_var( 'post_type' );
929
+ if ( is_array( $post_type ) )
930
+ $post_type = reset( $post_type );
931
+
932
+ $post_type_obj = get_post_type_object( $post_type );
933
+
934
+ /**
935
+ * Filter the post type archive title.
936
+ *
937
+ * @since 3.1.0
938
+ *
939
+ * @param string $post_type_name Post type 'name' label.
940
+ * @param string $post_type Post type.
941
+ */
942
+ $title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type );
943
+
944
+ if ( $display )
945
+ echo $prefix . $title;
946
+ else
947
+ return $prefix . $title;
948
+ }
949
+
950
+ /**
951
+ * Display or retrieve page title for category archive.
952
+ *
953
+ * This is useful for category template file or files, because it is optimized
954
+ * for category page title and with less overhead than {@link wp_title()}.
955
+ *
956
+ * It does not support placing the separator after the title, but by leaving the
957
+ * prefix parameter empty, you can set the title separator manually. The prefix
958
+ * does not automatically place a space between the prefix, so if there should
959
+ * be a space, the parameter value will need to have it at the end.
960
+ *
961
+ * @since 0.71
962
+ *
963
+ * @param string $prefix Optional. What to display before the title.
964
+ * @param bool $display Optional, default is true. Whether to display or retrieve title.
965
+ * @return string|null Title when retrieving, null when displaying or failure.
966
+ */
967
+ function single_cat_title( $prefix = '', $display = true ) {
968
+ return single_term_title( $prefix, $display );
969
+ }
970
+
971
+ /**
972
+ * Display or retrieve page title for tag post archive.
973
+ *
974
+ * Useful for tag template files for displaying the tag page title. It has less
975
+ * overhead than {@link wp_title()}, because of its limited implementation.
976
+ *
977
+ * It does not support placing the separator after the title, but by leaving the
978
+ * prefix parameter empty, you can set the title separator manually. The prefix
979
+ * does not automatically place a space between the prefix, so if there should
980
+ * be a space, the parameter value will need to have it at the end.
981
+ *
982
+ * @since 2.3.0
983
+ *
984
+ * @param string $prefix Optional. What to display before the title.
985
+ * @param bool $display Optional, default is true. Whether to display or retrieve title.
986
+ * @return string|null Title when retrieving, null when displaying or failure.
987
+ */
988
+ function single_tag_title( $prefix = '', $display = true ) {
989
+ return single_term_title( $prefix, $display );
990
+ }
991
+
992
+ /**
993
+ * Display or retrieve page title for taxonomy term archive.
994
+ *
995
+ * Useful for taxonomy term template files for displaying the taxonomy term page title.
996
+ * It has less overhead than {@link wp_title()}, because of its limited implementation.
997
+ *
998
+ * It does not support placing the separator after the title, but by leaving the
999
+ * prefix parameter empty, you can set the title separator manually. The prefix
1000
+ * does not automatically place a space between the prefix, so if there should
1001
+ * be a space, the parameter value will need to have it at the end.
1002
+ *
1003
+ * @since 3.1.0
1004
+ *
1005
+ * @param string $prefix Optional. What to display before the title.
1006
+ * @param bool $display Optional, default is true. Whether to display or retrieve title.
1007
+ * @return string|null Title when retrieving, null when displaying or failure.
1008
+ */
1009
+ function single_term_title( $prefix = '', $display = true ) {
1010
+ $term = get_queried_object();
1011
+
1012
+ if ( !$term )
1013
+ return;
1014
+
1015
+ if ( is_category() ) {
1016
+ /**
1017
+ * Filter the category archive page title.
1018
+ *
1019
+ * @since 2.0.10
1020
+ *
1021
+ * @param string $term_name Category name for archive being displayed.
1022
+ */
1023
+ $term_name = apply_filters( 'single_cat_title', $term->name );
1024
+ } elseif ( is_tag() ) {
1025
+ /**
1026
+ * Filter the tag archive page title.
1027
+ *
1028
+ * @since 2.3.0
1029
+ *
1030
+ * @param string $term_name Tag name for archive being displayed.
1031
+ */
1032
+ $term_name = apply_filters( 'single_tag_title', $term->name );
1033
+ } elseif ( is_tax() ) {
1034
+ /**
1035
+ * Filter the custom taxonomy archive page title.
1036
+ *
1037
+ * @since 3.1.0
1038
+ *
1039
+ * @param string $term_name Term name for archive being displayed.
1040
+ */
1041
+ $term_name = apply_filters( 'single_term_title', $term->name );
1042
+ } else {
1043
+ return;
1044
+ }
1045
+
1046
+ if ( empty( $term_name ) )
1047
+ return;
1048
+
1049
+ if ( $display )
1050
+ echo $prefix . $term_name;
1051
+ else
1052
+ return $prefix . $term_name;
1053
+ }
1054
+
1055
+ /**
1056
+ * Display or retrieve page title for post archive based on date.
1057
+ *
1058
+ * Useful for when the template only needs to display the month and year, if
1059
+ * either are available. Optimized for just this purpose, so if it is all that
1060
+ * is needed, should be better than {@link wp_title()}.
1061
+ *
1062
+ * It does not support placing the separator after the title, but by leaving the
1063
+ * prefix parameter empty, you can set the title separator manually. The prefix
1064
+ * does not automatically place a space between the prefix, so if there should
1065
+ * be a space, the parameter value will need to have it at the end.
1066
+ *
1067
+ * @since 0.71
1068
+ *
1069
+ * @param string $prefix Optional. What to display before the title.
1070
+ * @param bool $display Optional, default is true. Whether to display or retrieve title.
1071
+ * @return string|null Title when retrieving, null when displaying or failure.
1072
+ */
1073
+ function single_month_title($prefix = '', $display = true ) {
1074
+ global $wp_locale;
1075
+
1076
+ $m = get_query_var('m');
1077
+ $year = get_query_var('year');
1078
+ $monthnum = get_query_var('monthnum');
1079
+
1080
+ if ( !empty($monthnum) && !empty($year) ) {
1081
+ $my_year = $year;
1082
+ $my_month = $wp_locale->get_month($monthnum);
1083
+ } elseif ( !empty($m) ) {
1084
+ $my_year = substr($m, 0, 4);
1085
+ $my_month = $wp_locale->get_month(substr($m, 4, 2));
1086
+ }
1087
+
1088
+ if ( empty($my_month) )
1089
+ return false;
1090
+
1091
+ $result = $prefix . $my_month . $prefix . $my_year;
1092
+
1093
+ if ( !$display )
1094
+ return $result;
1095
+ echo $result;
1096
+ }
1097
+
1098
+ /**
1099
+ * Retrieve archive link content based on predefined or custom code.
1100
+ *
1101
+ * The format can be one of four styles. The 'link' for head element, 'option'
1102
+ * for use in the select element, 'html' for use in list (either ol or ul HTML
1103
+ * elements). Custom content is also supported using the before and after
1104
+ * parameters.
1105
+ *
1106
+ * The 'link' format uses the link HTML element with the <em>archives</em>
1107
+ * relationship. The before and after parameters are not used. The text
1108
+ * parameter is used to describe the link.
1109
+ *
1110
+ * The 'option' format uses the option HTML element for use in select element.
1111
+ * The value is the url parameter and the before and after parameters are used
1112
+ * between the text description.
1113
+ *
1114
+ * The 'html' format, which is the default, uses the li HTML element for use in
1115
+ * the list HTML elements. The before parameter is before the link and the after
1116
+ * parameter is after the closing link.
1117
+ *
1118
+ * The custom format uses the before parameter before the link ('a' HTML
1119
+ * element) and the after parameter after the closing link tag. If the above
1120
+ * three values for the format are not used, then custom format is assumed.
1121
+ *
1122
+ * @since 1.0.0
1123
+ *
1124
+ * @param string $url URL to archive.
1125
+ * @param string $text Archive text description.
1126
+ * @param string $format Optional, default is 'html'. Can be 'link', 'option', 'html', or custom.
1127
+ * @param string $before Optional.
1128
+ * @param string $after Optional.
1129
+ * @return string HTML link content for archive.
1130
+ */
1131
+ function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {
1132
+ $text = wptexturize($text);
1133
+ $url = esc_url($url);
1134
+
1135
+ if ('link' == $format)
1136
+ $link_html = "\t<link rel='archives' title='" . esc_attr( $text ) . "' href='$url' />\n";
1137
+ elseif ('option' == $format)
1138
+ $link_html = "\t<option value='$url'>$before $text $after</option>\n";
1139
+ elseif ('html' == $format)
1140
+ $link_html = "\t<li>$before<a href='$url'>$text</a>$after</li>\n";
1141
+ else // custom
1142
+ $link_html = "\t$before<a href='$url'>$text</a>$after\n";
1143
+
1144
+ /**
1145
+ * Filter the archive link content.
1146
+ *
1147
+ * @since 2.6.0
1148
+ *
1149
+ * @param string $link_html The archive HTML link content.
1150
+ */
1151
+ $link_html = apply_filters( 'get_archives_link', $link_html );
1152
+
1153
+ return $link_html;
1154
+ }
1155
+
1156
+ /**
1157
+ * Display archive links based on type and format.
1158
+ *
1159
+ * @since 1.2.0
1160
+ *
1161
+ * @see get_archives_link()
1162
+ *
1163
+ * @param string|array $args {
1164
+ * Default archive links arguments. Optional.
1165
+ *
1166
+ * @type string $type Type of archive to retrieve. Accepts 'daily', 'weekly', 'monthly',
1167
+ * 'yearly', 'postbypost', or 'alpha'. Both 'postbypost' and 'alpha'
1168
+ * display the same archive link list as well as post titles instead
1169
+ * of displaying dates. The difference between the two is that 'alpha'
1170
+ * will order by post title and 'postbypost' will order by post date.
1171
+ * Default 'monthly'.
1172
+ * @type string|int $limit Number of links to limit the query to. Default empty (no limit).
1173
+ * @type string $format Format each link should take using the $before and $after args.
1174
+ * Accepts 'link' (`<link>` tag), 'option' (`<option>` tag), 'html'
1175
+ * (`<li>` tag), or a custom format, which generates a link anchor
1176
+ * with $before preceding and $after succeeding. Default 'html'.
1177
+ * @type string $before Markup to prepend to the beginning of each link. Default empty.
1178
+ * @type string $after Markup to append to the end of each link. Default empty.
1179
+ * @type bool $show_post_count Whether to display the post count alongside the link. Default false.
1180
+ * @type bool $echo Whether to echo or return the links list. Default 1|true to echo.
1181
+ * @type string $order Whether to use ascending or descending order. Accepts 'ASC', or 'DESC'.
1182
+ * Default 'DESC'.
1183
+ * }
1184
+ * @return string|null String when retrieving, null when displaying.
1185
+ */
1186
+ function wp_get_archives( $args = '' ) {
1187
+ global $wpdb, $wp_locale;
1188
+
1189
+ $defaults = array(
1190
+ 'type' => 'monthly', 'limit' => '',
1191
+ 'format' => 'html', 'before' => '',
1192
+ 'after' => '', 'show_post_count' => false,
1193
+ 'echo' => 1, 'order' => 'DESC',
1194
+ );
1195
+
1196
+ $r = wp_parse_args( $args, $defaults );
1197
+
1198
+ if ( '' == $r['type'] ) {
1199
+ $r['type'] = 'monthly';
1200
+ }
1201
+
1202
+ if ( ! empty( $r['limit'] ) ) {
1203
+ $r['limit'] = absint( $r['limit'] );
1204
+ $r['limit'] = ' LIMIT ' . $r['limit'];
1205
+ }
1206
+
1207
+ $order = strtoupper( $r['order'] );
1208
+ if ( $order !== 'ASC' ) {
1209
+ $order = 'DESC';
1210
+ }
1211
+
1212
+ // this is what will separate dates on weekly archive links
1213
+ $archive_week_separator = '&#8211;';
1214
+
1215
+ // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride
1216
+ $archive_date_format_over_ride = 0;
1217
+
1218
+ // options for daily archive (only if you over-ride the general date format)
1219
+ $archive_day_date_format = 'Y/m/d';
1220
+
1221
+ // options for weekly archive (only if you over-ride the general date format)
1222
+ $archive_week_start_date_format = 'Y/m/d';
1223
+ $archive_week_end_date_format = 'Y/m/d';
1224
+
1225
+ if ( ! $archive_date_format_over_ride ) {
1226
+ $archive_day_date_format = get_option( 'date_format' );
1227
+ $archive_week_start_date_format = get_option( 'date_format' );
1228
+ $archive_week_end_date_format = get_option( 'date_format' );
1229
+ }
1230
+
1231
+ /**
1232
+ * Filter the SQL WHERE clause for retrieving archives.
1233
+ *
1234
+ * @since 2.2.0
1235
+ *
1236
+ * @param string $sql_where Portion of SQL query containing the WHERE clause.
1237
+ * @param array $r An array of default arguments.
1238
+ */
1239
+ $where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );
1240
+
1241
+ /**
1242
+ * Filter the SQL JOIN clause for retrieving archives.
1243
+ *
1244
+ * @since 2.2.0
1245
+ *
1246
+ * @param string $sql_join Portion of SQL query containing JOIN clause.
1247
+ * @param array $r An array of default arguments.
1248
+ */
1249
+ $join = apply_filters( 'getarchives_join', '', $r );
1250
+
1251
+ $output = '';
1252
+
1253
+ $last_changed = wp_cache_get( 'last_changed', 'posts' );
1254
+ if ( ! $last_changed ) {
1255
+ $last_changed = microtime();
1256
+ wp_cache_set( 'last_changed', $last_changed, 'posts' );
1257
+ }
1258
+
1259
+ $limit = $r['limit'];
1260
+
1261
+ if ( 'monthly' == $r['type'] ) {
1262
+ $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date $order $limit";
1263
+ $key = md5( $query );
1264
+ $key = "wp_get_archives:$key:$last_changed";
1265
+ if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
1266
+ $results = $wpdb->get_results( $query );
1267
+ wp_cache_set( $key, $results, 'posts' );
1268
+ }
1269
+ if ( $results ) {
1270
+ $after = $r['after'];
1271
+ foreach ( (array) $results as $result ) {
1272
+ $url = get_month_link( $result->year, $result->month );
1273
+ /* translators: 1: month name, 2: 4-digit year */
1274
+ $text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $result->month ), $result->year );
1275
+ if ( $r['show_post_count'] ) {
1276
+ $r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
1277
+ }
1278
+ $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
1279
+ }
1280
+ }
1281
+ } elseif ( 'yearly' == $r['type'] ) {
1282
+ $query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date) ORDER BY post_date $order $limit";
1283
+ $key = md5( $query );
1284
+ $key = "wp_get_archives:$key:$last_changed";
1285
+ if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
1286
+ $results = $wpdb->get_results( $query );
1287
+ wp_cache_set( $key, $results, 'posts' );
1288
+ }
1289
+ if ( $results ) {
1290
+ $after = $r['after'];
1291
+ foreach ( (array) $results as $result) {
1292
+ $url = get_year_link( $result->year );
1293
+ $text = sprintf( '%d', $result->year );
1294
+ if ( $r['show_post_count'] ) {
1295
+ $r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
1296
+ }
1297
+ $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
1298
+ }
1299
+ }
1300
+ } elseif ( 'daily' == $r['type'] ) {
1301
+ $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date $order $limit";
1302
+ $key = md5( $query );
1303
+ $key = "wp_get_archives:$key:$last_changed";
1304
+ if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
1305
+ $results = $wpdb->get_results( $query );
1306
+ $cache[ $key ] = $results;
1307
+ wp_cache_set( $key, $results, 'posts' );
1308
+ }
1309
+ if ( $results ) {
1310
+ $after = $r['after'];
1311
+ foreach ( (array) $results as $result ) {
1312
+ $url = get_day_link( $result->year, $result->month, $result->dayofmonth );
1313
+ $date = sprintf( '%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth );
1314
+ $text = mysql2date( $archive_day_date_format, $date );
1315
+ if ( $r['show_post_count'] ) {
1316
+ $r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
1317
+ }
1318
+ $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
1319
+ }
1320
+ }
1321
+ } elseif ( 'weekly' == $r['type'] ) {
1322
+ $week = _wp_mysql_week( '`post_date`' );
1323
+ $query = "SELECT DISTINCT $week AS `week`, YEAR( `post_date` ) AS `yr`, DATE_FORMAT( `post_date`, '%Y-%m-%d' ) AS `yyyymmdd`, count( `ID` ) AS `posts` FROM `$wpdb->posts` $join $where GROUP BY $week, YEAR( `post_date` ) ORDER BY `post_date` $order $limit";
1324
+ $key = md5( $query );
1325
+ $key = "wp_get_archives:$key:$last_changed";
1326
+ if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
1327
+ $results = $wpdb->get_results( $query );
1328
+ wp_cache_set( $key, $results, 'posts' );
1329
+ }
1330
+ $arc_w_last = '';
1331
+ if ( $results ) {
1332
+ $after = $r['after'];
1333
+ foreach ( (array) $results as $result ) {
1334
+ if ( $result->week != $arc_w_last ) {
1335
+ $arc_year = $result->yr;
1336
+ $arc_w_last = $result->week;
1337
+ $arc_week = get_weekstartend( $result->yyyymmdd, get_option( 'start_of_week' ) );
1338
+ $arc_week_start = date_i18n( $archive_week_start_date_format, $arc_week['start'] );
1339
+ $arc_week_end = date_i18n( $archive_week_end_date_format, $arc_week['end'] );
1340
+ $url = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&amp;', '=', $result->week );
1341
+ $text = $arc_week_start . $archive_week_separator . $arc_week_end;
1342
+ if ( $r['show_post_count'] ) {
1343
+ $r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
1344
+ }
1345
+ $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
1346
+ }
1347
+ }
1348
+ }
1349
+ } elseif ( ( 'postbypost' == $r['type'] ) || ('alpha' == $r['type'] ) ) {
1350
+ $orderby = ( 'alpha' == $r['type'] ) ? 'post_title ASC ' : 'post_date DESC ';
1351
+ $query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit";
1352
+ $key = md5( $query );
1353
+ $key = "wp_get_archives:$key:$last_changed";
1354
+ if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
1355
+ $results = $wpdb->get_results( $query );
1356
+ wp_cache_set( $key, $results, 'posts' );
1357
+ }
1358
+ if ( $results ) {
1359
+ foreach ( (array) $results as $result ) {
1360
+ if ( $result->post_date != '0000-00-00 00:00:00' ) {
1361
+ $url = get_permalink( $result );
1362
+ if ( $result->post_title ) {
1363
+ /** This filter is documented in wp-includes/post-template.php */
1364
+ $text = strip_tags( apply_filters( 'the_title', $result->post_title, $result->ID ) );
1365
+ } else {
1366
+ $text = $result->ID;
1367
+ }
1368
+ $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
1369
+ }
1370
+ }
1371
+ }
1372
+ }
1373
+ if ( $r['echo'] ) {
1374
+ echo $output;
1375
+ } else {
1376
+ return $output;
1377
+ }
1378
+ }
1379
+
1380
+ /**
1381
+ * Get number of days since the start of the week.
1382
+ *
1383
+ * @since 1.5.0
1384
+ *
1385
+ * @param int $num Number of day.
1386
+ * @return int Days since the start of the week.
1387
+ */
1388
+ function calendar_week_mod($num) {
1389
+ $base = 7;
1390
+ return ($num - $base*floor($num/$base));
1391
+ }
1392
+
1393
+ /**
1394
+ * Display calendar with days that have posts as links.
1395
+ *
1396
+ * The calendar is cached, which will be retrieved, if it exists. If there are
1397
+ * no posts for the month, then it will not be displayed.
1398
+ *
1399
+ * @since 1.0.0
1400
+ * @uses calendar_week_mod()
1401
+ *
1402
+ * @param bool $initial Optional, default is true. Use initial calendar names.
1403
+ * @param bool $echo Optional, default is true. Set to false for return.
1404
+ * @return string|null String when retrieving, null when displaying.
1405
+ */
1406
+ function get_calendar($initial = true, $echo = true) {
1407
+ global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;
1408
+
1409
+ $key = md5( $m . $monthnum . $year );
1410
+ if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) {
1411
+ if ( is_array($cache) && isset( $cache[ $key ] ) ) {
1412
+ if ( $echo ) {
1413
+ /** This filter is documented in wp-includes/general-template.php */
1414
+ echo apply_filters( 'get_calendar', $cache[$key] );
1415
+ return;
1416
+ } else {
1417
+ /** This filter is documented in wp-includes/general-template.php */
1418
+ return apply_filters( 'get_calendar', $cache[$key] );
1419
+ }
1420
+ }
1421
+ }
1422
+
1423
+ if ( !is_array($cache) )
1424
+ $cache = array();
1425
+
1426
+ // Quick check. If we have no posts at all, abort!
1427
+ if ( !$posts ) {
1428
+ $gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1");
1429
+ if ( !$gotsome ) {
1430
+ $cache[ $key ] = '';
1431
+ wp_cache_set( 'get_calendar', $cache, 'calendar' );
1432
+ return;
1433
+ }
1434
+ }
1435
+
1436
+ if ( isset($_GET['w']) )
1437
+ $w = ''.intval($_GET['w']);
1438
+
1439
+ // week_begins = 0 stands for Sunday
1440
+ $week_begins = intval(get_option('start_of_week'));
1441
+
1442
+ // Let's figure out when we are
1443
+ if ( !empty($monthnum) && !empty($year) ) {
1444
+ $thismonth = ''.zeroise(intval($monthnum), 2);
1445
+ $thisyear = ''.intval($year);
1446
+ } elseif ( !empty($w) ) {
1447
+ // We need to get the month from MySQL
1448
+ $thisyear = ''.intval(substr($m, 0, 4));
1449
+ $d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's
1450
+ $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('{$thisyear}0101', INTERVAL $d DAY) ), '%m')");
1451
+ } elseif ( !empty($m) ) {
1452
+ $thisyear = ''.intval(substr($m, 0, 4));
1453
+ if ( strlen($m) < 6 )
1454
+ $thismonth = '01';
1455
+ else
1456
+ $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);
1457
+ } else {
1458
+ $thisyear = gmdate('Y', current_time('timestamp'));
1459
+ $thismonth = gmdate('m', current_time('timestamp'));
1460
+ }
1461
+
1462
+ $unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);
1463
+ $last_day = date('t', $unixmonth);
1464
+
1465
+ // Get the next and previous month and year with at least one post
1466
+ $previous = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year
1467
+ FROM $wpdb->posts
1468
+ WHERE post_date < '$thisyear-$thismonth-01'
1469
+ AND post_type = 'post' AND post_status = 'publish'
1470
+ ORDER BY post_date DESC
1471
+ LIMIT 1");
1472
+ $next = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year
1473
+ FROM $wpdb->posts
1474
+ WHERE post_date > '$thisyear-$thismonth-{$last_day} 23:59:59'
1475
+ AND post_type = 'post' AND post_status = 'publish'
1476
+ ORDER BY post_date ASC
1477
+ LIMIT 1");
1478
+
1479
+ /* translators: Calendar caption: 1: month name, 2: 4-digit year */
1480
+ $calendar_caption = _x('%1$s %2$s', 'calendar caption');
1481
+ $calendar_output = '<table id="wp-calendar">
1482
+ <caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
1483
+ <thead>
1484
+ <tr>';
1485
+
1486
+ $myweek = array();
1487
+
1488
+ for ( $wdcount=0; $wdcount<=6; $wdcount++ ) {
1489
+ $myweek[] = $wp_locale->get_weekday(($wdcount+$week_begins)%7);
1490
+ }
1491
+
1492
+ foreach ( $myweek as $wd ) {
1493
+ $day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd);
1494
+ $wd = esc_attr($wd);
1495
+ $calendar_output .= "\n\t\t<th scope=\"col\" title=\"$wd\">$day_name</th>";
1496
+ }
1497
+
1498
+ $calendar_output .= '
1499
+ </tr>
1500
+ </thead>
1501
+
1502
+ <tfoot>
1503
+ <tr>';
1504
+
1505
+ if ( $previous ) {
1506
+ $calendar_output .= "\n\t\t".'<td colspan="3" id="prev"><a href="' . get_month_link($previous->year, $previous->month) . '">&laquo; ' . $wp_locale->get_month_abbrev($wp_locale->get_month($previous->month)) . '</a></td>';
1507
+ } else {
1508
+ $calendar_output .= "\n\t\t".'<td colspan="3" id="prev" class="pad">&nbsp;</td>';
1509
+ }
1510
+
1511
+ $calendar_output .= "\n\t\t".'<td class="pad">&nbsp;</td>';
1512
+
1513
+ if ( $next ) {
1514
+ $calendar_output .= "\n\t\t".'<td colspan="3" id="next"><a href="' . get_month_link($next->year, $next->month) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' &raquo;</a></td>';
1515
+ } else {
1516
+ $calendar_output .= "\n\t\t".'<td colspan="3" id="next" class="pad">&nbsp;</td>';
1517
+ }
1518
+
1519
+ $calendar_output .= '
1520
+ </tr>
1521
+ </tfoot>
1522
+
1523
+ <tbody>
1524
+ <tr>';
1525
+
1526
+ // Get days with posts
1527
+ $dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
1528
+ FROM $wpdb->posts WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00'
1529
+ AND post_type = 'post' AND post_status = 'publish'
1530
+ AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N);
1531
+ if ( $dayswithposts ) {
1532
+ foreach ( (array) $dayswithposts as $daywith ) {
1533
+ $daywithpost[] = $daywith[0];
1534
+ }
1535
+ } else {
1536
+ $daywithpost = array();
1537
+ }
1538
+
1539
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'camino') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false)
1540
+ $ak_title_separator = "\n";
1541
+ else
1542
+ $ak_title_separator = ', ';
1543
+
1544
+ $ak_titles_for_day = array();
1545
+ $ak_post_titles = $wpdb->get_results("SELECT ID, post_title, DAYOFMONTH(post_date) as dom "
1546
+ ."FROM $wpdb->posts "
1547
+ ."WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' "
1548
+ ."AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59' "
1549
+ ."AND post_type = 'post' AND post_status = 'publish'"
1550
+ );
1551
+ if ( $ak_post_titles ) {
1552
+ foreach ( (array) $ak_post_titles as $ak_post_title ) {
1553
+
1554
+ /** This filter is documented in wp-includes/post-template.php */
1555
+ $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title, $ak_post_title->ID ) );
1556
+
1557
+ if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) )
1558
+ $ak_titles_for_day['day_'.$ak_post_title->dom] = '';
1559
+ if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one
1560
+ $ak_titles_for_day["$ak_post_title->dom"] = $post_title;
1561
+ else
1562
+ $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title;
1563
+ }
1564
+ }
1565
+
1566
+ // See how much we should pad in the beginning
1567
+ $pad = calendar_week_mod(date('w', $unixmonth)-$week_begins);
1568
+ if ( 0 != $pad )
1569
+ $calendar_output .= "\n\t\t".'<td colspan="'. esc_attr($pad) .'" class="pad">&nbsp;</td>';
1570
+
1571
+ $daysinmonth = intval(date('t', $unixmonth));
1572
+ for ( $day = 1; $day <= $daysinmonth; ++$day ) {
1573
+ if ( isset($newrow) && $newrow )
1574
+ $calendar_output .= "\n\t</tr>\n\t<tr>\n\t\t";
1575
+ $newrow = false;
1576
+
1577
+ if ( $day == gmdate('j', current_time('timestamp')) && $thismonth == gmdate('m', current_time('timestamp')) && $thisyear == gmdate('Y', current_time('timestamp')) )
1578
+ $calendar_output .= '<td id="today">';
1579
+ else
1580
+ $calendar_output .= '<td>';
1581
+
1582
+ if ( in_array($day, $daywithpost) ) // any posts today?
1583
+ $calendar_output .= '<a href="' . get_day_link( $thisyear, $thismonth, $day ) . '" title="' . esc_attr( $ak_titles_for_day[ $day ] ) . "\">$day</a>";
1584
+ else
1585
+ $calendar_output .= $day;
1586
+ $calendar_output .= '</td>';
1587
+
1588
+ if ( 6 == calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins) )
1589
+ $newrow = true;
1590
+ }
1591
+
1592
+ $pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins);
1593
+ if ( $pad != 0 && $pad != 7 )
1594
+ $calendar_output .= "\n\t\t".'<td class="pad" colspan="'. esc_attr($pad) .'">&nbsp;</td>';
1595
+
1596
+ $calendar_output .= "\n\t</tr>\n\t</tbody>\n\t</table>";
1597
+
1598
+ $cache[ $key ] = $calendar_output;
1599
+ wp_cache_set( 'get_calendar', $cache, 'calendar' );
1600
+
1601
+ if ( $echo ) {
1602
+ /**
1603
+ * Filter the HTML calendar output.
1604
+ *
1605
+ * @since 3.0.0
1606
+ *
1607
+ * @param string $calendar_output HTML output of the calendar.
1608
+ */
1609
+ echo apply_filters( 'get_calendar', $calendar_output );
1610
+ } else {
1611
+ /** This filter is documented in wp-includes/general-template.php */
1612
+ return apply_filters( 'get_calendar', $calendar_output );
1613
+ }
1614
+
1615
+ }
1616
+
1617
+ /**
1618
+ * Purge the cached results of get_calendar.
1619
+ *
1620
+ * @see get_calendar
1621
+ * @since 2.1.0
1622
+ */
1623
+ function delete_get_calendar_cache() {
1624
+ wp_cache_delete( 'get_calendar', 'calendar' );
1625
+ }
1626
+ add_action( 'save_post', 'delete_get_calendar_cache' );
1627
+ add_action( 'delete_post', 'delete_get_calendar_cache' );
1628
+ add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );
1629
+ add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' );
1630
+
1631
+ /**
1632
+ * Display all of the allowed tags in HTML format with attributes.
1633
+ *
1634
+ * This is useful for displaying in the comment area, which elements and
1635
+ * attributes are supported. As well as any plugins which want to display it.
1636
+ *
1637
+ * @since 1.0.1
1638
+ * @uses $allowedtags
1639
+ *
1640
+ * @return string HTML allowed tags entity encoded.
1641
+ */
1642
+ function allowed_tags() {
1643
+ global $allowedtags;
1644
+ $allowed = '';
1645
+ foreach ( (array) $allowedtags as $tag => $attributes ) {
1646
+ $allowed .= '<'.$tag;
1647
+ if ( 0 < count($attributes) ) {
1648
+ foreach ( $attributes as $attribute => $limits ) {
1649
+ $allowed .= ' '.$attribute.'=""';
1650
+ }
1651
+ }
1652
+ $allowed .= '> ';
1653
+ }
1654
+ return htmlentities($allowed);
1655
+ }
1656
+
1657
+ /***** Date/Time tags *****/
1658
+
1659
+ /**
1660
+ * Outputs the date in iso8601 format for xml files.
1661
+ *
1662
+ * @since 1.0.0
1663
+ */
1664
+ function the_date_xml() {
1665
+ echo mysql2date( 'Y-m-d', get_post()->post_date, false );
1666
+ }
1667
+
1668
+ /**
1669
+ * Display or Retrieve the date the current post was written (once per date)
1670
+ *
1671
+ * Will only output the date if the current post's date is different from the
1672
+ * previous one output.
1673
+ *
1674
+ * i.e. Only one date listing will show per day worth of posts shown in the loop, even if the
1675
+ * function is called several times for each post.
1676
+ *
1677
+ * HTML output can be filtered with 'the_date'.
1678
+ * Date string output can be filtered with 'get_the_date'.
1679
+ *
1680
+ * @since 0.71
1681
+ *
1682
+ * @uses get_the_date()
1683
+ * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
1684
+ * @param string $before Optional. Output before the date.
1685
+ * @param string $after Optional. Output after the date.
1686
+ * @param bool $echo Optional, default is display. Whether to echo the date or return it.
1687
+ * @return string|null Null if displaying, string if retrieving.
1688
+ */
1689
+ function the_date( $d = '', $before = '', $after = '', $echo = true ) {
1690
+ global $currentday, $previousday;
1691
+
1692
+ if ( $currentday != $previousday ) {
1693
+ $the_date = $before . get_the_date( $d ) . $after;
1694
+ $previousday = $currentday;
1695
+
1696
+ /**
1697
+ * Filter the date a post was published for display.
1698
+ *
1699
+ * @since 0.71
1700
+ *
1701
+ * @param string $the_date The formatted date string.
1702
+ * @param string $d PHP date format. Defaults to 'date_format' option
1703
+ * if not specified.
1704
+ * @param string $before HTML output before the date.
1705
+ * @param string $after HTML output after the date.
1706
+ */
1707
+ $the_date = apply_filters( 'the_date', $the_date, $d, $before, $after );
1708
+
1709
+ if ( $echo )
1710
+ echo $the_date;
1711
+ else
1712
+ return $the_date;
1713
+ }
1714
+
1715
+ return null;
1716
+ }
1717
+
1718
+ /**
1719
+ * Retrieve the date on which the post was written.
1720
+ *
1721
+ * Unlike the_date() this function will always return the date.
1722
+ * Modify output with 'get_the_date' filter.
1723
+ *
1724
+ * @since 3.0.0
1725
+ *
1726
+ * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
1727
+ * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
1728
+ * @return string|bool Date the current post was written. False on failure.
1729
+ */
1730
+ function get_the_date( $d = '', $post = null ) {
1731
+ $post = get_post( $post );
1732
+
1733
+ if ( ! $post ) {
1734
+ return false;
1735
+ }
1736
+
1737
+ if ( '' == $d ) {
1738
+ $the_date = mysql2date( get_option( 'date_format' ), $post->post_date );
1739
+ } else {
1740
+ $the_date = mysql2date( $d, $post->post_date );
1741
+ }
1742
+
1743
+ /**
1744
+ * Filter the date a post was published.
1745
+ *
1746
+ * @since 3.0.0
1747
+ *
1748
+ * @param string $the_date The formatted date.
1749
+ * @param string $d PHP date format. Defaults to 'date_format' option
1750
+ * if not specified.
1751
+ * @param int|WP_Post $post The post object or ID.
1752
+ */
1753
+ return apply_filters( 'get_the_date', $the_date, $d, $post );
1754
+ }
1755
+
1756
+ /**
1757
+ * Display the date on which the post was last modified.
1758
+ *
1759
+ * @since 2.1.0
1760
+ *
1761
+ * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
1762
+ * @param string $before Optional. Output before the date.
1763
+ * @param string $after Optional. Output after the date.
1764
+ * @param bool $echo Optional, default is display. Whether to echo the date or return it.
1765
+ * @return string|null Null if displaying, string if retrieving.
1766
+ */
1767
+ function the_modified_date($d = '', $before='', $after='', $echo = true) {
1768
+
1769
+ $the_modified_date = $before . get_the_modified_date($d) . $after;
1770
+
1771
+ /**
1772
+ * Filter the date a post was last modified for display.
1773
+ *
1774
+ * @since 2.1.0
1775
+ *
1776
+ * @param string $the_modified_date The last modified date.
1777
+ * @param string $d PHP date format. Defaults to 'date_format' option
1778
+ * if not specified.
1779
+ * @param string $before HTML output before the date.
1780
+ * @param string $after HTML output after the date.
1781
+ */
1782
+ $the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $d, $before, $after );
1783
+
1784
+ if ( $echo )
1785
+ echo $the_modified_date;
1786
+ else
1787
+ return $the_modified_date;
1788
+
1789
+ }
1790
+
1791
+ /**
1792
+ * Retrieve the date on which the post was last modified.
1793
+ *
1794
+ * @since 2.1.0
1795
+ *
1796
+ * @param string $d Optional. PHP date format. Defaults to the "date_format" option
1797
+ * @return string
1798
+ */
1799
+ function get_the_modified_date($d = '') {
1800
+ if ( '' == $d )
1801
+ $the_time = get_post_modified_time(get_option('date_format'), null, null, true);
1802
+ else
1803
+ $the_time = get_post_modified_time($d, null, null, true);
1804
+
1805
+ /**
1806
+ * Filter the date a post was last modified.
1807
+ *
1808
+ * @since 2.1.0
1809
+ *
1810
+ * @param string $the_time The formatted date.
1811
+ * @param string $d PHP date format. Defaults to value specified in
1812
+ * 'date_format' option.
1813
+ */
1814
+ return apply_filters( 'get_the_modified_date', $the_time, $d );
1815
+ }
1816
+
1817
+ /**
1818
+ * Display the time at which the post was written.
1819
+ *
1820
+ * @since 0.71
1821
+ *
1822
+ * @param string $d Either 'G', 'U', or php date format.
1823
+ */
1824
+ function the_time( $d = '' ) {
1825
+ /**
1826
+ * Filter the time a post was written for display.
1827
+ *
1828
+ * @since 0.71
1829
+ *
1830
+ * @param string $get_the_time The formatted time.
1831
+ * @param string $d The time format. Accepts 'G', 'U',
1832
+ * or php date format.
1833
+ */
1834
+ echo apply_filters( 'the_time', get_the_time( $d ), $d );
1835
+ }
1836
+
1837
+ /**
1838
+ * Retrieve the time at which the post was written.
1839
+ *
1840
+ * @since 1.5.0
1841
+ *
1842
+ * @param string $d Optional. Format to use for retrieving the time the post
1843
+ * was written. Either 'G', 'U', or php date format defaults
1844
+ * to the value specified in the time_format option. Default empty.
1845
+ * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
1846
+ * @return string|int|bool Formatted date string or Unix timestamp. False on failure.
1847
+ */
1848
+ function get_the_time( $d = '', $post = null ) {
1849
+ $post = get_post($post);
1850
+
1851
+ if ( ! $post ) {
1852
+ return false;
1853
+ }
1854
+
1855
+ if ( '' == $d )
1856
+ $the_time = get_post_time(get_option('time_format'), false, $post, true);
1857
+ else
1858
+ $the_time = get_post_time($d, false, $post, true);
1859
+
1860
+ /**
1861
+ * Filter the time a post was written.
1862
+ *
1863
+ * @since 1.5.0
1864
+ *
1865
+ * @param string $the_time The formatted time.
1866
+ * @param string $d Format to use for retrieving the time the post was written.
1867
+ * Accepts 'G', 'U', or php date format value specified
1868
+ * in 'time_format' option. Default empty.
1869
+ * @param int|WP_Post $post WP_Post object or ID.
1870
+ */
1871
+ return apply_filters( 'get_the_time', $the_time, $d, $post );
1872
+ }
1873
+
1874
+ /**
1875
+ * Retrieve the time at which the post was written.
1876
+ *
1877
+ * @since 2.0.0
1878
+ *
1879
+ * @param string $d Optional. Format to use for retrieving the time the post
1880
+ * was written. Either 'G', 'U', or php date format. Default 'U'.
1881
+ * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false.
1882
+ * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
1883
+ * @param bool $translate Whether to translate the time string. Default false.
1884
+ * @return string|int|bool Formatted date string or Unix timestamp. False on failure.
1885
+ */
1886
+ function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
1887
+ $post = get_post($post);
1888
+
1889
+ if ( ! $post ) {
1890
+ return false;
1891
+ }
1892
+
1893
+ if ( $gmt )
1894
+ $time = $post->post_date_gmt;
1895
+ else
1896
+ $time = $post->post_date;
1897
+
1898
+ $time = mysql2date($d, $time, $translate);
1899
+
1900
+ /**
1901
+ * Filter the localized time a post was written.
1902
+ *
1903
+ * @since 2.6.0
1904
+ *
1905
+ * @param string $time The formatted time.
1906
+ * @param string $d Format to use for retrieving the time the post was written.
1907
+ * Accepts 'G', 'U', or php date format. Default 'U'.
1908
+ * @param bool $gmt Whether to retrieve the GMT time. Default false.
1909
+ */
1910
+ return apply_filters( 'get_post_time', $time, $d, $gmt );
1911
+ }
1912
+
1913
+ /**
1914
+ * Display the time at which the post was last modified.
1915
+ *
1916
+ * @since 2.0.0
1917
+ *
1918
+ * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
1919
+ */
1920
+ function the_modified_time($d = '') {
1921
+ /**
1922
+ * Filter the localized time a post was last modified, for display.
1923
+ *
1924
+ * @since 2.0.0
1925
+ *
1926
+ * @param string $get_the_modified_time The formatted time.
1927
+ * @param string $d The time format. Accepts 'G', 'U',
1928
+ * or php date format. Defaults to value
1929
+ * specified in 'time_format' option.
1930
+ */
1931
+ echo apply_filters( 'the_modified_time', get_the_modified_time($d), $d );
1932
+ }
1933
+
1934
+ /**
1935
+ * Retrieve the time at which the post was last modified.
1936
+ *
1937
+ * @since 2.0.0
1938
+ *
1939
+ * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
1940
+ * @return string
1941
+ */
1942
+ function get_the_modified_time($d = '') {
1943
+ if ( '' == $d )
1944
+ $the_time = get_post_modified_time(get_option('time_format'), null, null, true);
1945
+ else
1946
+ $the_time = get_post_modified_time($d, null, null, true);
1947
+
1948
+ /**
1949
+ * Filter the localized time a post was last modified.
1950
+ *
1951
+ * @since 2.0.0
1952
+ *
1953
+ * @param string $the_time The formatted time.
1954
+ * @param string $d Format to use for retrieving the time the post was
1955
+ * written. Accepts 'G', 'U', or php date format. Defaults
1956
+ * to value specified in 'time_format' option.
1957
+ */
1958
+ return apply_filters( 'get_the_modified_time', $the_time, $d );
1959
+ }
1960
+
1961
+ /**
1962
+ * Retrieve the time at which the post was last modified.
1963
+ *
1964
+ * @since 2.0.0
1965
+ *
1966
+ * @param string $d Optional. Format to use for retrieving the time the post
1967
+ * was modified. Either 'G', 'U', or php date format. Default 'U'.
1968
+ * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false.
1969
+ * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
1970
+ * @param bool $translate Whether to translate the time string. Default false.
1971
+ * @return string|int|bool Formatted date string or Unix timestamp. False on failure.
1972
+ */
1973
+ function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
1974
+ $post = get_post($post);
1975
+
1976
+ if ( ! $post ) {
1977
+ return false;
1978
+ }
1979
+
1980
+ if ( $gmt )
1981
+ $time = $post->post_modified_gmt;
1982
+ else
1983
+ $time = $post->post_modified;
1984
+ $time = mysql2date($d, $time, $translate);
1985
+
1986
+ /**
1987
+ * Filter the localized time a post was last modified.
1988
+ *
1989
+ * @since 2.8.0
1990
+ *
1991
+ * @param string $time The formatted time.
1992
+ * @param string $d The date format. Accepts 'G', 'U', or php date format. Default 'U'.
1993
+ * @param bool $gmt Whether to return the GMT time. Default false.
1994
+ */
1995
+ return apply_filters( 'get_post_modified_time', $time, $d, $gmt );
1996
+ }
1997
+
1998
+ /**
1999
+ * Display the weekday on which the post was written.
2000
+ *
2001
+ * @since 0.71
2002
+ * @uses $wp_locale
2003
+ * @uses $post
2004
+ */
2005
+ function the_weekday() {
2006
+ global $wp_locale;
2007
+ $the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) );
2008
+
2009
+ /**
2010
+ * Filter the weekday on which the post was written, for display.
2011
+ *
2012
+ * @since 0.71
2013
+ *
2014
+ * @param string $the_weekday
2015
+ */
2016
+ $the_weekday = apply_filters( 'the_weekday', $the_weekday );
2017
+ echo $the_weekday;
2018
+ }
2019
+
2020
+ /**
2021
+ * Display the weekday on which the post was written.
2022
+ *
2023
+ * Will only output the weekday if the current post's weekday is different from
2024
+ * the previous one output.
2025
+ *
2026
+ * @since 0.71
2027
+ *
2028
+ * @param string $before Optional Output before the date.
2029
+ * @param string $after Optional Output after the date.
2030
+ */
2031
+ function the_weekday_date($before='',$after='') {
2032
+ global $wp_locale, $currentday, $previousweekday;
2033
+ $the_weekday_date = '';
2034
+ if ( $currentday != $previousweekday ) {
2035
+ $the_weekday_date .= $before;
2036
+ $the_weekday_date .= $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) );
2037
+ $the_weekday_date .= $after;
2038
+ $previousweekday = $currentday;
2039
+ }
2040
+
2041
+ /**
2042
+ * Filter the localized date on which the post was written, for display.
2043
+ *
2044
+ * @since 0.71
2045
+ *
2046
+ * @param string $the_weekday_date
2047
+ * @param string $before The HTML to output before the date.
2048
+ * @param string $after The HTML to output after the date.
2049
+ */
2050
+ $the_weekday_date = apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );
2051
+ echo $the_weekday_date;
2052
+ }
2053
+
2054
+ /**
2055
+ * Fire the wp_head action
2056
+ *
2057
+ * @since 1.2.0
2058
+ */
2059
+ function wp_head() {
2060
+ /**
2061
+ * Print scripts or data in the head tag on the front end.
2062
+ *
2063
+ * @since 1.5.0
2064
+ */
2065
+ do_action( 'wp_head' );
2066
+ }
2067
+
2068
+ /**
2069
+ * Fire the wp_footer action
2070
+ *
2071
+ * @since 1.5.1
2072
+ */
2073
+ function wp_footer() {
2074
+ /**
2075
+ * Print scripts or data before the closing body tag on the front end.
2076
+ *
2077
+ * @since 1.5.1
2078
+ */
2079
+ do_action( 'wp_footer' );
2080
+ }
2081
+
2082
+ /**
2083
+ * Display the links to the general feeds.
2084
+ *
2085
+ * @since 2.8.0
2086
+ *
2087
+ * @param array $args Optional arguments.
2088
+ */
2089
+ function feed_links( $args = array() ) {
2090
+ if ( !current_theme_supports('automatic-feed-links') )
2091
+ return;
2092
+
2093
+ $defaults = array(
2094
+ /* translators: Separator between blog name and feed type in feed links */
2095
+ 'separator' => _x('&raquo;', 'feed link'),
2096
+ /* translators: 1: blog title, 2: separator (raquo) */
2097
+ 'feedtitle' => __('%1$s %2$s Feed'),
2098
+ /* translators: 1: blog title, 2: separator (raquo) */
2099
+ 'comstitle' => __('%1$s %2$s Comments Feed'),
2100
+ );
2101
+
2102
+ $args = wp_parse_args( $args, $defaults );
2103
+
2104
+ echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( $args['feedtitle'], get_bloginfo('name'), $args['separator'] ) ) . '" href="' . esc_url( get_feed_link() ) . "\" />\n";
2105
+ echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( $args['comstitle'], get_bloginfo('name'), $args['separator'] ) ) . '" href="' . esc_url( get_feed_link( 'comments_' . get_default_feed() ) ) . "\" />\n";
2106
+ }
2107
+
2108
+ /**
2109
+ * Display the links to the extra feeds such as category feeds.
2110
+ *
2111
+ * @since 2.8.0
2112
+ *
2113
+ * @param array $args Optional arguments.
2114
+ */
2115
+ function feed_links_extra( $args = array() ) {
2116
+ $defaults = array(
2117
+ /* translators: Separator between blog name and feed type in feed links */
2118
+ 'separator' => _x('&raquo;', 'feed link'),
2119
+ /* translators: 1: blog name, 2: separator(raquo), 3: post title */
2120
+ 'singletitle' => __('%1$s %2$s %3$s Comments Feed'),
2121
+ /* translators: 1: blog name, 2: separator(raquo), 3: category name */
2122
+ 'cattitle' => __('%1$s %2$s %3$s Category Feed'),
2123
+ /* translators: 1: blog name, 2: separator(raquo), 3: tag name */
2124
+ 'tagtitle' => __('%1$s %2$s %3$s Tag Feed'),
2125
+ /* translators: 1: blog name, 2: separator(raquo), 3: author name */
2126
+ 'authortitle' => __('%1$s %2$s Posts by %3$s Feed'),
2127
+ /* translators: 1: blog name, 2: separator(raquo), 3: search phrase */
2128
+ 'searchtitle' => __('%1$s %2$s Search Results for &#8220;%3$s&#8221; Feed'),
2129
+ /* translators: 1: blog name, 2: separator(raquo), 3: post type name */
2130
+ 'posttypetitle' => __('%1$s %2$s %3$s Feed'),
2131
+ );
2132
+
2133
+ $args = wp_parse_args( $args, $defaults );
2134
+
2135
+ if ( is_singular() ) {
2136
+ $id = 0;
2137
+ $post = get_post( $id );
2138
+
2139
+ if ( comments_open() || pings_open() || $post->comment_count > 0 ) {
2140
+ $title = sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], the_title_attribute( array( 'echo' => false ) ) );
2141
+ $href = get_post_comments_feed_link( $post->ID );
2142
+ }
2143
+ } elseif ( is_post_type_archive() ) {
2144
+ $post_type = get_query_var( 'post_type' );
2145
+ if ( is_array( $post_type ) )
2146
+ $post_type = reset( $post_type );
2147
+
2148
+ $post_type_obj = get_post_type_object( $post_type );
2149
+ $title = sprintf( $args['posttypetitle'], get_bloginfo( 'name' ), $args['separator'], $post_type_obj->labels->name );
2150
+ $href = get_post_type_archive_feed_link( $post_type_obj->name );
2151
+ } elseif ( is_category() ) {
2152
+ $term = get_queried_object();
2153
+
2154
+ if ( $term ) {
2155
+ $title = sprintf( $args['cattitle'], get_bloginfo('name'), $args['separator'], $term->name );
2156
+ $href = get_category_feed_link( $term->term_id );
2157
+ }
2158
+ } elseif ( is_tag() ) {
2159
+ $term = get_queried_object();
2160
+
2161
+ if ( $term ) {
2162
+ $title = sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name );
2163
+ $href = get_tag_feed_link( $term->term_id );
2164
+ }
2165
+ } elseif ( is_author() ) {
2166
+ $author_id = intval( get_query_var('author') );
2167
+
2168
+ $title = sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta( 'display_name', $author_id ) );
2169
+ $href = get_author_feed_link( $author_id );
2170
+ } elseif ( is_search() ) {
2171
+ $title = sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) );
2172
+ $href = get_search_feed_link();
2173
+ } elseif ( is_post_type_archive() ) {
2174
+ $title = sprintf( $args['posttypetitle'], get_bloginfo('name'), $args['separator'], post_type_archive_title( '', false ) );
2175
+ $post_type_obj = get_queried_object();
2176
+ if ( $post_type_obj )
2177
+ $href = get_post_type_archive_feed_link( $post_type_obj->name );
2178
+ }
2179
+
2180
+ if ( isset($title) && isset($href) )
2181
+ echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '" />' . "\n";
2182
+ }
2183
+
2184
+ /**
2185
+ * Display the link to the Really Simple Discovery service endpoint.
2186
+ *
2187
+ * @link http://archipelago.phrasewise.com/rsd
2188
+ * @since 2.0.0
2189
+ */
2190
+ function rsd_link() {
2191
+ echo '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('wpurl') . "/xmlrpc.php?rsd\" />\n";
2192
+ }
2193
+
2194
+ /**
2195
+ * Display the link to the Windows Live Writer manifest file.
2196
+ *
2197
+ * @link http://msdn.microsoft.com/en-us/library/bb463265.aspx
2198
+ * @since 2.3.1
2199
+ */
2200
+ function wlwmanifest_link() {
2201
+ echo '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="',
2202
+ includes_url( 'wlwmanifest.xml' ), '" /> ', "\n";
2203
+ }
2204
+
2205
+ /**
2206
+ * Display a noindex meta tag if required by the blog configuration.
2207
+ *
2208
+ * If a blog is marked as not being public then the noindex meta tag will be
2209
+ * output to tell web robots not to index the page content. Add this to the wp_head action.
2210
+ * Typical usage is as a wp_head callback. add_action( 'wp_head', 'noindex' );
2211
+ *
2212
+ * @see wp_no_robots
2213
+ *
2214
+ * @since 2.1.0
2215
+ */
2216
+ function noindex() {
2217
+ // If the blog is not public, tell robots to go away.
2218
+ if ( '0' == get_option('blog_public') )
2219
+ wp_no_robots();
2220
+ }
2221
+
2222
+ /**
2223
+ * Display a noindex meta tag.
2224
+ *
2225
+ * Outputs a noindex meta tag that tells web robots not to index the page content.
2226
+ * Typical usage is as a wp_head callback. add_action( 'wp_head', 'wp_no_robots' );
2227
+ *
2228
+ * @since 3.3.0
2229
+ */
2230
+ function wp_no_robots() {
2231
+ echo "<meta name='robots' content='noindex,follow' />\n";
2232
+ }
2233
+
2234
+ /**
2235
+ * Whether the user should have a WYSIWIG editor.
2236
+ *
2237
+ * Checks that the user requires a WYSIWIG editor and that the editor is
2238
+ * supported in the users browser.
2239
+ *
2240
+ * @since 2.0.0
2241
+ *
2242
+ * @return bool
2243
+ */
2244
+ function user_can_richedit() {
2245
+ global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE;
2246
+
2247
+ if ( !isset($wp_rich_edit) ) {
2248
+ $wp_rich_edit = false;
2249
+
2250
+ if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users
2251
+ if ( $is_safari ) {
2252
+ $wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
2253
+ } elseif ( $is_gecko || $is_chrome || $is_IE || ( $is_opera && !wp_is_mobile() ) ) {
2254
+ $wp_rich_edit = true;
2255
+ }
2256
+ }
2257
+ }
2258
+
2259
+ /**
2260
+ * Filter whether the user can access the rich (Visual) editor.
2261
+ *
2262
+ * @since 2.1.0
2263
+ *
2264
+ * @param bool $wp_rich_edit Whether the user can access to the rich (Visual) editor.
2265
+ */
2266
+ return apply_filters( 'user_can_richedit', $wp_rich_edit );
2267
+ }
2268
+
2269
+ /**
2270
+ * Find out which editor should be displayed by default.
2271
+ *
2272
+ * Works out which of the two editors to display as the current editor for a
2273
+ * user. The 'html' setting is for the "Text" editor tab.
2274
+ *
2275
+ * @since 2.5.0
2276
+ *
2277
+ * @return string Either 'tinymce', or 'html', or 'test'
2278
+ */
2279
+ function wp_default_editor() {
2280
+ $r = user_can_richedit() ? 'tinymce' : 'html'; // defaults
2281
+ if ( wp_get_current_user() ) { // look for cookie
2282
+ $ed = get_user_setting('editor', 'tinymce');
2283
+ $r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
2284
+ }
2285
+
2286
+ /**
2287
+ * Filter which editor should be displayed by default.
2288
+ *
2289
+ * @since 2.5.0
2290
+ *
2291
+ * @param array $r An array of editors. Accepts 'tinymce', 'html', 'test'.
2292
+ */
2293
+ return apply_filters( 'wp_default_editor', $r );
2294
+ }
2295
+
2296
+ /**
2297
+ * Renders an editor.
2298
+ *
2299
+ * Using this function is the proper way to output all needed components for both TinyMCE and Quicktags.
2300
+ * _WP_Editors should not be used directly. See https://core.trac.wordpress.org/ticket/17144.
2301
+ *
2302
+ * NOTE: Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason
2303
+ * running wp_editor() inside of a metabox is not a good idea unless only Quicktags is used.
2304
+ * On the post edit screen several actions can be used to include additional editors
2305
+ * containing TinyMCE: 'edit_page_form', 'edit_form_advanced' and 'dbx_post_sidebar'.
2306
+ * See https://core.trac.wordpress.org/ticket/19173 for more information.
2307
+ *
2308
+ * @see wp-includes/class-wp-editor.php
2309
+ * @since 3.3.0
2310
+ *
2311
+ * @param string $content Initial content for the editor.
2312
+ * @param string $editor_id HTML ID attribute value for the textarea and TinyMCE. Can only be /[a-z]+/.
2313
+ * @param array $settings See _WP_Editors::editor().
2314
+ */
2315
+ function wp_editor( $content, $editor_id, $settings = array() ) {
2316
+ if ( ! class_exists( '_WP_Editors' ) )
2317
+ require( ABSPATH . WPINC . '/class-wp-editor.php' );
2318
+
2319
+ _WP_Editors::editor($content, $editor_id, $settings);
2320
+ }
2321
+
2322
+ /**
2323
+ * Retrieve the contents of the search WordPress query variable.
2324
+ *
2325
+ * The search query string is passed through {@link esc_attr()}
2326
+ * to ensure that it is safe for placing in an html attribute.
2327
+ *
2328
+ * @since 2.3.0
2329
+ * @uses esc_attr()
2330
+ *
2331
+ * @param bool $escaped Whether the result is escaped. Default true.
2332
+ * Only use when you are later escaping it. Do not use unescaped.
2333
+ * @return string
2334
+ */
2335
+ function get_search_query( $escaped = true ) {
2336
+ /**
2337
+ * Filter the contents of the search query variable.
2338
+ *
2339
+ * @since 2.3.0
2340
+ *
2341
+ * @param mixed $search Contents of the search query variable.
2342
+ */
2343
+ $query = apply_filters( 'get_search_query', get_query_var( 's' ) );
2344
+
2345
+ if ( $escaped )
2346
+ $query = esc_attr( $query );
2347
+ return $query;
2348
+ }
2349
+
2350
+ /**
2351
+ * Display the contents of the search query variable.
2352
+ *
2353
+ * The search query string is passed through {@link esc_attr()}
2354
+ * to ensure that it is safe for placing in an html attribute.
2355
+ *
2356
+ * @uses esc_attr()
2357
+ * @since 2.1.0
2358
+ */
2359
+ function the_search_query() {
2360
+ /**
2361
+ * Filter the contents of the search query variable for display.
2362
+ *
2363
+ * @since 2.3.0
2364
+ *
2365
+ * @param mixed $search Contents of the search query variable.
2366
+ */
2367
+ echo esc_attr( apply_filters( 'the_search_query', get_search_query( false ) ) );
2368
+ }
2369
+
2370
+ /**
2371
+ * Display the language attributes for the html tag.
2372
+ *
2373
+ * Builds up a set of html attributes containing the text direction and language
2374
+ * information for the page.
2375
+ *
2376
+ * @since 2.1.0
2377
+ *
2378
+ * @param string $doctype The type of html document (xhtml|html).
2379
+ */
2380
+ function language_attributes($doctype = 'html') {
2381
+ $attributes = array();
2382
+
2383
+ if ( function_exists( 'is_rtl' ) && is_rtl() )
2384
+ $attributes[] = 'dir="rtl"';
2385
+
2386
+ if ( $lang = get_bloginfo('language') ) {
2387
+ if ( get_option('html_type') == 'text/html' || $doctype == 'html' )
2388
+ $attributes[] = "lang=\"$lang\"";
2389
+
2390
+ if ( get_option('html_type') != 'text/html' || $doctype == 'xhtml' )
2391
+ $attributes[] = "xml:lang=\"$lang\"";
2392
+ }
2393
+
2394
+ $output = implode(' ', $attributes);
2395
+
2396
+ /**
2397
+ * Filter the language attributes for display in the html tag.
2398
+ *
2399
+ * @since 2.5.0
2400
+ *
2401
+ * @param string $output A space-separated list of language attributes.
2402
+ */
2403
+ echo apply_filters( 'language_attributes', $output );
2404
+ }
2405
+
2406
+ /**
2407
+ * Retrieve paginated link for archive post pages.
2408
+ *
2409
+ * Technically, the function can be used to create paginated link list for any
2410
+ * area. The 'base' argument is used to reference the url, which will be used to
2411
+ * create the paginated links. The 'format' argument is then used for replacing
2412
+ * the page number. It is however, most likely and by default, to be used on the
2413
+ * archive post pages.
2414
+ *
2415
+ * The 'type' argument controls format of the returned value. The default is
2416
+ * 'plain', which is just a string with the links separated by a newline
2417
+ * character. The other possible values are either 'array' or 'list'. The
2418
+ * 'array' value will return an array of the paginated link list to offer full
2419
+ * control of display. The 'list' value will place all of the paginated links in
2420
+ * an unordered HTML list.
2421
+ *
2422
+ * The 'total' argument is the total amount of pages and is an integer. The
2423
+ * 'current' argument is the current page number and is also an integer.
2424
+ *
2425
+ * An example of the 'base' argument is "http://example.com/all_posts.php%_%"
2426
+ * and the '%_%' is required. The '%_%' will be replaced by the contents of in
2427
+ * the 'format' argument. An example for the 'format' argument is "?page=%#%"
2428
+ * and the '%#%' is also required. The '%#%' will be replaced with the page
2429
+ * number.
2430
+ *
2431
+ * You can include the previous and next links in the list by setting the
2432
+ * 'prev_next' argument to true, which it is by default. You can set the
2433
+ * previous text, by using the 'prev_text' argument. You can set the next text
2434
+ * by setting the 'next_text' argument.
2435
+ *
2436
+ * If the 'show_all' argument is set to true, then it will show all of the pages
2437
+ * instead of a short list of the pages near the current page. By default, the
2438
+ * 'show_all' is set to false and controlled by the 'end_size' and 'mid_size'
2439
+ * arguments. The 'end_size' argument is how many numbers on either the start
2440
+ * and the end list edges, by default is 1. The 'mid_size' argument is how many
2441
+ * numbers to either side of current page, but not including current page.
2442
+ *
2443
+ * It is possible to add query vars to the link by using the 'add_args' argument
2444
+ * and see {@link add_query_arg()} for more information.
2445
+ *
2446
+ * The 'before_page_number' and 'after_page_number' arguments allow users to
2447
+ * augment the links themselves. Typically this might be to add context to the
2448
+ * numbered links so that screen reader users understand what the links are for.
2449
+ * The text strings are added before and after the page number - within the
2450
+ * anchor tag.
2451
+ *
2452
+ * @since 2.1.0
2453
+ *
2454
+ * @param string|array $args Optional. Override defaults.
2455
+ * @return array|string String of page links or array of page links.
2456
+ */
2457
+ function paginate_links( $args = '' ) {
2458
+ global $wp_query, $wp_rewrite;
2459
+
2460
+ $total = ( isset( $wp_query->max_num_pages ) ) ? $wp_query->max_num_pages : 1;
2461
+ $current = ( get_query_var( 'paged' ) ) ? intval( get_query_var( 'paged' ) ) : 1;
2462
+ $pagenum_link = html_entity_decode( get_pagenum_link() );
2463
+ $query_args = array();
2464
+ $url_parts = explode( '?', $pagenum_link );
2465
+
2466
+ if ( isset( $url_parts[1] ) ) {
2467
+ wp_parse_str( $url_parts[1], $query_args );
2468
+ }
2469
+
2470
+ $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
2471
+ $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
2472
+
2473
+ $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
2474
+ $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
2475
+
2476
+ $defaults = array(
2477
+ 'base' => $pagenum_link, // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
2478
+ 'format' => $format, // ?page=%#% : %#% is replaced by the page number
2479
+ 'total' => $total,
2480
+ 'current' => $current,
2481
+ 'show_all' => false,
2482
+ 'prev_next' => true,
2483
+ 'prev_text' => __('&laquo; Previous'),
2484
+ 'next_text' => __('Next &raquo;'),
2485
+ 'end_size' => 1,
2486
+ 'mid_size' => 2,
2487
+ 'type' => 'plain',
2488
+ 'add_args' => $query_args, // array of query args to add
2489
+ 'add_fragment' => '',
2490
+ 'before_page_number' => '',
2491
+ 'after_page_number' => ''
2492
+ );
2493
+
2494
+ $args = wp_parse_args( $args, $defaults );
2495
+
2496
+ // Who knows what else people pass in $args
2497
+ $total = (int) $args['total'];
2498
+ if ( $total < 2 ) {
2499
+ return;
2500
+ }
2501
+ $current = (int) $args['current'];
2502
+ $end_size = (int) $args['end_size']; // Out of bounds? Make it the default.
2503
+ if ( $end_size < 1 ) {
2504
+ $end_size = 1;
2505
+ }
2506
+ $mid_size = (int) $args['mid_size'];
2507
+ if ( $mid_size < 0 ) {
2508
+ $mid_size = 2;
2509
+ }
2510
+ $add_args = is_array( $args['add_args'] ) ? $args['add_args'] : false;
2511
+ $r = '';
2512
+ $page_links = array();
2513
+ $dots = false;
2514
+
2515
+ if ( $args['prev_next'] && $current && 1 < $current ) :
2516
+ $link = str_replace( '%_%', 2 == $current ? '' : $args['format'], $args['base'] );
2517
+ $link = str_replace( '%#%', $current - 1, $link );
2518
+ if ( $add_args )
2519
+ $link = add_query_arg( $add_args, $link );
2520
+ $link .= $args['add_fragment'];
2521
+
2522
+ /**
2523
+ * Filter the paginated links for the given archive pages.
2524
+ *
2525
+ * @since 3.0.0
2526
+ *
2527
+ * @param string $link The paginated link URL.
2528
+ */
2529
+ $page_links[] = '<a class="prev page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $args['prev_text'] . '</a>';
2530
+ endif;
2531
+ for ( $n = 1; $n <= $total; $n++ ) :
2532
+ if ( $n == $current ) :
2533
+ $page_links[] = "<span class='page-numbers current'>" . $args['before_page_number'] . number_format_i18n( $n ) . $args['after_page_number'] . "</span>";
2534
+ $dots = true;
2535
+ else :
2536
+ if ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) :
2537
+ $link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] );
2538
+ $link = str_replace( '%#%', $n, $link );
2539
+ if ( $add_args )
2540
+ $link = add_query_arg( $add_args, $link );
2541
+ $link .= $args['add_fragment'];
2542
+
2543
+ /** This filter is documented in wp-includes/general-template.php */
2544
+ $page_links[] = "<a class='page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>" . $args['before_page_number'] . number_format_i18n( $n ) . $args['after_page_number'] . "</a>";
2545
+ $dots = true;
2546
+ elseif ( $dots && ! $args['show_all'] ) :
2547
+ $page_links[] = '<span class="page-numbers dots">' . __( '&hellip;' ) . '</span>';
2548
+ $dots = false;
2549
+ endif;
2550
+ endif;
2551
+ endfor;
2552
+ if ( $args['prev_next'] && $current && ( $current < $total || -1 == $total ) ) :
2553
+ $link = str_replace( '%_%', $args['format'], $args['base'] );
2554
+ $link = str_replace( '%#%', $current + 1, $link );
2555
+ if ( $add_args )
2556
+ $link = add_query_arg( $add_args, $link );
2557
+ $link .= $args['add_fragment'];
2558
+
2559
+ /** This filter is documented in wp-includes/general-template.php */
2560
+ $page_links[] = '<a class="next page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $args['next_text'] . '</a>';
2561
+ endif;
2562
+ switch ( $args['type'] ) {
2563
+ case 'array' :
2564
+ return $page_links;
2565
+
2566
+ case 'list' :
2567
+ $r .= "<ul class='page-numbers'>\n\t<li>";
2568
+ $r .= join("</li>\n\t<li>", $page_links);
2569
+ $r .= "</li>\n</ul>\n";
2570
+ break;
2571
+
2572
+ default :
2573
+ $r = join("\n", $page_links);
2574
+ break;
2575
+ }
2576
+ return $r;
2577
+ }
2578
+
2579
+ /**
2580
+ * Registers an admin colour scheme css file.
2581
+ *
2582
+ * Allows a plugin to register a new admin colour scheme. For example:
2583
+ * <code>
2584
+ * wp_admin_css_color('classic', __('Classic'), admin_url("css/colors-classic.css"),
2585
+ * array('#07273E', '#14568A', '#D54E21', '#2683AE'));
2586
+ * </code>
2587
+ *
2588
+ * @since 2.5.0
2589
+ *
2590
+ * @param string $key The unique key for this theme.
2591
+ * @param string $name The name of the theme.
2592
+ * @param string $url The url of the css file containing the colour scheme.
2593
+ * @param array $colors Optional An array of CSS color definitions which are used to give the user a feel for the theme.
2594
+ * @param array $icons Optional An array of CSS color definitions used to color any SVG icons
2595
+ */
2596
+ function wp_admin_css_color( $key, $name, $url, $colors = array(), $icons = array() ) {
2597
+ global $_wp_admin_css_colors;
2598
+
2599
+ if ( !isset($_wp_admin_css_colors) )
2600
+ $_wp_admin_css_colors = array();
2601
+
2602
+ $_wp_admin_css_colors[$key] = (object) array(
2603
+ 'name' => $name,
2604
+ 'url' => $url,
2605
+ 'colors' => $colors,
2606
+ 'icon_colors' => $icons,
2607
+ );
2608
+ }
2609
+
2610
+ /**
2611
+ * Registers the default Admin color schemes
2612
+ *
2613
+ * @since 3.0.0
2614
+ */
2615
+ function register_admin_color_schemes() {
2616
+ $suffix = is_rtl() ? '-rtl' : '';
2617
+ $suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
2618
+
2619
+ wp_admin_css_color( 'fresh', _x( 'Default', 'admin color scheme' ),
2620
+ false,
2621
+ array( '#222', '#333', '#0074a2', '#2ea2cc' ),
2622
+ array( 'base' => '#999', 'focus' => '#2ea2cc', 'current' => '#fff' )
2623
+ );
2624
+
2625
+ // Other color schemes are not available when running out of src
2626
+ if ( false !== strpos( $GLOBALS['wp_version'], '-src' ) )
2627
+ return;
2628
+
2629
+ wp_admin_css_color( 'light', _x( 'Light', 'admin color scheme' ),
2630
+ admin_url( "css/colors/light/colors$suffix.css" ),
2631
+ array( '#e5e5e5', '#999', '#d64e07', '#04a4cc' ),
2632
+ array( 'base' => '#999', 'focus' => '#ccc', 'current' => '#ccc' )
2633
+ );
2634
+
2635
+ wp_admin_css_color( 'blue', _x( 'Blue', 'admin color scheme' ),
2636
+ admin_url( "css/colors/blue/colors$suffix.css" ),
2637
+ array( '#096484', '#4796b3', '#52accc', '#74B6CE' ),
2638
+ array( 'base' => '#e5f8ff', 'focus' => '#fff', 'current' => '#fff' )
2639
+ );
2640
+
2641
+ wp_admin_css_color( 'midnight', _x( 'Midnight', 'admin color scheme' ),
2642
+ admin_url( "css/colors/midnight/colors$suffix.css" ),
2643
+ array( '#25282b', '#363b3f', '#69a8bb', '#e14d43' ),
2644
+ array( 'base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff' )
2645
+ );
2646
+
2647
+ wp_admin_css_color( 'sunrise', _x( 'Sunrise', 'admin color scheme' ),
2648
+ admin_url( "css/colors/sunrise/colors$suffix.css" ),
2649
+ array( '#b43c38', '#cf4944', '#dd823b', '#ccaf0b' ),
2650
+ array( 'base' => '#f3f1f1', 'focus' => '#fff', 'current' => '#fff' )
2651
+ );
2652
+
2653
+ wp_admin_css_color( 'ectoplasm', _x( 'Ectoplasm', 'admin color scheme' ),
2654
+ admin_url( "css/colors/ectoplasm/colors$suffix.css" ),
2655
+ array( '#413256', '#523f6d', '#a3b745', '#d46f15' ),
2656
+ array( 'base' => '#ece6f6', 'focus' => '#fff', 'current' => '#fff' )
2657
+ );
2658
+
2659
+ wp_admin_css_color( 'ocean', _x( 'Ocean', 'admin color scheme' ),
2660
+ admin_url( "css/colors/ocean/colors$suffix.css" ),
2661
+ array( '#627c83', '#738e96', '#9ebaa0', '#aa9d88' ),
2662
+ array( 'base' => '#f2fcff', 'focus' => '#fff', 'current' => '#fff' )
2663
+ );
2664
+
2665
+ wp_admin_css_color( 'coffee', _x( 'Coffee', 'admin color scheme' ),
2666
+ admin_url( "css/colors/coffee/colors$suffix.css" ),
2667
+ array( '#46403c', '#59524c', '#c7a589', '#9ea476' ),
2668
+ array( 'base' => '#f3f2f1', 'focus' => '#fff', 'current' => '#fff' )
2669
+ );
2670
+
2671
+ }
2672
+
2673
+ /**
2674
+ * Display the URL of a WordPress admin CSS file.
2675
+ *
2676
+ * @see WP_Styles::_css_href and its style_loader_src filter.
2677
+ *
2678
+ * @since 2.3.0
2679
+ *
2680
+ * @param string $file file relative to wp-admin/ without its ".css" extension.
2681
+ */
2682
+ function wp_admin_css_uri( $file = 'wp-admin' ) {
2683
+ if ( defined('WP_INSTALLING') ) {
2684
+ $_file = "./$file.css";
2685
+ } else {
2686
+ $_file = admin_url("$file.css");
2687
+ }
2688
+ $_file = add_query_arg( 'version', get_bloginfo( 'version' ), $_file );
2689
+
2690
+ /**
2691
+ * Filter the URI of a WordPress admin CSS file.
2692
+ *
2693
+ * @since 2.3.0
2694
+ *
2695
+ * @param string $_file Relative path to the file with query arguments attached.
2696
+ * @param string $file Relative path to the file, minus its ".css" extension.
2697
+ */
2698
+ return apply_filters( 'wp_admin_css_uri', $_file, $file );
2699
+ }
2700
+
2701
+ /**
2702
+ * Enqueues or directly prints a stylesheet link to the specified CSS file.
2703
+ *
2704
+ * "Intelligently" decides to enqueue or to print the CSS file. If the
2705
+ * 'wp_print_styles' action has *not* yet been called, the CSS file will be
2706
+ * enqueued. If the wp_print_styles action *has* been called, the CSS link will
2707
+ * be printed. Printing may be forced by passing true as the $force_echo
2708
+ * (second) parameter.
2709
+ *
2710
+ * For backward compatibility with WordPress 2.3 calling method: If the $file
2711
+ * (first) parameter does not correspond to a registered CSS file, we assume
2712
+ * $file is a file relative to wp-admin/ without its ".css" extension. A
2713
+ * stylesheet link to that generated URL is printed.
2714
+ *
2715
+ * @since 2.3.0
2716
+ * @uses $wp_styles WordPress Styles Object
2717
+ *
2718
+ * @param string $file Optional. Style handle name or file name (without ".css" extension) relative
2719
+ * to wp-admin/. Defaults to 'wp-admin'.
2720
+ * @param bool $force_echo Optional. Force the stylesheet link to be printed rather than enqueued.
2721
+ */
2722
+ function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
2723
+ global $wp_styles;
2724
+ if ( !is_a($wp_styles, 'WP_Styles') )
2725
+ $wp_styles = new WP_Styles();
2726
+
2727
+ // For backward compatibility
2728
+ $handle = 0 === strpos( $file, 'css/' ) ? substr( $file, 4 ) : $file;
2729
+
2730
+ if ( $wp_styles->query( $handle ) ) {
2731
+ if ( $force_echo || did_action( 'wp_print_styles' ) ) // we already printed the style queue. Print this one immediately
2732
+ wp_print_styles( $handle );
2733
+ else // Add to style queue
2734
+ wp_enqueue_style( $handle );
2735
+ return;
2736
+ }
2737
+
2738
+ /**
2739
+ * Filter the stylesheet link to the specified CSS file.
2740
+ *
2741
+ * If the site is set to display right-to-left, the RTL stylesheet link
2742
+ * will be used instead.
2743
+ *
2744
+ * @since 2.3.0
2745
+ *
2746
+ * @param string $file Style handle name or filename (without ".css" extension)
2747
+ * relative to wp-admin/. Defaults to 'wp-admin'.
2748
+ */
2749
+ echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );
2750
+
2751
+ if ( function_exists( 'is_rtl' ) && is_rtl() ) {
2752
+ /** This filter is documented in wp-includes/general-template.php */
2753
+ echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" );
2754
+ }
2755
+ }
2756
+
2757
+ /**
2758
+ * Enqueues the default ThickBox js and css.
2759
+ *
2760
+ * If any of the settings need to be changed, this can be done with another js
2761
+ * file similar to media-upload.js. That file should
2762
+ * require array('thickbox') to ensure it is loaded after.
2763
+ *
2764
+ * @since 2.5.0
2765
+ */
2766
+ function add_thickbox() {
2767
+ wp_enqueue_script( 'thickbox' );
2768
+ wp_enqueue_style( 'thickbox' );
2769
+
2770
+ if ( is_network_admin() )
2771
+ add_action( 'admin_head', '_thickbox_path_admin_subfolder' );
2772
+ }
2773
+
2774
+ /**
2775
+ * Display the XHTML generator that is generated on the wp_head hook.
2776
+ *
2777
+ * @since 2.5.0
2778
+ */
2779
+ function wp_generator() {
2780
+ /**
2781
+ * Filter the output of the XHTML generator tag.
2782
+ *
2783
+ * @since 2.5.0
2784
+ *
2785
+ * @param string $generator_type The XHTML generator.
2786
+ */
2787
+ the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) );
2788
+ }
2789
+
2790
+ /**
2791
+ * Display the generator XML or Comment for RSS, ATOM, etc.
2792
+ *
2793
+ * Returns the correct generator type for the requested output format. Allows
2794
+ * for a plugin to filter generators overall the the_generator filter.
2795
+ *
2796
+ * @since 2.5.0
2797
+ *
2798
+ * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export).
2799
+ */
2800
+ function the_generator( $type ) {
2801
+ /**
2802
+ * Filter the output of the XHTML generator tag for display.
2803
+ *
2804
+ * @since 2.5.0
2805
+ *
2806
+ * @param string $generator_type The generator output.
2807
+ * @param string $type The type of generator to output. Accepts 'html',
2808
+ * 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.
2809
+ */
2810
+ echo apply_filters( 'the_generator', get_the_generator($type), $type ) . "\n";
2811
+ }
2812
+
2813
+ /**
2814
+ * Creates the generator XML or Comment for RSS, ATOM, etc.
2815
+ *
2816
+ * Returns the correct generator type for the requested output format. Allows
2817
+ * for a plugin to filter generators on an individual basis using the
2818
+ * 'get_the_generator_{$type}' filter.
2819
+ *
2820
+ * @since 2.5.0
2821
+ *
2822
+ * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export).
2823
+ * @return string The HTML content for the generator.
2824
+ */
2825
+ function get_the_generator( $type = '' ) {
2826
+ if ( empty( $type ) ) {
2827
+
2828
+ $current_filter = current_filter();
2829
+ if ( empty( $current_filter ) )
2830
+ return;
2831
+
2832
+ switch ( $current_filter ) {
2833
+ case 'rss2_head' :
2834
+ case 'commentsrss2_head' :
2835
+ $type = 'rss2';
2836
+ break;
2837
+ case 'rss_head' :
2838
+ case 'opml_head' :
2839
+ $type = 'comment';
2840
+ break;
2841
+ case 'rdf_header' :
2842
+ $type = 'rdf';
2843
+ break;
2844
+ case 'atom_head' :
2845
+ case 'comments_atom_head' :
2846
+ case 'app_head' :
2847
+ $type = 'atom';
2848
+ break;
2849
+ }
2850
+ }
2851
+
2852
+ switch ( $type ) {
2853
+ case 'html':
2854
+ $gen = '<meta name="generator" content="WordPress ' . get_bloginfo( 'version' ) . '">';
2855
+ break;
2856
+ case 'xhtml':
2857
+ $gen = '<meta name="generator" content="WordPress ' . get_bloginfo( 'version' ) . '" />';
2858
+ break;
2859
+ case 'atom':
2860
+ $gen = '<generator uri="http://wordpress.org/" version="' . get_bloginfo_rss( 'version' ) . '">WordPress</generator>';
2861
+ break;
2862
+ case 'rss2':
2863
+ $gen = '<generator>http://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . '</generator>';
2864
+ break;
2865
+ case 'rdf':
2866
+ $gen = '<admin:generatorAgent rdf:resource="http://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . '" />';
2867
+ break;
2868
+ case 'comment':
2869
+ $gen = '<!-- generator="WordPress/' . get_bloginfo( 'version' ) . '" -->';
2870
+ break;
2871
+ case 'export':
2872
+ $gen = '<!-- generator="WordPress/' . get_bloginfo_rss('version') . '" created="'. date('Y-m-d H:i') . '" -->';
2873
+ break;
2874
+ }
2875
+
2876
+ /**
2877
+ * Filter the HTML for the retrieved generator type.
2878
+ *
2879
+ * The dynamic portion of the hook name, $type, refers to the generator type.
2880
+ *
2881
+ * @since 2.5.0
2882
+ *
2883
+ * @param string $gen The HTML markup output to 'wp_head()'.
2884
+ * @param string $type The type of generator. Accepts 'html', 'xhtml', 'atom',
2885
+ * 'rss2', 'rdf', 'comment', 'export'.
2886
+ */
2887
+ return apply_filters( "get_the_generator_{$type}", $gen, $type );
2888
+ }
2889
+
2890
+ /**
2891
+ * Outputs the html checked attribute.
2892
+ *
2893
+ * Compares the first two arguments and if identical marks as checked
2894
+ *
2895
+ * @since 1.0.0
2896
+ *
2897
+ * @param mixed $checked One of the values to compare
2898
+ * @param mixed $current (true) The other value to compare if not just true
2899
+ * @param bool $echo Whether to echo or just return the string
2900
+ * @return string html attribute or empty string
2901
+ */
2902
+ function checked( $checked, $current = true, $echo = true ) {
2903
+ return __checked_selected_helper( $checked, $current, $echo, 'checked' );
2904
+ }
2905
+
2906
+ /**
2907
+ * Outputs the html selected attribute.
2908
+ *
2909
+ * Compares the first two arguments and if identical marks as selected
2910
+ *
2911
+ * @since 1.0.0
2912
+ *
2913
+ * @param mixed $selected One of the values to compare
2914
+ * @param mixed $current (true) The other value to compare if not just true
2915
+ * @param bool $echo Whether to echo or just return the string
2916
+ * @return string html attribute or empty string
2917
+ */
2918
+ function selected( $selected, $current = true, $echo = true ) {
2919
+ return __checked_selected_helper( $selected, $current, $echo, 'selected' );
2920
+ }
2921
+
2922
+ /**
2923
+ * Outputs the html disabled attribute.
2924
+ *
2925
+ * Compares the first two arguments and if identical marks as disabled
2926
+ *
2927
+ * @since 3.0.0
2928
+ *
2929
+ * @param mixed $disabled One of the values to compare
2930
+ * @param mixed $current (true) The other value to compare if not just true
2931
+ * @param bool $echo Whether to echo or just return the string
2932
+ * @return string html attribute or empty string
2933
+ */
2934
+ function disabled( $disabled, $current = true, $echo = true ) {
2935
+ return __checked_selected_helper( $disabled, $current, $echo, 'disabled' );
2936
+ }
2937
+
2938
+ /**
2939
+ * Private helper function for checked, selected, and disabled.
2940
+ *
2941
+ * Compares the first two arguments and if identical marks as $type
2942
+ *
2943
+ * @since 2.8.0
2944
+ * @access private
2945
+ *
2946
+ * @param mixed $helper One of the values to compare
2947
+ * @param mixed $current (true) The other value to compare if not just true
2948
+ * @param bool $echo Whether to echo or just return the string
2949
+ * @param string $type The type of checked|selected|disabled we are doing
2950
+ * @return string html attribute or empty string
2951
+ */
2952
+ function __checked_selected_helper( $helper, $current, $echo, $type ) {
2953
+ if ( (string) $helper === (string) $current )
2954
+ $result = " $type='$type'";
2955
+ else
2956
+ $result = '';
2957
+
2958
+ if ( $echo )
2959
+ echo $result;
2960
+
2961
+ return $result;
2962
+ }
2963
+
2964
+ /**
2965
+ * Default settings for heartbeat
2966
+ *
2967
+ * Outputs the nonce used in the heartbeat XHR
2968
+ *
2969
+ * @since 3.6.0
2970
+ *
2971
+ * @param array $settings
2972
+ * @return array $settings
2973
+ */
2974
+ function wp_heartbeat_settings( $settings ) {
2975
+ if ( ! is_admin() )
2976
+ $settings['ajaxurl'] = admin_url( 'admin-ajax.php', 'relative' );
2977
+
2978
+ if ( is_user_logged_in() )
2979
+ $settings['nonce'] = wp_create_nonce( 'heartbeat-nonce' );
2980
+
2981
+ return $settings;
2982
+ }