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,2180 @@
1
+ <?php
2
+ /**
3
+ * WordPress Rewrite API
4
+ *
5
+ * @package WordPress
6
+ * @subpackage Rewrite
7
+ */
8
+
9
+ /**
10
+ * Add a straight rewrite rule.
11
+ *
12
+ * @see WP_Rewrite::add_rule() for long description.
13
+ * @since 2.1.0
14
+ *
15
+ * @param string $regex Regular Expression to match request against.
16
+ * @param string $redirect Page to redirect to.
17
+ * @param string $after Optional, default is 'bottom'. Where to add rule, can also be 'top'.
18
+ */
19
+ function add_rewrite_rule($regex, $redirect, $after = 'bottom') {
20
+ global $wp_rewrite;
21
+ $wp_rewrite->add_rule($regex, $redirect, $after);
22
+ }
23
+
24
+ /**
25
+ * Add a new rewrite tag (like %postname%).
26
+ *
27
+ * The $query parameter is optional. If it is omitted you must ensure that
28
+ * you call this on, or before, the 'init' hook. This is because $query defaults
29
+ * to "$tag=", and for this to work a new query var has to be added.
30
+ *
31
+ * @see WP_Rewrite::add_rewrite_tag()
32
+ * @since 2.1.0
33
+ *
34
+ * @param string $tag Name of the new rewrite tag.
35
+ * @param string $regex Regular expression to substitute the tag for in rewrite rules.
36
+ * @param string $query String to append to the rewritten query. Must end in '='. Optional.
37
+ */
38
+ function add_rewrite_tag( $tag, $regex, $query = '' ) {
39
+ // validate the tag's name
40
+ if ( strlen( $tag ) < 3 || $tag[0] != '%' || $tag[ strlen($tag) - 1 ] != '%' )
41
+ return;
42
+
43
+ global $wp_rewrite, $wp;
44
+
45
+ if ( empty( $query ) ) {
46
+ $qv = trim( $tag, '%' );
47
+ $wp->add_query_var( $qv );
48
+ $query = $qv . '=';
49
+ }
50
+
51
+ $wp_rewrite->add_rewrite_tag( $tag, $regex, $query );
52
+ }
53
+
54
+ /**
55
+ * Add permalink structure.
56
+ *
57
+ * @see WP_Rewrite::add_permastruct()
58
+ * @since 3.0.0
59
+ *
60
+ * @param string $name Name for permalink structure.
61
+ * @param string $struct Permalink structure.
62
+ * @param array $args Optional configuration for building the rules from the permalink structure,
63
+ * see {@link WP_Rewrite::add_permastruct()} for full details.
64
+ */
65
+ function add_permastruct( $name, $struct, $args = array() ) {
66
+ global $wp_rewrite;
67
+
68
+ // backwards compatibility for the old parameters: $with_front and $ep_mask
69
+ if ( ! is_array( $args ) )
70
+ $args = array( 'with_front' => $args );
71
+ if ( func_num_args() == 4 )
72
+ $args['ep_mask'] = func_get_arg( 3 );
73
+
74
+ return $wp_rewrite->add_permastruct( $name, $struct, $args );
75
+ }
76
+
77
+ /**
78
+ * Add a new feed type like /atom1/.
79
+ *
80
+ * @since 2.1.0
81
+ *
82
+ * @param string $feedname
83
+ * @param callback $function Callback to run on feed display.
84
+ * @return string Feed action name.
85
+ */
86
+ function add_feed($feedname, $function) {
87
+ global $wp_rewrite;
88
+ if ( ! in_array($feedname, $wp_rewrite->feeds) ) //override the file if it is
89
+ $wp_rewrite->feeds[] = $feedname;
90
+ $hook = 'do_feed_' . $feedname;
91
+ // Remove default function hook
92
+ remove_action($hook, $hook);
93
+ add_action($hook, $function, 10, 1);
94
+ return $hook;
95
+ }
96
+
97
+ /**
98
+ * Remove rewrite rules and then recreate rewrite rules.
99
+ *
100
+ * @see WP_Rewrite::flush_rules()
101
+ * @since 3.0.0
102
+ *
103
+ * @param bool $hard Whether to update .htaccess (hard flush) or just update
104
+ * rewrite_rules transient (soft flush). Default is true (hard).
105
+ */
106
+ function flush_rewrite_rules( $hard = true ) {
107
+ global $wp_rewrite;
108
+ $wp_rewrite->flush_rules( $hard );
109
+ }
110
+
111
+ /**
112
+ * Endpoint Mask for default, which is nothing.
113
+ *
114
+ * @since 2.1.0
115
+ */
116
+ define('EP_NONE', 0);
117
+
118
+ /**
119
+ * Endpoint Mask for Permalink.
120
+ *
121
+ * @since 2.1.0
122
+ */
123
+ define('EP_PERMALINK', 1);
124
+
125
+ /**
126
+ * Endpoint Mask for Attachment.
127
+ *
128
+ * @since 2.1.0
129
+ */
130
+ define('EP_ATTACHMENT', 2);
131
+
132
+ /**
133
+ * Endpoint Mask for date.
134
+ *
135
+ * @since 2.1.0
136
+ */
137
+ define('EP_DATE', 4);
138
+
139
+ /**
140
+ * Endpoint Mask for year
141
+ *
142
+ * @since 2.1.0
143
+ */
144
+ define('EP_YEAR', 8);
145
+
146
+ /**
147
+ * Endpoint Mask for month.
148
+ *
149
+ * @since 2.1.0
150
+ */
151
+ define('EP_MONTH', 16);
152
+
153
+ /**
154
+ * Endpoint Mask for day.
155
+ *
156
+ * @since 2.1.0
157
+ */
158
+ define('EP_DAY', 32);
159
+
160
+ /**
161
+ * Endpoint Mask for root.
162
+ *
163
+ * @since 2.1.0
164
+ */
165
+ define('EP_ROOT', 64);
166
+
167
+ /**
168
+ * Endpoint Mask for comments.
169
+ *
170
+ * @since 2.1.0
171
+ */
172
+ define('EP_COMMENTS', 128);
173
+
174
+ /**
175
+ * Endpoint Mask for searches.
176
+ *
177
+ * @since 2.1.0
178
+ */
179
+ define('EP_SEARCH', 256);
180
+
181
+ /**
182
+ * Endpoint Mask for categories.
183
+ *
184
+ * @since 2.1.0
185
+ */
186
+ define('EP_CATEGORIES', 512);
187
+
188
+ /**
189
+ * Endpoint Mask for tags.
190
+ *
191
+ * @since 2.3.0
192
+ */
193
+ define('EP_TAGS', 1024);
194
+
195
+ /**
196
+ * Endpoint Mask for authors.
197
+ *
198
+ * @since 2.1.0
199
+ */
200
+ define('EP_AUTHORS', 2048);
201
+
202
+ /**
203
+ * Endpoint Mask for pages.
204
+ *
205
+ * @since 2.1.0
206
+ */
207
+ define('EP_PAGES', 4096);
208
+
209
+ /**
210
+ * Endpoint Mask for all archive views.
211
+ *
212
+ * @since 3.7.0
213
+ */
214
+ define( 'EP_ALL_ARCHIVES', EP_DATE | EP_YEAR | EP_MONTH | EP_DAY | EP_CATEGORIES | EP_TAGS | EP_AUTHORS );
215
+
216
+ /**
217
+ * Endpoint Mask for everything.
218
+ *
219
+ * @since 2.1.0
220
+ */
221
+ define( 'EP_ALL', EP_PERMALINK | EP_ATTACHMENT | EP_ROOT | EP_COMMENTS | EP_SEARCH | EP_PAGES | EP_ALL_ARCHIVES );
222
+
223
+ /**
224
+ * Add an endpoint, like /trackback/.
225
+ *
226
+ * Adding an endpoint creates extra rewrite rules for each of the matching
227
+ * places specified by the provided bitmask. For example:
228
+ *
229
+ * <code>
230
+ * add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
231
+ * </code>
232
+ *
233
+ * will add a new rewrite rule ending with "json(/(.*))?/?$" for every permastruct
234
+ * that describes a permalink (post) or page. This is rewritten to "json=$match"
235
+ * where $match is the part of the URL matched by the endpoint regex (e.g. "foo" in
236
+ * "<permalink>/json/foo/").
237
+ *
238
+ * A new query var with the same name as the endpoint will also be created.
239
+ *
240
+ * When specifying $places ensure that you are using the EP_* constants (or a
241
+ * combination of them using the bitwise OR operator) as their values are not
242
+ * guaranteed to remain static (especially EP_ALL).
243
+ *
244
+ * Be sure to flush the rewrite rules - flush_rewrite_rules() - when your plugin gets
245
+ * activated and deactivated.
246
+ *
247
+ * @since 2.1.0
248
+ * @see WP_Rewrite::add_endpoint()
249
+ * @global object $wp_rewrite
250
+ *
251
+ * @param string $name Name of the endpoint.
252
+ * @param int $places Endpoint mask describing the places the endpoint should be added.
253
+ * @param string $query_var Name of the corresponding query variable. Defaults to $name.
254
+ */
255
+ function add_rewrite_endpoint( $name, $places, $query_var = null ) {
256
+ global $wp_rewrite;
257
+ $wp_rewrite->add_endpoint( $name, $places, $query_var );
258
+ }
259
+
260
+ /**
261
+ * Filter the URL base for taxonomies.
262
+ *
263
+ * To remove any manually prepended /index.php/.
264
+ *
265
+ * @access private
266
+ * @since 2.6.0
267
+ *
268
+ * @param string $base The taxonomy base that we're going to filter
269
+ * @return string
270
+ */
271
+ function _wp_filter_taxonomy_base( $base ) {
272
+ if ( !empty( $base ) ) {
273
+ $base = preg_replace( '|^/index\.php/|', '', $base );
274
+ $base = trim( $base, '/' );
275
+ }
276
+ return $base;
277
+ }
278
+
279
+ /**
280
+ * Examine a url and try to determine the post ID it represents.
281
+ *
282
+ * Checks are supposedly from the hosted site blog.
283
+ *
284
+ * @since 1.0.0
285
+ *
286
+ * @param string $url Permalink to check.
287
+ * @return int Post ID, or 0 on failure.
288
+ */
289
+ function url_to_postid($url) {
290
+ global $wp_rewrite;
291
+
292
+ /**
293
+ * Filter the URL to derive the post ID from.
294
+ *
295
+ * @since 2.2.0
296
+ *
297
+ * @param string $url The URL to derive the post ID from.
298
+ */
299
+ $url = apply_filters( 'url_to_postid', $url );
300
+
301
+ // First, check to see if there is a 'p=N' or 'page_id=N' to match against
302
+ if ( preg_match('#[?&](p|page_id|attachment_id)=(\d+)#', $url, $values) ) {
303
+ $id = absint($values[2]);
304
+ if ( $id )
305
+ return $id;
306
+ }
307
+
308
+ // Check to see if we are using rewrite rules
309
+ $rewrite = $wp_rewrite->wp_rewrite_rules();
310
+
311
+ // Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options
312
+ if ( empty($rewrite) )
313
+ return 0;
314
+
315
+ // Get rid of the #anchor
316
+ $url_split = explode('#', $url);
317
+ $url = $url_split[0];
318
+
319
+ // Get rid of URL ?query=string
320
+ $url_split = explode('?', $url);
321
+ $url = $url_split[0];
322
+
323
+ // Add 'www.' if it is absent and should be there
324
+ if ( false !== strpos(home_url(), '://www.') && false === strpos($url, '://www.') )
325
+ $url = str_replace('://', '://www.', $url);
326
+
327
+ // Strip 'www.' if it is present and shouldn't be
328
+ if ( false === strpos(home_url(), '://www.') )
329
+ $url = str_replace('://www.', '://', $url);
330
+
331
+ // Strip 'index.php/' if we're not using path info permalinks
332
+ if ( !$wp_rewrite->using_index_permalinks() )
333
+ $url = str_replace( $wp_rewrite->index . '/', '', $url );
334
+
335
+ if ( false !== strpos( trailingslashit( $url ), home_url( '/' ) ) ) {
336
+ // Chop off http://domain.com/[path]
337
+ $url = str_replace(home_url(), '', $url);
338
+ } else {
339
+ // Chop off /path/to/blog
340
+ $home_path = parse_url( home_url( '/' ) );
341
+ $home_path = isset( $home_path['path'] ) ? $home_path['path'] : '' ;
342
+ $url = preg_replace( sprintf( '#^%s#', preg_quote( $home_path ) ), '', trailingslashit( $url ) );
343
+ }
344
+
345
+ // Trim leading and lagging slashes
346
+ $url = trim($url, '/');
347
+
348
+ $request = $url;
349
+ $post_type_query_vars = array();
350
+
351
+ foreach ( get_post_types( array() , 'objects' ) as $post_type => $t ) {
352
+ if ( ! empty( $t->query_var ) )
353
+ $post_type_query_vars[ $t->query_var ] = $post_type;
354
+ }
355
+
356
+ // Look for matches.
357
+ $request_match = $request;
358
+ foreach ( (array)$rewrite as $match => $query) {
359
+
360
+ // If the requesting file is the anchor of the match, prepend it
361
+ // to the path info.
362
+ if ( !empty($url) && ($url != $request) && (strpos($match, $url) === 0) )
363
+ $request_match = $url . '/' . $request;
364
+
365
+ if ( preg_match("#^$match#", $request_match, $matches) ) {
366
+
367
+ if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
368
+ // this is a verbose page match, lets check to be sure about it
369
+ if ( ! get_page_by_path( $matches[ $varmatch[1] ] ) )
370
+ continue;
371
+ }
372
+
373
+ // Got a match.
374
+ // Trim the query of everything up to the '?'.
375
+ $query = preg_replace("!^.+\?!", '', $query);
376
+
377
+ // Substitute the substring matches into the query.
378
+ $query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
379
+
380
+ // Filter out non-public query vars
381
+ global $wp;
382
+ parse_str( $query, $query_vars );
383
+ $query = array();
384
+ foreach ( (array) $query_vars as $key => $value ) {
385
+ if ( in_array( $key, $wp->public_query_vars ) ){
386
+ $query[$key] = $value;
387
+ if ( isset( $post_type_query_vars[$key] ) ) {
388
+ $query['post_type'] = $post_type_query_vars[$key];
389
+ $query['name'] = $value;
390
+ }
391
+ }
392
+ }
393
+
394
+ // Do the query
395
+ $query = new WP_Query( $query );
396
+ if ( ! empty( $query->posts ) && $query->is_singular )
397
+ return $query->post->ID;
398
+ else
399
+ return 0;
400
+ }
401
+ }
402
+ return 0;
403
+ }
404
+
405
+ /**
406
+ * WordPress Rewrite Component.
407
+ *
408
+ * The WordPress Rewrite class writes the rewrite module rules to the .htaccess
409
+ * file. It also handles parsing the request to get the correct setup for the
410
+ * WordPress Query class.
411
+ *
412
+ * The Rewrite along with WP class function as a front controller for WordPress.
413
+ * You can add rules to trigger your page view and processing using this
414
+ * component. The full functionality of a front controller does not exist,
415
+ * meaning you can't define how the template files load based on the rewrite
416
+ * rules.
417
+ *
418
+ * @since 1.5.0
419
+ */
420
+ class WP_Rewrite {
421
+ /**
422
+ * Permalink structure for posts.
423
+ *
424
+ * @since 1.5.0
425
+ * @access private
426
+ * @var string
427
+ */
428
+ var $permalink_structure;
429
+
430
+ /**
431
+ * Whether to add trailing slashes.
432
+ *
433
+ * @since 2.2.0
434
+ * @access private
435
+ * @var bool
436
+ */
437
+ var $use_trailing_slashes;
438
+
439
+ /**
440
+ * Base for the author permalink structure (example.com/$author_base/authorname).
441
+ *
442
+ * @since 1.5.0
443
+ * @access private
444
+ * @var string
445
+ */
446
+ var $author_base = 'author';
447
+
448
+ /**
449
+ * Permalink structure for author archives.
450
+ *
451
+ * @since 1.5.0
452
+ * @access private
453
+ * @var string
454
+ */
455
+ var $author_structure;
456
+
457
+ /**
458
+ * Permalink structure for date archives.
459
+ *
460
+ * @since 1.5.0
461
+ * @access private
462
+ * @var string
463
+ */
464
+ var $date_structure;
465
+
466
+ /**
467
+ * Permalink structure for pages.
468
+ *
469
+ * @since 1.5.0
470
+ * @access private
471
+ * @var string
472
+ */
473
+ var $page_structure;
474
+
475
+ /**
476
+ * Base of the search permalink structure (example.com/$search_base/query).
477
+ *
478
+ * @since 1.5.0
479
+ * @access private
480
+ * @var string
481
+ */
482
+ var $search_base = 'search';
483
+
484
+ /**
485
+ * Permalink structure for searches.
486
+ *
487
+ * @since 1.5.0
488
+ * @access private
489
+ * @var string
490
+ */
491
+ var $search_structure;
492
+
493
+ /**
494
+ * Comments permalink base.
495
+ *
496
+ * @since 1.5.0
497
+ * @access private
498
+ * @var string
499
+ */
500
+ var $comments_base = 'comments';
501
+
502
+ /**
503
+ * Pagination permalink base.
504
+ *
505
+ * @since 3.1.0
506
+ * @access private
507
+ * @var string
508
+ */
509
+ var $pagination_base = 'page';
510
+
511
+ /**
512
+ * Feed permalink base.
513
+ *
514
+ * @since 1.5.0
515
+ * @access private
516
+ * @var string
517
+ */
518
+ var $feed_base = 'feed';
519
+
520
+ /**
521
+ * Comments feed permalink structure.
522
+ *
523
+ * @since 1.5.0
524
+ * @access private
525
+ * @var string
526
+ */
527
+ var $comments_feed_structure;
528
+
529
+ /**
530
+ * Feed request permalink structure.
531
+ *
532
+ * @since 1.5.0
533
+ * @access private
534
+ * @var string
535
+ */
536
+ var $feed_structure;
537
+
538
+ /**
539
+ * The static portion of the post permalink structure.
540
+ *
541
+ * If the permalink structure is "/archive/%post_id%" then the front
542
+ * is "/archive/". If the permalink structure is "/%year%/%postname%/"
543
+ * then the front is "/".
544
+ *
545
+ * @see WP_Rewrite::init()
546
+ * @since 1.5.0
547
+ * @access private
548
+ * @var string
549
+ */
550
+ var $front;
551
+
552
+ /**
553
+ * The prefix for all permalink structures.
554
+ *
555
+ * If PATHINFO/index permalinks are in use then the root is the value of
556
+ * {@link WP_Rewrite::$index} with a trailing slash appended. Otherwise
557
+ * the root will be empty.
558
+ *
559
+ * @see WP_Rewrite::init()
560
+ * @see WP_Rewrite::using_index_permalinks()
561
+ * @since 1.5.0
562
+ * @access private
563
+ * @var string
564
+ */
565
+ var $root = '';
566
+
567
+ /**
568
+ * The name of the index file which is the entry point to all requests.
569
+ *
570
+ * @since 1.5.0
571
+ * @access public
572
+ * @var string
573
+ */
574
+ public $index = 'index.php';
575
+
576
+ /**
577
+ * Variable name to use for regex matches in the rewritten query.
578
+ *
579
+ * @since 1.5.0
580
+ * @access private
581
+ * @var string
582
+ */
583
+ var $matches = '';
584
+
585
+ /**
586
+ * Rewrite rules to match against the request to find the redirect or query.
587
+ *
588
+ * @since 1.5.0
589
+ * @access private
590
+ * @var array
591
+ */
592
+ var $rules;
593
+
594
+ /**
595
+ * Additional rules added external to the rewrite class.
596
+ *
597
+ * Those not generated by the class, see add_rewrite_rule().
598
+ *
599
+ * @since 2.1.0
600
+ * @access private
601
+ * @var array
602
+ */
603
+ var $extra_rules = array();
604
+
605
+ /**
606
+ * Additional rules that belong at the beginning to match first.
607
+ *
608
+ * Those not generated by the class, see add_rewrite_rule().
609
+ *
610
+ * @since 2.3.0
611
+ * @access private
612
+ * @var array
613
+ */
614
+ var $extra_rules_top = array();
615
+
616
+ /**
617
+ * Rules that don't redirect to WordPress' index.php.
618
+ *
619
+ * These rules are written to the mod_rewrite portion of the .htaccess,
620
+ * and are added by {@link add_external_rule()}.
621
+ *
622
+ * @since 2.1.0
623
+ * @access private
624
+ * @var array
625
+ */
626
+ var $non_wp_rules = array();
627
+
628
+ /**
629
+ * Extra permalink structures, e.g. categories, added by {@link add_permastruct()}.
630
+ *
631
+ * @since 2.1.0
632
+ * @access private
633
+ * @var array
634
+ */
635
+ var $extra_permastructs = array();
636
+
637
+ /**
638
+ * Endpoints (like /trackback/) added by {@link add_rewrite_endpoint()}.
639
+ *
640
+ * @since 2.1.0
641
+ * @access private
642
+ * @var array
643
+ */
644
+ var $endpoints;
645
+
646
+ /**
647
+ * Whether to write every mod_rewrite rule for WordPress into the .htaccess file.
648
+ *
649
+ * This is off by default, turning it on might print a lot of rewrite rules
650
+ * to the .htaccess file.
651
+ *
652
+ * @see WP_Rewrite::mod_rewrite_rules()
653
+ * @since 2.0.0
654
+ * @access public
655
+ * @var bool
656
+ */
657
+ public $use_verbose_rules = false;
658
+
659
+ /**
660
+ * Could post permalinks be confused with those of pages?
661
+ *
662
+ * If the first rewrite tag in the post permalink structure is one that could
663
+ * also match a page name (e.g. %postname% or %author%) then this flag is
664
+ * set to true. Prior to WordPress 3.3 this flag indicated that every page
665
+ * would have a set of rules added to the top of the rewrite rules array.
666
+ * Now it tells {@link WP::parse_request()} to check if a URL matching the
667
+ * page permastruct is actually a page before accepting it.
668
+ *
669
+ * @link https://core.trac.wordpress.org/ticket/16687
670
+ * @see WP_Rewrite::init()
671
+ * @since 2.5.0
672
+ * @access public
673
+ * @var bool
674
+ */
675
+ public $use_verbose_page_rules = true;
676
+
677
+ /**
678
+ * Rewrite tags that can be used in permalink structures.
679
+ *
680
+ * These are translated into the regular expressions stored in
681
+ * {@link WP_Rewrite::$rewritereplace} and are rewritten to the
682
+ * query variables listed in {@link WP_Rewrite::$queryreplace}.
683
+ *
684
+ * Additional tags can be added with {@link add_rewrite_tag()}.
685
+ *
686
+ * @since 1.5.0
687
+ * @access private
688
+ * @var array
689
+ */
690
+ var $rewritecode = array(
691
+ '%year%',
692
+ '%monthnum%',
693
+ '%day%',
694
+ '%hour%',
695
+ '%minute%',
696
+ '%second%',
697
+ '%postname%',
698
+ '%post_id%',
699
+ '%author%',
700
+ '%pagename%',
701
+ '%search%'
702
+ );
703
+
704
+ /**
705
+ * Regular expressions to be substituted into rewrite rules in place
706
+ * of rewrite tags, see {@link WP_Rewrite::$rewritecode}.
707
+ *
708
+ * @since 1.5.0
709
+ * @access private
710
+ * @var array
711
+ */
712
+ var $rewritereplace = array(
713
+ '([0-9]{4})',
714
+ '([0-9]{1,2})',
715
+ '([0-9]{1,2})',
716
+ '([0-9]{1,2})',
717
+ '([0-9]{1,2})',
718
+ '([0-9]{1,2})',
719
+ '([^/]+)',
720
+ '([0-9]+)',
721
+ '([^/]+)',
722
+ '([^/]+?)',
723
+ '(.+)'
724
+ );
725
+
726
+ /**
727
+ * Query variables that rewrite tags map to, see {@link WP_Rewrite::$rewritecode}.
728
+ *
729
+ * @since 1.5.0
730
+ * @access private
731
+ * @var array
732
+ */
733
+ var $queryreplace = array(
734
+ 'year=',
735
+ 'monthnum=',
736
+ 'day=',
737
+ 'hour=',
738
+ 'minute=',
739
+ 'second=',
740
+ 'name=',
741
+ 'p=',
742
+ 'author_name=',
743
+ 'pagename=',
744
+ 's='
745
+ );
746
+
747
+ /**
748
+ * Supported default feeds.
749
+ *
750
+ * @since 1.5.0
751
+ * @access private
752
+ * @var array
753
+ */
754
+ var $feeds = array( 'feed', 'rdf', 'rss', 'rss2', 'atom' );
755
+
756
+ /**
757
+ * Whether permalinks are being used.
758
+ *
759
+ * This can be either rewrite module or permalink in the HTTP query string.
760
+ *
761
+ * @since 1.5.0
762
+ * @access public
763
+ *
764
+ * @return bool True, if permalinks are enabled.
765
+ */
766
+ public function using_permalinks() {
767
+ return ! empty($this->permalink_structure);
768
+ }
769
+
770
+ /**
771
+ * Whether permalinks are being used and rewrite module is not enabled.
772
+ *
773
+ * Means that permalink links are enabled and index.php is in the URL.
774
+ *
775
+ * @since 1.5.0
776
+ * @access public
777
+ *
778
+ * @return bool
779
+ */
780
+ public function using_index_permalinks() {
781
+ if ( empty($this->permalink_structure) )
782
+ return false;
783
+
784
+ // If the index is not in the permalink, we're using mod_rewrite.
785
+ if ( preg_match('#^/*' . $this->index . '#', $this->permalink_structure) )
786
+ return true;
787
+
788
+ return false;
789
+ }
790
+
791
+ /**
792
+ * Whether permalinks are being used and rewrite module is enabled.
793
+ *
794
+ * Using permalinks and index.php is not in the URL.
795
+ *
796
+ * @since 1.5.0
797
+ * @access public
798
+ *
799
+ * @return bool
800
+ */
801
+ public function using_mod_rewrite_permalinks() {
802
+ if ( $this->using_permalinks() && ! $this->using_index_permalinks() )
803
+ return true;
804
+ else
805
+ return false;
806
+ }
807
+
808
+ /**
809
+ * Index for matches for usage in preg_*() functions.
810
+ *
811
+ * The format of the string is, with empty matches property value, '$NUM'.
812
+ * The 'NUM' will be replaced with the value in the $number parameter. With
813
+ * the matches property not empty, the value of the returned string will
814
+ * contain that value of the matches property. The format then will be
815
+ * '$MATCHES[NUM]', with MATCHES as the value in the property and NUM the
816
+ * value of the $number parameter.
817
+ *
818
+ * @since 1.5.0
819
+ * @access public
820
+ *
821
+ * @param int $number Index number.
822
+ * @return string
823
+ */
824
+ public function preg_index($number) {
825
+ $match_prefix = '$';
826
+ $match_suffix = '';
827
+
828
+ if ( ! empty($this->matches) ) {
829
+ $match_prefix = '$' . $this->matches . '[';
830
+ $match_suffix = ']';
831
+ }
832
+
833
+ return "$match_prefix$number$match_suffix";
834
+ }
835
+
836
+ /**
837
+ * Retrieve all page and attachments for pages URIs.
838
+ *
839
+ * The attachments are for those that have pages as parents and will be
840
+ * retrieved.
841
+ *
842
+ * @since 2.5.0
843
+ * @access public
844
+ *
845
+ * @return array Array of page URIs as first element and attachment URIs as second element.
846
+ */
847
+ public function page_uri_index() {
848
+ global $wpdb;
849
+
850
+ //get pages in order of hierarchy, i.e. children after parents
851
+ $pages = $wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page' AND post_status != 'auto-draft'");
852
+ $posts = get_page_hierarchy( $pages );
853
+
854
+ // If we have no pages get out quick
855
+ if ( !$posts )
856
+ return array( array(), array() );
857
+
858
+ //now reverse it, because we need parents after children for rewrite rules to work properly
859
+ $posts = array_reverse($posts, true);
860
+
861
+ $page_uris = array();
862
+ $page_attachment_uris = array();
863
+
864
+ foreach ( $posts as $id => $post ) {
865
+ // URL => page name
866
+ $uri = get_page_uri($id);
867
+ $attachments = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent = %d", $id ));
868
+ if ( !empty($attachments) ) {
869
+ foreach ( $attachments as $attachment ) {
870
+ $attach_uri = get_page_uri($attachment->ID);
871
+ $page_attachment_uris[$attach_uri] = $attachment->ID;
872
+ }
873
+ }
874
+
875
+ $page_uris[$uri] = $id;
876
+ }
877
+
878
+ return array( $page_uris, $page_attachment_uris );
879
+ }
880
+
881
+ /**
882
+ * Retrieve all of the rewrite rules for pages.
883
+ *
884
+ * @since 1.5.0
885
+ * @access public
886
+ *
887
+ * @return array
888
+ */
889
+ public function page_rewrite_rules() {
890
+ // the extra .? at the beginning prevents clashes with other regular expressions in the rules array
891
+ $this->add_rewrite_tag( '%pagename%', '(.?.+?)', 'pagename=' );
892
+
893
+ return $this->generate_rewrite_rules( $this->get_page_permastruct(), EP_PAGES, true, true, false, false );
894
+ }
895
+
896
+ /**
897
+ * Retrieve date permalink structure, with year, month, and day.
898
+ *
899
+ * The permalink structure for the date, if not set already depends on the
900
+ * permalink structure. It can be one of three formats. The first is year,
901
+ * month, day; the second is day, month, year; and the last format is month,
902
+ * day, year. These are matched against the permalink structure for which
903
+ * one is used. If none matches, then the default will be used, which is
904
+ * year, month, day.
905
+ *
906
+ * Prevents post ID and date permalinks from overlapping. In the case of
907
+ * post_id, the date permalink will be prepended with front permalink with
908
+ * 'date/' before the actual permalink to form the complete date permalink
909
+ * structure.
910
+ *
911
+ * @since 1.5.0
912
+ * @access public
913
+ *
914
+ * @return bool|string False on no permalink structure. Date permalink structure.
915
+ */
916
+ public function get_date_permastruct() {
917
+ if ( isset($this->date_structure) )
918
+ return $this->date_structure;
919
+
920
+ if ( empty($this->permalink_structure) ) {
921
+ $this->date_structure = '';
922
+ return false;
923
+ }
924
+
925
+ // The date permalink must have year, month, and day separated by slashes.
926
+ $endians = array('%year%/%monthnum%/%day%', '%day%/%monthnum%/%year%', '%monthnum%/%day%/%year%');
927
+
928
+ $this->date_structure = '';
929
+ $date_endian = '';
930
+
931
+ foreach ( $endians as $endian ) {
932
+ if ( false !== strpos($this->permalink_structure, $endian) ) {
933
+ $date_endian= $endian;
934
+ break;
935
+ }
936
+ }
937
+
938
+ if ( empty($date_endian) )
939
+ $date_endian = '%year%/%monthnum%/%day%';
940
+
941
+ // Do not allow the date tags and %post_id% to overlap in the permalink
942
+ // structure. If they do, move the date tags to $front/date/.
943
+ $front = $this->front;
944
+ preg_match_all('/%.+?%/', $this->permalink_structure, $tokens);
945
+ $tok_index = 1;
946
+ foreach ( (array) $tokens[0] as $token) {
947
+ if ( '%post_id%' == $token && ($tok_index <= 3) ) {
948
+ $front = $front . 'date/';
949
+ break;
950
+ }
951
+ $tok_index++;
952
+ }
953
+
954
+ $this->date_structure = $front . $date_endian;
955
+
956
+ return $this->date_structure;
957
+ }
958
+
959
+ /**
960
+ * Retrieve the year permalink structure without month and day.
961
+ *
962
+ * Gets the date permalink structure and strips out the month and day
963
+ * permalink structures.
964
+ *
965
+ * @since 1.5.0
966
+ * @access public
967
+ *
968
+ * @return bool|string False on failure. Year structure on success.
969
+ */
970
+ public function get_year_permastruct() {
971
+ $structure = $this->get_date_permastruct();
972
+
973
+ if ( empty($structure) )
974
+ return false;
975
+
976
+ $structure = str_replace('%monthnum%', '', $structure);
977
+ $structure = str_replace('%day%', '', $structure);
978
+
979
+ $structure = preg_replace('#/+#', '/', $structure);
980
+
981
+ return $structure;
982
+ }
983
+
984
+ /**
985
+ * Retrieve the month permalink structure without day and with year.
986
+ *
987
+ * Gets the date permalink structure and strips out the day permalink
988
+ * structures. Keeps the year permalink structure.
989
+ *
990
+ * @since 1.5.0
991
+ * @access public
992
+ *
993
+ * @return bool|string False on failure. Year/Month structure on success.
994
+ */
995
+ public function get_month_permastruct() {
996
+ $structure = $this->get_date_permastruct();
997
+
998
+ if ( empty($structure) )
999
+ return false;
1000
+
1001
+ $structure = str_replace('%day%', '', $structure);
1002
+
1003
+ $structure = preg_replace('#/+#', '/', $structure);
1004
+
1005
+ return $structure;
1006
+ }
1007
+
1008
+ /**
1009
+ * Retrieve the day permalink structure with month and year.
1010
+ *
1011
+ * Keeps date permalink structure with all year, month, and day.
1012
+ *
1013
+ * @since 1.5.0
1014
+ * @access public
1015
+ *
1016
+ * @return bool|string False on failure. Year/Month/Day structure on success.
1017
+ */
1018
+ public function get_day_permastruct() {
1019
+ return $this->get_date_permastruct();
1020
+ }
1021
+
1022
+ /**
1023
+ * Retrieve the permalink structure for categories.
1024
+ *
1025
+ * If the category_base property has no value, then the category structure
1026
+ * will have the front property value, followed by 'category', and finally
1027
+ * '%category%'. If it does, then the root property will be used, along with
1028
+ * the category_base property value.
1029
+ *
1030
+ * @since 1.5.0
1031
+ * @access public
1032
+ *
1033
+ * @return bool|string False on failure. Category permalink structure.
1034
+ */
1035
+ public function get_category_permastruct() {
1036
+ return $this->get_extra_permastruct('category');
1037
+ }
1038
+
1039
+ /**
1040
+ * Retrieve the permalink structure for tags.
1041
+ *
1042
+ * If the tag_base property has no value, then the tag structure will have
1043
+ * the front property value, followed by 'tag', and finally '%tag%'. If it
1044
+ * does, then the root property will be used, along with the tag_base
1045
+ * property value.
1046
+ *
1047
+ * @since 2.3.0
1048
+ * @access public
1049
+ *
1050
+ * @return bool|string False on failure. Tag permalink structure.
1051
+ */
1052
+ public function get_tag_permastruct() {
1053
+ return $this->get_extra_permastruct('post_tag');
1054
+ }
1055
+
1056
+ /**
1057
+ * Retrieve extra permalink structure by name.
1058
+ *
1059
+ * @since 2.5.0
1060
+ * @access public
1061
+ *
1062
+ * @param string $name Permalink structure name.
1063
+ * @return string|bool False if not found. Permalink structure string.
1064
+ */
1065
+ public function get_extra_permastruct($name) {
1066
+ if ( empty($this->permalink_structure) )
1067
+ return false;
1068
+
1069
+ if ( isset($this->extra_permastructs[$name]) )
1070
+ return $this->extra_permastructs[$name]['struct'];
1071
+
1072
+ return false;
1073
+ }
1074
+
1075
+ /**
1076
+ * Retrieve the author permalink structure.
1077
+ *
1078
+ * The permalink structure is front property, author base, and finally
1079
+ * '/%author%'. Will set the author_structure property and then return it
1080
+ * without attempting to set the value again.
1081
+ *
1082
+ * @since 1.5.0
1083
+ * @access public
1084
+ *
1085
+ * @return string|bool False if not found. Permalink structure string.
1086
+ */
1087
+ public function get_author_permastruct() {
1088
+ if ( isset($this->author_structure) )
1089
+ return $this->author_structure;
1090
+
1091
+ if ( empty($this->permalink_structure) ) {
1092
+ $this->author_structure = '';
1093
+ return false;
1094
+ }
1095
+
1096
+ $this->author_structure = $this->front . $this->author_base . '/%author%';
1097
+
1098
+ return $this->author_structure;
1099
+ }
1100
+
1101
+ /**
1102
+ * Retrieve the search permalink structure.
1103
+ *
1104
+ * The permalink structure is root property, search base, and finally
1105
+ * '/%search%'. Will set the search_structure property and then return it
1106
+ * without attempting to set the value again.
1107
+ *
1108
+ * @since 1.5.0
1109
+ * @access public
1110
+ *
1111
+ * @return string|bool False if not found. Permalink structure string.
1112
+ */
1113
+ public function get_search_permastruct() {
1114
+ if ( isset($this->search_structure) )
1115
+ return $this->search_structure;
1116
+
1117
+ if ( empty($this->permalink_structure) ) {
1118
+ $this->search_structure = '';
1119
+ return false;
1120
+ }
1121
+
1122
+ $this->search_structure = $this->root . $this->search_base . '/%search%';
1123
+
1124
+ return $this->search_structure;
1125
+ }
1126
+
1127
+ /**
1128
+ * Retrieve the page permalink structure.
1129
+ *
1130
+ * The permalink structure is root property, and '%pagename%'. Will set the
1131
+ * page_structure property and then return it without attempting to set the
1132
+ * value again.
1133
+ *
1134
+ * @since 1.5.0
1135
+ * @access public
1136
+ *
1137
+ * @return string|bool False if not found. Permalink structure string.
1138
+ */
1139
+ public function get_page_permastruct() {
1140
+ if ( isset($this->page_structure) )
1141
+ return $this->page_structure;
1142
+
1143
+ if (empty($this->permalink_structure)) {
1144
+ $this->page_structure = '';
1145
+ return false;
1146
+ }
1147
+
1148
+ $this->page_structure = $this->root . '%pagename%';
1149
+
1150
+ return $this->page_structure;
1151
+ }
1152
+
1153
+ /**
1154
+ * Retrieve the feed permalink structure.
1155
+ *
1156
+ * The permalink structure is root property, feed base, and finally
1157
+ * '/%feed%'. Will set the feed_structure property and then return it
1158
+ * without attempting to set the value again.
1159
+ *
1160
+ * @since 1.5.0
1161
+ * @access public
1162
+ *
1163
+ * @return string|bool False if not found. Permalink structure string.
1164
+ */
1165
+ public function get_feed_permastruct() {
1166
+ if ( isset($this->feed_structure) )
1167
+ return $this->feed_structure;
1168
+
1169
+ if ( empty($this->permalink_structure) ) {
1170
+ $this->feed_structure = '';
1171
+ return false;
1172
+ }
1173
+
1174
+ $this->feed_structure = $this->root . $this->feed_base . '/%feed%';
1175
+
1176
+ return $this->feed_structure;
1177
+ }
1178
+
1179
+ /**
1180
+ * Retrieve the comment feed permalink structure.
1181
+ *
1182
+ * The permalink structure is root property, comment base property, feed
1183
+ * base and finally '/%feed%'. Will set the comment_feed_structure property
1184
+ * and then return it without attempting to set the value again.
1185
+ *
1186
+ * @since 1.5.0
1187
+ * @access public
1188
+ *
1189
+ * @return string|bool False if not found. Permalink structure string.
1190
+ */
1191
+ public function get_comment_feed_permastruct() {
1192
+ if ( isset($this->comment_feed_structure) )
1193
+ return $this->comment_feed_structure;
1194
+
1195
+ if (empty($this->permalink_structure)) {
1196
+ $this->comment_feed_structure = '';
1197
+ return false;
1198
+ }
1199
+
1200
+ $this->comment_feed_structure = $this->root . $this->comments_base . '/' . $this->feed_base . '/%feed%';
1201
+
1202
+ return $this->comment_feed_structure;
1203
+ }
1204
+
1205
+ /**
1206
+ * Add or update existing rewrite tags (e.g. %postname%).
1207
+ *
1208
+ * If the tag already exists, replace the existing pattern and query for
1209
+ * that tag, otherwise add the new tag.
1210
+ *
1211
+ * @see WP_Rewrite::$rewritecode
1212
+ * @see WP_Rewrite::$rewritereplace
1213
+ * @see WP_Rewrite::$queryreplace
1214
+ * @since 1.5.0
1215
+ * @access public
1216
+ *
1217
+ * @param string $tag Name of the rewrite tag to add or update.
1218
+ * @param string $regex Regular expression to substitute the tag for in rewrite rules.
1219
+ * @param string $query String to append to the rewritten query. Must end in '='.
1220
+ */
1221
+ public function add_rewrite_tag( $tag, $regex, $query ) {
1222
+ $position = array_search( $tag, $this->rewritecode );
1223
+ if ( false !== $position && null !== $position ) {
1224
+ $this->rewritereplace[ $position ] = $regex;
1225
+ $this->queryreplace[ $position ] = $query;
1226
+ } else {
1227
+ $this->rewritecode[] = $tag;
1228
+ $this->rewritereplace[] = $regex;
1229
+ $this->queryreplace[] = $query;
1230
+ }
1231
+ }
1232
+
1233
+ /**
1234
+ * Generate rewrite rules from a permalink structure.
1235
+ *
1236
+ * The main WP_Rewrite function for building the rewrite rule list. The
1237
+ * contents of the function is a mix of black magic and regular expressions,
1238
+ * so best just ignore the contents and move to the parameters.
1239
+ *
1240
+ * @since 1.5.0
1241
+ * @access public
1242
+ *
1243
+ * @param string $permalink_structure The permalink structure.
1244
+ * @param int $ep_mask Endpoint mask defining what endpoints are added to the structure. Default is EP_NONE.
1245
+ * @param bool $paged Should archive pagination rules be added for the structure? Default is true.
1246
+ * @param bool $feed Should feed rewrite rules be added for the structure? Default is true.
1247
+ * @param bool $forcomments Should the feed rules be a query for a comments feed? Default is false.
1248
+ * @param bool $walk_dirs Should the 'directories' making up the structure be walked over and rewrite rules
1249
+ * built for each in turn? Default is true.
1250
+ * @param bool $endpoints Should endpoints be applied to the generated rewrite rules? Default is true.
1251
+ * @return array Rewrite rule list.
1252
+ */
1253
+ public function generate_rewrite_rules($permalink_structure, $ep_mask = EP_NONE, $paged = true, $feed = true, $forcomments = false, $walk_dirs = true, $endpoints = true) {
1254
+ //build a regex to match the feed section of URLs, something like (feed|atom|rss|rss2)/?
1255
+ $feedregex2 = '';
1256
+ foreach ( (array) $this->feeds as $feed_name)
1257
+ $feedregex2 .= $feed_name . '|';
1258
+ $feedregex2 = '(' . trim($feedregex2, '|') . ')/?$';
1259
+
1260
+ //$feedregex is identical but with /feed/ added on as well, so URLs like <permalink>/feed/atom
1261
+ //and <permalink>/atom are both possible
1262
+ $feedregex = $this->feed_base . '/' . $feedregex2;
1263
+
1264
+ //build a regex to match the trackback and page/xx parts of URLs
1265
+ $trackbackregex = 'trackback/?$';
1266
+ $pageregex = $this->pagination_base . '/?([0-9]{1,})/?$';
1267
+ $commentregex = 'comment-page-([0-9]{1,})/?$';
1268
+
1269
+ //build up an array of endpoint regexes to append => queries to append
1270
+ if ( $endpoints ) {
1271
+ $ep_query_append = array ();
1272
+ foreach ( (array) $this->endpoints as $endpoint) {
1273
+ //match everything after the endpoint name, but allow for nothing to appear there
1274
+ $epmatch = $endpoint[1] . '(/(.*))?/?$';
1275
+ //this will be appended on to the rest of the query for each dir
1276
+ $epquery = '&' . $endpoint[2] . '=';
1277
+ $ep_query_append[$epmatch] = array ( $endpoint[0], $epquery );
1278
+ }
1279
+ }
1280
+
1281
+ //get everything up to the first rewrite tag
1282
+ $front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
1283
+ //build an array of the tags (note that said array ends up being in $tokens[0])
1284
+ preg_match_all('/%.+?%/', $permalink_structure, $tokens);
1285
+
1286
+ $num_tokens = count($tokens[0]);
1287
+
1288
+ $index = $this->index; //probably 'index.php'
1289
+ $feedindex = $index;
1290
+ $trackbackindex = $index;
1291
+ //build a list from the rewritecode and queryreplace arrays, that will look something like
1292
+ //tagname=$matches[i] where i is the current $i
1293
+ for ( $i = 0; $i < $num_tokens; ++$i ) {
1294
+ if ( 0 < $i )
1295
+ $queries[$i] = $queries[$i - 1] . '&';
1296
+ else
1297
+ $queries[$i] = '';
1298
+
1299
+ $query_token = str_replace($this->rewritecode, $this->queryreplace, $tokens[0][$i]) . $this->preg_index($i+1);
1300
+ $queries[$i] .= $query_token;
1301
+ }
1302
+
1303
+ //get the structure, minus any cruft (stuff that isn't tags) at the front
1304
+ $structure = $permalink_structure;
1305
+ if ( $front != '/' )
1306
+ $structure = str_replace($front, '', $structure);
1307
+
1308
+ //create a list of dirs to walk over, making rewrite rules for each level
1309
+ //so for example, a $structure of /%year%/%monthnum%/%postname% would create
1310
+ //rewrite rules for /%year%/, /%year%/%monthnum%/ and /%year%/%monthnum%/%postname%
1311
+ $structure = trim($structure, '/');
1312
+ $dirs = $walk_dirs ? explode('/', $structure) : array( $structure );
1313
+ $num_dirs = count($dirs);
1314
+
1315
+ //strip slashes from the front of $front
1316
+ $front = preg_replace('|^/+|', '', $front);
1317
+
1318
+ //the main workhorse loop
1319
+ $post_rewrite = array();
1320
+ $struct = $front;
1321
+ for ( $j = 0; $j < $num_dirs; ++$j ) {
1322
+ //get the struct for this dir, and trim slashes off the front
1323
+ $struct .= $dirs[$j] . '/'; //accumulate. see comment near explode('/', $structure) above
1324
+ $struct = ltrim($struct, '/');
1325
+
1326
+ //replace tags with regexes
1327
+ $match = str_replace($this->rewritecode, $this->rewritereplace, $struct);
1328
+
1329
+ //make a list of tags, and store how many there are in $num_toks
1330
+ $num_toks = preg_match_all('/%.+?%/', $struct, $toks);
1331
+
1332
+ //get the 'tagname=$matches[i]'
1333
+ $query = ( isset($queries) && is_array($queries) && !empty($num_toks) ) ? $queries[$num_toks - 1] : '';
1334
+
1335
+ //set up $ep_mask_specific which is used to match more specific URL types
1336
+ switch ( $dirs[$j] ) {
1337
+ case '%year%':
1338
+ $ep_mask_specific = EP_YEAR;
1339
+ break;
1340
+ case '%monthnum%':
1341
+ $ep_mask_specific = EP_MONTH;
1342
+ break;
1343
+ case '%day%':
1344
+ $ep_mask_specific = EP_DAY;
1345
+ break;
1346
+ default:
1347
+ $ep_mask_specific = EP_NONE;
1348
+ }
1349
+
1350
+ //create query for /page/xx
1351
+ $pagematch = $match . $pageregex;
1352
+ $pagequery = $index . '?' . $query . '&paged=' . $this->preg_index($num_toks + 1);
1353
+
1354
+ //create query for /comment-page-xx
1355
+ $commentmatch = $match . $commentregex;
1356
+ $commentquery = $index . '?' . $query . '&cpage=' . $this->preg_index($num_toks + 1);
1357
+
1358
+ if ( get_option('page_on_front') ) {
1359
+ //create query for Root /comment-page-xx
1360
+ $rootcommentmatch = $match . $commentregex;
1361
+ $rootcommentquery = $index . '?' . $query . '&page_id=' . get_option('page_on_front') . '&cpage=' . $this->preg_index($num_toks + 1);
1362
+ }
1363
+
1364
+ //create query for /feed/(feed|atom|rss|rss2|rdf)
1365
+ $feedmatch = $match . $feedregex;
1366
+ $feedquery = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
1367
+
1368
+ //create query for /(feed|atom|rss|rss2|rdf) (see comment near creation of $feedregex)
1369
+ $feedmatch2 = $match . $feedregex2;
1370
+ $feedquery2 = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
1371
+
1372
+ //if asked to, turn the feed queries into comment feed ones
1373
+ if ( $forcomments ) {
1374
+ $feedquery .= '&withcomments=1';
1375
+ $feedquery2 .= '&withcomments=1';
1376
+ }
1377
+
1378
+ //start creating the array of rewrites for this dir
1379
+ $rewrite = array();
1380
+ if ( $feed ) //...adding on /feed/ regexes => queries
1381
+ $rewrite = array($feedmatch => $feedquery, $feedmatch2 => $feedquery2);
1382
+ if ( $paged ) //...and /page/xx ones
1383
+ $rewrite = array_merge($rewrite, array($pagematch => $pagequery));
1384
+
1385
+ //only on pages with comments add ../comment-page-xx/
1386
+ if ( EP_PAGES & $ep_mask || EP_PERMALINK & $ep_mask )
1387
+ $rewrite = array_merge($rewrite, array($commentmatch => $commentquery));
1388
+ else if ( EP_ROOT & $ep_mask && get_option('page_on_front') )
1389
+ $rewrite = array_merge($rewrite, array($rootcommentmatch => $rootcommentquery));
1390
+
1391
+ //do endpoints
1392
+ if ( $endpoints ) {
1393
+ foreach ( (array) $ep_query_append as $regex => $ep) {
1394
+ //add the endpoints on if the mask fits
1395
+ if ( $ep[0] & $ep_mask || $ep[0] & $ep_mask_specific )
1396
+ $rewrite[$match . $regex] = $index . '?' . $query . $ep[1] . $this->preg_index($num_toks + 2);
1397
+ }
1398
+ }
1399
+
1400
+ //if we've got some tags in this dir
1401
+ if ( $num_toks ) {
1402
+ $post = false;
1403
+ $page = false;
1404
+
1405
+ //check to see if this dir is permalink-level: i.e. the structure specifies an
1406
+ //individual post. Do this by checking it contains at least one of 1) post name,
1407
+ //2) post ID, 3) page name, 4) timestamp (year, month, day, hour, second and
1408
+ //minute all present). Set these flags now as we need them for the endpoints.
1409
+ if ( strpos($struct, '%postname%') !== false
1410
+ || strpos($struct, '%post_id%') !== false
1411
+ || strpos($struct, '%pagename%') !== false
1412
+ || (strpos($struct, '%year%') !== false && strpos($struct, '%monthnum%') !== false && strpos($struct, '%day%') !== false && strpos($struct, '%hour%') !== false && strpos($struct, '%minute%') !== false && strpos($struct, '%second%') !== false)
1413
+ ) {
1414
+ $post = true;
1415
+ if ( strpos($struct, '%pagename%') !== false )
1416
+ $page = true;
1417
+ }
1418
+
1419
+ if ( ! $post ) {
1420
+ // For custom post types, we need to add on endpoints as well.
1421
+ foreach ( get_post_types( array('_builtin' => false ) ) as $ptype ) {
1422
+ if ( strpos($struct, "%$ptype%") !== false ) {
1423
+ $post = true;
1424
+ $page = is_post_type_hierarchical( $ptype ); // This is for page style attachment url's
1425
+ break;
1426
+ }
1427
+ }
1428
+ }
1429
+
1430
+ //if we're creating rules for a permalink, do all the endpoints like attachments etc
1431
+ if ( $post ) {
1432
+ //create query and regex for trackback
1433
+ $trackbackmatch = $match . $trackbackregex;
1434
+ $trackbackquery = $trackbackindex . '?' . $query . '&tb=1';
1435
+ //trim slashes from the end of the regex for this dir
1436
+ $match = rtrim($match, '/');
1437
+ //get rid of brackets
1438
+ $submatchbase = str_replace( array('(', ')'), '', $match);
1439
+
1440
+ //add a rule for at attachments, which take the form of <permalink>/some-text
1441
+ $sub1 = $submatchbase . '/([^/]+)/';
1442
+ $sub1tb = $sub1 . $trackbackregex; //add trackback regex <permalink>/trackback/...
1443
+ $sub1feed = $sub1 . $feedregex; //and <permalink>/feed/(atom|...)
1444
+ $sub1feed2 = $sub1 . $feedregex2; //and <permalink>/(feed|atom...)
1445
+ $sub1comment = $sub1 . $commentregex; //and <permalink>/comment-page-xx
1446
+
1447
+ //add another rule to match attachments in the explicit form:
1448
+ //<permalink>/attachment/some-text
1449
+ $sub2 = $submatchbase . '/attachment/([^/]+)/';
1450
+ $sub2tb = $sub2 . $trackbackregex; //and add trackbacks <permalink>/attachment/trackback
1451
+ $sub2feed = $sub2 . $feedregex; //feeds, <permalink>/attachment/feed/(atom|...)
1452
+ $sub2feed2 = $sub2 . $feedregex2; //and feeds again on to this <permalink>/attachment/(feed|atom...)
1453
+ $sub2comment = $sub2 . $commentregex; //and <permalink>/comment-page-xx
1454
+
1455
+ //create queries for these extra tag-ons we've just dealt with
1456
+ $subquery = $index . '?attachment=' . $this->preg_index(1);
1457
+ $subtbquery = $subquery . '&tb=1';
1458
+ $subfeedquery = $subquery . '&feed=' . $this->preg_index(2);
1459
+ $subcommentquery = $subquery . '&cpage=' . $this->preg_index(2);
1460
+
1461
+ //do endpoints for attachments
1462
+ if ( !empty($endpoints) ) {
1463
+ foreach ( (array) $ep_query_append as $regex => $ep ) {
1464
+ if ( $ep[0] & EP_ATTACHMENT ) {
1465
+ $rewrite[$sub1 . $regex] = $subquery . $ep[1] . $this->preg_index(3);
1466
+ $rewrite[$sub2 . $regex] = $subquery . $ep[1] . $this->preg_index(3);
1467
+ }
1468
+ }
1469
+ }
1470
+
1471
+ //now we've finished with endpoints, finish off the $sub1 and $sub2 matches
1472
+ //add a ? as we don't have to match that last slash, and finally a $ so we
1473
+ //match to the end of the URL
1474
+ $sub1 .= '?$';
1475
+ $sub2 .= '?$';
1476
+
1477
+ //post pagination, e.g. <permalink>/2/
1478
+ $match = $match . '(/[0-9]+)?/?$';
1479
+ $query = $index . '?' . $query . '&page=' . $this->preg_index($num_toks + 1);
1480
+ } else { //not matching a permalink so this is a lot simpler
1481
+ //close the match and finalise the query
1482
+ $match .= '?$';
1483
+ $query = $index . '?' . $query;
1484
+ }
1485
+
1486
+ //create the final array for this dir by joining the $rewrite array (which currently
1487
+ //only contains rules/queries for trackback, pages etc) to the main regex/query for
1488
+ //this dir
1489
+ $rewrite = array_merge($rewrite, array($match => $query));
1490
+
1491
+ //if we're matching a permalink, add those extras (attachments etc) on
1492
+ if ( $post ) {
1493
+ //add trackback
1494
+ $rewrite = array_merge(array($trackbackmatch => $trackbackquery), $rewrite);
1495
+
1496
+ //add regexes/queries for attachments, attachment trackbacks and so on
1497
+ if ( ! $page ) //require <permalink>/attachment/stuff form for pages because of confusion with subpages
1498
+ $rewrite = array_merge($rewrite, array($sub1 => $subquery, $sub1tb => $subtbquery, $sub1feed => $subfeedquery, $sub1feed2 => $subfeedquery, $sub1comment => $subcommentquery));
1499
+ $rewrite = array_merge(array($sub2 => $subquery, $sub2tb => $subtbquery, $sub2feed => $subfeedquery, $sub2feed2 => $subfeedquery, $sub2comment => $subcommentquery), $rewrite);
1500
+ }
1501
+ } //if($num_toks)
1502
+ //add the rules for this dir to the accumulating $post_rewrite
1503
+ $post_rewrite = array_merge($rewrite, $post_rewrite);
1504
+ } //foreach ($dir)
1505
+ return $post_rewrite; //the finished rules. phew!
1506
+ }
1507
+
1508
+ /**
1509
+ * Generate Rewrite rules with permalink structure and walking directory only.
1510
+ *
1511
+ * Shorten version of {@link WP_Rewrite::generate_rewrite_rules()} that
1512
+ * allows for shorter list of parameters. See the method for longer
1513
+ * description of what generating rewrite rules does.
1514
+ *
1515
+ * @uses WP_Rewrite::generate_rewrite_rules() See for long description and rest of parameters.
1516
+ * @since 1.5.0
1517
+ * @access public
1518
+ *
1519
+ * @param string $permalink_structure The permalink structure to generate rules.
1520
+ * @param bool $walk_dirs Optional, default is false. Whether to create list of directories to walk over.
1521
+ * @return array
1522
+ */
1523
+ public function generate_rewrite_rule($permalink_structure, $walk_dirs = false) {
1524
+ return $this->generate_rewrite_rules($permalink_structure, EP_NONE, false, false, false, $walk_dirs);
1525
+ }
1526
+
1527
+ /**
1528
+ * Construct rewrite matches and queries from permalink structure.
1529
+ *
1530
+ * Runs the action 'generate_rewrite_rules' with the parameter that is an
1531
+ * reference to the current WP_Rewrite instance to further manipulate the
1532
+ * permalink structures and rewrite rules. Runs the 'rewrite_rules_array'
1533
+ * filter on the full rewrite rule array.
1534
+ *
1535
+ * There are two ways to manipulate the rewrite rules, one by hooking into
1536
+ * the 'generate_rewrite_rules' action and gaining full control of the
1537
+ * object or just manipulating the rewrite rule array before it is passed
1538
+ * from the function.
1539
+ *
1540
+ * @since 1.5.0
1541
+ * @access public
1542
+ *
1543
+ * @return array An associate array of matches and queries.
1544
+ */
1545
+ public function rewrite_rules() {
1546
+ $rewrite = array();
1547
+
1548
+ if ( empty($this->permalink_structure) )
1549
+ return $rewrite;
1550
+
1551
+ // robots.txt -only if installed at the root
1552
+ $home_path = parse_url( home_url() );
1553
+ $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();
1554
+
1555
+ // Old feed and service files
1556
+ $deprecated_files = array(
1557
+ '.*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$' => $this->index . '?feed=old',
1558
+ '.*wp-app\.php(/.*)?$' => $this->index . '?error=403',
1559
+ );
1560
+
1561
+ // Registration rules
1562
+ $registration_pages = array();
1563
+ if ( is_multisite() && is_main_site() ) {
1564
+ $registration_pages['.*wp-signup.php$'] = $this->index . '?signup=true';
1565
+ $registration_pages['.*wp-activate.php$'] = $this->index . '?activate=true';
1566
+ }
1567
+ $registration_pages['.*wp-register.php$'] = $this->index . '?register=true'; // Deprecated
1568
+
1569
+ // Post rewrite rules.
1570
+ $post_rewrite = $this->generate_rewrite_rules( $this->permalink_structure, EP_PERMALINK );
1571
+
1572
+ /**
1573
+ * Filter rewrite rules used for "post" archives.
1574
+ *
1575
+ * @since 1.5.0
1576
+ *
1577
+ * @param array $post_rewrite The rewrite rules for posts.
1578
+ */
1579
+ $post_rewrite = apply_filters( 'post_rewrite_rules', $post_rewrite );
1580
+
1581
+ // Date rewrite rules.
1582
+ $date_rewrite = $this->generate_rewrite_rules($this->get_date_permastruct(), EP_DATE);
1583
+
1584
+ /**
1585
+ * Filter rewrite rules used for date archives.
1586
+ *
1587
+ * Likely date archives would include /yyyy/, /yyyy/mm/, and /yyyy/mm/dd/.
1588
+ *
1589
+ * @since 1.5.0
1590
+ *
1591
+ * @param array $date_rewrite The rewrite rules for date archives.
1592
+ */
1593
+ $date_rewrite = apply_filters( 'date_rewrite_rules', $date_rewrite );
1594
+
1595
+ // Root-level rewrite rules.
1596
+ $root_rewrite = $this->generate_rewrite_rules($this->root . '/', EP_ROOT);
1597
+
1598
+ /**
1599
+ * Filter rewrite rules used for root-level archives.
1600
+ *
1601
+ * Likely root-level archives would include pagination rules for the homepage
1602
+ * as well as site-wide post feeds (e.g. /feed/, and /feed/atom/).
1603
+ *
1604
+ * @since 1.5.0
1605
+ *
1606
+ * @param array $root_rewrite The root-level rewrite rules.
1607
+ */
1608
+ $root_rewrite = apply_filters( 'root_rewrite_rules', $root_rewrite );
1609
+
1610
+ // Comments rewrite rules.
1611
+ $comments_rewrite = $this->generate_rewrite_rules($this->root . $this->comments_base, EP_COMMENTS, false, true, true, false);
1612
+
1613
+ /**
1614
+ * Filter rewrite rules used for comment feed archives.
1615
+ *
1616
+ * Likely comments feed archives include /comments/feed/, and /comments/feed/atom/.
1617
+ *
1618
+ * @since 1.5.0
1619
+ *
1620
+ * @param array $comments_rewrite The rewrite rules for the site-wide comments feeds.
1621
+ */
1622
+ $comments_rewrite = apply_filters( 'comments_rewrite_rules', $comments_rewrite );
1623
+
1624
+ // Search rewrite rules.
1625
+ $search_structure = $this->get_search_permastruct();
1626
+ $search_rewrite = $this->generate_rewrite_rules($search_structure, EP_SEARCH);
1627
+
1628
+ /**
1629
+ * Filter rewrite rules used for search archives.
1630
+ *
1631
+ * Likely search-related archives include /search/search+query/ as well as
1632
+ * pagination and feed paths for a search.
1633
+ *
1634
+ * @since 1.5.0
1635
+ *
1636
+ * @param array $search_rewrite The rewrite rules for search queries.
1637
+ */
1638
+ $search_rewrite = apply_filters( 'search_rewrite_rules', $search_rewrite );
1639
+
1640
+ // Author rewrite rules.
1641
+ $author_rewrite = $this->generate_rewrite_rules($this->get_author_permastruct(), EP_AUTHORS);
1642
+
1643
+ /**
1644
+ * Filter rewrite rules used for author archives.
1645
+ *
1646
+ * Likely author archives would include /author/author-name/, as well as
1647
+ * pagination and feed paths for author archives.
1648
+ *
1649
+ * @since 1.5.0
1650
+ *
1651
+ * @param array $author_rewrite The rewrite rules for author archives.
1652
+ */
1653
+ $author_rewrite = apply_filters( 'author_rewrite_rules', $author_rewrite );
1654
+
1655
+ // Pages rewrite rules.
1656
+ $page_rewrite = $this->page_rewrite_rules();
1657
+
1658
+ /**
1659
+ * Filter rewrite rules used for "page" post type archives.
1660
+ *
1661
+ * @since 1.5.0
1662
+ *
1663
+ * @param array $page_rewrite The rewrite rules for the "page" post type.
1664
+ */
1665
+ $page_rewrite = apply_filters( 'page_rewrite_rules', $page_rewrite );
1666
+
1667
+ // Extra permastructs.
1668
+ foreach ( $this->extra_permastructs as $permastructname => $struct ) {
1669
+ if ( is_array( $struct ) ) {
1670
+ if ( count( $struct ) == 2 )
1671
+ $rules = $this->generate_rewrite_rules( $struct[0], $struct[1] );
1672
+ else
1673
+ $rules = $this->generate_rewrite_rules( $struct['struct'], $struct['ep_mask'], $struct['paged'], $struct['feed'], $struct['forcomments'], $struct['walk_dirs'], $struct['endpoints'] );
1674
+ } else {
1675
+ $rules = $this->generate_rewrite_rules( $struct );
1676
+ }
1677
+
1678
+ /**
1679
+ * Filter rewrite rules used for individual permastructs.
1680
+ *
1681
+ * The dynamic portion of the hook name, $permastructname, refers
1682
+ * to the name of the registered permastruct, e.g. 'post_tag' (tags),
1683
+ * 'category' (categories), etc.
1684
+ *
1685
+ * @since 3.1.0
1686
+ *
1687
+ * @param array $rules The rewrite rules generated for the current permastruct.
1688
+ */
1689
+ $rules = apply_filters( $permastructname . '_rewrite_rules', $rules );
1690
+ if ( 'post_tag' == $permastructname ) {
1691
+
1692
+ /**
1693
+ * Filter rewrite rules used specifically for Tags.
1694
+ *
1695
+ * @since 2.3.0
1696
+ * @deprecated 3.1.0 Use 'post_tag_rewrite_rules' instead
1697
+ *
1698
+ * @param array $rules The rewrite rules generated for tags.
1699
+ */
1700
+ $rules = apply_filters( 'tag_rewrite_rules', $rules );
1701
+ }
1702
+
1703
+ $this->extra_rules_top = array_merge($this->extra_rules_top, $rules);
1704
+ }
1705
+
1706
+ // Put them together.
1707
+ if ( $this->use_verbose_page_rules )
1708
+ $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $deprecated_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $page_rewrite, $post_rewrite, $this->extra_rules);
1709
+ else
1710
+ $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $deprecated_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);
1711
+
1712
+ /**
1713
+ * Fires after the rewrite rules are generated.
1714
+ *
1715
+ * @since 1.5.0
1716
+ *
1717
+ * @param WP_Rewrite $this Current WP_Rewrite instance, passed by reference.
1718
+ */
1719
+ do_action_ref_array( 'generate_rewrite_rules', array( &$this ) );
1720
+
1721
+ /**
1722
+ * Filter the full set of generated rewrite rules.
1723
+ *
1724
+ * @since 1.5.0
1725
+ *
1726
+ * @param array $this->rules The compiled array of rewrite rules.
1727
+ */
1728
+ $this->rules = apply_filters( 'rewrite_rules_array', $this->rules );
1729
+
1730
+ return $this->rules;
1731
+ }
1732
+
1733
+ /**
1734
+ * Retrieve the rewrite rules.
1735
+ *
1736
+ * The difference between this method and {@link
1737
+ * WP_Rewrite::rewrite_rules()} is that this method stores the rewrite rules
1738
+ * in the 'rewrite_rules' option and retrieves it. This prevents having to
1739
+ * process all of the permalinks to get the rewrite rules in the form of
1740
+ * caching.
1741
+ *
1742
+ * @since 1.5.0
1743
+ * @access public
1744
+ *
1745
+ * @return array Rewrite rules.
1746
+ */
1747
+ public function wp_rewrite_rules() {
1748
+ $this->rules = get_option('rewrite_rules');
1749
+ if ( empty($this->rules) ) {
1750
+ $this->matches = 'matches';
1751
+ $this->rewrite_rules();
1752
+ update_option('rewrite_rules', $this->rules);
1753
+ }
1754
+
1755
+ return $this->rules;
1756
+ }
1757
+
1758
+ /**
1759
+ * Retrieve mod_rewrite formatted rewrite rules to write to .htaccess.
1760
+ *
1761
+ * Does not actually write to the .htaccess file, but creates the rules for
1762
+ * the process that will.
1763
+ *
1764
+ * Will add the non_wp_rules property rules to the .htaccess file before
1765
+ * the WordPress rewrite rules one.
1766
+ *
1767
+ * @since 1.5.0
1768
+ * @access public
1769
+ *
1770
+ * @return string
1771
+ */
1772
+ public function mod_rewrite_rules() {
1773
+ if ( ! $this->using_permalinks() )
1774
+ return '';
1775
+
1776
+ $site_root = parse_url( site_url() );
1777
+ if ( isset( $site_root['path'] ) )
1778
+ $site_root = trailingslashit($site_root['path']);
1779
+
1780
+ $home_root = parse_url(home_url());
1781
+ if ( isset( $home_root['path'] ) )
1782
+ $home_root = trailingslashit($home_root['path']);
1783
+ else
1784
+ $home_root = '/';
1785
+
1786
+ $rules = "<IfModule mod_rewrite.c>\n";
1787
+ $rules .= "RewriteEngine On\n";
1788
+ $rules .= "RewriteBase $home_root\n";
1789
+ $rules .= "RewriteRule ^index\.php$ - [L]\n"; // Prevent -f checks on index.php.
1790
+
1791
+ //add in the rules that don't redirect to WP's index.php (and thus shouldn't be handled by WP at all)
1792
+ foreach ( (array) $this->non_wp_rules as $match => $query) {
1793
+ // Apache 1.3 does not support the reluctant (non-greedy) modifier.
1794
+ $match = str_replace('.+?', '.+', $match);
1795
+
1796
+ // If the match is unanchored and greedy, prepend rewrite conditions
1797
+ // to avoid infinite redirects and eclipsing of real files.
1798
+ //if ($match == '(.+)/?$' || $match == '([^/]+)/?$' ) {
1799
+ //nada.
1800
+ //}
1801
+
1802
+ $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n";
1803
+ }
1804
+
1805
+ if ( $this->use_verbose_rules ) {
1806
+ $this->matches = '';
1807
+ $rewrite = $this->rewrite_rules();
1808
+ $num_rules = count($rewrite);
1809
+ $rules .= "RewriteCond %{REQUEST_FILENAME} -f [OR]\n" .
1810
+ "RewriteCond %{REQUEST_FILENAME} -d\n" .
1811
+ "RewriteRule ^.*$ - [S=$num_rules]\n";
1812
+
1813
+ foreach ( (array) $rewrite as $match => $query) {
1814
+ // Apache 1.3 does not support the reluctant (non-greedy) modifier.
1815
+ $match = str_replace('.+?', '.+', $match);
1816
+
1817
+ // If the match is unanchored and greedy, prepend rewrite conditions
1818
+ // to avoid infinite redirects and eclipsing of real files.
1819
+ //if ($match == '(.+)/?$' || $match == '([^/]+)/?$' ) {
1820
+ //nada.
1821
+ //}
1822
+
1823
+ if ( strpos($query, $this->index) !== false )
1824
+ $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n";
1825
+ else
1826
+ $rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA,L]\n";
1827
+ }
1828
+ } else {
1829
+ $rules .= "RewriteCond %{REQUEST_FILENAME} !-f\n" .
1830
+ "RewriteCond %{REQUEST_FILENAME} !-d\n" .
1831
+ "RewriteRule . {$home_root}{$this->index} [L]\n";
1832
+ }
1833
+
1834
+ $rules .= "</IfModule>\n";
1835
+
1836
+ /**
1837
+ *
1838
+ * Filter the list of rewrite rules formatted for output to an .htaccess file.
1839
+ *
1840
+ * @since 1.5.0
1841
+ *
1842
+ * @param string $rules mod_rewrite Rewrite rules formatted for .htaccess.
1843
+ */
1844
+ $rules = apply_filters( 'mod_rewrite_rules', $rules );
1845
+
1846
+ /**
1847
+ * Filter the list of rewrite rules formatted for output to an .htaccess file.
1848
+ *
1849
+ * @since 1.5.0
1850
+ * @deprecated 1.5.0 Use the mod_rewrite_rules filter instead.
1851
+ *
1852
+ * @param string $rules mod_rewrite Rewrite rules formatted for .htaccess.
1853
+ */
1854
+ $rules = apply_filters( 'rewrite_rules', $rules ); // Deprecated
1855
+
1856
+ return $rules;
1857
+ }
1858
+
1859
+ /**
1860
+ * Retrieve IIS7 URL Rewrite formatted rewrite rules to write to web.config file.
1861
+ *
1862
+ * Does not actually write to the web.config file, but creates the rules for
1863
+ * the process that will.
1864
+ *
1865
+ * @since 2.8.0
1866
+ * @access public
1867
+ *
1868
+ * @return string
1869
+ */
1870
+ public function iis7_url_rewrite_rules( $add_parent_tags = false ) {
1871
+
1872
+ if ( ! $this->using_permalinks() )
1873
+ return '';
1874
+ $rules = '';
1875
+ if ( $add_parent_tags ) {
1876
+ $rules .= '<configuration>
1877
+ <system.webServer>
1878
+ <rewrite>
1879
+ <rules>';
1880
+ }
1881
+
1882
+ $rules .= '
1883
+ <rule name="wordpress" patternSyntax="Wildcard">
1884
+ <match url="*" />
1885
+ <conditions>
1886
+ <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
1887
+ <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
1888
+ </conditions>
1889
+ <action type="Rewrite" url="index.php" />
1890
+ </rule>';
1891
+
1892
+ if ( $add_parent_tags ) {
1893
+ $rules .= '
1894
+ </rules>
1895
+ </rewrite>
1896
+ </system.webServer>
1897
+ </configuration>';
1898
+ }
1899
+
1900
+ /**
1901
+ * Filter the list of rewrite rules formatted for output to a web.config.
1902
+ *
1903
+ * @since 2.8.0
1904
+ *
1905
+ * @param string $rules Rewrite rules formatted for IIS web.config.
1906
+ */
1907
+ $rules = apply_filters( 'iis7_url_rewrite_rules', $rules );
1908
+
1909
+ return $rules;
1910
+ }
1911
+
1912
+ /**
1913
+ * Add a straight rewrite rule.
1914
+ *
1915
+ * Any value in the $after parameter that isn't 'bottom' will be placed at
1916
+ * the top of the rules.
1917
+ *
1918
+ * @since 2.1.0
1919
+ * @access public
1920
+ *
1921
+ * @param string $regex Regular expression to match against request.
1922
+ * @param string $redirect URL regex redirects to when regex matches request.
1923
+ * @param string $after Optional, default is bottom. Location to place rule.
1924
+ */
1925
+ public function add_rule($regex, $redirect, $after = 'bottom') {
1926
+ //get everything up to the first ?
1927
+ $index = (strpos($redirect, '?') == false ? strlen($redirect) : strpos($redirect, '?'));
1928
+ $front = substr($redirect, 0, $index);
1929
+ if ( $front != $this->index ) { //it doesn't redirect to WP's index.php
1930
+ $this->add_external_rule($regex, $redirect);
1931
+ } else {
1932
+ if ( 'bottom' == $after)
1933
+ $this->extra_rules = array_merge($this->extra_rules, array($regex => $redirect));
1934
+ else
1935
+ $this->extra_rules_top = array_merge($this->extra_rules_top, array($regex => $redirect));
1936
+ //$this->extra_rules[$regex] = $redirect;
1937
+ }
1938
+ }
1939
+
1940
+ /**
1941
+ * Add a rule that doesn't redirect to index.php.
1942
+ *
1943
+ * Can redirect to any place.
1944
+ *
1945
+ * @since 2.1.0
1946
+ * @access public
1947
+ *
1948
+ * @param string $regex Regular expression to match against request.
1949
+ * @param string $redirect URL regex redirects to when regex matches request.
1950
+ */
1951
+ public function add_external_rule($regex, $redirect) {
1952
+ $this->non_wp_rules[$regex] = $redirect;
1953
+ }
1954
+
1955
+ /**
1956
+ * Add an endpoint, like /trackback/.
1957
+ *
1958
+ * @since 2.1.0
1959
+ * @since 3.9.0 $query_var parameter added.
1960
+ * @access public
1961
+ *
1962
+ * @see add_rewrite_endpoint() for full documentation.
1963
+ * @uses WP::add_query_var()
1964
+ *
1965
+ * @param string $name Name of the endpoint.
1966
+ * @param int $places Endpoint mask describing the places the endpoint should be added.
1967
+ * @param string $query_var Name of the corresponding query variable. Default is value of $name.
1968
+ */
1969
+ public function add_endpoint( $name, $places, $query_var = null ) {
1970
+ global $wp;
1971
+ if ( null === $query_var ) {
1972
+ $query_var = $name;
1973
+ }
1974
+ $this->endpoints[] = array( $places, $name, $query_var );
1975
+ $wp->add_query_var( $query_var );
1976
+ }
1977
+
1978
+ /**
1979
+ * Add a new permalink structure.
1980
+ *
1981
+ * A permalink structure (permastruct) is an abstract definition of a set of rewrite rules; it
1982
+ * is an easy way of expressing a set of regular expressions that rewrite to a set of query strings.
1983
+ * The new permastruct is added to the {@link WP_Rewrite::$extra_permastructs} array. When the
1984
+ * rewrite rules are built by {@link WP_Rewrite::rewrite_rules()} all of these extra permastructs
1985
+ * are passed to {@link WP_Rewrite::generate_rewrite_rules()} which transforms them into the
1986
+ * regular expressions that many love to hate.
1987
+ *
1988
+ * The $args parameter gives you control over how {@link WP_Rewrite::generate_rewrite_rules()}
1989
+ * works on the new permastruct.
1990
+ *
1991
+ * @since 2.5.0
1992
+ * @access public
1993
+ *
1994
+ * @param string $name Name for permalink structure.
1995
+ * @param string $struct Permalink structure (e.g. category/%category%)
1996
+ * @param array $args Optional configuration for building the rules from the permalink structure:
1997
+ * - with_front (bool) - Should the structure be prepended with WP_Rewrite::$front? Default is true.
1998
+ * - ep_mask (int) - Endpoint mask defining what endpoints are added to the structure. Default is EP_NONE.
1999
+ * - paged (bool) - Should archive pagination rules be added for the structure? Default is true.
2000
+ * - feed (bool) - Should feed rewrite rules be added for the structure? Default is true.
2001
+ * - forcomments (bool) - Should the feed rules be a query for a comments feed? Default is false.
2002
+ * - walk_dirs (bool) - Should the 'directories' making up the structure be walked over and rewrite
2003
+ * rules built for each in turn? Default is true.
2004
+ * - endpoints (bool) - Should endpoints be applied to the generated rewrite rules? Default is true.
2005
+ */
2006
+ public function add_permastruct( $name, $struct, $args = array() ) {
2007
+ // backwards compatibility for the old parameters: $with_front and $ep_mask
2008
+ if ( ! is_array( $args ) )
2009
+ $args = array( 'with_front' => $args );
2010
+ if ( func_num_args() == 4 )
2011
+ $args['ep_mask'] = func_get_arg( 3 );
2012
+
2013
+ $defaults = array(
2014
+ 'with_front' => true,
2015
+ 'ep_mask' => EP_NONE,
2016
+ 'paged' => true,
2017
+ 'feed' => true,
2018
+ 'forcomments' => false,
2019
+ 'walk_dirs' => true,
2020
+ 'endpoints' => true,
2021
+ );
2022
+ $args = array_intersect_key( $args, $defaults );
2023
+ $args = wp_parse_args( $args, $defaults );
2024
+
2025
+ if ( $args['with_front'] )
2026
+ $struct = $this->front . $struct;
2027
+ else
2028
+ $struct = $this->root . $struct;
2029
+ $args['struct'] = $struct;
2030
+
2031
+ $this->extra_permastructs[ $name ] = $args;
2032
+ }
2033
+
2034
+ /**
2035
+ * Remove rewrite rules and then recreate rewrite rules.
2036
+ *
2037
+ * Calls {@link WP_Rewrite::wp_rewrite_rules()} after removing the
2038
+ * 'rewrite_rules' option. If the function named 'save_mod_rewrite_rules'
2039
+ * exists, it will be called.
2040
+ *
2041
+ * @since 2.0.1
2042
+ * @access public
2043
+ * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
2044
+ */
2045
+ public function flush_rules($hard = true) {
2046
+ delete_option('rewrite_rules');
2047
+ $this->wp_rewrite_rules();
2048
+ /**
2049
+ * Filter whether a "hard" rewrite rule flush should be performed when requested.
2050
+ *
2051
+ * A "hard" flush updates .htaccess (Apache) or web.config (IIS).
2052
+ *
2053
+ * @since 3.7.0
2054
+ *
2055
+ * @param bool $hard Whether to flush rewrite rules "hard". Default true.
2056
+ */
2057
+ if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) ) {
2058
+ return;
2059
+ }
2060
+ if ( function_exists( 'save_mod_rewrite_rules' ) )
2061
+ save_mod_rewrite_rules();
2062
+ if ( function_exists( 'iis7_save_url_rewrite_rules' ) )
2063
+ iis7_save_url_rewrite_rules();
2064
+ }
2065
+
2066
+ /**
2067
+ * Sets up the object's properties.
2068
+ *
2069
+ * The 'use_verbose_page_rules' object property will be set to true if the
2070
+ * permalink structure begins with one of the following: '%postname%', '%category%',
2071
+ * '%tag%', or '%author%'.
2072
+ *
2073
+ * @since 1.5.0
2074
+ * @access public
2075
+ */
2076
+ public function init() {
2077
+ $this->extra_rules = $this->non_wp_rules = $this->endpoints = array();
2078
+ $this->permalink_structure = get_option('permalink_structure');
2079
+ $this->front = substr($this->permalink_structure, 0, strpos($this->permalink_structure, '%'));
2080
+ $this->root = '';
2081
+ if ( $this->using_index_permalinks() )
2082
+ $this->root = $this->index . '/';
2083
+ unset($this->author_structure);
2084
+ unset($this->date_structure);
2085
+ unset($this->page_structure);
2086
+ unset($this->search_structure);
2087
+ unset($this->feed_structure);
2088
+ unset($this->comment_feed_structure);
2089
+ $this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) );
2090
+
2091
+ // Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
2092
+ if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) )
2093
+ $this->use_verbose_page_rules = true;
2094
+ else
2095
+ $this->use_verbose_page_rules = false;
2096
+ }
2097
+
2098
+ /**
2099
+ * Set the main permalink structure for the blog.
2100
+ *
2101
+ * Will update the 'permalink_structure' option, if there is a difference
2102
+ * between the current permalink structure and the parameter value. Calls
2103
+ * {@link WP_Rewrite::init()} after the option is updated.
2104
+ *
2105
+ * Fires the 'permalink_structure_changed' action once the init call has
2106
+ * processed passing the old and new values
2107
+ *
2108
+ * @since 1.5.0
2109
+ * @access public
2110
+ *
2111
+ * @param string $permalink_structure Permalink structure.
2112
+ */
2113
+ public function set_permalink_structure($permalink_structure) {
2114
+ if ( $permalink_structure != $this->permalink_structure ) {
2115
+ $old_permalink_structure = $this->permalink_structure;
2116
+ update_option('permalink_structure', $permalink_structure);
2117
+ $this->init();
2118
+
2119
+ /**
2120
+ * Fires after the permalink structure is updated.
2121
+ *
2122
+ * @since 2.8.0
2123
+ *
2124
+ * @param string $old_permalink_structure The previous permalink structure.
2125
+ * @param string $permalink_structure The new permalink structure.
2126
+ */
2127
+ do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure );
2128
+ }
2129
+ }
2130
+
2131
+ /**
2132
+ * Set the category base for the category permalink.
2133
+ *
2134
+ * Will update the 'category_base' option, if there is a difference between
2135
+ * the current category base and the parameter value. Calls
2136
+ * {@link WP_Rewrite::init()} after the option is updated.
2137
+ *
2138
+ * @since 1.5.0
2139
+ * @access public
2140
+ *
2141
+ * @param string $category_base Category permalink structure base.
2142
+ */
2143
+ public function set_category_base($category_base) {
2144
+ if ( $category_base != get_option('category_base') ) {
2145
+ update_option('category_base', $category_base);
2146
+ $this->init();
2147
+ }
2148
+ }
2149
+
2150
+ /**
2151
+ * Set the tag base for the tag permalink.
2152
+ *
2153
+ * Will update the 'tag_base' option, if there is a difference between the
2154
+ * current tag base and the parameter value. Calls
2155
+ * {@link WP_Rewrite::init()} after the option is updated.
2156
+ *
2157
+ * @since 2.3.0
2158
+ * @access public
2159
+ *
2160
+ * @param string $tag_base Tag permalink structure base.
2161
+ */
2162
+ public function set_tag_base( $tag_base ) {
2163
+ if ( $tag_base != get_option( 'tag_base') ) {
2164
+ update_option( 'tag_base', $tag_base );
2165
+ $this->init();
2166
+ }
2167
+ }
2168
+
2169
+ /**
2170
+ * Constructor - Calls init(), which runs setup.
2171
+ *
2172
+ * @since 1.5.0
2173
+ * @access public
2174
+ *
2175
+ * @return WP_Rewrite
2176
+ */
2177
+ public function __construct() {
2178
+ $this->init();
2179
+ }
2180
+ }