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,2964 @@
1
+ <?php
2
+ /**
3
+ * SimplePie
4
+ *
5
+ * A PHP-Based RSS and Atom Feed Framework.
6
+ * Takes the hard work out of managing a complete RSS/Atom solution.
7
+ *
8
+ * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
9
+ * All rights reserved.
10
+ *
11
+ * Redistribution and use in source and binary forms, with or without modification, are
12
+ * permitted provided that the following conditions are met:
13
+ *
14
+ * * Redistributions of source code must retain the above copyright notice, this list of
15
+ * conditions and the following disclaimer.
16
+ *
17
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
18
+ * of conditions and the following disclaimer in the documentation and/or other materials
19
+ * provided with the distribution.
20
+ *
21
+ * * Neither the name of the SimplePie Team nor the names of its contributors may be used
22
+ * to endorse or promote products derived from this software without specific prior
23
+ * written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
26
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
27
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
28
+ * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
+ * POSSIBILITY OF SUCH DAMAGE.
34
+ *
35
+ * @package SimplePie
36
+ * @version 1.3.1
37
+ * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
38
+ * @author Ryan Parman
39
+ * @author Geoffrey Sneddon
40
+ * @author Ryan McCue
41
+ * @link http://simplepie.org/ SimplePie
42
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
43
+ */
44
+
45
+
46
+ /**
47
+ * Manages all item-related data
48
+ *
49
+ * Used by {@see SimplePie::get_item()} and {@see SimplePie::get_items()}
50
+ *
51
+ * This class can be overloaded with {@see SimplePie::set_item_class()}
52
+ *
53
+ * @package SimplePie
54
+ * @subpackage API
55
+ */
56
+ class SimplePie_Item
57
+ {
58
+ /**
59
+ * Parent feed
60
+ *
61
+ * @access private
62
+ * @var SimplePie
63
+ */
64
+ var $feed;
65
+
66
+ /**
67
+ * Raw data
68
+ *
69
+ * @access private
70
+ * @var array
71
+ */
72
+ var $data = array();
73
+
74
+ /**
75
+ * Registry object
76
+ *
77
+ * @see set_registry
78
+ * @var SimplePie_Registry
79
+ */
80
+ protected $registry;
81
+
82
+ /**
83
+ * Create a new item object
84
+ *
85
+ * This is usually used by {@see SimplePie::get_items} and
86
+ * {@see SimplePie::get_item}. Avoid creating this manually.
87
+ *
88
+ * @param SimplePie $feed Parent feed
89
+ * @param array $data Raw data
90
+ */
91
+ public function __construct($feed, $data)
92
+ {
93
+ $this->feed = $feed;
94
+ $this->data = $data;
95
+ }
96
+
97
+ /**
98
+ * Set the registry handler
99
+ *
100
+ * This is usually used by {@see SimplePie_Registry::create}
101
+ *
102
+ * @since 1.3
103
+ * @param SimplePie_Registry $registry
104
+ */
105
+ public function set_registry(SimplePie_Registry $registry)
106
+ {
107
+ $this->registry = $registry;
108
+ }
109
+
110
+ /**
111
+ * Get a string representation of the item
112
+ *
113
+ * @return string
114
+ */
115
+ public function __toString()
116
+ {
117
+ return md5(serialize($this->data));
118
+ }
119
+
120
+ /**
121
+ * Remove items that link back to this before destroying this object
122
+ */
123
+ public function __destruct()
124
+ {
125
+ if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode'))
126
+ {
127
+ unset($this->feed);
128
+ }
129
+ }
130
+
131
+ /**
132
+ * Get data for an item-level element
133
+ *
134
+ * This method allows you to get access to ANY element/attribute that is a
135
+ * sub-element of the item/entry tag.
136
+ *
137
+ * See {@see SimplePie::get_feed_tags()} for a description of the return value
138
+ *
139
+ * @since 1.0
140
+ * @see http://simplepie.org/wiki/faq/supported_xml_namespaces
141
+ * @param string $namespace The URL of the XML namespace of the elements you're trying to access
142
+ * @param string $tag Tag name
143
+ * @return array
144
+ */
145
+ public function get_item_tags($namespace, $tag)
146
+ {
147
+ if (isset($this->data['child'][$namespace][$tag]))
148
+ {
149
+ return $this->data['child'][$namespace][$tag];
150
+ }
151
+ else
152
+ {
153
+ return null;
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Get the base URL value from the parent feed
159
+ *
160
+ * Uses `<xml:base>`
161
+ *
162
+ * @param array $element
163
+ * @return string
164
+ */
165
+ public function get_base($element = array())
166
+ {
167
+ return $this->feed->get_base($element);
168
+ }
169
+
170
+ /**
171
+ * Sanitize feed data
172
+ *
173
+ * @access private
174
+ * @see SimplePie::sanitize()
175
+ * @param string $data Data to sanitize
176
+ * @param int $type One of the SIMPLEPIE_CONSTRUCT_* constants
177
+ * @param string $base Base URL to resolve URLs against
178
+ * @return string Sanitized data
179
+ */
180
+ public function sanitize($data, $type, $base = '')
181
+ {
182
+ return $this->feed->sanitize($data, $type, $base);
183
+ }
184
+
185
+ /**
186
+ * Get the parent feed
187
+ *
188
+ * Note: this may not work as you think for multifeeds!
189
+ *
190
+ * @link http://simplepie.org/faq/typical_multifeed_gotchas#missing_data_from_feed
191
+ * @since 1.0
192
+ * @return SimplePie
193
+ */
194
+ public function get_feed()
195
+ {
196
+ return $this->feed;
197
+ }
198
+
199
+ /**
200
+ * Get the unique identifier for the item
201
+ *
202
+ * This is usually used when writing code to check for new items in a feed.
203
+ *
204
+ * Uses `<atom:id>`, `<guid>`, `<dc:identifier>` or the `about` attribute
205
+ * for RDF. If none of these are supplied (or `$hash` is true), creates an
206
+ * MD5 hash based on the permalink and title. If either of those are not
207
+ * supplied, creates a hash based on the full feed data.
208
+ *
209
+ * @since Beta 2
210
+ * @param boolean $hash Should we force using a hash instead of the supplied ID?
211
+ * @return string
212
+ */
213
+ public function get_id($hash = false)
214
+ {
215
+ if (!$hash)
216
+ {
217
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id'))
218
+ {
219
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
220
+ }
221
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'id'))
222
+ {
223
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
224
+ }
225
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid'))
226
+ {
227
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
228
+ }
229
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'identifier'))
230
+ {
231
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
232
+ }
233
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'identifier'))
234
+ {
235
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
236
+ }
237
+ elseif (isset($this->data['attribs'][SIMPLEPIE_NAMESPACE_RDF]['about']))
238
+ {
239
+ return $this->sanitize($this->data['attribs'][SIMPLEPIE_NAMESPACE_RDF]['about'], SIMPLEPIE_CONSTRUCT_TEXT);
240
+ }
241
+ elseif (($return = $this->get_permalink()) !== null)
242
+ {
243
+ return $return;
244
+ }
245
+ elseif (($return = $this->get_title()) !== null)
246
+ {
247
+ return $return;
248
+ }
249
+ }
250
+ if ($this->get_permalink() !== null || $this->get_title() !== null)
251
+ {
252
+ return md5($this->get_permalink() . $this->get_title());
253
+ }
254
+ else
255
+ {
256
+ return md5(serialize($this->data));
257
+ }
258
+ }
259
+
260
+ /**
261
+ * Get the title of the item
262
+ *
263
+ * Uses `<atom:title>`, `<title>` or `<dc:title>`
264
+ *
265
+ * @since Beta 2 (previously called `get_item_title` since 0.8)
266
+ * @return string|null
267
+ */
268
+ public function get_title()
269
+ {
270
+ if (!isset($this->data['title']))
271
+ {
272
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title'))
273
+ {
274
+ $this->data['title'] = $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
275
+ }
276
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title'))
277
+ {
278
+ $this->data['title'] = $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
279
+ }
280
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title'))
281
+ {
282
+ $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
283
+ }
284
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title'))
285
+ {
286
+ $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
287
+ }
288
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title'))
289
+ {
290
+ $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
291
+ }
292
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title'))
293
+ {
294
+ $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
295
+ }
296
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title'))
297
+ {
298
+ $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
299
+ }
300
+ else
301
+ {
302
+ $this->data['title'] = null;
303
+ }
304
+ }
305
+ return $this->data['title'];
306
+ }
307
+
308
+ /**
309
+ * Get the content for the item
310
+ *
311
+ * Prefers summaries over full content , but will return full content if a
312
+ * summary does not exist.
313
+ *
314
+ * To prefer full content instead, use {@see get_content}
315
+ *
316
+ * Uses `<atom:summary>`, `<description>`, `<dc:description>` or
317
+ * `<itunes:subtitle>`
318
+ *
319
+ * @since 0.8
320
+ * @param boolean $description_only Should we avoid falling back to the content?
321
+ * @return string|null
322
+ */
323
+ public function get_description($description_only = false)
324
+ {
325
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'summary'))
326
+ {
327
+ return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
328
+ }
329
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'summary'))
330
+ {
331
+ return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
332
+ }
333
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description'))
334
+ {
335
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
336
+ }
337
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description'))
338
+ {
339
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
340
+ }
341
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description'))
342
+ {
343
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
344
+ }
345
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description'))
346
+ {
347
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
348
+ }
349
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary'))
350
+ {
351
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
352
+ }
353
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle'))
354
+ {
355
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
356
+ }
357
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description'))
358
+ {
359
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML);
360
+ }
361
+
362
+ elseif (!$description_only)
363
+ {
364
+ return $this->get_content(true);
365
+ }
366
+ else
367
+ {
368
+ return null;
369
+ }
370
+ }
371
+
372
+ /**
373
+ * Get the content for the item
374
+ *
375
+ * Prefers full content over summaries, but will return a summary if full
376
+ * content does not exist.
377
+ *
378
+ * To prefer summaries instead, use {@see get_description}
379
+ *
380
+ * Uses `<atom:content>` or `<content:encoded>` (RSS 1.0 Content Module)
381
+ *
382
+ * @since 1.0
383
+ * @param boolean $content_only Should we avoid falling back to the description?
384
+ * @return string|null
385
+ */
386
+ public function get_content($content_only = false)
387
+ {
388
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'content'))
389
+ {
390
+ return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_content_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
391
+ }
392
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'content'))
393
+ {
394
+ return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
395
+ }
396
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT, 'encoded'))
397
+ {
398
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
399
+ }
400
+ elseif (!$content_only)
401
+ {
402
+ return $this->get_description(true);
403
+ }
404
+ else
405
+ {
406
+ return null;
407
+ }
408
+ }
409
+
410
+ /**
411
+ * Get a category for the item
412
+ *
413
+ * @since Beta 3 (previously called `get_categories()` since Beta 2)
414
+ * @param int $key The category that you want to return. Remember that arrays begin with 0, not 1
415
+ * @return SimplePie_Category|null
416
+ */
417
+ public function get_category($key = 0)
418
+ {
419
+ $categories = $this->get_categories();
420
+ if (isset($categories[$key]))
421
+ {
422
+ return $categories[$key];
423
+ }
424
+ else
425
+ {
426
+ return null;
427
+ }
428
+ }
429
+
430
+ /**
431
+ * Get all categories for the item
432
+ *
433
+ * Uses `<atom:category>`, `<category>` or `<dc:subject>`
434
+ *
435
+ * @since Beta 3
436
+ * @return array|null List of {@see SimplePie_Category} objects
437
+ */
438
+ public function get_categories()
439
+ {
440
+ $categories = array();
441
+
442
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category)
443
+ {
444
+ $term = null;
445
+ $scheme = null;
446
+ $label = null;
447
+ if (isset($category['attribs']['']['term']))
448
+ {
449
+ $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT);
450
+ }
451
+ if (isset($category['attribs']['']['scheme']))
452
+ {
453
+ $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
454
+ }
455
+ if (isset($category['attribs']['']['label']))
456
+ {
457
+ $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
458
+ }
459
+ $categories[] = $this->registry->create('Category', array($term, $scheme, $label));
460
+ }
461
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category)
462
+ {
463
+ // This is really the label, but keep this as the term also for BC.
464
+ // Label will also work on retrieving because that falls back to term.
465
+ $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
466
+ if (isset($category['attribs']['']['domain']))
467
+ {
468
+ $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT);
469
+ }
470
+ else
471
+ {
472
+ $scheme = null;
473
+ }
474
+ $categories[] = $this->registry->create('Category', array($term, $scheme, null));
475
+ }
476
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category)
477
+ {
478
+ $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
479
+ }
480
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category)
481
+ {
482
+ $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
483
+ }
484
+
485
+ if (!empty($categories))
486
+ {
487
+ return array_unique($categories);
488
+ }
489
+ else
490
+ {
491
+ return null;
492
+ }
493
+ }
494
+
495
+ /**
496
+ * Get an author for the item
497
+ *
498
+ * @since Beta 2
499
+ * @param int $key The author that you want to return. Remember that arrays begin with 0, not 1
500
+ * @return SimplePie_Author|null
501
+ */
502
+ public function get_author($key = 0)
503
+ {
504
+ $authors = $this->get_authors();
505
+ if (isset($authors[$key]))
506
+ {
507
+ return $authors[$key];
508
+ }
509
+ else
510
+ {
511
+ return null;
512
+ }
513
+ }
514
+
515
+ /**
516
+ * Get a contributor for the item
517
+ *
518
+ * @since 1.1
519
+ * @param int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1
520
+ * @return SimplePie_Author|null
521
+ */
522
+ public function get_contributor($key = 0)
523
+ {
524
+ $contributors = $this->get_contributors();
525
+ if (isset($contributors[$key]))
526
+ {
527
+ return $contributors[$key];
528
+ }
529
+ else
530
+ {
531
+ return null;
532
+ }
533
+ }
534
+
535
+ /**
536
+ * Get all contributors for the item
537
+ *
538
+ * Uses `<atom:contributor>`
539
+ *
540
+ * @since 1.1
541
+ * @return array|null List of {@see SimplePie_Author} objects
542
+ */
543
+ public function get_contributors()
544
+ {
545
+ $contributors = array();
546
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor)
547
+ {
548
+ $name = null;
549
+ $uri = null;
550
+ $email = null;
551
+ if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
552
+ {
553
+ $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
554
+ }
555
+ if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']))
556
+ {
557
+ $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]));
558
+ }
559
+ if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data']))
560
+ {
561
+ $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
562
+ }
563
+ if ($name !== null || $email !== null || $uri !== null)
564
+ {
565
+ $contributors[] = $this->registry->create('Author', array($name, $uri, $email));
566
+ }
567
+ }
568
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
569
+ {
570
+ $name = null;
571
+ $url = null;
572
+ $email = null;
573
+ if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data']))
574
+ {
575
+ $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
576
+ }
577
+ if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data']))
578
+ {
579
+ $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]));
580
+ }
581
+ if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data']))
582
+ {
583
+ $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
584
+ }
585
+ if ($name !== null || $email !== null || $url !== null)
586
+ {
587
+ $contributors[] = $this->registry->create('Author', array($name, $url, $email));
588
+ }
589
+ }
590
+
591
+ if (!empty($contributors))
592
+ {
593
+ return array_unique($contributors);
594
+ }
595
+ else
596
+ {
597
+ return null;
598
+ }
599
+ }
600
+
601
+ /**
602
+ * Get all authors for the item
603
+ *
604
+ * Uses `<atom:author>`, `<author>`, `<dc:creator>` or `<itunes:author>`
605
+ *
606
+ * @since Beta 2
607
+ * @return array|null List of {@see SimplePie_Author} objects
608
+ */
609
+ public function get_authors()
610
+ {
611
+ $authors = array();
612
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author)
613
+ {
614
+ $name = null;
615
+ $uri = null;
616
+ $email = null;
617
+ if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
618
+ {
619
+ $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
620
+ }
621
+ if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']))
622
+ {
623
+ $uri = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]));
624
+ }
625
+ if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data']))
626
+ {
627
+ $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
628
+ }
629
+ if ($name !== null || $email !== null || $uri !== null)
630
+ {
631
+ $authors[] = $this->registry->create('Author', array($name, $uri, $email));
632
+ }
633
+ }
634
+ if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
635
+ {
636
+ $name = null;
637
+ $url = null;
638
+ $email = null;
639
+ if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data']))
640
+ {
641
+ $name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
642
+ }
643
+ if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data']))
644
+ {
645
+ $url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]));
646
+ }
647
+ if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data']))
648
+ {
649
+ $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
650
+ }
651
+ if ($name !== null || $email !== null || $url !== null)
652
+ {
653
+ $authors[] = $this->registry->create('Author', array($name, $url, $email));
654
+ }
655
+ }
656
+ if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'author'))
657
+ {
658
+ $authors[] = $this->registry->create('Author', array(null, null, $this->sanitize($author[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)));
659
+ }
660
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author)
661
+ {
662
+ $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
663
+ }
664
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author)
665
+ {
666
+ $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
667
+ }
668
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author)
669
+ {
670
+ $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
671
+ }
672
+
673
+ if (!empty($authors))
674
+ {
675
+ return array_unique($authors);
676
+ }
677
+ elseif (($source = $this->get_source()) && ($authors = $source->get_authors()))
678
+ {
679
+ return $authors;
680
+ }
681
+ elseif ($authors = $this->feed->get_authors())
682
+ {
683
+ return $authors;
684
+ }
685
+ else
686
+ {
687
+ return null;
688
+ }
689
+ }
690
+
691
+ /**
692
+ * Get the copyright info for the item
693
+ *
694
+ * Uses `<atom:rights>` or `<dc:rights>`
695
+ *
696
+ * @since 1.1
697
+ * @return string
698
+ */
699
+ public function get_copyright()
700
+ {
701
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights'))
702
+ {
703
+ return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
704
+ }
705
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights'))
706
+ {
707
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
708
+ }
709
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights'))
710
+ {
711
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
712
+ }
713
+ else
714
+ {
715
+ return null;
716
+ }
717
+ }
718
+
719
+ /**
720
+ * Get the posting date/time for the item
721
+ *
722
+ * Uses `<atom:published>`, `<atom:updated>`, `<atom:issued>`,
723
+ * `<atom:modified>`, `<pubDate>` or `<dc:date>`
724
+ *
725
+ * Note: obeys PHP's timezone setting. To get a UTC date/time, use
726
+ * {@see get_gmdate}
727
+ *
728
+ * @since Beta 2 (previously called `get_item_date` since 0.8)
729
+ *
730
+ * @param string $date_format Supports any PHP date format from {@see http://php.net/date} (empty for the raw data)
731
+ * @return int|string|null
732
+ */
733
+ public function get_date($date_format = 'j F Y, g:i a')
734
+ {
735
+ if (!isset($this->data['date']))
736
+ {
737
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'published'))
738
+ {
739
+ $this->data['date']['raw'] = $return[0]['data'];
740
+ }
741
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'updated'))
742
+ {
743
+ $this->data['date']['raw'] = $return[0]['data'];
744
+ }
745
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'issued'))
746
+ {
747
+ $this->data['date']['raw'] = $return[0]['data'];
748
+ }
749
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'created'))
750
+ {
751
+ $this->data['date']['raw'] = $return[0]['data'];
752
+ }
753
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'modified'))
754
+ {
755
+ $this->data['date']['raw'] = $return[0]['data'];
756
+ }
757
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'pubDate'))
758
+ {
759
+ $this->data['date']['raw'] = $return[0]['data'];
760
+ }
761
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'date'))
762
+ {
763
+ $this->data['date']['raw'] = $return[0]['data'];
764
+ }
765
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'date'))
766
+ {
767
+ $this->data['date']['raw'] = $return[0]['data'];
768
+ }
769
+
770
+ if (!empty($this->data['date']['raw']))
771
+ {
772
+ $parser = $this->registry->call('Parse_Date', 'get');
773
+ $this->data['date']['parsed'] = $parser->parse($this->data['date']['raw']);
774
+ }
775
+ else
776
+ {
777
+ $this->data['date'] = null;
778
+ }
779
+ }
780
+ if ($this->data['date'])
781
+ {
782
+ $date_format = (string) $date_format;
783
+ switch ($date_format)
784
+ {
785
+ case '':
786
+ return $this->sanitize($this->data['date']['raw'], SIMPLEPIE_CONSTRUCT_TEXT);
787
+
788
+ case 'U':
789
+ return $this->data['date']['parsed'];
790
+
791
+ default:
792
+ return date($date_format, $this->data['date']['parsed']);
793
+ }
794
+ }
795
+ else
796
+ {
797
+ return null;
798
+ }
799
+ }
800
+
801
+ /**
802
+ * Get the update date/time for the item
803
+ *
804
+ * Uses `<atom:updated>`
805
+ *
806
+ * Note: obeys PHP's timezone setting. To get a UTC date/time, use
807
+ * {@see get_gmdate}
808
+ *
809
+ * @param string $date_format Supports any PHP date format from {@see http://php.net/date} (empty for the raw data)
810
+ * @return int|string|null
811
+ */
812
+ public function get_updated_date($date_format = 'j F Y, g:i a')
813
+ {
814
+ if (!isset($this->data['updated']))
815
+ {
816
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'updated'))
817
+ {
818
+ $this->data['updated']['raw'] = $return[0]['data'];
819
+ }
820
+
821
+ if (!empty($this->data['updated']['raw']))
822
+ {
823
+ $parser = $this->registry->call('Parse_Date', 'get');
824
+ $this->data['updated']['parsed'] = $parser->parse($this->data['date']['raw']);
825
+ }
826
+ else
827
+ {
828
+ $this->data['updated'] = null;
829
+ }
830
+ }
831
+ if ($this->data['updated'])
832
+ {
833
+ $date_format = (string) $date_format;
834
+ switch ($date_format)
835
+ {
836
+ case '':
837
+ return $this->sanitize($this->data['updated']['raw'], SIMPLEPIE_CONSTRUCT_TEXT);
838
+
839
+ case 'U':
840
+ return $this->data['updated']['parsed'];
841
+
842
+ default:
843
+ return date($date_format, $this->data['updated']['parsed']);
844
+ }
845
+ }
846
+ else
847
+ {
848
+ return null;
849
+ }
850
+ }
851
+
852
+ /**
853
+ * Get the localized posting date/time for the item
854
+ *
855
+ * Returns the date formatted in the localized language. To display in
856
+ * languages other than the server's default, you need to change the locale
857
+ * with {@link http://php.net/setlocale setlocale()}. The available
858
+ * localizations depend on which ones are installed on your web server.
859
+ *
860
+ * @since 1.0
861
+ *
862
+ * @param string $date_format Supports any PHP date format from {@see http://php.net/strftime} (empty for the raw data)
863
+ * @return int|string|null
864
+ */
865
+ public function get_local_date($date_format = '%c')
866
+ {
867
+ if (!$date_format)
868
+ {
869
+ return $this->sanitize($this->get_date(''), SIMPLEPIE_CONSTRUCT_TEXT);
870
+ }
871
+ elseif (($date = $this->get_date('U')) !== null && $date !== false)
872
+ {
873
+ return strftime($date_format, $date);
874
+ }
875
+ else
876
+ {
877
+ return null;
878
+ }
879
+ }
880
+
881
+ /**
882
+ * Get the posting date/time for the item (UTC time)
883
+ *
884
+ * @see get_date
885
+ * @param string $date_format Supports any PHP date format from {@see http://php.net/date}
886
+ * @return int|string|null
887
+ */
888
+ public function get_gmdate($date_format = 'j F Y, g:i a')
889
+ {
890
+ $date = $this->get_date('U');
891
+ if ($date === null)
892
+ {
893
+ return null;
894
+ }
895
+
896
+ return gmdate($date_format, $date);
897
+ }
898
+
899
+ /**
900
+ * Get the update date/time for the item (UTC time)
901
+ *
902
+ * @see get_updated_date
903
+ * @param string $date_format Supports any PHP date format from {@see http://php.net/date}
904
+ * @return int|string|null
905
+ */
906
+ public function get_updated_gmdate($date_format = 'j F Y, g:i a')
907
+ {
908
+ $date = $this->get_updated_date('U');
909
+ if ($date === null)
910
+ {
911
+ return null;
912
+ }
913
+
914
+ return gmdate($date_format, $date);
915
+ }
916
+
917
+ /**
918
+ * Get the permalink for the item
919
+ *
920
+ * Returns the first link available with a relationship of "alternate".
921
+ * Identical to {@see get_link()} with key 0
922
+ *
923
+ * @see get_link
924
+ * @since 0.8
925
+ * @return string|null Permalink URL
926
+ */
927
+ public function get_permalink()
928
+ {
929
+ $link = $this->get_link();
930
+ $enclosure = $this->get_enclosure(0);
931
+ if ($link !== null)
932
+ {
933
+ return $link;
934
+ }
935
+ elseif ($enclosure !== null)
936
+ {
937
+ return $enclosure->get_link();
938
+ }
939
+ else
940
+ {
941
+ return null;
942
+ }
943
+ }
944
+
945
+ /**
946
+ * Get a single link for the item
947
+ *
948
+ * @since Beta 3
949
+ * @param int $key The link that you want to return. Remember that arrays begin with 0, not 1
950
+ * @param string $rel The relationship of the link to return
951
+ * @return string|null Link URL
952
+ */
953
+ public function get_link($key = 0, $rel = 'alternate')
954
+ {
955
+ $links = $this->get_links($rel);
956
+ if ($links[$key] !== null)
957
+ {
958
+ return $links[$key];
959
+ }
960
+ else
961
+ {
962
+ return null;
963
+ }
964
+ }
965
+
966
+ /**
967
+ * Get all links for the item
968
+ *
969
+ * Uses `<atom:link>`, `<link>` or `<guid>`
970
+ *
971
+ * @since Beta 2
972
+ * @param string $rel The relationship of links to return
973
+ * @return array|null Links found for the item (strings)
974
+ */
975
+ public function get_links($rel = 'alternate')
976
+ {
977
+ if (!isset($this->data['links']))
978
+ {
979
+ $this->data['links'] = array();
980
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link') as $link)
981
+ {
982
+ if (isset($link['attribs']['']['href']))
983
+ {
984
+ $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
985
+ $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link));
986
+
987
+ }
988
+ }
989
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link)
990
+ {
991
+ if (isset($link['attribs']['']['href']))
992
+ {
993
+ $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
994
+ $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link));
995
+ }
996
+ }
997
+ if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link'))
998
+ {
999
+ $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
1000
+ }
1001
+ if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link'))
1002
+ {
1003
+ $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
1004
+ }
1005
+ if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link'))
1006
+ {
1007
+ $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
1008
+ }
1009
+ if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid'))
1010
+ {
1011
+ if (!isset($links[0]['attribs']['']['isPermaLink']) || strtolower(trim($links[0]['attribs']['']['isPermaLink'])) === 'true')
1012
+ {
1013
+ $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
1014
+ }
1015
+ }
1016
+
1017
+ $keys = array_keys($this->data['links']);
1018
+ foreach ($keys as $key)
1019
+ {
1020
+ if ($this->registry->call('Misc', 'is_isegment_nz_nc', array($key)))
1021
+ {
1022
+ if (isset($this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]))
1023
+ {
1024
+ $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]);
1025
+ $this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key];
1026
+ }
1027
+ else
1028
+ {
1029
+ $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key];
1030
+ }
1031
+ }
1032
+ elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY)
1033
+ {
1034
+ $this->data['links'][substr($key, 41)] =& $this->data['links'][$key];
1035
+ }
1036
+ $this->data['links'][$key] = array_unique($this->data['links'][$key]);
1037
+ }
1038
+ }
1039
+ if (isset($this->data['links'][$rel]))
1040
+ {
1041
+ return $this->data['links'][$rel];
1042
+ }
1043
+ else
1044
+ {
1045
+ return null;
1046
+ }
1047
+ }
1048
+
1049
+ /**
1050
+ * Get an enclosure from the item
1051
+ *
1052
+ * Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS.
1053
+ *
1054
+ * @since Beta 2
1055
+ * @todo Add ability to prefer one type of content over another (in a media group).
1056
+ * @param int $key The enclosure that you want to return. Remember that arrays begin with 0, not 1
1057
+ * @return SimplePie_Enclosure|null
1058
+ */
1059
+ public function get_enclosure($key = 0, $prefer = null)
1060
+ {
1061
+ $enclosures = $this->get_enclosures();
1062
+ if (isset($enclosures[$key]))
1063
+ {
1064
+ return $enclosures[$key];
1065
+ }
1066
+ else
1067
+ {
1068
+ return null;
1069
+ }
1070
+ }
1071
+
1072
+ /**
1073
+ * Get all available enclosures (podcasts, etc.)
1074
+ *
1075
+ * Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS.
1076
+ *
1077
+ * At this point, we're pretty much assuming that all enclosures for an item
1078
+ * are the same content. Anything else is too complicated to
1079
+ * properly support.
1080
+ *
1081
+ * @since Beta 2
1082
+ * @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4).
1083
+ * @todo If an element exists at a level, but it's value is empty, we should fall back to the value from the parent (if it exists).
1084
+ * @return array|null List of SimplePie_Enclosure items
1085
+ */
1086
+ public function get_enclosures()
1087
+ {
1088
+ if (!isset($this->data['enclosures']))
1089
+ {
1090
+ $this->data['enclosures'] = array();
1091
+
1092
+ // Elements
1093
+ $captions_parent = null;
1094
+ $categories_parent = null;
1095
+ $copyrights_parent = null;
1096
+ $credits_parent = null;
1097
+ $description_parent = null;
1098
+ $duration_parent = null;
1099
+ $hashes_parent = null;
1100
+ $keywords_parent = null;
1101
+ $player_parent = null;
1102
+ $ratings_parent = null;
1103
+ $restrictions_parent = null;
1104
+ $thumbnails_parent = null;
1105
+ $title_parent = null;
1106
+
1107
+ // Let's do the channel and item-level ones first, and just re-use them if we need to.
1108
+ $parent = $this->get_feed();
1109
+
1110
+ // CAPTIONS
1111
+ if ($captions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text'))
1112
+ {
1113
+ foreach ($captions as $caption)
1114
+ {
1115
+ $caption_type = null;
1116
+ $caption_lang = null;
1117
+ $caption_startTime = null;
1118
+ $caption_endTime = null;
1119
+ $caption_text = null;
1120
+ if (isset($caption['attribs']['']['type']))
1121
+ {
1122
+ $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
1123
+ }
1124
+ if (isset($caption['attribs']['']['lang']))
1125
+ {
1126
+ $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
1127
+ }
1128
+ if (isset($caption['attribs']['']['start']))
1129
+ {
1130
+ $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT);
1131
+ }
1132
+ if (isset($caption['attribs']['']['end']))
1133
+ {
1134
+ $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT);
1135
+ }
1136
+ if (isset($caption['data']))
1137
+ {
1138
+ $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1139
+ }
1140
+ $captions_parent[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text));
1141
+ }
1142
+ }
1143
+ elseif ($captions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text'))
1144
+ {
1145
+ foreach ($captions as $caption)
1146
+ {
1147
+ $caption_type = null;
1148
+ $caption_lang = null;
1149
+ $caption_startTime = null;
1150
+ $caption_endTime = null;
1151
+ $caption_text = null;
1152
+ if (isset($caption['attribs']['']['type']))
1153
+ {
1154
+ $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
1155
+ }
1156
+ if (isset($caption['attribs']['']['lang']))
1157
+ {
1158
+ $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
1159
+ }
1160
+ if (isset($caption['attribs']['']['start']))
1161
+ {
1162
+ $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT);
1163
+ }
1164
+ if (isset($caption['attribs']['']['end']))
1165
+ {
1166
+ $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT);
1167
+ }
1168
+ if (isset($caption['data']))
1169
+ {
1170
+ $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1171
+ }
1172
+ $captions_parent[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text));
1173
+ }
1174
+ }
1175
+ if (is_array($captions_parent))
1176
+ {
1177
+ $captions_parent = array_values(array_unique($captions_parent));
1178
+ }
1179
+
1180
+ // CATEGORIES
1181
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category)
1182
+ {
1183
+ $term = null;
1184
+ $scheme = null;
1185
+ $label = null;
1186
+ if (isset($category['data']))
1187
+ {
1188
+ $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1189
+ }
1190
+ if (isset($category['attribs']['']['scheme']))
1191
+ {
1192
+ $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
1193
+ }
1194
+ else
1195
+ {
1196
+ $scheme = 'http://search.yahoo.com/mrss/category_schema';
1197
+ }
1198
+ if (isset($category['attribs']['']['label']))
1199
+ {
1200
+ $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
1201
+ }
1202
+ $categories_parent[] = $this->registry->create('Category', array($term, $scheme, $label));
1203
+ }
1204
+ foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category)
1205
+ {
1206
+ $term = null;
1207
+ $scheme = null;
1208
+ $label = null;
1209
+ if (isset($category['data']))
1210
+ {
1211
+ $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1212
+ }
1213
+ if (isset($category['attribs']['']['scheme']))
1214
+ {
1215
+ $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
1216
+ }
1217
+ else
1218
+ {
1219
+ $scheme = 'http://search.yahoo.com/mrss/category_schema';
1220
+ }
1221
+ if (isset($category['attribs']['']['label']))
1222
+ {
1223
+ $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
1224
+ }
1225
+ $categories_parent[] = $this->registry->create('Category', array($term, $scheme, $label));
1226
+ }
1227
+ foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'category') as $category)
1228
+ {
1229
+ $term = null;
1230
+ $scheme = 'http://www.itunes.com/dtds/podcast-1.0.dtd';
1231
+ $label = null;
1232
+ if (isset($category['attribs']['']['text']))
1233
+ {
1234
+ $label = $this->sanitize($category['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT);
1235
+ }
1236
+ $categories_parent[] = $this->registry->create('Category', array($term, $scheme, $label));
1237
+
1238
+ if (isset($category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category']))
1239
+ {
1240
+ foreach ((array) $category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category'] as $subcategory)
1241
+ {
1242
+ if (isset($subcategory['attribs']['']['text']))
1243
+ {
1244
+ $label = $this->sanitize($subcategory['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT);
1245
+ }
1246
+ $categories_parent[] = $this->registry->create('Category', array($term, $scheme, $label));
1247
+ }
1248
+ }
1249
+ }
1250
+ if (is_array($categories_parent))
1251
+ {
1252
+ $categories_parent = array_values(array_unique($categories_parent));
1253
+ }
1254
+
1255
+ // COPYRIGHT
1256
+ if ($copyright = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright'))
1257
+ {
1258
+ $copyright_url = null;
1259
+ $copyright_label = null;
1260
+ if (isset($copyright[0]['attribs']['']['url']))
1261
+ {
1262
+ $copyright_url = $this->sanitize($copyright[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT);
1263
+ }
1264
+ if (isset($copyright[0]['data']))
1265
+ {
1266
+ $copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1267
+ }
1268
+ $copyrights_parent = $this->registry->create('Copyright', array($copyright_url, $copyright_label));
1269
+ }
1270
+ elseif ($copyright = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright'))
1271
+ {
1272
+ $copyright_url = null;
1273
+ $copyright_label = null;
1274
+ if (isset($copyright[0]['attribs']['']['url']))
1275
+ {
1276
+ $copyright_url = $this->sanitize($copyright[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT);
1277
+ }
1278
+ if (isset($copyright[0]['data']))
1279
+ {
1280
+ $copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1281
+ }
1282
+ $copyrights_parent = $this->registry->create('Copyright', array($copyright_url, $copyright_label));
1283
+ }
1284
+
1285
+ // CREDITS
1286
+ if ($credits = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit'))
1287
+ {
1288
+ foreach ($credits as $credit)
1289
+ {
1290
+ $credit_role = null;
1291
+ $credit_scheme = null;
1292
+ $credit_name = null;
1293
+ if (isset($credit['attribs']['']['role']))
1294
+ {
1295
+ $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
1296
+ }
1297
+ if (isset($credit['attribs']['']['scheme']))
1298
+ {
1299
+ $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
1300
+ }
1301
+ else
1302
+ {
1303
+ $credit_scheme = 'urn:ebu';
1304
+ }
1305
+ if (isset($credit['data']))
1306
+ {
1307
+ $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1308
+ }
1309
+ $credits_parent[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
1310
+ }
1311
+ }
1312
+ elseif ($credits = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit'))
1313
+ {
1314
+ foreach ($credits as $credit)
1315
+ {
1316
+ $credit_role = null;
1317
+ $credit_scheme = null;
1318
+ $credit_name = null;
1319
+ if (isset($credit['attribs']['']['role']))
1320
+ {
1321
+ $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
1322
+ }
1323
+ if (isset($credit['attribs']['']['scheme']))
1324
+ {
1325
+ $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
1326
+ }
1327
+ else
1328
+ {
1329
+ $credit_scheme = 'urn:ebu';
1330
+ }
1331
+ if (isset($credit['data']))
1332
+ {
1333
+ $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1334
+ }
1335
+ $credits_parent[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
1336
+ }
1337
+ }
1338
+ if (is_array($credits_parent))
1339
+ {
1340
+ $credits_parent = array_values(array_unique($credits_parent));
1341
+ }
1342
+
1343
+ // DESCRIPTION
1344
+ if ($description_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'description'))
1345
+ {
1346
+ if (isset($description_parent[0]['data']))
1347
+ {
1348
+ $description_parent = $this->sanitize($description_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1349
+ }
1350
+ }
1351
+ elseif ($description_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'description'))
1352
+ {
1353
+ if (isset($description_parent[0]['data']))
1354
+ {
1355
+ $description_parent = $this->sanitize($description_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1356
+ }
1357
+ }
1358
+
1359
+ // DURATION
1360
+ if ($duration_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'duration'))
1361
+ {
1362
+ $seconds = null;
1363
+ $minutes = null;
1364
+ $hours = null;
1365
+ if (isset($duration_parent[0]['data']))
1366
+ {
1367
+ $temp = explode(':', $this->sanitize($duration_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
1368
+ if (sizeof($temp) > 0)
1369
+ {
1370
+ $seconds = (int) array_pop($temp);
1371
+ }
1372
+ if (sizeof($temp) > 0)
1373
+ {
1374
+ $minutes = (int) array_pop($temp);
1375
+ $seconds += $minutes * 60;
1376
+ }
1377
+ if (sizeof($temp) > 0)
1378
+ {
1379
+ $hours = (int) array_pop($temp);
1380
+ $seconds += $hours * 3600;
1381
+ }
1382
+ unset($temp);
1383
+ $duration_parent = $seconds;
1384
+ }
1385
+ }
1386
+
1387
+ // HASHES
1388
+ if ($hashes_iterator = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash'))
1389
+ {
1390
+ foreach ($hashes_iterator as $hash)
1391
+ {
1392
+ $value = null;
1393
+ $algo = null;
1394
+ if (isset($hash['data']))
1395
+ {
1396
+ $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1397
+ }
1398
+ if (isset($hash['attribs']['']['algo']))
1399
+ {
1400
+ $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
1401
+ }
1402
+ else
1403
+ {
1404
+ $algo = 'md5';
1405
+ }
1406
+ $hashes_parent[] = $algo.':'.$value;
1407
+ }
1408
+ }
1409
+ elseif ($hashes_iterator = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash'))
1410
+ {
1411
+ foreach ($hashes_iterator as $hash)
1412
+ {
1413
+ $value = null;
1414
+ $algo = null;
1415
+ if (isset($hash['data']))
1416
+ {
1417
+ $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1418
+ }
1419
+ if (isset($hash['attribs']['']['algo']))
1420
+ {
1421
+ $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
1422
+ }
1423
+ else
1424
+ {
1425
+ $algo = 'md5';
1426
+ }
1427
+ $hashes_parent[] = $algo.':'.$value;
1428
+ }
1429
+ }
1430
+ if (is_array($hashes_parent))
1431
+ {
1432
+ $hashes_parent = array_values(array_unique($hashes_parent));
1433
+ }
1434
+
1435
+ // KEYWORDS
1436
+ if ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords'))
1437
+ {
1438
+ if (isset($keywords[0]['data']))
1439
+ {
1440
+ $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
1441
+ foreach ($temp as $word)
1442
+ {
1443
+ $keywords_parent[] = trim($word);
1444
+ }
1445
+ }
1446
+ unset($temp);
1447
+ }
1448
+ elseif ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords'))
1449
+ {
1450
+ if (isset($keywords[0]['data']))
1451
+ {
1452
+ $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
1453
+ foreach ($temp as $word)
1454
+ {
1455
+ $keywords_parent[] = trim($word);
1456
+ }
1457
+ }
1458
+ unset($temp);
1459
+ }
1460
+ elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords'))
1461
+ {
1462
+ if (isset($keywords[0]['data']))
1463
+ {
1464
+ $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
1465
+ foreach ($temp as $word)
1466
+ {
1467
+ $keywords_parent[] = trim($word);
1468
+ }
1469
+ }
1470
+ unset($temp);
1471
+ }
1472
+ elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords'))
1473
+ {
1474
+ if (isset($keywords[0]['data']))
1475
+ {
1476
+ $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
1477
+ foreach ($temp as $word)
1478
+ {
1479
+ $keywords_parent[] = trim($word);
1480
+ }
1481
+ }
1482
+ unset($temp);
1483
+ }
1484
+ if (is_array($keywords_parent))
1485
+ {
1486
+ $keywords_parent = array_values(array_unique($keywords_parent));
1487
+ }
1488
+
1489
+ // PLAYER
1490
+ if ($player_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'player'))
1491
+ {
1492
+ if (isset($player_parent[0]['attribs']['']['url']))
1493
+ {
1494
+ $player_parent = $this->sanitize($player_parent[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
1495
+ }
1496
+ }
1497
+ elseif ($player_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'player'))
1498
+ {
1499
+ if (isset($player_parent[0]['attribs']['']['url']))
1500
+ {
1501
+ $player_parent = $this->sanitize($player_parent[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
1502
+ }
1503
+ }
1504
+
1505
+ // RATINGS
1506
+ if ($ratings = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'rating'))
1507
+ {
1508
+ foreach ($ratings as $rating)
1509
+ {
1510
+ $rating_scheme = null;
1511
+ $rating_value = null;
1512
+ if (isset($rating['attribs']['']['scheme']))
1513
+ {
1514
+ $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
1515
+ }
1516
+ else
1517
+ {
1518
+ $rating_scheme = 'urn:simple';
1519
+ }
1520
+ if (isset($rating['data']))
1521
+ {
1522
+ $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1523
+ }
1524
+ $ratings_parent[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
1525
+ }
1526
+ }
1527
+ elseif ($ratings = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit'))
1528
+ {
1529
+ foreach ($ratings as $rating)
1530
+ {
1531
+ $rating_scheme = 'urn:itunes';
1532
+ $rating_value = null;
1533
+ if (isset($rating['data']))
1534
+ {
1535
+ $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1536
+ }
1537
+ $ratings_parent[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
1538
+ }
1539
+ }
1540
+ elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'rating'))
1541
+ {
1542
+ foreach ($ratings as $rating)
1543
+ {
1544
+ $rating_scheme = null;
1545
+ $rating_value = null;
1546
+ if (isset($rating['attribs']['']['scheme']))
1547
+ {
1548
+ $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
1549
+ }
1550
+ else
1551
+ {
1552
+ $rating_scheme = 'urn:simple';
1553
+ }
1554
+ if (isset($rating['data']))
1555
+ {
1556
+ $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1557
+ }
1558
+ $ratings_parent[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
1559
+ }
1560
+ }
1561
+ elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit'))
1562
+ {
1563
+ foreach ($ratings as $rating)
1564
+ {
1565
+ $rating_scheme = 'urn:itunes';
1566
+ $rating_value = null;
1567
+ if (isset($rating['data']))
1568
+ {
1569
+ $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1570
+ }
1571
+ $ratings_parent[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
1572
+ }
1573
+ }
1574
+ if (is_array($ratings_parent))
1575
+ {
1576
+ $ratings_parent = array_values(array_unique($ratings_parent));
1577
+ }
1578
+
1579
+ // RESTRICTIONS
1580
+ if ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction'))
1581
+ {
1582
+ foreach ($restrictions as $restriction)
1583
+ {
1584
+ $restriction_relationship = null;
1585
+ $restriction_type = null;
1586
+ $restriction_value = null;
1587
+ if (isset($restriction['attribs']['']['relationship']))
1588
+ {
1589
+ $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT);
1590
+ }
1591
+ if (isset($restriction['attribs']['']['type']))
1592
+ {
1593
+ $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
1594
+ }
1595
+ if (isset($restriction['data']))
1596
+ {
1597
+ $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1598
+ }
1599
+ $restrictions_parent[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
1600
+ }
1601
+ }
1602
+ elseif ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block'))
1603
+ {
1604
+ foreach ($restrictions as $restriction)
1605
+ {
1606
+ $restriction_relationship = 'allow';
1607
+ $restriction_type = null;
1608
+ $restriction_value = 'itunes';
1609
+ if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes')
1610
+ {
1611
+ $restriction_relationship = 'deny';
1612
+ }
1613
+ $restrictions_parent[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
1614
+ }
1615
+ }
1616
+ elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction'))
1617
+ {
1618
+ foreach ($restrictions as $restriction)
1619
+ {
1620
+ $restriction_relationship = null;
1621
+ $restriction_type = null;
1622
+ $restriction_value = null;
1623
+ if (isset($restriction['attribs']['']['relationship']))
1624
+ {
1625
+ $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT);
1626
+ }
1627
+ if (isset($restriction['attribs']['']['type']))
1628
+ {
1629
+ $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
1630
+ }
1631
+ if (isset($restriction['data']))
1632
+ {
1633
+ $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1634
+ }
1635
+ $restrictions_parent[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
1636
+ }
1637
+ }
1638
+ elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block'))
1639
+ {
1640
+ foreach ($restrictions as $restriction)
1641
+ {
1642
+ $restriction_relationship = 'allow';
1643
+ $restriction_type = null;
1644
+ $restriction_value = 'itunes';
1645
+ if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes')
1646
+ {
1647
+ $restriction_relationship = 'deny';
1648
+ }
1649
+ $restrictions_parent[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
1650
+ }
1651
+ }
1652
+ if (is_array($restrictions_parent))
1653
+ {
1654
+ $restrictions_parent = array_values(array_unique($restrictions_parent));
1655
+ }
1656
+ else
1657
+ {
1658
+ $restrictions_parent = array(new SimplePie_Restriction('allow', null, 'default'));
1659
+ }
1660
+
1661
+ // THUMBNAILS
1662
+ if ($thumbnails = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail'))
1663
+ {
1664
+ foreach ($thumbnails as $thumbnail)
1665
+ {
1666
+ if (isset($thumbnail['attribs']['']['url']))
1667
+ {
1668
+ $thumbnails_parent[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
1669
+ }
1670
+ }
1671
+ }
1672
+ elseif ($thumbnails = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail'))
1673
+ {
1674
+ foreach ($thumbnails as $thumbnail)
1675
+ {
1676
+ if (isset($thumbnail['attribs']['']['url']))
1677
+ {
1678
+ $thumbnails_parent[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
1679
+ }
1680
+ }
1681
+ }
1682
+
1683
+ // TITLES
1684
+ if ($title_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'title'))
1685
+ {
1686
+ if (isset($title_parent[0]['data']))
1687
+ {
1688
+ $title_parent = $this->sanitize($title_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1689
+ }
1690
+ }
1691
+ elseif ($title_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'title'))
1692
+ {
1693
+ if (isset($title_parent[0]['data']))
1694
+ {
1695
+ $title_parent = $this->sanitize($title_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1696
+ }
1697
+ }
1698
+
1699
+ // Clear the memory
1700
+ unset($parent);
1701
+
1702
+ // Attributes
1703
+ $bitrate = null;
1704
+ $channels = null;
1705
+ $duration = null;
1706
+ $expression = null;
1707
+ $framerate = null;
1708
+ $height = null;
1709
+ $javascript = null;
1710
+ $lang = null;
1711
+ $length = null;
1712
+ $medium = null;
1713
+ $samplingrate = null;
1714
+ $type = null;
1715
+ $url = null;
1716
+ $width = null;
1717
+
1718
+ // Elements
1719
+ $captions = null;
1720
+ $categories = null;
1721
+ $copyrights = null;
1722
+ $credits = null;
1723
+ $description = null;
1724
+ $hashes = null;
1725
+ $keywords = null;
1726
+ $player = null;
1727
+ $ratings = null;
1728
+ $restrictions = null;
1729
+ $thumbnails = null;
1730
+ $title = null;
1731
+
1732
+ // If we have media:group tags, loop through them.
1733
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'group') as $group)
1734
+ {
1735
+ if(isset($group['child']) && isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content']))
1736
+ {
1737
+ // If we have media:content tags, loop through them.
1738
+ foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content)
1739
+ {
1740
+ if (isset($content['attribs']['']['url']))
1741
+ {
1742
+ // Attributes
1743
+ $bitrate = null;
1744
+ $channels = null;
1745
+ $duration = null;
1746
+ $expression = null;
1747
+ $framerate = null;
1748
+ $height = null;
1749
+ $javascript = null;
1750
+ $lang = null;
1751
+ $length = null;
1752
+ $medium = null;
1753
+ $samplingrate = null;
1754
+ $type = null;
1755
+ $url = null;
1756
+ $width = null;
1757
+
1758
+ // Elements
1759
+ $captions = null;
1760
+ $categories = null;
1761
+ $copyrights = null;
1762
+ $credits = null;
1763
+ $description = null;
1764
+ $hashes = null;
1765
+ $keywords = null;
1766
+ $player = null;
1767
+ $ratings = null;
1768
+ $restrictions = null;
1769
+ $thumbnails = null;
1770
+ $title = null;
1771
+
1772
+ // Start checking the attributes of media:content
1773
+ if (isset($content['attribs']['']['bitrate']))
1774
+ {
1775
+ $bitrate = $this->sanitize($content['attribs']['']['bitrate'], SIMPLEPIE_CONSTRUCT_TEXT);
1776
+ }
1777
+ if (isset($content['attribs']['']['channels']))
1778
+ {
1779
+ $channels = $this->sanitize($content['attribs']['']['channels'], SIMPLEPIE_CONSTRUCT_TEXT);
1780
+ }
1781
+ if (isset($content['attribs']['']['duration']))
1782
+ {
1783
+ $duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT);
1784
+ }
1785
+ else
1786
+ {
1787
+ $duration = $duration_parent;
1788
+ }
1789
+ if (isset($content['attribs']['']['expression']))
1790
+ {
1791
+ $expression = $this->sanitize($content['attribs']['']['expression'], SIMPLEPIE_CONSTRUCT_TEXT);
1792
+ }
1793
+ if (isset($content['attribs']['']['framerate']))
1794
+ {
1795
+ $framerate = $this->sanitize($content['attribs']['']['framerate'], SIMPLEPIE_CONSTRUCT_TEXT);
1796
+ }
1797
+ if (isset($content['attribs']['']['height']))
1798
+ {
1799
+ $height = $this->sanitize($content['attribs']['']['height'], SIMPLEPIE_CONSTRUCT_TEXT);
1800
+ }
1801
+ if (isset($content['attribs']['']['lang']))
1802
+ {
1803
+ $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
1804
+ }
1805
+ if (isset($content['attribs']['']['fileSize']))
1806
+ {
1807
+ $length = ceil($content['attribs']['']['fileSize']);
1808
+ }
1809
+ if (isset($content['attribs']['']['medium']))
1810
+ {
1811
+ $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT);
1812
+ }
1813
+ if (isset($content['attribs']['']['samplingrate']))
1814
+ {
1815
+ $samplingrate = $this->sanitize($content['attribs']['']['samplingrate'], SIMPLEPIE_CONSTRUCT_TEXT);
1816
+ }
1817
+ if (isset($content['attribs']['']['type']))
1818
+ {
1819
+ $type = $this->sanitize($content['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
1820
+ }
1821
+ if (isset($content['attribs']['']['width']))
1822
+ {
1823
+ $width = $this->sanitize($content['attribs']['']['width'], SIMPLEPIE_CONSTRUCT_TEXT);
1824
+ }
1825
+ $url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
1826
+
1827
+ // Checking the other optional media: elements. Priority: media:content, media:group, item, channel
1828
+
1829
+ // CAPTIONS
1830
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text']))
1831
+ {
1832
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption)
1833
+ {
1834
+ $caption_type = null;
1835
+ $caption_lang = null;
1836
+ $caption_startTime = null;
1837
+ $caption_endTime = null;
1838
+ $caption_text = null;
1839
+ if (isset($caption['attribs']['']['type']))
1840
+ {
1841
+ $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
1842
+ }
1843
+ if (isset($caption['attribs']['']['lang']))
1844
+ {
1845
+ $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
1846
+ }
1847
+ if (isset($caption['attribs']['']['start']))
1848
+ {
1849
+ $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT);
1850
+ }
1851
+ if (isset($caption['attribs']['']['end']))
1852
+ {
1853
+ $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT);
1854
+ }
1855
+ if (isset($caption['data']))
1856
+ {
1857
+ $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1858
+ }
1859
+ $captions[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text));
1860
+ }
1861
+ if (is_array($captions))
1862
+ {
1863
+ $captions = array_values(array_unique($captions));
1864
+ }
1865
+ }
1866
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text']))
1867
+ {
1868
+ foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption)
1869
+ {
1870
+ $caption_type = null;
1871
+ $caption_lang = null;
1872
+ $caption_startTime = null;
1873
+ $caption_endTime = null;
1874
+ $caption_text = null;
1875
+ if (isset($caption['attribs']['']['type']))
1876
+ {
1877
+ $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
1878
+ }
1879
+ if (isset($caption['attribs']['']['lang']))
1880
+ {
1881
+ $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
1882
+ }
1883
+ if (isset($caption['attribs']['']['start']))
1884
+ {
1885
+ $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT);
1886
+ }
1887
+ if (isset($caption['attribs']['']['end']))
1888
+ {
1889
+ $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT);
1890
+ }
1891
+ if (isset($caption['data']))
1892
+ {
1893
+ $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1894
+ }
1895
+ $captions[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text));
1896
+ }
1897
+ if (is_array($captions))
1898
+ {
1899
+ $captions = array_values(array_unique($captions));
1900
+ }
1901
+ }
1902
+ else
1903
+ {
1904
+ $captions = $captions_parent;
1905
+ }
1906
+
1907
+ // CATEGORIES
1908
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
1909
+ {
1910
+ foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
1911
+ {
1912
+ $term = null;
1913
+ $scheme = null;
1914
+ $label = null;
1915
+ if (isset($category['data']))
1916
+ {
1917
+ $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1918
+ }
1919
+ if (isset($category['attribs']['']['scheme']))
1920
+ {
1921
+ $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
1922
+ }
1923
+ else
1924
+ {
1925
+ $scheme = 'http://search.yahoo.com/mrss/category_schema';
1926
+ }
1927
+ if (isset($category['attribs']['']['label']))
1928
+ {
1929
+ $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
1930
+ }
1931
+ $categories[] = $this->registry->create('Category', array($term, $scheme, $label));
1932
+ }
1933
+ }
1934
+ if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
1935
+ {
1936
+ foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
1937
+ {
1938
+ $term = null;
1939
+ $scheme = null;
1940
+ $label = null;
1941
+ if (isset($category['data']))
1942
+ {
1943
+ $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1944
+ }
1945
+ if (isset($category['attribs']['']['scheme']))
1946
+ {
1947
+ $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
1948
+ }
1949
+ else
1950
+ {
1951
+ $scheme = 'http://search.yahoo.com/mrss/category_schema';
1952
+ }
1953
+ if (isset($category['attribs']['']['label']))
1954
+ {
1955
+ $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
1956
+ }
1957
+ $categories[] = $this->registry->create('Category', array($term, $scheme, $label));
1958
+ }
1959
+ }
1960
+ if (is_array($categories) && is_array($categories_parent))
1961
+ {
1962
+ $categories = array_values(array_unique(array_merge($categories, $categories_parent)));
1963
+ }
1964
+ elseif (is_array($categories))
1965
+ {
1966
+ $categories = array_values(array_unique($categories));
1967
+ }
1968
+ elseif (is_array($categories_parent))
1969
+ {
1970
+ $categories = array_values(array_unique($categories_parent));
1971
+ }
1972
+
1973
+ // COPYRIGHTS
1974
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright']))
1975
+ {
1976
+ $copyright_url = null;
1977
+ $copyright_label = null;
1978
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url']))
1979
+ {
1980
+ $copyright_url = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT);
1981
+ }
1982
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data']))
1983
+ {
1984
+ $copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1985
+ }
1986
+ $copyrights = $this->registry->create('Copyright', array($copyright_url, $copyright_label));
1987
+ }
1988
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright']))
1989
+ {
1990
+ $copyright_url = null;
1991
+ $copyright_label = null;
1992
+ if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url']))
1993
+ {
1994
+ $copyright_url = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT);
1995
+ }
1996
+ if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data']))
1997
+ {
1998
+ $copyright_label = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
1999
+ }
2000
+ $copyrights = $this->registry->create('Copyright', array($copyright_url, $copyright_label));
2001
+ }
2002
+ else
2003
+ {
2004
+ $copyrights = $copyrights_parent;
2005
+ }
2006
+
2007
+ // CREDITS
2008
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
2009
+ {
2010
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
2011
+ {
2012
+ $credit_role = null;
2013
+ $credit_scheme = null;
2014
+ $credit_name = null;
2015
+ if (isset($credit['attribs']['']['role']))
2016
+ {
2017
+ $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
2018
+ }
2019
+ if (isset($credit['attribs']['']['scheme']))
2020
+ {
2021
+ $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
2022
+ }
2023
+ else
2024
+ {
2025
+ $credit_scheme = 'urn:ebu';
2026
+ }
2027
+ if (isset($credit['data']))
2028
+ {
2029
+ $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2030
+ }
2031
+ $credits[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
2032
+ }
2033
+ if (is_array($credits))
2034
+ {
2035
+ $credits = array_values(array_unique($credits));
2036
+ }
2037
+ }
2038
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
2039
+ {
2040
+ foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
2041
+ {
2042
+ $credit_role = null;
2043
+ $credit_scheme = null;
2044
+ $credit_name = null;
2045
+ if (isset($credit['attribs']['']['role']))
2046
+ {
2047
+ $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
2048
+ }
2049
+ if (isset($credit['attribs']['']['scheme']))
2050
+ {
2051
+ $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
2052
+ }
2053
+ else
2054
+ {
2055
+ $credit_scheme = 'urn:ebu';
2056
+ }
2057
+ if (isset($credit['data']))
2058
+ {
2059
+ $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2060
+ }
2061
+ $credits[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
2062
+ }
2063
+ if (is_array($credits))
2064
+ {
2065
+ $credits = array_values(array_unique($credits));
2066
+ }
2067
+ }
2068
+ else
2069
+ {
2070
+ $credits = $credits_parent;
2071
+ }
2072
+
2073
+ // DESCRIPTION
2074
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
2075
+ {
2076
+ $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2077
+ }
2078
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
2079
+ {
2080
+ $description = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2081
+ }
2082
+ else
2083
+ {
2084
+ $description = $description_parent;
2085
+ }
2086
+
2087
+ // HASHES
2088
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash']))
2089
+ {
2090
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash)
2091
+ {
2092
+ $value = null;
2093
+ $algo = null;
2094
+ if (isset($hash['data']))
2095
+ {
2096
+ $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2097
+ }
2098
+ if (isset($hash['attribs']['']['algo']))
2099
+ {
2100
+ $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
2101
+ }
2102
+ else
2103
+ {
2104
+ $algo = 'md5';
2105
+ }
2106
+ $hashes[] = $algo.':'.$value;
2107
+ }
2108
+ if (is_array($hashes))
2109
+ {
2110
+ $hashes = array_values(array_unique($hashes));
2111
+ }
2112
+ }
2113
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash']))
2114
+ {
2115
+ foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash)
2116
+ {
2117
+ $value = null;
2118
+ $algo = null;
2119
+ if (isset($hash['data']))
2120
+ {
2121
+ $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2122
+ }
2123
+ if (isset($hash['attribs']['']['algo']))
2124
+ {
2125
+ $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
2126
+ }
2127
+ else
2128
+ {
2129
+ $algo = 'md5';
2130
+ }
2131
+ $hashes[] = $algo.':'.$value;
2132
+ }
2133
+ if (is_array($hashes))
2134
+ {
2135
+ $hashes = array_values(array_unique($hashes));
2136
+ }
2137
+ }
2138
+ else
2139
+ {
2140
+ $hashes = $hashes_parent;
2141
+ }
2142
+
2143
+ // KEYWORDS
2144
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords']))
2145
+ {
2146
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data']))
2147
+ {
2148
+ $temp = explode(',', $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
2149
+ foreach ($temp as $word)
2150
+ {
2151
+ $keywords[] = trim($word);
2152
+ }
2153
+ unset($temp);
2154
+ }
2155
+ if (is_array($keywords))
2156
+ {
2157
+ $keywords = array_values(array_unique($keywords));
2158
+ }
2159
+ }
2160
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords']))
2161
+ {
2162
+ if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data']))
2163
+ {
2164
+ $temp = explode(',', $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
2165
+ foreach ($temp as $word)
2166
+ {
2167
+ $keywords[] = trim($word);
2168
+ }
2169
+ unset($temp);
2170
+ }
2171
+ if (is_array($keywords))
2172
+ {
2173
+ $keywords = array_values(array_unique($keywords));
2174
+ }
2175
+ }
2176
+ else
2177
+ {
2178
+ $keywords = $keywords_parent;
2179
+ }
2180
+
2181
+ // PLAYER
2182
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
2183
+ {
2184
+ $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
2185
+ }
2186
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
2187
+ {
2188
+ $player = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
2189
+ }
2190
+ else
2191
+ {
2192
+ $player = $player_parent;
2193
+ }
2194
+
2195
+ // RATINGS
2196
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
2197
+ {
2198
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
2199
+ {
2200
+ $rating_scheme = null;
2201
+ $rating_value = null;
2202
+ if (isset($rating['attribs']['']['scheme']))
2203
+ {
2204
+ $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
2205
+ }
2206
+ else
2207
+ {
2208
+ $rating_scheme = 'urn:simple';
2209
+ }
2210
+ if (isset($rating['data']))
2211
+ {
2212
+ $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2213
+ }
2214
+ $ratings[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
2215
+ }
2216
+ if (is_array($ratings))
2217
+ {
2218
+ $ratings = array_values(array_unique($ratings));
2219
+ }
2220
+ }
2221
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
2222
+ {
2223
+ foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
2224
+ {
2225
+ $rating_scheme = null;
2226
+ $rating_value = null;
2227
+ if (isset($rating['attribs']['']['scheme']))
2228
+ {
2229
+ $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
2230
+ }
2231
+ else
2232
+ {
2233
+ $rating_scheme = 'urn:simple';
2234
+ }
2235
+ if (isset($rating['data']))
2236
+ {
2237
+ $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2238
+ }
2239
+ $ratings[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
2240
+ }
2241
+ if (is_array($ratings))
2242
+ {
2243
+ $ratings = array_values(array_unique($ratings));
2244
+ }
2245
+ }
2246
+ else
2247
+ {
2248
+ $ratings = $ratings_parent;
2249
+ }
2250
+
2251
+ // RESTRICTIONS
2252
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
2253
+ {
2254
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
2255
+ {
2256
+ $restriction_relationship = null;
2257
+ $restriction_type = null;
2258
+ $restriction_value = null;
2259
+ if (isset($restriction['attribs']['']['relationship']))
2260
+ {
2261
+ $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT);
2262
+ }
2263
+ if (isset($restriction['attribs']['']['type']))
2264
+ {
2265
+ $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
2266
+ }
2267
+ if (isset($restriction['data']))
2268
+ {
2269
+ $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2270
+ }
2271
+ $restrictions[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
2272
+ }
2273
+ if (is_array($restrictions))
2274
+ {
2275
+ $restrictions = array_values(array_unique($restrictions));
2276
+ }
2277
+ }
2278
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
2279
+ {
2280
+ foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
2281
+ {
2282
+ $restriction_relationship = null;
2283
+ $restriction_type = null;
2284
+ $restriction_value = null;
2285
+ if (isset($restriction['attribs']['']['relationship']))
2286
+ {
2287
+ $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT);
2288
+ }
2289
+ if (isset($restriction['attribs']['']['type']))
2290
+ {
2291
+ $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
2292
+ }
2293
+ if (isset($restriction['data']))
2294
+ {
2295
+ $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2296
+ }
2297
+ $restrictions[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
2298
+ }
2299
+ if (is_array($restrictions))
2300
+ {
2301
+ $restrictions = array_values(array_unique($restrictions));
2302
+ }
2303
+ }
2304
+ else
2305
+ {
2306
+ $restrictions = $restrictions_parent;
2307
+ }
2308
+
2309
+ // THUMBNAILS
2310
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail']))
2311
+ {
2312
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail)
2313
+ {
2314
+ $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
2315
+ }
2316
+ if (is_array($thumbnails))
2317
+ {
2318
+ $thumbnails = array_values(array_unique($thumbnails));
2319
+ }
2320
+ }
2321
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail']))
2322
+ {
2323
+ foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail)
2324
+ {
2325
+ $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
2326
+ }
2327
+ if (is_array($thumbnails))
2328
+ {
2329
+ $thumbnails = array_values(array_unique($thumbnails));
2330
+ }
2331
+ }
2332
+ else
2333
+ {
2334
+ $thumbnails = $thumbnails_parent;
2335
+ }
2336
+
2337
+ // TITLES
2338
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
2339
+ {
2340
+ $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2341
+ }
2342
+ elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
2343
+ {
2344
+ $title = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2345
+ }
2346
+ else
2347
+ {
2348
+ $title = $title_parent;
2349
+ }
2350
+
2351
+ $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width));
2352
+ }
2353
+ }
2354
+ }
2355
+ }
2356
+
2357
+ // If we have standalone media:content tags, loop through them.
2358
+ if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content']))
2359
+ {
2360
+ foreach ((array) $this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content)
2361
+ {
2362
+ if (isset($content['attribs']['']['url']) || isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
2363
+ {
2364
+ // Attributes
2365
+ $bitrate = null;
2366
+ $channels = null;
2367
+ $duration = null;
2368
+ $expression = null;
2369
+ $framerate = null;
2370
+ $height = null;
2371
+ $javascript = null;
2372
+ $lang = null;
2373
+ $length = null;
2374
+ $medium = null;
2375
+ $samplingrate = null;
2376
+ $type = null;
2377
+ $url = null;
2378
+ $width = null;
2379
+
2380
+ // Elements
2381
+ $captions = null;
2382
+ $categories = null;
2383
+ $copyrights = null;
2384
+ $credits = null;
2385
+ $description = null;
2386
+ $hashes = null;
2387
+ $keywords = null;
2388
+ $player = null;
2389
+ $ratings = null;
2390
+ $restrictions = null;
2391
+ $thumbnails = null;
2392
+ $title = null;
2393
+
2394
+ // Start checking the attributes of media:content
2395
+ if (isset($content['attribs']['']['bitrate']))
2396
+ {
2397
+ $bitrate = $this->sanitize($content['attribs']['']['bitrate'], SIMPLEPIE_CONSTRUCT_TEXT);
2398
+ }
2399
+ if (isset($content['attribs']['']['channels']))
2400
+ {
2401
+ $channels = $this->sanitize($content['attribs']['']['channels'], SIMPLEPIE_CONSTRUCT_TEXT);
2402
+ }
2403
+ if (isset($content['attribs']['']['duration']))
2404
+ {
2405
+ $duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT);
2406
+ }
2407
+ else
2408
+ {
2409
+ $duration = $duration_parent;
2410
+ }
2411
+ if (isset($content['attribs']['']['expression']))
2412
+ {
2413
+ $expression = $this->sanitize($content['attribs']['']['expression'], SIMPLEPIE_CONSTRUCT_TEXT);
2414
+ }
2415
+ if (isset($content['attribs']['']['framerate']))
2416
+ {
2417
+ $framerate = $this->sanitize($content['attribs']['']['framerate'], SIMPLEPIE_CONSTRUCT_TEXT);
2418
+ }
2419
+ if (isset($content['attribs']['']['height']))
2420
+ {
2421
+ $height = $this->sanitize($content['attribs']['']['height'], SIMPLEPIE_CONSTRUCT_TEXT);
2422
+ }
2423
+ if (isset($content['attribs']['']['lang']))
2424
+ {
2425
+ $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
2426
+ }
2427
+ if (isset($content['attribs']['']['fileSize']))
2428
+ {
2429
+ $length = ceil($content['attribs']['']['fileSize']);
2430
+ }
2431
+ if (isset($content['attribs']['']['medium']))
2432
+ {
2433
+ $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT);
2434
+ }
2435
+ if (isset($content['attribs']['']['samplingrate']))
2436
+ {
2437
+ $samplingrate = $this->sanitize($content['attribs']['']['samplingrate'], SIMPLEPIE_CONSTRUCT_TEXT);
2438
+ }
2439
+ if (isset($content['attribs']['']['type']))
2440
+ {
2441
+ $type = $this->sanitize($content['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
2442
+ }
2443
+ if (isset($content['attribs']['']['width']))
2444
+ {
2445
+ $width = $this->sanitize($content['attribs']['']['width'], SIMPLEPIE_CONSTRUCT_TEXT);
2446
+ }
2447
+ if (isset($content['attribs']['']['url']))
2448
+ {
2449
+ $url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
2450
+ }
2451
+ // Checking the other optional media: elements. Priority: media:content, media:group, item, channel
2452
+
2453
+ // CAPTIONS
2454
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text']))
2455
+ {
2456
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption)
2457
+ {
2458
+ $caption_type = null;
2459
+ $caption_lang = null;
2460
+ $caption_startTime = null;
2461
+ $caption_endTime = null;
2462
+ $caption_text = null;
2463
+ if (isset($caption['attribs']['']['type']))
2464
+ {
2465
+ $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
2466
+ }
2467
+ if (isset($caption['attribs']['']['lang']))
2468
+ {
2469
+ $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
2470
+ }
2471
+ if (isset($caption['attribs']['']['start']))
2472
+ {
2473
+ $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT);
2474
+ }
2475
+ if (isset($caption['attribs']['']['end']))
2476
+ {
2477
+ $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT);
2478
+ }
2479
+ if (isset($caption['data']))
2480
+ {
2481
+ $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2482
+ }
2483
+ $captions[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text));
2484
+ }
2485
+ if (is_array($captions))
2486
+ {
2487
+ $captions = array_values(array_unique($captions));
2488
+ }
2489
+ }
2490
+ else
2491
+ {
2492
+ $captions = $captions_parent;
2493
+ }
2494
+
2495
+ // CATEGORIES
2496
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
2497
+ {
2498
+ foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
2499
+ {
2500
+ $term = null;
2501
+ $scheme = null;
2502
+ $label = null;
2503
+ if (isset($category['data']))
2504
+ {
2505
+ $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2506
+ }
2507
+ if (isset($category['attribs']['']['scheme']))
2508
+ {
2509
+ $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
2510
+ }
2511
+ else
2512
+ {
2513
+ $scheme = 'http://search.yahoo.com/mrss/category_schema';
2514
+ }
2515
+ if (isset($category['attribs']['']['label']))
2516
+ {
2517
+ $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
2518
+ }
2519
+ $categories[] = $this->registry->create('Category', array($term, $scheme, $label));
2520
+ }
2521
+ }
2522
+ if (is_array($categories) && is_array($categories_parent))
2523
+ {
2524
+ $categories = array_values(array_unique(array_merge($categories, $categories_parent)));
2525
+ }
2526
+ elseif (is_array($categories))
2527
+ {
2528
+ $categories = array_values(array_unique($categories));
2529
+ }
2530
+ elseif (is_array($categories_parent))
2531
+ {
2532
+ $categories = array_values(array_unique($categories_parent));
2533
+ }
2534
+ else
2535
+ {
2536
+ $categories = null;
2537
+ }
2538
+
2539
+ // COPYRIGHTS
2540
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright']))
2541
+ {
2542
+ $copyright_url = null;
2543
+ $copyright_label = null;
2544
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url']))
2545
+ {
2546
+ $copyright_url = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT);
2547
+ }
2548
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data']))
2549
+ {
2550
+ $copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2551
+ }
2552
+ $copyrights = $this->registry->create('Copyright', array($copyright_url, $copyright_label));
2553
+ }
2554
+ else
2555
+ {
2556
+ $copyrights = $copyrights_parent;
2557
+ }
2558
+
2559
+ // CREDITS
2560
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
2561
+ {
2562
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
2563
+ {
2564
+ $credit_role = null;
2565
+ $credit_scheme = null;
2566
+ $credit_name = null;
2567
+ if (isset($credit['attribs']['']['role']))
2568
+ {
2569
+ $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
2570
+ }
2571
+ if (isset($credit['attribs']['']['scheme']))
2572
+ {
2573
+ $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
2574
+ }
2575
+ else
2576
+ {
2577
+ $credit_scheme = 'urn:ebu';
2578
+ }
2579
+ if (isset($credit['data']))
2580
+ {
2581
+ $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2582
+ }
2583
+ $credits[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
2584
+ }
2585
+ if (is_array($credits))
2586
+ {
2587
+ $credits = array_values(array_unique($credits));
2588
+ }
2589
+ }
2590
+ else
2591
+ {
2592
+ $credits = $credits_parent;
2593
+ }
2594
+
2595
+ // DESCRIPTION
2596
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
2597
+ {
2598
+ $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2599
+ }
2600
+ else
2601
+ {
2602
+ $description = $description_parent;
2603
+ }
2604
+
2605
+ // HASHES
2606
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash']))
2607
+ {
2608
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash)
2609
+ {
2610
+ $value = null;
2611
+ $algo = null;
2612
+ if (isset($hash['data']))
2613
+ {
2614
+ $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2615
+ }
2616
+ if (isset($hash['attribs']['']['algo']))
2617
+ {
2618
+ $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
2619
+ }
2620
+ else
2621
+ {
2622
+ $algo = 'md5';
2623
+ }
2624
+ $hashes[] = $algo.':'.$value;
2625
+ }
2626
+ if (is_array($hashes))
2627
+ {
2628
+ $hashes = array_values(array_unique($hashes));
2629
+ }
2630
+ }
2631
+ else
2632
+ {
2633
+ $hashes = $hashes_parent;
2634
+ }
2635
+
2636
+ // KEYWORDS
2637
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords']))
2638
+ {
2639
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data']))
2640
+ {
2641
+ $temp = explode(',', $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
2642
+ foreach ($temp as $word)
2643
+ {
2644
+ $keywords[] = trim($word);
2645
+ }
2646
+ unset($temp);
2647
+ }
2648
+ if (is_array($keywords))
2649
+ {
2650
+ $keywords = array_values(array_unique($keywords));
2651
+ }
2652
+ }
2653
+ else
2654
+ {
2655
+ $keywords = $keywords_parent;
2656
+ }
2657
+
2658
+ // PLAYER
2659
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
2660
+ {
2661
+ $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
2662
+ }
2663
+ else
2664
+ {
2665
+ $player = $player_parent;
2666
+ }
2667
+
2668
+ // RATINGS
2669
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
2670
+ {
2671
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
2672
+ {
2673
+ $rating_scheme = null;
2674
+ $rating_value = null;
2675
+ if (isset($rating['attribs']['']['scheme']))
2676
+ {
2677
+ $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
2678
+ }
2679
+ else
2680
+ {
2681
+ $rating_scheme = 'urn:simple';
2682
+ }
2683
+ if (isset($rating['data']))
2684
+ {
2685
+ $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2686
+ }
2687
+ $ratings[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
2688
+ }
2689
+ if (is_array($ratings))
2690
+ {
2691
+ $ratings = array_values(array_unique($ratings));
2692
+ }
2693
+ }
2694
+ else
2695
+ {
2696
+ $ratings = $ratings_parent;
2697
+ }
2698
+
2699
+ // RESTRICTIONS
2700
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
2701
+ {
2702
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
2703
+ {
2704
+ $restriction_relationship = null;
2705
+ $restriction_type = null;
2706
+ $restriction_value = null;
2707
+ if (isset($restriction['attribs']['']['relationship']))
2708
+ {
2709
+ $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT);
2710
+ }
2711
+ if (isset($restriction['attribs']['']['type']))
2712
+ {
2713
+ $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
2714
+ }
2715
+ if (isset($restriction['data']))
2716
+ {
2717
+ $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2718
+ }
2719
+ $restrictions[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
2720
+ }
2721
+ if (is_array($restrictions))
2722
+ {
2723
+ $restrictions = array_values(array_unique($restrictions));
2724
+ }
2725
+ }
2726
+ else
2727
+ {
2728
+ $restrictions = $restrictions_parent;
2729
+ }
2730
+
2731
+ // THUMBNAILS
2732
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail']))
2733
+ {
2734
+ foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail)
2735
+ {
2736
+ $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
2737
+ }
2738
+ if (is_array($thumbnails))
2739
+ {
2740
+ $thumbnails = array_values(array_unique($thumbnails));
2741
+ }
2742
+ }
2743
+ else
2744
+ {
2745
+ $thumbnails = $thumbnails_parent;
2746
+ }
2747
+
2748
+ // TITLES
2749
+ if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
2750
+ {
2751
+ $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2752
+ }
2753
+ else
2754
+ {
2755
+ $title = $title_parent;
2756
+ }
2757
+
2758
+ $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width));
2759
+ }
2760
+ }
2761
+ }
2762
+
2763
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link') as $link)
2764
+ {
2765
+ if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure')
2766
+ {
2767
+ // Attributes
2768
+ $bitrate = null;
2769
+ $channels = null;
2770
+ $duration = null;
2771
+ $expression = null;
2772
+ $framerate = null;
2773
+ $height = null;
2774
+ $javascript = null;
2775
+ $lang = null;
2776
+ $length = null;
2777
+ $medium = null;
2778
+ $samplingrate = null;
2779
+ $type = null;
2780
+ $url = null;
2781
+ $width = null;
2782
+
2783
+ $url = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link));
2784
+ if (isset($link['attribs']['']['type']))
2785
+ {
2786
+ $type = $this->sanitize($link['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
2787
+ }
2788
+ if (isset($link['attribs']['']['length']))
2789
+ {
2790
+ $length = ceil($link['attribs']['']['length']);
2791
+ }
2792
+
2793
+ // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
2794
+ $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width));
2795
+ }
2796
+ }
2797
+
2798
+ foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link)
2799
+ {
2800
+ if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure')
2801
+ {
2802
+ // Attributes
2803
+ $bitrate = null;
2804
+ $channels = null;
2805
+ $duration = null;
2806
+ $expression = null;
2807
+ $framerate = null;
2808
+ $height = null;
2809
+ $javascript = null;
2810
+ $lang = null;
2811
+ $length = null;
2812
+ $medium = null;
2813
+ $samplingrate = null;
2814
+ $type = null;
2815
+ $url = null;
2816
+ $width = null;
2817
+
2818
+ $url = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link));
2819
+ if (isset($link['attribs']['']['type']))
2820
+ {
2821
+ $type = $this->sanitize($link['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
2822
+ }
2823
+ if (isset($link['attribs']['']['length']))
2824
+ {
2825
+ $length = ceil($link['attribs']['']['length']);
2826
+ }
2827
+
2828
+ // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
2829
+ $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width));
2830
+ }
2831
+ }
2832
+
2833
+ if ($enclosure = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'enclosure'))
2834
+ {
2835
+ if (isset($enclosure[0]['attribs']['']['url']))
2836
+ {
2837
+ // Attributes
2838
+ $bitrate = null;
2839
+ $channels = null;
2840
+ $duration = null;
2841
+ $expression = null;
2842
+ $framerate = null;
2843
+ $height = null;
2844
+ $javascript = null;
2845
+ $lang = null;
2846
+ $length = null;
2847
+ $medium = null;
2848
+ $samplingrate = null;
2849
+ $type = null;
2850
+ $url = null;
2851
+ $width = null;
2852
+
2853
+ $url = $this->sanitize($enclosure[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($enclosure[0]));
2854
+ if (isset($enclosure[0]['attribs']['']['type']))
2855
+ {
2856
+ $type = $this->sanitize($enclosure[0]['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
2857
+ }
2858
+ if (isset($enclosure[0]['attribs']['']['length']))
2859
+ {
2860
+ $length = ceil($enclosure[0]['attribs']['']['length']);
2861
+ }
2862
+
2863
+ // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
2864
+ $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width));
2865
+ }
2866
+ }
2867
+
2868
+ if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width))
2869
+ {
2870
+ // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
2871
+ $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width));
2872
+ }
2873
+
2874
+ $this->data['enclosures'] = array_values(array_unique($this->data['enclosures']));
2875
+ }
2876
+ if (!empty($this->data['enclosures']))
2877
+ {
2878
+ return $this->data['enclosures'];
2879
+ }
2880
+ else
2881
+ {
2882
+ return null;
2883
+ }
2884
+ }
2885
+
2886
+ /**
2887
+ * Get the latitude coordinates for the item
2888
+ *
2889
+ * Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications
2890
+ *
2891
+ * Uses `<geo:lat>` or `<georss:point>`
2892
+ *
2893
+ * @since 1.0
2894
+ * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo
2895
+ * @link http://www.georss.org/ GeoRSS
2896
+ * @return string|null
2897
+ */
2898
+ public function get_latitude()
2899
+ {
2900
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
2901
+ {
2902
+ return (float) $return[0]['data'];
2903
+ }
2904
+ elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
2905
+ {
2906
+ return (float) $match[1];
2907
+ }
2908
+ else
2909
+ {
2910
+ return null;
2911
+ }
2912
+ }
2913
+
2914
+ /**
2915
+ * Get the longitude coordinates for the item
2916
+ *
2917
+ * Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications
2918
+ *
2919
+ * Uses `<geo:long>`, `<geo:lon>` or `<georss:point>`
2920
+ *
2921
+ * @since 1.0
2922
+ * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo
2923
+ * @link http://www.georss.org/ GeoRSS
2924
+ * @return string|null
2925
+ */
2926
+ public function get_longitude()
2927
+ {
2928
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long'))
2929
+ {
2930
+ return (float) $return[0]['data'];
2931
+ }
2932
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon'))
2933
+ {
2934
+ return (float) $return[0]['data'];
2935
+ }
2936
+ elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
2937
+ {
2938
+ return (float) $match[2];
2939
+ }
2940
+ else
2941
+ {
2942
+ return null;
2943
+ }
2944
+ }
2945
+
2946
+ /**
2947
+ * Get the `<atom:source>` for the item
2948
+ *
2949
+ * @since 1.1
2950
+ * @return SimplePie_Source|null
2951
+ */
2952
+ public function get_source()
2953
+ {
2954
+ if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'source'))
2955
+ {
2956
+ return $this->registry->create('Source', array($this, $return[0]));
2957
+ }
2958
+ else
2959
+ {
2960
+ return null;
2961
+ }
2962
+ }
2963
+ }
2964
+