Version Description
Download this release
Release Info
Developer | nico23 |
Plugin | ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video …) |
Version | 8.9.5 |
Comparing to | |
See all releases |
Version 8.9.5
- LICENSE.txt +674 -0
- admin/arve-admin.css +67 -0
- admin/arve-admin.js +108 -0
- admin/arve-shortcode-ui.js +74 -0
- admin/class-arve-admin-notice-factory.php +61 -0
- admin/class-nextgenthemes-plugin-updater.php +491 -0
- admin/functions-admin.php +679 -0
- admin/functions-licensing.php +614 -0
- admin/html-debug-info.php +64 -0
- admin/html-settings-page.php +73 -0
- admin/index.php +1 -0
- admin/pro-ad.html +14 -0
- admin/product-images/arve.svg +1230 -0
- advanced-responsive-video-embedder.php +108 -0
- composer.lock +184 -0
- public/arve.css +71 -0
- public/arve.js +38 -0
- public/arve.min.css +1 -0
- public/arve.min.js +1 -0
- public/functions-enqueue.php +39 -0
- public/functions-html-output.php +249 -0
- public/functions-misc.php +146 -0
- public/functions-shortcode-data.php +327 -0
- public/functions-shortcode-filters.php +446 -0
- public/functions-shortcodes.php +274 -0
- public/functions-thumbnails.php +45 -0
- public/functions-url-handlers.php +136 -0
- public/functions-validation.php +113 -0
- public/index.php +1 -0
- readme.txt +1156 -0
- shared/functions-shared.php +1327 -0
- shared/index.php +1 -0
- uninstall.php +31 -0
- vendor/autoload.php +7 -0
- vendor/composer/ClassLoader.php +445 -0
- vendor/composer/LICENSE +21 -0
- vendor/composer/autoload_classmap.php +9 -0
- vendor/composer/autoload_namespaces.php +9 -0
- vendor/composer/autoload_psr4.php +11 -0
- vendor/composer/autoload_real.php +52 -0
- vendor/composer/autoload_static.php +39 -0
- vendor/composer/installed.json +172 -0
- vendor/composer/installers/CHANGELOG.md +86 -0
- vendor/composer/installers/CONTRIBUTING.md +24 -0
- vendor/composer/installers/LICENSE +19 -0
- vendor/composer/installers/README.md +221 -0
- vendor/composer/installers/_config.yml +1 -0
- vendor/composer/installers/phpunit.xml.dist +25 -0
- vendor/composer/installers/src/Composer/Installers/AglInstaller.php +21 -0
- vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +49 -0
- vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +136 -0
- vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +126 -0
- vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +82 -0
- vendor/composer/installers/src/Composer/Installers/ChefInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php +34 -0
- vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +13 -0
- vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +35 -0
- vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +21 -0
- vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php +50 -0
- vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php +16 -0
- vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +16 -0
- vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php +29 -0
- vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/GravInstaller.php +30 -0
- vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +25 -0
- vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/Installer.php +200 -0
- vendor/composer/installers/src/Composer/Installers/ItopInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +15 -0
- vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php +18 -0
- vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php +27 -0
- vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +16 -0
- vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php +37 -0
- vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/MauticInstaller.php +25 -0
- vendor/composer/installers/src/Composer/Installers/MayaInstaller.php +33 -0
- vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +50 -0
- vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +111 -0
- vendor/composer/installers/src/Composer/Installers/ModxInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +57 -0
- vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +46 -0
- vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php +24 -0
- vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php +14 -0
- vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +59 -0
- vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php +21 -0
- vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +32 -0
- vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php +29 -0
- vendor/composer/installers/src/Composer/Installers/Plugin.php +17 -0
- vendor/composer/installers/src/Composer/Installers/PortoInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php +63 -0
- vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php +24 -0
- vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php +22 -0
- vendor/composer/installers/src/Composer/Installers/SMFInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +60 -0
- vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +35 -0
- vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php +25 -0
- vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php +49 -0
- vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +26 -0
- vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +16 -0
- vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +38 -0
- vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/TuskInstaller.php +14 -0
- vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php +49 -0
- vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/YawikInstaller.php +32 -0
- vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +10 -0
- vendor/composer/installers/src/bootstrap.php +13 -0
- vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php +80 -0
- vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php +75 -0
- vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php +114 -0
- vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php +83 -0
- vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php +90 -0
- vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php +63 -0
- vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php +552 -0
- vendor/composer/installers/tests/Composer/Installers/Test/MayaInstallerTest.php +62 -0
- vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php +67 -0
- vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php +67 -0
- vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php +84 -0
- vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php +44 -0
- vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php +63 -0
- vendor/composer/installers/tests/Composer/Installers/Test/SiteDirectInstallerTest.php +120 -0
- vendor/composer/installers/tests/Composer/Installers/Test/SyDESInstallerTest.php +82 -0
- vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php +65 -0
- vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php +80 -0
- vendor/composer/installers/tests/Composer/Installers/Test/YawikInstallerTest.php +64 -0
- vendor/composer/installers/tests/bootstrap.php +4 -0
- vendor/vimeo/vimeo-api/.styleci.yml +19 -0
- vendor/vimeo/vimeo-api/CHANGELOG.md +19 -0
- vendor/vimeo/vimeo-api/LICENSE +177 -0
- vendor/vimeo/vimeo-api/README.md +254 -0
- vendor/vimeo/vimeo-api/autoload.php +29 -0
- vendor/vimeo/vimeo-api/certificates/vimeo-api.pem +47 -0
- vendor/vimeo/vimeo-api/src/Vimeo/Exceptions/ExceptionInterface.php +9 -0
- vendor/vimeo/vimeo-api/src/Vimeo/Exceptions/VimeoRequestException.php +9 -0
- vendor/vimeo/vimeo-api/src/Vimeo/Exceptions/VimeoUploadException.php +9 -0
- vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php +598 -0
- yarn.lock +464 -0
LICENSE.txt
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
<one line to give the program's name and a brief idea of what it does.>
|
635 |
+
Copyright (C) <year> <name of author>
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
<program> Copyright (C) <year> <name of author>
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
admin/arve-admin.css
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.arve-license-input {
|
2 |
+
width: 280px;
|
3 |
+
}
|
4 |
+
|
5 |
+
.arve-btn {
|
6 |
+
padding-left: 3px;
|
7 |
+
}
|
8 |
+
|
9 |
+
.arve-icon:before {
|
10 |
+
content: "\f236" !important; /* dashicon-video-alt */
|
11 |
+
}
|
12 |
+
|
13 |
+
.edit-shortcode-form-fields.shortcode-ui-edit-arve .field-block {
|
14 |
+
padding-top: .4em;
|
15 |
+
padding-bottom: .4em;
|
16 |
+
}
|
17 |
+
|
18 |
+
.edit-shortcode-form-fields.shortcode-ui-edit-arve .field-block label {
|
19 |
+
display: inline-block;
|
20 |
+
margin: 0;
|
21 |
+
}
|
22 |
+
|
23 |
+
.edit-shortcode-form-fields.shortcode-ui-edit-arve .field-block label:first-child {
|
24 |
+
width: 110px;
|
25 |
+
}
|
26 |
+
|
27 |
+
.edit-shortcode-form-fields.shortcode-ui-edit-arve .shortcode-ui-attribute-upload_date input,
|
28 |
+
.edit-shortcode-form-fields.shortcode-ui-edit-arve .shortcode-ui-attribute-aspect_ratio input,
|
29 |
+
.edit-shortcode-form-fields.shortcode-ui-edit-arve .shortcode-ui-attribute-url input,
|
30 |
+
.edit-shortcode-form-fields.shortcode-ui-edit-arve .shortcode-ui-attribute-title input,
|
31 |
+
.edit-shortcode-form-fields.shortcode-ui-edit-arve .shortcode-ui-attribute-description input {
|
32 |
+
width: 700px;
|
33 |
+
}
|
34 |
+
|
35 |
+
.arve-list-small {
|
36 |
+
font-size: .85em;
|
37 |
+
list-style: square;
|
38 |
+
padding-left: 20px;
|
39 |
+
}
|
40 |
+
|
41 |
+
.arve-list-small li {
|
42 |
+
margin-bottom: 2px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.arve-settings-page-ad {
|
46 |
+
margin: 0;
|
47 |
+
padding-right: .7rem !important;
|
48 |
+
}
|
49 |
+
|
50 |
+
.arve-corner-spacer {
|
51 |
+
float: right;
|
52 |
+
width: 20px;
|
53 |
+
height: 38px;
|
54 |
+
}
|
55 |
+
|
56 |
+
@media all and (min-width: 1024px) {
|
57 |
+
.arve-settings-page-ad {
|
58 |
+
position: absolute !important;
|
59 |
+
right: 0;
|
60 |
+
width: 320px;
|
61 |
+
}
|
62 |
+
|
63 |
+
.arve-options-wrap {
|
64 |
+
padding-right: 350px;
|
65 |
+
position: relative;
|
66 |
+
}
|
67 |
+
}
|
admin/arve-admin.js
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ( $ ) {
|
2 |
+
'use strict';
|
3 |
+
/*global ajaxurl */
|
4 |
+
/*global sui */
|
5 |
+
/*global tb_show */
|
6 |
+
|
7 |
+
// Options Page
|
8 |
+
$('.arve-settings-section').each( function() {
|
9 |
+
|
10 |
+
$(this).insertBefore( $(this).parent() );
|
11 |
+
});
|
12 |
+
|
13 |
+
$('.arve-settings-section').each( function() {
|
14 |
+
|
15 |
+
var id = $(this).attr( 'id' );
|
16 |
+
var classs = $(this).attr( 'class' );
|
17 |
+
var title = $(this).attr( 'title' );
|
18 |
+
|
19 |
+
$(this).nextUntil( '.arve-settings-section' ).wrapAll( '<section id="' + id + '" class="' + classs + '" />' );
|
20 |
+
|
21 |
+
$( '<a href="#" data-target="#' + id + '" class="nav-tab">' + title + '</a>' ).appendTo( '.arve-settings-tabs' );
|
22 |
+
|
23 |
+
$(this).remove();
|
24 |
+
});
|
25 |
+
|
26 |
+
function show_tab( target ) {
|
27 |
+
|
28 |
+
$('.arve-settings-section').show();
|
29 |
+
$( target ).prependTo( '.arve-options-form' );
|
30 |
+
$('.arve-settings-section').not( target ).hide();
|
31 |
+
$('.arve-settings-tabs a').removeClass( 'nav-tab-active' );
|
32 |
+
$('.arve-settings-tabs a[data-target="' + target + '"]').addClass( 'nav-tab-active' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( $( '#arve_options_main\\[last_settings_tab\\]' ).length && $( '#arve_options_main\\[last_settings_tab\\]' ).val().length ) {
|
36 |
+
show_tab( $( '#arve_options_main\\[last_settings_tab\\]' ).val() );
|
37 |
+
}
|
38 |
+
|
39 |
+
$(document).on( 'click', '.arve-settings-tabs a', function(e) {
|
40 |
+
|
41 |
+
e.preventDefault();
|
42 |
+
var target = $(this).attr('data-target');
|
43 |
+
show_tab( target );
|
44 |
+
$( '#arve_options_main\\[last_settings_tab\\]' ).val( target );
|
45 |
+
} );
|
46 |
+
|
47 |
+
$(document).on( 'click', '[data-image-upload]', function(e) {
|
48 |
+
|
49 |
+
e.preventDefault();
|
50 |
+
var target = $( this ).attr('data-image-upload');
|
51 |
+
var image = wp.media({
|
52 |
+
title: 'Upload Image',
|
53 |
+
// mutiple: true if you want to upload multiple files at once
|
54 |
+
multiple: false
|
55 |
+
}).open()
|
56 |
+
.on('select', function(){
|
57 |
+
// This will return the selected image from the Media Uploader, the result is an object
|
58 |
+
var uploaded_image = image.state().get('selection').first();
|
59 |
+
// We convert uploaded_image to a JSON object to make accessing it easier
|
60 |
+
// Output to the console uploaded_image
|
61 |
+
var attachment_id = uploaded_image.toJSON().id;
|
62 |
+
// Let's assign the url value to the input field
|
63 |
+
$( target ).val(attachment_id);
|
64 |
+
});
|
65 |
+
});
|
66 |
+
|
67 |
+
$(document).on( 'click', '.arve-pro-notice .notice-dismiss', function() {
|
68 |
+
|
69 |
+
jQuery.ajax({
|
70 |
+
url: ajaxurl,
|
71 |
+
data: {
|
72 |
+
action: 'arve_ajax_dismiss_pro_notice'
|
73 |
+
}
|
74 |
+
});
|
75 |
+
});
|
76 |
+
|
77 |
+
$(document).on( 'click', '[data-nj-notice-id] .notice-dismiss', function() {
|
78 |
+
|
79 |
+
var id = $(this).closest('[data-nj-notice-id]').attr('data-nj-notice-id');
|
80 |
+
|
81 |
+
jQuery.ajax({
|
82 |
+
url: ajaxurl,
|
83 |
+
data: {
|
84 |
+
action: id
|
85 |
+
}
|
86 |
+
});
|
87 |
+
});
|
88 |
+
|
89 |
+
$(document).on( 'click', '#arve-btn', function() {
|
90 |
+
|
91 |
+
if ( typeof( sui ) !== 'undefined' ) {
|
92 |
+
|
93 |
+
var arve_shortcode = sui.utils.shortcodeViewConstructor.parseShortcodeString( '[arve]' );
|
94 |
+
|
95 |
+
wp.media({
|
96 |
+
frame : 'post',
|
97 |
+
state : 'shortcode-ui',
|
98 |
+
currentShortcode : arve_shortcode
|
99 |
+
}).open();
|
100 |
+
|
101 |
+
} else {
|
102 |
+
|
103 |
+
tb_show( 'ARVE Optional Features', '#TB_inline?inlineId=arve-thickbox' );
|
104 |
+
}
|
105 |
+
|
106 |
+
} );
|
107 |
+
|
108 |
+
}(jQuery));
|
admin/arve-shortcode-ui.js
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function arve_extract_url( changed, collection, shortcode ) {
|
2 |
+
|
3 |
+
function attr_by_name( name ) {
|
4 |
+
return _.find(
|
5 |
+
collection,
|
6 |
+
function( viewModel ) {
|
7 |
+
return name === viewModel.model.get( 'attr' );
|
8 |
+
}
|
9 |
+
);
|
10 |
+
}
|
11 |
+
|
12 |
+
var val = changed.value,
|
13 |
+
short_val = changed.value,
|
14 |
+
input = attr_by_name( 'url' ).$el.find( 'input' );
|
15 |
+
|
16 |
+
if( typeof val === 'undefined' ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
if( val.match(/src="?([^\s"]+)/) ) {
|
21 |
+
|
22 |
+
var test_url = val.match(/src="?([^\s"]+)/),
|
23 |
+
only_url = test_url && test_url[1];
|
24 |
+
|
25 |
+
input.val( only_url ).trigger( 'input' );
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
function arve_mode_select_listener( changed, collection, shortcode ) {
|
30 |
+
|
31 |
+
function attr_by_name(name) {
|
32 |
+
return _.find(
|
33 |
+
collection,
|
34 |
+
function( viewModel ) {
|
35 |
+
return name === viewModel.model.get('attr');
|
36 |
+
}
|
37 |
+
);
|
38 |
+
}
|
39 |
+
|
40 |
+
var val = changed.value,
|
41 |
+
autoplay = attr_by_name( 'autoplay' ),
|
42 |
+
grow = attr_by_name( 'grow' ),
|
43 |
+
align = attr_by_name( 'align' ),
|
44 |
+
hide_title = attr_by_name( 'hide_title' );
|
45 |
+
|
46 |
+
if( typeof val === 'undefined' ) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( 'lazyload-lightbox' === val ) {
|
51 |
+
align.$el.show();
|
52 |
+
autoplay.$el.hide();
|
53 |
+
grow.$el.hide();
|
54 |
+
hide_title.$el.show();
|
55 |
+
} else if ( 'lazyload' === val ) {
|
56 |
+
align.$el.show();
|
57 |
+
autoplay.$el.hide();
|
58 |
+
grow.$el.show();
|
59 |
+
hide_title.$el.show();
|
60 |
+
} else if ( 'link-lightbox' === val ) {
|
61 |
+
align.$el.hide();
|
62 |
+
autoplay.$el.hide();
|
63 |
+
grow.$el.hide();
|
64 |
+
hide_title.$el.hide();
|
65 |
+
} else { // normal
|
66 |
+
align.$el.show();
|
67 |
+
autoplay.$el.show();
|
68 |
+
grow.$el.hide();
|
69 |
+
hide_title.$el.hide();
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
wp.shortcake.hooks.addAction( 'arve.mode', arve_mode_select_listener );
|
74 |
+
wp.shortcake.hooks.addAction( 'arve.url', arve_extract_url );
|
admin/class-arve-admin-notice-factory.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class ARVE_Admin_Notice_Factory {
|
4 |
+
|
5 |
+
private $notice_id;
|
6 |
+
private $notice;
|
7 |
+
private $dismiss_forever;
|
8 |
+
|
9 |
+
function __construct( $notice_id, $notice, $dismiss_forever = true, $capabilities = 'activate_plugins' ) {
|
10 |
+
|
11 |
+
if ( ! current_user_can( $capabilities ) ) {
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
|
15 |
+
$this->notice_id = "admin-notice-factory-$notice_id";
|
16 |
+
$this->notice = $notice;
|
17 |
+
$this->dismiss_forever = $dismiss_forever;
|
18 |
+
|
19 |
+
if ( 'admin-notice-factory-arve_dismiss_pro_notice' == $this->notice_id ) {
|
20 |
+
$this->notice_id = 'arve_dismiss_pro_notice';
|
21 |
+
}
|
22 |
+
|
23 |
+
add_action( 'admin_notices', array( $this, 'action_admin_notices' ) );
|
24 |
+
add_action( 'wp_ajax_' . $this->notice_id, array( $this, 'ajax_call' ) );
|
25 |
+
}
|
26 |
+
|
27 |
+
function action_admin_notices() {
|
28 |
+
|
29 |
+
if ( apply_filters( 'nj_debug_admin_message', false ) ) {
|
30 |
+
delete_user_meta( get_current_user_id(), $this->notice_id );
|
31 |
+
delete_transient( $this->notice_id );
|
32 |
+
}
|
33 |
+
|
34 |
+
$user_id = get_current_user_id();
|
35 |
+
$user_meta = get_user_meta( $user_id, $this->notice_id );
|
36 |
+
|
37 |
+
if( $this->dismiss_forever && ! empty( $user_meta ) ) {
|
38 |
+
return;
|
39 |
+
} elseif( get_transient( $this->notice_id ) ) {
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
|
43 |
+
printf(
|
44 |
+
'<div class="notice is-dismissible updated" data-nj-notice-id="%s">%s</div>',
|
45 |
+
esc_attr( $this->notice_id ),
|
46 |
+
$this->notice
|
47 |
+
);
|
48 |
+
}
|
49 |
+
|
50 |
+
function ajax_call() {
|
51 |
+
|
52 |
+
$user_id = get_current_user_id();
|
53 |
+
|
54 |
+
if( $this->dismiss_forever ) {
|
55 |
+
add_user_meta( $user_id, $this->notice_id, true );
|
56 |
+
} else {
|
57 |
+
set_transient( $this->notice_id, true, HOUR_IN_SECONDS );
|
58 |
+
}
|
59 |
+
wp_die();
|
60 |
+
}
|
61 |
+
}
|
admin/class-nextgenthemes-plugin-updater.php
ADDED
@@ -0,0 +1,491 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Exit if accessed directly
|
4 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Allows plugins to use their own update API.
|
8 |
+
*
|
9 |
+
* @author Easy Digital Downloads
|
10 |
+
* @version 1.6.14
|
11 |
+
*/
|
12 |
+
class Nextgenthemes_Plugin_Updater {
|
13 |
+
|
14 |
+
private $api_url = '';
|
15 |
+
private $api_data = array();
|
16 |
+
private $name = '';
|
17 |
+
private $slug = '';
|
18 |
+
private $version = '';
|
19 |
+
private $wp_override = false;
|
20 |
+
private $cache_key = '';
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Class constructor.
|
24 |
+
*
|
25 |
+
* @uses plugin_basename()
|
26 |
+
* @uses hook()
|
27 |
+
*
|
28 |
+
* @param string $_api_url The URL pointing to the custom API endpoint.
|
29 |
+
* @param string $_plugin_file Path to the plugin file.
|
30 |
+
* @param array $_api_data Optional data to send with API calls.
|
31 |
+
*/
|
32 |
+
public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
|
33 |
+
|
34 |
+
global $edd_plugin_data;
|
35 |
+
|
36 |
+
$this->api_url = trailingslashit( $_api_url );
|
37 |
+
$this->api_data = $_api_data;
|
38 |
+
$this->name = plugin_basename( $_plugin_file );
|
39 |
+
$this->slug = basename( $_plugin_file, '.php' );
|
40 |
+
$this->version = $_api_data['version'];
|
41 |
+
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
42 |
+
$this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
|
43 |
+
$this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
44 |
+
|
45 |
+
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
46 |
+
|
47 |
+
// Set up hooks.
|
48 |
+
$this->init();
|
49 |
+
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Set up WordPress filters to hook into WP's update process.
|
54 |
+
*
|
55 |
+
* @uses add_filter()
|
56 |
+
*
|
57 |
+
* @return void
|
58 |
+
*/
|
59 |
+
public function init() {
|
60 |
+
|
61 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
62 |
+
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
63 |
+
remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
|
64 |
+
add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
|
65 |
+
add_action( 'admin_init', array( $this, 'show_changelog' ) );
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Check for Updates at the defined API endpoint and modify the update array.
|
71 |
+
*
|
72 |
+
* This function dives into the update API just when WordPress creates its update array,
|
73 |
+
* then adds a custom API call and injects the custom plugin data retrieved from the API.
|
74 |
+
* It is reassembled from parts of the native WordPress plugin update code.
|
75 |
+
* See wp-includes/update.php line 121 for the original wp_update_plugins() function.
|
76 |
+
*
|
77 |
+
* @uses api_request()
|
78 |
+
*
|
79 |
+
* @param array $_transient_data Update array build by WordPress.
|
80 |
+
* @return array Modified update array with custom plugin data.
|
81 |
+
*/
|
82 |
+
public function check_update( $_transient_data ) {
|
83 |
+
|
84 |
+
global $pagenow;
|
85 |
+
|
86 |
+
if ( ! is_object( $_transient_data ) ) {
|
87 |
+
$_transient_data = new stdClass;
|
88 |
+
}
|
89 |
+
|
90 |
+
if ( 'plugins.php' == $pagenow && is_multisite() ) {
|
91 |
+
return $_transient_data;
|
92 |
+
}
|
93 |
+
|
94 |
+
if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
|
95 |
+
return $_transient_data;
|
96 |
+
}
|
97 |
+
|
98 |
+
$version_info = $this->get_cached_version_info();
|
99 |
+
|
100 |
+
if ( false === $version_info ) {
|
101 |
+
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
102 |
+
|
103 |
+
$this->set_version_info_cache( $version_info );
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
|
108 |
+
|
109 |
+
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
110 |
+
|
111 |
+
$_transient_data->response[ $this->name ] = $version_info;
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
$_transient_data->last_checked = current_time( 'timestamp' );
|
116 |
+
$_transient_data->checked[ $this->name ] = $this->version;
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
return $_transient_data;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
|
125 |
+
*
|
126 |
+
* @param string $file
|
127 |
+
* @param array $plugin
|
128 |
+
*/
|
129 |
+
public function show_update_notification( $file, $plugin ) {
|
130 |
+
|
131 |
+
if ( is_network_admin() ) {
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
|
135 |
+
if( ! current_user_can( 'update_plugins' ) ) {
|
136 |
+
return;
|
137 |
+
}
|
138 |
+
|
139 |
+
if( ! is_multisite() ) {
|
140 |
+
return;
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( $this->name != $file ) {
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
|
147 |
+
// Remove our filter on the site transient
|
148 |
+
remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
|
149 |
+
|
150 |
+
$update_cache = get_site_transient( 'update_plugins' );
|
151 |
+
|
152 |
+
$update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
|
153 |
+
|
154 |
+
if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
|
155 |
+
|
156 |
+
$version_info = $this->get_cached_version_info();
|
157 |
+
|
158 |
+
if ( false === $version_info ) {
|
159 |
+
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
160 |
+
|
161 |
+
$this->set_version_info_cache( $version_info );
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( ! is_object( $version_info ) ) {
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
|
168 |
+
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
169 |
+
|
170 |
+
$update_cache->response[ $this->name ] = $version_info;
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
$update_cache->last_checked = current_time( 'timestamp' );
|
175 |
+
$update_cache->checked[ $this->name ] = $this->version;
|
176 |
+
|
177 |
+
set_site_transient( 'update_plugins', $update_cache );
|
178 |
+
|
179 |
+
} else {
|
180 |
+
|
181 |
+
$version_info = $update_cache->response[ $this->name ];
|
182 |
+
|
183 |
+
}
|
184 |
+
|
185 |
+
// Restore our filter
|
186 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
187 |
+
|
188 |
+
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
189 |
+
|
190 |
+
// build a plugin list row, with update notification
|
191 |
+
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
192 |
+
# <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
|
193 |
+
echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
|
194 |
+
echo '<td colspan="3" class="plugin-update colspanchange">';
|
195 |
+
echo '<div class="update-message notice inline notice-warning notice-alt">';
|
196 |
+
|
197 |
+
$changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
|
198 |
+
|
199 |
+
if ( empty( $version_info->download_link ) ) {
|
200 |
+
printf(
|
201 |
+
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'easy-digital-downloads' ),
|
202 |
+
esc_html( $version_info->name ),
|
203 |
+
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
204 |
+
esc_html( $version_info->new_version ),
|
205 |
+
'</a>'
|
206 |
+
);
|
207 |
+
} else {
|
208 |
+
printf(
|
209 |
+
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'easy-digital-downloads' ),
|
210 |
+
esc_html( $version_info->name ),
|
211 |
+
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
212 |
+
esc_html( $version_info->new_version ),
|
213 |
+
'</a>',
|
214 |
+
'<a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) ) .'">',
|
215 |
+
'</a>'
|
216 |
+
);
|
217 |
+
}
|
218 |
+
|
219 |
+
do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );
|
220 |
+
|
221 |
+
echo '</div></td></tr>';
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Updates information on the "View version x.x details" page with custom data.
|
227 |
+
*
|
228 |
+
* @uses api_request()
|
229 |
+
*
|
230 |
+
* @param mixed $_data
|
231 |
+
* @param string $_action
|
232 |
+
* @param object $_args
|
233 |
+
* @return object $_data
|
234 |
+
*/
|
235 |
+
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
236 |
+
|
237 |
+
if ( $_action != 'plugin_information' ) {
|
238 |
+
|
239 |
+
return $_data;
|
240 |
+
|
241 |
+
}
|
242 |
+
|
243 |
+
if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
|
244 |
+
|
245 |
+
return $_data;
|
246 |
+
|
247 |
+
}
|
248 |
+
|
249 |
+
$to_send = array(
|
250 |
+
'slug' => $this->slug,
|
251 |
+
'is_ssl' => is_ssl(),
|
252 |
+
'fields' => array(
|
253 |
+
'banners' => array(),
|
254 |
+
'reviews' => false
|
255 |
+
)
|
256 |
+
);
|
257 |
+
|
258 |
+
$cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
259 |
+
|
260 |
+
// Get the transient where we store the api request for this plugin for 24 hours
|
261 |
+
$edd_api_request_transient = $this->get_cached_version_info( $cache_key );
|
262 |
+
|
263 |
+
//If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
|
264 |
+
if ( empty( $edd_api_request_transient ) ) {
|
265 |
+
|
266 |
+
$api_response = $this->api_request( 'plugin_information', $to_send );
|
267 |
+
|
268 |
+
// Expires in 3 hours
|
269 |
+
$this->set_version_info_cache( $api_response, $cache_key );
|
270 |
+
|
271 |
+
if ( false !== $api_response ) {
|
272 |
+
$_data = $api_response;
|
273 |
+
}
|
274 |
+
|
275 |
+
} else {
|
276 |
+
$_data = $edd_api_request_transient;
|
277 |
+
}
|
278 |
+
|
279 |
+
// Convert sections into an associative array, since we're getting an object, but Core expects an array.
|
280 |
+
if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
|
281 |
+
$new_sections = array();
|
282 |
+
foreach ( $_data->sections as $key => $value ) {
|
283 |
+
$new_sections[ $key ] = $value;
|
284 |
+
}
|
285 |
+
|
286 |
+
$_data->sections = $new_sections;
|
287 |
+
}
|
288 |
+
|
289 |
+
// Convert banners into an associative array, since we're getting an object, but Core expects an array.
|
290 |
+
if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
|
291 |
+
$new_banners = array();
|
292 |
+
foreach ( $_data->banners as $key => $value ) {
|
293 |
+
$new_banners[ $key ] = $value;
|
294 |
+
}
|
295 |
+
|
296 |
+
$_data->banners = $new_banners;
|
297 |
+
}
|
298 |
+
|
299 |
+
return $_data;
|
300 |
+
}
|
301 |
+
|
302 |
+
/**
|
303 |
+
* Disable SSL verification in order to prevent download update failures
|
304 |
+
*
|
305 |
+
* @param array $args
|
306 |
+
* @param string $url
|
307 |
+
* @return object $array
|
308 |
+
*/
|
309 |
+
public function http_request_args( $args, $url ) {
|
310 |
+
|
311 |
+
$verify_ssl = $this->verify_ssl();
|
312 |
+
if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
|
313 |
+
$args['sslverify'] = $verify_ssl;
|
314 |
+
}
|
315 |
+
return $args;
|
316 |
+
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Calls the API and, if successfull, returns the object delivered by the API.
|
321 |
+
*
|
322 |
+
* @uses get_bloginfo()
|
323 |
+
* @uses wp_remote_post()
|
324 |
+
* @uses is_wp_error()
|
325 |
+
*
|
326 |
+
* @param string $_action The requested action.
|
327 |
+
* @param array $_data Parameters for the API action.
|
328 |
+
* @return false|object
|
329 |
+
*/
|
330 |
+
private function api_request( $_action, $_data ) {
|
331 |
+
|
332 |
+
global $wp_version;
|
333 |
+
|
334 |
+
$data = array_merge( $this->api_data, $_data );
|
335 |
+
|
336 |
+
if ( $data['slug'] != $this->slug ) {
|
337 |
+
return;
|
338 |
+
}
|
339 |
+
|
340 |
+
if( $this->api_url == trailingslashit (home_url() ) ) {
|
341 |
+
return false; // Don't allow a plugin to ping itself
|
342 |
+
}
|
343 |
+
|
344 |
+
$api_params = array(
|
345 |
+
'edd_action' => 'get_version',
|
346 |
+
'license' => ! empty( $data['license'] ) ? $data['license'] : '',
|
347 |
+
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
348 |
+
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
349 |
+
'version' => isset( $data['version'] ) ? $data['version'] : false,
|
350 |
+
'slug' => $data['slug'],
|
351 |
+
'author' => $data['author'],
|
352 |
+
'url' => home_url(),
|
353 |
+
'beta' => ! empty( $data['beta'] ),
|
354 |
+
);
|
355 |
+
|
356 |
+
$verify_ssl = $this->verify_ssl();
|
357 |
+
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
358 |
+
|
359 |
+
if ( ! is_wp_error( $request ) ) {
|
360 |
+
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
361 |
+
}
|
362 |
+
|
363 |
+
if ( $request && isset( $request->sections ) ) {
|
364 |
+
$request->sections = maybe_unserialize( $request->sections );
|
365 |
+
} else {
|
366 |
+
$request = false;
|
367 |
+
}
|
368 |
+
|
369 |
+
if ( $request && isset( $request->banners ) ) {
|
370 |
+
$request->banners = maybe_unserialize( $request->banners );
|
371 |
+
}
|
372 |
+
|
373 |
+
if( ! empty( $request->sections ) ) {
|
374 |
+
foreach( $request->sections as $key => $section ) {
|
375 |
+
$request->$key = (array) $section;
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
+
return $request;
|
380 |
+
}
|
381 |
+
|
382 |
+
public function show_changelog() {
|
383 |
+
|
384 |
+
global $edd_plugin_data;
|
385 |
+
|
386 |
+
if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
|
387 |
+
return;
|
388 |
+
}
|
389 |
+
|
390 |
+
if( empty( $_REQUEST['plugin'] ) ) {
|
391 |
+
return;
|
392 |
+
}
|
393 |
+
|
394 |
+
if( empty( $_REQUEST['slug'] ) ) {
|
395 |
+
return;
|
396 |
+
}
|
397 |
+
|
398 |
+
if( ! current_user_can( 'update_plugins' ) ) {
|
399 |
+
wp_die( __( 'You do not have permission to install plugin updates', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
|
400 |
+
}
|
401 |
+
|
402 |
+
$data = $edd_plugin_data[ $_REQUEST['slug'] ];
|
403 |
+
$beta = ! empty( $data['beta'] ) ? true : false;
|
404 |
+
$cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
|
405 |
+
$version_info = $this->get_cached_version_info( $cache_key );
|
406 |
+
|
407 |
+
if( false === $version_info ) {
|
408 |
+
|
409 |
+
$api_params = array(
|
410 |
+
'edd_action' => 'get_version',
|
411 |
+
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
412 |
+
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
413 |
+
'slug' => $_REQUEST['slug'],
|
414 |
+
'author' => $data['author'],
|
415 |
+
'url' => home_url(),
|
416 |
+
'beta' => ! empty( $data['beta'] )
|
417 |
+
);
|
418 |
+
|
419 |
+
$verify_ssl = $this->verify_ssl();
|
420 |
+
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
421 |
+
|
422 |
+
if ( ! is_wp_error( $request ) ) {
|
423 |
+
$version_info = json_decode( wp_remote_retrieve_body( $request ) );
|
424 |
+
}
|
425 |
+
|
426 |
+
|
427 |
+
if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
|
428 |
+
$version_info->sections = maybe_unserialize( $version_info->sections );
|
429 |
+
} else {
|
430 |
+
$version_info = false;
|
431 |
+
}
|
432 |
+
|
433 |
+
if( ! empty( $version_info ) ) {
|
434 |
+
foreach( $version_info->sections as $key => $section ) {
|
435 |
+
$version_info->$key = (array) $section;
|
436 |
+
}
|
437 |
+
}
|
438 |
+
|
439 |
+
$this->set_version_info_cache( $version_info, $cache_key );
|
440 |
+
|
441 |
+
}
|
442 |
+
|
443 |
+
if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
|
444 |
+
echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
|
445 |
+
}
|
446 |
+
|
447 |
+
exit;
|
448 |
+
}
|
449 |
+
|
450 |
+
public function get_cached_version_info( $cache_key = '' ) {
|
451 |
+
|
452 |
+
if( empty( $cache_key ) ) {
|
453 |
+
$cache_key = $this->cache_key;
|
454 |
+
}
|
455 |
+
|
456 |
+
$cache = get_option( $cache_key );
|
457 |
+
|
458 |
+
if( empty( $cache['timeout'] ) || current_time( 'timestamp' ) > $cache['timeout'] ) {
|
459 |
+
return false; // Cache is expired
|
460 |
+
}
|
461 |
+
|
462 |
+
return json_decode( $cache['value'] );
|
463 |
+
|
464 |
+
}
|
465 |
+
|
466 |
+
public function set_version_info_cache( $value = '', $cache_key = '' ) {
|
467 |
+
|
468 |
+
if( empty( $cache_key ) ) {
|
469 |
+
$cache_key = $this->cache_key;
|
470 |
+
}
|
471 |
+
|
472 |
+
$data = array(
|
473 |
+
'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ),
|
474 |
+
'value' => json_encode( $value )
|
475 |
+
);
|
476 |
+
|
477 |
+
update_option( $cache_key, $data, 'no' );
|
478 |
+
|
479 |
+
}
|
480 |
+
|
481 |
+
/**
|
482 |
+
* Returns if the SSL of the store should be verified.
|
483 |
+
*
|
484 |
+
* @since 1.6.13
|
485 |
+
* @return bool
|
486 |
+
*/
|
487 |
+
private function verify_ssl() {
|
488 |
+
return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
|
489 |
+
}
|
490 |
+
|
491 |
+
}
|
admin/functions-admin.php
ADDED
@@ -0,0 +1,679 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_action_admin_init_setup_messages() {
|
4 |
+
|
5 |
+
if( defined( 'ARVE_PRO_VERSION' ) || defined( 'ARVE_AMP_VERSION' ) ) {
|
6 |
+
|
7 |
+
$msg = sprintf(
|
8 |
+
__( 'ARVE addons price change. Please read <a href="%s">Taking Business to a Serious Level - The Future NextGenThemes and ARVE.</a>.', ARVE_SLUG ),
|
9 |
+
'https://nextgenthemes.com/taking-business-to-a-serious-level-the-future-nextgenthemes-and-arve/'
|
10 |
+
);
|
11 |
+
|
12 |
+
new ARVE_Admin_Notice_Factory(
|
13 |
+
'price_change',
|
14 |
+
"<p>$msg</p>",
|
15 |
+
true
|
16 |
+
);
|
17 |
+
}
|
18 |
+
|
19 |
+
if( defined( 'ARVE_PRO_VERSION' ) && version_compare( ARVE_PRO_VERSION_REQUIRED, ARVE_PRO_VERSION, '>' ) ) {
|
20 |
+
|
21 |
+
$msg = sprintf(
|
22 |
+
__( 'Your ARVE Pro Addon is outdated, you need version %s or later. If you have setup your license <a href="%s">here</a> semi auto updates (Admin panel notice and auto install on confirmation) should work again. If not please <a href="%s">report it</a> and manually update as <a href="%s">described here.</a>', ARVE_SLUG ),
|
23 |
+
ARVE_PRO_VERSION_REQUIRED,
|
24 |
+
get_admin_url() . 'admin.php?page=nextgenthemes-licenses',
|
25 |
+
'https://nextgenthemes.com/support/',
|
26 |
+
'https://nextgenthemes.com/plugins/arve/documentation/installing-and-license-management/'
|
27 |
+
);
|
28 |
+
new ARVE_Admin_Notice_Factory( 'arve-pro-outdated', "<p>$msg</p>", false );
|
29 |
+
}
|
30 |
+
|
31 |
+
if( arve_display_pro_ad() ) {
|
32 |
+
|
33 |
+
$pro_ad_message = __( '<p>Hi, this is Nico(las Jonas) the author of the ARVE - Advanced Responsive Video Embedder plugin. If you are interrested in additional features and/or want to support the work I do on this plugin please consider buying the Pro Addon.</p>', ARVE_SLUG );
|
34 |
+
|
35 |
+
$pro_ad_message .= file_get_contents( ARVE_PATH . 'admin/pro-ad.html' );
|
36 |
+
|
37 |
+
new ARVE_Admin_Notice_Factory( 'arve_dismiss_pro_notice', $pro_ad_message, true );
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
function arve_add_tinymce_plugin( $plugin_array ) {
|
42 |
+
$plugin_array['arve'] = ARVE_ADMIN_URL . 'tinymce.js';
|
43 |
+
return $plugin_array;
|
44 |
+
}
|
45 |
+
|
46 |
+
function arve_display_pro_ad() {
|
47 |
+
|
48 |
+
$inst = (int) get_option( 'arve_install_date' );
|
49 |
+
|
50 |
+
if ( ! current_user_can( 'update_plugins' ) || ! apply_filters( 'arve_pro_ad', true ) || current_time( 'timestamp' ) < strtotime( '+1 week', $inst ) ) {
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
|
54 |
+
return true;
|
55 |
+
}
|
56 |
+
|
57 |
+
function arve_widget_text() {
|
58 |
+
|
59 |
+
printf( '<big><strong><a href="%s">Hiring a Marketing Person</a></strong></big>', 'https://nextgenthemes.com/hiring-a-marketing-person/' );
|
60 |
+
|
61 |
+
echo '<p>';
|
62 |
+
printf( '<a href="%s">Documentation</a>, ', 'https://nextgenthemes.com/plugins/arve/documentation/' );
|
63 |
+
printf( '<a href="%s">Support</a>, ', 'https://nextgenthemes.com/support/' );
|
64 |
+
printf( '<a href="%s">%s</a>', admin_url( 'admin.php?page=advanced-responsive-video-embedder' ), __( 'Settings', ARVE_SLUG ) );
|
65 |
+
echo '</p>';
|
66 |
+
|
67 |
+
printf( '<a href="%s">ARVE Pro Addon Features</a>:', 'https://nextgenthemes.com/plugins/arve-pro/' );
|
68 |
+
|
69 |
+
echo file_get_contents( ARVE_PATH . 'admin/pro-ad.html' );
|
70 |
+
}
|
71 |
+
|
72 |
+
function arve_add_dashboard_widget() {
|
73 |
+
|
74 |
+
if( ! arve_display_pro_ad() ) {
|
75 |
+
return false;
|
76 |
+
}
|
77 |
+
|
78 |
+
wp_add_dashboard_widget(
|
79 |
+
'arve_dashboard_widget', // Widget slug.
|
80 |
+
'Advanced Responsive Video Embedder', // Title.
|
81 |
+
'arve_widget_text' // Display function.
|
82 |
+
);
|
83 |
+
|
84 |
+
// Globalize the metaboxes array, this holds all the widgets for wp-admin.
|
85 |
+
global $wp_meta_boxes, $pagenow;
|
86 |
+
|
87 |
+
if( 'index.php' == $pagenow ) {
|
88 |
+
// Get the regular dashboard widgets array.
|
89 |
+
// (which has our new widget already but at the end).
|
90 |
+
$normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
|
91 |
+
|
92 |
+
// Backup and delete our new dashboard widget from the end of the array.
|
93 |
+
$arve_widget_backup = array( 'arve_dashboard_widget' => $normal_dashboard['arve_dashboard_widget'] );
|
94 |
+
unset( $normal_dashboard['arve_dashboard_widget'] );
|
95 |
+
|
96 |
+
// Merge the two arrays together so our widget is at the beginning.
|
97 |
+
$sorted_dashboard = array_merge( $arve_widget_backup, $normal_dashboard );
|
98 |
+
|
99 |
+
// Save the sorted array back into the original metaboxes.
|
100 |
+
$wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Register the administration menu for this plugin into the WordPress Dashboard menu.
|
106 |
+
*
|
107 |
+
* @since 1.0.0
|
108 |
+
*/
|
109 |
+
function arve_add_plugin_admin_menu() {
|
110 |
+
|
111 |
+
$plugin_screen_hook_suffix = add_options_page(
|
112 |
+
__( 'Advanced Responsive Video Embedder Settings', ARVE_SLUG ),
|
113 |
+
__( 'ARVE', ARVE_SLUG ),
|
114 |
+
'manage_options',
|
115 |
+
ARVE_SLUG, # menu-slug
|
116 |
+
function() {
|
117 |
+
require_once plugin_dir_path( __FILE__ ) . 'html-settings-page.php';
|
118 |
+
}
|
119 |
+
);
|
120 |
+
|
121 |
+
/*
|
122 |
+
add_menu_page(
|
123 |
+
__( 'Advanced Responsive Video Embedder Settings', ARVE_SLUG ), # Page Title
|
124 |
+
__( 'ARVE', ARVE_SLUG ), # Menu Tile
|
125 |
+
'manage_options', # capability
|
126 |
+
ARVE_SLUG, # menu-slug
|
127 |
+
null, # function
|
128 |
+
'dashicons-video-alt3', # icon_url
|
129 |
+
'65.892' # position
|
130 |
+
);
|
131 |
+
*/
|
132 |
+
|
133 |
+
add_submenu_page(
|
134 |
+
'nextgenthemes', # parent_slug
|
135 |
+
__( 'Advanced Responsive Video Embedder Settings', ARVE_SLUG ), # Page Title
|
136 |
+
__( 'ARVE', ARVE_SLUG ), # Menu Title
|
137 |
+
'manage_options', # capability
|
138 |
+
ARVE_SLUG # menu-slug
|
139 |
+
);
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Add settings action link to the plugins page.
|
144 |
+
*
|
145 |
+
* @since 1.0.0
|
146 |
+
*/
|
147 |
+
function arve_add_action_links( $links ) {
|
148 |
+
|
149 |
+
if( ! is_plugin_active( 'arve-pro/arve-pro.php' ) ) {
|
150 |
+
|
151 |
+
$extra_links['buy_pro_addon'] = sprintf(
|
152 |
+
'<a href="%s"><strong style="display: inline;">%s</strong></a>',
|
153 |
+
'https://nextgenthemes.com/plugins/arve-pro/',
|
154 |
+
__( 'Buy Pro Addon', ARVE_SLUG )
|
155 |
+
);
|
156 |
+
}
|
157 |
+
|
158 |
+
$extra_links['donate'] = sprintf( '<a href="https://nextgenthemes.com/donate/"><strong style="display: inline;">%s</strong></a>', __( 'Donate', ARVE_SLUG ) );
|
159 |
+
$extra_links['settings'] = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=' . ARVE_SLUG ), __( 'Settings', ARVE_SLUG ) );
|
160 |
+
|
161 |
+
return array_merge( $extra_links, $links );
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Action to add a custom button to the content editor
|
166 |
+
*
|
167 |
+
* @since 4.3.0
|
168 |
+
*/
|
169 |
+
function arve_add_media_button() {
|
170 |
+
|
171 |
+
$options = arve_get_options();
|
172 |
+
|
173 |
+
add_thickbox();
|
174 |
+
|
175 |
+
$p1 = __( 'This button can open a optional ARVE a Shortcode creation dialog. ARVE needs the <a href="%s">Shortcode UI plugin</a> active for this fuctionality.', ARVE_SLUG );
|
176 |
+
$p2 = __( 'The "Shortcake (Shortcode UI)" plugin also adds What You See Is What You Get functionality to WordPress visual post editor.', ARVE_SLUG );
|
177 |
+
$p3 = __( 'It is perfectly fine to pass on this and <a href="%s">manually</a> write shortcodes or don\'t use shortcodes at all, but it makes things easier.', ARVE_SLUG );
|
178 |
+
|
179 |
+
printf(
|
180 |
+
"<div id='arve-thickbox' style='display:none;'><p>$p1</p><p>$p2</p><p>$p3</p></div>",
|
181 |
+
nextgenthemes_admin_install_search_url( 'Shortcode+UI' ),
|
182 |
+
esc_url( 'https://nextgenthemes.com/plugins/arve/documentation/' )
|
183 |
+
);
|
184 |
+
|
185 |
+
printf(
|
186 |
+
'<button id="arve-btn" title="%s" data-mode="%s" class="arve-btn button add_media" type="button"><span class="wp-media-buttons-icon arve-icon"></span> %s</button>',
|
187 |
+
esc_attr__( 'ARVE Advanced Responsive Video Embedder', ARVE_SLUG ),
|
188 |
+
esc_attr( $options['mode'] ),
|
189 |
+
esc_html__( 'Embed Video (ARVE)', ARVE_SLUG )
|
190 |
+
);
|
191 |
+
}
|
192 |
+
|
193 |
+
function arve_register_shortcode_ui() {
|
194 |
+
|
195 |
+
$attrs = arve_get_settings_definitions();
|
196 |
+
|
197 |
+
if( function_exists( 'arve_pro_get_settings_definitions' ) ) {
|
198 |
+
$attrs = array_merge( $attrs, arve_pro_get_settings_definitions() );
|
199 |
+
}
|
200 |
+
|
201 |
+
foreach ( $attrs as $key => $values ) {
|
202 |
+
|
203 |
+
if( isset( $values['hide_from_sc'] ) && $values['hide_from_sc'] ) {
|
204 |
+
continue;
|
205 |
+
}
|
206 |
+
|
207 |
+
$sc_attrs[] = $values;
|
208 |
+
}
|
209 |
+
|
210 |
+
shortcode_ui_register_for_shortcode(
|
211 |
+
'arve',
|
212 |
+
array(
|
213 |
+
'label' => esc_html( 'ARVE' ),
|
214 |
+
'listItemImage' => 'dashicons-format-video',
|
215 |
+
'attrs' => $sc_attrs,
|
216 |
+
)
|
217 |
+
);
|
218 |
+
|
219 |
+
/*
|
220 |
+
|
221 |
+
foreach ($options['shortcodes'] as $sc_id => $sc) {
|
222 |
+
|
223 |
+
shortcode_ui_register_for_shortcode(
|
224 |
+
$sc_id,
|
225 |
+
array(
|
226 |
+
'label' => esc_html( ucfirst("$sc_id ") ) . esc_html__( '(arve)', ARVE_SLUG),
|
227 |
+
'listItemImage' => 'dashicons-format-video',
|
228 |
+
'attrs' => $sc_attrs,
|
229 |
+
)
|
230 |
+
);
|
231 |
+
}
|
232 |
+
*/
|
233 |
+
}
|
234 |
+
|
235 |
+
function arve_input( $args ) {
|
236 |
+
|
237 |
+
$out = sprintf( '<input%s>', arve_attr( $args['input_attr'] ) );
|
238 |
+
|
239 |
+
if ( ! empty( $args['option_values']['attr'] ) && 'thumbnail_fallback' == $args['option_values']['attr'] ) {
|
240 |
+
|
241 |
+
// jQuery
|
242 |
+
wp_enqueue_script('jquery');
|
243 |
+
// This will enqueue the Media Uploader script
|
244 |
+
wp_enqueue_media();
|
245 |
+
|
246 |
+
$out .= sprintf(
|
247 |
+
'<a %s>%s</a>',
|
248 |
+
arve_attr(
|
249 |
+
array(
|
250 |
+
'data-image-upload' => sprintf( '[name="%s"]', $args['input_attr']['name'] ),
|
251 |
+
'class' => 'button-secondary',
|
252 |
+
)
|
253 |
+
),
|
254 |
+
__('Upload Image', ARVE_SLUG )
|
255 |
+
);
|
256 |
+
}
|
257 |
+
|
258 |
+
if ( ! empty( $args['description'] ) ) {
|
259 |
+
$out = $out . '<p class="description">' . $args['description'] . '</p>';
|
260 |
+
}
|
261 |
+
|
262 |
+
echo $out;
|
263 |
+
}
|
264 |
+
|
265 |
+
function arve_textarea( $args ) {
|
266 |
+
|
267 |
+
unset( $args['input_attr']['type'] );
|
268 |
+
|
269 |
+
$out = sprintf( '<textarea%s></textarea>', arve_attr( $args['input_attr'] ) );
|
270 |
+
|
271 |
+
if ( ! empty( $args['description'] ) ) {
|
272 |
+
$out = $out . '<p class="description">' . $args['description'] . '</p>';
|
273 |
+
}
|
274 |
+
|
275 |
+
echo $out;
|
276 |
+
}
|
277 |
+
|
278 |
+
function arve_select( $args ) {
|
279 |
+
|
280 |
+
unset( $args['input_attr']['type'] );
|
281 |
+
|
282 |
+
foreach ( $args['option_values']['options'] as $key => $value ) {
|
283 |
+
|
284 |
+
if (
|
285 |
+
2 === count( $args['option_values']['options'] ) &&
|
286 |
+
array_key_exists( 'yes', $args['option_values']['options'] ) &&
|
287 |
+
array_key_exists( 'no', $args['option_values']['options'] )
|
288 |
+
) {
|
289 |
+
$current_option = $args['input_attr']['value'] ? 'yes' : 'no';
|
290 |
+
} else {
|
291 |
+
$current_option = $args['input_attr']['value'];
|
292 |
+
}
|
293 |
+
|
294 |
+
$options[] = sprintf(
|
295 |
+
'<option value="%s" %s>%s</option>',
|
296 |
+
esc_attr( $key ),
|
297 |
+
selected( $current_option, $key, false ),
|
298 |
+
esc_html( $value )
|
299 |
+
);
|
300 |
+
}
|
301 |
+
|
302 |
+
$select_attr = $args['input_attr'];
|
303 |
+
unset( $select_attr['value'] );
|
304 |
+
|
305 |
+
$out = sprintf( '<select%s>%s</select>', arve_attr( $select_attr ), implode( '', $options ) );
|
306 |
+
|
307 |
+
if ( ! empty( $args['description'] ) ) {
|
308 |
+
$out = $out . '<p class="description">' . $args['description'] . '</p>';
|
309 |
+
}
|
310 |
+
|
311 |
+
echo $out;
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
*
|
316 |
+
*
|
317 |
+
* @since 2.6.0
|
318 |
+
*/
|
319 |
+
function arve_register_settings() {
|
320 |
+
|
321 |
+
$options = arve_get_options();
|
322 |
+
|
323 |
+
// Main
|
324 |
+
$main_title = __( 'Main Options', ARVE_SLUG );
|
325 |
+
|
326 |
+
add_settings_section(
|
327 |
+
'main_section',
|
328 |
+
sprintf( '<span class="arve-settings-section" id="arve-settings-section-main" title="%s"></span>%s', esc_attr( $main_title ), esc_html( $main_title ) ),
|
329 |
+
null,
|
330 |
+
ARVE_SLUG
|
331 |
+
);
|
332 |
+
|
333 |
+
foreach( arve_get_settings_definitions() as $key => $value ) {
|
334 |
+
|
335 |
+
if ( ! empty( $value['hide_from_settings'] ) ) {
|
336 |
+
continue;
|
337 |
+
};
|
338 |
+
|
339 |
+
if ( empty( $value['meta'] ) ) {
|
340 |
+
$value['meta'] = array();
|
341 |
+
};
|
342 |
+
|
343 |
+
if ( isset( $value['options'][''] ) ) {
|
344 |
+
unset( $value['options'][''] );
|
345 |
+
}
|
346 |
+
|
347 |
+
if( in_array( $value['type'], array( 'text', 'number', 'url' ) ) ) {
|
348 |
+
$callback_function = 'arve_input';
|
349 |
+
} else {
|
350 |
+
$callback_function = 'arve_' . $value['type'];
|
351 |
+
}
|
352 |
+
|
353 |
+
add_settings_field(
|
354 |
+
"arve_options_main[{$value['attr']}]", // ID
|
355 |
+
$value['label'], // title
|
356 |
+
$callback_function, // callback
|
357 |
+
ARVE_SLUG, // page
|
358 |
+
'main_section', // section
|
359 |
+
array( // args
|
360 |
+
'label_for' => ( 'radio' === $value['type'] ) ? null : "arve_options_main[{$value['attr']}]",
|
361 |
+
'input_attr' => $value['meta'] + array(
|
362 |
+
'type' => $value['type'],
|
363 |
+
'value' => $options[ $value['attr'] ],
|
364 |
+
'id' => "arve_options_main[{$value['attr']}]",
|
365 |
+
'name' => "arve_options_main[{$value['attr']}]",
|
366 |
+
),
|
367 |
+
'description' => ! empty( $value['description'] ) ? $value['description'] : null,
|
368 |
+
'option_values' => $value,
|
369 |
+
)
|
370 |
+
);
|
371 |
+
}
|
372 |
+
|
373 |
+
add_settings_field(
|
374 |
+
'arve_options_main[reset]',
|
375 |
+
null,
|
376 |
+
"arve_submit_reset",
|
377 |
+
ARVE_SLUG,
|
378 |
+
'main_section',
|
379 |
+
array(
|
380 |
+
'reset_name' => 'arve_options_main[reset]',
|
381 |
+
)
|
382 |
+
);
|
383 |
+
|
384 |
+
// Params
|
385 |
+
$params_title = __( 'URL Parameters', ARVE_SLUG );
|
386 |
+
add_settings_section(
|
387 |
+
'params_section',
|
388 |
+
sprintf( '<span class="arve-settings-section" id="arve-settings-section-params" title="%s"></span>%s', esc_attr( $params_title ), esc_html( $params_title ) ),
|
389 |
+
'arve_params_section_description',
|
390 |
+
ARVE_SLUG
|
391 |
+
);
|
392 |
+
|
393 |
+
// Options
|
394 |
+
foreach ( $options['params'] as $provider => $params ) {
|
395 |
+
|
396 |
+
add_settings_field(
|
397 |
+
"arve_options_params[$provider]",
|
398 |
+
ucfirst ( $provider ),
|
399 |
+
'arve_input',
|
400 |
+
ARVE_SLUG,
|
401 |
+
'params_section',
|
402 |
+
array(
|
403 |
+
'label_for' => "arve_options_params[$provider]",
|
404 |
+
'input_attr' => array(
|
405 |
+
'type' => 'text',
|
406 |
+
'value' => $params,
|
407 |
+
'id' => "arve_options_params[$provider]",
|
408 |
+
'name' => "arve_options_params[$provider]",
|
409 |
+
'class' => 'large-text'
|
410 |
+
),
|
411 |
+
)
|
412 |
+
);
|
413 |
+
}
|
414 |
+
|
415 |
+
add_settings_field(
|
416 |
+
'arve_options_params[reset]',
|
417 |
+
null,
|
418 |
+
'arve_submit_reset',
|
419 |
+
ARVE_SLUG,
|
420 |
+
'params_section',
|
421 |
+
array(
|
422 |
+
'reset_name' => 'arve_options_params[reset]',
|
423 |
+
)
|
424 |
+
);
|
425 |
+
|
426 |
+
// Shortcode Tags
|
427 |
+
$shortcodes_title = __( 'Shortcode Tags', ARVE_SLUG );
|
428 |
+
|
429 |
+
add_settings_section(
|
430 |
+
'shortcodes_section',
|
431 |
+
sprintf( '<span class="arve-settings-section" id="arve-settings-section-shortcodes" title="%s"></span>%s', esc_attr( $shortcodes_title ), esc_html( $shortcodes_title ) ),
|
432 |
+
'arve_shortcodes_section_description',
|
433 |
+
ARVE_SLUG
|
434 |
+
);
|
435 |
+
|
436 |
+
foreach ( $options['shortcodes'] as $provider => $shortcode ) {
|
437 |
+
|
438 |
+
add_settings_field(
|
439 |
+
"arve_options_shortcodes[$provider]",
|
440 |
+
ucfirst ( $provider ),
|
441 |
+
'arve_input',
|
442 |
+
ARVE_SLUG,
|
443 |
+
'shortcodes_section',
|
444 |
+
array(
|
445 |
+
'label_for' => "arve_options_shortcodes[$provider]",
|
446 |
+
'input_attr' => array(
|
447 |
+
'type' => 'text',
|
448 |
+
'value' => $shortcode,
|
449 |
+
'id' => "arve_options_shortcodes[$provider]",
|
450 |
+
'name' => "arve_options_shortcodes[$provider]",
|
451 |
+
'class' => 'medium-text'
|
452 |
+
),
|
453 |
+
)
|
454 |
+
);
|
455 |
+
}
|
456 |
+
|
457 |
+
add_settings_field(
|
458 |
+
'arve_options_shortcodes[reset]',
|
459 |
+
null,
|
460 |
+
'arve_submit_reset',
|
461 |
+
ARVE_SLUG,
|
462 |
+
'shortcodes_section',
|
463 |
+
array(
|
464 |
+
'reset_name' => 'arve_options_shortcodes[reset]',
|
465 |
+
)
|
466 |
+
);
|
467 |
+
|
468 |
+
// register_setting( $option_group, $option_name, $sanitize_callback )
|
469 |
+
register_setting( 'arve-settings-group', 'arve_options_main', 'arve_validate_options_main' );
|
470 |
+
register_setting( 'arve-settings-group', 'arve_options_params', 'arve_validate_options_params' );
|
471 |
+
register_setting( 'arve-settings-group', 'arve_options_shortcodes', 'arve_validate_options_shortcodes' );
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
*
|
476 |
+
*
|
477 |
+
* @since 6.0.6
|
478 |
+
*/
|
479 |
+
function arve_register_settings_debug() {
|
480 |
+
|
481 |
+
// Debug Information
|
482 |
+
$debug_title = __( 'Debug Info', ARVE_SLUG );
|
483 |
+
|
484 |
+
add_settings_section(
|
485 |
+
'debug_section',
|
486 |
+
sprintf( '<span class="arve-settings-section" id="arve-settings-section-debug" title="%s"></span>%s', esc_attr( $debug_title ), esc_html( $debug_title ) ),
|
487 |
+
'arve_debug_section_description',
|
488 |
+
ARVE_SLUG
|
489 |
+
);
|
490 |
+
}
|
491 |
+
|
492 |
+
function arve_submit_reset( $args ) {
|
493 |
+
|
494 |
+
submit_button( __('Save Changes' ), 'primary','submit', false );
|
495 |
+
echo ' ';
|
496 |
+
submit_button( __('Reset This Settings Section', ARVE_SLUG ), 'secondary', $args['reset_name'], false );
|
497 |
+
}
|
498 |
+
|
499 |
+
function arve_shortcodes_section_description() {
|
500 |
+
$desc = __( 'This shortcodes exist for backwards compatiblity only. It is not recommended to use them at all, please use the <code>[arve]</code> shortcode. You can change the old shortcode tags here. You may need this to prevent conflicts with other plugins you want to use.', ARVE_SLUG );
|
501 |
+
echo "<p>$desc</p>";
|
502 |
+
}
|
503 |
+
|
504 |
+
function arve_params_section_description() {
|
505 |
+
|
506 |
+
$desc = sprintf(
|
507 |
+
__( 'This parameters will be added to the <code>iframe src</code> urls, you can control the video players behavior with them. Please read <a href="%s" target="_blank">the documentation</a> on.',
|
508 |
+
ARVE_SLUG ),
|
509 |
+
esc_url( 'https://nextgenthemes.com/arve/documentation' )
|
510 |
+
);
|
511 |
+
|
512 |
+
echo "<p>$desc</p>";
|
513 |
+
|
514 |
+
?>
|
515 |
+
<p>
|
516 |
+
See
|
517 |
+
<a target="_blank" href="https://developers.google.com/youtube/player_parameters">Youtube Parameters</a>,
|
518 |
+
<a target="_blank" href="http://www.dailymotion.com/doc/api/player.html#parameters">Dailymotion Parameters</a>,
|
519 |
+
<a target="_blank" href="https://developer.vimeo.com/player/embedding">Vimeo Parameters</a>,
|
520 |
+
<a target="_blank" href="https://nextgenthemes.com/arve-pro/documentation">Vimeo Parameters</a>,
|
521 |
+
</p>
|
522 |
+
<?php
|
523 |
+
}
|
524 |
+
|
525 |
+
function arve_get_plugin_version_and_status( $folder_and_filename ) {
|
526 |
+
|
527 |
+
$file = WP_PLUGIN_DIR . '/' . $folder_and_filename;
|
528 |
+
|
529 |
+
if( ! is_file( $file ) ) {
|
530 |
+
return 'NOT INSTALLED';
|
531 |
+
}
|
532 |
+
|
533 |
+
$data = get_plugin_data( $file );
|
534 |
+
$out = $data['Version'];
|
535 |
+
|
536 |
+
if( ! is_plugin_active( $folder_and_filename ) ) {
|
537 |
+
$out .= ' INACTIVE';
|
538 |
+
}
|
539 |
+
|
540 |
+
return $out;
|
541 |
+
}
|
542 |
+
|
543 |
+
|
544 |
+
function arve_debug_section_description() {
|
545 |
+
|
546 |
+
global $wp_version;
|
547 |
+
|
548 |
+
$arve_version = arve_get_plugin_version_and_status( 'advanced-responsive-video-embedder/advanced-responsive-video-embedder.php' );
|
549 |
+
$arve_pro_version = arve_get_plugin_version_and_status( 'arve-pro/arve-pro.php' );
|
550 |
+
|
551 |
+
if( ! is_plugin_active( 'arve-pro/arve-pro.php' ) ) {
|
552 |
+
$pro_options_dump = '';
|
553 |
+
} else {
|
554 |
+
$pro_options = get_option( 'arve_options_pro' );
|
555 |
+
unset( $pro_options['key'] );
|
556 |
+
ob_start();
|
557 |
+
var_dump( $pro_options );
|
558 |
+
$pro_options_dump = ob_get_clean();
|
559 |
+
}
|
560 |
+
|
561 |
+
include_once( plugin_dir_path( __FILE__ ) . 'html-debug-info.php' );
|
562 |
+
}
|
563 |
+
|
564 |
+
/**
|
565 |
+
*
|
566 |
+
*
|
567 |
+
* @since 2.6.0
|
568 |
+
*/
|
569 |
+
function arve_validate_options_main( $input ) {
|
570 |
+
|
571 |
+
// Storing the Options Section as a empty array will cause the plugin to use defaults
|
572 |
+
if( isset( $input['reset'] ) ) {
|
573 |
+
return array();
|
574 |
+
}
|
575 |
+
|
576 |
+
$output['align'] = sanitize_text_field( $input['align'] );
|
577 |
+
$output['mode'] = sanitize_text_field( $input['mode'] );
|
578 |
+
$output['last_settings_tab'] = sanitize_text_field( $input['last_settings_tab'] );
|
579 |
+
$output['controlslist'] = sanitize_text_field( $input['controlslist'] );
|
580 |
+
$output['vimeo_api_token'] = sanitize_text_field( $input['vimeo_api_token'] );
|
581 |
+
|
582 |
+
$output['always_enqueue_assets'] = ( 'yes' == $input['always_enqueue_assets'] ) ? true : false;
|
583 |
+
$output['autoplay'] = ( 'yes' == $input['autoplay'] ) ? true : false;
|
584 |
+
$output['iframe_flash'] = ( 'yes' == $input['iframe_flash'] ) ? true : false;
|
585 |
+
$output['promote_link'] = ( 'yes' == $input['promote_link'] ) ? true : false;
|
586 |
+
$output['wp_video_override'] = ( 'yes' == $input['wp_video_override'] ) ? true : false;
|
587 |
+
|
588 |
+
$output['wp_image_cache_time'] = (int) $input['wp_image_cache_time'];
|
589 |
+
|
590 |
+
if( (int) $input['video_maxwidth'] > 100 ) {
|
591 |
+
$output['video_maxwidth'] = (int) $input['video_maxwidth'];
|
592 |
+
} else {
|
593 |
+
$output['video_maxwidth'] = '';
|
594 |
+
}
|
595 |
+
|
596 |
+
if( (int) $input['align_maxwidth'] > 100 ) {
|
597 |
+
$output['align_maxwidth'] = (int) $input['align_maxwidth'];
|
598 |
+
}
|
599 |
+
|
600 |
+
$options_defaults = arve_get_options_defaults( 'main' );
|
601 |
+
// Store only the options in the database that are different from the defaults.
|
602 |
+
return array_diff_assoc( $output, $options_defaults );
|
603 |
+
}
|
604 |
+
|
605 |
+
function arve_validate_options_params( $input ) {
|
606 |
+
|
607 |
+
// Storing the Options Section as a empty array will cause the plugin to use defaults
|
608 |
+
if( isset( $input['reset'] ) ) {
|
609 |
+
return array();
|
610 |
+
}
|
611 |
+
|
612 |
+
$output = array();
|
613 |
+
|
614 |
+
foreach ( $input as $key => $var ) {
|
615 |
+
$output[ $key ] = preg_replace( '!\s+!', '&', trim( $var ) );
|
616 |
+
$output[ $key ] = preg_replace( '!\s+!', '&', trim( $var ) );
|
617 |
+
}
|
618 |
+
|
619 |
+
$options_defaults = arve_get_options_defaults( 'params' );
|
620 |
+
//* Store only the options in the database that are different from the defaults.
|
621 |
+
return array_diff_assoc( $output, $options_defaults );
|
622 |
+
}
|
623 |
+
|
624 |
+
function arve_validate_options_shortcodes( $input ) {
|
625 |
+
|
626 |
+
$output = array();
|
627 |
+
|
628 |
+
//* Storing the Options Section as a empty array will cause the plugin to use defaults
|
629 |
+
if( isset( $input['reset'] ) ) {
|
630 |
+
return array();
|
631 |
+
}
|
632 |
+
|
633 |
+
foreach ( $input as $key => $var ) {
|
634 |
+
|
635 |
+
$var = preg_replace( '/[_]+/', '_', $var ); // remove multiple underscores
|
636 |
+
$var = preg_replace( '/[^A-Za-z0-9_]/', '', $var ); // strip away everything except a-z,0-9 and underscores
|
637 |
+
|
638 |
+
if ( strlen($var) < 3 ) {
|
639 |
+
continue;
|
640 |
+
}
|
641 |
+
|
642 |
+
$output[ $key ] = $var;
|
643 |
+
}
|
644 |
+
|
645 |
+
$options_defaults = arve_get_options_defaults( 'shortcodes' );
|
646 |
+
//* Store only the options in the database that are different from the defaults.
|
647 |
+
return array_diff_assoc( $output, $options_defaults );
|
648 |
+
}
|
649 |
+
|
650 |
+
|
651 |
+
function arve_admin_enqueue_styles() {
|
652 |
+
wp_enqueue_style( ARVE_SLUG, ARVE_ADMIN_URL . 'arve-admin.css', array(), ARVE_VERSION, 'all' );
|
653 |
+
}
|
654 |
+
|
655 |
+
function arve_mce_css( $mce_css ) {
|
656 |
+
|
657 |
+
$min = arve_get_min_suffix();
|
658 |
+
|
659 |
+
if ( ! empty( $mce_css ) ) {
|
660 |
+
$mce_css .= ',';
|
661 |
+
}
|
662 |
+
$mce_css .= ARVE_PUBLIC_URL . "arve{$min}.css";
|
663 |
+
|
664 |
+
return $mce_css;
|
665 |
+
}
|
666 |
+
|
667 |
+
/**
|
668 |
+
* Register the JavaScript for the dashboard.
|
669 |
+
*
|
670 |
+
* @since 1.0.0
|
671 |
+
*/
|
672 |
+
function arve_admin_enqueue_scripts() {
|
673 |
+
|
674 |
+
wp_enqueue_script( ARVE_SLUG, ARVE_ADMIN_URL . 'arve-admin.js', array( 'jquery' ), ARVE_VERSION, true );
|
675 |
+
|
676 |
+
if ( is_plugin_active( 'shortcode-ui/shortcode-ui.php' ) ) {
|
677 |
+
wp_enqueue_script( ARVE_SLUG . '-sc-ui', ARVE_ADMIN_URL . 'arve-shortcode-ui.js', array( 'shortcode-ui' ), ARVE_VERSION, true );
|
678 |
+
}
|
679 |
+
}
|
admin/functions-licensing.php
ADDED
@@ -0,0 +1,614 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
add_action( 'admin_init', 'nextgenthemes_init_edd_updaters', 0 );
|
4 |
+
add_action( 'admin_init', 'nextgenthemes_activation_notices' );
|
5 |
+
add_action( 'admin_init', 'nextgenthemes_register_settings' );
|
6 |
+
add_action( 'admin_menu', 'nextgenthemes_menus' );
|
7 |
+
|
8 |
+
function nextgenthemes_admin_install_search_url( $search_term ) {
|
9 |
+
|
10 |
+
$path = "plugin-install.php?s={$search_term}&tab=search&type=term";
|
11 |
+
|
12 |
+
if ( is_multisite() ) {
|
13 |
+
return network_admin_url( $path );
|
14 |
+
} else {
|
15 |
+
return admin_url( $path );
|
16 |
+
}
|
17 |
+
}
|
18 |
+
function nextgenthemes_ads_page() { ?>
|
19 |
+
<style>
|
20 |
+
body {
|
21 |
+
background: hsl(210, 13%, 16%);
|
22 |
+
}
|
23 |
+
#wpcontent {
|
24 |
+
padding: 0;
|
25 |
+
}
|
26 |
+
#wpbody-content {
|
27 |
+
/* padding-bottom: 2rem; */
|
28 |
+
}
|
29 |
+
#wpfooter {
|
30 |
+
display: none;
|
31 |
+
}
|
32 |
+
#nextgenthemes-ads {
|
33 |
+
padding: 1.7rem;
|
34 |
+
column-width: 40rem;
|
35 |
+
column-gap: 1.7rem;
|
36 |
+
}
|
37 |
+
@media only screen and (max-device-width: 400px) {
|
38 |
+
|
39 |
+
#nextgenthemes-ads {
|
40 |
+
padding-left: 0;
|
41 |
+
padding-right: 0;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
#nextgenthemes-ads,
|
45 |
+
#nextgenthemes-ads * {
|
46 |
+
box-sizing: border-box;
|
47 |
+
}
|
48 |
+
#nextgenthemes-ads::after {
|
49 |
+
content: "";
|
50 |
+
display: table;
|
51 |
+
clear: both;
|
52 |
+
}
|
53 |
+
#nextgenthemes-ads {
|
54 |
+
color: white;
|
55 |
+
}
|
56 |
+
#nextgenthemes-ads h1,
|
57 |
+
#nextgenthemes-ads h2,
|
58 |
+
#nextgenthemes-ads h3 {
|
59 |
+
color: inherit;
|
60 |
+
margin-left: 2rem;
|
61 |
+
margin-right: 1.7rem;
|
62 |
+
}
|
63 |
+
#nextgenthemes-ads h1 {
|
64 |
+
line-height: 1;
|
65 |
+
}
|
66 |
+
#nextgenthemes-ads img {
|
67 |
+
width: 100%;
|
68 |
+
height: auto;
|
69 |
+
}
|
70 |
+
#nextgenthemes-ads > a {
|
71 |
+
text-decoration: none;
|
72 |
+
position: relative;
|
73 |
+
display: inline-block;
|
74 |
+
width: 100%;
|
75 |
+
background-color: hsl(210, 13%, 13%);
|
76 |
+
border: 1px solid hsl(207, 48%, 30%);
|
77 |
+
transition: box-shadow .3s, background-color .3s, border-color .3s;
|
78 |
+
color: #eee;
|
79 |
+
font-size: 1.05rem;
|
80 |
+
margin-bottom: 2rem;
|
81 |
+
line-height: 1.4;
|
82 |
+
}
|
83 |
+
#nextgenthemes-ads > a:hover {
|
84 |
+
background-color: hsl(210, 13%, 10%);
|
85 |
+
box-shadow: 0 0 10px hsla(207, 48%, 50%, 1);
|
86 |
+
border-color: hsl(207, 48%, 40%);
|
87 |
+
}
|
88 |
+
#nextgenthemes-ads p {
|
89 |
+
margin-left: 2rem;
|
90 |
+
margin-right: 1.7rem;
|
91 |
+
font-size: 1.2rem;
|
92 |
+
}
|
93 |
+
#nextgenthemes-ads ul {
|
94 |
+
list-style: square;
|
95 |
+
margin-left: 2.5rem;
|
96 |
+
margin-right: .7rem;
|
97 |
+
}
|
98 |
+
#nextgenthemes-ads > a > span {
|
99 |
+
position: absolute;
|
100 |
+
padding: .6rem 1rem;
|
101 |
+
right: 0px;
|
102 |
+
bottom: 0px;
|
103 |
+
font-size: 2rem;
|
104 |
+
color: white;
|
105 |
+
background-color: hsl(207, 48%, 30%);
|
106 |
+
border-top-left-radius: 3px;
|
107 |
+
//transform: rotate(3deg);
|
108 |
+
}
|
109 |
+
#nextgenthemes-ads figure {
|
110 |
+
margin: 1rem;
|
111 |
+
}
|
112 |
+
</style>
|
113 |
+
<?php $img_dir = plugin_dir_url( __FILE__ ) . 'product-images/'; ?>
|
114 |
+
<div id="nextgenthemes-ads">
|
115 |
+
|
116 |
+
<?php if ( ! defined( 'ARVE_PRO_VERSION' ) ) : ?>
|
117 |
+
<a href="https://nextgenthemes.com/plugins/arve-pro/">
|
118 |
+
<figure><img src="<?php echo $img_dir; ?>arve.svg" alt"ARVE"></figure>
|
119 |
+
<?php nextgenthemes_feature_list_html( ARVE_PATH . 'readme/html/20-description-features-pro.html' ); ?>
|
120 |
+
<span>Paid</span>
|
121 |
+
</a>
|
122 |
+
<?php endif; ?>
|
123 |
+
|
124 |
+
<?php if ( ! defined( 'ARVE_AMP_VERSION' ) ) : ?>
|
125 |
+
<a href="https://nextgenthemes.com/plugins/arve-accelerated-mobile-pages-addon/">
|
126 |
+
<figure><img src="<?php echo $img_dir; ?>arve.svg" alt"ARVE"></figure>
|
127 |
+
<?php nextgenthemes_feature_list_html( ARVE_PATH . 'readme/html/25-description-features-amp.html' ); ?>
|
128 |
+
<span>Paid</span>
|
129 |
+
</a>
|
130 |
+
<?php endif; ?>
|
131 |
+
|
132 |
+
<?php if ( ! is_plugin_active( 'regenerate-thumbnails-reminder/regenerate-thumbnails-reminder.php' ) ) : ?>
|
133 |
+
<a href="<?php echo nextgenthemes_admin_install_search_url( 'Regenerate+Thumbnails+Reminder' ); ?>">
|
134 |
+
<h1>Regenerate Thumbnails Reminder</h1>
|
135 |
+
<p>Get a reminder when you change your thumbnail sizes to regenerate them. Note Thumbnails sizes change automatically if you swtich themes.</p>
|
136 |
+
<span>Free</span>
|
137 |
+
</a>
|
138 |
+
<?php endif; ?>
|
139 |
+
|
140 |
+
</div>
|
141 |
+
|
142 |
+
<?php
|
143 |
+
}
|
144 |
+
|
145 |
+
function nextgenthemes_feature_list_html( $filepath ) {
|
146 |
+
echo strip_tags( file_get_contents( $filepath ), '<ul></ul><li></li><h3></h3>' );
|
147 |
+
}
|
148 |
+
|
149 |
+
function nextgenthemes_activation_notices() {
|
150 |
+
|
151 |
+
$products = nextgenthemes_get_products();
|
152 |
+
|
153 |
+
foreach ( $products as $key => $value ) {
|
154 |
+
|
155 |
+
if( $value['active'] && ! $value['valid_key'] ) {
|
156 |
+
|
157 |
+
$msg = sprintf(
|
158 |
+
__( 'Hi there, thanks for your purchase. One last step, please activate your %s <a href="%s">here now</a>.', ARVE_SLUG ),
|
159 |
+
$value['name'],
|
160 |
+
get_admin_url() . 'admin.php?page=nextgenthemes-licenses'
|
161 |
+
);
|
162 |
+
new ARVE_Admin_Notice_Factory( $key . '-activation-notice', "<p>$msg</p>", false );
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
function nextgenthemes_get_products() {
|
168 |
+
|
169 |
+
$products = array(
|
170 |
+
'arve_pro' => array(
|
171 |
+
'name' => 'ARVE Pro',
|
172 |
+
'id' => 1253,
|
173 |
+
'type' => 'plugin',
|
174 |
+
'author' => 'Nicolas Jonas',
|
175 |
+
'url' => 'https://nextgenthemes.com/plugins/arve-pro/',
|
176 |
+
),
|
177 |
+
'arve_amp' => array(
|
178 |
+
'name' => 'ARVE AMP',
|
179 |
+
'id' => 16941,
|
180 |
+
'type' => 'plugin',
|
181 |
+
'author' => 'Nicolas Jonas',
|
182 |
+
'url' => 'https://nextgenthemes.com/plugins/arve-amp/',
|
183 |
+
),
|
184 |
+
'arve_random_video' => array(
|
185 |
+
'name' => 'ARVE Random Video',
|
186 |
+
'id' => 31933,
|
187 |
+
'type' => 'plugin',
|
188 |
+
'author' => 'Nicolas Jonas',
|
189 |
+
'url' => 'https://nextgenthemes.com/plugins/arve-random-video/',
|
190 |
+
)
|
191 |
+
);
|
192 |
+
|
193 |
+
$products = apply_filters( 'nextgenthemes_products', $products );
|
194 |
+
|
195 |
+
foreach ( $products as $key => $value ) {
|
196 |
+
|
197 |
+
$products[ $key ]['slug'] = $key;
|
198 |
+
$products[ $key ]['installed'] = false;
|
199 |
+
$products[ $key ]['active'] = false;
|
200 |
+
$products[ $key ]['valid_key'] = nextgenthemes_has_valid_key( $key );
|
201 |
+
|
202 |
+
$version_define = strtoupper( $key ) . '_VERSION';
|
203 |
+
$file_define = strtoupper( $key ) . '_FILE';
|
204 |
+
|
205 |
+
if( defined( $version_define ) ) {
|
206 |
+
$products[ $key ]['version'] = constant( $version_define );
|
207 |
+
}
|
208 |
+
if( defined( $file_define ) ) {
|
209 |
+
$products[ $key ]['file'] = constant( $file_define );
|
210 |
+
}
|
211 |
+
|
212 |
+
$version_define = "\\nextgenthemes\\$key\\VERSION";
|
213 |
+
$file_define = "\\nextgenthemes\\$key\\FILE";
|
214 |
+
|
215 |
+
if( defined( $version_define ) ) {
|
216 |
+
$products[ $key ]['version'] = constant( $version_define );
|
217 |
+
}
|
218 |
+
if( defined( $file_define ) ) {
|
219 |
+
$products[ $key ]['file'] = constant( $file_define );
|
220 |
+
}
|
221 |
+
|
222 |
+
if ( 'plugin' == $value['type'] ) {
|
223 |
+
|
224 |
+
$file_slug = str_replace( '_', '-', $key );
|
225 |
+
|
226 |
+
$products[ $key ]['installed'] = nextgenthemes_is_plugin_installed( "$file_slug/$file_slug.php" );
|
227 |
+
|
228 |
+
if ( ! empty( $products[ $key ]['file'] ) ) {
|
229 |
+
$plugin_basename = plugin_basename( $products[ $key ]['file'] );
|
230 |
+
$products[ $key ]['active'] = is_plugin_active( $plugin_basename );
|
231 |
+
}
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
return $products;
|
236 |
+
}
|
237 |
+
|
238 |
+
function nextgenthemes_is_plugin_installed( $plugin_basename ) {
|
239 |
+
|
240 |
+
$plugins = get_plugins();
|
241 |
+
|
242 |
+
if( array_key_exists( $plugin_basename, $plugins ) ) {
|
243 |
+
return true;
|
244 |
+
} else {
|
245 |
+
return false;
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Register the administration menu for this plugin into the WordPress Dashboard menu.
|
251 |
+
*
|
252 |
+
* @since 1.0.0
|
253 |
+
*/
|
254 |
+
function nextgenthemes_menus() {
|
255 |
+
|
256 |
+
$plugin_screen_hook_suffix = add_options_page(
|
257 |
+
__( 'ARVE Licenses', ARVE_SLUG ),
|
258 |
+
__( 'ARVE Licenses', ARVE_SLUG ),
|
259 |
+
'manage_options',
|
260 |
+
'nextgenthemes-licenses',
|
261 |
+
'nextgenthemes_licenses_page'
|
262 |
+
);
|
263 |
+
}
|
264 |
+
|
265 |
+
function nextgenthemes_register_settings() {
|
266 |
+
|
267 |
+
add_settings_section(
|
268 |
+
'keys', # id,
|
269 |
+
__( 'Licenses', ARVE_SLUG ), # title,
|
270 |
+
'__return_empty_string', # callback,
|
271 |
+
'nextgenthemes-licenses' # page
|
272 |
+
);
|
273 |
+
|
274 |
+
foreach ( nextgenthemes_get_products() as $product_slug => $product ) :
|
275 |
+
|
276 |
+
$option_basename = "nextgenthemes_{$product_slug}_key";
|
277 |
+
$option_keyname = $option_basename . '[key]';
|
278 |
+
|
279 |
+
add_settings_field(
|
280 |
+
$option_keyname, # id,
|
281 |
+
$product['name'], # title,
|
282 |
+
'nextgenthemes_key_callback', # callback,
|
283 |
+
'nextgenthemes-licenses', # page,
|
284 |
+
'keys', # section
|
285 |
+
array( # args
|
286 |
+
'product' => $product,
|
287 |
+
'label_for' => $option_keyname,
|
288 |
+
'option_basename' => $option_basename,
|
289 |
+
'attr' => array(
|
290 |
+
'type' => 'text',
|
291 |
+
'id' => $option_keyname,
|
292 |
+
'name' => $option_keyname,
|
293 |
+
'class' => 'arve-license-input',
|
294 |
+
'value' => nextgenthemes_get_defined_key( $product_slug ) ? __( 'is defined (wp-config.php?)', ARVE_SLUG ) : nextgenthemes_get_key( $product_slug, 'option_only' ),
|
295 |
+
)
|
296 |
+
)
|
297 |
+
);
|
298 |
+
|
299 |
+
register_setting(
|
300 |
+
'nextgenthemes', # option_group
|
301 |
+
$option_basename, # option_name
|
302 |
+
'nextgenthemes_validate_license' # validation callback
|
303 |
+
);
|
304 |
+
|
305 |
+
endforeach;
|
306 |
+
}
|
307 |
+
|
308 |
+
function nextgenthemes_key_callback( $args ) {
|
309 |
+
|
310 |
+
echo '<p>';
|
311 |
+
|
312 |
+
printf( '<input%s>', arve_attr( array(
|
313 |
+
'type' => 'hidden',
|
314 |
+
'id' => $args['option_basename'] . '[product]',
|
315 |
+
'name' => $args['option_basename'] . '[product]',
|
316 |
+
'value' => $args['product']['slug'],
|
317 |
+
) ) );
|
318 |
+
|
319 |
+
printf(
|
320 |
+
'<input%s%s>',
|
321 |
+
arve_attr( $args['attr'] ),
|
322 |
+
nextgenthemes_get_defined_key( $args['product']['slug'] ) ? ' disabled' : ''
|
323 |
+
);
|
324 |
+
|
325 |
+
$defined_key = nextgenthemes_get_defined_key( $args['product']['slug'] );
|
326 |
+
$key = nextgenthemes_get_key( $args['product']['slug'] );
|
327 |
+
|
328 |
+
if( $defined_key || ! empty( $key ) ) {
|
329 |
+
|
330 |
+
submit_button( __('Activate License', ARVE_SLUG ), 'primary', $args['option_basename'] . '[activate_key]', false );
|
331 |
+
submit_button( __('Deactivate License', ARVE_SLUG ), 'secondary', $args['option_basename'] . '[deactivate_key]', false );
|
332 |
+
submit_button( __('Check License', ARVE_SLUG ), 'secondary', $args['option_basename'] . '[check_key]', false );
|
333 |
+
}
|
334 |
+
echo '</p>';
|
335 |
+
|
336 |
+
echo '<p>';
|
337 |
+
echo __( 'License Status: ', ARVE_SLUG ) . nextgenthemes_get_key_status( $args['product']['slug'] );
|
338 |
+
echo '</p>';
|
339 |
+
|
340 |
+
if( $args['product']['installed'] && ! $args['product']['active'] ) {
|
341 |
+
printf( '<strong>%s</strong>', __( 'Plugin is installed but not activated', ARVE_SLUG ) );
|
342 |
+
} elseif( ! $args['product']['active'] ) {
|
343 |
+
printf(
|
344 |
+
'<a%s>%s</a>',
|
345 |
+
arve_attr( array(
|
346 |
+
'href' => $args['product']['url'],
|
347 |
+
'class' => 'button button-primary',
|
348 |
+
) ),
|
349 |
+
__( 'Not installed, check it out', ARVE_SLUG )
|
350 |
+
);
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
+
function nextgenthemes_validate_license( $input ) {
|
355 |
+
|
356 |
+
if( ! is_array( $input ) ) {
|
357 |
+
return sanitize_text_field( $input );
|
358 |
+
}
|
359 |
+
|
360 |
+
$product = $input['product'];
|
361 |
+
|
362 |
+
if ( $defined_key = nextgenthemes_get_defined_key( $product ) ) {
|
363 |
+
$option_key = $key = $defined_key;
|
364 |
+
} else {
|
365 |
+
$key = sanitize_text_field( $input['key'] );
|
366 |
+
$option_key = nextgenthemes_get_key( $product );
|
367 |
+
}
|
368 |
+
|
369 |
+
if( ( $key != $option_key ) || isset( $input['activate_key'] ) ) {
|
370 |
+
|
371 |
+
nextgenthemes_api_update_key_status( $product, $key, 'activate' );
|
372 |
+
|
373 |
+
} elseif ( isset( $input['deactivate_key'] ) ) {
|
374 |
+
|
375 |
+
nextgenthemes_api_update_key_status( $product, $key, 'deactivate' );
|
376 |
+
|
377 |
+
} elseif ( isset( $input['check_key'] ) ) {
|
378 |
+
|
379 |
+
nextgenthemes_api_update_key_status( $product, $key, 'check' );
|
380 |
+
}
|
381 |
+
|
382 |
+
return $key;
|
383 |
+
}
|
384 |
+
|
385 |
+
function nextgenthemes_get_key( $product, $option_only = false ) {
|
386 |
+
|
387 |
+
if( ! $option_only && $defined_key = nextgenthemes_get_defined_key( $product ) ) {
|
388 |
+
return $defined_key;
|
389 |
+
}
|
390 |
+
|
391 |
+
return get_option( "nextgenthemes_{$product}_key" );
|
392 |
+
}
|
393 |
+
function nextgenthemes_get_key_status( $product ) {
|
394 |
+
return get_option( "nextgenthemes_{$product}_key_status" );
|
395 |
+
}
|
396 |
+
function nextgenthemes_update_key_status( $product, $key ) {
|
397 |
+
update_option( "nextgenthemes_{$product}_key_status", $key );
|
398 |
+
}
|
399 |
+
function nextgenthemes_has_valid_key( $product ) {
|
400 |
+
return ( 'valid' === nextgenthemes_get_key_status( $product ) ) ? true : false;
|
401 |
+
}
|
402 |
+
|
403 |
+
function nextgenthemes_api_update_key_status( $product, $key, $action ) {
|
404 |
+
|
405 |
+
$products = nextgenthemes_get_products();
|
406 |
+
$key_status = nextgenthemes_api_action( $products[ $product ]['id'], $key, $action );
|
407 |
+
|
408 |
+
nextgenthemes_update_key_status( $product, $key_status );
|
409 |
+
}
|
410 |
+
|
411 |
+
function nextgenthemes_get_defined_key( $slug ) {
|
412 |
+
|
413 |
+
$constant_name = str_replace( '-', '_', strtoupper( $slug . '_KEY' ) );
|
414 |
+
|
415 |
+
if( defined( $constant_name ) && constant( $constant_name ) ) {
|
416 |
+
return constant( $constant_name );
|
417 |
+
} else {
|
418 |
+
return false;
|
419 |
+
}
|
420 |
+
}
|
421 |
+
|
422 |
+
function nextgenthemes_licenses_page() {
|
423 |
+
?>
|
424 |
+
<div class="wrap">
|
425 |
+
|
426 |
+
<h2><?php esc_html_e( get_admin_page_title() ); ?></h2>
|
427 |
+
|
428 |
+
<form method="post" action="options.php">
|
429 |
+
|
430 |
+
<?php do_settings_sections( 'nextgenthemes-licenses' ); ?>
|
431 |
+
<?php settings_fields( 'nextgenthemes' ); ?>
|
432 |
+
<?php submit_button( __( 'Save Changes' ), 'primary', 'submit', false ); ?>
|
433 |
+
</form>
|
434 |
+
|
435 |
+
</div>
|
436 |
+
<?php
|
437 |
+
}
|
438 |
+
|
439 |
+
function nextgenthemes_init_edd_updaters() {
|
440 |
+
|
441 |
+
$products = nextgenthemes_get_products();
|
442 |
+
|
443 |
+
foreach ( $products as $product ) {
|
444 |
+
|
445 |
+
if ( 'plugin' == $product['type'] && ! empty( $product['file'] ) ) {
|
446 |
+
nextgenthemes_init_plugin_updater( $product );
|
447 |
+
} elseif ( 'theme' == $product['type'] ) {
|
448 |
+
nextgenthemes_init_theme_updater( $product );
|
449 |
+
}
|
450 |
+
}
|
451 |
+
}
|
452 |
+
|
453 |
+
function nextgenthemes_init_plugin_updater( $product ) {
|
454 |
+
|
455 |
+
// setup the updater
|
456 |
+
new Nextgenthemes_Plugin_Updater(
|
457 |
+
apply_filters( 'nextgenthemes_api_url', 'https://nextgenthemes.com' ),
|
458 |
+
$product['file'],
|
459 |
+
array(
|
460 |
+
'version' => $product['version'],
|
461 |
+
'license' => nextgenthemes_get_key( $product['slug'] ),
|
462 |
+
#'item_name' => $product['name'],
|
463 |
+
'item_id' => $product['id'],
|
464 |
+
'author' => $product['author']
|
465 |
+
)
|
466 |
+
);
|
467 |
+
}
|
468 |
+
|
469 |
+
function nextgenthemes_init_theme_updater( $product ) {
|
470 |
+
|
471 |
+
new EDD_Theme_Updater(
|
472 |
+
array(
|
473 |
+
'remote_api_url' => 'https://nextgenthemes.com',
|
474 |
+
'version' => $product['version'],
|
475 |
+
'license' => nextgenthemes_get_key( $product['slug'] ),
|
476 |
+
'item_id' => $product['name'],
|
477 |
+
'author' => $product['id'],
|
478 |
+
'theme_slug' => $product['slug'],
|
479 |
+
'download_id' => $product['download_id'], // Optional, used for generating a license renewal link
|
480 |
+
#'renew_url' => $product['renew_link'], // Optional, allows for a custom license renewal link
|
481 |
+
),
|
482 |
+
array(
|
483 |
+
'theme-license' => __( 'Theme License', ARVE_SLUG ),
|
484 |
+
'enter-key' => __( 'Enter your theme license key.', ARVE_SLUG ),
|
485 |
+
'license-key' => __( 'License Key', ARVE_SLUG ),
|
486 |
+
'license-action' => __( 'License Action', ARVE_SLUG ),
|
487 |
+
'deactivate-license' => __( 'Deactivate License', ARVE_SLUG ),
|
488 |
+
'activate-license' => __( 'Activate License', ARVE_SLUG ),
|
489 |
+
'status-unknown' => __( 'License status is unknown.', ARVE_SLUG ),
|
490 |
+
'renew' => __( 'Renew?', ARVE_SLUG ),
|
491 |
+
'unlimited' => __( 'unlimited', ARVE_SLUG ),
|
492 |
+
'license-key-is-active' => __( 'License key is active.', ARVE_SLUG ),
|
493 |
+
'expires%s' => __( 'Expires %s.', ARVE_SLUG ),
|
494 |
+
'expires-never' => __( 'Lifetime License.', ARVE_SLUG ),
|
495 |
+
'%1$s/%2$-sites' => __( 'You have %1$s / %2$s sites activated.', ARVE_SLUG ),
|
496 |
+
'license-key-expired-%s' => __( 'License key expired %s.', ARVE_SLUG ),
|
497 |
+
'license-key-expired' => __( 'License key has expired.', ARVE_SLUG ),
|
498 |
+
'license-keys-do-not-match' => __( 'License keys do not match.', ARVE_SLUG ),
|
499 |
+
'license-is-inactive' => __( 'License is inactive.', ARVE_SLUG ),
|
500 |
+
'license-key-is-disabled' => __( 'License key is disabled.', ARVE_SLUG ),
|
501 |
+
'site-is-inactive' => __( 'Site is inactive.', ARVE_SLUG ),
|
502 |
+
'license-status-unknown' => __( 'License status is unknown.', ARVE_SLUG ),
|
503 |
+
'update-notice' => __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.", ARVE_SLUG ),
|
504 |
+
'update-available' => __('<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.', ARVE_SLUG ),
|
505 |
+
)
|
506 |
+
);
|
507 |
+
}
|
508 |
+
|
509 |
+
function nextgenthemes_api_action( $item_id, $key, $action ) {
|
510 |
+
|
511 |
+
if ( ! in_array( $action, array( 'activate', 'deactivate', 'check' ) ) ) {
|
512 |
+
wp_die( 'invalid action' );
|
513 |
+
}
|
514 |
+
|
515 |
+
// data to send in our API request
|
516 |
+
$api_params = array(
|
517 |
+
'edd_action' => $action . '_license',
|
518 |
+
'license' => sanitize_text_field( $key ),
|
519 |
+
'item_id' => $item_id,
|
520 |
+
'url' => home_url()
|
521 |
+
);
|
522 |
+
|
523 |
+
// Call the custom API.
|
524 |
+
$response = wp_remote_post(
|
525 |
+
'https://nextgenthemes.com',
|
526 |
+
array( 'timeout' => 15, 'sslverify' => true, 'body' => $api_params )
|
527 |
+
);
|
528 |
+
|
529 |
+
// make sure the response came back okay
|
530 |
+
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
531 |
+
|
532 |
+
if ( is_wp_error( $response ) ) {
|
533 |
+
$message = $response->get_error_message();
|
534 |
+
} else {
|
535 |
+
$message = __( 'An error occurred, please try again.', ARVE_SLUG );
|
536 |
+
}
|
537 |
+
|
538 |
+
} else {
|
539 |
+
|
540 |
+
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
541 |
+
|
542 |
+
if ( false === $license_data->success ) {
|
543 |
+
|
544 |
+
switch( $license_data->error ) {
|
545 |
+
|
546 |
+
case 'expired' :
|
547 |
+
|
548 |
+
$message = sprintf(
|
549 |
+
__( 'Your license key expired on %s.' ),
|
550 |
+
date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) )
|
551 |
+
);
|
552 |
+
break;
|
553 |
+
|
554 |
+
case 'revoked' :
|
555 |
+
|
556 |
+
$message = __( 'Your license key has been disabled.', ARVE_SLUG );
|
557 |
+
break;
|
558 |
+
|
559 |
+
case 'missing' :
|
560 |
+
|
561 |
+
$message = __( 'Invalid license.', ARVE_SLUG );
|
562 |
+
break;
|
563 |
+
|
564 |
+
case 'invalid' :
|
565 |
+
case 'site_inactive' :
|
566 |
+
|
567 |
+
$message = __( 'Your license is not active for this URL.', ARVE_SLUG );
|
568 |
+
break;
|
569 |
+
|
570 |
+
case 'item_name_mismatch' :
|
571 |
+
|
572 |
+
$message = sprintf( __( 'This appears to be an invalid license key for %s.' ), ARVE_SLUG );
|
573 |
+
break;
|
574 |
+
|
575 |
+
case 'no_activations_left':
|
576 |
+
|
577 |
+
$message = __( 'Your license key has reached its activation limit.', ARVE_SLUG );
|
578 |
+
break;
|
579 |
+
|
580 |
+
default :
|
581 |
+
|
582 |
+
$message = __( 'An error occurred, please try again.', ARVE_SLUG );
|
583 |
+
break;
|
584 |
+
}
|
585 |
+
}
|
586 |
+
}
|
587 |
+
|
588 |
+
if ( empty( $message ) ) {
|
589 |
+
|
590 |
+
if ( empty( $license_data->license ) ) {
|
591 |
+
|
592 |
+
$textarea_dump = arve_textarea_dump( $response );
|
593 |
+
|
594 |
+
$message = sprintf(
|
595 |
+
__( 'Error. Please report the following:<br> %s', ARVE_SLUG ),
|
596 |
+
$textarea_dump
|
597 |
+
);
|
598 |
+
} else {
|
599 |
+
$message = $license_data->license;
|
600 |
+
}
|
601 |
+
}
|
602 |
+
|
603 |
+
return $message;
|
604 |
+
}
|
605 |
+
|
606 |
+
function arve_dump( $var ) {
|
607 |
+
ob_start();
|
608 |
+
var_dump( $var );
|
609 |
+
return ob_get_clean();
|
610 |
+
}
|
611 |
+
|
612 |
+
function arve_textarea_dump( $var ) {
|
613 |
+
return sprintf( '<textarea style="width: 100%; height: 70vh;">%s</textarea>', esc_textarea( arve_dump( $var ) ) );
|
614 |
+
}
|
admin/html-debug-info.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<textarea style="font-family: monospace; width: 100%" rows="25">
|
2 |
+
Version of the browser you see the issue in (for example Firefox 52, do not say latest):
|
3 |
+
|
4 |
+
Link to test page on live site with the issue (do not change after posting):
|
5 |
+
|
6 |
+
Shortcode(s) or URL(s) you used for embedding and have problems with:
|
7 |
+
|
8 |
+
Detailed Description of the issue:
|
9 |
+
|
10 |
+
What you are expecting and what you are seeing instead?
|
11 |
+
|
12 |
+
ARVE Version: <?php echo $arve_version . "\n"; ?>
|
13 |
+
ARVE-Pro Version: <?php echo $arve_pro_version . "\n"; ?>
|
14 |
+
WordPress Version: <?php echo $wp_version . "\n"; ?>
|
15 |
+
PHP Version: <?php echo phpversion() . "\n"; ?>
|
16 |
+
|
17 |
+
ACTIVE PLUGINS:
|
18 |
+
<?php
|
19 |
+
$plugins = get_plugins();
|
20 |
+
$active_plugins = get_option( 'active_plugins', array() );
|
21 |
+
|
22 |
+
foreach ( $plugins as $plugin_path => $plugin ) {
|
23 |
+
// If the plugin isn't active, don't show it.
|
24 |
+
if ( ! in_array( $plugin_path, $active_plugins ) ) {
|
25 |
+
continue;
|
26 |
+
}
|
27 |
+
|
28 |
+
echo $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
|
29 |
+
}
|
30 |
+
|
31 |
+
if ( is_multisite() ) :
|
32 |
+
?>
|
33 |
+
|
34 |
+
NETWORK ACTIVE PLUGINS:
|
35 |
+
<?php
|
36 |
+
$plugins = wp_get_active_network_plugins();
|
37 |
+
$active_plugins = get_site_option( 'active_sitewide_plugins', array() );
|
38 |
+
|
39 |
+
foreach ( $plugins as $plugin_path ) {
|
40 |
+
$plugin_base = plugin_basename( $plugin_path );
|
41 |
+
|
42 |
+
// If the plugin isn't active, don't show it.
|
43 |
+
if ( ! array_key_exists( $plugin_base, $active_plugins ) ) {
|
44 |
+
continue;
|
45 |
+
}
|
46 |
+
|
47 |
+
$plugin = get_plugin_data( $plugin_path );
|
48 |
+
|
49 |
+
echo $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
|
50 |
+
}
|
51 |
+
|
52 |
+
endif; ?>
|
53 |
+
|
54 |
+
ARVE OPTIONS:
|
55 |
+
<?php var_dump( get_option( 'arve_options_main' ) ); ?>
|
56 |
+
<?php var_dump( get_option( 'arve_options_params' ) ); ?>
|
57 |
+
<?php var_dump( get_option( 'arve_options_shortcodes' ) ); ?>
|
58 |
+
<?php if( is_plugin_active( 'arve-pro/arve-pro.php' ) ) : ?>
|
59 |
+
ARVE PRO OPTIONS:
|
60 |
+
<?php $pro_options = get_option( 'arve_options_pro' );
|
61 |
+
unset( $pro_options['key'] );
|
62 |
+
var_dump( $pro_options ); ?>
|
63 |
+
<?php endif; ?>
|
64 |
+
</textarea>
|
admin/html-settings-page.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Represents the view for the administration dashboard.
|
4 |
+
*
|
5 |
+
* This includes the header, options, and other information that should provide
|
6 |
+
* The User Interface to the end user.
|
7 |
+
*
|
8 |
+
* @package Advanced_Responsive_Video_Embedder
|
9 |
+
* @author Nicolas Jonas
|
10 |
+
* @license GPL-3.0+
|
11 |
+
* @link http://nextgenthemes.com
|
12 |
+
* @copyright 2013 Nicolas Jonas
|
13 |
+
*/
|
14 |
+
|
15 |
+
$options = arve_get_options();
|
16 |
+
?>
|
17 |
+
|
18 |
+
<div class="wrap arve-options-wrap">
|
19 |
+
|
20 |
+
<?php if ( arve_display_pro_ad() ) : ?>
|
21 |
+
|
22 |
+
<div class="arve-settings-page-ad notice is-dismissible updated">
|
23 |
+
|
24 |
+
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
|
25 |
+
|
26 |
+
<div class="arve-corner-spacer"></div>
|
27 |
+
|
28 |
+
<h3>Please rate</h3>
|
29 |
+
It would really help to get a <a href="https://wordpress.org/support/plugin/advanced-responsive-video-embedder/reviews/#new-post">5 star rating from you.</a>
|
30 |
+
|
31 |
+
<p>This plugin is financed by purchases of the <a href="https://nextgenthemes.com/plugins/arve-pro/">Pro Addon</a>. The development and support of this plugins has become a job for me so I hope you understand that I can not make all features gratis and that you <a href="https://nextgenthemes.com/plugins/arve-pro/">purchase it</a> to get extra features and support the development.</p>
|
32 |
+
|
33 |
+
<h3><a href="https://nextgenthemes.com/plugins/arve-pro/">Pro Addon</a></h3>
|
34 |
+
|
35 |
+
<ul>
|
36 |
+
<li><strong>Disable links in embeds (killer feature!)</strong><br>
|
37 |
+
For example: Clicking on a title in a YouTube embed will not open a new popup/tab/window. <strong>Prevent video hosts to lead your visitors away from your site!</strong> Note this also breaks sharing functionality and is not possible when the provider requires flash. Try it on <a href="https://nextgenthemes.com/plugins/arve-pro/">this page</a>. Right click on links still works.</li>
|
38 |
+
<li><strong>Lazyload mode</strong><br>
|
39 |
+
Make your site load <strong>faster</strong> by loading only a image instead of the entire video player on pageload. </li>
|
40 |
+
<li><strong>Lazyload -> Lightbox</strong><br>
|
41 |
+
Shows the Video in a Lightbox after clicking a preview image</li>
|
42 |
+
<li><strong>Link -> Lightbox</strong><br>
|
43 |
+
Use simple links as triggers for lightboxed videos</li>
|
44 |
+
<li>Automatic or custom thumbnail images</li>
|
45 |
+
<li>Automatic or custom titles on top of your thumbnails</li>
|
46 |
+
<li>'Expand on click' feature</li>
|
47 |
+
<li>3 hover styles</li>
|
48 |
+
<li>2 play icon styles to choose from</li>
|
49 |
+
<li>Responsive thumbnails using cutting edge HTML5 technology</li>
|
50 |
+
<li><strong>Feel good about yourself</strong><br>
|
51 |
+
for supporting my 5+ years work on this plugin. Tons of hours, weekends … always worked on improving it.</li>
|
52 |
+
<li>Show the latest video of a YouTube channel by using the channel URL (updated/cached hourly)</li>
|
53 |
+
<li><strong><a href="https://nextgenthemes.com/plugins/arve-pro/">Get the ARVE Pro Addon</a></strong></li>
|
54 |
+
</ul>
|
55 |
+
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<?php endif; ?>
|
59 |
+
|
60 |
+
<h2><?php esc_html_e( get_admin_page_title() ); ?></h2>
|
61 |
+
|
62 |
+
<h2 class="nav-tab-wrapper arve-settings-tabs"></h2>
|
63 |
+
|
64 |
+
<form class="arve-options-form" method="post" action="options.php">
|
65 |
+
|
66 |
+
<?php do_settings_sections( ARVE_SLUG ); ?>
|
67 |
+
<?php settings_fields( 'arve-settings-group' ); ?>
|
68 |
+
|
69 |
+
<input type="hidden" id="arve_options_main[last_settings_tab]" name="arve_options_main[last_settings_tab]" value="<?php esc_attr_e( $options['last_settings_tab'] ); ?>">
|
70 |
+
|
71 |
+
</form>
|
72 |
+
|
73 |
+
</div>
|
admin/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
admin/pro-ad.html
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<ul class="arve-list-small">
|
2 |
+
<li><strong>Disable links in embeds</strong><br>
|
3 |
+
For example: Clicking on a title in a YouTube embed will not open a new popup/tab/window. <strong>Prevent video hosts to lead your visitors away from your site!</strong> Note this also breaks sharing functionality and is not possible when the provider requires flash.</li>
|
4 |
+
<li><strong>Lazyload mode</strong><br>
|
5 |
+
Make your site load <strong>faster</strong> by loading only a image instead of the entire video player on pageload. </li>
|
6 |
+
<li><strong>Lazyload -> Lightbox</strong><br>
|
7 |
+
Shows the Video in a Lightbox after clicking a preview image</li>
|
8 |
+
<li><strong>Link -> Lightbox</strong><br>
|
9 |
+
Use simple links as triggers for lightboxed videos</li>
|
10 |
+
<li>Automatic or custom titles and thumbnails images</li>
|
11 |
+
<li>'Expand on click' feature</li>
|
12 |
+
<li>Show the latest video of a YouTube channel by using the channel URL (updated/cached hourly)</li>
|
13 |
+
<li>And more, for a <strong><a href="https://nextgenthemes.com/plugins/arve-pro/">complete feature list</a></strong> and purchase please visit the <strong><a href="https://nextgenthemes.com/plugins/arve-pro/">official site</a></strong></li>
|
14 |
+
</ul>
|
admin/product-images/arve.svg
ADDED
@@ -0,0 +1,1230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
|
4 |
+
<svg
|
5 |
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
6 |
+
xmlns:cc="http://creativecommons.org/ns#"
|
7 |
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8 |
+
xmlns:svg="http://www.w3.org/2000/svg"
|
9 |
+
xmlns="http://www.w3.org/2000/svg"
|
10 |
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
11 |
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
12 |
+
version="1.1"
|
13 |
+
id="Layer_1"
|
14 |
+
x="0px"
|
15 |
+
y="0px"
|
16 |
+
width="485.41898"
|
17 |
+
height="94.260002"
|
18 |
+
viewBox="0 0 485.41898 94.260002"
|
19 |
+
enable-background="new 0 0 1600 1200"
|
20 |
+
xml:space="preserve"
|
21 |
+
sodipodi:docname="arve.svg"
|
22 |
+
inkscape:version="0.92.1 unknown"><metadata
|
23 |
+
id="metadata136"><rdf:RDF><cc:Work
|
24 |
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
25 |
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
26 |
+
id="defs134"><filter
|
27 |
+
style="color-interpolation-filters:sRGB;"
|
28 |
+
inkscape:label="Colorize"
|
29 |
+
id="filter32776"><feComposite
|
30 |
+
in2="SourceGraphic"
|
31 |
+
operator="arithmetic"
|
32 |
+
k1="0"
|
33 |
+
k2="1.92513"
|
34 |
+
result="composite1"
|
35 |
+
id="feComposite32762" /><feColorMatrix
|
36 |
+
in="composite1"
|
37 |
+
values="1"
|
38 |
+
type="saturate"
|
39 |
+
result="colormatrix1"
|
40 |
+
id="feColorMatrix32764" /><feFlood
|
41 |
+
flood-opacity="1"
|
42 |
+
flood-color="rgb(255,255,255)"
|
43 |
+
result="flood1"
|
44 |
+
id="feFlood32766" /><feBlend
|
45 |
+
in="flood1"
|
46 |
+
in2="colormatrix1"
|
47 |
+
mode="normal"
|
48 |
+
result="blend1"
|
49 |
+
id="feBlend32768" /><feBlend
|
50 |
+
in2="blend1"
|
51 |
+
mode="screen"
|
52 |
+
result="blend2"
|
53 |
+
id="feBlend32770" /><feColorMatrix
|
54 |
+
in="blend2"
|
55 |
+
values="1"
|
56 |
+
type="saturate"
|
57 |
+
result="colormatrix2"
|
58 |
+
id="feColorMatrix32772" /><feComposite
|
59 |
+
in="colormatrix2"
|
60 |
+
in2="SourceGraphic"
|
61 |
+
operator="in"
|
62 |
+
k2="1"
|
63 |
+
result="composite2"
|
64 |
+
id="feComposite32774" /></filter><filter
|
65 |
+
style="color-interpolation-filters:sRGB;"
|
66 |
+
inkscape:label="Colorize"
|
67 |
+
id="filter32792"><feComposite
|
68 |
+
in2="SourceGraphic"
|
69 |
+
operator="arithmetic"
|
70 |
+
k1="0"
|
71 |
+
k2="1.92513"
|
72 |
+
result="composite1"
|
73 |
+
id="feComposite32778" /><feColorMatrix
|
74 |
+
in="composite1"
|
75 |
+
values="1"
|
76 |
+
type="saturate"
|
77 |
+
result="colormatrix1"
|
78 |
+
id="feColorMatrix32780" /><feFlood
|
79 |
+
flood-opacity="1"
|
80 |
+
flood-color="rgb(255,255,255)"
|
81 |
+
result="flood1"
|
82 |
+
id="feFlood32782" /><feBlend
|
83 |
+
in="flood1"
|
84 |
+
in2="colormatrix1"
|
85 |
+
mode="normal"
|
86 |
+
result="blend1"
|
87 |
+
id="feBlend32784" /><feBlend
|
88 |
+
in2="blend1"
|
89 |
+
mode="screen"
|
90 |
+
result="blend2"
|
91 |
+
id="feBlend32786" /><feColorMatrix
|
92 |
+
in="blend2"
|
93 |
+
values="1"
|
94 |
+
type="saturate"
|
95 |
+
result="colormatrix2"
|
96 |
+
id="feColorMatrix32788" /><feComposite
|
97 |
+
in="colormatrix2"
|
98 |
+
in2="SourceGraphic"
|
99 |
+
operator="in"
|
100 |
+
k2="1"
|
101 |
+
result="composite2"
|
102 |
+
id="feComposite32790" /></filter><filter
|
103 |
+
style="color-interpolation-filters:sRGB;"
|
104 |
+
inkscape:label="Colorize"
|
105 |
+
id="filter32808"><feComposite
|
106 |
+
in2="SourceGraphic"
|
107 |
+
operator="arithmetic"
|
108 |
+
k1="0"
|
109 |
+
k2="1.92513"
|
110 |
+
result="composite1"
|
111 |
+
id="feComposite32794" /><feColorMatrix
|
112 |
+
in="composite1"
|
113 |
+
values="1"
|
114 |
+
type="saturate"
|
115 |
+
result="colormatrix1"
|
116 |
+
id="feColorMatrix32796" /><feFlood
|
117 |
+
flood-opacity="1"
|
118 |
+
flood-color="rgb(255,255,255)"
|
119 |
+
result="flood1"
|
120 |
+
id="feFlood32798" /><feBlend
|
121 |
+
in="flood1"
|
122 |
+
in2="colormatrix1"
|
123 |
+
mode="normal"
|
124 |
+
result="blend1"
|
125 |
+
id="feBlend32800" /><feBlend
|
126 |
+
in2="blend1"
|
127 |
+
mode="screen"
|
128 |
+
result="blend2"
|
129 |
+
id="feBlend32802" /><feColorMatrix
|
130 |
+
in="blend2"
|
131 |
+
values="1"
|
132 |
+
type="saturate"
|
133 |
+
result="colormatrix2"
|
134 |
+
id="feColorMatrix32804" /><feComposite
|
135 |
+
in="colormatrix2"
|
136 |
+
in2="SourceGraphic"
|
137 |
+
operator="in"
|
138 |
+
k2="1"
|
139 |
+
result="composite2"
|
140 |
+
id="feComposite32806" /></filter><filter
|
141 |
+
style="color-interpolation-filters:sRGB;"
|
142 |
+
inkscape:label="Colorize"
|
143 |
+
id="filter32824"><feComposite
|
144 |
+
in2="SourceGraphic"
|
145 |
+
operator="arithmetic"
|
146 |
+
k1="0"
|
147 |
+
k2="1.92513"
|
148 |
+
result="composite1"
|
149 |
+
id="feComposite32810" /><feColorMatrix
|
150 |
+
in="composite1"
|
151 |
+
values="1"
|
152 |
+
type="saturate"
|
153 |
+
result="colormatrix1"
|
154 |
+
id="feColorMatrix32812" /><feFlood
|
155 |
+
flood-opacity="1"
|
156 |
+
flood-color="rgb(255,255,255)"
|
157 |
+
result="flood1"
|
158 |
+
id="feFlood32814" /><feBlend
|
159 |
+
in="flood1"
|
160 |
+
in2="colormatrix1"
|
161 |
+
mode="normal"
|
162 |
+
result="blend1"
|
163 |
+
id="feBlend32816" /><feBlend
|
164 |
+
in2="blend1"
|
165 |
+
mode="screen"
|
166 |
+
result="blend2"
|
167 |
+
id="feBlend32818" /><feColorMatrix
|
168 |
+
in="blend2"
|
169 |
+
values="1"
|
170 |
+
type="saturate"
|
171 |
+
result="colormatrix2"
|
172 |
+
id="feColorMatrix32820" /><feComposite
|
173 |
+
in="colormatrix2"
|
174 |
+
in2="SourceGraphic"
|
175 |
+
operator="in"
|
176 |
+
k2="1"
|
177 |
+
result="composite2"
|
178 |
+
id="feComposite32822" /></filter><filter
|
179 |
+
style="color-interpolation-filters:sRGB;"
|
180 |
+
inkscape:label="Colorize"
|
181 |
+
id="filter32840"><feComposite
|
182 |
+
in2="SourceGraphic"
|
183 |
+
operator="arithmetic"
|
184 |
+
k1="0"
|
185 |
+
k2="1.92513"
|
186 |
+
result="composite1"
|
187 |
+
id="feComposite32826" /><feColorMatrix
|
188 |
+
in="composite1"
|
189 |
+
values="1"
|
190 |
+
type="saturate"
|
191 |
+
result="colormatrix1"
|
192 |
+
id="feColorMatrix32828" /><feFlood
|
193 |
+
flood-opacity="1"
|
194 |
+
flood-color="rgb(255,255,255)"
|
195 |
+
result="flood1"
|
196 |
+
id="feFlood32830" /><feBlend
|
197 |
+
in="flood1"
|
198 |
+
in2="colormatrix1"
|
199 |
+
mode="normal"
|
200 |
+
result="blend1"
|
201 |
+
id="feBlend32832" /><feBlend
|
202 |
+
in2="blend1"
|
203 |
+
mode="screen"
|
204 |
+
result="blend2"
|
205 |
+
id="feBlend32834" /><feColorMatrix
|
206 |
+
in="blend2"
|
207 |
+
values="1"
|
208 |
+
type="saturate"
|
209 |
+
result="colormatrix2"
|
210 |
+
id="feColorMatrix32836" /><feComposite
|
211 |
+
in="colormatrix2"
|
212 |
+
in2="SourceGraphic"
|
213 |
+
operator="in"
|
214 |
+
k2="1"
|
215 |
+
result="composite2"
|
216 |
+
id="feComposite32838" /></filter><filter
|
217 |
+
style="color-interpolation-filters:sRGB;"
|
218 |
+
inkscape:label="Colorize"
|
219 |
+
id="filter32856"><feComposite
|
220 |
+
in2="SourceGraphic"
|
221 |
+
operator="arithmetic"
|
222 |
+
k1="0"
|
223 |
+
k2="1.92513"
|
224 |
+
result="composite1"
|
225 |
+
id="feComposite32842" /><feColorMatrix
|
226 |
+
in="composite1"
|
227 |
+
values="1"
|
228 |
+
type="saturate"
|
229 |
+
result="colormatrix1"
|
230 |
+
id="feColorMatrix32844" /><feFlood
|
231 |
+
flood-opacity="1"
|
232 |
+
flood-color="rgb(255,255,255)"
|
233 |
+
result="flood1"
|
234 |
+
id="feFlood32846" /><feBlend
|
235 |
+
in="flood1"
|
236 |
+
in2="colormatrix1"
|
237 |
+
mode="normal"
|
238 |
+
result="blend1"
|
239 |
+
id="feBlend32848" /><feBlend
|
240 |
+
in2="blend1"
|
241 |
+
mode="screen"
|
242 |
+
result="blend2"
|
243 |
+
id="feBlend32850" /><feColorMatrix
|
244 |
+
in="blend2"
|
245 |
+
values="1"
|
246 |
+
type="saturate"
|
247 |
+
result="colormatrix2"
|
248 |
+
id="feColorMatrix32852" /><feComposite
|
249 |
+
in="colormatrix2"
|
250 |
+
in2="SourceGraphic"
|
251 |
+
operator="in"
|
252 |
+
k2="1"
|
253 |
+
result="composite2"
|
254 |
+
id="feComposite32854" /></filter><filter
|
255 |
+
style="color-interpolation-filters:sRGB;"
|
256 |
+
inkscape:label="Colorize"
|
257 |
+
id="filter32872"><feComposite
|
258 |
+
in2="SourceGraphic"
|
259 |
+
operator="arithmetic"
|
260 |
+
k1="0"
|
261 |
+
k2="1.92513"
|
262 |
+
result="composite1"
|
263 |
+
id="feComposite32858" /><feColorMatrix
|
264 |
+
in="composite1"
|
265 |
+
values="1"
|
266 |
+
type="saturate"
|
267 |
+
result="colormatrix1"
|
268 |
+
id="feColorMatrix32860" /><feFlood
|
269 |
+
flood-opacity="1"
|
270 |
+
flood-color="rgb(255,255,255)"
|
271 |
+
result="flood1"
|
272 |
+
id="feFlood32862" /><feBlend
|
273 |
+
in="flood1"
|
274 |
+
in2="colormatrix1"
|
275 |
+
mode="normal"
|
276 |
+
result="blend1"
|
277 |
+
id="feBlend32864" /><feBlend
|
278 |
+
in2="blend1"
|
279 |
+
mode="screen"
|
280 |
+
result="blend2"
|
281 |
+
id="feBlend32866" /><feColorMatrix
|
282 |
+
in="blend2"
|
283 |
+
values="1"
|
284 |
+
type="saturate"
|
285 |
+
result="colormatrix2"
|
286 |
+
id="feColorMatrix32868" /><feComposite
|
287 |
+
in="colormatrix2"
|
288 |
+
in2="SourceGraphic"
|
289 |
+
operator="in"
|
290 |
+
k2="1"
|
291 |
+
result="composite2"
|
292 |
+
id="feComposite32870" /></filter><filter
|
293 |
+
style="color-interpolation-filters:sRGB;"
|
294 |
+
inkscape:label="Colorize"
|
295 |
+
id="filter32888"><feComposite
|
296 |
+
in2="SourceGraphic"
|
297 |
+
operator="arithmetic"
|
298 |
+
k1="0"
|
299 |
+
k2="1.92513"
|
300 |
+
result="composite1"
|
301 |
+
id="feComposite32874" /><feColorMatrix
|
302 |
+
in="composite1"
|
303 |
+
values="1"
|
304 |
+
type="saturate"
|
305 |
+
result="colormatrix1"
|
306 |
+
id="feColorMatrix32876" /><feFlood
|
307 |
+
flood-opacity="1"
|
308 |
+
flood-color="rgb(255,255,255)"
|
309 |
+
result="flood1"
|
310 |
+
id="feFlood32878" /><feBlend
|
311 |
+
in="flood1"
|
312 |
+
in2="colormatrix1"
|
313 |
+
mode="normal"
|
314 |
+
result="blend1"
|
315 |
+
id="feBlend32880" /><feBlend
|
316 |
+
in2="blend1"
|
317 |
+
mode="screen"
|
318 |
+
result="blend2"
|
319 |
+
id="feBlend32882" /><feColorMatrix
|
320 |
+
in="blend2"
|
321 |
+
values="1"
|
322 |
+
type="saturate"
|
323 |
+
result="colormatrix2"
|
324 |
+
id="feColorMatrix32884" /><feComposite
|
325 |
+
in="colormatrix2"
|
326 |
+
in2="SourceGraphic"
|
327 |
+
operator="in"
|
328 |
+
k2="1"
|
329 |
+
result="composite2"
|
330 |
+
id="feComposite32886" /></filter><filter
|
331 |
+
style="color-interpolation-filters:sRGB;"
|
332 |
+
inkscape:label="Colorize"
|
333 |
+
id="filter32904"><feComposite
|
334 |
+
in2="SourceGraphic"
|
335 |
+
operator="arithmetic"
|
336 |
+
k1="0"
|
337 |
+
k2="1.92513"
|
338 |
+
result="composite1"
|
339 |
+
id="feComposite32890" /><feColorMatrix
|
340 |
+
in="composite1"
|
341 |
+
values="1"
|
342 |
+
type="saturate"
|
343 |
+
result="colormatrix1"
|
344 |
+
id="feColorMatrix32892" /><feFlood
|
345 |
+
flood-opacity="1"
|
346 |
+
flood-color="rgb(255,255,255)"
|
347 |
+
result="flood1"
|
348 |
+
id="feFlood32894" /><feBlend
|
349 |
+
in="flood1"
|
350 |
+
in2="colormatrix1"
|
351 |
+
mode="normal"
|
352 |
+
result="blend1"
|
353 |
+
id="feBlend32896" /><feBlend
|
354 |
+
in2="blend1"
|
355 |
+
mode="screen"
|
356 |
+
result="blend2"
|
357 |
+
id="feBlend32898" /><feColorMatrix
|
358 |
+
in="blend2"
|
359 |
+
values="1"
|
360 |
+
type="saturate"
|
361 |
+
result="colormatrix2"
|
362 |
+
id="feColorMatrix32900" /><feComposite
|
363 |
+
in="colormatrix2"
|
364 |
+
in2="SourceGraphic"
|
365 |
+
operator="in"
|
366 |
+
k2="1"
|
367 |
+
result="composite2"
|
368 |
+
id="feComposite32902" /></filter><filter
|
369 |
+
style="color-interpolation-filters:sRGB;"
|
370 |
+
inkscape:label="Colorize"
|
371 |
+
id="filter32920"><feComposite
|
372 |
+
in2="SourceGraphic"
|
373 |
+
operator="arithmetic"
|
374 |
+
k1="0"
|
375 |
+
k2="1.92513"
|
376 |
+
result="composite1"
|
377 |
+
id="feComposite32906" /><feColorMatrix
|
378 |
+
in="composite1"
|
379 |
+
values="1"
|
380 |
+
type="saturate"
|
381 |
+
result="colormatrix1"
|
382 |
+
id="feColorMatrix32908" /><feFlood
|
383 |
+
flood-opacity="1"
|
384 |
+
flood-color="rgb(255,255,255)"
|
385 |
+
result="flood1"
|
386 |
+
id="feFlood32910" /><feBlend
|
387 |
+
in="flood1"
|
388 |
+
in2="colormatrix1"
|
389 |
+
mode="normal"
|
390 |
+
result="blend1"
|
391 |
+
id="feBlend32912" /><feBlend
|
392 |
+
in2="blend1"
|
393 |
+
mode="screen"
|
394 |
+
result="blend2"
|
395 |
+
id="feBlend32914" /><feColorMatrix
|
396 |
+
in="blend2"
|
397 |
+
values="1"
|
398 |
+
type="saturate"
|
399 |
+
result="colormatrix2"
|
400 |
+
id="feColorMatrix32916" /><feComposite
|
401 |
+
in="colormatrix2"
|
402 |
+
in2="SourceGraphic"
|
403 |
+
operator="in"
|
404 |
+
k2="1"
|
405 |
+
result="composite2"
|
406 |
+
id="feComposite32918" /></filter><filter
|
407 |
+
style="color-interpolation-filters:sRGB;"
|
408 |
+
inkscape:label="Colorize"
|
409 |
+
id="filter32936"><feComposite
|
410 |
+
in2="SourceGraphic"
|
411 |
+
operator="arithmetic"
|
412 |
+
k1="0"
|
413 |
+
k2="1.92513"
|
414 |
+
result="composite1"
|
415 |
+
id="feComposite32922" /><feColorMatrix
|
416 |
+
in="composite1"
|
417 |
+
values="1"
|
418 |
+
type="saturate"
|
419 |
+
result="colormatrix1"
|
420 |
+
id="feColorMatrix32924" /><feFlood
|
421 |
+
flood-opacity="1"
|
422 |
+
flood-color="rgb(255,255,255)"
|
423 |
+
result="flood1"
|
424 |
+
id="feFlood32926" /><feBlend
|
425 |
+
in="flood1"
|
426 |
+
in2="colormatrix1"
|
427 |
+
mode="normal"
|
428 |
+
result="blend1"
|
429 |
+
id="feBlend32928" /><feBlend
|
430 |
+
in2="blend1"
|
431 |
+
mode="screen"
|
432 |
+
result="blend2"
|
433 |
+
id="feBlend32930" /><feColorMatrix
|
434 |
+
in="blend2"
|
435 |
+
values="1"
|
436 |
+
type="saturate"
|
437 |
+
result="colormatrix2"
|
438 |
+
id="feColorMatrix32932" /><feComposite
|
439 |
+
in="colormatrix2"
|
440 |
+
in2="SourceGraphic"
|
441 |
+
operator="in"
|
442 |
+
k2="1"
|
443 |
+
result="composite2"
|
444 |
+
id="feComposite32934" /></filter><filter
|
445 |
+
style="color-interpolation-filters:sRGB;"
|
446 |
+
inkscape:label="Colorize"
|
447 |
+
id="filter32952"><feComposite
|
448 |
+
in2="SourceGraphic"
|
449 |
+
operator="arithmetic"
|
450 |
+
k1="0"
|
451 |
+
k2="1.92513"
|
452 |
+
result="composite1"
|
453 |
+
id="feComposite32938" /><feColorMatrix
|
454 |
+
in="composite1"
|
455 |
+
values="1"
|
456 |
+
type="saturate"
|
457 |
+
result="colormatrix1"
|
458 |
+
id="feColorMatrix32940" /><feFlood
|
459 |
+
flood-opacity="1"
|
460 |
+
flood-color="rgb(255,255,255)"
|
461 |
+
result="flood1"
|
462 |
+
id="feFlood32942" /><feBlend
|
463 |
+
in="flood1"
|
464 |
+
in2="colormatrix1"
|
465 |
+
mode="normal"
|
466 |
+
result="blend1"
|
467 |
+
id="feBlend32944" /><feBlend
|
468 |
+
in2="blend1"
|
469 |
+
mode="screen"
|
470 |
+
result="blend2"
|
471 |
+
id="feBlend32946" /><feColorMatrix
|
472 |
+
in="blend2"
|
473 |
+
values="1"
|
474 |
+
type="saturate"
|
475 |
+
result="colormatrix2"
|
476 |
+
id="feColorMatrix32948" /><feComposite
|
477 |
+
in="colormatrix2"
|
478 |
+
in2="SourceGraphic"
|
479 |
+
operator="in"
|
480 |
+
k2="1"
|
481 |
+
result="composite2"
|
482 |
+
id="feComposite32950" /></filter><filter
|
483 |
+
style="color-interpolation-filters:sRGB;"
|
484 |
+
inkscape:label="Colorize"
|
485 |
+
id="filter32968"><feComposite
|
486 |
+
in2="SourceGraphic"
|
487 |
+
operator="arithmetic"
|
488 |
+
k1="0"
|
489 |
+
k2="1.92513"
|
490 |
+
result="composite1"
|
491 |
+
id="feComposite32954" /><feColorMatrix
|
492 |
+
in="composite1"
|
493 |
+
values="1"
|
494 |
+
type="saturate"
|
495 |
+
result="colormatrix1"
|
496 |
+
id="feColorMatrix32956" /><feFlood
|
497 |
+
flood-opacity="1"
|
498 |
+
flood-color="rgb(255,255,255)"
|
499 |
+
result="flood1"
|
500 |
+
id="feFlood32958" /><feBlend
|
501 |
+
in="flood1"
|
502 |
+
in2="colormatrix1"
|
503 |
+
mode="normal"
|
504 |
+
result="blend1"
|
505 |
+
id="feBlend32960" /><feBlend
|
506 |
+
in2="blend1"
|
507 |
+
mode="screen"
|
508 |
+
result="blend2"
|
509 |
+
id="feBlend32962" /><feColorMatrix
|
510 |
+
in="blend2"
|
511 |
+
values="1"
|
512 |
+
type="saturate"
|
513 |
+
result="colormatrix2"
|
514 |
+
id="feColorMatrix32964" /><feComposite
|
515 |
+
in="colormatrix2"
|
516 |
+
in2="SourceGraphic"
|
517 |
+
operator="in"
|
518 |
+
k2="1"
|
519 |
+
result="composite2"
|
520 |
+
id="feComposite32966" /></filter><filter
|
521 |
+
style="color-interpolation-filters:sRGB;"
|
522 |
+
inkscape:label="Colorize"
|
523 |
+
id="filter32984"><feComposite
|
524 |
+
in2="SourceGraphic"
|
525 |
+
operator="arithmetic"
|
526 |
+
k1="0"
|
527 |
+
k2="1.92513"
|
528 |
+
result="composite1"
|
529 |
+
id="feComposite32970" /><feColorMatrix
|
530 |
+
in="composite1"
|
531 |
+
values="1"
|
532 |
+
type="saturate"
|
533 |
+
result="colormatrix1"
|
534 |
+
id="feColorMatrix32972" /><feFlood
|
535 |
+
flood-opacity="1"
|
536 |
+
flood-color="rgb(255,255,255)"
|
537 |
+
result="flood1"
|
538 |
+
id="feFlood32974" /><feBlend
|
539 |
+
in="flood1"
|
540 |
+
in2="colormatrix1"
|
541 |
+
mode="normal"
|
542 |
+
result="blend1"
|
543 |
+
id="feBlend32976" /><feBlend
|
544 |
+
in2="blend1"
|
545 |
+
mode="screen"
|
546 |
+
result="blend2"
|
547 |
+
id="feBlend32978" /><feColorMatrix
|
548 |
+
in="blend2"
|
549 |
+
values="1"
|
550 |
+
type="saturate"
|
551 |
+
result="colormatrix2"
|
552 |
+
id="feColorMatrix32980" /><feComposite
|
553 |
+
in="colormatrix2"
|
554 |
+
in2="SourceGraphic"
|
555 |
+
operator="in"
|
556 |
+
k2="1"
|
557 |
+
result="composite2"
|
558 |
+
id="feComposite32982" /></filter><filter
|
559 |
+
style="color-interpolation-filters:sRGB;"
|
560 |
+
inkscape:label="Colorize"
|
561 |
+
id="filter33000"><feComposite
|
562 |
+
in2="SourceGraphic"
|
563 |
+
operator="arithmetic"
|
564 |
+
k1="0"
|
565 |
+
k2="1.92513"
|
566 |
+
result="composite1"
|
567 |
+
id="feComposite32986" /><feColorMatrix
|
568 |
+
in="composite1"
|
569 |
+
values="1"
|
570 |
+
type="saturate"
|
571 |
+
result="colormatrix1"
|
572 |
+
id="feColorMatrix32988" /><feFlood
|
573 |
+
flood-opacity="1"
|
574 |
+
flood-color="rgb(255,255,255)"
|
575 |
+
result="flood1"
|
576 |
+
id="feFlood32990" /><feBlend
|
577 |
+
in="flood1"
|
578 |
+
in2="colormatrix1"
|
579 |
+
mode="normal"
|
580 |
+
result="blend1"
|
581 |
+
id="feBlend32992" /><feBlend
|
582 |
+
in2="blend1"
|
583 |
+
mode="screen"
|
584 |
+
result="blend2"
|
585 |
+
id="feBlend32994" /><feColorMatrix
|
586 |
+
in="blend2"
|
587 |
+
values="1"
|
588 |
+
type="saturate"
|
589 |
+
result="colormatrix2"
|
590 |
+
id="feColorMatrix32996" /><feComposite
|
591 |
+
in="colormatrix2"
|
592 |
+
in2="SourceGraphic"
|
593 |
+
operator="in"
|
594 |
+
k2="1"
|
595 |
+
result="composite2"
|
596 |
+
id="feComposite32998" /></filter><filter
|
597 |
+
style="color-interpolation-filters:sRGB;"
|
598 |
+
inkscape:label="Colorize"
|
599 |
+
id="filter33016"><feComposite
|
600 |
+
in2="SourceGraphic"
|
601 |
+
operator="arithmetic"
|
602 |
+
k1="0"
|
603 |
+
k2="1.92513"
|
604 |
+
result="composite1"
|
605 |
+
id="feComposite33002" /><feColorMatrix
|
606 |
+
in="composite1"
|
607 |
+
values="1"
|
608 |
+
type="saturate"
|
609 |
+
result="colormatrix1"
|
610 |
+
id="feColorMatrix33004" /><feFlood
|
611 |
+
flood-opacity="1"
|
612 |
+
flood-color="rgb(255,255,255)"
|
613 |
+
result="flood1"
|
614 |
+
id="feFlood33006" /><feBlend
|
615 |
+
in="flood1"
|
616 |
+
in2="colormatrix1"
|
617 |
+
mode="normal"
|
618 |
+
result="blend1"
|
619 |
+
id="feBlend33008" /><feBlend
|
620 |
+
in2="blend1"
|
621 |
+
mode="screen"
|
622 |
+
result="blend2"
|
623 |
+
id="feBlend33010" /><feColorMatrix
|
624 |
+
in="blend2"
|
625 |
+
values="1"
|
626 |
+
type="saturate"
|
627 |
+
result="colormatrix2"
|
628 |
+
id="feColorMatrix33012" /><feComposite
|
629 |
+
in="colormatrix2"
|
630 |
+
in2="SourceGraphic"
|
631 |
+
operator="in"
|
632 |
+
k2="1"
|
633 |
+
result="composite2"
|
634 |
+
id="feComposite33014" /></filter><filter
|
635 |
+
style="color-interpolation-filters:sRGB;"
|
636 |
+
inkscape:label="Colorize"
|
637 |
+
id="filter33032"><feComposite
|
638 |
+
in2="SourceGraphic"
|
639 |
+
operator="arithmetic"
|
640 |
+
k1="0"
|
641 |
+
k2="1.92513"
|
642 |
+
result="composite1"
|
643 |
+
id="feComposite33018" /><feColorMatrix
|
644 |
+
in="composite1"
|
645 |
+
values="1"
|
646 |
+
type="saturate"
|
647 |
+
result="colormatrix1"
|
648 |
+
id="feColorMatrix33020" /><feFlood
|
649 |
+
flood-opacity="1"
|
650 |
+
flood-color="rgb(255,255,255)"
|
651 |
+
result="flood1"
|
652 |
+
id="feFlood33022" /><feBlend
|
653 |
+
in="flood1"
|
654 |
+
in2="colormatrix1"
|
655 |
+
mode="normal"
|
656 |
+
result="blend1"
|
657 |
+
id="feBlend33024" /><feBlend
|
658 |
+
in2="blend1"
|
659 |
+
mode="screen"
|
660 |
+
result="blend2"
|
661 |
+
id="feBlend33026" /><feColorMatrix
|
662 |
+
in="blend2"
|
663 |
+
values="1"
|
664 |
+
type="saturate"
|
665 |
+
result="colormatrix2"
|
666 |
+
id="feColorMatrix33028" /><feComposite
|
667 |
+
in="colormatrix2"
|
668 |
+
in2="SourceGraphic"
|
669 |
+
operator="in"
|
670 |
+
k2="1"
|
671 |
+
result="composite2"
|
672 |
+
id="feComposite33030" /></filter><filter
|
673 |
+
style="color-interpolation-filters:sRGB;"
|
674 |
+
inkscape:label="Colorize"
|
675 |
+
id="filter33048"><feComposite
|
676 |
+
in2="SourceGraphic"
|
677 |
+
operator="arithmetic"
|
678 |
+
k1="0"
|
679 |
+
k2="1.92513"
|
680 |
+
result="composite1"
|
681 |
+
id="feComposite33034" /><feColorMatrix
|
682 |
+
in="composite1"
|
683 |
+
values="1"
|
684 |
+
type="saturate"
|
685 |
+
result="colormatrix1"
|
686 |
+
id="feColorMatrix33036" /><feFlood
|
687 |
+
flood-opacity="1"
|
688 |
+
flood-color="rgb(255,255,255)"
|
689 |
+
result="flood1"
|
690 |
+
id="feFlood33038" /><feBlend
|
691 |
+
in="flood1"
|
692 |
+
in2="colormatrix1"
|
693 |
+
mode="normal"
|
694 |
+
result="blend1"
|
695 |
+
id="feBlend33040" /><feBlend
|
696 |
+
in2="blend1"
|
697 |
+
mode="screen"
|
698 |
+
result="blend2"
|
699 |
+
id="feBlend33042" /><feColorMatrix
|
700 |
+
in="blend2"
|
701 |
+
values="1"
|
702 |
+
type="saturate"
|
703 |
+
result="colormatrix2"
|
704 |
+
id="feColorMatrix33044" /><feComposite
|
705 |
+
in="colormatrix2"
|
706 |
+
in2="SourceGraphic"
|
707 |
+
operator="in"
|
708 |
+
k2="1"
|
709 |
+
result="composite2"
|
710 |
+
id="feComposite33046" /></filter><filter
|
711 |
+
style="color-interpolation-filters:sRGB;"
|
712 |
+
inkscape:label="Colorize"
|
713 |
+
id="filter33064"><feComposite
|
714 |
+
in2="SourceGraphic"
|
715 |
+
operator="arithmetic"
|
716 |
+
k1="0"
|
717 |
+
k2="1.92513"
|
718 |
+
result="composite1"
|
719 |
+
id="feComposite33050" /><feColorMatrix
|
720 |
+
in="composite1"
|
721 |
+
values="1"
|
722 |
+
type="saturate"
|
723 |
+
result="colormatrix1"
|
724 |
+
id="feColorMatrix33052" /><feFlood
|
725 |
+
flood-opacity="1"
|
726 |
+
flood-color="rgb(255,255,255)"
|
727 |
+
result="flood1"
|
728 |
+
id="feFlood33054" /><feBlend
|
729 |
+
in="flood1"
|
730 |
+
in2="colormatrix1"
|
731 |
+
mode="normal"
|
732 |
+
result="blend1"
|
733 |
+
id="feBlend33056" /><feBlend
|
734 |
+
in2="blend1"
|
735 |
+
mode="screen"
|
736 |
+
result="blend2"
|
737 |
+
id="feBlend33058" /><feColorMatrix
|
738 |
+
in="blend2"
|
739 |
+
values="1"
|
740 |
+
type="saturate"
|
741 |
+
result="colormatrix2"
|
742 |
+
id="feColorMatrix33060" /><feComposite
|
743 |
+
in="colormatrix2"
|
744 |
+
in2="SourceGraphic"
|
745 |
+
operator="in"
|
746 |
+
k2="1"
|
747 |
+
result="composite2"
|
748 |
+
id="feComposite33062" /></filter><filter
|
749 |
+
style="color-interpolation-filters:sRGB;"
|
750 |
+
inkscape:label="Colorize"
|
751 |
+
id="filter33080"><feComposite
|
752 |
+
in2="SourceGraphic"
|
753 |
+
operator="arithmetic"
|
754 |
+
k1="0"
|
755 |
+
k2="1.92513"
|
756 |
+
result="composite1"
|
757 |
+
id="feComposite33066" /><feColorMatrix
|
758 |
+
in="composite1"
|
759 |
+
values="1"
|
760 |
+
type="saturate"
|
761 |
+
result="colormatrix1"
|
762 |
+
id="feColorMatrix33068" /><feFlood
|
763 |
+
flood-opacity="1"
|
764 |
+
flood-color="rgb(255,255,255)"
|
765 |
+
result="flood1"
|
766 |
+
id="feFlood33070" /><feBlend
|
767 |
+
in="flood1"
|
768 |
+
in2="colormatrix1"
|
769 |
+
mode="normal"
|
770 |
+
result="blend1"
|
771 |
+
id="feBlend33072" /><feBlend
|
772 |
+
in2="blend1"
|
773 |
+
mode="screen"
|
774 |
+
result="blend2"
|
775 |
+
id="feBlend33074" /><feColorMatrix
|
776 |
+
in="blend2"
|
777 |
+
values="1"
|
778 |
+
type="saturate"
|
779 |
+
result="colormatrix2"
|
780 |
+
id="feColorMatrix33076" /><feComposite
|
781 |
+
in="colormatrix2"
|
782 |
+
in2="SourceGraphic"
|
783 |
+
operator="in"
|
784 |
+
k2="1"
|
785 |
+
result="composite2"
|
786 |
+
id="feComposite33078" /></filter><filter
|
787 |
+
style="color-interpolation-filters:sRGB;"
|
788 |
+
inkscape:label="Colorize"
|
789 |
+
id="filter33096"><feComposite
|
790 |
+
in2="SourceGraphic"
|
791 |
+
operator="arithmetic"
|
792 |
+
k1="0"
|
793 |
+
k2="1.92513"
|
794 |
+
result="composite1"
|
795 |
+
id="feComposite33082" /><feColorMatrix
|
796 |
+
in="composite1"
|
797 |
+
values="1"
|
798 |
+
type="saturate"
|
799 |
+
result="colormatrix1"
|
800 |
+
id="feColorMatrix33084" /><feFlood
|
801 |
+
flood-opacity="1"
|
802 |
+
flood-color="rgb(255,255,255)"
|
803 |
+
result="flood1"
|
804 |
+
id="feFlood33086" /><feBlend
|
805 |
+
in="flood1"
|
806 |
+
in2="colormatrix1"
|
807 |
+
mode="normal"
|
808 |
+
result="blend1"
|
809 |
+
id="feBlend33088" /><feBlend
|
810 |
+
in2="blend1"
|
811 |
+
mode="screen"
|
812 |
+
result="blend2"
|
813 |
+
id="feBlend33090" /><feColorMatrix
|
814 |
+
in="blend2"
|
815 |
+
values="1"
|
816 |
+
type="saturate"
|
817 |
+
result="colormatrix2"
|
818 |
+
id="feColorMatrix33092" /><feComposite
|
819 |
+
in="colormatrix2"
|
820 |
+
in2="SourceGraphic"
|
821 |
+
operator="in"
|
822 |
+
k2="1"
|
823 |
+
result="composite2"
|
824 |
+
id="feComposite33094" /></filter><filter
|
825 |
+
style="color-interpolation-filters:sRGB;"
|
826 |
+
inkscape:label="Colorize"
|
827 |
+
id="filter33112"><feComposite
|
828 |
+
in2="SourceGraphic"
|
829 |
+
operator="arithmetic"
|
830 |
+
k1="0"
|
831 |
+
k2="1.92513"
|
832 |
+
result="composite1"
|
833 |
+
id="feComposite33098" /><feColorMatrix
|
834 |
+
in="composite1"
|
835 |
+
values="1"
|
836 |
+
type="saturate"
|
837 |
+
result="colormatrix1"
|
838 |
+
id="feColorMatrix33100" /><feFlood
|
839 |
+
flood-opacity="1"
|
840 |
+
flood-color="rgb(255,255,255)"
|
841 |
+
result="flood1"
|
842 |
+
id="feFlood33102" /><feBlend
|
843 |
+
in="flood1"
|
844 |
+
in2="colormatrix1"
|
845 |
+
mode="normal"
|
846 |
+
result="blend1"
|
847 |
+
id="feBlend33104" /><feBlend
|
848 |
+
in2="blend1"
|
849 |
+
mode="screen"
|
850 |
+
result="blend2"
|
851 |
+
id="feBlend33106" /><feColorMatrix
|
852 |
+
in="blend2"
|
853 |
+
values="1"
|
854 |
+
type="saturate"
|
855 |
+
result="colormatrix2"
|
856 |
+
id="feColorMatrix33108" /><feComposite
|
857 |
+
in="colormatrix2"
|
858 |
+
in2="SourceGraphic"
|
859 |
+
operator="in"
|
860 |
+
k2="1"
|
861 |
+
result="composite2"
|
862 |
+
id="feComposite33110" /></filter><filter
|
863 |
+
style="color-interpolation-filters:sRGB;"
|
864 |
+
inkscape:label="Colorize"
|
865 |
+
id="filter33128"><feComposite
|
866 |
+
in2="SourceGraphic"
|
867 |
+
operator="arithmetic"
|
868 |
+
k1="0"
|
869 |
+
k2="1.92513"
|
870 |
+
result="composite1"
|
871 |
+
id="feComposite33114" /><feColorMatrix
|
872 |
+
in="composite1"
|
873 |
+
values="1"
|
874 |
+
type="saturate"
|
875 |
+
result="colormatrix1"
|
876 |
+
id="feColorMatrix33116" /><feFlood
|
877 |
+
flood-opacity="1"
|
878 |
+
flood-color="rgb(255,255,255)"
|
879 |
+
result="flood1"
|
880 |
+
id="feFlood33118" /><feBlend
|
881 |
+
in="flood1"
|
882 |
+
in2="colormatrix1"
|
883 |
+
mode="normal"
|
884 |
+
result="blend1"
|
885 |
+
id="feBlend33120" /><feBlend
|
886 |
+
in2="blend1"
|
887 |
+
mode="screen"
|
888 |
+
result="blend2"
|
889 |
+
id="feBlend33122" /><feColorMatrix
|
890 |
+
in="blend2"
|
891 |
+
values="1"
|
892 |
+
type="saturate"
|
893 |
+
result="colormatrix2"
|
894 |
+
id="feColorMatrix33124" /><feComposite
|
895 |
+
in="colormatrix2"
|
896 |
+
in2="SourceGraphic"
|
897 |
+
operator="in"
|
898 |
+
k2="1"
|
899 |
+
result="composite2"
|
900 |
+
id="feComposite33126" /></filter><filter
|
901 |
+
style="color-interpolation-filters:sRGB;"
|
902 |
+
inkscape:label="Colorize"
|
903 |
+
id="filter33144"><feComposite
|
904 |
+
in2="SourceGraphic"
|
905 |
+
operator="arithmetic"
|
906 |
+
k1="0"
|
907 |
+
k2="1.92513"
|
908 |
+
result="composite1"
|
909 |
+
id="feComposite33130" /><feColorMatrix
|
910 |
+
in="composite1"
|
911 |
+
values="1"
|
912 |
+
type="saturate"
|
913 |
+
result="colormatrix1"
|
914 |
+
id="feColorMatrix33132" /><feFlood
|
915 |
+
flood-opacity="1"
|
916 |
+
flood-color="rgb(255,255,255)"
|
917 |
+
result="flood1"
|
918 |
+
id="feFlood33134" /><feBlend
|
919 |
+
in="flood1"
|
920 |
+
in2="colormatrix1"
|
921 |
+
mode="normal"
|
922 |
+
result="blend1"
|
923 |
+
id="feBlend33136" /><feBlend
|
924 |
+
in2="blend1"
|
925 |
+
mode="screen"
|
926 |
+
result="blend2"
|
927 |
+
id="feBlend33138" /><feColorMatrix
|
928 |
+
in="blend2"
|
929 |
+
values="1"
|
930 |
+
type="saturate"
|
931 |
+
result="colormatrix2"
|
932 |
+
id="feColorMatrix33140" /><feComposite
|
933 |
+
in="colormatrix2"
|
934 |
+
in2="SourceGraphic"
|
935 |
+
operator="in"
|
936 |
+
k2="1"
|
937 |
+
result="composite2"
|
938 |
+
id="feComposite33142" /></filter><filter
|
939 |
+
style="color-interpolation-filters:sRGB;"
|
940 |
+
inkscape:label="Colorize"
|
941 |
+
id="filter33160"><feComposite
|
942 |
+
in2="SourceGraphic"
|
943 |
+
operator="arithmetic"
|
944 |
+
k1="0"
|
945 |
+
k2="1.92513"
|
946 |
+
result="composite1"
|
947 |
+
id="feComposite33146" /><feColorMatrix
|
948 |
+
in="composite1"
|
949 |
+
values="1"
|
950 |
+
type="saturate"
|
951 |
+
result="colormatrix1"
|
952 |
+
id="feColorMatrix33148" /><feFlood
|
953 |
+
flood-opacity="1"
|
954 |
+
flood-color="rgb(255,255,255)"
|
955 |
+
result="flood1"
|
956 |
+
id="feFlood33150" /><feBlend
|
957 |
+
in="flood1"
|
958 |
+
in2="colormatrix1"
|
959 |
+
mode="normal"
|
960 |
+
result="blend1"
|
961 |
+
id="feBlend33152" /><feBlend
|
962 |
+
in2="blend1"
|
963 |
+
mode="screen"
|
964 |
+
result="blend2"
|
965 |
+
id="feBlend33154" /><feColorMatrix
|
966 |
+
in="blend2"
|
967 |
+
values="1"
|
968 |
+
type="saturate"
|
969 |
+
result="colormatrix2"
|
970 |
+
id="feColorMatrix33156" /><feComposite
|
971 |
+
in="colormatrix2"
|
972 |
+
in2="SourceGraphic"
|
973 |
+
operator="in"
|
974 |
+
k2="1"
|
975 |
+
result="composite2"
|
976 |
+
id="feComposite33158" /></filter></defs><sodipodi:namedview
|
977 |
+
pagecolor="#ffffff"
|
978 |
+
bordercolor="#666666"
|
979 |
+
borderopacity="1"
|
980 |
+
objecttolerance="10"
|
981 |
+
gridtolerance="10"
|
982 |
+
guidetolerance="10"
|
983 |
+
inkscape:pageopacity="0"
|
984 |
+
inkscape:pageshadow="2"
|
985 |
+
inkscape:window-width="1855"
|
986 |
+
inkscape:window-height="1176"
|
987 |
+
id="namedview132"
|
988 |
+
showgrid="false"
|
989 |
+
inkscape:showpageshadow="false"
|
990 |
+
inkscape:zoom="2.2250293"
|
991 |
+
inkscape:cx="250.07699"
|
992 |
+
inkscape:cy="120.20161"
|
993 |
+
inkscape:window-x="65"
|
994 |
+
inkscape:window-y="24"
|
995 |
+
inkscape:window-maximized="1"
|
996 |
+
inkscape:current-layer="Layer_1"
|
997 |
+
fit-margin-top="0"
|
998 |
+
fit-margin-left="0"
|
999 |
+
fit-margin-right="0"
|
1000 |
+
fit-margin-bottom="0" /><polygon
|
1001 |
+
id="polygon2"
|
1002 |
+
points="712.459,582.144 690.578,582.144 670.544,619.146 693.247,619.146 "
|
1003 |
+
transform="translate(-557.291,-552.87)"
|
1004 |
+
style="filter:url(#filter33160)" /><polygon
|
1005 |
+
id="polygon4"
|
1006 |
+
points="746.707,619.146 769.318,619.146 748.977,582.144 726.967,582.144 732.792,593.149 "
|
1007 |
+
transform="translate(-557.291,-552.87)"
|
1008 |
+
style="filter:url(#filter33144)" /><polygon
|
1009 |
+
style="fill:#e52d27"
|
1010 |
+
id="polygon6"
|
1011 |
+
points="697.89,568.249 719.398,568.249 741.126,568.249 732.672,552.87 706.216,552.87 "
|
1012 |
+
transform="translate(-557.291,-552.87)" /><path
|
1013 |
+
inkscape:connector-curvature="0"
|
1014 |
+
id="path8"
|
1015 |
+
d="m 280.02,30.941 c -1.16,1.099 -3.083,1.648 -5.767,1.648 h -33.596 v -3.315 h -20.322 v 37.002 h 20.322 v -17.21 h 31.948 c 3.173,0 5.355,0.672 6.545,2.014 1.19,1.343 1.785,3.753 1.785,7.232 v 7.964 h 20.322 v -11.26 c 0,-2.623 -0.274,-4.836 -0.824,-6.637 -0.549,-1.799 -1.327,-3.218 -2.334,-4.257 -1.007,-1.037 -2.151,-1.845 -3.433,-2.426 -1.282,-0.579 -2.778,-1.021 -4.485,-1.327 v -0.183 c 4.454,-1.037 7.461,-2.822 9.017,-5.355 0.905,-1.472 1.538,-3.333 1.917,-5.558 h -19.978 c -0.28,0.665 -0.649,1.224 -1.117,1.668 z"
|
1016 |
+
style="filter:url(#filter33128)" /><path
|
1017 |
+
style="fill:#e52d27"
|
1018 |
+
inkscape:connector-curvature="0"
|
1019 |
+
id="path10"
|
1020 |
+
d="M 300.359,11.443 C 299.718,9.063 298.65,7.019 297.155,5.31 295.659,3.602 293.631,2.289 291.068,1.374 288.505,0.458 285.301,10e-4 281.456,10e-4 H 220.123 V 15.38 h 80.965 c -0.161,-1.407 -0.402,-2.721 -0.729,-3.937 z" /><polygon
|
1021 |
+
id="polygon12"
|
1022 |
+
points="902.499,582.144 880.584,582.144 900.466,619.146 925.548,619.146 945.429,582.144 923.514,582.144 913.006,602.12 "
|
1023 |
+
transform="translate(-557.291,-552.87)"
|
1024 |
+
style="filter:url(#filter33112)" /><polygon
|
1025 |
+
style="fill:#e52d27"
|
1026 |
+
id="polygon14"
|
1027 |
+
points="961.157,552.87 938.913,552.87 930.823,568.249 952.894,568.249 "
|
1028 |
+
transform="translate(-557.291,-552.87)" /><polygon
|
1029 |
+
style="fill:#e52d27"
|
1030 |
+
id="polygon16"
|
1031 |
+
points="887.1,552.87 864.856,552.87 873.119,568.249 895.19,568.249 "
|
1032 |
+
transform="translate(-557.291,-552.87)" /><polygon
|
1033 |
+
style="fill:#e52d27"
|
1034 |
+
id="polygon18"
|
1035 |
+
points="968.48,568.249 988.803,568.249 1040.982,568.249 1040.982,552.87 968.48,552.87 "
|
1036 |
+
transform="translate(-557.291,-552.87)" /><polygon
|
1037 |
+
id="polygon20"
|
1038 |
+
points="988.803,603.218 988.803,592.599 1038.235,592.599 1038.235,582.144 968.48,582.144 968.48,619.146 1042.171,619.146 1042.171,603.218 "
|
1039 |
+
transform="translate(-557.291,-552.87)"
|
1040 |
+
style="filter:url(#filter33096)" /><g
|
1041 |
+
id="g28"
|
1042 |
+
transform="translate(-557.291,-552.87)"
|
1043 |
+
style="filter:url(#filter33064)"><g
|
1044 |
+
id="g26"><rect
|
1045 |
+
id="rect24"
|
1046 |
+
height="1.5"
|
1047 |
+
width="372.21399"
|
1048 |
+
y="625.79901"
|
1049 |
+
x="670.49597" /></g></g><path
|
1050 |
+
d="m 119.878,77.729 h 4.095 l 5.639,10.259 h -3.5 l -0.978,-1.814 h -6.376 l -0.921,1.814 h -3.514 z m 0.057,6.235 h 4.024 l -2.04,-3.854 z"
|
1051 |
+
id="path30"
|
1052 |
+
inkscape:connector-curvature="0"
|
1053 |
+
style="fill:#e52d27" /><path
|
1054 |
+
d="m 130.42,83.723 c 0,-0.519 0.045,-0.959 0.135,-1.318 0.09,-0.359 0.267,-0.671 0.531,-0.935 0.264,-0.264 0.654,-0.468 1.169,-0.609 0.515,-0.142 1.193,-0.213 2.033,-0.213 h 0.808 c 0.302,0 0.586,0.024 0.85,0.071 0.264,0.047 0.51,0.125 0.737,0.234 0.227,0.109 0.416,0.258 0.567,0.446 0.151,0.189 0.245,0.421 0.283,0.695 h 0.028 V 77.73 h 2.72 v 10.259 h -2.55 v -1.332 h -0.028 c -0.161,0.473 -0.442,0.831 -0.843,1.077 -0.402,0.246 -0.994,0.369 -1.778,0.369 h -0.793 c -0.841,0 -1.518,-0.071 -2.033,-0.213 -0.515,-0.142 -0.905,-0.345 -1.169,-0.609 -0.265,-0.264 -0.442,-0.576 -0.531,-0.935 -0.09,-0.359 -0.135,-0.798 -0.135,-1.318 v -1.305 z m 2.636,1.077 c 0,0.454 0.088,0.777 0.262,0.971 0.175,0.194 0.565,0.291 1.169,0.291 h 1.601 c 0.576,0 0.994,-0.092 1.254,-0.276 0.26,-0.184 0.39,-0.536 0.39,-1.056 v -0.708 c 0,-0.52 -0.13,-0.871 -0.39,-1.056 -0.26,-0.184 -0.678,-0.276 -1.254,-0.276 h -1.601 c -0.604,0 -0.994,0.097 -1.169,0.29 -0.175,0.194 -0.262,0.517 -0.262,0.971 z"
|
1055 |
+
id="path32"
|
1056 |
+
inkscape:connector-curvature="0"
|
1057 |
+
style="fill:#e52d27" /><path
|
1058 |
+
d="m 141.302,80.762 h 2.962 l 2.21,5.101 2.21,-5.101 h 2.961 l -3.471,7.226 h -3.401 z"
|
1059 |
+
id="path34"
|
1060 |
+
inkscape:connector-curvature="0"
|
1061 |
+
style="fill:#e52d27" /><path
|
1062 |
+
d="m 152.213,85.452 c 0,-0.482 0.082,-0.864 0.248,-1.148 0.165,-0.283 0.411,-0.491 0.737,-0.624 0.326,-0.132 0.718,-0.217 1.176,-0.255 0.458,-0.038 1.069,-0.057 1.835,-0.057 0.841,0 1.462,0.033 1.863,0.099 0.402,0.066 0.725,0.227 0.971,0.481 v -0.637 c 0,-0.368 -0.083,-0.621 -0.248,-0.758 -0.166,-0.137 -0.508,-0.205 -1.027,-0.205 h -1.601 c -0.416,0 -0.692,0.036 -0.829,0.107 -0.137,0.071 -0.21,0.229 -0.22,0.474 h -2.635 c 0,-0.482 0.062,-0.874 0.184,-1.176 0.123,-0.302 0.314,-0.533 0.574,-0.694 0.26,-0.161 0.588,-0.269 0.984,-0.326 0.397,-0.056 0.902,-0.085 1.516,-0.085 h 3.16 c 0.935,0 1.646,0.22 2.133,0.659 0.486,0.439 0.73,1.084 0.73,1.934 v 4.747 h -2.579 v -0.822 c -0.198,0.208 -0.371,0.371 -0.517,0.489 -0.147,0.118 -0.3,0.21 -0.461,0.276 -0.161,0.066 -0.35,0.111 -0.567,0.135 -0.218,0.023 -0.501,0.036 -0.85,0.036 h -1.856 c -0.916,0 -1.599,-0.146 -2.047,-0.439 -0.449,-0.293 -0.673,-0.831 -0.673,-1.615 v -0.596 z m 4.845,0.949 c 0.463,0 0.829,-0.016 1.098,-0.05 0.269,-0.033 0.472,-0.082 0.609,-0.149 0.137,-0.066 0.227,-0.142 0.269,-0.227 0.042,-0.085 0.064,-0.198 0.064,-0.34 0,-0.293 -0.099,-0.489 -0.298,-0.588 -0.198,-0.099 -0.652,-0.149 -1.36,-0.149 h -1.204 c -0.548,0 -0.916,0.064 -1.105,0.191 -0.189,0.127 -0.283,0.347 -0.283,0.659 0,0.237 0.106,0.404 0.319,0.503 0.212,0.099 0.583,0.149 1.112,0.149 h 0.779 z"
|
1063 |
+
id="path36"
|
1064 |
+
inkscape:connector-curvature="0"
|
1065 |
+
style="fill:#e52d27" /><path
|
1066 |
+
d="m 163.506,80.762 h 2.721 v 1.162 h 0.028 c 0.227,-0.482 0.572,-0.815 1.034,-0.999 0.463,-0.184 1.082,-0.276 1.856,-0.276 0.567,0 1.063,0.026 1.488,0.078 0.425,0.052 0.834,0.177 1.226,0.376 0.392,0.198 0.711,0.52 0.956,0.963 0.246,0.444 0.368,1.034 0.368,1.771 v 4.152 h -2.72 v -4.152 c 0,-0.708 -0.586,-1.063 -1.757,-1.063 h -0.624 c -0.586,0 -1.041,0.135 -1.367,0.404 -0.326,0.269 -0.489,0.659 -0.489,1.169 v 3.642 h -2.721 v -7.227 z"
|
1067 |
+
id="path38"
|
1068 |
+
inkscape:connector-curvature="0"
|
1069 |
+
style="fill:#e52d27" /><path
|
1070 |
+
d="m 174.713,83.978 c 0,-0.661 0.078,-1.212 0.234,-1.651 0.156,-0.439 0.38,-0.779 0.673,-1.02 0.293,-0.241 0.64,-0.411 1.042,-0.51 0.401,-0.099 0.866,-0.149 1.396,-0.149 h 3.061 c 1.039,0 1.839,0.196 2.402,0.588 0.562,0.392 0.843,0.994 0.843,1.807 v 0.652 h -2.635 c 0,-0.368 -0.116,-0.628 -0.347,-0.78 -0.232,-0.151 -0.64,-0.227 -1.226,-0.227 h -1.049 c -0.576,0 -0.999,0.088 -1.268,0.262 -0.269,0.175 -0.404,0.456 -0.404,0.843 v 0.963 c 0,0.444 0.125,0.758 0.375,0.942 0.25,0.184 0.607,0.276 1.07,0.276 h 1.389 c 0.434,0 0.786,-0.064 1.056,-0.191 0.269,-0.127 0.404,-0.342 0.404,-0.645 v -0.17 h 2.635 v 0.637 c 0,0.463 -0.088,0.857 -0.262,1.183 -0.175,0.326 -0.413,0.583 -0.715,0.772 -0.302,0.189 -0.64,0.326 -1.013,0.411 -0.373,0.085 -0.768,0.128 -1.183,0.128 h -2.777 c -0.52,0 -0.99,-0.038 -1.41,-0.114 -0.421,-0.075 -0.805,-0.231 -1.155,-0.468 -0.349,-0.236 -0.626,-0.586 -0.829,-1.049 -0.203,-0.463 -0.305,-1.063 -0.305,-1.8 v -0.69 z"
|
1071 |
+
id="path40"
|
1072 |
+
inkscape:connector-curvature="0"
|
1073 |
+
style="fill:#e52d27" /><path
|
1074 |
+
d="m 185.553,83.978 c 0,-0.661 0.078,-1.212 0.234,-1.651 0.156,-0.439 0.38,-0.779 0.673,-1.02 0.293,-0.241 0.64,-0.411 1.042,-0.51 0.401,-0.099 0.866,-0.149 1.396,-0.149 h 1.899 c 0.755,0 1.386,0.048 1.891,0.142 0.505,0.094 0.919,0.255 1.24,0.482 0.321,0.227 0.56,0.541 0.716,0.942 0.156,0.402 0.234,0.919 0.234,1.551 v 1.219 h -6.603 v 0.439 c 0,0.368 0.13,0.624 0.39,0.765 0.26,0.142 0.687,0.213 1.282,0.213 h 0.836 c 0.359,0 0.642,-0.021 0.85,-0.064 0.208,-0.042 0.361,-0.101 0.461,-0.177 0.099,-0.076 0.163,-0.158 0.191,-0.248 0.028,-0.089 0.042,-0.2 0.042,-0.333 h 2.55 v 0.312 c 0,0.435 -0.09,0.799 -0.269,1.091 -0.18,0.293 -0.432,0.52 -0.758,0.68 -0.326,0.161 -0.701,0.274 -1.126,0.34 -0.425,0.066 -0.902,0.099 -1.431,0.099 h -2.04 c -0.52,0 -0.99,-0.038 -1.41,-0.114 -0.421,-0.075 -0.805,-0.231 -1.155,-0.468 -0.349,-0.236 -0.626,-0.586 -0.829,-1.049 -0.203,-0.463 -0.305,-1.063 -0.305,-1.8 v -0.692 z m 6.688,-0.609 c 0,-0.425 -0.127,-0.702 -0.383,-0.829 -0.255,-0.128 -0.789,-0.192 -1.601,-0.192 -0.473,0 -0.834,0.014 -1.084,0.042 -0.25,0.029 -0.442,0.076 -0.574,0.142 -0.133,0.066 -0.22,0.163 -0.262,0.291 -0.042,0.127 -0.064,0.309 -0.064,0.546 z"
|
1075 |
+
id="path42"
|
1076 |
+
inkscape:connector-curvature="0"
|
1077 |
+
style="fill:#e52d27" /><path
|
1078 |
+
d="m 196.223,83.723 c 0,-0.519 0.045,-0.959 0.135,-1.318 0.09,-0.359 0.267,-0.671 0.531,-0.935 0.264,-0.264 0.654,-0.468 1.169,-0.609 0.515,-0.142 1.193,-0.213 2.033,-0.213 h 0.808 c 0.302,0 0.586,0.024 0.85,0.071 0.264,0.047 0.51,0.125 0.737,0.234 0.227,0.109 0.416,0.258 0.567,0.446 0.151,0.189 0.245,0.421 0.283,0.695 h 0.028 V 77.73 h 2.72 v 10.259 h -2.55 v -1.332 h -0.028 c -0.161,0.473 -0.442,0.831 -0.843,1.077 -0.402,0.246 -0.994,0.369 -1.778,0.369 h -0.793 c -0.841,0 -1.518,-0.071 -2.033,-0.213 -0.515,-0.142 -0.905,-0.345 -1.169,-0.609 -0.265,-0.264 -0.442,-0.576 -0.531,-0.935 -0.09,-0.359 -0.135,-0.798 -0.135,-1.318 v -1.305 z m 2.635,1.077 c 0,0.454 0.087,0.777 0.262,0.971 0.175,0.194 0.565,0.291 1.169,0.291 h 1.601 c 0.576,0 0.994,-0.092 1.254,-0.276 0.26,-0.184 0.39,-0.536 0.39,-1.056 v -0.708 c 0,-0.52 -0.13,-0.871 -0.39,-1.056 -0.26,-0.184 -0.678,-0.276 -1.254,-0.276 h -1.601 c -0.604,0 -0.994,0.097 -1.169,0.29 -0.175,0.194 -0.262,0.517 -0.262,0.971 z"
|
1079 |
+
id="path44"
|
1080 |
+
inkscape:connector-curvature="0"
|
1081 |
+
style="fill:#e52d27" /><path
|
1082 |
+
d="m 215.082,77.729 h 9.493 c 0.595,0 1.091,0.071 1.488,0.213 0.397,0.142 0.711,0.345 0.942,0.609 0.231,0.264 0.397,0.581 0.496,0.949 0.099,0.368 0.149,0.793 0.149,1.275 v 0.652 c 0,0.737 -0.12,1.301 -0.361,1.693 -0.241,0.392 -0.706,0.669 -1.396,0.829 v 0.029 c 0.264,0.047 0.496,0.116 0.694,0.205 0.198,0.09 0.376,0.215 0.531,0.376 0.156,0.161 0.276,0.38 0.361,0.659 0.085,0.279 0.128,0.621 0.128,1.027 v 1.743 h -3.146 v -1.233 c 0,-0.539 -0.092,-0.911 -0.276,-1.119 -0.184,-0.208 -0.522,-0.312 -1.013,-0.312 h -4.945 v 2.664 h -3.145 z m 3.145,5.045 h 5.2 c 0.416,0 0.713,-0.085 0.893,-0.255 0.179,-0.17 0.269,-0.444 0.269,-0.822 v -0.34 c 0,-0.434 -0.109,-0.722 -0.326,-0.864 -0.217,-0.142 -0.59,-0.213 -1.119,-0.213 h -4.917 z"
|
1083 |
+
id="path46"
|
1084 |
+
inkscape:connector-curvature="0"
|
1085 |
+
style="filter:url(#filter33080)" /><path
|
1086 |
+
d="m 229.308,83.978 c 0,-0.661 0.078,-1.212 0.234,-1.651 0.156,-0.439 0.38,-0.779 0.673,-1.02 0.293,-0.241 0.64,-0.411 1.042,-0.51 0.401,-0.099 0.866,-0.149 1.396,-0.149 h 1.899 c 0.755,0 1.386,0.048 1.891,0.142 0.505,0.094 0.919,0.255 1.24,0.482 0.321,0.227 0.56,0.541 0.716,0.942 0.156,0.402 0.234,0.919 0.234,1.551 v 1.219 h -6.603 v 0.439 c 0,0.368 0.13,0.624 0.39,0.765 0.26,0.142 0.687,0.213 1.282,0.213 h 0.836 c 0.359,0 0.642,-0.021 0.85,-0.064 0.208,-0.042 0.361,-0.101 0.461,-0.177 0.099,-0.076 0.163,-0.158 0.191,-0.248 0.028,-0.089 0.042,-0.2 0.042,-0.333 h 2.551 v 0.312 c 0,0.435 -0.09,0.799 -0.269,1.091 -0.18,0.293 -0.432,0.52 -0.758,0.68 -0.326,0.161 -0.701,0.274 -1.126,0.34 -0.425,0.066 -0.902,0.099 -1.431,0.099 h -2.04 c -0.52,0 -0.99,-0.038 -1.41,-0.114 -0.421,-0.075 -0.806,-0.231 -1.155,-0.468 -0.349,-0.236 -0.626,-0.586 -0.829,-1.049 -0.203,-0.463 -0.305,-1.063 -0.305,-1.8 v -0.692 z m 6.688,-0.609 c 0,-0.425 -0.127,-0.702 -0.383,-0.829 -0.255,-0.128 -0.789,-0.192 -1.601,-0.192 -0.473,0 -0.834,0.014 -1.084,0.042 -0.25,0.029 -0.442,0.076 -0.574,0.142 -0.133,0.066 -0.22,0.163 -0.262,0.291 -0.042,0.127 -0.064,0.309 -0.064,0.546 z"
|
1087 |
+
id="path48"
|
1088 |
+
inkscape:connector-curvature="0"
|
1089 |
+
style="filter:url(#filter33032)" /><path
|
1090 |
+
d="m 242.698,85.735 c 0,0.113 0.016,0.208 0.049,0.283 0.033,0.075 0.106,0.142 0.22,0.198 0.113,0.057 0.286,0.102 0.517,0.135 0.231,0.033 0.532,0.05 0.9,0.05 h 0.964 c 0.652,0 1.084,-0.036 1.296,-0.107 0.212,-0.071 0.319,-0.215 0.319,-0.432 0,-0.217 -0.08,-0.37 -0.241,-0.461 -0.161,-0.09 -0.472,-0.134 -0.935,-0.134 h -2.55 c -0.652,-0.01 -1.186,-0.055 -1.601,-0.135 -0.416,-0.08 -0.746,-0.215 -0.992,-0.404 -0.246,-0.189 -0.423,-0.444 -0.531,-0.765 -0.109,-0.321 -0.163,-0.737 -0.163,-1.247 0,-0.435 0.082,-0.791 0.248,-1.07 0.165,-0.279 0.394,-0.489 0.687,-0.631 0.293,-0.142 0.633,-0.238 1.02,-0.29 0.387,-0.052 0.841,-0.078 1.361,-0.078 h 1.898 c 0.907,0 1.632,0.036 2.175,0.107 0.543,0.071 0.961,0.189 1.254,0.354 0.293,0.165 0.494,0.383 0.602,0.652 0.108,0.269 0.167,0.63 0.177,1.084 h -2.72 c -0.038,-0.114 -0.09,-0.201 -0.156,-0.262 -0.066,-0.062 -0.168,-0.111 -0.305,-0.149 -0.137,-0.038 -0.324,-0.062 -0.559,-0.071 -0.237,-0.009 -0.572,-0.014 -1.006,-0.014 -0.803,0 -1.315,0.029 -1.537,0.085 -0.222,0.056 -0.333,0.208 -0.333,0.453 0,0.161 0.101,0.272 0.305,0.333 0.203,0.062 0.645,0.092 1.325,0.092 h 1.885 c 0.784,0 1.414,0.062 1.892,0.184 0.477,0.123 0.829,0.29 1.056,0.503 0.227,0.212 0.375,0.451 0.446,0.715 0.071,0.265 0.106,0.591 0.106,0.978 0,0.491 -0.059,0.89 -0.177,1.197 -0.118,0.307 -0.316,0.548 -0.595,0.722 -0.279,0.175 -0.664,0.3 -1.155,0.376 -0.491,0.075 -1.139,0.114 -1.941,0.114 h -2.579 c -1.266,0 -2.154,-0.172 -2.664,-0.517 -0.51,-0.345 -0.765,-0.961 -0.765,-1.849 h 2.803 z"
|
1091 |
+
id="path50"
|
1092 |
+
inkscape:connector-curvature="0"
|
1093 |
+
style="filter:url(#filter33048)" /><path
|
1094 |
+
d="m 251.37,80.762 h 2.635 v 1.077 h 0.029 c 0.198,-0.368 0.491,-0.659 0.878,-0.871 0.387,-0.212 0.945,-0.319 1.672,-0.319 h 0.779 c 0.841,0 1.518,0.071 2.034,0.213 0.515,0.142 0.904,0.345 1.169,0.609 0.264,0.264 0.441,0.576 0.531,0.935 0.09,0.359 0.135,0.799 0.135,1.318 v 1.304 c 0,0.52 -0.045,0.959 -0.135,1.318 -0.09,0.359 -0.267,0.671 -0.531,0.935 -0.265,0.265 -0.654,0.468 -1.169,0.609 -0.515,0.142 -1.193,0.213 -2.034,0.213 h -0.552 c -0.406,0 -0.742,-0.019 -1.006,-0.057 -0.264,-0.038 -0.496,-0.104 -0.694,-0.198 -0.198,-0.094 -0.375,-0.229 -0.531,-0.404 -0.156,-0.175 -0.31,-0.409 -0.461,-0.702 h -0.028 v 3.769 h -2.721 z m 2.72,3.967 c 0,0.52 0.13,0.871 0.39,1.056 0.26,0.184 0.678,0.276 1.254,0.276 h 1.431 c 0.604,0 0.994,-0.097 1.169,-0.291 0.175,-0.193 0.262,-0.517 0.262,-0.971 v -0.85 c 0,-0.453 -0.088,-0.777 -0.262,-0.971 -0.175,-0.193 -0.565,-0.29 -1.169,-0.29 h -1.431 c -0.576,0 -0.994,0.092 -1.254,0.276 -0.26,0.184 -0.39,0.536 -0.39,1.056 z"
|
1095 |
+
id="path52"
|
1096 |
+
inkscape:connector-curvature="0"
|
1097 |
+
style="filter:url(#filter33016)" /><path
|
1098 |
+
d="m 262.733,83.511 c 0,-0.567 0.085,-1.039 0.255,-1.417 0.17,-0.378 0.399,-0.673 0.687,-0.886 0.288,-0.213 0.604,-0.359 0.949,-0.439 0.345,-0.08 0.711,-0.12 1.098,-0.12 h 4.067 c 0.387,0 0.753,0.04 1.098,0.12 0.345,0.081 0.661,0.227 0.949,0.439 0.288,0.212 0.517,0.508 0.687,0.886 0.17,0.378 0.255,0.85 0.255,1.417 v 1.729 c 0,0.567 -0.085,1.039 -0.255,1.417 -0.17,0.378 -0.399,0.673 -0.687,0.886 -0.288,0.212 -0.604,0.359 -0.949,0.439 -0.345,0.08 -0.711,0.12 -1.098,0.12 h -4.067 c -0.387,0 -0.754,-0.04 -1.098,-0.12 -0.345,-0.08 -0.662,-0.227 -0.949,-0.439 -0.289,-0.213 -0.517,-0.508 -0.687,-0.886 -0.17,-0.378 -0.255,-0.85 -0.255,-1.417 z m 2.721,1.204 c 0,0.501 0.146,0.85 0.439,1.049 0.293,0.198 0.765,0.298 1.417,0.298 h 0.652 c 0.453,0 0.815,-0.019 1.084,-0.057 0.269,-0.038 0.477,-0.099 0.624,-0.184 0.146,-0.085 0.248,-0.201 0.305,-0.347 0.057,-0.146 0.085,-0.347 0.085,-0.602 V 83.88 c 0,-0.255 -0.028,-0.458 -0.085,-0.609 -0.057,-0.151 -0.158,-0.269 -0.305,-0.354 -0.146,-0.085 -0.354,-0.144 -0.624,-0.177 -0.269,-0.033 -0.63,-0.05 -1.084,-0.05 h -0.652 c -0.652,0 -1.124,0.099 -1.417,0.298 -0.293,0.199 -0.439,0.548 -0.439,1.049 z"
|
1099 |
+
id="path54"
|
1100 |
+
inkscape:connector-curvature="0"
|
1101 |
+
style="filter:url(#filter32984)" /><path
|
1102 |
+
d="m 274.465,80.762 h 2.721 v 1.162 h 0.028 c 0.227,-0.482 0.572,-0.815 1.034,-0.999 0.463,-0.184 1.082,-0.276 1.856,-0.276 0.567,0 1.063,0.026 1.488,0.078 0.425,0.052 0.834,0.177 1.226,0.376 0.392,0.198 0.711,0.52 0.956,0.963 0.246,0.444 0.368,1.034 0.368,1.771 v 4.152 h -2.72 v -4.152 c 0,-0.708 -0.586,-1.063 -1.757,-1.063 h -0.624 c -0.586,0 -1.041,0.135 -1.367,0.404 -0.326,0.269 -0.489,0.659 -0.489,1.169 v 3.642 h -2.721 v -7.227 z"
|
1103 |
+
id="path56"
|
1104 |
+
inkscape:connector-curvature="0"
|
1105 |
+
style="filter:url(#filter33000)" /><path
|
1106 |
+
d="m 288.55,85.735 c 0,0.113 0.016,0.208 0.049,0.283 0.033,0.075 0.106,0.142 0.22,0.198 0.113,0.057 0.286,0.102 0.517,0.135 0.231,0.033 0.532,0.05 0.9,0.05 h 0.964 c 0.652,0 1.084,-0.036 1.297,-0.107 0.212,-0.071 0.319,-0.215 0.319,-0.432 0,-0.217 -0.08,-0.37 -0.241,-0.461 -0.161,-0.09 -0.472,-0.134 -0.935,-0.134 h -2.551 c -0.652,-0.01 -1.186,-0.055 -1.601,-0.135 -0.416,-0.08 -0.746,-0.215 -0.992,-0.404 -0.246,-0.189 -0.423,-0.444 -0.531,-0.765 -0.109,-0.321 -0.163,-0.737 -0.163,-1.247 0,-0.435 0.082,-0.791 0.248,-1.07 0.165,-0.279 0.394,-0.489 0.687,-0.631 0.293,-0.142 0.633,-0.238 1.02,-0.29 0.387,-0.052 0.841,-0.078 1.361,-0.078 h 1.898 c 0.907,0 1.632,0.036 2.175,0.107 0.543,0.071 0.961,0.189 1.254,0.354 0.293,0.165 0.494,0.383 0.602,0.652 0.108,0.269 0.167,0.63 0.177,1.084 h -2.72 c -0.038,-0.114 -0.09,-0.201 -0.156,-0.262 -0.066,-0.062 -0.168,-0.111 -0.305,-0.149 -0.137,-0.038 -0.324,-0.062 -0.559,-0.071 -0.237,-0.009 -0.572,-0.014 -1.006,-0.014 -0.803,0 -1.316,0.029 -1.537,0.085 -0.222,0.056 -0.333,0.208 -0.333,0.453 0,0.161 0.101,0.272 0.305,0.333 0.203,0.062 0.645,0.092 1.325,0.092 h 1.885 c 0.784,0 1.414,0.062 1.892,0.184 0.477,0.123 0.829,0.29 1.056,0.503 0.227,0.212 0.375,0.451 0.446,0.715 0.071,0.265 0.106,0.591 0.106,0.978 0,0.491 -0.059,0.89 -0.177,1.197 -0.118,0.307 -0.316,0.548 -0.595,0.722 -0.279,0.175 -0.664,0.3 -1.155,0.376 -0.491,0.075 -1.139,0.114 -1.941,0.114 h -2.579 c -1.266,0 -2.154,-0.172 -2.664,-0.517 -0.51,-0.345 -0.765,-0.961 -0.765,-1.849 h 2.803 z"
|
1107 |
+
id="path58"
|
1108 |
+
inkscape:connector-curvature="0"
|
1109 |
+
style="filter:url(#filter32968)" /><path
|
1110 |
+
d="m 300.097,79.855 h -2.72 V 77.73 h 2.72 z m 0,8.133 h -2.72 v -7.226 h 2.72 z"
|
1111 |
+
id="path60"
|
1112 |
+
inkscape:connector-curvature="0"
|
1113 |
+
style="filter:url(#filter32920)" /><path
|
1114 |
+
d="m 301.274,80.762 h 2.962 l 2.21,5.101 2.21,-5.101 h 2.961 l -3.471,7.226 h -3.401 z"
|
1115 |
+
id="path62"
|
1116 |
+
inkscape:connector-curvature="0"
|
1117 |
+
style="filter:url(#filter32952)" /><path
|
1118 |
+
d="m 312.298,83.978 c 0,-0.661 0.078,-1.212 0.234,-1.651 0.156,-0.439 0.38,-0.779 0.673,-1.02 0.293,-0.241 0.64,-0.411 1.042,-0.51 0.401,-0.099 0.866,-0.149 1.396,-0.149 h 1.899 c 0.755,0 1.386,0.048 1.891,0.142 0.505,0.094 0.919,0.255 1.24,0.482 0.321,0.227 0.56,0.541 0.716,0.942 0.156,0.402 0.234,0.919 0.234,1.551 v 1.219 h -6.603 v 0.439 c 0,0.368 0.13,0.624 0.39,0.765 0.26,0.142 0.687,0.213 1.282,0.213 h 0.836 c 0.359,0 0.642,-0.021 0.85,-0.064 0.208,-0.042 0.361,-0.101 0.461,-0.177 0.099,-0.076 0.163,-0.158 0.191,-0.248 0.028,-0.089 0.042,-0.2 0.042,-0.333 h 2.55 v 0.312 c 0,0.435 -0.09,0.799 -0.269,1.091 -0.18,0.293 -0.432,0.52 -0.758,0.68 -0.326,0.161 -0.701,0.274 -1.126,0.34 -0.425,0.066 -0.902,0.099 -1.431,0.099 h -2.04 c -0.52,0 -0.99,-0.038 -1.41,-0.114 -0.421,-0.075 -0.805,-0.231 -1.155,-0.468 -0.349,-0.236 -0.626,-0.586 -0.829,-1.049 -0.203,-0.463 -0.305,-1.063 -0.305,-1.8 v -0.692 z m 6.688,-0.609 c 0,-0.425 -0.127,-0.702 -0.383,-0.829 -0.255,-0.128 -0.789,-0.192 -1.601,-0.192 -0.473,0 -0.834,0.014 -1.084,0.042 -0.25,0.029 -0.442,0.076 -0.574,0.142 -0.133,0.066 -0.22,0.163 -0.262,0.291 -0.042,0.127 -0.064,0.309 -0.064,0.546 z"
|
1119 |
+
id="path64"
|
1120 |
+
inkscape:connector-curvature="0"
|
1121 |
+
style="filter:url(#filter32936)" /><path
|
1122 |
+
d="m 329.287,77.729 h 3.443 l 4.01,7.623 4.01,-7.623 h 3.443 l -5.512,10.259 h -3.883 z"
|
1123 |
+
id="path66"
|
1124 |
+
inkscape:connector-curvature="0"
|
1125 |
+
style="fill:#e52d27" /><path
|
1126 |
+
d="m 347.551,79.855 h -2.72 V 77.73 h 2.72 z m 0,8.133 h -2.72 v -7.226 h 2.72 z"
|
1127 |
+
id="path68"
|
1128 |
+
inkscape:connector-curvature="0"
|
1129 |
+
style="fill:#e52d27" /><path
|
1130 |
+
d="m 349.393,83.723 c 0,-0.519 0.045,-0.959 0.135,-1.318 0.09,-0.359 0.267,-0.671 0.531,-0.935 0.264,-0.264 0.654,-0.468 1.169,-0.609 0.515,-0.142 1.193,-0.213 2.033,-0.213 h 0.808 c 0.302,0 0.586,0.024 0.85,0.071 0.264,0.047 0.51,0.125 0.737,0.234 0.227,0.109 0.416,0.258 0.567,0.446 0.151,0.189 0.245,0.421 0.283,0.695 h 0.028 V 77.73 h 2.72 v 10.259 h -2.55 v -1.332 h -0.028 c -0.161,0.473 -0.442,0.831 -0.843,1.077 -0.402,0.246 -0.994,0.369 -1.778,0.369 h -0.793 c -0.841,0 -1.518,-0.071 -2.033,-0.213 -0.515,-0.142 -0.905,-0.345 -1.169,-0.609 -0.265,-0.264 -0.442,-0.576 -0.531,-0.935 -0.09,-0.359 -0.135,-0.798 -0.135,-1.318 v -1.305 z m 2.635,1.077 c 0,0.454 0.087,0.777 0.262,0.971 0.175,0.194 0.565,0.291 1.169,0.291 h 1.601 c 0.576,0 0.994,-0.092 1.254,-0.276 0.26,-0.184 0.39,-0.536 0.39,-1.056 v -0.708 c 0,-0.52 -0.13,-0.871 -0.39,-1.056 -0.26,-0.184 -0.678,-0.276 -1.254,-0.276 h -1.601 c -0.604,0 -0.994,0.097 -1.169,0.29 -0.175,0.194 -0.262,0.517 -0.262,0.971 z"
|
1131 |
+
id="path70"
|
1132 |
+
inkscape:connector-curvature="0"
|
1133 |
+
style="fill:#e52d27" /><path
|
1134 |
+
d="m 360.785,83.978 c 0,-0.661 0.078,-1.212 0.234,-1.651 0.156,-0.439 0.38,-0.779 0.673,-1.02 0.293,-0.241 0.64,-0.411 1.042,-0.51 0.401,-0.099 0.866,-0.149 1.396,-0.149 h 1.899 c 0.755,0 1.386,0.048 1.891,0.142 0.505,0.094 0.919,0.255 1.24,0.482 0.321,0.227 0.56,0.541 0.716,0.942 0.156,0.402 0.234,0.919 0.234,1.551 v 1.219 h -6.603 v 0.439 c 0,0.368 0.13,0.624 0.39,0.765 0.26,0.142 0.687,0.213 1.282,0.213 h 0.836 c 0.359,0 0.642,-0.021 0.85,-0.064 0.208,-0.042 0.361,-0.101 0.461,-0.177 0.099,-0.076 0.163,-0.158 0.191,-0.248 0.028,-0.089 0.042,-0.2 0.042,-0.333 h 2.55 v 0.312 c 0,0.435 -0.09,0.799 -0.269,1.091 -0.18,0.293 -0.432,0.52 -0.758,0.68 -0.326,0.161 -0.701,0.274 -1.126,0.34 -0.425,0.066 -0.902,0.099 -1.431,0.099 h -2.041 c -0.52,0 -0.99,-0.038 -1.41,-0.114 -0.421,-0.075 -0.805,-0.231 -1.155,-0.468 -0.349,-0.236 -0.626,-0.586 -0.829,-1.049 -0.203,-0.463 -0.305,-1.063 -0.305,-1.8 z m 6.688,-0.609 c 0,-0.425 -0.127,-0.702 -0.383,-0.829 -0.255,-0.128 -0.789,-0.192 -1.601,-0.192 -0.473,0 -0.834,0.014 -1.084,0.042 -0.25,0.029 -0.442,0.076 -0.574,0.142 -0.133,0.066 -0.22,0.163 -0.262,0.291 -0.042,0.127 -0.064,0.309 -0.064,0.546 z"
|
1135 |
+
id="path72"
|
1136 |
+
inkscape:connector-curvature="0"
|
1137 |
+
style="fill:#e52d27" /><path
|
1138 |
+
d="m 371.455,83.511 c 0,-0.567 0.085,-1.039 0.255,-1.417 0.17,-0.378 0.399,-0.673 0.687,-0.886 0.288,-0.213 0.604,-0.359 0.949,-0.439 0.345,-0.08 0.711,-0.12 1.098,-0.12 h 4.067 c 0.387,0 0.753,0.04 1.098,0.12 0.345,0.081 0.661,0.227 0.949,0.439 0.288,0.212 0.517,0.508 0.687,0.886 0.17,0.378 0.255,0.85 0.255,1.417 v 1.729 c 0,0.567 -0.085,1.039 -0.255,1.417 -0.17,0.378 -0.399,0.673 -0.687,0.886 -0.288,0.212 -0.604,0.359 -0.949,0.439 -0.345,0.08 -0.711,0.12 -1.098,0.12 h -4.067 c -0.387,0 -0.754,-0.04 -1.098,-0.12 -0.345,-0.08 -0.662,-0.227 -0.949,-0.439 -0.289,-0.213 -0.517,-0.508 -0.687,-0.886 -0.17,-0.378 -0.255,-0.85 -0.255,-1.417 z m 2.72,1.204 c 0,0.501 0.146,0.85 0.439,1.049 0.293,0.198 0.765,0.298 1.417,0.298 h 0.652 c 0.453,0 0.815,-0.019 1.084,-0.057 0.269,-0.038 0.477,-0.099 0.624,-0.184 0.146,-0.085 0.248,-0.201 0.305,-0.347 0.057,-0.146 0.085,-0.347 0.085,-0.602 V 83.88 c 0,-0.255 -0.028,-0.458 -0.085,-0.609 -0.057,-0.151 -0.158,-0.269 -0.305,-0.354 -0.146,-0.085 -0.354,-0.144 -0.624,-0.177 -0.269,-0.033 -0.63,-0.05 -1.084,-0.05 h -0.652 c -0.652,0 -1.124,0.099 -1.417,0.298 -0.293,0.199 -0.439,0.548 -0.439,1.049 z"
|
1139 |
+
id="path74"
|
1140 |
+
inkscape:connector-curvature="0"
|
1141 |
+
style="fill:#e52d27" /><path
|
1142 |
+
d="m 390.314,77.729 h 11.222 v 2.381 h -8.077 v 1.644 h 7.651 v 2.125 h -7.651 v 1.644 h 8.261 v 2.466 h -11.406 z"
|
1143 |
+
id="path76"
|
1144 |
+
inkscape:connector-curvature="0"
|
1145 |
+
style="filter:url(#filter32904)" /><path
|
1146 |
+
d="m 403.364,80.762 h 2.593 v 1.417 h 0.028 c 0.066,-0.5 0.312,-0.881 0.737,-1.141 0.425,-0.26 0.982,-0.39 1.672,-0.39 h 1.034 c 1.275,0 2.168,0.562 2.678,1.686 0.227,-0.652 0.52,-1.096 0.878,-1.332 0.359,-0.236 0.926,-0.354 1.7,-0.354 h 0.836 c 1.199,0 2.062,0.276 2.586,0.829 0.524,0.553 0.786,1.368 0.786,2.444 v 4.067 h -2.72 v -3.883 c 0,-0.264 -0.024,-0.479 -0.071,-0.645 -0.047,-0.165 -0.132,-0.295 -0.255,-0.39 -0.246,-0.198 -0.751,-0.298 -1.516,-0.298 -0.671,0 -1.146,0.09 -1.424,0.269 -0.279,0.179 -0.418,0.5 -0.418,0.963 v 3.982 h -2.721 v -4.095 c 0,-0.236 -0.026,-0.425 -0.078,-0.567 -0.052,-0.142 -0.149,-0.253 -0.291,-0.333 -0.142,-0.08 -0.338,-0.137 -0.588,-0.17 -0.25,-0.033 -0.588,-0.05 -1.013,-0.05 -0.604,0 -1.041,0.099 -1.311,0.298 -0.269,0.198 -0.404,0.567 -0.404,1.105 v 3.811 h -2.72 v -7.223 z"
|
1147 |
+
id="path78"
|
1148 |
+
inkscape:connector-curvature="0"
|
1149 |
+
style="filter:url(#filter32888)" /><path
|
1150 |
+
d="m 420.636,77.729 h 2.721 v 4.364 h 0.028 c 0.038,-0.274 0.132,-0.505 0.283,-0.695 0.151,-0.189 0.338,-0.338 0.56,-0.446 0.222,-0.108 0.468,-0.186 0.737,-0.234 0.269,-0.048 0.555,-0.071 0.857,-0.071 h 0.807 c 0.841,0 1.518,0.071 2.034,0.213 0.515,0.142 0.904,0.345 1.169,0.609 0.264,0.264 0.441,0.576 0.531,0.935 0.09,0.359 0.135,0.799 0.135,1.318 v 1.304 c 0,0.52 -0.045,0.959 -0.135,1.318 -0.09,0.359 -0.267,0.671 -0.531,0.935 -0.265,0.265 -0.654,0.468 -1.169,0.609 -0.515,0.142 -1.193,0.213 -2.034,0.213 h -0.793 c -0.784,0 -1.377,-0.123 -1.778,-0.369 -0.402,-0.245 -0.682,-0.604 -0.843,-1.077 h -0.029 v 1.332 h -2.55 z m 2.551,7 c 0,0.52 0.13,0.871 0.39,1.056 0.26,0.184 0.677,0.276 1.254,0.276 h 1.601 c 0.604,0 0.994,-0.097 1.169,-0.291 0.175,-0.193 0.262,-0.517 0.262,-0.971 v -0.85 c 0,-0.453 -0.087,-0.777 -0.262,-0.971 -0.175,-0.193 -0.565,-0.29 -1.169,-0.29 h -1.601 c -0.576,0 -0.994,0.092 -1.254,0.276 -0.26,0.184 -0.39,0.536 -0.39,1.056 z"
|
1151 |
+
id="path80"
|
1152 |
+
inkscape:connector-curvature="0"
|
1153 |
+
style="filter:url(#filter32872)" /><path
|
1154 |
+
d="m 431.844,83.978 c 0,-0.661 0.078,-1.212 0.234,-1.651 0.156,-0.439 0.38,-0.779 0.673,-1.02 0.293,-0.241 0.64,-0.411 1.042,-0.51 0.401,-0.099 0.866,-0.149 1.396,-0.149 h 1.899 c 0.755,0 1.386,0.048 1.891,0.142 0.505,0.094 0.919,0.255 1.24,0.482 0.321,0.227 0.56,0.541 0.716,0.942 0.156,0.402 0.234,0.919 0.234,1.551 v 1.219 h -6.603 v 0.439 c 0,0.368 0.13,0.624 0.39,0.765 0.26,0.142 0.687,0.213 1.282,0.213 h 0.836 c 0.359,0 0.642,-0.021 0.85,-0.064 0.208,-0.042 0.361,-0.101 0.461,-0.177 0.099,-0.076 0.163,-0.158 0.191,-0.248 0.028,-0.089 0.042,-0.2 0.042,-0.333 h 2.55 v 0.312 c 0,0.435 -0.09,0.799 -0.269,1.091 -0.18,0.293 -0.432,0.52 -0.758,0.68 -0.326,0.161 -0.701,0.274 -1.126,0.34 -0.425,0.066 -0.902,0.099 -1.431,0.099 h -2.04 c -0.52,0 -0.99,-0.038 -1.41,-0.114 -0.421,-0.075 -0.805,-0.231 -1.155,-0.468 -0.349,-0.236 -0.626,-0.586 -0.829,-1.049 -0.203,-0.463 -0.305,-1.063 -0.305,-1.8 v -0.692 z m 6.688,-0.609 c 0,-0.425 -0.127,-0.702 -0.383,-0.829 -0.255,-0.128 -0.789,-0.192 -1.601,-0.192 -0.473,0 -0.834,0.014 -1.084,0.042 -0.25,0.029 -0.442,0.076 -0.574,0.142 -0.133,0.066 -0.22,0.163 -0.262,0.291 -0.042,0.127 -0.064,0.309 -0.064,0.546 z"
|
1155 |
+
id="path82"
|
1156 |
+
inkscape:connector-curvature="0"
|
1157 |
+
style="filter:url(#filter32856)" /><path
|
1158 |
+
d="m 442.514,83.723 c 0,-0.519 0.045,-0.959 0.135,-1.318 0.09,-0.359 0.267,-0.671 0.531,-0.935 0.264,-0.264 0.654,-0.468 1.169,-0.609 0.515,-0.142 1.193,-0.213 2.033,-0.213 h 0.808 c 0.302,0 0.586,0.024 0.85,0.071 0.264,0.047 0.51,0.125 0.737,0.234 0.227,0.109 0.416,0.258 0.567,0.446 0.151,0.189 0.245,0.421 0.283,0.695 h 0.028 V 77.73 h 2.72 v 10.259 h -2.55 v -1.332 h -0.028 c -0.161,0.473 -0.442,0.831 -0.843,1.077 -0.402,0.246 -0.994,0.369 -1.778,0.369 h -0.793 c -0.841,0 -1.518,-0.071 -2.033,-0.213 -0.515,-0.142 -0.905,-0.345 -1.169,-0.609 -0.265,-0.264 -0.442,-0.576 -0.531,-0.935 -0.09,-0.359 -0.135,-0.798 -0.135,-1.318 v -1.305 z m 2.635,1.077 c 0,0.454 0.087,0.777 0.262,0.971 0.175,0.194 0.565,0.291 1.169,0.291 h 1.601 c 0.576,0 0.994,-0.092 1.254,-0.276 0.26,-0.184 0.39,-0.536 0.39,-1.056 v -0.708 c 0,-0.52 -0.13,-0.871 -0.39,-1.056 -0.26,-0.184 -0.678,-0.276 -1.254,-0.276 h -1.601 c -0.604,0 -0.994,0.097 -1.169,0.29 -0.175,0.194 -0.262,0.517 -0.262,0.971 z"
|
1159 |
+
id="path84"
|
1160 |
+
inkscape:connector-curvature="0"
|
1161 |
+
style="filter:url(#filter32840)" /><path
|
1162 |
+
d="m 454.062,83.723 c 0,-0.519 0.045,-0.959 0.135,-1.318 0.09,-0.359 0.267,-0.671 0.531,-0.935 0.264,-0.264 0.654,-0.468 1.169,-0.609 0.515,-0.142 1.193,-0.213 2.033,-0.213 h 0.808 c 0.302,0 0.586,0.024 0.85,0.071 0.264,0.047 0.51,0.125 0.737,0.234 0.227,0.109 0.416,0.258 0.567,0.446 0.151,0.189 0.245,0.421 0.283,0.695 h 0.028 V 77.73 h 2.72 v 10.259 h -2.55 v -1.332 h -0.028 c -0.161,0.473 -0.442,0.831 -0.843,1.077 -0.402,0.246 -0.994,0.369 -1.778,0.369 h -0.793 c -0.841,0 -1.518,-0.071 -2.033,-0.213 -0.515,-0.142 -0.905,-0.345 -1.169,-0.609 -0.265,-0.264 -0.442,-0.576 -0.531,-0.935 -0.09,-0.359 -0.135,-0.798 -0.135,-1.318 v -1.305 z m 2.635,1.077 c 0,0.454 0.088,0.777 0.262,0.971 0.175,0.194 0.565,0.291 1.169,0.291 h 1.601 c 0.576,0 0.994,-0.092 1.254,-0.276 0.26,-0.184 0.39,-0.536 0.39,-1.056 v -0.708 c 0,-0.52 -0.13,-0.871 -0.39,-1.056 -0.26,-0.184 -0.678,-0.276 -1.254,-0.276 h -1.601 c -0.604,0 -0.994,0.097 -1.169,0.29 -0.175,0.194 -0.262,0.517 -0.262,0.971 z"
|
1163 |
+
id="path86"
|
1164 |
+
inkscape:connector-curvature="0"
|
1165 |
+
style="filter:url(#filter32824)" /><path
|
1166 |
+
d="m 465.454,83.978 c 0,-0.661 0.078,-1.212 0.234,-1.651 0.156,-0.439 0.38,-0.779 0.673,-1.02 0.293,-0.241 0.64,-0.411 1.042,-0.51 0.401,-0.099 0.866,-0.149 1.396,-0.149 h 1.899 c 0.755,0 1.386,0.048 1.891,0.142 0.505,0.094 0.919,0.255 1.24,0.482 0.321,0.227 0.56,0.541 0.716,0.942 0.156,0.402 0.234,0.919 0.234,1.551 v 1.219 h -6.603 v 0.439 c 0,0.368 0.13,0.624 0.39,0.765 0.26,0.142 0.687,0.213 1.282,0.213 h 0.836 c 0.359,0 0.642,-0.021 0.85,-0.064 0.208,-0.042 0.361,-0.101 0.461,-0.177 0.099,-0.076 0.163,-0.158 0.191,-0.248 0.028,-0.089 0.042,-0.2 0.042,-0.333 h 2.551 v 0.312 c 0,0.435 -0.09,0.799 -0.269,1.091 -0.18,0.293 -0.432,0.52 -0.758,0.68 -0.326,0.161 -0.701,0.274 -1.126,0.34 -0.425,0.066 -0.902,0.099 -1.431,0.099 h -2.04 c -0.52,0 -0.99,-0.038 -1.41,-0.114 -0.421,-0.075 -0.806,-0.231 -1.155,-0.468 -0.349,-0.236 -0.626,-0.586 -0.829,-1.049 -0.203,-0.463 -0.305,-1.063 -0.305,-1.8 v -0.692 z m 6.688,-0.609 c 0,-0.425 -0.127,-0.702 -0.383,-0.829 -0.255,-0.128 -0.789,-0.192 -1.601,-0.192 -0.473,0 -0.834,0.014 -1.084,0.042 -0.25,0.029 -0.442,0.076 -0.574,0.142 -0.133,0.066 -0.22,0.163 -0.262,0.291 -0.042,0.127 -0.064,0.309 -0.064,0.546 z"
|
1167 |
+
id="path88"
|
1168 |
+
inkscape:connector-curvature="0"
|
1169 |
+
style="filter:url(#filter32808)" /><path
|
1170 |
+
d="m 476.307,80.762 h 2.551 v 1.374 h 0.029 c 0.142,-0.539 0.448,-0.921 0.921,-1.148 0.472,-0.227 1.049,-0.34 1.729,-0.34 0.982,0 1.688,0.224 2.118,0.673 0.43,0.448 0.645,1.174 0.645,2.175 0,0.104 0,0.269 -0.014,0.496 -0.01,0.056 -0.014,0.104 -0.014,0.142 h -2.352 c 0,-0.491 -0.088,-0.841 -0.262,-1.049 -0.175,-0.208 -0.522,-0.312 -1.042,-0.312 -0.491,0 -0.878,0.099 -1.162,0.298 -0.283,0.198 -0.425,0.506 -0.425,0.921 v 3.996 h -2.721 v -7.226 z"
|
1171 |
+
id="path90"
|
1172 |
+
inkscape:connector-curvature="0"
|
1173 |
+
style="filter:url(#filter32792)" /><g
|
1174 |
+
id="g98"
|
1175 |
+
transform="translate(-557.291,-552.87)"
|
1176 |
+
style="filter:url(#filter32776)"><g
|
1177 |
+
id="g96"><rect
|
1178 |
+
id="rect94"
|
1179 |
+
height="1.5"
|
1180 |
+
width="372.21399"
|
1181 |
+
y="645.63"
|
1182 |
+
x="670.49597" /></g></g><path
|
1183 |
+
style="fill:#e52d27"
|
1184 |
+
inkscape:connector-curvature="0"
|
1185 |
+
id="path104"
|
1186 |
+
d="M 0,0 V 94.219 H 94.219 V 0 Z m 69.557,53.611 -38,21.635 c -4.582,2.609 -8.331,0.429 -8.331,-4.844 v -43.07 c 0,-5.273 3.749,-7.452 8.331,-4.844 l 38,21.635 c 4.582,2.61 4.582,6.879 0,9.488 z" /><g
|
1187 |
+
id="g116"
|
1188 |
+
transform="translate(-557.291,-552.87)"><path
|
1189 |
+
style="fill:#e52d27"
|
1190 |
+
inkscape:connector-curvature="0"
|
1191 |
+
id="path106"
|
1192 |
+
d="m 589.951,590.727 c -4.731,0 -1.304,0 -6.035,0 -2.84,0 -2.84,4.404 0,4.404 4.731,0 1.304,0 6.035,0 2.84,0 2.84,-4.404 0,-4.404 z" /><path
|
1193 |
+
style="fill:#e52d27"
|
1194 |
+
inkscape:connector-curvature="0"
|
1195 |
+
id="path108"
|
1196 |
+
d="m 589.951,599.535 c -4.731,0 -1.304,0 -6.035,0 -2.84,0 -2.84,4.404 0,4.404 4.731,0 1.304,0 6.035,0 2.84,0.001 2.84,-4.404 0,-4.404 z" /><path
|
1197 |
+
style="fill:#e52d27"
|
1198 |
+
inkscape:connector-curvature="0"
|
1199 |
+
id="path110"
|
1200 |
+
d="m 589.951,617.153 c -4.731,0 -1.304,0 -6.035,0 -2.84,0 -2.84,4.404 0,4.404 4.731,0 1.304,0 6.035,0 2.84,0 2.84,-4.404 0,-4.404 z" /><path
|
1201 |
+
style="fill:#e52d27"
|
1202 |
+
inkscape:connector-curvature="0"
|
1203 |
+
id="path112"
|
1204 |
+
d="m 589.951,608.344 c -4.731,0 -1.304,0 -6.035,0 -2.84,0 -2.84,4.404 0,4.404 4.731,0 1.304,0 6.035,0 2.84,0 2.84,-4.404 0,-4.404 z" /><path
|
1205 |
+
style="fill:#e52d27"
|
1206 |
+
inkscape:connector-curvature="0"
|
1207 |
+
id="path114"
|
1208 |
+
d="m 589.951,581.918 c -4.731,0 -1.304,0 -6.035,0 -2.84,0 -2.84,4.404 0,4.404 4.731,0 1.304,0 6.035,0 2.84,0 2.84,-4.404 0,-4.404 z" /></g><path
|
1209 |
+
style="fill:none"
|
1210 |
+
inkscape:connector-curvature="0"
|
1211 |
+
id="path118"
|
1212 |
+
d="M 59.488,23.077 C 55.255,15.941 47.465,11.072 38.705,11.072 c -13.16,0 -24.142,10.982 -24.142,24.142 0,3.537 0.798,6.913 2.214,9.964 -4.157,4.353 -6.741,10.214 -6.741,16.592 0,13.16 10.982,24.142 24.142,24.142 0.474,0 0.943,-0.019 1.411,-0.047 l -4.873,-4.844 -5.805,-5.805 0.011,-0.006 c 1.524,1.448 3.931,1.587 6.636,0.047 l 38,-21.635 c 2.797,-1.593 3.877,-3.803 3.259,-5.878 l 0.005,-0.003 4.581,4.604 1.834,1.787 C 79.958,51.866 80.35,49.464 80.35,46.983 80.349,34.934 71.142,24.718 59.488,23.077 Z" /><g
|
1213 |
+
id="g127"
|
1214 |
+
transform="translate(-557.291,-552.87)"><linearGradient
|
1215 |
+
y2="637.09222"
|
1216 |
+
x2="624.36292"
|
1217 |
+
y1="748.50519"
|
1218 |
+
x1="692.52698"
|
1219 |
+
gradientUnits="userSpaceOnUse"
|
1220 |
+
id="SVGID_1_"><stop
|
1221 |
+
id="stop120"
|
1222 |
+
style="stop-color:#231F20;stop-opacity:0"
|
1223 |
+
offset="0" /><stop
|
1224 |
+
id="stop122"
|
1225 |
+
style="stop-color:#231F20"
|
1226 |
+
offset="1" /></linearGradient><path
|
1227 |
+
style="opacity:0.4;fill:url(#SVGID_1_)"
|
1228 |
+
inkscape:connector-curvature="0"
|
1229 |
+
id="path125"
|
1230 |
+
d="m 636.527,607.001 -1.834,-1.787 -4.581,-4.604 -0.005,0.003 c 0.618,2.075 -0.462,4.285 -3.259,5.878 l -38,21.635 c -2.704,1.54 -5.111,1.401 -6.636,-0.047 l -0.011,0.006 5.805,5.805 4.873,4.844 8.511,8.395 50.118,-0.041 v -25.532 z" /></g></svg>
|
advanced-responsive-video-embedder.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: ARVE Advanced Responsive Video Embedder
|
4 |
+
* Plugin URI: https://nextgenthemes.com/plugins/arve-pro/
|
5 |
+
* Description: Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine.
|
6 |
+
* Version: 8.9.5
|
7 |
+
* Author: Nicolas Jonas
|
8 |
+
* Author URI: https://nextgenthemes.com
|
9 |
+
* License: GPL-3.0
|
10 |
+
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
* Text Domain: advanced-responsive-video-embedder
|
12 |
+
* Domain Path: /languages
|
13 |
+
* GitHub Plugin URI: https://github.com/nextgenthemes/advanced-responsive-video-embedder
|
14 |
+
* GitHub Branch: master
|
15 |
+
*/
|
16 |
+
|
17 |
+
if ( ! defined( 'WPINC' ) ) {
|
18 |
+
die;
|
19 |
+
}
|
20 |
+
|
21 |
+
define( 'ARVE_SLUG', 'advanced-responsive-video-embedder' );
|
22 |
+
define( 'ARVE_VERSION', '8.9.5' );
|
23 |
+
define( 'ARVE_PRO_VERSION_REQUIRED', '4.0.0' );
|
24 |
+
|
25 |
+
define( 'ARVE_URL', plugin_dir_url( __FILE__ ) );
|
26 |
+
define( 'ARVE_PUBLIC_URL', ARVE_URL . 'public/' );
|
27 |
+
define( 'ARVE_ADMIN_URL', ARVE_URL . 'admin/' );
|
28 |
+
|
29 |
+
define( 'ARVE_PATH', plugin_dir_path( __FILE__ ) );
|
30 |
+
define( 'ARVE_NUM_TRACKS', 10 );
|
31 |
+
|
32 |
+
#add_action( 'init', 'arve_init' );
|
33 |
+
arve_init();
|
34 |
+
|
35 |
+
function arve_init() {
|
36 |
+
|
37 |
+
add_option( 'arve_install_date', current_time( 'timestamp' ) );
|
38 |
+
|
39 |
+
require_once __DIR__ . '/admin/class-arve-admin-notice-factory.php';
|
40 |
+
|
41 |
+
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
|
42 |
+
add_action( 'admin_init', 'arve_php_outdated_message' );
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
require_once __DIR__ . '/admin/class-nextgenthemes-plugin-updater.php';
|
47 |
+
require_once __DIR__ . '/admin/functions-licensing.php';
|
48 |
+
require_once __DIR__ . '/admin/functions-admin.php';
|
49 |
+
require_once __DIR__ . '/public/functions-enqueue.php';
|
50 |
+
require_once __DIR__ . '/public/functions-html-output.php';
|
51 |
+
require_once __DIR__ . '/public/functions-misc.php';
|
52 |
+
require_once __DIR__ . '/public/functions-shortcode-data.php';
|
53 |
+
require_once __DIR__ . '/public/functions-shortcode-filters.php';
|
54 |
+
require_once __DIR__ . '/public/functions-shortcodes.php';
|
55 |
+
require_once __DIR__ . '/public/functions-thumbnails.php';
|
56 |
+
require_once __DIR__ . '/public/functions-url-handlers.php';
|
57 |
+
require_once __DIR__ . '/public/functions-validation.php';
|
58 |
+
require_once __DIR__ . '/shared/functions-shared.php';
|
59 |
+
|
60 |
+
add_action( 'plugins_loaded', 'arve_load_plugin_textdomain' );
|
61 |
+
|
62 |
+
# Public hooks
|
63 |
+
add_action( 'plugins_loaded', 'arve_create_shortcodes', 999 );
|
64 |
+
add_action( 'plugins_loaded', 'arve_create_url_handlers', 999 );
|
65 |
+
add_action( 'plugins_loaded', 'arve_oembed_remove_providers', 998 );
|
66 |
+
add_action( 'wp_enqueue_scripts', 'arve_register_styles', 0 );
|
67 |
+
add_action( 'wp_enqueue_scripts', 'arve_register_scripts', 0 );
|
68 |
+
add_action( 'wp_enqueue_scripts', 'arve_maybe_enqueue_assets' );
|
69 |
+
add_action( 'wp_video_shortcode_override', 'arve_wp_video_shortcode_override', 10, 4 );
|
70 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
71 |
+
add_filter( 'language_attributes', 'arve_html_id' );
|
72 |
+
|
73 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_sanitise', -12 );
|
74 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_detect_provider_and_id_from_url', -10 );
|
75 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_detect_youtube_playlist', -8 );
|
76 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_get_media_gallery_video', -7 );
|
77 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_detect_html5', -6 );
|
78 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_iframe_fallback', -4 );
|
79 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_validate', -2 );
|
80 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_get_media_gallery_thumbnail', 0 );
|
81 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_set_fixed_dimensions', 15 );
|
82 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_attr', 20 );
|
83 |
+
add_filter( 'shortcode_atts_arve', 'arve_sc_filter_build_tracks_html', 20 );
|
84 |
+
|
85 |
+
# Admin Hooks
|
86 |
+
add_action( 'admin_enqueue_scripts', 'arve_admin_enqueue_scripts' );
|
87 |
+
add_action( 'admin_enqueue_scripts', 'arve_admin_enqueue_styles', 99 );
|
88 |
+
add_action( 'admin_init', 'arve_action_admin_init_setup_messages' );
|
89 |
+
add_action( 'admin_init', 'arve_register_settings_debug', 99 );
|
90 |
+
add_action( 'admin_init', 'arve_register_settings' );
|
91 |
+
add_action( 'admin_menu', 'arve_add_plugin_admin_menu' );
|
92 |
+
add_action( 'media_buttons', 'arve_add_media_button', 11 );
|
93 |
+
add_action( 'register_shortcode_ui', 'arve_register_shortcode_ui' );
|
94 |
+
add_action( 'wp_dashboard_setup', 'arve_add_dashboard_widget' );
|
95 |
+
|
96 |
+
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'arve_add_action_links' );
|
97 |
+
add_filter( 'mce_css', 'arve_mce_css' );
|
98 |
+
}
|
99 |
+
|
100 |
+
function arve_php_outdated_message() {
|
101 |
+
|
102 |
+
$msg = sprintf(
|
103 |
+
__( 'ARVE requres at least PHP version 5.3! Your PHP version is %s and has reached End Of Life (insecure and slow). You should ask your host to update it for you not only to make ARVE work but to make your site faster and more secure. Wordpress.org recommends PHP 7.0, I use 7.1 at nextgenthemes.com', ARVE_SLUG ),
|
104 |
+
PHP_VERSION
|
105 |
+
);
|
106 |
+
|
107 |
+
new ARVE_Admin_Notice_Factory( 'arve-php-outdated', "<p>$msg</p>", false );
|
108 |
+
}
|
composer.lock
ADDED
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_readme": [
|
3 |
+
"This file locks the dependencies of your project to a known state",
|
4 |
+
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
+
"This file is @generated automatically"
|
6 |
+
],
|
7 |
+
"content-hash": "7a1fe94550ac8f3eaab0f9ae184b859e",
|
8 |
+
"packages": [
|
9 |
+
{
|
10 |
+
"name": "composer/installers",
|
11 |
+
"version": "v1.5.0",
|
12 |
+
"source": {
|
13 |
+
"type": "git",
|
14 |
+
"url": "https://github.com/composer/installers.git",
|
15 |
+
"reference": "049797d727261bf27f2690430d935067710049c2"
|
16 |
+
},
|
17 |
+
"dist": {
|
18 |
+
"type": "zip",
|
19 |
+
"url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2",
|
20 |
+
"reference": "049797d727261bf27f2690430d935067710049c2",
|
21 |
+
"shasum": ""
|
22 |
+
},
|
23 |
+
"require": {
|
24 |
+
"composer-plugin-api": "^1.0"
|
25 |
+
},
|
26 |
+
"replace": {
|
27 |
+
"roundcube/plugin-installer": "*",
|
28 |
+
"shama/baton": "*"
|
29 |
+
},
|
30 |
+
"require-dev": {
|
31 |
+
"composer/composer": "1.0.*@dev",
|
32 |
+
"phpunit/phpunit": "^4.8.36"
|
33 |
+
},
|
34 |
+
"type": "composer-plugin",
|
35 |
+
"extra": {
|
36 |
+
"class": "Composer\\Installers\\Plugin",
|
37 |
+
"branch-alias": {
|
38 |
+
"dev-master": "1.0-dev"
|
39 |
+
}
|
40 |
+
},
|
41 |
+
"autoload": {
|
42 |
+
"psr-4": {
|
43 |
+
"Composer\\Installers\\": "src/Composer/Installers"
|
44 |
+
}
|
45 |
+
},
|
46 |
+
"notification-url": "https://packagist.org/downloads/",
|
47 |
+
"license": [
|
48 |
+
"MIT"
|
49 |
+
],
|
50 |
+
"authors": [
|
51 |
+
{
|
52 |
+
"name": "Kyle Robinson Young",
|
53 |
+
"email": "kyle@dontkry.com",
|
54 |
+
"homepage": "https://github.com/shama"
|
55 |
+
}
|
56 |
+
],
|
57 |
+
"description": "A multi-framework Composer library installer",
|
58 |
+
"homepage": "https://composer.github.io/installers/",
|
59 |
+
"keywords": [
|
60 |
+
"Craft",
|
61 |
+
"Dolibarr",
|
62 |
+
"Eliasis",
|
63 |
+
"Hurad",
|
64 |
+
"ImageCMS",
|
65 |
+
"Kanboard",
|
66 |
+
"Lan Management System",
|
67 |
+
"MODX Evo",
|
68 |
+
"Mautic",
|
69 |
+
"Maya",
|
70 |
+
"OXID",
|
71 |
+
"Plentymarkets",
|
72 |
+
"Porto",
|
73 |
+
"RadPHP",
|
74 |
+
"SMF",
|
75 |
+
"Thelia",
|
76 |
+
"WolfCMS",
|
77 |
+
"agl",
|
78 |
+
"aimeos",
|
79 |
+
"annotatecms",
|
80 |
+
"attogram",
|
81 |
+
"bitrix",
|
82 |
+
"cakephp",
|
83 |
+
"chef",
|
84 |
+
"cockpit",
|
85 |
+
"codeigniter",
|
86 |
+
"concrete5",
|
87 |
+
"croogo",
|
88 |
+
"dokuwiki",
|
89 |
+
"drupal",
|
90 |
+
"eZ Platform",
|
91 |
+
"elgg",
|
92 |
+
"expressionengine",
|
93 |
+
"fuelphp",
|
94 |
+
"grav",
|
95 |
+
"installer",
|
96 |
+
"itop",
|
97 |
+
"joomla",
|
98 |
+
"kohana",
|
99 |
+
"laravel",
|
100 |
+
"lavalite",
|
101 |
+
"lithium",
|
102 |
+
"magento",
|
103 |
+
"majima",
|
104 |
+
"mako",
|
105 |
+
"mediawiki",
|
106 |
+
"modulework",
|
107 |
+
"modx",
|
108 |
+
"moodle",
|
109 |
+
"osclass",
|
110 |
+
"phpbb",
|
111 |
+
"piwik",
|
112 |
+
"ppi",
|
113 |
+
"puppet",
|
114 |
+
"pxcms",
|
115 |
+
"reindex",
|
116 |
+
"roundcube",
|
117 |
+
"shopware",
|
118 |
+
"silverstripe",
|
119 |
+
"sydes",
|
120 |
+
"symfony",
|
121 |
+
"typo3",
|
122 |
+
"wordpress",
|
123 |
+
"yawik",
|
124 |
+
"zend",
|
125 |
+
"zikula"
|
126 |
+
],
|
127 |
+
"time": "2017-12-29T09:13:20+00:00"
|
128 |
+
},
|
129 |
+
{
|
130 |
+
"name": "vimeo/vimeo-api",
|
131 |
+
"version": "2.0.0",
|
132 |
+
"source": {
|
133 |
+
"type": "git",
|
134 |
+
"url": "https://github.com/vimeo/vimeo.php.git",
|
135 |
+
"reference": "9fbf705cf4885282183744c04f3fb10793768911"
|
136 |
+
},
|
137 |
+
"dist": {
|
138 |
+
"type": "zip",
|
139 |
+
"url": "https://api.github.com/repos/vimeo/vimeo.php/zipball/9fbf705cf4885282183744c04f3fb10793768911",
|
140 |
+
"reference": "9fbf705cf4885282183744c04f3fb10793768911",
|
141 |
+
"shasum": ""
|
142 |
+
},
|
143 |
+
"require": {
|
144 |
+
"ext-curl": "*",
|
145 |
+
"ext-json": "*",
|
146 |
+
"php": ">=5.3.0"
|
147 |
+
},
|
148 |
+
"require-dev": {
|
149 |
+
"phpunit/phpunit": "^4.8"
|
150 |
+
},
|
151 |
+
"type": "library",
|
152 |
+
"autoload": {
|
153 |
+
"psr-4": {
|
154 |
+
"Vimeo\\": "src/Vimeo"
|
155 |
+
}
|
156 |
+
},
|
157 |
+
"notification-url": "https://packagist.org/downloads/",
|
158 |
+
"license": [
|
159 |
+
"Apache-2.0"
|
160 |
+
],
|
161 |
+
"authors": [
|
162 |
+
{
|
163 |
+
"name": "Vimeo",
|
164 |
+
"homepage": "http://vimeo.com"
|
165 |
+
}
|
166 |
+
],
|
167 |
+
"description": "Official PHP library for the Vimeo API.",
|
168 |
+
"homepage": "https://github.com/vimeo/vimeo.php",
|
169 |
+
"keywords": [
|
170 |
+
"video",
|
171 |
+
"vimeo"
|
172 |
+
],
|
173 |
+
"time": "2018-02-06T19:06:58+00:00"
|
174 |
+
}
|
175 |
+
],
|
176 |
+
"packages-dev": [],
|
177 |
+
"aliases": [],
|
178 |
+
"minimum-stability": "stable",
|
179 |
+
"stability-flags": [],
|
180 |
+
"prefer-stable": false,
|
181 |
+
"prefer-lowest": false,
|
182 |
+
"platform": [],
|
183 |
+
"platform-dev": []
|
184 |
+
}
|
public/arve.css
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#arve .arve-wrapper,
|
2 |
+
#tinymce .arve-wrapper {
|
3 |
+
display: block;
|
4 |
+
margin-bottom: 1.5em;
|
5 |
+
width: 100%;
|
6 |
+
}
|
7 |
+
|
8 |
+
#arve .arve-wrapper::after,
|
9 |
+
#tinymce .arve-wrapper::after {
|
10 |
+
content: "";
|
11 |
+
display: table;
|
12 |
+
clear: both;
|
13 |
+
}
|
14 |
+
|
15 |
+
#arve .arve-wrapper.alignright,
|
16 |
+
#tinymce .arve-wrapper.alignright {
|
17 |
+
margin-top: .4em;
|
18 |
+
margin-left: 1.5em;
|
19 |
+
}
|
20 |
+
|
21 |
+
#arve .arve-wrapper.alignleft,
|
22 |
+
#tinymce .arve-wrapper.alignleft {
|
23 |
+
margin-top: .4em;
|
24 |
+
margin-right: 1.5em;
|
25 |
+
}
|
26 |
+
|
27 |
+
#arve .arve-embed-container,
|
28 |
+
#tinymce .arve-embed-container {
|
29 |
+
position: relative;
|
30 |
+
display: block;
|
31 |
+
padding: 0;
|
32 |
+
padding-bottom: 56.25%;
|
33 |
+
margin: 0;
|
34 |
+
height: 0;
|
35 |
+
overflow: hidden;
|
36 |
+
}
|
37 |
+
|
38 |
+
#arve .arve-thumbnail,
|
39 |
+
#tinymce .arve-thumbnail,
|
40 |
+
#arve .arve-play-btn,
|
41 |
+
#tinymce .arve-play-btn,
|
42 |
+
#arve .arve-iframe,
|
43 |
+
#tinymce .arve-iframe {
|
44 |
+
position: absolute;
|
45 |
+
padding: 0;
|
46 |
+
margin: 0;
|
47 |
+
top: 0;
|
48 |
+
left: 0;
|
49 |
+
bottom: 0;
|
50 |
+
height: 100%;
|
51 |
+
width: 100%;
|
52 |
+
border: 0;
|
53 |
+
}
|
54 |
+
|
55 |
+
#arve .arve-video,
|
56 |
+
#tinymce .arve-video {
|
57 |
+
padding: 0;
|
58 |
+
margin: 0;
|
59 |
+
width: 100%;
|
60 |
+
}
|
61 |
+
|
62 |
+
#arve .arve-promote-link,
|
63 |
+
#tinymce .arve-promote-link {
|
64 |
+
float: right;
|
65 |
+
font-family: "Open Sans", "Sagoe UI", "Arvo", "Lato", Arial, sans-serif;
|
66 |
+
font-size: .8em;
|
67 |
+
}
|
68 |
+
|
69 |
+
.arve-hidden {
|
70 |
+
display: none !important;
|
71 |
+
}
|
public/arve.js
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
'use strict';
|
3 |
+
|
4 |
+
function remove_unwanted_stuff() {
|
5 |
+
$('.arve-wrapper').find('p, .video-wrap, .fluid-width-video-wrapper, .fluid-vids').contents().unwrap();
|
6 |
+
$('.arve-wrapper br').remove();
|
7 |
+
$('.arve-iframe, .arve-video').removeAttr('width height style');
|
8 |
+
};
|
9 |
+
|
10 |
+
function global_id() {
|
11 |
+
|
12 |
+
if ( $( 'html[id="arve"]' ).length ) {
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
|
16 |
+
if ( $( 'html[id]' ).length <= 0 ) {
|
17 |
+
|
18 |
+
$( 'html' ).attr( 'id', 'arve' );
|
19 |
+
|
20 |
+
} else if ( $( 'body[id]' ).length <= 0 ) {
|
21 |
+
|
22 |
+
$( 'body' ).attr( 'id', 'arve' );
|
23 |
+
|
24 |
+
} else {
|
25 |
+
|
26 |
+
$( 'body' ).wrapInner( '<div id="arve">' );
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
remove_unwanted_stuff();
|
31 |
+
global_id();
|
32 |
+
|
33 |
+
$( document ).ready( function() {
|
34 |
+
remove_unwanted_stuff();
|
35 |
+
global_id();
|
36 |
+
} );
|
37 |
+
|
38 |
+
}(jQuery));
|
public/arve.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#arve .arve-wrapper,#tinymce .arve-wrapper{display:block;margin-bottom:1.5em;width:100%}#arve .arve-wrapper::after,#tinymce .arve-wrapper::after{content:"";display:table;clear:both}#arve .arve-wrapper.alignright,#tinymce .arve-wrapper.alignright{margin-top:.4em;margin-left:1.5em}#arve .arve-wrapper.alignleft,#tinymce .arve-wrapper.alignleft{margin-top:.4em;margin-right:1.5em}#arve .arve-embed-container,#tinymce .arve-embed-container{position:relative;display:block;padding:0;padding-bottom:56.25%;margin:0;height:0;overflow:hidden}#arve .arve-iframe,#arve .arve-play-btn,#arve .arve-thumbnail,#tinymce .arve-iframe,#tinymce .arve-play-btn,#tinymce .arve-thumbnail{position:absolute;padding:0;margin:0;top:0;left:0;bottom:0;height:100%;width:100%;border:0}#arve .arve-video,#tinymce .arve-video{padding:0;margin:0;width:100%}#arve .arve-promote-link,#tinymce .arve-promote-link{float:right;font-family:"Open Sans","Sagoe UI",Arvo,Lato,Arial,sans-serif;font-size:.8em}.arve-hidden{display:none!important}
|
public/arve.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){"use strict";function r(){e(".arve-wrapper").find("p, .video-wrap, .fluid-width-video-wrapper, .fluid-vids").contents().unwrap(),e(".arve-wrapper br").remove(),e(".arve-iframe, .arve-video").removeAttr("width height style")}function t(){e('html[id="arve"]').length||(e("html[id]").length<=0?e("html").attr("id","arve"):e("body[id]").length<=0?e("body").attr("id","arve"):e("body").wrapInner('<div id="arve">'))}r(),t(),e(document).ready(function(){r(),t()})}(jQuery);
|
public/functions-enqueue.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_register_styles() {
|
4 |
+
|
5 |
+
$min = arve_get_min_suffix();
|
6 |
+
|
7 |
+
wp_register_style(
|
8 |
+
ARVE_SLUG,
|
9 |
+
ARVE_PUBLIC_URL . "arve$min.css",
|
10 |
+
array(),
|
11 |
+
ARVE_VERSION
|
12 |
+
);
|
13 |
+
}
|
14 |
+
|
15 |
+
function arve_register_scripts() {
|
16 |
+
|
17 |
+
$min = arve_get_min_suffix();
|
18 |
+
|
19 |
+
wp_register_script(
|
20 |
+
ARVE_SLUG,
|
21 |
+
ARVE_PUBLIC_URL . "arve$min.js",
|
22 |
+
array( 'jquery' ),
|
23 |
+
ARVE_VERSION,
|
24 |
+
true
|
25 |
+
);
|
26 |
+
}
|
27 |
+
|
28 |
+
function arve_maybe_enqueue_assets() {
|
29 |
+
|
30 |
+
$options = arve_get_options();
|
31 |
+
|
32 |
+
if ( $options['always_enqueue_assets'] ) {
|
33 |
+
wp_enqueue_style( ARVE_SLUG );
|
34 |
+
wp_enqueue_script( ARVE_SLUG );
|
35 |
+
|
36 |
+
wp_enqueue_style( 'arve-pro' );
|
37 |
+
wp_enqueue_script( 'arve-pro' );
|
38 |
+
}
|
39 |
+
}
|
public/functions-html-output.php
ADDED
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_html_id( $html_attr ) {
|
4 |
+
|
5 |
+
if( ! arve_contains( $html_attr, 'id=' ) ) {
|
6 |
+
$html_attr .= ' id="arve"';
|
7 |
+
}
|
8 |
+
|
9 |
+
return $html_attr;
|
10 |
+
}
|
11 |
+
|
12 |
+
function arve_get_var_dump( $var ) {
|
13 |
+
ob_start();
|
14 |
+
var_dump( $var );
|
15 |
+
return ob_get_clean();
|
16 |
+
};
|
17 |
+
|
18 |
+
function arve_get_debug_info( $input_html, $atts, $input_atts ) {
|
19 |
+
|
20 |
+
$html = '';
|
21 |
+
|
22 |
+
if ( isset( $_GET['arve-debug-options'] ) ) {
|
23 |
+
|
24 |
+
static $show_options_debug = true;
|
25 |
+
|
26 |
+
$options = get_option( 'arve_options_main' );
|
27 |
+
$options['shortcodes'] = get_option( 'arve_options_shortcodes' );
|
28 |
+
$options['params'] = get_option( 'arve_options_params' );
|
29 |
+
|
30 |
+
if ( $show_options_debug ) {
|
31 |
+
$html .= sprintf( 'Options: <pre>%s</pre>', arve_get_var_dump( $options ) );
|
32 |
+
}
|
33 |
+
$show_options_debug = false;
|
34 |
+
}
|
35 |
+
|
36 |
+
$pre_style = ''
|
37 |
+
. 'background-color: #111;'
|
38 |
+
. 'color: #eee;'
|
39 |
+
. 'font-size: 15px;'
|
40 |
+
. 'white-space: pre-wrap;'
|
41 |
+
. 'word-wrap: break-word;';
|
42 |
+
|
43 |
+
if ( ! empty( $_GET['arve-debug-attr'] ) ) {
|
44 |
+
$html .= sprintf(
|
45 |
+
'<pre style="%s">attr[%s]: %s</pre>',
|
46 |
+
esc_attr( $pre_style ),
|
47 |
+
esc_html( $_GET['arve-debug-attr'] ),
|
48 |
+
arve_get_var_dump( $atts[ $_GET['arve-debug-attr'] ] )
|
49 |
+
);
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( isset( $_GET['arve-debug-atts'] ) ) {
|
53 |
+
$html .= sprintf( '<pre style="%s">$atts: %s</pre>', esc_attr( $pre_style ), arve_get_var_dump( $input_atts ) );
|
54 |
+
$html .= sprintf( '<pre style="%s">$arve: %s</pre>', esc_attr( $pre_style ), arve_get_var_dump( $atts ) );
|
55 |
+
}
|
56 |
+
|
57 |
+
if ( isset( $_GET['arve-debug-html'] ) ) {
|
58 |
+
$html .= sprintf( '<pre style="%s"">%s</pre>', esc_attr( $pre_style ), esc_html( $input_html ) );
|
59 |
+
}
|
60 |
+
|
61 |
+
return $html;
|
62 |
+
}
|
63 |
+
|
64 |
+
function arve_build_meta_html( $atts ) {
|
65 |
+
|
66 |
+
$meta = '';
|
67 |
+
|
68 |
+
if ( ! empty( $atts['sources'] ) ) {
|
69 |
+
|
70 |
+
$first_source = arve_get_first_array_value( $atts['sources'] );
|
71 |
+
|
72 |
+
$meta .= sprintf( '<meta itemprop="contentURL" content="%s">', esc_attr( $first_source['src'] ) );
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( ! empty( $atts['iframe_src'] ) ) {
|
76 |
+
$meta .= sprintf( '<meta itemprop="embedURL" content="%s">', esc_attr( $atts['iframe_src'] ) );
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( ! empty( $atts['upload_date'] ) ) {
|
80 |
+
$meta .= sprintf( '<meta itemprop="uploadDate" content="%s">', esc_attr( $atts['upload_date'] ) );
|
81 |
+
}
|
82 |
+
|
83 |
+
if ( ! empty( $atts['duration'] ) ) {
|
84 |
+
$meta .= sprintf( '<meta itemprop="duration" content="PT%s">', esc_attr( $atts['duration'] ) );
|
85 |
+
}
|
86 |
+
|
87 |
+
if( ! empty( $atts['img_src'] ) ) :
|
88 |
+
|
89 |
+
if( in_array( $atts['mode'], array( 'lazyload', 'lazyload-lightbox' ) ) ) {
|
90 |
+
|
91 |
+
$meta .= sprintf(
|
92 |
+
'<img%s>',
|
93 |
+
arve_attr( array(
|
94 |
+
'class' => 'arve-thumbnail',
|
95 |
+
'data-object-fit' => true,
|
96 |
+
'itemprop' => 'thumbnailUrl',
|
97 |
+
'src' => $atts['img_src'],
|
98 |
+
'srcset' => ! empty( $atts['img_srcset'] ) ? $atts['img_srcset'] : false,
|
99 |
+
#'sizes' => '(max-width: 700px) 100vw, 1280px',
|
100 |
+
'alt' => __( 'Video Thumbnail', ARVE_SLUG ),
|
101 |
+
) )
|
102 |
+
);
|
103 |
+
|
104 |
+
} else {
|
105 |
+
|
106 |
+
$meta .= sprintf(
|
107 |
+
'<meta%s>',
|
108 |
+
arve_attr( array(
|
109 |
+
'itemprop' => 'thumbnailUrl',
|
110 |
+
'content' => $atts['img_src'],
|
111 |
+
) )
|
112 |
+
);
|
113 |
+
}
|
114 |
+
|
115 |
+
endif;
|
116 |
+
|
117 |
+
if ( ! empty( $atts['title'] ) && in_array( $atts['mode'], array( 'lazyload', 'lazyload-lightbox' ) ) && empty( $atts['hide_title'] ) ) {
|
118 |
+
$meta .= '<h5 itemprop="name" class="arve-title">' . trim( $atts['title'] ) . '</h5>';
|
119 |
+
} elseif( ! empty( $atts['title'] ) ) {
|
120 |
+
$meta .= sprintf( '<meta itemprop="name" content="%s">', esc_attr( trim( $atts['title'] ) ) );
|
121 |
+
}
|
122 |
+
|
123 |
+
if ( ! empty( $atts['description'] ) ) {
|
124 |
+
$meta .= '<span itemprop="description" class="arve-description arve-hidden">' . esc_html( trim( $atts['description'] ) ) . '</span>';
|
125 |
+
}
|
126 |
+
|
127 |
+
return $meta;
|
128 |
+
}
|
129 |
+
|
130 |
+
function arve_build_promote_link_html( $arve_link ) {
|
131 |
+
|
132 |
+
if ( $arve_link ) {
|
133 |
+
return sprintf(
|
134 |
+
'<a href="%s" title="%s" class="arve-promote-link" target="_blank">%s</a>',
|
135 |
+
esc_url( 'https://nextgenthemes.com/plugins/arve-pro/' ),
|
136 |
+
esc_attr( __( 'Embedded with ARVE Advanced Responsive Video Embedder WordPress plugin', ARVE_SLUG) ),
|
137 |
+
esc_html__( 'ARVE', ARVE_SLUG )
|
138 |
+
);
|
139 |
+
}
|
140 |
+
|
141 |
+
return '';
|
142 |
+
}
|
143 |
+
|
144 |
+
function arve_arve_embed_container( $html, $atts ) {
|
145 |
+
|
146 |
+
$attr['class'] = 'arve-embed-container';
|
147 |
+
|
148 |
+
if ( false === $atts['aspect_ratio'] ) {
|
149 |
+
$attr['style'] = 'height:auto;padding:0';
|
150 |
+
} else {
|
151 |
+
$attr['style'] = sprintf( 'padding-bottom:%F%%', arve_aspect_ratio_to_percentage( $atts['aspect_ratio'] ) );
|
152 |
+
}
|
153 |
+
|
154 |
+
return sprintf( '<div%s>%s</div>', arve_attr( $attr ), $html );
|
155 |
+
}
|
156 |
+
|
157 |
+
function arve_arve_wrapper( $html, $atts ) {
|
158 |
+
|
159 |
+
$element = ( 'link-lightbox' == $atts['mode'] ) ? 'span' : 'div';
|
160 |
+
|
161 |
+
return sprintf(
|
162 |
+
'<%s%s>%s</%s>',
|
163 |
+
$element,
|
164 |
+
arve_attr( $atts['wrapper_attr'] ),
|
165 |
+
$html,
|
166 |
+
$element
|
167 |
+
);
|
168 |
+
}
|
169 |
+
|
170 |
+
function arve_video_or_iframe( $atts ) {
|
171 |
+
|
172 |
+
switch( $atts['provider'] ) {
|
173 |
+
|
174 |
+
case 'veoh':
|
175 |
+
return arve_create_object( $atts );
|
176 |
+
break;
|
177 |
+
case 'html5':
|
178 |
+
return arve_create_video_tag( $atts );
|
179 |
+
break;
|
180 |
+
default:
|
181 |
+
return arve_create_iframe_tag( $atts );
|
182 |
+
break;
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
*
|
188 |
+
*
|
189 |
+
* @since 2.6.0
|
190 |
+
*/
|
191 |
+
function arve_create_iframe_tag( $a ) {
|
192 |
+
|
193 |
+
if ( in_array( $a['mode'], array( 'lazyload', 'lazyload-lightbox', 'link-lightbox' ) ) ) {
|
194 |
+
$html = sprintf(
|
195 |
+
'<span class="arve-lazyload"%s></span>',
|
196 |
+
arve_attr( arve_prefix_array_keys( 'data-', $a['iframe_attr'] ) )
|
197 |
+
);
|
198 |
+
} else {
|
199 |
+
$html = sprintf( '<iframe%s></iframe>', arve_attr( $a['iframe_attr'] ) );
|
200 |
+
}
|
201 |
+
|
202 |
+
return apply_filters( 'arve_iframe_tag', $html, $a, $a['iframe_attr'] );
|
203 |
+
}
|
204 |
+
|
205 |
+
function arve_create_video_tag( $a ) {
|
206 |
+
|
207 |
+
$html = sprintf(
|
208 |
+
'<video%s>%s%s</video>',
|
209 |
+
arve_attr( $a['video_attr'] ),
|
210 |
+
$a['video_sources_html'],
|
211 |
+
$a['video_tracks_html']
|
212 |
+
);
|
213 |
+
|
214 |
+
return apply_filters( 'arve_video_tag', $html, $a, $a['video_attr'] );
|
215 |
+
}
|
216 |
+
|
217 |
+
function arve_create_object_tag( $a ) {
|
218 |
+
|
219 |
+
$html = sprintf(
|
220 |
+
'<video%s>%s%s</video>',
|
221 |
+
arve_attr( $a['video_attr'] ),
|
222 |
+
$a['video_sources_html'],
|
223 |
+
$a['video_tracks_html']
|
224 |
+
);
|
225 |
+
|
226 |
+
return apply_filters( 'arve_video_tag', $html, $a, $a['video_attr'] );
|
227 |
+
}
|
228 |
+
|
229 |
+
function arve_error( $message ) {
|
230 |
+
|
231 |
+
return sprintf(
|
232 |
+
'<p><strong>%s</strong> %s</p>',
|
233 |
+
__('<abbr title="Advanced Responsive Video Embedder">ARVE</abbr> Error:', ARVE_SLUG ),
|
234 |
+
$message
|
235 |
+
);
|
236 |
+
}
|
237 |
+
|
238 |
+
function arve_output_errors( $atts ) {
|
239 |
+
|
240 |
+
$errors = '';
|
241 |
+
|
242 |
+
foreach ( $atts as $key => $value ) {
|
243 |
+
if( is_wp_error( $value ) ) {
|
244 |
+
$errors .= arve_error( $value->get_error_message() );
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
return $errors;
|
249 |
+
}
|
public/functions-misc.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_is_bool_option( $array ) {
|
4 |
+
|
5 |
+
$yes_no = array( '' => 1, 'yes' => 1, 'no' => 1 );
|
6 |
+
|
7 |
+
$check = array_diff_key( $array, $yes_no );
|
8 |
+
|
9 |
+
if( empty( $check ) ) {
|
10 |
+
return 'bool';
|
11 |
+
} else {
|
12 |
+
return $array;
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
function arve_get_pre_style() {
|
17 |
+
return '';
|
18 |
+
}
|
19 |
+
|
20 |
+
function arve_load_plugin_textdomain() {
|
21 |
+
|
22 |
+
load_plugin_textdomain(
|
23 |
+
ARVE_SLUG,
|
24 |
+
false,
|
25 |
+
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
function arve_get_first_array_value( $array ) {
|
30 |
+
reset( $array );
|
31 |
+
$key = key( $array );
|
32 |
+
return $array[ $key ];
|
33 |
+
}
|
34 |
+
|
35 |
+
function arve_prefix_array_keys( $keyprefix, $array ) {
|
36 |
+
|
37 |
+
foreach( $array as $key => $value ) {
|
38 |
+
$array[ $keyprefix . $key ] = $value;
|
39 |
+
unset( $array[ $key ] );
|
40 |
+
}
|
41 |
+
|
42 |
+
return $array;
|
43 |
+
}
|
44 |
+
|
45 |
+
function arve_check_filetype( $url, $ext ) {
|
46 |
+
|
47 |
+
$check = wp_check_filetype( $url, wp_get_mime_types() );
|
48 |
+
|
49 |
+
if ( strtolower( $check['ext'] ) === $ext ) {
|
50 |
+
return $check['type'];
|
51 |
+
} else {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Calculates seconds based on youtube times
|
58 |
+
*
|
59 |
+
* @param string $yttime The '1h25m13s' part of youtube URLs
|
60 |
+
*
|
61 |
+
* @return int Starttime in seconds
|
62 |
+
*/
|
63 |
+
function arve_youtube_time_to_seconds( $yttime ) {
|
64 |
+
|
65 |
+
$format = false;
|
66 |
+
$hours = $minutes = $seconds = 0;
|
67 |
+
|
68 |
+
$pattern['hms'] = '/([0-9]+)h([0-9]+)m([0-9]+)s/'; // hours, minutes, seconds
|
69 |
+
$pattern['ms'] = '/([0-9]+)m([0-9]+)s/'; // minutes, seconds
|
70 |
+
$pattern['h'] = '/([0-9]+)h/';
|
71 |
+
$pattern['m'] = '/([0-9]+)m/';
|
72 |
+
$pattern['s'] = '/([0-9]+)s/';
|
73 |
+
|
74 |
+
foreach ( $pattern as $key => $value ) {
|
75 |
+
|
76 |
+
preg_match( $value, $yttime, $result );
|
77 |
+
|
78 |
+
if ( ! empty( $result ) ) {
|
79 |
+
$format = $key;
|
80 |
+
break;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
switch ( $format ) {
|
85 |
+
case 'hms':
|
86 |
+
$hours = $result[1];
|
87 |
+
$minutes = $result[2];
|
88 |
+
$seconds = $result[3];
|
89 |
+
break;
|
90 |
+
case 'ms':
|
91 |
+
$minutes = $result[1];
|
92 |
+
$seconds = $result[2];
|
93 |
+
break;
|
94 |
+
case 'h':
|
95 |
+
$hours = $result[1];
|
96 |
+
break;
|
97 |
+
case 'm':
|
98 |
+
$minutes = $result[1];
|
99 |
+
break;
|
100 |
+
case 's':
|
101 |
+
$seconds = $result[1];
|
102 |
+
break;
|
103 |
+
default:
|
104 |
+
return false;
|
105 |
+
}
|
106 |
+
|
107 |
+
return ( $hours * 60 * 60 ) + ( $minutes * 60 ) + $seconds;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Calculates padding percentage value for a particular aspect ratio
|
112 |
+
*
|
113 |
+
* @since 4.2.0
|
114 |
+
*
|
115 |
+
* @param string $aspect_ratio '4:3' or percentage value with percent sign
|
116 |
+
*
|
117 |
+
* @return float
|
118 |
+
*/
|
119 |
+
function arve_aspect_ratio_to_percentage( $aspect_ratio ) {
|
120 |
+
|
121 |
+
if ( is_wp_error( $aspect_ratio ) ) {
|
122 |
+
return 52.25;
|
123 |
+
}
|
124 |
+
|
125 |
+
$a = explode( ':', $aspect_ratio );
|
126 |
+
|
127 |
+
return ( ( $a[1] / $a[0] ) * 100 );
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Calculates
|
132 |
+
*
|
133 |
+
* @since 8.2.0
|
134 |
+
*/
|
135 |
+
function arve_calculate_height( $width, $aspect_ratio ) {
|
136 |
+
|
137 |
+
$width = (int) $width;
|
138 |
+
$aspect_ratio = empty( $aspect_ratio ) ? '16:9' : $aspect_ratio;
|
139 |
+
$percent = arve_aspect_ratio_to_percentage( $aspect_ratio );
|
140 |
+
|
141 |
+
if ( $width > 100 && $percent ) {
|
142 |
+
return ( ( $width / 100 ) * $percent );
|
143 |
+
}
|
144 |
+
|
145 |
+
return false;
|
146 |
+
}
|
public/functions-shortcode-data.php
ADDED
@@ -0,0 +1,327 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_get_default_aspect_ratio( $aspect_ratio, $provider ) {
|
4 |
+
$properties = arve_get_host_properties();
|
5 |
+
if ( empty( $aspect_ratio ) ) {
|
6 |
+
return $properties[ $provider ]['aspect_ratio'];
|
7 |
+
}
|
8 |
+
return $aspect_ratio;
|
9 |
+
}
|
10 |
+
|
11 |
+
function arve_get_html5_attributes() {
|
12 |
+
|
13 |
+
return array( 'mp4', 'm4v', 'webm', 'ogv', 'ogg', 'ogm' );
|
14 |
+
}
|
15 |
+
|
16 |
+
function arve_url_query_array( $url ) {
|
17 |
+
|
18 |
+
$url = parse_url( $url );
|
19 |
+
|
20 |
+
if ( empty( $url['query'] ) ) {
|
21 |
+
return array();
|
22 |
+
}
|
23 |
+
|
24 |
+
parse_str( $url['query'], $url_params );
|
25 |
+
|
26 |
+
return $url_params;
|
27 |
+
}
|
28 |
+
|
29 |
+
function arve_build_iframe_src( $atts ) {
|
30 |
+
|
31 |
+
$id = $atts['id'];
|
32 |
+
$lang = $atts['lang'];
|
33 |
+
$provider = $atts['provider'];
|
34 |
+
|
35 |
+
$properties = arve_get_host_properties();
|
36 |
+
|
37 |
+
if ( isset( $properties[ $provider ]['embed_url'] ) ) {
|
38 |
+
$pattern = $properties[ $provider ]['embed_url'];
|
39 |
+
} else {
|
40 |
+
$pattern = '%s';
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( 'facebook' == $provider && is_numeric( $id ) ) {
|
44 |
+
|
45 |
+
$id = "https://www.facebook.com/facebook/videos/$id/";
|
46 |
+
|
47 |
+
} elseif ( 'twitch' == $provider && is_numeric( $id ) ) {
|
48 |
+
|
49 |
+
$pattern = 'https://player.twitch.tv/?video=v%s';
|
50 |
+
|
51 |
+
} elseif ( 'ted' == $provider && preg_match( "/^[a-z]{2}$/", $lang ) === 1 ) {
|
52 |
+
|
53 |
+
$pattern = 'https://embed-ssl.ted.com/talks/lang/' . $lang . '/%s.html';
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( isset( $properties[ $provider ]['url_encode_id'] ) && $properties[ $provider ]['url_encode_id'] ) {
|
57 |
+
$id = urlencode( $id );
|
58 |
+
}
|
59 |
+
|
60 |
+
#$test = 'https://www.dailymotion.com/widget/jukebox?list[]=/playlist/xr8ts/1&&autoplay=0&mute=0';
|
61 |
+
|
62 |
+
#
|
63 |
+
#$org = 'http://www.dailymotion.com/widget/jukebox?list[]=%2Fplaylist%2Fxr2rp_RTnews_exclusive-interveiws%2F1&&autoplay=0&mute=0';
|
64 |
+
|
65 |
+
#$esc_url = esc_url( $test );
|
66 |
+
|
67 |
+
#d( $provider );
|
68 |
+
#d( ( $esc_url === $org ) );
|
69 |
+
#d( $esc_url );
|
70 |
+
#printf( '<iframe src="%s" width="600" height="500"></iframe>', $org );
|
71 |
+
|
72 |
+
#dd("end");
|
73 |
+
|
74 |
+
#d($provider);
|
75 |
+
#d($pattern);
|
76 |
+
|
77 |
+
if ( 'brightcove' == $provider ) {
|
78 |
+
$src = sprintf( $pattern, $atts['brightcove_account'], $atts['brightcove_player'], $atts['brightcove_embed'], $id );
|
79 |
+
} else {
|
80 |
+
$src = sprintf( $pattern, $id );
|
81 |
+
}
|
82 |
+
|
83 |
+
return $src;
|
84 |
+
}
|
85 |
+
|
86 |
+
function arve_id_fixes( $id, $provider ) {
|
87 |
+
|
88 |
+
if (
|
89 |
+
'liveleak' == $provider &&
|
90 |
+
! arve_starts_with( $id, 'i=' ) &&
|
91 |
+
! arve_starts_with( $id, 'f=' )
|
92 |
+
) {
|
93 |
+
$id = 'i=' . $id;
|
94 |
+
}
|
95 |
+
|
96 |
+
return $id;
|
97 |
+
}
|
98 |
+
|
99 |
+
function arve_aspect_ratio_fixes( $aspect_ratio, $provider, $mode ) {
|
100 |
+
|
101 |
+
if ( 'dailymotionlist' === $provider ) {
|
102 |
+
switch ( $mode ) {
|
103 |
+
case 'normal':
|
104 |
+
case 'lazyload':
|
105 |
+
$aspect_ratio = '640:370';
|
106 |
+
break;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
return $aspect_ratio;
|
111 |
+
}
|
112 |
+
|
113 |
+
function arve_add_autoplay_query_arg( $src, $a ) {
|
114 |
+
|
115 |
+
switch ( $a['provider'] ) {
|
116 |
+
case 'alugha':
|
117 |
+
case 'archiveorg':
|
118 |
+
case 'dailymotion':
|
119 |
+
case 'dailymotionlist':
|
120 |
+
#case 'facebook': # Causes automute FUCK NSABOOK
|
121 |
+
case 'vevo':
|
122 |
+
case 'viddler':
|
123 |
+
case 'vimeo':
|
124 |
+
case 'youtube':
|
125 |
+
case 'youtubelist':
|
126 |
+
$on = add_query_arg( 'autoplay', 1, $src );
|
127 |
+
$off = add_query_arg( 'autoplay', 0, $src );
|
128 |
+
break;
|
129 |
+
case 'twitch':
|
130 |
+
case 'ustream':
|
131 |
+
$on = add_query_arg( 'autoplay', 'true', $src );
|
132 |
+
$off = add_query_arg( 'autoplay', 'false', $src );
|
133 |
+
break;
|
134 |
+
case 'livestream':
|
135 |
+
case 'Wistia':
|
136 |
+
$on = add_query_arg( 'autoPlay', 'true', $src );
|
137 |
+
$off = add_query_arg( 'autoPlay', 'false', $src );
|
138 |
+
break;
|
139 |
+
case 'metacafe':
|
140 |
+
$on = add_query_arg( 'ap', 1, $src );
|
141 |
+
$off = remove_query_arg( 'ap', $src );
|
142 |
+
break;
|
143 |
+
case 'videojug':
|
144 |
+
$on = add_query_arg( 'ap', 1, $src );
|
145 |
+
$off = add_query_arg( 'ap', 0, $src );
|
146 |
+
break;
|
147 |
+
case 'veoh':
|
148 |
+
$on = add_query_arg( 'videoAutoPlay', 1, $src );
|
149 |
+
$off = add_query_arg( 'videoAutoPlay', 0, $src );
|
150 |
+
break;
|
151 |
+
case 'brightcove':
|
152 |
+
case 'snotr':
|
153 |
+
$on = add_query_arg( 'autoplay', 1, $src );
|
154 |
+
$off = remove_query_arg( 'autoplay', $src );
|
155 |
+
break;
|
156 |
+
case 'yahoo':
|
157 |
+
$on = add_query_arg( 'player_autoplay', 'true', $src );
|
158 |
+
$off = add_query_arg( 'player_autoplay', 'false', $src );
|
159 |
+
break;
|
160 |
+
/*
|
161 |
+
case 'iframe':
|
162 |
+
# We are spamming all kinds of autoplay parameters here in hope of a effect
|
163 |
+
$on = add_query_arg( array(
|
164 |
+
'ap' => '1',
|
165 |
+
'autoplay' => '1',
|
166 |
+
'autoStart' => 'true',
|
167 |
+
'player_autoStart' => 'true',
|
168 |
+
), $src );
|
169 |
+
$off = add_query_arg( array(
|
170 |
+
'ap' => '0',
|
171 |
+
'autoplay' => '0',
|
172 |
+
'autoStart' => 'false',
|
173 |
+
'player_autoStart' => 'false',
|
174 |
+
), $src );
|
175 |
+
break;
|
176 |
+
*/
|
177 |
+
default:
|
178 |
+
# Do nothing for providers that to not support autoplay or fail with parameters
|
179 |
+
$on = $src;
|
180 |
+
$off = $src;
|
181 |
+
break;
|
182 |
+
}
|
183 |
+
|
184 |
+
if( $a['autoplay'] ) {
|
185 |
+
return $on;
|
186 |
+
} else {
|
187 |
+
return $off;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
function arve_add_query_args_to_iframe_src( $src, $atts ) {
|
192 |
+
|
193 |
+
$options = arve_get_options();
|
194 |
+
|
195 |
+
$host = $atts['provider'];
|
196 |
+
|
197 |
+
$parameters = wp_parse_args( preg_replace( '!\s+!', '&', trim( $atts['parameters'] ) ) );
|
198 |
+
$option_parameters = array();
|
199 |
+
|
200 |
+
if ( isset( $options['params'][ $host ] ) ) {
|
201 |
+
$option_parameters = wp_parse_args( preg_replace( '!\s+!', '&', trim( $options['params'][ $host ] ) ) );
|
202 |
+
}
|
203 |
+
|
204 |
+
$parameters = wp_parse_args( $parameters, $option_parameters );
|
205 |
+
|
206 |
+
return add_query_arg( $parameters, $src );
|
207 |
+
}
|
208 |
+
|
209 |
+
function arve_maxwidth_when_aligned( $maxwidth, $align ) {
|
210 |
+
|
211 |
+
$options = arve_get_options();
|
212 |
+
|
213 |
+
if ( $maxwidth < 100 && in_array( $align, array( 'left', 'right', 'center' ) ) ) {
|
214 |
+
$maxwidth = (int) $options['align_maxwidth'];
|
215 |
+
}
|
216 |
+
|
217 |
+
return $maxwidth;
|
218 |
+
}
|
219 |
+
|
220 |
+
function arve_get_language_name_from_code( $lang_code ) {
|
221 |
+
// This list is based on languages available from localize.drupal.org. See
|
222 |
+
// http://localize.drupal.org/issues for information on how to add languages
|
223 |
+
// there.
|
224 |
+
//
|
225 |
+
// The "Left-to-right marker" comments and the enclosed UTF-8 markers are to
|
226 |
+
// make otherwise strange looking PHP syntax natural (to not be displayed in
|
227 |
+
// right to left). See https://www.drupal.org/node/128866#comment-528929.
|
228 |
+
$lang = array(
|
229 |
+
'af' => array('Afrikaans', 'Afrikaans'),
|
230 |
+
'am' => array('Amharic', 'አማርኛ'),
|
231 |
+
'ar' => array('Arabic', /* Left-to-right marker "" */ 'العربية', 'RTL' ),
|
232 |
+
'ast' => array('Asturian', 'Asturianu'),
|
233 |
+
'az' => array('Azerbaijani', 'Azərbaycanca'),
|
234 |
+
'be' => array('Belarusian', 'Беларуская'),
|
235 |
+
'bg' => array('Bulgarian', 'Български'),
|
236 |
+
'bn' => array('Bengali', 'বাংলা'),
|
237 |
+
'bo' => array('Tibetan', 'བོད་སྐད་'),
|
238 |
+
'bs' => array('Bosnian', 'Bosanski'),
|
239 |
+
'ca' => array('Catalan', 'Català'),
|
240 |
+
'cs' => array('Czech', 'Čeština'),
|
241 |
+
'cy' => array('Welsh', 'Cymraeg'),
|
242 |
+
'da' => array('Danish', 'Dansk'),
|
243 |
+
'de' => array('German', 'Deutsch'),
|
244 |
+
'dz' => array('Dzongkha', 'རྫོང་ཁ'),
|
245 |
+
'el' => array('Greek', 'Ελληνικά'),
|
246 |
+
'en' => array('English', 'English'),
|
247 |
+
'en-x-simple' => array('Simple English', 'Simple English'),
|
248 |
+
'eo' => array('Esperanto', 'Esperanto'),
|
249 |
+
'es' => array('Spanish', 'Español'),
|
250 |
+
'et' => array('Estonian', 'Eesti'),
|
251 |
+
'eu' => array('Basque', 'Euskera'),
|
252 |
+
'fa' => array('Persian, Farsi', /* Left-to-right marker "" */ 'فارسی', 'RTL' ),
|
253 |
+
'fi' => array('Finnish', 'Suomi'),
|
254 |
+
'fil' => array('Filipino', 'Filipino'),
|
255 |
+
'fo' => array('Faeroese', 'Føroyskt'),
|
256 |
+
'fr' => array('French', 'Français'),
|
257 |
+
'fy' => array('Frisian, Western', 'Frysk'),
|
258 |
+
'ga' => array('Irish', 'Gaeilge'),
|
259 |
+
'gd' => array('Scots Gaelic', 'Gàidhlig'),
|
260 |
+
'gl' => array('Galician', 'Galego'),
|
261 |
+
'gsw-berne' => array('Swiss German', 'Schwyzerdütsch'),
|
262 |
+
'gu' => array('Gujarati', 'ગુજરાતી'),
|
263 |
+
'he' => array('Hebrew', /* Left-to-right marker "" */ 'עברית', 'RTL' ),
|
264 |
+
'hi' => array('Hindi', 'हिन्दी'),
|
265 |
+
'hr' => array('Croatian', 'Hrvatski'),
|
266 |
+
'ht' => array('Haitian Creole', 'Kreyòl ayisyen'),
|
267 |
+
'hu' => array('Hungarian', 'Magyar'),
|
268 |
+
'hy' => array('Armenian', 'Հայերեն'),
|
269 |
+
'id' => array('Indonesian', 'Bahasa Indonesia'),
|
270 |
+
'is' => array('Icelandic', 'Íslenska'),
|
271 |
+
'it' => array('Italian', 'Italiano'),
|
272 |
+
'ja' => array('Japanese', '日本語'),
|
273 |
+
'jv' => array('Javanese', 'Basa Java'),
|
274 |
+
'ka' => array('Georgian', 'ქართული ენა'),
|
275 |
+
'kk' => array('Kazakh', 'Қазақ'),
|
276 |
+
'km' => array('Khmer', 'ភាសាខ្មែរ'),
|
277 |
+
'kn' => array('Kannada', 'ಕನ್ನಡ'),
|
278 |
+
'ko' => array('Korean', '한국어'),
|
279 |
+
'ku' => array('Kurdish', 'Kurdî'),
|
280 |
+
'ky' => array('Kyrgyz', 'Кыргызча'),
|
281 |
+
'lo' => array('Lao', 'ພາສາລາວ'),
|
282 |
+
'lt' => array('Lithuanian', 'Lietuvių'),
|
283 |
+
'lv' => array('Latvian', 'Latviešu'),
|
284 |
+
'mg' => array('Malagasy', 'Malagasy'),
|
285 |
+
'mk' => array('Macedonian', 'Македонски'),
|
286 |
+
'ml' => array('Malayalam', 'മലയാളം'),
|
287 |
+
'mn' => array('Mongolian', 'монгол'),
|
288 |
+
'mr' => array('Marathi', 'मराठी'),
|
289 |
+
'ms' => array('Bahasa Malaysia', 'بهاس ملايو'),
|
290 |
+
'my' => array('Burmese', 'ဗမာစကား'),
|
291 |
+
'ne' => array('Nepali', 'नेपाली'),
|
292 |
+
'nl' => array('Dutch', 'Nederlands'),
|
293 |
+
'nb' => array('Norwegian Bokmål', 'Norsk, bokmål'),
|
294 |
+
'nn' => array('Norwegian Nynorsk', 'Norsk, nynorsk'),
|
295 |
+
'oc' => array('Occitan', 'Occitan'),
|
296 |
+
'pa' => array('Punjabi', 'ਪੰਜਾਬੀ'),
|
297 |
+
'pl' => array('Polish', 'Polski'),
|
298 |
+
'pt-pt' => array('Portuguese, Portugal', 'Português, Portugal'),
|
299 |
+
'pt-br' => array('Portuguese, Brazil', 'Português, Brasil'),
|
300 |
+
'ro' => array('Romanian', 'Română'),
|
301 |
+
'ru' => array('Russian', 'Русский'),
|
302 |
+
'sco' => array('Scots', 'Scots'),
|
303 |
+
'se' => array('Northern Sami', 'Sámi'),
|
304 |
+
'si' => array('Sinhala', 'සිංහල'),
|
305 |
+
'sk' => array('Slovak', 'Slovenčina'),
|
306 |
+
'sl' => array('Slovenian', 'Slovenščina'),
|
307 |
+
'sq' => array('Albanian', 'Shqip'),
|
308 |
+
'sr' => array('Serbian', 'Српски'),
|
309 |
+
'sv' => array('Swedish', 'Svenska'),
|
310 |
+
'sw' => array('Swahili', 'Kiswahili'),
|
311 |
+
'ta' => array('Tamil', 'தமிழ்'),
|
312 |
+
'ta-lk' => array('Tamil, Sri Lanka', 'தமிழ், இலங்கை'),
|
313 |
+
'te' => array('Telugu', 'తెలుగు'),
|
314 |
+
'th' => array('Thai', 'ภาษาไทย'),
|
315 |
+
'tr' => array('Turkish', 'Türkçe'),
|
316 |
+
'tyv' => array('Tuvan', 'Тыва дыл'),
|
317 |
+
'ug' => array('Uyghur', 'Уйғур'),
|
318 |
+
'uk' => array('Ukrainian', 'Українська'),
|
319 |
+
'ur' => array('Urdu', /* Left-to-right marker "" */ 'اردو', 'RTL' ),
|
320 |
+
'vi' => array('Vietnamese', 'Tiếng Việt'),
|
321 |
+
'xx-lolspeak' => array('Lolspeak', 'Lolspeak'),
|
322 |
+
'zh-hans' => array('Chinese, Simplified', '简体中文'),
|
323 |
+
'zh-hant' => array('Chinese, Traditional', '繁體中文'),
|
324 |
+
);
|
325 |
+
|
326 |
+
return $lang[ $lang_code ][1];
|
327 |
+
}
|
public/functions-shortcode-filters.php
ADDED
@@ -0,0 +1,446 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_load_vimeo_api( $a ) {
|
4 |
+
|
5 |
+
if ( true ) {
|
6 |
+
require_once ARVE_PATH . '/vendor/autoload.php';
|
7 |
+
}
|
8 |
+
|
9 |
+
return $a;
|
10 |
+
}
|
11 |
+
|
12 |
+
function arve_get_wrapper_id( $a ) {
|
13 |
+
|
14 |
+
static $wrapper_ids = array();
|
15 |
+
$wrapper_id = null;
|
16 |
+
|
17 |
+
foreach ( array( 'id', 'mp4', 'm4v', 'webm', 'ogv', 'url', 'random_video_url', 'webtorrent' ) as $att ) {
|
18 |
+
|
19 |
+
if ( ! empty( $a[ $att ] ) && is_string( $a[ $att ] ) ) {
|
20 |
+
$wrapper_id = 'arve-' . $a[ $att ];
|
21 |
+
$wrapper_id = preg_replace( '/[^a-zA-Z0-9-]/', '', $wrapper_id );
|
22 |
+
break;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
if ( empty( $wrapper_id ) ) {
|
27 |
+
return null;
|
28 |
+
} else {
|
29 |
+
$wrapper_ids[] = $wrapper_id;
|
30 |
+
}
|
31 |
+
|
32 |
+
if ( in_array( $wrapper_id, $wrapper_ids ) ) {
|
33 |
+
$id_counts = array_count_values( $wrapper_ids );
|
34 |
+
$id_count = $id_counts[ $wrapper_id ];
|
35 |
+
|
36 |
+
if ( $id_count >= 2 ) {
|
37 |
+
$wrapper_id .= '-' . $id_count;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
return $wrapper_id;
|
42 |
+
}
|
43 |
+
|
44 |
+
function arve_sc_filter_attr( $a ) {
|
45 |
+
|
46 |
+
$wrapper_id = arve_get_wrapper_id( $a );
|
47 |
+
|
48 |
+
if ( empty( $wrapper_id ) ) {
|
49 |
+
$a['wrapper_id_error'] = new WP_Error( 'wrapper_id', __( 'Wrapper ID could not be build, please report this bug.', ARVE_SLUG ) );
|
50 |
+
}
|
51 |
+
|
52 |
+
$align_class = empty( $a['align'] ) ? '' : ' align' . $a['align'];
|
53 |
+
|
54 |
+
$a['wrapper_attr'] = array(
|
55 |
+
'class' => "arve-wrapper$align_class",
|
56 |
+
'data-mode' => $a['mode'],
|
57 |
+
'data-provider' => $a['provider'],
|
58 |
+
'id' => $wrapper_id,
|
59 |
+
'style' => empty( $a['maxwidth'] ) ? false : sprintf( 'max-width:%dpx;', $a['maxwidth'] ),
|
60 |
+
// Schema.org
|
61 |
+
'itemscope' => '',
|
62 |
+
'itemtype' => 'http://schema.org/VideoObject',
|
63 |
+
);
|
64 |
+
|
65 |
+
if( 'html5' == $a['provider'] ) {
|
66 |
+
|
67 |
+
$a['video_attr'] = array(
|
68 |
+
# WP
|
69 |
+
'autoplay' => in_array( $a['mode'], array( 'lazyload', 'lazyload-lightbox', 'link-lightbox' ) ) ? false : $a['autoplay'],
|
70 |
+
'controls' => $a['controls'],
|
71 |
+
'controlslist' => $a['controlslist'],
|
72 |
+
'loop' => $a['loop'],
|
73 |
+
'preload' => $a['preload'],
|
74 |
+
'width' => empty( $a['width'] ) ? false : $a['width'],
|
75 |
+
'height' => empty( $a['height'] ) ? false : $a['height'],
|
76 |
+
'poster' => empty( $a['img_src'] ) ? false : $a['img_src'],
|
77 |
+
'src' => empty( $a['video_src'] ) ? false : $a['video_src'],
|
78 |
+
# ARVE only
|
79 |
+
'class' => 'arve-video fitvidsignore',
|
80 |
+
'muted' => $a['muted'],
|
81 |
+
'playsinline' => $a['playsinline'],
|
82 |
+
'webkit-playsinline' => $a['playsinline'],
|
83 |
+
);
|
84 |
+
|
85 |
+
} else {
|
86 |
+
|
87 |
+
$properties = arve_get_host_properties();
|
88 |
+
$options = arve_get_options();
|
89 |
+
$iframe_src = arve_build_iframe_src( $a );
|
90 |
+
$iframe_src = arve_add_query_args_to_iframe_src( $iframe_src, $a );
|
91 |
+
$iframe_src = arve_add_autoplay_query_arg( $iframe_src, $a );
|
92 |
+
|
93 |
+
if ( 'vimeo' == $a['provider'] && ! empty( $a['start'] ) ) {
|
94 |
+
$iframe_src .= '#t=' . (int) $a['start'];
|
95 |
+
}
|
96 |
+
|
97 |
+
$a['iframe_attr'] = array(
|
98 |
+
'allow' => 'autoplay; fullscreen',
|
99 |
+
'allowfullscreen' => '',
|
100 |
+
'class' => 'arve-iframe fitvidsignore',
|
101 |
+
'frameborder' => '0',
|
102 |
+
'name' => $a['iframe_name'],
|
103 |
+
'sandbox' => 'allow-scripts allow-same-origin allow-presentation allow-popups',
|
104 |
+
'scrolling' => 'no',
|
105 |
+
'src' => $iframe_src,
|
106 |
+
'width' => empty( $a['width'] ) ? false : $a['width'],
|
107 |
+
'height' => empty( $a['height'] ) ? false : $a['height'],
|
108 |
+
);
|
109 |
+
|
110 |
+
if ( 'vimeo' == $a['provider'] ) {
|
111 |
+
$a['iframe_attr']['sandbox'] .= ' allow-forms';
|
112 |
+
}
|
113 |
+
|
114 |
+
$properties['iframe']['requires_flash'] = $options['iframe_flash'];
|
115 |
+
|
116 |
+
if ( null === $a['disable_flash'] && $properties[ $a['provider'] ]['requires_flash'] ) {
|
117 |
+
$a['iframe_attr']['sandbox'] = false;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
return $a;
|
122 |
+
}
|
123 |
+
|
124 |
+
function arve_sc_filter_validate( $a ) {
|
125 |
+
|
126 |
+
$a['align'] = arve_validate_align( $a['align'], $a['provider'] );
|
127 |
+
|
128 |
+
$a['mode'] = arve_validate_mode( $a['mode'], $a['provider'] );
|
129 |
+
|
130 |
+
$a['autoplay'] = arve_validate_bool( $a['autoplay'], 'autoplay' );
|
131 |
+
$a['arve_link'] = arve_validate_bool( $a['arve_link'], 'arve_link' );
|
132 |
+
$a['loop'] = arve_validate_bool( $a['loop'], 'loop' );
|
133 |
+
$a['controls'] = arve_validate_bool( $a['controls'], 'controls' );
|
134 |
+
$a['disable_flash'] = arve_validate_bool( $a['disable_flash'], 'disable_flash' );
|
135 |
+
$a['muted'] = arve_validate_bool( $a['muted'], 'muted' );
|
136 |
+
$a['playsinline'] = arve_validate_bool( $a['playsinline'], 'playsinline' );
|
137 |
+
|
138 |
+
$a['maxwidth'] = (int) $a['maxwidth'];
|
139 |
+
$a['maxwidth'] = (int) arve_maxwidth_when_aligned( $a['maxwidth'], $a['align'] );
|
140 |
+
|
141 |
+
$a['id'] = arve_id_fixes( $a['id'], $a['provider'] );
|
142 |
+
|
143 |
+
$a['aspect_ratio'] = arve_get_default_aspect_ratio( $a['aspect_ratio'], $a['provider'] );
|
144 |
+
$a['aspect_ratio'] = arve_aspect_ratio_fixes( $a['aspect_ratio'], $a['provider'], $a['mode'] );
|
145 |
+
$a['aspect_ratio'] = arve_validate_aspect_ratio( $a['aspect_ratio'] );
|
146 |
+
|
147 |
+
return $a;
|
148 |
+
}
|
149 |
+
|
150 |
+
function arve_sc_filter_set_fixed_dimensions( $a ) {
|
151 |
+
|
152 |
+
$width = 480;
|
153 |
+
|
154 |
+
$a['width'] = $width;
|
155 |
+
$a['height'] = arve_calculate_height( $width, $a['aspect_ratio'] );
|
156 |
+
|
157 |
+
return $a;
|
158 |
+
}
|
159 |
+
|
160 |
+
function arve_sc_filter_sanitise( $atts ) {
|
161 |
+
|
162 |
+
if ( ! empty( $atts['src'] ) ) {
|
163 |
+
$atts['url'] = $atts['src'];
|
164 |
+
}
|
165 |
+
|
166 |
+
foreach ( $atts as $key => $value ) {
|
167 |
+
|
168 |
+
$atts[ $key ] = (string) $value;
|
169 |
+
|
170 |
+
if ( '' === $value ) {
|
171 |
+
$atts[ $key ] = null;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
return $atts;
|
176 |
+
}
|
177 |
+
|
178 |
+
function arve_sc_filter_missing_attribute_check( $atts ) {
|
179 |
+
|
180 |
+
# Old shortcodes
|
181 |
+
if ( ! array_key_exists( 'url' , $atts ) ) {
|
182 |
+
return $atts;
|
183 |
+
}
|
184 |
+
|
185 |
+
$required_attributes = arve_get_html5_attributes();
|
186 |
+
$required_attributes[] = 'url';
|
187 |
+
|
188 |
+
$array = array_intersect_key( $atts, array_flip( $required_attributes ) );
|
189 |
+
|
190 |
+
if( count( array_filter( $array ) ) != count( $array ) ) {
|
191 |
+
|
192 |
+
$atts['missing_atts_error'] = arve_error( sprintf(
|
193 |
+
esc_html__( 'The [arve] shortcode needs one of this attributes %s', ARVE_SLUG ),
|
194 |
+
implode( $required_attributes ) )
|
195 |
+
);
|
196 |
+
}
|
197 |
+
|
198 |
+
return $atts;
|
199 |
+
}
|
200 |
+
|
201 |
+
function arve_sc_filter_get_media_gallery_thumbnail( $atts ) {
|
202 |
+
|
203 |
+
if ( empty( $atts['thumbnail'] ) ) {
|
204 |
+
return $atts;
|
205 |
+
}
|
206 |
+
|
207 |
+
if( is_numeric( $atts['thumbnail'] ) ) {
|
208 |
+
|
209 |
+
$attchment_id = $atts['thumbnail'];
|
210 |
+
|
211 |
+
$atts['img_src'] = arve_get_attachment_image_url_or_srcset( 'url', $attchment_id );
|
212 |
+
$atts['img_srcset'] = arve_get_attachment_image_url_or_srcset( 'srcset', $attchment_id );
|
213 |
+
|
214 |
+
} elseif ( arve_validate_url( $atts['thumbnail'] ) ) {
|
215 |
+
|
216 |
+
$atts['img_src'] = $atts['thumbnail'];
|
217 |
+
$atts['img_srcset'] = false;
|
218 |
+
|
219 |
+
} else {
|
220 |
+
|
221 |
+
$atts['img_src'] = new WP_Error( 'thumbnail', __( 'Not a valid thumbnail URL or Media ID given', ARVE_SLUG ) );
|
222 |
+
}
|
223 |
+
|
224 |
+
return $atts;
|
225 |
+
}
|
226 |
+
|
227 |
+
function arve_sc_filter_get_media_gallery_video( $atts ) {
|
228 |
+
|
229 |
+
$html5_ext = arve_get_html5_attributes();
|
230 |
+
|
231 |
+
foreach ( $html5_ext as $ext ) {
|
232 |
+
|
233 |
+
if( ! empty( $atts[ $ext ] ) && is_numeric( $atts[ $ext ] ) ) {
|
234 |
+
$atts[ $ext ] = wp_get_attachment_url( $atts[ $ext ] );
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
return $atts;
|
239 |
+
}
|
240 |
+
|
241 |
+
function arve_sc_filter_detect_provider_and_id_from_url( $atts ) {
|
242 |
+
|
243 |
+
$properties = arve_get_host_properties();
|
244 |
+
|
245 |
+
if ( ! empty( $atts['provider'] ) || empty( $atts['url'] ) ) {
|
246 |
+
return $atts;
|
247 |
+
}
|
248 |
+
|
249 |
+
foreach ( $properties as $host_id => $host ) :
|
250 |
+
|
251 |
+
if ( empty( $host['regex'] ) ) {
|
252 |
+
continue;
|
253 |
+
}
|
254 |
+
|
255 |
+
$preg_match = preg_match( '#' . $host['regex'] . '#i', $atts['url'], $matches );
|
256 |
+
|
257 |
+
if ( 1 !== $preg_match ) {
|
258 |
+
continue;
|
259 |
+
}
|
260 |
+
|
261 |
+
foreach ( $matches as $key => $value ) {
|
262 |
+
|
263 |
+
if ( is_string( $key ) ) {
|
264 |
+
$atts[ 'provider' ] = $host_id;
|
265 |
+
$atts[ $key ] = $matches[ $key ];
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
endforeach;
|
270 |
+
|
271 |
+
return $atts;
|
272 |
+
}
|
273 |
+
|
274 |
+
function arve_sc_filter_detect_query_args( $atts ) {
|
275 |
+
|
276 |
+
if( empty( $atts['url'] ) ) {
|
277 |
+
return $atts;
|
278 |
+
}
|
279 |
+
|
280 |
+
$to_extract = array(
|
281 |
+
'brightcove' => array( 'videoId', 'something' ),
|
282 |
+
);
|
283 |
+
|
284 |
+
foreach ( $to_extract as $provider => $parameters ) {
|
285 |
+
|
286 |
+
if( $provider != $atts['provider'] ) {
|
287 |
+
return $atts;
|
288 |
+
}
|
289 |
+
|
290 |
+
$query_array = arve_url_query_array( $atts['url'] );
|
291 |
+
|
292 |
+
foreach ( $parameters as $key => $parameter ) {
|
293 |
+
|
294 |
+
$att_name = $atts['provider'] . "_$parameter";
|
295 |
+
|
296 |
+
if( empty( $query_array[ $parameter ] ) ) {
|
297 |
+
$atts[ $att_name ] = new WP_Error( $att_name, "$parameter not found in URL" );
|
298 |
+
} else {
|
299 |
+
$atts[ $att_name ] = $query_array[ $parameter ];
|
300 |
+
}
|
301 |
+
}
|
302 |
+
}
|
303 |
+
|
304 |
+
return $atts;
|
305 |
+
}
|
306 |
+
|
307 |
+
function arve_sc_filter_detect_youtube_playlist( $atts ) {
|
308 |
+
|
309 |
+
if(
|
310 |
+
'youtube' != $atts['provider'] ||
|
311 |
+
( empty( $atts['url'] ) && empty( $atts['id'] ) )
|
312 |
+
) {
|
313 |
+
return $atts;
|
314 |
+
}
|
315 |
+
|
316 |
+
if( empty($atts['url']) ) {
|
317 |
+
# Not a url but it will work
|
318 |
+
$url = str_replace( array( '&list=', '&list=' ), '?list=', $atts['id'] );
|
319 |
+
} else {
|
320 |
+
$url = $atts['url'];
|
321 |
+
}
|
322 |
+
|
323 |
+
$query_array = arve_url_query_array( $url );
|
324 |
+
|
325 |
+
if( empty( $query_array['list'] ) ) {
|
326 |
+
return $atts;
|
327 |
+
}
|
328 |
+
|
329 |
+
$atts['id'] = strtok( $atts['id'], '?' );
|
330 |
+
$atts['id'] = strtok( $atts['id'], '&' );
|
331 |
+
|
332 |
+
$atts['youtube_playlist_id'] = $query_array['list'];
|
333 |
+
$atts['parameters'] .= 'list=' . $query_array['list'];
|
334 |
+
|
335 |
+
return $atts;
|
336 |
+
}
|
337 |
+
|
338 |
+
function arve_get_video_type( $ext ) {
|
339 |
+
|
340 |
+
switch( $ext ) {
|
341 |
+
case 'ogv':
|
342 |
+
case 'ogm':
|
343 |
+
return 'video/ogg';
|
344 |
+
break;
|
345 |
+
default:
|
346 |
+
return 'video/' . $ext;
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
function arve_sc_filter_detect_html5( $atts ) {
|
351 |
+
|
352 |
+
if( ! empty( $atts['provider'] ) && 'html5' != $atts['provider'] ) {
|
353 |
+
return $atts;
|
354 |
+
}
|
355 |
+
|
356 |
+
$html5_extensions = arve_get_html5_attributes();
|
357 |
+
$atts['video_sources_html'] = '';
|
358 |
+
|
359 |
+
foreach ( $html5_extensions as $ext ) :
|
360 |
+
|
361 |
+
if ( ! empty( $atts[ $ext ] ) ) {
|
362 |
+
|
363 |
+
if ( arve_starts_with( $atts[ $ext ], 'https://www.dropbox.com' ) ) {
|
364 |
+
$atts[ $ext ] = add_query_arg( 'dl', 1, $atts[ $ext ] );
|
365 |
+
}
|
366 |
+
|
367 |
+
$atts['video_sources_html'] .= sprintf( '<source type="%s" src="%s">', arve_get_video_type( $ext ), $atts[ $ext ] );
|
368 |
+
}
|
369 |
+
|
370 |
+
if ( ! empty( $atts['url'] ) && arve_ends_with( $atts['url'], ".$ext" ) ) {
|
371 |
+
|
372 |
+
if ( arve_starts_with( $atts['url'], 'https://www.dropbox.com' ) ) {
|
373 |
+
$atts['url'] = add_query_arg( 'dl', 1, $atts['url'] );
|
374 |
+
}
|
375 |
+
|
376 |
+
$atts['video_src'] = $atts['url'];
|
377 |
+
/*
|
378 |
+
$parse_url = parse_url( $atts['url'] );
|
379 |
+
$pathinfo = pathinfo( $parse_url['path'] );
|
380 |
+
|
381 |
+
$url_ext = $pathinfo['extension'];
|
382 |
+
$url_without_ext = $parse_url['scheme'] . '://' . $parse_url['host'] . $path_without_ext;
|
383 |
+
*/
|
384 |
+
}
|
385 |
+
|
386 |
+
endforeach;
|
387 |
+
|
388 |
+
if( empty( $atts['video_src'] ) && empty( $atts['video_sources_html'] ) ) {
|
389 |
+
return $atts;
|
390 |
+
}
|
391 |
+
|
392 |
+
$atts['provider'] = 'html5';
|
393 |
+
|
394 |
+
return $atts;
|
395 |
+
}
|
396 |
+
|
397 |
+
function arve_sc_filter_iframe_fallback( $atts ) {
|
398 |
+
|
399 |
+
if ( empty( $atts['provider'] ) ) {
|
400 |
+
|
401 |
+
$atts['provider'] = 'iframe';
|
402 |
+
|
403 |
+
if ( empty( $atts['id'] ) && ! empty( $atts['url'] ) ) {
|
404 |
+
$atts['id'] = $atts['url'];
|
405 |
+
}
|
406 |
+
}
|
407 |
+
|
408 |
+
return $atts;
|
409 |
+
}
|
410 |
+
|
411 |
+
function arve_sc_filter_build_tracks_html( $atts ) {
|
412 |
+
|
413 |
+
if ( 'html5' != $atts['provider'] ) {
|
414 |
+
return $atts;
|
415 |
+
}
|
416 |
+
|
417 |
+
$atts['video_tracks_html'] = '';
|
418 |
+
|
419 |
+
for ( $n = 1; $n <= ARVE_NUM_TRACKS; $n++ ) {
|
420 |
+
|
421 |
+
if ( empty( $atts[ "track_{$n}" ] ) ) {
|
422 |
+
return $atts;
|
423 |
+
}
|
424 |
+
|
425 |
+
preg_match( '#-(?<type>captions|chapters|descriptions|metadata|subtitles)-(?<lang>[a-z]{2}).vtt$#i', $atts[ "track_{$n}" ], $matches );
|
426 |
+
|
427 |
+
if ( empty( $matches[1] ) ) {
|
428 |
+
$atts[ "track_{$n}" ] = new WP_Error( 'track', __( 'Track kind or language code could not detected from filename', ARVE_SLUG ) );
|
429 |
+
return $atts;
|
430 |
+
}
|
431 |
+
|
432 |
+
$label = empty( $atts[ "track_{$n}_label" ] ) ? arve_get_language_name_from_code( $matches['lang'] ) : $atts[ "track_{$n}_label" ];
|
433 |
+
|
434 |
+
$attr = array(
|
435 |
+
'default' => ( 1 === $n ) ? true : false,
|
436 |
+
'kind' => $matches['type'],
|
437 |
+
'label' => $label,
|
438 |
+
'src' => $atts[ "track_{$n}" ],
|
439 |
+
'srclang' => $matches['lang'],
|
440 |
+
);
|
441 |
+
|
442 |
+
$atts['video_tracks_html'] .= sprintf( '<track%s>', arve_attr( $attr) );
|
443 |
+
}
|
444 |
+
|
445 |
+
return $atts;
|
446 |
+
}
|
public/functions-shortcodes.php
ADDED
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_shortcode( $input_atts, $content = null ) {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Filters the default arve shortcode output.
|
7 |
+
*
|
8 |
+
* If the filtered output isn't empty, it will be used instead of generating
|
9 |
+
* the default video template.
|
10 |
+
*
|
11 |
+
* @since 8.8.2
|
12 |
+
*
|
13 |
+
* @param string $html Empty variable to be replaced with shortcode markup.
|
14 |
+
* @param array $atts Attributes of the shortcode.
|
15 |
+
* @param string $content Video shortcode content.
|
16 |
+
*/
|
17 |
+
$override = apply_filters( 'arve_shortcode_overwride', '', $input_atts, $content );
|
18 |
+
if ( '' !== $override ) {
|
19 |
+
return $override;
|
20 |
+
}
|
21 |
+
|
22 |
+
return arve_shortcode_arve( $input_atts, $content );
|
23 |
+
}
|
24 |
+
|
25 |
+
function arve_shortcode_arve( $input_atts, $content = null, $arve_shortcode = true ) {
|
26 |
+
|
27 |
+
$errors = '';
|
28 |
+
$options = arve_get_options();
|
29 |
+
$properties = arve_get_host_properties();
|
30 |
+
$input_atts = (array) $input_atts;
|
31 |
+
|
32 |
+
$pairs = array(
|
33 |
+
'align' => $options['align'],
|
34 |
+
'arve_link' => arve_bool_to_shortcode_string( $options['promote_link'] ),
|
35 |
+
'aspect_ratio' => null,
|
36 |
+
'autoplay' => arve_bool_to_shortcode_string( $options['autoplay'] ),
|
37 |
+
'description' => null,
|
38 |
+
'duration' => null,
|
39 |
+
'disable_flash' => null,
|
40 |
+
'iframe_name' => null,
|
41 |
+
'maxwidth' => (string) $options['video_maxwidth'],
|
42 |
+
'mode' => $options['mode'],
|
43 |
+
'parameters' => null,
|
44 |
+
'src' => null, // Just a alias for url to make it simple
|
45 |
+
'thumbnail' => null,
|
46 |
+
'title' => null,
|
47 |
+
'upload_date' => null,
|
48 |
+
// <video>
|
49 |
+
'm4v' => null,
|
50 |
+
'mp4' => null,
|
51 |
+
'ogv' => null,
|
52 |
+
'webm' => null,
|
53 |
+
'preload' => 'metadata',
|
54 |
+
'playsinline' => null,
|
55 |
+
'muted' => null,
|
56 |
+
'controls' => 'y',
|
57 |
+
'controlslist' => empty( $options['controlslist'] ) ? null : (string) $options['controlslist'],
|
58 |
+
'loop' => 'n',
|
59 |
+
// TED only
|
60 |
+
'lang' => null,
|
61 |
+
// Vimeo only
|
62 |
+
'start' => null,
|
63 |
+
// Old Shortcodes / URL embeds
|
64 |
+
'id' => null,
|
65 |
+
'provider' => null,
|
66 |
+
// deprecated, title should be used
|
67 |
+
'link_text' => null,
|
68 |
+
);
|
69 |
+
|
70 |
+
for ( $n = 1; $n <= ARVE_NUM_TRACKS; $n++ ) {
|
71 |
+
$pairs["track_{$n}"] = null;
|
72 |
+
$pairs["track_{$n}_label"] = null;
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( $arve_shortcode ) {
|
76 |
+
$pairs['url'] = null;
|
77 |
+
} else {
|
78 |
+
$pairs['provider'] = null;
|
79 |
+
$pairs['id'] = null;
|
80 |
+
|
81 |
+
if ( empty( $input_atts['provider'] ) || empty( $input_atts['id'] ) ) {
|
82 |
+
return arve_error( __( 'id and provider shortcodes attributes are mandatory for old shortcodes. It is recommended to switch to new shortcodes that need only url', ARVE_SLUG ) );
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
$atts = shortcode_atts( apply_filters( 'arve_shortcode_pairs', $pairs ), $input_atts, 'arve' );
|
87 |
+
|
88 |
+
if ( $errors = arve_output_errors( $atts ) ) {
|
89 |
+
return $errors . arve_get_debug_info( '', $atts, $input_atts );
|
90 |
+
}
|
91 |
+
|
92 |
+
$html['video'] = arve_video_or_iframe( $atts );
|
93 |
+
$html['meta'] = arve_build_meta_html( $atts );
|
94 |
+
$html['ad_link'] = arve_build_promote_link_html( $atts['arve_link'] );
|
95 |
+
$html['embed_container'] = arve_arve_embed_container( $html['meta'] . $html['video'], $atts );
|
96 |
+
|
97 |
+
$normal_embed = arve_arve_wrapper( $html['embed_container'] . $html['ad_link'], $atts );
|
98 |
+
|
99 |
+
$output = apply_filters( 'arve_output', $normal_embed, $html, $atts );
|
100 |
+
|
101 |
+
if ( empty( $output ) ) {
|
102 |
+
return arve_error( 'The output is empty, this should not happen', ARVE_SLUG );
|
103 |
+
} elseif ( is_wp_error( $output ) ) {
|
104 |
+
return arve_error( $output->get_error_message() );
|
105 |
+
}
|
106 |
+
|
107 |
+
wp_enqueue_style( ARVE_SLUG );
|
108 |
+
wp_enqueue_script( ARVE_SLUG );
|
109 |
+
|
110 |
+
return arve_get_debug_info( $output, $atts, $input_atts ) . $output;
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Create all shortcodes at a late stage because people over and over again using this plugin toghter with jetback or
|
116 |
+
* other plugins that handle shortcodes we will now overwrite all this suckers.
|
117 |
+
*
|
118 |
+
* @since 2.6.2
|
119 |
+
*
|
120 |
+
* @uses Advanced_Responsive_Video_Embedder_Create_Shortcodes()
|
121 |
+
*/
|
122 |
+
function arve_create_shortcodes() {
|
123 |
+
|
124 |
+
$options = arve_get_options();
|
125 |
+
|
126 |
+
foreach( $options['shortcodes'] as $provider => $shortcode ) {
|
127 |
+
|
128 |
+
$function = function( $atts ) use ( $provider ) {
|
129 |
+
$atts['provider'] = $provider;
|
130 |
+
return arve_shortcode_arve( $atts, null, false );
|
131 |
+
};
|
132 |
+
|
133 |
+
add_shortcode( $shortcode, $function );
|
134 |
+
}
|
135 |
+
|
136 |
+
add_shortcode( 'arve', 'arve_shortcode' );
|
137 |
+
add_shortcode( 'arve-supported', 'arve_shortcode_arve_supported' );
|
138 |
+
add_shortcode( 'arve-supported-list', 'arve_shortcode_arve_supported_list' );
|
139 |
+
add_shortcode( 'arve-params', 'arve_shortcode_arve_params' );
|
140 |
+
}
|
141 |
+
|
142 |
+
function arve_shortcode_arve_supported() {
|
143 |
+
|
144 |
+
$providers = arve_get_host_properties();
|
145 |
+
// unset deprecated and doubled
|
146 |
+
unset( $providers['dailymotionlist'] );
|
147 |
+
unset( $providers['iframe'] );
|
148 |
+
|
149 |
+
$out = '<h3 id="video-host-support">Video Host Support</h3>';
|
150 |
+
$out .= '<p>The limiting factor of the following features is not ARVE but what the prividers offer.</p>';
|
151 |
+
$out .= '<table class="table table-sm table-hover">';
|
152 |
+
$out .= '<tr>';
|
153 |
+
$out .= '<th></th>';
|
154 |
+
$out .= '<th>Provider</th>';
|
155 |
+
$out .= '<th>Requires<br>embed code</th>';
|
156 |
+
$out .= '<th>SSL</th>';
|
157 |
+
$out .= '<th>Requires Flash</th>';
|
158 |
+
$out .= '<th>Auto Thumbnail<br>(Pro Addon)</th>';
|
159 |
+
$out .= '<th>Auto Title<br>(Pro Addon)</th>';
|
160 |
+
$out .= '</tr>';
|
161 |
+
$out .= '<tr>';
|
162 |
+
$out .= '<td></td>';
|
163 |
+
$out .= '<td colspan="6"><a href="https://nextgenthemes.com/plugins/arve/documentation/#general-iframe-embedding">All providers with responsive iframe embed codes</a></td>';
|
164 |
+
$out .= '</tr>';
|
165 |
+
|
166 |
+
$count = 1;
|
167 |
+
|
168 |
+
foreach ( $providers as $key => $values ) {
|
169 |
+
|
170 |
+
if ( ! isset( $values['name'] ) ) {
|
171 |
+
$values['name'] = $key;
|
172 |
+
}
|
173 |
+
|
174 |
+
$out .= '<tr>';
|
175 |
+
$out .= sprintf( '<td>%d</td>', $count++ );
|
176 |
+
$out .= sprintf( '<td>%s</td>', esc_html( $values['name'] ) );
|
177 |
+
$out .= sprintf( '<td>%s</td>', ( isset( $values['requires_src'] ) && $values['requires_src'] ) ? '✓' : '' );
|
178 |
+
$out .= sprintf( '<td>%s</td>', ( isset( $values['embed_url'] ) && arve_starts_with( $values['embed_url'], 'https' ) ) ? '✓' : '' );
|
179 |
+
$out .= sprintf( '<td>%s</td>', ! empty( $values['requires_flash'] ) ? '✓' : '' );
|
180 |
+
$out .= sprintf( '<td>%s</td>', ( isset( $values['auto_thumbnail'] ) && $values['auto_thumbnail'] ) ? '✓' : '' );
|
181 |
+
$out .= sprintf( '<td>%s</td>', ( isset( $values['auto_title'] ) && $values['auto_title'] ) ? '✓' : '' );
|
182 |
+
$out .= '</tr>';
|
183 |
+
}
|
184 |
+
|
185 |
+
$out .= '<tr>';
|
186 |
+
$out .= '<td></td>';
|
187 |
+
$out .= '<td colspan="6"><a href="https://nextgenthemes.com/plugins/arve/documentation/#general-iframe-embedding">All providers with responsive iframe embed codes</a></td>';
|
188 |
+
$out .= '</tr>';
|
189 |
+
$out .= '</table>';
|
190 |
+
|
191 |
+
return $out;
|
192 |
+
}
|
193 |
+
|
194 |
+
function arve_shortcode_arve_supported_list() {
|
195 |
+
|
196 |
+
$list = '';
|
197 |
+
$providers = arve_get_host_properties();
|
198 |
+
// unset deprecated and doubled
|
199 |
+
unset( $providers['dailymotionlist'] );
|
200 |
+
unset( $providers['iframe'] );
|
201 |
+
|
202 |
+
foreach ( $providers as $key => $values ) {
|
203 |
+
$list .= '* ' . $values['name'] . PHP_EOL;
|
204 |
+
}
|
205 |
+
|
206 |
+
return '<textarea style="width:100%" rows="15">'. $list . '</textarea>';
|
207 |
+
}
|
208 |
+
|
209 |
+
function arve_shortcode_arve_params() {
|
210 |
+
|
211 |
+
$attrs = arve_get_settings_definitions();
|
212 |
+
|
213 |
+
if( function_exists( 'arve_pro_get_settings_definitions' ) ) {
|
214 |
+
$attrs = array_merge( $attrs, arve_pro_get_settings_definitions() );
|
215 |
+
}
|
216 |
+
|
217 |
+
$out = '<table class="table table-hover table-arve-params">';
|
218 |
+
$out .= '<tr>';
|
219 |
+
$out .= '<th>Parameter</th>';
|
220 |
+
$out .= '<th>Function</th>';
|
221 |
+
$out .= '</tr>';
|
222 |
+
|
223 |
+
foreach ( $attrs as $key => $values ) {
|
224 |
+
|
225 |
+
if( isset( $values['hide_from_sc'] ) && $values['hide_from_sc'] ) {
|
226 |
+
continue;
|
227 |
+
}
|
228 |
+
|
229 |
+
$desc = '';
|
230 |
+
unset( $values['options'][''] );
|
231 |
+
unset( $choices );
|
232 |
+
|
233 |
+
if ( ! empty( $values['options'] ) ) {
|
234 |
+
|
235 |
+
foreach ( $values['options'] as $key => $value) {
|
236 |
+
$choices[] = sprintf( '<code>%s</code>', $key );
|
237 |
+
}
|
238 |
+
|
239 |
+
$desc .= __('Options: ', ARVE_SLUG ) . implode( ', ', $choices ) . '<br>';
|
240 |
+
}
|
241 |
+
|
242 |
+
if ( ! empty( $values['description'] ) ) {
|
243 |
+
$desc .= $values['description'];
|
244 |
+
}
|
245 |
+
|
246 |
+
if ( ! empty( $values['meta']['placeholder'] ) ) {
|
247 |
+
$desc .= $values['meta']['placeholder'];
|
248 |
+
}
|
249 |
+
|
250 |
+
$out .= '<tr>';
|
251 |
+
$out .= sprintf( '<td>%s</td>', $values['attr'] );
|
252 |
+
$out .= sprintf( '<td>%s</td>', $desc );
|
253 |
+
$out .= '</tr>';
|
254 |
+
}
|
255 |
+
|
256 |
+
$out .= '</table>';
|
257 |
+
|
258 |
+
return $out;
|
259 |
+
}
|
260 |
+
|
261 |
+
function arve_wp_video_shortcode_override( $out, $attr, $content, $instance ) {
|
262 |
+
|
263 |
+
$options = arve_get_options();
|
264 |
+
|
265 |
+
if( ! $options['wp_video_override'] || ! empty( $attr['wmv'] ) || ! empty( $attr['flv'] ) ) {
|
266 |
+
return $out;
|
267 |
+
}
|
268 |
+
|
269 |
+
if( ! empty( $attr['poster'] ) ) {
|
270 |
+
$attr['thumbnail'] = $attr['poster'];
|
271 |
+
}
|
272 |
+
|
273 |
+
return arve_shortcode_arve( $attr, null );
|
274 |
+
}
|
public/functions-thumbnails.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_get_attachment_image_url_or_srcset( $url_or_srcset, $thumbnail ) {
|
4 |
+
|
5 |
+
if( $found = arve_get_cached_attachment_image_url_or_srcset( $url_or_srcset, $thumbnail ) ) {
|
6 |
+
|
7 |
+
return $found;
|
8 |
+
|
9 |
+
} elseif ( 'url' == $url_or_srcset ) {
|
10 |
+
|
11 |
+
return new WP_Error( 'wp thumbnail', __( 'No attachment with that ID', ARVE_SLUG ) );
|
12 |
+
|
13 |
+
} else {
|
14 |
+
|
15 |
+
return false;
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
function arve_get_cached_attachment_image_url_or_srcset( $url_or_srcset, $attachment_id ) {
|
20 |
+
|
21 |
+
$options = arve_get_options();
|
22 |
+
$transient_name = "arve_attachment_image_{$url_or_srcset}_{$attachment_id}";
|
23 |
+
$transient = get_transient( $transient_name );
|
24 |
+
$time = (int) $options['wp_image_cache_time'];
|
25 |
+
|
26 |
+
if( false === $transient || $time <= 0 ) {
|
27 |
+
|
28 |
+
if( 'srcset' == $url_or_srcset ) {
|
29 |
+
|
30 |
+
$out = wp_get_attachment_image_srcset( $attachment_id, 'small' );
|
31 |
+
|
32 |
+
} elseif( 'url' == $url_or_srcset ) {
|
33 |
+
|
34 |
+
$out = wp_get_attachment_image_url( $attachment_id, 'small' );
|
35 |
+
}
|
36 |
+
|
37 |
+
set_transient( $transient_name, (string) $out, $time );
|
38 |
+
|
39 |
+
} else {
|
40 |
+
|
41 |
+
$out = $transient;
|
42 |
+
}
|
43 |
+
|
44 |
+
return $out;
|
45 |
+
}
|
public/functions-url-handlers.php
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_create_url_handlers() {
|
4 |
+
|
5 |
+
$properties = arve_get_host_properties();
|
6 |
+
|
7 |
+
foreach ( $properties as $provider => $values ) {
|
8 |
+
|
9 |
+
$function = function( $matches, $attr, $url, $rawattr ) use ( $provider ) {
|
10 |
+
return arve_url_detection_to_shortcode( $provider, $matches, $attr, $url, $rawattr );
|
11 |
+
};
|
12 |
+
|
13 |
+
if ( ! empty( $values['regex'] ) ) {
|
14 |
+
wp_embed_register_handler( 'arve_' . $provider, '#' . $values['regex'] . '#i', $function );
|
15 |
+
}
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
function arve_url_detection_to_shortcode( $provider, $matches, $attr, $url, $rawattr ) {
|
20 |
+
|
21 |
+
//* Fix 'Markdown on save enhanced' issue
|
22 |
+
if ( substr( $url, -4 ) === '</p>' ) {
|
23 |
+
$url = substr( $url, 0, -4 );
|
24 |
+
}
|
25 |
+
|
26 |
+
$parsed_url = parse_url( $url );
|
27 |
+
$url_query = $old_atts = $new_atts = array();
|
28 |
+
|
29 |
+
if ( ! empty( $parsed_url['query'] ) ) {
|
30 |
+
parse_str( $parsed_url['query'], $url_query );
|
31 |
+
}
|
32 |
+
|
33 |
+
foreach ( $url_query as $key => $value ) {
|
34 |
+
|
35 |
+
if ( arve_starts_with( $key, 'arve-' ) ) {
|
36 |
+
$key = substr( $key, 5 );
|
37 |
+
$old_atts[ $key ] = $value;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
unset( $old_atts['param'] );
|
42 |
+
|
43 |
+
if ( isset( $url_query['arve'] ) ) {
|
44 |
+
$new_atts = $url_query['arve'];
|
45 |
+
}
|
46 |
+
|
47 |
+
if ( isset( $url_query['t'] ) ) {
|
48 |
+
$url_query['start'] = arve_youtube_time_to_seconds( $url_query['t'] );
|
49 |
+
}
|
50 |
+
|
51 |
+
unset( $url_query['arve'] );
|
52 |
+
|
53 |
+
if ( 'youtube' == $provider ) {
|
54 |
+
unset( $url_query['v'] );
|
55 |
+
unset( $url_query['t'] );
|
56 |
+
}
|
57 |
+
|
58 |
+
//* Pure awesomeness!
|
59 |
+
$atts = array_merge( (array) $old_atts, (array) $new_atts );
|
60 |
+
$atts['parameters'] = empty( $url_query ) ? null : build_query( $url_query );
|
61 |
+
$atts['url'] = $url;
|
62 |
+
|
63 |
+
return arve_shortcode_arve( $atts, null );
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Remove the Wordpress default Oembed support for video providers that ARVE Supports. Array taken from wp-includes/class-oembed.php __construct
|
69 |
+
*
|
70 |
+
* @since 5.9.9
|
71 |
+
*
|
72 |
+
*/
|
73 |
+
function arve_oembed_remove_providers() {
|
74 |
+
|
75 |
+
$wp_core_oembed_shits = array(
|
76 |
+
'#http://(www\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ),
|
77 |
+
'#https://(www\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ),
|
78 |
+
#'#http://(www\.)?youtube\.com/playlist.*#i' => array( 'http://www.youtube.com/oembed', true ),
|
79 |
+
#'#https://(www\.)?youtube\.com/playlist.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ),
|
80 |
+
'#http://youtu\.be/.*#i' => array( 'http://www.youtube.com/oembed', true ),
|
81 |
+
'#https://youtu\.be/.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ),
|
82 |
+
'#https?://(.+\.)?vimeo\.com/.*#i' => array( 'http://vimeo.com/api/oembed.{format}', true ),
|
83 |
+
'#https?://(www\.)?dailymotion\.com/.*#i' => array( 'http://www.dailymotion.com/services/oembed', true ),
|
84 |
+
'http://dai.ly/*' => array( 'http://www.dailymotion.com/services/oembed', false ),
|
85 |
+
#'#https?://(www\.)?flickr\.com/.*#i' => array( 'https://www.flickr.com/services/oembed/', true ),
|
86 |
+
#'#https?://flic\.kr/.*#i' => array( 'https://www.flickr.com/services/oembed/', true ),
|
87 |
+
#'#https?://(.+\.)?smugmug\.com/.*#i' => array( 'http://api.smugmug.com/services/oembed/', true ),
|
88 |
+
#'#https?://(www\.)?hulu\.com/watch/.*#i' => array( 'http://www.hulu.com/api/oembed.{format}', true ),
|
89 |
+
#'http://revision3.com/*' => array( 'http://revision3.com/api/oembed/', false ),
|
90 |
+
#'http://i*.photobucket.com/albums/*' => array( 'http://photobucket.com/oembed', false ),
|
91 |
+
#'http://gi*.photobucket.com/groups/*' => array( 'http://photobucket.com/oembed', false ),
|
92 |
+
#'#https?://(www\.)?scribd\.com/doc/.*#i' => array( 'http://www.scribd.com/services/oembed', true ),
|
93 |
+
#'#https?://wordpress.tv/.*#i' => array( 'http://wordpress.tv/oembed/', true ),
|
94 |
+
#'#https?://(.+\.)?polldaddy\.com/.*#i' => array( 'https://polldaddy.com/oembed/', true ),
|
95 |
+
#'#https?://poll\.fm/.*#i' => array( 'https://polldaddy.com/oembed/', true ),
|
96 |
+
'#https?://(www\.)?funnyordie\.com/videos/.*#i' => array( 'http://www.funnyordie.com/oembed', true ),
|
97 |
+
#'#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' => array( 'https://api.twitter.com/1/statuses/oembed.{format}', true ),
|
98 |
+
'#https?://vine.co/v/.*#i' => array( 'https://vine.co/oembed.{format}', true ),
|
99 |
+
#'#https?://(www\.)?soundcloud\.com/.*#i' => array( 'http://soundcloud.com/oembed', true ),
|
100 |
+
#'#https?://(.+?\.)?slideshare\.net/.*#i' => array( 'https://www.slideshare.net/api/oembed/2', true ),
|
101 |
+
#'#http://instagr(\.am|am\.com)/p/.*#i' => array( 'http://api.instagram.com/oembed', true ),
|
102 |
+
#'#https?://(www\.)?rdio\.com/.*#i' => array( 'http://www.rdio.com/api/oembed/', true ),
|
103 |
+
#'#https?://rd\.io/x/.*#i' => array( 'http://www.rdio.com/api/oembed/', true ),
|
104 |
+
#'#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ),
|
105 |
+
#'#https?://(.+\.)?imgur\.com/.*#i' => array( 'http://api.imgur.com/oembed', true ),
|
106 |
+
#'#https?://(www\.)?meetu(\.ps|p\.com)/.*#i' => array( 'http://api.meetup.com/oembed', true ),
|
107 |
+
#'#https?://(www\.)?issuu\.com/.+/docs/.+#i' => array( 'http://issuu.com/oembed_wp', true ),
|
108 |
+
'#https?://(www\.)?collegehumor\.com/video/.*#i' => array( 'http://www.collegehumor.com/oembed.{format}', true ),
|
109 |
+
#'#https?://(www\.)?mixcloud\.com/.*#i' => array( 'http://www.mixcloud.com/oembed', true ),
|
110 |
+
'#https?://(www\.|embed\.)?ted\.com/talks/.*#i' => array( 'http://www.ted.com/talks/oembed.{format}', true ),
|
111 |
+
#'#https?://(www\.)?(animoto|video214)\.com/play/.*#i' => array( 'http://animoto.com/oembeds/create', true ),
|
112 |
+
);
|
113 |
+
|
114 |
+
foreach( $wp_core_oembed_shits as $shit => $fuck ) {
|
115 |
+
|
116 |
+
wp_oembed_remove_provider( $shit );
|
117 |
+
}
|
118 |
+
|
119 |
+
// Jetpack shit
|
120 |
+
remove_shortcode( 'dailymotion', 'dailymotion_shortcode' );
|
121 |
+
remove_filter( 'pre_kses', 'jetpack_dailymotion_embed_reversal' );
|
122 |
+
remove_filter( 'pre_kses', 'dailymotion_embed_to_shortcode' );
|
123 |
+
|
124 |
+
remove_shortcode( 'vimeo', 'vimeo_shortcode' );
|
125 |
+
remove_filter( 'pre_kses', 'vimeo_embed_to_shortcode' );
|
126 |
+
|
127 |
+
wp_embed_unregister_handler( 'jetpack_vine' );
|
128 |
+
remove_shortcode( 'vine', 'vine_shortcode' );
|
129 |
+
|
130 |
+
remove_filter('pre_kses', 'youtube_embed_to_short_code');
|
131 |
+
remove_shortcode( 'youtube', 'youtube_shortcode' );
|
132 |
+
|
133 |
+
remove_shortcode( 'ted', 'shortcode_ted' );
|
134 |
+
wp_oembed_remove_provider( '!https?://(www\.)?ted.com/talks/view/id/.+!i' );
|
135 |
+
wp_oembed_remove_provider( '!https?://(www\.)?ted.com/talks/[a-zA-Z\-\_]+\.html!i' );
|
136 |
+
}
|
public/functions-validation.php
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_validate_url( $url ) {
|
4 |
+
|
5 |
+
if ( arve_starts_with( $url, '//' ) ) {
|
6 |
+
$url = 'https:' . $url;
|
7 |
+
}
|
8 |
+
|
9 |
+
if ( arve_starts_with( $url, 'http' ) && filter_var( $url, FILTER_VALIDATE_URL ) !== false ) {
|
10 |
+
return true;
|
11 |
+
}
|
12 |
+
|
13 |
+
return false;
|
14 |
+
}
|
15 |
+
|
16 |
+
function arve_validate_aspect_ratio( $aspect_ratio ) {
|
17 |
+
|
18 |
+
if ( empty( $aspect_ratio ) ) {
|
19 |
+
return $aspect_ratio;
|
20 |
+
}
|
21 |
+
|
22 |
+
$a = explode( ':', $aspect_ratio );
|
23 |
+
|
24 |
+
if ( ! empty( $a[0] ) && is_numeric( $a[0] ) && ! empty( $a[1] ) && is_numeric( $a[1] ) ) {
|
25 |
+
return $aspect_ratio;
|
26 |
+
}
|
27 |
+
|
28 |
+
return new WP_Error( 'Aspect ratio',
|
29 |
+
sprintf( __( 'Aspect ratio <code>%s</code> is not valid', ARVE_SLUG ), $aspect_ratio )
|
30 |
+
);
|
31 |
+
}
|
32 |
+
|
33 |
+
function arve_bool_to_shortcode_string( $val ) {
|
34 |
+
|
35 |
+
if ( false === $val ) {
|
36 |
+
return 'n';
|
37 |
+
}
|
38 |
+
|
39 |
+
return (string) $val;
|
40 |
+
}
|
41 |
+
|
42 |
+
function arve_validate_bool( $val, $name ) {
|
43 |
+
|
44 |
+
switch ( $val ) {
|
45 |
+
case 'true':
|
46 |
+
case '1':
|
47 |
+
case 'y':
|
48 |
+
case 'yes':
|
49 |
+
case 'on':
|
50 |
+
return true;
|
51 |
+
break;
|
52 |
+
case null;
|
53 |
+
return null;
|
54 |
+
break;
|
55 |
+
case 'false':
|
56 |
+
case '0':
|
57 |
+
case 'n':
|
58 |
+
case 'no':
|
59 |
+
case 'off':
|
60 |
+
return false;
|
61 |
+
break;
|
62 |
+
default:
|
63 |
+
return new WP_Error( $name,
|
64 |
+
sprintf( __( '%s <code>%s</code> not valid', ARVE_SLUG ), $name, $val )
|
65 |
+
);
|
66 |
+
break;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
function arve_validate_align( $align ) {
|
71 |
+
|
72 |
+
switch ( $align ) {
|
73 |
+
case null:
|
74 |
+
case '':
|
75 |
+
case 'none':
|
76 |
+
$align = null;
|
77 |
+
break;
|
78 |
+
case 'left':
|
79 |
+
case 'right':
|
80 |
+
case 'center':
|
81 |
+
break;
|
82 |
+
default:
|
83 |
+
$align = new WP_Error( 'align', sprintf( __( 'Align <code>%s</code> not valid', ARVE_SLUG ), esc_html( $align ) ) );
|
84 |
+
break;
|
85 |
+
}
|
86 |
+
|
87 |
+
return $align;
|
88 |
+
}
|
89 |
+
|
90 |
+
function arve_validate_mode( $mode, $provider ) {
|
91 |
+
|
92 |
+
if ( 'thumbnail' == $mode ) {
|
93 |
+
$mode = 'lazyload-lightbox';
|
94 |
+
}
|
95 |
+
|
96 |
+
if ( 'veoh' == $mode ) {
|
97 |
+
$mode = 'normal';
|
98 |
+
}
|
99 |
+
|
100 |
+
$supported_modes = arve_get_supported_modes();
|
101 |
+
|
102 |
+
if ( ! array_key_exists( $mode, $supported_modes ) ) {
|
103 |
+
|
104 |
+
#$mode = new WP_Error( 'mode', sprintf(
|
105 |
+
# __( 'Mode: <code>%s</code> is invalid or not supported. Note that you will need the Pro Addon activated for modes other than normal.', ARVE_SLUG ),
|
106 |
+
# esc_html( $mode )
|
107 |
+
#) );
|
108 |
+
|
109 |
+
$mode = 'normal';
|
110 |
+
}
|
111 |
+
|
112 |
+
return $mode;
|
113 |
+
}
|
public/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
readme.txt
ADDED
@@ -0,0 +1,1156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video ...) ===
|
2 |
+
Contributors: nico23
|
3 |
+
Donate link: https://www.paypal.me/nico23
|
4 |
+
Tags: YouTube, Vimeo, lazyload, thumbnail, video, responsive, embeds, video-embedder, iframe, lightweight, simplicity, shortcodes
|
5 |
+
Requires at least: 4.4.0
|
6 |
+
Tested up to: 4.9.4
|
7 |
+
Requires PHP: 5.3
|
8 |
+
Stable tag: trunk
|
9 |
+
License: GPL-3.0
|
10 |
+
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
|
12 |
+
Easy responsive video embeds via URLs or shortcodes. Perfect drop-in replacement for WordPress' default embeds. Best plugin for videos?
|
13 |
+
|
14 |
+
## Description ##
|
15 |
+
|
16 |
+
The best WordPress plugin for videos? Supports close to everything you can imagine, still keeping it easy & simple.
|
17 |
+
|
18 |
+
It is very likely the one and only plugin you will ever need to handle video embeds on your WordPress site(s). It goes far beyond just making your videos responsive!
|
19 |
+
|
20 |
+
[youtube https://www.youtube.com/watch?v=m6mkA6Zr1vY ]
|
21 |
+
|
22 |
+
* [Documentation](https://nextgenthemes.com/plugins/arve/documentation/)
|
23 |
+
* [GitHub Page](https://github.com/nextgenthemes/advanced-responsive-video-embedder)
|
24 |
+
* [Pro Addon](https://nextgenthemes.com/plugins/arve-pro/)
|
25 |
+
|
26 |
+
### Features ###
|
27 |
+
|
28 |
+
* SEO friendly, lets you specify title, description, upload date to provide search engines with the schema.org data they like to have for better indexing.
|
29 |
+
* <abbr title="What You See Is What You Get">WYSIWYG</abbr> support. No more messing around with shortcodes and previewing.
|
30 |
+
* New improved dialog for embedding videos.
|
31 |
+
* Magically makes those url embedded videos responsive.
|
32 |
+
* No 'lock in' if do not use shortcodes and use providers WordPress already supports.
|
33 |
+
* Supports [almost every video host](https://nextgenthemes.com/plugins/arve-pro/#support-table) that supports iframe embed codes.
|
34 |
+
* Embeds via pasting the URL in its own line just like WordPress!
|
35 |
+
* Optionally use very powerful Shortcodes instead.
|
36 |
+
* Clean shortcode syntax `[arve url="https://youtu.be/yUCFRL43Zm4" align="left" parameters="start=30" ... /]`, no unnecessary shortcode wrapping.
|
37 |
+
* One single button for all providers.
|
38 |
+
* Responsive embeds with CSS, much better then with JavaScript.
|
39 |
+
* Tries to be as unobtrusive as possible, sets 'hide brand' variables if supported, disables related videos at the end … to help keep people on your site rather then going to YouTube or keep watching videos.
|
40 |
+
* Autostart (for providers that support it, mobile browsers prevent this)
|
41 |
+
* Custom URL parameters to use all options providers offer.
|
42 |
+
* Optional maximal width.
|
43 |
+
* Video alignment.
|
44 |
+
* Detailed description of options in-place.
|
45 |
+
* Automatic detected and custom aspect ratio.
|
46 |
+
|
47 |
+
### [Supported Providers](https://nextgenthemes.com/plugins/arve-pro/#support-table) ###
|
48 |
+
|
49 |
+
allmyvideos.net, Alugha, Archive.org, Break, Brightcove, CollegeHumor, Comedy Central, Dailymotion, Facebook, Funny or Die, IGN, Kickstarter, LiveLeak, Livestream, kla.tv, Metacafe, Movieweb, MPORA, Myspace, Snotr, Spike, TED Talks, Twitch, Ustream, RuTube.ru, Veoh, Vevo, Viddler, vidspot.net, Vine, Vimeo, VK, Vzaar, Wistia, XTube, Yahoo, Youku, YouTube, YouTube Playlist, HTML5 video files directly, Google_drive, Dropbox, Ooyala
|
50 |
+
[All providers with responsive iframe embed codes](https://nextgenthemes.com/plugins/arve/documentation/#general-iframe-embedding)
|
51 |
+
|
52 |
+
### Reviews ###
|
53 |
+
|
54 |
+
#### ★ ★ ★ ★ ★ The best there is – I have tried many… ####
|
55 |
+
Have downloaded and paid for at least 4 other video players that use lightbox. Each one has major flaws. This products works perfectly. If you use the OnSite Editor, then just copy the short code and it works great.
|
56 |
+
|
57 |
+
[arve url="https://www.youtube.com/watch?v=Z7g8-GxLTSc" /]
|
58 |
+
|
59 |
+
For speed, the product uses the thumbnails from the server. So many of the other products do NOT do this and it slows the page rendering. This product should appear first on the WordPress search. Spent 3 days of my life wasted on other products, only to delete each one. [review by jodani](https://wordpress.org/support/plugin/advanced-responsive-video-embedder/reviews/?filter=5)
|
60 |
+
|
61 |
+
#### ★ ★ ★ ★ ★ Finally something that works ####
|
62 |
+
So I have a responsive theme but on pages with you tube videos it wasn't making the you tube videos fit in the mobile screen. I have spent the last hour trying many plugins and researching on google and finally I installed this. And I didn't have to update any settings or anything just refreshed a post with videos and all the sudden it is beautiful and responsive on my mobile phone!!!!!! THANK YOU!!!! [review by happyecho](https://wordpress.org/support/plugin/advanced-responsive-video-embedder/reviews/?filter=5)
|
63 |
+
|
64 |
+
#### ★ ★ ★ ★ ★ Only Plug-in that worked ####
|
65 |
+
I used a lot of high ranking plug-ins but they still broke my design. Downloaded this and worked right away. Thanks! [review by crconnell89](https://wordpress.org/support/plugin/advanced-responsive-video-embedder/reviews/?filter=5)
|
66 |
+
|
67 |
+
This plugin is financed by sales of the [Pro Addon](https://nextgenthemes.com/plugins/arve-pro/). The development and support of this plugins has become a job for me so I hope you understand that I can not make all features gratis and that you [purchase it](https://nextgenthemes.com/plugins/arve-pro/) to get extra features and support the development.
|
68 |
+
|
69 |
+
### [Pro Addon](https://nextgenthemes.com/plugins/arve-pro/) ###
|
70 |
+
|
71 |
+
* **Disable links in embeds (killer feature!)**<br>
|
72 |
+
For example: Clicking on a title in a YouTube embed will not open a new popup/tab/window. **Prevent video hosts to lead your visitors away from your site!** Note this also breaks sharing functionality and is not possible when the provider requires flash. Try it on [this page](https://nextgenthemes.com/plugins/arve-pro/). Right click on links still works.
|
73 |
+
* **Lazyload mode**<br>
|
74 |
+
Make your site load **faster** by loading only a image instead of the entire video player on pageload.
|
75 |
+
* **Lazyload -> Lightbox**<br>
|
76 |
+
Shows the Video in a Lightbox after clicking a preview image
|
77 |
+
* **Link -> Lightbox**<br>
|
78 |
+
Use simple links as triggers for lightboxed videos
|
79 |
+
* Automatic or custom thumbnail images
|
80 |
+
* Automatic or custom titles on top of your thumbnails
|
81 |
+
* 'Expand on click' feature
|
82 |
+
* 3 hover styles
|
83 |
+
* 2 play icon styles to choose from
|
84 |
+
* Responsive thumbnails using cutting edge HTML5 technology
|
85 |
+
* **Feel good about yourself**<br>
|
86 |
+
for supporting my 5+ years work on this plugin. Tons of hours, weekends … always worked on improving it.
|
87 |
+
* Show the latest video of a YouTube channel by using the channel URL (updated/cached hourly)
|
88 |
+
* **[Get the ARVE Pro Addon](https://nextgenthemes.com/plugins/arve-pro/)**
|
89 |
+
|
90 |
+
### ARVE AMP Addon ###
|
91 |
+
|
92 |
+
* Requires the gratis plugins [ARVE](https://wordpress.org/plugins/advanced-responsive-video-embedder/) and [AMP](https://wordpress.org/plugins/amp/)
|
93 |
+
* Makes ARVE ready for Accelerated Mobile Pages (AMP)
|
94 |
+
* It will display videos embedded with ARVE on AMP pages correctly
|
95 |
+
* No options, just works
|
96 |
+
* It creates <amp-brightcove>, <amp-youtube>, <amp-vimeo>, <amp-dailymotion> elements
|
97 |
+
* For all other video hosts supported by ARVE <amp-iframe> element is used
|
98 |
+
* HTML5 video embeds are also supported with <amp-video>
|
99 |
+
* **[Check out the ARVE AMP Addon](https://nextgenthemes.com/plugins/arve-amp/)**
|
100 |
+
|
101 |
+
### Thanks ###
|
102 |
+
|
103 |
+
* Of course all the customers who bought a addon.
|
104 |
+
* Howard Iken of [myfloridalaw.com](https://www.myfloridalaw.com) top donor, super nice to me even if I was rude and not deserved it!
|
105 |
+
* [Ilya Grishkov](https://www.ilyagrishkov.com) for bringing up the idea and the first code to cache thumbnail urls.
|
106 |
+
* Everybody giving constructive feedback, testing beta versions.
|
107 |
+
* Everybody who donated back in the days when this was donation based.
|
108 |
+
|
109 |
+
### Thanks to the developers of the software used in ARVE ###
|
110 |
+
|
111 |
+
* [Shortcode UI](https://wordpress.org/plugins/shortcode-ui/), optional Plugin, utilized by ARVE
|
112 |
+
* [Lity Lightbox](http://sorgalla.com/lity/), used in [Pro Addon](https://nextgenthemes.com/plugins/arve-pro/)
|
113 |
+
|
114 |
+
## Installation ##
|
115 |
+
|
116 |
+
Please refer to [codex.wordpress.org/Managing_Plugins#Automatic_Plugin_Installation](https://codex.wordpress.org/Managing_Plugins#Automatic_Plugin_Installation).
|
117 |
+
|
118 |
+
## Frequently Asked Questions ##
|
119 |
+
|
120 |
+
### I have a problem ... ###
|
121 |
+
|
122 |
+
Please report it on [nextgenthemes.com/support/](https://nextgenthemes.com/support/) **and please do not on the wordpess.org forums, thanks.**
|
123 |
+
|
124 |
+
### How to get the pro version working? ###
|
125 |
+
|
126 |
+
1. Go though the purchase process on [nextgenthemes.com/arve-pro/](https://nextgenthemes.com/arve-pro/)
|
127 |
+
1. Follow the 3 easy steps you get with the purchase receipt. It is basically downloading a arve-pro.zip and installing it through your WordPress Admin panel.
|
128 |
+
|
129 |
+
### Why are my videos not filling their container? ###
|
130 |
+
|
131 |
+
You are most likely use `align`, this plugin has a option for limiting video width with alignment. If you want your videos to fill their containers then you should not use the `align` shortcode attribute. This assumes that you left the 'Video Maximal Width' field on the options page empty.
|
132 |
+
|
133 |
+
### Can you add a video provider? ###
|
134 |
+
|
135 |
+
I have no plans on implementing providers that include videos via JavaScript such as www.nicovideo.jp. I also will not implement video services from mainstream media news organizations. For others, feel free to ask.
|
136 |
+
|
137 |
+
### How do I embed videos from a unlisted providers / iframes? ###
|
138 |
+
|
139 |
+
This plugin not changes anything to usual HTML `<iframe>` embed codes you have to use the shortcode creator dialog and paste iframe embed codes there or write them manually. They will become `[arve url="https://..."]`. The url represents what is the `src` in HTML embeds. It works as simple as this, if the [arve] shortcode does not detect a known URL structure then it will treat the URL as a `src` for the iframe.
|
140 |
+
|
141 |
+
### Why does my YouTube video not repeat/loop? ###
|
142 |
+
|
143 |
+
This plugins embed is considered as 'custom player' by YouTube so you have to pass the video ID as playlist parameters to make the loop work.
|
144 |
+
|
145 |
+
`[arve url="https://www.youtube.com/watch?v=pvRqvX413Ik" parameters="loop=1&playlist=pvRqvX413Ik"]`
|
146 |
+
|
147 |
+
## Screenshots ##
|
148 |
+
|
149 |
+
1. Shortcode dialog
|
150 |
+
2. Main Options
|
151 |
+
2. URL Parameter Options
|
152 |
+
3. Pro Options
|
153 |
+
|
154 |
+
## Changelog ##
|
155 |
+
|
156 |
+
* [ARVE Pro addon changelog](https://nextgenthemes.com/plugins/arve-pro/changelog/)
|
157 |
+
* [ARVE AMP addon changelog](https://nextgenthemes.com/plugins/arve-amp/)
|
158 |
+
|
159 |
+
### 2018-06-07 - 8.9.5 ###
|
160 |
+
|
161 |
+
* Fixed: When pasting embed codes into the Shortcode UI dialog the `src=` will be extracted even when no quotes are used.
|
162 |
+
* Improved: Use youtube-nocookie.com domain again it is GPRP/Privacy friendly. Note the name is confusing as it sets cookies, but only when the user plays the video rather then just when loading the iframe. So its not "no cookies". But you can mention this into your cookie notices when dealing with GPRP.
|
163 |
+
|
164 |
+
### 2018-06-02 - 8.9.4 ###
|
165 |
+
|
166 |
+
* Improved: Try to make autoplay in Chrome possible again. See [New Chrome Autoplay behavior](https://developers.google.com/web/updates/2017/09/autoplay-policy-changes). At the point of writing its not clear if the new iframe attribute makes them just autoplay no matter what. Please report your experiences.
|
167 |
+
|
168 |
+
### 2018-04-29 - 8.9.3 ###
|
169 |
+
|
170 |
+
* Improved: Make overwrite of shortcode possible. Used in new [Random Video Addon](https://nextgenthemes.com/plugins/arve-random-video/)
|
171 |
+
|
172 |
+
### 2018-04-18 - 8.9.2 ###
|
173 |
+
|
174 |
+
* Fix possible "not a string" errors.
|
175 |
+
|
176 |
+
### 2018-04-12 - 8.9.1 ###
|
177 |
+
|
178 |
+
* New: Option to always load assets. Needed when dealing with AJAX and other special cases.
|
179 |
+
|
180 |
+
### 2018-03-16 - 8.9.0 ###
|
181 |
+
|
182 |
+
* Fixed/improved Ustream url detection. Make sure you remove `wmode=transparent` if present and include `html5ui=1` for ustream on the ARVE URL parameters settings tab.
|
183 |
+
|
184 |
+
### 2018-03-13 - 8.8.9 ###
|
185 |
+
|
186 |
+
* Improved licensing debug code.
|
187 |
+
* Added Vimeo PHP API class for upcoming versions and addons.
|
188 |
+
|
189 |
+
### 2018-03-13 - 8.8.8 ###
|
190 |
+
|
191 |
+
* Added code to debug issues with license activations.
|
192 |
+
|
193 |
+
### 2018-03-05 - 8.8.7 ###
|
194 |
+
|
195 |
+
* Fixed a link on the plugins screen (Thanks Hans).
|
196 |
+
|
197 |
+
### 2018-02-25 - 8.8.6 ###
|
198 |
+
|
199 |
+
* Fix: HTML5 videos not working with lightbox in [ARVE PRO](https://nextgenthemes.com/plugins/arve-pro/)
|
200 |
+
|
201 |
+
### 2018-02-25 - 8.8.5 ###
|
202 |
+
|
203 |
+
* Fix: Add default url parameters to youtube playlists. Note they will effect playlist urls like `https://www.youtube.com/playlist?list=PLXYApifkdCACM_ykvnCHeth-vIB6v1XE3` only and not those who also reference the starting video. There is currently a separate parameters option for this but it will be removed in version 9.0.
|
204 |
+
|
205 |
+
### 2018-02-23 - 8.8.4 ###
|
206 |
+
|
207 |
+
* Fix: YouTube playlists where not correctly detected when having a underscore in the id.
|
208 |
+
* Improved: Better explanation of the new disable flash for general iframe option on the settings page.
|
209 |
+
|
210 |
+
### 2018-02-16 - 8.8.3 ###
|
211 |
+
|
212 |
+
* New: Option to disable flash for not listed providers for more secure embeds and make the 'disable links' Pro Addon feature possible for those. See the description on the options page.
|
213 |
+
* Fix: Licensing deactivation did not work.
|
214 |
+
* Improved: Marked some providers as not requiring flash anymore.
|
215 |
+
* Improved: Fixed some links throughout the plugin and readme.
|
216 |
+
* Improved: Some minor code improvements.
|
217 |
+
|
218 |
+
### 2018-02-12 - 8.8.2 ###
|
219 |
+
|
220 |
+
* Fix: Issue with the new Video API class.
|
221 |
+
|
222 |
+
### 2018-02-12 - 8.8.1 ###
|
223 |
+
|
224 |
+
* Fix: `Can’t use function return value in write context`, white screen of deaths type error from the last update.
|
225 |
+
|
226 |
+
### 2018-02-12 - 8.8.0 ###
|
227 |
+
|
228 |
+
**I could really use some positive reviews. It has been over 7 months without a 5 star review.** The top level menu that was complained about a lot has been removed. I am working on a big update that will make ARVE even better with automatic detection of aspect ratios, better caching and lots of improved code.
|
229 |
+
|
230 |
+
* New: Added options fields for Vimeo API used in upcoming addons.
|
231 |
+
* Improved: Removed NextGenThemes top level menu and ads page because to many complaints.
|
232 |
+
* Improved: Moved licensing settings page to 'settings' menu.
|
233 |
+
|
234 |
+
### 2018-02-02 - 8.7.8 ###
|
235 |
+
|
236 |
+
* No longer try to guess and spam autoplay parameters for general iframe embeds.
|
237 |
+
* Fix: Google drive embeds not working.
|
238 |
+
|
239 |
+
### 2018-01-09 - 8.7.7 ###
|
240 |
+
|
241 |
+
* New: `duration` shortcode attribute and dialog entry.
|
242 |
+
* Fixed: Corrected some dead links inside the plugin.
|
243 |
+
* Improved: Added `muted`, `controls` and `loop` to shortcode UI dialog for HTML5 videos.
|
244 |
+
* Improved: Removed video file extension check so any file can be used `[arve mp4="http://example.com/some-file" webm="http://example.com/some-other-file" /]`. Useful for example to embed files hosted on IPFS that do have a cryptic hash instead of a human readable filename.
|
245 |
+
|
246 |
+
### 2017-12-20 - 8.7.6 ###
|
247 |
+
|
248 |
+
* Fix license activation now working correctly.
|
249 |
+
* Corrected link in readme.
|
250 |
+
|
251 |
+
### 2017-12-19 - 8.7.5 ###
|
252 |
+
|
253 |
+
* Maybe fix license activation in some rare cases.
|
254 |
+
|
255 |
+
### 2017-12-17 - 8.7.4 ###
|
256 |
+
|
257 |
+
* Fix: Removed URL validation because it fails with some weird URLs.
|
258 |
+
|
259 |
+
### 2017-12-13 - 8.7.3 ###
|
260 |
+
|
261 |
+
* Updated EDD Plugin Updater class.
|
262 |
+
* Fixed some links in the readme.
|
263 |
+
|
264 |
+
### 2017-08-16 - 8.7.2 ###
|
265 |
+
|
266 |
+
* Fix: Same Video with different start times in lightboxes.
|
267 |
+
|
268 |
+
### 2017-07-12 - 8.7.1 ###
|
269 |
+
|
270 |
+
* Fix: Throw no PHP notice on admin when WP_DEBUG is enabled.
|
271 |
+
* Fix: Fix related to upcoming Pro Addon update and private vimeo videos.
|
272 |
+
|
273 |
+
### 2017-07-10 - 8.7.0 ###
|
274 |
+
|
275 |
+
* Fix: web.facebook.com/... video urls not getting detected
|
276 |
+
|
277 |
+
### 2017-06-17 - 8.6.6 ###
|
278 |
+
|
279 |
+
* Fix: Message dismissal not working.
|
280 |
+
|
281 |
+
### 2017-06-17 - 8.6.5 ###
|
282 |
+
|
283 |
+
* Fix: Added `allow-presentation` to iframe sandbox to fix Chrome 59 not loading iframes. Thanks njs
|
284 |
+
* Improved: Admin message and dashboard ad size reduced, added links to dashboard widget, settings page ad is now sidebar-like on big screens.
|
285 |
+
|
286 |
+
### 2017-06-15 - 8.6.4 ###
|
287 |
+
|
288 |
+
* Fix: Removes a .video-wrap element from ARVE's HTML that is added by a theme and caused videos to be invisible.
|
289 |
+
* Fix: PHP error in some cases.
|
290 |
+
* Improved: If mode is not supported fall back to normal without error message (for now).
|
291 |
+
* Improved: Changed embed URL for Alugha
|
292 |
+
|
293 |
+
### 2017-05-17 - 8.6.3 ###
|
294 |
+
|
295 |
+
* Fixed issue with width and height attributes
|
296 |
+
|
297 |
+
### 2017-05-17 - 8.6.2 ###
|
298 |
+
|
299 |
+
* Fixed license activation issues.
|
300 |
+
|
301 |
+
### 2017-05-10 - 8.6.1 ###
|
302 |
+
|
303 |
+
* Minor code change.
|
304 |
+
|
305 |
+
### 2017-05-10 - 8.6.0 ###
|
306 |
+
|
307 |
+
* New: `controlslist` shortcode attribute and option to control the Chrome HTML5 player `nodownload` is default, it hides the download button on the player.
|
308 |
+
|
309 |
+
### 2017-05-05 - 8.5.2 ###
|
310 |
+
|
311 |
+
* Improved: Embed Liveleak with https. Remove the default parameter.
|
312 |
+
|
313 |
+
### 2017-05-05 - 8.5.1 ###
|
314 |
+
|
315 |
+
* Improved: Mark Liveleak that it not requires flash anymore. This makes the 'disable links' option of the Pro Addon possible. Becomes very handy as Liveleak annoyingly opens new tabs when clicking outside the play button.
|
316 |
+
|
317 |
+
### 2017-05-04 - 8.5.0 ###
|
318 |
+
|
319 |
+
* New: playsinline, and muted attributes for HTML5 video.
|
320 |
+
* Data attributes are no longer prefixed with -arve and various other code improvements.
|
321 |
+
|
322 |
+
### 2017-05-01 - 8.4.2 ###
|
323 |
+
|
324 |
+
* Code improvements for addons.
|
325 |
+
|
326 |
+
### 2017-04-30 - 8.4.1 ###
|
327 |
+
|
328 |
+
* Fix password protected videos on vimeo (sandbox allow-forms)
|
329 |
+
|
330 |
+
### 2017-04-25 - 8.4.0 ###
|
331 |
+
|
332 |
+
* Improved: The 'Take over [video]' option was renamed to 'Use ARVE for HTML5 video embeds' and is now enabled by default. (It never only was the shortcode but also HTML5 video file URLs on their own lines)
|
333 |
+
* New: Support for embedding Dropbox hosted HTML5 video files (mp4, webm, ogv). Needs the 'Use ARVE for HTML5 video embeds' to be activated. (Beta feature)
|
334 |
+
* Fix: YouTube only playlist URLs embedded without https.
|
335 |
+
|
336 |
+
### 2017-04-11 - 8.3.1 ###
|
337 |
+
|
338 |
+
* Fix: Global CSS id was not correctly added.
|
339 |
+
|
340 |
+
### 2017-04-10 - 8.2.5 ###
|
341 |
+
|
342 |
+
* Fix: Some Brightcove URLs were not correctly detected.
|
343 |
+
* Improved: Better automated tests and some minor code enhancements.
|
344 |
+
* Improved: Some texts, new link to the settings page below parameter field.
|
345 |
+
* Improved: How aspect ratio is handled for HTML 5 video. If not set (default) the browser will detect it based on the video file that is embedded.
|
346 |
+
* Improved: Gives the aligned videos a top margin of `0.4em` to try to align them better with text.
|
347 |
+
* Improved: The 'by ARVE' promotion links do now open in a new tab/window.
|
348 |
+
|
349 |
+
### 2017-03-27 - 8.2.4 ###
|
350 |
+
|
351 |
+
* Fixed: YouTube cards generate a youtube-nocookie.com url to a channel when the -nocookie.url is used to embedding. tltr; This is actually a YouTube bug but this is fixed in ARVE now by using the normal YouTube url for embeds. I like the additional 'privacy' it provides by not setting cookies as long as the user not plays a video. But considering this is not the first time YouTube has bugs related to this feature, I switched this back and forth in the past, I am considering just not using it anymore.
|
352 |
+
|
353 |
+
### 2017-03-25 - 8.2.3 ###
|
354 |
+
|
355 |
+
* Fixed: 'Disable links' feature from the Pro Addon was not working.
|
356 |
+
* Some minor code improvements.
|
357 |
+
|
358 |
+
### 2017-03-20 - 8.2.2 ###
|
359 |
+
|
360 |
+
* Moved the ARVE menu below the settings menu (where most plugins are), sorry xberg. I got complaints about global menus and I like to keep the global Nextgenthemes menu but 2 global menus is a bit to much. I have given the Nextgenthemes menu a video icon now. I hope this is a good compromise.
|
361 |
+
* Improved: Finished the German translation.
|
362 |
+
* Improved: Made the ARVE Pro promotion on the settings menu close-able, hopefully less people get offended.
|
363 |
+
|
364 |
+
### 2017-03-20 - 8.2.0 ###
|
365 |
+
|
366 |
+
* Fixed: Plugin action links on installed plugin screen
|
367 |
+
* Fixed: CSS specificity issues by adding a `id="arve"` to the entire document and based all the CSS on `#arve`. This will end a long time battle with themes styles without using bad practices. If you have custom styles overwriting ARVE CSS you may need to increase specificity (or use `!important`).
|
368 |
+
* Improved: styles and scripts and now served minified unless `WP_DEBUG` is set.
|
369 |
+
* Improved: styles are now only loaded (to the bottom) when there is a video on the page.
|
370 |
+
* Improved: Settings title is now 'Advanced Responsive Video Embedder Settings' again rather then just ARVE.
|
371 |
+
|
372 |
+
### 2017-03-12 - 8.1.1 ###
|
373 |
+
|
374 |
+
* Improved: Added ARVE to menu below plugins so it can be easy found.
|
375 |
+
* Improved: Used `wp_add_inline_style` function for inline styles.
|
376 |
+
* Removed some code that is not needed.
|
377 |
+
|
378 |
+
### 2017-03-03 - 8.0.9 ###
|
379 |
+
|
380 |
+
* Fix: Admin page error for messing file.
|
381 |
+
|
382 |
+
### 2017-03-02 - 8.0.8 ###
|
383 |
+
|
384 |
+
* Improved: Updated EDD Plugin Updater class
|
385 |
+
|
386 |
+
### 2017-02-24 - 8.0.7 ###
|
387 |
+
|
388 |
+
* Fix: Options not correctly put in debug-info.
|
389 |
+
* Improved: Make License input fields a bit wider.
|
390 |
+
* Improved: Some small code improvements.
|
391 |
+
|
392 |
+
### 2017-02-12 - 8.0.5 ###
|
393 |
+
|
394 |
+
* Fix: Small size of lightbox when using the [Pro Addon](https://nextgenthemes.com/plugins/arve-pro/).
|
395 |
+
|
396 |
+
### 2017-02-11 - 8.0.4 ###
|
397 |
+
|
398 |
+
* CSS improved
|
399 |
+
* Updated Addon Updater Class
|
400 |
+
|
401 |
+
### 2017-01-03 - 8.0.2 ###
|
402 |
+
|
403 |
+
* Fix: Errors on settings page when Pro Addon is not installed.
|
404 |
+
|
405 |
+
### 2016-12-17 - 8.0.1 ###
|
406 |
+
|
407 |
+
* Fix: `undefined function is_plugin_active()` error caused by some plugins
|
408 |
+
* Improved: Show actual meaningful message if PHP is lower then the required 5.3. Bluehost (oh proud wp.org recommended host) seems to show customers a **wrong** php version in the config and lets them hang on insecure end of life versions.
|
409 |
+
|
410 |
+
### 2016-12-09 - Pro Addon 3.6.8 ###
|
411 |
+
|
412 |
+
* Fix: Wrongly tagged version.
|
413 |
+
|
414 |
+
### 2016-12-07 - Pro Addon 3.6.7 ###
|
415 |
+
|
416 |
+
* Fix: Some thumbnails not loading.
|
417 |
+
|
418 |
+
### 2016-12-07 - 8.0.0 ###
|
419 |
+
|
420 |
+
* Fix: 'Take over [video] shortcode' option not working. (Always acted as on, default is off)
|
421 |
+
* Fix: [video] override putting out a error for not reason.
|
422 |
+
* Improved code: Dropped 2 micro classes in favor for antonymous functions.
|
423 |
+
|
424 |
+
### 2016-12-07 - Pro Addon 3.6.6 ###
|
425 |
+
|
426 |
+
* Improved: Load the CSS always in the `<head>`, this enables to change its CSS with the new CSS customizer in WP 4.7 and may also fix issues with caching plugins.
|
427 |
+
|
428 |
+
### 2016-11-30 - 7.9.23 ###
|
429 |
+
|
430 |
+
* Fix: Ending up with wrong URLs by disabling auto shortening of URLs when pasting them into the shortcode-ui dialog.
|
431 |
+
* Improved: Enable SSL verify for API calls.
|
432 |
+
* Improved: License action return messages.
|
433 |
+
|
434 |
+
### 2016-11-30 - Pro Addon 3.6.4 ###
|
435 |
+
|
436 |
+
* Fix: Autoplay without setting
|
437 |
+
|
438 |
+
### 2016-11-30 - 7.9.21 ###
|
439 |
+
|
440 |
+
* Fix: Fatal error.
|
441 |
+
|
442 |
+
### 2016-11-29 - Pro Addon 3.6.4 ###
|
443 |
+
|
444 |
+
* Improved: Licensing field removed from the pro options tab (now in main plugin). This enables resetting pro options settings without deleting license key.
|
445 |
+
* Fix: Autoplay not applied property.
|
446 |
+
* Fix: HTML5 not autoplaying in lightbox.
|
447 |
+
* Improved: New default option for inview lazyload is 'On iOS, Android and Desktops when no thumbnail is found'.
|
448 |
+
* Improved: New installations will show a message guiding users to activation screen.
|
449 |
+
|
450 |
+
### 2016-11-29 - 7.9.19
|
451 |
+
|
452 |
+
* Fix: 'Embed Video' Button not working with Advanced Custom Fields (Possibly fixed other 3rd party editor plugins compatibility issues as well) Thanks to David Trenear!
|
453 |
+
* Fix: Facebook URL detection for usernames with dots in them.
|
454 |
+
* Fix: Invisible HTML5 Lazyload-lightbox videos
|
455 |
+
* Fix: Shortcode UI script enqueued to early causing JS erros on admin pages.
|
456 |
+
* Improved: Error messages for missing mandatory attributes.
|
457 |
+
* Improved: Moved some code logic of the pro addon out of the main plugin.
|
458 |
+
* New: `disable_flash` parameter mainly for unlisted providers will be treated as general iframe embeds. With set to true this will enable you to use the 'disable_links' feature of the pro plugin.
|
459 |
+
* New: Filters for new cool things coming up
|
460 |
+
* New: License page, relocated options page
|
461 |
+
* New: YouTube URL detection for playlists without starting video `https://www.youtube.com/playlist?list=PL3Esg-ZzbiUmeSKBAQ3ej1hQxDSsmnp-7`
|
462 |
+
* Possible Fix: Videos displayed to small in some Browsers
|
463 |
+
|
464 |
+
### 2016-10-29 - 7.9.8 and Pro Addon 3.3.4 ###
|
465 |
+
|
466 |
+
* Fix: Fix lightbox thumbnail
|
467 |
+
* Improved: CSS
|
468 |
+
|
469 |
+
### 2016-10-28 - Pro Addon 3.3.1 ###
|
470 |
+
|
471 |
+
* Fix: Fix thumbnails being displayed wrong in IE.
|
472 |
+
|
473 |
+
### 2016-10-28 - Pro Addon 3.3.0 ###
|
474 |
+
|
475 |
+
* Fix: Restored broken update notifications and semi auto updates.
|
476 |
+
|
477 |
+
### 2016-10-28 - 7.9.7 ###
|
478 |
+
|
479 |
+
* New: Wistia Support.
|
480 |
+
* Improved: Allow HTML in title attribute.
|
481 |
+
* Improved: Force more CSS Styles.
|
482 |
+
|
483 |
+
### 2016-10-27 - Pro Addon 3.2.9 ###
|
484 |
+
|
485 |
+
* Fix: Twitch API failing (needs Client-ID now)
|
486 |
+
|
487 |
+
### 2016-10-27 - Pro Addon 3.2.8 ###
|
488 |
+
|
489 |
+
* Improved: oembed error message
|
490 |
+
* Improved: Skip srcset function for PHP 5.3 and lower
|
491 |
+
|
492 |
+
### 2016-10-27 - 7.9.6 ###
|
493 |
+
|
494 |
+
* Fix: Thumbnail not correctly applied to <video> tag for self hosted videos.
|
495 |
+
* Improved: CSS for self hosted videos.
|
496 |
+
* Improved: Enabled detection for rubtube and VK and show them as supported providers, even they where supported as general iframe embeds before.
|
497 |
+
|
498 |
+
### 2016-10-25 - Pro Addon 3.2.7 ###
|
499 |
+
|
500 |
+
* Fix: 2 clicks needed to play lazyloaded video on desktops
|
501 |
+
|
502 |
+
### 2016-10-24 - Pro Addon 3.2.5 ###
|
503 |
+
|
504 |
+
* Fix: JavaScript error related to abandoned Script.
|
505 |
+
* Fix: Custom Thumbnails not applied.
|
506 |
+
|
507 |
+
### 2016-10-24 - 7.9.5 ###
|
508 |
+
|
509 |
+
* Fix: Custom Thumbnails not applied.
|
510 |
+
* Fix: Shortcode UI script only loaded if the plugin is active.
|
511 |
+
|
512 |
+
### 2016-10-23 - 7.9.4 and Pro Addon 3.2.3 ###
|
513 |
+
|
514 |
+
* Fix: Multiple issues about the new HTML5 video embedding (still experimental)
|
515 |
+
|
516 |
+
### 2016-10-23 - Pro Addon 3.2.2 ###
|
517 |
+
|
518 |
+
* Fix: 'Disable Links' not working.
|
519 |
+
|
520 |
+
### 2016-10-23 - Pro Addon 3.2.0 ###
|
521 |
+
|
522 |
+
* Fix: Issue with lazyload and AJAX.
|
523 |
+
* Fix: W3TC issue by using yet another lazyload method. Final this time?
|
524 |
+
* Fix: YouTube Thumbnail detection when there are no HD images.
|
525 |
+
* Improved: Code used to cache thumbnails, this may improve improve performance.
|
526 |
+
* Improved: Lots code restructured and improved.
|
527 |
+
* New: New Lazyload mode setting to prevent "two touched needed to play video on mobiles" issue. Its also
|
528 |
+
* New: Facebook thumbnail detection.
|
529 |
+
|
530 |
+
### 2016-10-23 - 7.9.2 ###
|
531 |
+
|
532 |
+
* Fix: Brightcove Autoplay issue.
|
533 |
+
* Fix: Liveleak thumbnail detection issues.
|
534 |
+
* Fix: Parameters not being added.
|
535 |
+
* Fix: Twitch single videos not using https
|
536 |
+
* Fix: Vevo marked to require flash to make it work again.
|
537 |
+
* Improved: Better dialog with better description and links about the shortcake UI plugin.
|
538 |
+
* Improved: Facebook embed method.
|
539 |
+
* Improved: Lots code restructured and improved.
|
540 |
+
* Improved: Parameters are always possible no matter the provider.
|
541 |
+
* Improved: Restructure of the plugin, abandon OOP mostly.
|
542 |
+
* Improved: Revive saving of last setting page tab.
|
543 |
+
* New: "Image Cache Time" setting on the setting page. Thumbnail URLs form the media gallery can now be cached with transients, that may improve performance.
|
544 |
+
* New: Support for self hosted videos (experimental)
|
545 |
+
|
546 |
+
### 2016-10-03 - Pro Addon 2.5.2 ###
|
547 |
+
|
548 |
+
* Fix: Force button styles to make sure themes styles get overwritten.
|
549 |
+
|
550 |
+
### Pro Addon 2.5.1 beta - 2016-09-21 ###
|
551 |
+
|
552 |
+
* New: Thumbnail support for Liveleak.
|
553 |
+
* Fix: Update loop.
|
554 |
+
|
555 |
+
### Pro Addon 2.5.0 beta - 2016-09-21 ###
|
556 |
+
|
557 |
+
* Improved: Thumbnails detection.
|
558 |
+
* Improved how license keys are handled when set in wp-config.php.
|
559 |
+
|
560 |
+
### 7.5.1 beta - 2016-09-21 ###
|
561 |
+
|
562 |
+
* Fix: Liveleak seems to require flash for some videos.
|
563 |
+
|
564 |
+
### 7.5.0 beta - 2016-09-21 ###
|
565 |
+
|
566 |
+
* Fix: Youku URL detection and aspect ratio.
|
567 |
+
* Improved: `.arve-inner` css class in favor of some more specific classes combining styles.
|
568 |
+
* Improved: removed TGMPA class because it was causing horrible issues.
|
569 |
+
|
570 |
+
### Pro Addon 2.4.5 beta - 2016-09-19 ###
|
571 |
+
|
572 |
+
* New: Adds the ability to define the pro key in your wp-config.php file with `define( 'ARVE_PRO_KEY', 'your_key_here' )`. When activating the plugin it now also tries to activate its license when a key is defined.
|
573 |
+
|
574 |
+
### 7.4.3 beta - 2016-09-19 ###
|
575 |
+
|
576 |
+
* Fix: Deal with fluid-vids script messing with this plugin, making videos invisible.
|
577 |
+
|
578 |
+
### Pro Addon 2.4.0 beta - 2016-09-18 ###
|
579 |
+
|
580 |
+
* New: Adds Yahoo auto thumbnail and title support
|
581 |
+
|
582 |
+
### 7.4.1 beta - 2016-09-18 ###
|
583 |
+
|
584 |
+
* New: Adds Yahoo Video support
|
585 |
+
|
586 |
+
### 7.3.2 beta - 2016-09-17 ###
|
587 |
+
|
588 |
+
* Fix: Remove security="restricted" from iframes to make IE work again.
|
589 |
+
|
590 |
+
### 7.3.1 beta - 2016-09-17 ###
|
591 |
+
|
592 |
+
* Fix: Get rid of undefined index warnings when pro addon is not active.
|
593 |
+
|
594 |
+
### 7.3.0 beta - 2016-09-17 ###
|
595 |
+
|
596 |
+
* Improved: Show admin notices only to users who have the 'activate_plugins' capability.
|
597 |
+
* Improved: Added notice to the readme for the TGMPA cause white screen of death issue.
|
598 |
+
|
599 |
+
### Pro Addon 2.3.2 - 2016-09-17 ###
|
600 |
+
|
601 |
+
* Possible Fix for not centered play button.
|
602 |
+
|
603 |
+
### 7.2.13 beta - 2016-09-16 ###
|
604 |
+
|
605 |
+
* Fix: Set fitvidsignore class and remove the Fitvids container to prevent it from messing with ARVE embeds.
|
606 |
+
* Fix: Remove possible width and height parameters on iframes to prevent scripts from messing with ARVE embeds.
|
607 |
+
|
608 |
+
### 7.2.12 beta - 2016-09-16 ###
|
609 |
+
|
610 |
+
* Improved: replaced static:: with self:: to support older php versions.
|
611 |
+
|
612 |
+
### 7.2.10 beta - 2016-09-15 ###
|
613 |
+
|
614 |
+
* Fix: [iframe] shortcode not working.
|
615 |
+
|
616 |
+
### Pro Addon 2.3.1 beta - 2016-09-15 ###
|
617 |
+
|
618 |
+
* New: Added support for displaying title of videos on top of the thumbnail images.
|
619 |
+
* New: Responsive thumbnails using srcset the browser takes the best image resolution for the users device. (HTML5 srcset)
|
620 |
+
* New: Choose between 3 hover styles for the thumbnails: 'zoom image' (new default), 'rectangle move in' (old), or 'none' where only the play button changes.
|
621 |
+
* New: Choose beween 2 play button styles.
|
622 |
+
* Fix: Screenfull error.
|
623 |
+
* Fix: License API call.
|
624 |
+
* Improved: Rectangle animation.
|
625 |
+
* Improved: Updated 'lity' lightbox script.
|
626 |
+
* Improved: Thumbnail handling.
|
627 |
+
* Improved: Removed the 'Lazyload Maximal Width' setting to simplify things (there still is 'Maximal Width' and 'Aligned Maximal Width').
|
628 |
+
* Improved: Removed the 'Fake Thumbnail' feature because the entire idea was bad and real thumbnails should be used.
|
629 |
+
* Improved: Updated EDD_SL_Plugin_Updater Class
|
630 |
+
* Dropped PHP Class.
|
631 |
+
|
632 |
+
### 7.2.9 beta - 2016-09-15 ###
|
633 |
+
|
634 |
+
* New: Recommend and guide to users to install [Shortcake (Shortcode UI)](https://de.wordpress.org/plugins/shortcode-ui/) via [TGMPA](http://tgmpluginactivation.com/)
|
635 |
+
* New: Amazing catch-all shortcode [arve url="..."] that can be used for all supported providers and even with any iframe `src` if all unlisted providers that support responsive iframe embeds.
|
636 |
+
* New: Support for kla.tv.
|
637 |
+
* New: Support for youku (fulfilled request)
|
638 |
+
* New: New Advanced Shortcode Dialog with nice UI for choose thumbnails from your WP Media Gallery, very detailed helping texts, display of default settings, hiding of fields based on need ...
|
639 |
+
* New: WYSIWYG Preview of Shortcodes.
|
640 |
+
* New: The two above features need the [Shortcake (Shortcode UI)](https://de.wordpress.org/plugins/shortcode-ui/) Plugin that is maybe moving into WordPress core later.
|
641 |
+
* New: A default alignment can now be set in the Settings page. (fulfilled request)
|
642 |
+
* New: 'iframe_name' shortcode parameter for `<iframe name="xxxxx"`, useful when wanting to target ARVE embeds with links. (fulfilled request)
|
643 |
+
* New: ARVE is now SEO friendly giving you the ability to add some schema.org microdata. Googles tools should not complain anymore if you add title, description and upload date. (fulfilled request)
|
644 |
+
* Deleted Language files in favor of [wordpress.org managed translations](https://translate.wordpress.org/projects/wp-plugins/advanced-responsive-video-embedder/dev) volunteers are welcome ;)
|
645 |
+
* Improved: Got rid of PHP globals.
|
646 |
+
* Improved: Added image upload dialog to settings page and shortcode dialog.
|
647 |
+
* Improved: Better CSS to overwrite unwanted theme styles.
|
648 |
+
* Improved: Lots if code improvements.
|
649 |
+
* Improved: SSL enabled and forced when supported by provoders.
|
650 |
+
* Fix: Blury Vimeo thumbnails
|
651 |
+
* Fix: Prevent Dashboard Widget conflicts with WP Helpers plugin (possibly others). Thanks to Steve Bruner.
|
652 |
+
* Fix: Issue with unwanted borders showing on embeds.
|
653 |
+
* Fix: youtu.be URLs now detected correct in shortcode dialog.
|
654 |
+
* Fix: All Vevo URLs are now detected correctly.
|
655 |
+
* Fix: Bool options settings.
|
656 |
+
* Removed blip because the service was shutdown.
|
657 |
+
* Removed myvideo.de because the service was restructured.
|
658 |
+
|
659 |
+
### 6.4.0 ###
|
660 |
+
|
661 |
+
* Fix: Always prevent scrollbars.
|
662 |
+
|
663 |
+
### Pro Addon 1.4.4
|
664 |
+
|
665 |
+
* Fixed: Infinite update loop.
|
666 |
+
* Improved: Updated Updater class.
|
667 |
+
|
668 |
+
### Pro Addon 1.4.3
|
669 |
+
|
670 |
+
* Fixed: rectangle overflow issue.
|
671 |
+
|
672 |
+
### Pro Addon 1.4.2
|
673 |
+
|
674 |
+
* Fixed: license activation problems.
|
675 |
+
|
676 |
+
### Pro Addon 1.4.1
|
677 |
+
|
678 |
+
* Fixed critical bug for auto updates. Please [click here](https://nextgenthemes.com/support/915/add-wont-update-wordpress-says-download-failed-unauthorized?show=1053#a1053) if your update fails.
|
679 |
+
|
680 |
+
### 6.3.9 ###
|
681 |
+
|
682 |
+
* Fix: Facebook (now really, hopefully).
|
683 |
+
|
684 |
+
### 6.3.8 ###
|
685 |
+
|
686 |
+
* Fix: Facebook in lazyload modes.
|
687 |
+
|
688 |
+
### 6.3.7 ###
|
689 |
+
|
690 |
+
* New: Facebook video support.
|
691 |
+
|
692 |
+
### 6.3.4 ###
|
693 |
+
|
694 |
+
* Fix?: Iframes are now created with a fixed 853x480 size in feeds, this probably will fix some feedreaders incorrectly or not displaying videos.
|
695 |
+
|
696 |
+
### 6.3.3 ###
|
697 |
+
|
698 |
+
* Improved: Disabled file URL detection as this solution was bad.
|
699 |
+
|
700 |
+
### 6.3.2 ###
|
701 |
+
|
702 |
+
* Fixed/Improved: [arve_tests] shortcode.
|
703 |
+
|
704 |
+
### Pro Addon 1.4 ###
|
705 |
+
|
706 |
+
* Fix: Fake thumbnails now work for lazyload-lightbox mode.
|
707 |
+
|
708 |
+
### 6.3.1 & Pro Addon 1.4.0 ###
|
709 |
+
|
710 |
+
* Improved: Testing Shortcode.
|
711 |
+
* Improved: When there is no thumbnail lazyload mode will fall back to normal mode.
|
712 |
+
* New: Added support for alugha.com.
|
713 |
+
|
714 |
+
### Pro Addon 1.1.5 ###
|
715 |
+
|
716 |
+
* New: Added setting and parameter grow="yes/no" to control the grow-on-click behaviour that was introduced in 6.0 to your liking.
|
717 |
+
|
718 |
+
### 6.1.2 ###
|
719 |
+
|
720 |
+
* Improved: Added thumbnail and grow parameters to the Shortcode Creator Dialog.
|
721 |
+
* Improved: Updated screenshots.
|
722 |
+
|
723 |
+
### Pro Addon 1.1.3 ###
|
724 |
+
|
725 |
+
* Improved: link-linghtbox mode does not force a newline for the link anymore.
|
726 |
+
* Fix: Autoplaying in Background when navigating back in browser.
|
727 |
+
|
728 |
+
### Pro Addon 1.1.0 ###
|
729 |
+
|
730 |
+
* Fix: Various issues reguarding lightbox mode.
|
731 |
+
|
732 |
+
### 6.1.0 ###
|
733 |
+
|
734 |
+
* Fix: Messages about pro addon removed when it is installed.
|
735 |
+
|
736 |
+
### Pro Addon 1.0.7 ###
|
737 |
+
|
738 |
+
* Fix: Video start playing again invisible when closeing lightbox with ESC.
|
739 |
+
|
740 |
+
### 6.0.6 Beta ###
|
741 |
+
|
742 |
+
* Improved: Adds a "Debug Info" tab to the settings page copy pasting when there is are issue.
|
743 |
+
|
744 |
+
### Pro Addon 1.0.6 ###
|
745 |
+
|
746 |
+
* Remove development functions.
|
747 |
+
|
748 |
+
### Pro Addon 1.0.4 ###
|
749 |
+
|
750 |
+
* Possibly Fixes SSL issues during activation.
|
751 |
+
|
752 |
+
### Pro Addon 1.0.3 ###
|
753 |
+
|
754 |
+
* Fix: Maxwidth issue.
|
755 |
+
|
756 |
+
### 6.0.5 Beta ###
|
757 |
+
|
758 |
+
* Fix: Foreach php error
|
759 |
+
|
760 |
+
### 6.0.4 Beta ###
|
761 |
+
|
762 |
+
* Fix: Youtube URL with starttime.
|
763 |
+
|
764 |
+
### 6.0.3 Beta, Pro Addon 1.0.3 ###
|
765 |
+
|
766 |
+
* Fix: Max-width output issue.
|
767 |
+
|
768 |
+
### 6.0.2 Beta - 2015/07/24 - work time: ~60 days ###
|
769 |
+
|
770 |
+
Please check the [migration guide](https://nextgenthemes.com/?p=1875) about upgrading to this version.
|
771 |
+
|
772 |
+
* Fix: Jackpack Shortcode Embeds module incompatibility.
|
773 |
+
* New: URL parameters are now possible via URLs used for embeds (passed to iframe src).
|
774 |
+
* Changed: URL parameters to controll arve features are now 'arve[mode]=' style instead of 'arve-mode='.
|
775 |
+
* Improved: Enabled HTTPS support for Viddler and MyVideo.
|
776 |
+
* Improved: TED Talks shortcodes now support the 'lang' parameter.
|
777 |
+
* Improved: New embed URLs for MyVideo.
|
778 |
+
* Improved: Better Twitch support.
|
779 |
+
* Improved: Dailymotion HTTPS support.
|
780 |
+
* Improved: To reduce CSS and keep it simpler aspect ratios are now handled with inline styles.
|
781 |
+
* Improved: Moved to complete WP Settings API.
|
782 |
+
* Improved: Tabbed and extendable options page.
|
783 |
+
* Improved: Massive code improvements.
|
784 |
+
* Improved: Replaced all Admin Messages that caused bugs and annoyance for users with a dashboard Widget.
|
785 |
+
|
786 |
+
### Pro Addon 1.0.1 ###
|
787 |
+
|
788 |
+
* New: link-lightbox mode creates a link the triggers a lightbox with a video on click.
|
789 |
+
|
790 |
+
### Pro Addon 0.9.7 ###
|
791 |
+
|
792 |
+
* Fix: Lazyload videos not growing when global maxwidth setting was set.
|
793 |
+
* Improved: Finally got rid of the jQuery Colorbox depency, the Pro Addon now includes lity for lightboxes.
|
794 |
+
|
795 |
+
### Pro Addon 0.9.5 ###
|
796 |
+
|
797 |
+
* Fix: Licensing Activation should now finally work correcty. (Multisite may need some tweaks)
|
798 |
+
* Fix: Pissibility of unwanted margins/paddings on the transparent button.
|
799 |
+
|
800 |
+
### Pro Addon 0.9.0 ###
|
801 |
+
|
802 |
+
* Changed: 'Lazyload' mode now grows the video size after thumbnails are clicked.
|
803 |
+
* Changed: 'Thumbnail' mode is now called 'Lazyload -> Colorbox' and has a sightly different behavior.
|
804 |
+
* New: 'Lazyload -> Fullscreen' mode to instandly go Fullscreen after clicking the Lazyloaded preview image.
|
805 |
+
* New: 'Lazyload -> Fixed' Fullscreen/-window mode (extremly experimental) with ability to resize fixed video on screen while reading the page.
|
806 |
+
* New: 'thumbnail' parameter, take image URL or a ID to a media libray image to be used as thumbnail image.
|
807 |
+
* Improved: Enabled fake thumbnails for USTREAM and myvideo.de.
|
808 |
+
* Depricated: Providers that only support `<object>` are from now only supported in normal mode, will switch automatically. This effects only recorded Twitch videos, flickr and veoh.
|
809 |
+
|
810 |
+
### 5.3.4 Beta - 2015/03/15 ###
|
811 |
+
|
812 |
+
* Fix: ID detection for youtu.be and dai.ly URLs, will now work with https://(www.) as well.
|
813 |
+
* Fix: Myvideo.de videos with 7 and 8 digit IDs.
|
814 |
+
|
815 |
+
### 5.3.3 Beta ###
|
816 |
+
|
817 |
+
* Fix: Workarround for a currently ongoing YouTube issue causing YouTube embeds to fail with erros on mobile devives. This was not a 'bug' caused by this plugin btw.
|
818 |
+
|
819 |
+
### 5.3.2 Beta ###
|
820 |
+
|
821 |
+
* Fix: Die 'Array' errors DIE!
|
822 |
+
|
823 |
+
### 5.3.1 Beta ###
|
824 |
+
|
825 |
+
* Improved: Added shortcode example to youtube starttime examples.
|
826 |
+
* Improved: Clarified from who the admin messages come.
|
827 |
+
|
828 |
+
### 5.3.0 Beta ###
|
829 |
+
|
830 |
+
* **If you get a error '... array ...' please reset your options on the options page and redo the options you had before**
|
831 |
+
* Fix: '... expected array' error when saving options on some cases. If you get a error please reset your
|
832 |
+
* Fix: ttp://youtu.be/... shortlinks are not detected correctly in the shortcode creator dialog.
|
833 |
+
* Improved: Ported code to WordPress Plugin Boilerplate 3.0 style.
|
834 |
+
* Improved: Switched vevo and xtube from object to iframe embeds.
|
835 |
+
* Improved: Lots of minor code enhancements.
|
836 |
+
|
837 |
+
### 5.1.1 ###
|
838 |
+
|
839 |
+
* Fix: Removed mixed content warnungs for youtube and vimeo.
|
840 |
+
* Translation updates.
|
841 |
+
|
842 |
+
### 5.1.0 ###
|
843 |
+
|
844 |
+
* New: Vimeo HTTPS support (works automatically if your site is HTTPS)
|
845 |
+
|
846 |
+
### 5.0.2 Beta ###
|
847 |
+
|
848 |
+
* Improved: Marked as working with WP 4.0
|
849 |
+
|
850 |
+
### 5.0.1 Beta ###
|
851 |
+
|
852 |
+
* Fix: Options var error
|
853 |
+
|
854 |
+
### 5.0.0 Beta ###
|
855 |
+
|
856 |
+
* Fix: Max-width options should now work in all circumstances
|
857 |
+
* Improved: Various CSS improvements
|
858 |
+
* Improved: Changed play overlay image to a Google+ style image
|
859 |
+
|
860 |
+
### 4.9.0 Beta ###
|
861 |
+
|
862 |
+
* Improved: All Javascript is loaded from files now and they are only loaded when there are embeds on the page. This improves page load times on pages with no embeds.
|
863 |
+
* Fix: Removed autohide#1 from default YouTube Parameters since it causes a YouTube bug in the HTML5 player.
|
864 |
+
|
865 |
+
### 4.8.0 ###
|
866 |
+
|
867 |
+
* Updated: Spanish translation now 80% complete. Thanks Xarkitu!
|
868 |
+
* Improved: Do not load admin dialog when doing AJAX
|
869 |
+
|
870 |
+
### 4.7.0 ###
|
871 |
+
|
872 |
+
* Fix: Iframe code detection
|
873 |
+
|
874 |
+
### 4.6.0 ###
|
875 |
+
|
876 |
+
* Improvement: PHP required version lowered to 5.2.4
|
877 |
+
|
878 |
+
### 4.5.4 ###
|
879 |
+
|
880 |
+
* Fix: Save of custom URL parameters
|
881 |
+
* New: CHANGES.md file for github updater
|
882 |
+
|
883 |
+
### 4.5.3 ###
|
884 |
+
|
885 |
+
* Fix: Fatal PHP Error on activation.
|
886 |
+
* Fix: Readme spellings.
|
887 |
+
|
888 |
+
### 4.5.0 ###
|
889 |
+
|
890 |
+
* Fix: Minor options page spelling and field association fixes.
|
891 |
+
* Fix: Added Lazyload to mode select in the shortcode dialog.
|
892 |
+
* New: 4players.de support.
|
893 |
+
* New: Added parameter input to the shortcode dialog.
|
894 |
+
* Improved: Default options are no longer stored in the database.
|
895 |
+
* Improved: Transparency fade animation on thumbnail hover.
|
896 |
+
* Improved: No more ugly URL hash (#arve-load-video) after clicking links.
|
897 |
+
* Improved: Dropped IE 8 support for Lazyload mode.
|
898 |
+
* Improved: Lots of code improvements.
|
899 |
+
|
900 |
+
### 4.3.0 ###
|
901 |
+
|
902 |
+
* New: Added Iframe examples.
|
903 |
+
* Improved: Limited support for self hosted Videos. Dialog will detect URLS that end up with .webm .mp4 .ogg creates a iframe embed code with them. This is probaly not the best way to do this but it works. Real HTML5 video tag embeds may come later.
|
904 |
+
* Improved: Redesigned the button to look like WordPress and move it out of the Tiny MCE Editor. This enables you to embed videos in the code editor as well.
|
905 |
+
* Improved: Redesigned the Shortcode Creator dialog. Less clutter, more compact and it now includes the recently introduced `aspect_ratio`.
|
906 |
+
|
907 |
+
### 4.2.0 ###
|
908 |
+
|
909 |
+
* New: As requested: `aspect_ratio` parameter
|
910 |
+
* Fix: Vimeo playing problems in Firefox.
|
911 |
+
|
912 |
+
### 4.1.1 ###
|
913 |
+
|
914 |
+
* Fix: Play button not showing.
|
915 |
+
|
916 |
+
### 4.1.0 ###
|
917 |
+
|
918 |
+
* New: Vine support
|
919 |
+
* New: Support for starttime from youtube URLs
|
920 |
+
* Improved: Include play image inside CSS, -1 http request may speed things up
|
921 |
+
* Improved: Tests
|
922 |
+
|
923 |
+
### 4.0.0 ###
|
924 |
+
|
925 |
+
* New: Trigger-able debug output.
|
926 |
+
* Improved: The `[arve_tests]` shortcode now includes alignment and maxwidth tests
|
927 |
+
* Fix: Thumbnail image now displayed when using lazyload with `maxwidth` parameter
|
928 |
+
|
929 |
+
### 3.9.9 ###
|
930 |
+
|
931 |
+
* Improved: Allowing `maxwidth` parameter in `lazyload` mode
|
932 |
+
|
933 |
+
### 3.9.8 ###
|
934 |
+
|
935 |
+
* Fix: Thumbnail not opening Colorbox
|
936 |
+
|
937 |
+
### 3.9.7 ALPHA! ###
|
938 |
+
|
939 |
+
* New: I am proud to introduce the new 'lazyload' mode. ARVEs new default mode. Load Images only and load the Video only on click. Like Google+ without the title.
|
940 |
+
* New: Added MPORA support
|
941 |
+
* New: Added (real) thumbnail support for Collegehumor, Twitch, FunnyOrDie, MPORA
|
942 |
+
* New: `[arve_tests]` shortcode that is used to test the plugin and provide examples.
|
943 |
+
* New: `[arve_supported]` shortcode probably of no use for users. It will generate the a list of providers with supported features.
|
944 |
+
* Improved: Enabled fake thumbnails for Comedycentral, Gametrailers and Spike
|
945 |
+
* Improved: Remote API calls and handling their errors.
|
946 |
+
* Improved: Get high resolution thumbnails from YouTube if available.
|
947 |
+
* Improved: The evil admin message is now only shown once to users who can delete plugins (Admins and the like) and if the plugin was activated a week ago or longer.
|
948 |
+
* Improved: Lots of smaller code improvements.
|
949 |
+
|
950 |
+
### 3.6.1 ###
|
951 |
+
|
952 |
+
* Fix: Register link in changelog.
|
953 |
+
|
954 |
+
### 3.6.0 ###
|
955 |
+
|
956 |
+
* New: Thanks to [Ilya Grishkov](https://ilyagrishkov.com) thumbnail URLs for Vimeo, Blip and Dailymotion Playlists are now cached (by default 24hours) this drastically reduces page loading times for thumbnail embeds from these providers because it bypasses calling their APIs for that period.
|
957 |
+
* Fix: Thumbnails for YouTube playlists.
|
958 |
+
* Fix: Shortcode creator ID detection for iframes (src URL)
|
959 |
+
* Fix: Updated Dailymoton docs link on Options page
|
960 |
+
* Improved: Error messages are now all ready to be translated. Current Translation status: German 50%, French 50%, Spanish 84%. Register at [nextgenthemes.com](https://nextgenthemes.com/wp-login.php?action#register) and then login to [translate.nextgenthemes.com](https://translate.nextgenthemes.com) to help translate.
|
961 |
+
|
962 |
+
### 3.5.2 ###
|
963 |
+
|
964 |
+
* New: Twitch.tv support
|
965 |
+
* New: Spanish Translation from Andrew Kurtis webhostinghub.com
|
966 |
+
* Improved: Support for `https://new.ted.com/...` URLs
|
967 |
+
* Improved: Some code improvements, among them IDs of hidden objects are now generated with a simple `static` counter instead of some random generated string.
|
968 |
+
|
969 |
+
### 3.5.1 ###
|
970 |
+
|
971 |
+
* Fix: Bug causing the Shortcode Creator not detecting shortcode tags when customized
|
972 |
+
* Improved how embeds `<object>` embed codes are generated.
|
973 |
+
* Updated FAQ
|
974 |
+
* New: Xtube support (On request)
|
975 |
+
|
976 |
+
### 3.5.0 ###
|
977 |
+
|
978 |
+
* New: Custom parameters!
|
979 |
+
* Fix: Youtube playlists now work correctly
|
980 |
+
* Fix: Translations are working again (incomplete German and French)
|
981 |
+
* Deprecated: `start` and `end` shortcode parametets should not be used anymore with youtube, instead use the new parameters feature like `[youtube id#"123456" parameters#"start#60 end#120"]`
|
982 |
+
|
983 |
+
### 3.1.2 ###
|
984 |
+
|
985 |
+
* Fix: IE8 JavaScript errors
|
986 |
+
* Improved: The evil message at the admin.
|
987 |
+
|
988 |
+
### 3.1.1 (github only) ###
|
989 |
+
|
990 |
+
* Improved: Added `px` suffix to values on options page
|
991 |
+
|
992 |
+
### 3.1.0 (beta) ###
|
993 |
+
|
994 |
+
* New: Development versions now available via [Github Plugin Updater](https://github.com/afragen/github-updater) please install this to test cutting edge versions
|
995 |
+
* New: Introducing 'Align Maximal Width' option
|
996 |
+
* Fix: Invisible normal mode embeds with align
|
997 |
+
* Fix: Yahoo detection
|
998 |
+
* Fix: Kickstarter detection
|
999 |
+
* Fix: Daylimoition Playlist
|
1000 |
+
* Fix: Colleghumor
|
1001 |
+
* Improved: Screenshots updated
|
1002 |
+
* Improved: Beginning process of provider based aspect ratios.
|
1003 |
+
* Improved: Dailymotion playlists/jukeboxes now show Native thumbnails
|
1004 |
+
* Improved: Iframe embed code detection with with single quoted `src#''`
|
1005 |
+
|
1006 |
+
### 3.0.4 (beta) ###
|
1007 |
+
|
1008 |
+
* Javascript Fix
|
1009 |
+
|
1010 |
+
### 3.0.0 (beta) ###
|
1011 |
+
|
1012 |
+
* New: Support for embedding via simply pasting of URLs into posts (need to be on their own line, no button or shortcodes needed)
|
1013 |
+
* New: Thumbnails are now responsive
|
1014 |
+
* New: Vevo support
|
1015 |
+
* New: TED Talks support
|
1016 |
+
* New: IGN support
|
1017 |
+
* New: Kickstarter support
|
1018 |
+
* Improved: request large thumbnail from vimeo instead of medium
|
1019 |
+
* Improved: 'youtubelist' shortcode deprecated YouTube playlists are now handled via the normal youtube shortcode with support for starting video
|
1020 |
+
* Improved: 'bliptv' shortcode deprecated on favor of 'blip' that uses the ids from blip.tv URLs instead of the ones from embed codes
|
1021 |
+
* Improved: Moved code to newest Plugin Boilerplate
|
1022 |
+
* Improved: Massive code improvements
|
1023 |
+
|
1024 |
+
### 2.7.4 ###
|
1025 |
+
|
1026 |
+
* Fix: Dropped mb_detect_encoding now using just preg_match to support rare php setups.
|
1027 |
+
|
1028 |
+
### 2.7.3 ###
|
1029 |
+
|
1030 |
+
* New: Added French Translation from Karel - neo7.fr
|
1031 |
+
|
1032 |
+
### 2.7.2 ###
|
1033 |
+
|
1034 |
+
* Fix: Permissions for the button, now authors who
|
1035 |
+
|
1036 |
+
### 2.7.0 ###
|
1037 |
+
|
1038 |
+
* Fix: Admin page capabilities
|
1039 |
+
* Improved: Reintroduced the manual provider and ID input to be used then not detected correctly.
|
1040 |
+
|
1041 |
+
### 2.6.4 ###
|
1042 |
+
|
1043 |
+
* Fix: Black bar issue. (Dropped IE6 hacks/workarounds)
|
1044 |
+
|
1045 |
+
### 2.6.3 ###
|
1046 |
+
|
1047 |
+
* Fix: Normal embeds not sizing correctly
|
1048 |
+
* New: Added scrolling#"no" to Iframes
|
1049 |
+
* Improved: Init shortcodes at a late stage to dominate conflicts
|
1050 |
+
* Improved: Improved Iframe parameter handling
|
1051 |
+
* Improved: Metacafe, Myspace, Videojug are now handled via Iframe
|
1052 |
+
|
1053 |
+
### 2.6.2 ###
|
1054 |
+
|
1055 |
+
* Fix: Objects open correctly in Colorbox
|
1056 |
+
* Fix: Iframe autoplay parameters startign with '&'
|
1057 |
+
* New: Added screenshot for options page
|
1058 |
+
* Improved: Youtube Videos with now me embedded with the same protocol your website is on, meaning if your website is https youtube embeds will be in https as well.
|
1059 |
+
|
1060 |
+
### 2.6.1 ###
|
1061 |
+
|
1062 |
+
* Fix: Colorbox args script not having colorbox in depenency array
|
1063 |
+
* Fix: Maxwidth shortcode generator field now has default value#""
|
1064 |
+
* Fix: Blip embed code detection
|
1065 |
+
|
1066 |
+
### 2.6.0 ###
|
1067 |
+
|
1068 |
+
* Improved: Move to a class structure with help of the great https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate
|
1069 |
+
* Improved: Some smaller Improvements
|
1070 |
+
* New: Shortcode Dialog now has Autoplay option
|
1071 |
+
* New: Guessing of autoplay parameters for the Iframe shortcodes.
|
1072 |
+
* Hopefully fixed issues with other plugins and some themes, Javascript was messed up and is fine now.
|
1073 |
+
|
1074 |
+
### 2.5 ###
|
1075 |
+
|
1076 |
+
* Fix: Objects in Colorboxes, now always have width and height 100%
|
1077 |
+
* new shortcode attribute 'autoplay' for single videos
|
1078 |
+
* support for start at given time for vimeo
|
1079 |
+
|
1080 |
+
### 2.4 ###
|
1081 |
+
|
1082 |
+
* propper licence
|
1083 |
+
* Class renamed
|
1084 |
+
|
1085 |
+
### 2.3 beta ###
|
1086 |
+
|
1087 |
+
* fix for maxwidth wrapper no maxwidth option is set
|
1088 |
+
|
1089 |
+
### 2.1 beta ###
|
1090 |
+
|
1091 |
+
* Security and general code improvements
|
1092 |
+
* Added autoplay option
|
1093 |
+
|
1094 |
+
### 2.0 beta ###
|
1095 |
+
|
1096 |
+
* added Yahoo!
|
1097 |
+
* spike bugfix
|
1098 |
+
* small improvements to code
|
1099 |
+
* removed the fixed mode
|
1100 |
+
|
1101 |
+
### 1.9 beta ###
|
1102 |
+
|
1103 |
+
* added youtubes modestbranding mode
|
1104 |
+
* added missing veoh id detection
|
1105 |
+
* fixed vimeo id detection
|
1106 |
+
* added now custom thumbnail feature
|
1107 |
+
* fixed the align class creation
|
1108 |
+
* renamed the shortcode dialog
|
1109 |
+
* removed the text field for teh fixed width option (beginning of the removal process)
|
1110 |
+
|
1111 |
+
### 1.8 beta ###
|
1112 |
+
|
1113 |
+
* added new tinymce botton with dialog to detect ids from URL's and embed codes and automatically create shortcodes
|
1114 |
+
* removed the image resizer (Faster and more secure for servers), now uses just CSS. Polyfill for for IE to support 'background-size' included.
|
1115 |
+
* changed the play overlay image to a bigger one
|
1116 |
+
* added comedycentral, spike
|
1117 |
+
* removed google video, it died
|
1118 |
+
* lots of improvements and fixes
|
1119 |
+
|
1120 |
+
### 1.7 ###
|
1121 |
+
|
1122 |
+
* fixed gametrailers and collegehumor
|
1123 |
+
* fixed options handling for updateded options
|
1124 |
+
* added ustream support
|
1125 |
+
* renamed a function to prevent issues with other plugins
|
1126 |
+
|
1127 |
+
### 1.6 ###
|
1128 |
+
|
1129 |
+
* corrected readme errors, typos and added better description to shortcode options
|
1130 |
+
|
1131 |
+
### 1.5 ###
|
1132 |
+
|
1133 |
+
* lots of code improvements, now uses wordpress settings api, and propper sanitising
|
1134 |
+
|
1135 |
+
### 1.4.5 ###
|
1136 |
+
|
1137 |
+
* added flickr video, archive.org
|
1138 |
+
* inproved how flashvars were implemented
|
1139 |
+
|
1140 |
+
### 1.4.4 ###
|
1141 |
+
|
1142 |
+
* fixes
|
1143 |
+
|
1144 |
+
### 1.4.2 ###
|
1145 |
+
|
1146 |
+
* Options dialog overhaul
|
1147 |
+
* replaced Fancybox with Colorbox
|
1148 |
+
|
1149 |
+
### 1.0 ###
|
1150 |
+
|
1151 |
+
* Removed Services that went down over the years
|
1152 |
+
* Changed the way shortcodes were implemented from regexp to wordpress 'add shortcode' function
|
1153 |
+
|
1154 |
+
### 0.1 ###
|
1155 |
+
|
1156 |
+
* Started by improving the Wordpress 'Video Embedder Plugin' but now complete new code
|
shared/functions-shared.php
ADDED
@@ -0,0 +1,1327 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function arve_get_options_defaults( $section ) {
|
4 |
+
|
5 |
+
$options['main'] = array(
|
6 |
+
'align_maxwidth' => 400,
|
7 |
+
'align' => 'none',
|
8 |
+
'always_enqueue_assets' => false,
|
9 |
+
'autoplay' => false,
|
10 |
+
'mode' => 'normal',
|
11 |
+
'promote_link' => false,
|
12 |
+
'video_maxwidth' => '',
|
13 |
+
'wp_image_cache_time' => 18000,
|
14 |
+
'last_settings_tab' => '',
|
15 |
+
'wp_video_override' => true,
|
16 |
+
'controlslist' => 'nodownload',
|
17 |
+
'vimeo_api_token' => '',
|
18 |
+
'iframe_flash' => true,
|
19 |
+
);
|
20 |
+
|
21 |
+
$properties = arve_get_host_properties();
|
22 |
+
unset( $properties['video'] );
|
23 |
+
|
24 |
+
foreach ( $properties as $provider => $values ) {
|
25 |
+
|
26 |
+
if ( ! empty( $values['embed_url'] ) ) {
|
27 |
+
$options['shortcodes'][ $provider ] = $provider;
|
28 |
+
}
|
29 |
+
if ( isset( $values['default_params'] ) ) {
|
30 |
+
$options['params'][ $provider ] = $values['default_params'];
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
return $options[ $section ];
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get options by merging possibly existing options with defaults
|
39 |
+
*/
|
40 |
+
function arve_get_options() {
|
41 |
+
|
42 |
+
$options = wp_parse_args( get_option( 'arve_options_main', array() ), arve_get_options_defaults( 'main' ) );
|
43 |
+
|
44 |
+
$supported_modes = arve_get_supported_modes();
|
45 |
+
|
46 |
+
# legacy mode name
|
47 |
+
if ( 'thumbnail' == $options['mode'] ) {
|
48 |
+
|
49 |
+
$options['mode'] = 'lazyload';
|
50 |
+
update_option( 'arve_options_main', $options );
|
51 |
+
}
|
52 |
+
|
53 |
+
if( ! in_array( $options['mode'], array( 'normal', 'lazyload', 'lazyload-lightbox', 'link-lightbox' ) ) ) {
|
54 |
+
|
55 |
+
$options['mode'] = 'lazyload';
|
56 |
+
update_option( 'arve_options_main', $options );
|
57 |
+
}
|
58 |
+
|
59 |
+
$options['shortcodes'] = wp_parse_args( get_option( 'arve_options_shortcodes', array() ), arve_get_options_defaults( 'shortcodes' ) );
|
60 |
+
$options['params'] = wp_parse_args( get_option( 'arve_options_params', array() ), arve_get_options_defaults( 'params' ) );
|
61 |
+
|
62 |
+
return $options;
|
63 |
+
}
|
64 |
+
|
65 |
+
function arve_get_settings_definitions() {
|
66 |
+
|
67 |
+
$options = arve_get_options();
|
68 |
+
$supported_modes = arve_get_supported_modes();
|
69 |
+
$properties = arve_get_host_properties();
|
70 |
+
|
71 |
+
foreach ( $properties as $provider => $values ) {
|
72 |
+
|
73 |
+
if( ! empty( $values['auto_thumbnail'] ) ) {
|
74 |
+
$auto_thumbs[] = $values['name'];
|
75 |
+
}
|
76 |
+
if( ! empty( $values['auto_title'] ) ) {
|
77 |
+
$auto_title[] = $values['name'];
|
78 |
+
}
|
79 |
+
if( ! empty( $values['requires_src'] ) ) {
|
80 |
+
$embed_code_only[] = $values['name'];
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
$auto_thumbs = implode( ', ', $auto_thumbs );
|
85 |
+
$auto_title = implode( ', ', $auto_title );
|
86 |
+
$embed_code_only = implode( ', ', $embed_code_only );
|
87 |
+
|
88 |
+
if ( in_array( $options['mode'], $supported_modes ) ) {
|
89 |
+
$current_mode_name = $supported_modes[ $options['mode'] ];
|
90 |
+
} else {
|
91 |
+
$current_mode_name = $options['mode'];
|
92 |
+
}
|
93 |
+
|
94 |
+
$definitions = array(
|
95 |
+
array(
|
96 |
+
'hide_from_settings' => true,
|
97 |
+
'attr' => 'url',
|
98 |
+
'label' => esc_html__( 'URL / Embed Code', ARVE_SLUG ),
|
99 |
+
'type' => 'text',
|
100 |
+
'meta' => array(
|
101 |
+
'placeholder' => esc_attr__( 'Video URL / iframe Embed Code', ARVE_SLUG ),
|
102 |
+
),
|
103 |
+
'description' => sprintf(
|
104 |
+
__( 'Post the URL of the video here. For %s and any <a href="%s">unlisted</a> video hosts paste their iframe embed codes or its src URL in here (providers embeds need to be responsive).', ARVE_SLUG ),
|
105 |
+
$embed_code_only,
|
106 |
+
'https://nextgenthemes.com/arve-pro/#video-host-support'
|
107 |
+
)
|
108 |
+
),
|
109 |
+
array(
|
110 |
+
'attr' => 'mode',
|
111 |
+
'label' => esc_html__( 'Mode', ARVE_SLUG ),
|
112 |
+
'type' => 'select',
|
113 |
+
'options' =>
|
114 |
+
array( '' => sprintf( esc_html__( 'Default (current setting: %s)', ARVE_SLUG ), $current_mode_name ) ) +
|
115 |
+
arve_get_supported_modes(),
|
116 |
+
),
|
117 |
+
array(
|
118 |
+
'attr' => 'align',
|
119 |
+
'label' => esc_html__('Alignment', ARVE_SLUG ),
|
120 |
+
'type' => 'select',
|
121 |
+
'options' => array(
|
122 |
+
'' => sprintf( esc_html__( 'Default (current setting: %s)', ARVE_SLUG ), $options['align'] ),
|
123 |
+
'none' => esc_html__( 'None', ARVE_SLUG ),
|
124 |
+
'left' => esc_html__( 'Left', ARVE_SLUG ),
|
125 |
+
'right' => esc_html__( 'Right', ARVE_SLUG ),
|
126 |
+
'center' => esc_html__( 'center', ARVE_SLUG ),
|
127 |
+
),
|
128 |
+
),
|
129 |
+
array(
|
130 |
+
'attr' => 'promote_link',
|
131 |
+
'label' => esc_html__( 'ARVE Link', ARVE_SLUG ),
|
132 |
+
'type' => 'select',
|
133 |
+
'options' => array(
|
134 |
+
'' => sprintf(
|
135 |
+
__( 'Default (current setting: %s)', ARVE_SLUG ),
|
136 |
+
( $options['promote_link'] ) ? esc_html__( 'Yes', ARVE_SLUG ) : esc_html__( 'No', ARVE_SLUG )
|
137 |
+
),
|
138 |
+
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
|
139 |
+
'no' => esc_html__( 'No', ARVE_SLUG ),
|
140 |
+
),
|
141 |
+
'description' => esc_html__( "Shows a small 'ARVE' link below the videos. Be the most awesome person and help promoting this plugin.", ARVE_SLUG ),
|
142 |
+
),
|
143 |
+
array(
|
144 |
+
'hide_from_settings' => true,
|
145 |
+
'attr' => 'thumbnail',
|
146 |
+
'label' => esc_html__( 'Thumbnail', ARVE_SLUG ),
|
147 |
+
'type' => 'attachment',
|
148 |
+
'libraryType' => array( 'image' ),
|
149 |
+
'addButton' => esc_html__( 'Select Image', ARVE_SLUG ),
|
150 |
+
'frameTitle' => esc_html__( 'Select Image', ARVE_SLUG ),
|
151 |
+
'description' => sprintf( esc_html__( 'Preview image for Lazyload modes, always used for SEO. The Pro Addon is able to get them from %s automatically.', ARVE_SLUG ), $auto_thumbs ),
|
152 |
+
),
|
153 |
+
array(
|
154 |
+
'hide_from_settings' => true,
|
155 |
+
'attr' => 'title',
|
156 |
+
'label' => esc_html__('Title', ARVE_SLUG),
|
157 |
+
'type' => 'text',
|
158 |
+
'description' => sprintf( esc_html__( 'Used for SEO, is visible on top of thumbnails in Lazyload modes, is used as link text in link-lightbox mode. The Pro Addon is able to get them from %s automatically.', ARVE_SLUG ), $auto_title ),
|
159 |
+
),
|
160 |
+
array(
|
161 |
+
'hide_from_settings' => true,
|
162 |
+
'attr' => 'description',
|
163 |
+
'label' => esc_html__('Description', ARVE_SLUG),
|
164 |
+
'type' => 'text',
|
165 |
+
'meta' => array(
|
166 |
+
'placeholder' => __( 'Description for SEO', ARVE_SLUG ),
|
167 |
+
)
|
168 |
+
),
|
169 |
+
array(
|
170 |
+
'hide_from_settings' => true,
|
171 |
+
'attr' => 'upload_date',
|
172 |
+
'label' => esc_html__( 'Upload Date', ARVE_SLUG ),
|
173 |
+
'type' => 'text',
|
174 |
+
'meta' => array(
|
175 |
+
'placeholder' => __( 'Upload Date for SEO, ISO 8601 format', ARVE_SLUG ),
|
176 |
+
)
|
177 |
+
),
|
178 |
+
array(
|
179 |
+
'hide_from_settings' => true,
|
180 |
+
'attr' => 'duration',
|
181 |
+
'label' => esc_html__( 'Duration', ARVE_SLUG ),
|
182 |
+
'type' => 'text',
|
183 |
+
'description' => __( 'Duration in this format. <code>1HJ2M3S</code> for 1 hour, 2 minutes and 3 seconds. <code>5M</code> for 5 minutes.', ARVE_SLUG ),
|
184 |
+
),
|
185 |
+
array(
|
186 |
+
'attr' => 'autoplay',
|
187 |
+
'label' => esc_html__('Autoplay', ARVE_SLUG ),
|
188 |
+
'type' => 'select',
|
189 |
+
'options' => array(
|
190 |
+
'' => sprintf(
|
191 |
+
__( 'Default (current setting: %s)', ARVE_SLUG ),
|
192 |
+
( $options['autoplay'] ) ? esc_html__( 'Yes', ARVE_SLUG ) : esc_html__( 'No', ARVE_SLUG )
|
193 |
+
),
|
194 |
+
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
|
195 |
+
'no' => esc_html__( 'No', ARVE_SLUG ),
|
196 |
+
),
|
197 |
+
'description' => esc_html__( 'Autoplay videos in normal mode, has no effect on lazyload modes.', ARVE_SLUG ),
|
198 |
+
),
|
199 |
+
array(
|
200 |
+
'hide_from_sc' => true,
|
201 |
+
'attr' => 'video_maxwidth',
|
202 |
+
'label' => esc_html__('Maximal Width', ARVE_SLUG),
|
203 |
+
'type' => 'number',
|
204 |
+
'description' => esc_html__( 'Optional, if not set your videos will be the maximum size of the container they are in. If your content area has a big width you might want to set this. Must be 100+ to work.', ARVE_SLUG ),
|
205 |
+
),
|
206 |
+
array(
|
207 |
+
'hide_from_settings' => true,
|
208 |
+
'attr' => 'maxwidth',
|
209 |
+
'label' => esc_html__('Maximal Width', ARVE_SLUG),
|
210 |
+
'type' => 'number',
|
211 |
+
'meta' => array(
|
212 |
+
'placeholder' => esc_attr__( 'in px - leave empty to use settings', ARVE_SLUG),
|
213 |
+
),
|
214 |
+
),
|
215 |
+
array(
|
216 |
+
'hide_from_sc' => true,
|
217 |
+
'attr' => 'align_maxwidth',
|
218 |
+
'label' => esc_html__('Align Maximal Width', ARVE_SLUG),
|
219 |
+
'type' => 'number',
|
220 |
+
'description' => esc_attr__( 'In px, Needed! Must be 100+ to work.', ARVE_SLUG ),
|
221 |
+
),
|
222 |
+
array(
|
223 |
+
'hide_from_settings' => true,
|
224 |
+
'attr' => 'aspect_ratio',
|
225 |
+
'label' => __('Aspect Ratio', ARVE_SLUG),
|
226 |
+
'type' => 'text',
|
227 |
+
'meta' => array(
|
228 |
+
'placeholder' => __( 'Custom aspect ratio like 4:3, 21:9 ... Leave empty for default.', ARVE_SLUG),
|
229 |
+
),
|
230 |
+
),
|
231 |
+
array(
|
232 |
+
'hide_from_settings' => true,
|
233 |
+
'attr' => 'parameters',
|
234 |
+
'label' => esc_html__('Parameters', ARVE_SLUG ),
|
235 |
+
'type' => 'text',
|
236 |
+
'meta' => array(
|
237 |
+
'placeholder' => __( 'provider specific parameters', ARVE_SLUG ),
|
238 |
+
),
|
239 |
+
'description' => sprintf(
|
240 |
+
__(
|
241 |
+
'Note this values get merged with values set on the <a target="_blank" href="%s">ARVE setting page</a>. Example for YouTube <code>fs=0&start=30</code>. For reference: <a target="_blank" href="%s">Youtube Parameters</a>, <a target="_blank" href="%s">Dailymotion Parameters</a>, <a target="_blank" href="%s">Vimeo Parameters</a>.',
|
242 |
+
ARVE_SLUG
|
243 |
+
),
|
244 |
+
admin_url( 'admin.php?page=advanced-responsive-video-embedder' ),
|
245 |
+
'https://developers.google.com/youtube/player_parameters',
|
246 |
+
'http://www.dailymotion.com/doc/api/player.html#parameters',
|
247 |
+
'https://developer.vimeo.com/player/embedding',
|
248 |
+
'TODO settings page link'
|
249 |
+
),
|
250 |
+
),
|
251 |
+
array(
|
252 |
+
'hide_from_sc' => true,
|
253 |
+
'attr' => 'wp_image_cache_time',
|
254 |
+
'label' => esc_html__('Image Cache Time', ARVE_SLUG),
|
255 |
+
'type' => 'number',
|
256 |
+
'description' => __( '(seconds) This plugin uses WordPress transients to cache video thumbnail URLS. This setting defines how long image URLs from the media Gallery are being stored before running WPs fuctions again to request them. For example: hour - 3600, day - 86400, week - 604800.', ARVE_SLUG ),
|
257 |
+
),
|
258 |
+
array(
|
259 |
+
'hide_from_sc' => true,
|
260 |
+
'attr' => 'wp_video_override',
|
261 |
+
'label' => esc_html__( 'Use ARVE for HTML5 video embeds', ARVE_SLUG ),
|
262 |
+
'type' => 'select',
|
263 |
+
'options' => array(
|
264 |
+
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
|
265 |
+
'no' => esc_html__( 'No', ARVE_SLUG ),
|
266 |
+
),
|
267 |
+
'description' => esc_html__( "Use ARVE to embed HTML5 video files. ARVE uses the browsers players instead of loading the mediaelement player that WP uses.", ARVE_SLUG ),
|
268 |
+
),
|
269 |
+
array(
|
270 |
+
'attr' => 'controlslist',
|
271 |
+
'label' => esc_html__( 'Chrome HTML5 Player controls', ARVE_SLUG ),
|
272 |
+
'type' => 'text',
|
273 |
+
'description' => __( "controlsList attribute on <video> for example use <code>nodownload nofullscreen noremoteplayback</code> to hide the download and the fullscreen button on the chrome HTML5 video player and disable remote playback.", ARVE_SLUG ),
|
274 |
+
),
|
275 |
+
array(
|
276 |
+
'hide_from_settings' => true,
|
277 |
+
'attr' => 'mp4',
|
278 |
+
'label' => esc_html__('mp4 file', ARVE_SLUG),
|
279 |
+
'type' => 'url',
|
280 |
+
#'type' => 'attachment',
|
281 |
+
#'libraryType' => array( 'video' ),
|
282 |
+
#'addButton' => esc_html__( 'Select .mp4 file', ARVE_SLUG ),
|
283 |
+
#'frameTitle' => esc_html__( 'Select .mp4 file', ARVE_SLUG ),
|
284 |
+
'meta' => array(
|
285 |
+
'placeholder' => __( '.mp4 file url for HTML5 video', ARVE_SLUG ),
|
286 |
+
),
|
287 |
+
),
|
288 |
+
array(
|
289 |
+
'hide_from_settings' => true,
|
290 |
+
'attr' => 'webm',
|
291 |
+
'label' => esc_html__('webm file', ARVE_SLUG),
|
292 |
+
'type' => 'url',
|
293 |
+
#'type' => 'attachment',
|
294 |
+
#'libraryType' => array( 'video' ),
|
295 |
+
#'addButton' => esc_html__( 'Select .webm file', ARVE_SLUG ),
|
296 |
+
#'frameTitle' => esc_html__( 'Select .webm file', ARVE_SLUG ),
|
297 |
+
'meta' => array(
|
298 |
+
'placeholder' => __( '.webm file url for HTML5 video', ARVE_SLUG ),
|
299 |
+
),
|
300 |
+
),
|
301 |
+
array(
|
302 |
+
'hide_from_settings' => true,
|
303 |
+
'attr' => 'ogv',
|
304 |
+
'label' => esc_html__('ogv file', ARVE_SLUG),
|
305 |
+
'type' => 'url',
|
306 |
+
#'type' => 'attachment',
|
307 |
+
#'libraryType' => array( 'video' ),
|
308 |
+
#'addButton' => esc_html__( 'Select .ogv file', ARVE_SLUG ),
|
309 |
+
#'frameTitle' => esc_html__( 'Select .ogv file', ARVE_SLUG ),
|
310 |
+
'meta' => array(
|
311 |
+
'placeholder' => __( '.ogv file url for HTML5 video', ARVE_SLUG ),
|
312 |
+
),
|
313 |
+
),
|
314 |
+
array(
|
315 |
+
'hide_from_settings' => true,
|
316 |
+
'attr' => 'controls',
|
317 |
+
'label' => esc_html__( 'Show Controls?', ARVE_SLUG ),
|
318 |
+
'type' => 'select',
|
319 |
+
'options' => array(
|
320 |
+
'' => esc_html__( 'Yes', ARVE_SLUG ),
|
321 |
+
'no' => esc_html__( 'No', ARVE_SLUG ),
|
322 |
+
),
|
323 |
+
'description' => esc_html__( 'Show controls on HTML5 video.', ARVE_SLUG ),
|
324 |
+
),
|
325 |
+
array(
|
326 |
+
'hide_from_settings' => true,
|
327 |
+
'attr' => 'loop',
|
328 |
+
'label' => esc_html__( 'Loop?', ARVE_SLUG ),
|
329 |
+
'type' => 'select',
|
330 |
+
'options' => array(
|
331 |
+
'' => esc_html__( 'No', ARVE_SLUG ),
|
332 |
+
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
|
333 |
+
),
|
334 |
+
'description' => esc_html__( 'Loop HTML5 video.', ARVE_SLUG ),
|
335 |
+
),
|
336 |
+
array(
|
337 |
+
'hide_from_settings' => true,
|
338 |
+
'attr' => 'muted',
|
339 |
+
'label' => esc_html__( 'Mute?', ARVE_SLUG ),
|
340 |
+
'type' => 'select',
|
341 |
+
'options' => array(
|
342 |
+
'' => esc_html__( 'No', ARVE_SLUG ),
|
343 |
+
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
|
344 |
+
),
|
345 |
+
'description' => esc_html__( 'Mute HTML5 video.', ARVE_SLUG ),
|
346 |
+
),
|
347 |
+
array(
|
348 |
+
'hide_from_sc' => true,
|
349 |
+
'attr' => 'iframe_flash',
|
350 |
+
'label' => esc_html__( 'Allow Flash for general iframe?', ARVE_SLUG ),
|
351 |
+
'type' => 'select',
|
352 |
+
'options' => array(
|
353 |
+
'yes' => esc_html__( 'Allow Flash', ARVE_SLUG ),
|
354 |
+
'no' => esc_html__( 'Do not allow Flash', ARVE_SLUG ),
|
355 |
+
),
|
356 |
+
'description' => sprintf(
|
357 |
+
__( 'It is recommented to have this disabled if you not embed videos from a <a href="%s">not listed provider</a> that still requires flash and is not listed here. Disable flash will make general iframe embeds more secure, prevents evil redirection from within the iframe. This also makes the Pro Addon\'s \'Disable Links\' feature possible for unlisted providers. Note you can still put <code>disable_flash="yes/no"</code> on individual shortcodes to overwrite this if needed.', ARVE_SLUG ),
|
358 |
+
'https://nextgenthemes.com/plugins/arve-pro/#support-table'
|
359 |
+
),
|
360 |
+
),
|
361 |
+
array(
|
362 |
+
'hide_from_sc' => true,
|
363 |
+
'attr' => 'always_enqueue_assets',
|
364 |
+
'label' => esc_html__( 'Assent loading', ARVE_SLUG ),
|
365 |
+
'type' => 'select',
|
366 |
+
'options' => array(
|
367 |
+
'no' => esc_html__( 'When ARVE video is detected', ARVE_SLUG ),
|
368 |
+
'yes' => esc_html__( 'Always', ARVE_SLUG ),
|
369 |
+
),
|
370 |
+
'description' => sprintf(
|
371 |
+
__( 'Usually ARVE will loads its scripts and styles only on pages what need them. In case your content is loaded via AJAX or the styles are not loaded for another reason you may have to enable this option', ARVE_SLUG ),
|
372 |
+
'https://nextgenthemes.com/plugins/arve-pro/#support-table'
|
373 |
+
),
|
374 |
+
),
|
375 |
+
array(
|
376 |
+
'hide_from_sc' => true,
|
377 |
+
'attr' => 'vimeo_api_token',
|
378 |
+
'label' => esc_html__( 'Video API Token', ARVE_SLUG ),
|
379 |
+
'type' => 'text',
|
380 |
+
'description' => sprintf(
|
381 |
+
__( 'Needed for <a href="%s">Random Video Addon</a>.', ARVE_SLUG ),
|
382 |
+
'https://nextgenthemes.local/plugins/arve-random-video/'
|
383 |
+
),
|
384 |
+
),
|
385 |
+
);
|
386 |
+
|
387 |
+
$definitions = apply_filters( 'arve_settings_definitions', $definitions );
|
388 |
+
|
389 |
+
return $definitions;
|
390 |
+
}
|
391 |
+
|
392 |
+
/**
|
393 |
+
*
|
394 |
+
*
|
395 |
+
* @since 5.4.0
|
396 |
+
*/
|
397 |
+
function arve_get_mode_options( $selected ) {
|
398 |
+
|
399 |
+
$modes = arve_get_supported_modes();
|
400 |
+
|
401 |
+
$out = '';
|
402 |
+
|
403 |
+
foreach( $modes as $mode => $desc ) {
|
404 |
+
|
405 |
+
$out .= sprintf(
|
406 |
+
'<option value="%s" %s>%s</option>',
|
407 |
+
esc_attr( $mode ),
|
408 |
+
selected( $selected, $mode, false ),
|
409 |
+
$desc
|
410 |
+
);
|
411 |
+
}
|
412 |
+
|
413 |
+
return $out;
|
414 |
+
}
|
415 |
+
|
416 |
+
function arve_get_supported_modes() {
|
417 |
+
return apply_filters( 'arve_modes', array( 'normal' => __( 'Normal', ARVE_SLUG ) ) );
|
418 |
+
}
|
419 |
+
|
420 |
+
function arve_get_iframe_providers() {
|
421 |
+
|
422 |
+
}
|
423 |
+
|
424 |
+
function arve_get_host_properties() {
|
425 |
+
|
426 |
+
$s = 'https?://(www\.)?';
|
427 |
+
|
428 |
+
$properties = array(
|
429 |
+
'allmyvideos' => array(
|
430 |
+
'name' => 'allmyvideos.net',
|
431 |
+
'regex' => $s . 'allmyvideos\.net/(embed-)?(?<id>[a-z0-9]+)',
|
432 |
+
'embed_url' => 'https://allmyvideos.net/embed-%s.html',
|
433 |
+
'tests' => array(
|
434 |
+
array(
|
435 |
+
'url' => 'https://allmyvideos.net/1bno5g9il7ha',
|
436 |
+
'id' => '1bno5g9il7ha',
|
437 |
+
),
|
438 |
+
array(
|
439 |
+
'url' => 'https://allmyvideos.net/embed-1bno5g9il7ha.html',
|
440 |
+
'id' => '1bno5g9il7ha',
|
441 |
+
),
|
442 |
+
)
|
443 |
+
),
|
444 |
+
'alugha' => array(
|
445 |
+
'regex' => $s . 'alugha\.com/(1/)?videos/(?<id>[a-z0-9_\-]+)',
|
446 |
+
'embed_url' => 'https://alugha.com/embed/web-player/?v=%s',
|
447 |
+
'default_params' => 'nologo=1',
|
448 |
+
'auto_thumbnail' => true,
|
449 |
+
'tests' => array(
|
450 |
+
array(
|
451 |
+
'url' => 'https://alugha.com/1/videos/youtube-54m1YfEuYU8',
|
452 |
+
'id' => 'youtube-54m1YfEuYU8',
|
453 |
+
),
|
454 |
+
array(
|
455 |
+
'url' => 'https://alugha.com/videos/7cab9cd7-f64a-11e5-939b-c39074d29b86',
|
456 |
+
'id' => '7cab9cd7-f64a-11e5-939b-c39074d29b86',
|
457 |
+
),
|
458 |
+
)
|
459 |
+
),
|
460 |
+
'archiveorg' => array(
|
461 |
+
'name' => 'Archive.org',
|
462 |
+
'regex' => $s . 'archive\.org/(details|embed)/(?<id>[0-9a-z\-]+)',
|
463 |
+
'embed_url' => 'https://www.archive.org/embed/%s/',
|
464 |
+
'default_params' => '',
|
465 |
+
'auto_thumbnail' => false,
|
466 |
+
'tests' => array(
|
467 |
+
array( 'url' => 'https://archive.org/details/arashyekt4_gmail_Cat', 'id' => 'arashyekt4' ),
|
468 |
+
)
|
469 |
+
),
|
470 |
+
'break' => array(
|
471 |
+
'regex' => 'https?://(www\.|view\.)break\.com/(video/|embed/)?[-a-z0-9]*?(?<id>[0-9]+)',
|
472 |
+
'embed_url' => 'http://break.com/embed/%s',
|
473 |
+
'default_params' => 'embed=1',
|
474 |
+
'auto_thumbnail' => false,
|
475 |
+
'requires_flash' => true,
|
476 |
+
'tests' => array(
|
477 |
+
array(
|
478 |
+
'url' => 'http://www.break.com/video/first-person-pov-of-tornado-strike-2542591-test',
|
479 |
+
'id' => 2542591,
|
480 |
+
),
|
481 |
+
array(
|
482 |
+
'url' => 'http://view.break.com/2542591-test',
|
483 |
+
'id' => 2542591,
|
484 |
+
),
|
485 |
+
array(
|
486 |
+
'url' => 'http://www.break.com/embed/2542591?embed=1',
|
487 |
+
'id' => 2542591,
|
488 |
+
),
|
489 |
+
)
|
490 |
+
),
|
491 |
+
'brightcove' => array(
|
492 |
+
'regex' => 'https?://(players|link)\.brightcove\.net/(?<brightcove_account>[0-9]+)/(?<brightcove_player>[a-z0-9]+)_(?<brightcove_embed>[a-z0-9]+)/index\.html\?videoId=(?<id>[0-9]+)',
|
493 |
+
'embed_url' => 'https://players.brightcove.net/%s/%s_%s/index.html?videoId=%s',
|
494 |
+
'requires_src' => true,
|
495 |
+
'tests' => array(
|
496 |
+
array(
|
497 |
+
'url' => 'http://players.brightcove.net/1160438696001/default_default/index.html?videoId=4587535845001',
|
498 |
+
'brightcove_account' => 1160438696001,
|
499 |
+
'brightcove_player' => 'default',
|
500 |
+
'brightcove_embed' => 'default',
|
501 |
+
'id' => 4587535845001,
|
502 |
+
),
|
503 |
+
array(
|
504 |
+
'url' => 'http://players.brightcove.net/5107476400001/B1xUkhW8i_default/index.html?videoId=5371391223001',
|
505 |
+
'brightcove_account' => 5107476400001,
|
506 |
+
'brightcove_player' => 'B1xUkhW8i',
|
507 |
+
'brightcove_embed' => 'default',
|
508 |
+
'id' => 5371391223001,
|
509 |
+
),
|
510 |
+
),
|
511 |
+
),
|
512 |
+
'collegehumor' => array(
|
513 |
+
'name' => 'CollegeHumor',
|
514 |
+
'regex' => $s . 'collegehumor\.com/video/(?<id>[0-9]+)',
|
515 |
+
'embed_url' => 'http://www.collegehumor.com/e/%s',
|
516 |
+
'auto_thumbnail' => true,
|
517 |
+
'auto_title' => true,
|
518 |
+
'aspect_ratio' => '600:369',
|
519 |
+
'tests' => array(
|
520 |
+
array(
|
521 |
+
'url' => 'http://www.collegehumor.com/video/6854928/troopers-holopad',
|
522 |
+
'id' => 6854928,
|
523 |
+
'oembed_title' => 'Troopers Holopad',
|
524 |
+
),
|
525 |
+
)
|
526 |
+
),
|
527 |
+
'comedycentral' => array(
|
528 |
+
'name' => 'Comedy Central',
|
529 |
+
'regex' => 'https?://media\.mtvnservices\.com/embed/mgid:arc:video:comedycentral\.com:(?<id>[-a-z0-9]{36})',
|
530 |
+
'embed_url' => 'http://media.mtvnservices.com/embed/mgid:arc:video:comedycentral.com:%s',
|
531 |
+
'requires_src' => true,
|
532 |
+
'auto_thumbnail' => false,
|
533 |
+
'tests' => array(
|
534 |
+
array(
|
535 |
+
'url' => 'http://media.mtvnservices.com/embed/mgid:arc:video:comedycentral.com:c80adf02-3e24-437a-8087-d6b77060571c',
|
536 |
+
'id' => 'c80adf02-3e24-437a-8087-d6b77060571c',
|
537 |
+
),
|
538 |
+
array(
|
539 |
+
'url' => 'http://media.mtvnservices.com/embed/mgid:arc:video:comedycentral.com:c3c1da76-96c2-48b4-b38d-8bb16fbf7a58',
|
540 |
+
'id' => 'c3c1da76-96c2-48b4-b38d-8bb16fbf7a58',
|
541 |
+
),
|
542 |
+
)
|
543 |
+
),
|
544 |
+
'dailymotion' => array(
|
545 |
+
'regex' => $s . '(dai\.ly|dailymotion\.com/video)/(?<id>[a-z0-9]+)',
|
546 |
+
'embed_url' => 'https://www.dailymotion.com/embed/video/%s',
|
547 |
+
'default_params' => 'logo=0&hideInfos=1&related=0',
|
548 |
+
'auto_thumbnail' => true,
|
549 |
+
'auto_title' => true,
|
550 |
+
'tests' => array(
|
551 |
+
array(
|
552 |
+
'url' => 'http://www.dailymotion.com/video/x41ia79_mass-effect-andromeda-gameplay-alpha_videogames',
|
553 |
+
'id' => 'x41ia79',
|
554 |
+
'oembed_title' => 'Mass Effect Andromeda - Gameplay Alpha',
|
555 |
+
),
|
556 |
+
array(
|
557 |
+
'url' => 'http://dai.ly/x3cwlqz',
|
558 |
+
'id' => 'x3cwlqz',
|
559 |
+
'oembed_title' => 'Mass Effect Andromeda',
|
560 |
+
),
|
561 |
+
),
|
562 |
+
'query_args' => array(
|
563 |
+
'api' => array(
|
564 |
+
'name' => __( 'API', ARVE_SLUG ),
|
565 |
+
'type' => 'bool',
|
566 |
+
),
|
567 |
+
),
|
568 |
+
'query_argss' => array(
|
569 |
+
'api' => array( 0, 1 ),
|
570 |
+
'autoplay' => array( 0, 1 ),
|
571 |
+
'chromeless' => array( 0, 1 ),
|
572 |
+
'highlight' => array( 0, 1 ),
|
573 |
+
'html' => array( 0, 1 ),
|
574 |
+
'id' => 'int',
|
575 |
+
'info' => array( 0, 1 ),
|
576 |
+
'logo' => array( 0, 1 ),
|
577 |
+
'network' => array( 'dsl', 'cellular' ),
|
578 |
+
'origin' => array( 0, 1 ),
|
579 |
+
'quality' => array( 240, 380, 480, 720, 1080, 1440, 2160 ),
|
580 |
+
'related' => array( 0, 1 ),
|
581 |
+
'start' => 'int',
|
582 |
+
'startscreen' => array( 0, 1 ),
|
583 |
+
'syndication' => 'int',
|
584 |
+
'webkit-playsinline' => array( 0, 1 ),
|
585 |
+
'wmode' => array( 'direct', 'opaque' ),
|
586 |
+
),
|
587 |
+
),
|
588 |
+
'dailymotionlist' => array(
|
589 |
+
# http://www.dailymotion.com/playlist/x3yk8p_PHIL-MDS_nature-et-environnement-2011/1#video=xm3x45
|
590 |
+
# http://www.dailymotion.com/widget/jukebox?list[]=%2Fplaylist%2Fx3yk8p_PHIL-MDS_nature-et-environnement-2011%2F1&&autoplay=0&mute=0
|
591 |
+
|
592 |
+
'regex' => $s . 'dailymotion\.com/playlist/(?<id>[a-z0-9]+)',
|
593 |
+
'embed_url' => 'https://www.dailymotion.com/widget/jukebox?list[]=%2Fplaylist%2F%s%2F1&',
|
594 |
+
'auto_thumbnail' => false,
|
595 |
+
'tests' => array(
|
596 |
+
array(
|
597 |
+
'url' => 'http://www.dailymotion.com/playlist/x3yk8p_PHIL-MDS_nature-et-environnement-2011/1#video=xm3x45',
|
598 |
+
'id' => 'x3yk8p',
|
599 |
+
)
|
600 |
+
)
|
601 |
+
),
|
602 |
+
'facebook' => array(
|
603 |
+
# https://www.facebook.com/TheKillingsOfTonyBlair/videos/vb.551089058285349/562955837098671/?type=2&theater
|
604 |
+
#<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FTheKillingsOfTonyBlair%2Fvideos%2Fvb.551089058285349%2F562955837098671%2F%3Ftype%3D2%26theater&width=500&show_text=false&height=280&appId" width="500" height="280" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
|
605 |
+
'regex' => '(?<id>https?://([a-z]+\.)?facebook\.com/[-.a-z0-9]+/videos/[a-z.0-9/]+)',
|
606 |
+
'url_encode_id' => true,
|
607 |
+
'embed_url' => 'https://www.facebook.com/plugins/video.php?href=%s',
|
608 |
+
#'embed_url' => 'https://www.facebook.com/video/embed?video_id=%s',
|
609 |
+
'auto_thumbnail' => true,
|
610 |
+
'tests' => array(
|
611 |
+
array(
|
612 |
+
'url' => 'https://www.facebook.com/TheKillingsOfTonyBlair/videos/vb.551089058285349/562955837098671/?type=2&theater',
|
613 |
+
'id' => 'https://www.facebook.com/TheKillingsOfTonyBlair/videos/vb.551089058285349/562955837098671/',
|
614 |
+
),
|
615 |
+
array(
|
616 |
+
'url' => 'https://web.facebook.com/XTvideo/videos/10153906059711871/',
|
617 |
+
'id' => 'https://web.facebook.com/XTvideo/videos/10153906059711871/',
|
618 |
+
),
|
619 |
+
),
|
620 |
+
),
|
621 |
+
'funnyordie' => array(
|
622 |
+
'name' => 'Funny or Die',
|
623 |
+
'regex' => $s . 'funnyordie\.com/videos/(?<id>[a-z0-9_]+)',
|
624 |
+
'embed_url' => 'https://www.funnyordie.com/embed/%s',
|
625 |
+
'auto_thumbnail' => true,
|
626 |
+
'auto_title' => true,
|
627 |
+
'aspect_ratio' => '640:400',
|
628 |
+
'tests' => array(
|
629 |
+
array(
|
630 |
+
'url' => 'http://www.funnyordie.com/videos/76585438d8/sarah-silverman-s-we-are-miracles-hbo-special',
|
631 |
+
'id' => '76585438d8',
|
632 |
+
'oembed_title' => "Sarah Silverman's - We Are Miracles HBO Special",
|
633 |
+
),
|
634 |
+
)
|
635 |
+
),
|
636 |
+
'ign' => array(
|
637 |
+
'name' => 'IGN',
|
638 |
+
'regex' => '(?<id>' . $s . 'ign\.com/videos/[0-9]{4}/[0-9]{2}/[0-9]{2}/[0-9a-z\-]+)',
|
639 |
+
'embed_url' => 'http://widgets.ign.com/video/embed/content.html?url=%s',
|
640 |
+
'auto_thumbnail' => false,
|
641 |
+
'tests' => array(
|
642 |
+
array(
|
643 |
+
'url' => 'http://www.ign.com/videos/2012/03/06/mass-effect-3-video-review',
|
644 |
+
'id' => 'http://www.ign.com/videos/2012/03/06/mass-effect-3-video-review',
|
645 |
+
),
|
646 |
+
)
|
647 |
+
),
|
648 |
+
#https://cdnapisec.kaltura.com/p/243342/sp/24334200/embedIframeJs/uiconf_id/20540612/partner_id/243342?iframeembed=true&playerId=kaltura_player&entry_id=1_sf5ovm7u&flashvars[streamerType]=auto" width="560" height="395" allowfullscreen webkitallowfullscreen mozAllowFullScreen frameborder="0"></iframe>
|
649 |
+
'kickstarter' => array(
|
650 |
+
'regex' => $s . 'kickstarter\.com/projects/(?<id>[0-9a-z\-]+/[-0-9a-z\-]+)',
|
651 |
+
'embed_url' => 'https://www.kickstarter.com/projects/%s/widget/video.html',
|
652 |
+
'auto_thumbnail' => false,
|
653 |
+
'tests' => array(
|
654 |
+
array(
|
655 |
+
'url' => 'https://www.kickstarter.com/projects/obsidian/project-eternity?ref=discovery',
|
656 |
+
'id' => 'obsidian/project-eternity' ),
|
657 |
+
array(
|
658 |
+
'url' => 'https://www.kickstarter.com/projects/trinandtonic/friendship-postcards?ref=category_featured',
|
659 |
+
'id' => 'trinandtonic/friendship-postcards'
|
660 |
+
),
|
661 |
+
)
|
662 |
+
),
|
663 |
+
'liveleak' => array(
|
664 |
+
'name' => 'LiveLeak',
|
665 |
+
'regex' => $s . 'liveleak\.com/(view|ll_embed)\?(?<id>(f|i)=[0-9a-z\_]+)',
|
666 |
+
'embed_url' => 'https://www.liveleak.com/ll_embed?%s',
|
667 |
+
'default_params' => '',
|
668 |
+
'auto_thumbnail' => true,
|
669 |
+
'tests' => array(
|
670 |
+
array( 'url' => 'http://www.liveleak.com/view?i=703_1385224413', 'id' => 'i=703_1385224413' ), # Page/item 'i=' URL
|
671 |
+
array( 'url' => 'http://www.liveleak.com/view?f=c85bdf5e45b2', 'id' => 'f=c85bdf5e45b2' ), #File f= URL
|
672 |
+
),
|
673 |
+
'test_ids' => array(
|
674 |
+
'f=c85bdf5e45b2',
|
675 |
+
'c85bdf5e45b2'
|
676 |
+
),
|
677 |
+
),
|
678 |
+
'livestream' => array(
|
679 |
+
'regex' => $s . 'livestream\.com/accounts/(?<id>[0-9]+/events/[0-9]+(/videos/[0-9]+)?)',
|
680 |
+
'embed_url' => 'https://livestream.com/accounts/%s/player',
|
681 |
+
'default_params' => 'width=1280&height=720&enableInfoAndActivity=true&defaultDrawer=&mute=false',
|
682 |
+
'auto_thumbnail' => false,
|
683 |
+
'tests' => array(
|
684 |
+
# https://livestream.com/accounts/23470201/events/7021166
|
685 |
+
# <iframe id="ls_embed_1491401341" src="https://livestream.com/accounts/4683311/events/3747538/player?width=640&height=360&enableInfoAndActivity=true&defaultDrawer=&autoPlay=true&mute=false" width="640" height="360" frameborder="0" scrolling="no" allowfullscreen> </iframe>
|
686 |
+
# https://livestream.com/DemocracyNow/dirtywars/videos/17500857
|
687 |
+
# <iframe id="ls_embed_1491412166" src="https://livestream.com/accounts/467901/events/2015991/videos/17500857/player?width=640&height=360&enableInfo=true&defaultDrawer=&autoPlay=true&mute=false" width="640" height="360" frameborder="0" scrolling="no" allowfullscreen> </iframe>
|
688 |
+
array( 'url' => 'https://livestream.com/accounts/23470201/events/7021166', 'id' => '23470201/events/7021166' ),
|
689 |
+
array( 'url' => 'https://livestream.com/accounts/467901/events/2015991/videos/17500857/player?width=640&height=360&enableInfo=true&defaultDrawer=&autoPlay=true&mute=false', 'id' => '467901/events/2015991/videos/17500857' ),
|
690 |
+
),
|
691 |
+
),
|
692 |
+
'klatv' => array(
|
693 |
+
'regex' => $s . 'kla(gemauer)?.tv/(?<id>[0-9]+)',
|
694 |
+
'embed_url' => 'https://www.kla.tv/index.php?a=showembed&vidid=%s',
|
695 |
+
'name' => 'kla.tv',
|
696 |
+
'url' => true,
|
697 |
+
'auto_thumbnail' => false,
|
698 |
+
'tests' => array(
|
699 |
+
array( 'url' => 'http://www.klagemauer.tv/9106', 'id' => 9106 ),
|
700 |
+
array( 'url' => 'http://www.kla.tv/9122', 'id' => 9122 ),
|
701 |
+
),
|
702 |
+
),
|
703 |
+
'metacafe' => array(
|
704 |
+
'regex' => $s . 'metacafe\.com/(watch|fplayer)/(?<id>[0-9]+)',
|
705 |
+
'embed_url' => 'http://www.metacafe.com/embed/%s/',
|
706 |
+
'auto_thumbnail' => false,
|
707 |
+
'tests' => array(
|
708 |
+
array( 'url' => 'http://www.metacafe.com/watch/11433151/magical-handheld-fireballs/', 'id' => 11433151 ),
|
709 |
+
array( 'url' => 'http://www.metacafe.com/watch/11322264/everything_wrong_with_robocop_in_7_minutes/', 'id' => 11322264 ),
|
710 |
+
),
|
711 |
+
),
|
712 |
+
'movieweb' => array(
|
713 |
+
'regex' => $s . 'movieweb\.com/v/(?<id>[a-z0-9]{14})',
|
714 |
+
'embed_url' => 'http://movieweb.com/v/%s/embed',
|
715 |
+
'auto_thumbnail' => false,
|
716 |
+
'requires_src' => true,
|
717 |
+
'tests' => array(
|
718 |
+
array( 'url' => 'http://movieweb.com/v/VIOF6ytkiMEMSR/embed', 'id' => 'VIOF6ytkiMEMSR' ),
|
719 |
+
),
|
720 |
+
),
|
721 |
+
'mpora' => array(
|
722 |
+
'name' => 'MPORA',
|
723 |
+
'regex' => $s . 'mpora\.(com|de)/videos/(?<id>[a-z0-9]+)',
|
724 |
+
'embed_url' => 'http://mpora.com/videos/%s/embed',
|
725 |
+
'auto_thumbnail' => true,
|
726 |
+
'tests' => array(
|
727 |
+
array( 'url' => 'http://mpora.com/videos/AAdphry14rkn', 'id' => 'AAdphry14rkn' ),
|
728 |
+
array( 'url' => 'http://mpora.de/videos/AAdpxhiv6pqd', 'id' => 'AAdpxhiv6pqd' ),
|
729 |
+
)
|
730 |
+
),
|
731 |
+
'myspace' => array(
|
732 |
+
#<iframe width="480" height="270" src="//media.myspace.com/play/video/house-of-lies-season-5-premiere-109903807-112606834" frameborder="0" allowtransparency="true" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href="https://media.myspace.com/showtime/video/house-of-lies-season-5-premiere/109903807">House of Lies Season 5 Premiere</a> from <a href="https://media.myspace.com/Showtime">Showtime</a> on <a href="https://media.myspace.com">Myspace</a>.</p>
|
733 |
+
'regex' => $s . 'myspace\.com/.+/(?<id>[0-9]+)',
|
734 |
+
'embed_url' => 'https://media.myspace.com/play/video/%s',
|
735 |
+
'auto_thumbnail' => false,
|
736 |
+
'tests' => array(
|
737 |
+
array( 'url' => 'https://myspace.com/myspace/video/dark-rooms-the-shadow-that-looms-o-er-my-heart-live-/109471212', 'id' => 109471212 ),
|
738 |
+
)
|
739 |
+
),
|
740 |
+
/*
|
741 |
+
'myvideo' => array(
|
742 |
+
'name' => 'MyVideo',
|
743 |
+
'regex' => $s . 'myvideo\.de/(watch|embed)/([0-9]+)',
|
744 |
+
'embed_url' => 'http://www.myvideo.de/embedded/public/%s',
|
745 |
+
'auto_thumbnail' => false,
|
746 |
+
'tests' => array(
|
747 |
+
'http://www.myvideo.de/watch/8432624/Angeln_mal_anders',
|
748 |
+
)
|
749 |
+
),
|
750 |
+
*/
|
751 |
+
'snotr' => array(
|
752 |
+
'regex' => $s . 'snotr\.com/(video|embed)/(?<id>[0-9]+)',
|
753 |
+
'embed_url' => 'http://www.snotr.com/embed/%s',
|
754 |
+
'auto_thumbnail' => false,
|
755 |
+
'tests' => array(
|
756 |
+
array(
|
757 |
+
'url' => 'http://www.snotr.com/video/12314/How_big_a_truck_blind_spot_really_is',
|
758 |
+
'id' => 12314,
|
759 |
+
),
|
760 |
+
)
|
761 |
+
),
|
762 |
+
'spike' => array(
|
763 |
+
'regex' => 'https?://media.mtvnservices.com/embed/mgid:arc:video:spike\.com:(?<id>[a-z0-9\-]{36})',
|
764 |
+
'embed_url' => 'http://media.mtvnservices.com/embed/mgid:arc:video:spike.com:%s',
|
765 |
+
'requires_src' => true,
|
766 |
+
'auto_thumbnail' => false,
|
767 |
+
'tests' => array(
|
768 |
+
array(
|
769 |
+
'url' => 'http://media.mtvnservices.com/embed/mgid:arc:video:spike.com:6a219882-c412-46ce-a8c9-32e043396621',
|
770 |
+
'id' => '6a219882-c412-46ce-a8c9-32e043396621',
|
771 |
+
),
|
772 |
+
),
|
773 |
+
),
|
774 |
+
'ted' => array(
|
775 |
+
'name' => 'TED Talks',
|
776 |
+
'regex' => $s . 'ted\.com/talks/(?<id>[a-z0-9_]+)',
|
777 |
+
'embed_url' => 'https://embed-ssl.ted.com/talks/%s.html',
|
778 |
+
'auto_thumbnail' => true,
|
779 |
+
'auto_title' => true,
|
780 |
+
'tests' => array(
|
781 |
+
array(
|
782 |
+
'url' => 'https://www.ted.com/talks/margaret_stewart_how_youtube_thinks_about_copyright',
|
783 |
+
'id' => 'margaret_stewart_how_youtube_thinks_about_copyright'
|
784 |
+
),
|
785 |
+
),
|
786 |
+
),
|
787 |
+
'twitch' => array(
|
788 |
+
'regex' => $s . 'twitch.tv/(?!directory)(?|[a-z0-9_]+/v/(?<id>[0-9]+)|(?<id>[a-z0-9_]+))',
|
789 |
+
'embed_url' => 'https://player.twitch.tv/?channel=%s', # if numeric id https://player.twitch.tv/?video=v%s
|
790 |
+
'auto_thumbnail' => true,
|
791 |
+
'tests' => array(
|
792 |
+
array(
|
793 |
+
'url' => 'https://www.twitch.tv/whiskeyexperts',
|
794 |
+
'id' => 'whiskeyexperts',
|
795 |
+
'api_img_contains' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/whiskyexperts',
|
796 |
+
),
|
797 |
+
array(
|
798 |
+
'url' => 'https://www.twitch.tv/imaqtpie',
|
799 |
+
'id' => 'imaqtpie',
|
800 |
+
'api_img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/imaqtpie',
|
801 |
+
),
|
802 |
+
array(
|
803 |
+
'url' => 'https://www.twitch.tv/imaqtpie/v/95318019',
|
804 |
+
'id' => 95318019,
|
805 |
+
'api_img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/imaqtpie',
|
806 |
+
),
|
807 |
+
),
|
808 |
+
),
|
809 |
+
'ustream' => array(
|
810 |
+
'regex' => $s . 'ustream\.tv/(embed/)?(channel/)?(?<id>[0-9]+|recorded/[0-9]+(/highlight/[0-9]+)?)',
|
811 |
+
'embed_url' => 'http://www.ustream.tv/embed/%s',
|
812 |
+
'default_params' => 'html5ui',
|
813 |
+
'auto_thumbnail' => false,
|
814 |
+
'aspect_ratio' => '480:270',
|
815 |
+
'tests' => array(
|
816 |
+
array(
|
817 |
+
'url' => 'http://www.ustream.tv/recorded/59999872?utm_campaign=ustre.am&utm_source=ustre.am/:43KHS&utm_medium=social&utm_content=20170405204127',
|
818 |
+
'id' => 'recorded/59999872'
|
819 |
+
),
|
820 |
+
array(
|
821 |
+
'url' => 'http://www.ustream.tv/embed/17074538?wmode=transparent&v=3&autoplay=false',
|
822 |
+
'id' => '17074538'
|
823 |
+
),
|
824 |
+
),
|
825 |
+
),
|
826 |
+
'rutube' => array(
|
827 |
+
'name' => 'RuTube.ru',
|
828 |
+
'regex' => $s . 'rutube\.ru/play/embed/(?<id>[0-9]+)',
|
829 |
+
'embed_url' => 'https://rutube.ru/play/embed/%s',
|
830 |
+
'requires_flash' => true,
|
831 |
+
'tests' => array(
|
832 |
+
array(
|
833 |
+
'url' => 'https://rutube.ru/play/embed/9822149',
|
834 |
+
'id' => '9822149'
|
835 |
+
),
|
836 |
+
),
|
837 |
+
),
|
838 |
+
'veoh' => array(
|
839 |
+
'regex' => $s . 'veoh\.com/watch/(?<id>[a-z0-9]+)',
|
840 |
+
'embed_url' => 'http://www.veoh.com/swf/webplayer/WebPlayer.swf?version=AFrontend.5.7.0.1396&permalinkId=%s',
|
841 |
+
'default_params' => 'player=videodetailsembedded&id=anonymous',
|
842 |
+
'auto_thumbnail' => false,
|
843 |
+
#'aspect_ratio' => 60.257,
|
844 |
+
'tests' => array(
|
845 |
+
array(
|
846 |
+
'url' => 'http://www.veoh.com/watch/v19866882CAdjNF9b',
|
847 |
+
'id' => 'v19866882CAdjNF9b'
|
848 |
+
),
|
849 |
+
)
|
850 |
+
),
|
851 |
+
'vevo' => array(
|
852 |
+
'regex' => $s . 'vevo\.com/watch/([^\/]+/[^\/]+/)?(?<id>[a-z0-9]+)',
|
853 |
+
'embed_url' => 'https://scache.vevo.com/assets/html/embed.html?video=%s',
|
854 |
+
'default_params' => 'playlist=false&playerType=embedded&env=0',
|
855 |
+
'auto_thumbnail' => false,
|
856 |
+
'requires_flash' => true,
|
857 |
+
'tests' => array(
|
858 |
+
array(
|
859 |
+
'url' => 'https://www.vevo.com/watch/the-offspring/the-kids-arent-alright/USSM20100649',
|
860 |
+
'id' => 'USSM20100649'
|
861 |
+
),
|
862 |
+
#array( '', '' ),
|
863 |
+
#array( '', '' ),
|
864 |
+
),
|
865 |
+
),
|
866 |
+
'viddler' => array(
|
867 |
+
'regex' => $s . 'viddler\.com/(embed|v)/(?<id>[a-z0-9]{8})',
|
868 |
+
#'embed_url' => 'https://www.viddler.com/player/%s/',
|
869 |
+
#'default_params' => 'wmode=transparent&player=full&f=1&disablebranding=1',
|
870 |
+
'embed_url' => 'https://www.viddler.com/embed/%s/',
|
871 |
+
'default_params' => '?f=1&player=full&secret=59822701&disablebackwardseek=false&disableseek=false&disableforwardseek=false&make_responsive=false&loop=false&nologo=false&hd=false',
|
872 |
+
'auto_thumbnail' => true,
|
873 |
+
'auto_title' => true,
|
874 |
+
'aspect_ratio' => '545:349',
|
875 |
+
'tests' => array(
|
876 |
+
array(
|
877 |
+
'url' => 'https://www.viddler.com/v/a695c468',
|
878 |
+
'id' => 'a695c468'
|
879 |
+
),
|
880 |
+
),
|
881 |
+
),
|
882 |
+
'vidspot' => array(
|
883 |
+
'name' => 'vidspot.net',
|
884 |
+
'regex' => $s . 'vidspot\.net/(embed-)?(?<id>[a-z0-9]+)',
|
885 |
+
'embed_url' => 'http://vidspot.net/embed-%s.html',
|
886 |
+
'requires_flash' => true,
|
887 |
+
'tests' => array(
|
888 |
+
array( 'url' => 'http://vidspot.net/285wf9uk3rry', 'id' => '285wf9uk3rry' ),
|
889 |
+
array( 'url' => 'http://vidspot.net/embed-285wf9uk3rry.html', 'id' => '285wf9uk3rry' ),
|
890 |
+
),
|
891 |
+
),
|
892 |
+
'vine' => array(
|
893 |
+
'regex' => $s . 'vine\.co/v/(?<id>[a-z0-9]+)',
|
894 |
+
'embed_url' => 'https://vine.co/v/%s/embed/simple',
|
895 |
+
'default_params' => '', //* audio=1 supported
|
896 |
+
'auto_thumbnail' => false,
|
897 |
+
'aspect_ratio' => '1:1',
|
898 |
+
'tests' => array(
|
899 |
+
array( 'url' => 'https://vine.co/v/bjAaLxQvOnQ', 'id' => 'bjAaLxQvOnQ' ),
|
900 |
+
array( 'url' => 'https://vine.co/v/MbrreglaFrA', 'id' => 'MbrreglaFrA' ),
|
901 |
+
array( 'url' => 'https://vine.co/v/bjHh0zHdgZT/embed', 'id' => 'bjHh0zHdgZT' ),
|
902 |
+
),
|
903 |
+
),
|
904 |
+
'vimeo' => array(
|
905 |
+
'regex' => 'https?://(player\.)?vimeo\.com/((video/)|(channels/[a-z]+/)|(groups/[a-z]+/videos/))?(?<id>[0-9]+)(?<vimeo_secret>/[0-9a-z]+)?',
|
906 |
+
'embed_url' => 'https://player.vimeo.com/video/%s',
|
907 |
+
'default_params' => 'html5=1&title=1&byline=0&portrait=0',
|
908 |
+
'auto_thumbnail' => true,
|
909 |
+
'auto_title' => true,
|
910 |
+
'tests' => array(
|
911 |
+
array( 'url' => 'https://vimeo.com/124400795', 'id' => 124400795 ),
|
912 |
+
array( 'url' => 'https://player.vimeo.com/124400795', 'id' => 124400795 ),
|
913 |
+
),
|
914 |
+
/*
|
915 |
+
'query_argss' => array(
|
916 |
+
'autoplay' => array( 'bool', __( 'Autoplay', ARVE_SLUG ) ),
|
917 |
+
'badge' => array( 'bool', __( 'Badge', ARVE_SLUG ) ),
|
918 |
+
'byline' => array( 'bool', __( 'Byline', ARVE_SLUG ) ),
|
919 |
+
'color' => 'string',
|
920 |
+
'loop' => array( 0, 1 ),
|
921 |
+
'player_id' => 'int',
|
922 |
+
'portrait' => array( 0, 1 ),
|
923 |
+
'title' => array( 0, 1 ),
|
924 |
+
),
|
925 |
+
*/
|
926 |
+
),
|
927 |
+
'vk' => array(
|
928 |
+
'name' => 'VK',
|
929 |
+
#https://vk.com/video 162756656_171388096
|
930 |
+
#https://vk.com/video_ext.php?oid=162756656&id=171388096&hash=b82cc24232fe7f9f&hd=1
|
931 |
+
'regex' => $s . 'vk\.com/video_ext\.php\?(?<id>[^ ]+)',
|
932 |
+
'embed_url' => 'https://vk.com/video_ext.php?%s',
|
933 |
+
'requires_src' => true,
|
934 |
+
'auto_thumbnail' => false,
|
935 |
+
'tests' => array(
|
936 |
+
array(
|
937 |
+
'url' => 'https://vk.com/video_ext.php?oid=162756656&id=171388096&hash=b82cc24232fe7f9f&hd=1',
|
938 |
+
'id' => 'oid=162756656&id=171388096&hash=b82cc24232fe7f9f&hd=1'
|
939 |
+
),
|
940 |
+
),
|
941 |
+
),
|
942 |
+
'vzaar' => array(
|
943 |
+
'regex' => $s . 'vzaar.(com|tv)/(videos/)?(?<id>[0-9]+)',
|
944 |
+
'embed_url' => 'https://view.vzaar.com/%s/player',
|
945 |
+
'tests' => array(
|
946 |
+
array( 'url' => 'https://vzaar.com/videos/993324', 'id' => 993324 ),
|
947 |
+
array( 'url' => 'https://vzaar.com/videos/1515906', 'id' => 1515906 ),
|
948 |
+
),
|
949 |
+
),
|
950 |
+
'wistia' => array(
|
951 |
+
# fast.wistia.net/embed/iframe/g5pnf59ala?videoFoam=true
|
952 |
+
'regex' => 'https?://fast\.wistia\.net/embed/iframe/(?<id>[a-z0-9]+)',
|
953 |
+
'embed_url' => 'https://fast.wistia.net/embed/iframe/%s',
|
954 |
+
'default_params' => 'videoFoam=true',
|
955 |
+
'tests' => array(
|
956 |
+
array(
|
957 |
+
'url' => 'https://fast.wistia.net/embed/iframe/g5pnf59ala?videoFoam=true',
|
958 |
+
'id' => 'g5pnf59ala'
|
959 |
+
),
|
960 |
+
),
|
961 |
+
),
|
962 |
+
'xtube' => array(
|
963 |
+
'name' => 'XTube',
|
964 |
+
'regex' => $s . 'xtube\.com/watch\.php\?v=(?<id>[a-z0-9_\-]+)',
|
965 |
+
'embed_url' => 'http://www.xtube.com/embedded/user/play.php?v=%s',
|
966 |
+
'auto_thumbnail' => false,
|
967 |
+
'requires_flash' => true,
|
968 |
+
'tests' => array(
|
969 |
+
array( 'url' => 'http://www.xtube.com/watch.php?v=1234', 'id' => 1234 ),
|
970 |
+
),
|
971 |
+
),
|
972 |
+
'yahoo' => array(
|
973 |
+
'regex' => '(?<id>https?://([a-z.]+)yahoo\.com/[/-a-z0-9öäü]+\.html)',
|
974 |
+
'embed_url' => '%s',
|
975 |
+
'default_params' => 'format=embed',
|
976 |
+
'auto_thumbnail' => true,
|
977 |
+
'auto_title' => true,
|
978 |
+
'requires_flash' => true,
|
979 |
+
'tests' => array(
|
980 |
+
array(
|
981 |
+
'url' => 'https://de.sports.yahoo.com/video/krasse-vorher-nachher-bilder-mann-094957265.html?format=embed&player_autoplay=false',
|
982 |
+
'id' => 'https://de.sports.yahoo.com/video/krasse-vorher-nachher-bilder-mann-094957265.html'
|
983 |
+
),
|
984 |
+
array(
|
985 |
+
'url' => 'https://www.yahoo.com/movies/sully-trailer-4-211012511.html?format=embed',
|
986 |
+
'id' => 'https://www.yahoo.com/movies/sully-trailer-4-211012511.html'
|
987 |
+
),
|
988 |
+
)
|
989 |
+
),
|
990 |
+
'youku' => array(
|
991 |
+
'regex' => 'https?://([a-z.]+)?\.youku.com/(embed/|v_show/id_)(?<id>[a-z0-9]+)',
|
992 |
+
'embed_url' => 'http://player.youku.com/embed/%s',
|
993 |
+
'auto_thumbnail' => false,
|
994 |
+
'aspect_ratio' => '450:292.5',
|
995 |
+
'requires_flash' => true,
|
996 |
+
# <iframe height=498 width=510 src="http://player.youku.com/embed/XMTUyODYwOTc4OA==" frameborder=0 allowfullscreen></iframe>
|
997 |
+
'tests' => array(
|
998 |
+
array(
|
999 |
+
'url' => 'http://v.youku.com/v_show/id_XMTczMDAxMjIyNA==.html?f=27806190',
|
1000 |
+
'id' => 'XMTczMDAxMjIyNA',
|
1001 |
+
),
|
1002 |
+
array(
|
1003 |
+
'url' => 'http://player.youku.com/embed/XMTUyODYwOTc4OA==',
|
1004 |
+
'id' => 'XMTUyODYwOTc4OA',
|
1005 |
+
),
|
1006 |
+
),
|
1007 |
+
),
|
1008 |
+
'youtube' => array(
|
1009 |
+
'name' => 'YouTube',
|
1010 |
+
'regex' => $s . '(youtube\.com\/\S*((\/e(mbed))?\/|watch\?(\S*?&?v\=))|youtu\.be\/)(?<id>[a-zA-Z0-9_-]{6,11}((\?|&)list=[a-z0-9_\-]+)?)',
|
1011 |
+
'embed_url' => 'https://www.youtube-nocookie.com/embed/%s',
|
1012 |
+
'default_params' => 'iv_load_policy=3&modestbranding=1&rel=0&autohide=1&playsinline=1',
|
1013 |
+
'auto_thumbnail' => true,
|
1014 |
+
'auto_title' => true,
|
1015 |
+
#'[youtube id="XQEiv7t1xuQ"]',
|
1016 |
+
'tests' => array(
|
1017 |
+
array(
|
1018 |
+
'url' => 'https://youtu.be/dqLyB5srdGI',
|
1019 |
+
'id' => 'dqLyB5srdGI',
|
1020 |
+
),
|
1021 |
+
array(
|
1022 |
+
'url' => 'https://www.youtube.com/watch?v=-fEo3kgHFaw',
|
1023 |
+
'id' => '-fEo3kgHFaw',
|
1024 |
+
),
|
1025 |
+
array(
|
1026 |
+
'url' => 'http://www.youtube.com/watch?v=vrXgLhkv21Y',
|
1027 |
+
'id' => 'vrXgLhkv21Y',
|
1028 |
+
'oembed_title' => 'TerrorStorm Full length version',
|
1029 |
+
),
|
1030 |
+
array(
|
1031 |
+
'url' => 'https://youtu.be/hRonZ4wP8Ys',
|
1032 |
+
'id' => 'hRonZ4wP8Ys',
|
1033 |
+
'oembed_title' => 'One Bright Dot',
|
1034 |
+
),
|
1035 |
+
array(
|
1036 |
+
'url' => 'http://www.youtube.com/watch?v=GjL82KUHVb0&list=PLI46g-I12_9qGBq-4epxOay0hotjys5iA&index=10', # The index part will be ignored
|
1037 |
+
'id' => 'GjL82KUHVb0&list=PLI46g-I12_9qGBq-4epxOay0hotjys5iA'
|
1038 |
+
),
|
1039 |
+
array(
|
1040 |
+
'url' => 'https://youtu.be/b8m9zhNAgKs?list=PLI_7Mg2Z_-4I-W_lI55D9lBUkC66ftHMg',
|
1041 |
+
'id' => 'b8m9zhNAgKs?list=PLI_7Mg2Z_-4I-W_lI55D9lBUkC66ftHMg'
|
1042 |
+
),
|
1043 |
+
),
|
1044 |
+
'specific_tests' => array(
|
1045 |
+
__('URL from youtu.be shortener', ARVE_SLUG),
|
1046 |
+
'http://youtu.be/3Y8B93r2gKg',
|
1047 |
+
__('Youtube playlist URL inlusive the video to start at. The index part will be ignored and is not needed', ARVE_SLUG) ,
|
1048 |
+
'http://www.youtube.com/watch?v=GjL82KUHVb0&list=PLI46g-I12_9qGBq-4epxOay0hotjys5iA&index=10',
|
1049 |
+
__('Loop a YouTube video', ARVE_SLUG),
|
1050 |
+
'[youtube id="FKkejo2dMV4" parameters="playlist=FKkejo2dMV4&loop=1"]',
|
1051 |
+
__('Enable annotations and related video at the end (disable by default with this plugin)', ARVE_SLUG),
|
1052 |
+
'[youtube id="uCQXKYPiz6M" parameters="iv_load_policy=1"]',
|
1053 |
+
__('Testing Youtube Starttimes', ARVE_SLUG),
|
1054 |
+
'http://youtu.be/vrXgLhkv21Y?t=1h19m14s',
|
1055 |
+
'http://youtu.be/vrXgLhkv21Y?t=19m14s',
|
1056 |
+
'http://youtu.be/vrXgLhkv21Y?t=1h',
|
1057 |
+
'http://youtu.be/vrXgLhkv21Y?t=5m',
|
1058 |
+
'http://youtu.be/vrXgLhkv21Y?t=30s',
|
1059 |
+
__( 'The Parameter start only takes values in seconds, this will start the video at 1 minute and 1 second', ARVE_SLUG ),
|
1060 |
+
'[youtube id="uCQXKYPiz6M" parameters="start=61"]',
|
1061 |
+
),
|
1062 |
+
/*
|
1063 |
+
'query_args' => array(
|
1064 |
+
array(
|
1065 |
+
'attr' => 'autohide',
|
1066 |
+
'type' => 'bool',
|
1067 |
+
'name' => __( 'Autohide', ARVE_SLUG )
|
1068 |
+
),
|
1069 |
+
array(
|
1070 |
+
'attr' => 'autoplay',
|
1071 |
+
'type' => 'bool',
|
1072 |
+
'name' => __( 'Autoplay', ARVE_SLUG )
|
1073 |
+
),
|
1074 |
+
array(
|
1075 |
+
'attr' => 'cc_load_policy',
|
1076 |
+
'type' => 'bool',
|
1077 |
+
'name' => __( 'cc_load_policy', ARVE_SLUG )
|
1078 |
+
),
|
1079 |
+
array(
|
1080 |
+
'attr' => 'color',
|
1081 |
+
'type' => array(
|
1082 |
+
'' => __( 'Default', ARVE_SLUG ),
|
1083 |
+
'red' => __( 'Red', ARVE_SLUG ),
|
1084 |
+
'white' => __( 'White', ARVE_SLUG ),
|
1085 |
+
),
|
1086 |
+
'name' => __( 'Color', ARVE_SLUG )
|
1087 |
+
),
|
1088 |
+
array(
|
1089 |
+
'attr' => 'controls',
|
1090 |
+
'type' => array(
|
1091 |
+
'' => __( 'Default', ARVE_SLUG ),
|
1092 |
+
0 => __( 'None', ARVE_SLUG ),
|
1093 |
+
1 => __( 'Yes', ARVE_SLUG ),
|
1094 |
+
2 => __( 'Yes load after click', ARVE_SLUG ),
|
1095 |
+
),
|
1096 |
+
'name' => __( 'Controls', ARVE_SLUG )
|
1097 |
+
),
|
1098 |
+
array(
|
1099 |
+
'attr' => 'disablekb',
|
1100 |
+
'type' => 'bool',
|
1101 |
+
'name' => __( 'disablekb', ARVE_SLUG )
|
1102 |
+
),
|
1103 |
+
array(
|
1104 |
+
'attr' => 'enablejsapi',
|
1105 |
+
'type' => 'bool',
|
1106 |
+
'name' => __( 'JavaScript API', ARVE_SLUG )
|
1107 |
+
),
|
1108 |
+
array(
|
1109 |
+
'attr' => 'end',
|
1110 |
+
'type' => 'number',
|
1111 |
+
'name' => __( 'End', ARVE_SLUG )
|
1112 |
+
),
|
1113 |
+
array(
|
1114 |
+
'attr' => 'fs',
|
1115 |
+
'type' => 'bool',
|
1116 |
+
'name' => __( 'Fullscreen', ARVE_SLUG )
|
1117 |
+
),
|
1118 |
+
array(
|
1119 |
+
'attr' => 'hl',
|
1120 |
+
'type' => 'text',
|
1121 |
+
'name' => __( 'Language???', ARVE_SLUG )
|
1122 |
+
),
|
1123 |
+
array(
|
1124 |
+
'attr' => 'iv_load_policy',
|
1125 |
+
'type' => array(
|
1126 |
+
'' => __( 'Default', ARVE_SLUG ),
|
1127 |
+
1 => __( 'Show annotations', ARVE_SLUG ),
|
1128 |
+
3 => __( 'Do not show annotations', ARVE_SLUG ),
|
1129 |
+
),
|
1130 |
+
'name' => __( 'iv_load_policy', ARVE_SLUG ),
|
1131 |
+
),
|
1132 |
+
array(
|
1133 |
+
'attr' => 'list',
|
1134 |
+
'type' => 'medium-text',
|
1135 |
+
'name' => __( 'Language???', ARVE_SLUG )
|
1136 |
+
),
|
1137 |
+
array(
|
1138 |
+
'attr' => 'listType',
|
1139 |
+
'type' => array(
|
1140 |
+
'' => __( 'Default', ARVE_SLUG ),
|
1141 |
+
'playlist' => __( 'Playlist', ARVE_SLUG ),
|
1142 |
+
'search' => __( 'Search', ARVE_SLUG ),
|
1143 |
+
'user_uploads' => __( 'User Uploads', ARVE_SLUG ),
|
1144 |
+
),
|
1145 |
+
'name' => __( 'List Type', ARVE_SLUG ),
|
1146 |
+
),
|
1147 |
+
array(
|
1148 |
+
'attr' => 'loop',
|
1149 |
+
'type' => 'bool',
|
1150 |
+
'name' => __( 'Loop', ARVE_SLUG ),
|
1151 |
+
),
|
1152 |
+
array(
|
1153 |
+
'attr' => 'modestbranding',
|
1154 |
+
'type' => 'bool',
|
1155 |
+
'name' => __( 'Modestbranding', ARVE_SLUG ),
|
1156 |
+
),
|
1157 |
+
array(
|
1158 |
+
'attr' => 'origin',
|
1159 |
+
'type' => 'bool',
|
1160 |
+
'name' => __( 'Origin', ARVE_SLUG ),
|
1161 |
+
),
|
1162 |
+
array(
|
1163 |
+
'attr' => 'playerapiid',
|
1164 |
+
'type' => 'bool',
|
1165 |
+
'name' => __( 'playerapiid', ARVE_SLUG ),
|
1166 |
+
),
|
1167 |
+
array(
|
1168 |
+
'attr' => 'playlist',
|
1169 |
+
'type' => 'bool',
|
1170 |
+
'name' => __( 'Playlist', ARVE_SLUG ),
|
1171 |
+
),
|
1172 |
+
array(
|
1173 |
+
'attr' => 'playsinline',
|
1174 |
+
'type' => 'bool',
|
1175 |
+
'name' => __( 'playsinline', ARVE_SLUG ),
|
1176 |
+
),
|
1177 |
+
array(
|
1178 |
+
'attr' => 'rel',
|
1179 |
+
'type' => 'bool',
|
1180 |
+
'name' => __( 'Related Videos at End', ARVE_SLUG ),
|
1181 |
+
),
|
1182 |
+
array(
|
1183 |
+
'attr' => 'showinfo',
|
1184 |
+
'type' => 'bool',
|
1185 |
+
'name' => __( 'Show Info', ARVE_SLUG ),
|
1186 |
+
),
|
1187 |
+
array(
|
1188 |
+
'attr' => 'start',
|
1189 |
+
'type' => 'number',
|
1190 |
+
'name' => __( 'Start', ARVE_SLUG ),
|
1191 |
+
),
|
1192 |
+
array(
|
1193 |
+
'attr' => 'theme',
|
1194 |
+
'type' => array(
|
1195 |
+
'' => __( 'Default', ARVE_SLUG ),
|
1196 |
+
'dark' => __( 'Dark', ARVE_SLUG ),
|
1197 |
+
'light' => __( 'Light', ARVE_SLUG ),
|
1198 |
+
),
|
1199 |
+
'name' => __( 'Theme', ARVE_SLUG ),
|
1200 |
+
),
|
1201 |
+
),
|
1202 |
+
*/
|
1203 |
+
),
|
1204 |
+
'youtubelist' => array(
|
1205 |
+
'regex' => $s . 'youtube\.com/(embed/videoseries|playlist)\?list=(?<id>[-a-z0-9_]+)',
|
1206 |
+
'name' => 'YouTube Playlist',
|
1207 |
+
'embed_url' => 'https://www.youtube-nocookie.com/embed/videoseries?list=%s',
|
1208 |
+
'default_params' => 'iv_load_policy=3&modestbranding=1&rel=0&autohide=1&playsinline=1',
|
1209 |
+
'auto_thumbnail' => true,
|
1210 |
+
'tests' => array(
|
1211 |
+
array(
|
1212 |
+
'url' => 'https://www.youtube.com/playlist?list=PL3Esg-ZzbiUmeSKBAQ3ej1hQxDSsmnp-7',
|
1213 |
+
'id' => 'PL3Esg-ZzbiUmeSKBAQ3ej1hQxDSsmnp-7'
|
1214 |
+
),
|
1215 |
+
array(
|
1216 |
+
'url' => 'https://www.youtube.com/embed/videoseries?list=PLMUvgtCRyn-6obmhiDS4n5vYQN3bJRduk',
|
1217 |
+
'id' => 'PLMUvgtCRyn-6obmhiDS4n5vYQN3bJRduk',
|
1218 |
+
)
|
1219 |
+
)
|
1220 |
+
),
|
1221 |
+
'html5' => array(
|
1222 |
+
'name' => 'HTML5 video files directly',
|
1223 |
+
#'regex' => '(?<id>' . $s . 'dropbox.com/[^.]+\.(mp4|webm|ogv)$)', # URLs ending with .mp4, .webm ... are handled by word
|
1224 |
+
'aspect_ratio' => false,
|
1225 |
+
),
|
1226 |
+
'iframe' => array(
|
1227 |
+
'embed_url' => '%s',
|
1228 |
+
'default_params' => '',
|
1229 |
+
'auto_thumbnail' => false,
|
1230 |
+
'requires_flash' => true,
|
1231 |
+
'tests' => array(
|
1232 |
+
array( 'url' => 'https://example.com/', 'id' => 'https://example.com/' ),
|
1233 |
+
),
|
1234 |
+
),
|
1235 |
+
'google_drive' => array( 'name', 'Google Drive' ),
|
1236 |
+
'dropbox' => null,
|
1237 |
+
'ooyala' => null,
|
1238 |
+
);
|
1239 |
+
|
1240 |
+
foreach ( $properties as $key => $value ) {
|
1241 |
+
|
1242 |
+
if( empty( $value['name'] ) ) {
|
1243 |
+
$properties[ $key ]['name'] = ucfirst( $key );
|
1244 |
+
}
|
1245 |
+
if( ! isset( $value['aspect_ratio'] ) ) {
|
1246 |
+
$properties[ $key ]['aspect_ratio'] = '16:9';
|
1247 |
+
}
|
1248 |
+
if( empty( $value['requires_flash'] ) ) {
|
1249 |
+
$properties[ $key ]['requires_flash'] = false;
|
1250 |
+
}
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
return $properties;
|
1254 |
+
}
|
1255 |
+
|
1256 |
+
function arve_attr( $attr = array() ) {
|
1257 |
+
|
1258 |
+
if ( empty( $attr ) ) {
|
1259 |
+
return '';
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
$html = '';
|
1263 |
+
|
1264 |
+
foreach ( $attr as $key => $value ) {
|
1265 |
+
|
1266 |
+
if ( false === $value || null === $value ) {
|
1267 |
+
continue;
|
1268 |
+
} elseif ( '' === $value || true === $value ) {
|
1269 |
+
$html .= sprintf( ' %s', esc_html( $key ) );
|
1270 |
+
} elseif ( in_array( $key, array( 'href', 'data-href', 'src', 'data-src' ) ) ) {
|
1271 |
+
$html .= sprintf( ' %s="%s"', esc_html( $key ), arve_esc_url( $value ) );
|
1272 |
+
} else {
|
1273 |
+
$html .= sprintf( ' %s="%s"', esc_html( $key ), esc_attr( $value ) );
|
1274 |
+
}
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
return $html;
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
function arve_esc_url( $url ) {
|
1281 |
+
return str_replace( 'jukebox?list%5B0%5D', 'jukebox?list[]', esc_url( $url ) );
|
1282 |
+
}
|
1283 |
+
|
1284 |
+
function arve_starts_with( $haystack, $needle ) {
|
1285 |
+
// search backwards starting from haystack length characters from the end
|
1286 |
+
return $needle === "" || strrpos( $haystack, $needle, -strlen( $haystack ) ) !== false;
|
1287 |
+
}
|
1288 |
+
|
1289 |
+
function arve_ends_with( $haystack, $needle ) {
|
1290 |
+
// search forward starting from end minus needle length characters
|
1291 |
+
return $needle === "" || ( ( $temp = strlen($haystack) - strlen( $needle ) ) >= 0 && strpos( $haystack, $needle, $temp ) !== false );
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
function arve_contains( $haystack, $needle ) {
|
1295 |
+
return strpos( $haystack, $needle ) !== false;
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
function arve_register_asset( $args ) {
|
1299 |
+
|
1300 |
+
$defaults = array(
|
1301 |
+
'handle' => null,
|
1302 |
+
'src' => null,
|
1303 |
+
'deps' => array(),
|
1304 |
+
'in_footer' => true,
|
1305 |
+
'media' => null,
|
1306 |
+
'ver' => ARVE_VERSION,
|
1307 |
+
'automin' => false,
|
1308 |
+
);
|
1309 |
+
|
1310 |
+
$args = wp_parse_args( $args, $defaults );
|
1311 |
+
|
1312 |
+
if ( $args['automin'] && ! defined( 'WP_DEBUG' ) && ! WP_DEBUG ) {
|
1313 |
+
|
1314 |
+
$args['src'] = str_replace( '.css', '.min.css', $args['src'] );
|
1315 |
+
$args['src'] = str_replace( '.js', '.min.js', $args['src'] );
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
if ( arve_ends_with( $args['src'], '.css' ) ) {
|
1319 |
+
wp_register_style( $args['handle'], $args['src'], $args['deps'], $args['ver'], $args['media'] );
|
1320 |
+
} else {
|
1321 |
+
wp_register_script( $args['handle'], $args['src'], $args['deps'], $args['ver'], $args['in_footer'] );
|
1322 |
+
}
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
function arve_get_min_suffix() {
|
1326 |
+
return ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? '' : '.min';
|
1327 |
+
}
|
shared/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
uninstall.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Fired when the plugin is uninstalled.
|
5 |
+
*
|
6 |
+
* When populating this file, consider the following flow
|
7 |
+
* of control:
|
8 |
+
*
|
9 |
+
* - This method should be static
|
10 |
+
* - Check if the $_REQUEST content actually is the plugin name
|
11 |
+
* - Run an admin referrer check to make sure it goes through authentication
|
12 |
+
* - Verify the output of $_GET makes sense
|
13 |
+
* - Repeat with other user roles. Best directly by using the links/query string parameters.
|
14 |
+
* - Repeat things for multisite. Once for a single site in the network, once sitewide.
|
15 |
+
*
|
16 |
+
* This file may be updated more in future version of the Boilerplate; however, this is the
|
17 |
+
* general skeleton and outline for how the file should work.
|
18 |
+
*
|
19 |
+
* For more information, see the following discussion:
|
20 |
+
* https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913
|
21 |
+
*
|
22 |
+
* @link https://nextgenthemes.com
|
23 |
+
* @since 1.0.0
|
24 |
+
*
|
25 |
+
* @package Advanced_Responsive_Video_Embedder
|
26 |
+
*/
|
27 |
+
|
28 |
+
// If uninstall not called from WordPress, then exit.
|
29 |
+
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
30 |
+
exit;
|
31 |
+
}
|
vendor/autoload.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload.php @generated by Composer
|
4 |
+
|
5 |
+
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
+
|
7 |
+
return ComposerAutoloaderInitfb499b858061dcbc3a5ecc8995cf88b8::getLoader();
|
vendor/composer/ClassLoader.php
ADDED
@@ -0,0 +1,445 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Composer.
|
5 |
+
*
|
6 |
+
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Composer\Autoload;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
17 |
+
*
|
18 |
+
* $loader = new \Composer\Autoload\ClassLoader();
|
19 |
+
*
|
20 |
+
* // register classes with namespaces
|
21 |
+
* $loader->add('Symfony\Component', __DIR__.'/component');
|
22 |
+
* $loader->add('Symfony', __DIR__.'/framework');
|
23 |
+
*
|
24 |
+
* // activate the autoloader
|
25 |
+
* $loader->register();
|
26 |
+
*
|
27 |
+
* // to enable searching the include path (eg. for PEAR packages)
|
28 |
+
* $loader->setUseIncludePath(true);
|
29 |
+
*
|
30 |
+
* In this example, if you try to use a class in the Symfony\Component
|
31 |
+
* namespace or one of its children (Symfony\Component\Console for instance),
|
32 |
+
* the autoloader will first look for the class under the component/
|
33 |
+
* directory, and it will then fallback to the framework/ directory if not
|
34 |
+
* found before giving up.
|
35 |
+
*
|
36 |
+
* This class is loosely based on the Symfony UniversalClassLoader.
|
37 |
+
*
|
38 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
+
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see http://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see http://www.php-fig.org/psr/psr-4/
|
42 |
+
*/
|
43 |
+
class ClassLoader
|
44 |
+
{
|
45 |
+
// PSR-4
|
46 |
+
private $prefixLengthsPsr4 = array();
|
47 |
+
private $prefixDirsPsr4 = array();
|
48 |
+
private $fallbackDirsPsr4 = array();
|
49 |
+
|
50 |
+
// PSR-0
|
51 |
+
private $prefixesPsr0 = array();
|
52 |
+
private $fallbackDirsPsr0 = array();
|
53 |
+
|
54 |
+
private $useIncludePath = false;
|
55 |
+
private $classMap = array();
|
56 |
+
private $classMapAuthoritative = false;
|
57 |
+
private $missingClasses = array();
|
58 |
+
private $apcuPrefix;
|
59 |
+
|
60 |
+
public function getPrefixes()
|
61 |
+
{
|
62 |
+
if (!empty($this->prefixesPsr0)) {
|
63 |
+
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
64 |
+
}
|
65 |
+
|
66 |
+
return array();
|
67 |
+
}
|
68 |
+
|
69 |
+
public function getPrefixesPsr4()
|
70 |
+
{
|
71 |
+
return $this->prefixDirsPsr4;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function getFallbackDirs()
|
75 |
+
{
|
76 |
+
return $this->fallbackDirsPsr0;
|
77 |
+
}
|
78 |
+
|
79 |
+
public function getFallbackDirsPsr4()
|
80 |
+
{
|
81 |
+
return $this->fallbackDirsPsr4;
|
82 |
+
}
|
83 |
+
|
84 |
+
public function getClassMap()
|
85 |
+
{
|
86 |
+
return $this->classMap;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @param array $classMap Class to filename map
|
91 |
+
*/
|
92 |
+
public function addClassMap(array $classMap)
|
93 |
+
{
|
94 |
+
if ($this->classMap) {
|
95 |
+
$this->classMap = array_merge($this->classMap, $classMap);
|
96 |
+
} else {
|
97 |
+
$this->classMap = $classMap;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Registers a set of PSR-0 directories for a given prefix, either
|
103 |
+
* appending or prepending to the ones previously set for this prefix.
|
104 |
+
*
|
105 |
+
* @param string $prefix The prefix
|
106 |
+
* @param array|string $paths The PSR-0 root directories
|
107 |
+
* @param bool $prepend Whether to prepend the directories
|
108 |
+
*/
|
109 |
+
public function add($prefix, $paths, $prepend = false)
|
110 |
+
{
|
111 |
+
if (!$prefix) {
|
112 |
+
if ($prepend) {
|
113 |
+
$this->fallbackDirsPsr0 = array_merge(
|
114 |
+
(array) $paths,
|
115 |
+
$this->fallbackDirsPsr0
|
116 |
+
);
|
117 |
+
} else {
|
118 |
+
$this->fallbackDirsPsr0 = array_merge(
|
119 |
+
$this->fallbackDirsPsr0,
|
120 |
+
(array) $paths
|
121 |
+
);
|
122 |
+
}
|
123 |
+
|
124 |
+
return;
|
125 |
+
}
|
126 |
+
|
127 |
+
$first = $prefix[0];
|
128 |
+
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
129 |
+
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
130 |
+
|
131 |
+
return;
|
132 |
+
}
|
133 |
+
if ($prepend) {
|
134 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
135 |
+
(array) $paths,
|
136 |
+
$this->prefixesPsr0[$first][$prefix]
|
137 |
+
);
|
138 |
+
} else {
|
139 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
140 |
+
$this->prefixesPsr0[$first][$prefix],
|
141 |
+
(array) $paths
|
142 |
+
);
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Registers a set of PSR-4 directories for a given namespace, either
|
148 |
+
* appending or prepending to the ones previously set for this namespace.
|
149 |
+
*
|
150 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
151 |
+
* @param array|string $paths The PSR-4 base directories
|
152 |
+
* @param bool $prepend Whether to prepend the directories
|
153 |
+
*
|
154 |
+
* @throws \InvalidArgumentException
|
155 |
+
*/
|
156 |
+
public function addPsr4($prefix, $paths, $prepend = false)
|
157 |
+
{
|
158 |
+
if (!$prefix) {
|
159 |
+
// Register directories for the root namespace.
|
160 |
+
if ($prepend) {
|
161 |
+
$this->fallbackDirsPsr4 = array_merge(
|
162 |
+
(array) $paths,
|
163 |
+
$this->fallbackDirsPsr4
|
164 |
+
);
|
165 |
+
} else {
|
166 |
+
$this->fallbackDirsPsr4 = array_merge(
|
167 |
+
$this->fallbackDirsPsr4,
|
168 |
+
(array) $paths
|
169 |
+
);
|
170 |
+
}
|
171 |
+
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
172 |
+
// Register directories for a new namespace.
|
173 |
+
$length = strlen($prefix);
|
174 |
+
if ('\\' !== $prefix[$length - 1]) {
|
175 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
176 |
+
}
|
177 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
178 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
179 |
+
} elseif ($prepend) {
|
180 |
+
// Prepend directories for an already registered namespace.
|
181 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
182 |
+
(array) $paths,
|
183 |
+
$this->prefixDirsPsr4[$prefix]
|
184 |
+
);
|
185 |
+
} else {
|
186 |
+
// Append directories for an already registered namespace.
|
187 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
188 |
+
$this->prefixDirsPsr4[$prefix],
|
189 |
+
(array) $paths
|
190 |
+
);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Registers a set of PSR-0 directories for a given prefix,
|
196 |
+
* replacing any others previously set for this prefix.
|
197 |
+
*
|
198 |
+
* @param string $prefix The prefix
|
199 |
+
* @param array|string $paths The PSR-0 base directories
|
200 |
+
*/
|
201 |
+
public function set($prefix, $paths)
|
202 |
+
{
|
203 |
+
if (!$prefix) {
|
204 |
+
$this->fallbackDirsPsr0 = (array) $paths;
|
205 |
+
} else {
|
206 |
+
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Registers a set of PSR-4 directories for a given namespace,
|
212 |
+
* replacing any others previously set for this namespace.
|
213 |
+
*
|
214 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
215 |
+
* @param array|string $paths The PSR-4 base directories
|
216 |
+
*
|
217 |
+
* @throws \InvalidArgumentException
|
218 |
+
*/
|
219 |
+
public function setPsr4($prefix, $paths)
|
220 |
+
{
|
221 |
+
if (!$prefix) {
|
222 |
+
$this->fallbackDirsPsr4 = (array) $paths;
|
223 |
+
} else {
|
224 |
+
$length = strlen($prefix);
|
225 |
+
if ('\\' !== $prefix[$length - 1]) {
|
226 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
227 |
+
}
|
228 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
229 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Turns on searching the include path for class files.
|
235 |
+
*
|
236 |
+
* @param bool $useIncludePath
|
237 |
+
*/
|
238 |
+
public function setUseIncludePath($useIncludePath)
|
239 |
+
{
|
240 |
+
$this->useIncludePath = $useIncludePath;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Can be used to check if the autoloader uses the include path to check
|
245 |
+
* for classes.
|
246 |
+
*
|
247 |
+
* @return bool
|
248 |
+
*/
|
249 |
+
public function getUseIncludePath()
|
250 |
+
{
|
251 |
+
return $this->useIncludePath;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Turns off searching the prefix and fallback directories for classes
|
256 |
+
* that have not been registered with the class map.
|
257 |
+
*
|
258 |
+
* @param bool $classMapAuthoritative
|
259 |
+
*/
|
260 |
+
public function setClassMapAuthoritative($classMapAuthoritative)
|
261 |
+
{
|
262 |
+
$this->classMapAuthoritative = $classMapAuthoritative;
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Should class lookup fail if not found in the current class map?
|
267 |
+
*
|
268 |
+
* @return bool
|
269 |
+
*/
|
270 |
+
public function isClassMapAuthoritative()
|
271 |
+
{
|
272 |
+
return $this->classMapAuthoritative;
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
277 |
+
*
|
278 |
+
* @param string|null $apcuPrefix
|
279 |
+
*/
|
280 |
+
public function setApcuPrefix($apcuPrefix)
|
281 |
+
{
|
282 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* The APCu prefix in use, or null if APCu caching is not enabled.
|
287 |
+
*
|
288 |
+
* @return string|null
|
289 |
+
*/
|
290 |
+
public function getApcuPrefix()
|
291 |
+
{
|
292 |
+
return $this->apcuPrefix;
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Registers this instance as an autoloader.
|
297 |
+
*
|
298 |
+
* @param bool $prepend Whether to prepend the autoloader or not
|
299 |
+
*/
|
300 |
+
public function register($prepend = false)
|
301 |
+
{
|
302 |
+
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Unregisters this instance as an autoloader.
|
307 |
+
*/
|
308 |
+
public function unregister()
|
309 |
+
{
|
310 |
+
spl_autoload_unregister(array($this, 'loadClass'));
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Loads the given class or interface.
|
315 |
+
*
|
316 |
+
* @param string $class The name of the class
|
317 |
+
* @return bool|null True if loaded, null otherwise
|
318 |
+
*/
|
319 |
+
public function loadClass($class)
|
320 |
+
{
|
321 |
+
if ($file = $this->findFile($class)) {
|
322 |
+
includeFile($file);
|
323 |
+
|
324 |
+
return true;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Finds the path to the file where the class is defined.
|
330 |
+
*
|
331 |
+
* @param string $class The name of the class
|
332 |
+
*
|
333 |
+
* @return string|false The path if found, false otherwise
|
334 |
+
*/
|
335 |
+
public function findFile($class)
|
336 |
+
{
|
337 |
+
// class map lookup
|
338 |
+
if (isset($this->classMap[$class])) {
|
339 |
+
return $this->classMap[$class];
|
340 |
+
}
|
341 |
+
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
342 |
+
return false;
|
343 |
+
}
|
344 |
+
if (null !== $this->apcuPrefix) {
|
345 |
+
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
346 |
+
if ($hit) {
|
347 |
+
return $file;
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
$file = $this->findFileWithExtension($class, '.php');
|
352 |
+
|
353 |
+
// Search for Hack files if we are running on HHVM
|
354 |
+
if (false === $file && defined('HHVM_VERSION')) {
|
355 |
+
$file = $this->findFileWithExtension($class, '.hh');
|
356 |
+
}
|
357 |
+
|
358 |
+
if (null !== $this->apcuPrefix) {
|
359 |
+
apcu_add($this->apcuPrefix.$class, $file);
|
360 |
+
}
|
361 |
+
|
362 |
+
if (false === $file) {
|
363 |
+
// Remember that this class does not exist.
|
364 |
+
$this->missingClasses[$class] = true;
|
365 |
+
}
|
366 |
+
|
367 |
+
return $file;
|
368 |
+
}
|
369 |
+
|
370 |
+
private function findFileWithExtension($class, $ext)
|
371 |
+
{
|
372 |
+
// PSR-4 lookup
|
373 |
+
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
374 |
+
|
375 |
+
$first = $class[0];
|
376 |
+
if (isset($this->prefixLengthsPsr4[$first])) {
|
377 |
+
$subPath = $class;
|
378 |
+
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
379 |
+
$subPath = substr($subPath, 0, $lastPos);
|
380 |
+
$search = $subPath.'\\';
|
381 |
+
if (isset($this->prefixDirsPsr4[$search])) {
|
382 |
+
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
383 |
+
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
384 |
+
if (file_exists($file = $dir . $pathEnd)) {
|
385 |
+
return $file;
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
// PSR-4 fallback dirs
|
393 |
+
foreach ($this->fallbackDirsPsr4 as $dir) {
|
394 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
395 |
+
return $file;
|
396 |
+
}
|
397 |
+
}
|
398 |
+
|
399 |
+
// PSR-0 lookup
|
400 |
+
if (false !== $pos = strrpos($class, '\\')) {
|
401 |
+
// namespaced class name
|
402 |
+
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
403 |
+
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
404 |
+
} else {
|
405 |
+
// PEAR-like class name
|
406 |
+
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
407 |
+
}
|
408 |
+
|
409 |
+
if (isset($this->prefixesPsr0[$first])) {
|
410 |
+
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
411 |
+
if (0 === strpos($class, $prefix)) {
|
412 |
+
foreach ($dirs as $dir) {
|
413 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
414 |
+
return $file;
|
415 |
+
}
|
416 |
+
}
|
417 |
+
}
|
418 |
+
}
|
419 |
+
}
|
420 |
+
|
421 |
+
// PSR-0 fallback dirs
|
422 |
+
foreach ($this->fallbackDirsPsr0 as $dir) {
|
423 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
424 |
+
return $file;
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
// PSR-0 include paths.
|
429 |
+
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
430 |
+
return $file;
|
431 |
+
}
|
432 |
+
|
433 |
+
return false;
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Scope isolated include.
|
439 |
+
*
|
440 |
+
* Prevents access to $this/self from included files.
|
441 |
+
*/
|
442 |
+
function includeFile($file)
|
443 |
+
{
|
444 |
+
include $file;
|
445 |
+
}
|
vendor/composer/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Copyright (c) Nils Adermann, Jordi Boggiano
|
3 |
+
|
4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
+
of this software and associated documentation files (the "Software"), to deal
|
6 |
+
in the Software without restriction, including without limitation the rights
|
7 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
9 |
+
to do so, subject to the following conditions:
|
10 |
+
|
11 |
+
The above copyright notice and this permission notice shall be included in all
|
12 |
+
copies or substantial portions of the Software.
|
13 |
+
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20 |
+
THE SOFTWARE.
|
21 |
+
|
vendor/composer/autoload_classmap.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_classmap.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
);
|
vendor/composer/autoload_namespaces.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_namespaces.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
);
|
vendor/composer/autoload_psr4.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_psr4.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'Vimeo\\' => array($vendorDir . '/vimeo/vimeo-api/src/Vimeo'),
|
10 |
+
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
|
11 |
+
);
|
vendor/composer/autoload_real.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_real.php @generated by Composer
|
4 |
+
|
5 |
+
class ComposerAutoloaderInitfb499b858061dcbc3a5ecc8995cf88b8
|
6 |
+
{
|
7 |
+
private static $loader;
|
8 |
+
|
9 |
+
public static function loadClassLoader($class)
|
10 |
+
{
|
11 |
+
if ('Composer\Autoload\ClassLoader' === $class) {
|
12 |
+
require __DIR__ . '/ClassLoader.php';
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
public static function getLoader()
|
17 |
+
{
|
18 |
+
if (null !== self::$loader) {
|
19 |
+
return self::$loader;
|
20 |
+
}
|
21 |
+
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitfb499b858061dcbc3a5ecc8995cf88b8', 'loadClassLoader'), true, true);
|
23 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitfb499b858061dcbc3a5ecc8995cf88b8', '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\ComposerStaticInitfb499b858061dcbc3a5ecc8995cf88b8::getInitializer($loader));
|
31 |
+
} else {
|
32 |
+
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
+
foreach ($map as $namespace => $path) {
|
34 |
+
$loader->set($namespace, $path);
|
35 |
+
}
|
36 |
+
|
37 |
+
$map = require __DIR__ . '/autoload_psr4.php';
|
38 |
+
foreach ($map as $namespace => $path) {
|
39 |
+
$loader->setPsr4($namespace, $path);
|
40 |
+
}
|
41 |
+
|
42 |
+
$classMap = require __DIR__ . '/autoload_classmap.php';
|
43 |
+
if ($classMap) {
|
44 |
+
$loader->addClassMap($classMap);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
$loader->register(true);
|
49 |
+
|
50 |
+
return $loader;
|
51 |
+
}
|
52 |
+
}
|
vendor/composer/autoload_static.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_static.php @generated by Composer
|
4 |
+
|
5 |
+
namespace Composer\Autoload;
|
6 |
+
|
7 |
+
class ComposerStaticInitfb499b858061dcbc3a5ecc8995cf88b8
|
8 |
+
{
|
9 |
+
public static $prefixLengthsPsr4 = array (
|
10 |
+
'V' =>
|
11 |
+
array (
|
12 |
+
'Vimeo\\' => 6,
|
13 |
+
),
|
14 |
+
'C' =>
|
15 |
+
array (
|
16 |
+
'Composer\\Installers\\' => 20,
|
17 |
+
),
|
18 |
+
);
|
19 |
+
|
20 |
+
public static $prefixDirsPsr4 = array (
|
21 |
+
'Vimeo\\' =>
|
22 |
+
array (
|
23 |
+
0 => __DIR__ . '/..' . '/vimeo/vimeo-api/src/Vimeo',
|
24 |
+
),
|
25 |
+
'Composer\\Installers\\' =>
|
26 |
+
array (
|
27 |
+
0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
|
28 |
+
),
|
29 |
+
);
|
30 |
+
|
31 |
+
public static function getInitializer(ClassLoader $loader)
|
32 |
+
{
|
33 |
+
return \Closure::bind(function () use ($loader) {
|
34 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitfb499b858061dcbc3a5ecc8995cf88b8::$prefixLengthsPsr4;
|
35 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitfb499b858061dcbc3a5ecc8995cf88b8::$prefixDirsPsr4;
|
36 |
+
|
37 |
+
}, null, ClassLoader::class);
|
38 |
+
}
|
39 |
+
}
|
vendor/composer/installed.json
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"name": "composer/installers",
|
4 |
+
"version": "v1.5.0",
|
5 |
+
"version_normalized": "1.5.0.0",
|
6 |
+
"source": {
|
7 |
+
"type": "git",
|
8 |
+
"url": "https://github.com/composer/installers.git",
|
9 |
+
"reference": "049797d727261bf27f2690430d935067710049c2"
|
10 |
+
},
|
11 |
+
"dist": {
|
12 |
+
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2",
|
14 |
+
"reference": "049797d727261bf27f2690430d935067710049c2",
|
15 |
+
"shasum": ""
|
16 |
+
},
|
17 |
+
"require": {
|
18 |
+
"composer-plugin-api": "^1.0"
|
19 |
+
},
|
20 |
+
"replace": {
|
21 |
+
"roundcube/plugin-installer": "*",
|
22 |
+
"shama/baton": "*"
|
23 |
+
},
|
24 |
+
"require-dev": {
|
25 |
+
"composer/composer": "1.0.*@dev",
|
26 |
+
"phpunit/phpunit": "^4.8.36"
|
27 |
+
},
|
28 |
+
"time": "2017-12-29T09:13:20+00:00",
|
29 |
+
"type": "composer-plugin",
|
30 |
+
"extra": {
|
31 |
+
"class": "Composer\\Installers\\Plugin",
|
32 |
+
"branch-alias": {
|
33 |
+
"dev-master": "1.0-dev"
|
34 |
+
}
|
35 |
+
},
|
36 |
+
"installation-source": "dist",
|
37 |
+
"autoload": {
|
38 |
+
"psr-4": {
|
39 |
+
"Composer\\Installers\\": "src/Composer/Installers"
|
40 |
+
}
|
41 |
+
},
|
42 |
+
"notification-url": "https://packagist.org/downloads/",
|
43 |
+
"license": [
|
44 |
+
"MIT"
|
45 |
+
],
|
46 |
+
"authors": [
|
47 |
+
{
|
48 |
+
"name": "Kyle Robinson Young",
|
49 |
+
"email": "kyle@dontkry.com",
|
50 |
+
"homepage": "https://github.com/shama"
|
51 |
+
}
|
52 |
+
],
|
53 |
+
"description": "A multi-framework Composer library installer",
|
54 |
+
"homepage": "https://composer.github.io/installers/",
|
55 |
+
"keywords": [
|
56 |
+
"Craft",
|
57 |
+
"Dolibarr",
|
58 |
+
"Eliasis",
|
59 |
+
"Hurad",
|
60 |
+
"ImageCMS",
|
61 |
+
"Kanboard",
|
62 |
+
"Lan Management System",
|
63 |
+
"MODX Evo",
|
64 |
+
"Mautic",
|
65 |
+
"Maya",
|
66 |
+
"OXID",
|
67 |
+
"Plentymarkets",
|
68 |
+
"Porto",
|
69 |
+
"RadPHP",
|
70 |
+
"SMF",
|
71 |
+
"Thelia",
|
72 |
+
"WolfCMS",
|
73 |
+
"agl",
|
74 |
+
"aimeos",
|
75 |
+
"annotatecms",
|
76 |
+
"attogram",
|
77 |
+
"bitrix",
|
78 |
+
"cakephp",
|
79 |
+
"chef",
|
80 |
+
"cockpit",
|
81 |
+
"codeigniter",
|
82 |
+
"concrete5",
|
83 |
+
"croogo",
|
84 |
+
"dokuwiki",
|
85 |
+
"drupal",
|
86 |
+
"eZ Platform",
|
87 |
+
"elgg",
|
88 |
+
"expressionengine",
|
89 |
+
"fuelphp",
|
90 |
+
"grav",
|
91 |
+
"installer",
|
92 |
+
"itop",
|
93 |
+
"joomla",
|
94 |
+
"kohana",
|
95 |
+
"laravel",
|
96 |
+
"lavalite",
|
97 |
+
"lithium",
|
98 |
+
"magento",
|
99 |
+
"majima",
|
100 |
+
"mako",
|
101 |
+
"mediawiki",
|
102 |
+
"modulework",
|
103 |
+
"modx",
|
104 |
+
"moodle",
|
105 |
+
"osclass",
|
106 |
+
"phpbb",
|
107 |
+
"piwik",
|
108 |
+
"ppi",
|
109 |
+
"puppet",
|
110 |
+
"pxcms",
|
111 |
+
"reindex",
|
112 |
+
"roundcube",
|
113 |
+
"shopware",
|
114 |
+
"silverstripe",
|
115 |
+
"sydes",
|
116 |
+
"symfony",
|
117 |
+
"typo3",
|
118 |
+
"wordpress",
|
119 |
+
"yawik",
|
120 |
+
"zend",
|
121 |
+
"zikula"
|
122 |
+
]
|
123 |
+
},
|
124 |
+
{
|
125 |
+
"name": "vimeo/vimeo-api",
|
126 |
+
"version": "2.0.0",
|
127 |
+
"version_normalized": "2.0.0.0",
|
128 |
+
"source": {
|
129 |
+
"type": "git",
|
130 |
+
"url": "https://github.com/vimeo/vimeo.php.git",
|
131 |
+
"reference": "9fbf705cf4885282183744c04f3fb10793768911"
|
132 |
+
},
|
133 |
+
"dist": {
|
134 |
+
"type": "zip",
|
135 |
+
"url": "https://api.github.com/repos/vimeo/vimeo.php/zipball/9fbf705cf4885282183744c04f3fb10793768911",
|
136 |
+
"reference": "9fbf705cf4885282183744c04f3fb10793768911",
|
137 |
+
"shasum": ""
|
138 |
+
},
|
139 |
+
"require": {
|
140 |
+
"ext-curl": "*",
|
141 |
+
"ext-json": "*",
|
142 |
+
"php": ">=5.3.0"
|
143 |
+
},
|
144 |
+
"require-dev": {
|
145 |
+
"phpunit/phpunit": "^4.8"
|
146 |
+
},
|
147 |
+
"time": "2018-02-06T19:06:58+00:00",
|
148 |
+
"type": "library",
|
149 |
+
"installation-source": "dist",
|
150 |
+
"autoload": {
|
151 |
+
"psr-4": {
|
152 |
+
"Vimeo\\": "src/Vimeo"
|
153 |
+
}
|
154 |
+
},
|
155 |
+
"notification-url": "https://packagist.org/downloads/",
|
156 |
+
"license": [
|
157 |
+
"Apache-2.0"
|
158 |
+
],
|
159 |
+
"authors": [
|
160 |
+
{
|
161 |
+
"name": "Vimeo",
|
162 |
+
"homepage": "http://vimeo.com"
|
163 |
+
}
|
164 |
+
],
|
165 |
+
"description": "Official PHP library for the Vimeo API.",
|
166 |
+
"homepage": "https://github.com/vimeo/vimeo.php",
|
167 |
+
"keywords": [
|
168 |
+
"video",
|
169 |
+
"vimeo"
|
170 |
+
]
|
171 |
+
}
|
172 |
+
]
|
vendor/composer/installers/CHANGELOG.md
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Change Log
|
2 |
+
|
3 |
+
## [Unreleased]
|
4 |
+
|
5 |
+
## v1.5.0 - 2017-12-29
|
6 |
+
### Added
|
7 |
+
* Added WordPress dropin support.
|
8 |
+
* Added new types supported for Eliasis.
|
9 |
+
* Added support for Phoenix CMS.
|
10 |
+
* Added MODX installer.
|
11 |
+
* Added Majima instaler.
|
12 |
+
* Added SiteDirect installer.
|
13 |
+
* Added support optional prefix in OctoberCMS installers.
|
14 |
+
* Added PHP 7.2 support.
|
15 |
+
|
16 |
+
### Changed
|
17 |
+
* Changed remove packages, see [#348](https://github.com/composer/installers/pull/348).
|
18 |
+
|
19 |
+
### Fixed
|
20 |
+
* Fixed code style, removed unused imports.
|
21 |
+
|
22 |
+
## v1.4.0 - 2017-08-09
|
23 |
+
### Added
|
24 |
+
* Installer for eZ Platform.
|
25 |
+
* Installer for UserFrosting.
|
26 |
+
* Installer for Osclass.
|
27 |
+
* Installer for Lan Management System.
|
28 |
+
|
29 |
+
### Changed
|
30 |
+
* Added vendor name to package path for Lavalite.
|
31 |
+
|
32 |
+
## v1.3.0 - 2017-04-24
|
33 |
+
### Added
|
34 |
+
* Kanboard plugins installer.
|
35 |
+
* Porto-SAP installer.
|
36 |
+
* Add `core` to concrete5 installer.
|
37 |
+
* Support Moodle "search" plugin type.
|
38 |
+
* SyDES installer.
|
39 |
+
* iTop installer.
|
40 |
+
* Lavalite installer.
|
41 |
+
* Module type for Eliasis.
|
42 |
+
* Vgmcp installer.
|
43 |
+
* OntoWiki installer.
|
44 |
+
* The requirements for contributing (CONTRIBUTING.md).
|
45 |
+
|
46 |
+
## v1.2.0 - 2016-08-13
|
47 |
+
### Added
|
48 |
+
* Installer for Attogram.
|
49 |
+
* Installer for Cockpit.
|
50 |
+
* Installer for Plentymarkets.
|
51 |
+
* Installer for ReIndex.
|
52 |
+
* Installer for Vanilla.
|
53 |
+
* Installer for YAWIK.
|
54 |
+
* Added missing environments for new Shopware (5.2) Plugin System.
|
55 |
+
|
56 |
+
## v1.1.0 - 2016-07-05
|
57 |
+
### Added
|
58 |
+
* Installer for ReIndex.
|
59 |
+
* Installer for RadPHP.
|
60 |
+
* Installer for Decibel.
|
61 |
+
* Installer for Phifty.
|
62 |
+
* Installer for ExpressionEngine.
|
63 |
+
|
64 |
+
### Changed
|
65 |
+
* New paths for new Bitrix CMS. Old paths is deprecated.
|
66 |
+
|
67 |
+
### Deprecated
|
68 |
+
* Old paths in Bitrix CMS Installer is deprecated.
|
69 |
+
|
70 |
+
## v1.0.25 - 2016-04-13
|
71 |
+
### Removed
|
72 |
+
* Revert TYPO3 installer deletion.
|
73 |
+
|
74 |
+
## v1.0.24 - 2016-04-05
|
75 |
+
### Added
|
76 |
+
* Installer for ImageCMS.
|
77 |
+
* Installer for Mautic.
|
78 |
+
* New types in the Kirby installer: `kirby-plugin` and `kirby-field`.
|
79 |
+
* New types in the Drupal installer: `custom-theme` and `custom-module`.
|
80 |
+
|
81 |
+
### Changed
|
82 |
+
* Switch to PSR-4.
|
83 |
+
* Update Bitrix Installer: configuration for setting custom path to directory with kernel.
|
84 |
+
|
85 |
+
### Removed
|
86 |
+
* Remove TYPO3 Extension installers.
|
vendor/composer/installers/CONTRIBUTING.md
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Contributing
|
2 |
+
|
3 |
+
If you would like to help, please take a look at the list of
|
4 |
+
[issues](https://github.com/composer/installers/issues).
|
5 |
+
|
6 |
+
## Pull requests
|
7 |
+
|
8 |
+
* [Fork and clone](https://help.github.com/articles/fork-a-repo).
|
9 |
+
* Run the command `php composer.phar install` to install the dependencies.
|
10 |
+
This will also install the dev dependencies. See [Composer](https://getcomposer.org/doc/03-cli.md#install).
|
11 |
+
* Use the command `phpunit` to run the tests. See [PHPUnit](http://phpunit.de).
|
12 |
+
* Create a branch, commit, push and send us a
|
13 |
+
[pull request](https://help.github.com/articles/using-pull-requests).
|
14 |
+
|
15 |
+
To ensure a consistent code base, you should make sure the code follows the
|
16 |
+
coding standards [PSR-1](http://www.php-fig.org/psr/psr-1/) and
|
17 |
+
[PSR-2](http://www.php-fig.org/psr/psr-2/).
|
18 |
+
|
19 |
+
### Create a new Installer
|
20 |
+
|
21 |
+
* Create class extends `Composer\Installers\BaseInstaller` with your Installer.
|
22 |
+
* Create unit tests as a separate class or as part of a `Composer\Installers\Test\InstallerTest`.
|
23 |
+
* Add information about your Installer in `README.md` in section "Current Supported Package Types".
|
24 |
+
* Run the tests.
|
vendor/composer/installers/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) 2012 Kyle Robinson Young
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
8 |
+
to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in all
|
11 |
+
copies or substantial portions of the Software.
|
12 |
+
|
13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 |
+
THE SOFTWARE.
|
vendor/composer/installers/README.md
ADDED
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# A Multi-Framework [Composer](http://getcomposer.org) Library Installer
|
2 |
+
|
3 |
+
[![Build Status](http://img.shields.io/travis/composer/installers.svg)](http://travis-ci.org/composer/installers)
|
4 |
+
|
5 |
+
This is for PHP package authors to require in their `composer.json`. It will
|
6 |
+
install their package to the correct location based on the specified package
|
7 |
+
type.
|
8 |
+
|
9 |
+
The goal of Installers is to be a simple package type to install path map.
|
10 |
+
Users can also customize the install path per package and package authors can
|
11 |
+
modify the package name upon installing.
|
12 |
+
|
13 |
+
Installers isn't intended on replacing all custom installers. If your
|
14 |
+
package requires special installation handling then by all means, create a
|
15 |
+
custom installer to handle it.
|
16 |
+
|
17 |
+
**Natively Supported Frameworks**:
|
18 |
+
|
19 |
+
The following frameworks natively work with Composer and will be
|
20 |
+
installed to the default `vendor` directory. `composer/installers`
|
21 |
+
is not needed to install packages with these frameworks:
|
22 |
+
|
23 |
+
* Aura
|
24 |
+
* Symfony2
|
25 |
+
* Yii
|
26 |
+
* Yii2
|
27 |
+
|
28 |
+
## Current Supported Package Types
|
29 |
+
|
30 |
+
> Stable types are marked as **bold**, this means that installation paths
|
31 |
+
> for those type will not be changed. Any adjustment for those types would
|
32 |
+
> require creation of brand new type that will cover required changes.
|
33 |
+
|
34 |
+
| Framework | Types
|
35 |
+
| --------- | -----
|
36 |
+
| Aimeos | `aimeos-extension`
|
37 |
+
| Asgard | `asgard-module`<br>`asgard-theme`
|
38 |
+
| Attogram | `attogram-module`
|
39 |
+
| AGL | `agl-module`
|
40 |
+
| Bonefish | `bonefish-package`
|
41 |
+
| AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
|
42 |
+
| Bitrix | `bitrix-module` (deprecated) <br>`bitrix-component` (deprecated) <br>`bitrix-theme` (deprecated) <br><br> `bitrix-d7-module` <br> `bitrix-d7-component` <br> `bitrix-d7-template`
|
43 |
+
| CakePHP 2+ | **`cakephp-plugin`**
|
44 |
+
| Chef | `chef-cookbook`<br>`chef-role`
|
45 |
+
| CCFramework | `ccframework-ship`<br>`ccframework-theme`
|
46 |
+
| Cockpit | `cockpit-module`
|
47 |
+
| CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
|
48 |
+
| concrete5 | `concrete5-core`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-block`<br>`concrete5-update`
|
49 |
+
| Craft | `craft-plugin`
|
50 |
+
| Croogo | `croogo-plugin`<br>`croogo-theme`
|
51 |
+
| Decibel | `decibel-app`
|
52 |
+
| DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
|
53 |
+
| Dolibarr | `dolibarr-module`
|
54 |
+
| Drupal | <b>`drupal-core`<br>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-drush`
|
55 |
+
| Elgg | `elgg-plugin`
|
56 |
+
| Eliasis | `eliasis-component`<br>`eliasis-module`<br>`eliasis-plugin`<br>`eliasis-template`
|
57 |
+
| ExpressionEngine 3 | `ee3-addon`<br>`ee3-theme`
|
58 |
+
| eZ Platform | `ezplatform-assets`<br>`ezplatform-meta-assets`
|
59 |
+
| FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
|
60 |
+
| FuelPHP v2.x | `fuelphp-component`
|
61 |
+
| Grav | `grav-plugin`<br>`grav-theme`
|
62 |
+
| Hurad | `hurad-plugin`<br>`hurad-theme`
|
63 |
+
| ImageCMS | `imagecms-template`<br>`imagecms-module`<br>`imagecms-library`
|
64 |
+
| iTop | `itop-extension`
|
65 |
+
| Joomla | `joomla-component`<br>`joomla-module`<br>`joomla-template`<br>`joomla-plugin`<br>`joomla-library`
|
66 |
+
| Kanboard | `kanboard-plugin`
|
67 |
+
| Kirby | **`kirby-plugin`**<br>`kirby-field`<br>`kirby-tag`
|
68 |
+
| KodiCMS | `kodicms-plugin`<br>`kodicms-media`
|
69 |
+
| Kohana | **`kohana-module`**
|
70 |
+
| Lan Management System | `lms-plugin`<br>`lms-template`<br>`lms-document-template`<br>`lms-userpanel-module`
|
71 |
+
| Laravel | `laravel-library`
|
72 |
+
| Lavalite | `lavalite-theme`<br>`lavalite-package`
|
73 |
+
| Lithium | **`lithium-library`<br>`lithium-source`**
|
74 |
+
| Magento | `magento-library`<br>`magento-skin`<br>`magento-theme`
|
75 |
+
| majima | `majima-plugin`
|
76 |
+
| Mako | `mako-package`
|
77 |
+
| Mautic | `mautic-plugin`<br>`mautic-theme`
|
78 |
+
| Maya | `maya-module`
|
79 |
+
| MODX | `modx-extra`
|
80 |
+
| MODX Evo | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
|
81 |
+
| MediaWiki | `mediawiki-extension`
|
82 |
+
| October | **`october-module`<br>`october-plugin`<br>`october-theme`**
|
83 |
+
| OntoWiki | `ontowiki-extension`<br>`ontowiki-theme`<br>`ontowiki-translation`
|
84 |
+
| OXID | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
|
85 |
+
| Osclass | `osclass-plugin`<br>`osclass-theme`<br>`osclass-language`
|
86 |
+
| MODULEWork | `modulework-module`
|
87 |
+
| Moodle | `moodle-*` (Please [check source](https://raw.githubusercontent.com/composer/installers/master/src/Composer/Installers/MoodleInstaller.php) for all supported types)
|
88 |
+
| Piwik | `piwik-plugin`
|
89 |
+
| phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
|
90 |
+
| Pimcore | `pimcore-plugin`
|
91 |
+
| Plentymarkets | `plentymarkets-plugin`
|
92 |
+
| PPI | **`ppi-module`**
|
93 |
+
| Puppet | `puppet-module`
|
94 |
+
| Porto | `porto-container`
|
95 |
+
| RadPHP | `radphp-bundle`
|
96 |
+
| REDAXO | `redaxo-addon`
|
97 |
+
| ReIndex | **`reindex-plugin`** <br> **`reindex-theme`**
|
98 |
+
| Roundcube | `roundcube-plugin`
|
99 |
+
| shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
|
100 |
+
| SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
|
101 |
+
| SiteDirect | `sitedirect-module`<br>`sitedirect-plugin`
|
102 |
+
| SMF | `smf-module`<br>`smf-theme`
|
103 |
+
| SyDES | `sydes-module`<br>`sydes-theme`
|
104 |
+
| symfony1 | **`symfony1-plugin`**
|
105 |
+
| Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
|
106 |
+
| TYPO3 Flow | `typo3-flow-package`<br>`typo3-flow-framework`<br>`typo3-flow-plugin`<br>`typo3-flow-site`<br>`typo3-flow-boilerplate`<br>`typo3-flow-build`
|
107 |
+
| TYPO3 CMS | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead)
|
108 |
+
| UserFrosting | `userfrosting-sprinkle`
|
109 |
+
| Vanilla | `vanilla-plugin`<br>`vanilla-theme`
|
110 |
+
| Vgmcp | `vgmcp-bundle`<br>`vgmcp-theme`
|
111 |
+
| Wolf CMS | `wolfcms-plugin`
|
112 |
+
| WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`<br>`wordpress-dropin`
|
113 |
+
| YAWIK | `yawik-module`
|
114 |
+
| Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
|
115 |
+
| Zikula | `zikula-module`<br>`zikula-theme`
|
116 |
+
| Prestashop | `prestashop-module`<br>`prestashop-theme`
|
117 |
+
| Phifty | `phifty-bundle`<br>`phifty-framework`<br>`phifty-library`
|
118 |
+
|
119 |
+
## Example `composer.json` File
|
120 |
+
|
121 |
+
This is an example for a CakePHP plugin. The only important parts to set in your
|
122 |
+
composer.json file are `"type": "cakephp-plugin"` which describes what your
|
123 |
+
package is and `"require": { "composer/installers": "~1.0" }` which tells composer
|
124 |
+
to load the custom installers.
|
125 |
+
|
126 |
+
```json
|
127 |
+
{
|
128 |
+
"name": "you/ftp",
|
129 |
+
"type": "cakephp-plugin",
|
130 |
+
"require": {
|
131 |
+
"composer/installers": "~1.0"
|
132 |
+
}
|
133 |
+
}
|
134 |
+
```
|
135 |
+
|
136 |
+
This would install your package to the `Plugin/Ftp/` folder of a CakePHP app
|
137 |
+
when a user runs `php composer.phar install`.
|
138 |
+
|
139 |
+
So submit your packages to [packagist.org](http://packagist.org)!
|
140 |
+
|
141 |
+
## Custom Install Paths
|
142 |
+
|
143 |
+
If you are consuming a package that uses the `composer/installers` you can
|
144 |
+
override the install path with the following extra in your `composer.json`:
|
145 |
+
|
146 |
+
```json
|
147 |
+
{
|
148 |
+
"extra": {
|
149 |
+
"installer-paths": {
|
150 |
+
"your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
```
|
155 |
+
|
156 |
+
A package type can have a custom installation path with a `type:` prefix.
|
157 |
+
|
158 |
+
``` json
|
159 |
+
{
|
160 |
+
"extra": {
|
161 |
+
"installer-paths": {
|
162 |
+
"your/custom/path/{$name}/": ["type:wordpress-plugin"]
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
```
|
167 |
+
|
168 |
+
You can also have the same vendor packages with a custom installation path by
|
169 |
+
using the `vendor:` prefix.
|
170 |
+
|
171 |
+
``` json
|
172 |
+
{
|
173 |
+
"extra": {
|
174 |
+
"installer-paths": {
|
175 |
+
"your/custom/path/{$name}/": ["vendor:my_organization"]
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
```
|
180 |
+
|
181 |
+
These would use your custom path for each of the listed packages. The available
|
182 |
+
variables to use in your paths are: `{$name}`, `{$vendor}`, `{$type}`.
|
183 |
+
|
184 |
+
## Custom Install Names
|
185 |
+
|
186 |
+
If you're a package author and need your package to be named differently when
|
187 |
+
installed consider using the `installer-name` extra.
|
188 |
+
|
189 |
+
For example you have a package named `shama/cakephp-ftp` with the type
|
190 |
+
`cakephp-plugin`. Installing with `composer/installers` would install to the
|
191 |
+
path `Plugin/CakephpFtp`. Due to the strict naming conventions, you as a
|
192 |
+
package author actually need the package to be named and installed to
|
193 |
+
`Plugin/Ftp`. Using the following config within your **package** `composer.json`
|
194 |
+
will allow this:
|
195 |
+
|
196 |
+
```json
|
197 |
+
{
|
198 |
+
"name": "shama/cakephp-ftp",
|
199 |
+
"type": "cakephp-plugin",
|
200 |
+
"extra": {
|
201 |
+
"installer-name": "Ftp"
|
202 |
+
}
|
203 |
+
}
|
204 |
+
```
|
205 |
+
|
206 |
+
Please note the name entered into `installer-name` will be the final and will
|
207 |
+
not be inflected.
|
208 |
+
|
209 |
+
## Should we allow dynamic package types or paths? No.
|
210 |
+
|
211 |
+
What are they? The ability for a package author to determine where a package
|
212 |
+
will be installed either through setting the path directly in their
|
213 |
+
`composer.json` or through a dynamic package type: `"type":
|
214 |
+
"framework-install-here"`.
|
215 |
+
|
216 |
+
It has been proposed many times. Even implemented once early on and then
|
217 |
+
removed. Installers won't do this because it would allow a single package
|
218 |
+
author to wipe out entire folders without the user's consent. That user would
|
219 |
+
then come here to yell at us.
|
220 |
+
|
221 |
+
Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender.
|
vendor/composer/installers/_config.yml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
theme: jekyll-theme-cayman
|
vendor/composer/installers/phpunit.xml.dist
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
|
3 |
+
<phpunit backupGlobals="false"
|
4 |
+
backupStaticAttributes="false"
|
5 |
+
colors="true"
|
6 |
+
convertErrorsToExceptions="true"
|
7 |
+
convertNoticesToExceptions="true"
|
8 |
+
convertWarningsToExceptions="true"
|
9 |
+
processIsolation="false"
|
10 |
+
stopOnFailure="false"
|
11 |
+
syntaxCheck="false"
|
12 |
+
bootstrap="tests/bootstrap.php"
|
13 |
+
>
|
14 |
+
<testsuites>
|
15 |
+
<testsuite name="Installers Test Suite">
|
16 |
+
<directory>tests/Composer/Installers</directory>
|
17 |
+
</testsuite>
|
18 |
+
</testsuites>
|
19 |
+
|
20 |
+
<filter>
|
21 |
+
<whitelist>
|
22 |
+
<directory>src/Composer/Installers</directory>
|
23 |
+
</whitelist>
|
24 |
+
</filter>
|
25 |
+
</phpunit>
|
vendor/composer/installers/src/Composer/Installers/AglInstaller.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AglInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'More/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name to CamelCase
|
12 |
+
*/
|
13 |
+
public function inflectPackageVars($vars)
|
14 |
+
{
|
15 |
+
$vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
|
16 |
+
return strtoupper($matches[1]);
|
17 |
+
}, $vars['name']);
|
18 |
+
|
19 |
+
return $vars;
|
20 |
+
}
|
21 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AimeosInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'ext/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AnnotateCmsInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'addons/modules/{$name}/',
|
8 |
+
'component' => 'addons/components/{$name}/',
|
9 |
+
'service' => 'addons/services/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AsgardInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'Modules/{$name}/',
|
8 |
+
'theme' => 'Themes/{$name}/'
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* For package type asgard-module, cut off a trailing '-plugin' if present.
|
15 |
+
*
|
16 |
+
* For package type asgard-theme, cut off a trailing '-theme' if present.
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
if ($vars['type'] === 'asgard-module') {
|
22 |
+
return $this->inflectPluginVars($vars);
|
23 |
+
}
|
24 |
+
|
25 |
+
if ($vars['type'] === 'asgard-theme') {
|
26 |
+
return $this->inflectThemeVars($vars);
|
27 |
+
}
|
28 |
+
|
29 |
+
return $vars;
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function inflectPluginVars($vars)
|
33 |
+
{
|
34 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
35 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
36 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
37 |
+
|
38 |
+
return $vars;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function inflectThemeVars($vars)
|
42 |
+
{
|
43 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
44 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
45 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AttogramInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\IO\IOInterface;
|
5 |
+
use Composer\Composer;
|
6 |
+
use Composer\Package\PackageInterface;
|
7 |
+
|
8 |
+
abstract class BaseInstaller
|
9 |
+
{
|
10 |
+
protected $locations = array();
|
11 |
+
protected $composer;
|
12 |
+
protected $package;
|
13 |
+
protected $io;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Initializes base installer.
|
17 |
+
*
|
18 |
+
* @param PackageInterface $package
|
19 |
+
* @param Composer $composer
|
20 |
+
* @param IOInterface $io
|
21 |
+
*/
|
22 |
+
public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
|
23 |
+
{
|
24 |
+
$this->composer = $composer;
|
25 |
+
$this->package = $package;
|
26 |
+
$this->io = $io;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Return the install path based on package type.
|
31 |
+
*
|
32 |
+
* @param PackageInterface $package
|
33 |
+
* @param string $frameworkType
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
37 |
+
{
|
38 |
+
$type = $this->package->getType();
|
39 |
+
|
40 |
+
$prettyName = $this->package->getPrettyName();
|
41 |
+
if (strpos($prettyName, '/') !== false) {
|
42 |
+
list($vendor, $name) = explode('/', $prettyName);
|
43 |
+
} else {
|
44 |
+
$vendor = '';
|
45 |
+
$name = $prettyName;
|
46 |
+
}
|
47 |
+
|
48 |
+
$availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
|
49 |
+
|
50 |
+
$extra = $package->getExtra();
|
51 |
+
if (!empty($extra['installer-name'])) {
|
52 |
+
$availableVars['name'] = $extra['installer-name'];
|
53 |
+
}
|
54 |
+
|
55 |
+
if ($this->composer->getPackage()) {
|
56 |
+
$extra = $this->composer->getPackage()->getExtra();
|
57 |
+
if (!empty($extra['installer-paths'])) {
|
58 |
+
$customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
|
59 |
+
if ($customPath !== false) {
|
60 |
+
return $this->templatePath($customPath, $availableVars);
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
$packageType = substr($type, strlen($frameworkType) + 1);
|
66 |
+
$locations = $this->getLocations();
|
67 |
+
if (!isset($locations[$packageType])) {
|
68 |
+
throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
|
69 |
+
}
|
70 |
+
|
71 |
+
return $this->templatePath($locations[$packageType], $availableVars);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* For an installer to override to modify the vars per installer.
|
76 |
+
*
|
77 |
+
* @param array $vars
|
78 |
+
* @return array
|
79 |
+
*/
|
80 |
+
public function inflectPackageVars($vars)
|
81 |
+
{
|
82 |
+
return $vars;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Gets the installer's locations
|
87 |
+
*
|
88 |
+
* @return array
|
89 |
+
*/
|
90 |
+
public function getLocations()
|
91 |
+
{
|
92 |
+
return $this->locations;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Replace vars in a path
|
97 |
+
*
|
98 |
+
* @param string $path
|
99 |
+
* @param array $vars
|
100 |
+
* @return string
|
101 |
+
*/
|
102 |
+
protected function templatePath($path, array $vars = array())
|
103 |
+
{
|
104 |
+
if (strpos($path, '{') !== false) {
|
105 |
+
extract($vars);
|
106 |
+
preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
|
107 |
+
if (!empty($matches[1])) {
|
108 |
+
foreach ($matches[1] as $var) {
|
109 |
+
$path = str_replace('{$' . $var . '}', $$var, $path);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
return $path;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Search through a passed paths array for a custom install path.
|
119 |
+
*
|
120 |
+
* @param array $paths
|
121 |
+
* @param string $name
|
122 |
+
* @param string $type
|
123 |
+
* @param string $vendor = NULL
|
124 |
+
* @return string
|
125 |
+
*/
|
126 |
+
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
|
127 |
+
{
|
128 |
+
foreach ($paths as $path => $names) {
|
129 |
+
if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
|
130 |
+
return $path;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
return false;
|
135 |
+
}
|
136 |
+
}
|
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
use Composer\Util\Filesystem;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Installer for Bitrix Framework. Supported types of extensions:
|
9 |
+
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
|
10 |
+
* - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
|
11 |
+
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
|
12 |
+
*
|
13 |
+
* You can set custom path to directory with Bitrix kernel in `composer.json`:
|
14 |
+
*
|
15 |
+
* ```json
|
16 |
+
* {
|
17 |
+
* "extra": {
|
18 |
+
* "bitrix-dir": "s1/bitrix"
|
19 |
+
* }
|
20 |
+
* }
|
21 |
+
* ```
|
22 |
+
*
|
23 |
+
* @author Nik Samokhvalov <nik@samokhvalov.info>
|
24 |
+
* @author Denis Kulichkin <onexhovia@gmail.com>
|
25 |
+
*/
|
26 |
+
class BitrixInstaller extends BaseInstaller
|
27 |
+
{
|
28 |
+
protected $locations = array(
|
29 |
+
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
30 |
+
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
31 |
+
'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
32 |
+
'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
|
33 |
+
'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
|
34 |
+
'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
|
35 |
+
);
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @var array Storage for informations about duplicates at all the time of installation packages.
|
39 |
+
*/
|
40 |
+
private static $checkedDuplicates = array();
|
41 |
+
|
42 |
+
/**
|
43 |
+
* {@inheritdoc}
|
44 |
+
*/
|
45 |
+
public function inflectPackageVars($vars)
|
46 |
+
{
|
47 |
+
if ($this->composer->getPackage()) {
|
48 |
+
$extra = $this->composer->getPackage()->getExtra();
|
49 |
+
|
50 |
+
if (isset($extra['bitrix-dir'])) {
|
51 |
+
$vars['bitrix_dir'] = $extra['bitrix-dir'];
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
if (!isset($vars['bitrix_dir'])) {
|
56 |
+
$vars['bitrix_dir'] = 'bitrix';
|
57 |
+
}
|
58 |
+
|
59 |
+
return parent::inflectPackageVars($vars);
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* {@inheritdoc}
|
64 |
+
*/
|
65 |
+
protected function templatePath($path, array $vars = array())
|
66 |
+
{
|
67 |
+
$templatePath = parent::templatePath($path, $vars);
|
68 |
+
$this->checkDuplicates($templatePath, $vars);
|
69 |
+
|
70 |
+
return $templatePath;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Duplicates search packages.
|
75 |
+
*
|
76 |
+
* @param string $path
|
77 |
+
* @param array $vars
|
78 |
+
*/
|
79 |
+
protected function checkDuplicates($path, array $vars = array())
|
80 |
+
{
|
81 |
+
$packageType = substr($vars['type'], strlen('bitrix') + 1);
|
82 |
+
$localDir = explode('/', $vars['bitrix_dir']);
|
83 |
+
array_pop($localDir);
|
84 |
+
$localDir[] = 'local';
|
85 |
+
$localDir = implode('/', $localDir);
|
86 |
+
|
87 |
+
$oldPath = str_replace(
|
88 |
+
array('{$bitrix_dir}', '{$name}'),
|
89 |
+
array($localDir, $vars['name']),
|
90 |
+
$this->locations[$packageType]
|
91 |
+
);
|
92 |
+
|
93 |
+
if (in_array($oldPath, static::$checkedDuplicates)) {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
+
if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
|
98 |
+
|
99 |
+
$this->io->writeError(' <error>Duplication of packages:</error>');
|
100 |
+
$this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
|
101 |
+
|
102 |
+
while (true) {
|
103 |
+
switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
|
104 |
+
case 'y':
|
105 |
+
$fs = new Filesystem();
|
106 |
+
$fs->removeDirectory($oldPath);
|
107 |
+
break 2;
|
108 |
+
|
109 |
+
case 'n':
|
110 |
+
break 2;
|
111 |
+
|
112 |
+
case '?':
|
113 |
+
default:
|
114 |
+
$this->io->writeError(array(
|
115 |
+
' y - delete package ' . $oldPath . ' and to continue with the installation',
|
116 |
+
' n - don\'t delete and to continue with the installation',
|
117 |
+
));
|
118 |
+
$this->io->writeError(' ? - print help');
|
119 |
+
break;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
static::$checkedDuplicates[] = $oldPath;
|
125 |
+
}
|
126 |
+
}
|
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class BonefishInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'package' => 'Packages/{$vendor}/{$name}/'
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\DependencyResolver\Pool;
|
5 |
+
|
6 |
+
class CakePHPInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'Plugin/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name to CamelCase
|
14 |
+
*/
|
15 |
+
public function inflectPackageVars($vars)
|
16 |
+
{
|
17 |
+
if ($this->matchesCakeVersion('>=', '3.0.0')) {
|
18 |
+
return $vars;
|
19 |
+
}
|
20 |
+
|
21 |
+
$nameParts = explode('/', $vars['name']);
|
22 |
+
foreach ($nameParts as &$value) {
|
23 |
+
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
24 |
+
$value = str_replace(array('-', '_'), ' ', $value);
|
25 |
+
$value = str_replace(' ', '', ucwords($value));
|
26 |
+
}
|
27 |
+
$vars['name'] = implode('/', $nameParts);
|
28 |
+
|
29 |
+
return $vars;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Change the default plugin location when cakephp >= 3.0
|
34 |
+
*/
|
35 |
+
public function getLocations()
|
36 |
+
{
|
37 |
+
if ($this->matchesCakeVersion('>=', '3.0.0')) {
|
38 |
+
$this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
|
39 |
+
}
|
40 |
+
return $this->locations;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Check if CakePHP version matches against a version
|
45 |
+
*
|
46 |
+
* @param string $matcher
|
47 |
+
* @param string $version
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
protected function matchesCakeVersion($matcher, $version)
|
51 |
+
{
|
52 |
+
if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
|
53 |
+
$multiClass = 'Composer\Semver\Constraint\MultiConstraint';
|
54 |
+
$constraintClass = 'Composer\Semver\Constraint\Constraint';
|
55 |
+
} else {
|
56 |
+
$multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
|
57 |
+
$constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
|
58 |
+
}
|
59 |
+
|
60 |
+
$repositoryManager = $this->composer->getRepositoryManager();
|
61 |
+
if ($repositoryManager) {
|
62 |
+
$repos = $repositoryManager->getLocalRepository();
|
63 |
+
if (!$repos) {
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
$cake3 = new $multiClass(array(
|
67 |
+
new $constraintClass($matcher, $version),
|
68 |
+
new $constraintClass('!=', '9999999-dev'),
|
69 |
+
));
|
70 |
+
$pool = new Pool('dev');
|
71 |
+
$pool->addRepository($repos);
|
72 |
+
$packages = $pool->whatProvides('cakephp/cakephp');
|
73 |
+
foreach ($packages as $package) {
|
74 |
+
$installed = new $constraintClass('=', $package->getVersion());
|
75 |
+
if ($cake3->matches($installed)) {
|
76 |
+
return true;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
return false;
|
81 |
+
}
|
82 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ChefInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'cookbook' => 'Chef/{$vendor}/{$name}/',
|
8 |
+
'role' => 'Chef/roles/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
11 |
+
|
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ClanCatsFrameworkInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'ship' => 'CCF/orbit/{$name}/',
|
8 |
+
'theme' => 'CCF/app/themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CockpitInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'cockpit/modules/addons/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format module name.
|
12 |
+
*
|
13 |
+
* Strip `module-` prefix from package name.
|
14 |
+
*
|
15 |
+
* @param array @vars
|
16 |
+
*
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
if ($vars['type'] == 'cockpit-module') {
|
22 |
+
return $this->inflectModuleVars($vars);
|
23 |
+
}
|
24 |
+
|
25 |
+
return $vars;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function inflectModuleVars($vars)
|
29 |
+
{
|
30 |
+
$vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
|
31 |
+
|
32 |
+
return $vars;
|
33 |
+
}
|
34 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CodeIgniterInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'library' => 'application/libraries/{$name}/',
|
8 |
+
'third-party' => 'application/third_party/{$name}/',
|
9 |
+
'module' => 'application/modules/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class Concrete5Installer extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'core' => 'concrete/',
|
8 |
+
'block' => 'application/blocks/{$name}/',
|
9 |
+
'package' => 'packages/{$name}/',
|
10 |
+
'theme' => 'application/themes/{$name}/',
|
11 |
+
'update' => 'updates/{$name}/',
|
12 |
+
);
|
13 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Installer for Craft Plugins
|
6 |
+
*/
|
7 |
+
class CraftInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
const NAME_PREFIX = 'craft';
|
10 |
+
const NAME_SUFFIX = 'plugin';
|
11 |
+
|
12 |
+
protected $locations = array(
|
13 |
+
'plugin' => 'craft/plugins/{$name}/',
|
14 |
+
);
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Strip `craft-` prefix and/or `-plugin` suffix from package names
|
18 |
+
*
|
19 |
+
* @param array $vars
|
20 |
+
*
|
21 |
+
* @return array
|
22 |
+
*/
|
23 |
+
final public function inflectPackageVars($vars)
|
24 |
+
{
|
25 |
+
return $this->inflectPluginVars($vars);
|
26 |
+
}
|
27 |
+
|
28 |
+
private function inflectPluginVars($vars)
|
29 |
+
{
|
30 |
+
$vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
|
31 |
+
$vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
|
32 |
+
|
33 |
+
return $vars;
|
34 |
+
}
|
35 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CroogoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'Plugin/{$name}/',
|
8 |
+
'theme' => 'View/Themed/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name to CamelCase
|
13 |
+
*/
|
14 |
+
public function inflectPackageVars($vars)
|
15 |
+
{
|
16 |
+
$vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
|
17 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
18 |
+
|
19 |
+
return $vars;
|
20 |
+
}
|
21 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class DecibelInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
/** @var array */
|
7 |
+
protected $locations = array(
|
8 |
+
'app' => 'app/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class DokuWikiInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'lib/plugins/{$name}/',
|
8 |
+
'template' => 'lib/tpl/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* For package type dokuwiki-plugin, cut off a trailing '-plugin',
|
15 |
+
* or leading dokuwiki_ if present.
|
16 |
+
*
|
17 |
+
* For package type dokuwiki-template, cut off a trailing '-template' if present.
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
public function inflectPackageVars($vars)
|
21 |
+
{
|
22 |
+
|
23 |
+
if ($vars['type'] === 'dokuwiki-plugin') {
|
24 |
+
return $this->inflectPluginVars($vars);
|
25 |
+
}
|
26 |
+
|
27 |
+
if ($vars['type'] === 'dokuwiki-template') {
|
28 |
+
return $this->inflectTemplateVars($vars);
|
29 |
+
}
|
30 |
+
|
31 |
+
return $vars;
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function inflectPluginVars($vars)
|
35 |
+
{
|
36 |
+
$vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
|
37 |
+
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
|
38 |
+
|
39 |
+
return $vars;
|
40 |
+
}
|
41 |
+
|
42 |
+
protected function inflectTemplateVars($vars)
|
43 |
+
{
|
44 |
+
$vars['name'] = preg_replace('/-template$/', '', $vars['name']);
|
45 |
+
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class DolibarrInstaller
|
6 |
+
*
|
7 |
+
* @package Composer\Installers
|
8 |
+
* @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
9 |
+
*/
|
10 |
+
class DolibarrInstaller extends BaseInstaller
|
11 |
+
{
|
12 |
+
//TODO: Add support for scripts and themes
|
13 |
+
protected $locations = array(
|
14 |
+
'module' => 'htdocs/custom/{$name}/',
|
15 |
+
);
|
16 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class DrupalInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'core' => 'core/',
|
8 |
+
'module' => 'modules/{$name}/',
|
9 |
+
'theme' => 'themes/{$name}/',
|
10 |
+
'library' => 'libraries/{$name}/',
|
11 |
+
'profile' => 'profiles/{$name}/',
|
12 |
+
'drush' => 'drush/{$name}/',
|
13 |
+
'custom-theme' => 'themes/custom/{$name}/',
|
14 |
+
'custom-module' => 'modules/custom/{$name}',
|
15 |
+
);
|
16 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ElggInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'mod/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class EliasisInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'component' => 'components/{$name}/',
|
8 |
+
'module' => 'modules/{$name}/',
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
'template' => 'templates/{$name}/',
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\Package\PackageInterface;
|
5 |
+
|
6 |
+
class ExpressionEngineInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
|
9 |
+
protected $locations = array();
|
10 |
+
|
11 |
+
private $ee2Locations = array(
|
12 |
+
'addon' => 'system/expressionengine/third_party/{$name}/',
|
13 |
+
'theme' => 'themes/third_party/{$name}/',
|
14 |
+
);
|
15 |
+
|
16 |
+
private $ee3Locations = array(
|
17 |
+
'addon' => 'system/user/addons/{$name}/',
|
18 |
+
'theme' => 'themes/user/{$name}/',
|
19 |
+
);
|
20 |
+
|
21 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
22 |
+
{
|
23 |
+
|
24 |
+
$version = "{$frameworkType}Locations";
|
25 |
+
$this->locations = $this->$version;
|
26 |
+
|
27 |
+
return parent::getInstallPath($package, $frameworkType);
|
28 |
+
}
|
29 |
+
}
|
vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class EzPlatformInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'meta-assets' => 'web/assets/ezplatform/',
|
8 |
+
'assets' => 'web/assets/ezplatform/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class FuelInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'fuel/app/modules/{$name}/',
|
8 |
+
'package' => 'fuel/packages/{$name}/',
|
9 |
+
'theme' => 'fuel/app/themes/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class FuelphpInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'component' => 'components/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/GravInstaller.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class GravInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'user/plugins/{$name}/',
|
8 |
+
'theme' => 'user/themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name
|
13 |
+
*
|
14 |
+
* @param array $vars
|
15 |
+
*
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
$restrictedWords = implode('|', array_keys($this->locations));
|
21 |
+
|
22 |
+
$vars['name'] = strtolower($vars['name']);
|
23 |
+
$vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
|
24 |
+
'$1',
|
25 |
+
$vars['name']
|
26 |
+
);
|
27 |
+
|
28 |
+
return $vars;
|
29 |
+
}
|
30 |
+
}
|
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class HuradInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
'theme' => 'plugins/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name to CamelCase
|
13 |
+
*/
|
14 |
+
public function inflectPackageVars($vars)
|
15 |
+
{
|
16 |
+
$nameParts = explode('/', $vars['name']);
|
17 |
+
foreach ($nameParts as &$value) {
|
18 |
+
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
19 |
+
$value = str_replace(array('-', '_'), ' ', $value);
|
20 |
+
$value = str_replace(' ', '', ucwords($value));
|
21 |
+
}
|
22 |
+
$vars['name'] = implode('/', $nameParts);
|
23 |
+
return $vars;
|
24 |
+
}
|
25 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ImageCMSInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'template' => 'templates/{$name}/',
|
8 |
+
'module' => 'application/modules/{$name}/',
|
9 |
+
'library' => 'application/libraries/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Installer.php
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\IO\IOInterface;
|
5 |
+
use Composer\Installer\LibraryInstaller;
|
6 |
+
use Composer\Package\PackageInterface;
|
7 |
+
use Composer\Repository\InstalledRepositoryInterface;
|
8 |
+
|
9 |
+
class Installer extends LibraryInstaller
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Package types to installer class map
|
13 |
+
*
|
14 |
+
* @var array
|
15 |
+
*/
|
16 |
+
private $supportedTypes = array(
|
17 |
+
'aimeos' => 'AimeosInstaller',
|
18 |
+
'asgard' => 'AsgardInstaller',
|
19 |
+
'attogram' => 'AttogramInstaller',
|
20 |
+
'agl' => 'AglInstaller',
|
21 |
+
'annotatecms' => 'AnnotateCmsInstaller',
|
22 |
+
'bitrix' => 'BitrixInstaller',
|
23 |
+
'bonefish' => 'BonefishInstaller',
|
24 |
+
'cakephp' => 'CakePHPInstaller',
|
25 |
+
'chef' => 'ChefInstaller',
|
26 |
+
'ccframework' => 'ClanCatsFrameworkInstaller',
|
27 |
+
'cockpit' => 'CockpitInstaller',
|
28 |
+
'codeigniter' => 'CodeIgniterInstaller',
|
29 |
+
'concrete5' => 'Concrete5Installer',
|
30 |
+
'craft' => 'CraftInstaller',
|
31 |
+
'croogo' => 'CroogoInstaller',
|
32 |
+
'dokuwiki' => 'DokuWikiInstaller',
|
33 |
+
'dolibarr' => 'DolibarrInstaller',
|
34 |
+
'decibel' => 'DecibelInstaller',
|
35 |
+
'drupal' => 'DrupalInstaller',
|
36 |
+
'elgg' => 'ElggInstaller',
|
37 |
+
'eliasis' => 'EliasisInstaller',
|
38 |
+
'ee3' => 'ExpressionEngineInstaller',
|
39 |
+
'ee2' => 'ExpressionEngineInstaller',
|
40 |
+
'ezplatform' => 'EzPlatformInstaller',
|
41 |
+
'fuel' => 'FuelInstaller',
|
42 |
+
'fuelphp' => 'FuelphpInstaller',
|
43 |
+
'grav' => 'GravInstaller',
|
44 |
+
'hurad' => 'HuradInstaller',
|
45 |
+
'imagecms' => 'ImageCMSInstaller',
|
46 |
+
'itop' => 'ItopInstaller',
|
47 |
+
'joomla' => 'JoomlaInstaller',
|
48 |
+
'kanboard' => 'KanboardInstaller',
|
49 |
+
'kirby' => 'KirbyInstaller',
|
50 |
+
'kodicms' => 'KodiCMSInstaller',
|
51 |
+
'kohana' => 'KohanaInstaller',
|
52 |
+
'lms' => 'LanManagementSystemInstaller',
|
53 |
+
'laravel' => 'LaravelInstaller',
|
54 |
+
'lavalite' => 'LavaLiteInstaller',
|
55 |
+
'lithium' => 'LithiumInstaller',
|
56 |
+
'magento' => 'MagentoInstaller',
|
57 |
+
'majima' => 'MajimaInstaller',
|
58 |
+
'mako' => 'MakoInstaller',
|
59 |
+
'maya' => 'MayaInstaller',
|
60 |
+
'mautic' => 'MauticInstaller',
|
61 |
+
'mediawiki' => 'MediaWikiInstaller',
|
62 |
+
'microweber' => 'MicroweberInstaller',
|
63 |
+
'modulework' => 'MODULEWorkInstaller',
|
64 |
+
'modx' => 'ModxInstaller',
|
65 |
+
'modxevo' => 'MODXEvoInstaller',
|
66 |
+
'moodle' => 'MoodleInstaller',
|
67 |
+
'october' => 'OctoberInstaller',
|
68 |
+
'ontowiki' => 'OntoWikiInstaller',
|
69 |
+
'oxid' => 'OxidInstaller',
|
70 |
+
'osclass' => 'OsclassInstaller',
|
71 |
+
'pxcms' => 'PxcmsInstaller',
|
72 |
+
'phpbb' => 'PhpBBInstaller',
|
73 |
+
'pimcore' => 'PimcoreInstaller',
|
74 |
+
'piwik' => 'PiwikInstaller',
|
75 |
+
'plentymarkets'=> 'PlentymarketsInstaller',
|
76 |
+
'ppi' => 'PPIInstaller',
|
77 |
+
'puppet' => 'PuppetInstaller',
|
78 |
+
'radphp' => 'RadPHPInstaller',
|
79 |
+
'phifty' => 'PhiftyInstaller',
|
80 |
+
'porto' => 'PortoInstaller',
|
81 |
+
'redaxo' => 'RedaxoInstaller',
|
82 |
+
'reindex' => 'ReIndexInstaller',
|
83 |
+
'roundcube' => 'RoundcubeInstaller',
|
84 |
+
'shopware' => 'ShopwareInstaller',
|
85 |
+
'sitedirect' => 'SiteDirectInstaller',
|
86 |
+
'silverstripe' => 'SilverStripeInstaller',
|
87 |
+
'smf' => 'SMFInstaller',
|
88 |
+
'sydes' => 'SyDESInstaller',
|
89 |
+
'symfony1' => 'Symfony1Installer',
|
90 |
+
'thelia' => 'TheliaInstaller',
|
91 |
+
'tusk' => 'TuskInstaller',
|
92 |
+
'typo3-cms' => 'TYPO3CmsInstaller',
|
93 |
+
'typo3-flow' => 'TYPO3FlowInstaller',
|
94 |
+
'userfrosting' => 'UserFrostingInstaller',
|
95 |
+
'vanilla' => 'VanillaInstaller',
|
96 |
+
'whmcs' => 'WHMCSInstaller',
|
97 |
+
'wolfcms' => 'WolfCMSInstaller',
|
98 |
+
'wordpress' => 'WordPressInstaller',
|
99 |
+
'yawik' => 'YawikInstaller',
|
100 |
+
'zend' => 'ZendInstaller',
|
101 |
+
'zikula' => 'ZikulaInstaller',
|
102 |
+
'prestashop' => 'PrestashopInstaller'
|
103 |
+
);
|
104 |
+
|
105 |
+
/**
|
106 |
+
* {@inheritDoc}
|
107 |
+
*/
|
108 |
+
public function getInstallPath(PackageInterface $package)
|
109 |
+
{
|
110 |
+
$type = $package->getType();
|
111 |
+
$frameworkType = $this->findFrameworkType($type);
|
112 |
+
|
113 |
+
if ($frameworkType === false) {
|
114 |
+
throw new \InvalidArgumentException(
|
115 |
+
'Sorry the package type of this package is not yet supported.'
|
116 |
+
);
|
117 |
+
}
|
118 |
+
|
119 |
+
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
120 |
+
$installer = new $class($package, $this->composer, $this->getIO());
|
121 |
+
|
122 |
+
return $installer->getInstallPath($package, $frameworkType);
|
123 |
+
}
|
124 |
+
|
125 |
+
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
|
126 |
+
{
|
127 |
+
parent::uninstall($repo, $package);
|
128 |
+
$installPath = $this->getPackageBasePath($package);
|
129 |
+
$this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* {@inheritDoc}
|
134 |
+
*/
|
135 |
+
public function supports($packageType)
|
136 |
+
{
|
137 |
+
$frameworkType = $this->findFrameworkType($packageType);
|
138 |
+
|
139 |
+
if ($frameworkType === false) {
|
140 |
+
return false;
|
141 |
+
}
|
142 |
+
|
143 |
+
$locationPattern = $this->getLocationPattern($frameworkType);
|
144 |
+
|
145 |
+
return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Finds a supported framework type if it exists and returns it
|
150 |
+
*
|
151 |
+
* @param string $type
|
152 |
+
* @return string
|
153 |
+
*/
|
154 |
+
protected function findFrameworkType($type)
|
155 |
+
{
|
156 |
+
$frameworkType = false;
|
157 |
+
|
158 |
+
krsort($this->supportedTypes);
|
159 |
+
|
160 |
+
foreach ($this->supportedTypes as $key => $val) {
|
161 |
+
if ($key === substr($type, 0, strlen($key))) {
|
162 |
+
$frameworkType = substr($type, 0, strlen($key));
|
163 |
+
break;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
return $frameworkType;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Get the second part of the regular expression to check for support of a
|
172 |
+
* package type
|
173 |
+
*
|
174 |
+
* @param string $frameworkType
|
175 |
+
* @return string
|
176 |
+
*/
|
177 |
+
protected function getLocationPattern($frameworkType)
|
178 |
+
{
|
179 |
+
$pattern = false;
|
180 |
+
if (!empty($this->supportedTypes[$frameworkType])) {
|
181 |
+
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
182 |
+
/** @var BaseInstaller $framework */
|
183 |
+
$framework = new $frameworkClass(null, $this->composer, $this->getIO());
|
184 |
+
$locations = array_keys($framework->getLocations());
|
185 |
+
$pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
|
186 |
+
}
|
187 |
+
|
188 |
+
return $pattern ? : '(\w+)';
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Get I/O object
|
193 |
+
*
|
194 |
+
* @return IOInterface
|
195 |
+
*/
|
196 |
+
private function getIO()
|
197 |
+
{
|
198 |
+
return $this->io;
|
199 |
+
}
|
200 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ItopInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'extensions/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class JoomlaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'component' => 'components/{$name}/',
|
8 |
+
'module' => 'modules/{$name}/',
|
9 |
+
'template' => 'templates/{$name}/',
|
10 |
+
'plugin' => 'plugins/{$name}/',
|
11 |
+
'library' => 'libraries/{$name}/',
|
12 |
+
);
|
13 |
+
|
14 |
+
// TODO: Add inflector for mod_ and com_ names
|
15 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
*
|
6 |
+
* Installer for kanboard plugins
|
7 |
+
*
|
8 |
+
* kanboard.net
|
9 |
+
*
|
10 |
+
* Class KanboardInstaller
|
11 |
+
* @package Composer\Installers
|
12 |
+
*/
|
13 |
+
class KanboardInstaller extends BaseInstaller
|
14 |
+
{
|
15 |
+
protected $locations = array(
|
16 |
+
'plugin' => 'plugins/{$name}/',
|
17 |
+
);
|
18 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class KirbyInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'site/plugins/{$name}/',
|
8 |
+
'field' => 'site/fields/{$name}/',
|
9 |
+
'tag' => 'site/tags/{$name}/'
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class KodiCMSInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'cms/plugins/{$name}/',
|
8 |
+
'media' => 'cms/media/vendor/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class KohanaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class LanManagementSystemInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
'template' => 'templates/{$name}/',
|
11 |
+
'document-template' => 'documents/templates/{$name}/',
|
12 |
+
'userpanel-module' => 'userpanel/modules/{$name}/',
|
13 |
+
);
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Format package name to CamelCase
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
21 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
22 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
23 |
+
|
24 |
+
return $vars;
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class LaravelInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'library' => 'libraries/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class LavaLiteInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'package' => 'packages/{$vendor}/{$name}/',
|
8 |
+
'theme' => 'public/themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class LithiumInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'library' => 'libraries/{$name}/',
|
8 |
+
'source' => 'libraries/_source/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MODULEWorkInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle MODX Evolution specifics when installing packages.
|
6 |
+
*/
|
7 |
+
class MODXEvoInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'snippet' => 'assets/snippets/{$name}/',
|
11 |
+
'plugin' => 'assets/plugins/{$name}/',
|
12 |
+
'module' => 'assets/modules/{$name}/',
|
13 |
+
'template' => 'assets/templates/{$name}/',
|
14 |
+
'lib' => 'assets/lib/{$name}/'
|
15 |
+
);
|
16 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MagentoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'theme' => 'app/design/frontend/{$name}/',
|
8 |
+
'skin' => 'skin/frontend/default/{$name}/',
|
9 |
+
'library' => 'lib/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Plugin/theme installer for majima
|
6 |
+
* @author David Neustadt
|
7 |
+
*/
|
8 |
+
class MajimaInstaller extends BaseInstaller
|
9 |
+
{
|
10 |
+
protected $locations = array(
|
11 |
+
'plugin' => 'plugins/{$name}/',
|
12 |
+
);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Transforms the names
|
16 |
+
* @param array $vars
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
return $this->correctPluginName($vars);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Change hyphenated names to camelcase
|
26 |
+
* @param array $vars
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
private function correctPluginName($vars)
|
30 |
+
{
|
31 |
+
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
32 |
+
return strtoupper($matches[0][1]);
|
33 |
+
}, $vars['name']);
|
34 |
+
$vars['name'] = ucfirst($camelCasedName);
|
35 |
+
return $vars;
|
36 |
+
}
|
37 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MakoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'package' => 'app/packages/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MauticInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name of mautic-plugins to CamelCase
|
13 |
+
*/
|
14 |
+
public function inflectPackageVars($vars)
|
15 |
+
{
|
16 |
+
if ($vars['type'] == 'mautic-plugin') {
|
17 |
+
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
18 |
+
return strtoupper($matches[0][1]);
|
19 |
+
}, ucfirst($vars['name']));
|
20 |
+
}
|
21 |
+
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MayaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name.
|
12 |
+
*
|
13 |
+
* For package type maya-module, cut off a trailing '-module' if present.
|
14 |
+
*
|
15 |
+
*/
|
16 |
+
public function inflectPackageVars($vars)
|
17 |
+
{
|
18 |
+
if ($vars['type'] === 'maya-module') {
|
19 |
+
return $this->inflectModuleVars($vars);
|
20 |
+
}
|
21 |
+
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
|
25 |
+
protected function inflectModuleVars($vars)
|
26 |
+
{
|
27 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
28 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
29 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
30 |
+
|
31 |
+
return $vars;
|
32 |
+
}
|
33 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MediaWikiInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'extensions/{$name}/',
|
8 |
+
'skin' => 'skins/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
|
15 |
+
* to CamelCase keeping existing uppercase chars.
|
16 |
+
*
|
17 |
+
* For package type mediawiki-skin, cut off a trailing '-skin' if present.
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
public function inflectPackageVars($vars)
|
21 |
+
{
|
22 |
+
|
23 |
+
if ($vars['type'] === 'mediawiki-extension') {
|
24 |
+
return $this->inflectExtensionVars($vars);
|
25 |
+
}
|
26 |
+
|
27 |
+
if ($vars['type'] === 'mediawiki-skin') {
|
28 |
+
return $this->inflectSkinVars($vars);
|
29 |
+
}
|
30 |
+
|
31 |
+
return $vars;
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function inflectExtensionVars($vars)
|
35 |
+
{
|
36 |
+
$vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
|
37 |
+
$vars['name'] = str_replace('-', ' ', $vars['name']);
|
38 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
39 |
+
|
40 |
+
return $vars;
|
41 |
+
}
|
42 |
+
|
43 |
+
protected function inflectSkinVars($vars)
|
44 |
+
{
|
45 |
+
$vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MicroweberInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'userfiles/modules/{$name}/',
|
8 |
+
'module-skin' => 'userfiles/modules/{$name}/templates/',
|
9 |
+
'template' => 'userfiles/templates/{$name}/',
|
10 |
+
'element' => 'userfiles/elements/{$name}/',
|
11 |
+
'vendor' => 'vendor/{$name}/',
|
12 |
+
'components' => 'components/{$name}/'
|
13 |
+
);
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Format package name.
|
17 |
+
*
|
18 |
+
* For package type microweber-module, cut off a trailing '-module' if present
|
19 |
+
*
|
20 |
+
* For package type microweber-template, cut off a trailing '-template' if present.
|
21 |
+
*
|
22 |
+
*/
|
23 |
+
public function inflectPackageVars($vars)
|
24 |
+
{
|
25 |
+
if ($vars['type'] === 'microweber-template') {
|
26 |
+
return $this->inflectTemplateVars($vars);
|
27 |
+
}
|
28 |
+
if ($vars['type'] === 'microweber-templates') {
|
29 |
+
return $this->inflectTemplatesVars($vars);
|
30 |
+
}
|
31 |
+
if ($vars['type'] === 'microweber-core') {
|
32 |
+
return $this->inflectCoreVars($vars);
|
33 |
+
}
|
34 |
+
if ($vars['type'] === 'microweber-adapter') {
|
35 |
+
return $this->inflectCoreVars($vars);
|
36 |
+
}
|
37 |
+
if ($vars['type'] === 'microweber-module') {
|
38 |
+
return $this->inflectModuleVars($vars);
|
39 |
+
}
|
40 |
+
if ($vars['type'] === 'microweber-modules') {
|
41 |
+
return $this->inflectModulesVars($vars);
|
42 |
+
}
|
43 |
+
if ($vars['type'] === 'microweber-skin') {
|
44 |
+
return $this->inflectSkinVars($vars);
|
45 |
+
}
|
46 |
+
if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
|
47 |
+
return $this->inflectElementVars($vars);
|
48 |
+
}
|
49 |
+
|
50 |
+
return $vars;
|
51 |
+
}
|
52 |
+
|
53 |
+
protected function inflectTemplateVars($vars)
|
54 |
+
{
|
55 |
+
$vars['name'] = preg_replace('/-template$/', '', $vars['name']);
|
56 |
+
$vars['name'] = preg_replace('/template-$/', '', $vars['name']);
|
57 |
+
|
58 |
+
return $vars;
|
59 |
+
}
|
60 |
+
|
61 |
+
protected function inflectTemplatesVars($vars)
|
62 |
+
{
|
63 |
+
$vars['name'] = preg_replace('/-templates$/', '', $vars['name']);
|
64 |
+
$vars['name'] = preg_replace('/templates-$/', '', $vars['name']);
|
65 |
+
|
66 |
+
return $vars;
|
67 |
+
}
|
68 |
+
|
69 |
+
protected function inflectCoreVars($vars)
|
70 |
+
{
|
71 |
+
$vars['name'] = preg_replace('/-providers$/', '', $vars['name']);
|
72 |
+
$vars['name'] = preg_replace('/-provider$/', '', $vars['name']);
|
73 |
+
$vars['name'] = preg_replace('/-adapter$/', '', $vars['name']);
|
74 |
+
|
75 |
+
return $vars;
|
76 |
+
}
|
77 |
+
|
78 |
+
protected function inflectModuleVars($vars)
|
79 |
+
{
|
80 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
81 |
+
$vars['name'] = preg_replace('/module-$/', '', $vars['name']);
|
82 |
+
|
83 |
+
return $vars;
|
84 |
+
}
|
85 |
+
|
86 |
+
protected function inflectModulesVars($vars)
|
87 |
+
{
|
88 |
+
$vars['name'] = preg_replace('/-modules$/', '', $vars['name']);
|
89 |
+
$vars['name'] = preg_replace('/modules-$/', '', $vars['name']);
|
90 |
+
|
91 |
+
return $vars;
|
92 |
+
}
|
93 |
+
|
94 |
+
protected function inflectSkinVars($vars)
|
95 |
+
{
|
96 |
+
$vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
|
97 |
+
$vars['name'] = preg_replace('/skin-$/', '', $vars['name']);
|
98 |
+
|
99 |
+
return $vars;
|
100 |
+
}
|
101 |
+
|
102 |
+
protected function inflectElementVars($vars)
|
103 |
+
{
|
104 |
+
$vars['name'] = preg_replace('/-elements$/', '', $vars['name']);
|
105 |
+
$vars['name'] = preg_replace('/elements-$/', '', $vars['name']);
|
106 |
+
$vars['name'] = preg_replace('/-element$/', '', $vars['name']);
|
107 |
+
$vars['name'] = preg_replace('/element-$/', '', $vars['name']);
|
108 |
+
|
109 |
+
return $vars;
|
110 |
+
}
|
111 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle MODX specifics when installing packages.
|
6 |
+
*/
|
7 |
+
class ModxInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'extra' => 'core/packages/{$name}/'
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MoodleInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'mod' => 'mod/{$name}/',
|
8 |
+
'admin_report' => 'admin/report/{$name}/',
|
9 |
+
'atto' => 'lib/editor/atto/plugins/{$name}/',
|
10 |
+
'tool' => 'admin/tool/{$name}/',
|
11 |
+
'assignment' => 'mod/assignment/type/{$name}/',
|
12 |
+
'assignsubmission' => 'mod/assign/submission/{$name}/',
|
13 |
+
'assignfeedback' => 'mod/assign/feedback/{$name}/',
|
14 |
+
'auth' => 'auth/{$name}/',
|
15 |
+
'availability' => 'availability/condition/{$name}/',
|
16 |
+
'block' => 'blocks/{$name}/',
|
17 |
+
'booktool' => 'mod/book/tool/{$name}/',
|
18 |
+
'cachestore' => 'cache/stores/{$name}/',
|
19 |
+
'cachelock' => 'cache/locks/{$name}/',
|
20 |
+
'calendartype' => 'calendar/type/{$name}/',
|
21 |
+
'format' => 'course/format/{$name}/',
|
22 |
+
'coursereport' => 'course/report/{$name}/',
|
23 |
+
'datafield' => 'mod/data/field/{$name}/',
|
24 |
+
'datapreset' => 'mod/data/preset/{$name}/',
|
25 |
+
'editor' => 'lib/editor/{$name}/',
|
26 |
+
'enrol' => 'enrol/{$name}/',
|
27 |
+
'filter' => 'filter/{$name}/',
|
28 |
+
'gradeexport' => 'grade/export/{$name}/',
|
29 |
+
'gradeimport' => 'grade/import/{$name}/',
|
30 |
+
'gradereport' => 'grade/report/{$name}/',
|
31 |
+
'gradingform' => 'grade/grading/form/{$name}/',
|
32 |
+
'local' => 'local/{$name}/',
|
33 |
+
'logstore' => 'admin/tool/log/store/{$name}/',
|
34 |
+
'ltisource' => 'mod/lti/source/{$name}/',
|
35 |
+
'ltiservice' => 'mod/lti/service/{$name}/',
|
36 |
+
'message' => 'message/output/{$name}/',
|
37 |
+
'mnetservice' => 'mnet/service/{$name}/',
|
38 |
+
'plagiarism' => 'plagiarism/{$name}/',
|
39 |
+
'portfolio' => 'portfolio/{$name}/',
|
40 |
+
'qbehaviour' => 'question/behaviour/{$name}/',
|
41 |
+
'qformat' => 'question/format/{$name}/',
|
42 |
+
'qtype' => 'question/type/{$name}/',
|
43 |
+
'quizaccess' => 'mod/quiz/accessrule/{$name}/',
|
44 |
+
'quiz' => 'mod/quiz/report/{$name}/',
|
45 |
+
'report' => 'report/{$name}/',
|
46 |
+
'repository' => 'repository/{$name}/',
|
47 |
+
'scormreport' => 'mod/scorm/report/{$name}/',
|
48 |
+
'search' => 'search/engine/{$name}/',
|
49 |
+
'theme' => 'theme/{$name}/',
|
50 |
+
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
|
51 |
+
'profilefield' => 'user/profile/field/{$name}/',
|
52 |
+
'webservice' => 'webservice/{$name}/',
|
53 |
+
'workshopallocation' => 'mod/workshop/allocation/{$name}/',
|
54 |
+
'workshopeval' => 'mod/workshop/eval/{$name}/',
|
55 |
+
'workshopform' => 'mod/workshop/form/{$name}/'
|
56 |
+
);
|
57 |
+
}
|
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class OctoberInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
'plugin' => 'plugins/{$vendor}/{$name}/',
|
9 |
+
'theme' => 'themes/{$name}/'
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name.
|
14 |
+
*
|
15 |
+
* For package type october-plugin, cut off a trailing '-plugin' if present.
|
16 |
+
*
|
17 |
+
* For package type october-theme, cut off a trailing '-theme' if present.
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
public function inflectPackageVars($vars)
|
21 |
+
{
|
22 |
+
if ($vars['type'] === 'october-plugin') {
|
23 |
+
return $this->inflectPluginVars($vars);
|
24 |
+
}
|
25 |
+
|
26 |
+
if ($vars['type'] === 'october-theme') {
|
27 |
+
return $this->inflectThemeVars($vars);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
|
33 |
+
protected function inflectPluginVars($vars)
|
34 |
+
{
|
35 |
+
$vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
|
36 |
+
|
37 |
+
return $vars;
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function inflectThemeVars($vars)
|
41 |
+
{
|
42 |
+
$vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
|
43 |
+
|
44 |
+
return $vars;
|
45 |
+
}
|
46 |
+
}
|
vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class OntoWikiInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'extensions/{$name}/',
|
8 |
+
'theme' => 'extensions/themes/{$name}/',
|
9 |
+
'translation' => 'extensions/translations/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name to lower case and remove ".ontowiki" suffix
|
14 |
+
*/
|
15 |
+
public function inflectPackageVars($vars)
|
16 |
+
{
|
17 |
+
$vars['name'] = strtolower($vars['name']);
|
18 |
+
$vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
|
19 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
20 |
+
$vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
|
21 |
+
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
}
|
vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
|
5 |
+
class OsclassInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'oc-content/plugins/{$name}/',
|
10 |
+
'theme' => 'oc-content/themes/{$name}/',
|
11 |
+
'language' => 'oc-content/languages/{$name}/',
|
12 |
+
);
|
13 |
+
|
14 |
+
}
|
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\Package\PackageInterface;
|
5 |
+
|
6 |
+
class OxidInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
|
9 |
+
|
10 |
+
protected $locations = array(
|
11 |
+
'module' => 'modules/{$name}/',
|
12 |
+
'theme' => 'application/views/{$name}/',
|
13 |
+
'out' => 'out/{$name}/',
|
14 |
+
);
|
15 |
+
|
16 |
+
/**
|
17 |
+
* getInstallPath
|
18 |
+
*
|
19 |
+
* @param PackageInterface $package
|
20 |
+
* @param string $frameworkType
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
24 |
+
{
|
25 |
+
$installPath = parent::getInstallPath($package, $frameworkType);
|
26 |
+
$type = $this->package->getType();
|
27 |
+
if ($type === 'oxid-module') {
|
28 |
+
$this->prepareVendorDirectory($installPath);
|
29 |
+
}
|
30 |
+
return $installPath;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* prepareVendorDirectory
|
35 |
+
*
|
36 |
+
* Makes sure there is a vendormetadata.php file inside
|
37 |
+
* the vendor folder if there is a vendor folder.
|
38 |
+
*
|
39 |
+
* @param string $installPath
|
40 |
+
* @return void
|
41 |
+
*/
|
42 |
+
protected function prepareVendorDirectory($installPath)
|
43 |
+
{
|
44 |
+
$matches = '';
|
45 |
+
$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
|
46 |
+
if (!$hasVendorDirectory) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
$vendorDirectory = $matches['vendor'];
|
51 |
+
$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
|
52 |
+
if (!file_exists($vendorPath)) {
|
53 |
+
mkdir($vendorPath, 0755, true);
|
54 |
+
}
|
55 |
+
|
56 |
+
$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
|
57 |
+
touch($vendorMetaDataPath);
|
58 |
+
}
|
59 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PPIInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PhiftyInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'bundles/{$name}/',
|
8 |
+
'library' => 'libraries/{$name}/',
|
9 |
+
'framework' => 'frameworks/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PhpBBInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'ext/{$vendor}/{$name}/',
|
8 |
+
'language' => 'language/{$name}/',
|
9 |
+
'style' => 'styles/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PimcoreInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name to CamelCase
|
12 |
+
*/
|
13 |
+
public function inflectPackageVars($vars)
|
14 |
+
{
|
15 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
16 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
17 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
18 |
+
|
19 |
+
return $vars;
|
20 |
+
}
|
21 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class PiwikInstaller
|
6 |
+
*
|
7 |
+
* @package Composer\Installers
|
8 |
+
*/
|
9 |
+
class PiwikInstaller extends BaseInstaller
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var array
|
13 |
+
*/
|
14 |
+
protected $locations = array(
|
15 |
+
'plugin' => 'plugins/{$name}/',
|
16 |
+
);
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Format package name to CamelCase
|
20 |
+
* @param array $vars
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
27 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
28 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PlentymarketsInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => '{$name}/'
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Remove hyphen, "plugin" and format to camelcase
|
12 |
+
* @param array $vars
|
13 |
+
*
|
14 |
+
* @return array
|
15 |
+
*/
|
16 |
+
public function inflectPackageVars($vars)
|
17 |
+
{
|
18 |
+
$vars['name'] = explode("-", $vars['name']);
|
19 |
+
foreach ($vars['name'] as $key => $name) {
|
20 |
+
$vars['name'][$key] = ucfirst($vars['name'][$key]);
|
21 |
+
if (strcasecmp($name, "Plugin") == 0) {
|
22 |
+
unset($vars['name'][$key]);
|
23 |
+
}
|
24 |
+
}
|
25 |
+
$vars['name'] = implode("",$vars['name']);
|
26 |
+
|
27 |
+
return $vars;
|
28 |
+
}
|
29 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Plugin.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
use Composer\Composer;
|
6 |
+
use Composer\IO\IOInterface;
|
7 |
+
use Composer\Plugin\PluginInterface;
|
8 |
+
|
9 |
+
class Plugin implements PluginInterface
|
10 |
+
{
|
11 |
+
|
12 |
+
public function activate(Composer $composer, IOInterface $io)
|
13 |
+
{
|
14 |
+
$installer = new Installer($io, $composer);
|
15 |
+
$composer->getInstallationManager()->addInstaller($installer);
|
16 |
+
}
|
17 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PortoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'container' => 'app/Containers/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PrestashopInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class PuppetInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $locations = array(
|
9 |
+
'module' => 'modules/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PxcmsInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'app/Modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* @param array $vars
|
15 |
+
*
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
if ($vars['type'] === 'pxcms-module') {
|
21 |
+
return $this->inflectModuleVars($vars);
|
22 |
+
}
|
23 |
+
|
24 |
+
if ($vars['type'] === 'pxcms-theme') {
|
25 |
+
return $this->inflectThemeVars($vars);
|
26 |
+
}
|
27 |
+
|
28 |
+
return $vars;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
33 |
+
*
|
34 |
+
* return string
|
35 |
+
*/
|
36 |
+
protected function inflectModuleVars($vars)
|
37 |
+
{
|
38 |
+
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
39 |
+
$vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
|
40 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
|
41 |
+
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
42 |
+
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
43 |
+
|
44 |
+
return $vars;
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
/**
|
49 |
+
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
50 |
+
*
|
51 |
+
* return string
|
52 |
+
*/
|
53 |
+
protected function inflectThemeVars($vars)
|
54 |
+
{
|
55 |
+
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
56 |
+
$vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
|
57 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
|
58 |
+
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
59 |
+
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
60 |
+
|
61 |
+
return $vars;
|
62 |
+
}
|
63 |
+
}
|
vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class RadPHPInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'src/{$name}/'
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name to CamelCase
|
12 |
+
*/
|
13 |
+
public function inflectPackageVars($vars)
|
14 |
+
{
|
15 |
+
$nameParts = explode('/', $vars['name']);
|
16 |
+
foreach ($nameParts as &$value) {
|
17 |
+
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
18 |
+
$value = str_replace(array('-', '_'), ' ', $value);
|
19 |
+
$value = str_replace(' ', '', ucwords($value));
|
20 |
+
}
|
21 |
+
$vars['name'] = implode('/', $nameParts);
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ReIndexInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'theme' => 'themes/{$name}/',
|
8 |
+
'plugin' => 'plugins/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class RedaxoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'addon' => 'redaxo/include/addons/{$name}/',
|
8 |
+
'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class RoundcubeInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Lowercase name and changes the name to a underscores
|
12 |
+
*
|
13 |
+
* @param array $vars
|
14 |
+
* @return array
|
15 |
+
*/
|
16 |
+
public function inflectPackageVars($vars)
|
17 |
+
{
|
18 |
+
$vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
|
19 |
+
|
20 |
+
return $vars;
|
21 |
+
}
|
22 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class SMFInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'Sources/{$name}/',
|
8 |
+
'theme' => 'Themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Plugin/theme installer for shopware
|
6 |
+
* @author Benjamin Boit
|
7 |
+
*/
|
8 |
+
class ShopwareInstaller extends BaseInstaller
|
9 |
+
{
|
10 |
+
protected $locations = array(
|
11 |
+
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
|
12 |
+
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
|
13 |
+
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
|
14 |
+
'theme' => 'templates/{$name}/',
|
15 |
+
'plugin' => 'custom/plugins/{$name}/',
|
16 |
+
'frontend-theme' => 'themes/Frontend/{$name}/',
|
17 |
+
);
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Transforms the names
|
21 |
+
* @param array $vars
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
if ($vars['type'] === 'shopware-theme') {
|
27 |
+
return $this->correctThemeName($vars);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $this->correctPluginName($vars);
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Changes the name to a camelcased combination of vendor and name
|
35 |
+
* @param array $vars
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
private function correctPluginName($vars)
|
39 |
+
{
|
40 |
+
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
41 |
+
return strtoupper($matches[0][1]);
|
42 |
+
}, $vars['name']);
|
43 |
+
|
44 |
+
$vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
|
45 |
+
|
46 |
+
return $vars;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Changes the name to a underscore separated name
|
51 |
+
* @param array $vars
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
private function correctThemeName($vars)
|
55 |
+
{
|
56 |
+
$vars['name'] = str_replace('-', '_', $vars['name']);
|
57 |
+
|
58 |
+
return $vars;
|
59 |
+
}
|
60 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\Package\PackageInterface;
|
5 |
+
|
6 |
+
class SilverStripeInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
protected $locations = array(
|
9 |
+
'module' => '{$name}/',
|
10 |
+
'theme' => 'themes/{$name}/',
|
11 |
+
);
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Return the install path based on package type.
|
15 |
+
*
|
16 |
+
* Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
|
17 |
+
* must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
|
18 |
+
*
|
19 |
+
* @param PackageInterface $package
|
20 |
+
* @param string $frameworkType
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
24 |
+
{
|
25 |
+
if (
|
26 |
+
$package->getName() == 'silverstripe/framework'
|
27 |
+
&& preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
|
28 |
+
&& version_compare($package->getVersion(), '2.999.999') < 0
|
29 |
+
) {
|
30 |
+
return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
|
31 |
+
}
|
32 |
+
|
33 |
+
return parent::getInstallPath($package, $frameworkType);
|
34 |
+
}
|
35 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class SiteDirectInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'module' => 'modules/{$vendor}/{$name}/',
|
9 |
+
'plugin' => 'plugins/{$vendor}/{$name}/'
|
10 |
+
);
|
11 |
+
|
12 |
+
public function inflectPackageVars($vars)
|
13 |
+
{
|
14 |
+
return $this->parseVars($vars);
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function parseVars($vars)
|
18 |
+
{
|
19 |
+
$vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
|
20 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
21 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
22 |
+
|
23 |
+
return $vars;
|
24 |
+
}
|
25 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class SyDESInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'app/modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format module name.
|
13 |
+
*
|
14 |
+
* Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
|
15 |
+
*
|
16 |
+
* @param array @vars
|
17 |
+
*
|
18 |
+
* @return array
|
19 |
+
*/
|
20 |
+
public function inflectPackageVars($vars)
|
21 |
+
{
|
22 |
+
if ($vars['type'] == 'sydes-module') {
|
23 |
+
return $this->inflectModuleVars($vars);
|
24 |
+
}
|
25 |
+
|
26 |
+
if ($vars['type'] === 'sydes-theme') {
|
27 |
+
return $this->inflectThemeVars($vars);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function inflectModuleVars($vars)
|
34 |
+
{
|
35 |
+
$vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
|
36 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
37 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
38 |
+
|
39 |
+
return $vars;
|
40 |
+
}
|
41 |
+
|
42 |
+
protected function inflectThemeVars($vars)
|
43 |
+
{
|
44 |
+
$vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
|
45 |
+
$vars['name'] = strtolower($vars['name']);
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Plugin installer for symfony 1.x
|
6 |
+
*
|
7 |
+
* @author Jérôme Tamarelle <jerome@tamarelle.net>
|
8 |
+
*/
|
9 |
+
class Symfony1Installer extends BaseInstaller
|
10 |
+
{
|
11 |
+
protected $locations = array(
|
12 |
+
'plugin' => 'plugins/{$name}/',
|
13 |
+
);
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Format package name to CamelCase
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
21 |
+
return strtoupper($matches[0][1]);
|
22 |
+
}, $vars['name']);
|
23 |
+
|
24 |
+
return $vars;
|
25 |
+
}
|
26 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Extension installer for TYPO3 CMS
|
6 |
+
*
|
7 |
+
* @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
|
8 |
+
*
|
9 |
+
* @author Sascha Egerer <sascha.egerer@dkd.de>
|
10 |
+
*/
|
11 |
+
class TYPO3CmsInstaller extends BaseInstaller
|
12 |
+
{
|
13 |
+
protected $locations = array(
|
14 |
+
'extension' => 'typo3conf/ext/{$name}/',
|
15 |
+
);
|
16 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle TYPO3 Flow specifics when installing packages.
|
6 |
+
*/
|
7 |
+
class TYPO3FlowInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'package' => 'Packages/Application/{$name}/',
|
11 |
+
'framework' => 'Packages/Framework/{$name}/',
|
12 |
+
'plugin' => 'Packages/Plugins/{$name}/',
|
13 |
+
'site' => 'Packages/Sites/{$name}/',
|
14 |
+
'boilerplate' => 'Packages/Boilerplates/{$name}/',
|
15 |
+
'build' => 'Build/{$name}/',
|
16 |
+
);
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Modify the package name to be a TYPO3 Flow style key.
|
20 |
+
*
|
21 |
+
* @param array $vars
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
$autoload = $this->package->getAutoload();
|
27 |
+
if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
|
28 |
+
$namespace = key($autoload['psr-0']);
|
29 |
+
$vars['name'] = str_replace('\\', '.', $namespace);
|
30 |
+
}
|
31 |
+
if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
|
32 |
+
$namespace = key($autoload['psr-4']);
|
33 |
+
$vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
|
34 |
+
}
|
35 |
+
|
36 |
+
return $vars;
|
37 |
+
}
|
38 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class TheliaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'local/modules/{$name}/',
|
8 |
+
'frontoffice-template' => 'templates/frontOffice/{$name}/',
|
9 |
+
'backoffice-template' => 'templates/backOffice/{$name}/',
|
10 |
+
'email-template' => 'templates/email/{$name}/',
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
/**
|
4 |
+
* Composer installer for 3rd party Tusk utilities
|
5 |
+
* @author Drew Ewing <drew@phenocode.com>
|
6 |
+
*/
|
7 |
+
class TuskInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'task' => '.tusk/tasks/{$name}/',
|
11 |
+
'command' => '.tusk/commands/{$name}/',
|
12 |
+
'asset' => 'assets/tusk/{$name}/',
|
13 |
+
);
|
14 |
+
}
|
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class UserFrostingInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'sprinkle' => 'app/sprinkles/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class VanillaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class VgmcpInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'src/{$vendor}/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/'
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
|
15 |
+
*
|
16 |
+
* For package type vgmcp-theme, cut off a trailing '-theme' if present.
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
if ($vars['type'] === 'vgmcp-bundle') {
|
22 |
+
return $this->inflectPluginVars($vars);
|
23 |
+
}
|
24 |
+
|
25 |
+
if ($vars['type'] === 'vgmcp-theme') {
|
26 |
+
return $this->inflectThemeVars($vars);
|
27 |
+
}
|
28 |
+
|
29 |
+
return $vars;
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function inflectPluginVars($vars)
|
33 |
+
{
|
34 |
+
$vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
|
35 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
36 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
37 |
+
|
38 |
+
return $vars;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function inflectThemeVars($vars)
|
42 |
+
{
|
43 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
44 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
45 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
}
|
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class WHMCSInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'gateway' => 'modules/gateways/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class WolfCMSInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'wolf/plugins/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class WordPressInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'wp-content/plugins/{$name}/',
|
8 |
+
'theme' => 'wp-content/themes/{$name}/',
|
9 |
+
'muplugin' => 'wp-content/mu-plugins/{$name}/',
|
10 |
+
'dropin' => 'wp-content/{$name}/',
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: cbleek
|
5 |
+
* Date: 25.03.16
|
6 |
+
* Time: 20:55
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace Composer\Installers;
|
10 |
+
|
11 |
+
|
12 |
+
class YawikInstaller extends BaseInstaller
|
13 |
+
{
|
14 |
+
protected $locations = array(
|
15 |
+
'module' => 'module/{$name}/',
|
16 |
+
);
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Format package name to CamelCase
|
20 |
+
* @param array $vars
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
27 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
28 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ZendInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'library' => 'library/{$name}/',
|
8 |
+
'extra' => 'extras/library/{$name}/',
|
9 |
+
'module' => 'module/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ZikulaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$vendor}-{$name}/',
|
8 |
+
'theme' => 'themes/{$vendor}-{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/bootstrap.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function includeIfExists($file)
|
3 |
+
{
|
4 |
+
if (file_exists($file)) {
|
5 |
+
return include $file;
|
6 |
+
}
|
7 |
+
}
|
8 |
+
if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
|
9 |
+
die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
|
10 |
+
'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
|
11 |
+
'php composer.phar install'.PHP_EOL);
|
12 |
+
}
|
13 |
+
return $loader;
|
vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\AsgardInstaller;
|
5 |
+
use Composer\Package\Package;
|
6 |
+
use Composer\Composer;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
class AsgardInstallerTest extends TestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var AsgardInstaller
|
13 |
+
*/
|
14 |
+
private $installer;
|
15 |
+
|
16 |
+
public function setUp()
|
17 |
+
{
|
18 |
+
$this->installer = new AsgardInstaller(
|
19 |
+
new Package('NyanCat', '4.2', '4.2'),
|
20 |
+
new Composer()
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @dataProvider packageNameInflectionProvider
|
26 |
+
*/
|
27 |
+
public function testInflectPackageVars($type, $name, $expected)
|
28 |
+
{
|
29 |
+
$this->assertEquals(
|
30 |
+
array('name' => $expected, 'type' => $type),
|
31 |
+
$this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
public function packageNameInflectionProvider()
|
36 |
+
{
|
37 |
+
return array(
|
38 |
+
// Should keep module name StudlyCase
|
39 |
+
array(
|
40 |
+
'asgard-module',
|
41 |
+
'user-profile',
|
42 |
+
'UserProfile'
|
43 |
+
),
|
44 |
+
array(
|
45 |
+
'asgard-module',
|
46 |
+
'asgard-module',
|
47 |
+
'Asgard'
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
'asgard-module',
|
51 |
+
'blog',
|
52 |
+
'Blog'
|
53 |
+
),
|
54 |
+
// tests that exactly one '-module' is cut off
|
55 |
+
array(
|
56 |
+
'asgard-module',
|
57 |
+
'some-module-module',
|
58 |
+
'SomeModule',
|
59 |
+
),
|
60 |
+
// tests that exactly one '-theme' is cut off
|
61 |
+
array(
|
62 |
+
'asgard-theme',
|
63 |
+
'some-theme-theme',
|
64 |
+
'SomeTheme',
|
65 |
+
),
|
66 |
+
// tests that names without '-theme' suffix stay valid
|
67 |
+
array(
|
68 |
+
'asgard-theme',
|
69 |
+
'someothertheme',
|
70 |
+
'Someothertheme',
|
71 |
+
),
|
72 |
+
// Should keep theme name StudlyCase
|
73 |
+
array(
|
74 |
+
'asgard-theme',
|
75 |
+
'adminlte-advanced',
|
76 |
+
'AdminlteAdvanced'
|
77 |
+
),
|
78 |
+
);
|
79 |
+
}
|
80 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers\Test;
|
4 |
+
|
5 |
+
use Composer\Installers\BitrixInstaller;
|
6 |
+
use Composer\Package\Package;
|
7 |
+
use Composer\Composer;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Tests for the BitrixInstaller Class
|
11 |
+
*
|
12 |
+
* @coversDefaultClass Composer\Installers\BitrixInstaller
|
13 |
+
*/
|
14 |
+
class BitrixInstallerTest extends TestCase
|
15 |
+
{
|
16 |
+
/** @var BitrixInstaller */
|
17 |
+
private $installer;
|
18 |
+
|
19 |
+
/** @var Composer */
|
20 |
+
private $composer;
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Sets up the fixture, for example, instantiate the class-under-test.
|
25 |
+
*
|
26 |
+
* This method is called before a test is executed.
|
27 |
+
*/
|
28 |
+
final function setUp()
|
29 |
+
{
|
30 |
+
$this->composer = new Composer();
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @param string $vars
|
35 |
+
* @param string $expectedVars
|
36 |
+
*
|
37 |
+
* @covers ::inflectPackageVars
|
38 |
+
*
|
39 |
+
* @dataProvider provideExpectedInflectionResults
|
40 |
+
*/
|
41 |
+
final public function testInflectPackageVars($vars, $expectedVars)
|
42 |
+
{
|
43 |
+
|
44 |
+
$this->installer = new BitrixInstaller(
|
45 |
+
new Package($vars['name'], '4.2', '4.2'),
|
46 |
+
$this->composer
|
47 |
+
);
|
48 |
+
$actual = $this->installer->inflectPackageVars($vars);
|
49 |
+
$this->assertEquals($actual, $expectedVars);
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Provides various parameters for packages and the expected result after inflection
|
54 |
+
*
|
55 |
+
* @return array
|
56 |
+
*/
|
57 |
+
final public function provideExpectedInflectionResults()
|
58 |
+
{
|
59 |
+
return array(
|
60 |
+
//check bitrix-dir is correct
|
61 |
+
array(
|
62 |
+
array('name' => 'Nyan/Cat'),
|
63 |
+
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix')
|
64 |
+
),
|
65 |
+
array(
|
66 |
+
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix'),
|
67 |
+
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix')
|
68 |
+
),
|
69 |
+
array(
|
70 |
+
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'local'),
|
71 |
+
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'local')
|
72 |
+
),
|
73 |
+
);
|
74 |
+
}
|
75 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\CakePHPInstaller;
|
5 |
+
use Composer\Repository\RepositoryManager;
|
6 |
+
use Composer\Repository\InstalledArrayRepository;
|
7 |
+
use Composer\Package\Package;
|
8 |
+
use Composer\Package\RootPackage;
|
9 |
+
use Composer\Package\Version\VersionParser;
|
10 |
+
use Composer\Composer;
|
11 |
+
use Composer\Config;
|
12 |
+
|
13 |
+
class CakePHPInstallerTest extends TestCase
|
14 |
+
{
|
15 |
+
private $composer;
|
16 |
+
private $io;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* setUp
|
20 |
+
*
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
public function setUp()
|
24 |
+
{
|
25 |
+
$this->package = new Package('CamelCased', '1.0', '1.0');
|
26 |
+
$this->io = $this->getMock('Composer\IO\PackageInterface');
|
27 |
+
$this->composer = new Composer();
|
28 |
+
$this->composer->setConfig(new Config(false));
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* testInflectPackageVars
|
33 |
+
*
|
34 |
+
* @return void
|
35 |
+
*/
|
36 |
+
public function testInflectPackageVars()
|
37 |
+
{
|
38 |
+
$installer = new CakePHPInstaller($this->package, $this->composer);
|
39 |
+
$result = $installer->inflectPackageVars(array('name' => 'CamelCased'));
|
40 |
+
$this->assertEquals($result, array('name' => 'CamelCased'));
|
41 |
+
|
42 |
+
$installer = new CakePHPInstaller($this->package, $this->composer);
|
43 |
+
$result = $installer->inflectPackageVars(array('name' => 'with-dash'));
|
44 |
+
$this->assertEquals($result, array('name' => 'WithDash'));
|
45 |
+
|
46 |
+
$installer = new CakePHPInstaller($this->package, $this->composer);
|
47 |
+
$result = $installer->inflectPackageVars(array('name' => 'with_underscore'));
|
48 |
+
$this->assertEquals($result, array('name' => 'WithUnderscore'));
|
49 |
+
|
50 |
+
$installer = new CakePHPInstaller($this->package, $this->composer);
|
51 |
+
$result = $installer->inflectPackageVars(array('name' => 'cake/acl'));
|
52 |
+
$this->assertEquals($result, array('name' => 'Cake/Acl'));
|
53 |
+
|
54 |
+
$installer = new CakePHPInstaller($this->package, $this->composer);
|
55 |
+
$result = $installer->inflectPackageVars(array('name' => 'cake/debug-kit'));
|
56 |
+
$this->assertEquals($result, array('name' => 'Cake/DebugKit'));
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Test getLocations returning appropriate values based on CakePHP version
|
61 |
+
*
|
62 |
+
*/
|
63 |
+
public function testGetLocations() {
|
64 |
+
$package = new RootPackage('CamelCased', '1.0', '1.0');
|
65 |
+
$composer = $this->composer;
|
66 |
+
$rm = new RepositoryManager(
|
67 |
+
$this->getMock('Composer\IO\IOInterface'),
|
68 |
+
$this->getMock('Composer\Config')
|
69 |
+
);
|
70 |
+
$composer->setRepositoryManager($rm);
|
71 |
+
$installer = new CakePHPInstaller($package, $composer);
|
72 |
+
|
73 |
+
// 2.0 < cakephp < 3.0
|
74 |
+
$this->setCakephpVersion($rm, '2.0.0');
|
75 |
+
$result = $installer->getLocations();
|
76 |
+
$this->assertContains('Plugin/', $result['plugin']);
|
77 |
+
|
78 |
+
$this->setCakephpVersion($rm, '2.5.9');
|
79 |
+
$result = $installer->getLocations();
|
80 |
+
$this->assertContains('Plugin/', $result['plugin']);
|
81 |
+
|
82 |
+
$this->setCakephpVersion($rm, '~2.5');
|
83 |
+
$result = $installer->getLocations();
|
84 |
+
$this->assertContains('Plugin/', $result['plugin']);
|
85 |
+
|
86 |
+
// special handling for 2.x versions when 3.x is still in development
|
87 |
+
$this->setCakephpVersion($rm, 'dev-master');
|
88 |
+
$result = $installer->getLocations();
|
89 |
+
$this->assertContains('Plugin/', $result['plugin']);
|
90 |
+
|
91 |
+
$this->setCakephpVersion($rm, '>=2.5');
|
92 |
+
$result = $installer->getLocations();
|
93 |
+
$this->assertContains('Plugin/', $result['plugin']);
|
94 |
+
|
95 |
+
// cakephp >= 3.0
|
96 |
+
$this->setCakephpVersion($rm, '3.0.*-dev');
|
97 |
+
$result = $installer->getLocations();
|
98 |
+
$this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']);
|
99 |
+
|
100 |
+
$this->setCakephpVersion($rm, '~8.8');
|
101 |
+
$result = $installer->getLocations();
|
102 |
+
$this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']);
|
103 |
+
}
|
104 |
+
|
105 |
+
protected function setCakephpVersion($rm, $version) {
|
106 |
+
$parser = new VersionParser();
|
107 |
+
list(, $version) = explode(' ', $parser->parseConstraints($version));
|
108 |
+
$installed = new InstalledArrayRepository();
|
109 |
+
$package = new Package('cakephp/cakephp', $version, $version);
|
110 |
+
$installed->addPackage($package);
|
111 |
+
$rm->setLocalRepository($installed);
|
112 |
+
}
|
113 |
+
|
114 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers\Test;
|
4 |
+
|
5 |
+
use Composer\Installers\CraftInstaller;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Tests for the CraftInstaller Class
|
9 |
+
*
|
10 |
+
* @coversDefaultClass Composer\Installers\CraftInstaller
|
11 |
+
*/
|
12 |
+
class CraftInstallerTest extends TestCase
|
13 |
+
{
|
14 |
+
/** @var CraftInstaller */
|
15 |
+
private $installer;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Sets up the fixture, for example, instantiate the class-under-test.
|
19 |
+
*
|
20 |
+
* This method is called before a test is executed.
|
21 |
+
*/
|
22 |
+
final public function setup()
|
23 |
+
{
|
24 |
+
$this->installer = new CraftInstaller();
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @param string $packageName
|
29 |
+
* @param string $expectedName
|
30 |
+
*
|
31 |
+
* @covers ::inflectPackageVars
|
32 |
+
*
|
33 |
+
* @dataProvider provideExpectedInflectionResults
|
34 |
+
*/
|
35 |
+
final public function testInflectPackageVars($packageName, $expectedName)
|
36 |
+
{
|
37 |
+
$installer = $this->installer;
|
38 |
+
|
39 |
+
$vars = array('name' => $packageName);
|
40 |
+
$expected = array('name' => $expectedName);
|
41 |
+
|
42 |
+
$actual = $installer->inflectPackageVars($vars);
|
43 |
+
|
44 |
+
$this->assertEquals($actual, $expected);
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Provides various names for packages and the expected result after inflection
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
final public function provideExpectedInflectionResults()
|
53 |
+
{
|
54 |
+
return array(
|
55 |
+
// lowercase
|
56 |
+
array('foo', 'foo'),
|
57 |
+
array('craftfoo', 'craftfoo'),
|
58 |
+
array('fooplugin', 'fooplugin'),
|
59 |
+
array('craftfooplugin', 'craftfooplugin'),
|
60 |
+
// lowercase - dash
|
61 |
+
array('craft-foo', 'foo'),
|
62 |
+
array('foo-plugin', 'foo'),
|
63 |
+
array('craft-foo-plugin', 'foo'),
|
64 |
+
// lowercase - underscore
|
65 |
+
array('craft_foo', 'craft_foo'),
|
66 |
+
array('foo_plugin', 'foo_plugin'),
|
67 |
+
array('craft_foo_plugin', 'craft_foo_plugin'),
|
68 |
+
// CamelCase
|
69 |
+
array('Foo', 'Foo'),
|
70 |
+
array('CraftFoo', 'CraftFoo'),
|
71 |
+
array('FooPlugin', 'FooPlugin'),
|
72 |
+
array('CraftFooPlugin', 'CraftFooPlugin'),
|
73 |
+
// CamelCase - Dash
|
74 |
+
array('Craft-Foo', 'Foo'),
|
75 |
+
array('Foo-Plugin', 'Foo'),
|
76 |
+
array('Craft-Foo-Plugin', 'Foo'),
|
77 |
+
// CamelCase - underscore
|
78 |
+
array('Craft_Foo', 'Craft_Foo'),
|
79 |
+
array('Foo_Plugin', 'Foo_Plugin'),
|
80 |
+
array('Craft_Foo_Plugin', 'Craft_Foo_Plugin'),
|
81 |
+
);
|
82 |
+
}
|
83 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\DokuWikiInstaller;
|
5 |
+
use Composer\Package\Package;
|
6 |
+
use Composer\Composer;
|
7 |
+
use PHPUnit\Framework\TestCase as BaseTestCase;
|
8 |
+
|
9 |
+
class DokuWikiInstallerTest extends BaseTestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var DokuWikiInstaller
|
13 |
+
*/
|
14 |
+
private $installer;
|
15 |
+
|
16 |
+
public function setUp()
|
17 |
+
{
|
18 |
+
$this->installer = new DokuWikiInstaller(
|
19 |
+
new Package('NyanCat', '4.2', '4.2'),
|
20 |
+
new Composer()
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @dataProvider packageNameInflectionProvider
|
26 |
+
*/
|
27 |
+
public function testInflectPackageVars($type, $name, $expected)
|
28 |
+
{
|
29 |
+
$this->assertEquals(
|
30 |
+
$this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),
|
31 |
+
array('name' => $expected, 'type'=>$type)
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
public function packageNameInflectionProvider()
|
36 |
+
{
|
37 |
+
return array(
|
38 |
+
array(
|
39 |
+
'dokuwiki-plugin',
|
40 |
+
'dokuwiki-test-plugin',
|
41 |
+
'test',
|
42 |
+
),
|
43 |
+
array(
|
44 |
+
'dokuwiki-plugin',
|
45 |
+
'test-plugin',
|
46 |
+
'test',
|
47 |
+
),
|
48 |
+
array(
|
49 |
+
'dokuwiki-plugin',
|
50 |
+
'dokuwiki_test',
|
51 |
+
'test',
|
52 |
+
),
|
53 |
+
array(
|
54 |
+
'dokuwiki-plugin',
|
55 |
+
'test',
|
56 |
+
'test',
|
57 |
+
),
|
58 |
+
array(
|
59 |
+
'dokuwiki-plugin',
|
60 |
+
'test-template',
|
61 |
+
'test-template',
|
62 |
+
),
|
63 |
+
array(
|
64 |
+
'dokuwiki-template',
|
65 |
+
'dokuwiki-test-template',
|
66 |
+
'test',
|
67 |
+
),
|
68 |
+
array(
|
69 |
+
'dokuwiki-template',
|
70 |
+
'test-template',
|
71 |
+
'test',
|
72 |
+
),
|
73 |
+
array(
|
74 |
+
'dokuwiki-template',
|
75 |
+
'dokuwiki_test',
|
76 |
+
'test',
|
77 |
+
),
|
78 |
+
array(
|
79 |
+
'dokuwiki-template',
|
80 |
+
'test',
|
81 |
+
'test',
|
82 |
+
),
|
83 |
+
array(
|
84 |
+
'dokuwiki-template',
|
85 |
+
'test-plugin',
|
86 |
+
'test-plugin',
|
87 |
+
),
|
88 |
+
);
|
89 |
+
}
|
90 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Composer;
|
5 |
+
use Composer\Installers\GravInstaller;
|
6 |
+
|
7 |
+
class GravInstallerTest extends TestCase
|
8 |
+
{
|
9 |
+
/* @var \Composer\Composer */
|
10 |
+
protected $composer;
|
11 |
+
|
12 |
+
public function setUp()
|
13 |
+
{
|
14 |
+
$this->composer = new Composer();
|
15 |
+
}
|
16 |
+
|
17 |
+
public function testInflectPackageVars()
|
18 |
+
{
|
19 |
+
$package = $this->getPackage('vendor/name', '0.0.0');
|
20 |
+
$installer = new GravInstaller($package, $this->composer);
|
21 |
+
$packageVars = $this->getPackageVars($package);
|
22 |
+
|
23 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => 'test')));
|
24 |
+
$this->assertEquals('test', $result['name']);
|
25 |
+
|
26 |
+
foreach ($installer->getLocations() as $name => $location) {
|
27 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "$name-test")));
|
28 |
+
$this->assertEquals('test', $result['name']);
|
29 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "test-$name")));
|
30 |
+
$this->assertEquals('test', $result['name']);
|
31 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "$name-test-test")));
|
32 |
+
$this->assertEquals('test-test', $result['name']);
|
33 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "test-test-$name")));
|
34 |
+
$this->assertEquals('test-test', $result['name']);
|
35 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-$name-test")));
|
36 |
+
$this->assertEquals('test', $result['name']);
|
37 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-test-$name")));
|
38 |
+
$this->assertEquals('test', $result['name']);
|
39 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-$name-test-test")));
|
40 |
+
$this->assertEquals('test-test', $result['name']);
|
41 |
+
$result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-test-test-$name")));
|
42 |
+
$this->assertEquals('test-test', $result['name']);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @param $package \Composer\Package\PackageInterface
|
48 |
+
*/
|
49 |
+
public function getPackageVars($package)
|
50 |
+
{
|
51 |
+
$type = $package->getType();
|
52 |
+
|
53 |
+
$prettyName = $package->getPrettyName();
|
54 |
+
if (strpos($prettyName, '/') !== false) {
|
55 |
+
list($vendor, $name) = explode('/', $prettyName);
|
56 |
+
} else {
|
57 |
+
$vendor = '';
|
58 |
+
$name = $prettyName;
|
59 |
+
}
|
60 |
+
|
61 |
+
return compact('name', 'vendor', 'type');
|
62 |
+
}
|
63 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php
ADDED
@@ -0,0 +1,552 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\Installer;
|
5 |
+
use Composer\Util\Filesystem;
|
6 |
+
use Composer\Package\Package;
|
7 |
+
use Composer\Package\RootPackage;
|
8 |
+
use Composer\Composer;
|
9 |
+
use Composer\Config;
|
10 |
+
|
11 |
+
class InstallerTest extends TestCase
|
12 |
+
{
|
13 |
+
private $composer;
|
14 |
+
private $config;
|
15 |
+
private $vendorDir;
|
16 |
+
private $binDir;
|
17 |
+
private $dm;
|
18 |
+
private $repository;
|
19 |
+
private $io;
|
20 |
+
private $fs;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* setUp
|
24 |
+
*
|
25 |
+
* @return void
|
26 |
+
*/
|
27 |
+
public function setUp()
|
28 |
+
{
|
29 |
+
$this->fs = new Filesystem;
|
30 |
+
|
31 |
+
$this->composer = new Composer();
|
32 |
+
$this->config = new Config();
|
33 |
+
$this->composer->setConfig($this->config);
|
34 |
+
|
35 |
+
$this->vendorDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-vendor';
|
36 |
+
$this->ensureDirectoryExistsAndClear($this->vendorDir);
|
37 |
+
|
38 |
+
$this->binDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-bin';
|
39 |
+
$this->ensureDirectoryExistsAndClear($this->binDir);
|
40 |
+
|
41 |
+
$this->config->merge(array(
|
42 |
+
'config' => array(
|
43 |
+
'vendor-dir' => $this->vendorDir,
|
44 |
+
'bin-dir' => $this->binDir,
|
45 |
+
),
|
46 |
+
));
|
47 |
+
|
48 |
+
$this->dm = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
49 |
+
->disableOriginalConstructor()
|
50 |
+
->getMock();
|
51 |
+
$this->composer->setDownloadManager($this->dm);
|
52 |
+
|
53 |
+
$this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
|
54 |
+
$this->io = $this->getMock('Composer\IO\IOInterface');
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* tearDown
|
59 |
+
*
|
60 |
+
* @return void
|
61 |
+
*/
|
62 |
+
public function tearDown()
|
63 |
+
{
|
64 |
+
$this->fs->removeDirectory($this->vendorDir);
|
65 |
+
$this->fs->removeDirectory($this->binDir);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* testSupports
|
70 |
+
*
|
71 |
+
* @return void
|
72 |
+
*
|
73 |
+
* @dataProvider dataForTestSupport
|
74 |
+
*/
|
75 |
+
public function testSupports($type, $expected)
|
76 |
+
{
|
77 |
+
$installer = new Installer($this->io, $this->composer);
|
78 |
+
$this->assertSame($expected, $installer->supports($type), sprintf('Failed to show support for %s', $type));
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* dataForTestSupport
|
83 |
+
*/
|
84 |
+
public function dataForTestSupport()
|
85 |
+
{
|
86 |
+
return array(
|
87 |
+
array('agl-module', true),
|
88 |
+
array('aimeos-extension', true),
|
89 |
+
array('annotatecms-module', true),
|
90 |
+
array('annotatecms-component', true),
|
91 |
+
array('annotatecms-service', true),
|
92 |
+
array('attogram-module', true),
|
93 |
+
array('bitrix-module', true),
|
94 |
+
array('bitrix-component', true),
|
95 |
+
array('bitrix-theme', true),
|
96 |
+
array('bonefish-package', true),
|
97 |
+
array('cakephp', false),
|
98 |
+
array('cakephp-', false),
|
99 |
+
array('cakephp-app', false),
|
100 |
+
array('cakephp-plugin', true),
|
101 |
+
array('chef-cookbook', true),
|
102 |
+
array('chef-role', true),
|
103 |
+
array('cockpit-module', true),
|
104 |
+
array('codeigniter-app', false),
|
105 |
+
array('codeigniter-library', true),
|
106 |
+
array('codeigniter-third-party', true),
|
107 |
+
array('codeigniter-module', true),
|
108 |
+
array('concrete5-block', true),
|
109 |
+
array('concrete5-package', true),
|
110 |
+
array('concrete5-theme', true),
|
111 |
+
array('concrete5-core', true),
|
112 |
+
array('concrete5-update', true),
|
113 |
+
array('craft-plugin', true),
|
114 |
+
array('croogo-plugin', true),
|
115 |
+
array('croogo-theme', true),
|
116 |
+
array('decibel-app', true),
|
117 |
+
array('dokuwiki-plugin', true),
|
118 |
+
array('dokuwiki-template', true),
|
119 |
+
array('drupal-module', true),
|
120 |
+
array('dolibarr-module', true),
|
121 |
+
array('ee3-theme', true),
|
122 |
+
array('ee3-addon', true),
|
123 |
+
array('ee2-theme', true),
|
124 |
+
array('ee2-addon', true),
|
125 |
+
array('elgg-plugin', true),
|
126 |
+
array('eliasis-component', true),
|
127 |
+
array('eliasis-module', true),
|
128 |
+
array('eliasis-plugin', true),
|
129 |
+
array('eliasis-template', true),
|
130 |
+
array('ezplatform-assets', true),
|
131 |
+
array('ezplatform-meta-assets', true),
|
132 |
+
array('fuel-module', true),
|
133 |
+
array('fuel-package', true),
|
134 |
+
array('fuel-theme', true),
|
135 |
+
array('fuelphp-component', true),
|
136 |
+
array('hurad-plugin', true),
|
137 |
+
array('hurad-theme', true),
|
138 |
+
array('imagecms-template', true),
|
139 |
+
array('imagecms-module', true),
|
140 |
+
array('imagecms-library', true),
|
141 |
+
array('itop-extension', true),
|
142 |
+
array('joomla-library', true),
|
143 |
+
array('kanboard-plugin', true),
|
144 |
+
array('kirby-plugin', true),
|
145 |
+
array('kohana-module', true),
|
146 |
+
array('lms-plugin', true),
|
147 |
+
array('lms-template', true),
|
148 |
+
array('lms-document-template', true),
|
149 |
+
array('lms-userpanel-module', true),
|
150 |
+
array('laravel-library', true),
|
151 |
+
array('lavalite-theme', true),
|
152 |
+
array('lavalite-package', true),
|
153 |
+
array('lithium-library', true),
|
154 |
+
array('magento-library', true),
|
155 |
+
array('majima-plugin', true),
|
156 |
+
array('mako-package', true),
|
157 |
+
array('modx-extra', true),
|
158 |
+
array('modxevo-snippet', true),
|
159 |
+
array('modxevo-plugin', true),
|
160 |
+
array('modxevo-module', true),
|
161 |
+
array('modxevo-template', true),
|
162 |
+
array('modxevo-lib', true),
|
163 |
+
array('mediawiki-extension', true),
|
164 |
+
array('mediawiki-skin', true),
|
165 |
+
array('microweber-module', true),
|
166 |
+
array('modulework-module', true),
|
167 |
+
array('moodle-mod', true),
|
168 |
+
array('october-module', true),
|
169 |
+
array('october-plugin', true),
|
170 |
+
array('piwik-plugin', true),
|
171 |
+
array('pxcms-module', true),
|
172 |
+
array('pxcms-theme', true),
|
173 |
+
array('phpbb-extension', true),
|
174 |
+
array('pimcore-plugin', true),
|
175 |
+
array('plentymarkets-plugin', true),
|
176 |
+
array('ppi-module', true),
|
177 |
+
array('prestashop-module', true),
|
178 |
+
array('prestashop-theme', true),
|
179 |
+
array('puppet-module', true),
|
180 |
+
array('porto-container', true),
|
181 |
+
array('radphp-bundle', true),
|
182 |
+
array('redaxo-addon', true),
|
183 |
+
array('redaxo-bestyle-plugin', true),
|
184 |
+
array('reindex-theme', true),
|
185 |
+
array('reindex-plugin', true),
|
186 |
+
array('roundcube-plugin', true),
|
187 |
+
array('shopware-backend-plugin', true),
|
188 |
+
array('shopware-core-plugin', true),
|
189 |
+
array('shopware-frontend-plugin', true),
|
190 |
+
array('shopware-theme', true),
|
191 |
+
array('shopware-plugin', true),
|
192 |
+
array('shopware-frontend-theme', true),
|
193 |
+
array('silverstripe-module', true),
|
194 |
+
array('silverstripe-theme', true),
|
195 |
+
array('smf-module', true),
|
196 |
+
array('smf-theme', true),
|
197 |
+
array('sydes-module', true),
|
198 |
+
array('sydes-theme', true),
|
199 |
+
array('symfony1-plugin', true),
|
200 |
+
array('thelia-module', true),
|
201 |
+
array('thelia-frontoffice-template', true),
|
202 |
+
array('thelia-backoffice-template', true),
|
203 |
+
array('thelia-email-template', true),
|
204 |
+
array('tusk-task', true),
|
205 |
+
array('tusk-asset', true),
|
206 |
+
array('typo3-flow-plugin', true),
|
207 |
+
array('typo3-cms-extension', true),
|
208 |
+
array('userfrosting-sprinkle', true),
|
209 |
+
array('vanilla-plugin', true),
|
210 |
+
array('vanilla-theme', true),
|
211 |
+
array('whmcs-gateway', true),
|
212 |
+
array('wolfcms-plugin', true),
|
213 |
+
array('wordpress-plugin', true),
|
214 |
+
array('wordpress-core', false),
|
215 |
+
array('yawik-module', true),
|
216 |
+
array('zend-library', true),
|
217 |
+
array('zikula-module', true),
|
218 |
+
array('zikula-theme', true),
|
219 |
+
array('kodicms-plugin', true),
|
220 |
+
array('kodicms-media', true),
|
221 |
+
array('phifty-bundle', true),
|
222 |
+
array('phifty-library', true),
|
223 |
+
array('phifty-framework', true),
|
224 |
+
array('osclass-plugin', true),
|
225 |
+
array('osclass-theme', true),
|
226 |
+
array('osclass-language', true),
|
227 |
+
);
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* testInstallPath
|
232 |
+
*
|
233 |
+
* @dataProvider dataForTestInstallPath
|
234 |
+
*/
|
235 |
+
public function testInstallPath($type, $path, $name, $version = '1.0.0')
|
236 |
+
{
|
237 |
+
$installer = new Installer($this->io, $this->composer);
|
238 |
+
$package = new Package($name, $version, $version);
|
239 |
+
|
240 |
+
$package->setType($type);
|
241 |
+
$result = $installer->getInstallPath($package);
|
242 |
+
$this->assertEquals($path, $result);
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* dataFormTestInstallPath
|
247 |
+
*/
|
248 |
+
public function dataForTestInstallPath()
|
249 |
+
{
|
250 |
+
return array(
|
251 |
+
array('agl-module', 'More/MyTestPackage/', 'agl/my_test-package'),
|
252 |
+
array('aimeos-extension', 'ext/ai-test/', 'author/ai-test'),
|
253 |
+
array('annotatecms-module', 'addons/modules/my_module/', 'vysinsky/my_module'),
|
254 |
+
array('annotatecms-component', 'addons/components/my_component/', 'vysinsky/my_component'),
|
255 |
+
array('annotatecms-service', 'addons/services/my_service/', 'vysinsky/my_service'),
|
256 |
+
array('attogram-module', 'modules/my_module/', 'author/my_module'),
|
257 |
+
array('bitrix-module', 'bitrix/modules/my_module/', 'author/my_module'),
|
258 |
+
array('bitrix-component', 'bitrix/components/my_component/', 'author/my_component'),
|
259 |
+
array('bitrix-theme', 'bitrix/templates/my_theme/', 'author/my_theme'),
|
260 |
+
array('bitrix-d7-module', 'bitrix/modules/author.my_module/', 'author/my_module'),
|
261 |
+
array('bitrix-d7-component', 'bitrix/components/author/my_component/', 'author/my_component'),
|
262 |
+
array('bitrix-d7-template', 'bitrix/templates/author_my_template/', 'author/my_template'),
|
263 |
+
array('bonefish-package', 'Packages/bonefish/package/', 'bonefish/package'),
|
264 |
+
array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'),
|
265 |
+
array('chef-cookbook', 'Chef/mre/my_cookbook/', 'mre/my_cookbook'),
|
266 |
+
array('chef-role', 'Chef/roles/my_role/', 'mre/my_role'),
|
267 |
+
array('cockpit-module', 'cockpit/modules/addons/My_module/', 'piotr-cz/cockpit-my_module'),
|
268 |
+
array('codeigniter-library', 'application/libraries/my_package/', 'shama/my_package'),
|
269 |
+
array('codeigniter-module', 'application/modules/my_package/', 'shama/my_package'),
|
270 |
+
array('concrete5-block', 'application/blocks/concrete5_block/', 'remo/concrete5_block'),
|
271 |
+
array('concrete5-package', 'packages/concrete5_package/', 'remo/concrete5_package'),
|
272 |
+
array('concrete5-theme', 'application/themes/concrete5_theme/', 'remo/concrete5_theme'),
|
273 |
+
array('concrete5-core', 'concrete/', 'concrete5/core'),
|
274 |
+
array('concrete5-update', 'updates/concrete5/', 'concrete5/concrete5'),
|
275 |
+
array('craft-plugin', 'craft/plugins/my_plugin/', 'mdcpepper/my_plugin'),
|
276 |
+
array('croogo-plugin', 'Plugin/Sitemaps/', 'fahad19/sitemaps'),
|
277 |
+
array('croogo-theme', 'View/Themed/Readable/', 'rchavik/readable'),
|
278 |
+
array('decibel-app', 'app/someapp/', 'author/someapp'),
|
279 |
+
array('dokuwiki-plugin', 'lib/plugins/someplugin/', 'author/someplugin'),
|
280 |
+
array('dokuwiki-template', 'lib/tpl/sometemplate/', 'author/sometemplate'),
|
281 |
+
array('dolibarr-module', 'htdocs/custom/my_module/', 'shama/my_module'),
|
282 |
+
array('drupal-module', 'modules/my_module/', 'shama/my_module'),
|
283 |
+
array('drupal-theme', 'themes/my_module/', 'shama/my_module'),
|
284 |
+
array('drupal-profile', 'profiles/my_module/', 'shama/my_module'),
|
285 |
+
array('drupal-drush', 'drush/my_module/', 'shama/my_module'),
|
286 |
+
array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'),
|
287 |
+
array('eliasis-component', 'components/my_component/', 'shama/my_component'),
|
288 |
+
array('eliasis-module', 'modules/my_module/', 'shama/my_module'),
|
289 |
+
array('eliasis-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
|
290 |
+
array('eliasis-template', 'templates/my_template/', 'shama/my_template'),
|
291 |
+
array('ee3-addon', 'system/user/addons/ee_theme/', 'author/ee_theme'),
|
292 |
+
array('ee3-theme', 'themes/user/ee_package/', 'author/ee_package'),
|
293 |
+
array('ee2-addon', 'system/expressionengine/third_party/ee_theme/', 'author/ee_theme'),
|
294 |
+
array('ee2-theme', 'themes/third_party/ee_package/', 'author/ee_package'),
|
295 |
+
array('ezplatform-assets', 'web/assets/ezplatform/ezplatform_comp/', 'author/ezplatform_comp'),
|
296 |
+
array('ezplatform-meta-assets', 'web/assets/ezplatform/', 'author/ezplatform_comp'),
|
297 |
+
array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'),
|
298 |
+
array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'),
|
299 |
+
array('fuel-theme', 'fuel/app/themes/theme/', 'fuel/theme'),
|
300 |
+
array('fuelphp-component', 'components/demo/', 'fuelphp/demo'),
|
301 |
+
array('hurad-plugin', 'plugins/Akismet/', 'atkrad/akismet'),
|
302 |
+
array('hurad-theme', 'plugins/Hurad2013/', 'atkrad/Hurad2013'),
|
303 |
+
array('imagecms-template', 'templates/my_template/', 'shama/my_template'),
|
304 |
+
array('imagecms-module', 'application/modules/my_module/', 'shama/my_module'),
|
305 |
+
array('imagecms-library', 'application/libraries/my_library/', 'shama/my_library'),
|
306 |
+
array('itop-extension', 'extensions/my_extension/', 'shama/my_extension'),
|
307 |
+
array('joomla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
|
308 |
+
array('kanboard-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
|
309 |
+
array('kirby-plugin', 'site/plugins/my_plugin/', 'shama/my_plugin'),
|
310 |
+
array('kohana-module', 'modules/my_package/', 'shama/my_package'),
|
311 |
+
array('lms-plugin', 'plugins/MyPackage/', 'shama/MyPackage'),
|
312 |
+
array('lms-plugin', 'plugins/MyPackage/', 'shama/my_package'),
|
313 |
+
array('lms-template', 'templates/MyPackage/', 'shama/MyPackage'),
|
314 |
+
array('lms-template', 'templates/MyPackage/', 'shama/my_package'),
|
315 |
+
array('lms-document-template', 'documents/templates/MyPackage/', 'shama/MyPackage'),
|
316 |
+
array('lms-document-template', 'documents/templates/MyPackage/', 'shama/my_package'),
|
317 |
+
array('lms-userpanel-module', 'userpanel/modules/MyPackage/', 'shama/MyPackage'),
|
318 |
+
array('lms-userpanel-module', 'userpanel/modules/MyPackage/', 'shama/my_package'),
|
319 |
+
array('laravel-library', 'libraries/my_package/', 'shama/my_package'),
|
320 |
+
array('lavalite-theme', 'public/themes/my_theme/', 'shama/my_theme'),
|
321 |
+
array('lavalite-package', 'packages/my_group/my_package/', 'my_group/my_package'),
|
322 |
+
array('lithium-library', 'libraries/li3_test/', 'user/li3_test'),
|
323 |
+
array('magento-library', 'lib/foo/', 'test/foo'),
|
324 |
+
array('majima-plugin', 'plugins/MyPlugin/', 'shama/my-plugin'),
|
325 |
+
array('modx-extra', 'core/packages/extra/', 'vendor/extra'),
|
326 |
+
array('modxevo-snippet', 'assets/snippets/my_snippet/', 'shama/my_snippet'),
|
327 |
+
array('modxevo-plugin', 'assets/plugins/my_plugin/', 'shama/my_plugin'),
|
328 |
+
array('modxevo-module', 'assets/modules/my_module/', 'shama/my_module'),
|
329 |
+
array('modxevo-template', 'assets/templates/my_template/', 'shama/my_template'),
|
330 |
+
array('modxevo-lib', 'assets/lib/my_lib/', 'shama/my_lib'),
|
331 |
+
array('mako-package', 'app/packages/my_package/', 'shama/my_package'),
|
332 |
+
array('mediawiki-extension', 'extensions/APC/', 'author/APC'),
|
333 |
+
array('mediawiki-extension', 'extensions/APC/', 'author/APC-extension'),
|
334 |
+
array('mediawiki-extension', 'extensions/UploadWizard/', 'author/upload-wizard'),
|
335 |
+
array('mediawiki-extension', 'extensions/SyntaxHighlight_GeSHi/', 'author/syntax-highlight_GeSHi'),
|
336 |
+
array('mediawiki-skin', 'skins/someskin/', 'author/someskin-skin'),
|
337 |
+
array('mediawiki-skin', 'skins/someskin/', 'author/someskin'),
|
338 |
+
array('microweber-module', 'userfiles/modules/my-thing/', 'author/my-thing-module'),
|
339 |
+
array('modulework-module', 'modules/my_package/', 'shama/my_package'),
|
340 |
+
array('moodle-mod', 'mod/my_package/', 'shama/my_package'),
|
341 |
+
array('october-module', 'modules/my_plugin/', 'shama/my_plugin'),
|
342 |
+
array('october-plugin', 'plugins/shama/my_plugin/', 'shama/my_plugin'),
|
343 |
+
array('october-theme', 'themes/my_theme/', 'shama/my_theme'),
|
344 |
+
array('piwik-plugin', 'plugins/VisitSummary/', 'shama/visit-summary'),
|
345 |
+
array('prestashop-module', 'modules/a-module/', 'vendor/a-module'),
|
346 |
+
array('prestashop-theme', 'themes/a-theme/', 'vendor/a-theme'),
|
347 |
+
array('pxcms-module', 'app/Modules/Foo/', 'vendor/module-foo'),
|
348 |
+
array('pxcms-module', 'app/Modules/Foo/', 'vendor/pxcms-foo'),
|
349 |
+
array('pxcms-theme', 'themes/Foo/', 'vendor/theme-foo'),
|
350 |
+
array('pxcms-theme', 'themes/Foo/', 'vendor/pxcms-foo'),
|
351 |
+
array('phpbb-extension', 'ext/test/foo/', 'test/foo'),
|
352 |
+
array('phpbb-style', 'styles/foo/', 'test/foo'),
|
353 |
+
array('phpbb-language', 'language/foo/', 'test/foo'),
|
354 |
+
array('pimcore-plugin', 'plugins/MyPlugin/', 'ubikz/my_plugin'),
|
355 |
+
array('plentymarkets-plugin', 'HelloWorld/', 'plugin-hello-world'),
|
356 |
+
array('ppi-module', 'modules/foo/', 'test/foo'),
|
357 |
+
array('puppet-module', 'modules/puppet-name/', 'puppet/puppet-name'),
|
358 |
+
array('porto-container', 'app/Containers/container-name/', 'test/container-name'),
|
359 |
+
array('radphp-bundle', 'src/Migration/', 'atkrad/migration'),
|
360 |
+
array('redaxo-addon', 'redaxo/include/addons/my_plugin/', 'shama/my_plugin'),
|
361 |
+
array('redaxo-bestyle-plugin', 'redaxo/include/addons/be_style/plugins/my_plugin/', 'shama/my_plugin'),
|
362 |
+
array('reindex-theme', 'themes/my_module/', 'author/my_module'),
|
363 |
+
array('reindex-plugin', 'plugins/my_module/', 'author/my_module'),
|
364 |
+
array('roundcube-plugin', 'plugins/base/', 'test/base'),
|
365 |
+
array('roundcube-plugin', 'plugins/replace_dash/', 'test/replace-dash'),
|
366 |
+
array('shopware-backend-plugin', 'engine/Shopware/Plugins/Local/Backend/ShamaMyBackendPlugin/', 'shama/my-backend-plugin'),
|
367 |
+
array('shopware-core-plugin', 'engine/Shopware/Plugins/Local/Core/ShamaMyCorePlugin/', 'shama/my-core-plugin'),
|
368 |
+
array('shopware-frontend-plugin', 'engine/Shopware/Plugins/Local/Frontend/ShamaMyFrontendPlugin/', 'shama/my-frontend-plugin'),
|
369 |
+
array('shopware-theme', 'templates/my_theme/', 'shama/my-theme'),
|
370 |
+
array('shopware-frontend-theme', 'themes/Frontend/ShamaMyFrontendTheme/', 'shama/my-frontend-theme'),
|
371 |
+
array('shopware-plugin', 'custom/plugins/ShamaMyPlugin/', 'shama/my-plugin'),
|
372 |
+
array('silverstripe-module', 'my_module/', 'shama/my_module'),
|
373 |
+
array('silverstripe-module', 'sapphire/', 'silverstripe/framework', '2.4.0'),
|
374 |
+
array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0'),
|
375 |
+
array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0-rc1'),
|
376 |
+
array('silverstripe-module', 'framework/', 'silverstripe/framework', 'my/branch'),
|
377 |
+
array('silverstripe-theme', 'themes/my_theme/', 'shama/my_theme'),
|
378 |
+
array('smf-module', 'Sources/my_module/', 'shama/my_module'),
|
379 |
+
array('smf-theme', 'Themes/my_theme/', 'shama/my_theme'),
|
380 |
+
array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sfShamaPlugin'),
|
381 |
+
array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sf-shama-plugin'),
|
382 |
+
array('thelia-module', 'local/modules/my_module/', 'shama/my_module'),
|
383 |
+
array('thelia-frontoffice-template', 'templates/frontOffice/my_template_fo/', 'shama/my_template_fo'),
|
384 |
+
array('thelia-backoffice-template', 'templates/backOffice/my_template_bo/', 'shama/my_template_bo'),
|
385 |
+
array('thelia-email-template', 'templates/email/my_template_email/', 'shama/my_template_email'),
|
386 |
+
array('tusk-task', '.tusk/tasks/my_task/', 'shama/my_task'),
|
387 |
+
array('typo3-flow-package', 'Packages/Application/my_package/', 'shama/my_package'),
|
388 |
+
array('typo3-flow-build', 'Build/my_package/', 'shama/my_package'),
|
389 |
+
array('typo3-cms-extension', 'typo3conf/ext/my_extension/', 'shama/my_extension'),
|
390 |
+
array('userfrosting-sprinkle', 'app/sprinkles/my_sprinkle/', 'shama/my_sprinkle'),
|
391 |
+
array('vanilla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
|
392 |
+
array('vanilla-theme', 'themes/my_theme/', 'shama/my_theme'),
|
393 |
+
array('whmcs-gateway', 'modules/gateways/gateway_name/', 'vendor/gateway_name'),
|
394 |
+
array('wolfcms-plugin', 'wolf/plugins/my_plugin/', 'shama/my_plugin'),
|
395 |
+
array('wordpress-plugin', 'wp-content/plugins/my_plugin/', 'shama/my_plugin'),
|
396 |
+
array('wordpress-muplugin', 'wp-content/mu-plugins/my_plugin/', 'shama/my_plugin'),
|
397 |
+
array('zend-extra', 'extras/library/zend_test/', 'shama/zend_test'),
|
398 |
+
array('zikula-module', 'modules/my-test_module/', 'my/test_module'),
|
399 |
+
array('zikula-theme', 'themes/my-test_theme/', 'my/test_theme'),
|
400 |
+
array('kodicms-media', 'cms/media/vendor/my_media/', 'shama/my_media'),
|
401 |
+
array('kodicms-plugin', 'cms/plugins/my_plugin/', 'shama/my_plugin'),
|
402 |
+
array('phifty-bundle', 'bundles/core/', 'shama/core'),
|
403 |
+
array('phifty-library', 'libraries/my-lib/', 'shama/my-lib'),
|
404 |
+
array('phifty-framework', 'frameworks/my-framework/', 'shama/my-framework'),
|
405 |
+
array('yawik-module', 'module/MyModule/', 'shama/my_module'),
|
406 |
+
array('osclass-plugin', 'oc-content/plugins/sample_plugin/', 'test/sample_plugin'),
|
407 |
+
array('osclass-theme', 'oc-content/themes/sample_theme/', 'test/sample_theme'),
|
408 |
+
array('osclass-language', 'oc-content/languages/sample_lang/', 'test/sample_lang'),
|
409 |
+
);
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* testGetCakePHPInstallPathException
|
414 |
+
*
|
415 |
+
* @return void
|
416 |
+
*
|
417 |
+
* @expectedException \InvalidArgumentException
|
418 |
+
*/
|
419 |
+
public function testGetCakePHPInstallPathException()
|
420 |
+
{
|
421 |
+
$installer = new Installer($this->io, $this->composer);
|
422 |
+
$package = new Package('shama/ftp', '1.0.0', '1.0.0');
|
423 |
+
|
424 |
+
$package->setType('cakephp-whoops');
|
425 |
+
$result = $installer->getInstallPath($package);
|
426 |
+
}
|
427 |
+
|
428 |
+
/**
|
429 |
+
* testCustomInstallPath
|
430 |
+
*/
|
431 |
+
public function testCustomInstallPath()
|
432 |
+
{
|
433 |
+
$installer = new Installer($this->io, $this->composer);
|
434 |
+
$package = new Package('shama/ftp', '1.0.0', '1.0.0');
|
435 |
+
$package->setType('cakephp-plugin');
|
436 |
+
$consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
|
437 |
+
$this->composer->setPackage($consumerPackage);
|
438 |
+
$consumerPackage->setExtra(array(
|
439 |
+
'installer-paths' => array(
|
440 |
+
'my/custom/path/{$name}/' => array(
|
441 |
+
'shama/ftp',
|
442 |
+
'foo/bar',
|
443 |
+
),
|
444 |
+
),
|
445 |
+
));
|
446 |
+
$result = $installer->getInstallPath($package);
|
447 |
+
$this->assertEquals('my/custom/path/Ftp/', $result);
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* testCustomInstallerName
|
452 |
+
*/
|
453 |
+
public function testCustomInstallerName()
|
454 |
+
{
|
455 |
+
$installer = new Installer($this->io, $this->composer);
|
456 |
+
$package = new Package('shama/cakephp-ftp-plugin', '1.0.0', '1.0.0');
|
457 |
+
$package->setType('cakephp-plugin');
|
458 |
+
$package->setExtra(array(
|
459 |
+
'installer-name' => 'FTP',
|
460 |
+
));
|
461 |
+
$result = $installer->getInstallPath($package);
|
462 |
+
$this->assertEquals('Plugin/FTP/', $result);
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* testCustomTypePath
|
467 |
+
*/
|
468 |
+
public function testCustomTypePath()
|
469 |
+
{
|
470 |
+
$installer = new Installer($this->io, $this->composer);
|
471 |
+
$package = new Package('slbmeh/my_plugin', '1.0.0', '1.0.0');
|
472 |
+
$package->setType('wordpress-plugin');
|
473 |
+
$consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
|
474 |
+
$this->composer->setPackage($consumerPackage);
|
475 |
+
$consumerPackage->setExtra(array(
|
476 |
+
'installer-paths' => array(
|
477 |
+
'my/custom/path/{$name}/' => array(
|
478 |
+
'type:wordpress-plugin'
|
479 |
+
),
|
480 |
+
),
|
481 |
+
));
|
482 |
+
$result = $installer->getInstallPath($package);
|
483 |
+
$this->assertEquals('my/custom/path/my_plugin/', $result);
|
484 |
+
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* testVendorPath
|
488 |
+
*/
|
489 |
+
public function testVendorPath()
|
490 |
+
{
|
491 |
+
$installer = new Installer($this->io, $this->composer);
|
492 |
+
$package = new Package('penyaskito/my_module', '1.0.0', '1.0.0');
|
493 |
+
$package->setType('drupal-module');
|
494 |
+
$consumerPackage = new RootPackage('drupal/drupal', '1.0.0', '1.0.0');
|
495 |
+
$this->composer->setPackage($consumerPackage);
|
496 |
+
$consumerPackage->setExtra(array(
|
497 |
+
'installer-paths' => array(
|
498 |
+
'modules/custom/{$name}/' => array(
|
499 |
+
'vendor:penyaskito'
|
500 |
+
),
|
501 |
+
),
|
502 |
+
));
|
503 |
+
$result = $installer->getInstallPath($package);
|
504 |
+
$this->assertEquals('modules/custom/my_module/', $result);
|
505 |
+
}
|
506 |
+
|
507 |
+
/**
|
508 |
+
* testNoVendorName
|
509 |
+
*/
|
510 |
+
public function testNoVendorName()
|
511 |
+
{
|
512 |
+
$installer = new Installer($this->io, $this->composer);
|
513 |
+
$package = new Package('sfPhpunitPlugin', '1.0.0', '1.0.0');
|
514 |
+
|
515 |
+
$package->setType('symfony1-plugin');
|
516 |
+
$result = $installer->getInstallPath($package);
|
517 |
+
$this->assertEquals('plugins/sfPhpunitPlugin/', $result);
|
518 |
+
}
|
519 |
+
|
520 |
+
/**
|
521 |
+
* testTypo3Inflection
|
522 |
+
*/
|
523 |
+
public function testTypo3Inflection()
|
524 |
+
{
|
525 |
+
$installer = new Installer($this->io, $this->composer);
|
526 |
+
$package = new Package('typo3/fluid', '1.0.0', '1.0.0');
|
527 |
+
|
528 |
+
$package->setAutoload(array(
|
529 |
+
'psr-0' => array(
|
530 |
+
'TYPO3\\Fluid' => 'Classes',
|
531 |
+
),
|
532 |
+
));
|
533 |
+
|
534 |
+
$package->setType('typo3-flow-package');
|
535 |
+
$result = $installer->getInstallPath($package);
|
536 |
+
$this->assertEquals('Packages/Application/TYPO3.Fluid/', $result);
|
537 |
+
}
|
538 |
+
|
539 |
+
public function testUninstallAndDeletePackageFromLocalRepo()
|
540 |
+
{
|
541 |
+
$package = new Package('foo', '1.0.0', '1.0.0');
|
542 |
+
|
543 |
+
$installer = $this->getMock('Composer\Installers\Installer', array('getInstallPath'), array($this->io, $this->composer));
|
544 |
+
$installer->expects($this->atLeastOnce())->method('getInstallPath')->with($package)->will($this->returnValue(sys_get_temp_dir().'/foo'));
|
545 |
+
|
546 |
+
$repo = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
|
547 |
+
$repo->expects($this->once())->method('hasPackage')->with($package)->will($this->returnValue(true));
|
548 |
+
$repo->expects($this->once())->method('removePackage')->with($package);
|
549 |
+
|
550 |
+
$installer->uninstall($repo, $package);
|
551 |
+
}
|
552 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/MayaInstallerTest.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\MayaInstaller;
|
5 |
+
use Composer\Package\Package;
|
6 |
+
use Composer\Composer;
|
7 |
+
use PHPUnit\Framework\TestCase as BaseTestCase;
|
8 |
+
|
9 |
+
class MayaInstallerTest extends BaseTestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var MayaInstaller
|
13 |
+
*/
|
14 |
+
private $installer;
|
15 |
+
|
16 |
+
public function setUp()
|
17 |
+
{
|
18 |
+
$this->installer = new MayaInstaller(
|
19 |
+
new Package('NyanCat', '4.2', '4.2'),
|
20 |
+
new Composer()
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @dataProvider packageNameInflectionProvider
|
26 |
+
*/
|
27 |
+
public function testInflectPackageVars($type, $name, $expected)
|
28 |
+
{
|
29 |
+
$this->assertEquals(
|
30 |
+
array('name' => $expected, 'type' => $type),
|
31 |
+
$this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
public function packageNameInflectionProvider()
|
36 |
+
{
|
37 |
+
return array(
|
38 |
+
// Should keep module name StudlyCase
|
39 |
+
array(
|
40 |
+
'maya-module',
|
41 |
+
'user-profile',
|
42 |
+
'UserProfile'
|
43 |
+
),
|
44 |
+
array(
|
45 |
+
'maya-module',
|
46 |
+
'maya-module',
|
47 |
+
'Maya'
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
'maya-module',
|
51 |
+
'blog',
|
52 |
+
'Blog'
|
53 |
+
),
|
54 |
+
// tests that exactly one '-module' is cut off
|
55 |
+
array(
|
56 |
+
'maya-module',
|
57 |
+
'some-module-module',
|
58 |
+
'SomeModule',
|
59 |
+
),
|
60 |
+
);
|
61 |
+
}
|
62 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\MediaWikiInstaller;
|
5 |
+
use Composer\Package\Package;
|
6 |
+
use Composer\Composer;
|
7 |
+
use PHPUnit\Framework\TestCase as BaseTestCase;
|
8 |
+
|
9 |
+
class MediaWikiInstallerTest extends BaseTestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var MediaWikiInstaller
|
13 |
+
*/
|
14 |
+
private $installer;
|
15 |
+
|
16 |
+
public function setUp()
|
17 |
+
{
|
18 |
+
$this->installer = new MediaWikiInstaller(
|
19 |
+
new Package('NyanCat', '4.2', '4.2'),
|
20 |
+
new Composer()
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @dataProvider packageNameInflectionProvider
|
26 |
+
*/
|
27 |
+
public function testInflectPackageVars($type, $name, $expected)
|
28 |
+
{
|
29 |
+
$this->assertEquals(
|
30 |
+
$this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),
|
31 |
+
array('name' => $expected, 'type'=>$type)
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
public function packageNameInflectionProvider()
|
36 |
+
{
|
37 |
+
return array(
|
38 |
+
array(
|
39 |
+
'mediawiki-extension',
|
40 |
+
'sub-page-list',
|
41 |
+
'SubPageList',
|
42 |
+
),
|
43 |
+
array(
|
44 |
+
'mediawiki-extension',
|
45 |
+
'sub-page-list-extension',
|
46 |
+
'SubPageList',
|
47 |
+
),
|
48 |
+
array(
|
49 |
+
'mediawiki-extension',
|
50 |
+
'semantic-mediawiki',
|
51 |
+
'SemanticMediawiki',
|
52 |
+
),
|
53 |
+
// tests that exactly one '-skin' is cut off, and that skins do not get ucwords treatment like extensions
|
54 |
+
array(
|
55 |
+
'mediawiki-skin',
|
56 |
+
'some-skin-skin',
|
57 |
+
'some-skin',
|
58 |
+
),
|
59 |
+
// tests that names without '-skin' suffix stay valid
|
60 |
+
array(
|
61 |
+
'mediawiki-skin',
|
62 |
+
'someotherskin',
|
63 |
+
'someotherskin',
|
64 |
+
),
|
65 |
+
);
|
66 |
+
}
|
67 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\OctoberInstaller;
|
5 |
+
use Composer\Package\Package;
|
6 |
+
use Composer\Composer;
|
7 |
+
use PHPUnit\Framework\TestCase as BaseTestCase;
|
8 |
+
|
9 |
+
class OctoberInstallerTest extends BaseTestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var OctoberInstaller
|
13 |
+
*/
|
14 |
+
private $installer;
|
15 |
+
|
16 |
+
public function setUp()
|
17 |
+
{
|
18 |
+
$this->installer = new OctoberInstaller(
|
19 |
+
new Package('NyanCat', '4.2', '4.2'),
|
20 |
+
new Composer()
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @dataProvider packageNameInflectionProvider
|
26 |
+
*/
|
27 |
+
public function testInflectPackageVars($type, $name, $expected)
|
28 |
+
{
|
29 |
+
$this->assertEquals(
|
30 |
+
$this->installer->inflectPackageVars(array('name' => $name, 'type' => $type)),
|
31 |
+
array('name' => $expected, 'type' => $type)
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
public function packageNameInflectionProvider()
|
36 |
+
{
|
37 |
+
return array(
|
38 |
+
array(
|
39 |
+
'october-plugin',
|
40 |
+
'subpagelist',
|
41 |
+
'subpagelist',
|
42 |
+
),
|
43 |
+
array(
|
44 |
+
'october-plugin',
|
45 |
+
'subpagelist-plugin',
|
46 |
+
'subpagelist',
|
47 |
+
),
|
48 |
+
array(
|
49 |
+
'october-plugin',
|
50 |
+
'semanticoctober',
|
51 |
+
'semanticoctober',
|
52 |
+
),
|
53 |
+
// tests that exactly one '-theme' is cut off
|
54 |
+
array(
|
55 |
+
'october-theme',
|
56 |
+
'some-theme-theme',
|
57 |
+
'some-theme',
|
58 |
+
),
|
59 |
+
// tests that names without '-theme' suffix stay valid
|
60 |
+
array(
|
61 |
+
'october-theme',
|
62 |
+
'someothertheme',
|
63 |
+
'someothertheme',
|
64 |
+
),
|
65 |
+
);
|
66 |
+
}
|
67 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\OntoWikiInstaller;
|
5 |
+
use PHPUnit\Framework\TestCase as BaseTestCase;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Test for the OntoWikiInstaller
|
9 |
+
* code was taken from DokuWikiInstaller
|
10 |
+
*/
|
11 |
+
class OntoWikiInstallerTest extends BaseTestCase
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* @var OntoWikiInstaller
|
15 |
+
*/
|
16 |
+
private $installer;
|
17 |
+
|
18 |
+
public function setUp()
|
19 |
+
{
|
20 |
+
$this->installer = new OntoWikiInstaller();
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @dataProvider packageNameInflectionProvider
|
25 |
+
*/
|
26 |
+
public function testInflectPackageVars($type, $name, $expected)
|
27 |
+
{
|
28 |
+
$this->assertEquals(
|
29 |
+
$this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),
|
30 |
+
array('name' => $expected, 'type'=>$type)
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
public function packageNameInflectionProvider()
|
35 |
+
{
|
36 |
+
return array(
|
37 |
+
array(
|
38 |
+
'ontowiki-extension',
|
39 |
+
'CSVImport.ontowiki',
|
40 |
+
'csvimport',
|
41 |
+
),
|
42 |
+
array(
|
43 |
+
'ontowiki-extension',
|
44 |
+
'csvimport',
|
45 |
+
'csvimport',
|
46 |
+
),
|
47 |
+
array(
|
48 |
+
'ontowiki-extension',
|
49 |
+
'some_ontowiki_extension',
|
50 |
+
'some_ontowiki_extension',
|
51 |
+
),
|
52 |
+
array(
|
53 |
+
'ontowiki-extension',
|
54 |
+
'some_ontowiki_extension.ontowiki',
|
55 |
+
'some_ontowiki_extension',
|
56 |
+
),
|
57 |
+
array(
|
58 |
+
'ontowiki-translation',
|
59 |
+
'de-translation.ontowiki',
|
60 |
+
'de',
|
61 |
+
),
|
62 |
+
array(
|
63 |
+
'ontowiki-translation',
|
64 |
+
'en-US-translation.ontowiki',
|
65 |
+
'en-us',
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'ontowiki-translation',
|
69 |
+
'en-US-translation',
|
70 |
+
'en-us',
|
71 |
+
),
|
72 |
+
array(
|
73 |
+
'ontowiki-theme',
|
74 |
+
'blue-theme.ontowiki',
|
75 |
+
'blue',
|
76 |
+
),
|
77 |
+
array(
|
78 |
+
'ontowiki-theme',
|
79 |
+
'blue-theme',
|
80 |
+
'blue',
|
81 |
+
),
|
82 |
+
);
|
83 |
+
}
|
84 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\PimcoreInstaller;
|
5 |
+
use Composer\Package\Package;
|
6 |
+
use Composer\Composer;
|
7 |
+
|
8 |
+
class PimcoreInstallerTest extends TestCase
|
9 |
+
{
|
10 |
+
private $composer;
|
11 |
+
private $io;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* setUp
|
15 |
+
*
|
16 |
+
* @return void
|
17 |
+
*/
|
18 |
+
public function setUp()
|
19 |
+
{
|
20 |
+
$this->package = new Package('CamelCased', '1.0', '1.0');
|
21 |
+
$this->io = $this->getMock('Composer\IO\PackageInterface');
|
22 |
+
$this->composer = new Composer();
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* testInflectPackageVars
|
27 |
+
*
|
28 |
+
* @return void
|
29 |
+
*/
|
30 |
+
public function testInflectPackageVars()
|
31 |
+
{
|
32 |
+
$installer = new PimcoreInstaller($this->package, $this->composer);
|
33 |
+
$result = $installer->inflectPackageVars(array('name' => 'CamelCased'));
|
34 |
+
$this->assertEquals($result, array('name' => 'CamelCased'));
|
35 |
+
|
36 |
+
$installer = new PimcoreInstaller($this->package, $this->composer);
|
37 |
+
$result = $installer->inflectPackageVars(array('name' => 'with-dash'));
|
38 |
+
$this->assertEquals($result, array('name' => 'WithDash'));
|
39 |
+
|
40 |
+
$installer = new PimcoreInstaller($this->package, $this->composer);
|
41 |
+
$result = $installer->inflectPackageVars(array('name' => 'with_underscore'));
|
42 |
+
$this->assertEquals($result, array('name' => 'WithUnderscore'));
|
43 |
+
}
|
44 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Composer;
|
5 |
+
use Composer\Installers\PiwikInstaller;
|
6 |
+
use Composer\Package\Package;
|
7 |
+
use Composer\Package\PackageInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class PiwikInstallerTest
|
11 |
+
*
|
12 |
+
* @package Composer\Installers\Test
|
13 |
+
*/
|
14 |
+
class PiwikInstallerTest extends TestCase
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* @varComposer
|
18 |
+
*/
|
19 |
+
private $composer;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var PackageInterface
|
23 |
+
*/
|
24 |
+
private $io;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var Package
|
28 |
+
*/
|
29 |
+
private $package;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* setUp
|
33 |
+
*
|
34 |
+
* @return void
|
35 |
+
*/
|
36 |
+
public function setUp()
|
37 |
+
{
|
38 |
+
$this->package = new Package('VisitSummary', '1.0', '1.0');
|
39 |
+
$this->io = $this->getMock('Composer\IO\PackageInterface');
|
40 |
+
$this->composer = new Composer();
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* testInflectPackageVars
|
45 |
+
*
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
public function testInflectPackageVars()
|
49 |
+
{
|
50 |
+
$installer = new PiwikInstaller($this->package, $this->composer);
|
51 |
+
$result = $installer->inflectPackageVars(array('name' => 'VisitSummary'));
|
52 |
+
$this->assertEquals($result, array('name' => 'VisitSummary'));
|
53 |
+
|
54 |
+
$installer = new PiwikInstaller($this->package, $this->composer);
|
55 |
+
$result = $installer->inflectPackageVars(array('name' => 'visit-summary'));
|
56 |
+
$this->assertEquals($result, array('name' => 'VisitSummary'));
|
57 |
+
|
58 |
+
$installer = new PiwikInstaller($this->package, $this->composer);
|
59 |
+
$result = $installer->inflectPackageVars(array('name' => 'visit_summary'));
|
60 |
+
$this->assertEquals($result, array('name' => 'VisitSummary'));
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/SiteDirectInstallerTest.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers\Test;
|
4 |
+
|
5 |
+
use Composer\Composer;
|
6 |
+
use Composer\Installers\SiteDirectInstaller;
|
7 |
+
use Composer\Package\Package;
|
8 |
+
|
9 |
+
class SiteDirectInstallerTest extends TestCase
|
10 |
+
{
|
11 |
+
/** @var SiteDirectInstaller $installer */
|
12 |
+
protected $installer;
|
13 |
+
|
14 |
+
/** @var Package */
|
15 |
+
private $package;
|
16 |
+
|
17 |
+
public function SetUp()
|
18 |
+
{
|
19 |
+
$this->package = new Package('sitedirect/some_name', '1.0.9', '1.0');
|
20 |
+
$this->installer = new SiteDirectInstaller(
|
21 |
+
$this->package,
|
22 |
+
new Composer()
|
23 |
+
);
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @dataProvider dataProvider
|
29 |
+
*/
|
30 |
+
public function testInflectPackageVars($data, $expected)
|
31 |
+
{
|
32 |
+
$result = $this->installer->inflectPackageVars($data);
|
33 |
+
$this->assertEquals($result, $expected);
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @dataProvider dataProvider
|
38 |
+
*/
|
39 |
+
public function testInstallPath($data, $expected)
|
40 |
+
{
|
41 |
+
$result = $this->installer->inflectPackageVars($data);
|
42 |
+
$path = $this->createPackage($data);
|
43 |
+
|
44 |
+
// use $result to get the proper capitalization for the vendor path
|
45 |
+
$expectedPath = "modules/{$result['vendor']}/{$result['name']}/";
|
46 |
+
$notExpectedPath = "modules/{$data['vendor']}/{$data['name']}/";
|
47 |
+
$this->assertEquals($expectedPath, $path);
|
48 |
+
$this->assertNotEquals($notExpectedPath, $path);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @param $data
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
private function createPackage($data)
|
56 |
+
{
|
57 |
+
$fullName = "{$data['vendor']}/{$data['name']}";
|
58 |
+
|
59 |
+
$package = new Package($fullName, '1.0', '1.0');
|
60 |
+
$package->setType('sitedirect-module');
|
61 |
+
$installer = new SiteDirectInstaller($package, new Composer());
|
62 |
+
|
63 |
+
$path = $installer->getInstallPath($package, 'sitedirect');
|
64 |
+
return $path;
|
65 |
+
}
|
66 |
+
|
67 |
+
public function dataProvider()
|
68 |
+
{
|
69 |
+
return array(
|
70 |
+
array(
|
71 |
+
'data' => array(
|
72 |
+
'name' => 'kernel',
|
73 |
+
'vendor' => 'sitedirect',
|
74 |
+
'type' => 'sitedirect-module',
|
75 |
+
),
|
76 |
+
'expected' => array(
|
77 |
+
'name' => 'Kernel',
|
78 |
+
'vendor' => 'SiteDirect',
|
79 |
+
'type' => 'sitedirect-module',
|
80 |
+
)
|
81 |
+
),
|
82 |
+
array(
|
83 |
+
'data' => array(
|
84 |
+
'name' => 'that_guy',
|
85 |
+
'vendor' => 'whatGuy',
|
86 |
+
'type' => 'sitedirect-module',
|
87 |
+
),
|
88 |
+
'expected' => array(
|
89 |
+
'name' => 'ThatGuy',
|
90 |
+
'vendor' => 'whatGuy',
|
91 |
+
'type' => 'sitedirect-module',
|
92 |
+
)
|
93 |
+
),
|
94 |
+
array(
|
95 |
+
'data' => array(
|
96 |
+
'name' => 'checkout',
|
97 |
+
'vendor' => 'someVendor',
|
98 |
+
'type' => 'sitedirect-plugin',
|
99 |
+
),
|
100 |
+
'expected' => array(
|
101 |
+
'name' => 'Checkout',
|
102 |
+
'vendor' => 'someVendor',
|
103 |
+
'type' => 'sitedirect-plugin',
|
104 |
+
)
|
105 |
+
),
|
106 |
+
array(
|
107 |
+
'data' => array(
|
108 |
+
'name' => 'checkout',
|
109 |
+
'vendor' => 'siteDirect',
|
110 |
+
'type' => 'sitedirect-plugin',
|
111 |
+
),
|
112 |
+
'expected' => array(
|
113 |
+
'name' => 'Checkout',
|
114 |
+
'vendor' => 'SiteDirect',
|
115 |
+
'type' => 'sitedirect-plugin',
|
116 |
+
)
|
117 |
+
),
|
118 |
+
);
|
119 |
+
}
|
120 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/SyDESInstallerTest.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\SyDESInstaller;
|
5 |
+
use Composer\Package\Package;
|
6 |
+
use Composer\Composer;
|
7 |
+
use PHPUnit\Framework\TestCase as BaseTestCase;
|
8 |
+
|
9 |
+
class SyDESInstallerTest extends BaseTestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var SyDESInstaller
|
13 |
+
*/
|
14 |
+
private $installer;
|
15 |
+
|
16 |
+
public function setUp()
|
17 |
+
{
|
18 |
+
$this->installer = new SyDESInstaller(
|
19 |
+
new Package('NyanCat', '4.2', '4.2'),
|
20 |
+
new Composer()
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @dataProvider packageNameInflectionProvider
|
26 |
+
*/
|
27 |
+
public function testInflectPackageVars($type, $name, $expected)
|
28 |
+
{
|
29 |
+
$this->assertEquals(
|
30 |
+
array('name' => $expected, 'type' => $type),
|
31 |
+
$this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
public function packageNameInflectionProvider()
|
36 |
+
{
|
37 |
+
return array(
|
38 |
+
// modules
|
39 |
+
array(
|
40 |
+
'sydes-module',
|
41 |
+
'name',
|
42 |
+
'Name'
|
43 |
+
),
|
44 |
+
array(
|
45 |
+
'sydes-module',
|
46 |
+
'sample-name',
|
47 |
+
'SampleName'
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
'sydes-module',
|
51 |
+
'sydes-name',
|
52 |
+
'Name'
|
53 |
+
),
|
54 |
+
array(
|
55 |
+
'sydes-module',
|
56 |
+
'sample-name-module',
|
57 |
+
'SampleName',
|
58 |
+
),
|
59 |
+
array(
|
60 |
+
'sydes-module',
|
61 |
+
'sydes-sample-name-module',
|
62 |
+
'SampleName'
|
63 |
+
),
|
64 |
+
// themes
|
65 |
+
array(
|
66 |
+
'sydes-theme',
|
67 |
+
'some-theme-theme',
|
68 |
+
'some-theme',
|
69 |
+
),
|
70 |
+
array(
|
71 |
+
'sydes-theme',
|
72 |
+
'sydes-sometheme',
|
73 |
+
'sometheme',
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'sydes-theme',
|
77 |
+
'Sample-Name',
|
78 |
+
'sample-name'
|
79 |
+
),
|
80 |
+
);
|
81 |
+
}
|
82 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Composer.
|
5 |
+
*
|
6 |
+
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Composer\Installers\Test;
|
14 |
+
|
15 |
+
use Composer\Package\Version\VersionParser;
|
16 |
+
use Composer\Package\Package;
|
17 |
+
use Composer\Package\AliasPackage;
|
18 |
+
use Composer\Package\LinkConstraint\VersionConstraint;
|
19 |
+
use Composer\Util\Filesystem;
|
20 |
+
use PHPUnit\Framework\TestCase as BaseTestCase;
|
21 |
+
|
22 |
+
abstract class TestCase extends BaseTestCase
|
23 |
+
{
|
24 |
+
private static $parser;
|
25 |
+
|
26 |
+
protected static function getVersionParser()
|
27 |
+
{
|
28 |
+
if (!self::$parser) {
|
29 |
+
self::$parser = new VersionParser();
|
30 |
+
}
|
31 |
+
|
32 |
+
return self::$parser;
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function getVersionConstraint($operator, $version)
|
36 |
+
{
|
37 |
+
return new VersionConstraint(
|
38 |
+
$operator,
|
39 |
+
self::getVersionParser()->normalize($version)
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
protected function getPackage($name, $version)
|
44 |
+
{
|
45 |
+
$normVersion = self::getVersionParser()->normalize($version);
|
46 |
+
|
47 |
+
return new Package($name, $normVersion, $version);
|
48 |
+
}
|
49 |
+
|
50 |
+
protected function getAliasPackage($package, $version)
|
51 |
+
{
|
52 |
+
$normVersion = self::getVersionParser()->normalize($version);
|
53 |
+
|
54 |
+
return new AliasPackage($package, $normVersion, $version);
|
55 |
+
}
|
56 |
+
|
57 |
+
protected function ensureDirectoryExistsAndClear($directory)
|
58 |
+
{
|
59 |
+
$fs = new Filesystem();
|
60 |
+
if (is_dir($directory)) {
|
61 |
+
$fs->removeDirectory($directory);
|
62 |
+
}
|
63 |
+
mkdir($directory, 0777, true);
|
64 |
+
}
|
65 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Installers\VgmcpInstaller;
|
5 |
+
use Composer\Package\Package;
|
6 |
+
use Composer\Composer;
|
7 |
+
use PHPUnit\Framework\TestCase as BaseTestCase;
|
8 |
+
|
9 |
+
class VgmcpInstallerTest extends BaseTestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var VgmcpInstaller
|
13 |
+
*/
|
14 |
+
private $installer;
|
15 |
+
|
16 |
+
public function setUp()
|
17 |
+
{
|
18 |
+
$this->installer = new VgmcpInstaller(
|
19 |
+
new Package('NyanCat', '4.2', '4.2'),
|
20 |
+
new Composer()
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @dataProvider packageNameInflectionProvider
|
26 |
+
*/
|
27 |
+
public function testInflectPackageVars($type, $name, $expected)
|
28 |
+
{
|
29 |
+
$this->assertEquals(
|
30 |
+
array('name' => $expected, 'type' => $type),
|
31 |
+
$this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
public function packageNameInflectionProvider()
|
36 |
+
{
|
37 |
+
return array(
|
38 |
+
// Should keep bundle name StudlyCase
|
39 |
+
array(
|
40 |
+
'vgmcp-bundle',
|
41 |
+
'user-profile',
|
42 |
+
'UserProfile'
|
43 |
+
),
|
44 |
+
array(
|
45 |
+
'vgmcp-bundle',
|
46 |
+
'vgmcp-bundle',
|
47 |
+
'Vgmcp'
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
'vgmcp-bundle',
|
51 |
+
'blog',
|
52 |
+
'Blog'
|
53 |
+
),
|
54 |
+
// tests that exactly one '-bundle' is cut off
|
55 |
+
array(
|
56 |
+
'vgmcp-bundle',
|
57 |
+
'some-bundle-bundle',
|
58 |
+
'SomeBundle',
|
59 |
+
),
|
60 |
+
// tests that exactly one '-theme' is cut off
|
61 |
+
array(
|
62 |
+
'vgmcp-theme',
|
63 |
+
'some-theme-theme',
|
64 |
+
'SomeTheme',
|
65 |
+
),
|
66 |
+
// tests that names without '-theme' suffix stay valid
|
67 |
+
array(
|
68 |
+
'vgmcp-theme',
|
69 |
+
'someothertheme',
|
70 |
+
'Someothertheme',
|
71 |
+
),
|
72 |
+
// Should keep theme name StudlyCase
|
73 |
+
array(
|
74 |
+
'vgmcp-theme',
|
75 |
+
'adminlte-advanced',
|
76 |
+
'AdminlteAdvanced'
|
77 |
+
),
|
78 |
+
);
|
79 |
+
}
|
80 |
+
}
|
vendor/composer/installers/tests/Composer/Installers/Test/YawikInstallerTest.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers\Test;
|
3 |
+
|
4 |
+
use Composer\Composer;
|
5 |
+
use Composer\Installers\YawikInstaller;
|
6 |
+
use Composer\Package\Package;
|
7 |
+
use Composer\Package\PackageInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class YawikInstallerTest
|
11 |
+
*
|
12 |
+
* @package Composer\Installers\Test
|
13 |
+
*/
|
14 |
+
class YawikInstallerTest extends TestCase
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* @varComposer
|
18 |
+
*/
|
19 |
+
private $composer;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var PackageInterface
|
23 |
+
*/
|
24 |
+
private $io;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var Package
|
28 |
+
*/
|
29 |
+
private $package;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* setUp
|
33 |
+
*
|
34 |
+
* @return void
|
35 |
+
*/
|
36 |
+
public function setUp()
|
37 |
+
{
|
38 |
+
$this->package = new Package('YawikCompanyRegistration', '1.0', '1.0');
|
39 |
+
$this->io = $this->getMock('Composer\IO\PackageInterface');
|
40 |
+
$this->composer = new Composer();
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* testInflectPackageVars
|
45 |
+
*
|
46 |
+
* @dataProvider packageNameProvider
|
47 |
+
* @return void
|
48 |
+
*/
|
49 |
+
public function testInflectPackageVars($input)
|
50 |
+
{
|
51 |
+
$installer = new YawikInstaller($this->package, $this->composer);
|
52 |
+
$result = $installer->inflectPackageVars(array('name' => $input));
|
53 |
+
$this->assertEquals($result, array('name' => 'YawikCompanyRegistration'));
|
54 |
+
}
|
55 |
+
|
56 |
+
public function packageNameProvider()
|
57 |
+
{
|
58 |
+
return array(
|
59 |
+
array('yawik-company-registration'),
|
60 |
+
array('yawik_company_registration'),
|
61 |
+
array('YawikCompanyRegistration')
|
62 |
+
);
|
63 |
+
}
|
64 |
+
}
|
vendor/composer/installers/tests/bootstrap.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$loader = require __DIR__ . '/../src/bootstrap.php';
|
4 |
+
$loader->add('Composer\Installers\Test', __DIR__);
|
vendor/vimeo/vimeo-api/.styleci.yml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
preset: psr2
|
2 |
+
|
3 |
+
enabled:
|
4 |
+
- combine_consecutive_unsets
|
5 |
+
- newline_after_open_tag
|
6 |
+
- no_php4_constructor
|
7 |
+
- no_useless_else
|
8 |
+
- ordered_class_elements
|
9 |
+
- ordered_use
|
10 |
+
- strict
|
11 |
+
- strict_param
|
12 |
+
- php_unit_construct
|
13 |
+
- php_unit_strict
|
14 |
+
|
15 |
+
finder:
|
16 |
+
exclude:
|
17 |
+
- 'example'
|
18 |
+
name:
|
19 |
+
- '*.php'
|
vendor/vimeo/vimeo-api/CHANGELOG.md
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CHANGELOG
|
2 |
+
|
3 |
+
## 1.2.1 (released 2015-05-07)
|
4 |
+
|
5 |
+
- Move from pem to cer
|
6 |
+
|
7 |
+
## 1.2.0 (released 2015-05-01)
|
8 |
+
|
9 |
+
- Better error messages when uploading (#66)
|
10 |
+
- Better error messages when curl errors (#68)
|
11 |
+
- Root cert is included to help with curl errors (#69)
|
12 |
+
|
13 |
+
## 1.1.0 (released 2014-10-23)
|
14 |
+
|
15 |
+
- Added composer support (#6)
|
16 |
+
|
17 |
+
## 1.0.0 (released 2014-09-26)
|
18 |
+
|
19 |
+
- This is the Vimeo library for version 3 of the Vimeo API.
|
vendor/vimeo/vimeo-api/LICENSE
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Apache License
|
3 |
+
Version 2.0, January 2004
|
4 |
+
http://www.apache.org/licenses/
|
5 |
+
|
6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
+
|
8 |
+
1. Definitions.
|
9 |
+
|
10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
12 |
+
|
13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14 |
+
the copyright owner that is granting the License.
|
15 |
+
|
16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
17 |
+
other entities that control, are controlled by, or are under common
|
18 |
+
control with that entity. For the purposes of this definition,
|
19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
20 |
+
direction or management of such entity, whether by contract or
|
21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23 |
+
|
24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25 |
+
exercising permissions granted by this License.
|
26 |
+
|
27 |
+
"Source" form shall mean the preferred form for making modifications,
|
28 |
+
including but not limited to software source code, documentation
|
29 |
+
source, and configuration files.
|
30 |
+
|
31 |
+
"Object" form shall mean any form resulting from mechanical
|
32 |
+
transformation or translation of a Source form, including but
|
33 |
+
not limited to compiled object code, generated documentation,
|
34 |
+
and conversions to other media types.
|
35 |
+
|
36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
37 |
+
Object form, made available under the License, as indicated by a
|
38 |
+
copyright notice that is included in or attached to the work
|
39 |
+
(an example is provided in the Appendix below).
|
40 |
+
|
41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42 |
+
form, that is based on (or derived from) the Work and for which the
|
43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
45 |
+
of this License, Derivative Works shall not include works that remain
|
46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47 |
+
the Work and Derivative Works thereof.
|
48 |
+
|
49 |
+
"Contribution" shall mean any work of authorship, including
|
50 |
+
the original version of the Work and any modifications or additions
|
51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
55 |
+
means any form of electronic, verbal, or written communication sent
|
56 |
+
to the Licensor or its representatives, including but not limited to
|
57 |
+
communication on electronic mailing lists, source code control systems,
|
58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
60 |
+
excluding communication that is conspicuously marked or otherwise
|
61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
62 |
+
|
63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
65 |
+
subsequently incorporated within the Work.
|
66 |
+
|
67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
72 |
+
Work and such Derivative Works in Source or Object form.
|
73 |
+
|
74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77 |
+
(except as stated in this section) patent license to make, have made,
|
78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79 |
+
where such license applies only to those patent claims licensable
|
80 |
+
by such Contributor that are necessarily infringed by their
|
81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
83 |
+
institute patent litigation against any entity (including a
|
84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85 |
+
or a Contribution incorporated within the Work constitutes direct
|
86 |
+
or contributory patent infringement, then any patent licenses
|
87 |
+
granted to You under this License for that Work shall terminate
|
88 |
+
as of the date such litigation is filed.
|
89 |
+
|
90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
91 |
+
Work or Derivative Works thereof in any medium, with or without
|
92 |
+
modifications, and in Source or Object form, provided that You
|
93 |
+
meet the following conditions:
|
94 |
+
|
95 |
+
(a) You must give any other recipients of the Work or
|
96 |
+
Derivative Works a copy of this License; and
|
97 |
+
|
98 |
+
(b) You must cause any modified files to carry prominent notices
|
99 |
+
stating that You changed the files; and
|
100 |
+
|
101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
102 |
+
that You distribute, all copyright, patent, trademark, and
|
103 |
+
attribution notices from the Source form of the Work,
|
104 |
+
excluding those notices that do not pertain to any part of
|
105 |
+
the Derivative Works; and
|
106 |
+
|
107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108 |
+
distribution, then any Derivative Works that You distribute must
|
109 |
+
include a readable copy of the attribution notices contained
|
110 |
+
within such NOTICE file, excluding those notices that do not
|
111 |
+
pertain to any part of the Derivative Works, in at least one
|
112 |
+
of the following places: within a NOTICE text file distributed
|
113 |
+
as part of the Derivative Works; within the Source form or
|
114 |
+
documentation, if provided along with the Derivative Works; or,
|
115 |
+
within a display generated by the Derivative Works, if and
|
116 |
+
wherever such third-party notices normally appear. The contents
|
117 |
+
of the NOTICE file are for informational purposes only and
|
118 |
+
do not modify the License. You may add Your own attribution
|
119 |
+
notices within Derivative Works that You distribute, alongside
|
120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
121 |
+
that such additional attribution notices cannot be construed
|
122 |
+
as modifying the License.
|
123 |
+
|
124 |
+
You may add Your own copyright statement to Your modifications and
|
125 |
+
may provide additional or different license terms and conditions
|
126 |
+
for use, reproduction, or distribution of Your modifications, or
|
127 |
+
for any such Derivative Works as a whole, provided Your use,
|
128 |
+
reproduction, and distribution of the Work otherwise complies with
|
129 |
+
the conditions stated in this License.
|
130 |
+
|
131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
133 |
+
by You to the Licensor shall be under the terms and conditions of
|
134 |
+
this License, without any additional terms or conditions.
|
135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136 |
+
the terms of any separate license agreement you may have executed
|
137 |
+
with Licensor regarding such Contributions.
|
138 |
+
|
139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
141 |
+
except as required for reasonable and customary use in describing the
|
142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
143 |
+
|
144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145 |
+
agreed to in writing, Licensor provides the Work (and each
|
146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148 |
+
implied, including, without limitation, any warranties or conditions
|
149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151 |
+
appropriateness of using or redistributing the Work and assume any
|
152 |
+
risks associated with Your exercise of permissions under this License.
|
153 |
+
|
154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
155 |
+
whether in tort (including negligence), contract, or otherwise,
|
156 |
+
unless required by applicable law (such as deliberate and grossly
|
157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158 |
+
liable to You for damages, including any direct, indirect, special,
|
159 |
+
incidental, or consequential damages of any character arising as a
|
160 |
+
result of this License or out of the use or inability to use the
|
161 |
+
Work (including but not limited to damages for loss of goodwill,
|
162 |
+
work stoppage, computer failure or malfunction, or any and all
|
163 |
+
other commercial damages or losses), even if such Contributor
|
164 |
+
has been advised of the possibility of such damages.
|
165 |
+
|
166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169 |
+
or other liability obligations and/or rights consistent with this
|
170 |
+
License. However, in accepting such obligations, You may act only
|
171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172 |
+
of any other Contributor, and only if You agree to indemnify,
|
173 |
+
defend, and hold each Contributor harmless for any liability
|
174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
175 |
+
of your accepting any such warranty or additional liability.
|
176 |
+
|
177 |
+
END OF TERMS AND CONDITIONS
|
vendor/vimeo/vimeo-api/README.md
ADDED
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# <img src="https://user-images.githubusercontent.com/33762/33720344-abc20bb8-db31-11e7-8362-59a4985aeff0.png" width="250" />
|
2 |
+
|
3 |
+
[![Packagist](https://img.shields.io/packagist/v/vimeo/vimeo-api.svg?style=flat-square)](https://packagist.org/packages/vimeo/vimeo-api)
|
4 |
+
[![License](https://img.shields.io/packagist/l/vimeo/vimeo-api.svg?style=flat-square)](https://packagist.org/packages/vimeo/vimeo-api)
|
5 |
+
[![Travis CI](https://img.shields.io/travis/vimeo/vimeo.php.svg?style=flat-square)](https://travis-ci.org/vimeo/vimeo.php)
|
6 |
+
[![StyleCI](https://styleci.io/repos/9654006/shield?style=flat-square)](https://styleci.io/repos/9654006/)
|
7 |
+
|
8 |
+
This is a simple PHP library for interacting with the [Vimeo API](https://developers.vimeo.com).
|
9 |
+
|
10 |
+
- [Get Started](#get-started-with-the-vimeo-api)
|
11 |
+
- [Help](#direct-help)
|
12 |
+
- [Troubleshooting](#troubleshooting)
|
13 |
+
- [Installation](#installation)
|
14 |
+
- [Usage](#usage)
|
15 |
+
- [Authentication / Access Tokens](#generate-your-access-token)
|
16 |
+
- [Unauthenticated tokens](#unauthenticated)
|
17 |
+
- [Authenticated tokens](#authenticated)
|
18 |
+
- [Make requests](#make-requests)
|
19 |
+
- [Uploading videos](#uploading-videos)
|
20 |
+
- [Upload videos from a server](#upload-videos-from-the-server)
|
21 |
+
- [Replace videos from a server](#replace-videos-from-the-server)
|
22 |
+
- [Client side uploads](#upload-or-replace-videos-from-the-client)
|
23 |
+
- [Upload videos from a URL](#upload-videos-from-a-url)
|
24 |
+
- [Upload images](#upload-images)
|
25 |
+
- [Framework integrations](#framework-integrations)
|
26 |
+
|
27 |
+
## Get started with the Vimeo API
|
28 |
+
|
29 |
+
There is a lot of information about the Vimeo API at <https://developer.vimeo.com/api/start>. Most of your questions will be answered there!
|
30 |
+
|
31 |
+
## Direct Help
|
32 |
+
|
33 |
+
* [Stack Overflow](http://stackoverflow.com/questions/tagged/vimeo-api)
|
34 |
+
* [Google Group](https://groups.google.com/forum/#!forum/vimeo-api)
|
35 |
+
* [Vimeo Support](https://vimeo.com/help/contact)
|
36 |
+
|
37 |
+
#### NOTE: How to use the PHP library with Vimeo dot notation documentation.
|
38 |
+
|
39 |
+
The API docs often uses dot notation to represent a hierarchy of data (eg. privacy.view). Because this library sends all data using JSON, you must use nested associative arrays, not dot notation.
|
40 |
+
|
41 |
+
```php
|
42 |
+
// The documentation refers to the following as `privacy.view`
|
43 |
+
$params = ['privacy' => ['view' => 'disable']];
|
44 |
+
```
|
45 |
+
|
46 |
+
## Installation
|
47 |
+
### Composer
|
48 |
+
|
49 |
+
1. Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.
|
50 |
+
|
51 |
+
```bash
|
52 |
+
composer require vimeo/vimeo-api
|
53 |
+
```
|
54 |
+
|
55 |
+
2. Use the library `$lib = new \Vimeo\Vimeo($client_id, $client_secret)`
|
56 |
+
|
57 |
+
### Manual
|
58 |
+
|
59 |
+
1. Download the latest release : [v2.0.0](https://github.com/vimeo/vimeo.php/archive/2.0.0.zip)
|
60 |
+
2. Include the autoloader `require("/path/to/vimeo.php/autoload.php");`
|
61 |
+
3. Use the library `$lib = new \Vimeo\Vimeo($client_id, $client_secret)`
|
62 |
+
|
63 |
+
## Usage
|
64 |
+
### Generate your access token
|
65 |
+
|
66 |
+
All requests require access tokens. There are two types of access tokens.
|
67 |
+
|
68 |
+
- [Unauthenticated](#unauthenticated) - Access tokens without a user. These tokens can only view public data
|
69 |
+
- [Authenticated](#authenticated) - Access tokens with a user. These tokens interact on behalf of the authenticated user.
|
70 |
+
|
71 |
+
#### Unauthenticated
|
72 |
+
|
73 |
+
Unauthenticated API requests must generate an access token. You should not generate a new access token for each request, you should request an access token once and use it forever.
|
74 |
+
|
75 |
+
```php
|
76 |
+
// `scope` is an array of permissions your token needs to access.
|
77 |
+
// You can read more at https://developer.vimeo.com/api/authentication#supported-scopes
|
78 |
+
$token = $lib->clientCredentials(scope);
|
79 |
+
|
80 |
+
// usable access token
|
81 |
+
var_dump($token['body']['access_token']);
|
82 |
+
|
83 |
+
// accepted scopes
|
84 |
+
var_dump($token['body']['scope']);
|
85 |
+
|
86 |
+
// use the token
|
87 |
+
$lib->setToken($token['body']['access_token']);
|
88 |
+
```
|
89 |
+
|
90 |
+
#### Authenticated
|
91 |
+
|
92 |
+
1. Build a link to Vimeo so your users can authorize your app.
|
93 |
+
|
94 |
+
```php
|
95 |
+
$url = $lib->buildAuthorizationEndpoint($redirect_uri, $scopes, $state)
|
96 |
+
```
|
97 |
+
|
98 |
+
Name | Type | Description
|
99 |
+
---------------|----------|------------
|
100 |
+
`redirect_uri` | string | The uri the user is redirected to in step 3. This value must be provided to every step of the authorization process including creating your app, building your authorization endpoint and exchanging your authorization code for an access token.
|
101 |
+
`scope` | array | An array of permissions your token needs to access. You can read more at https://developer.vimeo.com/api/authentication#supported-scopes.
|
102 |
+
`state` | string | A value unique to this authorization request. You should generate it randomly, and validate it in step 3.
|
103 |
+
|
104 |
+
2. Your user will need to access the authorization endpoint (either by clicking the link or through a redirect). On the authorization endpoint the user will have the option to deny your app any scopes you have requested. If they deny your app, they will be redirected back to your `redirect_url` with an `error` parameter.
|
105 |
+
|
106 |
+
3. If the user accepts your app, they will be redirected back to your `redirect_uri` with a `code` and `state` query parameter (eg. http://yourredirect.com?code=abc&state=xyz).
|
107 |
+
1. You must validate that the `state` matches your state from step 1.
|
108 |
+
2. If the state is valid, you can exchange your code and `redirect_uri` for an access token.
|
109 |
+
|
110 |
+
```php
|
111 |
+
// `redirect_uri` must be provided, and must match your configured URI
|
112 |
+
$token = $lib->accessToken(code, redirect_uri);
|
113 |
+
|
114 |
+
// Usable access token
|
115 |
+
var_dump($token['body']['access_token']);
|
116 |
+
|
117 |
+
// Accepted scopes
|
118 |
+
var_dump($token['body']['scope']);
|
119 |
+
|
120 |
+
// Set the token
|
121 |
+
$lib->setToken($token['body']['access_token']);
|
122 |
+
```
|
123 |
+
|
124 |
+
For additional information, check out the [example](https://github.com/vimeo/vimeo.php/blob/master/example/auth.php)
|
125 |
+
|
126 |
+
### Make requests
|
127 |
+
|
128 |
+
The API library has a `request` method which takes three parameters. It returns an associative array containing all of the relvant request information.
|
129 |
+
|
130 |
+
#### Usage
|
131 |
+
|
132 |
+
Name | Type | Description
|
133 |
+
----------|----------|------------
|
134 |
+
`url` | string | The URL path (e.g.: `/users/dashron`).
|
135 |
+
`params` | string | An object containing all of your parameters (e.g.: `{ "per_page": 5, "filter" : "featured"}` ).
|
136 |
+
`method` | string | The HTTP method (e.g.: `GET`).
|
137 |
+
|
138 |
+
```php
|
139 |
+
$response = $lib->request('/me/videos', ['per_page' => 2], 'GET');
|
140 |
+
```
|
141 |
+
|
142 |
+
#### Response
|
143 |
+
|
144 |
+
The response array will contain three keys.
|
145 |
+
|
146 |
+
Name | Type | Description
|
147 |
+
-----------|--------|------------
|
148 |
+
`body` | array | The parsed request body. All responses are JSON so we parse this for you, and give you the result.
|
149 |
+
`status` | number | The HTTP status code of the response. This partially informs you about the success of your API request.
|
150 |
+
`headers` | array | An associative array containing all of the response headers.
|
151 |
+
|
152 |
+
```php
|
153 |
+
$response = $lib->request('/me/videos', ['per_page' => 2], 'GET');
|
154 |
+
var_dump($response['body']);
|
155 |
+
```
|
156 |
+
|
157 |
+
### Uploading videos
|
158 |
+
#### Upload videos from the server
|
159 |
+
|
160 |
+
To upload videos you must call the `upload` method. It accepts two parameters. It will return the URI of the new video.
|
161 |
+
|
162 |
+
Internally, this library will execute a `tus` upload approach and send a file to the server with the [tus](https://tus.io/) upload protocol.
|
163 |
+
|
164 |
+
For more information check out the [example](https://github.com/vimeo/vimeo.php/blob/master/example/upload.php)
|
165 |
+
|
166 |
+
Name | Type | Description
|
167 |
+
---------|---------|------------
|
168 |
+
`file` | string | Full path to the upload file on the local system.
|
169 |
+
`params` | array | Parameters to send when creating a new video (name, privacy restrictions, etc.). See the [`/me/videos` documentation](https://developer.vimeo.com/api/endpoints/videos#POST/users/{user_id}/videos) for supported parameters.
|
170 |
+
|
171 |
+
```php
|
172 |
+
$response = $lib->upload('/home/aaron/Downloads/ada.mp4')
|
173 |
+
|
174 |
+
// With parameters.
|
175 |
+
$response = $lib->upload('/home/aaron/Downloads/ada.mp4', [
|
176 |
+
'name' => 'Ada',
|
177 |
+
'privacy' => [
|
178 |
+
'view' => 'anybody'
|
179 |
+
]
|
180 |
+
])
|
181 |
+
```
|
182 |
+
|
183 |
+
#### Replace videos from the server
|
184 |
+
|
185 |
+
To replace the source file of a video, you must call the `replace` method. It accepts two parameters. It will return the URI of the replaced video.
|
186 |
+
|
187 |
+
Name | Type | Description
|
188 |
+
------------|----------|------------
|
189 |
+
`video_uri` | string | The URI of the original video. Once uploaded and successfully transcoded your source video file will be swapped with this new video file.
|
190 |
+
`file` | string | Full path to the upload file on the local system.
|
191 |
+
|
192 |
+
```php
|
193 |
+
$response = $lib->replace('/videos/12345', '/home/aaron/Downloads/ada-v2.mp4')
|
194 |
+
```
|
195 |
+
|
196 |
+
#### Upload or replace videos from the client
|
197 |
+
|
198 |
+
To upload from the client, you will have to mix some server side, and client side API requests. We support two workflows, the first of which is much easier than the second.
|
199 |
+
|
200 |
+
##### Simple POST uploads
|
201 |
+
|
202 |
+
This workflow is well documented on Vimeo's developer site. You can read more here: <https://developer.vimeo.com/api/upload/videos#simple-upload>
|
203 |
+
|
204 |
+
##### Streaming uploads
|
205 |
+
|
206 |
+
Streaming uploads support progress bars, and resumable uploading. If you want to perform these uploads client side you will need to start with some server side requests.
|
207 |
+
|
208 |
+
Read through the [Vimeo documentation](https://developer.vimeo.com/api/upload/videos#resumable-upload) first. Step 1 and 4 should be performed on the server, while step 2 and 3 can be performed on the client. With this workflow the video will never be transferred to your servers.
|
209 |
+
|
210 |
+
#### Upload videos from a url
|
211 |
+
|
212 |
+
Uploading videos from a public url (also called "pull uploads") uses a single, simple API call.
|
213 |
+
|
214 |
+
```php
|
215 |
+
$video_response = $lib->request(
|
216 |
+
'/me/videos',
|
217 |
+
[
|
218 |
+
'upload' => ['approach' => 'pull'],
|
219 |
+
'link' => $url
|
220 |
+
],
|
221 |
+
'POST'
|
222 |
+
);
|
223 |
+
```
|
224 |
+
|
225 |
+
### Upload images
|
226 |
+
|
227 |
+
To upload an image, call the `uploadImage` method. It takes three parameters.
|
228 |
+
|
229 |
+
For more information check out the [example](https://github.com/vimeo/vimeo.php/blob/master/example/upload_image.php)
|
230 |
+
|
231 |
+
Name | Type | Description
|
232 |
+
---------------|----------|------------
|
233 |
+
`pictures_uri` | string | The URI to the pictures collection for a single resource. eg. `/videos/12345/pictures`. You can always find this in the resource representation.
|
234 |
+
`file` | string | Full path to the upload file on the local system.
|
235 |
+
`activate` | boolean | (Optional) Defaults to `false`. If true this picture will become the default picture for the associated resource.
|
236 |
+
|
237 |
+
```php
|
238 |
+
$response = $lib->uploadImage('/videos/12345/pictures', '/home/aaron/Downloads/ada.png', true)
|
239 |
+
```
|
240 |
+
|
241 |
+
## Troubleshooting
|
242 |
+
|
243 |
+
If you have any questions or problems, create a [ticket](https://github.com/vimeo/vimeo.php/issues) or [contact us](https://vimeo.com/help/contact)
|
244 |
+
|
245 |
+
## Framework integrations
|
246 |
+
|
247 |
+
- **WordPress** - <http://vimeography.com/>
|
248 |
+
- **Laravel** - <https://github.com/vinkla/vimeo>
|
249 |
+
|
250 |
+
If you have integrated Vimeo into a popular PHP framework let us know!
|
251 |
+
|
252 |
+
## Contributors
|
253 |
+
|
254 |
+
To see the contributors please visit the [contributors graph](https://github.com/vimeo/vimeo.php/graphs/contributors).
|
vendor/vimeo/vimeo-api/autoload.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright 2014 Vimeo
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*/
|
17 |
+
|
18 |
+
spl_autoload_register(function ($class) {
|
19 |
+
// Make sure that the class being loaded is in the vimeo namespace
|
20 |
+
if (substr(strtolower($class), 0, 6) !== 'vimeo\\') {
|
21 |
+
return;
|
22 |
+
}
|
23 |
+
|
24 |
+
// Locate and load the file that contains the class
|
25 |
+
$path = __DIR__ . '/src/' . str_replace('\\', '/', $class) . '.php';
|
26 |
+
if (file_exists($path)) {
|
27 |
+
require($path);
|
28 |
+
}
|
29 |
+
});
|
vendor/vimeo/vimeo-api/certificates/vimeo-api.pem
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-----BEGIN CERTIFICATE-----
|
2 |
+
MIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBh
|
3 |
+
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
4 |
+
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
|
5 |
+
QTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgxMjAwMDBaME0xCzAJBgNVBAYTAlVT
|
6 |
+
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRpZ2lDZXJ0IFNIQTIg
|
7 |
+
U2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
|
8 |
+
ANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83
|
9 |
+
nf36QYSvx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bd
|
10 |
+
KpPDkC55gIDvEwRqFDu1m5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f
|
11 |
+
/ld0Uzs1gN2ujkSYs58O09rg1/RrKatEp0tYhG2SS4HD2nOLEpdIkARFdRrdNzGX
|
12 |
+
kujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJTvOX6+guqw9ypzAO+sf0
|
13 |
+
/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB/wQIMAYBAf8C
|
14 |
+
AQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYY
|
15 |
+
aHR0cDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6
|
16 |
+
Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwN6A1
|
17 |
+
oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RD
|
18 |
+
QS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8v
|
19 |
+
d3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHVLyjnjUY4tCzh
|
20 |
+
xtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0GCSqGSIb3DQEB
|
21 |
+
CwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHgl4+mUwnNqipl
|
22 |
+
5TlPHoOlblyYoiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZgTHbO7Djc1lGA
|
23 |
+
8MXW5dRNJ2Srm8c+cftIl7gzbckTB+6WohsYFfZcTEDts8Ls/3HB40f/1LkAtDdC
|
24 |
+
2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8sjX7tN8Cp1Tm5gr8ZDOo0rwAhaPit
|
25 |
+
c+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopYJeS4d60tbvVS3bR0
|
26 |
+
j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLz
|
27 |
+
-----END CERTIFICATE-----
|
28 |
+
|
29 |
+
-----BEGIN CERTIFICATE-----
|
30 |
+
MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG
|
31 |
+
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
|
32 |
+
HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw
|
33 |
+
MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
|
34 |
+
dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq
|
35 |
+
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn
|
36 |
+
TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5
|
37 |
+
BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H
|
38 |
+
4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y
|
39 |
+
7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB
|
40 |
+
o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm
|
41 |
+
8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF
|
42 |
+
BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr
|
43 |
+
EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt
|
44 |
+
tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
|
45 |
+
UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
|
46 |
+
CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
|
47 |
+
-----END CERTIFICATE-----
|
vendor/vimeo/vimeo-api/src/Vimeo/Exceptions/ExceptionInterface.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Vimeo\Exceptions;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* ExceptionInterface
|
6 |
+
*/
|
7 |
+
interface ExceptionInterface
|
8 |
+
{
|
9 |
+
}
|
vendor/vimeo/vimeo-api/src/Vimeo/Exceptions/VimeoRequestException.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Vimeo\Exceptions;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* VimeoRequestException class for failure to make request.
|
6 |
+
*/
|
7 |
+
class VimeoRequestException extends \Exception implements ExceptionInterface
|
8 |
+
{
|
9 |
+
}
|
vendor/vimeo/vimeo-api/src/Vimeo/Exceptions/VimeoUploadException.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Vimeo\Exceptions;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* VimeoUploadException class for failure to upload to the server.
|
6 |
+
*/
|
7 |
+
class VimeoUploadException extends \Exception implements ExceptionInterface
|
8 |
+
{
|
9 |
+
}
|
vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php
ADDED
@@ -0,0 +1,598 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Vimeo;
|
3 |
+
|
4 |
+
use Vimeo\Exceptions\VimeoRequestException;
|
5 |
+
use Vimeo\Exceptions\VimeoUploadException;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Copyright 2013 Vimeo
|
9 |
+
*
|
10 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
11 |
+
* you may not use this file except in compliance with the License.
|
12 |
+
* You may obtain a copy of the License at
|
13 |
+
*
|
14 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
15 |
+
*
|
16 |
+
* Unless required by applicable law or agreed to in writing, software
|
17 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
18 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19 |
+
* See the License for the specific language governing permissions and
|
20 |
+
* limitations under the License.
|
21 |
+
*/
|
22 |
+
|
23 |
+
if (!function_exists('json_decode')) {
|
24 |
+
throw new \Exception('We could not find json_decode. json_decode is found in php 5.2 and up, but may be missing on some Linux systems due to licensing conflicts. If you are running ubuntu try "sudo apt-get install php5-json".');
|
25 |
+
}
|
26 |
+
|
27 |
+
class Vimeo
|
28 |
+
{
|
29 |
+
const ROOT_ENDPOINT = 'https://api.vimeo.com';
|
30 |
+
const AUTH_ENDPOINT = 'https://api.vimeo.com/oauth/authorize';
|
31 |
+
const ACCESS_TOKEN_ENDPOINT = '/oauth/access_token';
|
32 |
+
const CLIENT_CREDENTIALS_TOKEN_ENDPOINT = '/oauth/authorize/client';
|
33 |
+
const VERSIONS_ENDPOINT = '/versions';
|
34 |
+
const VERSION_STRING = 'application/vnd.vimeo.*+json; version=3.4';
|
35 |
+
const USER_AGENT = 'vimeo.php 2.0.0; (http://developer.vimeo.com/api/docs)';
|
36 |
+
const CERTIFICATE_PATH = '/certificates/vimeo-api.pem';
|
37 |
+
|
38 |
+
protected $_curl_opts = array();
|
39 |
+
protected $CURL_DEFAULTS = array();
|
40 |
+
|
41 |
+
private $_client_id = null;
|
42 |
+
private $_client_secret = null;
|
43 |
+
private $_access_token = null;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Creates the Vimeo library, and tracks the client and token information.
|
47 |
+
*
|
48 |
+
* @param string $client_id Your applications client id. Can be found on developer.vimeo.com/apps
|
49 |
+
* @param string $client_secret Your applications client secret. Can be found on developer.vimeo.com/apps
|
50 |
+
* @param string $access_token Your applications client id. Can be found on developer.vimeo.com/apps or generated using OAuth 2.
|
51 |
+
*/
|
52 |
+
public function __construct($client_id, $client_secret, $access_token = null)
|
53 |
+
{
|
54 |
+
$this->_client_id = $client_id;
|
55 |
+
$this->_client_secret = $client_secret;
|
56 |
+
$this->_access_token = $access_token;
|
57 |
+
$this->CURL_DEFAULTS = array(
|
58 |
+
CURLOPT_HEADER => 1,
|
59 |
+
CURLOPT_RETURNTRANSFER => true,
|
60 |
+
CURLOPT_TIMEOUT => 30,
|
61 |
+
CURLOPT_SSL_VERIFYPEER => true,
|
62 |
+
//Certificate must indicate that the server is the server to which you meant to connect.
|
63 |
+
CURLOPT_SSL_VERIFYHOST => 2,
|
64 |
+
CURLOPT_CAINFO => realpath(__DIR__ .'/../..') . self::CERTIFICATE_PATH
|
65 |
+
);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Make an API request to Vimeo.
|
70 |
+
*
|
71 |
+
* @param string $url A Vimeo API Endpoint. Should not include the host
|
72 |
+
* @param array $params An array of parameters to send to the endpoint. If the HTTP method is GET, they will be added to the url, otherwise they will be written to the body
|
73 |
+
* @param string $method The HTTP Method of the request
|
74 |
+
* @param bool $json_body
|
75 |
+
* @param array $headers An array of HTTP headers to pass along with the request.
|
76 |
+
* @return array This array contains three keys, 'status' is the status code, 'body' is an object representation of the json response body, and headers are an associated array of response headers
|
77 |
+
*/
|
78 |
+
public function request($url, $params = array(), $method = 'GET', $json_body = true, array $headers = array())
|
79 |
+
{
|
80 |
+
$headers = array_merge(array(
|
81 |
+
'Accept' => self::VERSION_STRING,
|
82 |
+
'User-Agent' => self::USER_AGENT,
|
83 |
+
), $headers);
|
84 |
+
|
85 |
+
$method = strtoupper($method);
|
86 |
+
|
87 |
+
// add bearer token, or client information
|
88 |
+
if (!empty($this->_access_token)) {
|
89 |
+
$headers['Authorization'] = 'Bearer ' . $this->_access_token;
|
90 |
+
} else {
|
91 |
+
// this may be a call to get the tokens, so we add the client info.
|
92 |
+
$headers['Authorization'] = 'Basic ' . $this->_authHeader();
|
93 |
+
}
|
94 |
+
|
95 |
+
// Set the methods, determine the URL that we should actually request and prep the body.
|
96 |
+
$curl_opts = array();
|
97 |
+
switch ($method) {
|
98 |
+
case 'GET':
|
99 |
+
if (!empty($params)) {
|
100 |
+
$query_component = '?' . http_build_query($params, '', '&');
|
101 |
+
} else {
|
102 |
+
$query_component = '';
|
103 |
+
}
|
104 |
+
|
105 |
+
$curl_url = self::ROOT_ENDPOINT . $url . $query_component;
|
106 |
+
break;
|
107 |
+
|
108 |
+
case 'POST':
|
109 |
+
case 'PATCH':
|
110 |
+
case 'PUT':
|
111 |
+
case 'DELETE':
|
112 |
+
if ($json_body && !empty($params)) {
|
113 |
+
$headers['Content-Type'] = 'application/json';
|
114 |
+
$body = json_encode($params);
|
115 |
+
} else {
|
116 |
+
$body = http_build_query($params, '', '&');
|
117 |
+
}
|
118 |
+
|
119 |
+
$curl_url = self::ROOT_ENDPOINT . $url;
|
120 |
+
$curl_opts = array(
|
121 |
+
CURLOPT_POST => true,
|
122 |
+
CURLOPT_CUSTOMREQUEST => $method,
|
123 |
+
CURLOPT_POSTFIELDS => $body
|
124 |
+
);
|
125 |
+
break;
|
126 |
+
}
|
127 |
+
|
128 |
+
// Set the headers
|
129 |
+
foreach ($headers as $key => $value) {
|
130 |
+
$curl_opts[CURLOPT_HTTPHEADER][] = sprintf('%s: %s', $key, $value);
|
131 |
+
}
|
132 |
+
|
133 |
+
$response = $this->_request($curl_url, $curl_opts);
|
134 |
+
|
135 |
+
$response['body'] = json_decode($response['body'], true);
|
136 |
+
|
137 |
+
return $response;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Request the access token associated with this library.
|
142 |
+
*
|
143 |
+
* @return string
|
144 |
+
*/
|
145 |
+
public function getToken()
|
146 |
+
{
|
147 |
+
return $this->_access_token;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Assign a new access token to this library.
|
152 |
+
*
|
153 |
+
* @param string $access_token the new access token
|
154 |
+
*/
|
155 |
+
public function setToken($access_token)
|
156 |
+
{
|
157 |
+
$this->_access_token = $access_token;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Sets custom cURL options.
|
162 |
+
*
|
163 |
+
* @param array $curl_opts An associative array of cURL options.
|
164 |
+
*/
|
165 |
+
public function setCURLOptions($curl_opts = array())
|
166 |
+
{
|
167 |
+
$this->_curl_opts = $curl_opts;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Convert the raw headers string into an associated array
|
172 |
+
*
|
173 |
+
* @param string $headers
|
174 |
+
* @return array
|
175 |
+
*/
|
176 |
+
public static function parse_headers($headers)
|
177 |
+
{
|
178 |
+
$final_headers = array();
|
179 |
+
$list = explode("\n", trim($headers));
|
180 |
+
|
181 |
+
$http = array_shift($list);
|
182 |
+
|
183 |
+
foreach ($list as $header) {
|
184 |
+
$parts = explode(':', $header, 2);
|
185 |
+
$final_headers[trim($parts[0])] = isset($parts[1]) ? trim($parts[1]) : '';
|
186 |
+
}
|
187 |
+
|
188 |
+
return $final_headers;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Request an access token. This is the final step of the
|
193 |
+
* OAuth 2 workflow, and should be called from your redirect url.
|
194 |
+
*
|
195 |
+
* @param string $code The authorization code that was provided to your redirect url
|
196 |
+
* @param string $redirect_uri The redirect_uri that is configured on your app page, and was used in buildAuthorizationEndpoint
|
197 |
+
* @return array This array contains three keys, 'status' is the status code, 'body' is an object representation of the json response body, and headers are an associated array of response headers
|
198 |
+
*/
|
199 |
+
public function accessToken($code, $redirect_uri)
|
200 |
+
{
|
201 |
+
return $this->request(self::ACCESS_TOKEN_ENDPOINT, array(
|
202 |
+
'grant_type' => 'authorization_code',
|
203 |
+
'code' => $code,
|
204 |
+
'redirect_uri' => $redirect_uri
|
205 |
+
), "POST", false);
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Get client credentials for requests.
|
210 |
+
*
|
211 |
+
* @param mixed $scope Scopes to request for this token from the server.
|
212 |
+
* @return array Response from the server with the tokens, we also set it into this object.
|
213 |
+
*/
|
214 |
+
public function clientCredentials($scope = 'public')
|
215 |
+
{
|
216 |
+
if (is_array($scope)) {
|
217 |
+
$scope = implode(' ', $scope);
|
218 |
+
}
|
219 |
+
|
220 |
+
$token_response = $this->request(self::CLIENT_CREDENTIALS_TOKEN_ENDPOINT, array(
|
221 |
+
'grant_type' => 'client_credentials',
|
222 |
+
'scope' => $scope
|
223 |
+
), "POST", false);
|
224 |
+
|
225 |
+
return $token_response;
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Build the url that your user.
|
230 |
+
*
|
231 |
+
* @param string $redirect_uri The redirect url that you have configured on your app page
|
232 |
+
* @param string $scope An array of scopes that your final access token needs to access
|
233 |
+
* @param string $state A random variable that will be returned on your redirect url. You should validate that this matches
|
234 |
+
* @return string
|
235 |
+
*/
|
236 |
+
public function buildAuthorizationEndpoint($redirect_uri, $scope = 'public', $state = null)
|
237 |
+
{
|
238 |
+
$query = array(
|
239 |
+
"response_type" => 'code',
|
240 |
+
"client_id" => $this->_client_id,
|
241 |
+
"redirect_uri" => $redirect_uri
|
242 |
+
);
|
243 |
+
|
244 |
+
$query['scope'] = $scope;
|
245 |
+
if (empty($scope)) {
|
246 |
+
$query['scope'] = 'public';
|
247 |
+
} elseif (is_array($scope)) {
|
248 |
+
$query['scope'] = implode(' ', $scope);
|
249 |
+
}
|
250 |
+
|
251 |
+
if (!empty($state)) {
|
252 |
+
$query['state'] = $state;
|
253 |
+
}
|
254 |
+
|
255 |
+
return self::AUTH_ENDPOINT . '?' . http_build_query($query);
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Upload a file.
|
260 |
+
*
|
261 |
+
* This should be used to upload a local file. If you want a form for your site to upload direct to Vimeo, you
|
262 |
+
* should look at the `POST /me/videos` endpoint.
|
263 |
+
*
|
264 |
+
* @link https://developer.vimeo.com/api/endpoints/videos#POST/users/{user_id}/videos
|
265 |
+
* @param string $file_path Path to the video file to upload.
|
266 |
+
* @param array $params Parameters to send when creating a new video (name, privacy restrictions, etc.).
|
267 |
+
* @throws VimeoUploadException
|
268 |
+
* @return string Video URI
|
269 |
+
*/
|
270 |
+
public function upload($file_path, array $params = array())
|
271 |
+
{
|
272 |
+
// Validate that our file is real.
|
273 |
+
if (!is_file($file_path)) {
|
274 |
+
throw new VimeoUploadException('Unable to locate file to upload.');
|
275 |
+
}
|
276 |
+
|
277 |
+
$file_size = filesize($file_path);
|
278 |
+
|
279 |
+
// If the user does not have enough free space in their quota to upload this, then don't.
|
280 |
+
$response = $this->request('/me', array('fields' => 'upload_quota.space.free'), 'GET');
|
281 |
+
if ($response['status'] !== 200) {
|
282 |
+
$error = !empty($response['body']['error']) ? ' [' . $response['body']['error'] . ']' : '';
|
283 |
+
throw new VimeoUploadException('Unable to pull the users upload quota.' . $error);
|
284 |
+
} elseif ($file_size > $response['body']['upload_quota']['space']['free']) {
|
285 |
+
throw new VimeoUploadException('User does not have any more free space to upload this video.');
|
286 |
+
}
|
287 |
+
|
288 |
+
// Ignore any specified upload approach and size.
|
289 |
+
$params['upload']['approach'] = 'tus';
|
290 |
+
$params['upload']['size'] = $file_size;
|
291 |
+
|
292 |
+
// Use JSON filtering so we only receive the data that we need to make an upload happen.
|
293 |
+
$uri = '/me/videos?fields=uri,upload';
|
294 |
+
|
295 |
+
$attempt = $this->request($uri, $params, 'POST');
|
296 |
+
if ($attempt['status'] !== 200) {
|
297 |
+
$attempt_error = !empty($attempt['body']['error']) ? ' [' . $attempt['body']['error'] . ']' : '';
|
298 |
+
throw new VimeoUploadException('Unable to initiate an upload.' . $attempt_error);
|
299 |
+
}
|
300 |
+
|
301 |
+
return $this->perform_upload_tus($file_path, $file_size, $attempt);
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Replace the source of a single Vimeo video.
|
306 |
+
*
|
307 |
+
* @link https://developer.vimeo.com/api/endpoints/videos#POST/videos/{video_id}/versions
|
308 |
+
* @param string $video_uri Video uri of the video file to replace.
|
309 |
+
* @param string $file_path Path to the video file to upload.
|
310 |
+
* @throws VimeoUploadException
|
311 |
+
* @return string Video URI
|
312 |
+
*/
|
313 |
+
public function replace($video_uri, $file_path, array $params = array())
|
314 |
+
{
|
315 |
+
// Validate that our file is real.
|
316 |
+
if (!is_file($file_path)) {
|
317 |
+
throw new VimeoUploadException('Unable to locate file to upload.');
|
318 |
+
}
|
319 |
+
|
320 |
+
$file_size = filesize($file_path);
|
321 |
+
|
322 |
+
// Use JSON filtering so we only receive the data that we need to make an upload happen.
|
323 |
+
$uri = $video_uri . self::VERSIONS_ENDPOINT . '?fields=upload';
|
324 |
+
|
325 |
+
// Ignore any specified upload approach and size.
|
326 |
+
$params['file_name'] = basename($file_path);
|
327 |
+
$params['upload']['approach'] = 'tus';
|
328 |
+
$params['upload']['size'] = $file_size;
|
329 |
+
|
330 |
+
$attempt = $this->request($uri, $params, 'POST');
|
331 |
+
if ($attempt['status'] !== 201) {
|
332 |
+
$attempt_error = !empty($attempt['body']['error']) ? ' [' . $attempt['body']['error'] . ']' : '';
|
333 |
+
throw new VimeoUploadException('Unable to initiate an upload.' . $attempt_error);
|
334 |
+
}
|
335 |
+
|
336 |
+
// `uri` doesn't come back from `/videos/:id/versions` so we need to manually set it here for uploading.
|
337 |
+
$attempt['body']['uri'] = $video_uri;
|
338 |
+
|
339 |
+
return $this->perform_upload_tus($file_path, $file_size, $attempt);
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Uploads an image to an individual picture response.
|
344 |
+
*
|
345 |
+
* @link https://developer.vimeo.com/api/upload/pictures
|
346 |
+
* @param string $pictures_uri The pictures endpoint for a resource that allows picture uploads (eg videos and users)
|
347 |
+
* @param string $file_path The path to your image file
|
348 |
+
* @param boolean $activate Activate image after upload
|
349 |
+
* @throws VimeoUploadException
|
350 |
+
* @return string The URI of the uploaded image.
|
351 |
+
*/
|
352 |
+
public function uploadImage($pictures_uri, $file_path, $activate = false)
|
353 |
+
{
|
354 |
+
// Validate that our file is real.
|
355 |
+
if (!is_file($file_path)) {
|
356 |
+
throw new VimeoUploadException('Unable to locate file to upload.');
|
357 |
+
}
|
358 |
+
|
359 |
+
$pictures_response = $this->request($pictures_uri, array(), 'POST');
|
360 |
+
if ($pictures_response['status'] !== 201) {
|
361 |
+
throw new VimeoUploadException('Unable to request an upload url from vimeo');
|
362 |
+
}
|
363 |
+
|
364 |
+
$upload_url = $pictures_response['body']['link'];
|
365 |
+
|
366 |
+
$image_resource = fopen($file_path, 'r');
|
367 |
+
|
368 |
+
$curl_opts = array(
|
369 |
+
CURLOPT_TIMEOUT => 240,
|
370 |
+
CURLOPT_UPLOAD => true,
|
371 |
+
CURLOPT_CUSTOMREQUEST => 'PUT',
|
372 |
+
CURLOPT_READDATA => $image_resource
|
373 |
+
);
|
374 |
+
|
375 |
+
$curl = curl_init($upload_url);
|
376 |
+
|
377 |
+
// Merge the options
|
378 |
+
curl_setopt_array($curl, $curl_opts + $this->CURL_DEFAULTS);
|
379 |
+
$response = curl_exec($curl);
|
380 |
+
$curl_info = curl_getinfo($curl);
|
381 |
+
|
382 |
+
if (!$response) {
|
383 |
+
$error = curl_error($curl);
|
384 |
+
throw new VimeoUploadException($error);
|
385 |
+
}
|
386 |
+
curl_close($curl);
|
387 |
+
|
388 |
+
if ($curl_info['http_code'] !== 200) {
|
389 |
+
throw new VimeoUploadException($response);
|
390 |
+
}
|
391 |
+
|
392 |
+
// Activate the uploaded image
|
393 |
+
if ($activate) {
|
394 |
+
$completion = $this->request($pictures_response['body']['uri'], array('active' => true), 'PATCH');
|
395 |
+
}
|
396 |
+
|
397 |
+
return $pictures_response['body']['uri'];
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Uploads a text track.
|
402 |
+
*
|
403 |
+
* @link https://developer.vimeo.com/api/upload/texttracks
|
404 |
+
* @param string $texttracks_uri The text tracks uri that we are adding our text track to
|
405 |
+
* @param string $file_path The path to your text track file
|
406 |
+
* @param string $track_type The type of your text track
|
407 |
+
* @param string $language The language of your text track
|
408 |
+
* @throws VimeoUploadException
|
409 |
+
* @return string The URI of the uploaded text track.
|
410 |
+
*/
|
411 |
+
public function uploadTexttrack($texttracks_uri, $file_path, $track_type, $language)
|
412 |
+
{
|
413 |
+
// Validate that our file is real.
|
414 |
+
if (!is_file($file_path)) {
|
415 |
+
throw new VimeoUploadException('Unable to locate file to upload.');
|
416 |
+
}
|
417 |
+
|
418 |
+
// To simplify the script we provide the filename as the text track name, but you can provide any value you want.
|
419 |
+
$name = array_slice(explode("/", $file_path), -1);
|
420 |
+
$name = $name[0];
|
421 |
+
|
422 |
+
$texttrack_response = $this->request($texttracks_uri, array('type' => $track_type, 'language' => $language, 'name' => $name), 'POST');
|
423 |
+
|
424 |
+
if ($texttrack_response['status'] !== 201) {
|
425 |
+
throw new VimeoUploadException('Unable to request an upload url from vimeo');
|
426 |
+
}
|
427 |
+
|
428 |
+
$upload_url = $texttrack_response['body']['link'];
|
429 |
+
|
430 |
+
$texttrack_resource = fopen($file_path, 'r');
|
431 |
+
|
432 |
+
$curl_opts = array(
|
433 |
+
CURLOPT_TIMEOUT => 240,
|
434 |
+
CURLOPT_UPLOAD => true,
|
435 |
+
CURLOPT_CUSTOMREQUEST => 'PUT',
|
436 |
+
CURLOPT_READDATA => $texttrack_resource
|
437 |
+
);
|
438 |
+
|
439 |
+
$curl = curl_init($upload_url);
|
440 |
+
|
441 |
+
// Merge the options
|
442 |
+
curl_setopt_array($curl, $curl_opts + $this->CURL_DEFAULTS);
|
443 |
+
$response = curl_exec($curl);
|
444 |
+
$curl_info = curl_getinfo($curl);
|
445 |
+
|
446 |
+
if (!$response) {
|
447 |
+
$error = curl_error($curl);
|
448 |
+
throw new VimeoUploadException($error);
|
449 |
+
}
|
450 |
+
curl_close($curl);
|
451 |
+
|
452 |
+
if ($curl_info['http_code'] !== 200) {
|
453 |
+
throw new VimeoUploadException($response);
|
454 |
+
}
|
455 |
+
|
456 |
+
return $texttrack_response['body']['uri'];
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Internal function to handle requests, both authenticated and by the upload function.
|
461 |
+
*
|
462 |
+
* @param string $url
|
463 |
+
* @param array $curl_opts
|
464 |
+
* @return array
|
465 |
+
*/
|
466 |
+
private function _request($url, $curl_opts = array())
|
467 |
+
{
|
468 |
+
// Merge the options (custom options take precedence).
|
469 |
+
$curl_opts = $this->_curl_opts + $curl_opts + $this->CURL_DEFAULTS;
|
470 |
+
|
471 |
+
// Call the API.
|
472 |
+
$curl = curl_init($url);
|
473 |
+
curl_setopt_array($curl, $curl_opts);
|
474 |
+
$response = curl_exec($curl);
|
475 |
+
$curl_info = curl_getinfo($curl);
|
476 |
+
|
477 |
+
if (isset($curl_info['http_code']) && $curl_info['http_code'] === 0) {
|
478 |
+
$curl_error = curl_error($curl);
|
479 |
+
$curl_error = !empty($curl_error) ? ' [' . $curl_error .']' : '';
|
480 |
+
throw new VimeoRequestException('Unable to complete request.' . $curl_error);
|
481 |
+
}
|
482 |
+
|
483 |
+
curl_close($curl);
|
484 |
+
|
485 |
+
// Retrieve the info
|
486 |
+
$header_size = $curl_info['header_size'];
|
487 |
+
$headers = substr($response, 0, $header_size);
|
488 |
+
$body = substr($response, $header_size);
|
489 |
+
|
490 |
+
// Return it raw.
|
491 |
+
return array(
|
492 |
+
'body' => $body,
|
493 |
+
'status' => $curl_info['http_code'],
|
494 |
+
'headers' => self::parse_headers($headers)
|
495 |
+
);
|
496 |
+
}
|
497 |
+
|
498 |
+
/**
|
499 |
+
* Get authorization header for retrieving tokens/credentials.
|
500 |
+
*
|
501 |
+
* @return string
|
502 |
+
*/
|
503 |
+
private function _authHeader()
|
504 |
+
{
|
505 |
+
return base64_encode($this->_client_id . ':' . $this->_client_secret);
|
506 |
+
}
|
507 |
+
|
508 |
+
/**
|
509 |
+
* Take an upload attempt and perform the actual upload via tus.
|
510 |
+
*
|
511 |
+
* @link https://tus.io/
|
512 |
+
* @param string $file_path Path to the video file to upload
|
513 |
+
* @param int $file_size Size of the video file.
|
514 |
+
* @param array $attempt Upload attempt data.
|
515 |
+
* @return mixed
|
516 |
+
* @throws VimeoRequestException
|
517 |
+
* @throws VimeoUploadException
|
518 |
+
*/
|
519 |
+
private function perform_upload_tus($file_path, $file_size, $attempt)
|
520 |
+
{
|
521 |
+
$url = $attempt['body']['upload']['upload_link'];
|
522 |
+
|
523 |
+
// We need a handle on the input file since we may have to send segments multiple times.
|
524 |
+
$file = fopen($file_path, 'r');
|
525 |
+
|
526 |
+
$curl_opts = array(
|
527 |
+
CURLOPT_POST => true,
|
528 |
+
CURLOPT_CUSTOMREQUEST => 'PATCH',
|
529 |
+
CURLOPT_INFILE => $file,
|
530 |
+
CURLOPT_INFILESIZE => filesize($file_path),
|
531 |
+
CURLOPT_UPLOAD => true,
|
532 |
+
CURLOPT_HTTPHEADER => array(
|
533 |
+
'Expect: ',
|
534 |
+
'Content-Type: application/offset+octet-stream',
|
535 |
+
'Tus-Resumable: 1.0.0',
|
536 |
+
'Upload-Offset: {placeholder}',
|
537 |
+
)
|
538 |
+
);
|
539 |
+
|
540 |
+
// Perform the upload by sending as much to the server as possible and ending when we reach the file size on
|
541 |
+
// the server.
|
542 |
+
$failures = 0;
|
543 |
+
$server_at = 0;
|
544 |
+
do {
|
545 |
+
// The last HTTP header we set has to be `Upload-Offset`, since for resumable uploading to work properly,
|
546 |
+
// we'll need to alter the content of the header for each upload segment request.
|
547 |
+
array_pop($curl_opts[CURLOPT_HTTPHEADER]);
|
548 |
+
$curl_opts[CURLOPT_HTTPHEADER][] = 'Upload-Offset: ' . $server_at;
|
549 |
+
|
550 |
+
fseek($file, $server_at);
|
551 |
+
|
552 |
+
try {
|
553 |
+
$response = $this->_request($url, $curl_opts);
|
554 |
+
|
555 |
+
// Successful upload, so reset the failure counter.
|
556 |
+
$failures = 0;
|
557 |
+
|
558 |
+
if ($response['status'] === 204) {
|
559 |
+
// If the `Upload-Offset` returned is equal to the size of the video we want to upload, then we've
|
560 |
+
// fully uploaded the video. If not, continue uploading.
|
561 |
+
if ($response['headers']['Upload-Offset'] === $file_size) {
|
562 |
+
break;
|
563 |
+
}
|
564 |
+
|
565 |
+
$server_at = $response['headers']['Upload-Offset'];
|
566 |
+
continue;
|
567 |
+
}
|
568 |
+
|
569 |
+
// If we didn't receive a 204 response from the tus server, then we should verify what's going on before
|
570 |
+
// proceeding to upload more pieces.
|
571 |
+
$verify_response = $this->request($url, array(), 'HEAD');
|
572 |
+
if ($verify_response['status'] !== 200) {
|
573 |
+
$verify_error = !empty($ticket['body']) ? ' [' . $ticket['body'] . ']' : '';
|
574 |
+
throw new VimeoUploadException('Unable to verify upload' . $verify_error);
|
575 |
+
}
|
576 |
+
|
577 |
+
if ($verify_response['headers']['Upload-Offset'] === $file_size) {
|
578 |
+
break;
|
579 |
+
}
|
580 |
+
|
581 |
+
$server_at = $verify_response['headers']['Upload-Offset'];
|
582 |
+
} catch (VimeoRequestException $exception) {
|
583 |
+
// We likely experienced a timeout, but if we experience three in a row, then we should back off and
|
584 |
+
// fail so as to not overwhelm servers that are, probably, down.
|
585 |
+
if ($failures >= 3) {
|
586 |
+
throw $exception;
|
587 |
+
}
|
588 |
+
|
589 |
+
$failures++;
|
590 |
+
sleep(pow(4, $failures)); // sleep 4, 16, 64 seconds (based on failure count)
|
591 |
+
} catch (VimeoUploadException $exception) {
|
592 |
+
throw $exception;
|
593 |
+
}
|
594 |
+
} while ($server_at < $file_size);
|
595 |
+
|
596 |
+
return $attempt['body']['uri'];
|
597 |
+
}
|
598 |
+
}
|
yarn.lock
ADDED
@@ -0,0 +1,464 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
2 |
+
# yarn lockfile v1
|
3 |
+
|
4 |
+
|
5 |
+
ansi-styles@^3.1.0, ansi-styles@^3.2.0:
|
6 |
+
version "3.2.0"
|
7 |
+
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
|
8 |
+
dependencies:
|
9 |
+
color-convert "^1.9.0"
|
10 |
+
|
11 |
+
array-filter@~0.0.0:
|
12 |
+
version "0.0.1"
|
13 |
+
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
|
14 |
+
|
15 |
+
array-map@~0.0.0:
|
16 |
+
version "0.0.0"
|
17 |
+
resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
|
18 |
+
|
19 |
+
array-reduce@~0.0.0:
|
20 |
+
version "0.0.0"
|
21 |
+
resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
|
22 |
+
|
23 |
+
balanced-match@^1.0.0:
|
24 |
+
version "1.0.0"
|
25 |
+
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
26 |
+
|
27 |
+
brace-expansion@^1.1.7:
|
28 |
+
version "1.1.8"
|
29 |
+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
30 |
+
dependencies:
|
31 |
+
balanced-match "^1.0.0"
|
32 |
+
concat-map "0.0.1"
|
33 |
+
|
34 |
+
builtin-modules@^1.0.0:
|
35 |
+
version "1.1.1"
|
36 |
+
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
37 |
+
|
38 |
+
chalk@^2.1.0:
|
39 |
+
version "2.3.0"
|
40 |
+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
|
41 |
+
dependencies:
|
42 |
+
ansi-styles "^3.1.0"
|
43 |
+
escape-string-regexp "^1.0.5"
|
44 |
+
supports-color "^4.0.0"
|
45 |
+
|
46 |
+
clean-css-cli@^4.1.6:
|
47 |
+
version "4.1.10"
|
48 |
+
resolved "https://registry.yarnpkg.com/clean-css-cli/-/clean-css-cli-4.1.10.tgz#83624c9046341421875cc60a2894b382f7ca0ca6"
|
49 |
+
dependencies:
|
50 |
+
clean-css "^4.1.9"
|
51 |
+
commander "2.x"
|
52 |
+
glob "7.x"
|
53 |
+
|
54 |
+
clean-css@^4.1.9:
|
55 |
+
version "4.1.9"
|
56 |
+
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.9.tgz#35cee8ae7687a49b98034f70de00c4edd3826301"
|
57 |
+
dependencies:
|
58 |
+
source-map "0.5.x"
|
59 |
+
|
60 |
+
color-convert@^1.9.0:
|
61 |
+
version "1.9.1"
|
62 |
+
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
|
63 |
+
dependencies:
|
64 |
+
color-name "^1.1.1"
|
65 |
+
|
66 |
+
color-name@^1.1.1:
|
67 |
+
version "1.1.3"
|
68 |
+
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
69 |
+
|
70 |
+
commander@2.x, "commander@>= 0.4.0", commander@~2.12.1:
|
71 |
+
version "2.12.2"
|
72 |
+
resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555"
|
73 |
+
|
74 |
+
concat-map@0.0.1:
|
75 |
+
version "0.0.1"
|
76 |
+
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
77 |
+
|
78 |
+
cross-spawn@^5.1.0:
|
79 |
+
version "5.1.0"
|
80 |
+
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
|
81 |
+
dependencies:
|
82 |
+
lru-cache "^4.0.1"
|
83 |
+
shebang-command "^1.2.0"
|
84 |
+
which "^1.2.9"
|
85 |
+
|
86 |
+
define-properties@^1.1.2:
|
87 |
+
version "1.1.2"
|
88 |
+
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
|
89 |
+
dependencies:
|
90 |
+
foreach "^2.0.5"
|
91 |
+
object-keys "^1.0.8"
|
92 |
+
|
93 |
+
duplexer@~0.1.1:
|
94 |
+
version "0.1.1"
|
95 |
+
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
|
96 |
+
|
97 |
+
error-ex@^1.3.1:
|
98 |
+
version "1.3.1"
|
99 |
+
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
|
100 |
+
dependencies:
|
101 |
+
is-arrayish "^0.2.1"
|
102 |
+
|
103 |
+
es-abstract@^1.4.3:
|
104 |
+
version "1.10.0"
|
105 |
+
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
|
106 |
+
dependencies:
|
107 |
+
es-to-primitive "^1.1.1"
|
108 |
+
function-bind "^1.1.1"
|
109 |
+
has "^1.0.1"
|
110 |
+
is-callable "^1.1.3"
|
111 |
+
is-regex "^1.0.4"
|
112 |
+
|
113 |
+
es-to-primitive@^1.1.1:
|
114 |
+
version "1.1.1"
|
115 |
+
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
|
116 |
+
dependencies:
|
117 |
+
is-callable "^1.1.1"
|
118 |
+
is-date-object "^1.0.1"
|
119 |
+
is-symbol "^1.0.1"
|
120 |
+
|
121 |
+
escape-string-regexp@^1.0.5:
|
122 |
+
version "1.0.5"
|
123 |
+
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
124 |
+
|
125 |
+
event-stream@~3.3.0:
|
126 |
+
version "3.3.4"
|
127 |
+
resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571"
|
128 |
+
dependencies:
|
129 |
+
duplexer "~0.1.1"
|
130 |
+
from "~0"
|
131 |
+
map-stream "~0.1.0"
|
132 |
+
pause-stream "0.0.11"
|
133 |
+
split "0.3"
|
134 |
+
stream-combiner "~0.0.4"
|
135 |
+
through "~2.3.1"
|
136 |
+
|
137 |
+
foreach@^2.0.5:
|
138 |
+
version "2.0.5"
|
139 |
+
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
140 |
+
|
141 |
+
from@~0:
|
142 |
+
version "0.1.7"
|
143 |
+
resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
|
144 |
+
|
145 |
+
fs.realpath@^1.0.0:
|
146 |
+
version "1.0.0"
|
147 |
+
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
148 |
+
|
149 |
+
function-bind@^1.0.2, function-bind@^1.1.1:
|
150 |
+
version "1.1.1"
|
151 |
+
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
152 |
+
|
153 |
+
gh-markdown-cli@^0.2.0:
|
154 |
+
version "0.2.0"
|
155 |
+
resolved "https://registry.yarnpkg.com/gh-markdown-cli/-/gh-markdown-cli-0.2.0.tgz#b61c021712f54e6433b7bd8531961728023c2f33"
|
156 |
+
dependencies:
|
157 |
+
commander ">= 0.4.0"
|
158 |
+
github-flavored-markdown ">= 1.0.0"
|
159 |
+
glob ">= 3.0.0"
|
160 |
+
minimatch ">= 0.1.0"
|
161 |
+
wrench ">= 1.3.2"
|
162 |
+
|
163 |
+
"github-flavored-markdown@>= 1.0.0":
|
164 |
+
version "1.0.1"
|
165 |
+
resolved "https://registry.yarnpkg.com/github-flavored-markdown/-/github-flavored-markdown-1.0.1.tgz#93361b87a31c25790d9c81a1b798214a737eab38"
|
166 |
+
|
167 |
+
glob@7.x, "glob@>= 3.0.0":
|
168 |
+
version "7.1.2"
|
169 |
+
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
170 |
+
dependencies:
|
171 |
+
fs.realpath "^1.0.0"
|
172 |
+
inflight "^1.0.4"
|
173 |
+
inherits "2"
|
174 |
+
minimatch "^3.0.4"
|
175 |
+
once "^1.3.0"
|
176 |
+
path-is-absolute "^1.0.0"
|
177 |
+
|
178 |
+
graceful-fs@^4.1.2:
|
179 |
+
version "4.1.11"
|
180 |
+
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
181 |
+
|
182 |
+
has-flag@^2.0.0:
|
183 |
+
version "2.0.0"
|
184 |
+
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
|
185 |
+
|
186 |
+
has@^1.0.1:
|
187 |
+
version "1.0.1"
|
188 |
+
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
|
189 |
+
dependencies:
|
190 |
+
function-bind "^1.0.2"
|
191 |
+
|
192 |
+
hosted-git-info@^2.1.4:
|
193 |
+
version "2.5.0"
|
194 |
+
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c"
|
195 |
+
|
196 |
+
inflight@^1.0.4:
|
197 |
+
version "1.0.6"
|
198 |
+
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
199 |
+
dependencies:
|
200 |
+
once "^1.3.0"
|
201 |
+
wrappy "1"
|
202 |
+
|
203 |
+
inherits@2:
|
204 |
+
version "2.0.3"
|
205 |
+
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
206 |
+
|
207 |
+
is-arrayish@^0.2.1:
|
208 |
+
version "0.2.1"
|
209 |
+
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
210 |
+
|
211 |
+
is-builtin-module@^1.0.0:
|
212 |
+
version "1.0.0"
|
213 |
+
resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
|
214 |
+
dependencies:
|
215 |
+
builtin-modules "^1.0.0"
|
216 |
+
|
217 |
+
is-callable@^1.1.1, is-callable@^1.1.3:
|
218 |
+
version "1.1.3"
|
219 |
+
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
220 |
+
|
221 |
+
is-date-object@^1.0.1:
|
222 |
+
version "1.0.1"
|
223 |
+
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
|
224 |
+
|
225 |
+
is-regex@^1.0.4:
|
226 |
+
version "1.0.4"
|
227 |
+
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
|
228 |
+
dependencies:
|
229 |
+
has "^1.0.1"
|
230 |
+
|
231 |
+
is-symbol@^1.0.1:
|
232 |
+
version "1.0.1"
|
233 |
+
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
|
234 |
+
|
235 |
+
isexe@^2.0.0:
|
236 |
+
version "2.0.0"
|
237 |
+
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
238 |
+
|
239 |
+
json-parse-better-errors@^1.0.1:
|
240 |
+
version "1.0.1"
|
241 |
+
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a"
|
242 |
+
|
243 |
+
jsonify@~0.0.0:
|
244 |
+
version "0.0.0"
|
245 |
+
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
|
246 |
+
|
247 |
+
load-json-file@^4.0.0:
|
248 |
+
version "4.0.0"
|
249 |
+
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
|
250 |
+
dependencies:
|
251 |
+
graceful-fs "^4.1.2"
|
252 |
+
parse-json "^4.0.0"
|
253 |
+
pify "^3.0.0"
|
254 |
+
strip-bom "^3.0.0"
|
255 |
+
|
256 |
+
lru-cache@^4.0.1:
|
257 |
+
version "4.1.1"
|
258 |
+
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
|
259 |
+
dependencies:
|
260 |
+
pseudomap "^1.0.2"
|
261 |
+
yallist "^2.1.2"
|
262 |
+
|
263 |
+
map-stream@~0.1.0:
|
264 |
+
version "0.1.0"
|
265 |
+
resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
|
266 |
+
|
267 |
+
memorystream@^0.3.1:
|
268 |
+
version "0.3.1"
|
269 |
+
resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2"
|
270 |
+
|
271 |
+
"minimatch@>= 0.1.0", minimatch@^3.0.4:
|
272 |
+
version "3.0.4"
|
273 |
+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
274 |
+
dependencies:
|
275 |
+
brace-expansion "^1.1.7"
|
276 |
+
|
277 |
+
normalize-package-data@^2.3.2:
|
278 |
+
version "2.4.0"
|
279 |
+
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
|
280 |
+
dependencies:
|
281 |
+
hosted-git-info "^2.1.4"
|
282 |
+
is-builtin-module "^1.0.0"
|
283 |
+
semver "2 || 3 || 4 || 5"
|
284 |
+
validate-npm-package-license "^3.0.1"
|
285 |
+
|
286 |
+
npm-run-all@^4.0.2:
|
287 |
+
version "4.1.2"
|
288 |
+
resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.2.tgz#90d62d078792d20669139e718621186656cea056"
|
289 |
+
dependencies:
|
290 |
+
ansi-styles "^3.2.0"
|
291 |
+
chalk "^2.1.0"
|
292 |
+
cross-spawn "^5.1.0"
|
293 |
+
memorystream "^0.3.1"
|
294 |
+
minimatch "^3.0.4"
|
295 |
+
ps-tree "^1.1.0"
|
296 |
+
read-pkg "^3.0.0"
|
297 |
+
shell-quote "^1.6.1"
|
298 |
+
string.prototype.padend "^3.0.0"
|
299 |
+
|
300 |
+
object-keys@^1.0.8:
|
301 |
+
version "1.0.11"
|
302 |
+
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
303 |
+
|
304 |
+
once@^1.3.0:
|
305 |
+
version "1.4.0"
|
306 |
+
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
307 |
+
dependencies:
|
308 |
+
wrappy "1"
|
309 |
+
|
310 |
+
parse-json@^4.0.0:
|
311 |
+
version "4.0.0"
|
312 |
+
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
|
313 |
+
dependencies:
|
314 |
+
error-ex "^1.3.1"
|
315 |
+
json-parse-better-errors "^1.0.1"
|
316 |
+
|
317 |
+
path-is-absolute@^1.0.0:
|
318 |
+
version "1.0.1"
|
319 |
+
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
320 |
+
|
321 |
+
path-type@^3.0.0:
|
322 |
+
version "3.0.0"
|
323 |
+
resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
|
324 |
+
dependencies:
|
325 |
+
pify "^3.0.0"
|
326 |
+
|
327 |
+
pause-stream@0.0.11:
|
328 |
+
version "0.0.11"
|
329 |
+
resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
|
330 |
+
dependencies:
|
331 |
+
through "~2.3"
|
332 |
+
|
333 |
+
pify@^3.0.0:
|
334 |
+
version "3.0.0"
|
335 |
+
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
|
336 |
+
|
337 |
+
ps-tree@^1.1.0:
|
338 |
+
version "1.1.0"
|
339 |
+
resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014"
|
340 |
+
dependencies:
|
341 |
+
event-stream "~3.3.0"
|
342 |
+
|
343 |
+
pseudomap@^1.0.2:
|
344 |
+
version "1.0.2"
|
345 |
+
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
|
346 |
+
|
347 |
+
read-pkg@^3.0.0:
|
348 |
+
version "3.0.0"
|
349 |
+
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
|
350 |
+
dependencies:
|
351 |
+
load-json-file "^4.0.0"
|
352 |
+
normalize-package-data "^2.3.2"
|
353 |
+
path-type "^3.0.0"
|
354 |
+
|
355 |
+
"semver@2 || 3 || 4 || 5":
|
356 |
+
version "5.4.1"
|
357 |
+
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
358 |
+
|
359 |
+
shebang-command@^1.2.0:
|
360 |
+
version "1.2.0"
|
361 |
+
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
|
362 |
+
dependencies:
|
363 |
+
shebang-regex "^1.0.0"
|
364 |
+
|
365 |
+
shebang-regex@^1.0.0:
|
366 |
+
version "1.0.0"
|
367 |
+
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
|
368 |
+
|
369 |
+
shell-quote@^1.6.1:
|
370 |
+
version "1.6.1"
|
371 |
+
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
|
372 |
+
dependencies:
|
373 |
+
array-filter "~0.0.0"
|
374 |
+
array-map "~0.0.0"
|
375 |
+
array-reduce "~0.0.0"
|
376 |
+
jsonify "~0.0.0"
|
377 |
+
|
378 |
+
source-map@0.5.x:
|
379 |
+
version "0.5.7"
|
380 |
+
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
381 |
+
|
382 |
+
source-map@~0.6.1:
|
383 |
+
version "0.6.1"
|
384 |
+
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
385 |
+
|
386 |
+
spdx-correct@~1.0.0:
|
387 |
+
version "1.0.2"
|
388 |
+
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
|
389 |
+
dependencies:
|
390 |
+
spdx-license-ids "^1.0.2"
|
391 |
+
|
392 |
+
spdx-expression-parse@~1.0.0:
|
393 |
+
version "1.0.4"
|
394 |
+
resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c"
|
395 |
+
|
396 |
+
spdx-license-ids@^1.0.2:
|
397 |
+
version "1.2.2"
|
398 |
+
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57"
|
399 |
+
|
400 |
+
split@0.3:
|
401 |
+
version "0.3.3"
|
402 |
+
resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f"
|
403 |
+
dependencies:
|
404 |
+
through "2"
|
405 |
+
|
406 |
+
stream-combiner@~0.0.4:
|
407 |
+
version "0.0.4"
|
408 |
+
resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14"
|
409 |
+
dependencies:
|
410 |
+
duplexer "~0.1.1"
|
411 |
+
|
412 |
+
string.prototype.padend@^3.0.0:
|
413 |
+
version "3.0.0"
|
414 |
+
resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0"
|
415 |
+
dependencies:
|
416 |
+
define-properties "^1.1.2"
|
417 |
+
es-abstract "^1.4.3"
|
418 |
+
function-bind "^1.0.2"
|
419 |
+
|
420 |
+
strip-bom@^3.0.0:
|
421 |
+
version "3.0.0"
|
422 |
+
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
|
423 |
+
|
424 |
+
supports-color@^4.0.0:
|
425 |
+
version "4.5.0"
|
426 |
+
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b"
|
427 |
+
dependencies:
|
428 |
+
has-flag "^2.0.0"
|
429 |
+
|
430 |
+
through@2, through@~2.3, through@~2.3.1:
|
431 |
+
version "2.3.8"
|
432 |
+
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
|
433 |
+
|
434 |
+
uglify-js@^3.0.27:
|
435 |
+
version "3.2.2"
|
436 |
+
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.2.tgz#870e4b34ed733d179284f9998efd3293f7fd73f6"
|
437 |
+
dependencies:
|
438 |
+
commander "~2.12.1"
|
439 |
+
source-map "~0.6.1"
|
440 |
+
|
441 |
+
validate-npm-package-license@^3.0.1:
|
442 |
+
version "3.0.1"
|
443 |
+
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
|
444 |
+
dependencies:
|
445 |
+
spdx-correct "~1.0.0"
|
446 |
+
spdx-expression-parse "~1.0.0"
|
447 |
+
|
448 |
+
which@^1.2.9:
|
449 |
+
version "1.3.0"
|
450 |
+
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
|
451 |
+
dependencies:
|
452 |
+
isexe "^2.0.0"
|
453 |
+
|
454 |
+
wrappy@1:
|
455 |
+
version "1.0.2"
|
456 |
+
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
457 |
+
|
458 |
+
"wrench@>= 1.3.2":
|
459 |
+
version "1.5.9"
|
460 |
+
resolved "https://registry.yarnpkg.com/wrench/-/wrench-1.5.9.tgz#411691c63a9b2531b1700267279bdeca23b2142a"
|
461 |
+
|
462 |
+
yallist@^2.1.2:
|
463 |
+
version "2.1.2"
|
464 |
+
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|