WP RSS Aggregator - Version 4.15

Version Description

(2019-07-16) =

Added - New error handling for catchable PHP7 Throwable errors. - New option to enable feed caching for better performance. - New option to import source name and URL for each item individually. - The custom feed now includes source info for every item.

Changed - Improved some exception messages to better indicate the cause of certain problems. - Re-organized settings into multiple tabs. - Added the current site URL to the custom feed URL option's label.

Fixed - Feed sources had image importing wrongly enabled by default. - Downloading the debug log triggered an error. - The custom feed self URL ignored the settings and was incorrect. - Items in the custom feed had a missing rel attribute for their <link> element. - Fixed placement of WordPress notices on the Templates List and Edit page. - Fixed WordPress notices disappearing after moving between Templates list and edit page.

Download this release

Release Info

Developer Mekku
Plugin Icon 128x128 WP RSS Aggregator
Version 4.15
Comparing to
See all releases

Code changes from version 4.14 to 4.15

Files changed (898) hide show
  1. CHANGELOG.md +20 -0
  2. css/build/common.min.css +0 -0
  3. css/build/gutenberg-block.min.css +0 -0
  4. css/build/intro.min.css +0 -0
  5. css/build/pagination.min.css +0 -0
  6. css/build/plugins.min.css +0 -0
  7. css/build/templates.min.css +0 -0
  8. css/build/update.min.css +0 -0
  9. css/src/common/index.scss +0 -3
  10. css/src/common/info-box.scss +0 -16
  11. css/src/common/notice-block.scss +0 -64
  12. css/src/gutenberg-block/index.scss +0 -14
  13. css/src/intro/animation.scss +0 -48
  14. css/src/intro/expander.scss +0 -26
  15. css/src/intro/loading.scss +0 -131
  16. css/src/intro/steps.scss +0 -647
  17. css/src/mixins.scss +0 -32
  18. css/src/pagination/index.scss +0 -10
  19. css/src/plugins/form.scss +0 -48
  20. css/src/plugins/index.scss +0 -25
  21. css/src/plugins/modal.scss +0 -173
  22. css/src/templates/bottom-panel.scss +0 -15
  23. css/src/templates/grid.scss +0 -18
  24. css/src/templates/index.scss +0 -216
  25. css/src/templates/loading.scss +0 -220
  26. css/src/templates/notifications.scss +0 -28
  27. css/src/update/index.scss +0 -149
  28. includes/admin-help-metaboxes.php +7 -0
  29. includes/admin-help-settings.php +6 -1
  30. includes/admin-intro-page.php +10 -0
  31. includes/admin-metaboxes.php +7 -1
  32. includes/admin-options-legacy.php +70 -80
  33. includes/admin-options.php +239 -209
  34. includes/admin-update-page.php +2 -2
  35. includes/feed-access.php +28 -1
  36. includes/feed-importing-images.php +4 -0
  37. includes/feed-importing.php +67 -4
  38. includes/update.php +3 -0
  39. js/build/common.min.js +0 -0
  40. js/build/gutenberg-block.min.js +0 -0
  41. js/build/intro.min.js +0 -0
  42. js/build/pagination.min.js +0 -0
  43. js/build/plugins.min.js +0 -0
  44. js/build/templates.min.js +1 -1
  45. js/build/update.min.js +0 -0
  46. js/build/wpra-manifest.min.js +0 -0
  47. js/build/wpra-vendor.min.js +0 -0
  48. js/src/components/BottomPanel.vue +0 -9
  49. js/src/components/Button.js +0 -14
  50. js/src/components/Expander.vue +0 -36
  51. js/src/components/Input.js +0 -100
  52. js/src/components/Layout.js +0 -11
  53. js/src/components/Main.js +0 -11
  54. js/src/components/MediaInput.js +0 -96
  55. js/src/components/Modal.vue +0 -114
  56. js/src/components/NoticeBlock.js +0 -143
  57. js/src/components/Postbox.vue +0 -44
  58. js/src/components/RouteLink.js +0 -27
  59. js/src/components/RouterApp.js +0 -47
  60. js/src/components/SerializedForm.vue +0 -89
  61. js/src/components/Sidebar.js +0 -11
  62. js/src/components/TransitionExpand.vue +0 -66
  63. js/src/components/index.js +0 -15
  64. js/src/libs/NotificationCenter.js +0 -45
  65. js/src/libs/Router.js +0 -122
  66. js/src/mixins/DataChangesAware.js +0 -47
  67. js/src/modules/gutenberg-block/components/MultipleSelectControl.js +0 -85
  68. js/src/modules/gutenberg-block/index.js +0 -209
  69. js/src/modules/intro/Wizard.vue +0 -440
  70. js/src/modules/intro/index.js +0 -11
  71. js/src/modules/pagination/index.js +0 -47
  72. js/src/modules/plugins/PluginDisablePoll.vue +0 -122
  73. js/src/modules/plugins/index.js +0 -10
  74. js/src/modules/templates/Edit.js +0 -491
  75. js/src/modules/templates/List.js +0 -352
  76. js/src/modules/templates/app.js +0 -117
  77. js/src/modules/templates/index.js +0 -36
  78. js/src/modules/templates/store/actions.js +0 -1
  79. js/src/modules/templates/store/getters.js +0 -7
  80. js/src/modules/templates/store/index.js +0 -12
  81. js/src/modules/templates/store/mutations.js +0 -10
  82. js/src/modules/templates/store/state.js +0 -18
  83. js/src/utils/Collection.js +0 -178
  84. js/src/utils/base64.js +0 -133
  85. js/src/utils/copy.js +0 -43
  86. js/src/utils/deepmerge.js +0 -72
  87. js/src/utils/fetch.js +0 -26
  88. js/src/utils/jsonClone.js +0 -3
  89. readme.txt +16 -47
  90. src/Entities/Feeds/Items/WpPostFeedItem.php +3 -0
  91. src/Entities/Feeds/Sources/WpPostFeedSource.php +19 -4
  92. src/Handlers/CustomFeed/RenderCustomFeedHandler.php +14 -4
  93. src/Handlers/Logger/DownloadLogHandler.php +23 -1
  94. src/Modules/CustomFeedModule.php +1 -0
  95. src/Modules/ImporterModule.php +3 -0
  96. src/Templates/Feeds/Types/AbstractFeedTemplateType.php +1 -1
  97. src/Templates/TwigTemplate.php +9 -8
  98. templates/admin/templates-page.twig +3 -0
  99. templates/admin/update-page.twig +30 -0
  100. templates/custom-feed/entry.twig +11 -1
  101. templates/custom-feed/main.twig +1 -2
  102. templates/feeds/list/feed-item.twig +2 -2
  103. uninstall.php +15 -8
  104. vendor/autoload.php +1 -1
  105. vendor/composer/ClassLoader.php +0 -0
  106. vendor/composer/LICENSE +0 -0
  107. vendor/composer/autoload_classmap.php +0 -2
  108. vendor/composer/autoload_files.php +0 -0
  109. vendor/composer/autoload_namespaces.php +0 -0
  110. vendor/composer/autoload_psr4.php +0 -0
  111. vendor/composer/autoload_real.php +7 -7
  112. vendor/composer/autoload_static.php +5 -7
  113. vendor/composer/installed.json +8 -8
  114. vendor/container-interop/container-interop/.gitignore +0 -0
  115. vendor/container-interop/container-interop/LICENSE +0 -0
  116. vendor/container-interop/container-interop/README.md +0 -0
  117. vendor/container-interop/container-interop/composer.json +0 -0
  118. vendor/container-interop/container-interop/docs/ContainerInterface-meta.md +0 -0
  119. vendor/container-interop/container-interop/docs/ContainerInterface.md +0 -0
  120. vendor/container-interop/container-interop/docs/Delegate-lookup-meta.md +0 -0
  121. vendor/container-interop/container-interop/docs/Delegate-lookup.md +0 -0
  122. vendor/container-interop/container-interop/docs/images/interoperating_containers.png +0 -0
  123. vendor/container-interop/container-interop/docs/images/priority.png +0 -0
  124. vendor/container-interop/container-interop/docs/images/side_by_side_containers.png +0 -0
  125. vendor/container-interop/container-interop/src/Interop/Container/ContainerInterface.php +0 -0
  126. vendor/container-interop/container-interop/src/Interop/Container/Exception/ContainerException.php +0 -0
  127. vendor/container-interop/container-interop/src/Interop/Container/Exception/NotFoundException.php +0 -0
  128. vendor/container-interop/service-provider/.gitignore +0 -0
  129. vendor/container-interop/service-provider/README.md +0 -0
  130. vendor/container-interop/service-provider/composer.json +0 -0
  131. vendor/container-interop/service-provider/puli.json +0 -0
  132. vendor/container-interop/service-provider/src/ServiceProvider.php +0 -0
  133. vendor/dhii/collections-abstract-base/composer.json +0 -0
  134. vendor/dhii/collections-abstract-base/composer.lock +0 -0
  135. vendor/dhii/collections-abstract-base/src/AbstractCollection.php +0 -0
  136. vendor/dhii/collections-abstract-base/src/AbstractHasher.php +0 -0
  137. vendor/dhii/collections-abstract-base/src/AbstractIterableCollection.php +0 -0
  138. vendor/dhii/collections-abstract/composer.json +0 -0
  139. vendor/dhii/collections-abstract/composer.lock +0 -0
  140. vendor/dhii/collections-abstract/src/AbstractCallbackCollection.php +0 -0
  141. vendor/dhii/collections-abstract/src/AbstractCallbackCollectionBase.php +0 -0
  142. vendor/dhii/collections-abstract/src/AbstractCallbackIterator.php +0 -0
  143. vendor/dhii/collections-abstract/src/AbstractGenericAccessibleCollection.php +0 -0
  144. vendor/dhii/collections-abstract/src/AbstractGenericCollection.php +0 -0
  145. vendor/dhii/collections-abstract/src/AbstractGenericMutableCollection.php +0 -0
  146. vendor/dhii/collections-abstract/src/AbstractSearchableCollection.php +0 -0
  147. vendor/dhii/collections-abstract/src/AppendIterator.php +0 -0
  148. vendor/dhii/collections-abstract/src/CallbackIterator.php +0 -0
  149. vendor/dhii/collections-interface/composer.json +0 -0
  150. vendor/dhii/collections-interface/composer.lock +0 -0
  151. vendor/dhii/collections-interface/src/AccessibleCollectionInterface.php +0 -0
  152. vendor/dhii/collections-interface/src/CallbackIterableInterface.php +0 -0
  153. vendor/dhii/collections-interface/src/CallbackIteratorInterface.php +0 -0
  154. vendor/dhii/collections-interface/src/CollectionInterface.php +0 -0
  155. vendor/dhii/collections-interface/src/MutableCollectionInterface.php +0 -0
  156. vendor/dhii/collections-interface/src/SearchableCollectionInterface.php +0 -0
  157. vendor/dhii/collections-interface/src/SequenceIteratorIteratorInterface.php +0 -0
  158. vendor/dhii/collections-interface/src/SetInterface.php +0 -0
  159. vendor/dhii/container-helper-base/LICENSE +0 -0
  160. vendor/dhii/container-helper-base/composer.json +0 -0
  161. vendor/dhii/container-helper-base/src/ContainerGetCapableTrait.php +0 -0
  162. vendor/dhii/container-helper-base/src/ContainerGetPathCapableTrait.php +0 -0
  163. vendor/dhii/container-helper-base/src/ContainerHasCapableTrait.php +0 -0
  164. vendor/dhii/container-helper-base/src/ContainerHasPathCapableTrait.php +0 -0
  165. vendor/dhii/container-helper-base/src/ContainerListGetCapableTrait.php +0 -0
  166. vendor/dhii/container-helper-base/src/ContainerListHasCapableTrait.php +0 -0
  167. vendor/dhii/container-helper-base/src/ContainerSetCapableTrait.php +0 -0
  168. vendor/dhii/container-helper-base/src/ContainerSetManyCapableTrait.php +0 -0
  169. vendor/dhii/container-helper-base/src/ContainerSetPathCapableTrait.php +0 -0
  170. vendor/dhii/container-helper-base/src/ContainerUnsetCapableTrait.php +0 -0
  171. vendor/dhii/container-helper-base/src/ContainerUnsetManyCapableTrait.php +0 -0
  172. vendor/dhii/container-helper-base/src/NormalizeContainerCapableTrait.php +0 -0
  173. vendor/dhii/container-helper-base/src/NormalizeKeyCapableTrait.php +0 -0
  174. vendor/dhii/container-helper-base/src/NormalizeWritableContainerCapableTrait.php +0 -0
  175. vendor/dhii/di-abstract/LICENSE +0 -0
  176. vendor/dhii/di-abstract/composer.json +0 -0
  177. vendor/dhii/di-abstract/composer.lock +0 -0
  178. vendor/dhii/di-abstract/src/AbstractCompositeContainer.php +0 -0
  179. vendor/dhii/di-abstract/src/AbstractContainer.php +0 -0
  180. vendor/dhii/di-abstract/src/AbstractParentAwareContainer.php +0 -0
  181. vendor/dhii/di-abstract/src/AbstractServiceProvider.php +0 -0
  182. vendor/dhii/di-interface/LICENSE +0 -0
  183. vendor/dhii/di-interface/composer.json +0 -0
  184. vendor/dhii/di-interface/composer.lock +0 -0
  185. vendor/dhii/di-interface/src/CompositeContainerInterface.php +0 -0
  186. vendor/dhii/di-interface/src/ContainerInterface.php +0 -0
  187. vendor/dhii/di-interface/src/ContainersAwareInterface.php +0 -0
  188. vendor/dhii/di-interface/src/ExceptionInterface.php +0 -0
  189. vendor/dhii/di-interface/src/FactoryInterface.php +0 -0
  190. vendor/dhii/di-interface/src/ParentAwareContainerInterface.php +0 -0
  191. vendor/dhii/di-interface/src/ServiceProviderInterface.php +0 -0
  192. vendor/dhii/di-interface/src/WritableCompositeContainerInterface.php +0 -0
  193. vendor/dhii/di-interface/src/WritableContainerInterface.php +0 -0
  194. vendor/dhii/di/.gitattributes +0 -0
  195. vendor/dhii/di/LICENSE +0 -0
  196. vendor/dhii/di/composer.json +0 -0
  197. vendor/dhii/di/src/AbstractContainerBase.php +0 -0
  198. vendor/dhii/di/src/CompositeContainer.php +0 -0
  199. vendor/dhii/di/src/Container.php +0 -0
  200. vendor/dhii/di/src/ContainerWithImmutableParent.php +0 -0
  201. vendor/dhii/di/src/ContainerWithMutableParent.php +0 -0
  202. vendor/dhii/di/src/Exception/ContainerException.php +0 -0
  203. vendor/dhii/di/src/Exception/NotFoundException.php +0 -0
  204. vendor/dhii/di/src/ServiceProvider.php +0 -0
  205. vendor/dhii/exception-interface/LICENSE +0 -0
  206. vendor/dhii/exception-interface/composer.json +0 -0
  207. vendor/dhii/exception-interface/src/ArgumentCodeAwareInterface.php +0 -0
  208. vendor/dhii/exception-interface/src/BadSubjectExceptionInterface.php +0 -0
  209. vendor/dhii/exception-interface/src/InternalExceptionInterface.php +0 -0
  210. vendor/dhii/exception-interface/src/InvalidArgumentExceptionInterface.php +0 -0
  211. vendor/dhii/exception-interface/src/OutOfBoundsExceptionInterface.php +0 -0
  212. vendor/dhii/exception-interface/src/OutOfRangeExceptionInterface.php +0 -0
  213. vendor/dhii/exception-interface/src/RuntimeExceptionInterface.php +0 -0
  214. vendor/dhii/exception-interface/src/ThrowableInterface.php +0 -0
  215. vendor/dhii/exception/LICENSE +0 -0
  216. vendor/dhii/exception/composer.json +0 -0
  217. vendor/dhii/exception/src/AbstractBaseException.php +0 -0
  218. vendor/dhii/exception/src/CreateExceptionCapableTrait.php +0 -0
  219. vendor/dhii/exception/src/CreateInternalExceptionCapableTrait.php +0 -0
  220. vendor/dhii/exception/src/CreateInvalidArgumentExceptionCapableTrait.php +0 -0
  221. vendor/dhii/exception/src/CreateNativeInvalidArgumentExceptionCapableTrait.php +0 -0
  222. vendor/dhii/exception/src/CreateOutOfBoundsExceptionCapableTrait.php +0 -0
  223. vendor/dhii/exception/src/CreateOutOfRangeExceptionCapableTrait.php +0 -0
  224. vendor/dhii/exception/src/CreateRuntimeExceptionCapableTrait.php +0 -0
  225. vendor/dhii/exception/src/Exception.php +0 -0
  226. vendor/dhii/exception/src/ExceptionTrait.php +0 -0
  227. vendor/dhii/exception/src/InitBaseExceptionCapableTrait.php +0 -0
  228. vendor/dhii/exception/src/InternalException.php +0 -0
  229. vendor/dhii/exception/src/InvalidArgumentException.php +0 -0
  230. vendor/dhii/exception/src/OutOfBoundsException.php +0 -0
  231. vendor/dhii/exception/src/OutOfRangeException.php +0 -0
  232. vendor/dhii/exception/src/RuntimeException.php +0 -0
  233. vendor/dhii/exception/src/SubjectAwareTrait.php +0 -0
  234. vendor/dhii/factory-interface/LICENSE +0 -0
  235. vendor/dhii/factory-interface/composer.json +0 -0
  236. vendor/dhii/factory-interface/src/DataObjectFactoryInterface.php +0 -0
  237. vendor/dhii/factory-interface/src/Exception/CouldNotMakeExceptionInterface.php +0 -0
  238. vendor/dhii/factory-interface/src/Exception/FactoryExceptionInterface.php +0 -0
  239. vendor/dhii/factory-interface/src/FactoryAwareInterface.php +0 -0
  240. vendor/dhii/factory-interface/src/FactoryFactoryInterface.php +0 -0
  241. vendor/dhii/factory-interface/src/FactoryInterface.php +0 -0
  242. vendor/dhii/i18n-helper-base/LICENSE +0 -0
  243. vendor/dhii/i18n-helper-base/composer.json +0 -0
  244. vendor/dhii/i18n-helper-base/src/StringTranslatingTrait.php +0 -0
  245. vendor/dhii/i18n-helper-base/src/StringTranslatorAwareTrait.php +0 -0
  246. vendor/dhii/i18n-helper-base/src/StringTranslatorConsumingTrait.php +0 -0
  247. vendor/dhii/i18n-interface/LICENSE +0 -0
  248. vendor/dhii/i18n-interface/composer.json +0 -0
  249. vendor/dhii/i18n-interface/src/Exception/FormatTranslationExceptionInterface.php +0 -0
  250. vendor/dhii/i18n-interface/src/Exception/I18nExceptionInterface.php +0 -0
  251. vendor/dhii/i18n-interface/src/Exception/StringTranslationExceptionInterface.php +0 -0
  252. vendor/dhii/i18n-interface/src/Exception/TranslationExceptionInterface.php +0 -0
  253. vendor/dhii/i18n-interface/src/FormatTranslatorInterface.php +0 -0
  254. vendor/dhii/i18n-interface/src/StringTranslatorInterface.php +0 -0
  255. vendor/dhii/i18n-interface/src/TranslatorInterface.php +0 -0
  256. vendor/dhii/iterator-helper-base/LICENSE +0 -0
  257. vendor/dhii/iterator-helper-base/composer.json +0 -0
  258. vendor/dhii/iterator-helper-base/src/CountIterableCapableTrait.php +0 -0
  259. vendor/dhii/iterator-helper-base/src/MapIterableCapableTrait.php +0 -0
  260. vendor/dhii/iterator-helper-base/src/NormalizeIteratorCapableTrait.php +0 -0
  261. vendor/dhii/iterator-helper-base/src/ResolveIteratorCapableTrait.php +0 -0
  262. vendor/dhii/normalization-helper-base/LICENSE +0 -0
  263. vendor/dhii/normalization-helper-base/composer.json +0 -0
  264. vendor/dhii/normalization-helper-base/src/NormalizeArrayCapableTrait.php +0 -0
  265. vendor/dhii/normalization-helper-base/src/NormalizeIntCapableTrait.php +0 -0
  266. vendor/dhii/normalization-helper-base/src/NormalizeIterableCapableTrait.php +0 -0
  267. vendor/dhii/normalization-helper-base/src/NormalizeStringCapableTrait.php +0 -0
  268. vendor/dhii/normalization-helper-base/src/NormalizeStringableCapableTrait.php +0 -0
  269. vendor/dhii/output-renderer-abstract/LICENSE +0 -0
  270. vendor/dhii/output-renderer-abstract/composer.json +0 -0
  271. vendor/dhii/output-renderer-abstract/src/BlockAwareTrait.php +0 -0
  272. vendor/dhii/output-renderer-abstract/src/CaptureOutputCapableTrait.php +0 -0
  273. vendor/dhii/output-renderer-abstract/src/ContextAwareTrait.php +0 -0
  274. vendor/dhii/output-renderer-abstract/src/RenderCapableTemplateBlockTrait.php +0 -0
  275. vendor/dhii/output-renderer-abstract/src/RenderExceptionCapableToStringTrait.php +0 -0
  276. vendor/dhii/output-renderer-abstract/src/RenderTemplateCapableTrait.php +0 -0
  277. vendor/dhii/output-renderer-abstract/src/RendererAwareTrait.php +0 -0
  278. vendor/dhii/output-renderer-abstract/src/StringableRenderCatcherTrait.php +0 -0
  279. vendor/dhii/output-renderer-abstract/src/TemplateAwareTrait.php +0 -0
  280. vendor/dhii/output-renderer-base/LICENSE +0 -0
  281. vendor/dhii/output-renderer-base/composer.json +0 -0
  282. vendor/dhii/output-renderer-base/src/CreateCouldNotRenderExceptionCapableTrait.php +0 -0
  283. vendor/dhii/output-renderer-base/src/CreateRendererExceptionCapableTrait.php +0 -0
  284. vendor/dhii/output-renderer-base/src/CreateTemplateRenderExceptionCapableTrait.php +0 -0
  285. vendor/dhii/output-renderer-base/src/Exception/CouldNotRenderException.php +0 -0
  286. vendor/dhii/output-renderer-base/src/Exception/RendererException.php +0 -0
  287. vendor/dhii/output-renderer-base/src/Exception/TemplateRenderException.php +0 -0
  288. vendor/dhii/output-renderer-interface/LICENSE +0 -0
  289. vendor/dhii/output-renderer-interface/composer.json +0 -0
  290. vendor/dhii/output-renderer-interface/src/BlockAwareInterface.php +0 -0
  291. vendor/dhii/output-renderer-interface/src/BlockFactoryInterface.php +0 -0
  292. vendor/dhii/output-renderer-interface/src/BlockInterface.php +0 -0
  293. vendor/dhii/output-renderer-interface/src/ContextAwareInterface.php +0 -0
  294. vendor/dhii/output-renderer-interface/src/Exception/CouldNotRenderExceptionInterface.php +0 -0
  295. vendor/dhii/output-renderer-interface/src/Exception/RendererExceptionInterface.php +0 -0
  296. vendor/dhii/output-renderer-interface/src/Exception/TemplateRenderExceptionInterface.php +0 -0
  297. vendor/dhii/output-renderer-interface/src/RendererAwareInterface.php +0 -0
  298. vendor/dhii/output-renderer-interface/src/RendererInterface.php +0 -0
  299. vendor/dhii/output-renderer-interface/src/TemplateAwareInterface.php +0 -0
  300. vendor/dhii/output-renderer-interface/src/TemplateFactoryInterface.php +0 -0
  301. vendor/dhii/output-renderer-interface/src/TemplateInterface.php +0 -0
  302. vendor/dhii/stats-abstract/composer.json +0 -0
  303. vendor/dhii/stats-abstract/composer.lock +0 -0
  304. vendor/dhii/stats-abstract/src/AbstractAggregatableCollection.php +0 -0
  305. vendor/dhii/stats-abstract/src/AbstractAggregator.php +0 -0
  306. vendor/dhii/stats-interface/composer.json +0 -0
  307. vendor/dhii/stats-interface/composer.lock +0 -0
  308. vendor/dhii/stats-interface/src/AggregatorInterface.php +0 -0
  309. vendor/dhii/stringable-interface/LICENSE +0 -0
  310. vendor/dhii/stringable-interface/composer.json +0 -0
  311. vendor/dhii/stringable-interface/composer.lock +0 -0
  312. vendor/dhii/stringable-interface/src/StringableInterface.php +0 -0
  313. vendor/dhii/transformer-interface/LICENSE +0 -0
  314. vendor/dhii/transformer-interface/composer.json +0 -0
  315. vendor/dhii/transformer-interface/src/Exception/CouldNotTransformExceptionInterface.php +0 -0
  316. vendor/dhii/transformer-interface/src/Exception/TransformerExceptionInterface.php +0 -0
  317. vendor/dhii/transformer-interface/src/TransformerAwareInterface.php +0 -0
  318. vendor/dhii/transformer-interface/src/TransformerFactoryInterface.php +0 -0
  319. vendor/dhii/transformer-interface/src/TransformerInterface.php +0 -0
  320. vendor/dhii/validation-abstract/LICENSE +0 -0
  321. vendor/dhii/validation-abstract/composer.json +0 -0
  322. vendor/dhii/validation-abstract/src/ChildValidatorsAwareTrait.php +0 -0
  323. vendor/dhii/validation-abstract/src/GetValidationErrorsCapableCompositeTrait.php +0 -0
  324. vendor/dhii/validation-abstract/src/IsValidCapableTrait.php +0 -0
  325. vendor/dhii/validation-abstract/src/SpecAwareTrait.php +0 -0
  326. vendor/dhii/validation-abstract/src/ValidateCapableTrait.php +0 -0
  327. vendor/dhii/validation-abstract/src/ValidationErrorsAwareTrait.php +0 -0
  328. vendor/dhii/validation-abstract/src/ValidationSubjectAwareTrait.php +0 -0
  329. vendor/dhii/validation-abstract/src/ValidatorAwareTrait.php +0 -0
  330. vendor/dhii/validation-base/LICENSE +0 -0
  331. vendor/dhii/validation-base/composer.json +0 -0
  332. vendor/dhii/validation-base/src/AbstractCompositeValidatorBase.php +0 -0
  333. vendor/dhii/validation-base/src/AbstractValidatorBase.php +0 -0
  334. vendor/dhii/validation-base/src/CreateValidationExceptionCapableTrait.php +0 -0
  335. vendor/dhii/validation-base/src/CreateValidationFailedExceptionCapableTrait.php +0 -0
  336. vendor/dhii/validation-base/src/Exception/AbstractBaseValidationException.php +0 -0
  337. vendor/dhii/validation-base/src/Exception/ValidationException.php +0 -0
  338. vendor/dhii/validation-base/src/Exception/ValidationFailedException.php +0 -0
  339. vendor/dhii/validation-base/src/ValidatorTrait.php +0 -0
  340. vendor/dhii/validation-interface/LICENSE +0 -0
  341. vendor/dhii/validation-interface/composer.json +0 -0
  342. vendor/dhii/validation-interface/src/Exception/ValidationExceptionInterface.php +0 -0
  343. vendor/dhii/validation-interface/src/Exception/ValidationFailedExceptionInterface.php +0 -0
  344. vendor/dhii/validation-interface/src/SpecAwareInterface.php +0 -0
  345. vendor/dhii/validation-interface/src/SubjectAwareInterface.php +0 -0
  346. vendor/dhii/validation-interface/src/ValidatorAwareInterface.php +0 -0
  347. vendor/dhii/validation-interface/src/ValidatorFactoryInterface.php +0 -0
  348. vendor/dhii/validation-interface/src/ValidatorInterface.php +0 -0
  349. vendor/erusev/parsedown/LICENSE.txt +0 -0
  350. vendor/erusev/parsedown/Parsedown.php +0 -0
  351. vendor/erusev/parsedown/composer.json +0 -0
  352. vendor/php-di/invoker/CONTRIBUTING.md +0 -0
  353. vendor/php-di/invoker/LICENSE +0 -0
  354. vendor/php-di/invoker/README.md +0 -0
  355. vendor/php-di/invoker/composer.json +0 -0
  356. vendor/php-di/invoker/doc/parameter-resolvers.md +0 -0
  357. vendor/php-di/invoker/src/CallableResolver.php +0 -0
  358. vendor/php-di/invoker/src/Exception/InvocationException.php +0 -0
  359. vendor/php-di/invoker/src/Exception/NotCallableException.php +0 -0
  360. vendor/php-di/invoker/src/Exception/NotEnoughParametersException.php +0 -0
  361. vendor/php-di/invoker/src/Invoker.php +0 -0
  362. vendor/php-di/invoker/src/InvokerInterface.php +0 -0
  363. vendor/php-di/invoker/src/ParameterResolver/AssociativeArrayResolver.php +0 -0
  364. vendor/php-di/invoker/src/ParameterResolver/Container/ParameterNameContainerResolver.php +0 -0
  365. vendor/php-di/invoker/src/ParameterResolver/Container/TypeHintContainerResolver.php +0 -0
  366. vendor/php-di/invoker/src/ParameterResolver/DefaultValueResolver.php +0 -0
  367. vendor/php-di/invoker/src/ParameterResolver/NumericArrayResolver.php +0 -0
  368. vendor/php-di/invoker/src/ParameterResolver/ParameterResolver.php +0 -0
  369. vendor/php-di/invoker/src/ParameterResolver/ResolverChain.php +0 -0
  370. vendor/php-di/invoker/src/ParameterResolver/TypeHintResolver.php +0 -0
  371. vendor/php-di/invoker/src/Reflection/CallableReflection.php +0 -0
  372. vendor/php-di/php-di/.gitattributes +0 -0
  373. vendor/php-di/php-di/.gitignore +0 -0
  374. vendor/php-di/php-di/LICENSE +0 -0
  375. vendor/php-di/php-di/change-log.md +0 -0
  376. vendor/php-di/php-di/composer.json +0 -0
  377. vendor/php-di/php-di/src/DI/Annotation/Inject.php +0 -0
  378. vendor/php-di/php-di/src/DI/Annotation/Injectable.php +0 -0
  379. vendor/php-di/php-di/src/DI/Cache/ArrayCache.php +0 -0
  380. vendor/php-di/php-di/src/DI/Container.php +0 -0
  381. vendor/php-di/php-di/src/DI/ContainerBuilder.php +0 -0
  382. vendor/php-di/php-di/src/DI/Debug.php +0 -0
  383. vendor/php-di/php-di/src/DI/Definition/AliasDefinition.php +0 -0
  384. vendor/php-di/php-di/src/DI/Definition/ArrayDefinition.php +0 -0
  385. vendor/php-di/php-di/src/DI/Definition/ArrayDefinitionExtension.php +0 -0
  386. vendor/php-di/php-di/src/DI/Definition/CacheableDefinition.php +0 -0
  387. vendor/php-di/php-di/src/DI/Definition/DecoratorDefinition.php +0 -0
  388. vendor/php-di/php-di/src/DI/Definition/Definition.php +0 -0
  389. vendor/php-di/php-di/src/DI/Definition/Dumper/AliasDefinitionDumper.php +0 -0
  390. vendor/php-di/php-di/src/DI/Definition/Dumper/ArrayDefinitionDumper.php +0 -0
  391. vendor/php-di/php-di/src/DI/Definition/Dumper/DecoratorDefinitionDumper.php +0 -0
  392. vendor/php-di/php-di/src/DI/Definition/Dumper/DefinitionDumper.php +0 -0
  393. vendor/php-di/php-di/src/DI/Definition/Dumper/DefinitionDumperDispatcher.php +0 -0
  394. vendor/php-di/php-di/src/DI/Definition/Dumper/EnvironmentVariableDefinitionDumper.php +0 -0
  395. vendor/php-di/php-di/src/DI/Definition/Dumper/FactoryDefinitionDumper.php +0 -0
  396. vendor/php-di/php-di/src/DI/Definition/Dumper/ObjectDefinitionDumper.php +0 -0
  397. vendor/php-di/php-di/src/DI/Definition/Dumper/StringDefinitionDumper.php +0 -0
  398. vendor/php-di/php-di/src/DI/Definition/Dumper/ValueDefinitionDumper.php +0 -0
  399. vendor/php-di/php-di/src/DI/Definition/EntryReference.php +0 -0
  400. vendor/php-di/php-di/src/DI/Definition/EnvironmentVariableDefinition.php +0 -0
  401. vendor/php-di/php-di/src/DI/Definition/Exception/AnnotationException.php +0 -0
  402. vendor/php-di/php-di/src/DI/Definition/Exception/DefinitionException.php +0 -0
  403. vendor/php-di/php-di/src/DI/Definition/FactoryDefinition.php +0 -0
  404. vendor/php-di/php-di/src/DI/Definition/HasSubDefinition.php +0 -0
  405. vendor/php-di/php-di/src/DI/Definition/Helper/ArrayDefinitionExtensionHelper.php +0 -0
  406. vendor/php-di/php-di/src/DI/Definition/Helper/DefinitionHelper.php +0 -0
  407. vendor/php-di/php-di/src/DI/Definition/Helper/EnvironmentVariableDefinitionHelper.php +0 -0
  408. vendor/php-di/php-di/src/DI/Definition/Helper/FactoryDefinitionHelper.php +0 -0
  409. vendor/php-di/php-di/src/DI/Definition/Helper/ObjectDefinitionHelper.php +0 -0
  410. vendor/php-di/php-di/src/DI/Definition/Helper/StringDefinitionHelper.php +0 -0
  411. vendor/php-di/php-di/src/DI/Definition/Helper/ValueDefinitionHelper.php +0 -0
  412. vendor/php-di/php-di/src/DI/Definition/InstanceDefinition.php +0 -0
  413. vendor/php-di/php-di/src/DI/Definition/ObjectDefinition.php +0 -0
  414. vendor/php-di/php-di/src/DI/Definition/ObjectDefinition/MethodInjection.php +0 -0
  415. vendor/php-di/php-di/src/DI/Definition/ObjectDefinition/PropertyInjection.php +0 -0
  416. vendor/php-di/php-di/src/DI/Definition/Resolver/AliasResolver.php +0 -0
  417. vendor/php-di/php-di/src/DI/Definition/Resolver/ArrayResolver.php +0 -0
  418. vendor/php-di/php-di/src/DI/Definition/Resolver/DecoratorResolver.php +0 -0
  419. vendor/php-di/php-di/src/DI/Definition/Resolver/DefinitionResolver.php +0 -0
  420. vendor/php-di/php-di/src/DI/Definition/Resolver/EnvironmentVariableResolver.php +0 -0
  421. vendor/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php +0 -0
  422. vendor/php-di/php-di/src/DI/Definition/Resolver/InstanceInjector.php +0 -0
  423. vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php +0 -0
  424. vendor/php-di/php-di/src/DI/Definition/Resolver/ParameterResolver.php +0 -0
  425. vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php +0 -0
  426. vendor/php-di/php-di/src/DI/Definition/Resolver/StringResolver.php +0 -0
  427. vendor/php-di/php-di/src/DI/Definition/Resolver/ValueResolver.php +0 -0
  428. vendor/php-di/php-di/src/DI/Definition/Source/AnnotationReader.php +0 -0
  429. vendor/php-di/php-di/src/DI/Definition/Source/Autowiring.php +0 -0
  430. vendor/php-di/php-di/src/DI/Definition/Source/CachedDefinitionSource.php +0 -0
  431. vendor/php-di/php-di/src/DI/Definition/Source/DefinitionFile.php +0 -0
  432. vendor/php-di/php-di/src/DI/Definition/Source/DefinitionSource.php +0 -0
  433. vendor/php-di/php-di/src/DI/Definition/Source/MutableDefinitionSource.php +0 -0
  434. vendor/php-di/php-di/src/DI/Definition/Source/SourceChain.php +0 -0
  435. vendor/php-di/php-di/src/DI/Definition/StringDefinition.php +0 -0
  436. vendor/php-di/php-di/src/DI/Definition/ValueDefinition.php +0 -0
  437. vendor/php-di/php-di/src/DI/DependencyException.php +0 -0
  438. vendor/php-di/php-di/src/DI/Factory/RequestedEntry.php +0 -0
  439. vendor/php-di/php-di/src/DI/FactoryInterface.php +0 -0
  440. vendor/php-di/php-di/src/DI/Invoker/DefinitionParameterResolver.php +0 -0
  441. vendor/php-di/php-di/src/DI/Invoker/FactoryParameterResolver.php +0 -0
  442. vendor/php-di/php-di/src/DI/InvokerInterface.php +0 -0
  443. vendor/php-di/php-di/src/DI/NotFoundException.php +0 -0
  444. vendor/php-di/php-di/src/DI/Proxy/ProxyFactory.php +0 -0
  445. vendor/php-di/php-di/src/DI/Scope.php +0 -0
  446. vendor/php-di/php-di/src/DI/functions.php +0 -0
  447. vendor/php-di/phpdoc-reader/.gitattributes +0 -0
  448. vendor/php-di/phpdoc-reader/.gitignore +0 -0
  449. vendor/php-di/phpdoc-reader/LICENSE +0 -0
  450. vendor/php-di/phpdoc-reader/composer.json +0 -0
  451. vendor/php-di/phpdoc-reader/src/PhpDocReader/AnnotationException.php +0 -0
  452. vendor/php-di/phpdoc-reader/src/PhpDocReader/PhpDocReader.php +0 -0
  453. vendor/php-di/phpdoc-reader/src/PhpDocReader/PhpParser/TokenParser.php +0 -0
  454. vendor/php-di/phpdoc-reader/src/PhpDocReader/PhpParser/UseStatementParser.php +0 -0
  455. vendor/psr/container/.gitignore +0 -0
  456. vendor/psr/container/LICENSE +0 -0
  457. vendor/psr/container/composer.json +0 -0
  458. vendor/psr/container/src/ContainerExceptionInterface.php +0 -0
  459. vendor/psr/container/src/ContainerInterface.php +0 -0
  460. vendor/psr/container/src/NotFoundExceptionInterface.php +0 -0
  461. vendor/psr/log/.gitignore +0 -0
  462. vendor/psr/log/LICENSE +0 -0
  463. vendor/psr/log/Psr/Log/AbstractLogger.php +0 -0
  464. vendor/psr/log/Psr/Log/InvalidArgumentException.php +0 -0
  465. vendor/psr/log/Psr/Log/LogLevel.php +0 -0
  466. vendor/psr/log/Psr/Log/LoggerAwareInterface.php +0 -0
  467. vendor/psr/log/Psr/Log/LoggerAwareTrait.php +0 -0
  468. vendor/psr/log/Psr/Log/LoggerInterface.php +0 -0
  469. vendor/psr/log/Psr/Log/LoggerTrait.php +0 -0
  470. vendor/psr/log/Psr/Log/NullLogger.php +0 -0
  471. vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +0 -0
  472. vendor/psr/log/Psr/Log/Test/TestLogger.php +0 -0
  473. vendor/psr/log/composer.json +0 -0
  474. vendor/rebelcode/composer-cleanup-plugin/.gitignore +0 -0
  475. vendor/rebelcode/composer-cleanup-plugin/README.md +0 -23
  476. vendor/rebelcode/composer-cleanup-plugin/composer.json +0 -0
  477. vendor/rebelcode/composer-cleanup-plugin/src/CleanupPlugin.php +0 -0
  478. vendor/rebelcode/composer-cleanup-plugin/src/CleanupRules.php +0 -0
  479. vendor/symfony/polyfill-ctype/Ctype.php +0 -0
  480. vendor/symfony/polyfill-ctype/LICENSE +0 -0
  481. vendor/symfony/polyfill-ctype/bootstrap.php +0 -0
  482. vendor/symfony/polyfill-ctype/composer.json +0 -0
  483. vendor/twig/extensions/.gitignore +0 -0
  484. vendor/twig/extensions/LICENSE +0 -0
  485. vendor/twig/extensions/composer.json +0 -0
  486. vendor/twig/extensions/lib/Twig/Extensions/Autoloader.php +0 -0
  487. vendor/twig/extensions/lib/Twig/Extensions/Extension/Array.php +0 -0
  488. vendor/twig/extensions/lib/Twig/Extensions/Extension/Date.php +0 -0
  489. vendor/twig/extensions/lib/Twig/Extensions/Extension/I18n.php +0 -0
  490. vendor/twig/extensions/lib/Twig/Extensions/Extension/Intl.php +0 -0
  491. vendor/twig/extensions/lib/Twig/Extensions/Extension/Text.php +0 -0
  492. vendor/twig/extensions/lib/Twig/Extensions/Grammar.php +0 -0
  493. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Arguments.php +0 -0
  494. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Array.php +0 -0
  495. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Body.php +0 -0
  496. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Boolean.php +0 -0
  497. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Constant.php +0 -0
  498. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Expression.php +0 -0
  499. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Hash.php +0 -0
  500. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Number.php +0 -0
  501. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Optional.php +0 -0
  502. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Switch.php +0 -0
  503. vendor/twig/extensions/lib/Twig/Extensions/Grammar/Tag.php +0 -0
  504. vendor/twig/extensions/lib/Twig/Extensions/GrammarInterface.php +0 -0
  505. vendor/twig/extensions/lib/Twig/Extensions/Node/Trans.php +0 -0
  506. vendor/twig/extensions/lib/Twig/Extensions/SimpleTokenParser.php +0 -0
  507. vendor/twig/extensions/lib/Twig/Extensions/TokenParser/Trans.php +0 -0
  508. vendor/twig/extensions/src/ArrayExtension.php +0 -0
  509. vendor/twig/extensions/src/DateExtension.php +0 -0
  510. vendor/twig/extensions/src/I18nExtension.php +0 -0
  511. vendor/twig/extensions/src/IntlExtension.php +0 -0
  512. vendor/twig/extensions/src/Node/TransNode.php +0 -0
  513. vendor/twig/extensions/src/TextExtension.php +0 -0
  514. vendor/twig/extensions/src/TokenParser/TransTokenParser.php +0 -0
  515. vendor/twig/twig/.editorconfig +0 -0
  516. vendor/twig/twig/.gitignore +0 -0
  517. vendor/twig/twig/.php_cs.dist +0 -0
  518. vendor/twig/twig/LICENSE +0 -0
  519. vendor/twig/twig/composer.json +1 -1
  520. vendor/twig/twig/drupal_test.sh +0 -51
  521. vendor/twig/twig/lib/Twig/Autoloader.php +0 -0
  522. vendor/twig/twig/lib/Twig/BaseNodeVisitor.php +0 -0
  523. vendor/twig/twig/lib/Twig/Cache/Filesystem.php +0 -0
  524. vendor/twig/twig/lib/Twig/Cache/Null.php +0 -0
  525. vendor/twig/twig/lib/Twig/CacheInterface.php +0 -0
  526. vendor/twig/twig/lib/Twig/Compiler.php +0 -0
  527. vendor/twig/twig/lib/Twig/CompilerInterface.php +0 -0
  528. vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php +0 -0
  529. vendor/twig/twig/lib/Twig/Environment.php +0 -0
  530. vendor/twig/twig/lib/Twig/Error.php +0 -0
  531. vendor/twig/twig/lib/Twig/Error/Loader.php +0 -0
  532. vendor/twig/twig/lib/Twig/Error/Runtime.php +0 -0
  533. vendor/twig/twig/lib/Twig/Error/Syntax.php +0 -0
  534. vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php +0 -0
  535. vendor/twig/twig/lib/Twig/ExpressionParser.php +0 -0
  536. vendor/twig/twig/lib/Twig/Extension.php +0 -0
  537. vendor/twig/twig/lib/Twig/Extension/Core.php +0 -0
  538. vendor/twig/twig/lib/Twig/Extension/Debug.php +0 -0
  539. vendor/twig/twig/lib/Twig/Extension/Escaper.php +0 -0
  540. vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php +0 -0
  541. vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php +0 -0
  542. vendor/twig/twig/lib/Twig/Extension/Optimizer.php +0 -0
  543. vendor/twig/twig/lib/Twig/Extension/Profiler.php +0 -0
  544. vendor/twig/twig/lib/Twig/Extension/Sandbox.php +0 -0
  545. vendor/twig/twig/lib/Twig/Extension/Staging.php +0 -0
  546. vendor/twig/twig/lib/Twig/Extension/StringLoader.php +0 -0
  547. vendor/twig/twig/lib/Twig/ExtensionInterface.php +0 -0
  548. vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php +0 -0
  549. vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php +0 -0
  550. vendor/twig/twig/lib/Twig/Filter.php +0 -0
  551. vendor/twig/twig/lib/Twig/Filter/Function.php +0 -0
  552. vendor/twig/twig/lib/Twig/Filter/Method.php +0 -0
  553. vendor/twig/twig/lib/Twig/Filter/Node.php +0 -0
  554. vendor/twig/twig/lib/Twig/FilterCallableInterface.php +0 -0
  555. vendor/twig/twig/lib/Twig/FilterInterface.php +0 -0
  556. vendor/twig/twig/lib/Twig/Function.php +0 -0
  557. vendor/twig/twig/lib/Twig/Function/Function.php +0 -0
  558. vendor/twig/twig/lib/Twig/Function/Method.php +0 -0
  559. vendor/twig/twig/lib/Twig/Function/Node.php +0 -0
  560. vendor/twig/twig/lib/Twig/FunctionCallableInterface.php +0 -0
  561. vendor/twig/twig/lib/Twig/FunctionInterface.php +0 -0
  562. vendor/twig/twig/lib/Twig/Lexer.php +0 -0
  563. vendor/twig/twig/lib/Twig/LexerInterface.php +0 -0
  564. vendor/twig/twig/lib/Twig/Loader/Array.php +0 -0
  565. vendor/twig/twig/lib/Twig/Loader/Chain.php +0 -0
  566. vendor/twig/twig/lib/Twig/Loader/Filesystem.php +0 -0
  567. vendor/twig/twig/lib/Twig/Loader/String.php +0 -0
  568. vendor/twig/twig/lib/Twig/LoaderInterface.php +0 -0
  569. vendor/twig/twig/lib/Twig/Markup.php +0 -0
  570. vendor/twig/twig/lib/Twig/Node.php +0 -0
  571. vendor/twig/twig/lib/Twig/Node/AutoEscape.php +0 -0
  572. vendor/twig/twig/lib/Twig/Node/Block.php +0 -0
  573. vendor/twig/twig/lib/Twig/Node/BlockReference.php +0 -0
  574. vendor/twig/twig/lib/Twig/Node/Body.php +0 -0
  575. vendor/twig/twig/lib/Twig/Node/CheckSecurity.php +0 -0
  576. vendor/twig/twig/lib/Twig/Node/Deprecated.php +0 -0
  577. vendor/twig/twig/lib/Twig/Node/Do.php +0 -0
  578. vendor/twig/twig/lib/Twig/Node/Embed.php +0 -0
  579. vendor/twig/twig/lib/Twig/Node/Expression.php +0 -0
  580. vendor/twig/twig/lib/Twig/Node/Expression/Array.php +0 -0
  581. vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php +0 -0
  582. vendor/twig/twig/lib/Twig/Node/Expression/Binary.php +0 -0
  583. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php +0 -0
  584. vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php +0 -0
  585. vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php +0 -0
  586. vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php +0 -0
  587. vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php +0 -0
  588. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php +0 -0
  589. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php +0 -0
  590. vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php +0 -0
  591. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php +0 -0
  592. vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php +0 -0
  593. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php +0 -0
  594. vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php +0 -0
  595. vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php +0 -0
  596. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php +0 -0
  597. vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php +0 -0
  598. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php +0 -0
  599. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php +0 -0
  600. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php +0 -0
  601. vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php +0 -0
  602. vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php +0 -0
  603. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php +0 -0
  604. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php +0 -0
  605. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php +0 -0
  606. vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php +0 -0
  607. vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php +0 -0
  608. vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php +0 -0
  609. vendor/twig/twig/lib/Twig/Node/Expression/Call.php +0 -0
  610. vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php +0 -0
  611. vendor/twig/twig/lib/Twig/Node/Expression/Constant.php +0 -0
  612. vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php +0 -0
  613. vendor/twig/twig/lib/Twig/Node/Expression/Filter.php +0 -0
  614. vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php +0 -0
  615. vendor/twig/twig/lib/Twig/Node/Expression/Function.php +0 -0
  616. vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php +0 -0
  617. vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php +0 -0
  618. vendor/twig/twig/lib/Twig/Node/Expression/Name.php +0 -0
  619. vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php +0 -0
  620. vendor/twig/twig/lib/Twig/Node/Expression/Parent.php +0 -0
  621. vendor/twig/twig/lib/Twig/Node/Expression/TempName.php +0 -0
  622. vendor/twig/twig/lib/Twig/Node/Expression/Test.php +0 -0
  623. vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php +0 -0
  624. vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php +0 -0
  625. vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php +0 -0
  626. vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php +0 -0
  627. vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php +0 -0
  628. vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php +0 -0
  629. vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php +0 -0
  630. vendor/twig/twig/lib/Twig/Node/Expression/Unary.php +0 -0
  631. vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php +0 -0
  632. vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php +0 -0
  633. vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php +0 -0
  634. vendor/twig/twig/lib/Twig/Node/Flush.php +0 -0
  635. vendor/twig/twig/lib/Twig/Node/For.php +0 -0
  636. vendor/twig/twig/lib/Twig/Node/ForLoop.php +0 -0
  637. vendor/twig/twig/lib/Twig/Node/If.php +0 -0
  638. vendor/twig/twig/lib/Twig/Node/Import.php +0 -0
  639. vendor/twig/twig/lib/Twig/Node/Include.php +0 -0
  640. vendor/twig/twig/lib/Twig/Node/Macro.php +0 -0
  641. vendor/twig/twig/lib/Twig/Node/Module.php +0 -0
  642. vendor/twig/twig/lib/Twig/Node/Print.php +0 -0
  643. vendor/twig/twig/lib/Twig/Node/Sandbox.php +0 -0
  644. vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php +0 -0
  645. vendor/twig/twig/lib/Twig/Node/Set.php +0 -0
  646. vendor/twig/twig/lib/Twig/Node/SetTemp.php +0 -0
  647. vendor/twig/twig/lib/Twig/Node/Spaceless.php +0 -0
  648. vendor/twig/twig/lib/Twig/Node/Text.php +0 -0
  649. vendor/twig/twig/lib/Twig/Node/With.php +0 -0
  650. vendor/twig/twig/lib/Twig/NodeCaptureInterface.php +0 -0
  651. vendor/twig/twig/lib/Twig/NodeInterface.php +0 -0
  652. vendor/twig/twig/lib/Twig/NodeOutputInterface.php +0 -0
  653. vendor/twig/twig/lib/Twig/NodeTraverser.php +0 -0
  654. vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php +0 -0
  655. vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php +0 -0
  656. vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php +0 -0
  657. vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php +0 -0
  658. vendor/twig/twig/lib/Twig/NodeVisitorInterface.php +0 -0
  659. vendor/twig/twig/lib/Twig/Parser.php +0 -0
  660. vendor/twig/twig/lib/Twig/ParserInterface.php +0 -0
  661. vendor/twig/twig/lib/Twig/Profiler/Dumper/Base.php +0 -0
  662. vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php +0 -0
  663. vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php +0 -0
  664. vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php +0 -0
  665. vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php +0 -0
  666. vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php +0 -0
  667. vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php +0 -0
  668. vendor/twig/twig/lib/Twig/Profiler/Profile.php +0 -0
  669. vendor/twig/twig/lib/Twig/RuntimeLoaderInterface.php +0 -0
  670. vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php +0 -0
  671. vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php +0 -0
  672. vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php +0 -0
  673. vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php +0 -0
  674. vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php +0 -0
  675. vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php +0 -0
  676. vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php +0 -0
  677. vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php +0 -0
  678. vendor/twig/twig/lib/Twig/SimpleFilter.php +0 -0
  679. vendor/twig/twig/lib/Twig/SimpleFunction.php +0 -0
  680. vendor/twig/twig/lib/Twig/SimpleTest.php +0 -0
  681. vendor/twig/twig/lib/Twig/Source.php +0 -0
  682. vendor/twig/twig/lib/Twig/SourceContextLoaderInterface.php +0 -0
  683. vendor/twig/twig/lib/Twig/Template.php +0 -0
  684. vendor/twig/twig/lib/Twig/TemplateInterface.php +0 -0
  685. vendor/twig/twig/lib/Twig/TemplateWrapper.php +0 -0
  686. vendor/twig/twig/lib/Twig/Test.php +0 -0
  687. vendor/twig/twig/lib/Twig/Test/Function.php +0 -0
  688. vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php +0 -0
  689. vendor/twig/twig/lib/Twig/Test/Method.php +0 -0
  690. vendor/twig/twig/lib/Twig/Test/Node.php +0 -0
  691. vendor/twig/twig/lib/Twig/Test/NodeTestCase.php +0 -0
  692. vendor/twig/twig/lib/Twig/TestCallableInterface.php +0 -0
  693. vendor/twig/twig/lib/Twig/TestInterface.php +0 -0
  694. vendor/twig/twig/lib/Twig/Token.php +0 -0
  695. vendor/twig/twig/lib/Twig/TokenParser.php +0 -0
  696. vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php +0 -0
  697. vendor/twig/twig/lib/Twig/TokenParser/Block.php +0 -0
  698. vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php +0 -0
  699. vendor/twig/twig/lib/Twig/TokenParser/Do.php +0 -0
  700. vendor/twig/twig/lib/Twig/TokenParser/Embed.php +0 -0
  701. vendor/twig/twig/lib/Twig/TokenParser/Extends.php +0 -0
  702. vendor/twig/twig/lib/Twig/TokenParser/Filter.php +0 -0
  703. vendor/twig/twig/lib/Twig/TokenParser/Flush.php +0 -0
  704. vendor/twig/twig/lib/Twig/TokenParser/For.php +0 -0
  705. vendor/twig/twig/lib/Twig/TokenParser/From.php +0 -0
  706. vendor/twig/twig/lib/Twig/TokenParser/If.php +0 -0
  707. vendor/twig/twig/lib/Twig/TokenParser/Import.php +0 -0
  708. vendor/twig/twig/lib/Twig/TokenParser/Include.php +0 -0
  709. vendor/twig/twig/lib/Twig/TokenParser/Macro.php +0 -0
  710. vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php +0 -0
  711. vendor/twig/twig/lib/Twig/TokenParser/Set.php +0 -0
  712. vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php +0 -0
  713. vendor/twig/twig/lib/Twig/TokenParser/Use.php +0 -0
  714. vendor/twig/twig/lib/Twig/TokenParser/With.php +0 -0
  715. vendor/twig/twig/lib/Twig/TokenParserBroker.php +0 -0
  716. vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php +0 -0
  717. vendor/twig/twig/lib/Twig/TokenParserInterface.php +0 -0
  718. vendor/twig/twig/lib/Twig/TokenStream.php +0 -0
  719. vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php +0 -0
  720. vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php +0 -0
  721. vendor/twig/twig/src/Cache/CacheInterface.php +0 -0
  722. vendor/twig/twig/src/Cache/FilesystemCache.php +0 -0
  723. vendor/twig/twig/src/Cache/NullCache.php +0 -0
  724. vendor/twig/twig/src/Compiler.php +0 -0
  725. vendor/twig/twig/src/Environment.php +3 -4
  726. vendor/twig/twig/src/Error/Error.php +6 -0
  727. vendor/twig/twig/src/Error/LoaderError.php +0 -0
  728. vendor/twig/twig/src/Error/RuntimeError.php +0 -0
  729. vendor/twig/twig/src/Error/SyntaxError.php +0 -0
  730. vendor/twig/twig/src/ExpressionParser.php +6 -69
  731. vendor/twig/twig/src/Extension/AbstractExtension.php +0 -0
  732. vendor/twig/twig/src/Extension/CoreExtension.php +1 -46
  733. vendor/twig/twig/src/Extension/DebugExtension.php +1 -1
  734. vendor/twig/twig/src/Extension/EscaperExtension.php +0 -0
  735. vendor/twig/twig/src/Extension/ExtensionInterface.php +0 -0
  736. vendor/twig/twig/src/Extension/GlobalsInterface.php +0 -0
  737. vendor/twig/twig/src/Extension/InitRuntimeInterface.php +0 -0
  738. vendor/twig/twig/src/Extension/OptimizerExtension.php +0 -0
  739. vendor/twig/twig/src/Extension/ProfilerExtension.php +0 -0
  740. vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php +0 -0
  741. vendor/twig/twig/src/Extension/SandboxExtension.php +0 -0
  742. vendor/twig/twig/src/Extension/StagingExtension.php +0 -0
  743. vendor/twig/twig/src/Extension/StringLoaderExtension.php +3 -3
  744. vendor/twig/twig/src/FileExtensionEscapingStrategy.php +0 -0
  745. vendor/twig/twig/src/Lexer.php +35 -41
  746. vendor/twig/twig/src/Loader/ArrayLoader.php +0 -0
  747. vendor/twig/twig/src/Loader/ChainLoader.php +0 -0
  748. vendor/twig/twig/src/Loader/ExistsLoaderInterface.php +0 -0
  749. vendor/twig/twig/src/Loader/FilesystemLoader.php +5 -26
  750. vendor/twig/twig/src/Loader/LoaderInterface.php +0 -0
  751. vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php +0 -0
  752. vendor/twig/twig/src/Markup.php +0 -0
  753. vendor/twig/twig/src/Node/AutoEscapeNode.php +0 -0
  754. vendor/twig/twig/src/Node/BlockNode.php +0 -0
  755. vendor/twig/twig/src/Node/BlockReferenceNode.php +0 -0
  756. vendor/twig/twig/src/Node/BodyNode.php +0 -0
  757. vendor/twig/twig/src/Node/CheckSecurityNode.php +0 -0
  758. vendor/twig/twig/src/Node/CheckToStringNode.php +0 -0
  759. vendor/twig/twig/src/Node/DeprecatedNode.php +0 -0
  760. vendor/twig/twig/src/Node/DoNode.php +0 -0
  761. vendor/twig/twig/src/Node/EmbedNode.php +0 -0
  762. vendor/twig/twig/src/Node/Expression/AbstractExpression.php +0 -0
  763. vendor/twig/twig/src/Node/Expression/ArrayExpression.php +0 -0
  764. vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php +0 -64
  765. vendor/twig/twig/src/Node/Expression/AssignNameExpression.php +0 -0
  766. vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php +0 -0
  767. vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php +0 -0
  768. vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php +0 -0
  769. vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php +0 -0
  770. vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php +0 -0
  771. vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php +0 -0
  772. vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php +0 -0
  773. vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php +0 -0
  774. vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php +0 -0
  775. vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php +0 -0
  776. vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php +0 -0
  777. vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php +0 -0
  778. vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php +0 -0
  779. vendor/twig/twig/src/Node/Expression/Binary/InBinary.php +0 -0
  780. vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php +0 -0
  781. vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php +0 -0
  782. vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php +0 -0
  783. vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php +0 -0
  784. vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php +0 -0
  785. vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php +0 -0
  786. vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php +0 -0
  787. vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php +0 -0
  788. vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php +0 -0
  789. vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php +0 -0
  790. vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php +0 -0
  791. vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php +0 -0
  792. vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php +0 -0
  793. vendor/twig/twig/src/Node/Expression/CallExpression.php +0 -0
  794. vendor/twig/twig/src/Node/Expression/ConditionalExpression.php +0 -0
  795. vendor/twig/twig/src/Node/Expression/ConstantExpression.php +0 -0
  796. vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php +0 -0
  797. vendor/twig/twig/src/Node/Expression/FilterExpression.php +0 -0
  798. vendor/twig/twig/src/Node/Expression/FunctionExpression.php +0 -0
  799. vendor/twig/twig/src/Node/Expression/GetAttrExpression.php +0 -0
  800. vendor/twig/twig/src/Node/Expression/InlinePrint.php +0 -0
  801. vendor/twig/twig/src/Node/Expression/MethodCallExpression.php +0 -0
  802. vendor/twig/twig/src/Node/Expression/NameExpression.php +1 -8
  803. vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php +0 -0
  804. vendor/twig/twig/src/Node/Expression/ParentExpression.php +0 -0
  805. vendor/twig/twig/src/Node/Expression/TempNameExpression.php +0 -0
  806. vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php +0 -0
  807. vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php +0 -0
  808. vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php +0 -0
  809. vendor/twig/twig/src/Node/Expression/Test/EvenTest.php +0 -0
  810. vendor/twig/twig/src/Node/Expression/Test/NullTest.php +0 -0
  811. vendor/twig/twig/src/Node/Expression/Test/OddTest.php +0 -0
  812. vendor/twig/twig/src/Node/Expression/Test/SameasTest.php +0 -0
  813. vendor/twig/twig/src/Node/Expression/TestExpression.php +0 -0
  814. vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php +0 -0
  815. vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php +0 -0
  816. vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php +0 -0
  817. vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php +0 -0
  818. vendor/twig/twig/src/Node/FlushNode.php +0 -0
  819. vendor/twig/twig/src/Node/ForLoopNode.php +0 -0
  820. vendor/twig/twig/src/Node/ForNode.php +0 -0
  821. vendor/twig/twig/src/Node/IfNode.php +0 -0
  822. vendor/twig/twig/src/Node/ImportNode.php +1 -1
  823. vendor/twig/twig/src/Node/IncludeNode.php +0 -0
  824. vendor/twig/twig/src/Node/MacroNode.php +1 -1
  825. vendor/twig/twig/src/Node/ModuleNode.php +0 -0
  826. vendor/twig/twig/src/Node/Node.php +2 -2
  827. vendor/twig/twig/src/Node/NodeCaptureInterface.php +0 -0
  828. vendor/twig/twig/src/Node/NodeOutputInterface.php +0 -0
  829. vendor/twig/twig/src/Node/PrintNode.php +0 -0
  830. vendor/twig/twig/src/Node/SandboxNode.php +0 -0
  831. vendor/twig/twig/src/Node/SandboxedPrintNode.php +0 -0
  832. vendor/twig/twig/src/Node/SetNode.php +1 -1
  833. vendor/twig/twig/src/Node/SetTempNode.php +0 -0
  834. vendor/twig/twig/src/Node/SpacelessNode.php +1 -1
  835. vendor/twig/twig/src/Node/TextNode.php +0 -0
  836. vendor/twig/twig/src/Node/WithNode.php +0 -0
  837. vendor/twig/twig/src/NodeTraverser.php +1 -5
  838. vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php +1 -3
  839. vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php +1 -1
  840. vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php +1 -1
  841. vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php +0 -0
  842. vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php +0 -0
  843. vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php +0 -0
  844. vendor/twig/twig/src/Parser.php +0 -0
  845. vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php +0 -0
  846. vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php +0 -0
  847. vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php +0 -0
  848. vendor/twig/twig/src/Profiler/Dumper/TextDumper.php +0 -0
  849. vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php +0 -0
  850. vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php +0 -0
  851. vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php +0 -0
  852. vendor/twig/twig/src/Profiler/Profile.php +1 -1
  853. vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php +0 -0
  854. vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php +0 -0
  855. vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php +0 -0
  856. vendor/twig/twig/src/Sandbox/SecurityError.php +0 -0
  857. vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php +0 -0
  858. vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php +0 -0
  859. vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php +0 -0
  860. vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php +0 -0
  861. vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php +0 -0
  862. vendor/twig/twig/src/Sandbox/SecurityPolicy.php +0 -0
  863. vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php +1 -1
  864. vendor/twig/twig/src/Source.php +0 -0
  865. vendor/twig/twig/src/Template.php +3 -16
  866. vendor/twig/twig/src/TemplateWrapper.php +2 -12
  867. vendor/twig/twig/src/Test/IntegrationTestCase.php +1 -1
  868. vendor/twig/twig/src/Test/NodeTestCase.php +1 -1
  869. vendor/twig/twig/src/Token.php +0 -6
  870. vendor/twig/twig/src/TokenParser/AbstractTokenParser.php +0 -3
  871. vendor/twig/twig/src/TokenParser/ApplyTokenParser.php +0 -58
  872. vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php +0 -0
  873. vendor/twig/twig/src/TokenParser/BlockTokenParser.php +0 -0
  874. vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php +0 -0
  875. vendor/twig/twig/src/TokenParser/DoTokenParser.php +0 -0
  876. vendor/twig/twig/src/TokenParser/EmbedTokenParser.php +0 -0
  877. vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php +0 -3
  878. vendor/twig/twig/src/TokenParser/FilterTokenParser.php +0 -0
  879. vendor/twig/twig/src/TokenParser/FlushTokenParser.php +0 -0
  880. vendor/twig/twig/src/TokenParser/ForTokenParser.php +0 -0
  881. vendor/twig/twig/src/TokenParser/FromTokenParser.php +0 -0
  882. vendor/twig/twig/src/TokenParser/IfTokenParser.php +0 -0
  883. vendor/twig/twig/src/TokenParser/ImportTokenParser.php +0 -0
  884. vendor/twig/twig/src/TokenParser/IncludeTokenParser.php +0 -0
  885. vendor/twig/twig/src/TokenParser/MacroTokenParser.php +0 -3
  886. vendor/twig/twig/src/TokenParser/SandboxTokenParser.php +0 -0
  887. vendor/twig/twig/src/TokenParser/SetTokenParser.php +0 -0
  888. vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php +0 -0
  889. vendor/twig/twig/src/TokenParser/TokenParserInterface.php +0 -0
  890. vendor/twig/twig/src/TokenParser/UseTokenParser.php +0 -0
  891. vendor/twig/twig/src/TokenParser/WithTokenParser.php +0 -0
  892. vendor/twig/twig/src/TokenStream.php +0 -0
  893. vendor/twig/twig/src/TwigFilter.php +0 -0
  894. vendor/twig/twig/src/TwigFunction.php +0 -0
  895. vendor/twig/twig/src/TwigTest.php +0 -0
  896. vendor/twig/twig/src/Util/DeprecationCollector.php +0 -0
  897. vendor/twig/twig/src/Util/TemplateDirIterator.php +0 -0
  898. wp-rss-aggregator.php +24 -17
CHANGELOG.md CHANGED
@@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file.
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ## [4.14] - 2019-07-09
8
  ### Added
9
  * YouTube channel URLs are now supported.
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
 
7
+ ## [4.15] - 2019-07-16
8
+ ### Added
9
+ * New error handling for catchable PHP7 `Throwable` errors.
10
+ * New option to enable feed caching for better performance.
11
+ * New option to import source name and URL for each item individually.
12
+ * The custom feed now includes source info for every item.
13
+
14
+ ### Changed
15
+ * Improved some exception messages to better indicate the cause of certain problems.
16
+ * Re-organized settings into multiple tabs.
17
+ * Added the current site URL to the custom feed URL option's label.
18
+
19
+ ### Fixed
20
+ * Feed sources had image importing wrongly enabled by default.
21
+ * Downloading the debug log triggered an error.
22
+ * The custom feed self URL ignored the settings and was incorrect.
23
+ * Items in the custom feed had a missing `rel` attribute for their `<link>` element.
24
+ * Fixed placement of WordPress notices on the Templates List and Edit page.
25
+ * Fixed WordPress notices disappearing after moving between Templates list and edit page.
26
+
27
  ## [4.14] - 2019-07-09
28
  ### Added
29
  * YouTube channel URLs are now supported.
css/build/common.min.css CHANGED
File without changes
css/build/gutenberg-block.min.css CHANGED
File without changes
css/build/intro.min.css CHANGED
File without changes
css/build/pagination.min.css CHANGED
File without changes
css/build/plugins.min.css CHANGED
File without changes
css/build/templates.min.css CHANGED
File without changes
css/build/update.min.css CHANGED
File without changes
css/src/common/index.scss DELETED
@@ -1,3 +0,0 @@
1
- @import "./../mixins";
2
- @import "notice-block";
3
- @import "info-box";
 
 
 
css/src/common/info-box.scss DELETED
@@ -1,16 +0,0 @@
1
- .wpra-info-box {
2
- background: #daf4ff;
3
- padding: 8px 12px;
4
- border-radius: 3px;
5
- display: flex;
6
-
7
- &__icon {
8
- opacity: .4;
9
- flex-shrink: 0;
10
- }
11
-
12
- &__text {
13
- flex-grow: 1;
14
- padding-left: 8px;
15
- }
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/common/notice-block.scss DELETED
@@ -1,64 +0,0 @@
1
- .wpra-notice-block {
2
- background-color: white;
3
- box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
4
- padding: 12px 16px;
5
- margin-top: .5rem;
6
- margin-bottom: .15rem;
7
- //border-left: 4px solid #ff792b;
8
-
9
- &.postbox {
10
- margin-top: 0;
11
- margin-bottom: 20px;
12
- box-shadow: 0;
13
-
14
- .wpra-notice-block__body {
15
- font-size: 14px;
16
- opacity: .8;
17
- }
18
- }
19
-
20
- &__title {
21
- font-size: 22px;
22
- padding: .5rem 0 1rem;
23
- max-width: 65rem;
24
- }
25
-
26
- &__body {
27
- line-height: 1.5;
28
- font-size: 16px;
29
- opacity: .7;
30
- max-width: 65rem;
31
- }
32
-
33
- &__buttons {
34
- padding: 1rem 0 .5rem;
35
-
36
- .button {
37
- height: 34px;
38
- line-height: 32px;
39
- padding: 0 16px 2px;
40
-
41
- .dashicons {
42
- font-size: 16px;
43
- vertical-align: middle;
44
- opacity: .75;
45
- margin-left: 2px;
46
- }
47
-
48
- &-clear {
49
- margin-left: 8px;
50
- font-weight: 500;
51
- color: #0085ba;
52
- border: none;
53
- background: none;
54
- box-shadow: none;
55
-
56
- &:hover, &:active, &:focus {
57
- border: none;
58
- background: none;
59
- box-shadow: none;
60
- }
61
- }
62
- }
63
- }
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/gutenberg-block/index.scss DELETED
@@ -1,14 +0,0 @@
1
- .wpra-gutenberg-block, [data-type="wpra-shortcode/wpra-shortcode"] {
2
- .wpra-item {
3
- // Prevent clicking on feed item links.
4
- a {
5
- pointer-events: none !important;
6
- }
7
- }
8
- }
9
-
10
- .nav-links::after {
11
- display: block;
12
- content: '';
13
- clear: both;
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/intro/animation.scss DELETED
@@ -1,48 +0,0 @@
1
- .wrpa-expander {
2
- will-change: height;
3
- transform: translateZ(0);
4
- backface-visibility: hidden;
5
- perspective: 1000px;
6
- }
7
-
8
- .expand-enter-active,
9
- .expand-leave-active {
10
- transition: height .35s ease;
11
- overflow: hidden;
12
- }
13
-
14
- .expand-enter,
15
- .expand-leave-to {
16
- height: 0;
17
- }
18
-
19
- .fade-enter, .fade-leave-to {
20
- opacity: 0;
21
- }
22
- .fade-enter-active, .fade-leave-active {
23
- transition: opacity .3s ease;
24
- }
25
-
26
- .slide-up-enter {
27
- transform: translateY(10px);
28
- opacity: 0;
29
- }
30
- .slide-up-leave-to {
31
- transform: translateY(-10px);
32
- opacity: 0;
33
- }
34
- .slide-up-enter-active, .slide-up-leave-active {
35
- transition: all .3s ease;
36
- }
37
-
38
- .slide-down-enter {
39
- transform: translateY(-10px);
40
- opacity: 0;
41
- }
42
- .slide-down-leave-to {
43
- transform: translateY(10px);
44
- opacity: 0;
45
- }
46
- .slide-down-enter-active, .slide-down-leave-active {
47
- transition: all .3s ease;
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/intro/expander.scss DELETED
@@ -1,26 +0,0 @@
1
- .wpra-expander {
2
- &__title {
3
- cursor: pointer;
4
- user-select: none;
5
- span {
6
- opacity: .5;
7
- vertical-align: bottom;
8
- transition: transform .3s ease;
9
- }
10
- }
11
- &__content {
12
- padding: 0 .5rem;
13
- opacity: 0;
14
- transition: opacity .3s ease;
15
- }
16
- &--expanded {
17
- .wpra-expander__content {
18
- opacity: 1;
19
- }
20
- .wpra-expander__title {
21
- span {
22
- transform: rotate(180deg);
23
- }
24
- }
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/intro/loading.scss DELETED
@@ -1,131 +0,0 @@
1
- [v-cloak] {
2
- .vcloak {
3
- &--visible {
4
- display: block;
5
- }
6
- &--hidden {
7
- display: none;
8
- }
9
- }
10
- }
11
- .vcloak {
12
- &--visible {
13
- min-height: 60px;
14
- display: none;
15
- }
16
- }
17
-
18
- .loading-container {
19
- position: relative;
20
- &:before {
21
- display: block;
22
- content: '';
23
- position: absolute;
24
- left: calc(50% - 20px);
25
- top: calc(50% - 20px);
26
- box-sizing: border-box;
27
- height: 40px;
28
- width: 40px;
29
- border: 0px solid #d0d0d0;
30
- border-radius: 50%;
31
- box-shadow: 0 -12px 0 16px #d0d0d0 inset;
32
- animation: rotate 1s infinite linear;
33
- z-index: 3;
34
- }
35
- &:after {
36
- display: block;
37
- content: '';
38
- position: absolute;
39
- z-index: 2;
40
- background-color: rgba(241, 241, 241, 0.5);
41
- width: 100%;
42
- height: 100%;
43
- left: 0;
44
- top: 0;
45
- }
46
- &--white {
47
- &:after {
48
- background-color: white;
49
- }
50
- }
51
- }
52
-
53
-
54
- .loading-button {
55
- pointer-events: none;
56
- position: relative;
57
- &:before {
58
- display: block;
59
- content: '';
60
- position: absolute;
61
- left: calc(50% - 8px);
62
- top: calc(50% - 8px);
63
- box-sizing: border-box;
64
- height: 16px;
65
- width: 16px;
66
- border: 0px solid #fff;
67
- border-radius: 50%;
68
- box-shadow: 0 -4px 0 6px #fff inset;
69
- animation: rotate 1s infinite linear;
70
- z-index: 3;
71
- }
72
- &:after {
73
- display: block;
74
- content: '';
75
- position: absolute;
76
- z-index: 2;
77
- background-color: inherit;
78
- width: 100%;
79
- height: 100%;
80
- left: 0;
81
- top: 0;
82
- }
83
- }
84
-
85
- .button-default {
86
- &.loading-button:before {
87
- box-shadow: inset 0 -4px 0 6px #6f6f6f;
88
- }
89
- }
90
-
91
- .loading-inline {
92
- display: inline-block;
93
- pointer-events: none;
94
- position: relative;
95
- &:before {
96
- display: block;
97
- content: '';
98
- position: absolute;
99
- left: calc(50% + 1px);
100
- top: calc(50% - 11px);
101
- box-sizing: border-box;
102
- height: 14px;
103
- width: 14px;
104
- border: 0px solid #d0d0d0;
105
- border-radius: 50%;
106
- box-shadow: 0 -3px 0 5px #d0d0d0 inset;
107
- animation: rotate 1s infinite linear;
108
- z-index: 3;
109
- }
110
- &:after {
111
- display: block;
112
- content: '';
113
- position: absolute;
114
- z-index: 2;
115
- background-color: inherit;
116
- width: 100%;
117
- height: 100%;
118
- left: 0;
119
- top: 0;
120
- }
121
- }
122
-
123
-
124
- @keyframes rotate {
125
- 0% {
126
- transform: rotate(0deg);
127
- }
128
- 100% {
129
- transform: rotate(360deg);
130
- }
131
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/intro/steps.scss DELETED
@@ -1,647 +0,0 @@
1
- $dark-gray: transparentize(#000, .25);
2
- $medium-gray: transparentize(#000, .5);
3
- $deep-gray: transparentize(#000, .95);
4
- $light-gray: transparentize(#000, .95);
5
- $borderColor: transparentize(#000, .95);
6
- $white: #fff;
7
- $button-radius: 4px;
8
-
9
- $wizard-width: 42rem;
10
-
11
- $success-color: #00b479;
12
- $primary-color: #1a53e6;
13
-
14
- @import "animation";
15
- @import "expander";
16
- @import "loading";
17
-
18
- @mixin clear() {
19
- &:after {
20
- clear: both;
21
- display: block;
22
- content: '';
23
- }
24
- }
25
-
26
- @mixin breakpoint($point) {
27
- @if $point == desktop {
28
- @media (min-width: 70em) { @content ; }
29
- }
30
- @else if $point == laptop {
31
- @media (min-width: 64em) { @content ; }
32
- }
33
- @else if $point == tablet {
34
- @media (max-width: 50em) { @content ; }
35
- }
36
- @else if $point == phablet {
37
- @media (min-width: 37.5em) { @content ; }
38
- }
39
- @else if $point == mobileonly {
40
- @media (max-width: 37.5em) { @content ; }
41
-
42
- }
43
- }
44
-
45
- .wpra-wizard-head {
46
- display: flex;
47
- padding-bottom: 1.5rem;
48
- padding-top: .75rem;
49
- &__logo {
50
- flex-shrink: 0;
51
- img {
52
- width: 57px;
53
- }
54
- }
55
- &__copy {
56
- flex-grow: 1;
57
- padding-left: 1rem;
58
- display: flex;
59
- flex-direction: column;
60
- justify-content: center;
61
- }
62
- &__title {
63
- font-size: 1.25rem;
64
- font-weight: 500;
65
- padding-bottom: 12px;
66
- }
67
- &__subtitle {
68
- font-size: 1rem;
69
- opacity: .85;
70
- }
71
- }
72
-
73
- .wpra-cols {
74
- &-title {
75
- font-weight: normal;
76
- font-size: 1rem;
77
- padding-bottom: 1rem;
78
- }
79
-
80
- display: flex;
81
- margin: 0 -.5rem;
82
- border-top: 2px solid rgba(0,0,0,.05);
83
- padding-top: 1.45rem;
84
-
85
- @include breakpoint(tablet) {
86
- flex-wrap: wrap;
87
- }
88
- .col {
89
- flex-basis: 50%;
90
- padding: 0 .5rem;
91
-
92
- @include breakpoint(tablet) {
93
- flex-basis: 100%;
94
- padding-bottom: 1rem;
95
- }
96
-
97
- img {
98
- max-width: 100%;
99
- }
100
-
101
- p {
102
- font-size: 14px;
103
- line-height: 1.6;
104
- }
105
- p:first-child {
106
- margin-top: 0;
107
- }
108
- }
109
- }
110
-
111
- .wpra-feed-input {
112
- width: 26rem;
113
- padding: 6px 10px;
114
- max-width: 100%;
115
- }
116
-
117
- .wpra-feedback {
118
- display: flex;
119
- &__photo {
120
- flex-shrink: 0;
121
- img {
122
- width: 70px;
123
- border-radius: 100%;
124
- }
125
- }
126
- &__copy {
127
- padding-left: .5rem;
128
- flex-grow: 1;
129
- }
130
- &__text {
131
- font-size: 1rem;
132
- font-family: Georgia, serif;
133
- font-style: italic;
134
- line-height: 1.5;
135
- }
136
- &__rating {
137
- padding: .25rem 0 .45rem;
138
- span {
139
- color: #f8ca29;
140
- }
141
- }
142
- &__by {
143
- opacity: .85;
144
- a {
145
- color: #617181;
146
- }
147
- }
148
- }
149
-
150
- .wpra-demo-photo {
151
- margin-bottom: 1rem;
152
- border-radius: 4px;
153
- border: 1px solid rgba(0, 0, 0, 0.15);
154
- }
155
-
156
- .wpra-feed-items {
157
- padding-left: .5rem;
158
- margin-bottom: 1rem;
159
- border-left: 4px solid #ff792b;
160
- .wpra-feed-item {
161
- padding: .75rem;
162
- &__link {
163
- padding-bottom: 4px;
164
- }
165
- }
166
- }
167
-
168
- .step-items {
169
- $size: 35px;
170
-
171
- display: flex;
172
- position: relative;
173
-
174
- flex-direction: column;
175
- align-items: flex-end;
176
-
177
- .step-progress {
178
- position: absolute;
179
- width: 3px;
180
- height: 0;
181
- background-color: $success-color;
182
- left: $size / 2;
183
- top: 0;
184
- transition: height .3s ease;
185
- z-index: -1;
186
- &--1 {
187
- height: 50%;
188
- }
189
- &--2 {
190
- height: 100%;
191
- }
192
-
193
- @include breakpoint(tablet) {
194
- display: none;
195
- }
196
- }
197
-
198
- @include breakpoint(tablet) {
199
- padding: .625rem;
200
- flex-direction: row;
201
- align-items: flex-start;
202
- }
203
-
204
- .step-item {
205
- font-size: 16px;
206
- width: 15rem;
207
- margin-bottom: 2.25rem;
208
- display: flex;
209
- background-color: #f1f1f1;
210
-
211
- &:last-child {
212
- margin-bottom: 0;
213
- }
214
-
215
- @include breakpoint(tablet) {
216
- flex-direction: column;
217
- margin-bottom: 0;
218
- align-items: center;
219
- }
220
-
221
- &_active {
222
- .step-item__info {
223
- opacity: 1;
224
- }
225
- .step-item__status {
226
- opacity: 1;
227
- }
228
- opacity: 1;
229
- @include breakpoint(tablet) {
230
- flex-grow: 1;
231
- }
232
- }
233
- &__title {
234
- }
235
- &__description {
236
- //color: $dark-gray;
237
- font-size: 14px;
238
- }
239
-
240
- &__info {
241
- display: flex;
242
- align-items: center;
243
- padding-left: .75rem;
244
- opacity: .5;
245
- @include breakpoint(tablet) {
246
- padding-left: 0;
247
- padding-top: .3rem;
248
- display: none;
249
- }
250
- }
251
-
252
- &__status {
253
- width: $size;
254
- height: $size;
255
- border-radius: 50%;
256
- border: 2px dashed $medium-gray;
257
- flex-shrink: 0;
258
- opacity: .5;
259
-
260
- text-align: center;
261
- font-size: 1.25rem;
262
- line-height: 2.375rem;
263
-
264
- color: $success-color;
265
-
266
- span {
267
- display: block;
268
- margin: 0 !important;
269
- width: 100%;
270
- line-height: 35px;
271
- font-size: 26px;
272
- }
273
- }
274
-
275
- &_completed {
276
- opacity: 1;
277
- .step-item {
278
- &__status {
279
- border-style: solid;
280
- border-color: $success-color;
281
- opacity: 1;
282
-
283
- span {
284
- position: relative;
285
- }
286
- }
287
- &__info {
288
- opacity: .5;
289
- }
290
- }
291
- }
292
- }
293
- }
294
-
295
- .wizard {
296
- width: 100%;
297
- margin-left: 1rem;
298
-
299
- @include breakpoint(tablet) {
300
- margin-left: 0;
301
- }
302
-
303
- ol {
304
- margin-left: 1.5rem;
305
- line-height: 1.5;
306
- font-size: 13px;
307
- ul {
308
- margin-bottom: 1rem;
309
- }
310
- }
311
-
312
- .form-group {
313
- display: flex;
314
- align-items: center;
315
- @include breakpoint(tablet) {
316
- display: block;
317
- align-items: unset;
318
- input {
319
- margin-bottom: 8px;
320
- }
321
- }
322
- input {
323
- flex-shrink: 0;
324
- }
325
- .warning-icon {
326
- padding-left: 4px;
327
- color: #ee5a65;
328
- }
329
- a {
330
- flex-shrink: 0;
331
- margin-left: 6px;
332
- }
333
- }
334
-
335
- .button-clear {
336
- background-color: transparent;
337
- border: none;
338
- cursor: pointer;
339
- height: 30px;
340
- line-height: 28px;
341
- padding: 0 12px 2px;
342
- vertical-align: baseline;
343
-
344
- opacity: .55;
345
- &:hover {
346
- opacity: .8;
347
- }
348
- }
349
-
350
- .button {
351
- vertical-align: baseline !important;
352
- }
353
-
354
- .pad {
355
- display: flex;
356
- &-item {
357
- &--grow {
358
- flex-grow: 1;
359
- }
360
- &--no-shrink {
361
- flex-shrink: 0;
362
- }
363
- }
364
- }
365
-
366
- .wpra-success {
367
- padding-right: 1rem;
368
- font-size: 14px;
369
- }
370
-
371
- &_content {
372
- padding: 1rem;
373
- font-size: 14px;
374
- max-width: $wizard-width;
375
- min-height: 16rem;
376
- padding-top: 12px;
377
-
378
- @include breakpoint(tablet) {
379
- padding: 0;
380
- }
381
- }
382
-
383
- &-holder {
384
- width: 100%;
385
- position: relative;
386
- display: flex;
387
- //align-items: center;
388
- //justify-content: center;
389
-
390
- @include breakpoint(tablet) {
391
- flex-direction: column;
392
- }
393
-
394
- .connect-steps {
395
- flex-shrink: 0;
396
- max-width: 450px;
397
- padding: 1rem;
398
-
399
- @include breakpoint(tablet) {
400
- max-width: 100%;
401
- flex-basis: auto;
402
- padding: .5rem;
403
- }
404
- }
405
-
406
- .wizard {
407
- //background-color: #00aced;
408
-
409
- flex-grow: 1;
410
- }
411
- }
412
-
413
- &_text {
414
- padding: 0 0 25px 0;
415
- max-width: 480px;
416
- font-size: 14px;
417
- }
418
-
419
- &_more {
420
- user-select: none;
421
- display: inline-block;
422
- color: $medium-gray;
423
- font-size: 12px;
424
- margin-top: 20px;
425
-
426
- &:hover {
427
- cursor: pointer;
428
- text-decoration: underline;
429
- }
430
- }
431
-
432
- &_hello {
433
- font-size: 18px;
434
- margin: 15px 0 10px 0;
435
- img {
436
- height: 26px;
437
- vertical-align: sub;
438
- margin-right: 3px;
439
- }
440
- }
441
-
442
- &_button {
443
- min-width: 137px;
444
- margin: 0 .3rem 1rem .3rem;
445
- }
446
-
447
- &_buttons {
448
- margin: 0 -.5rem;
449
- display: flex;
450
-
451
- @include breakpoint(tablet) {
452
- flex-direction: row;
453
- flex-wrap: wrap;
454
- }
455
- }
456
- &_network {
457
- //flex-shrink: 1;
458
- //width: 33%;
459
- padding: 0 .5rem;
460
- margin-bottom: .35rem;
461
- //text-align: center;
462
-
463
- .button {
464
- min-width: 145px;
465
- text-align: center;
466
- i {
467
- margin-left: 4px;
468
- }
469
- }
470
-
471
- .button-transparent {
472
- margin-bottom: 10px;
473
- }
474
-
475
- &-icon {
476
- width: 50px;
477
- height: 50px;
478
- border-radius: 100%;
479
- background-color: lighten($light-gray, 7);
480
- margin: 0 auto .8rem auto;
481
- i {
482
- font-size: 22px;
483
- line-height: 50px;
484
- }
485
- }
486
- }
487
-
488
- &_list {
489
- padding: 10px 0;
490
- display: flex;
491
- flex-wrap: wrap;
492
- margin: 0 -0.3125rem;
493
- max-width: 49rem;
494
- }
495
-
496
- &_item {
497
- padding: 5px;
498
- margin: 5px;
499
- border: 1px solid $borderColor;
500
- display: flex;
501
-
502
- width: 31%;
503
- align-items: center;
504
-
505
- @include breakpoint(tablet) {
506
- width: 100%;
507
- margin: 0;
508
- margin-bottom: .625rem;
509
- }
510
-
511
- vertical-align: middle;
512
- border-radius: $button-radius;
513
- text-align: left;
514
-
515
- .description {
516
- font-size: 12px;
517
- color: $dark-gray;
518
- margin-top: 2px;
519
- }
520
-
521
- .account-item_picture {
522
- float: none;
523
- margin-right: 10px;
524
- flex-shrink: 0;
525
- }
526
- }
527
-
528
- /*
529
- * This is form
530
- */
531
- &_info {
532
- max-width: 20rem;
533
- text-align: left;
534
-
535
- .form-group {
536
- margin-bottom: 1rem;
537
- }
538
- }
539
-
540
- &_label {
541
- font-size: 1rem;
542
- padding-top: .2rem;
543
- padding-bottom: .75rem;
544
- }
545
- }
546
-
547
- .wrpa-shortcode {
548
- display: flex;
549
- &-form, &-preview {
550
- padding-bottom: 10px;
551
- padding-right: 75px;
552
- flex-basis: 50%;
553
- .wrpa-shortcode-label {
554
- font-size: 1rem;
555
- padding-bottom: 12px;
556
- line-height: 1.5;
557
- }
558
- .button.loading-button {
559
- &::before {
560
- box-shadow: inset 0 -4px 0 6px #797979 !important;
561
- }
562
- }
563
- }
564
- .wrpa-shortcode-form {
565
- cursor: pointer;
566
- .wrpa-shortcode-form__shortcode {
567
- display: inline-block;
568
- }
569
- .wrpa-shortcode-form__button {
570
- display: inline-block;
571
- opacity: .65;
572
- font-size: 11px;
573
- font-style: italic;
574
- padding-right: 3px;
575
- }
576
- }
577
- }
578
-
579
- .connect {
580
- &_progress {
581
- position: absolute;
582
- left: calc(50% - 22px);
583
- top: 30px;
584
-
585
- @include clear;
586
-
587
- &-point {
588
- display: block;
589
- float: left;
590
- margin-left: 5px;
591
- width: 8px;
592
- height: 8px;
593
- border-radius: 100%;
594
- background-color: transparentize($primary-color, .7);
595
-
596
- &__active {
597
- border: 1px solid $primary-color;
598
- }
599
-
600
- &__done {
601
- background-color: $primary-color;
602
- }
603
- }
604
- }
605
- }
606
-
607
- .connect-actions {
608
- width: 100%;
609
- max-width: $wizard-width;
610
- border-top: 2px solid $light-gray;
611
- padding: 1rem 0;
612
-
613
- .button {
614
- margin: 0;
615
- }
616
-
617
- @include breakpoint(tablet) {
618
- padding-bottom: 2rem;
619
- }
620
-
621
- .fa-animated {
622
- font-size: 2rem;
623
- color: transparentize($primary-color, .35);
624
- vertical-align: middle;
625
- margin-right: 5px;
626
- }
627
- }
628
-
629
- @keyframes moveRightLeftLoop {
630
- 0% {
631
- transform: translateX(-10px);
632
- }
633
-
634
- 50% {
635
- transform: translateX(0);
636
- }
637
-
638
- 100% {
639
- transform: translateX(-10px);
640
- }
641
- }
642
-
643
- .moveRightLeftLoop {
644
- animation-iteration-count: infinite;
645
- animation-name: moveRightLeftLoop;
646
- animation-duration: 1000ms;
647
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/mixins.scss DELETED
@@ -1,32 +0,0 @@
1
- // grid
2
- $breakpoint-small: 782px; // 540px
3
- $breakpoint-med: 60em; // 720px
4
- $breakpoint-large: 68em; // 960px
5
-
6
- @mixin breakpoint($point) {
7
- @if $point == desktop {
8
- @media (min-width: $breakpoint-large) { @content ; }
9
- }
10
- @else if $point == mobile {
11
- @media (max-width: $breakpoint-small) { @content ; }
12
- }
13
- @else if $point == not-mobile {
14
- @media (min-width: $breakpoint-small) { @content ; }
15
- }
16
- }
17
-
18
- .mobile-collapsed {
19
- display: inherit;
20
- }
21
- .mobile-only {
22
- display: none !important;
23
- }
24
-
25
- @include breakpoint(mobile) {
26
- .mobile-only {
27
- display: inherit !important;
28
- }
29
- .mobile-collapsed {
30
- display: none !important;
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/pagination/index.scss DELETED
@@ -1,10 +0,0 @@
1
- .wpra-loading {
2
- animation: pulse 1s infinite ease-in-out;
3
- pointer-events: none;
4
- }
5
-
6
- @keyframes pulse {
7
- 0% { opacity: .25; }
8
- 50% { opacity: .6; }
9
- 100% { opacity: .25; }
10
- }
 
 
 
 
 
 
 
 
 
 
css/src/plugins/form.scss DELETED
@@ -1,48 +0,0 @@
1
- .form {
2
- &-check {
3
- input {
4
- display: inline-block !important;
5
- width: auto !important;
6
- margin: 0 4px 0 0;
7
- }
8
- label {
9
- display: inline-block !important;
10
- }
11
- padding: 4px 0;
12
- }
13
- &-group {
14
- padding-bottom: 8px;
15
- label {
16
- display: block;
17
- }
18
- & > label {
19
- margin-bottom: 2px;
20
- }
21
- input, textarea {
22
- display: block;
23
- width: 100%;
24
- }
25
- &:last-child {
26
- padding-bottom: 0;
27
- }
28
- p {
29
- &:first-child {
30
- margin-top: 0;
31
- }
32
- &:last-child {
33
- margin-bottom: 0;
34
- }
35
- }
36
- .error {
37
- margin: 0 !important;
38
- }
39
- }
40
- }
41
-
42
- .wpra-plugin-disable-poll {
43
- &__logo {
44
- img {
45
- max-height: 40px;
46
- }
47
- }
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/plugins/index.scss DELETED
@@ -1,25 +0,0 @@
1
- $white: #fff;
2
- $radius: 4px;
3
-
4
- @mixin breakpoint($point) {
5
- @if $point == desktop {
6
- @media (min-width: 70em) { @content ; }
7
- }
8
- @else if $point == laptop {
9
- @media (min-width: 64em) { @content ; }
10
- }
11
- @else if $point == tablet {
12
- @media (max-width: 50em) { @content ; }
13
- }
14
- @else if $point == phablet {
15
- @media (min-width: 37.5em) { @content ; }
16
- }
17
- @else if $point == mobileonly {
18
- @media (max-width: 37.5em) { @content ; }
19
-
20
- }
21
- }
22
-
23
- @import "./../intro/loading";
24
- @import "modal";
25
- @import "form";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/plugins/modal.scss DELETED
@@ -1,173 +0,0 @@
1
- .modal {
2
- &-opened {
3
- overflow: hidden;
4
- }
5
-
6
- position: fixed;
7
- background-color: rgba(0, 0, 0, 0.65);
8
- width: 100%;
9
- height: 100%;
10
- left: 0;
11
- top: 0;
12
- z-index: 9999;
13
- overflow-y: auto;
14
-
15
- @include breakpoint(mobile) {
16
- z-index: 100000;
17
- }
18
-
19
- &__body {
20
- width: 100%;
21
- max-width: 30rem;
22
- margin: 5rem auto;
23
-
24
- background-color: $white;
25
- border-radius: $radius;
26
-
27
- &--no-content-padding {
28
- .modal__content {
29
- padding: 0;
30
- }
31
- }
32
-
33
- &--wide {
34
- max-width: 50rem;
35
- }
36
-
37
- @include breakpoint(mobile) {
38
- min-height: 100vh;
39
- margin: 0;
40
- border-radius: 0;
41
- }
42
- }
43
-
44
- &__header {
45
- padding: .5rem 1rem;
46
- font-size: 20px;
47
- font-weight: bold;
48
- line-height: 1.5;
49
- border-bottom: 1px solid #eee;
50
-
51
- &.invisible-header {
52
- border: none;
53
- font-size: unset;
54
- font-weight: unset;
55
- padding-top: 12px !important;
56
- h3 {
57
- margin-top: 0;
58
- line-height: 1.5;
59
- margin-bottom: 0;
60
- }
61
- p {
62
- margin-top: .25rem;
63
- font-size: 14px;
64
- opacity: .6;
65
- margin-bottom: 0;
66
- }
67
- & + .modal__content {
68
- padding-top: 6px !important;
69
- }
70
- }
71
-
72
- @include breakpoint(mobile) {
73
- position: relative;
74
-
75
- .modal--right {
76
- position: absolute;
77
- top: 0;
78
- padding: 6px 1rem 0 1rem;
79
- right: 0;
80
- background-color: white;
81
- }
82
- }
83
-
84
- &-buttons {
85
- font-weight: normal;
86
- }
87
- }
88
-
89
- &__close {
90
- opacity: .5;
91
- cursor: pointer;
92
- &:hover {
93
- opacity: .8;
94
- }
95
- }
96
-
97
- &--right {
98
- float: right;
99
- }
100
-
101
- &__content {
102
- padding: 1rem;
103
- }
104
-
105
- &__footer {
106
- padding: 1rem;
107
- border-top: 1px solid #eee;
108
- text-align: right;
109
-
110
- .button {
111
- display: inline-block !important;
112
- margin-left: 4px !important;
113
- }
114
- .footer-confirm {
115
- margin: 0;
116
- padding: 0;
117
- display: flex;
118
- align-items: center;
119
-
120
- @include breakpoint(mobile) {
121
- display: block;
122
- &__message {
123
- padding-right: 0;
124
- padding-bottom: 10px;
125
- }
126
- }
127
-
128
- &__buttons {
129
- flex-shrink: 0;
130
-
131
- &--left {
132
- margin-right: auto;
133
- flex-grow: 1;
134
- text-align: left;
135
- }
136
- }
137
-
138
- &__message {
139
- margin-right: auto;
140
- &.__right {
141
- flex-grow: 1;
142
- padding-right: 10px;
143
- text-align: right;
144
- }
145
- }
146
- }
147
- }
148
- }
149
-
150
- .modal-transition {
151
- &-enter, &-leave-to {
152
- opacity: 0;
153
-
154
- .modal__body {
155
- opacity: 0;
156
- transform: scaleX(.8) scaleY(.7);
157
- }
158
- }
159
-
160
- &-enter-active, &-leave-active {
161
- transition: opacity 0.25s ease-out;
162
-
163
- .modal__body {
164
- transition: all .25s cubic-bezier(.665,1.65,0,.845);
165
- }
166
- }
167
- }
168
-
169
- .button-clear {
170
- border: none !important;
171
- background: transparent !important;
172
- box-shadow: none !important;
173
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/templates/bottom-panel.scss DELETED
@@ -1,15 +0,0 @@
1
- .wpra-bottom-panel {
2
- position: sticky;
3
- bottom: 0;
4
- z-index: 9;
5
- background-color: #fffce9;
6
- padding: 1rem;
7
- border: 1px solid #e5e5e5;
8
- box-shadow: 0 1px 1px rgba(0,0,0,0.04);
9
-
10
- &__title {
11
- font-size: 1rem;
12
- font-weight: 500;
13
- padding-bottom: 8px;
14
- }
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/templates/grid.scss DELETED
@@ -1,18 +0,0 @@
1
- .flex {
2
- &-row {
3
- display: flex;
4
- }
5
- &-col {
6
- box-sizing: border-box;
7
- padding: 0 10px;
8
- flex: 1 1 0;
9
-
10
- &:first-child {
11
- padding-left: 0;
12
- }
13
-
14
- &:last-child {
15
- padding-right: 0;
16
- }
17
- }
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/templates/index.scss DELETED
@@ -1,216 +0,0 @@
1
- @import "./../mixins";
2
- @import "bottom-panel";
3
- @import "loading";
4
- @import "notifications";
5
- @import "grid";
6
-
7
- .wpra-postbox {
8
- .hndle {
9
- cursor: unset !important;
10
- }
11
- }
12
-
13
- .wpra-shortcode-copy {
14
- font-size: 13px;
15
- background-color: #fff;
16
- margin-left: auto;
17
- padding: 9px 14px;
18
- box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
19
-
20
- border-left: 4px solid #0085ba;
21
-
22
- display: flex;
23
- align-items: center;
24
-
25
- @include breakpoint (mobile) {
26
- display: block;
27
- }
28
-
29
- &__icon {
30
- padding-left: 16px;
31
-
32
- @include breakpoint (mobile) {
33
- padding-left: 0;
34
- margin-top: 1rem;
35
- }
36
- }
37
- }
38
-
39
- .page-title {
40
- display: flex;
41
- align-items: center;
42
- padding: 9px 0 4px 0;
43
-
44
- @include breakpoint (mobile) {
45
- display: block;
46
- }
47
-
48
- a {
49
- &:focus {
50
- text-decoration: none;
51
- }
52
- }
53
-
54
- h1 {
55
- margin-left: 6px;
56
- padding: 0;
57
- }
58
- }
59
-
60
- .back-button {
61
- opacity: .75;
62
- text-decoration: none;
63
- font-size: 20px;
64
- display: flex;
65
- align-items: center;
66
- padding-right: 10px;
67
- margin-right: 4px;
68
- border-right: 1px solid #b4b4b4;
69
-
70
- @include breakpoint (mobile) {
71
- border-right: none;
72
- margin-bottom: .5rem;
73
- }
74
-
75
- .dashicons {
76
- margin-right: 8px;
77
- }
78
- }
79
-
80
- .tippy-tooltip.light-theme {
81
- font-size: 13px !important;
82
- font-family: unset !important;
83
- text-align: left !important;
84
-
85
- hr {
86
- border: none;
87
- height: 1px;
88
- background-color: #efefef;
89
- }
90
- }
91
-
92
- .form-input {
93
- display: flex;
94
- margin: .75rem 0;
95
- &--disabled {
96
- pointer-events: none;
97
- .form-input__label {
98
- *:not(.disable-ignored) {
99
- opacity: .5;
100
- user-select: none;
101
- }
102
- }
103
- }
104
- .disable-ignored {
105
- opacity: 1;
106
- }
107
- &--vertical {
108
- flex-direction: column;
109
- .form-input__label {
110
- padding-right: 0;
111
- padding-bottom: 4px;
112
- flex-basis: 100%;
113
- }
114
- }
115
-
116
- @include breakpoint(mobile) {
117
- flex-direction: column;
118
- .form-input__label {
119
- padding-right: 0;
120
- padding-bottom: 4px;
121
- flex-basis: 100%;
122
- }
123
- }
124
-
125
- &:last-child {
126
- margin-bottom: 0;
127
- }
128
- &__tip {
129
- cursor: pointer;
130
- display: inline-block;
131
- margin-left: 4px;
132
- opacity: .25;
133
- vertical-align: middle;
134
- &:hover {
135
- opacity: .85;
136
- }
137
- .dashicons {
138
- font-size: 18px;
139
- }
140
- }
141
- &__label {
142
- padding-right: 12px;
143
- flex-basis: 260px;
144
- &-description {
145
- padding-top: 2px;
146
- padding-right: 10px;
147
- line-height: 1.65;
148
- opacity: .6;
149
- font-size: 12px;
150
-
151
- a {
152
- pointer-events: auto !important;
153
- }
154
- }
155
- }
156
- &__field {
157
- flex-grow: 1;
158
- input:not([type="checkbox"]), textarea, select {
159
- width: 100%;
160
- max-width: 325px;
161
- }
162
- }
163
- }
164
-
165
- .built-in {
166
- background: #f1f1f1;
167
-
168
- [type="checkbox"] {
169
- display: none;
170
- }
171
- }
172
-
173
- .wpra-preview-link {
174
- vertical-align: middle;
175
-
176
- span.dashicons {
177
- opacity: .75;
178
- font-size: 16px;
179
- vertical-align: middle;
180
- }
181
- }
182
-
183
- .wpra-no-cb {
184
- .column-cb {
185
- input[type="checkbox"] {
186
- display: none;
187
- }
188
- }
189
- }
190
-
191
- .column.name {
192
- small {
193
- @include breakpoint (mobile) {
194
- display: block;
195
- }
196
- }
197
- }
198
-
199
- .inside {
200
- .wpra-preview-link {
201
- @include breakpoint (mobile) {
202
- float: none;
203
- }
204
- }
205
- }
206
-
207
- .wpra-postbox-container {
208
- @include breakpoint (mobile) {
209
- display: flex;
210
- flex-direction: column;
211
-
212
- .wpra-postbox-last {
213
- order: 100;
214
- }
215
- }
216
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/templates/loading.scss DELETED
@@ -1,220 +0,0 @@
1
- a.disabled {
2
- color: #9c9c9c;
3
- pointer-events: none;
4
- }
5
-
6
- [v-cloak] {
7
- .vcloak {
8
- &--visible {
9
- display: block;
10
- }
11
- &--hidden {
12
- display: none;
13
- }
14
- }
15
- }
16
- .vcloak {
17
- &--visible {
18
- min-height: 60px;
19
- display: none;
20
- }
21
- }
22
-
23
- .loading-container {
24
- min-height: 5rem;
25
- position: relative;
26
- &:before {
27
- display: block;
28
- content: '';
29
- position: absolute;
30
- left: calc(50% - 20px);
31
- top: calc(50% - 20px);
32
- box-sizing: border-box;
33
- height: 40px;
34
- width: 40px;
35
- border: 0px solid #d0d0d0;
36
- border-radius: 50%;
37
- box-shadow: 0 -12px 0 16px #d0d0d0 inset;
38
- animation: rotate 1s infinite linear;
39
- z-index: 3;
40
- }
41
- &:after {
42
- display: block;
43
- content: '';
44
- position: absolute;
45
- z-index: 2;
46
- background-color: rgba(241, 241, 241, 0.5);
47
- width: 100%;
48
- height: 100%;
49
- left: 0;
50
- top: 0;
51
- }
52
- &--white {
53
- &:after {
54
- background-color: white;
55
- }
56
- }
57
- }
58
-
59
-
60
- .loading-button {
61
- pointer-events: none;
62
- position: relative;
63
- &:before {
64
- display: block;
65
- content: '';
66
- position: absolute;
67
- left: calc(50% - 8px);
68
- top: calc(50% - 8px);
69
- box-sizing: border-box;
70
- height: 16px;
71
- width: 16px;
72
- border: 0px solid #fff;
73
- border-radius: 50%;
74
- box-shadow: 0 -4px 0 6px #fff inset;
75
- animation: rotate 1s infinite linear;
76
- z-index: 3;
77
- }
78
- &:after {
79
- display: block;
80
- content: '';
81
- position: absolute;
82
- z-index: 2;
83
- background-color: inherit;
84
- width: 100%;
85
- height: 100%;
86
- left: 0;
87
- top: 0;
88
- }
89
- }
90
-
91
- .button-default {
92
- &.loading-button:before {
93
- box-shadow: inset 0 -4px 0 6px #6f6f6f;
94
- }
95
- }
96
-
97
- .loading-inline {
98
- display: inline-block;
99
- pointer-events: none;
100
- position: relative;
101
- &:before {
102
- display: block;
103
- content: '';
104
- position: absolute;
105
- left: calc(50% + 1px);
106
- top: calc(50% - 11px);
107
- box-sizing: border-box;
108
- height: 14px;
109
- width: 14px;
110
- border: 0px solid #d0d0d0;
111
- border-radius: 50%;
112
- box-shadow: 0 -3px 0 5px #d0d0d0 inset;
113
- animation: rotate 1s infinite linear;
114
- z-index: 3;
115
- }
116
- &:after {
117
- display: block;
118
- content: '';
119
- position: absolute;
120
- z-index: 2;
121
- background-color: inherit;
122
- width: 100%;
123
- height: 100%;
124
- left: 0;
125
- top: 0;
126
- }
127
- }
128
-
129
-
130
- @keyframes rotate {
131
- 0% {
132
- transform: rotate(0deg);
133
- }
134
- 100% {
135
- transform: rotate(360deg);
136
- }
137
- }
138
-
139
- .table-loading {
140
- position: relative;
141
- }
142
- .table-loading .table-loader-wrap {
143
- position: absolute;
144
- width: 100%;
145
- height: 100%;
146
- z-index: 9;
147
- }
148
- .table-loading .table-loader-wrap .table-loader-center {
149
- position: absolute;
150
- top: 50%;
151
- transform: translateY(-50%);
152
- width: 100%;
153
- }
154
- .table-loading .wp-list-table,
155
- .table-loading .tablenav {
156
- opacity: 0.4;
157
- }
158
- .table-loader {
159
- font-size: 10px;
160
- margin: 50px auto;
161
- text-indent: -9999em;
162
- width: 11em;
163
- height: 11em;
164
- border-radius: 50%;
165
- background: #ffffff;
166
- background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
167
- background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
168
- background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
169
- background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
170
- background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
171
- position: relative;
172
- -webkit-animation: tableLoading 1s infinite linear;
173
- animation: tableLoading 1s infinite linear;
174
- -webkit-transform: translateZ(0);
175
- -ms-transform: translateZ(0);
176
- transform: translateZ(0);
177
- }
178
- .table-loader:before {
179
- width: 50%;
180
- height: 50%;
181
- background: #ffffff;
182
- border-radius: 100% 0 0 0;
183
- position: absolute;
184
- top: 0;
185
- left: 0;
186
- content: '';
187
- }
188
- .table-loader:after {
189
- background: #f4f4f4;
190
- width: 75%;
191
- height: 75%;
192
- border-radius: 50%;
193
- content: '';
194
- margin: auto;
195
- position: absolute;
196
- top: 0;
197
- left: 0;
198
- bottom: 0;
199
- right: 0;
200
- }
201
- @-webkit-keyframes tableLoading {
202
- 0% {
203
- -webkit-transform: rotate(0deg);
204
- transform: rotate(0deg);
205
- }
206
- 100% {
207
- -webkit-transform: rotate(360deg);
208
- transform: rotate(360deg);
209
- }
210
- }
211
- @keyframes tableLoading {
212
- 0% {
213
- -webkit-transform: rotate(0deg);
214
- transform: rotate(0deg);
215
- }
216
- 100% {
217
- -webkit-transform: rotate(360deg);
218
- transform: rotate(360deg);
219
- }
220
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/templates/notifications.scss DELETED
@@ -1,28 +0,0 @@
1
- .toasted-container.top-center {
2
- top: 44px !important;
3
- }
4
-
5
- .toasted {
6
- background: #23282d !important;
7
- color: #e5e5e5 !important;
8
- font-size: inherit !important;
9
- font-weight: inherit !important;
10
-
11
- justify-content: start !important;
12
- border-left: none !important;
13
-
14
- &.success {}
15
-
16
- &.error {
17
- .dashicons {
18
- color: #ff7781;
19
- }
20
- }
21
-
22
- .dashicons {
23
- margin-right: 12px;
24
- margin-left: -8px;
25
- display: inline-block;
26
- opacity: .65;
27
- }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/src/update/index.scss DELETED
@@ -1,149 +0,0 @@
1
- @import "./../mixins";
2
-
3
- .wrap--wpra-update {
4
- padding-top: 1rem;
5
-
6
- @include breakpoint(not-mobile) {
7
- width: 100%;
8
- max-width: 1400px;
9
- margin: 0 auto;
10
- padding-right: 20px;
11
- box-sizing: border-box;
12
- }
13
- }
14
-
15
- .wpra-text-center {
16
- text-align: center;
17
- }
18
-
19
- .wpra-updates ul {
20
- list-style: disc;
21
- padding: 0 1.25rem;
22
- }
23
-
24
- .wpra-inline-form {
25
- display: flex;
26
- align-items: baseline;
27
-
28
- button {
29
- margin-right: 12px !important;
30
- }
31
-
32
- small {
33
- font-size: 12px;
34
- opacity: .75;
35
- }
36
- }
37
-
38
-
39
- .wpra-update-head__title {
40
- font-size: 24px;
41
- font-weight: 500;
42
- padding: 1.5rem 0 1.5rem;
43
- line-height: 1.4;
44
- }
45
-
46
- .wpra-update__logo img {
47
- width: 56px;
48
- }
49
-
50
- .button-icon span {
51
- vertical-align: baseline;
52
- margin-right: -7px;
53
- opacity: .6;
54
- font-size: 16px;
55
- top: 4px;
56
- position: relative;
57
- }
58
-
59
- .wpra-links {
60
- padding-top: .5rem;
61
- }
62
-
63
- .wpra-update-head__link {
64
- font-size: 1rem;
65
- padding-bottom: 1.5rem;
66
- line-height: 1.5;
67
- }
68
-
69
- .wpra-update-feature {
70
- display: flex;
71
- padding: 0 18px 12px !important;
72
-
73
- @include breakpoint(mobile) {
74
- flex-direction: column-reverse;
75
- }
76
- }
77
-
78
- .wpra-update-feature__text {
79
- @include breakpoint(not-mobile) {
80
- padding-right: 12px;
81
- }
82
-
83
- h3 {
84
- margin-top: 8px;
85
- @include breakpoint(mobile) {
86
- margin-top: 16px;
87
- }
88
- }
89
-
90
- p {
91
- font-size: 14px;
92
- }
93
- }
94
-
95
- .wpra-update-feature__image {
96
- flex-shrink: 0;
97
- width: 30rem;
98
- overflow: hidden;
99
- min-height: 336px;
100
- position: relative;
101
- margin: -11px -18px -23px 0;
102
- cursor: pointer;
103
- transition-duration: 0.5s;
104
-
105
- &:hover {
106
- transition-duration: 0.2s;
107
- background-color: #111;
108
-
109
- img {
110
- opacity: 0.95;
111
-
112
- }
113
-
114
- &::before {
115
- content: "\f177";
116
- display: block;
117
- position: absolute;
118
- top: calc(50% - 45px);
119
- width: 100%;
120
- height: 90px;
121
- font-size: 5em;
122
- font-family: dashicons;
123
- text-align: center;
124
- z-index: 100;
125
- opacity: 0.5;
126
- }
127
- }
128
-
129
- @include breakpoint(mobile) {
130
- flex-shrink: unset;
131
- width: unset;
132
- min-height: unset;
133
-
134
- max-height: 15rem;
135
- margin: -11px -18px 0px;
136
- }
137
-
138
- img {
139
- max-height: 29rem;
140
- position: absolute;
141
-
142
- @include breakpoint(mobile) {
143
- max-height: unset;
144
- position: unset;
145
-
146
- max-width: 100%;
147
- }
148
- }
149
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin-help-metaboxes.php CHANGED
@@ -40,6 +40,13 @@
40
 
41
  ' . 'This option only applies when using the shortcode to output feed items.', WPRSS_TEXT_DOMAIN),
42
 
 
 
 
 
 
 
 
43
  /* -------------------------
44
  * Feed Processing Metabox
45
  * -------------------------
40
 
41
  ' . 'This option only applies when using the shortcode to output feed items.', WPRSS_TEXT_DOMAIN),
42
 
43
+ 'wprss_import_source' => __('Tick this box to import the feed source name and URL for each item individually.
44
+
45
+ ' . 'This option is useful when importing from aggregated RSS feeds that have items from different sources.
46
+
47
+ ' . 'If the RSS feed does not provide source information for its items, the name and URL that you have given for the feed source will be used instead.'
48
+ , 'wprss'),
49
+
50
  /* -------------------------
51
  * Feed Processing Metabox
52
  * -------------------------
includes/admin-help-settings.php CHANGED
@@ -165,7 +165,12 @@ function wprss_settings_add_tooltips() {
165
  '. 'Some servers react in unexpected ways to the default value. In such cases, try changing this to something else.
166
 
167
  '. 'The default value is determined by the SimplePie library, and reflects its name, version and build numbers, and some other information.'),
168
-
 
 
 
 
 
169
  );
170
  $help->add_tooltips( $tooltips, $prefix );
171
 
165
  '. 'Some servers react in unexpected ways to the default value. In such cases, try changing this to something else.
166
 
167
  '. 'The default value is determined by the SimplePie library, and reflects its name, version and build numbers, and some other information.'),
168
+ 'feed_cache_enabled' => __( 'Tick this box to enable caching for a small performance gain.
169
+
170
+ '. 'When enabled, websites may ignore the plugin if their RSS feed did not change. So we suggest testing it out first to ensure that your RSS feeds work well with this option enabled.
171
+
172
+ '. 'If you encounter problems or weird behavior, we suggest turning this option off.',
173
+ 'wprss')
174
  );
175
  $help->add_tooltips( $tooltips, $prefix );
176
 
includes/admin-intro-page.php CHANGED
@@ -317,6 +317,16 @@ function wprss_import_feed_sources_array($array)
317
  */
318
  function wprss_feed_source_name_from_url($url)
319
  {
 
 
 
 
 
 
 
 
 
 
320
  $name = parse_url($url, PHP_URL_HOST);
321
  $name = ($name === null) ? $url : $name;
322
 
317
  */
318
  function wprss_feed_source_name_from_url($url)
319
  {
320
+ $feed = new SimplePie($url);
321
+ $feed->enable_cache(false);
322
+ $feed->init();
323
+
324
+ $name = $feed->get_title();
325
+
326
+ if (!empty($name)) {
327
+ return $name;
328
+ }
329
+
330
  $name = parse_url($url, PHP_URL_HOST);
331
  $name = ($name === null) ? $url : $name;
332
 
includes/admin-metaboxes.php CHANGED
@@ -114,11 +114,17 @@
114
  );
115
 
116
  $wprss_meta_fields[ 'source_link' ] = array(
117
- 'label' => __( 'Link Source', WPRSS_TEXT_DOMAIN ),
118
  'id' => $prefix . 'source_link',
119
  'type' => 'boolean_fallback'
120
  );
121
 
 
 
 
 
 
 
122
  // for extensibility, allows more meta fields to be added
123
  return apply_filters( 'wprss_fields', $wprss_meta_fields );
124
  }
114
  );
115
 
116
  $wprss_meta_fields[ 'source_link' ] = array(
117
+ 'label' => __( 'Link source', WPRSS_TEXT_DOMAIN ),
118
  'id' => $prefix . 'source_link',
119
  'type' => 'boolean_fallback'
120
  );
121
 
122
+ $wprss_meta_fields[ 'import_source' ] = array(
123
+ 'label' => __( 'Import source info', WPRSS_TEXT_DOMAIN ),
124
+ 'id' => $prefix . 'import_source',
125
+ 'type' => 'checkbox',
126
+ );
127
+
128
  // for extensibility, allows more meta fields to be added
129
  return apply_filters( 'wprss_fields', $wprss_meta_fields );
130
  }
includes/admin-options-legacy.php CHANGED
@@ -3,7 +3,6 @@
3
  add_action('plugins_loaded', function () {
4
  if (defined('WPRSS_ET_VERSION')) {
5
  add_filter('wprss_settings_sections_array', 'wpra_add_legacy_display_settings_sections');
6
- add_filter('wprss_settings_array', 'wpra_add_legacy_display_settings_fields');
7
  }
8
  });
9
 
@@ -18,94 +17,85 @@ add_action('plugins_loaded', function () {
18
  */
19
  function wpra_add_legacy_display_settings_sections($sections)
20
  {
21
- $sections['display'] = __('Display settings', 'wprss');
22
- $sections['source'] = __('Source Display settings', 'wprss');
23
- $sections['date'] = __('Date Display settings', 'wprss');
24
-
25
- return $sections;
26
- }
27
-
28
- /**
29
- * Adds the legacy display settings.
30
- *
31
- * @since 4.13
32
- *
33
- * @param array $settings The settings fields.
34
- *
35
- * @return array
36
- */
37
- function wpra_add_legacy_display_settings_fields($settings)
38
- {
39
- $settings['display'] = [
40
- 'link-enable' => [
41
- 'label' => __('Link title', 'wprss'),
42
- 'callback' => 'wprss_setting_title_link_callback',
43
- ],
44
- 'title-limit' => [
45
- 'label' => __('Title maximum length', 'wprss'),
46
- 'callback' => 'wprss_setting_title_length_callback',
47
- ],
48
- 'authors-enable' => [
49
- 'label' => __('Show authors', 'wprss'),
50
- 'callback' => 'wprss_setting_authors_enable_callback',
51
- ],
52
- 'video-links' => [
53
- 'label' => __('For video feed items use', 'wprss'),
54
- 'callback' => 'wprss_setting_video_links_callback',
55
- ],
56
- 'pagination' => [
57
- 'label' => __('Pagination type', 'wprss'),
58
- 'callback' => 'wprss_setting_pagination_type_callback',
59
- ],
60
- 'feed-limit' => [
61
- 'label' => __('Feed display limit', 'wprss'),
62
- 'callback' => 'wprss_setting_feed_limit_callback',
63
- ],
64
- 'open-dd' => [
65
- 'label' => __('Open links behaviour', 'wprss'),
66
- 'callback' => 'wprss_setting_open_dd_callback',
67
- ],
68
- 'follow-dd' => [
69
- 'label' => __('Set links as nofollow', 'wprss'),
70
- 'callback' => 'wprss_setting_follow_dd_callback',
71
  ],
72
  ];
73
 
74
- $settings['source'] = [
75
- 'source-enable' => [
76
- 'label' => __('Show source', 'wprss'),
77
- 'callback' => 'wprss_setting_source_enable_callback',
78
- ],
79
- 'text-preceding-source' => [
80
- 'label' => __('Text preceding source', 'wprss'),
81
- 'callback' => 'wprss_setting_text_preceding_source_callback',
82
- ],
83
- 'source-link' => [
84
- 'label' => __('Link source', 'wprss'),
85
- 'callback' => 'wprss_setting_source_link_callback',
 
 
 
86
  ],
87
  ];
88
 
89
- $settings['date'] = [
90
- 'date-enable' => [
91
- 'label' => __('Show date', 'wprss'),
92
- 'callback' => 'wprss_setting_date_enable_callback',
93
- ],
94
- 'text-preceding-date' => [
95
- 'label' => __('Text preceding date', 'wprss'),
96
- 'callback' => 'wprss_setting_text_preceding_date_callback',
97
- ],
98
- 'date-format' => [
99
- 'label' => __('Date format', 'wprss'),
100
- 'callback' => 'wprss_setting_date_format_callback',
101
- ],
102
- 'time-ago-format-enable' => [
103
- 'label' => __('Time ago format', 'wprss'),
104
- 'callback' => 'wprss_setting_time_ago_format_enable_callback',
 
 
 
105
  ],
106
  ];
107
 
108
- return $settings;
109
  }
110
 
111
  /**
3
  add_action('plugins_loaded', function () {
4
  if (defined('WPRSS_ET_VERSION')) {
5
  add_filter('wprss_settings_sections_array', 'wpra_add_legacy_display_settings_sections');
 
6
  }
7
  });
8
 
17
  */
18
  function wpra_add_legacy_display_settings_sections($sections)
19
  {
20
+ $sections['display'] = [
21
+ 'title' => __('Display settings', 'wprss'),
22
+ 'fields' => [
23
+ 'link-enable' => [
24
+ 'label' => __('Link title', 'wprss'),
25
+ 'callback' => 'wprss_setting_title_link_callback',
26
+ ],
27
+ 'title-limit' => [
28
+ 'label' => __('Title maximum length', 'wprss'),
29
+ 'callback' => 'wprss_setting_title_length_callback',
30
+ ],
31
+ 'authors-enable' => [
32
+ 'label' => __('Show authors', 'wprss'),
33
+ 'callback' => 'wprss_setting_authors_enable_callback',
34
+ ],
35
+ 'video-links' => [
36
+ 'label' => __('For video feed items use', 'wprss'),
37
+ 'callback' => 'wprss_setting_video_links_callback',
38
+ ],
39
+ 'pagination' => [
40
+ 'label' => __('Pagination type', 'wprss'),
41
+ 'callback' => 'wprss_setting_pagination_type_callback',
42
+ ],
43
+ 'feed-limit' => [
44
+ 'label' => __('Feed display limit', 'wprss'),
45
+ 'callback' => 'wprss_setting_feed_limit_callback',
46
+ ],
47
+ 'open-dd' => [
48
+ 'label' => __('Open links behaviour', 'wprss'),
49
+ 'callback' => 'wprss_setting_open_dd_callback',
50
+ ],
51
+ 'follow-dd' => [
52
+ 'label' => __('Set links as nofollow', 'wprss'),
53
+ 'callback' => 'wprss_setting_follow_dd_callback',
54
+ ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ],
56
  ];
57
 
58
+ $sections['source'] = [
59
+ 'title' => __('Source Display settings', 'wprss'),
60
+ 'fields' => [
61
+ 'source-enable' => [
62
+ 'label' => __('Show source', 'wprss'),
63
+ 'callback' => 'wprss_setting_source_enable_callback',
64
+ ],
65
+ 'text-preceding-source' => [
66
+ 'label' => __('Text preceding source', 'wprss'),
67
+ 'callback' => 'wprss_setting_text_preceding_source_callback',
68
+ ],
69
+ 'source-link' => [
70
+ 'label' => __('Link source', 'wprss'),
71
+ 'callback' => 'wprss_setting_source_link_callback',
72
+ ],
73
  ],
74
  ];
75
 
76
+ $sections['date'] = [
77
+ 'title' => __('Date Display settings', 'wprss'),
78
+ 'fields' => [
79
+ 'date-enable' => [
80
+ 'label' => __('Show date', 'wprss'),
81
+ 'callback' => 'wprss_setting_date_enable_callback',
82
+ ],
83
+ 'text-preceding-date' => [
84
+ 'label' => __('Text preceding date', 'wprss'),
85
+ 'callback' => 'wprss_setting_text_preceding_date_callback',
86
+ ],
87
+ 'date-format' => [
88
+ 'label' => __('Date format', 'wprss'),
89
+ 'callback' => 'wprss_setting_date_format_callback',
90
+ ],
91
+ 'time-ago-format-enable' => [
92
+ 'label' => __('Time ago format', 'wprss'),
93
+ 'callback' => 'wprss_setting_time_ago_format_enable_callback',
94
+ ],
95
  ],
96
  ];
97
 
98
+ return $sections;
99
  }
100
 
101
  /**
includes/admin-options.php CHANGED
@@ -24,141 +24,269 @@
24
  return ( ( isset( $options[ $option_name ] ) )? $options[$option_name] : $defaults[$option_name] );
25
  }
26
 
27
-
28
- add_action( 'admin_init', 'wprss_admin_init' );
29
  /**
30
- * Register and define options and settings
31
- * @since 2.0
32
- * @todo add option for cron frequency
33
- *
34
- * Note: In the future might change to
35
- * the way EDD builds the settings pages, cleaner method.
36
  */
37
- function wprss_admin_init() {
38
 
39
- register_setting(
40
- 'wprss_settings_general', // A settings group name.
41
- 'wprss_settings_general', // The name of an option to sanitize and save.
42
- 'wprss_settings_general_validate' // A callback function that sanitizes the option's value.
43
- );
44
 
45
- // Licensing of add-ons
46
- register_setting(
47
- 'wprss_settings_license_keys',
48
- 'wprss_settings_license_keys',
49
- 'wprss_settings_license_keys_validate'
50
- );
51
 
52
- $sections = apply_filters(
53
- 'wprss_settings_sections_array',
54
- array(
55
- 'general' => __( 'General Plugin Settings', WPRSS_TEXT_DOMAIN ),
56
- 'custom_feed' => __( 'Create a Custom RSS Feed', WPRSS_TEXT_DOMAIN ),
57
- 'advanced' => __( 'Advanced Settings', WPRSS_TEXT_DOMAIN ),
58
- 'styles' => __( 'Styles', WPRSS_TEXT_DOMAIN ),
59
- )
60
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
 
 
62
  // Define the settings per section
63
  $settings = apply_filters(
64
  'wprss_settings_array',
65
  array(
66
- 'general' => array(
 
 
 
 
 
 
 
 
 
 
 
 
67
  'limit-feed-items-by-age' => array(
68
- 'label' => __( 'Limit items by age', WPRSS_TEXT_DOMAIN ),
69
  'callback' => 'wprss_setting_limit_feed_items_age_callback'
70
  ),
71
  'limit-feed-items-imported' => array(
72
- 'label' => __( 'Limit feed items stored per feed', WPRSS_TEXT_DOMAIN ),
73
  'callback' => 'wprss_setting_limit_feed_items_imported_callback'
74
  ),
75
  'limit-feed-items-db' => array(
76
- 'label' => __( 'Limit feed items stored', WPRSS_TEXT_DOMAIN ),
77
  'callback' => 'wprss_setting_limit_feed_items_callback'
78
  ),
79
  'limit_feed_items_per_import' => array(
80
- 'label' => __( 'Limit feed items per import', WPRSS_TEXT_DOMAIN ),
81
  'callback' => 'wprss_setting_limit_feed_items_per_import_callback'
82
  ),
83
- 'feed_items_import_order' => array(
84
- 'label' => __( 'Import order', WPRSS_TEXT_DOMAIN ),
85
- 'callback' => 'wprss_setting_feed_items_import_order_callback'
86
- ),
87
- 'cron-interval' => array(
88
- 'label' => __( 'Update interval', WPRSS_TEXT_DOMAIN ),
89
- 'callback' => 'wprss_setting_cron_interval_callback'
90
- ),
91
- 'unique-titles' => array(
92
- 'label' => __( 'Unique titles only', WPRSS_TEXT_DOMAIN),
93
- 'callback' => 'wprss_setting_unique_titles'
94
- ),
95
  ),
96
 
97
  'custom_feed' => array(
98
  'custom-feed-url' => array(
99
- 'label' => __( 'Custom feed URL', WPRSS_TEXT_DOMAIN ),
100
  'callback' => 'wprss_settings_custom_feed_url_callback'
101
  ),
102
  'custom-feed-title' => array(
103
- 'label' => __( 'Custom feed title', WPRSS_TEXT_DOMAIN ),
104
  'callback' => 'wprss_settings_custom_feed_title_callback'
105
  ),
106
  'custom-feed-limit' => array(
107
- 'label' => __( 'Custom feed limit', WPRSS_TEXT_DOMAIN ),
108
  'callback' => 'wprss_settings_custom_feed_limit_callback'
109
  ),
110
  ),
111
  )
112
  );
113
 
 
 
 
 
114
  $settings['styles'] = array(
115
  'styles-disable' => array(
116
- 'label' => __( 'Disable Styles', WPRSS_TEXT_DOMAIN ),
117
  'callback' => 'wprss_setting_styles_disable_callback'
118
  )
119
  );
120
 
121
- if ( apply_filters( 'wprss_use_fixed_feed_limit', FALSE ) === FALSE ) {
122
  unset( $settings['general']['limit-feed-items-db'] );
123
  }
124
 
125
- $setting_field_id_prefix = 'wprss-settings-';
126
-
127
-
128
- // Loop through each setting field and register it
129
- foreach( $settings as $section => $fields ) {
130
- if ( count( $fields ) === 0 ) {
131
- continue;
132
- }
133
 
134
- add_settings_section(
135
- "wprss_settings_${section}_section",
136
- $sections[ $section ],
137
- "wprss_settings_${section}_callback",
138
- 'wprss_settings_general'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  );
140
 
141
- foreach ( $fields as $id => $data ) {
142
- /**
143
- * This will be passed to the field callback as the only argument
144
- * @see http://codex.wordpress.org/Function_Reference/add_settings_field#Parameters
145
- */
146
- $callback_args = array(
147
- 'field_id' => $id,
148
- 'field_id_prefix' => $setting_field_id_prefix,
149
- 'section_id' => $section,
150
- 'field_label' => isset( $data['label'] ) ? $data['label'] : null,
151
- 'tooltip' => isset( $data['tooltip'] ) ? $data['tooltip'] : null
152
- );
153
 
154
- add_settings_field(
155
- $setting_field_id_prefix . $id,
156
- $data['label'],
157
- $data['callback'],
158
- 'wprss_settings_general',
159
- "wprss_settings_${section}_section",
160
- $callback_args
161
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
  }
164
 
@@ -242,87 +370,13 @@
242
  }
243
 
244
 
245
- /**
246
- * Build the plugin settings page, used to save general settings like whether a link should be follow or no follow
247
- * @since 1.1
248
- */
249
- function wprss_settings_page_display() {
250
-
251
- ?>
252
- <div class="wrap">
253
- <div id="wpra-settings-app"></div>
254
-
255
- <h2><?php _e( 'WP RSS Aggregator Settings', WPRSS_TEXT_DOMAIN ); ?></h2>
256
-
257
- <?php settings_errors(); ?>
258
-
259
- <?php $active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'general_settings'; ?>
260
-
261
- <?php
262
-
263
- $tabs = array(
264
- array(
265
- 'label' => __( 'General', WPRSS_TEXT_DOMAIN ),
266
- 'slug' => 'general_settings',
267
- ),
268
- );
269
-
270
- $tabs = apply_filters( 'wprss_options_tabs', $tabs );
271
-
272
- if (count(wprss_get_addons()) > 0) {
273
- $tabs[] = array(
274
- 'label' => __( 'Licenses', WPRSS_TEXT_DOMAIN ),
275
- 'slug' => 'licenses_settings'
276
- );
277
- }
278
-
279
- $show_tabs = ( count( $tabs ) > 1 ) || apply_filters( 'wprss_show_settings_tabs_condition', FALSE );
280
-
281
- if ( $show_tabs ) { ?>
282
- <h2 class="nav-tab-wrapper">
283
- <?php
284
- foreach ( $tabs as $tab => $tab_property ) { ?>
285
- <a href="?post_type=wprss_feed&page=wprss-aggregator-settings&tab=<?php echo esc_attr( $tab_property['slug'] ); ?>"
286
- class="nav-tab <?php echo $active_tab == $tab_property['slug'] ? 'nav-tab-active' : ''; ?>"><?php echo esc_html( $tab_property['label'] ); ?></a>
287
- <?php } ?>
288
- <?php } ?>
289
- </h2>
290
-
291
- <form action="options.php" method="post">
292
-
293
- <?php
294
-
295
- if ( $active_tab === 'general_settings' ) {
296
- settings_fields( 'wprss_settings_general' );
297
- //settings_fields( 'wprss_secure_reset' );
298
- do_settings_sections( 'wprss_settings_general' );
299
- }
300
- elseif ( $show_tabs ) {
301
-
302
- if ( $active_tab === 'licenses_settings' ) {
303
- settings_fields( 'wprss_settings_license_keys' );
304
- do_settings_sections( 'wprss_settings_license_keys' );
305
- }
306
-
307
- do_action( 'wprss_add_settings_fields_sections', $active_tab );
308
- }
309
-
310
- submit_button( __( 'Save Settings', WPRSS_TEXT_DOMAIN ) );
311
-
312
- ?>
313
- </form>
314
- </div>
315
- <?php
316
- }
317
-
318
-
319
  /**
320
  * General settings section header
321
  *
322
  * @since 3.0
323
  */
324
- function wprss_settings_general_callback() {
325
- echo wpautop( __( 'These are the general settings for WP RSS Aggregator.', WPRSS_TEXT_DOMAIN ) );
326
  }
327
 
328
 
@@ -332,7 +386,7 @@
332
  * @since 4.13
333
  */
334
  function wprss_settings_custom_feed_callback() {
335
- echo wpautop( __( 'WP RSS Aggregator creates a custom RSS feed for you that includes any items imported by the plugin. Use the below options to set it up.', WPRSS_TEXT_DOMAIN ) );
336
  }
337
 
338
  /**
@@ -464,9 +518,15 @@
464
  * @since 3.3
465
  */
466
  function wprss_settings_custom_feed_url_callback( $field ) {
 
467
  $custom_feed_url = wprss_get_general_setting( 'custom_feed_url' );
468
  ?>
469
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[custom_feed_url]" type="text" value="<?php echo $custom_feed_url ?>" />
 
 
 
 
 
470
  <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
471
  }
472
 
@@ -788,61 +848,31 @@
788
  $current_cron_interval = wprss_get_general_setting( 'cron_interval');
789
 
790
  // Create our array for storing the validated options
791
- $output = array();
792
-
793
  // Loop through each of the incoming options
794
- foreach( $input as $key => $value ) {
795
-
796
  // Check to see if the current option has a value. If so, process it.
797
- if( isset( $input[ $key ] ) ) {
798
-
799
- // Strip all HTML and PHP tags and properly handle quoted strings
800
- $output[ $key ] = strip_tags( stripslashes( $input[ $key ] ) );
801
-
802
- } // end if
803
-
804
- } // end foreach
805
-
806
- // If limit_feed_items_age_unit is not set or it set to zero, set it to empty
807
- if ( ! isset( $input['limit_feed_items_age'] ) || strval( $input['limit_feed_items_age'] ) == '0' ) {
808
- $output['limit_feed_items_age'] = '';
809
  }
810
 
811
- if ( ! isset( $input['title_link'] ) || $input['title_link'] != '1' )
812
- $output['title_link'] = 0;
813
- else
814
- $output['title_link'] = 1;
815
-
816
- if ( ! isset( $input['source_enable'] ) || $input['source_enable'] != '1' )
817
- $output['source_enable'] = 0;
818
- else
819
- $output['source_enable'] = 1;
820
-
821
- if ( ! isset( $input['date_enable'] ) || $input['date_enable'] != '1' )
822
- $output['date_enable'] = 0;
823
- else
824
- $output['date_enable'] = 1;
825
-
826
- if ( ! isset( $input['styles_disable'] ) || $input['styles_disable'] != '1' )
827
- $output['styles_disable'] = 0;
828
- else
829
- $output['styles_disable'] = 1;
830
-
831
- if ( ! isset( $input['video_link'] ) || strtolower( $input['video_link'] ) !== 'true' )
832
- $output['video_link'] = 'false';
833
- else
834
- $output['video_link'] = 'true';
835
-
836
- if ( isset($input['cron_interval']) && $input['cron_interval'] != $current_cron_interval ) {
837
- wp_clear_scheduled_hook( 'wprss_fetch_all_feeds_hook' );
838
- wp_schedule_event( time(), $input['cron_interval'], 'wprss_fetch_all_feeds_hook' );
839
  }
840
 
841
- if ( ! isset( $input['unique_titles'] ) || $input['unique_titles'] !== '1' )
842
- $output['unique_titles'] = 0;
843
- else
844
- $output['unique_titles'] = 1;
845
 
 
 
 
 
846
 
847
  // Return the array processing any additional functions filtered by this action
848
  return apply_filters( 'wprss_settings_general_validate', $output, $input );
24
  return ( ( isset( $options[ $option_name ] ) )? $options[$option_name] : $defaults[$option_name] );
25
  }
26
 
 
 
27
  /**
28
+ * Build the plugin settings page, used to save general settings like whether a link should be follow or no follow
29
+ * @since 1.1
 
 
 
 
30
  */
31
+ function wprss_settings_page_display() {
32
 
33
+ ?>
34
+ <div class="wrap">
35
+ <div id="wpra-settings-app"></div>
 
 
36
 
37
+ <h2><?php _e( 'WP RSS Aggregator Settings', WPRSS_TEXT_DOMAIN ); ?></h2>
 
 
 
 
 
38
 
39
+ <?php settings_errors(); ?>
40
+
41
+ <?php $active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'general_settings'; ?>
42
+
43
+ <?php
44
+
45
+ $tabs = array(
46
+ array(
47
+ 'label' => __( 'General', WPRSS_TEXT_DOMAIN ),
48
+ 'slug' => 'general_settings',
49
+ ),
50
+ array(
51
+ 'label' => __( 'Custom Feed', WPRSS_TEXT_DOMAIN ),
52
+ 'slug' => 'custom_feed_settings',
53
+ ),
54
+ );
55
+
56
+ $tabs = apply_filters( 'wprss_options_tabs', $tabs );
57
+
58
+ $tabs[] = array(
59
+ 'label' => __( 'Advanced', WPRSS_TEXT_DOMAIN ),
60
+ 'slug' => 'advanced_settings',
61
+ );
62
+
63
+ if (count(wprss_get_addons()) > 0) {
64
+ $tabs[] = array(
65
+ 'label' => __( 'Licenses', WPRSS_TEXT_DOMAIN ),
66
+ 'slug' => 'licenses_settings'
67
+ );
68
+ }
69
+
70
+ $show_tabs = ( count( $tabs ) > 1 ) || apply_filters( 'wprss_show_settings_tabs_condition', FALSE );
71
+
72
+ if ( $show_tabs ) { ?>
73
+ <h2 class="nav-tab-wrapper">
74
+ <?php
75
+ foreach ( $tabs as $tab => $tab_property ) { ?>
76
+ <a href="?post_type=wprss_feed&page=wprss-aggregator-settings&tab=<?php echo esc_attr( $tab_property['slug'] ); ?>"
77
+ class="nav-tab <?php echo $active_tab == $tab_property['slug'] ? 'nav-tab-active' : ''; ?>"><?php echo esc_html( $tab_property['label'] ); ?></a>
78
+ <?php } ?>
79
+ <?php } ?>
80
+ </h2>
81
+
82
+ <form action="options.php" method="post">
83
+
84
+ <?php
85
+
86
+ if ( $active_tab === 'general_settings' ) {
87
+ settings_fields( 'wprss_settings_general' );
88
+ do_settings_sections( 'wprss_settings_general' );
89
+ }
90
+ elseif ( $active_tab === 'advanced_settings' ) {
91
+ settings_fields( 'wprss_settings_advanced' );
92
+ do_settings_sections( 'wprss_settings_advanced' );
93
+ }
94
+ elseif ( $active_tab === 'custom_feed_settings' ) {
95
+ settings_fields( 'wprss_settings_custom_feed' );
96
+ do_settings_sections( 'wprss_settings_custom_feed' );
97
+ }
98
+ elseif ( $show_tabs ) {
99
+
100
+ if ( $active_tab === 'licenses_settings' ) {
101
+ settings_fields( 'wprss_settings_license_keys' );
102
+ do_settings_sections( 'wprss_settings_license_keys' );
103
+ }
104
+
105
+ do_action( 'wprss_add_settings_fields_sections', $active_tab );
106
+ }
107
+
108
+ submit_button( __( 'Save Settings', WPRSS_TEXT_DOMAIN ) );
109
+
110
+ ?>
111
+ </form>
112
+ </div>
113
+ <?php
114
+ }
115
 
116
+ function wprss_settings_fields_array()
117
+ {
118
  // Define the settings per section
119
  $settings = apply_filters(
120
  'wprss_settings_array',
121
  array(
122
+ 'import' => array(
123
+ 'cron-interval' => array(
124
+ 'label' => __( 'Update interval', 'wprss' ),
125
+ 'callback' => 'wprss_setting_cron_interval_callback'
126
+ ),
127
+ 'unique-titles' => array(
128
+ 'label' => __( 'Unique titles only', 'wprss'),
129
+ 'callback' => 'wprss_setting_unique_titles'
130
+ ),
131
+ 'feed_items_import_order' => array(
132
+ 'label' => __( 'Import order', 'wprss' ),
133
+ 'callback' => 'wprss_setting_feed_items_import_order_callback'
134
+ ),
135
  'limit-feed-items-by-age' => array(
136
+ 'label' => __( 'Limit items by age', 'wprss' ),
137
  'callback' => 'wprss_setting_limit_feed_items_age_callback'
138
  ),
139
  'limit-feed-items-imported' => array(
140
+ 'label' => __( 'Limit feed items stored per feed', 'wprss' ),
141
  'callback' => 'wprss_setting_limit_feed_items_imported_callback'
142
  ),
143
  'limit-feed-items-db' => array(
144
+ 'label' => __( 'Limit feed items stored', 'wprss' ),
145
  'callback' => 'wprss_setting_limit_feed_items_callback'
146
  ),
147
  'limit_feed_items_per_import' => array(
148
+ 'label' => __( 'Limit feed items per import', 'wprss' ),
149
  'callback' => 'wprss_setting_limit_feed_items_per_import_callback'
150
  ),
 
 
 
 
 
 
 
 
 
 
 
 
151
  ),
152
 
153
  'custom_feed' => array(
154
  'custom-feed-url' => array(
155
+ 'label' => __( 'Custom feed URL', 'wprss' ),
156
  'callback' => 'wprss_settings_custom_feed_url_callback'
157
  ),
158
  'custom-feed-title' => array(
159
+ 'label' => __( 'Custom feed title', 'wprss' ),
160
  'callback' => 'wprss_settings_custom_feed_title_callback'
161
  ),
162
  'custom-feed-limit' => array(
163
+ 'label' => __( 'Custom feed limit', 'wprss' ),
164
  'callback' => 'wprss_settings_custom_feed_limit_callback'
165
  ),
166
  ),
167
  )
168
  );
169
 
170
+ if ( apply_filters( 'wprss_use_fixed_feed_limit', false ) === false ) {
171
+ unset( $settings['import']['limit-feed-items-db'] );
172
+ }
173
+
174
  $settings['styles'] = array(
175
  'styles-disable' => array(
176
+ 'label' => __( 'Disable Styles', 'wprss' ),
177
  'callback' => 'wprss_setting_styles_disable_callback'
178
  )
179
  );
180
 
181
+ if ( apply_filters( 'wprss_use_fixed_feed_limit', false ) === false ) {
182
  unset( $settings['general']['limit-feed-items-db'] );
183
  }
184
 
185
+ return $settings;
186
+ }
 
 
 
 
 
 
187
 
188
+
189
+ add_action( 'admin_init', 'wprss_admin_init' );
190
+ /**
191
+ * Register and define options and settings
192
+ * @since 2.0
193
+ * @todo add option for cron frequency
194
+ *
195
+ * Note: In the future might change to
196
+ * the way EDD builds the settings pages, cleaner method.
197
+ */
198
+ function wprss_admin_init() {
199
+ $fields = wprss_settings_fields_array();
200
+
201
+ // page => sections -> fields
202
+ $settings = [
203
+ 'general' => [
204
+ 'sections' => apply_filters(
205
+ 'wprss_settings_sections_array',
206
+ [
207
+ 'import' => [
208
+ 'title' => __( 'Import Settings', 'wprss' ),
209
+ 'fields' => $fields['import'],
210
+ ],
211
+ ]
212
+ ),
213
+ 'option' => 'wprss_settings_general',
214
+ 'callback' => 'wprss_settings_general_validate',
215
+ ],
216
+ 'custom_feed' => [
217
+ 'sections' => [
218
+ 'custom_feed' => [
219
+ 'title' => __('Custom RSS Feed', 'wprss'),
220
+ 'fields' => $fields['custom_feed'],
221
+ ],
222
+ ],
223
+ 'option' => 'wprss_settings_general',
224
+ 'callback' => 'wprss_settings_general_validate',
225
+ ],
226
+ 'advanced' => [
227
+ 'sections' => [
228
+ 'advanced' => [
229
+ 'title' => __('Advanced Settings', 'wprss'),
230
+ 'fields' => $fields['advanced'],
231
+ ],
232
+ 'styles' => [
233
+ 'title' => __('Styles', 'wprss'),
234
+ 'fields' => $fields['styles'],
235
+ ],
236
+ ],
237
+ 'option' => 'wprss_settings_general',
238
+ 'callback' => 'wprss_settings_general_validate',
239
+ ],
240
+ 'license_keys' => [
241
+ 'sections' => [],
242
+ 'option' => 'wprss_settings_license_keys',
243
+ 'callback' => 'wprss_settings_license_keys_validate',
244
+ ],
245
+ ];
246
+
247
+ $setting_field_id_prefix = 'wprss-settings-';
248
+
249
+ foreach ($settings as $pageKey => $page) {
250
+ $groupId = "wprss_settings_${pageKey}";
251
+
252
+ register_setting(
253
+ $groupId,
254
+ $page['option'],
255
+ $page['callback']
256
  );
257
 
258
+ foreach ($page['sections'] as $sectionKey => $section) {
259
+ $sectionId = "wprss_settings_${sectionKey}_section";
 
 
 
 
 
 
 
 
 
 
260
 
261
+ add_settings_section(
262
+ $sectionId,
263
+ $section['title'],
264
+ "wprss_settings_${sectionKey}_callback",
265
+ $groupId
 
 
266
  );
267
+
268
+ foreach ($section['fields'] as $fieldId => $field) {
269
+ /**
270
+ * This will be passed to the field callback as the only argument
271
+ * @see http://codex.wordpress.org/Function_Reference/add_settings_field#Parameters
272
+ */
273
+ $callback_args = array(
274
+ 'field_id' => $fieldId,
275
+ 'field_id_prefix' => $setting_field_id_prefix,
276
+ 'section_id' => $sectionKey,
277
+ 'field_label' => isset( $field['label'] ) ? $field['label'] : null,
278
+ 'tooltip' => isset( $field['tooltip'] ) ? $field['tooltip'] : null
279
+ );
280
+
281
+ add_settings_field(
282
+ $setting_field_id_prefix . $fieldId,
283
+ $field['label'],
284
+ $field['callback'],
285
+ $groupId,
286
+ $sectionId,
287
+ $callback_args
288
+ );
289
+ }
290
  }
291
  }
292
 
370
  }
371
 
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  /**
374
  * General settings section header
375
  *
376
  * @since 3.0
377
  */
378
+ function wprss_settings_import_callback() {
379
+ echo wpautop( __( 'Configure how WP RSS Aggregator imports RSS feed items.', 'wprss' ) );
380
  }
381
 
382
 
386
  * @since 4.13
387
  */
388
  function wprss_settings_custom_feed_callback() {
389
+ echo wpautop( __( 'WP RSS Aggregator creates a custom RSS feed on your site that includes all of your imported items. Use the below options to set it up.', 'wprss' ) );
390
  }
391
 
392
  /**
518
  * @since 3.3
519
  */
520
  function wprss_settings_custom_feed_url_callback( $field ) {
521
+ $siteUrl = get_site_url();
522
  $custom_feed_url = wprss_get_general_setting( 'custom_feed_url' );
523
  ?>
524
+ <code><?= $siteUrl ?>/</code>
525
+ <input id="<?php echo $field['field_id'] ?>"
526
+ name="wprss_settings_general[custom_feed_url]"
527
+ type="text"
528
+ value="<?php echo $custom_feed_url ?>" />
529
+
530
  <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
531
  }
532
 
848
  $current_cron_interval = wprss_get_general_setting( 'cron_interval');
849
 
850
  // Create our array for storing the validated options
851
+ $output = get_option('wprss_settings_general', []);
852
+
853
  // Loop through each of the incoming options
854
+ foreach ($input as $key => $value) {
 
855
  // Check to see if the current option has a value. If so, process it.
856
+ if (!isset($input[$key])) {
857
+ continue;
858
+ }
859
+
860
+ // Strip all HTML and PHP tags and properly handle quoted strings
861
+ $output[$key] = strip_tags(stripslashes($input[$key]));
 
 
 
 
 
 
862
  }
863
 
864
+ if ( isset($input['styles_disable']) ) {
865
+ $output['styles_disable'] = (int) $input['styles_disable'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
866
  }
867
 
868
+ if ( isset($input['unique_titles']) ) {
869
+ $output['unique_titles'] = (int) $input['unique_titles'];
870
+ }
 
871
 
872
+ if ( isset($input['cron_interval']) && $input['cron_interval'] != $current_cron_interval ) {
873
+ wp_clear_scheduled_hook( 'wprss_fetch_all_feeds_hook' );
874
+ wp_schedule_event( time(), $input['cron_interval'], 'wprss_fetch_all_feeds_hook' );
875
+ }
876
 
877
  // Return the array processing any additional functions filtered by this action
878
  return apply_filters( 'wprss_settings_general_validate', $output, $input );
includes/admin-update-page.php CHANGED
@@ -40,7 +40,7 @@ function wprss_render_update_page()
40
  $parsedown = wpra_get('parsedown');
41
 
42
  echo wprss_render_template('admin/update-page.twig', array(
43
- 'title' => __('What\'s new in WP RSS Aggregator 4.14', WPRSS_TEXT_DOMAIN),
44
  'version' => WPRSS_VERSION,
45
  'url' => array(
46
  'main' => admin_url('edit.php?post_type=wprss_feed'),
@@ -51,7 +51,7 @@ function wprss_render_update_page()
51
  'path' => array(
52
  'images' => WPRSS_IMG,
53
  ),
54
- 'changelog' => $parsedown->text($changelog['4.14']['raw'])
55
  ));
56
  }
57
 
40
  $parsedown = wpra_get('parsedown');
41
 
42
  echo wprss_render_template('admin/update-page.twig', array(
43
+ 'title' => __('What\'s new in WP RSS Aggregator', 'wprss'),
44
  'version' => WPRSS_VERSION,
45
  'url' => array(
46
  'main' => admin_url('edit.php?post_type=wprss_feed'),
51
  'path' => array(
52
  'images' => WPRSS_IMG,
53
  ),
54
+ 'changelog' => $parsedown->text($changelog['4.15']['raw'])
55
  ));
56
  }
57
 
includes/feed-access.php CHANGED
@@ -14,6 +14,7 @@ class WPRSS_Feed_Access
14
 
15
  const SETTING_KEY_CERTIFICATE_PATH = 'certificate-path';
16
  const SETTING_KEY_FEED_REQUEST_USERAGENT = 'feed_request_useragent';
 
17
 
18
  protected static $_instance;
19
 
@@ -201,11 +202,16 @@ class WPRSS_Feed_Access
201
  'label' => __( 'Certificate path', WPRSS_TEXT_DOMAIN ),
202
  'callback' => array( $this, 'render_certificate_path_setting' )
203
  );
204
- /** @since 4.8.2 */
205
  $settings['advanced'][ self::SETTING_KEY_FEED_REQUEST_USERAGENT ] = array(
206
  'label' => __( 'Feed request useragent', WPRSS_TEXT_DOMAIN ),
207
  'callback' => array( $this, 'render_feed_request_useragent_setting' )
208
  );
 
 
 
 
 
209
 
210
  return $settings;
211
  }
@@ -274,6 +280,27 @@ class WPRSS_Feed_Access
274
  <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
275
  }
276
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  /**
278
  * Retrieve default headers that should be used for feed requests.
279
  *
14
 
15
  const SETTING_KEY_CERTIFICATE_PATH = 'certificate-path';
16
  const SETTING_KEY_FEED_REQUEST_USERAGENT = 'feed_request_useragent';
17
+ const SETTING_KEY_CACHE = 'feed_cache_enabled';
18
 
19
  protected static $_instance;
20
 
202
  'label' => __( 'Certificate path', WPRSS_TEXT_DOMAIN ),
203
  'callback' => array( $this, 'render_certificate_path_setting' )
204
  );
205
+ /* @since 4.8.2 */
206
  $settings['advanced'][ self::SETTING_KEY_FEED_REQUEST_USERAGENT ] = array(
207
  'label' => __( 'Feed request useragent', WPRSS_TEXT_DOMAIN ),
208
  'callback' => array( $this, 'render_feed_request_useragent_setting' )
209
  );
210
+ /* @since 4.14.1 */
211
+ $settings['advanced'][ self::SETTING_KEY_CACHE ] = array(
212
+ 'label' => __( 'Enable feed cache', WPRSS_TEXT_DOMAIN ),
213
+ 'callback' => array( $this, 'render_feed_cache_setting' )
214
+ );
215
 
216
  return $settings;
217
  }
280
  <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
281
  }
282
 
283
+ /**
284
+ * Renders the setting field for the feed cache option.
285
+ *
286
+ * @since 4.15
287
+ *
288
+ * @param array $field The information for this field.
289
+ */
290
+ public function render_feed_cache_setting( $field )
291
+ {
292
+ $value = (int) wprss_get_general_setting($field['field_id']);
293
+ ?>
294
+ <input name="wprss_settings_general[<?= $field['field_id'] ?>]" type="hidden" value="0" />
295
+ <input id="<?= $field['field_id'] ?>"
296
+ name="wprss_settings_general[<?= $field['field_id'] ?>]"
297
+ type="checkbox"
298
+ value="1"
299
+ <?= checked(1, $value, false) ?>
300
+ />
301
+ <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
302
+ }
303
+
304
  /**
305
  * Retrieve default headers that should be used for feed requests.
306
  *
includes/feed-importing-images.php CHANGED
@@ -456,6 +456,10 @@ function wpra_get_item_itunes_images($item)
456
  {
457
  $tags = $item->get_item_tags(Wpra_Rss_Namespace::ITUNES,'image');
458
 
 
 
 
 
459
  $images = [];
460
  foreach ($tags as $tag) {
461
  if (empty($tag['attribs']) || empty($tag['attribs'][''])) {
456
  {
457
  $tags = $item->get_item_tags(Wpra_Rss_Namespace::ITUNES,'image');
458
 
459
+ if (!is_array($tags) || empty($tags)) {
460
+ return [];
461
+ }
462
+
463
  $images = [];
464
  foreach ($tags as $tag) {
465
  if (empty($tag['attribs']) || empty($tag['attribs'][''])) {
includes/feed-importing.php CHANGED
@@ -227,13 +227,11 @@
227
  function wprss_get_feed_items( $feed_url, $source, $force_feed = FALSE ) {
228
  // Add filters and actions prior to fetching the feed items
229
  add_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_feed_cache_lifetime' );
230
- add_action( 'wp_feed_options', 'wprss_do_not_cache_feeds' );
231
 
232
  /* Fetch the feed from the soure URL specified */
233
  $feed = wprss_fetch_feed( $feed_url, $source, $force_feed );
234
 
235
  // Remove previously added filters and actions
236
- remove_action( 'wp_feed_options', 'wprss_do_not_cache_feeds' );
237
  remove_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_feed_cache_lifetime' );
238
 
239
  if ( !is_wp_error( $feed ) ) {
@@ -273,6 +271,47 @@ function wpse_cron_add_xdebug_cookie ($cron_request_array, $doing_wp_cron)
273
  return ($cron_request_array) ;
274
  }
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  /**
277
  * A clone of the function 'fetch_feed' in wp-includes/feed.php [line #529]
278
  *
@@ -308,7 +347,12 @@ function wpse_cron_add_xdebug_cookie ($cron_request_array, $doing_wp_cron)
308
  $fetch_time_limit = wprss_get_feed_fetch_time_limit();
309
  $feed->set_timeout($fetch_time_limit);
310
 
311
- $feed->enable_cache(false);
 
 
 
 
 
312
 
313
  // Reference array action hook, for the feed object and the URL
314
  do_action_ref_array('wp_feed_options', array(&$feed, $url));
@@ -633,9 +677,28 @@ function wpse_cron_add_xdebug_cookie ($cron_request_array, $doing_wp_cron)
633
  update_post_meta( $inserted_ID, 'wprss_item_permalink', $permalink );
634
  update_post_meta( $inserted_ID, 'wprss_item_enclosure', $enclosure_url );
635
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
636
  $author = $item->get_author();
637
- if ( $author ) {
638
  update_post_meta( $inserted_ID, 'wprss_item_author', $author->get_name() );
 
 
639
  }
640
 
641
  update_post_meta( $inserted_ID, 'wprss_feed_id', $feed_ID);
227
  function wprss_get_feed_items( $feed_url, $source, $force_feed = FALSE ) {
228
  // Add filters and actions prior to fetching the feed items
229
  add_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_feed_cache_lifetime' );
 
230
 
231
  /* Fetch the feed from the soure URL specified */
232
  $feed = wprss_fetch_feed( $feed_url, $source, $force_feed );
233
 
234
  // Remove previously added filters and actions
 
235
  remove_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_feed_cache_lifetime' );
236
 
237
  if ( !is_wp_error( $feed ) ) {
271
  return ($cron_request_array) ;
272
  }
273
 
274
+ /**
275
+ * Checks if feed caching is enabled.
276
+ *
277
+ * This function will only return true if the cache option is enabled in the settings AND the cache directory exists
278
+ * or can be successfully created and is writable.
279
+ *
280
+ * @since 4.15
281
+ *
282
+ * @return bool
283
+ */
284
+ function wprss_is_feed_cache_enabled()
285
+ {
286
+ $cacheOption = wprss_get_general_setting('feed_cache_enabled');
287
+ $cacheOption = filter_var($cacheOption, FILTER_VALIDATE_BOOLEAN);
288
+
289
+ if (!$cacheOption) {
290
+ return false;
291
+ }
292
+
293
+ $cacheDir = wprss_get_feed_cache_dir();
294
+
295
+ if (!file_exists($cacheDir)) {
296
+ @mkdir($cacheDir);
297
+ }
298
+
299
+ return is_writable($cacheDir);
300
+ }
301
+
302
+ /**
303
+ * Retrieves the feed cache directory.
304
+ *
305
+ * @since 4.15
306
+ *
307
+ * @return string
308
+ */
309
+ function wprss_get_feed_cache_dir()
310
+ {
311
+ return wpra_container()->get('wpra/importer/cache/dir');
312
+ }
313
+
314
+
315
  /**
316
  * A clone of the function 'fetch_feed' in wp-includes/feed.php [line #529]
317
  *
347
  $fetch_time_limit = wprss_get_feed_fetch_time_limit();
348
  $feed->set_timeout($fetch_time_limit);
349
 
350
+ $cacheEnabled = wprss_is_feed_cache_enabled();
351
+ $feed->enable_cache($cacheEnabled);
352
+
353
+ if ($cacheEnabled) {
354
+ $feed->set_cache_location(wprss_get_feed_cache_dir());
355
+ }
356
 
357
  // Reference array action hook, for the feed object and the URL
358
  do_action_ref_array('wp_feed_options', array(&$feed, $url));
677
  update_post_meta( $inserted_ID, 'wprss_item_permalink', $permalink );
678
  update_post_meta( $inserted_ID, 'wprss_item_enclosure', $enclosure_url );
679
 
680
+ /* @var $item SimplePie_Item */
681
+ $feed = $item->get_feed();
682
+
683
+ // Get the source from the RSS item
684
+ $source = $item->get_source();
685
+
686
+ // Get the source name if available. If empty, default to the feed source CPT title
687
+ $source_name = ($source === null) ? '' : $source->get_title();
688
+ $source_name = empty($source_name) ? $feed->get_title() : $source_name;
689
+
690
+ // Get the source URL if available. If empty, default to the RSS feed's URL
691
+ $source_url = ($source === null) ? '' : $source->get_permalink();
692
+ $source_url = empty($source_url) ? $feed->get_permalink() : $source_url;
693
+
694
+ update_post_meta( $inserted_ID, 'wprss_item_source_name', $source_name);
695
+ update_post_meta( $inserted_ID, 'wprss_item_source_url', $source_url);
696
+
697
  $author = $item->get_author();
698
+ if ($author instanceof SimplePie_Author) {
699
  update_post_meta( $inserted_ID, 'wprss_item_author', $author->get_name() );
700
+ update_post_meta( $inserted_ID, 'wprss_item_author_email', $author->get_email() );
701
+ update_post_meta( $inserted_ID, 'wprss_item_author_link', $author->get_link() );
702
  }
703
 
704
  update_post_meta( $inserted_ID, 'wprss_feed_id', $feed_ID);
includes/update.php CHANGED
@@ -294,6 +294,9 @@
294
  // From 4.13
295
  'custom_css' => '',
296
  'html_classes' => '',
 
 
 
297
  )
298
  );
299
 
294
  // From 4.13
295
  'custom_css' => '',
296
  'html_classes' => '',
297
+
298
+ // From 4.14.1
299
+ 'feed_cache_enabled' => 0,
300
  )
301
  );
302
 
js/build/common.min.js CHANGED
File without changes
js/build/gutenberg-block.min.js CHANGED
File without changes
js/build/intro.min.js CHANGED
File without changes
js/build/pagination.min.js CHANGED
File without changes
js/build/plugins.min.js CHANGED
File without changes
js/build/templates.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.WPRA=e():t.WPRA=e()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([1],{41:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){return new I(t)}function a(t){return t&&"object"===(void 0===t?"undefined":Z(t))&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function r(t){return Array.isArray(t)?[]:{}}function s(t,e){return e&&!0===e.clone&&a(t)?u(r(t),t,e):t}function l(t,e,i){var n=t.slice();return e.forEach(function(e,o){void 0===n[o]?n[o]=s(e,i):a(e)?n[o]=u(t[o],e,i):-1===t.indexOf(e)&&n.push(s(e,i))}),n}function p(t,e,i){var n={};return a(t)&&Object.keys(t).forEach(function(e){n[e]=s(t[e],i)}),Object.keys(e).forEach(function(o){a(e[o])&&t[o]?n[o]=u(t[o],e[o],i):n[o]=s(e[o],i)}),n}function u(t,e,i){var n=Array.isArray(e),o=i||{arrayMerge:l},a=o.arrayMerge||l;return n?Array.isArray(t)?a(t,e,i):s(e,i):p(t,e,i)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var h=i(43),f=i(44),m=i.n(f),y=i(9),v=i.n(y),b=i(46),g=i.n(b),_=i(47),w=i.n(_),k=i(48),x=i(2),S=i.n(x),A=i(49),T=i.n(A),C={props:{path:{},gate:{}},inject:["router"],methods:{getPath:function(){return this.router.buildRoute(this.path)},navigate:function(t){var e=!this.gate||this.gate();t.preventDefault(),e&&this.router.navigate(this.path)}},render:function(){var t=this,e=arguments[0],i=this.getPath();return e("a",S()([{attrs:{href:i}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.navigate.apply(t,[e].concat(n))}}}]),[this.$slots.default])}},O=null,P={props:{mediaType:{type:String,default:"image"},mediaTitle:{type:String,default:"Select Media"},mediaValueProperty:{type:String,default:"id"}},methods:{mediaNode:function(){var t=this,e=this.$createElement;return this.assertMediaLoaded(),e("div",[e("input",{attrs:{type:"text"},domProps:{value:this.value}}),e("button",S()([{class:"button"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.openFrame.apply(t,[e].concat(n))}}}]),["Choose image"])])},openFrame:function(){O||(O=this.createFrame()),O.open()},createFrame:function(){var t=this;return O=wp.media({title:this.mediaTitle,multiple:!1,library:{type:this.mediaType}}),O.on("close",function(){var e=O.state().get("selection"),i=null;e.each(function(t){i=t}),i&&i.id&&t.$emit("input",{id:i.id,url:i.attributes.url}[t.mediaValueProperty])}),O.on("open",function(){var e=O.state().get("selection");if("id"===t.mediaValueProperty&&t.value){var i=wp.media.attachment(t.value);i.fetch(),e.add(i?[i]:[])}}),O},assertMediaLoaded:function(){if(!window.wp.media)throw Error("[MediaInput] wp.media dependency is not loaded")}}},j={mixins:[P],props:{id:{type:String,default:function(){return Math.random().toString(36).substr(0,12)}},label:{},description:{},after:{},type:{},value:{},placeholder:{},title:{},inputDisabled:{},options:{default:function(){return{}}}},methods:{inputNode:function(){var t=this,e=this.$createElement;return"media"===this.type?this.mediaNode():"checkbox"===this.type?e("input",S()([{attrs:{type:"checkbox",id:this.id,placeholder:this.placeholder,disabled:this.$attrs.disabled||this.inputDisabled},domProps:{checked:!!this.value}},{attrs:this.$attrs},{on:{change:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(){return t.$emit("input",!t.value)}).apply(void 0,[e].concat(n))}}}])):"select"!==this.type?e("input",S()([{attrs:{type:this.type,id:this.id,placeholder:this.placeholder,disabled:this.$attrs.disabled||this.inputDisabled},domProps:{value:this.value}},{attrs:this.$attrs},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.$emit("input",e.target.value)}).apply(void 0,[e].concat(n))}}}])):this.selectNode()},selectNode:function(){var t=this,e=this.$createElement,i=Object.keys(this.options).map(function(i){return e("option",{domProps:{value:i,selected:t.value===i}},[t.options[i]])});return e("select",S()([{attrs:this.$attrs},{attrs:{id:this.id,disabled:this.$attrs.disabled||this.inputDisabled}},{on:{change:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.$emit("input",e.target.value)}).apply(void 0,[e].concat(n))}}}]),[i])}},render:function(){var t=arguments[0],e=[];return this.title&&e.push({name:"tippy"}),t("div",{class:{"form-input":!0,"form-input--disabled":this.$attrs.disabled||!1}},[this.label?t("label",{class:"form-input__label",attrs:{for:this.id}},[t("div",[this.label,this.title?t("div",S()([{class:"form-input__tip"},{directives:e},{attrs:{title:this.title}}]),[t("span",{class:"dashicons dashicons-editor-help"})]):null]),this.description?t("div",S()([{class:"form-input__label-description"},{domProps:{innerHTML:this.description}}])):""]):null,t("div",{class:"form-input__field"},[this.inputNode(),this.after])])}},L=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"wpra-bottom-panel"},[t._t("default")],2)},W=[],M={},$=M,N=i(1),R=Object(N.a)($,L,W,!1,null,null,null);R.options.__file="BottomPanel.vue";var E=R.exports,D=function(t){return JSON.parse(JSON.stringify(t))},F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id";return n(this,t),this.data=e,this.primaryField=i,this}return t.prototype.find=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("object"!==(void 0===t?"undefined":F(t))&&null!==t){var i;i={},i[this.primaryField]=t,t=i}for(var n in this.data)if(this._isMatching(this.data[n],t))return this.data[n];return e},t.prototype.pluck=function(t){return this.data.map(function(e){return e[t]})},t.prototype.remove=function(t){for(var e in this.data)this._isMatching(this.data[e],t)&&this.data.splice(e,1);return this},t.prototype.appendDiff=function(t){for(var e=t,i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}var a=o;this.contains(a)||this.data.push(a)}},t.prototype.prependDiff=function(t){for(var e=t.slice().reverse(),i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}var a=o;this.contains(a)||this.data.unshift(a)}},t.prototype.contains=function(t){for(var e=this.data,i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}if(o.id==t.id)return!0}return!1},t.prototype.filterValues=function(t){var e=this;return Object.keys(this.data).filter(function(i){return t(e.data[i],i)}).reduce(function(t,i){return t[i]=e.data[i],t},{})},t.prototype.filter=function(t){var e=this;return this.data.filter(function(i){return e._isMatching(i,t)})},t.prototype.whereIn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",i=[],n={};n[e]=null;for(var o=t,a=Array.isArray(o),r=0,o=a?o:o[Symbol.iterator]();;){var s;if(a){if(r>=o.length)break;s=o[r++]}else{if(r=o.next(),r.done)break;s=r.value}var l=s;n[e]=l;var p=this.find(n);p&&i.push(p)}return i},t.prototype.key=function(e){return new t(this.data.slice().reduce(function(t,i){return t[i[e]]=i,t},{}))},t.prototype.mapValues=function(t){var e=this;return Object.keys(this.data).map(function(i){e.data[i]=t(e.data[i],i)}),this},t.prototype.values=function(){return this.data},t.prototype._isMatching=function(t,e){if(!(t instanceof Object||e instanceof Object))return t==e;for(var i=!0,n=Object.keys(e),o=Array.isArray(n),a=0,n=o?n:n[Symbol.iterator]();;){var r;if(o){if(a>=n.length)break;r=n[a++]}else{if(a=n.next(),a.done)break;r=a.value}var s=r,l=t.hasOwnProperty(s)&&t[s]==e[s];i=i&&l}return i},t}(),U=o,B={data:function(){return{loading:!1,columns:{name:{label:"Template Name",class:"column-primary"},style:{label:"Template Type"},previewTemplate:{label:"Preview"}},filters:WpraTemplates.options.type,checked:[],filter:{paged:parseInt(this.router.params.paged||1),type:this.router.params.type||"",s:this.router.params.s||""},baseUrl:WpraTemplates.base_url,total:0}},inject:["hooks","http","router"],computed:{totalPages:function(){return Math.ceil(this.total/20)},list:{get:function(){return this.$store.state.templates.items},set:function(t){this.$store.commit("templates/set",t)}}},methods:{navigated:function(){var t=this;Object.keys(this.filter).forEach(function(e){t.filter[e]=t.router.params[e]||""}),this.filter.paged=parseInt(this.filter.paged||1),this.fetchList()},fetchList:function(){var t=this;this.loading=!0;var e=this.getParams(),i=parseInt(e.paged);return delete e.paged,i&&1!==i&&(e.page=i),this.http.get(this.baseUrl,{params:e}).then(function(e){t.list=e.data.items,t.total=e.data.count}).finally(function(){t.loading=!1})},deleteTemplate:function(t){var e=this;if(confirm("Are you sure you want to delete this template? If this template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead."))return this.loading=!0,this.http.delete(this.baseUrl+"/"+t).then(function(){return e.fetchList()}).then(function(){e.loading=!1})},bulkDelete:function(){var t=this;if(confirm("Are you sure you want to delete these templates? If a template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead."))return this.loading=!0,this.http.delete(this.baseUrl,{params:{ids:this.checked}}).then(function(){return t.checked=[],t.$refs.table.checkedItems=[],t.fetchList()}).then(function(){t.loading=!1})},duplicateTemplate:function(t){var e=D(t);delete e.id,"__built_in"===e.type&&delete e.type,e.name=e.name+" (Copy)",this.$store.commit("templates/updatePreset",e),this.router.navigate({name:"templates",params:{action:"new"}})},getPreviewLink:function(t){return WpraGlobal.admin_base_url+"?wpra_preview_template="+t.id},createTemplate:function(){this.$store.commit("templates/updatePreset",{}),this.router.navigate({name:"templates",params:{action:"new"}})},setChecked:function(t){var e=this;this.checked=t.filter(function(t){return"__built_in"!==U(e.list).find(t,{}).type})},getParams:function(){var t=this;return Object.keys(this.filter).filter(function(e){return!!t.filter[e]&&"all"!==t.filter[e]}).reduce(function(e,i){return e[i]=t.filter[i],e},{})},setFilter:function(t,e){this.filter[t]=e},submitFilter:function(){this.router.mergeParams(this.getParams())},getRowClass:function(t){return"__built_in"===t.type?"built-in":""}},render:function(){var t=this,e=arguments[0],i=function(t){return{name:"templates",params:{action:"edit",id:t}}},n=this.hooks.apply("wpra-templates-list-cells",this,{name:function(n){var o=n.row;return[e("div",[e("strong",[e(C,{attrs:{path:i(o.id)}},[o.name])]),e("small",{style:{paddingLeft:"4px",opacity:"0.6"}},[o.slug]),"__built_in"===o.type?e("span",{style:{opacity:"0.6",display:"block"}},['This is the default feed template. To create your own, either duplicate it or click "Add New" above.']):null]),e("div",{class:"row-actions"},[e("span",{attrs:{className:"edit"}},[e(C,{attrs:{path:i(o.id)}},["Edit"])," |"]),e("span",{class:"inline",style:{paddingLeft:"4px"}},[e("a",S()([{attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];(function(e){e.preventDefault(),t.duplicateTemplate(o)}).apply(void 0,[e].concat(n))}}}]),["Duplicate"])," ","__built_in"!==o.type?"|":""]),"__built_in"!==o.type?e("span",S()([{class:"trash",style:{paddingLeft:"4px"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];(function(e){e.preventDefault(),t.deleteTemplate(o.id)}).apply(void 0,[e].concat(n))}}}]),[e("a",{attrs:{href:"#","aria-label":"Delete Item"},class:"submitdelete"},["Delete"])]):null])]},style:function(i){var n=i.row;return t.filters[n.type]?[e("div",[t.filters[n.type]])]:[e("div",[t.filters.list," ",e("span",{style:{opacity:.7,fontSize:"90%"}},["(Missing type: ",e("code",[n.type]),")"])])]},previewTemplate:function(i){var n=i.row;return[e("div",[e("a",{attrs:{href:t.getPreviewLink(n),target:"wpra-preview-template"},class:"wpra-preview-link"},["Open preview ",e("span",{class:"dashicons dashicons-external"})])])]},filters:function(){var i=Object.keys(WpraTemplates.options.type).filter(function(t){return"_"!==t[0]}).reduce(function(t,e){return t[e]=WpraTemplates.options.type[e],t},{all:"Select Template Type"});return[e(j,S()([{attrs:{type:"select",options:i,value:t.filter.type},style:{margin:0}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){t.filter.type=e,t.submitFilter()}).apply(void 0,[e].concat(n))}}}]))]}}),o=e("div",[e("h1",{class:"wp-heading-inline"},["Templates"]),e("a",S()([{class:"page-title-action",attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.createTemplate()}).apply(void 0,[e].concat(n))}}}]),["Add New"]),e("p",{class:"search-box",style:{padding:"10px 0"}},[e("label",{class:"screen-reader-text",attrs:{for:"post-search-input"}},["Search Templates:"]),e("input",S()([{attrs:{type:"search",id:"post-search-input",name:"s"},domProps:{value:this.filter.s}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.filter.s=e.target.value}).apply(void 0,[e].concat(n))},keyup:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];if(!("button"in e)&&t._k(e.keyCode,"enter",13))return null;t.submitFilter.apply(t,[e].concat(n))}}}])),e("input",S()([{attrs:{type:"submit",id:"search-submit",value:"Search Templates"},class:"button"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.submitFilter.apply(t,[e].concat(n))}}}]))]),e("hr",{class:"wp-header-end"}),e(T.a,S()([{attrs:{columns:this.columns,rows:this.list,loading:this.loading,totalItems:this.total,perPage:20,totalPages:this.totalPages,currentPage:this.filter.paged,notFound:"No templates found.",rowClass:this.getRowClass},ref:"table",class:{"wpra-no-cb":0===this.list.length||1===this.list.length&&"__built_in"===this.list[0].type},scopedSlots:n},{on:{checked:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.setChecked.apply(t,[e].concat(n))},pagination:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){t.filter.paged=e,t.submitFilter()}).apply(void 0,[e].concat(n))}}}])),this.checked.length?e(E,[e("div",{class:"flex-row"},[e("div",{class:"flex-col"},[e("div",{class:"wpra-bottom-panel__title"},["Bulk Actions"]),e("a",S()([{attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.bulkDelete()}).apply(void 0,[e].concat(n))}}}]),["Delete"])])])]):null]);return this.hooks.apply("wpra-templates-list",this,o)}},V={inject:["hooks"],data:function(){return{expanded:!0}},props:{title:{},id:{},submit:{type:Boolean,default:!1},context:{}},methods:{toggle:function(){this.expanded=!this.expanded}},render:function(t){var e=this;return this.hooks.apply("postbox-"+this.id,this.context||this,t("div",{class:"postbox wpra-postbox",attrs:{id:this.submit?"submitdiv":""}},[t("button",S()([{attrs:{type:"button","aria-expanded":"true"},class:"handlediv"},{on:{click:function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];e.toggle.apply(e,[t].concat(n))}}}]),[t("span",{class:"screen-reader-text"},["Toggle panel: ",this.title]),t("span",{class:"toggle-indicator",attrs:{"aria-hidden":"true"}})]),t("h2",S()([{class:"hndle ui-sortable-handle"},{on:{click:function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];e.toggle.apply(e,[t].concat(n))}}}]),[t("span",[this.title])]),t("div",{class:"inside"},[this.hooks.apply("postbox-content-"+this.id,this.context||this,[this.$slots.default],{h:t})])]),{h:t})}},G=V,J=Object(N.a)(G,void 0,void 0,!1,null,null,null);J.options.__file="Postbox.vue";var q=J.exports,z={render:function(){return(0,arguments[0])("div",{attrs:{id:"postbox-container-2"},class:"postbox-container"},[this.$slots.default])}},H={render:function(){return(0,arguments[0])("div",{attrs:{id:"postbox-container-1"},class:"wpra-postbox-container postbox-container"},[this.$slots.default])}},K={render:function(){return(0,arguments[0])("div",{attrs:{id:"post-body"}},[this.$slots.default])}},X={props:{loading:{type:Boolean,default:!1}},render:function(){return(0,arguments[0])("button",{attrs:{disabled:this.loading},class:{button:!0,"loading-button":this.loading}},[this.$slots.default])}},Y={data:function(){return{shouldBeVisible:!0}},props:{id:{type:String,required:!0},title:{type:String},body:{type:String},learnMore:{default:!1},okayText:{type:String,default:"Got it"},learnMoreText:{type:String,default:"Learn more"},visible:{type:Boolean,default:!0}},computed:{isVisible:function(){return this.visible&&this.shouldBeVisible&&JSON.parse(localStorage.getItem(this.getBlockKey())||"true")}},methods:{onOkayClick:function(){this.shouldBeVisible=!1,localStorage.setItem(this.getBlockKey(),JSON.stringify(!1))},onLearnMoreClick:function(){window.open(this.learnMore,"_blank").focus()},getBlockKey:function(){return"wpra-"+this.id+"-visible"}},render:function(){var t=arguments[0];if(!this.isVisible)return null;var e=this.learnMore?t(X,{class:"button-clear",nativeOn:{click:this.onLearnMoreClick}},[this.learnMoreText," ",t("span",{class:"dashicons dashicons-external"})]):null;return t("div",{class:"wpra-notice-block"},[t("div",{class:"wpra-notice-block__title"},[this.title]),t("div",S()([{class:"wpra-notice-block__body"},{domProps:{innerHTML:this.body}}])),t("div",{class:"wpra-notice-block__buttons"},[t(X,{class:"brand button-primary",nativeOn:{click:this.onOkayClick}},[this.okayText]),e])])}},Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};u.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,i){return u(t,i,e)})};var Q=u,tt=i(50),et=i.n(tt),it={data:function(){return{changes:{model:{}}}},methods:{isChanged:function(){return!et()(this.model,this.changes.model)},rememberModel:function(){this.$set(this.changes,"model",D(this.model))},cancelChanges:function(){confirm("Are you sure you want to cancel your changes for this template? This action cannot be reverted and all changes made since your last save will be lost.")&&this.$set(this,"model",D(this.changes.model))}}},nt={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(t){var e,i,n,o,a,r,s,l="",p=0;for(t=nt._utf8_encode(t);p<t.length;)e=t.charCodeAt(p++),i=t.charCodeAt(p++),n=t.charCodeAt(p++),o=e>>2,a=(3&e)<<4|i>>4,r=(15&i)<<2|n>>6,s=63&n,isNaN(i)?r=s=64:isNaN(n)&&(s=64),l=l+this._keyStr.charAt(o)+this._keyStr.charAt(a)+this._keyStr.charAt(r)+this._keyStr.charAt(s);return l},decode:function(t){var e,i,n,o,a,r,s,l="",p=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");p<t.length;)o=this._keyStr.indexOf(t.charAt(p++)),a=this._keyStr.indexOf(t.charAt(p++)),r=this._keyStr.indexOf(t.charAt(p++)),s=this._keyStr.indexOf(t.charAt(p++)),e=o<<2|a>>4,i=(15&a)<<4|r>>2,n=(3&r)<<6|s,l+=String.fromCharCode(e),64!=r&&(l+=String.fromCharCode(i)),64!=s&&(l+=String.fromCharCode(n));return l=nt._utf8_decode(l)},_utf8_encode:function(t){t=t.replace(/\r\n/g,"\n");for(var e="",i=0;i<t.length;i++){var n=t.charCodeAt(i);n<128?e+=String.fromCharCode(n):n>127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e},_utf8_decode:function(t){for(var e="",i=0,n=0,o=0;i<t.length;)n=t.charCodeAt(i),n<128?(e+=String.fromCharCode(n),i++):n>191&&n<224?(o=t.charCodeAt(i+1),e+=String.fromCharCode((31&n)<<6|63&o),i+=2):(o=t.charCodeAt(i+1),c3=t.charCodeAt(i+2),e+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&c3),i+=3);return e}},ot=nt,at=i(6),rt={mixins:[it],data:function(){return{typeOptions:Object.keys(WpraTemplates.options.type).filter(function(t){return"_"!==t[0]}).reduce(function(t,e){return t[e]=WpraTemplates.options.type[e],t},{}),model:D(WpraTemplates.model_schema),validation:D(WpraTemplates.model_schema),tooltips:D(WpraTemplates.model_tooltips),baseUrl:WpraTemplates.base_url,isSaving:!1,isLoading:!1}},inject:["hooks","http","router","notification"],mounted:function(){this.resolveEditingItem()},computed:{previewUrl:function(){var t=ot.encode(JSON.stringify(this.model.options));return WpraGlobal.admin_base_url+"?wpra_preview_template="+this.router.params.id+"&wpra_template_options="+t}},methods:{resolveEditingItem:function(){var t=this,e=Q(D(WpraTemplates.model_schema),this.$store.state.templates.preset);this.isLoading=!0,function(){var e=t.router.params.id;if(!e)return Promise.resolve(null);var i=t.$store.getters["templates/item"](e);return i?Promise.resolve(i):t.http.get(t.baseUrl+"/"+e).then(function(t){return t.data})}().then(function(i){if(t.isLoading=!1,!i)return t.$set(t,"model",e),void t.rememberModel();i=Object.assign({},i),t.model=Q(t.model,i),t.rememberModel()})},save:function(){var t=this,e=!this.model.id;this.isSaving=!0,this.runRequest().then(function(i){t.model=Q(t.model,i.data),t.rememberModel(),t.notification.show("Template saved!",{type:"success",icon:function(t){return t.classList.add("dashicons","dashicons-yes"),t}}),e&&t.router.navigate({name:"templates",params:{action:"edit",id:i.data.id}})},function(e){t.notification.show("Something went wrong. Template is not saved!",{type:"error",icon:function(t){return t.classList.add("dashicons","dashicons-warning"),t}})}).finally(function(){t.isSaving=!1})},runRequest:function(){var t=this.model.id?"put":"post",e=this.model.id?this.baseUrl+"/"+this.model.id:this.baseUrl;return this.http[t](e,this.prepareModel())},prepareModel:function(){var t=this,e=Object.keys(WpraTemplates.model_schema);return Object.keys(this.model).filter(function(i){return!(!e.includes(i)||"__built_in"===t.model.type&&["name","type"].includes(i)||["slug","id"].includes(i))}).reduce(function(e,i){return e[i]=t.model[i],e},{})},getShortcode:function(){return'[wp-rss-aggregator template="'+this.model.slug+'"]'},preventLoosingNotSavedData:function(){return!this.isChanged()||confirm("You have unsaved changes. All changes will be lost if you go back to the Template list before updating. Are you sure you want to continue?")},copyShortcode:function(t){Object(at.a)(this.getShortcode());var e=t.target.innerText;t.target.style.width=t.target.getBoundingClientRect().width+"px",t.target.disabled=!0,t.target.innerText="Copied!",setTimeout(function(){t.target.style.width=null,t.target.innerText=e,t.target.disabled=!1},5e3)}},render:function(){var t=this,e=arguments[0],i={name:"templates"},n=null,o=null,a=e(Y,{class:"postbox",attrs:{id:"templates-usage",title:"Setting up your Templates",body:'Templates are used to display the items imported using WP RSS Aggregator. Choose the preferred options below and use them anywhere on your site via our <a href="https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode#tinymce" target="_blank">shortcode</a> or our <a href="https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg" target="_blank">block</a>.',learnMore:"https://kb.wprssaggregator.com/article/457-templates"}});this.router.params.id&&(n=e("div",{attrs:{id:""},style:{padding:"6px 0"}},[e("div",{class:"misc-pub-section misc-pub-visibility"},[e("a",{attrs:{href:this.previewUrl,role:"button",target:"wpra-preview-template"},class:"wpra-preview-link",style:{marginLeft:"4px",textDecoration:"none"}},["Open preview",e("span",{class:"dashicons dashicons-external"})])])])),this.model.id&&(o=e("div",{class:"wpra-shortcode-copy",attrs:{title:"Copy chortcode"}},[e("div",{class:"wpra-shortcode-copy__content"},[e("strong",["Shortcode: "]),e("code",[this.getShortcode()])]),e("div",{class:"wpra-shortcode-copy__icon"},[e("button",S()([{class:"button"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.copyShortcode.apply(t,[e].concat(n))}}}]),["Copy Shortcode"])])]));var r=e("div",[e("div",{class:"page-title"},[e(C,{class:"back-button",attrs:{path:i,gate:this.preventLoosingNotSavedData}},[e("span",{class:"dashicons dashicons-arrow-left-alt"}),"Templates"]),e("h1",{class:"wp-heading-inline"},[this.router.params.id?this.changes.model.name||this.changes.model.slug:"Create a New Template"]),o]),e("div",{attrs:{id:"poststuff"}},[this.isLoading?e("div",{class:"loading-container"}):e(K,{class:"metabox-holder columns-2"},[e(z,[a,e(q,{attrs:{id:"template-details",title:"Template Details",context:this}},[e(j,S()([{attrs:{type:"text",label:"Template name",value:this.model.name,disabled:"__built_in"===this.model.type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.name=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"select",label:"Template type",value:this.model.type,options:this.typeOptions,disabled:"__built_in"===this.model.type,inputDisabled:!WpraTemplates.options.is_type_enabled,description:WpraTemplates.options.is_type_enabled?null:'<div class="disable-ignored"><strong class="disable-ignored">Get more template types, including a customisable grid template.</strong> <a target="_blank" href="https://www.wprssaggregator.com/extensions/templates/" class="disable-ignored">Learn more.</a></div>'}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.type=e}).apply(void 0,[e].concat(n))}}}])),"__built_in"===this.model.type?e("div",{class:"wpra-info-box"},[e("div",{class:"wpra-info-box__icon"},[e("span",{class:"dashicons dashicons-info"})]),e("div",{class:"wpra-info-box__text"},["This is the default template for WP RSS Aggregator. It is used as the fallback template when one is not selected via the shortcode or block. To create a new one, please go back to the Templates List."])]):null]),e(q,{attrs:{id:"template-options",title:"Template Options",context:this}},[e(j,S()([{attrs:{type:"checkbox",label:"Link title to original article",value:this.model.options.title_is_link,title:this.tooltips.options.title_is_link}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.title_is_link=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"number",label:"Title maximum length",value:this.model.options.title_max_length||"",placeholder:"No limit",title:this.tooltips.options.title_max_length}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.title_max_length=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"number",label:"Number of items to show",value:this.model.options.limit||"",title:this.tooltips.options.limit,placeholder:"Show all items",min:"0"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.limit=""===e?0:e}).apply(void 0,[e].concat(n))}}}])),e("div",{attrs:{id:"wpra-list-template-publish-date"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Show publish date",value:this.model.options.date_enabled,title:this.tooltips.options.date_enabled},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"text",label:"Date prefix",value:this.model.options.date_prefix,disabled:!this.model.options.date_enabled,title:this.tooltips.options.date_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_prefix=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"text",label:"Date format",value:this.model.options.date_format,disabled:this.model.options.date_use_time_ago||!this.model.options.date_enabled,title:this.tooltips.options.date_format}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_format=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"checkbox",label:'Use "time ago" format',description:"Example: 20 minutes ago",value:this.model.options.date_use_time_ago,disabled:!this.model.options.date_enabled,title:this.tooltips.options.date_use_time_ago}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_use_time_ago=e}).apply(void 0,[e].concat(n))}}}]))]),e("div",{attrs:{id:"wpra-list-template-source"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Show source name",value:this.model.options.source_enabled,title:this.tooltips.options.source_enabled},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"text",label:"Source prefix",value:this.model.options.source_prefix,disabled:!this.model.options.source_enabled,title:this.tooltips.options.source_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_prefix=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"checkbox",label:"Link source name",value:this.model.options.source_is_link,disabled:!this.model.options.source_enabled,title:this.tooltips.options.source_is_link}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_is_link=e}).apply(void 0,[e].concat(n))}}}]))]),e("div",{attrs:{id:"wpra-list-template-author"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Show author name",value:this.model.options.author_enabled,title:this.tooltips.options.author_enabled},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.author_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"text",label:"Author prefix",value:this.model.options.author_prefix,disabled:!this.model.options.author_enabled,title:this.tooltips.options.author_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.author_prefix=e}).apply(void 0,[e].concat(n))}}}]))]),e("div",{attrs:{id:"wpra-list-template-pagination"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Pagination",value:this.model.options.pagination,title:this.tooltips.options.pagination,disabled:parseInt(this.model.options.limit)<1||!this.model.options.limit},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.pagination=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"select",label:"Pagination style",options:WpraTemplates.options.pagination_type,value:this.model.options.pagination_type,disabled:!this.model.options.pagination||parseInt(this.model.options.limit)<1||!this.model.options.limit,title:this.tooltips.options.pagination_type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.pagination_type=e}).apply(void 0,[e].concat(n))}}}]))]),e("div",{attrs:{id:"wpra-list-template-bullets"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Show bullets",value:this.model.options.bullets_enabled,title:this.tooltips.options.bullets_enabled},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.bullets_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"select",label:"Bullet style",options:WpraTemplates.options.bullet_type,value:this.model.options.bullet_type,disabled:!this.model.options.bullets_enabled,title:this.tooltips.options.bullet_type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.bullet_type=e}).apply(void 0,[e].concat(n))}}}]))])])]),e(H,[e(q,{attrs:{id:"template-create",title:this.model.id?"Update Template":"Create Template",submit:!0,context:this},class:"wpra-postbox-last"},[e("div",{class:"submitbox",attrs:{id:"submitpost"}},[n,e("div",{attrs:{id:"major-publishing-actions"}},[e("div",{attrs:{id:"delete-action"}},[this.isChanged()?e("a",S()([{attrs:{href:"#"},class:"submitdelete"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.cancelChanges()}).apply(void 0,[e].concat(n))}}}]),["Cancel Changes"]):null]),e("div",{attrs:{id:"publishing-action"}},[e(X,{class:"button-primary button-large",attrs:{loading:this.isSaving},nativeOn:{click:this.save}},[this.model.id?"Save":"Publish"])]),e("div",{class:"clear"})])])]),e(q,{attrs:{id:"template-link-preferences",title:"Link Preferences",context:this}},[e("p",{style:{opacity:.65}},["These options apply to all links within this template."]),e(j,S()([{attrs:{type:"checkbox",label:"Set links as nofollow",value:this.model.options.links_nofollow,title:this.tooltips.options.links_nofollow}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.links_nofollow=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"select",label:"Open links behaviour",value:this.model.options.links_behavior,options:WpraTemplates.options.links_behavior,title:this.tooltips.options.links_behavior},class:"form-input--vertical"},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.links_behavior=e}).apply(void 0,[e].concat(n))}}}])),"lightbox"===this.model.options.links_behavior?e("div",{class:"notice notice-info notice-alt"},[e("p",["Some sites may not allow their content to be shown in a lightbox."]),e("p",["Embedded content usually works. Try ticking the below checkbox."]),e("p",[e("a",{attrs:{href:"https://kb.wprssaggregator.com/article/471-q-why-wont-some-of-my-feed-items-work-with-the-lightbox-link-behaviour-for-templates",target:"_blank"}},["Learn more"])])]):null,e(j,S()([{attrs:{type:"checkbox",label:"Set links to open embeds",value:this.model.options.link_to_embed,title:this.tooltips.options.link_to_embed}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.link_to_embed=e}).apply(void 0,[e].concat(n))}}}]))]),e(q,{attrs:{id:"template-custom-css",title:"Custom Style",context:this}},[e(j,S()([{attrs:{type:"text",label:"Custom HTML class name",value:this.model.options.custom_css_classname,title:this.tooltips.options.custom_css_classname},class:"form-input--vertical"},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.custom_css_classname=e}).apply(void 0,[e].concat(n))}}}]))])])])])]);return this.hooks.apply("wpra-templates-form",this,r)}},st=function(t){var e=t.store,i=t.router;return{store:e,data:function(){return{afterNavigate:function(){},params:{},currentRoute:null}},created:function(){i.setApp(this),this.currentRoute=i.parseLocation(window.location),this.navigated()},mounted:function(){var t=this;window.addEventListener("popstate",function(){t.currentRoute=i.parseLocation(window.location),t.navigated()})},methods:{ViewComponent:function(){return i.findRoute(this.currentRoute).component},navigated:function(){var t=this;this.$nextTick(function(){var e=t.$refs.main;e&&e.navigated&&e.navigated({route:i.findRoute(t.currentRoute)})})}},render:function(t){var e=t(this.ViewComponent(),{ref:"main"});return this.afterNavigate(),e}}},lt=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),pt=function(t){t||(t=location.href);var e=t.indexOf("?"),i=t.indexOf("#");if(-1==i&&-1==e)return{};-1==i&&(i=t.length);var n=-1==e||i==e+1?t.substring(i):t.substring(e+1,i),o={};return n.split("&").forEach(function(t){if(t){t=t.split("+").join(" ");var e=t.indexOf("="),i=e>-1?t.substr(0,e):t,n=e>-1?decodeURIComponent(t.substr(e+1)):"",a=i.indexOf("[");if(-1==a)o[decodeURIComponent(i)]=n;else{var r=i.indexOf("]",a),s=decodeURIComponent(i.substring(a+1,r));i=decodeURIComponent(i.substring(0,a)),o[i]||(o[i]=[]),s?o[i][s]=n:o[i].push(n)}}}),o},ut=function(){function t(e,i){c(this,t),this.routes=e,this.options=i,this.baseParams=i.baseParams||["post_type","page","action","id"]}return t.prototype.setApp=function(t){this.app=t,this.app.afterNavigate=this.options.afterNavigating||function(){}},t.prototype.findRoute=function(t){return this.routes.find(function(e){var i=e.route;return-1!==t.indexOf(i)})},t.prototype.updateParams=function(t){this.app.$set(this.app,"params",t)},t.prototype.mergeParams=function(t){var e=this,i=Object.keys(this.params).filter(function(i){return-1!==e.baseParams.indexOf(i)||t.hasOwnProperty(i)}).reduce(function(t,i){return t[i]=e.params[i],t},{}),n=Object.assign({},i,t);this.updateParams(n),window.history.pushState(null,null,this.routeFromParams()),this.app.navigated()},t.prototype.routeFromParams=function(){var t=!!Object.keys(this.params).length;return location.pathname+(t?"?"+this.buildParams(this.params):"")},t.prototype.buildRoute=function(t){if(t.name){var e=this.routes.find(function(e){return e.name===t.name});if(!e)return null;var i=e.route,n=-1!==i.indexOf("?")?"&":"?";return i+(t.params?n+this.buildParams(t.params?t.params:{}):"")}},t.prototype.buildParams=function(t){return Object.keys(t).map(function(e){return e+"="+t[e]}).join("&")},t.prototype.parseLocation=function(t){return this.updateParams(pt(t.search)),pt(t.search),t.pathname+t.search},t.prototype.navigate=function(t){this.app&&(this.app.currentRoute=this.buildRoute(t)),this.updateParams(Object.assign({},t.params||{},pt(this.buildRoute(t)))),window.history.pushState(null,null,this.buildRoute(t)),this.app.navigated()},lt(t,[{key:"params",get:function(){return this.app?this.app.params:{}}}]),t}(),ct=ut,dt={set:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.isInitialized=!0,t.items=e},updatePreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.preset=e}},ht={},ft={isInitialized:!1,items:[],preset:{}},mt={item:function(t){return function(e){return U(t.items).find(e)}}},yt={namespaced:!0,mutations:dt,actions:ht,state:ft,getters:mt},vt=function(){function t(e,i){d(this,t),this.showMethod=e,this.errorMethod=i}return t.prototype.show=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.showMethod(t,e)},t.prototype.error=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errorMethod(t,e)},t}(),bt=vt,gt=i(5),_t={Input:j,NoticeBlock:Y,Postbox:q,RouteLink:C,TransitionExpand:gt.a,Button:X},wt={register:function(t){t.TemplateEdit=function(){return rt},t.TemplateList=function(){return B},t.router=function(t){var e=t.document,i=t.TemplateEdit,n=t.TemplateList;return new ct([{route:WpraGlobal.templates_url_base+"&action",name:"templates-form",component:i},{route:WpraGlobal.templates_url_base,name:"templates",component:n}],{afterNavigating:function(){e.querySelector("html").scrollTop=0}})},t.App=function(t){return st(t)},t.vuex=function(t){return t.vue.use(k.a),k.a},t.notification=function(t){var e=t.vue;return e.use(g.a,{position:"top-center",duration:4e3,iconPack:"callback"}),new bt(e.toasted.show,e.toasted.error)},t.store=function(t){return new t.vuex.Store({modules:{templates:yt},state:{}})},t.http=function(){var t=WpraGlobal&&WpraGlobal.nonce?{headers:{"X-WP-Nonce":WpraGlobal.nonce}}:{};return v.a.create(t)};for(var e=Object.entries(_t),i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if("break"===function(){if(i){if(n>=e.length)return"break";o=e[n++]}else{if(n=e.next(),n.done)return"break";o=n.value}var a=o,r=a[0],s=a[1];t[r]=function(){return s}}())break}return t},run:function(t){t.container.vue.use(w.a,{theme:"light",animation:"fade",arrow:!0,arrowTransform:"scale(0)",placement:"right"})}},kt=i(4);i(42);var xt=h.Container,St=h.Core,At=h.Services;window.UiFramework&&(window.UiFramework=Object.assign({},window.UiFramework,St.UiFramework));var Tt={uiFramework:h,hooks:new At.HookService,document:document,vue:function(t){return kt.a.use(t.uiFramework.Core.InjectedComponents,{container:t}),kt.a}},Ct=new xt.ContainerFactory(m.a),Ot=new St.UiFramework.App(Ct,Tt);window.UiFramework.registerPlugin("templates-app",wt),Ot.use(WpraTemplates.modules||["templates-app"]),Ot.init({"#wpra-templates-app":"App"})},42:function(t,e){},5:function(t,e,i){"use strict";var n={name:"TransitionExpand",functional:!0,render:function(t,e){return t("transition",{props:{name:"expand"},on:{afterEnter:function(t){t.style.height="auto"},enter:function(t){var e=getComputedStyle(t),i=e.width;t.style.width=i,t.style.position="absolute",t.style.visibility="hidden",t.style.height="auto";var n=getComputedStyle(t),o=n.height;t.style.width=null,t.style.position=null,t.style.visibility=null,t.style.height=0,getComputedStyle(t).height,setTimeout(function(){t.style.height=o})},leave:function(t){var e=getComputedStyle(t),i=e.height;t.style.height=i,getComputedStyle(t).height,setTimeout(function(){t.style.height=0})}}},e.children)}},o=n,a=i(1),r=Object(a.a)(o,void 0,void 0,!1,null,null,null);r.options.__file="TransitionExpand.vue",e.a=r.exports},6:function(t,e,i){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!navigator.clipboard)return void o(t,e);navigator.clipboard.writeText(t).then(function(){},function(t){console.error("Async: Could not copy text: ",t)})}e.a=n;var o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e=e||document.body.parentElement;var i=document.createElement("textarea");i.value=t;var n=e.scrollTop;document.body.appendChild(i),i.focus(),i.select();try{document.execCommand("copy")}catch(t){console.error("Fallback: Oops, unable to copy",t)}document.body.removeChild(i),e.scrollTop=n}}},[41])});
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.WPRA=e():t.WPRA=e()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([1],{41:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){return new I(t)}function a(t){return t&&"object"===(void 0===t?"undefined":Z(t))&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function r(t){return Array.isArray(t)?[]:{}}function s(t,e){return e&&!0===e.clone&&a(t)?u(r(t),t,e):t}function l(t,e,i){var n=t.slice();return e.forEach(function(e,o){void 0===n[o]?n[o]=s(e,i):a(e)?n[o]=u(t[o],e,i):-1===t.indexOf(e)&&n.push(s(e,i))}),n}function p(t,e,i){var n={};return a(t)&&Object.keys(t).forEach(function(e){n[e]=s(t[e],i)}),Object.keys(e).forEach(function(o){a(e[o])&&t[o]?n[o]=u(t[o],e[o],i):n[o]=s(e[o],i)}),n}function u(t,e,i){var n=Array.isArray(e),o=i||{arrayMerge:l},a=o.arrayMerge||l;return n?Array.isArray(t)?a(t,e,i):s(e,i):p(t,e,i)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var h=i(43),f=i(44),m=i.n(f),y=i(9),v=i.n(y),b=i(46),g=i.n(b),_=i(47),w=i.n(_),k=i(48),x=i(2),S=i.n(x),A=i(49),T=i.n(A),C={props:{path:{},gate:{}},inject:["router"],methods:{getPath:function(){return this.router.buildRoute(this.path)},navigate:function(t){var e=!this.gate||this.gate();t.preventDefault(),e&&this.router.navigate(this.path)}},render:function(){var t=this,e=arguments[0],i=this.getPath();return e("a",S()([{attrs:{href:i}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.navigate.apply(t,[e].concat(n))}}}]),[this.$slots.default])}},O=null,P={props:{mediaType:{type:String,default:"image"},mediaTitle:{type:String,default:"Select Media"},mediaValueProperty:{type:String,default:"id"}},methods:{mediaNode:function(){var t=this,e=this.$createElement;return this.assertMediaLoaded(),e("div",[e("input",{attrs:{type:"text"},domProps:{value:this.value}}),e("button",S()([{class:"button"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.openFrame.apply(t,[e].concat(n))}}}]),["Choose image"])])},openFrame:function(){O||(O=this.createFrame()),O.open()},createFrame:function(){var t=this;return O=wp.media({title:this.mediaTitle,multiple:!1,library:{type:this.mediaType}}),O.on("close",function(){var e=O.state().get("selection"),i=null;e.each(function(t){i=t}),i&&i.id&&t.$emit("input",{id:i.id,url:i.attributes.url}[t.mediaValueProperty])}),O.on("open",function(){var e=O.state().get("selection");if("id"===t.mediaValueProperty&&t.value){var i=wp.media.attachment(t.value);i.fetch(),e.add(i?[i]:[])}}),O},assertMediaLoaded:function(){if(!window.wp.media)throw Error("[MediaInput] wp.media dependency is not loaded")}}},j={mixins:[P],props:{id:{type:String,default:function(){return Math.random().toString(36).substr(0,12)}},label:{},description:{},after:{},type:{},value:{},placeholder:{},title:{},inputDisabled:{},options:{default:function(){return{}}}},methods:{inputNode:function(){var t=this,e=this.$createElement;return"media"===this.type?this.mediaNode():"checkbox"===this.type?e("input",S()([{attrs:{type:"checkbox",id:this.id,placeholder:this.placeholder,disabled:this.$attrs.disabled||this.inputDisabled},domProps:{checked:!!this.value}},{attrs:this.$attrs},{on:{change:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(){return t.$emit("input",!t.value)}).apply(void 0,[e].concat(n))}}}])):"select"!==this.type?e("input",S()([{attrs:{type:this.type,id:this.id,placeholder:this.placeholder,disabled:this.$attrs.disabled||this.inputDisabled},domProps:{value:this.value}},{attrs:this.$attrs},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.$emit("input",e.target.value)}).apply(void 0,[e].concat(n))}}}])):this.selectNode()},selectNode:function(){var t=this,e=this.$createElement,i=Object.keys(this.options).map(function(i){return e("option",{domProps:{value:i,selected:t.value===i}},[t.options[i]])});return e("select",S()([{attrs:this.$attrs},{attrs:{id:this.id,disabled:this.$attrs.disabled||this.inputDisabled}},{on:{change:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.$emit("input",e.target.value)}).apply(void 0,[e].concat(n))}}}]),[i])}},render:function(){var t=arguments[0],e=[];return this.title&&e.push({name:"tippy"}),t("div",{class:{"form-input":!0,"form-input--disabled":this.$attrs.disabled||!1}},[this.label?t("label",{class:"form-input__label",attrs:{for:this.id}},[t("div",[this.label,this.title?t("div",S()([{class:"form-input__tip"},{directives:e},{attrs:{title:this.title}}]),[t("span",{class:"dashicons dashicons-editor-help"})]):null]),this.description?t("div",S()([{class:"form-input__label-description"},{domProps:{innerHTML:this.description}}])):""]):null,t("div",{class:"form-input__field"},[this.inputNode(),this.after])])}},L=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"wpra-bottom-panel"},[t._t("default")],2)},W=[],M={},$=M,N=i(1),R=Object(N.a)($,L,W,!1,null,null,null);R.options.__file="BottomPanel.vue";var E=R.exports,D=function(t){return JSON.parse(JSON.stringify(t))},F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id";return n(this,t),this.data=e,this.primaryField=i,this}return t.prototype.find=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("object"!==(void 0===t?"undefined":F(t))&&null!==t){var i;i={},i[this.primaryField]=t,t=i}for(var n in this.data)if(this._isMatching(this.data[n],t))return this.data[n];return e},t.prototype.pluck=function(t){return this.data.map(function(e){return e[t]})},t.prototype.remove=function(t){for(var e in this.data)this._isMatching(this.data[e],t)&&this.data.splice(e,1);return this},t.prototype.appendDiff=function(t){for(var e=t,i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}var a=o;this.contains(a)||this.data.push(a)}},t.prototype.prependDiff=function(t){for(var e=t.slice().reverse(),i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}var a=o;this.contains(a)||this.data.unshift(a)}},t.prototype.contains=function(t){for(var e=this.data,i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}if(o.id==t.id)return!0}return!1},t.prototype.filterValues=function(t){var e=this;return Object.keys(this.data).filter(function(i){return t(e.data[i],i)}).reduce(function(t,i){return t[i]=e.data[i],t},{})},t.prototype.filter=function(t){var e=this;return this.data.filter(function(i){return e._isMatching(i,t)})},t.prototype.whereIn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",i=[],n={};n[e]=null;for(var o=t,a=Array.isArray(o),r=0,o=a?o:o[Symbol.iterator]();;){var s;if(a){if(r>=o.length)break;s=o[r++]}else{if(r=o.next(),r.done)break;s=r.value}var l=s;n[e]=l;var p=this.find(n);p&&i.push(p)}return i},t.prototype.key=function(e){return new t(this.data.slice().reduce(function(t,i){return t[i[e]]=i,t},{}))},t.prototype.mapValues=function(t){var e=this;return Object.keys(this.data).map(function(i){e.data[i]=t(e.data[i],i)}),this},t.prototype.values=function(){return this.data},t.prototype._isMatching=function(t,e){if(!(t instanceof Object||e instanceof Object))return t==e;for(var i=!0,n=Object.keys(e),o=Array.isArray(n),a=0,n=o?n:n[Symbol.iterator]();;){var r;if(o){if(a>=n.length)break;r=n[a++]}else{if(a=n.next(),a.done)break;r=a.value}var s=r,l=t.hasOwnProperty(s)&&t[s]==e[s];i=i&&l}return i},t}(),U=o,B={data:function(){return{loading:!1,columns:{name:{label:"Template Name",class:"column-primary"},style:{label:"Template Type"},previewTemplate:{label:"Preview"}},filters:WpraTemplates.options.type,checked:[],filter:{paged:parseInt(this.router.params.paged||1),type:this.router.params.type||"",s:this.router.params.s||""},baseUrl:WpraTemplates.base_url,total:0}},inject:["hooks","http","router"],computed:{totalPages:function(){return Math.ceil(this.total/20)},list:{get:function(){return this.$store.state.templates.items},set:function(t){this.$store.commit("templates/set",t)}}},methods:{navigated:function(){var t=this;Object.keys(this.filter).forEach(function(e){t.filter[e]=t.router.params[e]||""}),this.filter.paged=parseInt(this.filter.paged||1),this.fetchList()},fetchList:function(){var t=this;this.loading=!0;var e=this.getParams(),i=parseInt(e.paged);return delete e.paged,i&&1!==i&&(e.page=i),this.http.get(this.baseUrl,{params:e}).then(function(e){t.list=e.data.items,t.total=e.data.count}).finally(function(){t.loading=!1})},deleteTemplate:function(t){var e=this;if(confirm("Are you sure you want to delete this template? If this template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead."))return this.loading=!0,this.http.delete(this.baseUrl+"/"+t).then(function(){return e.fetchList()}).then(function(){e.loading=!1})},bulkDelete:function(){var t=this;if(confirm("Are you sure you want to delete these templates? If a template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead."))return this.loading=!0,this.http.delete(this.baseUrl,{params:{ids:this.checked}}).then(function(){return t.checked=[],t.$refs.table.checkedItems=[],t.fetchList()}).then(function(){t.loading=!1})},duplicateTemplate:function(t){var e=D(t);delete e.id,"__built_in"===e.type&&delete e.type,e.name=e.name+" (Copy)",this.$store.commit("templates/updatePreset",e),this.router.navigate({name:"templates",params:{action:"new"}})},getPreviewLink:function(t){return WpraGlobal.admin_base_url+"?wpra_preview_template="+t.id},createTemplate:function(){this.$store.commit("templates/updatePreset",{}),this.router.navigate({name:"templates",params:{action:"new"}})},setChecked:function(t){var e=this;this.checked=t.filter(function(t){return"__built_in"!==U(e.list).find(t,{}).type})},getParams:function(){var t=this;return Object.keys(this.filter).filter(function(e){return!!t.filter[e]&&"all"!==t.filter[e]}).reduce(function(e,i){return e[i]=t.filter[i],e},{})},setFilter:function(t,e){this.filter[t]=e},submitFilter:function(){this.router.mergeParams(this.getParams())},getRowClass:function(t){return"__built_in"===t.type?"built-in":""}},render:function(){var t=this,e=arguments[0],i=function(t){return{name:"templates",params:{action:"edit",id:t}}},n=this.hooks.apply("wpra-templates-list-cells",this,{name:function(n){var o=n.row;return[e("div",[e("strong",[e(C,{attrs:{path:i(o.id)}},[o.name])]),e("small",{style:{paddingLeft:"4px",opacity:"0.6"}},[o.slug]),"__built_in"===o.type?e("span",{style:{opacity:"0.6",display:"block"}},['This is the default feed template. To create your own, either duplicate it or click "Add New" above.']):null]),e("div",{class:"row-actions"},[e("span",{attrs:{className:"edit"}},[e(C,{attrs:{path:i(o.id)}},["Edit"])," |"]),e("span",{class:"inline",style:{paddingLeft:"4px"}},[e("a",S()([{attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];(function(e){e.preventDefault(),t.duplicateTemplate(o)}).apply(void 0,[e].concat(n))}}}]),["Duplicate"])," ","__built_in"!==o.type?"|":""]),"__built_in"!==o.type?e("span",S()([{class:"trash",style:{paddingLeft:"4px"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];(function(e){e.preventDefault(),t.deleteTemplate(o.id)}).apply(void 0,[e].concat(n))}}}]),[e("a",{attrs:{href:"#","aria-label":"Delete Item"},class:"submitdelete"},["Delete"])]):null])]},style:function(i){var n=i.row;return t.filters[n.type]?[e("div",[t.filters[n.type]])]:[e("div",[t.filters.list," ",e("span",{style:{opacity:.7,fontSize:"90%"}},["(Missing type: ",e("code",[n.type]),")"])])]},previewTemplate:function(i){var n=i.row;return[e("div",[e("a",{attrs:{href:t.getPreviewLink(n),target:"wpra-preview-template"},class:"wpra-preview-link"},["Open preview ",e("span",{class:"dashicons dashicons-external"})])])]},filters:function(){var i=Object.keys(WpraTemplates.options.type).filter(function(t){return"_"!==t[0]}).reduce(function(t,e){return t[e]=WpraTemplates.options.type[e],t},{all:"Select Template Type"});return[e(j,S()([{attrs:{type:"select",options:i,value:t.filter.type},style:{margin:0}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){t.filter.type=e,t.submitFilter()}).apply(void 0,[e].concat(n))}}}]))]}}),o=e("div",[e("h1",{class:"wp-heading-inline"},["Templates"]),e("a",S()([{class:"page-title-action",attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.createTemplate()}).apply(void 0,[e].concat(n))}}}]),["Add New"]),e("p",{class:"search-box",style:{padding:"10px 0"}},[e("label",{class:"screen-reader-text",attrs:{for:"post-search-input"}},["Search Templates:"]),e("input",S()([{attrs:{type:"search",id:"post-search-input",name:"s"},domProps:{value:this.filter.s}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.filter.s=e.target.value}).apply(void 0,[e].concat(n))},keyup:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];if(!("button"in e)&&t._k(e.keyCode,"enter",13))return null;t.submitFilter.apply(t,[e].concat(n))}}}])),e("input",S()([{attrs:{type:"submit",id:"search-submit",value:"Search Templates"},class:"button"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.submitFilter.apply(t,[e].concat(n))}}}]))]),e(T.a,S()([{attrs:{columns:this.columns,rows:this.list,loading:this.loading,totalItems:this.total,perPage:20,totalPages:this.totalPages,currentPage:this.filter.paged,notFound:"No templates found.",rowClass:this.getRowClass},ref:"table",class:{"wpra-no-cb":0===this.list.length||1===this.list.length&&"__built_in"===this.list[0].type},scopedSlots:n},{on:{checked:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.setChecked.apply(t,[e].concat(n))},pagination:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){t.filter.paged=e,t.submitFilter()}).apply(void 0,[e].concat(n))}}}])),this.checked.length?e(E,[e("div",{class:"flex-row"},[e("div",{class:"flex-col"},[e("div",{class:"wpra-bottom-panel__title"},["Bulk Actions"]),e("a",S()([{attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.bulkDelete()}).apply(void 0,[e].concat(n))}}}]),["Delete"])])])]):null]);return this.hooks.apply("wpra-templates-list",this,o)}},V={inject:["hooks"],data:function(){return{expanded:!0}},props:{title:{},id:{},submit:{type:Boolean,default:!1},context:{}},methods:{toggle:function(){this.expanded=!this.expanded}},render:function(t){var e=this;return this.hooks.apply("postbox-"+this.id,this.context||this,t("div",{class:"postbox wpra-postbox",attrs:{id:this.submit?"submitdiv":""}},[t("button",S()([{attrs:{type:"button","aria-expanded":"true"},class:"handlediv"},{on:{click:function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];e.toggle.apply(e,[t].concat(n))}}}]),[t("span",{class:"screen-reader-text"},["Toggle panel: ",this.title]),t("span",{class:"toggle-indicator",attrs:{"aria-hidden":"true"}})]),t("h2",S()([{class:"hndle ui-sortable-handle"},{on:{click:function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];e.toggle.apply(e,[t].concat(n))}}}]),[t("span",[this.title])]),t("div",{class:"inside"},[this.hooks.apply("postbox-content-"+this.id,this.context||this,[this.$slots.default],{h:t})])]),{h:t})}},G=V,J=Object(N.a)(G,void 0,void 0,!1,null,null,null);J.options.__file="Postbox.vue";var q=J.exports,z={render:function(){return(0,arguments[0])("div",{attrs:{id:"postbox-container-2"},class:"postbox-container"},[this.$slots.default])}},H={render:function(){return(0,arguments[0])("div",{attrs:{id:"postbox-container-1"},class:"wpra-postbox-container postbox-container"},[this.$slots.default])}},K={render:function(){return(0,arguments[0])("div",{attrs:{id:"post-body"}},[this.$slots.default])}},X={props:{loading:{type:Boolean,default:!1}},render:function(){return(0,arguments[0])("button",{attrs:{disabled:this.loading},class:{button:!0,"loading-button":this.loading}},[this.$slots.default])}},Y={data:function(){return{shouldBeVisible:!0}},props:{id:{type:String,required:!0},title:{type:String},body:{type:String},learnMore:{default:!1},okayText:{type:String,default:"Got it"},learnMoreText:{type:String,default:"Learn more"},visible:{type:Boolean,default:!0}},computed:{isVisible:function(){return this.visible&&this.shouldBeVisible&&JSON.parse(localStorage.getItem(this.getBlockKey())||"true")}},methods:{onOkayClick:function(){this.shouldBeVisible=!1,localStorage.setItem(this.getBlockKey(),JSON.stringify(!1))},onLearnMoreClick:function(){window.open(this.learnMore,"_blank").focus()},getBlockKey:function(){return"wpra-"+this.id+"-visible"}},render:function(){var t=arguments[0];if(!this.isVisible)return null;var e=this.learnMore?t(X,{class:"button-clear",nativeOn:{click:this.onLearnMoreClick}},[this.learnMoreText," ",t("span",{class:"dashicons dashicons-external"})]):null;return t("div",{class:"wpra-notice-block"},[t("div",{class:"wpra-notice-block__title"},[this.title]),t("div",S()([{class:"wpra-notice-block__body"},{domProps:{innerHTML:this.body}}])),t("div",{class:"wpra-notice-block__buttons"},[t(X,{class:"brand button-primary",nativeOn:{click:this.onOkayClick}},[this.okayText]),e])])}},Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};u.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,i){return u(t,i,e)})};var Q=u,tt=i(50),et=i.n(tt),it={data:function(){return{changes:{model:{}}}},methods:{isChanged:function(){return!et()(this.model,this.changes.model)},rememberModel:function(){this.$set(this.changes,"model",D(this.model))},cancelChanges:function(){confirm("Are you sure you want to cancel your changes for this template? This action cannot be reverted and all changes made since your last save will be lost.")&&this.$set(this,"model",D(this.changes.model))}}},nt={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(t){var e,i,n,o,a,r,s,l="",p=0;for(t=nt._utf8_encode(t);p<t.length;)e=t.charCodeAt(p++),i=t.charCodeAt(p++),n=t.charCodeAt(p++),o=e>>2,a=(3&e)<<4|i>>4,r=(15&i)<<2|n>>6,s=63&n,isNaN(i)?r=s=64:isNaN(n)&&(s=64),l=l+this._keyStr.charAt(o)+this._keyStr.charAt(a)+this._keyStr.charAt(r)+this._keyStr.charAt(s);return l},decode:function(t){var e,i,n,o,a,r,s,l="",p=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");p<t.length;)o=this._keyStr.indexOf(t.charAt(p++)),a=this._keyStr.indexOf(t.charAt(p++)),r=this._keyStr.indexOf(t.charAt(p++)),s=this._keyStr.indexOf(t.charAt(p++)),e=o<<2|a>>4,i=(15&a)<<4|r>>2,n=(3&r)<<6|s,l+=String.fromCharCode(e),64!=r&&(l+=String.fromCharCode(i)),64!=s&&(l+=String.fromCharCode(n));return l=nt._utf8_decode(l)},_utf8_encode:function(t){t=t.replace(/\r\n/g,"\n");for(var e="",i=0;i<t.length;i++){var n=t.charCodeAt(i);n<128?e+=String.fromCharCode(n):n>127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e},_utf8_decode:function(t){for(var e="",i=0,n=0,o=0;i<t.length;)n=t.charCodeAt(i),n<128?(e+=String.fromCharCode(n),i++):n>191&&n<224?(o=t.charCodeAt(i+1),e+=String.fromCharCode((31&n)<<6|63&o),i+=2):(o=t.charCodeAt(i+1),c3=t.charCodeAt(i+2),e+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&c3),i+=3);return e}},ot=nt,at=i(6),rt={mixins:[it],data:function(){return{typeOptions:Object.keys(WpraTemplates.options.type).filter(function(t){return"_"!==t[0]}).reduce(function(t,e){return t[e]=WpraTemplates.options.type[e],t},{}),model:D(WpraTemplates.model_schema),validation:D(WpraTemplates.model_schema),tooltips:D(WpraTemplates.model_tooltips),baseUrl:WpraTemplates.base_url,isSaving:!1,isLoading:!1}},inject:["hooks","http","router","notification"],mounted:function(){this.resolveEditingItem()},computed:{previewUrl:function(){var t=ot.encode(JSON.stringify(this.model.options));return WpraGlobal.admin_base_url+"?wpra_preview_template="+this.router.params.id+"&wpra_template_options="+t}},methods:{resolveEditingItem:function(){var t=this,e=Q(D(WpraTemplates.model_schema),this.$store.state.templates.preset);this.isLoading=!0,function(){var e=t.router.params.id;if(!e)return Promise.resolve(null);var i=t.$store.getters["templates/item"](e);return i?Promise.resolve(i):t.http.get(t.baseUrl+"/"+e).then(function(t){return t.data})}().then(function(i){if(t.isLoading=!1,!i)return t.$set(t,"model",e),void t.rememberModel();i=Object.assign({},i),t.model=Q(t.model,i),t.rememberModel()})},save:function(){var t=this,e=!this.model.id;this.isSaving=!0,this.runRequest().then(function(i){t.model=Q(t.model,i.data),t.rememberModel(),t.notification.show("Template saved!",{type:"success",icon:function(t){return t.classList.add("dashicons","dashicons-yes"),t}}),e&&t.router.navigate({name:"templates",params:{action:"edit",id:i.data.id}})},function(e){t.notification.show("Something went wrong. Template is not saved!",{type:"error",icon:function(t){return t.classList.add("dashicons","dashicons-warning"),t}})}).finally(function(){t.isSaving=!1})},runRequest:function(){var t=this.model.id?"put":"post",e=this.model.id?this.baseUrl+"/"+this.model.id:this.baseUrl;return this.http[t](e,this.prepareModel())},prepareModel:function(){var t=this,e=Object.keys(WpraTemplates.model_schema);return Object.keys(this.model).filter(function(i){return!(!e.includes(i)||"__built_in"===t.model.type&&["name","type"].includes(i)||["slug","id"].includes(i))}).reduce(function(e,i){return e[i]=t.model[i],e},{})},getShortcode:function(){return'[wp-rss-aggregator template="'+this.model.slug+'"]'},preventLoosingNotSavedData:function(){return!this.isChanged()||confirm("You have unsaved changes. All changes will be lost if you go back to the Template list before updating. Are you sure you want to continue?")},copyShortcode:function(t){Object(at.a)(this.getShortcode());var e=t.target.innerText;t.target.style.width=t.target.getBoundingClientRect().width+"px",t.target.disabled=!0,t.target.innerText="Copied!",setTimeout(function(){t.target.style.width=null,t.target.innerText=e,t.target.disabled=!1},5e3)}},render:function(){var t=this,e=arguments[0],i={name:"templates"},n=null,o=null,a=e(Y,{class:"postbox",attrs:{id:"templates-usage",title:"Setting up your Templates",body:'Templates are used to display the items imported using WP RSS Aggregator. Choose the preferred options below and use them anywhere on your site via our <a href="https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode#tinymce" target="_blank">shortcode</a> or our <a href="https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg" target="_blank">block</a>.',learnMore:"https://kb.wprssaggregator.com/article/457-templates"}});this.router.params.id&&(n=e("div",{attrs:{id:""},style:{padding:"6px 0"}},[e("div",{class:"misc-pub-section misc-pub-visibility"},[e("a",{attrs:{href:this.previewUrl,role:"button",target:"wpra-preview-template"},class:"wpra-preview-link",style:{marginLeft:"4px",textDecoration:"none"}},["Open preview",e("span",{class:"dashicons dashicons-external"})])])])),this.model.id&&(o=e("div",{class:"wpra-shortcode-copy",attrs:{title:"Copy chortcode"}},[e("div",{class:"wpra-shortcode-copy__content"},[e("strong",["Shortcode: "]),e("code",[this.getShortcode()])]),e("div",{class:"wpra-shortcode-copy__icon"},[e("button",S()([{class:"button"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.copyShortcode.apply(t,[e].concat(n))}}}]),["Copy Shortcode"])])]));var r=e("div",[e("div",{class:"page-title"},[e(C,{class:"back-button",attrs:{path:i,gate:this.preventLoosingNotSavedData}},[e("span",{class:"dashicons dashicons-arrow-left-alt"}),"Templates"]),e("h1",[this.router.params.id?this.changes.model.name||this.changes.model.slug:"Create a New Template"]),o]),e("div",{attrs:{id:"poststuff"}},[this.isLoading?e("div",{class:"loading-container"}):e(K,{class:"metabox-holder columns-2"},[e(z,[a,e(q,{attrs:{id:"template-details",title:"Template Details",context:this}},[e(j,S()([{attrs:{type:"text",label:"Template name",value:this.model.name,disabled:"__built_in"===this.model.type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.name=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"select",label:"Template type",value:this.model.type,options:this.typeOptions,disabled:"__built_in"===this.model.type,inputDisabled:!WpraTemplates.options.is_type_enabled,description:WpraTemplates.options.is_type_enabled?null:'<div class="disable-ignored"><strong class="disable-ignored">Get more template types, including a customisable grid template.</strong> <a target="_blank" href="https://www.wprssaggregator.com/extensions/templates/" class="disable-ignored">Learn more.</a></div>'}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.type=e}).apply(void 0,[e].concat(n))}}}])),"__built_in"===this.model.type?e("div",{class:"wpra-info-box"},[e("div",{class:"wpra-info-box__icon"},[e("span",{class:"dashicons dashicons-info"})]),e("div",{class:"wpra-info-box__text"},["This is the default template for WP RSS Aggregator. It is used as the fallback template when one is not selected via the shortcode or block. To create a new one, please go back to the Templates List."])]):null]),e(q,{attrs:{id:"template-options",title:"Template Options",context:this}},[e(j,S()([{attrs:{type:"checkbox",label:"Link title to original article",value:this.model.options.title_is_link,title:this.tooltips.options.title_is_link}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.title_is_link=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"number",label:"Title maximum length",value:this.model.options.title_max_length||"",placeholder:"No limit",title:this.tooltips.options.title_max_length}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.title_max_length=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"number",label:"Number of items to show",value:this.model.options.limit||"",title:this.tooltips.options.limit,placeholder:"Show all items",min:"0"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.limit=""===e?0:e}).apply(void 0,[e].concat(n))}}}])),e("div",{attrs:{id:"wpra-list-template-publish-date"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Show publish date",value:this.model.options.date_enabled,title:this.tooltips.options.date_enabled},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"text",label:"Date prefix",value:this.model.options.date_prefix,disabled:!this.model.options.date_enabled,title:this.tooltips.options.date_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_prefix=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"text",label:"Date format",value:this.model.options.date_format,disabled:this.model.options.date_use_time_ago||!this.model.options.date_enabled,title:this.tooltips.options.date_format}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_format=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"checkbox",label:'Use "time ago" format',description:"Example: 20 minutes ago",value:this.model.options.date_use_time_ago,disabled:!this.model.options.date_enabled,title:this.tooltips.options.date_use_time_ago}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_use_time_ago=e}).apply(void 0,[e].concat(n))}}}]))]),e("div",{attrs:{id:"wpra-list-template-source"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Show source name",value:this.model.options.source_enabled,title:this.tooltips.options.source_enabled},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"text",label:"Source prefix",value:this.model.options.source_prefix,disabled:!this.model.options.source_enabled,title:this.tooltips.options.source_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_prefix=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"checkbox",label:"Link source name",value:this.model.options.source_is_link,disabled:!this.model.options.source_enabled,title:this.tooltips.options.source_is_link}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_is_link=e}).apply(void 0,[e].concat(n))}}}]))]),e("div",{attrs:{id:"wpra-list-template-author"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Show author name",value:this.model.options.author_enabled,title:this.tooltips.options.author_enabled},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.author_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"text",label:"Author prefix",value:this.model.options.author_prefix,disabled:!this.model.options.author_enabled,title:this.tooltips.options.author_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.author_prefix=e}).apply(void 0,[e].concat(n))}}}]))]),e("div",{attrs:{id:"wpra-list-template-pagination"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Pagination",value:this.model.options.pagination,title:this.tooltips.options.pagination,disabled:parseInt(this.model.options.limit)<1||!this.model.options.limit},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.pagination=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"select",label:"Pagination style",options:WpraTemplates.options.pagination_type,value:this.model.options.pagination_type,disabled:!this.model.options.pagination||parseInt(this.model.options.limit)<1||!this.model.options.limit,title:this.tooltips.options.pagination_type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.pagination_type=e}).apply(void 0,[e].concat(n))}}}]))]),e("div",{attrs:{id:"wpra-list-template-bullets"},style:{paddingTop:"10px"}},[e(j,S()([{attrs:{type:"checkbox",label:"Show bullets",value:this.model.options.bullets_enabled,title:this.tooltips.options.bullets_enabled},style:{fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.bullets_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"select",label:"Bullet style",options:WpraTemplates.options.bullet_type,value:this.model.options.bullet_type,disabled:!this.model.options.bullets_enabled,title:this.tooltips.options.bullet_type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.bullet_type=e}).apply(void 0,[e].concat(n))}}}]))])])]),e(H,[e(q,{attrs:{id:"template-create",title:this.model.id?"Update Template":"Create Template",submit:!0,context:this},class:"wpra-postbox-last"},[e("div",{class:"submitbox",attrs:{id:"submitpost"}},[n,e("div",{attrs:{id:"major-publishing-actions"}},[e("div",{attrs:{id:"delete-action"}},[this.isChanged()?e("a",S()([{attrs:{href:"#"},class:"submitdelete"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.cancelChanges()}).apply(void 0,[e].concat(n))}}}]),["Cancel Changes"]):null]),e("div",{attrs:{id:"publishing-action"}},[e(X,{class:"button-primary button-large",attrs:{loading:this.isSaving},nativeOn:{click:this.save}},[this.model.id?"Save":"Publish"])]),e("div",{class:"clear"})])])]),e(q,{attrs:{id:"template-link-preferences",title:"Link Preferences",context:this}},[e("p",{style:{opacity:.65}},["These options apply to all links within this template."]),e(j,S()([{attrs:{type:"checkbox",label:"Set links as nofollow",value:this.model.options.links_nofollow,title:this.tooltips.options.links_nofollow}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.links_nofollow=e}).apply(void 0,[e].concat(n))}}}])),e(j,S()([{attrs:{type:"select",label:"Open links behaviour",value:this.model.options.links_behavior,options:WpraTemplates.options.links_behavior,title:this.tooltips.options.links_behavior},class:"form-input--vertical"},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.links_behavior=e}).apply(void 0,[e].concat(n))}}}])),"lightbox"===this.model.options.links_behavior?e("div",{class:"notice notice-info notice-alt"},[e("p",["Some sites may not allow their content to be shown in a lightbox."]),e("p",["Embedded content usually works. Try ticking the below checkbox."]),e("p",[e("a",{attrs:{href:"https://kb.wprssaggregator.com/article/471-q-why-wont-some-of-my-feed-items-work-with-the-lightbox-link-behaviour-for-templates",target:"_blank"}},["Learn more"])])]):null,e(j,S()([{attrs:{type:"checkbox",label:"Set links to open embeds",value:this.model.options.link_to_embed,title:this.tooltips.options.link_to_embed}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.link_to_embed=e}).apply(void 0,[e].concat(n))}}}]))]),e(q,{attrs:{id:"template-custom-css",title:"Custom Style",context:this}},[e(j,S()([{attrs:{type:"text",label:"Custom HTML class name",value:this.model.options.custom_css_classname,title:this.tooltips.options.custom_css_classname},class:"form-input--vertical"},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.custom_css_classname=e}).apply(void 0,[e].concat(n))}}}]))])])])])]);return this.hooks.apply("wpra-templates-form",this,r)}},st=function(t){var e=t.store,i=t.router;return{store:e,data:function(){return{afterNavigate:function(){},params:{},currentRoute:null}},created:function(){i.setApp(this),this.currentRoute=i.parseLocation(window.location),this.navigated()},mounted:function(){var t=this;window.addEventListener("popstate",function(){t.currentRoute=i.parseLocation(window.location),t.navigated()})},methods:{ViewComponent:function(){return i.findRoute(this.currentRoute).component},navigated:function(){var t=this;this.$nextTick(function(){var e=t.$refs.main;e&&e.navigated&&e.navigated({route:i.findRoute(t.currentRoute)})})}},render:function(t){var e=t(this.ViewComponent(),{ref:"main"});return this.afterNavigate(),e}}},lt=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),pt=function(t){t||(t=location.href);var e=t.indexOf("?"),i=t.indexOf("#");if(-1==i&&-1==e)return{};-1==i&&(i=t.length);var n=-1==e||i==e+1?t.substring(i):t.substring(e+1,i),o={};return n.split("&").forEach(function(t){if(t){t=t.split("+").join(" ");var e=t.indexOf("="),i=e>-1?t.substr(0,e):t,n=e>-1?decodeURIComponent(t.substr(e+1)):"",a=i.indexOf("[");if(-1==a)o[decodeURIComponent(i)]=n;else{var r=i.indexOf("]",a),s=decodeURIComponent(i.substring(a+1,r));i=decodeURIComponent(i.substring(0,a)),o[i]||(o[i]=[]),s?o[i][s]=n:o[i].push(n)}}}),o},ut=function(){function t(e,i){c(this,t),this.routes=e,this.options=i,this.baseParams=i.baseParams||["post_type","page","action","id"]}return t.prototype.setApp=function(t){this.app=t,this.app.afterNavigate=this.options.afterNavigating||function(){}},t.prototype.findRoute=function(t){return this.routes.find(function(e){var i=e.route;return-1!==t.indexOf(i)})},t.prototype.updateParams=function(t){this.app.$set(this.app,"params",t)},t.prototype.mergeParams=function(t){var e=this,i=Object.keys(this.params).filter(function(i){return-1!==e.baseParams.indexOf(i)||t.hasOwnProperty(i)}).reduce(function(t,i){return t[i]=e.params[i],t},{}),n=Object.assign({},i,t);this.updateParams(n),window.history.pushState(null,null,this.routeFromParams()),this.app.navigated()},t.prototype.routeFromParams=function(){var t=!!Object.keys(this.params).length;return location.pathname+(t?"?"+this.buildParams(this.params):"")},t.prototype.buildRoute=function(t){if(t.name){var e=this.routes.find(function(e){return e.name===t.name});if(!e)return null;var i=e.route,n=-1!==i.indexOf("?")?"&":"?";return i+(t.params?n+this.buildParams(t.params?t.params:{}):"")}},t.prototype.buildParams=function(t){return Object.keys(t).map(function(e){return e+"="+t[e]}).join("&")},t.prototype.parseLocation=function(t){return this.updateParams(pt(t.search)),pt(t.search),t.pathname+t.search},t.prototype.navigate=function(t){this.app&&(this.app.currentRoute=this.buildRoute(t)),this.updateParams(Object.assign({},t.params||{},pt(this.buildRoute(t)))),window.history.pushState(null,null,this.buildRoute(t)),this.app.navigated()},lt(t,[{key:"params",get:function(){return this.app?this.app.params:{}}}]),t}(),ct=ut,dt={set:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.isInitialized=!0,t.items=e},updatePreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.preset=e}},ht={},ft={isInitialized:!1,items:[],preset:{}},mt={item:function(t){return function(e){return U(t.items).find(e)}}},yt={namespaced:!0,mutations:dt,actions:ht,state:ft,getters:mt},vt=function(){function t(e,i){d(this,t),this.showMethod=e,this.errorMethod=i}return t.prototype.show=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.showMethod(t,e)},t.prototype.error=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errorMethod(t,e)},t}(),bt=vt,gt=i(5),_t={Input:j,NoticeBlock:Y,Postbox:q,RouteLink:C,TransitionExpand:gt.a,Button:X},wt={register:function(t){t.TemplateEdit=function(){return rt},t.TemplateList=function(){return B},t.router=function(t){var e=t.document,i=t.TemplateEdit,n=t.TemplateList;return new ct([{route:WpraGlobal.templates_url_base+"&action",name:"templates-form",component:i},{route:WpraGlobal.templates_url_base,name:"templates",component:n}],{afterNavigating:function(){e.querySelector("html").scrollTop=0}})},t.App=function(t){return st(t)},t.vuex=function(t){return t.vue.use(k.a),k.a},t.notification=function(t){var e=t.vue;return e.use(g.a,{position:"top-center",duration:4e3,iconPack:"callback"}),new bt(e.toasted.show,e.toasted.error)},t.store=function(t){return new t.vuex.Store({modules:{templates:yt},state:{}})},t.http=function(){var t=WpraGlobal&&WpraGlobal.nonce?{headers:{"X-WP-Nonce":WpraGlobal.nonce}}:{};return v.a.create(t)};for(var e=Object.entries(_t),i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if("break"===function(){if(i){if(n>=e.length)return"break";o=e[n++]}else{if(n=e.next(),n.done)return"break";o=n.value}var a=o,r=a[0],s=a[1];t[r]=function(){return s}}())break}return t},run:function(t){t.container.vue.use(w.a,{theme:"light",animation:"fade",arrow:!0,arrowTransform:"scale(0)",placement:"right"})}},kt=i(4);i(42);var xt=h.Container,St=h.Core,At=h.Services;window.UiFramework&&(window.UiFramework=Object.assign({},window.UiFramework,St.UiFramework));var Tt={uiFramework:h,hooks:new At.HookService,document:document,vue:function(t){return kt.a.use(t.uiFramework.Core.InjectedComponents,{container:t}),kt.a}},Ct=new xt.ContainerFactory(m.a),Ot=new St.UiFramework.App(Ct,Tt);window.UiFramework.registerPlugin("templates-app",wt),Ot.use(WpraTemplates.modules||["templates-app"]),Ot.init({"#wpra-templates-app":"App"})},42:function(t,e){},5:function(t,e,i){"use strict";var n={name:"TransitionExpand",functional:!0,render:function(t,e){return t("transition",{props:{name:"expand"},on:{afterEnter:function(t){t.style.height="auto"},enter:function(t){var e=getComputedStyle(t),i=e.width;t.style.width=i,t.style.position="absolute",t.style.visibility="hidden",t.style.height="auto";var n=getComputedStyle(t),o=n.height;t.style.width=null,t.style.position=null,t.style.visibility=null,t.style.height=0,getComputedStyle(t).height,setTimeout(function(){t.style.height=o})},leave:function(t){var e=getComputedStyle(t),i=e.height;t.style.height=i,getComputedStyle(t).height,setTimeout(function(){t.style.height=0})}}},e.children)}},o=n,a=i(1),r=Object(a.a)(o,void 0,void 0,!1,null,null,null);r.options.__file="TransitionExpand.vue",e.a=r.exports},6:function(t,e,i){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!navigator.clipboard)return void o(t,e);navigator.clipboard.writeText(t).then(function(){},function(t){console.error("Async: Could not copy text: ",t)})}e.a=n;var o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e=e||document.body.parentElement;var i=document.createElement("textarea");i.value=t;var n=e.scrollTop;document.body.appendChild(i),i.focus(),i.select();try{document.execCommand("copy")}catch(t){console.error("Fallback: Oops, unable to copy",t)}document.body.removeChild(i),e.scrollTop=n}}},[41])});
js/build/update.min.js CHANGED
File without changes
js/build/wpra-manifest.min.js CHANGED
File without changes
js/build/wpra-vendor.min.js CHANGED
File without changes
js/src/components/BottomPanel.vue DELETED
@@ -1,9 +0,0 @@
1
- <template>
2
- <div class="wpra-bottom-panel">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {}
9
- </script>
 
 
 
 
 
 
 
 
 
js/src/components/Button.js DELETED
@@ -1,14 +0,0 @@
1
- export default {
2
- props: {
3
- loading: {
4
- type: Boolean,
5
- default: false,
6
- }
7
- },
8
- render () {
9
- return <button
10
- disabled={this.loading}
11
- class={{'button': true, 'loading-button': this.loading}}
12
- >{ this.$slots.default }</button>
13
- }
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/Expander.vue DELETED
@@ -1,36 +0,0 @@
1
- <template>
2
- <div class="wpra-expander" :class="{'wpra-expander--expanded':isExpanded}">
3
- <div class="wpra-expander__title" @click="isExpanded = !isExpanded">
4
- {{ title }}
5
- <span class="dashicons dashicons-arrow-down-alt2"></span>
6
- </div>
7
- <transition-expand>
8
- <div v-if="isExpanded">
9
- <div class="wpra-expander__content">
10
- <slot></slot>
11
- </div>
12
- </div>
13
- </transition-expand>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import TransitionExpand from './TransitionExpand'
19
-
20
- export default {
21
- data () {
22
- return {
23
- isExpanded: this.defaultExpanded
24
- }
25
- },
26
- props: {
27
- title: {},
28
- defaultExpanded: {
29
- value: false
30
- }
31
- },
32
- components: {
33
- TransitionExpand
34
- }
35
- }
36
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/Input.js DELETED
@@ -1,100 +0,0 @@
1
- import MediaInput from './MediaInput'
2
-
3
- export default {
4
- mixins: [
5
- MediaInput
6
- ],
7
- props: {
8
- id: {
9
- type: String,
10
- default () {
11
- return Math.random().toString(36).substr(0, 12)
12
- }
13
- },
14
- label: {},
15
- description: {},
16
- after: {},
17
- type: {},
18
- value: {},
19
- placeholder: {},
20
- title: {},
21
- inputDisabled: {},
22
- options: {
23
- default () {
24
- return {}
25
- }
26
- },
27
- },
28
- methods: {
29
- inputNode () {
30
- if (this.type === 'media') {
31
- return this.mediaNode()
32
- }
33
-
34
- if (this.type === 'checkbox') {
35
- return <input type="checkbox"
36
- id={this.id}
37
- checked={!!this.value}
38
- onChange={() => this.$emit('input', !this.value)}
39
- placeholder={this.placeholder}
40
- disabled={this.$attrs.disabled || this.inputDisabled}
41
- {...{attrs: this.$attrs}}
42
- />
43
- }
44
-
45
- if (this.type !== 'select') {
46
- return <input type={this.type}
47
- value={this.value}
48
- id={this.id}
49
- onInput={(e) => this.$emit('input', e.target.value)}
50
- placeholder={this.placeholder}
51
- disabled={this.$attrs.disabled || this.inputDisabled}
52
- {...{attrs: this.$attrs}}
53
- />
54
- }
55
- return this.selectNode()
56
- },
57
-
58
- selectNode () {
59
- let options = Object.keys(this.options)
60
- .map(key => <option value={key} selected={ this.value === key }>{ this.options[key] }</option>)
61
-
62
- return <select
63
- {...{attrs: this.$attrs}}
64
- id={this.id}
65
- disabled={this.$attrs.disabled || this.inputDisabled}
66
- onChange={(e) => this.$emit('input', e.target.value)}
67
- >{ options }</select>
68
- },
69
- },
70
- render () {
71
- let directives = []
72
-
73
- if (this.title) {
74
- directives.push({
75
- name: 'tippy',
76
- })
77
- }
78
-
79
- return <div class={{'form-input': true, 'form-input--disabled': this.$attrs.disabled || false}}>
80
- { this.label ? (
81
- <label class="form-input__label" for={this.id}>
82
- <div>
83
- {this.label}
84
- {
85
- this.title ? (
86
- <div class="form-input__tip" {...{directives}} title={this.title}>
87
- <span class="dashicons dashicons-editor-help"/>
88
- </div>
89
- ) : null
90
- }
91
- </div>
92
- {this.description ? <div class="form-input__label-description" {...{domProps: {innerHTML: this.description}}}/> : ''}
93
- </label>
94
- ) : null }
95
- <div class="form-input__field">
96
- { this.inputNode() }{ this.after }
97
- </div>
98
- </div>
99
- }
100
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/Layout.js DELETED
@@ -1,11 +0,0 @@
1
- export default {
2
- render () {
3
- return (
4
- <div id="post-body">
5
- {
6
- this.$slots.default
7
- }
8
- </div>
9
- )
10
- }
11
- }
 
 
 
 
 
 
 
 
 
 
 
js/src/components/Main.js DELETED
@@ -1,11 +0,0 @@
1
- export default {
2
- render () {
3
- return (
4
- <div id="postbox-container-2" class="postbox-container">
5
- {
6
- this.$slots.default
7
- }
8
- </div>
9
- )
10
- }
11
- }
 
 
 
 
 
 
 
 
 
 
 
js/src/components/MediaInput.js DELETED
@@ -1,96 +0,0 @@
1
- let imageFrame = null
2
-
3
- /**
4
- * @see https://core.trac.wordpress.org/browser/tags/5.1.1/src/js/_enqueues/wp/media?order=name
5
- *
6
- * @var {{media: Function}} wp
7
- *
8
- * @property {{}} value
9
- */
10
- export default {
11
- props: {
12
- mediaType: {
13
- type: String,
14
- default: 'image'
15
- },
16
- mediaTitle: {
17
- type: String,
18
- default: 'Select Media'
19
- },
20
- /**
21
- * Property to use as a value for the media. Can be `id` or `url`.
22
- *
23
- * @property {string} mediaValueProperty
24
- */
25
- mediaValueProperty: {
26
- type: String,
27
- default: 'id',
28
- },
29
- },
30
- methods: {
31
- mediaNode () {
32
- this.assertMediaLoaded()
33
-
34
- return <div>
35
- <input type="text" value={this.value}/>
36
- <button class="button" onClick={this.openFrame}>Choose image</button>
37
- </div>
38
- },
39
-
40
- openFrame () {
41
- if (!imageFrame) {
42
- imageFrame = this.createFrame()
43
- }
44
- imageFrame.open()
45
- },
46
-
47
- createFrame () {
48
- imageFrame = wp.media({
49
- title: this.mediaTitle,
50
- multiple: false,
51
- library: {
52
- type: this.mediaType,
53
- }
54
- })
55
-
56
- imageFrame.on('close', () => {
57
- const selection = imageFrame.state().get('selection')
58
- let selectedAttachment = null
59
- selection.each((attachment) => {
60
- console.info({attachment})
61
- selectedAttachment = attachment
62
- })
63
- if (!selectedAttachment || !selectedAttachment.id) {
64
- return
65
- }
66
- this.$emit('input', ({
67
- id: selectedAttachment.id,
68
- url: selectedAttachment.attributes.url
69
- })[this.mediaValueProperty])
70
- })
71
-
72
- imageFrame.on('open', () => {
73
- const selection = imageFrame.state().get('selection')
74
-
75
- if (this.mediaValueProperty === 'id' && this.value) {
76
- const attachment = wp.media.attachment(this.value)
77
- attachment.fetch()
78
- selection.add(attachment ? [attachment] : [])
79
- }
80
- })
81
-
82
- return imageFrame
83
- },
84
-
85
- /**
86
- * Check whether wp.media is loaded. If not - throw an error.
87
- *
88
- * @throws Error When wp.media is not loaded.
89
- */
90
- assertMediaLoaded () {
91
- if (!window.wp.media) {
92
- throw Error('[MediaInput] wp.media dependency is not loaded')
93
- }
94
- }
95
- },
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/Modal.vue DELETED
@@ -1,114 +0,0 @@
1
- <template>
2
- <transition name="modal-transition">
3
- <div class="modal" v-if="active" @click.self="$emit('close')">
4
- <div :class="['modal__body', this.modalBodyClass]">
5
- <div class="modal__header" :class="headerClass">
6
- <slot name="header"></slot>
7
- </div>
8
- <div class="modal__content">
9
- <slot name="body"></slot>
10
- </div>
11
- <div class="modal__footer">
12
- <slot name="footer"></slot>
13
- </div>
14
- </div>
15
- </div>
16
- </transition>
17
- </template>
18
-
19
- <script>
20
- /**
21
- * Abstract dialog component, solid foundation for
22
- * any modals and dialogs that opened over the rest page content.
23
- *
24
- * @param Vue
25
- */
26
- export default {
27
- props: {
28
- /**
29
- * Determines dialog visibility. This property is passed
30
- * from outside and cannot be changed inside dialog.
31
- * Dialog's consumer is responsible for manipulating dialog's visibility.
32
- *
33
- * @property {bool}
34
- */
35
- active: {
36
- type: Boolean
37
- },
38
-
39
- /**
40
- * Modal title
41
- *
42
- * @property {string}
43
- */
44
- title: {
45
- type: String
46
- },
47
-
48
- /**
49
- * Additional class modifier for modal customization.
50
- *
51
- * @property {string}
52
- */
53
- modalBodyClass: {
54
- type: String,
55
- default: ''
56
- },
57
-
58
- /**
59
- * Additional classes for modal header.
60
- *
61
- * @property {object|Array}
62
- */
63
- headerClass: {
64
- default () {
65
- return {}
66
- }
67
- },
68
-
69
- /**
70
- * Class that applies to the body and used
71
- * to prevent body's scroll catch, so long dialog can be scrolled
72
- * without interfering with body scroll.
73
- *
74
- * @property {string}
75
- */
76
- dialogOpenedClass: {
77
- type: String,
78
- default: 'modal-opened'
79
- }
80
- },
81
-
82
- watch: {
83
- /**
84
- * Watch for "active" property change and emit corresponding
85
- * event when it changed.
86
- *
87
- * @param isDialogActive {bool}
88
- */
89
- active (isDialogActive) {
90
- this.$emit(isDialogActive ? 'open' : 'close')
91
- }
92
- },
93
-
94
- mounted () {
95
- /*
96
- * Add body "frozen" class to the body when dialog is opened.
97
- */
98
- this.$on('open', () => {
99
- document.querySelector('body')
100
- .classList
101
- .add(this.dialogOpenedClass);
102
- });
103
-
104
- /*
105
- * Remove body "frozen" class from the body when dialog is closed.
106
- */
107
- this.$on('close', () => {
108
- document.querySelector('body')
109
- .classList
110
- .remove(this.dialogOpenedClass);
111
- });
112
- },
113
- }
114
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/NoticeBlock.js DELETED
@@ -1,143 +0,0 @@
1
- import Button from './Button'
2
-
3
- /**
4
- * Big notice block that is used to provide some information for users.
5
- * Also can display "learn more" button to allow users to read more about
6
- * the announce.
7
- */
8
- export default {
9
- data () {
10
- return {
11
- shouldBeVisible: true,
12
- }
13
- },
14
-
15
- props: {
16
- /**
17
- * Unique identifier of the notice block.
18
- *
19
- * @property {string}
20
- */
21
- id: {
22
- type: String,
23
- required: true,
24
- },
25
-
26
- /**
27
- * Visible title on top of the block.
28
- *
29
- * @property {string}
30
- */
31
- title: {
32
- type: String,
33
- },
34
-
35
- /**
36
- * The notice's block body. Can be HTML with text formatting, links and so on.
37
- *
38
- * @property {string}
39
- */
40
- body: {
41
- type: String,
42
- },
43
-
44
- /**
45
- * The link to a "learn more" article. Will be opened in a new tab.
46
- * If value is empty, "learn more" button won't be rendered.
47
- *
48
- * @property {string|boolean}
49
- */
50
- learnMore: {
51
- default: false,
52
- },
53
-
54
- /**
55
- * Text on the button that will hide the message.
56
- *
57
- * @property {string}
58
- */
59
- okayText: {
60
- type: String,
61
- default: 'Got it'
62
- },
63
-
64
- /**
65
- * Text on the button that will open a "learn more" article.
66
- *
67
- * @property {string}
68
- */
69
- learnMoreText: {
70
- type: String,
71
- default: 'Learn more'
72
- },
73
-
74
- /**
75
- * Whether the notice block is visible in UI.
76
- *
77
- * @property {boolean}
78
- */
79
- visible: {
80
- type: Boolean,
81
- default: true,
82
- },
83
- },
84
-
85
- computed: {
86
- isVisible () {
87
- return this.visible
88
- && this.shouldBeVisible
89
- && JSON.parse(localStorage.getItem(this.getBlockKey()) || 'true')
90
- }
91
- },
92
-
93
- methods: {
94
- /**
95
- * Hide the block.
96
- */
97
- onOkayClick () {
98
- this.shouldBeVisible = false
99
- localStorage.setItem(this.getBlockKey(), JSON.stringify(false))
100
- },
101
-
102
- /**
103
- * Open learn more link in a new tab when user clicks on the "learn more" button.
104
- */
105
- onLearnMoreClick () {
106
- window.open(this.learnMore, '_blank').focus()
107
- },
108
-
109
- /**
110
- * Notice's block key in local storage.
111
- *
112
- * @return {string}
113
- */
114
- getBlockKey () {
115
- return `wpra-${this.id}-visible`
116
- }
117
- },
118
-
119
- render () {
120
- /*
121
- * Template is not rendered when it was hidden by user, or server.
122
- */
123
- if (!this.isVisible) {
124
- return null
125
- }
126
-
127
- let learnMoreButton = this.learnMore ?
128
- <Button class="button-clear" nativeOnClick={this.onLearnMoreClick}>
129
- {this.learnMoreText} <span class="dashicons dashicons-external"/>
130
- </Button> : null
131
-
132
- return (
133
- <div class="wpra-notice-block">
134
- <div class="wpra-notice-block__title">{this.title}</div>
135
- <div class="wpra-notice-block__body" {...{domProps: {innerHTML: this.body}}}/>
136
- <div class="wpra-notice-block__buttons">
137
- <Button class="brand button-primary" nativeOnClick={this.onOkayClick}>{this.okayText}</Button>
138
- {learnMoreButton}
139
- </div>
140
- </div>
141
- )
142
- }
143
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/Postbox.vue DELETED
@@ -1,44 +0,0 @@
1
- <script>
2
- export default {
3
- inject: ['hooks'],
4
- data () {
5
- return {
6
- expanded: true,
7
- }
8
- },
9
- props: {
10
- title: {},
11
- id: {},
12
- submit: {
13
- type: Boolean,
14
- default: false,
15
- },
16
- context: {},
17
- },
18
- methods: {
19
- toggle () {
20
- this.expanded = !this.expanded
21
- }
22
- },
23
- render (h) {
24
- return this.hooks.apply('postbox-' + this.id, this.context || this, (
25
- <div class="postbox wpra-postbox" id={ this.submit ? 'submitdiv' : ''}>
26
- <button type="button" class="handlediv" aria-expanded="true" onClick={this.toggle}>
27
- <span class="screen-reader-text">Toggle panel: { this.title }</span>
28
- <span class="toggle-indicator" aria-hidden="true"></span>
29
- </button>
30
- <h2 class="hndle ui-sortable-handle"
31
- onClick={this.toggle}
32
- ><span>{ this.title }</span></h2>
33
- <div class="inside">
34
- {
35
- this.hooks.apply('postbox-content-' + this.id, this.context || this, [
36
- this.$slots.default
37
- ], {h})
38
- }
39
- </div>
40
- </div>
41
- ), {h})
42
- }
43
- }
44
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/RouteLink.js DELETED
@@ -1,27 +0,0 @@
1
- export default {
2
- props: {
3
- path: {},
4
- gate: {}
5
- },
6
- inject: [
7
- 'router'
8
- ],
9
- methods: {
10
- getPath () {
11
- return this.router.buildRoute(this.path)
12
- },
13
- navigate (e) {
14
- const allowed = !this.gate || this.gate()
15
-
16
- e.preventDefault()
17
-
18
- if (allowed) {
19
- this.router.navigate(this.path)
20
- }
21
- }
22
- },
23
- render () {
24
- const path = this.getPath()
25
- return <a href={path} onClick={this.navigate}>{ this.$slots.default }</a>
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/RouterApp.js DELETED
@@ -1,47 +0,0 @@
1
- export default function ({ store, router }) {
2
- return {
3
- store,
4
- data () {
5
- return {
6
- afterNavigate: () => {},
7
- params: {},
8
- currentRoute: null,
9
- }
10
- },
11
- created () {
12
- router.setApp(this)
13
- this.currentRoute = router.parseLocation(window.location)
14
- this.navigated()
15
- },
16
- mounted () {
17
- window.addEventListener('popstate', () => {
18
- this.currentRoute = router.parseLocation(window.location)
19
- this.navigated()
20
- })
21
- },
22
- methods: {
23
- ViewComponent () {
24
- const matchingView = router.findRoute(this.currentRoute)
25
- return matchingView.component
26
- },
27
- navigated () {
28
- this.$nextTick(() => {
29
- const main = this.$refs.main
30
- if (!main || !main.navigated) {
31
- return
32
- }
33
- main.navigated({
34
- route: router.findRoute(this.currentRoute),
35
- })
36
- })
37
- }
38
- },
39
- render (h) {
40
- const content = h(this.ViewComponent(), {
41
- ref: 'main'
42
- })
43
- this.afterNavigate()
44
- return content
45
- }
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/SerializedForm.vue DELETED
@@ -1,89 +0,0 @@
1
- <template>
2
- <div class="form">
3
- <div class="form-group"
4
- v-for="datum of form"
5
- v-if="satisfiesCondition(datum)"
6
- >
7
- <template v-if="datum.type === 'radio'">
8
- <label :for="datum.name" v-html="datum.label" v-if="datum.label"></label>
9
- <div class="form-check" v-for="(radio, $i) of datum.options">
10
- <input type="radio"
11
- :name="datum.name"
12
- :id="datum.name + '_' + $i"
13
- :value="radio.value"
14
- v-model="model[datum.name]"
15
- >
16
- <label :for="datum.name + '_' + $i">
17
- {{ radio.label || radio.value }}
18
- </label>
19
- </div>
20
- </template>
21
-
22
- <template v-if="datum.type === 'textarea'">
23
- <label :for="datum.name" v-html="datum.label" v-if="datum.label"></label>
24
- <textarea v-model="model[datum.name]" :id="datum.name"></textarea>
25
- </template>
26
-
27
- <template v-if="datum.type === 'content'">
28
- <div :class="datum.className">
29
- <p v-html="datum.label"></p>
30
- </div>
31
- </template>
32
- </div>
33
- </div>
34
- </template>
35
-
36
- <script>
37
- export default {
38
- props: {
39
- /*
40
- * Form, described by object containing information
41
- * about each field.
42
- */
43
- form: {
44
- type: Array,
45
- },
46
-
47
- /*
48
- * Form model.
49
- */
50
- value: {
51
- type: Object,
52
- }
53
- },
54
- computed: {
55
- model: {
56
- get () {
57
- return this.value
58
- },
59
- set (value) {
60
- this.$emit('input', value)
61
- }
62
- }
63
- },
64
- methods: {
65
- satisfiesCondition (datum) {
66
- if (!datum.condition) {
67
- return true
68
- }
69
- let compareFunction = this.getConditionFunction(datum.condition.operator);
70
- if (!compareFunction) {
71
- return false
72
- }
73
- return compareFunction(datum.condition.field, datum.condition.value)
74
- },
75
-
76
- getConditionFunction (operator) {
77
- const fns = {
78
- '=': (field, value) => {
79
- return this.model[field] === value
80
- }
81
- }
82
- if (!fns[operator]) {
83
- return null
84
- }
85
- return fns[operator]
86
- }
87
- }
88
- }
89
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/Sidebar.js DELETED
@@ -1,11 +0,0 @@
1
- export default {
2
- render () {
3
- return (
4
- <div id="postbox-container-1" class="wpra-postbox-container postbox-container">
5
- {
6
- this.$slots.default
7
- }
8
- </div>
9
- )
10
- }
11
- }
 
 
 
 
 
 
 
 
 
 
 
js/src/components/TransitionExpand.vue DELETED
@@ -1,66 +0,0 @@
1
- <script>
2
- export default {
3
- name: `TransitionExpand`,
4
- functional: true,
5
- render (createElement, context) {
6
- const data = {
7
- props: {
8
- name: `expand`,
9
- },
10
- on: {
11
- afterEnter (element) {
12
- // eslint-disable-next-line no-param-reassign
13
- element.style.height = `auto`
14
- },
15
- enter (element) {
16
- const {width} = getComputedStyle(element)
17
-
18
- /* eslint-disable no-param-reassign */
19
- element.style.width = width
20
- element.style.position = `absolute`
21
- element.style.visibility = `hidden`
22
- element.style.height = `auto`
23
- /* eslint-enable */
24
-
25
- const {height} = getComputedStyle(element)
26
-
27
- /* eslint-disable no-param-reassign */
28
- element.style.width = null
29
- element.style.position = null
30
- element.style.visibility = null
31
- element.style.height = 0
32
- /* eslint-enable */
33
-
34
- // Force repaint to make sure the
35
- // animation is triggered correctly.
36
- // eslint-disable-next-line no-unused-expressions
37
- getComputedStyle(element).height
38
-
39
- setTimeout(() => {
40
- // eslint-disable-next-line no-param-reassign
41
- element.style.height = height
42
- })
43
- },
44
- leave (element) {
45
- const {height} = getComputedStyle(element)
46
-
47
- // eslint-disable-next-line no-param-reassign
48
- element.style.height = height
49
-
50
- // Force repaint to make sure the
51
- // animation is triggered correctly.
52
- // eslint-disable-next-line no-unused-expressions
53
- getComputedStyle(element).height
54
-
55
- setTimeout(() => {
56
- // eslint-disable-next-line no-param-reassign
57
- element.style.height = 0
58
- })
59
- },
60
- },
61
- }
62
-
63
- return createElement(`transition`, data, context.children)
64
- },
65
- }
66
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/components/index.js DELETED
@@ -1,15 +0,0 @@
1
- import Input from './Input'
2
- import NoticeBlock from './NoticeBlock'
3
- import Postbox from './Postbox'
4
- import RouteLink from './RouteLink'
5
- import TransitionExpand from './TransitionExpand'
6
- import Button from './Button'
7
-
8
- export default {
9
- Input,
10
- NoticeBlock,
11
- Postbox,
12
- RouteLink,
13
- TransitionExpand,
14
- Button,
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/libs/NotificationCenter.js DELETED
@@ -1,45 +0,0 @@
1
- /**
2
- * Library agnostic wrapper for notifications.
3
- *
4
- * @since 4.14
5
- *
6
- * @class NotificationsCenter
7
- */
8
- export default class NotificationsCenter {
9
- /**
10
- * NotificationsCenter constructor.
11
- *
12
- * @since 4.14
13
- *
14
- * @param {Function} show Function implementation for displaying messages.
15
- * @param {Function} error Function implementation for displaying errors.
16
- */
17
- constructor (show, error) {
18
- this.showMethod = show
19
- this.errorMethod = error
20
- }
21
-
22
- /**
23
- * Display informational message.
24
- *
25
- * @since 4.14
26
- *
27
- * @param {string} msg Message for displaying
28
- * @param {object} options Options for notification.
29
- */
30
- show (msg, options = {}) {
31
- this.showMethod(msg, options)
32
- }
33
-
34
- /**
35
- * Display error message.
36
- *
37
- * @since 4.14
38
- *
39
- * @param {string} msg Message for displaying
40
- * @param {object} options Options for notification.
41
- */
42
- error (msg, options = {}) {
43
- this.errorMethod(msg, options)
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/libs/Router.js DELETED
@@ -1,122 +0,0 @@
1
- const getJsonFromUrl = (url) => {
2
- if (!url) url = location.href
3
- var question = url.indexOf('?')
4
- var hash = url.indexOf('#')
5
- if (hash == -1 && question == -1) return {}
6
- if (hash == -1) hash = url.length
7
- var query = question == -1 || hash == question + 1 ? url.substring(hash) :
8
- url.substring(question + 1, hash)
9
- var result = {}
10
- query.split('&').forEach(function (part) {
11
- if (!part) return
12
- part = part.split('+').join(' ') // replace every + with space, regexp-free version
13
- var eq = part.indexOf('=')
14
- var key = eq > -1 ? part.substr(0, eq) : part
15
- var val = eq > -1 ? decodeURIComponent(part.substr(eq + 1)) : ''
16
- var from = key.indexOf('[')
17
- if (from == -1) result[decodeURIComponent(key)] = val
18
- else {
19
- var to = key.indexOf(']', from)
20
- var index = decodeURIComponent(key.substring(from + 1, to))
21
- key = decodeURIComponent(key.substring(0, from))
22
- if (!result[key]) result[key] = []
23
- if (!index) result[key].push(val)
24
- else result[key][index] = val
25
- }
26
- })
27
- return result
28
- }
29
-
30
- export default class Router {
31
- constructor (routes, options) {
32
- this.routes = routes
33
- this.options = options
34
- this.baseParams = options.baseParams || ['post_type', 'page', 'action', 'id']
35
- }
36
-
37
- get params () {
38
- return this.app ? this.app.params : {}
39
- }
40
-
41
- setApp (app) {
42
- this.app = app
43
- this.app.afterNavigate = this.options.afterNavigating || (() => {})
44
- }
45
-
46
- findRoute (location) {
47
- return this.routes.find(({route}) => {
48
- return location.indexOf(route) !== -1
49
- })
50
- }
51
-
52
- updateParams (params) {
53
- this.app.$set(this.app, 'params', params)
54
- }
55
-
56
- mergeParams (paramsPart) {
57
- let currentParams = Object.keys(this.params).filter(key => {
58
- return this.baseParams.indexOf(key) !== -1 || paramsPart.hasOwnProperty(key)
59
- }).reduce((acc, key) => {
60
- acc[key] = this.params[key]
61
- return acc
62
- }, {})
63
-
64
- let params = Object.assign({}, currentParams, paramsPart)
65
-
66
- this.updateParams(params)
67
-
68
- window.history.pushState(
69
- null,
70
- null,
71
- this.routeFromParams()
72
- )
73
-
74
- this.app.navigated()
75
- }
76
-
77
- routeFromParams () {
78
- const hasParams = !!Object.keys(this.params).length
79
- return location.pathname + (hasParams ? '?' + this.buildParams(this.params) : '')
80
- }
81
-
82
- buildRoute (route) {
83
- if (route.name) {
84
- let routeObject = this.routes.find(r => r.name === route.name)
85
- if (!routeObject) {
86
- return null
87
- }
88
- const routeStr = routeObject.route
89
- const join = routeStr.indexOf('?') !== -1 ? '&' : '?'
90
-
91
- return routeStr + (route.params ? join + this.buildParams(route.params ? route.params : {}) : '')
92
- }
93
- }
94
-
95
- buildParams (params) {
96
- return Object.keys(params).map(param => {
97
- return `${param}=${params[param]}`
98
- }).join('&')
99
- }
100
-
101
- parseLocation (location) {
102
- this.updateParams(getJsonFromUrl(location.search))
103
- console.info('ROUTE PARSE LOCATION PARAMS', getJsonFromUrl(location.search))
104
- return location.pathname + location.search
105
- }
106
-
107
- navigate (route) {
108
- if (this.app) {
109
- this.app.currentRoute = this.buildRoute(route)
110
- }
111
-
112
- this.updateParams(Object.assign({}, route.params || {}, getJsonFromUrl(this.buildRoute(route))))
113
-
114
- window.history.pushState(
115
- null,
116
- null,
117
- this.buildRoute(route)
118
- )
119
-
120
- this.app.navigated()
121
- }
122
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/mixins/DataChangesAware.js DELETED
@@ -1,47 +0,0 @@
1
- import jsonClone from 'app/utils/jsonClone'
2
- import equal from 'fast-deep-equal'
3
-
4
- /**
5
- * Mixing for functionality that allows to track down and revert changes made on
6
- * the primary editing data model.
7
- *
8
- * `model` property on base object is required for using this mixin.
9
- */
10
- export default {
11
- data () {
12
- return {
13
- changes: {
14
- model: {},
15
- }
16
- }
17
- },
18
- methods: {
19
- /**
20
- * Whether the model has been changed after last model "remembering".
21
- *
22
- * @return {boolean}
23
- */
24
- isChanged () {
25
- return !equal(this.model, this.changes.model)
26
- },
27
-
28
- /**
29
- * Remember current data model, but without any references to main model
30
- * properties. It is important to clean any additional observers from object
31
- * otherwise "memorized" model clone will be changed when model get changed.
32
- */
33
- rememberModel () {
34
- this.$set(this.changes, 'model', jsonClone(this.model))
35
- },
36
-
37
- /**
38
- * Cancel any changes on main model object.
39
- */
40
- cancelChanges () {
41
- if (!confirm('Are you sure you want to cancel your changes for this template? This action cannot be reverted and all changes made since your last save will be lost.')) {
42
- return
43
- }
44
- this.$set(this, 'model', jsonClone(this.changes.model))
45
- },
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/gutenberg-block/components/MultipleSelectControl.js DELETED
@@ -1,85 +0,0 @@
1
- import { Component } from '@wordpress/element'
2
- import {
3
- FormTokenField,
4
- Placeholder,
5
- Spinner,
6
- BaseControl,
7
- } from '@wordpress/components'
8
-
9
- export default class MultipleSelectControl extends Component {
10
- constructor (props) {
11
- super(...arguments)
12
- this.props = props
13
- this.state = {
14
- tokens: [],
15
- loading: false,
16
- items: []
17
- }
18
- }
19
-
20
- componentDidMount () {
21
- this.setState({loading: true})
22
-
23
- jQuery.post(WPRA_BLOCK.ajax_url, {
24
- action: 'wprss_fetch_items',
25
- }, (data) => {
26
- data = JSON.parse(data)
27
- this.setState({
28
- loading: false,
29
- items: data.items
30
- })
31
- })
32
- }
33
-
34
- render () {
35
- const setState = this.setState.bind(this)
36
- const onChange = this.props.onChange
37
- const items = this.state.items
38
-
39
- if (this.state.loading) {
40
- return <Placeholder>
41
- <Spinner/>
42
- </Placeholder>
43
- }
44
- return <BaseControl
45
- help={this.props.help || ''}
46
- >
47
- <FormTokenField
48
- label={this.props.label || ''}
49
- placeholder={this.props.placeholder || ''}
50
- value={this.props.value.map(function (id) {
51
- return items.find(item => item.value === id)
52
- }).filter(item => !!item)}
53
- suggestions={this.state.items.map(function (item) {
54
- item.toLocaleLowerCase = function () {
55
- return item.title.toLocaleLowerCase()
56
- }
57
- item.toString = function () {
58
- return item.title
59
- }
60
- return item
61
- })}
62
- displayTransform={function (item) {
63
- if ('number' === typeof item) {
64
- item = items.find(function (iteratedItem) {
65
- return iteratedItem.value === item
66
- })
67
- }
68
- if ('object' === typeof item) {
69
- return item.title
70
- }
71
- return item
72
- }}
73
- saveTransform={function (token) {
74
- return token
75
- }}
76
- onChange={function (tokens) {
77
- setState({tokens})
78
- onChange(tokens.map(function (item) {
79
- return item.value
80
- }))
81
- }}
82
- />
83
- </BaseControl>
84
- }
85
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/gutenberg-block/index.js DELETED
@@ -1,209 +0,0 @@
1
- require('css/src/gutenberg-block/index.scss')
2
-
3
- import { __ } from '@wordpress/i18n'
4
- import { registerBlockType } from '@wordpress/blocks'
5
- import { InspectorControls } from '@wordpress/editor'
6
- import {
7
- ToggleControl,
8
- ServerSideRender,
9
- TextControl,
10
- TextareaControl,
11
- BaseControl,
12
- PanelBody,
13
- PanelRow,
14
- Spinner,
15
- Placeholder,
16
- FormTokenField,
17
- SelectControl,
18
- } from '@wordpress/components'
19
- import { addFilter, applyFilters } from '@wordpress/hooks'
20
-
21
- import MultipleSelectControl from './components/MultipleSelectControl'
22
-
23
- // Default template is selected by default.
24
- let selectedTemplate = WPRA_BLOCK.templates[0]
25
-
26
- // Selected template field getter. Additional function can be passed.
27
- const getTemplateDefault = (field, wrapper = val => val, def = 0) => selectedTemplate[field] ? wrapper(selectedTemplate[field]) : def
28
-
29
- // Helps to not override attributes that selected manually by user.
30
- let templateLock = {}
31
-
32
- // Whether the block is loaded initial information.
33
- let _isLoaded = false
34
-
35
- registerBlockType('wpra-shortcode/wpra-shortcode', {
36
- title: __('WP RSS Aggregator Feeds'),
37
- description: __('Display feed items imported using WP RSS Aggregator.'),
38
- icon: 'rss',
39
- category: 'widgets',
40
-
41
- // Remove to make block editable in HTML mode.
42
- supportHTML: false,
43
-
44
- attributes: applyFilters('wpra.gutenbergBlock.attributes', {
45
- isAll: {
46
- type: 'boolean',
47
- default: true
48
- },
49
- template: {
50
- type: 'string',
51
- default: 'default'
52
- },
53
- pagination: {
54
- type: 'boolean',
55
- default: true
56
- },
57
- limit: {
58
- type: 'number',
59
- },
60
- page: {
61
- type: 'number',
62
- },
63
- exclude: {
64
- type: 'string'
65
- },
66
- source: {
67
- type: 'string'
68
- }
69
- }),
70
-
71
- /**
72
- * Called when Gutenberg initially loads the block.
73
- */
74
- edit: function (props) {
75
- /*
76
- * If block is not loaded, check whether we should block auto limit selection.
77
- * It will be blocked if user selected entered limit value different from template's default.
78
- */
79
- if (!_isLoaded && props.attributes.template) {
80
- selectedTemplate = WPRA_BLOCK.templates.find(item => item.value === (props.attributes.template || 'default'))
81
-
82
- if (parseInt(props.attributes.limit) !== getTemplateDefault('limit', parseInt)) {
83
- templateLock['limit'] = true
84
- }
85
-
86
- if (!!props.attributes.pagination !== getTemplateDefault('pagination', v => !!v, false)) {
87
- templateLock['pagination'] = true
88
- }
89
-
90
- _isLoaded = true
91
- }
92
-
93
- const etWarning = WPRA_BLOCK.is_et_active ? <p style={{fontStyle: 'italic'}}>
94
- Excerpts & Thumbnails is incompatible with the WP RSS Aggregator Feeds block. <a
95
- href="https://kb.wprssaggregator.com/article/459-using-excerpts-thumbnails-with-templates" target={'_blank'}>Learn
96
- more</a>.
97
- </p> : null
98
-
99
- const panels = applyFilters('wpra.gutenbergBlock.panels', [
100
- <PanelBody
101
- title={__('Feed Sources')}
102
- initialOpen={true}
103
- >
104
- {applyFilters('wpra.gutenbergBlock.panelItems', [
105
- <ToggleControl
106
- label={__('Show all Feed Sources ')}
107
- checked={props.attributes.isAll}
108
- onChange={(value) => {
109
- props.setAttributes({isAll: value})
110
- props.setAttributes({exclude: ''})
111
- props.setAttributes({source: ''})
112
- }}
113
- />,
114
- <MultipleSelectControl
115
- label={props.attributes.isAll ? __('Feed Sources to Exclude') : __('Feed Sources to Show')}
116
- key={'select'}
117
- help={__('Start typing to search feed sources by name')}
118
- value={((props.attributes.isAll ? props.attributes.exclude : props.attributes.source) || '').split(',').map(item => parseInt(item))}
119
- onChange={(selected) => {
120
- selected = selected.join(',')
121
- if (props.attributes.isAll) {
122
- props.setAttributes({exclude: selected})
123
- props.setAttributes({source: ''})
124
- return
125
- }
126
- props.setAttributes({exclude: ''})
127
- props.setAttributes({source: selected})
128
- }}
129
- />
130
- ], 'feedSources', {props})}
131
- </PanelBody>,
132
- <PanelBody
133
- title={__('Display Options')}
134
- initialOpen={false}
135
- >
136
- {applyFilters('wpra.gutenbergBlock.panelItems', [
137
- <SelectControl
138
- label={__('Select Template')}
139
- value={props.attributes.template}
140
- onChange={(template) => {
141
- selectedTemplate = WPRA_BLOCK.templates.find(item => item.value === template)
142
- props.setAttributes({template: template || ''})
143
- if (!templateLock['limit']) {
144
- props.setAttributes({limit: getTemplateDefault('limit', parseInt, 15)})
145
- }
146
- if (!templateLock['pagination']) {
147
- props.setAttributes({pagination: getTemplateDefault('pagination', v => !!v, false)})
148
- }
149
- }}
150
- options={WPRA_BLOCK.templates}
151
- />,
152
- <TextControl
153
- label={__('Feed Limit')}
154
- help={__('Number of feed items to display')}
155
- placeholder={getTemplateDefault('limit', parseInt)}
156
- type={'number'}
157
- min={1}
158
- value={props.attributes.limit || getTemplateDefault('limit', parseInt)}
159
- onChange={(value) => {
160
- templateLock['limit'] = true
161
- props.setAttributes({limit: parseInt(value) || getTemplateDefault('limit', parseInt)})
162
- }}
163
- />,
164
- <ToggleControl
165
- label={__('Show Pagination ')}
166
- checked={props.attributes.pagination}
167
- onChange={(value) => {
168
- templateLock['pagination'] = true
169
- props.setAttributes({pagination: value})
170
- }}
171
- />,
172
- <TextControl
173
- label={__('Page')}
174
- placeholder={__('1')}
175
- type={'number'}
176
- min={1}
177
- value={props.attributes.page || 1}
178
- onChange={(value) => {
179
- props.setAttributes({page: parseInt(value) || 1})
180
- }}
181
- />,
182
- etWarning
183
- ], 'displayOptions', {props})}
184
- </PanelBody>,
185
- ], {props})
186
-
187
- console.warn({panels})
188
-
189
- return <div>
190
- <ServerSideRender
191
- block={'wpra-shortcode/wpra-shortcode'}
192
- attributes={props.attributes}
193
- className={'wpra-gutenberg-block'}
194
- />
195
- {applyFilters('wpra.gutenbergBlock.before', [], {props})}
196
- <InspectorControls>
197
- {panels}
198
- </InspectorControls>
199
- {applyFilters('wpra.gutenbergBlock.after', [], {props})}
200
- </div>
201
- },
202
-
203
- /**
204
- * Called when Gutenberg "saves" the block to post_content
205
- */
206
- save: function (props) {
207
- return null
208
- }
209
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/intro/Wizard.vue DELETED
@@ -1,440 +0,0 @@
1
- <template>
2
- <div class="wizard-holder animated fadeIn">
3
- <div class="connect-steps">
4
- <div class="step-items">
5
- <div class="step-progress" :class="'step-progress--' + activeScreenIndex"></div>
6
- <div class="step-item"
7
- :class="{ 'step-item_active': active(screen.id), 'step-item_completed' : screen.completed() && index < activeScreenIndex }"
8
- v-for="(screen, index) of screens"
9
- >
10
- <div class="step-item__status">
11
- <span class="dashicons dashicons-yes" v-if="screen.completed() && index < activeScreenIndex"></span>
12
- </div>
13
- <div class="step-item__info">
14
- <div class="step-item__title">{{ screen.title }}</div>
15
- <div class="step-item__description" v-if="screen.description">{{ screen.description }}</div>
16
- </div>
17
- </div>
18
- </div>
19
- </div>
20
- <div class="wizard">
21
- <transition :name="transition" mode="out-in">
22
- <div class="wizard_content" :key="activeScreen" v-if="active('feed')">
23
- <div class="wizard_hello">
24
- Enter your first RSS Feed URL
25
- </div>
26
-
27
- <form id="feedForm" @submit.prevent="next" class="wizard_info">
28
- <div class="form-group">
29
- <input type="text" placeholder="https://www.sourcedomain.com/feed/" v-model="form.feedSourceUrl"
30
- class="wpra-feed-input"
31
- >
32
- <span class="dashicons dashicons-warning warning-icon" v-if="isFeedError"></span>
33
- <a :href="validateLink" target="_blank" v-if="isFeedError">Validate feed</a>
34
- </div>
35
- </form>
36
-
37
- <div class="wizard_error" v-if="isFeedError">
38
- <p>This RSS feed URL appears to be invalid. Here are a couple of things you can try:</p>
39
- <ol>
40
- <li>Check whether the URL you entered is the correct one by trying one of the options when clicking on "How do I find an RSS feed URL?" below.</li>
41
- <li>
42
- Test out this other RSS feed URL to make sure the plugin is working correctly - https://www.wpmayor.com/feed/ - If it works, you may <a :href="supportUrl" target="_blank">contact us here</a> to help you with your source.
43
- </li>
44
- <li>Test the URL's validity by W3C standards, the standards we use in our plugins, using the “Validate feed” link above.</li>
45
- </ol>
46
- </div>
47
-
48
- <expander title="How do I find an RSS feed URL?">
49
- <p>WP RSS Aggregator fetches feed items through RSS feeds. Almost every website in the world provides an RSS feed. Here's how to find it:</p>
50
- <p>Option 1: Add /feed to the website's homepage URL </p>
51
- <p>Many sites have their RSS feed at the same URL. For instance, if the website's URL is www.thiswebsite.com, then the RSS feed could be at www.thiswebsite.com/feed.</p>
52
- <p>Option 2: Look for the RSS share icon</p>
53
- <p>Many websites have share icons on their pages for Facebook, Twitter and more. Many times, there will also be an orange RSS icon. Click on that to access the RSS feed URL.</p>
54
- <p>Option 3: Browser RSS Auto-Discovery</p>
55
- <p>Most browsers either include an RSS auto-discovery tool by default or they allow you to add extensions for it. Firefox shows an RSS icon above the website, in the address bar, which you can click on directly. Chrome offers extensions such as this one.</p>
56
- <p>Option 4: Look at the Page Source</p>
57
- <p>When on any page of the website you're looking to import feed items from, right click and press "View Page Source". Once the new window opens, use the “Find” feature (Ctrl-F on PC, Command-F on Mac) and search for " RSS". This should take you to a line that reads like this (or similar):</p>
58
- <p>
59
- <code>
60
- &#x3C;link rel=&#x22;alternate&#x22; type=&#x22;application/rss+xml&#x22; title=&#x22;RSS Feed&#x22; href=&#x22;https://www.sourcedomain.com/feed/&#x22; /&#x3E;
61
- </code>
62
- </p>
63
- <p>The RSS feed’s URL is found between the quotes after href=. In the above case, it would be https://www.sourcedomain.com/feed/.</p>
64
- <p><a :href="knowledgeBaseUrl" target="_blank">Browse our Knowledge Base for more information.</a></p>
65
- </expander>
66
- </div>
67
-
68
- <div class="wizard_content" :key="activeScreen" v-if="active('feedItems')">
69
- <div class="wizard_hello">
70
- Latest feed items from your selected feed source:
71
- </div>
72
-
73
- <div class="wpra-feed-items">
74
- <div class="wpra-feed-item" v-for="item of feed.items">
75
- <div class="wpra-feed-item__link">
76
- <a :href="item.permalink" target="_blank">{{ item.title }}</a>
77
- </div>
78
- <div class="wpra-feed-item__info">
79
- <template v-if="item.date || item.author">
80
- <template v-if="item.date">
81
- Published on {{ item.date }}
82
- </template>
83
- <template v-if="item.date && item.author">|</template>
84
- <template v-if="item.author">
85
- By {{ item.author }}
86
- </template>
87
- </template>
88
- </div>
89
- </div>
90
- </div>
91
-
92
- <div class="wrpa-shortcode">
93
- <div class="wrpa-shortcode-preview">
94
- <div class="wrpa-shortcode-label">
95
- Create a draft page to preview these feed items on your site:
96
- </div>
97
- <a :href="previewUrl" target="_blank" class="button"
98
- @click="preparePreview"
99
- :class="{'button-primary': isPrepared, 'loading-button': isPreparing}"
100
- >
101
- {{ isPrepared ? 'Preview the Page' : 'Create Draft Page' }}
102
- </a>
103
- </div>
104
- <div class="wrpa-shortcode-form" @click="copyToClipboard()">
105
- <div class="wrpa-shortcode-label">
106
- Copy the shortcode to any page or post on your site:
107
- </div>
108
- <input class="wrpa-shortcode-form__shortcode"
109
- type="text"
110
- readonly
111
- value="[wp-rss-aggregator]"
112
- ref="selected"
113
- />
114
- <div class="wrpa-shortcode-form__button">
115
- {{ isCopied ? 'Copied!' : 'Click to copy' }}
116
- </div>
117
- </div>
118
- </div>
119
- </div>
120
-
121
- <div class="wizard_content" :key="activeScreen" v-if="active('finish')">
122
- <div class="wizard_hello">
123
- You’ve successfully set up your first feed source 😄
124
- </div>
125
-
126
- <div class="wpra-cols-title">
127
- Do more with WP RSS Aggregator - here is what we did at CryptoHeadlines.com.
128
- </div>
129
-
130
- <div class="wpra-cols">
131
- <div class="col">
132
- <p>CryptoHeadlines.com displays latest news, Youtube videos, podcasts, jobs and more from the Cryptocurrency industry.</p>
133
- <p>It uses Feed to Post to import articles, Youtube videos, and podcast links.</p>
134
- <p>Full Text RSS Feeds is used to fetch the full content of the job listings to present more information to the potential applicant.</p>
135
- <p>Keyword Filtering is used to filter out content that contains profanity and keywords or phrases deemed as inappropriate.</p>
136
- <div style="margin-bottom: .5rem">
137
- <a :href="addOnsUrl" class="button" target="_blank">
138
- Browse Add-ons ⭐️
139
- </a>
140
- </div>
141
- <div>
142
- <a :href="supportUrl" target="_blank" style="font-size: .9em">Contact support for more information.</a>
143
- </div>
144
- </div>
145
- <div class="col">
146
- <img :src="demoImageUrl"
147
- class="img wpra-demo-photo">
148
-
149
- <div class="wpra-feedback">
150
- <!--<div class="wpra-feedback__photo">-->
151
- <!--<img src="https://www.wprssaggregator.com/wp-content/themes/wp_rss_theme/assets/images/review2.jpg">-->
152
- <!--</div>-->
153
- <div class="wpra-feedback__copy">
154
- <div class="wpra-feedback__text">
155
- This plugin has made my life a lot easier, and the support has been great as well.
156
- </div>
157
- <div class="wpra-feedback__rating">
158
- <span class="dashicons dashicons-star-filled"></span>
159
- <span class="dashicons dashicons-star-filled"></span>
160
- <span class="dashicons dashicons-star-filled"></span>
161
- <span class="dashicons dashicons-star-filled"></span>
162
- <span class="dashicons dashicons-star-filled"></span>
163
- </div>
164
- <div class="wpra-feedback__by">
165
- <a :href="feedbackUrl" target="_blank">
166
- Review by officeinnovator
167
- </a>
168
- </div>
169
- </div>
170
- </div>
171
- </div>
172
- </div>
173
- </div>
174
- </transition>
175
-
176
- <div class="connect-actions pad">
177
- <div class="pad-item--grow">
178
- <button v-if="!active('finish')"
179
- class="button-clear"
180
- @click="finish"
181
- >
182
- Skip the introduction
183
- </button>
184
- </div>
185
- <div class="pad-item--no-shrink">
186
- <button class="button-clear"
187
- @click="back"
188
- v-if="isBackAvailable"
189
- >
190
- Back
191
- </button>
192
- <button @click="next"
193
- class="button button-primary button-large"
194
- :class="{'loading-button': isLoading}"
195
- >
196
- {{ active('finish') ? 'Continue to Plugin' : 'Next' }}
197
- </button>
198
- </div>
199
- </div>
200
- </div>
201
- </div>
202
- </template>
203
-
204
- <script>
205
- import Expander from 'app/components/Expander'
206
- import { post } from 'app/utils/fetch'
207
- import { copyToClipboard } from 'app/utils/copy'
208
-
209
- const _ = (str) => str
210
-
211
- const CONFIG = window.wprssWizardConfig
212
-
213
- export default {
214
- data () {
215
- return {
216
- prevHeight: 0,
217
- screens: [{
218
- id: 'feed',
219
- title: _('Add feed source URL'),
220
- description: false,
221
- next: this.submitFeed,
222
- completed: () => {
223
- return this.feed.items.length
224
- },
225
- entered: () => {
226
- this.focusOnInput('feed')
227
- }
228
- }, {
229
- id: 'feedItems',
230
- title: _('Display feed items'),
231
- description: false,
232
- next: this.continueItems,
233
- completed: () => {
234
- return this.feed.items.length && this.itemsPassed
235
- }
236
- }, {
237
- id: 'finish',
238
- title: _('Complete introduction'),
239
- description: false,
240
- next: this.completeIntroduction,
241
- completed: () => {
242
- return this.feed.items.length && this.itemsPassed
243
- }
244
- }],
245
- isCopied: false,
246
-
247
- isPreparing: false,
248
- isPrepared: false,
249
-
250
- transition: 'slide-up', // 'slide-down',
251
-
252
- activeScreen: 'feed',
253
- form: {
254
- feedSourceUrl: null,
255
- },
256
- itemsPassed: false,
257
-
258
- stepLoading: false,
259
- isLoading: false,
260
-
261
- isFeedError: false,
262
-
263
- feed: {
264
- items: [],
265
- },
266
- previewUrl: CONFIG.previewUrl,
267
- addOnsUrl: CONFIG.addOnsUrl,
268
- supportUrl: CONFIG.supportUrl,
269
- demoImageUrl: CONFIG.demoImageUrl,
270
- feedbackUrl: CONFIG.feedbackUrl,
271
- knowledgeBaseUrl: CONFIG.knowledgeBaseUrl,
272
- }
273
- },
274
- computed: {
275
- validateLink () {
276
- return 'https://validator.w3.org/feed/check.cgi?url=' + encodeURI(this.form.feedSourceUrl)
277
- },
278
-
279
- activeScreenIndex () {
280
- return this.screens.findIndex(screen => screen.id === this.activeScreen)
281
- },
282
- currentScreen () {
283
- return this.screens.find(screen => screen.id === this.activeScreen)
284
- },
285
- actionCompleted () {
286
- return this.currentScreen.completed()
287
- },
288
- isBackAvailable () {
289
- return this.activeScreenIndex > 0 && this.activeScreenIndex < this.screens.length
290
- },
291
- },
292
- mounted () {
293
- this.onScreenEnter()
294
- },
295
- methods: {
296
- preparePreview (e) {
297
- if (this.isPreparing) {
298
- e.preventDefault()
299
- return
300
- }
301
- if (!this.isPrepared) {
302
- e.preventDefault()
303
- this.isPreparing = true
304
- fetch(this.previewUrl).then(() => {
305
- this.isPreparing = false
306
- this.isPrepared = true
307
- })
308
- }
309
- },
310
-
311
- /**
312
- * Submits first feed step.
313
- *
314
- * @return {Promise<any>}
315
- */
316
- submitFeed () {
317
- const data = Object.assign(CONFIG.feedEndpoint.defaultPayload, {
318
- wprss_intro_feed_url: this.form.feedSourceUrl
319
- })
320
- this.isLoading = true
321
- this.isFeedError = false
322
- return post(CONFIG.feedEndpoint.url, data).then((responseData) => {
323
- this.feed.items = responseData.data.feed_items.slice(0, 3)
324
- this.isLoading = false
325
- return {}
326
- }).catch((resp) => {
327
- this.isLoading = false
328
- this.isFeedError = true
329
- throw resp
330
- })
331
- },
332
-
333
- /**
334
- * Continue from items step.
335
- *
336
- * @return {Promise<any>}
337
- */
338
- continueItems () {
339
- this.itemsPassed = true
340
- return Promise.resolve({})
341
- },
342
-
343
- /**
344
- * Complete the introduction and proceed to sources list.
345
- *
346
- * @return {Promise<any>}
347
- */
348
- completeIntroduction () {
349
- return Promise.resolve({})
350
- },
351
-
352
- /**
353
- * Go to the next screen in this wizard.
354
- */
355
- next () {
356
- this.transition = 'slide-up'
357
- const nextTransistor = this.currentScreen.next ? this.currentScreen.next : () => Promise.resolve(false)
358
- this.stepLoading = true
359
- nextTransistor().then(result => {
360
- this.stepLoading = false
361
- }, (err) => {
362
- throw err
363
- }).then(() => {
364
- const nextStepIndex = this.activeScreenIndex + 1
365
- if (nextStepIndex >= this.screens.length) {
366
- this.finish()
367
- }
368
- else {
369
- this.activeScreen = this.screens[nextStepIndex].id
370
- this.onScreenEnter()
371
- }
372
- }).catch((err) => {
373
- console.error(err)
374
- })
375
- },
376
-
377
- /**
378
- * Run on screen event.
379
- */
380
- onScreenEnter () {
381
- this.$nextTick(() => {
382
- if (this.currentScreen.entered) {
383
- this.currentScreen.entered()
384
- }
385
- })
386
- },
387
-
388
- /**
389
- * Focus on some ref input.
390
- */
391
- focusOnInput (refName) {
392
- if (!this.$refs[refName] || !this.$refs[refName].focus) {
393
- return false
394
- }
395
- this.$refs[refName].focus()
396
- },
397
-
398
- /**
399
- * Go back in the wizard on one step.
400
- */
401
- back () {
402
- this.transition = 'slide-down'
403
- this.activeScreen = this.screens[this.activeScreenIndex - 1].id
404
- },
405
-
406
- /**
407
- * Finish this wizard.
408
- */
409
- finish (confirmFinish = false) {
410
- const visitList = () => window.location.href = CONFIG.feedListUrl
411
- if (confirmFinish) {
412
- if (confirm('Are you sure you want to skip the introduction?')) {
413
- visitList()
414
- }
415
- return
416
- }
417
- visitList()
418
- // redirect to the URL.
419
- },
420
-
421
- active (pageName) {
422
- return this.activeScreen === pageName
423
- },
424
-
425
- copyToClipboard () {
426
- if (this.isCopied) {
427
- return
428
- }
429
- copyToClipboard('[wp-rss-aggregator]')
430
- this.isCopied = true
431
- setTimeout(() => {
432
- this.isCopied = false
433
- }, 1000)
434
- }
435
- },
436
- components: {
437
- Expander
438
- }
439
- }
440
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/intro/index.js DELETED
@@ -1,11 +0,0 @@
1
- require('css/src/intro/steps.scss')
2
-
3
- import Vue from 'vue'
4
- import Wizard from './Wizard'
5
- import 'whatwg-fetch'
6
-
7
- new Vue({
8
- el: '#wpra-wizard-app',
9
- template: '<Wizard/>',
10
- components: { Wizard }
11
- })
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/pagination/index.js DELETED
@@ -1,47 +0,0 @@
1
- require('css/src/pagination/index.scss')
2
-
3
- jQuery(document).ready(($) => {
4
- const fetchList = function ($targetEl, params) {
5
- $targetEl.addClass('wpra-loading')
6
-
7
- $([document.documentElement, document.body]).animate({
8
- scrollTop: $targetEl.offset().top - 50
9
- }, 500);
10
-
11
- const template = params.template
12
- delete params.template
13
-
14
- let tmp = template.length? template : '0'
15
- let url = WpraPagination.baseUri.replace('%s', tmp)
16
-
17
- $.ajax({
18
- type: 'POST',
19
- url,
20
- data: JSON.stringify(params),
21
- contentType: 'application/json',
22
- }).done((data) => {
23
- $newEl = $(data.html)
24
- $newEl.find('.colorbox').colorbox({iframe:true, width:'80%', height:'80%'})
25
- $targetEl.replaceWith($newEl)
26
- })
27
- }
28
-
29
- const handleClick = function ($link) {
30
- const $targetEl = $link.closest('[data-template-ctx]')
31
-
32
- const template = $targetEl.data('wpra-template')
33
- const templateOptions = $targetEl.data('template-ctx')
34
-
35
- let options = Object.assign({}, {
36
- template
37
- }, JSON.parse(atob(templateOptions)))
38
- options['page'] = $link.data('wpra-page')
39
-
40
- fetchList($targetEl, options)
41
- }
42
-
43
- $('body').on('click', 'a[data-wpra-page]', function (e) {
44
- e.preventDefault()
45
- handleClick($(this))
46
- });
47
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/plugins/PluginDisablePoll.vue DELETED
@@ -1,122 +0,0 @@
1
- <template>
2
- <div class="wpra-plugin-disable-poll">
3
- <modal :active="isModalVisible"
4
- @close="closeModal"
5
- :header-class="'invisible-header'"
6
- >
7
- <div slot="header">
8
- <div class="wpra-plugin-disable-poll__logo">
9
- <img :src="image('light-line-logo.png')" alt="">
10
- </div>
11
- <h3>
12
- Do you have a moment to share why you are deactivating WP RSS Aggregator?
13
- </h3>
14
- <p>
15
- Your feedback will help us to improve our plugins and service.
16
- </p>
17
- </div>
18
-
19
- <div slot="body">
20
- <SerializedForm :form="form" v-model="model"/>
21
- </div>
22
-
23
- <div slot="footer">
24
- <div class="footer-confirm__buttons">
25
- <button class="button button-clear" @click="deactivate">
26
- Skip & Deactivate
27
- </button>
28
- <button class="button button-primary"
29
- :class="{'loading-button': isDeactivating}"
30
- @click="submit">
31
- Submit & Deactivate
32
- </button>
33
- </div>
34
- </div>
35
- </modal>
36
- </div>
37
- </template>
38
-
39
- <script>
40
- import Modal from 'app/components/Modal'
41
- import SerializedForm from 'app/components/SerializedForm'
42
- import axios from 'axios'
43
-
44
- /**
45
- * Selector string for plugin's deactivation link.
46
- *
47
- * @type {string}
48
- */
49
- const deactivateSelector = '[data-slug="wp-rss-aggregator"] .deactivate a'
50
- const deactivateLink = document.querySelector(deactivateSelector)
51
-
52
- export default {
53
- components: {
54
- Modal,
55
- SerializedForm,
56
- },
57
- data () {
58
- return {
59
- isDeactivating: false,
60
- deactivateUrl: null,
61
- submitUrl: WrpaDisablePoll.url,
62
- model: WrpaDisablePoll.model,
63
- form: WrpaDisablePoll.form,
64
- audience: WrpaDisablePoll.audience || 100,
65
- isModalVisible: false
66
- }
67
- },
68
- watch: {
69
- 'model.reason' () {
70
- this.model.follow_up = null
71
- }
72
- },
73
- mounted () {
74
- const isVisible = this.getRandomInt(0, 100) < this.audience
75
- if (isVisible) {
76
- deactivateLink.addEventListener('click', this.handleDeactivateClick)
77
- }
78
- },
79
- methods: {
80
- getRandomInt (min, max) {
81
- min = Math.ceil(min);
82
- max = Math.floor(max);
83
- return Math.floor(Math.random() * (max - min + 1)) + min;
84
- },
85
-
86
- image (path) {
87
- return WrpaDisablePoll.image + path
88
- },
89
-
90
- handleDeactivateClick (e) {
91
- if (this.isModalVisible) {
92
- return
93
- }
94
-
95
- e.preventDefault()
96
- this.isModalVisible = true
97
- },
98
-
99
- closeModal () {
100
- this.isModalVisible = false
101
- this.deactivateUrl = null
102
- },
103
-
104
- submit () {
105
- this.isDeactivating = true
106
- axios.post(this.submitUrl, this.model, {
107
- headers: {
108
- 'Content-Type': 'application/x-www-form-urlencoded'
109
- }
110
- }).then(() => {
111
- this.deactivate()
112
- }).finally(() => {
113
- this.isDeactivating = false
114
- })
115
- },
116
-
117
- deactivate () {
118
- deactivateLink.click()
119
- }
120
- }
121
- }
122
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/plugins/index.js DELETED
@@ -1,10 +0,0 @@
1
- require('css/src/plugins/index.scss')
2
-
3
- import Vue from 'vue'
4
- import PluginDisablePoll from './PluginDisablePoll'
5
-
6
- new Vue({
7
- el: '#wpra-plugins-app',
8
- template: '<PluginDisablePoll/>',
9
- components: { PluginDisablePoll }
10
- })
 
 
 
 
 
 
 
 
 
 
js/src/modules/templates/Edit.js DELETED
@@ -1,491 +0,0 @@
1
- import Postbox from 'app/components/Postbox'
2
- import Main from 'app/components/Main'
3
- import Sidebar from 'app/components/Sidebar'
4
- import Layout from 'app/components/Layout'
5
- import RouteLink from 'app/components/RouteLink'
6
- import Input from 'app/components/Input'
7
- import Button from 'app/components/Button'
8
- import NoticeBlock from 'app/components/NoticeBlock'
9
- import deepmerge from 'app/utils/deepmerge'
10
- import DataChangesAware from 'app/mixins/DataChangesAware'
11
- import jsonClone from 'app/utils/jsonClone'
12
- import base64 from 'app/utils/base64'
13
- import { copyToClipboard } from 'app/utils/copy'
14
-
15
- export default {
16
- mixins: [DataChangesAware],
17
- data () {
18
- return {
19
- typeOptions: Object.keys(WpraTemplates.options.type)
20
- .filter(key => key[0] !== '_')
21
- .reduce((acc, key) => {
22
- acc[key] = WpraTemplates.options.type[key]
23
- return acc
24
- }, {}),
25
-
26
- model: jsonClone(WpraTemplates.model_schema),
27
- validation: jsonClone(WpraTemplates.model_schema),
28
- tooltips: jsonClone(WpraTemplates.model_tooltips),
29
-
30
- baseUrl: WpraTemplates.base_url,
31
- isSaving: false,
32
- isLoading: false,
33
- }
34
- },
35
- inject: [
36
- 'hooks',
37
- 'http',
38
- 'router',
39
- 'notification',
40
- ],
41
- mounted () {
42
- this.resolveEditingItem()
43
- },
44
- computed: {
45
- previewUrl () {
46
- let options = base64.encode(JSON.stringify(this.model.options))
47
-
48
- return `${WpraGlobal.admin_base_url}?wpra_preview_template=${this.router.params.id}&wpra_template_options=${options}`
49
- }
50
- },
51
- methods: {
52
- resolveEditingItem () {
53
- let modelDefault = deepmerge(jsonClone(WpraTemplates.model_schema), this.$store.state.templates.preset)
54
-
55
- this.isLoading = true
56
- const loadItem = () => {
57
- const id = this.router.params.id
58
- if (!id) {
59
- return Promise.resolve(null)
60
- }
61
- let item = this.$store.getters['templates/item'](id)
62
- if (item) {
63
- return Promise.resolve(item)
64
- }
65
- return this.http.get(`${this.baseUrl}/${id}`).then(response => {
66
- return response.data
67
- })
68
- }
69
-
70
- loadItem().then(item => {
71
- this.isLoading = false
72
- if (!item) {
73
- this.$set(this, 'model', modelDefault)
74
- this.rememberModel()
75
- return
76
- }
77
- item = Object.assign({}, item)
78
- this.model = deepmerge(this.model, item)
79
- this.rememberModel()
80
- })
81
- },
82
- save () {
83
- const isNew = !this.model.id
84
- this.isSaving = true
85
- this.runRequest().then(response => {
86
- this.model = deepmerge(this.model, response.data)
87
- this.rememberModel()
88
-
89
- this.notification.show('Template saved!', {
90
- type: 'success',
91
- icon (el) {
92
- el.classList.add('dashicons', 'dashicons-yes')
93
- return el
94
- },
95
- })
96
-
97
- if (!isNew) {
98
- return
99
- }
100
- this.router.navigate({
101
- name: 'templates',
102
- params: {
103
- action: 'edit',
104
- id: response.data.id
105
- }
106
- })
107
- }, response => {
108
- this.notification.show('Something went wrong. Template is not saved!', {
109
- type: 'error',
110
- icon (el) {
111
- el.classList.add('dashicons', 'dashicons-warning')
112
- return el
113
- },
114
- })
115
- }).finally(() => {
116
- this.isSaving = false
117
- })
118
- },
119
- runRequest () {
120
- const method = this.model.id ? 'put' : 'post'
121
- const url = this.model.id ? `${this.baseUrl}/${this.model.id}` : this.baseUrl
122
- return this.http[method](url, this.prepareModel())
123
- },
124
- prepareModel () {
125
- const availableKeys = Object.keys(WpraTemplates.model_schema)
126
-
127
- return Object.keys(this.model)
128
- .filter(key => {
129
- /*
130
- * Only keys from model_schema can be saved.
131
- */
132
- if (!availableKeys.includes(key)) {
133
- return false
134
- }
135
-
136
- /*
137
- * Name and type shouldn't be passed for default template.
138
- */
139
- if (this.model.type === '__built_in' && ['name', 'type'].includes(key)) {
140
- return false
141
- }
142
-
143
- /*
144
- * Slug and ID fields are always ignored and not sent in the request body.
145
- */
146
- return !['slug', 'id'].includes(key)
147
- })
148
- .reduce((acc, key) => {
149
- acc[key] = this.model[key]
150
- return acc
151
- }, {})
152
- },
153
- getShortcode () {
154
- return `[wp-rss-aggregator template="${this.model.slug}"]`
155
- },
156
- preventLoosingNotSavedData () {
157
- return !this.isChanged() || confirm('You have unsaved changes. All changes will be lost if you go back to the Template list before updating. Are you sure you want to continue?')
158
- },
159
- copyShortcode (e) {
160
- copyToClipboard(this.getShortcode())
161
-
162
- const text = e.target.innerText
163
-
164
- e.target.style.width = e.target.getBoundingClientRect().width + 'px'
165
- e.target.disabled = true
166
- e.target.innerText = 'Copied!'
167
-
168
- setTimeout(() => {
169
- e.target.style.width = null
170
- e.target.innerText = text
171
- e.target.disabled = false
172
- }, 5000)
173
- },
174
- },
175
- render () {
176
- let back = {
177
- name: 'templates'
178
- }
179
-
180
- let minorActions = null,
181
- shortcode = null,
182
- noticeBlock = <NoticeBlock
183
- class={'postbox'}
184
- id={'templates-usage'}
185
- title={'Setting up your Templates'}
186
- body={'Templates are used to display the items imported using WP RSS Aggregator. Choose the preferred options ' +
187
- 'below and use them anywhere on your site via our <a href="https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode#tinymce" target="_blank">shortcode</a> ' +
188
- 'or our <a href="https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg" target="_blank">block</a>.'}
189
- learnMore={'https://kb.wprssaggregator.com/article/457-templates'}
190
- />
191
-
192
- if (this.router.params.id) {
193
- minorActions = <div id="" style={{padding: '6px 0'}}>
194
- <div class="misc-pub-section misc-pub-visibility">
195
- <a href={this.previewUrl}
196
- class="wpra-preview-link"
197
- role="button"
198
- target="wpra-preview-template"
199
- style={{marginLeft: '4px', textDecoration: 'none'}}
200
- >
201
- Open preview
202
- <span class="dashicons dashicons-external"/>
203
- </a>
204
- </div>
205
- </div>
206
- }
207
-
208
- if (this.model.id) {
209
- shortcode = <div class="wpra-shortcode-copy" title={'Copy chortcode'}>
210
- <div class="wpra-shortcode-copy__content">
211
- <strong>Shortcode: </strong>
212
- <code>{ this.getShortcode() }</code>
213
- </div>
214
- <div class="wpra-shortcode-copy__icon">
215
- <button class="button" onClick={this.copyShortcode}>Copy Shortcode</button>
216
- </div>
217
- </div>
218
- }
219
-
220
- let content = <div>
221
- <div class="page-title">
222
- <RouteLink class="back-button" path={back} gate={this.preventLoosingNotSavedData}>
223
- <span class="dashicons dashicons-arrow-left-alt"></span>
224
- Templates
225
- </RouteLink>
226
- <h1 class="wp-heading-inline">
227
- {this.router.params.id ? (this.changes.model.name || this.changes.model.slug) : 'Create a New Template'}
228
- </h1>
229
- {shortcode}
230
- </div>
231
- <div id="poststuff">
232
- {
233
- this.isLoading ? <div class="loading-container"/> : <Layout class="metabox-holder columns-2">
234
- <Main>
235
- {noticeBlock}
236
- <Postbox id="template-details" title="Template Details" context={this}>
237
- <Input type="text"
238
- label={'Template name'}
239
- value={this.model.name}
240
- onInput={(e) => this.model.name = e}
241
- disabled={this.model.type === '__built_in'}
242
- />
243
- <Input type="select"
244
- label={'Template type'}
245
- value={this.model.type}
246
- options={this.typeOptions}
247
- onInput={(e) => this.model.type = e}
248
- disabled={this.model.type === '__built_in'}
249
- inputDisabled={!WpraTemplates.options.is_type_enabled}
250
- description={
251
- WpraTemplates.options.is_type_enabled ? null : '<div class="disable-ignored"><strong class="disable-ignored">Get more template types, including a customisable grid template.</strong> <a target="_blank" href="https://www.wprssaggregator.com/extensions/templates/" class="disable-ignored">Learn more.</a></div>'
252
- }
253
- />
254
- {
255
- (this.model.type === '__built_in') ?
256
- <div class="wpra-info-box">
257
- <div class="wpra-info-box__icon">
258
- <span class="dashicons dashicons-info"/>
259
- </div>
260
- <div class="wpra-info-box__text">
261
- This is the default template for WP RSS Aggregator. It is used as the fallback template when one is not selected via the shortcode or block. To create a new one, please go back to the Templates List.
262
- </div>
263
- </div>
264
- :
265
- null
266
- }
267
- </Postbox>
268
- <Postbox id="template-options" title="Template Options" context={this}>
269
- <Input type="checkbox"
270
- label={'Link title to original article'}
271
- value={this.model.options.title_is_link}
272
- onInput={(e) => this.model.options.title_is_link = e}
273
- title={this.tooltips.options.title_is_link}
274
- />
275
- <Input type="number"
276
- label={'Title maximum length'}
277
- value={this.model.options.title_max_length || ''}
278
- placeholder={'No limit'}
279
- onInput={(e) => this.model.options.title_max_length = e}
280
- title={this.tooltips.options.title_max_length}
281
- />
282
- <Input type="number"
283
- label={'Number of items to show'}
284
- value={this.model.options.limit || ''}
285
- onInput={(e) => this.model.options.limit = (e === '') ? 0 : e}
286
- title={this.tooltips.options.limit}
287
- placeholder={"Show all items"}
288
- min="0"
289
- />
290
-
291
- <div id={'wpra-list-template-publish-date'} style={{paddingTop: '10px'}}>
292
- <Input type="checkbox"
293
- label={'Show publish date'}
294
- value={this.model.options.date_enabled}
295
- onInput={(e) => this.model.options.date_enabled = e}
296
- style={{fontWeight: 'bold'}}
297
- title={this.tooltips.options.date_enabled}
298
- />
299
- <Input type="text"
300
- label={'Date prefix'}
301
- value={this.model.options.date_prefix}
302
- onInput={(e) => this.model.options.date_prefix = e}
303
- disabled={!this.model.options.date_enabled}
304
- title={this.tooltips.options.date_prefix}
305
- />
306
- <Input type="text"
307
- label={'Date format'}
308
- value={this.model.options.date_format}
309
- onInput={(e) => this.model.options.date_format = e}
310
- disabled={this.model.options.date_use_time_ago || !this.model.options.date_enabled}
311
- title={this.tooltips.options.date_format}
312
- />
313
- <Input type="checkbox"
314
- label={'Use "time ago" format'}
315
- description={'Example: 20 minutes ago'}
316
- value={this.model.options.date_use_time_ago}
317
- onInput={(e) => this.model.options.date_use_time_ago = e}
318
- disabled={!this.model.options.date_enabled}
319
- title={this.tooltips.options.date_use_time_ago}
320
- />
321
- </div>
322
-
323
- <div id={'wpra-list-template-source'} style={{paddingTop: '10px'}}>
324
- <Input type="checkbox"
325
- label={'Show source name'}
326
- value={this.model.options.source_enabled}
327
- onInput={(e) => this.model.options.source_enabled = e}
328
- style={{fontWeight: 'bold'}}
329
- title={this.tooltips.options.source_enabled}
330
- />
331
- <Input type="text"
332
- label={'Source prefix'}
333
- value={this.model.options.source_prefix}
334
- onInput={(e) => this.model.options.source_prefix = e}
335
- disabled={!this.model.options.source_enabled}
336
- title={this.tooltips.options.source_prefix}
337
- />
338
- <Input type="checkbox"
339
- label={'Link source name'}
340
- value={this.model.options.source_is_link}
341
- onInput={(e) => this.model.options.source_is_link = e}
342
- disabled={!this.model.options.source_enabled}
343
- title={this.tooltips.options.source_is_link}
344
- />
345
- </div>
346
-
347
- <div id={'wpra-list-template-author'} style={{paddingTop: '10px'}}>
348
- <Input type="checkbox"
349
- label={'Show author name'}
350
- value={this.model.options.author_enabled}
351
- onInput={(e) => this.model.options.author_enabled = e}
352
- style={{fontWeight: 'bold'}}
353
- title={this.tooltips.options.author_enabled}
354
- />
355
- <Input type="text"
356
- label={'Author prefix'}
357
- value={this.model.options.author_prefix}
358
- onInput={(e) => this.model.options.author_prefix = e}
359
- disabled={!this.model.options.author_enabled}
360
- title={this.tooltips.options.author_prefix}
361
- />
362
- </div>
363
-
364
- <div id={'wpra-list-template-pagination'} style={{paddingTop: '10px'}}>
365
- <Input type="checkbox"
366
- label={'Pagination'}
367
- value={this.model.options.pagination}
368
- onInput={(e) => this.model.options.pagination = e}
369
- style={{fontWeight: 'bold'}}
370
- title={this.tooltips.options.pagination}
371
- disabled={parseInt(this.model.options.limit) < 1 || !this.model.options.limit}
372
- />
373
- <Input type="select"
374
- label={'Pagination style'}
375
- options={WpraTemplates.options.pagination_type}
376
- value={this.model.options.pagination_type}
377
- onInput={(e) => this.model.options.pagination_type = e}
378
- disabled={!this.model.options.pagination || parseInt(this.model.options.limit) < 1 || !this.model.options.limit}
379
- title={this.tooltips.options.pagination_type}
380
- />
381
- </div>
382
-
383
- <div id={'wpra-list-template-bullets'} style={{paddingTop: '10px'}}>
384
- <Input type="checkbox"
385
- label={'Show bullets'}
386
- value={this.model.options.bullets_enabled}
387
- onInput={(e) => this.model.options.bullets_enabled = e}
388
- style={{fontWeight: 'bold'}}
389
- title={this.tooltips.options.bullets_enabled}
390
- />
391
- <Input type="select"
392
- label={'Bullet style'}
393
- options={WpraTemplates.options.bullet_type}
394
- value={this.model.options.bullet_type}
395
- onInput={(e) => this.model.options.bullet_type = e}
396
- disabled={!this.model.options.bullets_enabled}
397
- title={this.tooltips.options.bullet_type}
398
- />
399
- </div>
400
- </Postbox>
401
- </Main>
402
- <Sidebar>
403
- <Postbox id="template-create"
404
- title={this.model.id ? 'Update Template' : 'Create Template'}
405
- submit={true}
406
- class={'wpra-postbox-last'}
407
- context={this}
408
- >
409
- <div class="submitbox" id="submitpost">
410
- {minorActions}
411
-
412
- <div id="major-publishing-actions">
413
- <div id="delete-action">
414
- {
415
- this.isChanged() ? <a href="#" class="submitdelete" onClick={(e) => {
416
- e.preventDefault()
417
- this.cancelChanges()
418
- }}>
419
- Cancel Changes
420
- </a> : null
421
- }
422
- </div>
423
-
424
- <div id="publishing-action">
425
- <Button class="button-primary button-large"
426
- loading={this.isSaving}
427
- nativeOnClick={this.save}
428
- >
429
- {this.model.id ? 'Save' : 'Publish'}
430
- </Button>
431
- </div>
432
- <div class="clear"></div>
433
- </div>
434
- </div>
435
- </Postbox>
436
- <Postbox id="template-link-preferences" title="Link Preferences" context={this}>
437
- <p style={{opacity: .65}}>
438
- These options apply to all links within this template.
439
- </p>
440
- <Input type="checkbox"
441
- label={'Set links as nofollow'}
442
- value={this.model.options.links_nofollow}
443
- onInput={(e) => this.model.options.links_nofollow = e}
444
- title={this.tooltips.options.links_nofollow}
445
- />
446
- <Input type="select"
447
- label={'Open links behaviour'}
448
- class="form-input--vertical"
449
- value={this.model.options.links_behavior}
450
- options={WpraTemplates.options.links_behavior}
451
- onInput={(e) => this.model.options.links_behavior = e}
452
- title={this.tooltips.options.links_behavior}
453
- />
454
- {
455
- (this.model.options.links_behavior === 'lightbox' )?
456
- <div class="notice notice-info notice-alt">
457
- <p>Some sites may not allow their content to be shown in a lightbox.</p>
458
- <p>Embedded content usually works. Try ticking the below checkbox.</p>
459
- <p>
460
- <a href="https://kb.wprssaggregator.com/article/471-q-why-wont-some-of-my-feed-items-work-with-the-lightbox-link-behaviour-for-templates"
461
- target="_blank">
462
- {'Learn more'}
463
- </a>
464
- </p>
465
- </div>
466
- : null
467
- }
468
- <Input type="checkbox"
469
- label={'Set links to open embeds'}
470
- value={this.model.options.link_to_embed}
471
- onInput={(e) => this.model.options.link_to_embed = e}
472
- title={this.tooltips.options.link_to_embed}
473
- />
474
- </Postbox>
475
- <Postbox id="template-custom-css" title="Custom Style" context={this}>
476
- <Input type="text"
477
- class="form-input--vertical"
478
- label={'Custom HTML class name'}
479
- value={this.model.options.custom_css_classname}
480
- onInput={(e) => this.model.options.custom_css_classname = e}
481
- title={this.tooltips.options.custom_css_classname}
482
- />
483
- </Postbox>
484
- </Sidebar>
485
- </Layout>
486
- }
487
- </div>
488
- </div>
489
- return this.hooks.apply('wpra-templates-form', this, content)
490
- }
491
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/templates/List.js DELETED
@@ -1,352 +0,0 @@
1
- import VueTable from '@rebelcode/vue-wp-list-table/dist/vue-wp-list-table.common'
2
- import RouteLink from 'app/components/RouteLink'
3
- import Input from 'app/components/Input'
4
- import BottomPanel from 'app/components/BottomPanel'
5
- import jsonClone from 'app/utils/jsonClone'
6
- import collect from 'app/utils/Collection'
7
-
8
- export default {
9
- data () {
10
- return {
11
- loading: false,
12
-
13
- columns: {
14
- name: {
15
- label: ('Template Name'),
16
- class: 'column-primary'
17
- },
18
- style: {
19
- label: ('Template Type'),
20
- },
21
- previewTemplate: {
22
- label: ('Preview')
23
- }
24
- },
25
-
26
- filters: WpraTemplates.options.type,
27
-
28
- checked: [],
29
-
30
- filter: {
31
- paged: parseInt(this.router.params.paged || 1),
32
- type: this.router.params.type || '',
33
- s: this.router.params.s || '',
34
- },
35
-
36
- baseUrl: WpraTemplates.base_url,
37
-
38
- total: 0,
39
- }
40
- },
41
- inject: [
42
- 'hooks',
43
- 'http',
44
- 'router',
45
- ],
46
- computed: {
47
- totalPages () {
48
- return Math.ceil(this.total / 20)
49
- },
50
- list: {
51
- get () {
52
- return this.$store.state.templates.items
53
- },
54
- set (value) {
55
- this.$store.commit('templates/set', value)
56
- },
57
- }
58
- },
59
- methods: {
60
- navigated () {
61
- Object.keys(this.filter).forEach(key => {
62
- this.filter[key] = this.router.params[key] || ''
63
- })
64
- this.filter.paged = parseInt(this.filter.paged || 1)
65
- this.fetchList()
66
- },
67
-
68
- fetchList () {
69
- this.loading = true
70
-
71
- let params = this.getParams()
72
-
73
- let paged = parseInt(params.paged)
74
- delete params.paged
75
- if (!!paged && paged !== 1) {
76
- params['page'] = paged
77
- }
78
-
79
- return this.http.get(this.baseUrl, {
80
- params
81
- }).then((response) => {
82
- this.list = response.data.items
83
- this.total = response.data.count
84
- }).finally(() => {
85
- this.loading = false
86
- })
87
- },
88
-
89
- deleteTemplate (id) {
90
- if (!confirm('Are you sure you want to delete this template? If this template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead.')) {
91
- return
92
- }
93
- this.loading = true
94
- return this.http.delete(`${this.baseUrl}/${id}`).then(() => {
95
- return this.fetchList()
96
- }).then(() => {
97
- this.loading = false
98
- })
99
- },
100
-
101
- bulkDelete () {
102
- if (!confirm('Are you sure you want to delete these templates? If a template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead.')) {
103
- return
104
- }
105
- this.loading = true
106
- return this.http.delete(this.baseUrl, {
107
- params: {
108
- ids: this.checked
109
- }
110
- }).then(() => {
111
- this.checked = []
112
- this.$refs.table.checkedItems = []
113
- return this.fetchList()
114
- }).then(() => {
115
- this.loading = false
116
- })
117
- },
118
-
119
- duplicateTemplate (row) {
120
- let template = jsonClone(row)
121
-
122
- delete template.id
123
-
124
- if (template.type === '__built_in') {
125
- delete template.type
126
- }
127
-
128
- // add copy to the title so it is mor obvious for the user that this is duplicate.
129
- template.name = `${template.name} (Copy)`
130
-
131
- this.$store.commit('templates/updatePreset', template)
132
- this.router.navigate({
133
- name: 'templates',
134
- params: {
135
- action: 'new',
136
- }
137
- })
138
- },
139
-
140
- getPreviewLink (row) {
141
- return `${WpraGlobal.admin_base_url}?wpra_preview_template=${row.id}`
142
- },
143
-
144
- createTemplate () {
145
- this.$store.commit('templates/updatePreset', {})
146
- this.router.navigate({
147
- name: 'templates',
148
- params: {
149
- action: 'new',
150
- }
151
- })
152
- },
153
-
154
- setChecked (values) {
155
- this.checked = values.filter(id => {
156
- return collect(this.list).find(id, {}).type !== '__built_in'
157
- })
158
- },
159
-
160
- getParams () {
161
- return Object.keys(this.filter).filter(key => {
162
- return !!this.filter[key] && this.filter[key] !== 'all'
163
- }).reduce((acc, key) => {
164
- acc[key] = this.filter[key]
165
- return acc
166
- }, {})
167
- },
168
-
169
- setFilter (name, value) {
170
- this.filter[name] = value
171
- },
172
-
173
- submitFilter () {
174
- this.router.mergeParams(this.getParams())
175
- },
176
-
177
- getRowClass (row) {
178
- return row.type === '__built_in' ? 'built-in' : ''
179
- }
180
- },
181
- render () {
182
- const editPath = (id) => {
183
- return {
184
- name: 'templates',
185
- params: {
186
- action: 'edit',
187
- id,
188
- }
189
- }
190
- }
191
-
192
- let cells = this.hooks.apply('wpra-templates-list-cells', this, {
193
- name: ({row}) => {
194
- return [
195
- <div>
196
- <strong><RouteLink path={editPath(row.id)}>{row.name}</RouteLink></strong>
197
- <small style={{paddingLeft: '4px', opacity: '0.6'}}>{row.slug}</small>
198
- {
199
- (row.type === '__built_in') ?
200
- <span style={{opacity: '0.6', display: 'block'}}>
201
- This is the default feed template. To create your own, either duplicate it or click "Add New" above.
202
- </span>
203
- :
204
- null
205
- }
206
- </div>,
207
- <div class="row-actions">
208
- <span className="edit">
209
- <RouteLink path={editPath(row.id)}>Edit</RouteLink> |
210
- </span>
211
- <span class="inline" style={{paddingLeft: '4px'}}>
212
- <a href="#"
213
- onClick={(e) => {
214
- e.preventDefault()
215
- this.duplicateTemplate(row)
216
- }}
217
- >Duplicate</a> {row.type !== '__built_in' ? '|' : ''}
218
- </span>
219
- {
220
- (row.type !== '__built_in')
221
- ?
222
- <span class="trash" style={{paddingLeft: '4px'}} onClick={(e) => {
223
- e.preventDefault()
224
- this.deleteTemplate(row.id)
225
- }}>
226
- <a href="#" class="submitdelete" aria-label="Delete Item">Delete</a>
227
- </span>
228
- :
229
- null
230
- }
231
- </div>
232
- ]
233
- },
234
- style: ({row}) => {
235
- if (this.filters[row.type]) {
236
- return [
237
- <div>{this.filters[row.type]}</div>
238
- ]
239
- }
240
-
241
- return [
242
- <div>
243
- {this.filters.list}
244
- &nbsp;
245
- <span style={{opacity: 0.7, fontSize: '90%'}}>
246
- (Missing type: <code>{row.type}</code>)
247
- </span>
248
- </div>
249
- ];
250
- },
251
- previewTemplate: ({row}) => {
252
- return [
253
- <div>
254
- <a href={this.getPreviewLink(row)}
255
- target="wpra-preview-template"
256
- class="wpra-preview-link"
257
- >
258
- Open preview <span class="dashicons dashicons-external"></span>
259
- </a>
260
- </div>
261
- ]
262
- },
263
- filters: () => {
264
- let templateTypes = Object.keys(WpraTemplates.options.type)
265
- .filter(key => key[0] !== '_')
266
- .reduce((carry, key) => {
267
- carry[key] = WpraTemplates.options.type[key]
268
- return carry
269
- }, {
270
- 'all': 'Select Template Type',
271
- })
272
- return [
273
- <Input type="select"
274
- style={{margin: 0}}
275
- options={templateTypes}
276
- value={this.filter.type}
277
- onInput={(value) => {
278
- this.filter.type = value
279
- this.submitFilter()
280
- }}
281
- />
282
- ]
283
- }
284
- })
285
-
286
- let content = <div>
287
- <h1 class="wp-heading-inline">Templates</h1>
288
- <a class="page-title-action"
289
- href="#"
290
- onClick={e => {
291
- e.preventDefault()
292
- this.createTemplate()
293
- }}
294
- >Add New</a>
295
-
296
- <p class="search-box" style={{padding: '10px 0'}}>
297
- <label class="screen-reader-text" for="post-search-input">Search Templates:</label>
298
- <input type="search"
299
- id="post-search-input"
300
- name="s"
301
- value={this.filter.s}
302
- onInput={e => this.filter.s = e.target.value}
303
- onKeyup:enter={this.submitFilter}
304
- />
305
- <input type="submit" id="search-submit" class="button" value="Search Templates"
306
- onClick={this.submitFilter}
307
- />
308
- </p>
309
-
310
- <hr class="wp-header-end"/>
311
-
312
- <VueTable
313
- onChecked={this.setChecked}
314
- onPagination={page => {
315
- this.filter.paged = page
316
- this.submitFilter()
317
- }}
318
- columns={this.columns}
319
- rows={this.list}
320
- loading={this.loading}
321
- totalItems={this.total}
322
- perPage={20}
323
- totalPages={this.totalPages}
324
- currentPage={this.filter.paged}
325
- ref="table"
326
- notFound="No templates found."
327
- rowClass={this.getRowClass}
328
- class={{
329
- 'wpra-no-cb': this.list.length === 0 || (this.list.length === 1 && this.list[0].type === '__built_in')
330
- }}
331
- scopedSlots={
332
- cells
333
- }
334
- />
335
-
336
- {
337
- this.checked.length ? <BottomPanel>
338
- <div class="flex-row">
339
- <div class="flex-col">
340
- <div class="wpra-bottom-panel__title">Bulk Actions</div>
341
- <a href="#" onClick={(e) => {
342
- e.preventDefault()
343
- this.bulkDelete()
344
- }}>Delete</a>
345
- </div>
346
- </div>
347
- </BottomPanel> : null
348
- }
349
- </div>
350
- return this.hooks.apply('wpra-templates-list', this, content)
351
- }
352
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/templates/app.js DELETED
@@ -1,117 +0,0 @@
1
- import axios from 'axios'
2
- import toasted from 'vue-toasted'
3
- import VueTippy from 'vue-tippy'
4
-
5
- import Vuex from 'vuex'
6
- import List from './List'
7
- import Edit from './Edit'
8
-
9
- import makeRouterApp from 'app/components/RouterApp'
10
- import Router from 'app/libs/Router'
11
- import templates from './store'
12
- import NotificationCenter from 'app/libs/NotificationCenter'
13
-
14
- import components from 'app/components'
15
-
16
- /**
17
- * Main application's container.
18
- */
19
- export default {
20
- register (services) {
21
- /*
22
- * Component for editing templates.
23
- */
24
- services['TemplateEdit'] = () => Edit
25
-
26
- /*
27
- * Component for managing templates.
28
- */
29
- services['TemplateList'] = () => List
30
-
31
- /*
32
- * Application router instance.
33
- */
34
- services['router'] = ({ document, TemplateEdit, TemplateList }) => {
35
- return new Router([{
36
- route: WpraGlobal.templates_url_base + '&action',
37
- name: 'templates-form',
38
- component: TemplateEdit,
39
- }, {
40
- route: WpraGlobal.templates_url_base,
41
- name: 'templates',
42
- component: TemplateList,
43
- }], {
44
- afterNavigating: () => {
45
- document.querySelector('html').scrollTop = 0
46
- }
47
- })
48
- }
49
-
50
- /*
51
- * Application with client side routes.
52
- */
53
- services['App'] = (container) => {
54
- return makeRouterApp(container)
55
- }
56
-
57
- /*
58
- * Setup and register central storage management.
59
- */
60
- services['vuex'] = ({ vue }) => {
61
- vue.use(Vuex)
62
- return Vuex
63
- }
64
-
65
- services['notification'] = ({ vue }) => {
66
- vue.use(toasted, {
67
- position: 'top-center',
68
- duration: 4000,
69
- iconPack: 'callback'
70
- })
71
- return new NotificationCenter(vue.toasted.show, vue.toasted.error)
72
- }
73
-
74
- services['store'] = ({ vuex }) => {
75
- return new vuex.Store({
76
- modules: {
77
- templates
78
- },
79
- state: {}
80
- })
81
- }
82
-
83
- services['http'] = () => {
84
- /*
85
- * Create authorized client for requests when nonce
86
- * exists in global WPRA variable.
87
- */
88
- let httpClientOptions = !!WpraGlobal && !!WpraGlobal.nonce ? {
89
- headers: {
90
- 'X-WP-Nonce': WpraGlobal.nonce,
91
- }
92
- } : {}
93
- return axios.create(httpClientOptions)
94
- }
95
-
96
- /*
97
- * Register components.
98
- */
99
- for(const [name, definition] of Object.entries(components)) {
100
- services[name] = () => definition
101
- }
102
-
103
- return services
104
- },
105
- run ({ container }) {
106
- /*
107
- * Enable tippy.js tooltips.
108
- */
109
- container.vue.use(VueTippy, {
110
- theme: 'light',
111
- animation: 'fade',
112
- arrow: true,
113
- arrowTransform: 'scale(0)',
114
- placement: 'right'
115
- })
116
- },
117
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/templates/index.js DELETED
@@ -1,36 +0,0 @@
1
- require('css/src/templates/index.scss')
2
-
3
- import * as UiFramework from '@rebelcode/ui-framework'
4
- import Bottle from 'bottlejs'
5
- import TemplatesApplication from './app'
6
- import Vue from 'vue'
7
-
8
- const { Container, Core, Services } = UiFramework
9
-
10
- /*
11
- * Extend UI framework object.
12
- */
13
- if (window.UiFramework) {
14
- window.UiFramework = Object.assign({}, window.UiFramework, Core.UiFramework)
15
- }
16
-
17
- let services = {
18
- uiFramework: UiFramework,
19
- hooks: new Services.HookService,
20
- document: document,
21
- vue: function (container) {
22
- Vue.use(container.uiFramework.Core.InjectedComponents, {
23
- container
24
- })
25
- return Vue
26
- }
27
- }
28
- const containerFactory = new Container.ContainerFactory(Bottle)
29
- const app = new Core.UiFramework.App(containerFactory, services)
30
-
31
- window.UiFramework.registerPlugin('templates-app', TemplatesApplication)
32
-
33
- app.use(WpraTemplates.modules || ['templates-app'])
34
- app.init({
35
- '#wpra-templates-app': 'App',
36
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/templates/store/actions.js DELETED
@@ -1 +0,0 @@
1
- export default {}
 
js/src/modules/templates/store/getters.js DELETED
@@ -1,7 +0,0 @@
1
- import collect from 'app/utils/Collection'
2
-
3
- export default {
4
- item: state => id => {
5
- return collect(state.items).find(id)
6
- }
7
- }
 
 
 
 
 
 
 
js/src/modules/templates/store/index.js DELETED
@@ -1,12 +0,0 @@
1
- import mutations from './mutations'
2
- import actions from './actions'
3
- import state from './state'
4
- import getters from './getters'
5
-
6
- export default {
7
- namespaced: true,
8
- mutations,
9
- actions,
10
- state,
11
- getters,
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
js/src/modules/templates/store/mutations.js DELETED
@@ -1,10 +0,0 @@
1
- export default {
2
- set (state, items = []) {
3
- state.isInitialized = true
4
- state.items = items
5
- },
6
-
7
- updatePreset (state, preset = null) {
8
- state.preset = preset
9
- }
10
- }
 
 
 
 
 
 
 
 
 
 
js/src/modules/templates/store/state.js DELETED
@@ -1,18 +0,0 @@
1
- export default {
2
- /*
3
- * Whether the templates was initialized.
4
- *
5
- * @todo: remove it. This is trick to not handle proper route params watcher.
6
- */
7
- isInitialized: false,
8
-
9
- /*
10
- * All loaded template items.
11
- */
12
- items: [],
13
-
14
- /*
15
- * Predefined template value. Used for items duplication.
16
- */
17
- preset: {},
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/utils/Collection.js DELETED
@@ -1,178 +0,0 @@
1
- class Collection {
2
- constructor (data, primaryField = 'id') {
3
- this.data = data
4
- this.primaryField = primaryField
5
- return this
6
- }
7
-
8
- /**
9
- * Find element by params
10
- *
11
- * @param params
12
- * @param _default
13
- * @returns {*}
14
- */
15
- find (params, _default = null) {
16
- if (typeof params !== 'object' && params !== null) {
17
- params = {
18
- [this.primaryField]: params
19
- }
20
- }
21
- for (let i in this.data) {
22
- if (this._isMatching(this.data[i], params)) {
23
- return this.data[i]
24
- }
25
- }
26
-
27
- return _default
28
- }
29
-
30
- /**
31
- * Get and left only one column
32
- *
33
- * @param field
34
- * @returns {*}
35
- */
36
- pluck (field) {
37
- return this.data.map((item) => {
38
- return item[field]
39
- })
40
- }
41
-
42
- /**
43
- * Remove all elements matching given params
44
- *
45
- * @param params
46
- */
47
- remove (params) {
48
- for (let i in this.data) {
49
- if (this._isMatching(this.data[i], params)) {
50
- this.data.splice(i, 1)
51
- }
52
- }
53
- return this
54
- }
55
-
56
- /**
57
- * Add data from parameter array that not in
58
- * collection;
59
- *
60
- * @param data
61
- */
62
- appendDiff (data) {
63
- for (let el of data) {
64
- if (!this.contains(el)) {
65
- this.data.push(el)
66
- }
67
- }
68
- }
69
-
70
- /**
71
- * Add data from parameter array that not in
72
- * collection;
73
- *
74
- * @param data
75
- */
76
- prependDiff (data) {
77
- for (let el of data.slice().reverse()) {
78
- if (!this.contains(el)) {
79
- this.data.unshift(el)
80
- }
81
- }
82
- }
83
-
84
- contains (element) {
85
- for (let el of this.data) {
86
- if (el['id'] == element['id'])
87
- return true
88
- }
89
- return false
90
- }
91
-
92
- filterValues (callback) {
93
- return Object.keys(this.data).filter(key => {
94
- return callback(this.data[key], key)
95
- }).reduce((filteredResult, key) => {
96
- filteredResult[key] = this.data[key]
97
- return filteredResult
98
- }, {})
99
- }
100
-
101
- filter (params) {
102
- return this.data.filter((item) => {
103
- return this._isMatching(item, params)
104
- })
105
- }
106
-
107
- /**
108
- * Select all items where value of column in given array
109
- *
110
- * @param data
111
- * @param key
112
- * @returns {Array}
113
- */
114
- whereIn (data, key = 'id') {
115
- let newCollection = [],
116
- param = {}
117
-
118
- param[key] = null
119
-
120
- for (let val of data) {
121
- param[key] = val
122
-
123
- let item = this.find(param)
124
- if (item) {
125
- newCollection.push(item)
126
- }
127
- }
128
-
129
- return newCollection
130
- }
131
-
132
- key (field) {
133
- const data = this.data.slice().reduce((obj, item) => {
134
- obj[item[field]] = item
135
- return obj
136
- }, {})
137
- return new Collection(data)
138
- }
139
-
140
- mapValues (callback) {
141
- Object.keys(this.data).map((key) => {
142
- this.data[key] = callback(this.data[key], key)
143
- })
144
- return this
145
- }
146
-
147
- values () {
148
- return this.data
149
- }
150
-
151
- /**
152
- * Check element is matching params.
153
- *
154
- * @param element
155
- * @param params
156
- * @return {boolean}
157
- * @private
158
- */
159
- _isMatching (element, params) {
160
- if (!(element instanceof Object) && !(params instanceof Object)) {
161
- return element == params
162
- }
163
-
164
- let match = true
165
- for (let key of Object.keys(params)) {
166
- let keyMatch = element.hasOwnProperty(key) && (element[key] == params[key])
167
- match = match && (keyMatch)
168
- }
169
- return match
170
- }
171
-
172
- }
173
-
174
- function collect (data) {
175
- return new Collection(data)
176
- }
177
-
178
- export default collect
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/utils/base64.js DELETED
@@ -1,133 +0,0 @@
1
- let Base64 = {
2
-
3
- // private property
4
- _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
5
-
6
- // public method for encoding
7
- encode: function (input) {
8
- var output = "";
9
- var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
10
- var i = 0;
11
-
12
- input = Base64._utf8_encode(input);
13
-
14
- while (i < input.length) {
15
-
16
- chr1 = input.charCodeAt(i++);
17
- chr2 = input.charCodeAt(i++);
18
- chr3 = input.charCodeAt(i++);
19
-
20
- enc1 = chr1 >> 2;
21
- enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
22
- enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
23
- enc4 = chr3 & 63;
24
-
25
- if (isNaN(chr2)) {
26
- enc3 = enc4 = 64;
27
- } else if (isNaN(chr3)) {
28
- enc4 = 64;
29
- }
30
-
31
- output = output +
32
- this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
33
- this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
34
-
35
- }
36
-
37
- return output;
38
- },
39
-
40
- // public method for decoding
41
- decode: function (input) {
42
- var output = "";
43
- var chr1, chr2, chr3;
44
- var enc1, enc2, enc3, enc4;
45
- var i = 0;
46
-
47
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
48
-
49
- while (i < input.length) {
50
-
51
- enc1 = this._keyStr.indexOf(input.charAt(i++));
52
- enc2 = this._keyStr.indexOf(input.charAt(i++));
53
- enc3 = this._keyStr.indexOf(input.charAt(i++));
54
- enc4 = this._keyStr.indexOf(input.charAt(i++));
55
-
56
- chr1 = (enc1 << 2) | (enc2 >> 4);
57
- chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
58
- chr3 = ((enc3 & 3) << 6) | enc4;
59
-
60
- output = output + String.fromCharCode(chr1);
61
-
62
- if (enc3 != 64) {
63
- output = output + String.fromCharCode(chr2);
64
- }
65
- if (enc4 != 64) {
66
- output = output + String.fromCharCode(chr3);
67
- }
68
-
69
- }
70
-
71
- output = Base64._utf8_decode(output);
72
-
73
- return output;
74
-
75
- },
76
-
77
- // private method for UTF-8 encoding
78
- _utf8_encode: function (string) {
79
- string = string.replace(/\r\n/g, "\n");
80
- var utftext = "";
81
-
82
- for (var n = 0; n < string.length; n++) {
83
-
84
- var c = string.charCodeAt(n);
85
-
86
- if (c < 128) {
87
- utftext += String.fromCharCode(c);
88
- } else if ((c > 127) && (c < 2048)) {
89
- utftext += String.fromCharCode((c >> 6) | 192);
90
- utftext += String.fromCharCode((c & 63) | 128);
91
- } else {
92
- utftext += String.fromCharCode((c >> 12) | 224);
93
- utftext += String.fromCharCode(((c >> 6) & 63) | 128);
94
- utftext += String.fromCharCode((c & 63) | 128);
95
- }
96
-
97
- }
98
-
99
- return utftext;
100
- },
101
-
102
- // private method for UTF-8 decoding
103
- _utf8_decode: function (utftext) {
104
- var string = "";
105
- var i = 0;
106
- var c = 0, c1 = 0, c2 = 0;
107
-
108
- while (i < utftext.length) {
109
-
110
- c = utftext.charCodeAt(i);
111
-
112
- if (c < 128) {
113
- string += String.fromCharCode(c);
114
- i++;
115
- } else if ((c > 191) && (c < 224)) {
116
- c2 = utftext.charCodeAt(i + 1);
117
- string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
118
- i += 2;
119
- } else {
120
- c2 = utftext.charCodeAt(i + 1);
121
- c3 = utftext.charCodeAt(i + 2);
122
- string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
123
- i += 3;
124
- }
125
-
126
- }
127
-
128
- return string;
129
- }
130
-
131
- }
132
-
133
- export default Base64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/utils/copy.js DELETED
@@ -1,43 +0,0 @@
1
- /**
2
- * Helper functions to copy text to clipboard.
3
- *
4
- * @see https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript
5
- *
6
- * @param text
7
- */
8
-
9
- const fallbackCopyToClipboard = function (text, scrollContainer = null) {
10
- scrollContainer = scrollContainer || document.body.parentElement
11
- var textArea = document.createElement('textarea')
12
- textArea.value = text
13
-
14
- var currentScrollTop = scrollContainer.scrollTop
15
-
16
- document.body.appendChild(textArea)
17
- textArea.focus()
18
- textArea.select()
19
-
20
- try {
21
- var successful = document.execCommand('copy')
22
- var msg = successful ? 'successful' : 'unsuccessful'
23
- console.log('Fallback: Copying text command was ' + msg)
24
- } catch (err) {
25
- console.error('Fallback: Oops, unable to copy', err)
26
- }
27
-
28
- document.body.removeChild(textArea)
29
-
30
- scrollContainer.scrollTop = currentScrollTop
31
- }
32
-
33
- export function copyToClipboard (text, scrollContainer = null) {
34
- if (!navigator.clipboard) {
35
- fallbackCopyToClipboard(text, scrollContainer)
36
- return
37
- }
38
- navigator.clipboard.writeText(text).then(function () {
39
- console.log('Async: Copying to clipboard was successful!')
40
- }, function (err) {
41
- console.error('Async: Could not copy text: ', err)
42
- })
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/utils/deepmerge.js DELETED
@@ -1,72 +0,0 @@
1
- function isMergeableObject (val) {
2
- var nonNullObject = val && typeof val === 'object'
3
-
4
- return nonNullObject
5
- && Object.prototype.toString.call(val) !== '[object RegExp]'
6
- && Object.prototype.toString.call(val) !== '[object Date]'
7
- }
8
-
9
- function emptyTarget (val) {
10
- return Array.isArray(val) ? [] : {}
11
- }
12
-
13
- function cloneIfNecessary (value, optionsArgument) {
14
- var clone = optionsArgument && optionsArgument.clone === true
15
- return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
16
- }
17
-
18
- function defaultArrayMerge (target, source, optionsArgument) {
19
- var destination = target.slice()
20
- source.forEach(function (e, i) {
21
- if (typeof destination[i] === 'undefined') {
22
- destination[i] = cloneIfNecessary(e, optionsArgument)
23
- } else if (isMergeableObject(e)) {
24
- destination[i] = deepmerge(target[i], e, optionsArgument)
25
- } else if (target.indexOf(e) === -1) {
26
- destination.push(cloneIfNecessary(e, optionsArgument))
27
- }
28
- })
29
- return destination
30
- }
31
-
32
- function mergeObject (target, source, optionsArgument) {
33
- var destination = {}
34
- if (isMergeableObject(target)) {
35
- Object.keys(target).forEach(function (key) {
36
- destination[key] = cloneIfNecessary(target[key], optionsArgument)
37
- })
38
- }
39
- Object.keys(source).forEach(function (key) {
40
- if (!isMergeableObject(source[key]) || !target[key]) {
41
- destination[key] = cloneIfNecessary(source[key], optionsArgument)
42
- } else {
43
- destination[key] = deepmerge(target[key], source[key], optionsArgument)
44
- }
45
- })
46
- return destination
47
- }
48
-
49
- function deepmerge (target, source, optionsArgument) {
50
- var array = Array.isArray(source)
51
- var options = optionsArgument || {arrayMerge: defaultArrayMerge}
52
- var arrayMerge = options.arrayMerge || defaultArrayMerge
53
-
54
- if (array) {
55
- return Array.isArray(target) ? arrayMerge(target, source, optionsArgument) : cloneIfNecessary(source, optionsArgument)
56
- } else {
57
- return mergeObject(target, source, optionsArgument)
58
- }
59
- }
60
-
61
- deepmerge.all = function deepmergeAll (array, optionsArgument) {
62
- if (!Array.isArray(array) || array.length < 2) {
63
- throw new Error('first argument should be an array with at least two elements')
64
- }
65
-
66
- // we are sure there are at least 2 values, so it is safe to have no initial value
67
- return array.reduce(function (prev, next) {
68
- return deepmerge(prev, next, optionsArgument)
69
- })
70
- }
71
-
72
- export default deepmerge
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/utils/fetch.js DELETED
@@ -1,26 +0,0 @@
1
- /**
2
- * Make fetch request and parse response JSON.
3
- *
4
- * @param url
5
- * @param data
6
- * @param config
7
- *
8
- * @return {Promise<Response>}
9
- */
10
- export function post (url, data, config = {}) {
11
- const preparedData = new FormData()
12
- for (let key of Object.keys(data)) {
13
- preparedData.set(key, data[key])
14
- }
15
- return fetch(url, {
16
- method: 'post',
17
- body: preparedData
18
- }).then(response => {
19
- return response.json()
20
- }).then(data => {
21
- if (data.status !== 200) {
22
- throw data
23
- }
24
- return data
25
- })
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/utils/jsonClone.js DELETED
@@ -1,3 +0,0 @@
1
- export default function (data) {
2
- return JSON.parse(JSON.stringify(data))
3
- }
 
 
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: RSS import, RSS aggregator, feed import, content curation, feed to post
5
  Requires at least: 4.0 or higher
6
  Tested up to: 5.2.2
7
  Requires PHP: 5.4
8
- Stable tag: 4.14
9
  License: GPLv3
10
 
11
  WP RSS Aggregator is the original & most popular WordPress solution for importing RSS feeds, auto-blogging, content curation & aggregation.
@@ -259,54 +259,23 @@ Our complete Knowledge Base with FAQs can be found [here](https://kb.wprssaggreg
259
 
260
  == Changelog ==
261
 
262
- = 4.14 (2019-07-09) =
 
263
  **Added**
264
- * YouTube channel URLs are now supported.
265
- * Items imported from YouTube are detected and their embed links are saved.
266
- * Embedded YouTube videos can now be shown in a lightbox.
267
- * New option to enable or disable the plugin's logging.
268
- * New option to set the log age, in days, for daily truncation.
269
- * Image URLs are detected and saved in feed item meta, to be used by templates that can show images.
270
- * Feed item excerpts are now imported, to be used by templates that can show excerpts.
271
- * Activating or pausing feed sources from the Feed Sources page is now asynchronous.
272
- * Deleting feed items from the Feed Sources page is now asynchronous.
273
- * New plugin-wide error handling to prevent site locks, with the option to deactivate the plugin and its addons.
274
- * Feed sources that are missing their respective cron are detected and fixed while on the Feed Sources page.
275
- * Added tooltips to various links and controls in the feed source list page.
276
- * Import errors are now asynchronously added to the error icon in the feed sources list page.
277
 
278
  **Changed**
279
- * Previewing a template no longer requires saving the template.
280
- * Redesigned the feed sources page to be more compact and informative at a glance.
281
- * The imported item count in the feed sources page is now a link to that feed's imported items.
282
- * Improved the responsive styling of the feed sources list table.
283
- * The custom feed now uses the Atom 1.0 standard.
284
- * Improved the detection of cron scheduling failures, prevent feeds from appearing to be stuck.
285
- * Converted log section in the debugging page to use the new module system.
286
- * Some options were renamed to be consistent across various plugin pages.
287
- * Improved the wording, description and tooltip of the "Import order" option.
288
- * Added better error handling during image file creation when using the GD extension.
289
- * Rewrote the unique item title checking logic to be faster and more accurate.
290
- * Now suppressing "non-numeric value encountered" warnings from SimplePie.
291
- * Increased the time by which the plugin detects stuck feeds to 2 minutes.
292
- * The addon licensing registration system has been partially converted to the new module system.
293
 
294
  **Fixed**
295
- * The default template could not be saved with a particular combination of settings.
296
- * The age limit setting was incorrectly being copied to feed sources.
297
- * Fixed links in templates not opening in new tabs under certain conditions.
298
- * Non image files are no longer wrongly downloaded, cached and treated as images.
299
- * The unique titles option caused a PHP warning when enabled.
300
- * Fixed use of previously cached version scripts and styles for the Templates page.
301
- * Fixed pagination not working correctly when no item limit is set.
302
- * Fixed the "Set links as no follow" option not having any effect.
303
- * An empty limit for the number of items in a template silently defaults to 5 items.
304
- * The name of the user was being shown as the author for feed items that had no author.
305
- * Fixed the "property on non-object" error on the Licensing settings page for new addons.
306
- * On some sites, multiple default templates are constantly being created.
307
- * The default template is auto-created is corrupted data. An update procedure will now fix this data.
308
-
309
- **Removed**
310
- * Removed old secure reset code.
311
- * The "View items" row action link in the Feed Sources page has been removed.
312
- * Removed the "Edit" bulk action from the feed sources list page.
5
  Requires at least: 4.0 or higher
6
  Tested up to: 5.2.2
7
  Requires PHP: 5.4
8
+ Stable tag: 4.15
9
  License: GPLv3
10
 
11
  WP RSS Aggregator is the original & most popular WordPress solution for importing RSS feeds, auto-blogging, content curation & aggregation.
259
 
260
  == Changelog ==
261
 
262
+ = 4.15 (2019-07-16) =
263
+
264
  **Added**
265
+ - New error handling for catchable PHP7 `Throwable` errors.
266
+ - New option to enable feed caching for better performance.
267
+ - New option to import source name and URL for each item individually.
268
+ - The custom feed now includes source info for every item.
 
 
 
 
 
 
 
 
 
269
 
270
  **Changed**
271
+ - Improved some exception messages to better indicate the cause of certain problems.
272
+ - Re-organized settings into multiple tabs.
273
+ - Added the current site URL to the custom feed URL option's label.
 
 
 
 
 
 
 
 
 
 
 
274
 
275
  **Fixed**
276
+ - Feed sources had image importing wrongly enabled by default.
277
+ - Downloading the debug log triggered an error.
278
+ - The custom feed self URL ignored the settings and was incorrect.
279
+ - Items in the custom feed had a missing `rel` attribute for their `<link>` element.
280
+ - Fixed placement of WordPress notices on the Templates List and Edit page.
281
+ - Fixed WordPress notices disappearing after moving between Templates list and edit page.
 
 
 
 
 
 
 
 
 
 
 
 
src/Entities/Feeds/Items/WpPostFeedItem.php CHANGED
@@ -137,12 +137,15 @@ class WpPostFeedItem extends WpCptDataSet
137
  protected function wrapPostMetaDataSet(WP_Post $post, DataSetInterface $meta)
138
  {
139
  $source = new WpPostFeedSource($meta['source_id']);
 
140
 
141
  $wrapperData = [
142
  static::SOURCE_KEY => $source,
143
  static::TIMESTAMP_KEY => strtotime($post->post_date_gmt),
144
  static::FT_IMAGE_KEY => $this->getFtImageUrl($post),
145
  static::URL_KEY => $this->getItemUrl($post, $meta, $source),
 
 
146
  ];
147
 
148
  // For non-WPRSS feed items, use the real WordPress post author if the meta author does not exist
137
  protected function wrapPostMetaDataSet(WP_Post $post, DataSetInterface $meta)
138
  {
139
  $source = new WpPostFeedSource($meta['source_id']);
140
+ $importSource = filter_var($source['import_source'], FILTER_VALIDATE_BOOLEAN);
141
 
142
  $wrapperData = [
143
  static::SOURCE_KEY => $source,
144
  static::TIMESTAMP_KEY => strtotime($post->post_date_gmt),
145
  static::FT_IMAGE_KEY => $this->getFtImageUrl($post),
146
  static::URL_KEY => $this->getItemUrl($post, $meta, $source),
147
+ 'source_name' => $importSource ? $meta['source_name'] : $source['title'],
148
+ 'source_url' => $importSource ? $meta['source_url'] : $source['site_url'],
149
  ];
150
 
151
  // For non-WPRSS feed items, use the real WordPress post author if the meta author does not exist
src/Entities/Feeds/Sources/WpPostFeedSource.php CHANGED
@@ -5,8 +5,10 @@ namespace RebelCode\Wpra\Core\Entities\Feeds\Sources;
5
  use OutOfRangeException;
6
  use RebelCode\Wpra\Core\Data\AliasingDataSet;
7
  use RebelCode\Wpra\Core\Data\ArrayDataSet;
 
8
  use RebelCode\Wpra\Core\Data\MergedDataSet;
9
  use RebelCode\Wpra\Core\Data\Wp\WpCptDataSet;
 
10
  use WP_Post;
11
 
12
  /**
@@ -57,8 +59,18 @@ class WpPostFeedSource extends WpCptDataSet
57
  */
58
  protected function createMetaDataSet($postOrId)
59
  {
60
- $meta = parent::createMetaDataSet($postOrId);
61
- $defaults = $this->getDefaultMetaData();
 
 
 
 
 
 
 
 
 
 
62
  $fullMeta = new MergedDataSet($meta, $defaults);
63
 
64
  return new MergedDataSet($fullMeta, new ArrayDataSet([
@@ -72,12 +84,15 @@ class WpPostFeedSource extends WpCptDataSet
72
  *
73
  * @since 4.14
74
  *
 
 
75
  * @return ArrayDataSet The data set containing the default meta data.
76
  */
77
- protected function getDefaultMetaData()
78
  {
79
  return new ArrayDataSet([
80
- 'import_ft_images' => 'auto',
 
81
  'download_images' => '0',
82
  'siphon_ft_image' => '0',
83
  'must_have_ft_image' => '0',
5
  use OutOfRangeException;
6
  use RebelCode\Wpra\Core\Data\AliasingDataSet;
7
  use RebelCode\Wpra\Core\Data\ArrayDataSet;
8
+ use RebelCode\Wpra\Core\Data\DataSetInterface;
9
  use RebelCode\Wpra\Core\Data\MergedDataSet;
10
  use RebelCode\Wpra\Core\Data\Wp\WpCptDataSet;
11
+ use SimplePie;
12
  use WP_Post;
13
 
14
  /**
59
  */
60
  protected function createMetaDataSet($postOrId)
61
  {
62
+ $meta = parent::createMetaDataSet($postOrId);
63
+ $url = isset($meta['url']) ? $meta['url'] : '';
64
+
65
+ if (!isset($meta['site_url']) && ($feed = wprss_fetch_feed($url)) instanceof SimplePie) {
66
+ $meta['site_url'] = $feed->get_permalink();
67
+ $meta['feed_image'] = $feed->get_image_url();
68
+ } else {
69
+ $meta['site_url'] = $url;
70
+ $meta['feed_image'] = '';
71
+ }
72
+
73
+ $defaults = $this->getDefaultMetaData($meta);
74
  $fullMeta = new MergedDataSet($meta, $defaults);
75
 
76
  return new MergedDataSet($fullMeta, new ArrayDataSet([
84
  *
85
  * @since 4.14
86
  *
87
+ * @param DataSetInterface $meta The existing meta data.
88
+ *
89
  * @return ArrayDataSet The data set containing the default meta data.
90
  */
91
+ protected function getDefaultMetaData($meta)
92
  {
93
  return new ArrayDataSet([
94
+ 'import_source' => '0',
95
+ 'import_ft_images' => '',
96
  'download_images' => '0',
97
  'siphon_ft_image' => '0',
98
  'must_have_ft_image' => '0',
src/Handlers/CustomFeed/RenderCustomFeedHandler.php CHANGED
@@ -4,6 +4,7 @@ namespace RebelCode\Wpra\Core\Handlers\CustomFeed;
4
 
5
  use Dhii\Output\TemplateInterface;
6
  use RebelCode\Wpra\Core\Data\Collections\CollectionInterface;
 
7
 
8
  /**
9
  * The handler that renders the custom feed.
@@ -27,19 +28,28 @@ class RenderCustomFeedHandler
27
  protected $template;
28
 
29
  /**
30
- * Constructor.
 
 
31
  *
32
- * @todo Inject the required wp-options dataset, when it's available as a service
 
 
 
 
 
33
  *
34
  * @since 4.14
35
  *
36
  * @param CollectionInterface $items The items to include in the feed.
 
37
  * @param TemplateInterface $template The template to use for rendering the feed.
38
  */
39
- public function __construct(CollectionInterface $items, TemplateInterface $template)
40
  {
41
  $this->items = $items;
42
  $this->template = $template;
 
43
  }
44
 
45
  /**
@@ -70,7 +80,7 @@ class RenderCustomFeedHandler
70
  'title' => $title,
71
  'subtitle' => $title,
72
  'site_url' => trailingslashit(get_site_url()),
73
- 'self_url' => trailingslashit(get_feed_link('wprss')),
74
  'updated_date' => date(DATE_ATOM),
75
  'generator' => [
76
  'name' => 'WP RSS Aggregator',
4
 
5
  use Dhii\Output\TemplateInterface;
6
  use RebelCode\Wpra\Core\Data\Collections\CollectionInterface;
7
+ use RebelCode\Wpra\Core\Data\DataSetInterface;
8
 
9
  /**
10
  * The handler that renders the custom feed.
28
  protected $template;
29
 
30
  /**
31
+ * The settings for the custom feed.
32
+ *
33
+ * @since 4.15
34
  *
35
+ * @var DataSetInterface
36
+ */
37
+ protected $settings;
38
+
39
+ /**
40
+ * Constructor.
41
  *
42
  * @since 4.14
43
  *
44
  * @param CollectionInterface $items The items to include in the feed.
45
+ * @param DataSetInterface $settings The settings for the custom feed.
46
  * @param TemplateInterface $template The template to use for rendering the feed.
47
  */
48
+ public function __construct(CollectionInterface $items, DataSetInterface $settings, TemplateInterface $template)
49
  {
50
  $this->items = $items;
51
  $this->template = $template;
52
+ $this->settings = $settings;
53
  }
54
 
55
  /**
80
  'title' => $title,
81
  'subtitle' => $title,
82
  'site_url' => trailingslashit(get_site_url()),
83
+ 'self_url' => trailingslashit(get_feed_link($this->settings['custom_feed_url'])),
84
  'updated_date' => date(DATE_ATOM),
85
  'generator' => [
86
  'name' => 'WP RSS Aggregator',
src/Handlers/Logger/DownloadLogHandler.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace RebelCode\Wpra\Core\Handlers\Logger;
4
 
5
  use RebelCode\Wpra\Core\Logger\LogReaderInterface;
 
6
 
7
  /**
8
  * Handles log download requests.
@@ -50,6 +51,27 @@ class DownloadLogHandler
50
  return;
51
  }
52
 
53
- wprss_download_log();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
55
  }
3
  namespace RebelCode\Wpra\Core\Handlers\Logger;
4
 
5
  use RebelCode\Wpra\Core\Logger\LogReaderInterface;
6
+ use WP_Post;
7
 
8
  /**
9
  * Handles log download requests.
51
  return;
52
  }
53
 
54
+ $logs = $this->reader->getLogs();
55
+
56
+ $output = '';
57
+ foreach ($logs as $log) {
58
+ $feed = isset($log['feed_id'])
59
+ ? get_post($log['feed_id'])
60
+ : null;
61
+ $feedName = ($feed instanceof WP_Post)
62
+ ? ' ' . $feed->post_title . ':'
63
+ : '';
64
+ $output .= sprintf('[%s] (%s)%s %s', $log['date'], $log['level'], $feedName, $log['message']) . PHP_EOL;
65
+ }
66
+
67
+ header('Content-Description: File Transfer');
68
+ header('Content-type: text/plain');
69
+ header('Content-Disposition: attachment; filename="wpra-log.txt"');
70
+ header('Expires: 0');
71
+ header('Cache-Control: must-revalidate');
72
+ header('Pragma: public');
73
+ header('Content-Length: ' . strlen($output));
74
+ echo $output;
75
+ exit;
76
  }
77
  }
src/Modules/CustomFeedModule.php CHANGED
@@ -76,6 +76,7 @@ class CustomFeedModule implements ModuleInterface
76
 
77
  return new RenderCustomFeedHandler(
78
  $c->get('wpra/feeds/items/collection'),
 
79
  $templates['custom-feed/main.twig']
80
  );
81
  }
76
 
77
  return new RenderCustomFeedHandler(
78
  $c->get('wpra/feeds/items/collection'),
79
+ $c->get('wpra/custom_feed/settings'),
80
  $templates['custom-feed/main.twig']
81
  );
82
  }
src/Modules/ImporterModule.php CHANGED
@@ -35,6 +35,9 @@ class ImporterModule implements ModuleInterface
35
  ]
36
  );
37
  },
 
 
 
38
  ];
39
  }
40
 
35
  ]
36
  );
37
  },
38
+ 'wpra/importer/cache/dir' => function () {
39
+ return get_temp_dir() . 'wprss/simplepie/';
40
+ },
41
  ];
42
  }
43
 
src/Templates/Feeds/Types/AbstractFeedTemplateType.php CHANGED
@@ -55,7 +55,7 @@ abstract class AbstractFeedTemplateType implements FeedTemplateTypeInterface
55
  return $this->getTemplate()->render($prepCtx);
56
  } catch (Exception $ex) {
57
  throw $this->_createTemplateRenderException(
58
- __('An error occurred while rendering the twig template', WPRSS_TEXT_DOMAIN), null, $ex, $this, $prepCtx
59
  );
60
  }
61
  }
55
  return $this->getTemplate()->render($prepCtx);
56
  } catch (Exception $ex) {
57
  throw $this->_createTemplateRenderException(
58
+ $ex->getMessage(), null, $ex, $this, $prepCtx
59
  );
60
  }
61
  }
src/Templates/TwigTemplate.php CHANGED
@@ -4,7 +4,7 @@ namespace RebelCode\Wpra\Core\Templates;
4
 
5
  use Dhii\Exception\CreateInvalidArgumentExceptionCapableTrait;
6
  use Dhii\I18n\StringTranslatingTrait;
7
- use Dhii\Output\CreateTemplateRenderExceptionCapableTrait;
8
  use Dhii\Output\TemplateInterface;
9
  use Exception;
10
  use Twig\Environment;
@@ -21,9 +21,6 @@ class TwigTemplate implements TemplateInterface
21
  /* @since 4.13 */
22
  use CreateInvalidArgumentExceptionCapableTrait;
23
 
24
- /* @since 4.13 */
25
- use CreateTemplateRenderExceptionCapableTrait;
26
-
27
  /* @since 4.13 */
28
  use StringTranslatingTrait;
29
 
@@ -69,11 +66,11 @@ class TwigTemplate implements TemplateInterface
69
  try {
70
  return $this->env->load($this->path)->render($ctx);
71
  } catch (LoaderError $loaderEx) {
72
- throw $this->_createTemplateRenderException(
73
  __('Could not load template', WPRSS_TEXT_DOMAIN), null, $loaderEx, $this, $ctx
74
  );
75
  } catch (SyntaxError $synEx) {
76
- throw $this->_createTemplateRenderException(
77
  sprintf(
78
  __('Syntax error in template at line %d: %s', WPRSS_TEXT_DOMAIN),
79
  $synEx->getTemplateLine(),
@@ -82,8 +79,12 @@ class TwigTemplate implements TemplateInterface
82
  null, $synEx, $this, $ctx
83
  );
84
  } catch (Exception $ex) {
85
- throw $this->_createTemplateRenderException(
86
- __('An error occurred while rendering the twig template', WPRSS_TEXT_DOMAIN), null, $ex, $this, $ctx
 
 
 
 
87
  );
88
  }
89
  }
4
 
5
  use Dhii\Exception\CreateInvalidArgumentExceptionCapableTrait;
6
  use Dhii\I18n\StringTranslatingTrait;
7
+ use Dhii\Output\Exception\TemplateRenderException;
8
  use Dhii\Output\TemplateInterface;
9
  use Exception;
10
  use Twig\Environment;
21
  /* @since 4.13 */
22
  use CreateInvalidArgumentExceptionCapableTrait;
23
 
 
 
 
24
  /* @since 4.13 */
25
  use StringTranslatingTrait;
26
 
66
  try {
67
  return $this->env->load($this->path)->render($ctx);
68
  } catch (LoaderError $loaderEx) {
69
+ throw new TemplateRenderException(
70
  __('Could not load template', WPRSS_TEXT_DOMAIN), null, $loaderEx, $this, $ctx
71
  );
72
  } catch (SyntaxError $synEx) {
73
+ throw new TemplateRenderException(
74
  sprintf(
75
  __('Syntax error in template at line %d: %s', WPRSS_TEXT_DOMAIN),
76
  $synEx->getTemplateLine(),
79
  null, $synEx, $this, $ctx
80
  );
81
  } catch (Exception $ex) {
82
+ throw new TemplateRenderException(
83
+ __('Could not render twig template: ', WPRSS_TEXT_DOMAIN) . $ex->getMessage(),
84
+ null,
85
+ $ex,
86
+ $this,
87
+ $ctx
88
  );
89
  }
90
  }
templates/admin/templates-page.twig CHANGED
@@ -2,6 +2,9 @@
2
 
3
  <div class="wrap">
4
 
 
 
 
5
  <div id="wpra-templates-app">
6
  <app></app>
7
  </div>
2
 
3
  <div class="wrap">
4
 
5
+ {# WordPress puts notices after a h1.wp-heading-inline element #}
6
+ <hr class="wp-header-end"/>
7
+
8
  <div id="wpra-templates-app">
9
  <app></app>
10
  </div>
templates/admin/update-page.twig CHANGED
@@ -15,6 +15,36 @@
15
  <hr class="wp-header-end">
16
 
17
  <div id="wpra-update-app">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  <div class="postbox">
19
  <div class="inside wpra-update-feature">
20
  <div class="wpra-update-feature__text">
15
  <hr class="wp-header-end">
16
 
17
  <div id="wpra-update-app">
18
+ <div class="notice notice-warning">
19
+ <h3>{% trans "Important!" %}</h3>
20
+ <p>
21
+ {% trans %}
22
+ Version <code>4.14</code> had an unfortunate bug that caused it to import images into your WordPress
23
+ media gallery. We're very sorry about that!
24
+ {% endtrans %}
25
+ </p>
26
+ <p>
27
+ {% trans %}
28
+ With this update the plugin will no longer import images, but unfortunately the images will remain
29
+ in your media gallery. If there are too many to delete manually, you can delete and re-import your
30
+ feed items to have WordPress automatically delete their attached images. Note that if you do so,
31
+ items that are no longer given by the RSS feed won't be re-imported.
32
+ {% endtrans %}
33
+ </p>
34
+ <p>
35
+ {% trans %}
36
+ If you have the <b>Feed to Post</b> add-on, you should not have been affected by this bug.
37
+ {% endtrans %}
38
+ </p>
39
+ <p>
40
+ {% trans %}
41
+ We apologize for this inconvience and thank you for using WP RSS Aggregator.
42
+ <br/>
43
+ <i>-The WP RSS Aggregator Team</i>
44
+ {% endtrans %}
45
+ </p>
46
+ </div>
47
+
48
  <div class="postbox">
49
  <div class="inside wpra-update-feature">
50
  <div class="wpra-update-feature__text">
templates/custom-feed/entry.twig CHANGED
@@ -1,7 +1,7 @@
1
  <entry>
2
  <id>{{ item.permalink }}</id>
3
  <title type="html">{{ item.title }}</title>
4
- <link href="{{ item.permalink }}"/>
5
  <updated>{{ item.timestamp|date('Y-m-d\\TH:i:sP') }}</updated>
6
  <summary>{{ item.excerpt }}</summary>
7
  <content type="html">
@@ -10,6 +10,16 @@
10
  {% if item.author|length > 0 %}
11
  <author>
12
  <name>{{ item.author }}</name>
 
 
 
 
 
 
13
  </author>
14
  {% endif %}
 
 
 
 
15
  </entry>
1
  <entry>
2
  <id>{{ item.permalink }}</id>
3
  <title type="html">{{ item.title }}</title>
4
+ <link href="{{ item.permalink }}" rel="alternate" />
5
  <updated>{{ item.timestamp|date('Y-m-d\\TH:i:sP') }}</updated>
6
  <summary>{{ item.excerpt }}</summary>
7
  <content type="html">
10
  {% if item.author|length > 0 %}
11
  <author>
12
  <name>{{ item.author }}</name>
13
+ {% if item.author_email|length > 0 %}
14
+ <email>{{ item.author_email }}</email>
15
+ {% endif %}
16
+ {% if item.author_link|length > 0 %}
17
+ <uri>{{ item.author_link }}</uri>
18
+ {% endif %}
19
  </author>
20
  {% endif %}
21
+ <source>
22
+ <id>{{ item.source_url }}</id>
23
+ <title>{{ item.source_name }}</title>
24
+ </source>
25
  </entry>
templates/custom-feed/main.twig CHANGED
@@ -3,7 +3,6 @@
3
  <title>{{ title }}</title>
4
  <subtitle>{{ subtitle }}</subtitle>
5
  <link href="{{ self_url }}" rel="self"/>
6
- <link href="{{ site_url }}"/>
7
  <id>{{ site_url }}</id>
8
  <updated>{{ updated_date }}</updated>
9
  <generator uri="{{ generator.url }}" version="{{ generator.version }}">
@@ -11,6 +10,6 @@
11
  </generator>
12
 
13
  {% for item in items %}
14
- {% include('custom-feed/entry.twig') %}
15
  {% endfor %}
16
  </feed>
3
  <title>{{ title }}</title>
4
  <subtitle>{{ subtitle }}</subtitle>
5
  <link href="{{ self_url }}" rel="self"/>
 
6
  <id>{{ site_url }}</id>
7
  <updated>{{ updated_date }}</updated>
8
  <generator uri="{{ generator.url }}" version="{{ generator.version }}">
10
  </generator>
11
 
12
  {% for item in items %}
13
+ {% include('custom-feed/entry.twig') %}
14
  {% endfor %}
15
  </feed>
templates/feeds/list/feed-item.twig CHANGED
@@ -31,9 +31,9 @@
31
  {{ options.source_prefix }}
32
 
33
  {% if options.source_is_link %}
34
- <a {{ wpra_link_attrs(item.source.site_url, options)|raw }}>{{ item.source.title }}</a>
35
  {% else %}
36
- {{ item.source.title }}
37
  {% endif %}
38
  </span>
39
  {% endif %}
31
  {{ options.source_prefix }}
32
 
33
  {% if options.source_is_link %}
34
+ <a {{ wpra_link_attrs(item.source_url, options)|raw }}>{{ item.source_name }}</a>
35
  {% else %}
36
+ {{ item.source_name }}
37
  {% endif %}
38
  </span>
39
  {% endif %}
uninstall.php CHANGED
@@ -1,15 +1,22 @@
1
  <?php
 
2
  // If uninstall not called from WordPress exit
3
- if( ! defined( 'WP_UNINSTALL_PLUGIN' ) )
4
- exit ();
 
5
 
6
  // Remove capabilities
7
- if ( function_exists( 'wprss_remove_caps' ) )
8
- wprss_remove_caps();
 
9
 
10
- // Delete option from options table
11
  delete_option( 'wprss_options' );
12
- delete_option( 'wprss_settings' );
13
- delete_option( 'wprss_settings_general' );
14
  delete_option( 'wprss_db_version' );
15
- delete_option( 'wprss_settings_notices' );
 
 
 
 
1
  <?php
2
+
3
  // If uninstall not called from WordPress exit
4
+ if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
5
+ exit ();
6
+ }
7
 
8
  // Remove capabilities
9
+ if ( function_exists( 'wprss_remove_caps' ) ) {
10
+ wprss_remove_caps();
11
+ }
12
 
13
+ // Delete options from options table
14
  delete_option( 'wprss_options' );
15
+ delete_option( 'wprss_addon_notices' );
16
+ delete_option( 'wprss_admin_notices' );
17
  delete_option( 'wprss_db_version' );
18
+ delete_option( 'wprss_did_intro' );
19
+ delete_option( 'wprss_first_activation_time' );
20
+ delete_option( 'wprss_hs_beacon_enabled' );
21
+ delete_option( 'wprss_intro_feed_id' );
22
+ delete_option( 'wprss_settings_notices' );
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit398a449c81413d5745fdf6885411adea::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit2a3a9815e4e052480cff9d68c42d23a2::getLoader();
vendor/composer/ClassLoader.php CHANGED
File without changes
vendor/composer/LICENSE CHANGED
File without changes
vendor/composer/autoload_classmap.php CHANGED
@@ -492,7 +492,6 @@ return array(
492
  'Twig\\Node\\EmbedNode' => $vendorDir . '/twig/twig/src/Node/EmbedNode.php',
493
  'Twig\\Node\\Expression\\AbstractExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AbstractExpression.php',
494
  'Twig\\Node\\Expression\\ArrayExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrayExpression.php',
495
- 'Twig\\Node\\Expression\\ArrowFunctionExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrowFunctionExpression.php',
496
  'Twig\\Node\\Expression\\AssignNameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AssignNameExpression.php',
497
  'Twig\\Node\\Expression\\Binary\\AbstractBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php',
498
  'Twig\\Node\\Expression\\Binary\\AddBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AddBinary.php',
@@ -592,7 +591,6 @@ return array(
592
  'Twig\\Test\\NodeTestCase' => $vendorDir . '/twig/twig/src/Test/NodeTestCase.php',
593
  'Twig\\Token' => $vendorDir . '/twig/twig/src/Token.php',
594
  'Twig\\TokenParser\\AbstractTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AbstractTokenParser.php',
595
- 'Twig\\TokenParser\\ApplyTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ApplyTokenParser.php',
596
  'Twig\\TokenParser\\AutoEscapeTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php',
597
  'Twig\\TokenParser\\BlockTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/BlockTokenParser.php',
598
  'Twig\\TokenParser\\DeprecatedTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php',
492
  'Twig\\Node\\EmbedNode' => $vendorDir . '/twig/twig/src/Node/EmbedNode.php',
493
  'Twig\\Node\\Expression\\AbstractExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AbstractExpression.php',
494
  'Twig\\Node\\Expression\\ArrayExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrayExpression.php',
 
495
  'Twig\\Node\\Expression\\AssignNameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AssignNameExpression.php',
496
  'Twig\\Node\\Expression\\Binary\\AbstractBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php',
497
  'Twig\\Node\\Expression\\Binary\\AddBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AddBinary.php',
591
  'Twig\\Test\\NodeTestCase' => $vendorDir . '/twig/twig/src/Test/NodeTestCase.php',
592
  'Twig\\Token' => $vendorDir . '/twig/twig/src/Token.php',
593
  'Twig\\TokenParser\\AbstractTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AbstractTokenParser.php',
 
594
  'Twig\\TokenParser\\AutoEscapeTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php',
595
  'Twig\\TokenParser\\BlockTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/BlockTokenParser.php',
596
  'Twig\\TokenParser\\DeprecatedTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php',
vendor/composer/autoload_files.php CHANGED
File without changes
vendor/composer/autoload_namespaces.php CHANGED
File without changes
vendor/composer/autoload_psr4.php CHANGED
File without changes
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit398a449c81413d5745fdf6885411adea
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit398a449c81413d5745fdf6885411adea
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit398a449c81413d5745fdf6885411adea', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit398a449c81413d5745fdf6885411adea', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit398a449c81413d5745fdf6885411adea::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit398a449c81413d5745fdf6885411adea
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit398a449c81413d5745fdf6885411adea::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire398a449c81413d5745fdf6885411adea($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire398a449c81413d5745fdf6885411adea($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit2a3a9815e4e052480cff9d68c42d23a2
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit2a3a9815e4e052480cff9d68c42d23a2', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit2a3a9815e4e052480cff9d68c42d23a2', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit2a3a9815e4e052480cff9d68c42d23a2::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit2a3a9815e4e052480cff9d68c42d23a2::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire2a3a9815e4e052480cff9d68c42d23a2($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire2a3a9815e4e052480cff9d68c42d23a2($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit398a449c81413d5745fdf6885411adea
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@@ -675,7 +675,6 @@ class ComposerStaticInit398a449c81413d5745fdf6885411adea
675
  'Twig\\Node\\EmbedNode' => __DIR__ . '/..' . '/twig/twig/src/Node/EmbedNode.php',
676
  'Twig\\Node\\Expression\\AbstractExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AbstractExpression.php',
677
  'Twig\\Node\\Expression\\ArrayExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrayExpression.php',
678
- 'Twig\\Node\\Expression\\ArrowFunctionExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrowFunctionExpression.php',
679
  'Twig\\Node\\Expression\\AssignNameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AssignNameExpression.php',
680
  'Twig\\Node\\Expression\\Binary\\AbstractBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php',
681
  'Twig\\Node\\Expression\\Binary\\AddBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AddBinary.php',
@@ -775,7 +774,6 @@ class ComposerStaticInit398a449c81413d5745fdf6885411adea
775
  'Twig\\Test\\NodeTestCase' => __DIR__ . '/..' . '/twig/twig/src/Test/NodeTestCase.php',
776
  'Twig\\Token' => __DIR__ . '/..' . '/twig/twig/src/Token.php',
777
  'Twig\\TokenParser\\AbstractTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AbstractTokenParser.php',
778
- 'Twig\\TokenParser\\ApplyTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ApplyTokenParser.php',
779
  'Twig\\TokenParser\\AutoEscapeTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php',
780
  'Twig\\TokenParser\\BlockTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/BlockTokenParser.php',
781
  'Twig\\TokenParser\\DeprecatedTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php',
@@ -1029,10 +1027,10 @@ class ComposerStaticInit398a449c81413d5745fdf6885411adea
1029
  public static function getInitializer(ClassLoader $loader)
1030
  {
1031
  return \Closure::bind(function () use ($loader) {
1032
- $loader->prefixLengthsPsr4 = ComposerStaticInit398a449c81413d5745fdf6885411adea::$prefixLengthsPsr4;
1033
- $loader->prefixDirsPsr4 = ComposerStaticInit398a449c81413d5745fdf6885411adea::$prefixDirsPsr4;
1034
- $loader->prefixesPsr0 = ComposerStaticInit398a449c81413d5745fdf6885411adea::$prefixesPsr0;
1035
- $loader->classMap = ComposerStaticInit398a449c81413d5745fdf6885411adea::$classMap;
1036
 
1037
  }, null, ClassLoader::class);
1038
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit2a3a9815e4e052480cff9d68c42d23a2
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
675
  'Twig\\Node\\EmbedNode' => __DIR__ . '/..' . '/twig/twig/src/Node/EmbedNode.php',
676
  'Twig\\Node\\Expression\\AbstractExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AbstractExpression.php',
677
  'Twig\\Node\\Expression\\ArrayExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrayExpression.php',
 
678
  'Twig\\Node\\Expression\\AssignNameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AssignNameExpression.php',
679
  'Twig\\Node\\Expression\\Binary\\AbstractBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php',
680
  'Twig\\Node\\Expression\\Binary\\AddBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AddBinary.php',
774
  'Twig\\Test\\NodeTestCase' => __DIR__ . '/..' . '/twig/twig/src/Test/NodeTestCase.php',
775
  'Twig\\Token' => __DIR__ . '/..' . '/twig/twig/src/Token.php',
776
  'Twig\\TokenParser\\AbstractTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AbstractTokenParser.php',
 
777
  'Twig\\TokenParser\\AutoEscapeTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php',
778
  'Twig\\TokenParser\\BlockTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/BlockTokenParser.php',
779
  'Twig\\TokenParser\\DeprecatedTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php',
1027
  public static function getInitializer(ClassLoader $loader)
1028
  {
1029
  return \Closure::bind(function () use ($loader) {
1030
+ $loader->prefixLengthsPsr4 = ComposerStaticInit2a3a9815e4e052480cff9d68c42d23a2::$prefixLengthsPsr4;
1031
+ $loader->prefixDirsPsr4 = ComposerStaticInit2a3a9815e4e052480cff9d68c42d23a2::$prefixDirsPsr4;
1032
+ $loader->prefixesPsr0 = ComposerStaticInit2a3a9815e4e052480cff9d68c42d23a2::$prefixesPsr0;
1033
+ $loader->classMap = ComposerStaticInit2a3a9815e4e052480cff9d68c42d23a2::$classMap;
1034
 
1035
  }, null, ClassLoader::class);
1036
  }
vendor/composer/installed.json CHANGED
@@ -1588,7 +1588,7 @@
1588
  },
1589
  "class": "RebelCode\\Composer\\CleanupPlugin"
1590
  },
1591
- "installation-source": "source",
1592
  "autoload": {
1593
  "psr-4": {
1594
  "RebelCode\\Composer\\": "src/"
@@ -1729,17 +1729,17 @@
1729
  },
1730
  {
1731
  "name": "twig/twig",
1732
- "version": "v1.41.0",
1733
- "version_normalized": "1.41.0.0",
1734
  "source": {
1735
  "type": "git",
1736
  "url": "https://github.com/twigphp/Twig.git",
1737
- "reference": "575cd5028362da591facde1ef5d7b94553c375c9"
1738
  },
1739
  "dist": {
1740
  "type": "zip",
1741
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/575cd5028362da591facde1ef5d7b94553c375c9",
1742
- "reference": "575cd5028362da591facde1ef5d7b94553c375c9",
1743
  "shasum": ""
1744
  },
1745
  "require": {
@@ -1751,11 +1751,11 @@
1751
  "symfony/debug": "^2.7",
1752
  "symfony/phpunit-bridge": "^3.4.19|^4.1.8"
1753
  },
1754
- "time": "2019-05-14T11:59:08+00:00",
1755
  "type": "library",
1756
  "extra": {
1757
  "branch-alias": {
1758
- "dev-master": "1.41-dev"
1759
  }
1760
  },
1761
  "installation-source": "dist",
1588
  },
1589
  "class": "RebelCode\\Composer\\CleanupPlugin"
1590
  },
1591
+ "installation-source": "dist",
1592
  "autoload": {
1593
  "psr-4": {
1594
  "RebelCode\\Composer\\": "src/"
1729
  },
1730
  {
1731
  "name": "twig/twig",
1732
+ "version": "v1.39.0",
1733
+ "version_normalized": "1.39.0.0",
1734
  "source": {
1735
  "type": "git",
1736
  "url": "https://github.com/twigphp/Twig.git",
1737
+ "reference": "44890db076c3f0db2bb627a81b246b617bd2413a"
1738
  },
1739
  "dist": {
1740
  "type": "zip",
1741
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/44890db076c3f0db2bb627a81b246b617bd2413a",
1742
+ "reference": "44890db076c3f0db2bb627a81b246b617bd2413a",
1743
  "shasum": ""
1744
  },
1745
  "require": {
1751
  "symfony/debug": "^2.7",
1752
  "symfony/phpunit-bridge": "^3.4.19|^4.1.8"
1753
  },
1754
+ "time": "2019-04-16T12:35:10+00:00",
1755
  "type": "library",
1756
  "extra": {
1757
  "branch-alias": {
1758
+ "dev-master": "1.39-dev"
1759
  }
1760
  },
1761
  "installation-source": "dist",
vendor/container-interop/container-interop/.gitignore CHANGED
File without changes
vendor/container-interop/container-interop/LICENSE CHANGED
File without changes
vendor/container-interop/container-interop/README.md CHANGED
File without changes
vendor/container-interop/container-interop/composer.json CHANGED
File without changes
vendor/container-interop/container-interop/docs/ContainerInterface-meta.md CHANGED
File without changes
vendor/container-interop/container-interop/docs/ContainerInterface.md CHANGED
File without changes
vendor/container-interop/container-interop/docs/Delegate-lookup-meta.md CHANGED
File without changes
vendor/container-interop/container-interop/docs/Delegate-lookup.md CHANGED
File without changes
vendor/container-interop/container-interop/docs/images/interoperating_containers.png CHANGED
File without changes
vendor/container-interop/container-interop/docs/images/priority.png CHANGED
File without changes
vendor/container-interop/container-interop/docs/images/side_by_side_containers.png CHANGED
File without changes
vendor/container-interop/container-interop/src/Interop/Container/ContainerInterface.php CHANGED
File without changes
vendor/container-interop/container-interop/src/Interop/Container/Exception/ContainerException.php CHANGED
File without changes
vendor/container-interop/container-interop/src/Interop/Container/Exception/NotFoundException.php CHANGED
File without changes
vendor/container-interop/service-provider/.gitignore CHANGED
File without changes
vendor/container-interop/service-provider/README.md CHANGED
File without changes
vendor/container-interop/service-provider/composer.json CHANGED
File without changes
vendor/container-interop/service-provider/puli.json CHANGED
File without changes
vendor/container-interop/service-provider/src/ServiceProvider.php CHANGED
File without changes
vendor/dhii/collections-abstract-base/composer.json CHANGED
File without changes
vendor/dhii/collections-abstract-base/composer.lock CHANGED
File without changes
vendor/dhii/collections-abstract-base/src/AbstractCollection.php CHANGED
File without changes
vendor/dhii/collections-abstract-base/src/AbstractHasher.php CHANGED
File without changes
vendor/dhii/collections-abstract-base/src/AbstractIterableCollection.php CHANGED
File without changes
vendor/dhii/collections-abstract/composer.json CHANGED
File without changes
vendor/dhii/collections-abstract/composer.lock CHANGED
File without changes
vendor/dhii/collections-abstract/src/AbstractCallbackCollection.php CHANGED
File without changes
vendor/dhii/collections-abstract/src/AbstractCallbackCollectionBase.php CHANGED
File without changes
vendor/dhii/collections-abstract/src/AbstractCallbackIterator.php CHANGED
File without changes
vendor/dhii/collections-abstract/src/AbstractGenericAccessibleCollection.php CHANGED
File without changes
vendor/dhii/collections-abstract/src/AbstractGenericCollection.php CHANGED
File without changes
vendor/dhii/collections-abstract/src/AbstractGenericMutableCollection.php CHANGED
File without changes
vendor/dhii/collections-abstract/src/AbstractSearchableCollection.php CHANGED
File without changes
vendor/dhii/collections-abstract/src/AppendIterator.php CHANGED
File without changes
vendor/dhii/collections-abstract/src/CallbackIterator.php CHANGED
File without changes
vendor/dhii/collections-interface/composer.json CHANGED
File without changes
vendor/dhii/collections-interface/composer.lock CHANGED
File without changes
vendor/dhii/collections-interface/src/AccessibleCollectionInterface.php CHANGED
File without changes
vendor/dhii/collections-interface/src/CallbackIterableInterface.php CHANGED
File without changes
vendor/dhii/collections-interface/src/CallbackIteratorInterface.php CHANGED
File without changes
vendor/dhii/collections-interface/src/CollectionInterface.php CHANGED
File without changes
vendor/dhii/collections-interface/src/MutableCollectionInterface.php CHANGED
File without changes
vendor/dhii/collections-interface/src/SearchableCollectionInterface.php CHANGED
File without changes
vendor/dhii/collections-interface/src/SequenceIteratorIteratorInterface.php CHANGED
File without changes
vendor/dhii/collections-interface/src/SetInterface.php CHANGED
File without changes
vendor/dhii/container-helper-base/LICENSE CHANGED
File without changes
vendor/dhii/container-helper-base/composer.json CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerGetCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerGetPathCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerHasCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerHasPathCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerListGetCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerListHasCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerSetCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerSetManyCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerSetPathCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerUnsetCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/ContainerUnsetManyCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/NormalizeContainerCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/NormalizeKeyCapableTrait.php CHANGED
File without changes
vendor/dhii/container-helper-base/src/NormalizeWritableContainerCapableTrait.php CHANGED
File without changes
vendor/dhii/di-abstract/LICENSE CHANGED
File without changes
vendor/dhii/di-abstract/composer.json CHANGED
File without changes
vendor/dhii/di-abstract/composer.lock CHANGED
File without changes
vendor/dhii/di-abstract/src/AbstractCompositeContainer.php CHANGED
File without changes
vendor/dhii/di-abstract/src/AbstractContainer.php CHANGED
File without changes
vendor/dhii/di-abstract/src/AbstractParentAwareContainer.php CHANGED
File without changes
vendor/dhii/di-abstract/src/AbstractServiceProvider.php CHANGED
File without changes
vendor/dhii/di-interface/LICENSE CHANGED
File without changes
vendor/dhii/di-interface/composer.json CHANGED
File without changes
vendor/dhii/di-interface/composer.lock CHANGED
File without changes
vendor/dhii/di-interface/src/CompositeContainerInterface.php CHANGED
File without changes
vendor/dhii/di-interface/src/ContainerInterface.php CHANGED
File without changes
vendor/dhii/di-interface/src/ContainersAwareInterface.php CHANGED
File without changes
vendor/dhii/di-interface/src/ExceptionInterface.php CHANGED
File without changes
vendor/dhii/di-interface/src/FactoryInterface.php CHANGED
File without changes
vendor/dhii/di-interface/src/ParentAwareContainerInterface.php CHANGED
File without changes
vendor/dhii/di-interface/src/ServiceProviderInterface.php CHANGED
File without changes
vendor/dhii/di-interface/src/WritableCompositeContainerInterface.php CHANGED
File without changes
vendor/dhii/di-interface/src/WritableContainerInterface.php CHANGED
File without changes
vendor/dhii/di/.gitattributes CHANGED
File without changes
vendor/dhii/di/LICENSE CHANGED
File without changes
vendor/dhii/di/composer.json CHANGED
File without changes
vendor/dhii/di/src/AbstractContainerBase.php CHANGED
File without changes
vendor/dhii/di/src/CompositeContainer.php CHANGED
File without changes
vendor/dhii/di/src/Container.php CHANGED
File without changes
vendor/dhii/di/src/ContainerWithImmutableParent.php CHANGED
File without changes
vendor/dhii/di/src/ContainerWithMutableParent.php CHANGED
File without changes
vendor/dhii/di/src/Exception/ContainerException.php CHANGED
File without changes
vendor/dhii/di/src/Exception/NotFoundException.php CHANGED
File without changes
vendor/dhii/di/src/ServiceProvider.php CHANGED
File without changes
vendor/dhii/exception-interface/LICENSE CHANGED
File without changes
vendor/dhii/exception-interface/composer.json CHANGED
File without changes
vendor/dhii/exception-interface/src/ArgumentCodeAwareInterface.php CHANGED
File without changes
vendor/dhii/exception-interface/src/BadSubjectExceptionInterface.php CHANGED
File without changes
vendor/dhii/exception-interface/src/InternalExceptionInterface.php CHANGED
File without changes
vendor/dhii/exception-interface/src/InvalidArgumentExceptionInterface.php CHANGED
File without changes
vendor/dhii/exception-interface/src/OutOfBoundsExceptionInterface.php CHANGED
File without changes
vendor/dhii/exception-interface/src/OutOfRangeExceptionInterface.php CHANGED
File without changes
vendor/dhii/exception-interface/src/RuntimeExceptionInterface.php CHANGED
File without changes
vendor/dhii/exception-interface/src/ThrowableInterface.php CHANGED
File without changes
vendor/dhii/exception/LICENSE CHANGED
File without changes
vendor/dhii/exception/composer.json CHANGED
File without changes
vendor/dhii/exception/src/AbstractBaseException.php CHANGED
File without changes
vendor/dhii/exception/src/CreateExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/exception/src/CreateInternalExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/exception/src/CreateInvalidArgumentExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/exception/src/CreateNativeInvalidArgumentExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/exception/src/CreateOutOfBoundsExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/exception/src/CreateOutOfRangeExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/exception/src/CreateRuntimeExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/exception/src/Exception.php CHANGED
File without changes
vendor/dhii/exception/src/ExceptionTrait.php CHANGED
File without changes
vendor/dhii/exception/src/InitBaseExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/exception/src/InternalException.php CHANGED
File without changes
vendor/dhii/exception/src/InvalidArgumentException.php CHANGED
File without changes
vendor/dhii/exception/src/OutOfBoundsException.php CHANGED
File without changes
vendor/dhii/exception/src/OutOfRangeException.php CHANGED
File without changes
vendor/dhii/exception/src/RuntimeException.php CHANGED
File without changes
vendor/dhii/exception/src/SubjectAwareTrait.php CHANGED
File without changes
vendor/dhii/factory-interface/LICENSE CHANGED
File without changes
vendor/dhii/factory-interface/composer.json CHANGED
File without changes
vendor/dhii/factory-interface/src/DataObjectFactoryInterface.php CHANGED
File without changes
vendor/dhii/factory-interface/src/Exception/CouldNotMakeExceptionInterface.php CHANGED
File without changes
vendor/dhii/factory-interface/src/Exception/FactoryExceptionInterface.php CHANGED
File without changes
vendor/dhii/factory-interface/src/FactoryAwareInterface.php CHANGED
File without changes
vendor/dhii/factory-interface/src/FactoryFactoryInterface.php CHANGED
File without changes
vendor/dhii/factory-interface/src/FactoryInterface.php CHANGED
File without changes
vendor/dhii/i18n-helper-base/LICENSE CHANGED
File without changes
vendor/dhii/i18n-helper-base/composer.json CHANGED
File without changes
vendor/dhii/i18n-helper-base/src/StringTranslatingTrait.php CHANGED
File without changes
vendor/dhii/i18n-helper-base/src/StringTranslatorAwareTrait.php CHANGED
File without changes
vendor/dhii/i18n-helper-base/src/StringTranslatorConsumingTrait.php CHANGED
File without changes
vendor/dhii/i18n-interface/LICENSE CHANGED
File without changes
vendor/dhii/i18n-interface/composer.json CHANGED
File without changes
vendor/dhii/i18n-interface/src/Exception/FormatTranslationExceptionInterface.php CHANGED
File without changes
vendor/dhii/i18n-interface/src/Exception/I18nExceptionInterface.php CHANGED
File without changes
vendor/dhii/i18n-interface/src/Exception/StringTranslationExceptionInterface.php CHANGED
File without changes
vendor/dhii/i18n-interface/src/Exception/TranslationExceptionInterface.php CHANGED
File without changes
vendor/dhii/i18n-interface/src/FormatTranslatorInterface.php CHANGED
File without changes
vendor/dhii/i18n-interface/src/StringTranslatorInterface.php CHANGED
File without changes
vendor/dhii/i18n-interface/src/TranslatorInterface.php CHANGED
File without changes
vendor/dhii/iterator-helper-base/LICENSE CHANGED
File without changes
vendor/dhii/iterator-helper-base/composer.json CHANGED
File without changes
vendor/dhii/iterator-helper-base/src/CountIterableCapableTrait.php CHANGED
File without changes
vendor/dhii/iterator-helper-base/src/MapIterableCapableTrait.php CHANGED
File without changes
vendor/dhii/iterator-helper-base/src/NormalizeIteratorCapableTrait.php CHANGED
File without changes
vendor/dhii/iterator-helper-base/src/ResolveIteratorCapableTrait.php CHANGED
File without changes
vendor/dhii/normalization-helper-base/LICENSE CHANGED
File without changes
vendor/dhii/normalization-helper-base/composer.json CHANGED
File without changes
vendor/dhii/normalization-helper-base/src/NormalizeArrayCapableTrait.php CHANGED
File without changes
vendor/dhii/normalization-helper-base/src/NormalizeIntCapableTrait.php CHANGED
File without changes
vendor/dhii/normalization-helper-base/src/NormalizeIterableCapableTrait.php CHANGED
File without changes
vendor/dhii/normalization-helper-base/src/NormalizeStringCapableTrait.php CHANGED
File without changes
vendor/dhii/normalization-helper-base/src/NormalizeStringableCapableTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/LICENSE CHANGED
File without changes
vendor/dhii/output-renderer-abstract/composer.json CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/BlockAwareTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/CaptureOutputCapableTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/ContextAwareTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/RenderCapableTemplateBlockTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/RenderExceptionCapableToStringTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/RenderTemplateCapableTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/RendererAwareTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/StringableRenderCatcherTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-abstract/src/TemplateAwareTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-base/LICENSE CHANGED
File without changes
vendor/dhii/output-renderer-base/composer.json CHANGED
File without changes
vendor/dhii/output-renderer-base/src/CreateCouldNotRenderExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-base/src/CreateRendererExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-base/src/CreateTemplateRenderExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/output-renderer-base/src/Exception/CouldNotRenderException.php CHANGED
File without changes
vendor/dhii/output-renderer-base/src/Exception/RendererException.php CHANGED
File without changes
vendor/dhii/output-renderer-base/src/Exception/TemplateRenderException.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/LICENSE CHANGED
File without changes
vendor/dhii/output-renderer-interface/composer.json CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/BlockAwareInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/BlockFactoryInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/BlockInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/ContextAwareInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/Exception/CouldNotRenderExceptionInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/Exception/RendererExceptionInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/Exception/TemplateRenderExceptionInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/RendererAwareInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/RendererInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/TemplateAwareInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/TemplateFactoryInterface.php CHANGED
File without changes
vendor/dhii/output-renderer-interface/src/TemplateInterface.php CHANGED
File without changes
vendor/dhii/stats-abstract/composer.json CHANGED
File without changes
vendor/dhii/stats-abstract/composer.lock CHANGED
File without changes
vendor/dhii/stats-abstract/src/AbstractAggregatableCollection.php CHANGED
File without changes
vendor/dhii/stats-abstract/src/AbstractAggregator.php CHANGED
File without changes
vendor/dhii/stats-interface/composer.json CHANGED
File without changes
vendor/dhii/stats-interface/composer.lock CHANGED
File without changes
vendor/dhii/stats-interface/src/AggregatorInterface.php CHANGED
File without changes
vendor/dhii/stringable-interface/LICENSE CHANGED
File without changes
vendor/dhii/stringable-interface/composer.json CHANGED
File without changes
vendor/dhii/stringable-interface/composer.lock CHANGED
File without changes
vendor/dhii/stringable-interface/src/StringableInterface.php CHANGED
File without changes
vendor/dhii/transformer-interface/LICENSE CHANGED
File without changes
vendor/dhii/transformer-interface/composer.json CHANGED
File without changes
vendor/dhii/transformer-interface/src/Exception/CouldNotTransformExceptionInterface.php CHANGED
File without changes
vendor/dhii/transformer-interface/src/Exception/TransformerExceptionInterface.php CHANGED
File without changes
vendor/dhii/transformer-interface/src/TransformerAwareInterface.php CHANGED
File without changes
vendor/dhii/transformer-interface/src/TransformerFactoryInterface.php CHANGED
File without changes
vendor/dhii/transformer-interface/src/TransformerInterface.php CHANGED
File without changes
vendor/dhii/validation-abstract/LICENSE CHANGED
File without changes
vendor/dhii/validation-abstract/composer.json CHANGED
File without changes
vendor/dhii/validation-abstract/src/ChildValidatorsAwareTrait.php CHANGED
File without changes
vendor/dhii/validation-abstract/src/GetValidationErrorsCapableCompositeTrait.php CHANGED
File without changes
vendor/dhii/validation-abstract/src/IsValidCapableTrait.php CHANGED
File without changes
vendor/dhii/validation-abstract/src/SpecAwareTrait.php CHANGED
File without changes
vendor/dhii/validation-abstract/src/ValidateCapableTrait.php CHANGED
File without changes
vendor/dhii/validation-abstract/src/ValidationErrorsAwareTrait.php CHANGED
File without changes
vendor/dhii/validation-abstract/src/ValidationSubjectAwareTrait.php CHANGED
File without changes
vendor/dhii/validation-abstract/src/ValidatorAwareTrait.php CHANGED
File without changes
vendor/dhii/validation-base/LICENSE CHANGED
File without changes
vendor/dhii/validation-base/composer.json CHANGED
File without changes
vendor/dhii/validation-base/src/AbstractCompositeValidatorBase.php CHANGED
File without changes
vendor/dhii/validation-base/src/AbstractValidatorBase.php CHANGED
File without changes
vendor/dhii/validation-base/src/CreateValidationExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/validation-base/src/CreateValidationFailedExceptionCapableTrait.php CHANGED
File without changes
vendor/dhii/validation-base/src/Exception/AbstractBaseValidationException.php CHANGED
File without changes
vendor/dhii/validation-base/src/Exception/ValidationException.php CHANGED
File without changes
vendor/dhii/validation-base/src/Exception/ValidationFailedException.php CHANGED
File without changes
vendor/dhii/validation-base/src/ValidatorTrait.php CHANGED
File without changes
vendor/dhii/validation-interface/LICENSE CHANGED
File without changes
vendor/dhii/validation-interface/composer.json CHANGED
File without changes
vendor/dhii/validation-interface/src/Exception/ValidationExceptionInterface.php CHANGED
File without changes
vendor/dhii/validation-interface/src/Exception/ValidationFailedExceptionInterface.php CHANGED
File without changes
vendor/dhii/validation-interface/src/SpecAwareInterface.php CHANGED
File without changes
vendor/dhii/validation-interface/src/SubjectAwareInterface.php CHANGED
File without changes
vendor/dhii/validation-interface/src/ValidatorAwareInterface.php CHANGED
File without changes
vendor/dhii/validation-interface/src/ValidatorFactoryInterface.php CHANGED
File without changes
vendor/dhii/validation-interface/src/ValidatorInterface.php CHANGED
File without changes
vendor/erusev/parsedown/LICENSE.txt CHANGED
File without changes
vendor/erusev/parsedown/Parsedown.php CHANGED
File without changes
vendor/erusev/parsedown/composer.json CHANGED
File without changes
vendor/php-di/invoker/CONTRIBUTING.md CHANGED
File without changes
vendor/php-di/invoker/LICENSE CHANGED
File without changes
vendor/php-di/invoker/README.md CHANGED
File without changes
vendor/php-di/invoker/composer.json CHANGED
File without changes
vendor/php-di/invoker/doc/parameter-resolvers.md CHANGED
File without changes
vendor/php-di/invoker/src/CallableResolver.php CHANGED
File without changes
vendor/php-di/invoker/src/Exception/InvocationException.php CHANGED
File without changes
vendor/php-di/invoker/src/Exception/NotCallableException.php CHANGED
File without changes
vendor/php-di/invoker/src/Exception/NotEnoughParametersException.php CHANGED
File without changes
vendor/php-di/invoker/src/Invoker.php CHANGED
File without changes
vendor/php-di/invoker/src/InvokerInterface.php CHANGED
File without changes
vendor/php-di/invoker/src/ParameterResolver/AssociativeArrayResolver.php CHANGED
File without changes
vendor/php-di/invoker/src/ParameterResolver/Container/ParameterNameContainerResolver.php CHANGED
File without changes
vendor/php-di/invoker/src/ParameterResolver/Container/TypeHintContainerResolver.php CHANGED
File without changes
vendor/php-di/invoker/src/ParameterResolver/DefaultValueResolver.php CHANGED
File without changes
vendor/php-di/invoker/src/ParameterResolver/NumericArrayResolver.php CHANGED
File without changes
vendor/php-di/invoker/src/ParameterResolver/ParameterResolver.php CHANGED
File without changes
vendor/php-di/invoker/src/ParameterResolver/ResolverChain.php CHANGED
File without changes
vendor/php-di/invoker/src/ParameterResolver/TypeHintResolver.php CHANGED
File without changes
vendor/php-di/invoker/src/Reflection/CallableReflection.php CHANGED
File without changes
vendor/php-di/php-di/.gitattributes CHANGED
File without changes
vendor/php-di/php-di/.gitignore CHANGED
File without changes
vendor/php-di/php-di/LICENSE CHANGED
File without changes
vendor/php-di/php-di/change-log.md CHANGED
File without changes
vendor/php-di/php-di/composer.json CHANGED
File without changes
vendor/php-di/php-di/src/DI/Annotation/Inject.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Annotation/Injectable.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Cache/ArrayCache.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Container.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/ContainerBuilder.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Debug.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/AliasDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/ArrayDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/ArrayDefinitionExtension.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/CacheableDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/DecoratorDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Definition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/AliasDefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/ArrayDefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/DecoratorDefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/DefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/DefinitionDumperDispatcher.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/EnvironmentVariableDefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/FactoryDefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/ObjectDefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/StringDefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Dumper/ValueDefinitionDumper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/EntryReference.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/EnvironmentVariableDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Exception/AnnotationException.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Exception/DefinitionException.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/FactoryDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/HasSubDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Helper/ArrayDefinitionExtensionHelper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Helper/DefinitionHelper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Helper/EnvironmentVariableDefinitionHelper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Helper/FactoryDefinitionHelper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Helper/ObjectDefinitionHelper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Helper/StringDefinitionHelper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Helper/ValueDefinitionHelper.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/InstanceDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/ObjectDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/ObjectDefinition/MethodInjection.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/ObjectDefinition/PropertyInjection.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/AliasResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/ArrayResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/DecoratorResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/DefinitionResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/EnvironmentVariableResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/InstanceInjector.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/ParameterResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/StringResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Resolver/ValueResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Source/AnnotationReader.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Source/Autowiring.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Source/CachedDefinitionSource.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Source/DefinitionFile.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Source/DefinitionSource.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Source/MutableDefinitionSource.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/Source/SourceChain.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/StringDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Definition/ValueDefinition.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/DependencyException.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Factory/RequestedEntry.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/FactoryInterface.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Invoker/DefinitionParameterResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Invoker/FactoryParameterResolver.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/InvokerInterface.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/NotFoundException.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Proxy/ProxyFactory.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/Scope.php CHANGED
File without changes
vendor/php-di/php-di/src/DI/functions.php CHANGED
File without changes
vendor/php-di/phpdoc-reader/.gitattributes CHANGED
File without changes
vendor/php-di/phpdoc-reader/.gitignore CHANGED
File without changes
vendor/php-di/phpdoc-reader/LICENSE CHANGED
File without changes
vendor/php-di/phpdoc-reader/composer.json CHANGED
File without changes
vendor/php-di/phpdoc-reader/src/PhpDocReader/AnnotationException.php CHANGED
File without changes
vendor/php-di/phpdoc-reader/src/PhpDocReader/PhpDocReader.php CHANGED
File without changes
vendor/php-di/phpdoc-reader/src/PhpDocReader/PhpParser/TokenParser.php CHANGED
File without changes
vendor/php-di/phpdoc-reader/src/PhpDocReader/PhpParser/UseStatementParser.php CHANGED
File without changes
vendor/psr/container/.gitignore CHANGED
File without changes
vendor/psr/container/LICENSE CHANGED
File without changes
vendor/psr/container/composer.json CHANGED
File without changes
vendor/psr/container/src/ContainerExceptionInterface.php CHANGED
File without changes
vendor/psr/container/src/ContainerInterface.php CHANGED
File without changes
vendor/psr/container/src/NotFoundExceptionInterface.php CHANGED
File without changes
vendor/psr/log/.gitignore CHANGED
File without changes
vendor/psr/log/LICENSE CHANGED
File without changes
vendor/psr/log/Psr/Log/AbstractLogger.php CHANGED
File without changes
vendor/psr/log/Psr/Log/InvalidArgumentException.php CHANGED
File without changes
vendor/psr/log/Psr/Log/LogLevel.php CHANGED
File without changes
vendor/psr/log/Psr/Log/LoggerAwareInterface.php CHANGED
File without changes
vendor/psr/log/Psr/Log/LoggerAwareTrait.php CHANGED
File without changes
vendor/psr/log/Psr/Log/LoggerInterface.php CHANGED
File without changes
vendor/psr/log/Psr/Log/LoggerTrait.php CHANGED
File without changes
vendor/psr/log/Psr/Log/NullLogger.php CHANGED
File without changes
vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php CHANGED
File without changes
vendor/psr/log/Psr/Log/Test/TestLogger.php CHANGED
File without changes
vendor/psr/log/composer.json CHANGED
File without changes
vendor/rebelcode/composer-cleanup-plugin/.gitignore CHANGED
File without changes
vendor/rebelcode/composer-cleanup-plugin/README.md DELETED
@@ -1,23 +0,0 @@
1
- Composer Cleanup Plugin
2
- =======================
3
-
4
- [![Latest Stable Version](https://poser.pugx.org/rebelcode/composer-cleanup-plugin/version)](https://packagist.org/packages/rebelcode/rcmod-eddbk-rest-api)
5
-
6
- Remove tests & documentation from the vendor dir. Based on [laravel-vendor-cleanup](https://github.com/barryvdh/laravel-vendor-cleanup) but implemented as a Composer Plugin instead of a Laravel command.
7
-
8
- Usually disk size shouldn't be a problem, but when you have to use FTP to deploy or have very limited disk space,
9
- you can use this package to cut down the vendor directory by deleting files that aren't used in production (tests/docs etc).
10
-
11
- > **Note:** This package is still experimental, usage in production is not recommended.
12
- > In normal circumstances, you shouldn't care about disk space! Try deploying with SSH/Git instead.
13
-
14
- ## Install
15
-
16
- Require this package in your composer.json:
17
-
18
- "rebelcode/composer-cleanup-plugin": "^0.1"
19
-
20
- ## Adding rules
21
-
22
- Please submit a PR to [src/CleanupRules.php](https://github.com/barryvdh/composer-cleanup-plugin/blob/master/src/CleanupRules.php) to add more rules for packages.
23
- Make sure you test them first, sometimes tests dirs are classmapped and will error when deleted.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/rebelcode/composer-cleanup-plugin/composer.json CHANGED
File without changes
vendor/rebelcode/composer-cleanup-plugin/src/CleanupPlugin.php CHANGED
File without changes
vendor/rebelcode/composer-cleanup-plugin/src/CleanupRules.php CHANGED
File without changes
vendor/symfony/polyfill-ctype/Ctype.php CHANGED
File without changes
vendor/symfony/polyfill-ctype/LICENSE CHANGED
File without changes
vendor/symfony/polyfill-ctype/bootstrap.php CHANGED
File without changes
vendor/symfony/polyfill-ctype/composer.json CHANGED
File without changes
vendor/twig/extensions/.gitignore CHANGED
File without changes
vendor/twig/extensions/LICENSE CHANGED
File without changes
vendor/twig/extensions/composer.json CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Autoloader.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Extension/Array.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Extension/Date.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Extension/I18n.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Extension/Intl.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Extension/Text.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Arguments.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Array.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Body.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Boolean.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Constant.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Expression.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Hash.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Number.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Optional.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Switch.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Grammar/Tag.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/GrammarInterface.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/Node/Trans.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/SimpleTokenParser.php CHANGED
File without changes
vendor/twig/extensions/lib/Twig/Extensions/TokenParser/Trans.php CHANGED
File without changes
vendor/twig/extensions/src/ArrayExtension.php CHANGED
File without changes
vendor/twig/extensions/src/DateExtension.php CHANGED
File without changes
vendor/twig/extensions/src/I18nExtension.php CHANGED
File without changes
vendor/twig/extensions/src/IntlExtension.php CHANGED
File without changes
vendor/twig/extensions/src/Node/TransNode.php CHANGED
File without changes
vendor/twig/extensions/src/TextExtension.php CHANGED
File without changes
vendor/twig/extensions/src/TokenParser/TransTokenParser.php CHANGED
File without changes
vendor/twig/twig/.editorconfig CHANGED
File without changes
vendor/twig/twig/.gitignore CHANGED
File without changes
vendor/twig/twig/.php_cs.dist CHANGED
File without changes
vendor/twig/twig/LICENSE CHANGED
File without changes
vendor/twig/twig/composer.json CHANGED
@@ -42,7 +42,7 @@
42
  },
43
  "extra": {
44
  "branch-alias": {
45
- "dev-master": "1.41-dev"
46
  }
47
  }
48
  }
42
  },
43
  "extra": {
44
  "branch-alias": {
45
+ "dev-master": "1.39-dev"
46
  }
47
  }
48
  }
vendor/twig/twig/drupal_test.sh DELETED
@@ -1,51 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -x
4
- set -e
5
-
6
- REPO=`pwd`
7
- cd /tmp
8
- rm -rf drupal-twig-test
9
- composer create-project --no-interaction drupal-composer/drupal-project:8.x-dev drupal-twig-test
10
- cd drupal-twig-test
11
- (cd vendor/twig && rm -rf twig && ln -sf $REPO twig)
12
- echo '$config["system.logging"]["error_level"] = "verbose";' >> web/sites/default/settings.php
13
- php ./web/core/scripts/drupal install --no-interaction demo_umami > output
14
- perl -p -i -e 's/^([A-Za-z]+)\: (.+)$/export DRUPAL_\1=\2/' output
15
- source output
16
-
17
- wget https://get.symfony.com/cli/installer -O - | bash
18
- export PATH="$HOME/.symfony/bin:$PATH"
19
- symfony server:start -d --no-tls
20
- ENDPOINT=`symfony server:status -no-ansi | sed -E 's/^.+ http/http/'`
21
-
22
- curl -OLsS https://get.blackfire.io/blackfire-player.phar
23
- chmod +x blackfire-player.phar
24
- cat > drupal-tests.bkf <<EOF
25
- name "Drupal tests"
26
-
27
- scenario
28
- name "homepage"
29
- set name "admin"
30
- set pass "pass"
31
-
32
- visit url('/')
33
- expect status_code() == 200
34
- click link('Articles')
35
- expect status_code() == 200
36
- click link('Dairy-free and delicious milk chocolate')
37
- expect body() matches "/Dairy\-free milk chocolate is made in largely the same way as regular chocolate/"
38
- expect status_code() == 200
39
- click link('Log in')
40
- expect status_code() == 200
41
- submit button("Log in")
42
- param name name
43
- param pass pass
44
- expect status_code() == 303
45
- follow
46
- expect status_code() == 200
47
- click link('Structure')
48
- expect status_code() == 200
49
- EOF
50
- ./blackfire-player.phar run drupal-tests.bkf --endpoint=$ENDPOINT --variable name=$DRUPAL_Username --variable pass=$DRUPAL_Password
51
- symfony server:stop
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/twig/twig/lib/Twig/Autoloader.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/BaseNodeVisitor.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Cache/Filesystem.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Cache/Null.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/CacheInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Compiler.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/CompilerInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Environment.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Error.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Error/Loader.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Error/Runtime.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Error/Syntax.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/ExpressionParser.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/Core.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/Debug.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/Escaper.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/Optimizer.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/Profiler.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/Sandbox.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/Staging.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Extension/StringLoader.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/ExtensionInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Filter.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Filter/Function.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Filter/Method.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Filter/Node.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/FilterCallableInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/FilterInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Function.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Function/Function.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Function/Method.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Function/Node.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/FunctionCallableInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/FunctionInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Lexer.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/LexerInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Loader/Array.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Loader/Chain.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Loader/Filesystem.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Loader/String.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/LoaderInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Markup.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/AutoEscape.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Block.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/BlockReference.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Body.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/CheckSecurity.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Deprecated.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Do.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Embed.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Array.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Call.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Constant.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Filter.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Function.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Name.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Parent.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/TempName.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Test.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Unary.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Flush.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/For.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/ForLoop.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/If.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Import.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Include.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Macro.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Module.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Print.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Sandbox.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Set.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/SetTemp.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Spaceless.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/Text.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Node/With.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeCaptureInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeOutputInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeTraverser.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/NodeVisitorInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Parser.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/ParserInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Profiler/Dumper/Base.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Profiler/Profile.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/RuntimeLoaderInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/SimpleFilter.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/SimpleFunction.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/SimpleTest.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Source.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/SourceContextLoaderInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Template.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TemplateInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TemplateWrapper.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Test.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Test/Function.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Test/Method.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Test/Node.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Test/NodeTestCase.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TestCallableInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TestInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Token.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Block.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Do.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Embed.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Extends.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Filter.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Flush.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/For.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/From.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/If.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Import.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Include.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Macro.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Set.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/Use.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParser/With.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParserBroker.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenParserInterface.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/TokenStream.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php CHANGED
File without changes
vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php CHANGED
File without changes
vendor/twig/twig/src/Cache/CacheInterface.php CHANGED
File without changes
vendor/twig/twig/src/Cache/FilesystemCache.php CHANGED
File without changes
vendor/twig/twig/src/Cache/NullCache.php CHANGED
File without changes
vendor/twig/twig/src/Compiler.php CHANGED
File without changes
vendor/twig/twig/src/Environment.php CHANGED
@@ -41,10 +41,10 @@ use Twig\TokenParser\TokenParserInterface;
41
  */
42
  class Environment
43
  {
44
- const VERSION = '1.41.0';
45
- const VERSION_ID = 14100;
46
  const MAJOR_VERSION = 1;
47
- const MINOR_VERSION = 41;
48
  const RELEASE_VERSION = 0;
49
  const EXTRA_VERSION = '';
50
 
@@ -470,7 +470,6 @@ class Environment
470
  $this->cache->load($key);
471
  }
472
 
473
- $source = null;
474
  if (!class_exists($cls, false)) {
475
  $loader = $this->getLoader();
476
  if (!$loader instanceof SourceContextLoaderInterface) {
41
  */
42
  class Environment
43
  {
44
+ const VERSION = '1.39.0';
45
+ const VERSION_ID = 13900;
46
  const MAJOR_VERSION = 1;
47
+ const MINOR_VERSION = 39;
48
  const RELEASE_VERSION = 0;
49
  const EXTRA_VERSION = '';
50
 
470
  $this->cache->load($key);
471
  }
472
 
 
473
  if (!class_exists($cls, false)) {
474
  $loader = $this->getLoader();
475
  if (!$loader instanceof SourceContextLoaderInterface) {
vendor/twig/twig/src/Error/Error.php CHANGED
@@ -49,9 +49,15 @@ class Error extends \Exception
49
  /**
50
  * Constructor.
51
  *
 
 
 
 
52
  * Set the line number to -1 to enable its automatic guessing.
53
  * Set the name to null to enable its automatic guessing.
54
  *
 
 
55
  * @param string $message The error message
56
  * @param int $lineno The template line where the error occurred
57
  * @param Source|string|null $source The source context where the error occurred
49
  /**
50
  * Constructor.
51
  *
52
+ * Set both the line number and the name to false to
53
+ * disable automatic guessing of the original template name
54
+ * and line number.
55
+ *
56
  * Set the line number to -1 to enable its automatic guessing.
57
  * Set the name to null to enable its automatic guessing.
58
  *
59
+ * By default, automatic guessing is enabled.
60
+ *
61
  * @param string $message The error message
62
  * @param int $lineno The template line where the error occurred
63
  * @param Source|string|null $source The source context where the error occurred
vendor/twig/twig/src/Error/LoaderError.php CHANGED
File without changes
vendor/twig/twig/src/Error/RuntimeError.php CHANGED
File without changes
vendor/twig/twig/src/Error/SyntaxError.php CHANGED
File without changes
vendor/twig/twig/src/ExpressionParser.php CHANGED
@@ -14,7 +14,6 @@ namespace Twig;
14
 
15
  use Twig\Error\SyntaxError;
16
  use Twig\Node\Expression\ArrayExpression;
17
- use Twig\Node\Expression\ArrowFunctionExpression;
18
  use Twig\Node\Expression\AssignNameExpression;
19
  use Twig\Node\Expression\Binary\ConcatBinary;
20
  use Twig\Node\Expression\BlockReferenceExpression;
@@ -69,12 +68,8 @@ class ExpressionParser
69
  }
70
  }
71
 
72
- public function parseExpression($precedence = 0, $allowArrow = false)
73
  {
74
- if ($allowArrow && $arrow = $this->parseArrow()) {
75
- return $arrow;
76
- }
77
-
78
  $expr = $this->getPrimary();
79
  $token = $this->parser->getCurrentToken();
80
  while ($this->isBinary($token) && $this->binaryOperators[$token->getValue()]['precedence'] >= $precedence) {
@@ -103,64 +98,6 @@ class ExpressionParser
103
  return $expr;
104
  }
105
 
106
- /**
107
- * @return ArrowFunctionExpression|null
108
- */
109
- private function parseArrow()
110
- {
111
- $stream = $this->parser->getStream();
112
-
113
- // short array syntax (one argument, no parentheses)?
114
- if ($stream->look(1)->test(Token::ARROW_TYPE)) {
115
- $line = $stream->getCurrent()->getLine();
116
- $token = $stream->expect(Token::NAME_TYPE);
117
- $names = [new AssignNameExpression($token->getValue(), $token->getLine())];
118
- $stream->expect(Token::ARROW_TYPE);
119
-
120
- return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line);
121
- }
122
-
123
- // first, determine if we are parsing an arrow function by finding => (long form)
124
- $i = 0;
125
- if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, '(')) {
126
- return null;
127
- }
128
- ++$i;
129
- while (true) {
130
- // variable name
131
- ++$i;
132
- if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, ',')) {
133
- break;
134
- }
135
- ++$i;
136
- }
137
- if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, ')')) {
138
- return null;
139
- }
140
- ++$i;
141
- if (!$stream->look($i)->test(Token::ARROW_TYPE)) {
142
- return null;
143
- }
144
-
145
- // yes, let's parse it properly
146
- $token = $stream->expect(Token::PUNCTUATION_TYPE, '(');
147
- $line = $token->getLine();
148
-
149
- $names = [];
150
- while (true) {
151
- $token = $stream->expect(Token::NAME_TYPE);
152
- $names[] = new AssignNameExpression($token->getValue(), $token->getLine());
153
-
154
- if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) {
155
- break;
156
- }
157
- }
158
- $stream->expect(Token::PUNCTUATION_TYPE, ')');
159
- $stream->expect(Token::ARROW_TYPE);
160
-
161
- return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line);
162
- }
163
-
164
  protected function getPrimary()
165
  {
166
  $token = $this->parser->getCurrentToken();
@@ -562,7 +499,7 @@ class ExpressionParser
562
  if (!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE, '(')) {
563
  $arguments = new Node();
564
  } else {
565
- $arguments = $this->parseArguments(true, false, true);
566
  }
567
 
568
  $class = $this->getFilterNodeClass($name->getAttribute('value'), $token->getLine());
@@ -589,7 +526,7 @@ class ExpressionParser
589
  *
590
  * @throws SyntaxError
591
  */
592
- public function parseArguments($namedArguments = false, $definition = false, $allowArrow = false)
593
  {
594
  $args = [];
595
  $stream = $this->parser->getStream();
@@ -604,7 +541,7 @@ class ExpressionParser
604
  $token = $stream->expect(Token::NAME_TYPE, null, 'An argument must be a name');
605
  $value = new NameExpression($token->getValue(), $this->parser->getCurrentToken()->getLine());
606
  } else {
607
- $value = $this->parseExpression(0, $allowArrow);
608
  }
609
 
610
  $name = null;
@@ -621,7 +558,7 @@ class ExpressionParser
621
  throw new SyntaxError(sprintf('A default value for an argument must be a constant (a boolean, a string, a number, or an array).'), $token->getLine(), $stream->getSourceContext());
622
  }
623
  } else {
624
- $value = $this->parseExpression(0, $allowArrow);
625
  }
626
  }
627
 
@@ -690,7 +627,7 @@ class ExpressionParser
690
  $class = $this->getTestNodeClass($test);
691
  $arguments = null;
692
  if ($stream->test(Token::PUNCTUATION_TYPE, '(')) {
693
- $arguments = $this->parseArguments(true);
694
  }
695
 
696
  return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine());
14
 
15
  use Twig\Error\SyntaxError;
16
  use Twig\Node\Expression\ArrayExpression;
 
17
  use Twig\Node\Expression\AssignNameExpression;
18
  use Twig\Node\Expression\Binary\ConcatBinary;
19
  use Twig\Node\Expression\BlockReferenceExpression;
68
  }
69
  }
70
 
71
+ public function parseExpression($precedence = 0)
72
  {
 
 
 
 
73
  $expr = $this->getPrimary();
74
  $token = $this->parser->getCurrentToken();
75
  while ($this->isBinary($token) && $this->binaryOperators[$token->getValue()]['precedence'] >= $precedence) {
98
  return $expr;
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  protected function getPrimary()
102
  {
103
  $token = $this->parser->getCurrentToken();
499
  if (!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE, '(')) {
500
  $arguments = new Node();
501
  } else {
502
+ $arguments = $this->parseArguments(true);
503
  }
504
 
505
  $class = $this->getFilterNodeClass($name->getAttribute('value'), $token->getLine());
526
  *
527
  * @throws SyntaxError
528
  */
529
+ public function parseArguments($namedArguments = false, $definition = false)
530
  {
531
  $args = [];
532
  $stream = $this->parser->getStream();
541
  $token = $stream->expect(Token::NAME_TYPE, null, 'An argument must be a name');
542
  $value = new NameExpression($token->getValue(), $this->parser->getCurrentToken()->getLine());
543
  } else {
544
+ $value = $this->parseExpression();
545
  }
546
 
547
  $name = null;
558
  throw new SyntaxError(sprintf('A default value for an argument must be a constant (a boolean, a string, a number, or an array).'), $token->getLine(), $stream->getSourceContext());
559
  }
560
  } else {
561
+ $value = $this->parseExpression();
562
  }
563
  }
564
 
627
  $class = $this->getTestNodeClass($test);
628
  $arguments = null;
629
  if ($stream->test(Token::PUNCTUATION_TYPE, '(')) {
630
+ $arguments = $this->parser->getExpressionParser()->parseArguments(true);
631
  }
632
 
633
  return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine());
vendor/twig/twig/src/Extension/AbstractExtension.php CHANGED
File without changes
vendor/twig/twig/src/Extension/CoreExtension.php CHANGED
@@ -11,7 +11,6 @@
11
 
12
  namespace Twig\Extension {
13
  use Twig\ExpressionParser;
14
- use Twig\TokenParser\ApplyTokenParser;
15
  use Twig\TokenParser\BlockTokenParser;
16
  use Twig\TokenParser\DeprecatedTokenParser;
17
  use Twig\TokenParser\DoTokenParser;
@@ -140,7 +139,6 @@ class CoreExtension extends AbstractExtension
140
  public function getTokenParsers()
141
  {
142
  return [
143
- new ApplyTokenParser(),
144
  new ForTokenParser(),
145
  new IfTokenParser(),
146
  new ExtendsTokenParser(),
@@ -194,9 +192,6 @@ class CoreExtension extends AbstractExtension
194
  new TwigFilter('sort', 'twig_sort_filter'),
195
  new TwigFilter('merge', 'twig_array_merge'),
196
  new TwigFilter('batch', 'twig_array_batch'),
197
- new TwigFilter('filter', 'twig_array_filter'),
198
- new TwigFilter('map', 'twig_array_map'),
199
- new TwigFilter('reduce', 'twig_array_reduce'),
200
 
201
  // string/array filters
202
  new TwigFilter('reverse', 'twig_reverse_filter', ['needs_environment' => true]),
@@ -940,10 +935,6 @@ function twig_sort_filter($array)
940
  */
941
  function twig_in_filter($value, $compare)
942
  {
943
- if ($value instanceof Markup) {
944
- $value = (string) $value;
945
- }
946
-
947
  if (\is_array($compare)) {
948
  return \in_array($value, $compare, \is_object($value) || \is_resource($value));
949
  } elseif (\is_string($compare) && (\is_string($value) || \is_int($value) || \is_float($value))) {
@@ -1667,7 +1658,7 @@ function twig_constant_is_defined($constant, $object = null)
1667
  function twig_array_batch($items, $size, $fill = null, $preserveKeys = true)
1668
  {
1669
  if (!twig_test_iterable($items)) {
1670
- throw new RuntimeError(sprintf('The "batch" filter expects an array or "Traversable", got "%s".', \is_object($items) ? \get_class($items) : \gettype($items)));
1671
  }
1672
 
1673
  $size = ceil($size);
@@ -1685,40 +1676,4 @@ function twig_array_batch($items, $size, $fill = null, $preserveKeys = true)
1685
 
1686
  return $result;
1687
  }
1688
-
1689
- function twig_array_filter($array, $arrow)
1690
- {
1691
- if (\is_array($array)) {
1692
- if (\PHP_VERSION_ID >= 50600) {
1693
- return array_filter($array, $arrow, \ARRAY_FILTER_USE_BOTH);
1694
- }
1695
-
1696
- return array_filter($array, $arrow);
1697
- }
1698
-
1699
- while ($array instanceof \IteratorAggregate) {
1700
- $array = $array->getIterator();
1701
- }
1702
-
1703
- return new \CallbackFilterIterator($array, $arrow);
1704
- }
1705
-
1706
- function twig_array_map($array, $arrow)
1707
- {
1708
- $r = [];
1709
- foreach ($array as $k => $v) {
1710
- $r[$k] = $arrow($v, $k);
1711
- }
1712
-
1713
- return $r;
1714
- }
1715
-
1716
- function twig_array_reduce($array, $arrow, $initial = null)
1717
- {
1718
- if (!\is_array($array)) {
1719
- $array = iterator_to_array($array);
1720
- }
1721
-
1722
- return array_reduce($array, $arrow, $initial);
1723
- }
1724
  }
11
 
12
  namespace Twig\Extension {
13
  use Twig\ExpressionParser;
 
14
  use Twig\TokenParser\BlockTokenParser;
15
  use Twig\TokenParser\DeprecatedTokenParser;
16
  use Twig\TokenParser\DoTokenParser;
139
  public function getTokenParsers()
140
  {
141
  return [
 
142
  new ForTokenParser(),
143
  new IfTokenParser(),
144
  new ExtendsTokenParser(),
192
  new TwigFilter('sort', 'twig_sort_filter'),
193
  new TwigFilter('merge', 'twig_array_merge'),
194
  new TwigFilter('batch', 'twig_array_batch'),
 
 
 
195
 
196
  // string/array filters
197
  new TwigFilter('reverse', 'twig_reverse_filter', ['needs_environment' => true]),
935
  */
936
  function twig_in_filter($value, $compare)
937
  {
 
 
 
 
938
  if (\is_array($compare)) {
939
  return \in_array($value, $compare, \is_object($value) || \is_resource($value));
940
  } elseif (\is_string($compare) && (\is_string($value) || \is_int($value) || \is_float($value))) {
1658
  function twig_array_batch($items, $size, $fill = null, $preserveKeys = true)
1659
  {
1660
  if (!twig_test_iterable($items)) {
1661
+ throw new RuntimeError(sprintf('The "batch" filter expects an array or "Traversable", got "%s".', \is_object($from) ? \get_class($from) : \gettype($from)));
1662
  }
1663
 
1664
  $size = ceil($size);
1676
 
1677
  return $result;
1678
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1679
  }
vendor/twig/twig/src/Extension/DebugExtension.php CHANGED
@@ -54,7 +54,7 @@ function twig_var_dump(Environment $env, $context, array $vars = [])
54
  return;
55
  }
56
 
57
- ob_start(function () { return ''; });
58
 
59
  if (!$vars) {
60
  $vars = [];
54
  return;
55
  }
56
 
57
+ ob_start();
58
 
59
  if (!$vars) {
60
  $vars = [];
vendor/twig/twig/src/Extension/EscaperExtension.php CHANGED
File without changes
vendor/twig/twig/src/Extension/ExtensionInterface.php CHANGED
File without changes
vendor/twig/twig/src/Extension/GlobalsInterface.php CHANGED
File without changes
vendor/twig/twig/src/Extension/InitRuntimeInterface.php CHANGED
File without changes
vendor/twig/twig/src/Extension/OptimizerExtension.php CHANGED
File without changes
vendor/twig/twig/src/Extension/ProfilerExtension.php CHANGED
File without changes
vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php CHANGED
File without changes
vendor/twig/twig/src/Extension/SandboxExtension.php CHANGED
File without changes
vendor/twig/twig/src/Extension/StagingExtension.php CHANGED
File without changes
vendor/twig/twig/src/Extension/StringLoaderExtension.php CHANGED
@@ -35,7 +35,7 @@ class_alias('Twig\Extension\StringLoaderExtension', 'Twig_Extension_StringLoader
35
 
36
  namespace {
37
  use Twig\Environment;
38
- use Twig\TemplateWrapper;
39
 
40
  /**
41
  * Loads a template from a string.
@@ -43,9 +43,9 @@ use Twig\TemplateWrapper;
43
  * {{ include(template_from_string("Hello {{ name }}")) }}
44
  *
45
  * @param string $template A template as a string or object implementing __toString()
46
- * @param string $name An optional name of the template to be used in error messages
47
  *
48
- * @return TemplateWrapper
49
  */
50
  function twig_template_from_string(Environment $env, $template, $name = null)
51
  {
35
 
36
  namespace {
37
  use Twig\Environment;
38
+ use Twig\Template;
39
 
40
  /**
41
  * Loads a template from a string.
43
  * {{ include(template_from_string("Hello {{ name }}")) }}
44
  *
45
  * @param string $template A template as a string or object implementing __toString()
46
+ * @param string $name An optional name of the template to be used in error messages
47
  *
48
+ * @return Template
49
  */
50
  function twig_template_from_string(Environment $env, $template, $name = null)
51
  {
vendor/twig/twig/src/FileExtensionEscapingStrategy.php CHANGED
File without changes
vendor/twig/twig/src/Lexer.php CHANGED
@@ -67,17 +67,16 @@ class Lexer implements \Twig_LexerInterface
67
  'interpolation' => ['#{', '}'],
68
  ], $options);
69
 
70
- // when PHP 7.3 is the min version, we will be able to remove the '#' part in preg_quote as it's part of the default
71
  $this->regexes = [
72
  // }}
73
  'lex_var' => '{
74
  \s*
75
  (?:'.
76
- preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '#').'\s*'. // -}}\s*
77
  '|'.
78
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_variable'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~}}[ \t\0\x0B]*
79
  '|'.
80
- preg_quote($this->options['tag_variable'][1], '#'). // }}
81
  ')
82
  }Ax',
83
 
@@ -85,17 +84,17 @@ class Lexer implements \Twig_LexerInterface
85
  'lex_block' => '{
86
  \s*
87
  (?:'.
88
- preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*\n?'. // -%}\s*\n?
89
  '|'.
90
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
91
  '|'.
92
- preg_quote($this->options['tag_block'][1], '#').'\n?'. // %}\n?
93
  ')
94
  }Ax',
95
 
96
  // {% endverbatim %}
97
  'lex_raw_data' => '{'.
98
- preg_quote($this->options['tag_block'][0], '#'). // {%
99
  '('.
100
  $this->options['whitespace_trim']. // -
101
  '|'.
@@ -104,11 +103,11 @@ class Lexer implements \Twig_LexerInterface
104
  '(?:end%s)'. // endraw or endverbatim
105
  '\s*'.
106
  '(?:'.
107
- preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}
108
  '|'.
109
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
110
  '|'.
111
- preg_quote($this->options['tag_block'][1], '#'). // %}
112
  ')
113
  }sx',
114
 
@@ -131,32 +130,32 @@ class Lexer implements \Twig_LexerInterface
131
  (raw|verbatim)
132
  \s*
133
  (?:'.
134
- preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}\s*
135
  '|'.
136
- preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
137
  '|'.
138
- preg_quote($this->options['tag_block'][1], '#'). // %}
139
  ')
140
  }Asx',
141
 
142
- 'lex_block_line' => '{\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '#').'}As',
143
 
144
  // {{ or {% or {#
145
  'lex_tokens_start' => '{
146
  ('.
147
- preg_quote($this->options['tag_variable'][0], '#'). // {{
148
  '|'.
149
- preg_quote($this->options['tag_block'][0], '#'). // {%
150
  '|'.
151
  preg_quote($this->options['tag_comment'][0], '#'). // {#
152
  ')('.
153
- preg_quote($this->options['whitespace_trim'], '#'). // -
154
  '|'.
155
- preg_quote($this->options['whitespace_line_trim'], '#'). // ~
156
  ')?
157
  }sx',
158
- 'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0], '#').'\s*}A',
159
- 'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1], '#').'}A',
160
  ];
161
  }
162
 
@@ -262,7 +261,7 @@ class Lexer implements \Twig_LexerInterface
262
  if ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0]) {
263
  // whitespace_trim detected ({%-, {{- or {#-)
264
  $text = rtrim($text);
265
- } elseif ($this->options['whitespace_line_trim'] === $this->positions[2][$this->position][0]) {
266
  // whitespace_line_trim detected ({%~, {{~ or {#~)
267
  // don't trim \r and \n
268
  $text = rtrim($text, " \t\0\x0B");
@@ -278,11 +277,11 @@ class Lexer implements \Twig_LexerInterface
278
 
279
  case $this->options['tag_block'][0]:
280
  // raw data?
281
- if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, 0, $this->cursor)) {
282
  $this->moveCursor($match[0]);
283
  $this->lexRawData($match[1]);
284
  // {% line \d+ %}
285
- } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, 0, $this->cursor)) {
286
  $this->moveCursor($match[0]);
287
  $this->lineno = (int) $match[1];
288
  } else {
@@ -302,7 +301,7 @@ class Lexer implements \Twig_LexerInterface
302
 
303
  protected function lexBlock()
304
  {
305
- if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, 0, $this->cursor)) {
306
  $this->pushToken(Token::BLOCK_END_TYPE);
307
  $this->moveCursor($match[0]);
308
  $this->popState();
@@ -313,7 +312,7 @@ class Lexer implements \Twig_LexerInterface
313
 
314
  protected function lexVar()
315
  {
316
- if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, 0, $this->cursor)) {
317
  $this->pushToken(Token::VAR_END_TYPE);
318
  $this->moveCursor($match[0]);
319
  $this->popState();
@@ -325,7 +324,7 @@ class Lexer implements \Twig_LexerInterface
325
  protected function lexExpression()
326
  {
327
  // whitespace
328
- if (preg_match('/\s+/A', $this->code, $match, 0, $this->cursor)) {
329
  $this->moveCursor($match[0]);
330
 
331
  if ($this->cursor >= $this->end) {
@@ -333,23 +332,18 @@ class Lexer implements \Twig_LexerInterface
333
  }
334
  }
335
 
336
- // arrow function
337
- if ('=' === $this->code[$this->cursor] && '>' === $this->code[$this->cursor + 1]) {
338
- $this->pushToken(Token::ARROW_TYPE, '=>');
339
- $this->moveCursor('=>');
340
- }
341
  // operators
342
- elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) {
343
  $this->pushToken(Token::OPERATOR_TYPE, preg_replace('/\s+/', ' ', $match[0]));
344
  $this->moveCursor($match[0]);
345
  }
346
  // names
347
- elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0, $this->cursor)) {
348
  $this->pushToken(Token::NAME_TYPE, $match[0]);
349
  $this->moveCursor($match[0]);
350
  }
351
  // numbers
352
- elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, 0, $this->cursor)) {
353
  $number = (float) $match[0]; // floats
354
  if (ctype_digit($match[0]) && $number <= PHP_INT_MAX) {
355
  $number = (int) $match[0]; // integers lower than the maximum
@@ -379,12 +373,12 @@ class Lexer implements \Twig_LexerInterface
379
  ++$this->cursor;
380
  }
381
  // strings
382
- elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0, $this->cursor)) {
383
  $this->pushToken(Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1)));
384
  $this->moveCursor($match[0]);
385
  }
386
  // opening double quoted string
387
- elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) {
388
  $this->brackets[] = ['"', $this->lineno];
389
  $this->pushState(self::STATE_STRING);
390
  $this->moveCursor($match[0]);
@@ -434,15 +428,15 @@ class Lexer implements \Twig_LexerInterface
434
 
435
  protected function lexString()
436
  {
437
- if (preg_match($this->regexes['interpolation_start'], $this->code, $match, 0, $this->cursor)) {
438
  $this->brackets[] = [$this->options['interpolation'][0], $this->lineno];
439
  $this->pushToken(Token::INTERPOLATION_START_TYPE);
440
  $this->moveCursor($match[0]);
441
  $this->pushState(self::STATE_INTERPOLATION);
442
- } elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, 0, $this->cursor) && \strlen($match[0]) > 0) {
443
  $this->pushToken(Token::STRING_TYPE, stripcslashes($match[0]));
444
  $this->moveCursor($match[0]);
445
- } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) {
446
  list($expect, $lineno) = array_pop($this->brackets);
447
  if ('"' != $this->code[$this->cursor]) {
448
  throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source);
@@ -459,7 +453,7 @@ class Lexer implements \Twig_LexerInterface
459
  protected function lexInterpolation()
460
  {
461
  $bracket = end($this->brackets);
462
- if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, 0, $this->cursor)) {
463
  array_pop($this->brackets);
464
  $this->pushToken(Token::INTERPOLATION_END_TYPE);
465
  $this->moveCursor($match[0]);
67
  'interpolation' => ['#{', '}'],
68
  ], $options);
69
 
 
70
  $this->regexes = [
71
  // }}
72
  'lex_var' => '{
73
  \s*
74
  (?:'.
75
+ preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1]).'\s*'. // -}}\s*
76
  '|'.
77
+ preg_quote($this->options['whitespace_line_trim'].$this->options['tag_variable'][1]).'['.$this->options['whitespace_line_chars'].']*'. // ~}}[ \t\0\x0B]*
78
  '|'.
79
+ preg_quote($this->options['tag_variable'][1]). // }}
80
  ')
81
  }Ax',
82
 
84
  'lex_block' => '{
85
  \s*
86
  (?:'.
87
+ preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1]).'\s*\n?'. // -%}\s*\n?
88
  '|'.
89
+ preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1]).'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
90
  '|'.
91
+ preg_quote($this->options['tag_block'][1]).'\n?'. // %}\n?
92
  ')
93
  }Ax',
94
 
95
  // {% endverbatim %}
96
  'lex_raw_data' => '{'.
97
+ preg_quote($this->options['tag_block'][0]). // {%
98
  '('.
99
  $this->options['whitespace_trim']. // -
100
  '|'.
103
  '(?:end%s)'. // endraw or endverbatim
104
  '\s*'.
105
  '(?:'.
106
+ preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1]).'\s*'. // -%}
107
  '|'.
108
+ preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1]).'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
109
  '|'.
110
+ preg_quote($this->options['tag_block'][1]). // %}
111
  ')
112
  }sx',
113
 
130
  (raw|verbatim)
131
  \s*
132
  (?:'.
133
+ preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1]).'\s*'. // -%}\s*
134
  '|'.
135
+ preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1]).'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]*
136
  '|'.
137
+ preg_quote($this->options['tag_block'][1]). // %}
138
  ')
139
  }Asx',
140
 
141
+ 'lex_block_line' => '{\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1]).'}As',
142
 
143
  // {{ or {% or {#
144
  'lex_tokens_start' => '{
145
  ('.
146
+ preg_quote($this->options['tag_variable'][0]). // {{
147
  '|'.
148
+ preg_quote($this->options['tag_block'][0]). // {%
149
  '|'.
150
  preg_quote($this->options['tag_comment'][0], '#'). // {#
151
  ')('.
152
+ preg_quote($this->options['whitespace_trim']). // -
153
  '|'.
154
+ preg_quote($this->options['whitespace_line_trim']). // ~
155
  ')?
156
  }sx',
157
+ 'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0]).'\s*}A',
158
+ 'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1]).'}A',
159
  ];
160
  }
161
 
261
  if ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0]) {
262
  // whitespace_trim detected ({%-, {{- or {#-)
263
  $text = rtrim($text);
264
+ } else {
265
  // whitespace_line_trim detected ({%~, {{~ or {#~)
266
  // don't trim \r and \n
267
  $text = rtrim($text, " \t\0\x0B");
277
 
278
  case $this->options['tag_block'][0]:
279
  // raw data?
280
+ if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, null, $this->cursor)) {
281
  $this->moveCursor($match[0]);
282
  $this->lexRawData($match[1]);
283
  // {% line \d+ %}
284
+ } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, null, $this->cursor)) {
285
  $this->moveCursor($match[0]);
286
  $this->lineno = (int) $match[1];
287
  } else {
301
 
302
  protected function lexBlock()
303
  {
304
+ if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, null, $this->cursor)) {
305
  $this->pushToken(Token::BLOCK_END_TYPE);
306
  $this->moveCursor($match[0]);
307
  $this->popState();
312
 
313
  protected function lexVar()
314
  {
315
+ if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, null, $this->cursor)) {
316
  $this->pushToken(Token::VAR_END_TYPE);
317
  $this->moveCursor($match[0]);
318
  $this->popState();
324
  protected function lexExpression()
325
  {
326
  // whitespace
327
+ if (preg_match('/\s+/A', $this->code, $match, null, $this->cursor)) {
328
  $this->moveCursor($match[0]);
329
 
330
  if ($this->cursor >= $this->end) {
332
  }
333
  }
334
 
 
 
 
 
 
335
  // operators
336
+ if (preg_match($this->regexes['operator'], $this->code, $match, null, $this->cursor)) {
337
  $this->pushToken(Token::OPERATOR_TYPE, preg_replace('/\s+/', ' ', $match[0]));
338
  $this->moveCursor($match[0]);
339
  }
340
  // names
341
+ elseif (preg_match(self::REGEX_NAME, $this->code, $match, null, $this->cursor)) {
342
  $this->pushToken(Token::NAME_TYPE, $match[0]);
343
  $this->moveCursor($match[0]);
344
  }
345
  // numbers
346
+ elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, null, $this->cursor)) {
347
  $number = (float) $match[0]; // floats
348
  if (ctype_digit($match[0]) && $number <= PHP_INT_MAX) {
349
  $number = (int) $match[0]; // integers lower than the maximum
373
  ++$this->cursor;
374
  }
375
  // strings
376
+ elseif (preg_match(self::REGEX_STRING, $this->code, $match, null, $this->cursor)) {
377
  $this->pushToken(Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1)));
378
  $this->moveCursor($match[0]);
379
  }
380
  // opening double quoted string
381
+ elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) {
382
  $this->brackets[] = ['"', $this->lineno];
383
  $this->pushState(self::STATE_STRING);
384
  $this->moveCursor($match[0]);
428
 
429
  protected function lexString()
430
  {
431
+ if (preg_match($this->regexes['interpolation_start'], $this->code, $match, null, $this->cursor)) {
432
  $this->brackets[] = [$this->options['interpolation'][0], $this->lineno];
433
  $this->pushToken(Token::INTERPOLATION_START_TYPE);
434
  $this->moveCursor($match[0]);
435
  $this->pushState(self::STATE_INTERPOLATION);
436
+ } elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, null, $this->cursor) && \strlen($match[0]) > 0) {
437
  $this->pushToken(Token::STRING_TYPE, stripcslashes($match[0]));
438
  $this->moveCursor($match[0]);
439
+ } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) {
440
  list($expect, $lineno) = array_pop($this->brackets);
441
  if ('"' != $this->code[$this->cursor]) {
442
  throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source);
453
  protected function lexInterpolation()
454
  {
455
  $bracket = end($this->brackets);
456
+ if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, null, $this->cursor)) {
457
  array_pop($this->brackets);
458
  $this->pushToken(Token::INTERPOLATION_END_TYPE);
459
  $this->moveCursor($match[0]);
vendor/twig/twig/src/Loader/ArrayLoader.php CHANGED
File without changes
vendor/twig/twig/src/Loader/ChainLoader.php CHANGED
File without changes
vendor/twig/twig/src/Loader/ExistsLoaderInterface.php CHANGED
File without changes
vendor/twig/twig/src/Loader/FilesystemLoader.php CHANGED
@@ -140,27 +140,19 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
140
  {
141
  @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', \get_class($this)), E_USER_DEPRECATED);
142
 
143
- if (null === ($path = $this->findTemplate($name)) || false === $path) {
144
- return '';
145
- }
146
-
147
- return file_get_contents($path);
148
  }
149
 
150
  public function getSourceContext($name)
151
  {
152
- if (null === ($path = $this->findTemplate($name)) || false === $path) {
153
- return new Source('', $name, '');
154
- }
155
 
156
  return new Source(file_get_contents($path), $name, $path);
157
  }
158
 
159
  public function getCacheKey($name)
160
  {
161
- if (null === ($path = $this->findTemplate($name)) || false === $path) {
162
- return '';
163
- }
164
  $len = \strlen($this->rootPath);
165
  if (0 === strncmp($this->rootPath, $path, $len)) {
166
  return substr($path, $len);
@@ -178,7 +170,7 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
178
  }
179
 
180
  try {
181
- return null !== ($path = $this->findTemplate($name, false)) && false !== $path;
182
  } catch (LoaderError $e) {
183
  @trigger_error(sprintf('In %s::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.', \get_class($this)), E_USER_DEPRECATED);
184
 
@@ -188,22 +180,9 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
188
 
189
  public function isFresh($name, $time)
190
  {
191
- // false support to be removed in 3.0
192
- if (null === ($path = $this->findTemplate($name)) || false === $path) {
193
- return false;
194
- }
195
-
196
- return filemtime($path) < $time;
197
  }
198
 
199
- /**
200
- * Checks if the template can be found.
201
- *
202
- * @param string $name The template name
203
- *
204
- * @return string|false The template name or false
205
- * @return string|false|null The template name or false/null
206
- */
207
  protected function findTemplate($name)
208
  {
209
  $throw = \func_num_args() > 1 ? func_get_arg(1) : true;
140
  {
141
  @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', \get_class($this)), E_USER_DEPRECATED);
142
 
143
+ return file_get_contents($this->findTemplate($name));
 
 
 
 
144
  }
145
 
146
  public function getSourceContext($name)
147
  {
148
+ $path = $this->findTemplate($name);
 
 
149
 
150
  return new Source(file_get_contents($path), $name, $path);
151
  }
152
 
153
  public function getCacheKey($name)
154
  {
155
+ $path = $this->findTemplate($name);
 
 
156
  $len = \strlen($this->rootPath);
157
  if (0 === strncmp($this->rootPath, $path, $len)) {
158
  return substr($path, $len);
170
  }
171
 
172
  try {
173
+ return false !== $this->findTemplate($name, false);
174
  } catch (LoaderError $e) {
175
  @trigger_error(sprintf('In %s::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.', \get_class($this)), E_USER_DEPRECATED);
176
 
180
 
181
  public function isFresh($name, $time)
182
  {
183
+ return filemtime($this->findTemplate($name)) < $time;
 
 
 
 
 
184
  }
185
 
 
 
 
 
 
 
 
 
186
  protected function findTemplate($name)
187
  {
188
  $throw = \func_num_args() > 1 ? func_get_arg(1) : true;
vendor/twig/twig/src/Loader/LoaderInterface.php CHANGED
File without changes
vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php CHANGED
File without changes
vendor/twig/twig/src/Markup.php CHANGED
File without changes
vendor/twig/twig/src/Node/AutoEscapeNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/BlockNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/BlockReferenceNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/BodyNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/CheckSecurityNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/CheckToStringNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/DeprecatedNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/DoNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/EmbedNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/AbstractExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/ArrayExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Twig.
5
- *
6
- * (c) Fabien Potencier
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Twig\Node\Expression;
13
-
14
- use Twig\Compiler;
15
- use Twig\Node\Node;
16
-
17
- /**
18
- * Represents an arrow function.
19
- *
20
- * @author Fabien Potencier <fabien@symfony.com>
21
- */
22
- class ArrowFunctionExpression extends AbstractExpression
23
- {
24
- public function __construct(AbstractExpression $expr, Node $names, $lineno, $tag = null)
25
- {
26
- parent::__construct(['expr' => $expr, 'names' => $names], [], $lineno, $tag);
27
- }
28
-
29
- public function compile(Compiler $compiler)
30
- {
31
- $compiler
32
- ->addDebugInfo($this)
33
- ->raw('function (')
34
- ;
35
- foreach ($this->getNode('names') as $i => $name) {
36
- if ($i) {
37
- $compiler->raw(', ');
38
- }
39
-
40
- $compiler
41
- ->raw('$__')
42
- ->raw($name->getAttribute('name'))
43
- ->raw('__')
44
- ;
45
- }
46
- $compiler
47
- ->raw(') use ($context) { ')
48
- ;
49
- foreach ($this->getNode('names') as $name) {
50
- $compiler
51
- ->raw('$context["')
52
- ->raw($name->getAttribute('name'))
53
- ->raw('"] = $__')
54
- ->raw($name->getAttribute('name'))
55
- ->raw('__; ')
56
- ;
57
- }
58
- $compiler
59
- ->raw('return ')
60
- ->subcompile($this->getNode('expr'))
61
- ->raw('; }')
62
- ;
63
- }
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/twig/twig/src/Node/Expression/AssignNameExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/InBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/CallExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/ConditionalExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/ConstantExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/FilterExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/FunctionExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/GetAttrExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/InlinePrint.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/MethodCallExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/NameExpression.php CHANGED
@@ -36,20 +36,13 @@ class NameExpression extends AbstractExpression
36
  if ($this->getAttribute('is_defined_test')) {
37
  if ($this->isSpecial()) {
38
  $compiler->repr(true);
39
- } elseif (\PHP_VERSION_ID >= 700400) {
40
- $compiler
41
- ->raw('array_key_exists(')
42
- ->string($name)
43
- ->raw(', $context)')
44
- ;
45
  } else {
46
  $compiler
47
  ->raw('(isset($context[')
48
  ->string($name)
49
  ->raw(']) || array_key_exists(')
50
  ->string($name)
51
- ->raw(', $context))')
52
- ;
53
  }
54
  } elseif ($this->isSpecial()) {
55
  $compiler->raw($this->specialVars[$name]);
36
  if ($this->getAttribute('is_defined_test')) {
37
  if ($this->isSpecial()) {
38
  $compiler->repr(true);
 
 
 
 
 
 
39
  } else {
40
  $compiler
41
  ->raw('(isset($context[')
42
  ->string($name)
43
  ->raw(']) || array_key_exists(')
44
  ->string($name)
45
+ ->raw(', $context))');
 
46
  }
47
  } elseif ($this->isSpecial()) {
48
  $compiler->raw($this->specialVars[$name]);
vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/ParentExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/TempNameExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Test/EvenTest.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Test/NullTest.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Test/OddTest.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Test/SameasTest.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/TestExpression.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php CHANGED
File without changes
vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php CHANGED
File without changes
vendor/twig/twig/src/Node/FlushNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/ForLoopNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/ForNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/IfNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/ImportNode.php CHANGED
@@ -46,7 +46,7 @@ class ImportNode extends Node
46
  ->repr($this->getTemplateName())
47
  ->raw(', ')
48
  ->repr($this->getTemplateLine())
49
- ->raw(')->unwrap()')
50
  ;
51
  }
52
 
46
  ->repr($this->getTemplateName())
47
  ->raw(', ')
48
  ->repr($this->getTemplateLine())
49
+ ->raw(')')
50
  ;
51
  }
52
 
vendor/twig/twig/src/Node/IncludeNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/MacroNode.php CHANGED
@@ -104,7 +104,7 @@ class MacroNode extends Node
104
  ->outdent()
105
  ->write("]);\n\n")
106
  ->write("\$blocks = [];\n\n")
107
- ->write("ob_start(function () { return ''; });\n")
108
  ->write("try {\n")
109
  ->indent()
110
  ->subcompile($this->getNode('body'))
104
  ->outdent()
105
  ->write("]);\n\n")
106
  ->write("\$blocks = [];\n\n")
107
+ ->write("ob_start();\n")
108
  ->write("try {\n")
109
  ->indent()
110
  ->subcompile($this->getNode('body'))
vendor/twig/twig/src/Node/ModuleNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/Node.php CHANGED
@@ -40,7 +40,7 @@ class Node implements \Twig_NodeInterface
40
  {
41
  foreach ($nodes as $name => $node) {
42
  if (!$node instanceof \Twig_NodeInterface) {
43
- @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, \get_class($this)), E_USER_DEPRECATED);
44
  }
45
  }
46
  $this->nodes = $nodes;
@@ -196,7 +196,7 @@ class Node implements \Twig_NodeInterface
196
  public function setNode($name, $node = null)
197
  {
198
  if (!$node instanceof \Twig_NodeInterface) {
199
- @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, \get_class($this)), E_USER_DEPRECATED);
200
  }
201
 
202
  $this->nodes[$name] = $node;
40
  {
41
  foreach ($nodes as $name => $node) {
42
  if (!$node instanceof \Twig_NodeInterface) {
43
+ @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : null === $node ? 'null' : \gettype($node), $name, \get_class($this)), E_USER_DEPRECATED);
44
  }
45
  }
46
  $this->nodes = $nodes;
196
  public function setNode($name, $node = null)
197
  {
198
  if (!$node instanceof \Twig_NodeInterface) {
199
+ @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : null === $node ? 'null' : \gettype($node), $name, \get_class($this)), E_USER_DEPRECATED);
200
  }
201
 
202
  $this->nodes[$name] = $node;
vendor/twig/twig/src/Node/NodeCaptureInterface.php CHANGED
File without changes
vendor/twig/twig/src/Node/NodeOutputInterface.php CHANGED
File without changes
vendor/twig/twig/src/Node/PrintNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/SandboxNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/SandboxedPrintNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/SetNode.php CHANGED
@@ -58,7 +58,7 @@ class SetNode extends Node implements NodeCaptureInterface
58
  } else {
59
  if ($this->getAttribute('capture')) {
60
  $compiler
61
- ->write("ob_start(function () { return ''; });\n")
62
  ->subcompile($this->getNode('values'))
63
  ;
64
  }
58
  } else {
59
  if ($this->getAttribute('capture')) {
60
  $compiler
61
+ ->write("ob_start();\n")
62
  ->subcompile($this->getNode('values'))
63
  ;
64
  }
vendor/twig/twig/src/Node/SetTempNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/SpacelessNode.php CHANGED
@@ -31,7 +31,7 @@ class SpacelessNode extends Node
31
  {
32
  $compiler
33
  ->addDebugInfo($this)
34
- ->write("ob_start(function () { return ''; });\n")
35
  ->subcompile($this->getNode('body'))
36
  ->write("echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));\n")
37
  ;
31
  {
32
  $compiler
33
  ->addDebugInfo($this)
34
+ ->write("ob_start();\n")
35
  ->subcompile($this->getNode('body'))
36
  ->write("echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));\n")
37
  ;
vendor/twig/twig/src/Node/TextNode.php CHANGED
File without changes
vendor/twig/twig/src/Node/WithNode.php CHANGED
File without changes
vendor/twig/twig/src/NodeTraverser.php CHANGED
@@ -69,11 +69,7 @@ class NodeTraverser
69
  $node = $visitor->enterNode($node, $this->env);
70
 
71
  foreach ($node as $k => $n) {
72
- if (null === $n) {
73
- continue;
74
- }
75
-
76
- if (false !== ($m = $this->traverseForVisitor($visitor, $n)) && null !== $m) {
77
  if ($m !== $n) {
78
  $node->setNode($k, $m);
79
  }
69
  $node = $visitor->enterNode($node, $this->env);
70
 
71
  foreach ($node as $k => $n) {
72
+ if (false !== $m = $this->traverseForVisitor($visitor, $n)) {
 
 
 
 
73
  if ($m !== $n) {
74
  $node->setNode($k, $m);
75
  }
vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php CHANGED
@@ -17,8 +17,6 @@ use Twig\Node\Node;
17
  /**
18
  * Used to make node visitors compatible with Twig 1.x and 2.x.
19
  *
20
- * To be removed in Twig 3.1.
21
- *
22
  * @author Fabien Potencier <fabien@symfony.com>
23
  */
24
  abstract class AbstractNodeVisitor implements NodeVisitorInterface
@@ -51,7 +49,7 @@ abstract class AbstractNodeVisitor implements NodeVisitorInterface
51
  /**
52
  * Called after child nodes are visited.
53
  *
54
- * @return Node|false|null The modified node or null if the node must be removed
55
  */
56
  abstract protected function doLeaveNode(Node $node, Environment $env);
57
  }
17
  /**
18
  * Used to make node visitors compatible with Twig 1.x and 2.x.
19
  *
 
 
20
  * @author Fabien Potencier <fabien@symfony.com>
21
  */
22
  abstract class AbstractNodeVisitor implements NodeVisitorInterface
49
  /**
50
  * Called after child nodes are visited.
51
  *
52
+ * @return Node|false The modified node or false if the node must be removed
53
  */
54
  abstract protected function doLeaveNode(Node $node, Environment $env);
55
  }
vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php CHANGED
@@ -108,7 +108,7 @@ class EscaperNodeVisitor extends AbstractNodeVisitor
108
  $expr2 = $this->escapeInlinePrintNode(new InlinePrint($expr2, $expr2->getTemplateLine()), $env, $type);
109
  }
110
  $expr3 = $expression->getNode('expr3');
111
- if ($expr3 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr3, $env, $type)) {
112
  $expr3 = $this->unwrapConditional($expr3, $env, $type);
113
  } else {
114
  $expr3 = $this->escapeInlinePrintNode(new InlinePrint($expr3, $expr3->getTemplateLine()), $env, $type);
108
  $expr2 = $this->escapeInlinePrintNode(new InlinePrint($expr2, $expr2->getTemplateLine()), $env, $type);
109
  }
110
  $expr3 = $expression->getNode('expr3');
111
+ if ($expr3 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr2, $env, $type)) {
112
  $expr3 = $this->unwrapConditional($expr3, $env, $type);
113
  } else {
114
  $expr3 = $this->escapeInlinePrintNode(new InlinePrint($expr3, $expr3->getTemplateLine()), $env, $type);
vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php CHANGED
@@ -30,7 +30,7 @@ interface NodeVisitorInterface
30
  /**
31
  * Called after child nodes are visited.
32
  *
33
- * @return \Twig_NodeInterface|false|null The modified node or null if the node must be removed
34
  */
35
  public function leaveNode(\Twig_NodeInterface $node, Environment $env);
36
 
30
  /**
31
  * Called after child nodes are visited.
32
  *
33
+ * @return \Twig_NodeInterface|false The modified node or false if the node must be removed
34
  */
35
  public function leaveNode(\Twig_NodeInterface $node, Environment $env);
36
 
vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php CHANGED
File without changes
vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php CHANGED
File without changes
vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php CHANGED
File without changes
vendor/twig/twig/src/Parser.php CHANGED
File without changes
vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php CHANGED
File without changes
vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php CHANGED
File without changes
vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php CHANGED
File without changes
vendor/twig/twig/src/Profiler/Dumper/TextDumper.php CHANGED
File without changes
vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php CHANGED
File without changes
vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php CHANGED
File without changes
vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php CHANGED
File without changes
vendor/twig/twig/src/Profiler/Profile.php CHANGED
@@ -86,7 +86,7 @@ class Profile implements \IteratorAggregate, \Serializable
86
  /**
87
  * Returns the duration in microseconds.
88
  *
89
- * @return float
90
  */
91
  public function getDuration()
92
  {
86
  /**
87
  * Returns the duration in microseconds.
88
  *
89
+ * @return int
90
  */
91
  public function getDuration()
92
  {
vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php CHANGED
File without changes
vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php CHANGED
File without changes
vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php CHANGED
File without changes
vendor/twig/twig/src/Sandbox/SecurityError.php CHANGED
File without changes
vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php CHANGED
File without changes
vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php CHANGED
File without changes
vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php CHANGED
File without changes
vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php CHANGED
File without changes
vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php CHANGED
File without changes
vendor/twig/twig/src/Sandbox/SecurityPolicy.php CHANGED
File without changes
vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php CHANGED
@@ -12,7 +12,7 @@
12
  namespace Twig\Sandbox;
13
 
14
  /**
15
- * Interface that all security policy classes must implements.
16
  *
17
  * @author Fabien Potencier <fabien@symfony.com>
18
  */
12
  namespace Twig\Sandbox;
13
 
14
  /**
15
+ * Interfaces that all security policy classes must implements.
16
  *
17
  * @author Fabien Potencier <fabien@symfony.com>
18
  */
vendor/twig/twig/src/Source.php CHANGED
File without changes
vendor/twig/twig/src/Template.php CHANGED
@@ -253,7 +253,7 @@ abstract class Template implements \Twig_TemplateInterface
253
  */
254
  public function renderParentBlock($name, array $context, array $blocks = [])
255
  {
256
- ob_start(function () { return ''; });
257
  $this->displayParentBlock($name, $context, $blocks);
258
 
259
  return ob_get_clean();
@@ -274,7 +274,7 @@ abstract class Template implements \Twig_TemplateInterface
274
  */
275
  public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true)
276
  {
277
- ob_start(function () { return ''; });
278
  $this->displayBlock($name, $context, $blocks, $useBlocks);
279
 
280
  return ob_get_clean();
@@ -343,9 +343,6 @@ abstract class Template implements \Twig_TemplateInterface
343
  return array_unique($names);
344
  }
345
 
346
- /**
347
- * @return Template|TemplateWrapper
348
- */
349
  protected function loadTemplate($template, $templateName = null, $line = null, $index = null)
350
  {
351
  try {
@@ -386,16 +383,6 @@ abstract class Template implements \Twig_TemplateInterface
386
  }
387
  }
388
 
389
- /**
390
- * @internal
391
- *
392
- * @return Template
393
- */
394
- protected function unwrap()
395
- {
396
- return $this;
397
- }
398
-
399
  /**
400
  * Returns all blocks.
401
  *
@@ -417,7 +404,7 @@ abstract class Template implements \Twig_TemplateInterface
417
  public function render(array $context)
418
  {
419
  $level = ob_get_level();
420
- ob_start(function () { return ''; });
421
  try {
422
  $this->display($context);
423
  } catch (\Exception $e) {
253
  */
254
  public function renderParentBlock($name, array $context, array $blocks = [])
255
  {
256
+ ob_start();
257
  $this->displayParentBlock($name, $context, $blocks);
258
 
259
  return ob_get_clean();
274
  */
275
  public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true)
276
  {
277
+ ob_start();
278
  $this->displayBlock($name, $context, $blocks, $useBlocks);
279
 
280
  return ob_get_clean();
343
  return array_unique($names);
344
  }
345
 
 
 
 
346
  protected function loadTemplate($template, $templateName = null, $line = null, $index = null)
347
  {
348
  try {
383
  }
384
  }
385
 
 
 
 
 
 
 
 
 
 
 
386
  /**
387
  * Returns all blocks.
388
  *
404
  public function render(array $context)
405
  {
406
  $level = ob_get_level();
407
+ ob_start();
408
  try {
409
  $this->display($context);
410
  } catch (\Exception $e) {
vendor/twig/twig/src/TemplateWrapper.php CHANGED
@@ -96,7 +96,7 @@ final class TemplateWrapper
96
  {
97
  $context = $this->env->mergeGlobals($context);
98
  $level = ob_get_level();
99
- ob_start(function () { return ''; });
100
  try {
101
  $this->template->displayBlock($name, $context);
102
  } catch (\Exception $e) {
@@ -138,20 +138,10 @@ final class TemplateWrapper
138
  /**
139
  * @return string
140
  */
141
- public function getTemplateName()
142
  {
143
  return $this->template->getTemplateName();
144
  }
145
-
146
- /**
147
- * @internal
148
- *
149
- * @return Template
150
- */
151
- public function unwrap()
152
- {
153
- return $this->template;
154
- }
155
  }
156
 
157
  class_alias('Twig\TemplateWrapper', 'Twig_TemplateWrapper');
96
  {
97
  $context = $this->env->mergeGlobals($context);
98
  $level = ob_get_level();
99
+ ob_start();
100
  try {
101
  $this->template->displayBlock($name, $context);
102
  } catch (\Exception $e) {
138
  /**
139
  * @return string
140
  */
141
+ public function getTemplatename()
142
  {
143
  return $this->template->getTemplateName();
144
  }
 
 
 
 
 
 
 
 
 
 
145
  }
146
 
147
  class_alias('Twig\TemplateWrapper', 'Twig_TemplateWrapper');
vendor/twig/twig/src/Test/IntegrationTestCase.php CHANGED
@@ -194,7 +194,7 @@ abstract class IntegrationTestCase extends TestCase
194
  $message = $e->getMessage();
195
  $this->assertSame(trim($exception), trim(sprintf('%s: %s', \get_class($e), $message)));
196
  $last = substr($message, \strlen($message) - 1);
197
- $this->assertTrue('.' === $last || '?' === $last, 'Exception message must end with a dot or a question mark.');
198
 
199
  return;
200
  }
194
  $message = $e->getMessage();
195
  $this->assertSame(trim($exception), trim(sprintf('%s: %s', \get_class($e), $message)));
196
  $last = substr($message, \strlen($message) - 1);
197
+ $this->assertTrue('.' === $last || '?' === $last, $message, 'Exception message must end with a dot or a question mark.');
198
 
199
  return;
200
  }
vendor/twig/twig/src/Test/NodeTestCase.php CHANGED
@@ -56,7 +56,7 @@ abstract class NodeTestCase extends TestCase
56
  $line = $line > 0 ? "// line {$line}\n" : '';
57
 
58
  if (\PHP_VERSION_ID >= 70000) {
59
- return sprintf('%s($context["%s"] ?? null)', $line, $name);
60
  }
61
 
62
  if (\PHP_VERSION_ID >= 50400) {
56
  $line = $line > 0 ? "// line {$line}\n" : '';
57
 
58
  if (\PHP_VERSION_ID >= 70000) {
59
+ return sprintf('%s($context["%s"] ?? null)', $line, $name, $name);
60
  }
61
 
62
  if (\PHP_VERSION_ID >= 50400) {
vendor/twig/twig/src/Token.php CHANGED
@@ -38,7 +38,6 @@ class Token
38
  const PUNCTUATION_TYPE = 9;
39
  const INTERPOLATION_START_TYPE = 10;
40
  const INTERPOLATION_END_TYPE = 11;
41
- const ARROW_TYPE = 12;
42
 
43
  /**
44
  * @param int $type The type of the token
@@ -158,9 +157,6 @@ class Token
158
  case self::INTERPOLATION_END_TYPE:
159
  $name = 'INTERPOLATION_END_TYPE';
160
  break;
161
- case self::ARROW_TYPE:
162
- $name = 'ARROW_TYPE';
163
- break;
164
  default:
165
  throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type));
166
  }
@@ -204,8 +200,6 @@ class Token
204
  return 'begin of string interpolation';
205
  case self::INTERPOLATION_END_TYPE:
206
  return 'end of string interpolation';
207
- case self::ARROW_TYPE:
208
- return 'arrow function';
209
  default:
210
  throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type));
211
  }
38
  const PUNCTUATION_TYPE = 9;
39
  const INTERPOLATION_START_TYPE = 10;
40
  const INTERPOLATION_END_TYPE = 11;
 
41
 
42
  /**
43
  * @param int $type The type of the token
157
  case self::INTERPOLATION_END_TYPE:
158
  $name = 'INTERPOLATION_END_TYPE';
159
  break;
 
 
 
160
  default:
161
  throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type));
162
  }
200
  return 'begin of string interpolation';
201
  case self::INTERPOLATION_END_TYPE:
202
  return 'end of string interpolation';
 
 
203
  default:
204
  throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type));
205
  }
vendor/twig/twig/src/TokenParser/AbstractTokenParser.php CHANGED
@@ -20,9 +20,6 @@ use Twig\Parser;
20
  */
21
  abstract class AbstractTokenParser implements TokenParserInterface
22
  {
23
- /**
24
- * @var Parser
25
- */
26
  protected $parser;
27
 
28
  public function setParser(Parser $parser)
20
  */
21
  abstract class AbstractTokenParser implements TokenParserInterface
22
  {
 
 
 
23
  protected $parser;
24
 
25
  public function setParser(Parser $parser)
vendor/twig/twig/src/TokenParser/ApplyTokenParser.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Twig.
5
- *
6
- * (c) Fabien Potencier
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Twig\TokenParser;
13
-
14
- use Twig\Node\Expression\TempNameExpression;
15
- use Twig\Node\Node;
16
- use Twig\Node\PrintNode;
17
- use Twig\Node\SetNode;
18
- use Twig\Token;
19
-
20
- /**
21
- * Applies filters on a section of a template.
22
- *
23
- * {% apply upper %}
24
- * This text becomes uppercase
25
- * {% endapplys %}
26
- */
27
- final class ApplyTokenParser extends AbstractTokenParser
28
- {
29
- public function parse(Token $token)
30
- {
31
- $lineno = $token->getLine();
32
- $name = $this->parser->getVarName();
33
-
34
- $ref = new TempNameExpression($name, $lineno);
35
- $ref->setAttribute('always_defined', true);
36
-
37
- $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag());
38
-
39
- $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
40
- $body = $this->parser->subparse([$this, 'decideApplyEnd'], true);
41
- $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
42
-
43
- return new Node([
44
- new SetNode(true, $ref, $body, $lineno, $this->getTag()),
45
- new PrintNode($filter, $lineno, $this->getTag()),
46
- ]);
47
- }
48
-
49
- public function decideApplyEnd(Token $token)
50
- {
51
- return $token->test('endapply');
52
- }
53
-
54
- public function getTag()
55
- {
56
- return 'apply';
57
- }
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/BlockTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/DoTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/EmbedTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php CHANGED
@@ -13,7 +13,6 @@
13
  namespace Twig\TokenParser;
14
 
15
  use Twig\Error\SyntaxError;
16
- use Twig\Node\Node;
17
  use Twig\Token;
18
 
19
  /**
@@ -39,8 +38,6 @@ class ExtendsTokenParser extends AbstractTokenParser
39
  $this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
40
 
41
  $stream->expect(Token::BLOCK_END_TYPE);
42
-
43
- return new Node();
44
  }
45
 
46
  public function getTag()
13
  namespace Twig\TokenParser;
14
 
15
  use Twig\Error\SyntaxError;
 
16
  use Twig\Token;
17
 
18
  /**
38
  $this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
39
 
40
  $stream->expect(Token::BLOCK_END_TYPE);
 
 
41
  }
42
 
43
  public function getTag()
vendor/twig/twig/src/TokenParser/FilterTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/FlushTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/ForTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/FromTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/IfTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/ImportTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/IncludeTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/MacroTokenParser.php CHANGED
@@ -14,7 +14,6 @@ namespace Twig\TokenParser;
14
  use Twig\Error\SyntaxError;
15
  use Twig\Node\BodyNode;
16
  use Twig\Node\MacroNode;
17
- use Twig\Node\Node;
18
  use Twig\Token;
19
 
20
  /**
@@ -50,8 +49,6 @@ class MacroTokenParser extends AbstractTokenParser
50
  $stream->expect(Token::BLOCK_END_TYPE);
51
 
52
  $this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag()));
53
-
54
- return new Node();
55
  }
56
 
57
  public function decideBlockEnd(Token $token)
14
  use Twig\Error\SyntaxError;
15
  use Twig\Node\BodyNode;
16
  use Twig\Node\MacroNode;
 
17
  use Twig\Token;
18
 
19
  /**
49
  $stream->expect(Token::BLOCK_END_TYPE);
50
 
51
  $this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag()));
 
 
52
  }
53
 
54
  public function decideBlockEnd(Token $token)
vendor/twig/twig/src/TokenParser/SandboxTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/SetTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/TokenParserInterface.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/UseTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenParser/WithTokenParser.php CHANGED
File without changes
vendor/twig/twig/src/TokenStream.php CHANGED
File without changes
vendor/twig/twig/src/TwigFilter.php CHANGED
File without changes
vendor/twig/twig/src/TwigFunction.php CHANGED
File without changes
vendor/twig/twig/src/TwigTest.php CHANGED
File without changes
vendor/twig/twig/src/Util/DeprecationCollector.php CHANGED
File without changes
vendor/twig/twig/src/Util/TemplateDirIterator.php CHANGED
File without changes
wp-rss-aggregator.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: WP RSS Aggregator
5
  * Plugin URI: https://www.wprssaggregator.com/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wpraplugin
6
  * Description: Imports and aggregates multiple RSS Feeds.
7
- * Version: 4.14
8
  * Author: RebelCode
9
  * Author URI: https://www.wprssaggregator.com
10
  * Text Domain: wprss
@@ -67,7 +67,7 @@ use RebelCode\Wpra\Core\Plugin;
67
 
68
  // Set the version number of the plugin.
69
  if( !defined( 'WPRSS_VERSION' ) )
70
- define( 'WPRSS_VERSION', '4.14' );
71
 
72
  if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
73
  define( 'WPRSS_WP_MIN_VERSION', '4.8' );
@@ -344,9 +344,10 @@ function wpra_run()
344
 
345
  $plugin->run($container);
346
  do_action('wpra_after_run', $container, $plugin);
 
 
347
  } catch (Exception $exception) {
348
- wpra_exception_handler($exception);
349
- do_action('wpra_error', $exception);
350
  }
351
  }
352
 
@@ -466,35 +467,37 @@ function wpra_load_module($key, $module)
466
  }
467
 
468
  /**
469
- * Handles soft exceptions, caught from {@link wpra_run()}.
470
  *
471
- * @since [*next-version*]
472
  *
473
- * @param Exception $exception The caught exception.
474
  */
475
- function wpra_exception_handler($exception)
476
  {
477
- add_action('all_admin_notices', function () use ($exception) {
478
  $message = __(
479
  '<b>WP RSS Aggregator</b> has encountered an error. If this problem persists, kindly contact customer support and provide the following details:',
480
  'wprss'
481
  );
482
  ?>
483
  <div class="notice notice-error">
484
- <?php echo wpra_display_error($message, $exception) ?>
485
  </div>
486
  <?php
487
  });
 
 
488
  }
489
 
490
  /**
491
  * Handles critical errors.
492
  *
493
- * This function is passed as a callback to the {@link ErrorHandler}.
494
  *
495
- * @since [*next-version*]
496
  *
497
- * @param Exception|Throwable $error The encountered error.
498
  */
499
  function wpra_critical_error_handler($error)
500
  {
@@ -521,6 +524,8 @@ function wpra_critical_error_handler($error)
521
  );
522
  $errorDisplay = wpra_display_error($message, $error);
523
 
 
 
524
  wp_die(
525
  $errorDisplay . $deactivateForm,
526
  __('WP RSS Aggregator Error', 'wprss')
@@ -530,7 +535,7 @@ function wpra_critical_error_handler($error)
530
  /**
531
  * Generates common display for WP RSS Aggregator errors.
532
  *
533
- * @since [*next-version*]
534
  *
535
  * @param string $message The message to show.
536
  * @param Exception|Throwable $error The error.
@@ -571,7 +576,7 @@ function wpra_display_error($message, $error)
571
  *
572
  * This function is intended to be called from error handlers that give users the option to deactivate the plugin.
573
  *
574
- * @since [*next-version*]
575
  */
576
  function wpra_safe_deactivate()
577
  {
@@ -600,7 +605,7 @@ function wpra_safe_deactivate()
600
  /**
601
  * Retrieves the list of full paths to the main files of activated addons.
602
  *
603
- * @since [*next-version*]
604
  *
605
  * @return string[]
606
  */
@@ -640,8 +645,10 @@ function wprss() {
640
 
641
  try {
642
  $instance = wprss();
 
 
643
  } catch (Exception $e) {
644
- wpra_exception_handler($e);
645
  }
646
 
647
  add_action( 'init', 'wprss_init' );
4
  * Plugin Name: WP RSS Aggregator
5
  * Plugin URI: https://www.wprssaggregator.com/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wpraplugin
6
  * Description: Imports and aggregates multiple RSS Feeds.
7
+ * Version: 4.15
8
  * Author: RebelCode
9
  * Author URI: https://www.wprssaggregator.com
10
  * Text Domain: wprss
67
 
68
  // Set the version number of the plugin.
69
  if( !defined( 'WPRSS_VERSION' ) )
70
+ define( 'WPRSS_VERSION', '4.15' );
71
 
72
  if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
73
  define( 'WPRSS_WP_MIN_VERSION', '4.8' );
344
 
345
  $plugin->run($container);
346
  do_action('wpra_after_run', $container, $plugin);
347
+ } catch (Throwable $throwable) {
348
+ wpra_error_handler($throwable);
349
  } catch (Exception $exception) {
350
+ wpra_error_handler($exception);
 
351
  }
352
  }
353
 
467
  }
468
 
469
  /**
470
+ * Handles catchable errors, caught from {@link wpra_run()}.
471
  *
472
+ * @since 4.15
473
  *
474
+ * @param Exception|Throwable $error The caught exception or throwable instance.
475
  */
476
+ function wpra_error_handler($error)
477
  {
478
+ add_action('all_admin_notices', function () use ($error) {
479
  $message = __(
480
  '<b>WP RSS Aggregator</b> has encountered an error. If this problem persists, kindly contact customer support and provide the following details:',
481
  'wprss'
482
  );
483
  ?>
484
  <div class="notice notice-error">
485
+ <?php echo wpra_display_error($message, $error) ?>
486
  </div>
487
  <?php
488
  });
489
+
490
+ do_action('wpra_error', $error);
491
  }
492
 
493
  /**
494
  * Handles critical errors.
495
  *
496
+ * This function is used as a callback in the {@link ErrorHandler}.
497
  *
498
+ * @since 4.15
499
  *
500
+ * @param Exception|Throwable $error The encountered error or throwable instance.
501
  */
502
  function wpra_critical_error_handler($error)
503
  {
524
  );
525
  $errorDisplay = wpra_display_error($message, $error);
526
 
527
+ do_action('wpra_critical_error', $error);
528
+
529
  wp_die(
530
  $errorDisplay . $deactivateForm,
531
  __('WP RSS Aggregator Error', 'wprss')
535
  /**
536
  * Generates common display for WP RSS Aggregator errors.
537
  *
538
+ * @since 4.15
539
  *
540
  * @param string $message The message to show.
541
  * @param Exception|Throwable $error The error.
576
  *
577
  * This function is intended to be called from error handlers that give users the option to deactivate the plugin.
578
  *
579
+ * @since 4.15
580
  */
581
  function wpra_safe_deactivate()
582
  {
605
  /**
606
  * Retrieves the list of full paths to the main files of activated addons.
607
  *
608
+ * @since 4.15
609
  *
610
  * @return string[]
611
  */
645
 
646
  try {
647
  $instance = wprss();
648
+ } catch (Throwable $t) {
649
+ wpra_error_handler($t);
650
  } catch (Exception $e) {
651
+ wpra_error_handler($e);
652
  }
653
 
654
  add_action( 'init', 'wprss_init' );