If Menu – Visibility control for Menu Items - Version 0.16.3

Version Description

  • 26 June 2022 =
  • Added - More usage examples in plugin FAQs section
  • Updated - WordPress v6 compatibility
  • Updated - Integration with Restrict Content Pro plugin is improved
Download this release

Release Info

Developer andrei.igna
Plugin Icon 128x128 If Menu – Visibility control for Menu Items
Version 0.16.3
Comparing to
See all releases

Code changes from version 0.8.3 to 0.16.3

Files changed (134) hide show
  1. LICENSE +674 -0
  2. assets/if-menu.css +95 -6
  3. assets/if-menu.js +6 -6
  4. composer.json +26 -0
  5. composer.lock +205 -0
  6. if-menu.php +74 -185
  7. readme.md +2 -0
  8. readme.txt +103 -134
  9. src/Admin.php +189 -0
  10. src/conditions-basic.php +18 -2
  11. src/conditions-multiple-options.php +388 -254
  12. src/if-menu-nav-menu-4.7.php +1 -1
  13. src/user-info.php +11 -38
  14. vendor/autoload.php +7 -0
  15. vendor/composer/ClassLoader.php +445 -0
  16. vendor/composer/LICENSE +21 -0
  17. vendor/composer/autoload_classmap.php +109 -0
  18. vendor/composer/autoload_namespaces.php +9 -0
  19. vendor/composer/autoload_psr4.php +12 -0
  20. vendor/composer/autoload_real.php +55 -0
  21. vendor/composer/autoload_static.php +148 -0
  22. vendor/composer/installed.json +189 -0
  23. vendor/composer/installers/.github/workflows/continuous-integration.yml +70 -0
  24. vendor/composer/installers/.github/workflows/lint.yml +30 -0
  25. vendor/composer/installers/.github/workflows/phpstan.yml +51 -0
  26. vendor/composer/installers/LICENSE +19 -0
  27. vendor/composer/installers/composer.json +119 -0
  28. vendor/composer/installers/phpstan.neon.dist +10 -0
  29. vendor/composer/installers/src/Composer/Installers/AglInstaller.php +21 -0
  30. vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php +9 -0
  31. vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +11 -0
  32. vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +49 -0
  33. vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php +9 -0
  34. vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +137 -0
  35. vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +126 -0
  36. vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php +9 -0
  37. vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +65 -0
  38. vendor/composer/installers/src/Composer/Installers/ChefInstaller.php +11 -0
  39. vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php +9 -0
  40. vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php +10 -0
  41. vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php +32 -0
  42. vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +11 -0
  43. vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +13 -0
  44. vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +35 -0
  45. vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +21 -0
  46. vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php +10 -0
  47. vendor/composer/installers/src/Composer/Installers/DframeInstaller.php +10 -0
  48. vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php +50 -0
  49. vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php +16 -0
  50. vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +22 -0
  51. vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +9 -0
  52. vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +12 -0
  53. vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php +29 -0
  54. vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php +10 -0
  55. vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +11 -0
  56. vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php +9 -0
  57. vendor/composer/installers/src/Composer/Installers/GravInstaller.php +30 -0
  58. vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +25 -0
  59. vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php +11 -0
  60. vendor/composer/installers/src/Composer/Installers/Installer.php +294 -0
  61. vendor/composer/installers/src/Composer/Installers/ItopInstaller.php +9 -0
  62. vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +15 -0
  63. vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php +18 -0
  64. vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +11 -0
  65. vendor/composer/installers/src/Composer/Installers/KnownInstaller.php +11 -0
  66. vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php +10 -0
  67. vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +9 -0
  68. vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php +27 -0
  69. vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +9 -0
  70. vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +10 -0
  71. vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +10 -0
  72. vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +9 -0
  73. vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +16 -0
  74. vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +11 -0
  75. vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php +37 -0
  76. vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +9 -0
  77. vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php +23 -0
  78. vendor/composer/installers/src/Composer/Installers/MauticInstaller.php +25 -0
  79. vendor/composer/installers/src/Composer/Installers/MayaInstaller.php +33 -0
  80. vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +51 -0
  81. vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +119 -0
  82. vendor/composer/installers/src/Composer/Installers/ModxInstaller.php +12 -0
  83. vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +59 -0
  84. vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +47 -0
  85. vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php +24 -0
  86. vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php +14 -0
  87. vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +59 -0
  88. vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +9 -0
  89. vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php +11 -0
  90. vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +11 -0
  91. vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php +21 -0
  92. vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +32 -0
  93. vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php +29 -0
  94. vendor/composer/installers/src/Composer/Installers/Plugin.php +27 -0
  95. vendor/composer/installers/src/Composer/Installers/PortoInstaller.php +9 -0
  96. vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php +10 -0
  97. vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php +22 -0
  98. vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php +11 -0
  99. vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php +63 -0
  100. vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php +24 -0
  101. vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php +10 -0
  102. vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php +10 -0
  103. vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php +10 -0
  104. vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php +22 -0
  105. vendor/composer/installers/src/Composer/Installers/SMFInstaller.php +10 -0
  106. vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +60 -0
  107. vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +35 -0
  108. vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php +25 -0
  109. vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php +12 -0
  110. vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php +47 -0
  111. vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php +9 -0
  112. vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +26 -0
  113. vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +16 -0
  114. vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +38 -0
  115. vendor/composer/installers/src/Composer/Installers/TaoInstaller.php +30 -0
  116. vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php +12 -0
  117. vendor/composer/installers/src/Composer/Installers/TuskInstaller.php +14 -0
  118. vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php +9 -0
  119. vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php +10 -0
  120. vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php +49 -0
  121. vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +21 -0
  122. vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +9 -0
  123. vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +12 -0
  124. vendor/composer/installers/src/Composer/Installers/YawikInstaller.php +32 -0
  125. vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +11 -0
  126. vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +10 -0
  127. vendor/composer/installers/src/bootstrap.php +13 -0
  128. vendor/layered/safe-eval/.gitignore +2 -0
  129. vendor/layered/safe-eval/README.md +13 -0
  130. vendor/layered/safe-eval/SafeEval.php +50 -0
  131. vendor/layered/safe-eval/Tests/SafeEvalTest.php +32 -0
  132. vendor/layered/safe-eval/composer.json +25 -0
  133. vendor/layered/safe-eval/composer.lock +1490 -0
  134. vendor/layered/safe-eval/phpunit.xml +30 -0
LICENSE 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
+ If Menu - Visibility control for WordPress Menu Items
635
+ Copyright (C) 2018 Layered <hello@layered.studio>
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
+ If Menu Copyright (C) 2018 Layered <hello@layered.studio>
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>.
assets/if-menu.css CHANGED
@@ -1,5 +1,5 @@
1
 
2
- /* IF MENU global styles */
3
 
4
  .if-menu-green {
5
  color: #50a92f;
@@ -30,7 +30,7 @@
30
 
31
  .if-menu-dialog .ui-dialog-titlebar {
32
  border-radius: 5px 5px 0 0;
33
- padding: 3rem 0;
34
  background: url(plan-premium.png);
35
  background-size: cover;
36
  }
@@ -58,7 +58,7 @@
58
 
59
 
60
 
61
- /* IF MENU page */
62
 
63
  .if-menu-wrap ul {
64
  list-style: circle;
@@ -77,10 +77,17 @@
77
  .if-menu-wrap .two-col,
78
  .if-menu-wrap .three-col {
79
  align-items: flex-start;
 
 
 
 
 
 
80
  }
81
 
82
  .if-menu-wrap .pricing-plan-section h3 {
83
  margin-bottom: 2rem;
 
84
  }
85
 
86
  .if-menu-wrap .pricing-plan-section .price {
@@ -174,7 +181,6 @@
174
  .if-menu-conditions .if-menu-condition {
175
  position: relative;
176
  padding: 3px 0px;
177
- width: calc(100% - 14px);
178
  color: #0d2b3e;
179
  animation: ifMenufadeIn 0.2s ease-in-out both;
180
  }
@@ -230,18 +236,23 @@
230
  }
231
 
232
  .if-menu-condition .menu-item-if-menu-condition-type {
233
- width: 60px;
 
 
 
234
  color: #50a92f;
235
  }
236
 
237
  .if-menu-condition .menu-item-if-menu-condition-type[data-val="hide"] {
238
- width: 60px;
239
  color: #e04c4c;
240
  }
241
 
242
  .if-menu-condition .menu-item-if-menu-condition {
 
243
  width: 225px;
244
  color: #8b6cfb;
 
245
  }
246
 
247
  .if-menu-condition .menu-item-if-menu-enable-next {
@@ -261,3 +272,81 @@
261
  .if-menu-condition .menu-item-if-menu-enable-next option {
262
  direction: rtl;
263
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
+ /* IF MENU styles */
3
 
4
  .if-menu-green {
5
  color: #50a92f;
30
 
31
  .if-menu-dialog .ui-dialog-titlebar {
32
  border-radius: 5px 5px 0 0;
33
+ padding: 3rem 0 !important;
34
  background: url(plan-premium.png);
35
  background-size: cover;
36
  }
58
 
59
 
60
 
61
+ /* Admin page */
62
 
63
  .if-menu-wrap ul {
64
  list-style: circle;
77
  .if-menu-wrap .two-col,
78
  .if-menu-wrap .three-col {
79
  align-items: flex-start;
80
+ display: flex;
81
+ }
82
+
83
+ .if-menu-wrap .two-col .col,
84
+ .if-menu-wrap .three-col .col {
85
+ margin: 0 0.5rem;
86
  }
87
 
88
  .if-menu-wrap .pricing-plan-section h3 {
89
  margin-bottom: 2rem;
90
+ margin-top: 0;
91
  }
92
 
93
  .if-menu-wrap .pricing-plan-section .price {
181
  .if-menu-conditions .if-menu-condition {
182
  position: relative;
183
  padding: 3px 0px;
 
184
  color: #0d2b3e;
185
  animation: ifMenufadeIn 0.2s ease-in-out both;
186
  }
236
  }
237
 
238
  .if-menu-condition .menu-item-if-menu-condition-type {
239
+ -webkit-appearance: auto;
240
+ width: 65px;
241
+ padding: 0 5px;
242
+ margin: 0;
243
  color: #50a92f;
244
  }
245
 
246
  .if-menu-condition .menu-item-if-menu-condition-type[data-val="hide"] {
247
+ width: 65px;
248
  color: #e04c4c;
249
  }
250
 
251
  .if-menu-condition .menu-item-if-menu-condition {
252
+ -webkit-appearance: auto;
253
  width: 225px;
254
  color: #8b6cfb;
255
+ padding: 0 5px;
256
  }
257
 
258
  .if-menu-condition .menu-item-if-menu-enable-next {
272
  .if-menu-condition .menu-item-if-menu-enable-next option {
273
  direction: rtl;
274
  }
275
+
276
+
277
+
278
+ /* Tooltips */
279
+
280
+ [data-tooltip] {
281
+ position: relative;
282
+ cursor: pointer;
283
+ }
284
+
285
+ [data-tooltip]:before,
286
+ [data-tooltip]:after {
287
+ position: absolute;
288
+ visibility: hidden;
289
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
290
+ opacity: 0;
291
+ transition:
292
+ opacity 0.2s ease-in-out,
293
+ visibility 0.2s ease-in-out,
294
+ transform 0.2s ease-in-out;
295
+ transform: translate3d(0, 0, 0);
296
+ pointer-events: none;
297
+ }
298
+
299
+ [data-tooltip]:hover:before,
300
+ [data-tooltip]:hover:after,
301
+ [data-tooltip]:focus:before,
302
+ [data-tooltip]:focus:after {
303
+ visibility: visible;
304
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
305
+ opacity: 1;
306
+ }
307
+
308
+ [data-tooltip]:before {
309
+ z-index: 1001;
310
+ border: 6px solid transparent;
311
+ background: transparent;
312
+ content: "";
313
+ }
314
+
315
+ [data-tooltip]:after {
316
+ z-index: 1000;
317
+ padding: 8px;
318
+ width: 160px;
319
+ background-color: #000;
320
+ background-color: hsla(0, 0%, 20%, 0.9);
321
+ color: #fff;
322
+ content: attr(data-tooltip);
323
+ font-size: 14px;
324
+ line-height: 1.2;
325
+ text-align: center;
326
+ text-transform: normal;
327
+ border-radius: 3px;
328
+ }
329
+
330
+ [data-tooltip]:before,
331
+ [data-tooltip]:after {
332
+ bottom: 100%;
333
+ left: 50%;
334
+ }
335
+
336
+ [data-tooltip]:before {
337
+ margin-left: -6px;
338
+ margin-bottom: -12px;
339
+ border-top-color: #000;
340
+ border-top-color: hsla(0, 0%, 20%, 0.9);
341
+ }
342
+
343
+ [data-tooltip]:after {
344
+ margin-left: -80px;
345
+ }
346
+
347
+ [data-tooltip]:hover:before,
348
+ [data-tooltip]:hover:after,
349
+ [data-tooltip]:focus:before,
350
+ [data-tooltip]:focus:after {
351
+ transform: translateY(-10px);
352
+ }
assets/if-menu.js CHANGED
@@ -28,7 +28,11 @@ jQuery(function($) {
28
 
29
 
30
  // Check if menu extra fields are actually displayed
31
- if ($('#menu-to-edit li').length !== $('#menu-to-edit li .if-menu-enable').length) {
 
 
 
 
32
  $('<div class="notice error is-dismissible if-menu-notice"><p>' + IfMenu.conflictErrorMessage + '</p></div>').insertAfter('.wp-header-end');
33
  }
34
 
@@ -63,11 +67,7 @@ jQuery(function($) {
63
  dialogClass: 'if-menu-dialog',
64
  draggable: false,
65
  modal: true,
66
- width: 450,
67
- open: function(event, ui) {
68
- console.log(event);
69
- console.log(ui);
70
- }
71
  });
72
  }
73
  });
28
 
29
 
30
  // Check if menu extra fields are actually displayed
31
+ var countMenuItems = $('#menu-to-edit li.menu-item').length;
32
+ var countMenuItemsWithIfMenu = $('#menu-to-edit li.menu-item .if-menu-enable').length;
33
+ if (countMenuItems === countMenuItemsWithIfMenu / 2) {
34
+ $('<div class="notice notice-warning is-dismissible if-menu-notice"><p>' + IfMenu.duplicateErrorMessage + '</p></div>').insertAfter('.wp-header-end');
35
+ } else if (countMenuItems !== countMenuItemsWithIfMenu) {
36
  $('<div class="notice error is-dismissible if-menu-notice"><p>' + IfMenu.conflictErrorMessage + '</p></div>').insertAfter('.wp-header-end');
37
  }
38
 
67
  dialogClass: 'if-menu-dialog',
68
  draggable: false,
69
  modal: true,
70
+ width: 450
 
 
 
 
71
  });
72
  }
73
  });
composer.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "layered/if-menu",
3
+ "description": "Control menu items visibility with custom rules",
4
+ "type": "wordpress-plugin",
5
+ "license": "GPL-3.0-or-later",
6
+ "authors": [
7
+ {
8
+ "name": "Andrei Igna",
9
+ "email": "andrei.igna@layered.studio"
10
+ }
11
+ ],
12
+ "require": {
13
+ "composer/installers": "~1.5",
14
+ "layered/safe-eval": "^0.2.0"
15
+ },
16
+ "autoload": {
17
+ "psr-4": {
18
+ "Layered\\IfMenu\\": "src/"
19
+ }
20
+ },
21
+ "config": {
22
+ "platform": {
23
+ "php": "5.6"
24
+ }
25
+ }
26
+ }
composer.lock ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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#installing-dependencies",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "content-hash": "aa337cfba40ec771f272a8ec2926ff96",
8
+ "packages": [
9
+ {
10
+ "name": "composer/installers",
11
+ "version": "v1.10.0",
12
+ "source": {
13
+ "type": "git",
14
+ "url": "https://github.com/composer/installers.git",
15
+ "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d"
16
+ },
17
+ "dist": {
18
+ "type": "zip",
19
+ "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d",
20
+ "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d",
21
+ "shasum": ""
22
+ },
23
+ "require": {
24
+ "composer-plugin-api": "^1.0 || ^2.0"
25
+ },
26
+ "replace": {
27
+ "roundcube/plugin-installer": "*",
28
+ "shama/baton": "*"
29
+ },
30
+ "require-dev": {
31
+ "composer/composer": "1.6.* || ^2.0",
32
+ "composer/semver": "^1 || ^3",
33
+ "phpstan/phpstan": "^0.12.55",
34
+ "phpstan/phpstan-phpunit": "^0.12.16",
35
+ "symfony/phpunit-bridge": "^4.2 || ^5",
36
+ "symfony/process": "^2.3"
37
+ },
38
+ "type": "composer-plugin",
39
+ "extra": {
40
+ "class": "Composer\\Installers\\Plugin",
41
+ "branch-alias": {
42
+ "dev-main": "1.x-dev"
43
+ }
44
+ },
45
+ "autoload": {
46
+ "psr-4": {
47
+ "Composer\\Installers\\": "src/Composer/Installers"
48
+ }
49
+ },
50
+ "notification-url": "https://packagist.org/downloads/",
51
+ "license": [
52
+ "MIT"
53
+ ],
54
+ "authors": [
55
+ {
56
+ "name": "Kyle Robinson Young",
57
+ "email": "kyle@dontkry.com",
58
+ "homepage": "https://github.com/shama"
59
+ }
60
+ ],
61
+ "description": "A multi-framework Composer library installer",
62
+ "homepage": "https://composer.github.io/installers/",
63
+ "keywords": [
64
+ "Craft",
65
+ "Dolibarr",
66
+ "Eliasis",
67
+ "Hurad",
68
+ "ImageCMS",
69
+ "Kanboard",
70
+ "Lan Management System",
71
+ "MODX Evo",
72
+ "MantisBT",
73
+ "Mautic",
74
+ "Maya",
75
+ "OXID",
76
+ "Plentymarkets",
77
+ "Porto",
78
+ "RadPHP",
79
+ "SMF",
80
+ "Starbug",
81
+ "Thelia",
82
+ "Whmcs",
83
+ "WolfCMS",
84
+ "agl",
85
+ "aimeos",
86
+ "annotatecms",
87
+ "attogram",
88
+ "bitrix",
89
+ "cakephp",
90
+ "chef",
91
+ "cockpit",
92
+ "codeigniter",
93
+ "concrete5",
94
+ "croogo",
95
+ "dokuwiki",
96
+ "drupal",
97
+ "eZ Platform",
98
+ "elgg",
99
+ "expressionengine",
100
+ "fuelphp",
101
+ "grav",
102
+ "installer",
103
+ "itop",
104
+ "joomla",
105
+ "known",
106
+ "kohana",
107
+ "laravel",
108
+ "lavalite",
109
+ "lithium",
110
+ "magento",
111
+ "majima",
112
+ "mako",
113
+ "mediawiki",
114
+ "modulework",
115
+ "modx",
116
+ "moodle",
117
+ "osclass",
118
+ "phpbb",
119
+ "piwik",
120
+ "ppi",
121
+ "processwire",
122
+ "puppet",
123
+ "pxcms",
124
+ "reindex",
125
+ "roundcube",
126
+ "shopware",
127
+ "silverstripe",
128
+ "sydes",
129
+ "sylius",
130
+ "symfony",
131
+ "typo3",
132
+ "wordpress",
133
+ "yawik",
134
+ "zend",
135
+ "zikula"
136
+ ],
137
+ "funding": [
138
+ {
139
+ "url": "https://packagist.com",
140
+ "type": "custom"
141
+ },
142
+ {
143
+ "url": "https://github.com/composer",
144
+ "type": "github"
145
+ },
146
+ {
147
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
148
+ "type": "tidelift"
149
+ }
150
+ ],
151
+ "time": "2021-01-14T11:07:16+00:00"
152
+ },
153
+ {
154
+ "name": "layered/safe-eval",
155
+ "version": "v0.2",
156
+ "source": {
157
+ "type": "git",
158
+ "url": "https://github.com/AndreiIgna/safe-eval.git",
159
+ "reference": "0170d4c80128adfa83bdaed688111ebc1df84e33"
160
+ },
161
+ "dist": {
162
+ "type": "zip",
163
+ "url": "https://api.github.com/repos/AndreiIgna/safe-eval/zipball/0170d4c80128adfa83bdaed688111ebc1df84e33",
164
+ "reference": "0170d4c80128adfa83bdaed688111ebc1df84e33",
165
+ "shasum": ""
166
+ },
167
+ "require-dev": {
168
+ "phpunit/phpunit": "^7.5"
169
+ },
170
+ "type": "library",
171
+ "autoload": {
172
+ "psr-4": {
173
+ "Layered\\SafeEval\\": ""
174
+ },
175
+ "exclude-from-classmap": [
176
+ "/Tests/"
177
+ ]
178
+ },
179
+ "notification-url": "https://packagist.org/downloads/",
180
+ "license": [
181
+ "MIT"
182
+ ],
183
+ "authors": [
184
+ {
185
+ "name": "Andrei Igna",
186
+ "email": "andrei@laye.red"
187
+ }
188
+ ],
189
+ "description": "Safely evaluate code expressions",
190
+ "time": "2019-05-02T09:46:38+00:00"
191
+ }
192
+ ],
193
+ "packages-dev": [],
194
+ "aliases": [],
195
+ "minimum-stability": "stable",
196
+ "stability-flags": [],
197
+ "prefer-stable": false,
198
+ "prefer-lowest": false,
199
+ "platform": [],
200
+ "platform-dev": [],
201
+ "platform-overrides": {
202
+ "php": "5.6"
203
+ },
204
+ "plugin-api-version": "1.1.0"
205
+ }
if-menu.php CHANGED
@@ -1,58 +1,45 @@
1
  <?php
2
  /*
3
- Plugin Name: If Menu
4
- Plugin URI: https://wordpress.org/plugins/if-menu/
5
  Description: Display tailored menu items to each visitor with visibility rules
6
- Version: 0.8.3
7
  Text Domain: if-menu
8
  Author: Layered
9
- Author URI: https://layered.studio
10
- License: GPL2
 
11
  */
12
 
13
- /* Copyright 2012 Andrei Igna (email: andrei@rokm.ro)
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License, version 2, as
17
- published by the Free Software Foundation.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
-
24
- You should have received a copy of the GNU General Public License
25
- along with this program; if not, write to the Free Software
26
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
- */
28
 
 
29
 
30
  class If_Menu {
31
 
32
  public static function init() {
33
- global $pagenow;
34
-
35
- load_plugin_textdomain('if-menu', false, dirname(plugin_basename(__FILE__)) . '/languages');
36
 
37
  add_action('rest_api_init', 'If_Menu::restApi');
38
 
39
  if (is_admin()) {
40
  add_action('admin_enqueue_scripts', 'If_Menu::admin_init');
41
  add_action('wp_update_nav_menu_item', 'If_Menu::wp_update_nav_menu_item', 10, 2);
42
- add_filter('wp_edit_nav_menu_walker', 'If_Menu::customWalker', 500);
 
 
 
 
 
43
  add_action('wp_nav_menu_item_custom_fields', 'If_Menu::menu_item_fields');
44
  add_action('wp_nav_menu_item_custom_title', 'If_Menu::menu_item_title');
45
- add_action('init', 'If_Menu::saveSettings');
46
  add_action('admin_footer', 'If_Menu::adminFooter');
47
- add_action('admin_menu', function() {
48
- add_submenu_page('themes.php', 'If Menu', 'If Menu', 'edit_theme_options', 'if-menu', 'If_Menu::page');
49
- });
50
 
51
- if ($pagenow !== 'nav-menus.php') {
52
- add_filter( 'wp_get_nav_menu_items', 'If_Menu::wp_get_nav_menu_items' );
53
  }
54
  } else {
55
- add_filter( 'wp_get_nav_menu_items', 'If_Menu::wp_get_nav_menu_items' );
56
  add_action('wp_enqueue_scripts', 'If_Menu::addAssets');
57
  }
58
  }
@@ -63,8 +50,12 @@ class If_Menu {
63
  if ($for_testing) {
64
  $c2 = array();
65
  foreach ($conditions as $condition) {
66
- $c2[$condition['id']] = $condition;
67
- $c2[$condition['name']] = $condition;
 
 
 
 
68
  if (isset($condition['alias'])) {
69
  $c2[$condition['alias']] = $condition;
70
  }
@@ -121,12 +112,15 @@ class If_Menu {
121
  $eval[] = $singleCondition;
122
  }
123
 
124
- if ((count($eval) === 1 && $eval[0] == 0) || (count($eval) > 1 && !eval('return ' . implode(' ', $eval) . ';'))) {
 
 
125
  if ($canPeek) {
126
- $item->classes[] = 'if-menu-peek';
127
- } else {
128
- unset($items[$key]);
129
- }
 
130
  $hidden_items[] = $item->ID;
131
  }
132
  }
@@ -141,35 +135,30 @@ class If_Menu {
141
 
142
  if ($pagenow == 'nav-menus.php') {
143
  wp_enqueue_script('select2', plugins_url('assets/select2.min.js', __FILE__), array('jquery'), '4.0.5');
144
- wp_enqueue_script('if-menu', plugins_url('assets/if-menu.js', __FILE__), array('select2', 'jquery-ui-dialog'), '0.8');
145
 
146
  wp_enqueue_style('select2', plugins_url('assets/select2.min.css', __FILE__), array(), '4.0.5');
147
- wp_enqueue_style('if-menu', plugins_url('assets/if-menu.css', __FILE__), array('wp-jquery-ui-dialog'), '0.8');
148
 
149
  wp_localize_script('if-menu', 'IfMenu', array(
150
  'plan' => self::getPlan(),
151
  'conflictErrorMessage' => sprintf(
152
  wp_kses(
153
  __('<strong>If Menu</strong> detected a conflict with another plugin or theme (%s) and may not work as expected. <a href="%s" target="_blank">Read more about the issue here</a>', 'if-menu'),
154
- array('a' => array('href' => array()), 'strong' => array())
155
  ),
156
- apply_filters('wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit'),
157
- esc_url('https://wordpress.org/plugins/if-menu/faq/')
 
 
 
 
 
 
 
158
  )
159
  ));
160
  }
161
-
162
- if ($pagenow == 'themes.php') {
163
- wp_enqueue_style('if-menu', plugins_url('assets/if-menu.css', __FILE__), '0.8');
164
- }
165
- }
166
-
167
- public static function saveSettings() {
168
- global $pagenow;
169
-
170
- if ($pagenow == 'themes.php' && isset($_POST['if-menu-settings'])) {
171
- update_option('if-menu-peak', $_POST['if-menu-peek']);
172
- }
173
  }
174
 
175
  public static function adminFooter() {
@@ -184,123 +173,6 @@ class If_Menu {
184
  <?php
185
  }
186
 
187
- public static function page() {
188
- $ifMenuPeek = get_option('if-menu-peak');
189
- $plan = self::getPlan();
190
- ?>
191
-
192
- <div class="wrap about-wrap if-menu-wrap">
193
- <h1>If Menu</h1>
194
- <p class="about-text"><?php _e('Thanks for using <strong>If Menu</strong>! Now you can display tailored menu items to each visitor, based on visibility rules. Here are a few examples:', 'if-menu') ?></p>
195
- <ul class="list">
196
- <li><?php _e('Hide Login or Register links for logged-in users:', 'if-menu') ?> <code><span class="if-menu-red"><?php _e('Hide', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('User is logged in', 'if-menu') ?></span></code></li>
197
- <li><?php _e('Display Logout link for logged-in users:', 'if-menu') ?> <code><span class="if-menu-green"><?php _e('Show', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('User is logged in', 'if-menu') ?></span></code></li>
198
- <li><?php _e('Hide menu item on mobile devices:', 'if-menu') ?> <code><span class="if-menu-red"><?php _e('Hide', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('Mobile', 'if-menu') ?></span></code></li>
199
- <li><?php _e('Display menu item for users in US and UK:', 'if-menu') ?> <code><span class="if-menu-green"><?php _e('Show', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('User from country: US, UK', 'if-menu') ?></span></code></li>
200
- </ul>
201
- <hr class="wp-header-end">
202
-
203
- <div class="feature-section pricing-plan-section two-col">
204
- <div class="col">
205
- <div class="pricing-cell <?php if (!$plan || $plan['plan'] == 'free') echo 'selected' ?>">
206
- <span class="price"><small><?php _e('Free', 'if-menu') ?></small></span>
207
- <h3><?php _e('Basic', 'if-menu') ?></h3>
208
-
209
- <ul>
210
- <li>
211
- <?php _e('Basic visibility rules:', 'if-menu') ?>
212
- <ul>
213
- <li><?php _e('User role - is Admin, Editor, Author or Shop Manager', 'if-menu') ?></li>
214
- <li><?php _e('User state - visitor is logged in or out', 'if-menu') ?></li>
215
- <li><?php _e('Visitor device - detect mobile or desktop', 'if-menu') ?></li>
216
- </ul>
217
- </li>
218
- <li><?php _e('Support on WordPress forum', 'if-menu') ?></li>
219
- </ul>
220
-
221
- <p>
222
- <?php if (!$plan || $plan['plan'] == 'free') : ?>
223
- <button class="button disabled"><?php _e('Current plan', 'if-menu') ?></button>
224
- <?php endif ?>
225
- </p>
226
- </div>
227
- </div>
228
-
229
- <div class="col">
230
- <div class="pricing-cell <?php if ($plan && $plan['plan'] == 'premium') echo 'selected' ?>">
231
- <span class="price">$15<small>/<?php _e('annually', 'if-menu') ?></small></span>
232
- <h3><?php _e('Premium', 'if-menu') ?></h3>
233
-
234
- <ul>
235
- <li>
236
- <?php _e('Advanced visibility rules:', 'if-menu') ?>
237
- <ul>
238
- <li><?php _e('Visitor location - detect visitor\'s country', 'if-menu') ?></li>
239
- </ul>
240
- </li>
241
- <li>
242
- <?php _e('3rd-party plugin integrations:', 'if-menu') ?>
243
- <ul>
244
- <li><a href="https://woocommerce.com/products/woocommerce-subscriptions" target="_blank">WooCommerce Subscriptions</a> - <?php _e('Customer has active subscription', 'if-menu') ?></li>
245
- <li><a href="https://wordpress.org/plugins/groups" target="_blank">Groups</a> - <?php _e('Users are in a Group', 'if-menu') ?></li>
246
- <li><a href="https://member.wishlistproducts.com" target="_blank">WishList Member</a> - <?php _e('Users above a Membership Level', 'if-menu') ?></li>
247
- </ul>
248
- </li>
249
- <li><?php _e('Priority support', 'if-menu') ?></li>
250
- </ul>
251
-
252
- <p class="description">
253
- <?php if ($plan && $plan['plan'] == 'premium') : ?>
254
- <button class="button disabled"><?php _e('Current plan', 'if-menu') ?></button>
255
- <br><br><small class="text-muted"><?php printf(__('Active until %s', 'if-menu'), date(get_option('date_format'), strtotime($plan['until']))) ?></small>
256
- <?php else : ?>
257
- <a href="https://wordpress.layered.studio/get-premium?site=<?php echo urlencode(site_url()) ?>&_nonce=<?php echo self::apiNonce('get-premium') ?>" class="button button-primary"><?php _e('Get premium', 'if-menu') ?></a>
258
- <?php endif ?>
259
- </p>
260
- </div>
261
- </div>
262
- </div>
263
-
264
- <hr>
265
-
266
- <h3 class="title"><?php _e('Settings', 'if-menu') ?></h3>
267
-
268
- <form method="post" action="">
269
- <table class="form-table">
270
- <tbody>
271
- <tr>
272
- <th scope="row"><?php _e('If Menu peek', 'if-menu') ?></th>
273
- <td>
274
- <fieldset>
275
- <label><input type="checkbox" name="if-menu-peek" value="1" <?php checked($ifMenuPeek, 1) ?>> <?php _e('Enable If Menu peek', 'if-menu') ?></label><br>
276
- </fieldset>
277
- <p class="description"><?php _e('Let administrators preview hidden menu items on website (useful for testing)', 'if-menu') ?></p>
278
- </td>
279
- </tr>
280
- <tr>
281
- <th scope="row"></th>
282
- <td>
283
- <p class="submit"><input type="submit" name="if-menu-settings" id="submit" class="button button-primary" value="<?php _e('Save Changes', 'if-menu') ?>"></p>
284
- </td>
285
- </tr>
286
- </tbody>
287
- </table>
288
- </form>
289
-
290
- <hr>
291
-
292
- <p class="text-right">
293
- <strong>If Menu</strong>:
294
- <a href="https://wordpress.org/plugins/if-menu/#faq" target="wpplugins"><?php _e('FAQs', 'if-menu') ?></a> &middot;
295
- <a href="https://wordpress.org/plugins/if-menu/#reviews" target="wpplugins"><?php _e('Reviews', 'if-menu') ?></a> &middot;
296
- <a href="https://wordpress.org/support/plugin/if-menu" target="wpplugins"><?php _e('Support', 'if-menu') ?></a>
297
- </p>
298
-
299
- </div>
300
-
301
- <?php
302
- }
303
-
304
  public static function addAssets() {
305
  wp_enqueue_style('if-menu-site-css', plugins_url('assets/if-menu-site.css', __FILE__));
306
  }
@@ -325,10 +197,10 @@ class If_Menu {
325
  ?>
326
 
327
  <p class="if-menu-enable description description-wide">
328
- <a href="<?php echo admin_url('themes.php?page=if-menu') ?>" class="if-menu-help" title="<?php esc_attr_e('Visibility rule examples', 'if-menu') ?>"><span class="dashicons dashicons-editor-help"></span></a>
329
  <label>
330
  <input <?php if (isset($if_menu_enable[0])) checked( $if_menu_enable[0], 1 ) ?> type="checkbox" value="1" class="menu-item-if-menu-enable" name="menu-item-if-menu-enable[<?php echo esc_attr( $item_id ); ?>][]" />
331
- <?php esc_html_e( 'Change menu item visibility', 'if-menu' ) ?>
332
  </label>
333
  </p>
334
 
@@ -368,7 +240,7 @@ class If_Menu {
368
  <?php if (isset($selectedCondition['options'])) : ?>
369
  <select class="menu-item-if-menu-options" name="menu-item-if-menu-options[<?php echo esc_attr($item_id) ?>][<?php echo esc_attr($index) ?>][]" style="width: 305px" multiple>
370
  <?php foreach ($selectedCondition['options'] as $value => $label) : ?>
371
- <option value="<?php echo esc_attr($value) ?>" <?php if (in_array($value, $ifMenuOptions[$index])) echo 'selected' ?>><?php echo $label ?></option>
372
  <?php endforeach ?>
373
  </select>
374
  <?php endif ?>
@@ -401,7 +273,7 @@ class If_Menu {
401
  }
402
  }
403
 
404
- public static function customWalker($walker) {
405
  global $wp_version;
406
 
407
  if (version_compare( $wp_version, '4.7.0', '>=')) {
@@ -447,9 +319,19 @@ class If_Menu {
447
  }
448
 
449
  public static function getPlan() {
450
- if (true || isset($_REQUEST['if-menu-recheck-plan']) || false === ($plan = get_transient('if-menu-plan'))) {
 
 
 
 
 
 
 
 
 
 
451
  $plan = false;
452
- $request = wp_remote_get('https://wordpress.layered.studio/get-plan?site=' . urlencode(site_url()) . '&for=if-menu&_nonce=' . self::apiNonce('plan-check'));
453
 
454
  if (!is_wp_error($request)) {
455
  $data = json_decode(wp_remote_retrieve_body($request), true);
@@ -470,12 +352,9 @@ class If_Menu {
470
  $action = isset($_REQUEST['action']) ? sanitize_key($_REQUEST['action']) : false;
471
  $nonce = isset($_REQUEST['nonce']) ? sanitize_key($_REQUEST['nonce']) : false;
472
  return array('valid' => $action && $nonce && $nonce === get_transient('if-menu-nonce-' . $action));
473
- }
474
- ) );
475
- }
476
-
477
- public static function pluginActivate() {
478
- add_option('if-menu-peak', 0);
479
  }
480
 
481
  }
@@ -496,5 +375,15 @@ include 'src/conditions-multiple-options.php';
496
  Run the plugin
497
  ------------------------------------------------ */
498
 
499
- register_activation_hook(__FILE__, array('If_Menu', 'pluginActivate'));
 
 
 
 
 
 
 
 
 
500
  add_action('plugins_loaded', 'If_Menu::init');
 
1
  <?php
2
  /*
3
+ Plugin Name: If Menu - Visibility control for menus
4
+ Plugin URI: https://layered.store/plugins/if-menu
5
  Description: Display tailored menu items to each visitor with visibility rules
6
+ Version: 0.16.3
7
  Text Domain: if-menu
8
  Author: Layered
9
+ Author URI: https://layered.store
10
+ License: GPL-3.0-or-later
11
+ License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  */
13
 
14
+ use Layered\SafeEval\SafeEval;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ require plugin_dir_path(__FILE__) . 'vendor/autoload.php';
17
 
18
  class If_Menu {
19
 
20
  public static function init() {
21
+ global $pagenow, $wp_version;
 
 
22
 
23
  add_action('rest_api_init', 'If_Menu::restApi');
24
 
25
  if (is_admin()) {
26
  add_action('admin_enqueue_scripts', 'If_Menu::admin_init');
27
  add_action('wp_update_nav_menu_item', 'If_Menu::wp_update_nav_menu_item', 10, 2);
28
+
29
+ // Add missing `wp_nav_menu_item_custom_fields` filter in Walker_Nav_Menu_Edit
30
+ if (version_compare($wp_version, '5.4', '<')) {
31
+ add_filter('wp_edit_nav_menu_walker', 'If_Menu::customWalker', 500, 2);
32
+ }
33
+
34
  add_action('wp_nav_menu_item_custom_fields', 'If_Menu::menu_item_fields');
35
  add_action('wp_nav_menu_item_custom_title', 'If_Menu::menu_item_title');
 
36
  add_action('admin_footer', 'If_Menu::adminFooter');
 
 
 
37
 
38
+ if (get_option('if-menu-admin', 1) && $pagenow !== 'nav-menus.php') {
39
+ add_filter('wp_get_nav_menu_items', 'If_Menu::wp_get_nav_menu_items');
40
  }
41
  } else {
42
+ add_filter('wp_get_nav_menu_items', 'If_Menu::wp_get_nav_menu_items');
43
  add_action('wp_enqueue_scripts', 'If_Menu::addAssets');
44
  }
45
  }
50
  if ($for_testing) {
51
  $c2 = array();
52
  foreach ($conditions as $condition) {
53
+ if (isset($condition['id'])) {
54
+ $c2[$condition['id']] = $condition;
55
+ }
56
+ if (isset($condition['name'])) {
57
+ $c2[$condition['name']] = $condition;
58
+ }
59
  if (isset($condition['alias'])) {
60
  $c2[$condition['alias']] = $condition;
61
  }
112
  $eval[] = $singleCondition;
113
  }
114
 
115
+ $safeEval = new SafeEval;
116
+
117
+ if ((count($eval) === 1 && $eval[0] == 0) || (count($eval) > 1 && !$safeEval->evaluate(implode(' ', $eval)))) {
118
  if ($canPeek) {
119
+ $item->classes[] = 'if-menu-peek';
120
+ } else {
121
+ unset($items[$key]);
122
+ }
123
+
124
  $hidden_items[] = $item->ID;
125
  }
126
  }
135
 
136
  if ($pagenow == 'nav-menus.php') {
137
  wp_enqueue_script('select2', plugins_url('assets/select2.min.js', __FILE__), array('jquery'), '4.0.5');
138
+ wp_enqueue_script('if-menu', plugins_url('assets/if-menu.js', __FILE__), array('select2', 'jquery-ui-dialog'), '0.16');
139
 
140
  wp_enqueue_style('select2', plugins_url('assets/select2.min.css', __FILE__), array(), '4.0.5');
141
+ wp_enqueue_style('if-menu', plugins_url('assets/if-menu.css', __FILE__), array('wp-jquery-ui-dialog'), '0.15');
142
 
143
  wp_localize_script('if-menu', 'IfMenu', array(
144
  'plan' => self::getPlan(),
145
  'conflictErrorMessage' => sprintf(
146
  wp_kses(
147
  __('<strong>If Menu</strong> detected a conflict with another plugin or theme (%s) and may not work as expected. <a href="%s" target="_blank">Read more about the issue here</a>', 'if-menu'),
148
+ array('a' => array('href' => [], 'target' => []), 'strong' => [])
149
  ),
150
+ apply_filters('wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', 0),
151
+ esc_url('https://wordpress.org/plugins/if-menu/#if%20menu%20is%20broken%2C%20no%20visibility%20rules%20are%20available')
152
+ ),
153
+ 'duplicateErrorMessage' => sprintf(
154
+ wp_kses(
155
+ __('<strong>If Menu</strong> detected that another plugin or theme (%s) extends menu items incorrectly. This may cause duplicate visibility rules to show up, but functionality should be fine.', 'if-menu'),
156
+ ['strong' => []]
157
+ ),
158
+ apply_filters('wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', 0)
159
  )
160
  ));
161
  }
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
 
164
  public static function adminFooter() {
173
  <?php
174
  }
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  public static function addAssets() {
177
  wp_enqueue_style('if-menu-site-css', plugins_url('assets/if-menu-site.css', __FILE__));
178
  }
197
  ?>
198
 
199
  <p class="if-menu-enable description description-wide">
200
+ <a href="<?php echo admin_url('themes.php?page=if-menu') ?>" class="if-menu-help" data-tooltip="<?php esc_attr_e('Visibility rule examples', 'if-menu') ?>" title="<?php esc_attr_e('Visibility rule examples', 'if-menu') ?>"><span class="dashicons dashicons-editor-help"></span></a>
201
  <label>
202
  <input <?php if (isset($if_menu_enable[0])) checked( $if_menu_enable[0], 1 ) ?> type="checkbox" value="1" class="menu-item-if-menu-enable" name="menu-item-if-menu-enable[<?php echo esc_attr( $item_id ); ?>][]" />
203
+ <?php esc_html_e('Enable visibility rules', 'if-menu') ?>
204
  </label>
205
  </p>
206
 
240
  <?php if (isset($selectedCondition['options'])) : ?>
241
  <select class="menu-item-if-menu-options" name="menu-item-if-menu-options[<?php echo esc_attr($item_id) ?>][<?php echo esc_attr($index) ?>][]" style="width: 305px" multiple>
242
  <?php foreach ($selectedCondition['options'] as $value => $label) : ?>
243
+ <option value="<?php echo esc_attr($value) ?>" <?php if (is_array($ifMenuOptions[$index]) && in_array($value, $ifMenuOptions[$index])) echo 'selected' ?>><?php echo $label ?></option>
244
  <?php endforeach ?>
245
  </select>
246
  <?php endif ?>
273
  }
274
  }
275
 
276
+ public static function customWalker($walker, $menuId = null) {
277
  global $wp_version;
278
 
279
  if (version_compare( $wp_version, '4.7.0', '>=')) {
319
  }
320
 
321
  public static function getPlan() {
322
+ global $layeredMarketMoreVisibilityRules;
323
+
324
+ if (class_exists('Layered\LayeredMarketForWp\Api') && isset($layeredMarketMoreVisibilityRules) && $layeredMarketMoreVisibilityRules instanceof Layered\LayeredMarketForWp\Api && $layeredMarketMoreVisibilityRules->isLicenseActive()) {
325
+ $license = $layeredMarketMoreVisibilityRules->getLicense();
326
+ $license['until'] = $license['end'];
327
+ $license['plan'] = 'premium';
328
+
329
+ return $license;
330
+ }
331
+
332
+ if (isset($_REQUEST['if-menu-recheck-plan']) || false === ($plan = get_transient('if-menu-plan'))) {
333
  $plan = false;
334
+ $request = wp_remote_get('https://layered.market/get-plan?site=' . urlencode(site_url()) . '&for=if-menu&_nonce=' . self::apiNonce('plan-check') . '&licenseKey=' . get_option('if-menu-license-key'), array('timeout' => 60));
335
 
336
  if (!is_wp_error($request)) {
337
  $data = json_decode(wp_remote_retrieve_body($request), true);
352
  $action = isset($_REQUEST['action']) ? sanitize_key($_REQUEST['action']) : false;
353
  $nonce = isset($_REQUEST['nonce']) ? sanitize_key($_REQUEST['nonce']) : false;
354
  return array('valid' => $action && $nonce && $nonce === get_transient('if-menu-nonce-' . $action));
355
+ },
356
+ 'permission_callback' => '__return_true',
357
+ ));
 
 
 
358
  }
359
 
360
  }
375
  Run the plugin
376
  ------------------------------------------------ */
377
 
378
+ if (version_compare(PHP_VERSION, '5.4', '<')) {
379
+ add_action('admin_notices', function() {
380
+ ?>
381
+ <div class="notice notice-warning is-dismissible">
382
+ <p><?php printf(__('<strong>If Menu</strong> plugin requires PHP version to be at least 5.4, current one is %s', 'if-menu'), PHP_VERSION) ?></p>
383
+ </div>
384
+ <?php
385
+ });
386
+ }
387
+
388
  add_action('plugins_loaded', 'If_Menu::init');
389
+ add_action('plugins_loaded', 'Layered\IfMenu\Admin::start');
readme.md CHANGED
@@ -9,6 +9,8 @@ If Menu
9
 
10
  The plugin is easy to use, each menu item will have a “Change menu item visibility” option which will enable the selection of rules.
11
 
 
 
12
 
13
  ## Features
14
 
9
 
10
  The plugin is easy to use, each menu item will have a “Change menu item visibility” option which will enable the selection of rules.
11
 
12
+ > This repo is used only for development, downloading & installing from here won't work as expected. Install from [WordPress.org plugin page](https://wordpress.org/plugins/if-menu/)
13
+
14
 
15
  ## Features
16
 
readme.txt CHANGED
@@ -1,25 +1,30 @@
1
- === If Menu ===
2
- Contributors: andrei.igna
3
- Tags: menu, visibility, roles, rules, hide, if, nav menu
4
- Requires at least: 4
5
- Tested up to: 4.9
6
- Stable tag: trunk
7
- License: GPL2
8
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
9
 
10
  Display tailored menu items to each visitor with visibility rules
11
 
12
  == Description ==
13
 
14
- Display tailored menu items to each visitor, based on visibility rules. Here are a few examples:
15
 
16
- * Display a menu item only if current `User is logged in`
17
- * Hide menu items if `Device is mobile`
18
- * Display menu items for `Admins and Editors`
19
  * Hide Login or Register links for `Logged in Users`
20
- * Display menu items for `Users from US and UK`
 
 
21
 
22
- The plugin is easy to use, each menu item will have a new option “Change menu item visibility” which will enable the selection of rules (example in Screenshots)
 
 
23
 
24
  ## Features
25
 
@@ -27,35 +32,87 @@ The plugin is easy to use, each menu item will have a new option “Change menu
27
  * User state `User is logged in`
28
  * User roles `Admin` `Editor` `Author` etc
29
  * Page type `Front page` `Single page` `Single post`
 
30
  * Visitor device `Is Mobile`
31
- * Advanced visibility rules - requires Premium plan
32
  * Visitor location - detect visitor's Country
33
- * 3rd-party plugin integrations - WooCommerce Subscriptions, Groups, WishList Member
 
 
 
 
 
34
  * Multiple rules - mix multiple rules for a menu item visibility
35
  * show if `User is logged in` AND `Device is mobile`
36
  * show if `User is Admin` AND `Is front page`
37
- * Support for adding your custom rules
38
 
39
- Example of adding a new visibility rule is described in the FAQ section
40
 
41
- == Installation ==
42
 
43
- To install the plugin, follow the steps below
44
 
45
- 1. Upload `if-menu` to the `/wp-content/plugins/` directory
46
- 2. Activate the plugin through the 'Plugins' menu in WordPress
47
- 3. Enable visibility rules for your Menu Items in Appearance -> Menus page
 
 
48
 
49
- == Frequently Asked Questions ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
  = If Menu is broken, no visibility rules are available =
52
 
53
- The code for modifying the menu items is limited and if other plugins/themes try to alter the menu items, this plugin will break.
 
 
54
 
55
  This is an ongoing [issue with WordPress](http://core.trac.wordpress.org/ticket/18584) which hopefully will be fixed in a future release.
56
 
57
- Try to use just one plugin that changes functionality for menu items.
 
 
 
 
58
 
 
 
 
 
 
 
59
 
60
  = How can I add a custom visibility rule for menu items? =
61
 
@@ -82,121 +139,33 @@ function my_new_menu_conditions($conditions) {
82
 
83
  = Where can I find conditional functions? =
84
 
85
- WordPress provides [a lot of functions](http://codex.wordpress.org/Conditional_Tags) which can be used to create custom rules for almost any combination that a theme/plugin developer can think of.
86
-
87
- = Who made that really cool icon =
88
-
89
- Got the icons from here https://dribbble.com/shots/1045549-Light-Switches-PSD, so giving the credit to Louie Mantia
90
 
91
  == Screenshots ==
92
 
93
- 1. Enable visibility rules for Menu Items
94
- 2. Example of visibility rules
 
95
 
96
  == Changelog ==
97
 
98
- = 0.8.3 =
99
- *Release Date - 22 February 2018*
100
-
101
- * Fixed - Support for PHP <= 5.3, fixes error
102
-
103
- = 0.8.2 =
104
- *Release Date - 20 February 2018*
105
-
106
- * Fixed - Support for older visibilty rule names, fixes PHP warning
107
-
108
- = 0.8.1 =
109
- *Release Date - 20 February 2018*
110
-
111
- * Fixed - Better options checking, fixes PHP warning
112
-
113
- = 0.8 =
114
- *Release Date - 19 February 2018*
115
-
116
- * Added - Visibility rules with multiple options. Requires Premium plan
117
- * Added - Visibility rule - User country
118
- * Added - Visibility rule - Is Super Admin on MultiSite
119
- * Added - Visibility rule - User is in Group, integration with [Groups](https://wordpress.org/plugins/groups/) plugin
120
- * Added - Visibility rule - User has subscription, integration with [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/) plugin
121
- * Added - Visibility rule - User membership level, integration with [WishList Member](https://member.wishlistproducts.com/) plugin
122
- * Updated - Better conflict detection for Nav_Menu Walker
123
- * Fixed - translation strings & function used
124
-
125
- = 0.7 =
126
- *Release Date - 18 September 2017*
127
-
128
- * Enhancement - Nicer styling for visibility rules
129
- * Added - Peek option - Let admins preview hidden menu items
130
- * Added - Settings page
131
-
132
- = 0.6.3 =
133
- *Release Date - 17 August 2017*
134
-
135
- * New visibility rule - Language Is RTL
136
- * Fix - Single rule works on servers with Eval disabled
137
-
138
- = 0.6.2 =
139
- *Release Date - 8 August 2017*
140
-
141
- * Fix - Backwards compatibility with PHP < 5.4
142
-
143
- = 0.6.1 =
144
- *Release Date - 7 August 2017*
145
-
146
- * Improvement - Change labels & texts for easier use
147
- * Improvement - Better compatibility with latest versions of WordPress
148
- * Improvement - Better compatibility with translation plugins
149
- * Fix - Detection for conflict with other plugins
150
-
151
- = 0.6 =
152
- *Release Date - 27 August 2016*
153
-
154
- * Improvement - Dynamic conditions based on default & custom user roles (added by plugins or themes) [thanks Daniele](https://wordpress.org/support/topic/feature-request-custom-roles)
155
- * Improvement - Grouped conditions by User, Page or other types
156
- * Fix - Filter menu items in admin section
157
- * Fix - Better menu items filter saving code
158
-
159
- = 0.5 =
160
- *Release Date - 20 August 2016*
161
-
162
- * Improvement - Support for WordPress 4.6
163
- * Feature - New condition checking logged in user for current site in Multi Site [requested here](https://wordpress.org/support/topic/multi-site-user-is-logged-in-conditi
164
- on)
165
- * Feature - Added support for multi conditions [thanks for this ideea](https://wordpress.org/support/topic/more-than-one-condition-operators-1)
166
- * Improvement - RO & DE translations
167
-
168
- = 0.4.1 =
169
- *Release Date - 13 December 2015*
170
-
171
- * Fix - Fixes [issue](https://wordpress.org/support/topic/cant-add-items-to-menu-with-plugin-enabled) with adding new menu items
172
-
173
- = 0.4 =
174
- *Release Date - 29 November 2015*
175
-
176
- * Improved compatibility with other plugins/themes using a [shared action hook for menu item fields](https://core.trac.wordpress.org/ticket/18584#comment:37)
177
- * Enhancement - show visibility status in menu item titles
178
-
179
- = 0.3 =
180
-
181
- Small update
182
-
183
- * Plugin icon
184
- * Set as compatible with WordPress 4
185
-
186
- = 0.2.1 =
187
-
188
- Minor fixes
189
-
190
- * [Fix](https://twitter.com/joesegal/status/480386235249082368) - Editing menus - show/hide conditions when adding new item (thanks [Joseph Segal](https://twitter.com/joesegal))
191
 
192
- = 0.2 =
 
 
193
 
194
- Update for compatibility with newer versions of WordPress
 
195
 
196
- * [Feature](http://wordpress.org/support/topic/new-feature-power-to-the-conditions) - access to menu item object in condition callback (thanks [BramNL](http://wordpress.org/support/profile/bramnl))
197
- * [Fix](http://wordpress.org/support/topic/save-is-requested-before-leaving-menu-page) - alert for leaving page even if no changes were made for menus (thanks [Denny](http://wordpress.org/support/profile/ddahly))
198
- * Fix - update method in `Walker_Nav_Menu_Edit` to be compatible with newer version of WP
199
- * [Fix](http://wordpress.org/support/topic/bugfix-for-readmetxt) - example in Readme (thanks [BramNL](http://wordpress.org/support/profile/bramnl))
200
 
201
- = 0.1 =
202
- * Plugin release. Included basic menu conditional statements
 
1
+ === If Menu - Visibility control for Menus ===
2
+ Contributors: andreiigna, elenalyrd
3
+ Tags: menu, visibility, rules, roles, hide, if, nav menu, show, display
4
+ Requires at least: 5
5
+ Tested up to: 6.0
6
+ Requires PHP: 5.6
7
+ Stable tag: 0.16.3
8
+ License: GPL-3.0-or-later
9
+ License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
11
  Display tailored menu items to each visitor with visibility rules
12
 
13
  == Description ==
14
 
15
+ Control what menu items your site's visitors see, with visibility rules. Here are a few examples:
16
 
17
+ * Display a menu item only if `User is logged in`
18
+ * Hide menus if `Device is mobile`
19
+ * Display menus for `Admins and Editors`
20
  * Hide Login or Register links for `Logged in Users`
21
+ * Display menus for `Users from US or UK`
22
+ * Display menus only for `Customers with active membership`
23
+ * Display menus for visitors browsing with `Language English or Spanish`
24
 
25
+ After the plugin is enabled, each menu item will have a new option “Change menu item visibility” which will enable the selection of visibility rules.
26
+
27
+ Check the examples in screenshots or try it here → [demos.layered.store](https://demos.layered.store)
28
 
29
  ## Features
30
 
32
  * User state `User is logged in`
33
  * User roles `Admin` `Editor` `Author` etc
34
  * Page type `Front page` `Single page` `Single post`
35
+ * Is Archive page (year, category, search results, etc)
36
  * Visitor device `Is Mobile`
37
+ * Advanced visibility rules - requires [More Visibility Rules Add-on](https://layered.store/plugins/more-visibility-rules)
38
  * Visitor location - detect visitor's Country
39
+ * Visitor language - detect visitor's selected Language
40
+ * WooCommerce Subscriptions - Display menus for users with active subscription
41
+ * WooCommerce Memberships - Display menus for customers with active membership plans
42
+ * Groups - Detect if users are in specific groups
43
+ * WishList Member - Detect the users' membership level
44
+ * Restrict Content Pro - Detect the users' subscription level
45
  * Multiple rules - mix multiple rules for a menu item visibility
46
  * show if `User is logged in` AND `Device is mobile`
47
  * show if `User is Admin` AND `Is front page`
48
+ * Support for [adding your custom rules](https://wordpress.org/plugins/if-menu/#how%20can%20i%20add%20a%20custom%20visibility%20rule%20for%20menu%20items%3F)
49
 
50
+ == Frequently Asked Questions ==
51
 
52
+ = Show or hide menus if user is logged in =
53
 
54
+ One of the most popular uses of the plugin is to show the "Register/Login" menu for non-logged-in users, and "Your account" for logged-in users.
55
 
56
+ To enable this for "Register/Login" menu, follow these steps:
57
+ 1. Go to WordPress Admin on your website -> Appearance -> Menus
58
+ 2. Expand the menu item for "Register" or "Login" page
59
+ 3. Enable the option "Enable visibility rules"
60
+ 4. Choose the rule "Hide if user logged in"
61
 
62
+ For showing the "Your account page", follow these steps:
63
+ 1. Go to WordPress Admin on your website -> Appearance -> Menus
64
+ 2. Expand the menu item for "Your account page" page
65
+ 3. Enable the option "Enable visibility rules"
66
+ 4. Choose the rule "Show if user logged in"
67
+
68
+ ![image info](https://ps.w.org/if-menu/assets/screenshot-2.png)
69
+
70
+ = Mix multiple visibility rules =
71
+
72
+ Multiple visibility rules can be used at once, like so:
73
+
74
+ For showing a menu item only for admins on desktop:
75
+ 1. Go to WordPress Admin on your website -> Appearance -> Menus
76
+ 2. Expand the menu item you want
77
+ 3. Enable the option "Enable visibility rules"
78
+ 4. Choose the rule "Show if user is Administrator"
79
+ 5. Click the "+" button at the end of the visibility rule, and change to "AND"
80
+ 6. On the newly added row, choose "Hide if device is mobile"
81
+
82
+ For showing a menu item for Admins or users with an active subscription:
83
+ 1. Go to WordPress Admin on your website -> Appearance -> Menus
84
+ 2. Expand the menu item you want
85
+ 3. Enable the option "Enable visibility rules"
86
+ 4. Choose the rule "Show if user is Administrator"
87
+ 5. Click the "+" button at the end of the visibility rule, and change to "OR"
88
+ 6. On the newly added row, choose "Show if Has active subscription __"
89
+
90
+ To remove an extra visibility rule:
91
+ 1. Go to WordPress Admin on your website -> Appearance -> Menus
92
+ 2. Expand the menu item with multiple visibility rules
93
+ 3. Click on the "AND" / "OR" buttons at end of visibility option
94
+ 4. Change to "+"
95
 
96
  = If Menu is broken, no visibility rules are available =
97
 
98
+ There’s a known limitation with adding functionality for menu items in WordPress, and conflicts may happen between some plugins and themes.
99
+
100
+ If there are multiple plugins that extend Menu Items, for example If Menu and a plugin for Menu Icons, only one of them can add the needed functionality and the other one won't work as expected.
101
 
102
  This is an ongoing [issue with WordPress](http://core.trac.wordpress.org/ticket/18584) which hopefully will be fixed in a future release.
103
 
104
+ If the "Menus" page is blank or options for visibility rules are not displaying, there is a way to test which plugin/theme causes this conflict.
105
+ Please disable other plugins or themes until you find the one that causes the problem, and contact the respective developers.
106
+ In the message include the link to WordPress ticket about menu items http://core.trac.wordpress.org/ticket/18584 where they can see detailed info on how to fix the problem.
107
+
108
+ = Changes to menus are not saved =
109
 
110
+ This problem may happen on sites with a large number of menu items.
111
+ In most cases, this is not a limitation or problem caused by plugins or WordPress, but by the hosting server.
112
+
113
+ Your hosting provider or server limits the amount of data that can be sent to WordPress for saving in database.
114
+ The setting is named "PHP max_input_vars" and it's value should be increased, ex: `max_input_vars = 200` to `max_input_vars = 500`.
115
+ Contact your hosting provider or make the change yourself if you have access. More details can be found here https://core.trac.wordpress.org/ticket/14134
116
 
117
  = How can I add a custom visibility rule for menu items? =
118
 
139
 
140
  = Where can I find conditional functions? =
141
 
142
+ WordPress provides [a lot of functions](https://developer.wordpress.org/themes/references/list-of-conditional-tags/) which can be used to create custom rules for almost any combination that a theme/plugin developer can think of.
 
 
 
 
143
 
144
  == Screenshots ==
145
 
146
+ 1. If Menu website demo
147
+ 2. Enable visibility rules for Menu Items
148
+ 3. Example of visibility rules
149
 
150
  == Changelog ==
151
 
152
+ = 0.16.3 - 26 June 2022 =
153
+ * Added - More usage examples in plugin FAQs section
154
+ * Updated - WordPress v6 compatibility
155
+ * Updated - Integration with Restrict Content Pro plugin is improved
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
+ = 0.16.2 - 17 January 2020 =
158
+ * Fixed - Error shown about the registered REST Api endpoint
159
+ * Updated - Ensure compatibility with WordPress 5.6
160
 
161
+ = 0.16.1 - 11 April 2020 =
162
+ * Fixed - Improved compatibility with other plugins that extend menu items
163
 
164
+ = 0.16 - 1 April 2020 =
165
+ * Added - Visibility rule - Is Archive page
166
+ * Updated - Ensure compatibility with WordPress 5.4
167
+ * Updated - Improved compatibility with WooCommerce Membership/Subscription plugins
168
 
169
+ = 0.15 - 2 July 2019 =
170
+ * Updated - Texts & styles for If Menu settings page
171
+ * Fixed - PHP error that may appear for Visibility Rules saved before If Menu v0.9
src/Admin.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Layered\IfMenu;
3
+
4
+ class Admin {
5
+
6
+ public static function start() {
7
+ return new static;
8
+ }
9
+
10
+ protected function __construct() {
11
+ add_action('admin_init', [$this, 'actions']);
12
+ add_action('admin_menu', [$this, 'menu']);
13
+ add_action('admin_enqueue_scripts', [$this, 'assets']);
14
+ }
15
+
16
+ public function actions() {
17
+ if (isset($_POST['if-menu-settings'])) {
18
+ update_option('if-menu-peak', isset($_POST['if-menu-peek']) && $_POST['if-menu-peek'] == 1 ? 1 : 0);
19
+ update_option('if-menu-admin', isset($_POST['if-menu-admin']) && $_POST['if-menu-admin'] == 1 ? 1 : 0);
20
+ }
21
+
22
+ if (isset($_REQUEST['if-menu-set-license-key']) && $_REQUEST['if-menu-set-license-key']) {
23
+ update_option('if-menu-license-key', $_REQUEST['if-menu-set-license-key']);
24
+ wp_redirect(admin_url('themes.php?page=if-menu&if-menu-recheck-plan'));
25
+ exit;
26
+ }
27
+
28
+ if (isset($_REQUEST['if-menu-delete-license-key']) && $_REQUEST['if-menu-delete-license-key'] == 'y') {
29
+ delete_option('if-menu-license-key');
30
+ wp_redirect(admin_url('themes.php?page=if-menu&if-menu-recheck-plan'));
31
+ exit;
32
+ }
33
+ }
34
+
35
+ public function assets() {
36
+ global $pagenow;
37
+
38
+ if ($pagenow == 'themes.php') {
39
+ wp_enqueue_style('if-menu', plugins_url('assets/if-menu.css', dirname(__FILE__)), '0.9');
40
+ }
41
+ }
42
+
43
+ public function menu() {
44
+ add_submenu_page('themes.php', 'If Menu', 'If Menu', 'edit_theme_options', 'if-menu', [$this, 'page']);
45
+ }
46
+
47
+ public function page() {
48
+ $ifMenuPeek = get_option('if-menu-peak');
49
+ $ifMenuAdmin = get_option('if-menu-admin', 1);
50
+ $plan = \If_Menu::getPlan();
51
+ ?>
52
+
53
+ <div class="wrap about-wrap if-menu-wrap">
54
+ <a href="<?php echo admin_url('nav-menus.php') ?>" class="button button-secondary if-menu-help"><?php _e('Manage Menus', 'if-menu') ?></a>
55
+ <h1>If Menu</h1>
56
+ <p class="about-text"><?php _e('Now you can display personalized menus to each visitor, based on visibility rules. Here are a few examples:', 'if-menu') ?></p>
57
+ <ul class="list" style="margin-bottom: 0">
58
+ <li><?php _e('Hide Login or Register links for logged-in users:', 'if-menu') ?> <code><span class="if-menu-red"><?php _e('Hide', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('User is logged in', 'if-menu') ?></span></code></li>
59
+ <li><?php _e('Display Logout link for logged-in users:', 'if-menu') ?> <code><span class="if-menu-green"><?php _e('Show', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('User is logged in', 'if-menu') ?></span></code></li>
60
+ <li><?php _e('Hide menu item on mobile devices:', 'if-menu') ?> <code><span class="if-menu-red"><?php _e('Hide', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('Mobile', 'if-menu') ?></span></code></li>
61
+ <li><?php _e('Display menu item for users in US and UK:', 'if-menu') ?> <code><span class="if-menu-green"><?php _e('Show', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('User from country: US, UK', 'if-menu') ?></span></code></li>
62
+ <li><?php _e('Display menu item for visitors browsing in English or Spanish:', 'if-menu') ?> <code><span class="if-menu-green"><?php _e('Show', 'if-menu') ?></span> <?php _e('if', 'if-menu') ?> <span class="if-menu-purple"><?php _e('Language: English, Spanish', 'if-menu') ?></span></code></li>
63
+ </ul>
64
+ <p style="margin-top: 0"><a href="https://layered.store/plugins/if-menu/support#faq" target="_blank"><small>See more examples here</small></a></p>
65
+ <hr class="wp-header-end">
66
+
67
+ <div class="feature-section pricing-plan-section two-col">
68
+ <div class="col">
69
+ <div class="pricing-cell <?php if (!$plan || $plan['plan'] == 'free') echo 'selected' ?>">
70
+ <span class="price"><small><?php _e('Free', 'if-menu') ?></small></span>
71
+ <h3><?php _e('Basic', 'if-menu') ?></h3>
72
+
73
+ <ul>
74
+ <li>
75
+ <?php _e('Basic visibility rules:', 'if-menu') ?>
76
+ <ul>
77
+ <li><?php _e('User role - is Admin, Editor, Author or Shop Manager', 'if-menu') ?></li>
78
+ <li><?php _e('User state - visitor is logged in or out', 'if-menu') ?></li>
79
+ <li><?php _e('Visitor device - detect mobile or desktop', 'if-menu') ?></li>
80
+ </ul>
81
+ </li>
82
+ <li><?php _e('Support on WordPress forum', 'if-menu') ?></li>
83
+ </ul>
84
+
85
+ <p>
86
+ <?php if (!$plan || $plan['plan'] == 'free') : ?>
87
+ <button class="button disabled"><?php _e('Current plan', 'if-menu') ?></button>
88
+ <?php endif ?>
89
+ </p>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="col">
94
+ <div class="pricing-cell <?php if ($plan && $plan['plan'] == 'premium') echo 'selected' ?>">
95
+ <?php if (!$plan || $plan['plan'] != 'premium') : ?>
96
+ <span class="price">from $20<small>/<?php _e('annually', 'if-menu') ?></small></span>
97
+ <?php endif ?>
98
+ <h3><?php _e('Premium', 'if-menu') ?></h3>
99
+
100
+ <ul>
101
+ <li>
102
+ <?php _e('Advanced visibility rules:', 'if-menu') ?>
103
+ <ul>
104
+ <li><?php _e('Visitor location - detect visitor\'s country', 'if-menu') ?></li>
105
+ <li><?php _e('Language - detect visitor\'s selected language', 'if-menu') ?></li>
106
+ </ul>
107
+ </li>
108
+ <li>
109
+ <?php _e('3rd-party plugin integrations:', 'if-menu') ?>
110
+ <ul>
111
+ <li><a href="https://woocommerce.com/products/woocommerce-subscriptions" target="_blank">WooCommerce Subscriptions</a> - <?php _e('Customer has active subscription', 'if-menu') ?></li>
112
+ <li><a href="https://woocommerce.com/products/woocommerce-memberships" target="_blank">WooCommerce Memberships</a> - <?php _e('Customer has active membership plan', 'if-menu') ?></li>
113
+ <li><a href="https://wordpress.org/plugins/groups" target="_blank">Groups</a> - <?php _e('Users are in a Group', 'if-menu') ?></li>
114
+ <li><a href="https://member.wishlistproducts.com" target="_blank">WishList Member</a> - <?php _e('Users above a Membership Level', 'if-menu') ?></li>
115
+ <li><a href="https://astoundify.com/products/wp-job-manager-listing-payments/" target="_blank">Listing Payments</a> - <?php _e('Customer has active Job Manager Listing subscription', 'if-menu') ?></li>
116
+ <li><a href="https://restrictcontentpro.com/" target="_blank">Restrict Content Pro</a> - <?php _e('User has Subscription Level', 'if-menu') ?></li>
117
+ </ul>
118
+ </li>
119
+ <li>
120
+ <?php if ($plan && $plan['plan'] == 'premium') : ?>
121
+ <a href="https://layered.market/support" target="_blank"><?php _e('Priority support', 'if-menu') ?> &#10147;</a>
122
+ <?php else : ?>
123
+ <?php _e('Priority support', 'if-menu') ?>
124
+ <?php endif ?>
125
+ </li>
126
+ </ul>
127
+
128
+ <p class="description">
129
+ <?php if ($plan && $plan['plan'] == 'premium') : ?>
130
+ <button class="button disabled"><?php _e('Current plan', 'if-menu') ?></button>
131
+ <br><br><?php printf(__('Active until %s.', 'if-menu'), date(get_option('date_format'), strtotime($plan['end']))) ?>
132
+ <br>Auto renew is <?php echo $plan['autoRenew'] ? 'on' : 'off' ?>, manage on <a href="https://layered.market/licenses" target="_blank">Layered Market</a>.
133
+ <?php else : ?>
134
+ <a href="https://layered.market/plugins/more-visibility-rules?site=<?php echo urlencode(site_url()) ?>&utm_source=if-widget&utm_medium=upgrade&utm_campaign=Upgrade%20from%20WordPress#pricing" class="button button-primary" target="_blank"><?php _e('Get premium', 'if-menu') ?></a>
135
+ <?php endif ?>
136
+ </p>
137
+ </div>
138
+ </div>
139
+ </div>
140
+
141
+ <hr>
142
+
143
+ <h3 class="title"><?php _e('Settings', 'if-menu') ?></h3>
144
+
145
+ <form method="post" action="">
146
+ <table class="form-table">
147
+ <tbody>
148
+ <tr>
149
+ <th scope="row"><?php _e('If Menu peek', 'if-menu') ?></th>
150
+ <td>
151
+ <fieldset>
152
+ <label><input type="checkbox" name="if-menu-peek" value="1" <?php checked($ifMenuPeek, 1) ?>> <?php _e('If Menu peek', 'if-menu') ?></label><br>
153
+ </fieldset>
154
+ <p class="description"><?php _e('Let administrators preview hidden menu items on website (useful for testing)', 'if-menu') ?></p>
155
+ </td>
156
+ </tr>
157
+ <tr>
158
+ <th scope="row"><?php _e('Enabled in Admin panel', 'if-menu') ?></th>
159
+ <td>
160
+ <fieldset>
161
+ <label><input type="checkbox" name="if-menu-admin" value="1" <?php checked($ifMenuAdmin, 1) ?>> <?php _e('Filter menu items in Admin panel', 'if-menu') ?></label><br>
162
+ </fieldset>
163
+ <p class="description"><?php _e('If disabled, all menu items will be displayed in Admin panel, regardless of any visibility rules', 'if-menu') ?></p>
164
+ </td>
165
+ </tr>
166
+ <tr>
167
+ <th scope="row"></th>
168
+ <td>
169
+ <p class="submit"><input type="submit" name="if-menu-settings" id="submit" class="button button-primary" value="<?php _e('Save Changes', 'if-menu') ?>"></p>
170
+ </td>
171
+ </tr>
172
+ </tbody>
173
+ </table>
174
+ </form>
175
+
176
+ <hr>
177
+
178
+ <p>
179
+ <strong>If Menu</strong>:
180
+ <a href="https://wordpress.org/plugins/if-menu/#faq" target="wpplugins"><?php _e('FAQs', 'if-menu') ?></a> &middot;
181
+ <a href="https://wordpress.org/support/plugin/if-menu" target="wpplugins"><?php _e('Support', 'if-menu') ?></a> &middot;
182
+ <span class="dashicons dashicons-star-filled" style="color: #ffb900"></span> <a href="https://wordpress.org/plugins/if-menu/#reviews" target="wpplugins"><?php _e('Leave a review', 'if-menu') ?></a>
183
+ </p>
184
+ </div>
185
+
186
+ <?php
187
+ }
188
+
189
+ }
src/conditions-basic.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  add_filter('if_menu_conditions', 'if_menu_basic_conditions');
4
 
5
- function if_menu_basic_conditions($conditions) {
6
  global $wp_roles;
7
 
8
 
@@ -50,6 +50,15 @@ function if_menu_basic_conditions($conditions) {
50
  );
51
  }
52
 
 
 
 
 
 
 
 
 
 
53
 
54
  // Page type
55
  $conditions[] = array(
@@ -67,12 +76,19 @@ function if_menu_basic_conditions($conditions) {
67
  );
68
 
69
  $conditions[] = array(
70
- 'id' => 'single-page',
71
  'name' => __('Page', 'if-menu'),
72
  'condition' => 'is_page',
73
  'group' => __('Page type', 'if-menu')
74
  );
75
 
 
 
 
 
 
 
 
76
 
77
  // Devices
78
  $conditions[] = array(
2
 
3
  add_filter('if_menu_conditions', 'if_menu_basic_conditions');
4
 
5
+ function if_menu_basic_conditions(array $conditions) {
6
  global $wp_roles;
7
 
8
 
50
  );
51
  }
52
 
53
+ $conditions[] = array(
54
+ 'id' => 'users-can-register',
55
+ 'name' => __('User registration is allowed', 'if-menu'),
56
+ 'condition' => function() {
57
+ return (bool) get_option('users_can_register');
58
+ },
59
+ 'group' => __('User', 'if-menu')
60
+ );
61
+
62
 
63
  // Page type
64
  $conditions[] = array(
76
  );
77
 
78
  $conditions[] = array(
79
+ 'id' => 'is-page',
80
  'name' => __('Page', 'if-menu'),
81
  'condition' => 'is_page',
82
  'group' => __('Page type', 'if-menu')
83
  );
84
 
85
+ $conditions[] = array(
86
+ 'id' => 'page-archive',
87
+ 'name' => __('Is Archive page', 'if-menu'),
88
+ 'condition' => 'is_archive',
89
+ 'group' => __('Page type', 'if-menu')
90
+ );
91
+
92
 
93
  // Devices
94
  $conditions[] = array(
src/conditions-multiple-options.php CHANGED
@@ -2,264 +2,265 @@
2
 
3
  add_filter('if_menu_conditions', 'ifMenuAdvancedConditions');
4
 
5
- function ifMenuAdvancedConditions($conditions) {
6
  $activePlugins = apply_filters('active_plugins', get_option('active_plugins'));
7
 
8
 
9
  // User location
10
  $conditions[] = array(
11
  'id' => 'user-location',
 
12
  'name' => __('From country', 'if-menu'),
13
  'options' => array(
14
- 'AF' => __( 'Afghanistan', 'if-menu' ),
15
- 'AX' => __( '&#197;land Islands', 'if-menu' ),
16
- 'AL' => __( 'Albania', 'if-menu' ),
17
- 'DZ' => __( 'Algeria', 'if-menu' ),
18
- 'AS' => __( 'American Samoa', 'if-menu' ),
19
- 'AD' => __( 'Andorra', 'if-menu' ),
20
- 'AO' => __( 'Angola', 'if-menu' ),
21
- 'AI' => __( 'Anguilla', 'if-menu' ),
22
- 'AQ' => __( 'Antarctica', 'if-menu' ),
23
- 'AG' => __( 'Antigua and Barbuda', 'if-menu' ),
24
- 'AR' => __( 'Argentina', 'if-menu' ),
25
- 'AM' => __( 'Armenia', 'if-menu' ),
26
- 'AW' => __( 'Aruba', 'if-menu' ),
27
- 'AU' => __( 'Australia', 'if-menu' ),
28
- 'AT' => __( 'Austria', 'if-menu' ),
29
- 'AZ' => __( 'Azerbaijan', 'if-menu' ),
30
- 'BS' => __( 'Bahamas', 'if-menu' ),
31
- 'BH' => __( 'Bahrain', 'if-menu' ),
32
- 'BD' => __( 'Bangladesh', 'if-menu' ),
33
- 'BB' => __( 'Barbados', 'if-menu' ),
34
- 'BY' => __( 'Belarus', 'if-menu' ),
35
- 'BE' => __( 'Belgium', 'if-menu' ),
36
- 'PW' => __( 'Belau', 'if-menu' ),
37
- 'BZ' => __( 'Belize', 'if-menu' ),
38
- 'BJ' => __( 'Benin', 'if-menu' ),
39
- 'BM' => __( 'Bermuda', 'if-menu' ),
40
- 'BT' => __( 'Bhutan', 'if-menu' ),
41
- 'BO' => __( 'Bolivia', 'if-menu' ),
42
- 'BQ' => __( 'Bonaire, Saint Eustatius and Saba', 'if-menu' ),
43
- 'BA' => __( 'Bosnia and Herzegovina', 'if-menu' ),
44
- 'BW' => __( 'Botswana', 'if-menu' ),
45
- 'BV' => __( 'Bouvet Island', 'if-menu' ),
46
- 'BR' => __( 'Brazil', 'if-menu' ),
47
- 'IO' => __( 'British Indian Ocean Territory', 'if-menu' ),
48
- 'VG' => __( 'British Virgin Islands', 'if-menu' ),
49
- 'BN' => __( 'Brunei', 'if-menu' ),
50
- 'BG' => __( 'Bulgaria', 'if-menu' ),
51
- 'BF' => __( 'Burkina Faso', 'if-menu' ),
52
- 'BI' => __( 'Burundi', 'if-menu' ),
53
- 'KH' => __( 'Cambodia', 'if-menu' ),
54
- 'CM' => __( 'Cameroon', 'if-menu' ),
55
- 'CA' => __( 'Canada', 'if-menu' ),
56
- 'CV' => __( 'Cape Verde', 'if-menu' ),
57
- 'KY' => __( 'Cayman Islands', 'if-menu' ),
58
- 'CF' => __( 'Central African Republic', 'if-menu' ),
59
- 'TD' => __( 'Chad', 'if-menu' ),
60
- 'CL' => __( 'Chile', 'if-menu' ),
61
- 'CN' => __( 'China', 'if-menu' ),
62
- 'CX' => __( 'Christmas Island', 'if-menu' ),
63
- 'CC' => __( 'Cocos (Keeling) Islands', 'if-menu' ),
64
- 'CO' => __( 'Colombia', 'if-menu' ),
65
- 'KM' => __( 'Comoros', 'if-menu' ),
66
- 'CG' => __( 'Congo (Brazzaville)', 'if-menu' ),
67
- 'CD' => __( 'Congo (Kinshasa)', 'if-menu' ),
68
- 'CK' => __( 'Cook Islands', 'if-menu' ),
69
- 'CR' => __( 'Costa Rica', 'if-menu' ),
70
- 'HR' => __( 'Croatia', 'if-menu' ),
71
- 'CU' => __( 'Cuba', 'if-menu' ),
72
- 'CW' => __( 'Cura&ccedil;ao', 'if-menu' ),
73
- 'CY' => __( 'Cyprus', 'if-menu' ),
74
- 'CZ' => __( 'Czech Republic', 'if-menu' ),
75
- 'DK' => __( 'Denmark', 'if-menu' ),
76
- 'DJ' => __( 'Djibouti', 'if-menu' ),
77
- 'DM' => __( 'Dominica', 'if-menu' ),
78
- 'DO' => __( 'Dominican Republic', 'if-menu' ),
79
- 'EC' => __( 'Ecuador', 'if-menu' ),
80
- 'EG' => __( 'Egypt', 'if-menu' ),
81
- 'SV' => __( 'El Salvador', 'if-menu' ),
82
- 'GQ' => __( 'Equatorial Guinea', 'if-menu' ),
83
- 'ER' => __( 'Eritrea', 'if-menu' ),
84
- 'EE' => __( 'Estonia', 'if-menu' ),
85
- 'ET' => __( 'Ethiopia', 'if-menu' ),
86
- 'FK' => __( 'Falkland Islands', 'if-menu' ),
87
- 'FO' => __( 'Faroe Islands', 'if-menu' ),
88
- 'FJ' => __( 'Fiji', 'if-menu' ),
89
- 'FI' => __( 'Finland', 'if-menu' ),
90
- 'FR' => __( 'France', 'if-menu' ),
91
- 'GF' => __( 'French Guiana', 'if-menu' ),
92
- 'PF' => __( 'French Polynesia', 'if-menu' ),
93
- 'TF' => __( 'French Southern Territories', 'if-menu' ),
94
- 'GA' => __( 'Gabon', 'if-menu' ),
95
- 'GM' => __( 'Gambia', 'if-menu' ),
96
- 'GE' => __( 'Georgia', 'if-menu' ),
97
- 'DE' => __( 'Germany', 'if-menu' ),
98
- 'GH' => __( 'Ghana', 'if-menu' ),
99
- 'GI' => __( 'Gibraltar', 'if-menu' ),
100
- 'GR' => __( 'Greece', 'if-menu' ),
101
- 'GL' => __( 'Greenland', 'if-menu' ),
102
- 'GD' => __( 'Grenada', 'if-menu' ),
103
- 'GP' => __( 'Guadeloupe', 'if-menu' ),
104
- 'GU' => __( 'Guam', 'if-menu' ),
105
- 'GT' => __( 'Guatemala', 'if-menu' ),
106
- 'GG' => __( 'Guernsey', 'if-menu' ),
107
- 'GN' => __( 'Guinea', 'if-menu' ),
108
- 'GW' => __( 'Guinea-Bissau', 'if-menu' ),
109
- 'GY' => __( 'Guyana', 'if-menu' ),
110
- 'HT' => __( 'Haiti', 'if-menu' ),
111
- 'HM' => __( 'Heard Island and McDonald Islands', 'if-menu' ),
112
- 'HN' => __( 'Honduras', 'if-menu' ),
113
- 'HK' => __( 'Hong Kong', 'if-menu' ),
114
- 'HU' => __( 'Hungary', 'if-menu' ),
115
- 'IS' => __( 'Iceland', 'if-menu' ),
116
- 'IN' => __( 'India', 'if-menu' ),
117
- 'ID' => __( 'Indonesia', 'if-menu' ),
118
- 'IR' => __( 'Iran', 'if-menu' ),
119
- 'IQ' => __( 'Iraq', 'if-menu' ),
120
- 'IE' => __( 'Ireland', 'if-menu' ),
121
- 'IM' => __( 'Isle of Man', 'if-menu' ),
122
- 'IL' => __( 'Israel', 'if-menu' ),
123
- 'IT' => __( 'Italy', 'if-menu' ),
124
- 'CI' => __( 'Ivory Coast', 'if-menu' ),
125
- 'JM' => __( 'Jamaica', 'if-menu' ),
126
- 'JP' => __( 'Japan', 'if-menu' ),
127
- 'JE' => __( 'Jersey', 'if-menu' ),
128
- 'JO' => __( 'Jordan', 'if-menu' ),
129
- 'KZ' => __( 'Kazakhstan', 'if-menu' ),
130
- 'KE' => __( 'Kenya', 'if-menu' ),
131
- 'KI' => __( 'Kiribati', 'if-menu' ),
132
- 'KW' => __( 'Kuwait', 'if-menu' ),
133
- 'KG' => __( 'Kyrgyzstan', 'if-menu' ),
134
- 'LA' => __( 'Laos', 'if-menu' ),
135
- 'LV' => __( 'Latvia', 'if-menu' ),
136
- 'LB' => __( 'Lebanon', 'if-menu' ),
137
- 'LS' => __( 'Lesotho', 'if-menu' ),
138
- 'LR' => __( 'Liberia', 'if-menu' ),
139
- 'LY' => __( 'Libya', 'if-menu' ),
140
- 'LI' => __( 'Liechtenstein', 'if-menu' ),
141
- 'LT' => __( 'Lithuania', 'if-menu' ),
142
- 'LU' => __( 'Luxembourg', 'if-menu' ),
143
- 'MO' => __( 'Macao S.A.R., China', 'if-menu' ),
144
- 'MK' => __( 'Macedonia', 'if-menu' ),
145
- 'MG' => __( 'Madagascar', 'if-menu' ),
146
- 'MW' => __( 'Malawi', 'if-menu' ),
147
- 'MY' => __( 'Malaysia', 'if-menu' ),
148
- 'MV' => __( 'Maldives', 'if-menu' ),
149
- 'ML' => __( 'Mali', 'if-menu' ),
150
- 'MT' => __( 'Malta', 'if-menu' ),
151
- 'MH' => __( 'Marshall Islands', 'if-menu' ),
152
- 'MQ' => __( 'Martinique', 'if-menu' ),
153
- 'MR' => __( 'Mauritania', 'if-menu' ),
154
- 'MU' => __( 'Mauritius', 'if-menu' ),
155
- 'YT' => __( 'Mayotte', 'if-menu' ),
156
- 'MX' => __( 'Mexico', 'if-menu' ),
157
- 'FM' => __( 'Micronesia', 'if-menu' ),
158
- 'MD' => __( 'Moldova', 'if-menu' ),
159
- 'MC' => __( 'Monaco', 'if-menu' ),
160
- 'MN' => __( 'Mongolia', 'if-menu' ),
161
- 'ME' => __( 'Montenegro', 'if-menu' ),
162
- 'MS' => __( 'Montserrat', 'if-menu' ),
163
- 'MA' => __( 'Morocco', 'if-menu' ),
164
- 'MZ' => __( 'Mozambique', 'if-menu' ),
165
- 'MM' => __( 'Myanmar', 'if-menu' ),
166
- 'NA' => __( 'Namibia', 'if-menu' ),
167
- 'NR' => __( 'Nauru', 'if-menu' ),
168
- 'NP' => __( 'Nepal', 'if-menu' ),
169
- 'NL' => __( 'Netherlands', 'if-menu' ),
170
- 'NC' => __( 'New Caledonia', 'if-menu' ),
171
- 'NZ' => __( 'New Zealand', 'if-menu' ),
172
- 'NI' => __( 'Nicaragua', 'if-menu' ),
173
- 'NE' => __( 'Niger', 'if-menu' ),
174
- 'NG' => __( 'Nigeria', 'if-menu' ),
175
- 'NU' => __( 'Niue', 'if-menu' ),
176
- 'NF' => __( 'Norfolk Island', 'if-menu' ),
177
- 'MP' => __( 'Northern Mariana Islands', 'if-menu' ),
178
- 'KP' => __( 'North Korea', 'if-menu' ),
179
- 'NO' => __( 'Norway', 'if-menu' ),
180
- 'OM' => __( 'Oman', 'if-menu' ),
181
- 'PK' => __( 'Pakistan', 'if-menu' ),
182
- 'PS' => __( 'Palestinian Territory', 'if-menu' ),
183
- 'PA' => __( 'Panama', 'if-menu' ),
184
- 'PG' => __( 'Papua New Guinea', 'if-menu' ),
185
- 'PY' => __( 'Paraguay', 'if-menu' ),
186
- 'PE' => __( 'Peru', 'if-menu' ),
187
- 'PH' => __( 'Philippines', 'if-menu' ),
188
- 'PN' => __( 'Pitcairn', 'if-menu' ),
189
- 'PL' => __( 'Poland', 'if-menu' ),
190
- 'PT' => __( 'Portugal', 'if-menu' ),
191
- 'PR' => __( 'Puerto Rico', 'if-menu' ),
192
- 'QA' => __( 'Qatar', 'if-menu' ),
193
- 'RE' => __( 'Reunion', 'if-menu' ),
194
- 'RO' => __( 'Romania', 'if-menu' ),
195
- 'RU' => __( 'Russia', 'if-menu' ),
196
- 'RW' => __( 'Rwanda', 'if-menu' ),
197
- 'BL' => __( 'Saint Barth&eacute;lemy', 'if-menu' ),
198
- 'SH' => __( 'Saint Helena', 'if-menu' ),
199
- 'KN' => __( 'Saint Kitts and Nevis', 'if-menu' ),
200
- 'LC' => __( 'Saint Lucia', 'if-menu' ),
201
- 'MF' => __( 'Saint Martin (French part)', 'if-menu' ),
202
- 'SX' => __( 'Saint Martin (Dutch part)', 'if-menu' ),
203
- 'PM' => __( 'Saint Pierre and Miquelon', 'if-menu' ),
204
- 'VC' => __( 'Saint Vincent and the Grenadines', 'if-menu' ),
205
- 'SM' => __( 'San Marino', 'if-menu' ),
206
- 'ST' => __( 'S&atilde;o Tom&eacute; and Pr&iacute;ncipe', 'if-menu' ),
207
- 'SA' => __( 'Saudi Arabia', 'if-menu' ),
208
- 'SN' => __( 'Senegal', 'if-menu' ),
209
- 'RS' => __( 'Serbia', 'if-menu' ),
210
- 'SC' => __( 'Seychelles', 'if-menu' ),
211
- 'SL' => __( 'Sierra Leone', 'if-menu' ),
212
- 'SG' => __( 'Singapore', 'if-menu' ),
213
- 'SK' => __( 'Slovakia', 'if-menu' ),
214
- 'SI' => __( 'Slovenia', 'if-menu' ),
215
- 'SB' => __( 'Solomon Islands', 'if-menu' ),
216
- 'SO' => __( 'Somalia', 'if-menu' ),
217
- 'ZA' => __( 'South Africa', 'if-menu' ),
218
- 'GS' => __( 'South Georgia/Sandwich Islands', 'if-menu' ),
219
- 'KR' => __( 'South Korea', 'if-menu' ),
220
- 'SS' => __( 'South Sudan', 'if-menu' ),
221
- 'ES' => __( 'Spain', 'if-menu' ),
222
- 'LK' => __( 'Sri Lanka', 'if-menu' ),
223
- 'SD' => __( 'Sudan', 'if-menu' ),
224
- 'SR' => __( 'Suriname', 'if-menu' ),
225
- 'SJ' => __( 'Svalbard and Jan Mayen', 'if-menu' ),
226
- 'SZ' => __( 'Swaziland', 'if-menu' ),
227
- 'SE' => __( 'Sweden', 'if-menu' ),
228
- 'CH' => __( 'Switzerland', 'if-menu' ),
229
- 'SY' => __( 'Syria', 'if-menu' ),
230
- 'TW' => __( 'Taiwan', 'if-menu' ),
231
- 'TJ' => __( 'Tajikistan', 'if-menu' ),
232
- 'TZ' => __( 'Tanzania', 'if-menu' ),
233
- 'TH' => __( 'Thailand', 'if-menu' ),
234
- 'TL' => __( 'Timor-Leste', 'if-menu' ),
235
- 'TG' => __( 'Togo', 'if-menu' ),
236
- 'TK' => __( 'Tokelau', 'if-menu' ),
237
- 'TO' => __( 'Tonga', 'if-menu' ),
238
- 'TT' => __( 'Trinidad and Tobago', 'if-menu' ),
239
- 'TN' => __( 'Tunisia', 'if-menu' ),
240
- 'TR' => __( 'Turkey', 'if-menu' ),
241
- 'TM' => __( 'Turkmenistan', 'if-menu' ),
242
- 'TC' => __( 'Turks and Caicos Islands', 'if-menu' ),
243
- 'TV' => __( 'Tuvalu', 'if-menu' ),
244
- 'UG' => __( 'Uganda', 'if-menu' ),
245
- 'UA' => __( 'Ukraine', 'if-menu' ),
246
- 'AE' => __( 'United Arab Emirates', 'if-menu' ),
247
- 'GB' => __( 'United Kingdom (UK)', 'if-menu' ),
248
- 'US' => __( 'United States (US)', 'if-menu' ),
249
- 'UM' => __( 'United States (US) Minor Outlying Islands', 'if-menu' ),
250
- 'VI' => __( 'United States (US) Virgin Islands', 'if-menu' ),
251
- 'UY' => __( 'Uruguay', 'if-menu' ),
252
- 'UZ' => __( 'Uzbekistan', 'if-menu' ),
253
- 'VU' => __( 'Vanuatu', 'if-menu' ),
254
- 'VA' => __( 'Vatican', 'if-menu' ),
255
- 'VE' => __( 'Venezuela', 'if-menu' ),
256
- 'VN' => __( 'Vietnam', 'if-menu' ),
257
- 'WF' => __( 'Wallis and Futuna', 'if-menu' ),
258
- 'EH' => __( 'Western Sahara', 'if-menu' ),
259
- 'WS' => __( 'Samoa', 'if-menu' ),
260
- 'YE' => __( 'Yemen', 'if-menu' ),
261
- 'ZM' => __( 'Zambia', 'if-menu' ),
262
- 'ZW' => __( 'Zimbabwe', 'if-menu' ),
263
  ),
264
  'condition' => function($item, $selectedOptions = array()) {
265
  return in_array(get_user_country_code(), $selectedOptions);
@@ -277,6 +278,7 @@ function ifMenuAdvancedConditions($conditions) {
277
 
278
  $conditions[] = array(
279
  'id' => 'user-in-group',
 
280
  'name' => __('Is in group', 'if-menu'),
281
  'condition' => function($item, $selectedGroups = array()) {
282
  $isInGroup = false;
@@ -295,6 +297,7 @@ function ifMenuAdvancedConditions($conditions) {
295
 
296
 
297
  // Third-party plugin integration - WooCommerce Subscriptions
 
298
  if (in_array('woocommerce-subscriptions/woocommerce-subscriptions.php', $activePlugins)) {
299
  $subscriptionsOptions = array();
300
 
@@ -305,7 +308,7 @@ function ifMenuAdvancedConditions($conditions) {
305
  'tax_query' => array(array(
306
  'taxonomy' => 'product_type',
307
  'field' => 'slug',
308
- 'terms' => array('subscription', 'variable-subscription')
309
  ))
310
  ));
311
 
@@ -315,14 +318,19 @@ function ifMenuAdvancedConditions($conditions) {
315
 
316
  $conditions[] = array(
317
  'id' => 'woocommerce-subscriptions',
 
318
  'name' => __('Has active subscription', 'if-menu'),
319
  'condition' => function($item, $selectedSubscriptions = array()) {
320
  $hasSubscription = false;
321
 
322
- foreach ($selectedSubscriptions as $subscriptionId) {
323
- if (wcs_user_has_subscription(0, $subscriptionId, 'active')) {
324
- $hasSubscription = true;
 
 
325
  }
 
 
326
  }
327
 
328
  return $hasSubscription;
@@ -344,6 +352,7 @@ function ifMenuAdvancedConditions($conditions) {
344
 
345
  $conditions[] = array(
346
  'id' => 'wishlist-member',
 
347
  'name' => __('WishList Membership Level', 'if-menu'),
348
  'condition' => function($item, $membershipLevels = array()) {
349
  $hasAccess = false;
@@ -357,10 +366,135 @@ function ifMenuAdvancedConditions($conditions) {
357
 
358
  return $hasAccess;
359
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  'group' => __('User', 'if-menu')
361
  );
362
  }
363
 
364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365
  return $conditions;
366
  }
2
 
3
  add_filter('if_menu_conditions', 'ifMenuAdvancedConditions');
4
 
5
+ function ifMenuAdvancedConditions(array $conditions) {
6
  $activePlugins = apply_filters('active_plugins', get_option('active_plugins'));
7
 
8
 
9
  // User location
10
  $conditions[] = array(
11
  'id' => 'user-location',
12
+ 'type' => 'multiple',
13
  'name' => __('From country', 'if-menu'),
14
  'options' => array(
15
+ 'AF' => 'Afghanistan',
16
+ 'AX' => '&#197;land Islands',
17
+ 'AL' => 'Albania',
18
+ 'DZ' => 'Algeria',
19
+ 'AS' => 'American Samoa',
20
+ 'AD' => 'Andorra',
21
+ 'AO' => 'Angola',
22
+ 'AI' => 'Anguilla',
23
+ 'AQ' => 'Antarctica',
24
+ 'AG' => 'Antigua and Barbuda',
25
+ 'AR' => 'Argentina',
26
+ 'AM' => 'Armenia',
27
+ 'AW' => 'Aruba',
28
+ 'AU' => 'Australia',
29
+ 'AT' => 'Austria',
30
+ 'AZ' => 'Azerbaijan',
31
+ 'BS' => 'Bahamas',
32
+ 'BH' => 'Bahrain',
33
+ 'BD' => 'Bangladesh',
34
+ 'BB' => 'Barbados',
35
+ 'BY' => 'Belarus',
36
+ 'BE' => 'Belgium',
37
+ 'PW' => 'Belau',
38
+ 'BZ' => 'Belize',
39
+ 'BJ' => 'Benin',
40
+ 'BM' => 'Bermuda',
41
+ 'BT' => 'Bhutan',
42
+ 'BO' => 'Bolivia',
43
+ 'BQ' => 'Bonaire, Saint Eustatius and Saba',
44
+ 'BA' => 'Bosnia and Herzegovina',
45
+ 'BW' => 'Botswana',
46
+ 'BV' => 'Bouvet Island',
47
+ 'BR' => 'Brazil',
48
+ 'IO' => 'British Indian Ocean Territory',
49
+ 'VG' => 'British Virgin Islands',
50
+ 'BN' => 'Brunei',
51
+ 'BG' => 'Bulgaria',
52
+ 'BF' => 'Burkina Faso',
53
+ 'BI' => 'Burundi',
54
+ 'KH' => 'Cambodia',
55
+ 'CM' => 'Cameroon',
56
+ 'CA' => 'Canada',
57
+ 'CV' => 'Cape Verde',
58
+ 'KY' => 'Cayman Islands',
59
+ 'CF' => 'Central African Republic',
60
+ 'TD' => 'Chad',
61
+ 'CL' => 'Chile',
62
+ 'CN' => 'China',
63
+ 'CX' => 'Christmas Island',
64
+ 'CC' => 'Cocos (Keeling) Islands',
65
+ 'CO' => 'Colombia',
66
+ 'KM' => 'Comoros',
67
+ 'CG' => 'Congo (Brazzaville)',
68
+ 'CD' => 'Congo (Kinshasa)',
69
+ 'CK' => 'Cook Islands',
70
+ 'CR' => 'Costa Rica',
71
+ 'HR' => 'Croatia',
72
+ 'CU' => 'Cuba',
73
+ 'CW' => 'Cura&ccedil;ao',
74
+ 'CY' => 'Cyprus',
75
+ 'CZ' => 'Czech Republic',
76
+ 'DK' => 'Denmark',
77
+ 'DJ' => 'Djibouti',
78
+ 'DM' => 'Dominica',
79
+ 'DO' => 'Dominican Republic',
80
+ 'EC' => 'Ecuador',
81
+ 'EG' => 'Egypt',
82
+ 'SV' => 'El Salvador',
83
+ 'GQ' => 'Equatorial Guinea',
84
+ 'ER' => 'Eritrea',
85
+ 'EE' => 'Estonia',
86
+ 'ET' => 'Ethiopia',
87
+ 'FK' => 'Falkland Islands',
88
+ 'FO' => 'Faroe Islands',
89
+ 'FJ' => 'Fiji',
90
+ 'FI' => 'Finland',
91
+ 'FR' => 'France',
92
+ 'GF' => 'French Guiana',
93
+ 'PF' => 'French Polynesia',
94
+ 'TF' => 'French Southern Territories',
95
+ 'GA' => 'Gabon',
96
+ 'GM' => 'Gambia',
97
+ 'GE' => 'Georgia',
98
+ 'DE' => 'Germany',
99
+ 'GH' => 'Ghana',
100
+ 'GI' => 'Gibraltar',
101
+ 'GR' => 'Greece',
102
+ 'GL' => 'Greenland',
103
+ 'GD' => 'Grenada',
104
+ 'GP' => 'Guadeloupe',
105
+ 'GU' => 'Guam',
106
+ 'GT' => 'Guatemala',
107
+ 'GG' => 'Guernsey',
108
+ 'GN' => 'Guinea',
109
+ 'GW' => 'Guinea-Bissau',
110
+ 'GY' => 'Guyana',
111
+ 'HT' => 'Haiti',
112
+ 'HM' => 'Heard Island and McDonald Islands',
113
+ 'HN' => 'Honduras',
114
+ 'HK' => 'Hong Kong',
115
+ 'HU' => 'Hungary',
116
+ 'IS' => 'Iceland',
117
+ 'IN' => 'India',
118
+ 'ID' => 'Indonesia',
119
+ 'IR' => 'Iran',
120
+ 'IQ' => 'Iraq',
121
+ 'IE' => 'Ireland',
122
+ 'IM' => 'Isle of Man',
123
+ 'IL' => 'Israel',
124
+ 'IT' => 'Italy',
125
+ 'CI' => 'Ivory Coast',
126
+ 'JM' => 'Jamaica',
127
+ 'JP' => 'Japan',
128
+ 'JE' => 'Jersey',
129
+ 'JO' => 'Jordan',
130
+ 'KZ' => 'Kazakhstan',
131
+ 'KE' => 'Kenya',
132
+ 'KI' => 'Kiribati',
133
+ 'KW' => 'Kuwait',
134
+ 'KG' => 'Kyrgyzstan',
135
+ 'LA' => 'Laos',
136
+ 'LV' => 'Latvia',
137
+ 'LB' => 'Lebanon',
138
+ 'LS' => 'Lesotho',
139
+ 'LR' => 'Liberia',
140
+ 'LY' => 'Libya',
141
+ 'LI' => 'Liechtenstein',
142
+ 'LT' => 'Lithuania',
143
+ 'LU' => 'Luxembourg',
144
+ 'MO' => 'Macao S.A.R., China',
145
+ 'MK' => 'Macedonia',
146
+ 'MG' => 'Madagascar',
147
+ 'MW' => 'Malawi',
148
+ 'MY' => 'Malaysia',
149
+ 'MV' => 'Maldives',
150
+ 'ML' => 'Mali',
151
+ 'MT' => 'Malta',
152
+ 'MH' => 'Marshall Islands',
153
+ 'MQ' => 'Martinique',
154
+ 'MR' => 'Mauritania',
155
+ 'MU' => 'Mauritius',
156
+ 'YT' => 'Mayotte',
157
+ 'MX' => 'Mexico',
158
+ 'FM' => 'Micronesia',
159
+ 'MD' => 'Moldova',
160
+ 'MC' => 'Monaco',
161
+ 'MN' => 'Mongolia',
162
+ 'ME' => 'Montenegro',
163
+ 'MS' => 'Montserrat',
164
+ 'MA' => 'Morocco',
165
+ 'MZ' => 'Mozambique',
166
+ 'MM' => 'Myanmar',
167
+ 'NA' => 'Namibia',
168
+ 'NR' => 'Nauru',
169
+ 'NP' => 'Nepal',
170
+ 'NL' => 'Netherlands',
171
+ 'NC' => 'New Caledonia',
172
+ 'NZ' => 'New Zealand',
173
+ 'NI' => 'Nicaragua',
174
+ 'NE' => 'Niger',
175
+ 'NG' => 'Nigeria',
176
+ 'NU' => 'Niue',
177
+ 'NF' => 'Norfolk Island',
178
+ 'MP' => 'Northern Mariana Islands',
179
+ 'KP' => 'North Korea',
180
+ 'NO' => 'Norway',
181
+ 'OM' => 'Oman',
182
+ 'PK' => 'Pakistan',
183
+ 'PS' => 'Palestinian Territory',
184
+ 'PA' => 'Panama',
185
+ 'PG' => 'Papua New Guinea',
186
+ 'PY' => 'Paraguay',
187
+ 'PE' => 'Peru',
188
+ 'PH' => 'Philippines',
189
+ 'PN' => 'Pitcairn',
190
+ 'PL' => 'Poland',
191
+ 'PT' => 'Portugal',
192
+ 'PR' => 'Puerto Rico',
193
+ 'QA' => 'Qatar',
194
+ 'RE' => 'Reunion',
195
+ 'RO' => 'Romania',
196
+ 'RU' => 'Russia',
197
+ 'RW' => 'Rwanda',
198
+ 'BL' => 'Saint Barth&eacute;lemy',
199
+ 'SH' => 'Saint Helena',
200
+ 'KN' => 'Saint Kitts and Nevis',
201
+ 'LC' => 'Saint Lucia',
202
+ 'MF' => 'Saint Martin (French part)',
203
+ 'SX' => 'Saint Martin (Dutch part)',
204
+ 'PM' => 'Saint Pierre and Miquelon',
205
+ 'VC' => 'Saint Vincent and the Grenadines',
206
+ 'SM' => 'San Marino',
207
+ 'ST' => 'S&atilde;o Tom&eacute; and Pr&iacute;ncipe',
208
+ 'SA' => 'Saudi Arabia',
209
+ 'SN' => 'Senegal',
210
+ 'RS' => 'Serbia',
211
+ 'SC' => 'Seychelles',
212
+ 'SL' => 'Sierra Leone',
213
+ 'SG' => 'Singapore',
214
+ 'SK' => 'Slovakia',
215
+ 'SI' => 'Slovenia',
216
+ 'SB' => 'Solomon Islands',
217
+ 'SO' => 'Somalia',
218
+ 'ZA' => 'South Africa',
219
+ 'GS' => 'South Georgia/Sandwich Islands',
220
+ 'KR' => 'South Korea',
221
+ 'SS' => 'South Sudan',
222
+ 'ES' => 'Spain',
223
+ 'LK' => 'Sri Lanka',
224
+ 'SD' => 'Sudan',
225
+ 'SR' => 'Suriname',
226
+ 'SJ' => 'Svalbard and Jan Mayen',
227
+ 'SZ' => 'Swaziland',
228
+ 'SE' => 'Sweden',
229
+ 'CH' => 'Switzerland',
230
+ 'SY' => 'Syria',
231
+ 'TW' => 'Taiwan',
232
+ 'TJ' => 'Tajikistan',
233
+ 'TZ' => 'Tanzania',
234
+ 'TH' => 'Thailand',
235
+ 'TL' => 'Timor-Leste',
236
+ 'TG' => 'Togo',
237
+ 'TK' => 'Tokelau',
238
+ 'TO' => 'Tonga',
239
+ 'TT' => 'Trinidad and Tobago',
240
+ 'TN' => 'Tunisia',
241
+ 'TR' => 'Turkey',
242
+ 'TM' => 'Turkmenistan',
243
+ 'TC' => 'Turks and Caicos Islands',
244
+ 'TV' => 'Tuvalu',
245
+ 'UG' => 'Uganda',
246
+ 'UA' => 'Ukraine',
247
+ 'AE' => 'United Arab Emirates',
248
+ 'GB' => 'United Kingdom (UK)',
249
+ 'US' => 'United States (US)',
250
+ 'UM' => 'United States (US) Minor Outlying Islands',
251
+ 'VI' => 'United States (US) Virgin Islands',
252
+ 'UY' => 'Uruguay',
253
+ 'UZ' => 'Uzbekistan',
254
+ 'VU' => 'Vanuatu',
255
+ 'VA' => 'Vatican',
256
+ 'VE' => 'Venezuela',
257
+ 'VN' => 'Vietnam',
258
+ 'WF' => 'Wallis and Futuna',
259
+ 'EH' => 'Western Sahara',
260
+ 'WS' => 'Samoa',
261
+ 'YE' => 'Yemen',
262
+ 'ZM' => 'Zambia',
263
+ 'ZW' => 'Zimbabwe'
264
  ),
265
  'condition' => function($item, $selectedOptions = array()) {
266
  return in_array(get_user_country_code(), $selectedOptions);
278
 
279
  $conditions[] = array(
280
  'id' => 'user-in-group',
281
+ 'type' => 'multiple',
282
  'name' => __('Is in group', 'if-menu'),
283
  'condition' => function($item, $selectedGroups = array()) {
284
  $isInGroup = false;
297
 
298
 
299
  // Third-party plugin integration - WooCommerce Subscriptions
300
+ // Third-party plugin integration - Listing Payments (for WP Job Manager)
301
  if (in_array('woocommerce-subscriptions/woocommerce-subscriptions.php', $activePlugins)) {
302
  $subscriptionsOptions = array();
303
 
308
  'tax_query' => array(array(
309
  'taxonomy' => 'product_type',
310
  'field' => 'slug',
311
+ 'terms' => array('subscription', 'variable-subscription', 'job_package_subscription', 'resume_package_subscription')
312
  ))
313
  ));
314
 
318
 
319
  $conditions[] = array(
320
  'id' => 'woocommerce-subscriptions',
321
+ 'type' => 'multiple',
322
  'name' => __('Has active subscription', 'if-menu'),
323
  'condition' => function($item, $selectedSubscriptions = array()) {
324
  $hasSubscription = false;
325
 
326
+ if (is_array($selectedSubscriptions) && count($selectedSubscriptions)) {
327
+ foreach ($selectedSubscriptions as $subscriptionId) {
328
+ if (wcs_user_has_subscription(0, $subscriptionId, 'active')) {
329
+ $hasSubscription = true;
330
+ }
331
  }
332
+ } elseif (wcs_user_has_subscription(0, '', 'active')) {
333
+ $hasSubscription = true;
334
  }
335
 
336
  return $hasSubscription;
352
 
353
  $conditions[] = array(
354
  'id' => 'wishlist-member',
355
+ 'type' => 'multiple',
356
  'name' => __('WishList Membership Level', 'if-menu'),
357
  'condition' => function($item, $membershipLevels = array()) {
358
  $hasAccess = false;
366
 
367
  return $hasAccess;
368
  },
369
+ 'group' => __('User', 'if-menu'),
370
+ 'options' => $membershipLevelOptions
371
+ );
372
+ }
373
+
374
+
375
+ // Third-party plugin integration - WooCommerce Memberships
376
+ if (in_array('woocommerce-memberships/woocommerce-memberships.php', $activePlugins)) {
377
+ $membershipsOptions = array();
378
+ $plans = wc_memberships_get_membership_plans();
379
+
380
+ foreach ($plans as $plan) {
381
+ $membershipsOptions[$plan->id] = $plan->name;
382
+ }
383
+
384
+ $conditions[] = array(
385
+ 'id' => 'woocommerce-memberships',
386
+ 'type' => 'multiple',
387
+ 'name' => __('Has active membership plan', 'if-menu'),
388
+ 'condition' => function($item, $selectedPlans = array()) {
389
+ $hasPlan = false;
390
+
391
+ if (!is_user_logged_in()) {
392
+ return false;
393
+ }
394
+
395
+ if (is_array($selectedPlans) && count($selectedPlans)) {
396
+ // check if current user has one of selected memberships
397
+ foreach ($selectedPlans as $planId) {
398
+ if (wc_memberships_is_user_active_member(null, $planId)) {
399
+ $hasPlan = true;
400
+ }
401
+ }
402
+ } elseif (wc_memberships_get_user_memberships(null, ['status' => 'active'])) {
403
+ // check if current user has any active memberships
404
+ $hasPlan = true;
405
+ }
406
+
407
+ return $hasPlan;
408
+ },
409
+ 'options' => $membershipsOptions,
410
+ 'group' => __('User', 'if-menu')
411
+ );
412
+ }
413
+
414
+
415
+ // Third-party plugin integration - Restrict Content Pro
416
+ if (in_array('restrict-content-pro/restrict-content-pro.php', $activePlugins)) {
417
+ $conditions[] = array(
418
+ 'id' => 'restrict-content-pro-active',
419
+ 'name' => __('Any RCP membership active', 'if-menu'),
420
+ 'condition' => 'rcp_user_has_active_membership',
421
+ 'group' => __('User', 'if-menu')
422
+ );
423
+
424
+ $levelsOptions = array();
425
+ $levels = rcp_get_membership_levels();
426
+
427
+ if ($levels) {
428
+ foreach ($levels as $level) {
429
+ $levelsOptions[$level->get_id()] = $level->get_name() . ' - Level ' . $level->get_access_level();
430
+ }
431
+ }
432
+
433
+ $conditions[] = array(
434
+ 'id' => 'restrict-content-pro',
435
+ 'type' => 'multiple',
436
+ 'name' => __('Has Restrict Membership', 'if-menu'),
437
+ 'condition' => function($item, $selectedLevels = array()) {
438
+ $userId = get_current_user_id();
439
+
440
+ if (!$userId) {
441
+ return false;
442
+ }
443
+
444
+ return in_array(rcp_get_customer_membership_level_ids($userId), $selectedLevels);
445
+ },
446
+ 'options' => $levelsOptions,
447
+ 'group' => __('User', 'if-menu')
448
+ );
449
+
450
+ $conditions[] = array(
451
+ 'id' => 'restrict-content-pro-expired',
452
+ 'name' => __('Expired Restrict Membership', 'if-menu'),
453
+ 'condition' => 'rcp_user_has_expired_membership',
454
  'group' => __('User', 'if-menu')
455
  );
456
  }
457
 
458
 
459
+ // Available languages
460
+ $availableLanguages = [
461
+ 'en_US' => 'English (US)'
462
+ ];
463
+ $langCodes = array(
464
+ 'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'bm' => 'Bambara', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali',
465
+ 'bh' => 'Bihari', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan; Valencian', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'zh' => 'Chinese', 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree',
466
+ 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi; Dhivehi; Maldivian', 'nl' => 'Dutch; Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijjian', 'fi' => 'Finnish', 'fr' => 'French', 'fy' => 'Western Frisian', 'ff' => 'Fulah', 'ka' => 'Georgian', 'de' => 'German', 'gd' => 'Gaelic; Scottish Gaelic',
467
+ 'ga' => 'Irish', 'gl' => 'Galician', 'gv' => 'Manx', 'el' => 'Greek, Modern', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian; Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'ig' => 'Igbo', 'is' => 'Icelandic', 'io' => 'Ido', 'ii' => 'Sichuan Yi', 'iu' => 'Inuktitut', 'ie' => 'Interlingue',
468
+ 'ia' => 'Interlingua (International Auxiliary Language Association)', 'id' => 'Indonesian', 'ik' => 'Inupiaq', 'it' => 'Italian', 'jv' => 'Javanese', 'ja' => 'Japanese', 'kl' => 'Kalaallisut; Greenlandic', 'kn' => 'Kannada', 'ks' => 'Kashmiri', 'kr' => 'Kanuri', 'kk' => 'Kazakh', 'km' => 'Central Khmer', 'ki' => 'Kikuyu; Gikuyu', 'rw' => 'Kinyarwanda', 'ky' => 'Kirghiz; Kyrgyz',
469
+ 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kuanyama; Kwanyama', 'ku' => 'Kurdish', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'li' => 'Limburgan; Limburger; Limburgish', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lb' => 'Luxembourgish; Letzeburgesch', 'lu' => 'Luba-Katanga', 'lg' => 'Ganda', 'mk' => 'Macedonian', 'mh' => 'Marshallese', 'ml' => 'Malayalam',
470
+ 'mi' => 'Maori', 'mr' => 'Marathi', 'ms' => 'Malay', 'mg' => 'Malagasy', 'mt' => 'Maltese', 'mo' => 'Moldavian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo; Navaho', 'nr' => 'Ndebele, South; South Ndebele', 'nd' => 'Ndebele, North; North Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'nn' => 'Norwegian Nynorsk; Nynorsk, Norwegian', 'nb' => 'Bokmål, Norwegian, Norwegian Bokmål',
471
+ 'no' => 'Norwegian', 'ny' => 'Chichewa; Chewa; Nyanja', 'oc' => 'Occitan, Provençal', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian; Ossetic', 'pa' => 'Panjabi; Punjabi', 'fa' => 'Persian', 'pi' => 'Pali', 'pl' => 'Polish', 'pt' => 'Portuguese', 'ps' => 'Pushto', 'qu' => 'Quechua', 'rm' => 'Romansh', 'ro' => 'Romanian', 'rn' => 'Rundi', 'ru' => 'Russian',
472
+ 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sr' => 'Serbian', 'hr' => 'Croatian', 'si' => 'Sinhala; Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'se' => 'Northern Sami', 'sm' => 'Samoan', 'sn' => 'Shona', 'sd' => 'Sindhi', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'es' => 'Spanish; Castilian', 'sc' => 'Sardinian', 'ss' => 'Swati', 'su' => 'Sundanese', 'sw' => 'Swahili',
473
+ 'sv' => 'Swedish', 'ty' => 'Tahitian', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'tg' => 'Tajik', 'tl' => 'Tagalog', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'tn' => 'Tswana', 'ts' => 'Tsonga', 'tk' => 'Turkmen', 'tr' => 'Turkish', 'tw' => 'Twi', 'ug' => 'Uighur; Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek',
474
+ 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volapük', 'cy' => 'Welsh','wa' => 'Walloon','wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang; Chuang', 'zu' => 'Zulu' );
475
+
476
+ foreach (get_available_languages() as $languageCode) {
477
+ $codes = explode('_', $languageCode);
478
+ $languageName = strtr($codes[0], $langCodes);
479
+
480
+ if (isset($codes[1])) {
481
+ $languageName .= ' (' . $codes[1] . ')';
482
+ }
483
+
484
+ $availableLanguages[$languageCode] = $languageName;
485
+ }
486
+
487
+ $conditions[] = array(
488
+ 'id' => 'languages',
489
+ 'type' => 'multiple',
490
+ 'name' => __('Language', 'if-menu'),
491
+ 'options' => $availableLanguages,
492
+ 'condition' => function($item, $selectedLanguages = array()) {
493
+ return in_array(get_locale(), $selectedLanguages);
494
+ },
495
+ 'group' => __('Language', 'if-menu')
496
+ );
497
+
498
+
499
  return $conditions;
500
  }
src/if-menu-nav-menu-4.7.php CHANGED
@@ -113,7 +113,7 @@ class If_Menu_Walker_Nav_Menu_Edit extends Walker_Nav_Menu_Edit {
113
  </span>
114
  <a class="item-edit" id="edit-<?php echo $item_id; ?>" href="<?php
115
  echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
116
- ?>" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><?php _e( 'Edit' ); ?></a>
117
  </span>
118
  </div>
119
  </div>
113
  </span>
114
  <a class="item-edit" id="edit-<?php echo $item_id; ?>" href="<?php
115
  echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
116
+ ?>" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><span class="screen-reader-text"><?php _e( 'Edit' ); ?></span></a>
117
  </span>
118
  </div>
119
  </div>
src/user-info.php CHANGED
@@ -38,11 +38,8 @@ if (!function_exists('get_user_country_code')) {
38
  }
39
 
40
  add_filter('user_country_code', 'if_menu_user_country_code_woocommerce');
41
- add_filter('user_country_code', 'if_menu_user_country_code_cloudflare');
42
- add_filter('user_country_code', 'if_menu_user_country_code_appengine');
43
- add_filter('user_country_code', 'if_menu_user_country_code_cloudfront');
44
- add_filter('user_country_code', 'if_menu_user_country_code_geoip');
45
- add_filter('user_country_code', 'if_menu_user_country_code_blueapis');
46
 
47
  function if_menu_user_country_code_woocommerce($countryCode = '') {
48
  if (!$countryCode && class_exists('WC_Geolocation')) {
@@ -55,48 +52,24 @@ function if_menu_user_country_code_woocommerce($countryCode = '') {
55
  return $countryCode;
56
  }
57
 
58
- function if_menu_user_country_code_cloudflare($countryCode = '') {
59
- if (!$countryCode && isset($_SERVER['HTTP_CF_IPCOUNTRY']) && $_SERVER['HTTP_CF_IPCOUNTRY'] && $_SERVER['HTTP_CF_IPCOUNTRY'] !== 'XX') {
60
- $countryCode = $_SERVER['HTTP_CF_IPCOUNTRY'];
61
- }
62
-
63
- return $countryCode;
64
- }
65
-
66
- function if_menu_user_country_code_appengine($countryCode = '') {
67
- if (!$countryCode && isset($_SERVER['X-AppEngine-country']) && $_SERVER['X-AppEngine-country'] && $_SERVER['X-AppEngine-country'] !== 'ZZ') {
68
- $countryCode = $_SERVER['X-AppEngine-country'];
69
- }
70
-
71
- return $countryCode;
72
- }
73
-
74
- function if_menu_user_country_code_cloudfront($countryCode = '') {
75
- if (!$countryCode && isset($_SERVER['CloudFront-Viewer-Country']) && $_SERVER['CloudFront-Viewer-Country']) {
76
- $countryCode = $_SERVER['CloudFront-Viewer-Country'];
77
- }
78
-
79
- return $countryCode;
80
- }
81
-
82
- function if_menu_user_country_code_geoip($countryCode = '') {
83
- if (!$countryCode && isset($_SERVER['GEOIP_COUNTRY_CODE']) && $_SERVER['GEOIP_COUNTRY_CODE'] && !in_array($_SERVER['GEOIP_COUNTRY_CODE'], array('A1', 'A2', 'EU', 'AP'))) {
84
- $countryCode = $_SERVER['GEOIP_COUNTRY_CODE'];
85
- }
86
-
87
- if (!$countryCode && isset($_SERVER['HTTP_X_COUNTRY_CODE']) && $_SERVER['HTTP_X_COUNTRY_CODE']) {
88
- $countryCode = $_SERVER['HTTP_X_COUNTRY_CODE'];
89
  }
90
 
91
  return $countryCode;
92
  }
93
 
94
- function if_menu_user_country_code_blueapis($countryCode = '') {
95
  if (!$countryCode) {
96
  $ip = get_user_ip();
97
 
98
  if (false === ($countryCode = get_transient('ip-country-code-' . sanitize_key($ip)))) {
99
- $request = wp_remote_get('https://apis.blue/ip/' . $ip . '?key=layered-if-menu');
100
  $data = json_decode(wp_remote_retrieve_body($request) ?: '[]');
101
  if (isset($data->country) && $data->country) {
102
  $countryCode = $data->country;
38
  }
39
 
40
  add_filter('user_country_code', 'if_menu_user_country_code_woocommerce');
41
+ add_filter('user_country_code', 'if_menu_user_country_code_headers');
42
+ add_filter('user_country_code', 'if_menu_user_country_code_metaapis');
 
 
 
43
 
44
  function if_menu_user_country_code_woocommerce($countryCode = '') {
45
  if (!$countryCode && class_exists('WC_Geolocation')) {
52
  return $countryCode;
53
  }
54
 
55
+ function if_menu_user_country_code_headers($countryCode = '') {
56
+ if (empty($countryCode)) {
57
+ foreach (array('HTTP_CF_IPCOUNTRY', 'X-AppEngine-country', 'CloudFront-Viewer-Country', 'GEOIP_COUNTRY_CODE', 'HTTP_X_COUNTRY_CODE', 'HTTP_X_GEO_COUNTRY') as $key) {
58
+ if (isset($_SERVER[$key]) && $_SERVER[$key] && !in_array($_SERVER[$key], array('XX', 'ZZ', 'A1', 'A2', 'EU', 'AP'))) {
59
+ return $_SERVER[$key];
60
+ }
61
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
 
64
  return $countryCode;
65
  }
66
 
67
+ function if_menu_user_country_code_metaapis($countryCode = '') {
68
  if (!$countryCode) {
69
  $ip = get_user_ip();
70
 
71
  if (false === ($countryCode = get_transient('ip-country-code-' . sanitize_key($ip)))) {
72
+ $request = wp_remote_get('https://api.layered.studio/ip/' . $ip . '?key=LAYEdab34d65f7464309b61c8595fRED');
73
  $data = json_decode(wp_remote_retrieve_body($request) ?: '[]');
74
  if (isset($data->country) && $data->country) {
75
  $countryCode = $data->country;
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 ComposerAutoloaderInit1675f12dcb616dfd5aef9267ba43b735::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', array_values($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') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $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,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
10
+ 'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
11
+ 'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
12
+ 'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
13
+ 'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
14
+ 'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
15
+ 'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
16
+ 'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
17
+ 'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
18
+ 'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
19
+ 'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
20
+ 'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
21
+ 'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
22
+ 'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
23
+ 'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
24
+ 'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
25
+ 'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
26
+ 'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
27
+ 'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
28
+ 'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
29
+ 'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
30
+ 'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
31
+ 'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
32
+ 'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
33
+ 'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
34
+ 'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
35
+ 'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
36
+ 'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
37
+ 'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
38
+ 'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
39
+ 'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
40
+ 'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
41
+ 'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
42
+ 'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
43
+ 'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
44
+ 'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
45
+ 'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
46
+ 'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
47
+ 'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
48
+ 'Composer\\Installers\\LanManagementSystemInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
49
+ 'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
50
+ 'Composer\\Installers\\LavaLiteInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
51
+ 'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
52
+ 'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
53
+ 'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
54
+ 'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
55
+ 'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
56
+ 'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
57
+ 'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
58
+ 'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
59
+ 'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
60
+ 'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
61
+ 'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
62
+ 'Composer\\Installers\\ModxInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
63
+ 'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
64
+ 'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
65
+ 'Composer\\Installers\\OntoWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
66
+ 'Composer\\Installers\\OsclassInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
67
+ 'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
68
+ 'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
69
+ 'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
70
+ 'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
71
+ 'Composer\\Installers\\PimcoreInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
72
+ 'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
73
+ 'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
74
+ 'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
75
+ 'Composer\\Installers\\PortoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
76
+ 'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
77
+ 'Composer\\Installers\\ProcessWireInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php',
78
+ 'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
79
+ 'Composer\\Installers\\PxcmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
80
+ 'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
81
+ 'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
82
+ 'Composer\\Installers\\Redaxo5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
83
+ 'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
84
+ 'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
85
+ 'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
86
+ 'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
87
+ 'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
88
+ 'Composer\\Installers\\SiteDirectInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
89
+ 'Composer\\Installers\\StarbugInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
90
+ 'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
91
+ 'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
92
+ 'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
93
+ 'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
94
+ 'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
95
+ 'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
96
+ 'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
97
+ 'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
98
+ 'Composer\\Installers\\UserFrostingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
99
+ 'Composer\\Installers\\VanillaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
100
+ 'Composer\\Installers\\VgmcpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
101
+ 'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
102
+ 'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
103
+ 'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
104
+ 'Composer\\Installers\\YawikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
105
+ 'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
106
+ 'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
107
+ 'Layered\\IfMenu\\Admin' => $baseDir . '/src/Admin.php',
108
+ 'Layered\\SafeEval\\SafeEval' => $vendorDir . '/layered/safe-eval/SafeEval.php',
109
+ );
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,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 'Layered\\SafeEval\\' => array($vendorDir . '/layered/safe-eval'),
10
+ 'Layered\\IfMenu\\' => array($baseDir . '/src'),
11
+ 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
12
+ );
vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInit1675f12dcb616dfd5aef9267ba43b735
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
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
+ public static function getLoader()
20
+ {
21
+ if (null !== self::$loader) {
22
+ return self::$loader;
23
+ }
24
+
25
+ spl_autoload_register(array('ComposerAutoloaderInit1675f12dcb616dfd5aef9267ba43b735', 'loadClassLoader'), true, true);
26
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit1675f12dcb616dfd5aef9267ba43b735', 'loadClassLoader'));
28
+
29
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
+ if ($useStaticLoader) {
31
+ require_once __DIR__ . '/autoload_static.php';
32
+
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit1675f12dcb616dfd5aef9267ba43b735::getInitializer($loader));
34
+ } else {
35
+ $map = require __DIR__ . '/autoload_namespaces.php';
36
+ foreach ($map as $namespace => $path) {
37
+ $loader->set($namespace, $path);
38
+ }
39
+
40
+ $map = require __DIR__ . '/autoload_psr4.php';
41
+ foreach ($map as $namespace => $path) {
42
+ $loader->setPsr4($namespace, $path);
43
+ }
44
+
45
+ $classMap = require __DIR__ . '/autoload_classmap.php';
46
+ if ($classMap) {
47
+ $loader->addClassMap($classMap);
48
+ }
49
+ }
50
+
51
+ $loader->register(true);
52
+
53
+ return $loader;
54
+ }
55
+ }
vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit1675f12dcb616dfd5aef9267ba43b735
8
+ {
9
+ public static $prefixLengthsPsr4 = array (
10
+ 'L' =>
11
+ array (
12
+ 'Layered\\SafeEval\\' => 17,
13
+ 'Layered\\IfMenu\\' => 15,
14
+ ),
15
+ 'C' =>
16
+ array (
17
+ 'Composer\\Installers\\' => 20,
18
+ ),
19
+ );
20
+
21
+ public static $prefixDirsPsr4 = array (
22
+ 'Layered\\SafeEval\\' =>
23
+ array (
24
+ 0 => __DIR__ . '/..' . '/layered/safe-eval',
25
+ ),
26
+ 'Layered\\IfMenu\\' =>
27
+ array (
28
+ 0 => __DIR__ . '/../..' . '/src',
29
+ ),
30
+ 'Composer\\Installers\\' =>
31
+ array (
32
+ 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
33
+ ),
34
+ );
35
+
36
+ public static $classMap = array (
37
+ 'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php',
38
+ 'Composer\\Installers\\AimeosInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
39
+ 'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
40
+ 'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
41
+ 'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
42
+ 'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
43
+ 'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
44
+ 'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
45
+ 'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
46
+ 'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
47
+ 'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
48
+ 'Composer\\Installers\\ClanCatsFrameworkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
49
+ 'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
50
+ 'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
51
+ 'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
52
+ 'Composer\\Installers\\CraftInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
53
+ 'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
54
+ 'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
55
+ 'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
56
+ 'Composer\\Installers\\DokuWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
57
+ 'Composer\\Installers\\DolibarrInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
58
+ 'Composer\\Installers\\DrupalInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
59
+ 'Composer\\Installers\\ElggInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
60
+ 'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
61
+ 'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
62
+ 'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
63
+ 'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
64
+ 'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
65
+ 'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php',
66
+ 'Composer\\Installers\\HuradInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
67
+ 'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
68
+ 'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php',
69
+ 'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
70
+ 'Composer\\Installers\\JoomlaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
71
+ 'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
72
+ 'Composer\\Installers\\KirbyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
73
+ 'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
74
+ 'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
75
+ 'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
76
+ 'Composer\\Installers\\LanManagementSystemInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
77
+ 'Composer\\Installers\\LaravelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
78
+ 'Composer\\Installers\\LavaLiteInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
79
+ 'Composer\\Installers\\LithiumInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
80
+ 'Composer\\Installers\\MODULEWorkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
81
+ 'Composer\\Installers\\MODXEvoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
82
+ 'Composer\\Installers\\MagentoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
83
+ 'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
84
+ 'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
85
+ 'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
86
+ 'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
87
+ 'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
88
+ 'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
89
+ 'Composer\\Installers\\MicroweberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
90
+ 'Composer\\Installers\\ModxInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
91
+ 'Composer\\Installers\\MoodleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
92
+ 'Composer\\Installers\\OctoberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
93
+ 'Composer\\Installers\\OntoWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
94
+ 'Composer\\Installers\\OsclassInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
95
+ 'Composer\\Installers\\OxidInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
96
+ 'Composer\\Installers\\PPIInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
97
+ 'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
98
+ 'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
99
+ 'Composer\\Installers\\PimcoreInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
100
+ 'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
101
+ 'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
102
+ 'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php',
103
+ 'Composer\\Installers\\PortoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
104
+ 'Composer\\Installers\\PrestashopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
105
+ 'Composer\\Installers\\ProcessWireInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php',
106
+ 'Composer\\Installers\\PuppetInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
107
+ 'Composer\\Installers\\PxcmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
108
+ 'Composer\\Installers\\RadPHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
109
+ 'Composer\\Installers\\ReIndexInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
110
+ 'Composer\\Installers\\Redaxo5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
111
+ 'Composer\\Installers\\RedaxoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
112
+ 'Composer\\Installers\\RoundcubeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
113
+ 'Composer\\Installers\\SMFInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
114
+ 'Composer\\Installers\\ShopwareInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
115
+ 'Composer\\Installers\\SilverStripeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
116
+ 'Composer\\Installers\\SiteDirectInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
117
+ 'Composer\\Installers\\StarbugInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
118
+ 'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
119
+ 'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
120
+ 'Composer\\Installers\\Symfony1Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
121
+ 'Composer\\Installers\\TYPO3CmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
122
+ 'Composer\\Installers\\TYPO3FlowInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
123
+ 'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
124
+ 'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
125
+ 'Composer\\Installers\\TuskInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
126
+ 'Composer\\Installers\\UserFrostingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
127
+ 'Composer\\Installers\\VanillaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
128
+ 'Composer\\Installers\\VgmcpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
129
+ 'Composer\\Installers\\WHMCSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
130
+ 'Composer\\Installers\\WolfCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
131
+ 'Composer\\Installers\\WordPressInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
132
+ 'Composer\\Installers\\YawikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
133
+ 'Composer\\Installers\\ZendInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
134
+ 'Composer\\Installers\\ZikulaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
135
+ 'Layered\\IfMenu\\Admin' => __DIR__ . '/../..' . '/src/Admin.php',
136
+ 'Layered\\SafeEval\\SafeEval' => __DIR__ . '/..' . '/layered/safe-eval/SafeEval.php',
137
+ );
138
+
139
+ public static function getInitializer(ClassLoader $loader)
140
+ {
141
+ return \Closure::bind(function () use ($loader) {
142
+ $loader->prefixLengthsPsr4 = ComposerStaticInit1675f12dcb616dfd5aef9267ba43b735::$prefixLengthsPsr4;
143
+ $loader->prefixDirsPsr4 = ComposerStaticInit1675f12dcb616dfd5aef9267ba43b735::$prefixDirsPsr4;
144
+ $loader->classMap = ComposerStaticInit1675f12dcb616dfd5aef9267ba43b735::$classMap;
145
+
146
+ }, null, ClassLoader::class);
147
+ }
148
+ }
vendor/composer/installed.json ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "name": "composer/installers",
4
+ "version": "v1.10.0",
5
+ "version_normalized": "1.10.0.0",
6
+ "source": {
7
+ "type": "git",
8
+ "url": "https://github.com/composer/installers.git",
9
+ "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d"
10
+ },
11
+ "dist": {
12
+ "type": "zip",
13
+ "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d",
14
+ "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d",
15
+ "shasum": ""
16
+ },
17
+ "require": {
18
+ "composer-plugin-api": "^1.0 || ^2.0"
19
+ },
20
+ "replace": {
21
+ "roundcube/plugin-installer": "*",
22
+ "shama/baton": "*"
23
+ },
24
+ "require-dev": {
25
+ "composer/composer": "1.6.* || ^2.0",
26
+ "composer/semver": "^1 || ^3",
27
+ "phpstan/phpstan": "^0.12.55",
28
+ "phpstan/phpstan-phpunit": "^0.12.16",
29
+ "symfony/phpunit-bridge": "^4.2 || ^5",
30
+ "symfony/process": "^2.3"
31
+ },
32
+ "time": "2021-01-14T11:07:16+00:00",
33
+ "type": "composer-plugin",
34
+ "extra": {
35
+ "class": "Composer\\Installers\\Plugin",
36
+ "branch-alias": {
37
+ "dev-main": "1.x-dev"
38
+ }
39
+ },
40
+ "installation-source": "dist",
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
+ "MantisBT",
69
+ "Mautic",
70
+ "Maya",
71
+ "OXID",
72
+ "Plentymarkets",
73
+ "Porto",
74
+ "RadPHP",
75
+ "SMF",
76
+ "Starbug",
77
+ "Thelia",
78
+ "Whmcs",
79
+ "WolfCMS",
80
+ "agl",
81
+ "aimeos",
82
+ "annotatecms",
83
+ "attogram",
84
+ "bitrix",
85
+ "cakephp",
86
+ "chef",
87
+ "cockpit",
88
+ "codeigniter",
89
+ "concrete5",
90
+ "croogo",
91
+ "dokuwiki",
92
+ "drupal",
93
+ "eZ Platform",
94
+ "elgg",
95
+ "expressionengine",
96
+ "fuelphp",
97
+ "grav",
98
+ "installer",
99
+ "itop",
100
+ "joomla",
101
+ "known",
102
+ "kohana",
103
+ "laravel",
104
+ "lavalite",
105
+ "lithium",
106
+ "magento",
107
+ "majima",
108
+ "mako",
109
+ "mediawiki",
110
+ "modulework",
111
+ "modx",
112
+ "moodle",
113
+ "osclass",
114
+ "phpbb",
115
+ "piwik",
116
+ "ppi",
117
+ "processwire",
118
+ "puppet",
119
+ "pxcms",
120
+ "reindex",
121
+ "roundcube",
122
+ "shopware",
123
+ "silverstripe",
124
+ "sydes",
125
+ "sylius",
126
+ "symfony",
127
+ "typo3",
128
+ "wordpress",
129
+ "yawik",
130
+ "zend",
131
+ "zikula"
132
+ ],
133
+ "funding": [
134
+ {
135
+ "url": "https://packagist.com",
136
+ "type": "custom"
137
+ },
138
+ {
139
+ "url": "https://github.com/composer",
140
+ "type": "github"
141
+ },
142
+ {
143
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
144
+ "type": "tidelift"
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "name": "layered/safe-eval",
150
+ "version": "v0.2",
151
+ "version_normalized": "0.2.0.0",
152
+ "source": {
153
+ "type": "git",
154
+ "url": "https://github.com/AndreiIgna/safe-eval.git",
155
+ "reference": "0170d4c80128adfa83bdaed688111ebc1df84e33"
156
+ },
157
+ "dist": {
158
+ "type": "zip",
159
+ "url": "https://api.github.com/repos/AndreiIgna/safe-eval/zipball/0170d4c80128adfa83bdaed688111ebc1df84e33",
160
+ "reference": "0170d4c80128adfa83bdaed688111ebc1df84e33",
161
+ "shasum": ""
162
+ },
163
+ "require-dev": {
164
+ "phpunit/phpunit": "^7.5"
165
+ },
166
+ "time": "2019-05-02T09:46:38+00:00",
167
+ "type": "library",
168
+ "installation-source": "dist",
169
+ "autoload": {
170
+ "psr-4": {
171
+ "Layered\\SafeEval\\": ""
172
+ },
173
+ "exclude-from-classmap": [
174
+ "/Tests/"
175
+ ]
176
+ },
177
+ "notification-url": "https://packagist.org/downloads/",
178
+ "license": [
179
+ "MIT"
180
+ ],
181
+ "authors": [
182
+ {
183
+ "name": "Andrei Igna",
184
+ "email": "andrei@laye.red"
185
+ }
186
+ ],
187
+ "description": "Safely evaluate code expressions"
188
+ }
189
+ ]
vendor/composer/installers/.github/workflows/continuous-integration.yml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: "Continuous Integration"
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ env:
8
+ COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
9
+ SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT: "1"
10
+
11
+ jobs:
12
+ tests:
13
+ name: "CI"
14
+
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ php-version:
20
+ - "5.3"
21
+ - "5.4"
22
+ - "5.5"
23
+ - "5.6"
24
+ - "7.0"
25
+ - "7.1"
26
+ - "7.2"
27
+ - "7.3"
28
+ - "7.4"
29
+ - "8.0"
30
+ - "8.1"
31
+ dependencies: [locked]
32
+ include:
33
+ - php-version: "5.3"
34
+ dependencies: lowest
35
+ - php-version: "8.1"
36
+ dependencies: lowest
37
+
38
+ steps:
39
+ - name: "Checkout"
40
+ uses: "actions/checkout@v2"
41
+
42
+ - name: "Install PHP"
43
+ uses: "shivammathur/setup-php@v2"
44
+ with:
45
+ coverage: "none"
46
+ php-version: "${{ matrix.php-version }}"
47
+
48
+ - name: Get composer cache directory
49
+ id: composercache
50
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
51
+
52
+ - name: Cache dependencies
53
+ uses: actions/cache@v2
54
+ with:
55
+ path: ${{ steps.composercache.outputs.dir }}
56
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
57
+ restore-keys: ${{ runner.os }}-composer-
58
+
59
+ - name: "Handle lowest dependencies update"
60
+ if: "contains(matrix.dependencies, 'lowest')"
61
+ run: "echo \"COMPOSER_FLAGS=$COMPOSER_FLAGS --prefer-lowest\" >> $GITHUB_ENV"
62
+
63
+ - name: "Install latest dependencies"
64
+ run: |
65
+ # Remove PHPStan as it requires a newer PHP
66
+ composer remove phpstan/phpstan phpstan/phpstan-phpunit --dev --no-update
67
+ composer update ${{ env.COMPOSER_FLAGS }}
68
+
69
+ - name: "Run tests"
70
+ run: "vendor/bin/simple-phpunit --verbose"
vendor/composer/installers/.github/workflows/lint.yml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: "PHP Lint"
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ tests:
9
+ name: "Lint"
10
+
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ php-version:
16
+ - "5.3"
17
+ - "8.0"
18
+
19
+ steps:
20
+ - name: "Checkout"
21
+ uses: "actions/checkout@v2"
22
+
23
+ - name: "Install PHP"
24
+ uses: "shivammathur/setup-php@v2"
25
+ with:
26
+ coverage: "none"
27
+ php-version: "${{ matrix.php-version }}"
28
+
29
+ - name: "Lint PHP files"
30
+ run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"
vendor/composer/installers/.github/workflows/phpstan.yml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: "PHPStan"
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ env:
8
+ COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
9
+ SYMFONY_PHPUNIT_VERSION: ""
10
+
11
+ jobs:
12
+ tests:
13
+ name: "PHPStan"
14
+
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ php-version:
20
+ # pinned to 7.4 because we need PHPUnit 7.5 which does not support PHP 8
21
+ - "7.4"
22
+
23
+ steps:
24
+ - name: "Checkout"
25
+ uses: "actions/checkout@v2"
26
+
27
+ - name: "Install PHP"
28
+ uses: "shivammathur/setup-php@v2"
29
+ with:
30
+ coverage: "none"
31
+ php-version: "${{ matrix.php-version }}"
32
+
33
+ - name: Get composer cache directory
34
+ id: composercache
35
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
36
+
37
+ - name: Cache dependencies
38
+ uses: actions/cache@v2
39
+ with:
40
+ path: ${{ steps.composercache.outputs.dir }}
41
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
42
+ restore-keys: ${{ runner.os }}-composer-
43
+
44
+ - name: "Install latest dependencies"
45
+ run: "composer update ${{ env.COMPOSER_FLAGS }}"
46
+
47
+ - name: Run PHPStan
48
+ # Locked to phpunit 7.5 here as newer ones have void return types which break inheritance
49
+ run: |
50
+ composer require --dev phpunit/phpunit:^7.5.20 --with-all-dependencies ${{ env.COMPOSER_FLAGS }}
51
+ vendor/bin/phpstan analyse
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/composer.json ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "composer/installers",
3
+ "type": "composer-plugin",
4
+ "license": "MIT",
5
+ "description": "A multi-framework Composer library installer",
6
+ "keywords": [
7
+ "installer",
8
+ "Aimeos",
9
+ "AGL",
10
+ "AnnotateCms",
11
+ "Attogram",
12
+ "Bitrix",
13
+ "CakePHP",
14
+ "Chef",
15
+ "Cockpit",
16
+ "CodeIgniter",
17
+ "concrete5",
18
+ "Craft",
19
+ "Croogo",
20
+ "DokuWiki",
21
+ "Dolibarr",
22
+ "Drupal",
23
+ "Elgg",
24
+ "Eliasis",
25
+ "ExpressionEngine",
26
+ "eZ Platform",
27
+ "FuelPHP",
28
+ "Grav",
29
+ "Hurad",
30
+ "ImageCMS",
31
+ "iTop",
32
+ "Joomla",
33
+ "Kanboard",
34
+ "Known",
35
+ "Kohana",
36
+ "Lan Management System",
37
+ "Laravel",
38
+ "Lavalite",
39
+ "Lithium",
40
+ "Magento",
41
+ "majima",
42
+ "Mako",
43
+ "MantisBT",
44
+ "Mautic",
45
+ "Maya",
46
+ "MODX",
47
+ "MODX Evo",
48
+ "MediaWiki",
49
+ "OXID",
50
+ "osclass",
51
+ "MODULEWork",
52
+ "Moodle",
53
+ "Piwik",
54
+ "pxcms",
55
+ "phpBB",
56
+ "Plentymarkets",
57
+ "PPI",
58
+ "Puppet",
59
+ "Porto",
60
+ "ProcessWire",
61
+ "RadPHP",
62
+ "ReIndex",
63
+ "Roundcube",
64
+ "shopware",
65
+ "SilverStripe",
66
+ "SMF",
67
+ "Starbug",
68
+ "SyDES",
69
+ "Sylius",
70
+ "symfony",
71
+ "Thelia",
72
+ "TYPO3",
73
+ "WHMCS",
74
+ "WolfCMS",
75
+ "WordPress",
76
+ "YAWIK",
77
+ "Zend",
78
+ "Zikula"
79
+ ],
80
+ "homepage": "https://composer.github.io/installers/",
81
+ "authors": [
82
+ {
83
+ "name": "Kyle Robinson Young",
84
+ "email": "kyle@dontkry.com",
85
+ "homepage": "https://github.com/shama"
86
+ }
87
+ ],
88
+ "autoload": {
89
+ "psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
90
+ },
91
+ "autoload-dev": {
92
+ "psr-4": { "Composer\\Installers\\Test\\": "tests/Composer/Installers/Test" }
93
+ },
94
+ "extra": {
95
+ "class": "Composer\\Installers\\Plugin",
96
+ "branch-alias": {
97
+ "dev-main": "1.x-dev"
98
+ }
99
+ },
100
+ "replace": {
101
+ "shama/baton": "*",
102
+ "roundcube/plugin-installer": "*"
103
+ },
104
+ "require": {
105
+ "composer-plugin-api": "^1.0 || ^2.0"
106
+ },
107
+ "require-dev": {
108
+ "composer/composer": "1.6.* || ^2.0",
109
+ "composer/semver": "^1 || ^3",
110
+ "symfony/phpunit-bridge": "^4.2 || ^5",
111
+ "phpstan/phpstan": "^0.12.55",
112
+ "symfony/process": "^2.3",
113
+ "phpstan/phpstan-phpunit": "^0.12.16"
114
+ },
115
+ "scripts": {
116
+ "test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit",
117
+ "phpstan": "vendor/bin/phpstan analyse"
118
+ }
119
+ }
vendor/composer/installers/phpstan.neon.dist ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ parameters:
2
+ level: 5
3
+ paths:
4
+ - src
5
+ - tests
6
+ excludes_analyse:
7
+ - tests/Composer/Installers/Test/PolyfillTestCase.php
8
+
9
+ includes:
10
+ - vendor/phpstan/phpstan-phpunit/extension.neon
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,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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<string, string> $vars This will normally receive array{name: string, vendor: string, type: string}
78
+ * @return array<string, string>
79
+ */
80
+ public function inflectPackageVars($vars)
81
+ {
82
+ return $vars;
83
+ }
84
+
85
+ /**
86
+ * Gets the installer's locations
87
+ *
88
+ * @return array<string, string> map of package types => install path
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<string, string> $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|false
125
+ */
126
+ protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
127
+ {
128
+ foreach ($paths as $path => $names) {
129
+ $names = (array) $names;
130
+ if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
131
+ return $path;
132
+ }
133
+ }
134
+
135
+ return false;
136
+ }
137
+ }
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,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\DependencyResolver\Pool;
5
+ use Composer\Semver\Constraint\Constraint;
6
+
7
+ class CakePHPInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'plugin' => 'Plugin/{$name}/',
11
+ );
12
+
13
+ /**
14
+ * Format package name to CamelCase
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
19
+ return $vars;
20
+ }
21
+
22
+ $nameParts = explode('/', $vars['name']);
23
+ foreach ($nameParts as &$value) {
24
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
25
+ $value = str_replace(array('-', '_'), ' ', $value);
26
+ $value = str_replace(' ', '', ucwords($value));
27
+ }
28
+ $vars['name'] = implode('/', $nameParts);
29
+
30
+ return $vars;
31
+ }
32
+
33
+ /**
34
+ * Change the default plugin location when cakephp >= 3.0
35
+ */
36
+ public function getLocations()
37
+ {
38
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
39
+ $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
40
+ }
41
+ return $this->locations;
42
+ }
43
+
44
+ /**
45
+ * Check if CakePHP version matches against a version
46
+ *
47
+ * @param string $matcher
48
+ * @param string $version
49
+ * @return bool
50
+ */
51
+ protected function matchesCakeVersion($matcher, $version)
52
+ {
53
+ $repositoryManager = $this->composer->getRepositoryManager();
54
+ if (! $repositoryManager) {
55
+ return false;
56
+ }
57
+
58
+ $repos = $repositoryManager->getLocalRepository();
59
+ if (!$repos) {
60
+ return false;
61
+ }
62
+
63
+ return $repos->findPackage('cakephp/cakephp', new Constraint($matcher, $version)) !== null;
64
+ }
65
+ }
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/CiviCrmInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CiviCrmInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'ext' => 'ext/{$name}/'
8
+ );
9
+ }
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,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * {@inheritDoc}
16
+ */
17
+ public function inflectPackageVars($vars)
18
+ {
19
+ if ($vars['type'] == 'cockpit-module') {
20
+ return $this->inflectModuleVars($vars);
21
+ }
22
+
23
+ return $vars;
24
+ }
25
+
26
+ public function inflectModuleVars($vars)
27
+ {
28
+ $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
29
+
30
+ return $vars;
31
+ }
32
+ }
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/DframeInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class DframeInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'module' => 'modules/{$vendor}/{$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,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 'database-driver' => 'drivers/lib/Drupal/Driver/Database/{$name}/',
13
+ 'drush' => 'drush/{$name}/',
14
+ 'custom-theme' => 'themes/custom/{$name}/',
15
+ 'custom-module' => 'modules/custom/{$name}/',
16
+ 'custom-profile' => 'profiles/custom/{$name}/',
17
+ 'drupal-multisite' => 'sites/{$name}/',
18
+ 'console' => 'console/{$name}/',
19
+ 'console-language' => 'console/language/{$name}/',
20
+ 'config' => 'config/sync/',
21
+ );
22
+ }
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,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ use Composer\Composer;
6
+ use Composer\Installer\BinaryInstaller;
7
+ use Composer\Installer\LibraryInstaller;
8
+ use Composer\IO\IOInterface;
9
+ use Composer\Package\PackageInterface;
10
+ use Composer\Repository\InstalledRepositoryInterface;
11
+ use Composer\Util\Filesystem;
12
+ use React\Promise\PromiseInterface;
13
+
14
+ class Installer extends LibraryInstaller
15
+ {
16
+
17
+ /**
18
+ * Package types to installer class map
19
+ *
20
+ * @var array
21
+ */
22
+ private $supportedTypes = array(
23
+ 'aimeos' => 'AimeosInstaller',
24
+ 'asgard' => 'AsgardInstaller',
25
+ 'attogram' => 'AttogramInstaller',
26
+ 'agl' => 'AglInstaller',
27
+ 'annotatecms' => 'AnnotateCmsInstaller',
28
+ 'bitrix' => 'BitrixInstaller',
29
+ 'bonefish' => 'BonefishInstaller',
30
+ 'cakephp' => 'CakePHPInstaller',
31
+ 'chef' => 'ChefInstaller',
32
+ 'civicrm' => 'CiviCrmInstaller',
33
+ 'ccframework' => 'ClanCatsFrameworkInstaller',
34
+ 'cockpit' => 'CockpitInstaller',
35
+ 'codeigniter' => 'CodeIgniterInstaller',
36
+ 'concrete5' => 'Concrete5Installer',
37
+ 'craft' => 'CraftInstaller',
38
+ 'croogo' => 'CroogoInstaller',
39
+ 'dframe' => 'DframeInstaller',
40
+ 'dokuwiki' => 'DokuWikiInstaller',
41
+ 'dolibarr' => 'DolibarrInstaller',
42
+ 'decibel' => 'DecibelInstaller',
43
+ 'drupal' => 'DrupalInstaller',
44
+ 'elgg' => 'ElggInstaller',
45
+ 'eliasis' => 'EliasisInstaller',
46
+ 'ee3' => 'ExpressionEngineInstaller',
47
+ 'ee2' => 'ExpressionEngineInstaller',
48
+ 'ezplatform' => 'EzPlatformInstaller',
49
+ 'fuel' => 'FuelInstaller',
50
+ 'fuelphp' => 'FuelphpInstaller',
51
+ 'grav' => 'GravInstaller',
52
+ 'hurad' => 'HuradInstaller',
53
+ 'imagecms' => 'ImageCMSInstaller',
54
+ 'itop' => 'ItopInstaller',
55
+ 'joomla' => 'JoomlaInstaller',
56
+ 'kanboard' => 'KanboardInstaller',
57
+ 'kirby' => 'KirbyInstaller',
58
+ 'known' => 'KnownInstaller',
59
+ 'kodicms' => 'KodiCMSInstaller',
60
+ 'kohana' => 'KohanaInstaller',
61
+ 'lms' => 'LanManagementSystemInstaller',
62
+ 'laravel' => 'LaravelInstaller',
63
+ 'lavalite' => 'LavaLiteInstaller',
64
+ 'lithium' => 'LithiumInstaller',
65
+ 'magento' => 'MagentoInstaller',
66
+ 'majima' => 'MajimaInstaller',
67
+ 'mantisbt' => 'MantisBTInstaller',
68
+ 'mako' => 'MakoInstaller',
69
+ 'maya' => 'MayaInstaller',
70
+ 'mautic' => 'MauticInstaller',
71
+ 'mediawiki' => 'MediaWikiInstaller',
72
+ 'microweber' => 'MicroweberInstaller',
73
+ 'modulework' => 'MODULEWorkInstaller',
74
+ 'modx' => 'ModxInstaller',
75
+ 'modxevo' => 'MODXEvoInstaller',
76
+ 'moodle' => 'MoodleInstaller',
77
+ 'october' => 'OctoberInstaller',
78
+ 'ontowiki' => 'OntoWikiInstaller',
79
+ 'oxid' => 'OxidInstaller',
80
+ 'osclass' => 'OsclassInstaller',
81
+ 'pxcms' => 'PxcmsInstaller',
82
+ 'phpbb' => 'PhpBBInstaller',
83
+ 'pimcore' => 'PimcoreInstaller',
84
+ 'piwik' => 'PiwikInstaller',
85
+ 'plentymarkets'=> 'PlentymarketsInstaller',
86
+ 'ppi' => 'PPIInstaller',
87
+ 'puppet' => 'PuppetInstaller',
88
+ 'radphp' => 'RadPHPInstaller',
89
+ 'phifty' => 'PhiftyInstaller',
90
+ 'porto' => 'PortoInstaller',
91
+ 'processwire' => 'ProcessWireInstaller',
92
+ 'redaxo' => 'RedaxoInstaller',
93
+ 'redaxo5' => 'Redaxo5Installer',
94
+ 'reindex' => 'ReIndexInstaller',
95
+ 'roundcube' => 'RoundcubeInstaller',
96
+ 'shopware' => 'ShopwareInstaller',
97
+ 'sitedirect' => 'SiteDirectInstaller',
98
+ 'silverstripe' => 'SilverStripeInstaller',
99
+ 'smf' => 'SMFInstaller',
100
+ 'starbug' => 'StarbugInstaller',
101
+ 'sydes' => 'SyDESInstaller',
102
+ 'sylius' => 'SyliusInstaller',
103
+ 'symfony1' => 'Symfony1Installer',
104
+ 'tao' => 'TaoInstaller',
105
+ 'thelia' => 'TheliaInstaller',
106
+ 'tusk' => 'TuskInstaller',
107
+ 'typo3-cms' => 'TYPO3CmsInstaller',
108
+ 'typo3-flow' => 'TYPO3FlowInstaller',
109
+ 'userfrosting' => 'UserFrostingInstaller',
110
+ 'vanilla' => 'VanillaInstaller',
111
+ 'whmcs' => 'WHMCSInstaller',
112
+ 'wolfcms' => 'WolfCMSInstaller',
113
+ 'wordpress' => 'WordPressInstaller',
114
+ 'yawik' => 'YawikInstaller',
115
+ 'zend' => 'ZendInstaller',
116
+ 'zikula' => 'ZikulaInstaller',
117
+ 'prestashop' => 'PrestashopInstaller'
118
+ );
119
+
120
+ /**
121
+ * Installer constructor.
122
+ *
123
+ * Disables installers specified in main composer extra installer-disable
124
+ * list
125
+ *
126
+ * @param IOInterface $io
127
+ * @param Composer $composer
128
+ * @param string $type
129
+ * @param Filesystem|null $filesystem
130
+ * @param BinaryInstaller|null $binaryInstaller
131
+ */
132
+ public function __construct(
133
+ IOInterface $io,
134
+ Composer $composer,
135
+ $type = 'library',
136
+ Filesystem $filesystem = null,
137
+ BinaryInstaller $binaryInstaller = null
138
+ ) {
139
+ parent::__construct($io, $composer, $type, $filesystem,
140
+ $binaryInstaller);
141
+ $this->removeDisabledInstallers();
142
+ }
143
+
144
+ /**
145
+ * {@inheritDoc}
146
+ */
147
+ public function getInstallPath(PackageInterface $package)
148
+ {
149
+ $type = $package->getType();
150
+ $frameworkType = $this->findFrameworkType($type);
151
+
152
+ if ($frameworkType === false) {
153
+ throw new \InvalidArgumentException(
154
+ 'Sorry the package type of this package is not yet supported.'
155
+ );
156
+ }
157
+
158
+ $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
159
+ $installer = new $class($package, $this->composer, $this->getIO());
160
+
161
+ return $installer->getInstallPath($package, $frameworkType);
162
+ }
163
+
164
+ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
165
+ {
166
+ $installPath = $this->getPackageBasePath($package);
167
+ $io = $this->io;
168
+ $outputStatus = function () use ($io, $installPath) {
169
+ $io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
170
+ };
171
+
172
+ $promise = parent::uninstall($repo, $package);
173
+
174
+ // Composer v2 might return a promise here
175
+ if ($promise instanceof PromiseInterface) {
176
+ return $promise->then($outputStatus);
177
+ }
178
+
179
+ // If not, execute the code right away as parent::uninstall executed synchronously (composer v1, or v2 without async)
180
+ $outputStatus();
181
+
182
+ return null;
183
+ }
184
+
185
+ /**
186
+ * {@inheritDoc}
187
+ */
188
+ public function supports($packageType)
189
+ {
190
+ $frameworkType = $this->findFrameworkType($packageType);
191
+
192
+ if ($frameworkType === false) {
193
+ return false;
194
+ }
195
+
196
+ $locationPattern = $this->getLocationPattern($frameworkType);
197
+
198
+ return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
199
+ }
200
+
201
+ /**
202
+ * Finds a supported framework type if it exists and returns it
203
+ *
204
+ * @param string $type
205
+ * @return string|false
206
+ */
207
+ protected function findFrameworkType($type)
208
+ {
209
+ krsort($this->supportedTypes);
210
+
211
+ foreach ($this->supportedTypes as $key => $val) {
212
+ if ($key === substr($type, 0, strlen($key))) {
213
+ return substr($type, 0, strlen($key));
214
+ }
215
+ }
216
+
217
+ return false;
218
+ }
219
+
220
+ /**
221
+ * Get the second part of the regular expression to check for support of a
222
+ * package type
223
+ *
224
+ * @param string $frameworkType
225
+ * @return string
226
+ */
227
+ protected function getLocationPattern($frameworkType)
228
+ {
229
+ $pattern = false;
230
+ if (!empty($this->supportedTypes[$frameworkType])) {
231
+ $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
232
+ /** @var BaseInstaller $framework */
233
+ $framework = new $frameworkClass(null, $this->composer, $this->getIO());
234
+ $locations = array_keys($framework->getLocations());
235
+ $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
236
+ }
237
+
238
+ return $pattern ? : '(\w+)';
239
+ }
240
+
241
+ /**
242
+ * Get I/O object
243
+ *
244
+ * @return IOInterface
245
+ */
246
+ private function getIO()
247
+ {
248
+ return $this->io;
249
+ }
250
+
251
+ /**
252
+ * Look for installers set to be disabled in composer's extra config and
253
+ * remove them from the list of supported installers.
254
+ *
255
+ * Globals:
256
+ * - true, "all", and "*" - disable all installers.
257
+ * - false - enable all installers (useful with
258
+ * wikimedia/composer-merge-plugin or similar)
259
+ *
260
+ * @return void
261
+ */
262
+ protected function removeDisabledInstallers()
263
+ {
264
+ $extra = $this->composer->getPackage()->getExtra();
265
+
266
+ if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
267
+ // No installers are disabled
268
+ return;
269
+ }
270
+
271
+ // Get installers to disable
272
+ $disable = $extra['installer-disable'];
273
+
274
+ // Ensure $disabled is an array
275
+ if (!is_array($disable)) {
276
+ $disable = array($disable);
277
+ }
278
+
279
+ // Check which installers should be disabled
280
+ $all = array(true, "all", "*");
281
+ $intersect = array_intersect($all, $disable);
282
+ if (!empty($intersect)) {
283
+ // Disable all installers
284
+ $this->supportedTypes = array();
285
+ } else {
286
+ // Disable specified installers
287
+ foreach ($disable as $key => $installer) {
288
+ if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
289
+ unset($this->supportedTypes[$installer]);
290
+ }
291
+ }
292
+ }
293
+ }
294
+ }
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/KnownInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KnownInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'IdnoPlugins/{$name}/',
8
+ 'theme' => 'Themes/{$name}/',
9
+ 'console' => 'ConsolePlugins/{$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/MantisBTInstaller.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\DependencyResolver\Pool;
5
+
6
+ class MantisBTInstaller extends BaseInstaller
7
+ {
8
+ protected $locations = array(
9
+ 'plugin' => 'plugins/{$name}/',
10
+ );
11
+
12
+ /**
13
+ * Format package name to CamelCase
14
+ */
15
+ public function inflectPackageVars($vars)
16
+ {
17
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
18
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
19
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
20
+
21
+ return $vars;
22
+ }
23
+ }
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,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MediaWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'core' => 'core/',
8
+ 'extension' => 'extensions/{$name}/',
9
+ 'skin' => 'skins/{$name}/',
10
+ );
11
+
12
+ /**
13
+ * Format package name.
14
+ *
15
+ * For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
16
+ * to CamelCase keeping existing uppercase chars.
17
+ *
18
+ * For package type mediawiki-skin, cut off a trailing '-skin' if present.
19
+ *
20
+ */
21
+ public function inflectPackageVars($vars)
22
+ {
23
+
24
+ if ($vars['type'] === 'mediawiki-extension') {
25
+ return $this->inflectExtensionVars($vars);
26
+ }
27
+
28
+ if ($vars['type'] === 'mediawiki-skin') {
29
+ return $this->inflectSkinVars($vars);
30
+ }
31
+
32
+ return $vars;
33
+ }
34
+
35
+ protected function inflectExtensionVars($vars)
36
+ {
37
+ $vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
38
+ $vars['name'] = str_replace('-', ' ', $vars['name']);
39
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
40
+
41
+ return $vars;
42
+ }
43
+
44
+ protected function inflectSkinVars($vars)
45
+ {
46
+ $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
47
+
48
+ return $vars;
49
+ }
50
+
51
+ }
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MicroweberInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'userfiles/modules/{$install_item_dir}/',
8
+ 'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
9
+ 'template' => 'userfiles/templates/{$install_item_dir}/',
10
+ 'element' => 'userfiles/elements/{$install_item_dir}/',
11
+ 'vendor' => 'vendor/{$install_item_dir}/',
12
+ 'components' => 'components/{$install_item_dir}/'
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
+
26
+
27
+ if ($this->package->getTargetDir()) {
28
+ $vars['install_item_dir'] = $this->package->getTargetDir();
29
+ } else {
30
+ $vars['install_item_dir'] = $vars['name'];
31
+ if ($vars['type'] === 'microweber-template') {
32
+ return $this->inflectTemplateVars($vars);
33
+ }
34
+ if ($vars['type'] === 'microweber-templates') {
35
+ return $this->inflectTemplatesVars($vars);
36
+ }
37
+ if ($vars['type'] === 'microweber-core') {
38
+ return $this->inflectCoreVars($vars);
39
+ }
40
+ if ($vars['type'] === 'microweber-adapter') {
41
+ return $this->inflectCoreVars($vars);
42
+ }
43
+ if ($vars['type'] === 'microweber-module') {
44
+ return $this->inflectModuleVars($vars);
45
+ }
46
+ if ($vars['type'] === 'microweber-modules') {
47
+ return $this->inflectModulesVars($vars);
48
+ }
49
+ if ($vars['type'] === 'microweber-skin') {
50
+ return $this->inflectSkinVars($vars);
51
+ }
52
+ if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
53
+ return $this->inflectElementVars($vars);
54
+ }
55
+ }
56
+
57
+
58
+ return $vars;
59
+ }
60
+
61
+ protected function inflectTemplateVars($vars)
62
+ {
63
+ $vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
64
+ $vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
65
+
66
+ return $vars;
67
+ }
68
+
69
+ protected function inflectTemplatesVars($vars)
70
+ {
71
+ $vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
72
+ $vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
73
+
74
+ return $vars;
75
+ }
76
+
77
+ protected function inflectCoreVars($vars)
78
+ {
79
+ $vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
80
+ $vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
81
+ $vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
82
+
83
+ return $vars;
84
+ }
85
+
86
+ protected function inflectModuleVars($vars)
87
+ {
88
+ $vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
89
+ $vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
90
+
91
+ return $vars;
92
+ }
93
+
94
+ protected function inflectModulesVars($vars)
95
+ {
96
+ $vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
97
+ $vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
98
+
99
+ return $vars;
100
+ }
101
+
102
+ protected function inflectSkinVars($vars)
103
+ {
104
+ $vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
105
+ $vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
106
+
107
+ return $vars;
108
+ }
109
+
110
+ protected function inflectElementVars($vars)
111
+ {
112
+ $vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
113
+ $vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
114
+ $vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
115
+ $vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
116
+
117
+ return $vars;
118
+ }
119
+ }
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,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 'fileconverter' => 'files/converter/{$name}/',
22
+ 'format' => 'course/format/{$name}/',
23
+ 'coursereport' => 'course/report/{$name}/',
24
+ 'customcertelement' => 'mod/customcert/element/{$name}/',
25
+ 'datafield' => 'mod/data/field/{$name}/',
26
+ 'datapreset' => 'mod/data/preset/{$name}/',
27
+ 'editor' => 'lib/editor/{$name}/',
28
+ 'enrol' => 'enrol/{$name}/',
29
+ 'filter' => 'filter/{$name}/',
30
+ 'gradeexport' => 'grade/export/{$name}/',
31
+ 'gradeimport' => 'grade/import/{$name}/',
32
+ 'gradereport' => 'grade/report/{$name}/',
33
+ 'gradingform' => 'grade/grading/form/{$name}/',
34
+ 'local' => 'local/{$name}/',
35
+ 'logstore' => 'admin/tool/log/store/{$name}/',
36
+ 'ltisource' => 'mod/lti/source/{$name}/',
37
+ 'ltiservice' => 'mod/lti/service/{$name}/',
38
+ 'message' => 'message/output/{$name}/',
39
+ 'mnetservice' => 'mnet/service/{$name}/',
40
+ 'plagiarism' => 'plagiarism/{$name}/',
41
+ 'portfolio' => 'portfolio/{$name}/',
42
+ 'qbehaviour' => 'question/behaviour/{$name}/',
43
+ 'qformat' => 'question/format/{$name}/',
44
+ 'qtype' => 'question/type/{$name}/',
45
+ 'quizaccess' => 'mod/quiz/accessrule/{$name}/',
46
+ 'quiz' => 'mod/quiz/report/{$name}/',
47
+ 'report' => 'report/{$name}/',
48
+ 'repository' => 'repository/{$name}/',
49
+ 'scormreport' => 'mod/scorm/report/{$name}/',
50
+ 'search' => 'search/engine/{$name}/',
51
+ 'theme' => 'theme/{$name}/',
52
+ 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
53
+ 'profilefield' => 'user/profile/field/{$name}/',
54
+ 'webservice' => 'webservice/{$name}/',
55
+ 'workshopallocation' => 'mod/workshop/allocation/{$name}/',
56
+ 'workshopeval' => 'mod/workshop/eval/{$name}/',
57
+ 'workshopform' => 'mod/workshop/form/{$name}/'
58
+ );
59
+ }
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ $vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
37
+
38
+ return $vars;
39
+ }
40
+
41
+ protected function inflectThemeVars($vars)
42
+ {
43
+ $vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
44
+
45
+ return $vars;
46
+ }
47
+ }
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 string
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,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ private $installer;
12
+
13
+ public function activate(Composer $composer, IOInterface $io)
14
+ {
15
+ $this->installer = new Installer($io, $composer);
16
+ $composer->getInstallationManager()->addInstaller($this->installer);
17
+ }
18
+
19
+ public function deactivate(Composer $composer, IOInterface $io)
20
+ {
21
+ $composer->getInstallationManager()->removeInstaller($this->installer);
22
+ }
23
+
24
+ public function uninstall(Composer $composer, IOInterface $io)
25
+ {
26
+ }
27
+ }
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/ProcessWireInstaller.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class ProcessWireInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'module' => 'site/modules/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
17
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
18
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
19
+
20
+ return $vars;
21
+ }
22
+ }
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/Redaxo5Installer.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class Redaxo5Installer extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'addon' => 'redaxo/src/addons/{$name}/',
8
+ 'bestyle-plugin' => 'redaxo/src/addons/be_style/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/StarbugInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class StarbugInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ 'custom-module' => 'app/modules/{$name}/',
10
+ 'custom-theme' => 'app/themes/{$name}/'
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * {@inerhitDoc}
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ if ($vars['type'] == 'sydes-module') {
21
+ return $this->inflectModuleVars($vars);
22
+ }
23
+
24
+ if ($vars['type'] === 'sydes-theme') {
25
+ return $this->inflectThemeVars($vars);
26
+ }
27
+
28
+ return $vars;
29
+ }
30
+
31
+ public function inflectModuleVars($vars)
32
+ {
33
+ $vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
34
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
35
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
36
+
37
+ return $vars;
38
+ }
39
+
40
+ protected function inflectThemeVars($vars)
41
+ {
42
+ $vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
43
+ $vars['name'] = strtolower($vars['name']);
44
+
45
+ return $vars;
46
+ }
47
+ }
vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class SyliusInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'theme' => 'themes/{$name}/',
8
+ );
9
+ }
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/TaoInstaller.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle TAO extensions.
6
+ */
7
+ class TaoInstaller extends BaseInstaller
8
+ {
9
+ const EXTRA_TAO_EXTENSION_NAME = 'tao-extension-name';
10
+
11
+ protected $locations = array(
12
+ 'extension' => '{$name}'
13
+ );
14
+
15
+ public function inflectPackageVars($vars)
16
+ {
17
+ $extra = $this->package->getExtra();
18
+
19
+ if (array_key_exists(self::EXTRA_TAO_EXTENSION_NAME, $extra)) {
20
+ $vars['name'] = $extra[self::EXTRA_TAO_EXTENSION_NAME];
21
+ return $vars;
22
+ }
23
+
24
+ $vars['name'] = str_replace('extension-', '', $vars['name']);
25
+ $vars['name'] = str_replace('-', ' ', $vars['name']);
26
+ $vars['name'] = lcfirst(str_replace(' ', '', ucwords($vars['name'])));
27
+
28
+ return $vars;
29
+ }
30
+ }
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,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class WHMCSInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'addons' => 'modules/addons/{$vendor}_{$name}/',
9
+ 'fraud' => 'modules/fraud/{$vendor}_{$name}/',
10
+ 'gateways' => 'modules/gateways/{$vendor}_{$name}/',
11
+ 'notifications' => 'modules/notifications/{$vendor}_{$name}/',
12
+ 'registrars' => 'modules/registrars/{$vendor}_{$name}/',
13
+ 'reports' => 'modules/reports/{$vendor}_{$name}/',
14
+ 'security' => 'modules/security/{$vendor}_{$name}/',
15
+ 'servers' => 'modules/servers/{$vendor}_{$name}/',
16
+ 'social' => 'modules/social/{$vendor}_{$name}/',
17
+ 'support' => 'modules/support/{$vendor}_{$name}/',
18
+ 'templates' => 'templates/{$vendor}_{$name}/',
19
+ 'includes' => 'includes/{$vendor}_{$name}/'
20
+ );
21
+ }
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/layered/safe-eval/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
1
+ .DS_Store
2
+ vendor/
vendor/layered/safe-eval/README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Safe Eval
2
+
3
+ Safely evaluate code expressions in PHP, without using `eval`. [ExpressionLanguage](https://github.com/symfony/expression-language) is most likely better at this, but SafeEval still supports PHP 5, for the projects that need it.
4
+
5
+ ## Usage
6
+ ```php
7
+ use Layered\SafeEval\SafeEval;
8
+
9
+ $safeEval = new SafeEval;
10
+
11
+ echo $safeEval->eval('1 + 2');
12
+ var_dump($safeEval->eval('1 or 0'));
13
+ ```
vendor/layered/safe-eval/SafeEval.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Layered\SafeEval;
3
+
4
+ class SafeEval {
5
+
6
+ protected $operators;
7
+
8
+ public function __construct() {
9
+
10
+ $this->operators = [
11
+ '+' => function($left, $right) {
12
+ return $left + $right;
13
+ },
14
+ '-' => function($left, $right) {
15
+ return $left - $right;
16
+ },
17
+ '*' => function($left, $right) {
18
+ return $left * $right;
19
+ },
20
+ '/' => function($left, $right) {
21
+ return $left / $right;
22
+ },
23
+ 'and' => function($left, $right) {
24
+ return (bool) $left && $right;
25
+ },
26
+ 'or' => function($left, $right) {
27
+ return (bool) $left || $right;
28
+ }
29
+ ];
30
+
31
+ }
32
+
33
+ public function evaluate($expression) {
34
+ $tree = explode(' ', $expression);
35
+
36
+ while (count($tree) > 1) {
37
+ foreach ($tree as $i => $part) {
38
+ if (isset($this->operators[$part])) {
39
+ $tree[$i] = call_user_func($this->operators[$part], $tree[$i - 1], $tree[$i + 1]);
40
+ unset($tree[$i - 1], $tree[$i + 1]);
41
+ $tree = array_values($tree);
42
+ break;
43
+ }
44
+ }
45
+ }
46
+
47
+ return array_shift($tree);
48
+ }
49
+
50
+ }
vendor/layered/safe-eval/Tests/SafeEvalTest.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Layered\SafeEval\Tests;
3
+
4
+ use PHPUnit\Framework\TestCase;
5
+ use Layered\SafeEval\SafeEval;
6
+
7
+ class SafeEvalTest extends TestCase {
8
+
9
+ public function testSimpleMath() {
10
+ $safeEval = new SafeEval();
11
+
12
+ $this->assertEquals(3, $safeEval->evaluate('1 + 2'));
13
+ $this->assertEquals(-1, $safeEval->evaluate('1 - 2'));
14
+ $this->assertEquals(2, $safeEval->evaluate('1 * 2'));
15
+ $this->assertEquals(0.5, $safeEval->evaluate('1 / 2'));
16
+
17
+ $this->assertEquals(6, $safeEval->evaluate('1 + 2 + 3'));
18
+ $this->assertEquals(2, $safeEval->evaluate('1 - 2 + 3'));
19
+ $this->assertEquals(0, $safeEval->evaluate('1 + 2 - 3'));
20
+ }
21
+
22
+ public function testBooleans() {
23
+ $safeEval = new SafeEval();
24
+
25
+ $this->assertTrue($safeEval->evaluate('1 or 1'));
26
+ $this->assertTrue($safeEval->evaluate('1 and 1'));
27
+ $this->assertTrue($safeEval->evaluate('1 and 1 or 0'));
28
+ $this->assertTrue($safeEval->evaluate('1 and 1 or 1'));
29
+ $this->assertTrue($safeEval->evaluate('false and 1 or 1'));
30
+ }
31
+
32
+ }
vendor/layered/safe-eval/composer.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "layered/safe-eval",
3
+ "description": "Safely evaluate code expressions",
4
+ "type": "library",
5
+ "license": "MIT",
6
+ "authors": [
7
+ {
8
+ "name": "Andrei Igna",
9
+ "email": "andrei@laye.red"
10
+ }
11
+ ],
12
+ "require": {},
13
+ "require-dev": {
14
+ "phpunit/phpunit": "^7.5"
15
+ },
16
+ "scripts": {
17
+ "test": "phpunit"
18
+ },
19
+ "autoload": {
20
+ "psr-4": { "Layered\\SafeEval\\": "" },
21
+ "exclude-from-classmap": [
22
+ "/Tests/"
23
+ ]
24
+ }
25
+ }
vendor/layered/safe-eval/composer.lock ADDED
@@ -0,0 +1,1490 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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#installing-dependencies",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "content-hash": "0563467d04212a7baeb124f619b544cf",
8
+ "packages": [],
9
+ "packages-dev": [
10
+ {
11
+ "name": "doctrine/instantiator",
12
+ "version": "1.2.0",
13
+ "source": {
14
+ "type": "git",
15
+ "url": "https://github.com/doctrine/instantiator.git",
16
+ "reference": "a2c590166b2133a4633738648b6b064edae0814a"
17
+ },
18
+ "dist": {
19
+ "type": "zip",
20
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a",
21
+ "reference": "a2c590166b2133a4633738648b6b064edae0814a",
22
+ "shasum": ""
23
+ },
24
+ "require": {
25
+ "php": "^7.1"
26
+ },
27
+ "require-dev": {
28
+ "doctrine/coding-standard": "^6.0",
29
+ "ext-pdo": "*",
30
+ "ext-phar": "*",
31
+ "phpbench/phpbench": "^0.13",
32
+ "phpstan/phpstan-phpunit": "^0.11",
33
+ "phpstan/phpstan-shim": "^0.11",
34
+ "phpunit/phpunit": "^7.0"
35
+ },
36
+ "type": "library",
37
+ "extra": {
38
+ "branch-alias": {
39
+ "dev-master": "1.2.x-dev"
40
+ }
41
+ },
42
+ "autoload": {
43
+ "psr-4": {
44
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
45
+ }
46
+ },
47
+ "notification-url": "https://packagist.org/downloads/",
48
+ "license": [
49
+ "MIT"
50
+ ],
51
+ "authors": [
52
+ {
53
+ "name": "Marco Pivetta",
54
+ "email": "ocramius@gmail.com",
55
+ "homepage": "http://ocramius.github.com/"
56
+ }
57
+ ],
58
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
59
+ "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
60
+ "keywords": [
61
+ "constructor",
62
+ "instantiate"
63
+ ],
64
+ "time": "2019-03-17T17:37:11+00:00"
65
+ },
66
+ {
67
+ "name": "myclabs/deep-copy",
68
+ "version": "1.9.1",
69
+ "source": {
70
+ "type": "git",
71
+ "url": "https://github.com/myclabs/DeepCopy.git",
72
+ "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
73
+ },
74
+ "dist": {
75
+ "type": "zip",
76
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
77
+ "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
78
+ "shasum": ""
79
+ },
80
+ "require": {
81
+ "php": "^7.1"
82
+ },
83
+ "replace": {
84
+ "myclabs/deep-copy": "self.version"
85
+ },
86
+ "require-dev": {
87
+ "doctrine/collections": "^1.0",
88
+ "doctrine/common": "^2.6",
89
+ "phpunit/phpunit": "^7.1"
90
+ },
91
+ "type": "library",
92
+ "autoload": {
93
+ "psr-4": {
94
+ "DeepCopy\\": "src/DeepCopy/"
95
+ },
96
+ "files": [
97
+ "src/DeepCopy/deep_copy.php"
98
+ ]
99
+ },
100
+ "notification-url": "https://packagist.org/downloads/",
101
+ "license": [
102
+ "MIT"
103
+ ],
104
+ "description": "Create deep copies (clones) of your objects",
105
+ "keywords": [
106
+ "clone",
107
+ "copy",
108
+ "duplicate",
109
+ "object",
110
+ "object graph"
111
+ ],
112
+ "time": "2019-04-07T13:18:21+00:00"
113
+ },
114
+ {
115
+ "name": "phar-io/manifest",
116
+ "version": "1.0.3",
117
+ "source": {
118
+ "type": "git",
119
+ "url": "https://github.com/phar-io/manifest.git",
120
+ "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
121
+ },
122
+ "dist": {
123
+ "type": "zip",
124
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
125
+ "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
126
+ "shasum": ""
127
+ },
128
+ "require": {
129
+ "ext-dom": "*",
130
+ "ext-phar": "*",
131
+ "phar-io/version": "^2.0",
132
+ "php": "^5.6 || ^7.0"
133
+ },
134
+ "type": "library",
135
+ "extra": {
136
+ "branch-alias": {
137
+ "dev-master": "1.0.x-dev"
138
+ }
139
+ },
140
+ "autoload": {
141
+ "classmap": [
142
+ "src/"
143
+ ]
144
+ },
145
+ "notification-url": "https://packagist.org/downloads/",
146
+ "license": [
147
+ "BSD-3-Clause"
148
+ ],
149
+ "authors": [
150
+ {
151
+ "name": "Arne Blankerts",
152
+ "email": "arne@blankerts.de",
153
+ "role": "Developer"
154
+ },
155
+ {
156
+ "name": "Sebastian Heuer",
157
+ "email": "sebastian@phpeople.de",
158
+ "role": "Developer"
159
+ },
160
+ {
161
+ "name": "Sebastian Bergmann",
162
+ "email": "sebastian@phpunit.de",
163
+ "role": "Developer"
164
+ }
165
+ ],
166
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
167
+ "time": "2018-07-08T19:23:20+00:00"
168
+ },
169
+ {
170
+ "name": "phar-io/version",
171
+ "version": "2.0.1",
172
+ "source": {
173
+ "type": "git",
174
+ "url": "https://github.com/phar-io/version.git",
175
+ "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
176
+ },
177
+ "dist": {
178
+ "type": "zip",
179
+ "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
180
+ "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
181
+ "shasum": ""
182
+ },
183
+ "require": {
184
+ "php": "^5.6 || ^7.0"
185
+ },
186
+ "type": "library",
187
+ "autoload": {
188
+ "classmap": [
189
+ "src/"
190
+ ]
191
+ },
192
+ "notification-url": "https://packagist.org/downloads/",
193
+ "license": [
194
+ "BSD-3-Clause"
195
+ ],
196
+ "authors": [
197
+ {
198
+ "name": "Arne Blankerts",
199
+ "email": "arne@blankerts.de",
200
+ "role": "Developer"
201
+ },
202
+ {
203
+ "name": "Sebastian Heuer",
204
+ "email": "sebastian@phpeople.de",
205
+ "role": "Developer"
206
+ },
207
+ {
208
+ "name": "Sebastian Bergmann",
209
+ "email": "sebastian@phpunit.de",
210
+ "role": "Developer"
211
+ }
212
+ ],
213
+ "description": "Library for handling version information and constraints",
214
+ "time": "2018-07-08T19:19:57+00:00"
215
+ },
216
+ {
217
+ "name": "phpdocumentor/reflection-common",
218
+ "version": "1.0.1",
219
+ "source": {
220
+ "type": "git",
221
+ "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
222
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
223
+ },
224
+ "dist": {
225
+ "type": "zip",
226
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
227
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
228
+ "shasum": ""
229
+ },
230
+ "require": {
231
+ "php": ">=5.5"
232
+ },
233
+ "require-dev": {
234
+ "phpunit/phpunit": "^4.6"
235
+ },
236
+ "type": "library",
237
+ "extra": {
238
+ "branch-alias": {
239
+ "dev-master": "1.0.x-dev"
240
+ }
241
+ },
242
+ "autoload": {
243
+ "psr-4": {
244
+ "phpDocumentor\\Reflection\\": [
245
+ "src"
246
+ ]
247
+ }
248
+ },
249
+ "notification-url": "https://packagist.org/downloads/",
250
+ "license": [
251
+ "MIT"
252
+ ],
253
+ "authors": [
254
+ {
255
+ "name": "Jaap van Otterdijk",
256
+ "email": "opensource@ijaap.nl"
257
+ }
258
+ ],
259
+ "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
260
+ "homepage": "http://www.phpdoc.org",
261
+ "keywords": [
262
+ "FQSEN",
263
+ "phpDocumentor",
264
+ "phpdoc",
265
+ "reflection",
266
+ "static analysis"
267
+ ],
268
+ "time": "2017-09-11T18:02:19+00:00"
269
+ },
270
+ {
271
+ "name": "phpdocumentor/reflection-docblock",
272
+ "version": "4.3.0",
273
+ "source": {
274
+ "type": "git",
275
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
276
+ "reference": "94fd0001232e47129dd3504189fa1c7225010d08"
277
+ },
278
+ "dist": {
279
+ "type": "zip",
280
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
281
+ "reference": "94fd0001232e47129dd3504189fa1c7225010d08",
282
+ "shasum": ""
283
+ },
284
+ "require": {
285
+ "php": "^7.0",
286
+ "phpdocumentor/reflection-common": "^1.0.0",
287
+ "phpdocumentor/type-resolver": "^0.4.0",
288
+ "webmozart/assert": "^1.0"
289
+ },
290
+ "require-dev": {
291
+ "doctrine/instantiator": "~1.0.5",
292
+ "mockery/mockery": "^1.0",
293
+ "phpunit/phpunit": "^6.4"
294
+ },
295
+ "type": "library",
296
+ "extra": {
297
+ "branch-alias": {
298
+ "dev-master": "4.x-dev"
299
+ }
300
+ },
301
+ "autoload": {
302
+ "psr-4": {
303
+ "phpDocumentor\\Reflection\\": [
304
+ "src/"
305
+ ]
306
+ }
307
+ },
308
+ "notification-url": "https://packagist.org/downloads/",
309
+ "license": [
310
+ "MIT"
311
+ ],
312
+ "authors": [
313
+ {
314
+ "name": "Mike van Riel",
315
+ "email": "me@mikevanriel.com"
316
+ }
317
+ ],
318
+ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
319
+ "time": "2017-11-30T07:14:17+00:00"
320
+ },
321
+ {
322
+ "name": "phpdocumentor/type-resolver",
323
+ "version": "0.4.0",
324
+ "source": {
325
+ "type": "git",
326
+ "url": "https://github.com/phpDocumentor/TypeResolver.git",
327
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
328
+ },
329
+ "dist": {
330
+ "type": "zip",
331
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
332
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
333
+ "shasum": ""
334
+ },
335
+ "require": {
336
+ "php": "^5.5 || ^7.0",
337
+ "phpdocumentor/reflection-common": "^1.0"
338
+ },
339
+ "require-dev": {
340
+ "mockery/mockery": "^0.9.4",
341
+ "phpunit/phpunit": "^5.2||^4.8.24"
342
+ },
343
+ "type": "library",
344
+ "extra": {
345
+ "branch-alias": {
346
+ "dev-master": "1.0.x-dev"
347
+ }
348
+ },
349
+ "autoload": {
350
+ "psr-4": {
351
+ "phpDocumentor\\Reflection\\": [
352
+ "src/"
353
+ ]
354
+ }
355
+ },
356
+ "notification-url": "https://packagist.org/downloads/",
357
+ "license": [
358
+ "MIT"
359
+ ],
360
+ "authors": [
361
+ {
362
+ "name": "Mike van Riel",
363
+ "email": "me@mikevanriel.com"
364
+ }
365
+ ],
366
+ "time": "2017-07-14T14:27:02+00:00"
367
+ },
368
+ {
369
+ "name": "phpspec/prophecy",
370
+ "version": "1.8.0",
371
+ "source": {
372
+ "type": "git",
373
+ "url": "https://github.com/phpspec/prophecy.git",
374
+ "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
375
+ },
376
+ "dist": {
377
+ "type": "zip",
378
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
379
+ "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
380
+ "shasum": ""
381
+ },
382
+ "require": {
383
+ "doctrine/instantiator": "^1.0.2",
384
+ "php": "^5.3|^7.0",
385
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
386
+ "sebastian/comparator": "^1.1|^2.0|^3.0",
387
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
388
+ },
389
+ "require-dev": {
390
+ "phpspec/phpspec": "^2.5|^3.2",
391
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
392
+ },
393
+ "type": "library",
394
+ "extra": {
395
+ "branch-alias": {
396
+ "dev-master": "1.8.x-dev"
397
+ }
398
+ },
399
+ "autoload": {
400
+ "psr-0": {
401
+ "Prophecy\\": "src/"
402
+ }
403
+ },
404
+ "notification-url": "https://packagist.org/downloads/",
405
+ "license": [
406
+ "MIT"
407
+ ],
408
+ "authors": [
409
+ {
410
+ "name": "Konstantin Kudryashov",
411
+ "email": "ever.zet@gmail.com",
412
+ "homepage": "http://everzet.com"
413
+ },
414
+ {
415
+ "name": "Marcello Duarte",
416
+ "email": "marcello.duarte@gmail.com"
417
+ }
418
+ ],
419
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
420
+ "homepage": "https://github.com/phpspec/prophecy",
421
+ "keywords": [
422
+ "Double",
423
+ "Dummy",
424
+ "fake",
425
+ "mock",
426
+ "spy",
427
+ "stub"
428
+ ],
429
+ "time": "2018-08-05T17:53:17+00:00"
430
+ },
431
+ {
432
+ "name": "phpunit/php-code-coverage",
433
+ "version": "6.1.4",
434
+ "source": {
435
+ "type": "git",
436
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
437
+ "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d"
438
+ },
439
+ "dist": {
440
+ "type": "zip",
441
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
442
+ "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
443
+ "shasum": ""
444
+ },
445
+ "require": {
446
+ "ext-dom": "*",
447
+ "ext-xmlwriter": "*",
448
+ "php": "^7.1",
449
+ "phpunit/php-file-iterator": "^2.0",
450
+ "phpunit/php-text-template": "^1.2.1",
451
+ "phpunit/php-token-stream": "^3.0",
452
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
453
+ "sebastian/environment": "^3.1 || ^4.0",
454
+ "sebastian/version": "^2.0.1",
455
+ "theseer/tokenizer": "^1.1"
456
+ },
457
+ "require-dev": {
458
+ "phpunit/phpunit": "^7.0"
459
+ },
460
+ "suggest": {
461
+ "ext-xdebug": "^2.6.0"
462
+ },
463
+ "type": "library",
464
+ "extra": {
465
+ "branch-alias": {
466
+ "dev-master": "6.1-dev"
467
+ }
468
+ },
469
+ "autoload": {
470
+ "classmap": [
471
+ "src/"
472
+ ]
473
+ },
474
+ "notification-url": "https://packagist.org/downloads/",
475
+ "license": [
476
+ "BSD-3-Clause"
477
+ ],
478
+ "authors": [
479
+ {
480
+ "name": "Sebastian Bergmann",
481
+ "email": "sebastian@phpunit.de",
482
+ "role": "lead"
483
+ }
484
+ ],
485
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
486
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
487
+ "keywords": [
488
+ "coverage",
489
+ "testing",
490
+ "xunit"
491
+ ],
492
+ "time": "2018-10-31T16:06:48+00:00"
493
+ },
494
+ {
495
+ "name": "phpunit/php-file-iterator",
496
+ "version": "2.0.2",
497
+ "source": {
498
+ "type": "git",
499
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
500
+ "reference": "050bedf145a257b1ff02746c31894800e5122946"
501
+ },
502
+ "dist": {
503
+ "type": "zip",
504
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
505
+ "reference": "050bedf145a257b1ff02746c31894800e5122946",
506
+ "shasum": ""
507
+ },
508
+ "require": {
509
+ "php": "^7.1"
510
+ },
511
+ "require-dev": {
512
+ "phpunit/phpunit": "^7.1"
513
+ },
514
+ "type": "library",
515
+ "extra": {
516
+ "branch-alias": {
517
+ "dev-master": "2.0.x-dev"
518
+ }
519
+ },
520
+ "autoload": {
521
+ "classmap": [
522
+ "src/"
523
+ ]
524
+ },
525
+ "notification-url": "https://packagist.org/downloads/",
526
+ "license": [
527
+ "BSD-3-Clause"
528
+ ],
529
+ "authors": [
530
+ {
531
+ "name": "Sebastian Bergmann",
532
+ "email": "sebastian@phpunit.de",
533
+ "role": "lead"
534
+ }
535
+ ],
536
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
537
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
538
+ "keywords": [
539
+ "filesystem",
540
+ "iterator"
541
+ ],
542
+ "time": "2018-09-13T20:33:42+00:00"
543
+ },
544
+ {
545
+ "name": "phpunit/php-text-template",
546
+ "version": "1.2.1",
547
+ "source": {
548
+ "type": "git",
549
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
550
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
551
+ },
552
+ "dist": {
553
+ "type": "zip",
554
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
555
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
556
+ "shasum": ""
557
+ },
558
+ "require": {
559
+ "php": ">=5.3.3"
560
+ },
561
+ "type": "library",
562
+ "autoload": {
563
+ "classmap": [
564
+ "src/"
565
+ ]
566
+ },
567
+ "notification-url": "https://packagist.org/downloads/",
568
+ "license": [
569
+ "BSD-3-Clause"
570
+ ],
571
+ "authors": [
572
+ {
573
+ "name": "Sebastian Bergmann",
574
+ "email": "sebastian@phpunit.de",
575
+ "role": "lead"
576
+ }
577
+ ],
578
+ "description": "Simple template engine.",
579
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
580
+ "keywords": [
581
+ "template"
582
+ ],
583
+ "time": "2015-06-21T13:50:34+00:00"
584
+ },
585
+ {
586
+ "name": "phpunit/php-timer",
587
+ "version": "2.1.1",
588
+ "source": {
589
+ "type": "git",
590
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
591
+ "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059"
592
+ },
593
+ "dist": {
594
+ "type": "zip",
595
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b389aebe1b8b0578430bda0c7c95a829608e059",
596
+ "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059",
597
+ "shasum": ""
598
+ },
599
+ "require": {
600
+ "php": "^7.1"
601
+ },
602
+ "require-dev": {
603
+ "phpunit/phpunit": "^7.0"
604
+ },
605
+ "type": "library",
606
+ "extra": {
607
+ "branch-alias": {
608
+ "dev-master": "2.1-dev"
609
+ }
610
+ },
611
+ "autoload": {
612
+ "classmap": [
613
+ "src/"
614
+ ]
615
+ },
616
+ "notification-url": "https://packagist.org/downloads/",
617
+ "license": [
618
+ "BSD-3-Clause"
619
+ ],
620
+ "authors": [
621
+ {
622
+ "name": "Sebastian Bergmann",
623
+ "email": "sebastian@phpunit.de",
624
+ "role": "lead"
625
+ }
626
+ ],
627
+ "description": "Utility class for timing",
628
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
629
+ "keywords": [
630
+ "timer"
631
+ ],
632
+ "time": "2019-02-20T10:12:59+00:00"
633
+ },
634
+ {
635
+ "name": "phpunit/php-token-stream",
636
+ "version": "3.0.1",
637
+ "source": {
638
+ "type": "git",
639
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
640
+ "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18"
641
+ },
642
+ "dist": {
643
+ "type": "zip",
644
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18",
645
+ "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18",
646
+ "shasum": ""
647
+ },
648
+ "require": {
649
+ "ext-tokenizer": "*",
650
+ "php": "^7.1"
651
+ },
652
+ "require-dev": {
653
+ "phpunit/phpunit": "^7.0"
654
+ },
655
+ "type": "library",
656
+ "extra": {
657
+ "branch-alias": {
658
+ "dev-master": "3.0-dev"
659
+ }
660
+ },
661
+ "autoload": {
662
+ "classmap": [
663
+ "src/"
664
+ ]
665
+ },
666
+ "notification-url": "https://packagist.org/downloads/",
667
+ "license": [
668
+ "BSD-3-Clause"
669
+ ],
670
+ "authors": [
671
+ {
672
+ "name": "Sebastian Bergmann",
673
+ "email": "sebastian@phpunit.de"
674
+ }
675
+ ],
676
+ "description": "Wrapper around PHP's tokenizer extension.",
677
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
678
+ "keywords": [
679
+ "tokenizer"
680
+ ],
681
+ "time": "2018-10-30T05:52:18+00:00"
682
+ },
683
+ {
684
+ "name": "phpunit/phpunit",
685
+ "version": "7.5.9",
686
+ "source": {
687
+ "type": "git",
688
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
689
+ "reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160"
690
+ },
691
+ "dist": {
692
+ "type": "zip",
693
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/134669cf0eeac3f79bc7f0c793efbc158bffc160",
694
+ "reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160",
695
+ "shasum": ""
696
+ },
697
+ "require": {
698
+ "doctrine/instantiator": "^1.1",
699
+ "ext-dom": "*",
700
+ "ext-json": "*",
701
+ "ext-libxml": "*",
702
+ "ext-mbstring": "*",
703
+ "ext-xml": "*",
704
+ "myclabs/deep-copy": "^1.7",
705
+ "phar-io/manifest": "^1.0.2",
706
+ "phar-io/version": "^2.0",
707
+ "php": "^7.1",
708
+ "phpspec/prophecy": "^1.7",
709
+ "phpunit/php-code-coverage": "^6.0.7",
710
+ "phpunit/php-file-iterator": "^2.0.1",
711
+ "phpunit/php-text-template": "^1.2.1",
712
+ "phpunit/php-timer": "^2.1",
713
+ "sebastian/comparator": "^3.0",
714
+ "sebastian/diff": "^3.0",
715
+ "sebastian/environment": "^4.0",
716
+ "sebastian/exporter": "^3.1",
717
+ "sebastian/global-state": "^2.0",
718
+ "sebastian/object-enumerator": "^3.0.3",
719
+ "sebastian/resource-operations": "^2.0",
720
+ "sebastian/version": "^2.0.1"
721
+ },
722
+ "conflict": {
723
+ "phpunit/phpunit-mock-objects": "*"
724
+ },
725
+ "require-dev": {
726
+ "ext-pdo": "*"
727
+ },
728
+ "suggest": {
729
+ "ext-soap": "*",
730
+ "ext-xdebug": "*",
731
+ "phpunit/php-invoker": "^2.0"
732
+ },
733
+ "bin": [
734
+ "phpunit"
735
+ ],
736
+ "type": "library",
737
+ "extra": {
738
+ "branch-alias": {
739
+ "dev-master": "7.5-dev"
740
+ }
741
+ },
742
+ "autoload": {
743
+ "classmap": [
744
+ "src/"
745
+ ]
746
+ },
747
+ "notification-url": "https://packagist.org/downloads/",
748
+ "license": [
749
+ "BSD-3-Clause"
750
+ ],
751
+ "authors": [
752
+ {
753
+ "name": "Sebastian Bergmann",
754
+ "email": "sebastian@phpunit.de",
755
+ "role": "lead"
756
+ }
757
+ ],
758
+ "description": "The PHP Unit Testing framework.",
759
+ "homepage": "https://phpunit.de/",
760
+ "keywords": [
761
+ "phpunit",
762
+ "testing",
763
+ "xunit"
764
+ ],
765
+ "time": "2019-04-19T15:50:46+00:00"
766
+ },
767
+ {
768
+ "name": "sebastian/code-unit-reverse-lookup",
769
+ "version": "1.0.1",
770
+ "source": {
771
+ "type": "git",
772
+ "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
773
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
774
+ },
775
+ "dist": {
776
+ "type": "zip",
777
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
778
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
779
+ "shasum": ""
780
+ },
781
+ "require": {
782
+ "php": "^5.6 || ^7.0"
783
+ },
784
+ "require-dev": {
785
+ "phpunit/phpunit": "^5.7 || ^6.0"
786
+ },
787
+ "type": "library",
788
+ "extra": {
789
+ "branch-alias": {
790
+ "dev-master": "1.0.x-dev"
791
+ }
792
+ },
793
+ "autoload": {
794
+ "classmap": [
795
+ "src/"
796
+ ]
797
+ },
798
+ "notification-url": "https://packagist.org/downloads/",
799
+ "license": [
800
+ "BSD-3-Clause"
801
+ ],
802
+ "authors": [
803
+ {
804
+ "name": "Sebastian Bergmann",
805
+ "email": "sebastian@phpunit.de"
806
+ }
807
+ ],
808
+ "description": "Looks up which function or method a line of code belongs to",
809
+ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
810
+ "time": "2017-03-04T06:30:41+00:00"
811
+ },
812
+ {
813
+ "name": "sebastian/comparator",
814
+ "version": "3.0.2",
815
+ "source": {
816
+ "type": "git",
817
+ "url": "https://github.com/sebastianbergmann/comparator.git",
818
+ "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
819
+ },
820
+ "dist": {
821
+ "type": "zip",
822
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
823
+ "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
824
+ "shasum": ""
825
+ },
826
+ "require": {
827
+ "php": "^7.1",
828
+ "sebastian/diff": "^3.0",
829
+ "sebastian/exporter": "^3.1"
830
+ },
831
+ "require-dev": {
832
+ "phpunit/phpunit": "^7.1"
833
+ },
834
+ "type": "library",
835
+ "extra": {
836
+ "branch-alias": {
837
+ "dev-master": "3.0-dev"
838
+ }
839
+ },
840
+ "autoload": {
841
+ "classmap": [
842
+ "src/"
843
+ ]
844
+ },
845
+ "notification-url": "https://packagist.org/downloads/",
846
+ "license": [
847
+ "BSD-3-Clause"
848
+ ],
849
+ "authors": [
850
+ {
851
+ "name": "Jeff Welch",
852
+ "email": "whatthejeff@gmail.com"
853
+ },
854
+ {
855
+ "name": "Volker Dusch",
856
+ "email": "github@wallbash.com"
857
+ },
858
+ {
859
+ "name": "Bernhard Schussek",
860
+ "email": "bschussek@2bepublished.at"
861
+ },
862
+ {
863
+ "name": "Sebastian Bergmann",
864
+ "email": "sebastian@phpunit.de"
865
+ }
866
+ ],
867
+ "description": "Provides the functionality to compare PHP values for equality",
868
+ "homepage": "https://github.com/sebastianbergmann/comparator",
869
+ "keywords": [
870
+ "comparator",
871
+ "compare",
872
+ "equality"
873
+ ],
874
+ "time": "2018-07-12T15:12:46+00:00"
875
+ },
876
+ {
877
+ "name": "sebastian/diff",
878
+ "version": "3.0.2",
879
+ "source": {
880
+ "type": "git",
881
+ "url": "https://github.com/sebastianbergmann/diff.git",
882
+ "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
883
+ },
884
+ "dist": {
885
+ "type": "zip",
886
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
887
+ "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
888
+ "shasum": ""
889
+ },
890
+ "require": {
891
+ "php": "^7.1"
892
+ },
893
+ "require-dev": {
894
+ "phpunit/phpunit": "^7.5 || ^8.0",
895
+ "symfony/process": "^2 || ^3.3 || ^4"
896
+ },
897
+ "type": "library",
898
+ "extra": {
899
+ "branch-alias": {
900
+ "dev-master": "3.0-dev"
901
+ }
902
+ },
903
+ "autoload": {
904
+ "classmap": [
905
+ "src/"
906
+ ]
907
+ },
908
+ "notification-url": "https://packagist.org/downloads/",
909
+ "license": [
910
+ "BSD-3-Clause"
911
+ ],
912
+ "authors": [
913
+ {
914
+ "name": "Kore Nordmann",
915
+ "email": "mail@kore-nordmann.de"
916
+ },
917
+ {
918
+ "name": "Sebastian Bergmann",
919
+ "email": "sebastian@phpunit.de"
920
+ }
921
+ ],
922
+ "description": "Diff implementation",
923
+ "homepage": "https://github.com/sebastianbergmann/diff",
924
+ "keywords": [
925
+ "diff",
926
+ "udiff",
927
+ "unidiff",
928
+ "unified diff"
929
+ ],
930
+ "time": "2019-02-04T06:01:07+00:00"
931
+ },
932
+ {
933
+ "name": "sebastian/environment",
934
+ "version": "4.2.1",
935
+ "source": {
936
+ "type": "git",
937
+ "url": "https://github.com/sebastianbergmann/environment.git",
938
+ "reference": "3095910f0f0fb155ac4021fc51a4a7a39ac04e8a"
939
+ },
940
+ "dist": {
941
+ "type": "zip",
942
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/3095910f0f0fb155ac4021fc51a4a7a39ac04e8a",
943
+ "reference": "3095910f0f0fb155ac4021fc51a4a7a39ac04e8a",
944
+ "shasum": ""
945
+ },
946
+ "require": {
947
+ "php": "^7.1"
948
+ },
949
+ "require-dev": {
950
+ "phpunit/phpunit": "^7.5"
951
+ },
952
+ "suggest": {
953
+ "ext-posix": "*"
954
+ },
955
+ "type": "library",
956
+ "extra": {
957
+ "branch-alias": {
958
+ "dev-master": "4.2-dev"
959
+ }
960
+ },
961
+ "autoload": {
962
+ "classmap": [
963
+ "src/"
964
+ ]
965
+ },
966
+ "notification-url": "https://packagist.org/downloads/",
967
+ "license": [
968
+ "BSD-3-Clause"
969
+ ],
970
+ "authors": [
971
+ {
972
+ "name": "Sebastian Bergmann",
973
+ "email": "sebastian@phpunit.de"
974
+ }
975
+ ],
976
+ "description": "Provides functionality to handle HHVM/PHP environments",
977
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
978
+ "keywords": [
979
+ "Xdebug",
980
+ "environment",
981
+ "hhvm"
982
+ ],
983
+ "time": "2019-04-25T07:55:20+00:00"
984
+ },
985
+ {
986
+ "name": "sebastian/exporter",
987
+ "version": "3.1.0",
988
+ "source": {
989
+ "type": "git",
990
+ "url": "https://github.com/sebastianbergmann/exporter.git",
991
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
992
+ },
993
+ "dist": {
994
+ "type": "zip",
995
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
996
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
997
+ "shasum": ""
998
+ },
999
+ "require": {
1000
+ "php": "^7.0",
1001
+ "sebastian/recursion-context": "^3.0"
1002
+ },
1003
+ "require-dev": {
1004
+ "ext-mbstring": "*",
1005
+ "phpunit/phpunit": "^6.0"
1006
+ },
1007
+ "type": "library",
1008
+ "extra": {
1009
+ "branch-alias": {
1010
+ "dev-master": "3.1.x-dev"
1011
+ }
1012
+ },
1013
+ "autoload": {
1014
+ "classmap": [
1015
+ "src/"
1016
+ ]
1017
+ },
1018
+ "notification-url": "https://packagist.org/downloads/",
1019
+ "license": [
1020
+ "BSD-3-Clause"
1021
+ ],
1022
+ "authors": [
1023
+ {
1024
+ "name": "Jeff Welch",
1025
+ "email": "whatthejeff@gmail.com"
1026
+ },
1027
+ {
1028
+ "name": "Volker Dusch",
1029
+ "email": "github@wallbash.com"
1030
+ },
1031
+ {
1032
+ "name": "Bernhard Schussek",
1033
+ "email": "bschussek@2bepublished.at"
1034
+ },
1035
+ {
1036
+ "name": "Sebastian Bergmann",
1037
+ "email": "sebastian@phpunit.de"
1038
+ },
1039
+ {
1040
+ "name": "Adam Harvey",
1041
+ "email": "aharvey@php.net"
1042
+ }
1043
+ ],
1044
+ "description": "Provides the functionality to export PHP variables for visualization",
1045
+ "homepage": "http://www.github.com/sebastianbergmann/exporter",
1046
+ "keywords": [
1047
+ "export",
1048
+ "exporter"
1049
+ ],
1050
+ "time": "2017-04-03T13:19:02+00:00"
1051
+ },
1052
+ {
1053
+ "name": "sebastian/global-state",
1054
+ "version": "2.0.0",
1055
+ "source": {
1056
+ "type": "git",
1057
+ "url": "https://github.com/sebastianbergmann/global-state.git",
1058
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
1059
+ },
1060
+ "dist": {
1061
+ "type": "zip",
1062
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
1063
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
1064
+ "shasum": ""
1065
+ },
1066
+ "require": {
1067
+ "php": "^7.0"
1068
+ },
1069
+ "require-dev": {
1070
+ "phpunit/phpunit": "^6.0"
1071
+ },
1072
+ "suggest": {
1073
+ "ext-uopz": "*"
1074
+ },
1075
+ "type": "library",
1076
+ "extra": {
1077
+ "branch-alias": {
1078
+ "dev-master": "2.0-dev"
1079
+ }
1080
+ },
1081
+ "autoload": {
1082
+ "classmap": [
1083
+ "src/"
1084
+ ]
1085
+ },
1086
+ "notification-url": "https://packagist.org/downloads/",
1087
+ "license": [
1088
+ "BSD-3-Clause"
1089
+ ],
1090
+ "authors": [
1091
+ {
1092
+ "name": "Sebastian Bergmann",
1093
+ "email": "sebastian@phpunit.de"
1094
+ }
1095
+ ],
1096
+ "description": "Snapshotting of global state",
1097
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
1098
+ "keywords": [
1099
+ "global state"
1100
+ ],
1101
+ "time": "2017-04-27T15:39:26+00:00"
1102
+ },
1103
+ {
1104
+ "name": "sebastian/object-enumerator",
1105
+ "version": "3.0.3",
1106
+ "source": {
1107
+ "type": "git",
1108
+ "url": "https://github.com/sebastianbergmann/object-enumerator.git",
1109
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
1110
+ },
1111
+ "dist": {
1112
+ "type": "zip",
1113
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
1114
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
1115
+ "shasum": ""
1116
+ },
1117
+ "require": {
1118
+ "php": "^7.0",
1119
+ "sebastian/object-reflector": "^1.1.1",
1120
+ "sebastian/recursion-context": "^3.0"
1121
+ },
1122
+ "require-dev": {
1123
+ "phpunit/phpunit": "^6.0"
1124
+ },
1125
+ "type": "library",
1126
+ "extra": {
1127
+ "branch-alias": {
1128
+ "dev-master": "3.0.x-dev"
1129
+ }
1130
+ },
1131
+ "autoload": {
1132
+ "classmap": [
1133
+ "src/"
1134
+ ]
1135
+ },
1136
+ "notification-url": "https://packagist.org/downloads/",
1137
+ "license": [
1138
+ "BSD-3-Clause"
1139
+ ],
1140
+ "authors": [
1141
+ {
1142
+ "name": "Sebastian Bergmann",
1143
+ "email": "sebastian@phpunit.de"
1144
+ }
1145
+ ],
1146
+ "description": "Traverses array structures and object graphs to enumerate all referenced objects",
1147
+ "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
1148
+ "time": "2017-08-03T12:35:26+00:00"
1149
+ },
1150
+ {
1151
+ "name": "sebastian/object-reflector",
1152
+ "version": "1.1.1",
1153
+ "source": {
1154
+ "type": "git",
1155
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
1156
+ "reference": "773f97c67f28de00d397be301821b06708fca0be"
1157
+ },
1158
+ "dist": {
1159
+ "type": "zip",
1160
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
1161
+ "reference": "773f97c67f28de00d397be301821b06708fca0be",
1162
+ "shasum": ""
1163
+ },
1164
+ "require": {
1165
+ "php": "^7.0"
1166
+ },
1167
+ "require-dev": {
1168
+ "phpunit/phpunit": "^6.0"
1169
+ },
1170
+ "type": "library",
1171
+ "extra": {
1172
+ "branch-alias": {
1173
+ "dev-master": "1.1-dev"
1174
+ }
1175
+ },
1176
+ "autoload": {
1177
+ "classmap": [
1178
+ "src/"
1179
+ ]
1180
+ },
1181
+ "notification-url": "https://packagist.org/downloads/",
1182
+ "license": [
1183
+ "BSD-3-Clause"
1184
+ ],
1185
+ "authors": [
1186
+ {
1187
+ "name": "Sebastian Bergmann",
1188
+ "email": "sebastian@phpunit.de"
1189
+ }
1190
+ ],
1191
+ "description": "Allows reflection of object attributes, including inherited and non-public ones",
1192
+ "homepage": "https://github.com/sebastianbergmann/object-reflector/",
1193
+ "time": "2017-03-29T09:07:27+00:00"
1194
+ },
1195
+ {
1196
+ "name": "sebastian/recursion-context",
1197
+ "version": "3.0.0",
1198
+ "source": {
1199
+ "type": "git",
1200
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
1201
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
1202
+ },
1203
+ "dist": {
1204
+ "type": "zip",
1205
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
1206
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
1207
+ "shasum": ""
1208
+ },
1209
+ "require": {
1210
+ "php": "^7.0"
1211
+ },
1212
+ "require-dev": {
1213
+ "phpunit/phpunit": "^6.0"
1214
+ },
1215
+ "type": "library",
1216
+ "extra": {
1217
+ "branch-alias": {
1218
+ "dev-master": "3.0.x-dev"
1219
+ }
1220
+ },
1221
+ "autoload": {
1222
+ "classmap": [
1223
+ "src/"
1224
+ ]
1225
+ },
1226
+ "notification-url": "https://packagist.org/downloads/",
1227
+ "license": [
1228
+ "BSD-3-Clause"
1229
+ ],
1230
+ "authors": [
1231
+ {
1232
+ "name": "Jeff Welch",
1233
+ "email": "whatthejeff@gmail.com"
1234
+ },
1235
+ {
1236
+ "name": "Sebastian Bergmann",
1237
+ "email": "sebastian@phpunit.de"
1238
+ },
1239
+ {
1240
+ "name": "Adam Harvey",
1241
+ "email": "aharvey@php.net"
1242
+ }
1243
+ ],
1244
+ "description": "Provides functionality to recursively process PHP variables",
1245
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
1246
+ "time": "2017-03-03T06:23:57+00:00"
1247
+ },
1248
+ {
1249
+ "name": "sebastian/resource-operations",
1250
+ "version": "2.0.1",
1251
+ "source": {
1252
+ "type": "git",
1253
+ "url": "https://github.com/sebastianbergmann/resource-operations.git",
1254
+ "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
1255
+ },
1256
+ "dist": {
1257
+ "type": "zip",
1258
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
1259
+ "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
1260
+ "shasum": ""
1261
+ },
1262
+ "require": {
1263
+ "php": "^7.1"
1264
+ },
1265
+ "type": "library",
1266
+ "extra": {
1267
+ "branch-alias": {
1268
+ "dev-master": "2.0-dev"
1269
+ }
1270
+ },
1271
+ "autoload": {
1272
+ "classmap": [
1273
+ "src/"
1274
+ ]
1275
+ },
1276
+ "notification-url": "https://packagist.org/downloads/",
1277
+ "license": [
1278
+ "BSD-3-Clause"
1279
+ ],
1280
+ "authors": [
1281
+ {
1282
+ "name": "Sebastian Bergmann",
1283
+ "email": "sebastian@phpunit.de"
1284
+ }
1285
+ ],
1286
+ "description": "Provides a list of PHP built-in functions that operate on resources",
1287
+ "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
1288
+ "time": "2018-10-04T04:07:39+00:00"
1289
+ },
1290
+ {
1291
+ "name": "sebastian/version",
1292
+ "version": "2.0.1",
1293
+ "source": {
1294
+ "type": "git",
1295
+ "url": "https://github.com/sebastianbergmann/version.git",
1296
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
1297
+ },
1298
+ "dist": {
1299
+ "type": "zip",
1300
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
1301
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
1302
+ "shasum": ""
1303
+ },
1304
+ "require": {
1305
+ "php": ">=5.6"
1306
+ },
1307
+ "type": "library",
1308
+ "extra": {
1309
+ "branch-alias": {
1310
+ "dev-master": "2.0.x-dev"
1311
+ }
1312
+ },
1313
+ "autoload": {
1314
+ "classmap": [
1315
+ "src/"
1316
+ ]
1317
+ },
1318
+ "notification-url": "https://packagist.org/downloads/",
1319
+ "license": [
1320
+ "BSD-3-Clause"
1321
+ ],
1322
+ "authors": [
1323
+ {
1324
+ "name": "Sebastian Bergmann",
1325
+ "email": "sebastian@phpunit.de",
1326
+ "role": "lead"
1327
+ }
1328
+ ],
1329
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
1330
+ "homepage": "https://github.com/sebastianbergmann/version",
1331
+ "time": "2016-10-03T07:35:21+00:00"
1332
+ },
1333
+ {
1334
+ "name": "symfony/polyfill-ctype",
1335
+ "version": "v1.11.0",
1336
+ "source": {
1337
+ "type": "git",
1338
+ "url": "https://github.com/symfony/polyfill-ctype.git",
1339
+ "reference": "82ebae02209c21113908c229e9883c419720738a"
1340
+ },
1341
+ "dist": {
1342
+ "type": "zip",
1343
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
1344
+ "reference": "82ebae02209c21113908c229e9883c419720738a",
1345
+ "shasum": ""
1346
+ },
1347
+ "require": {
1348
+ "php": ">=5.3.3"
1349
+ },
1350
+ "suggest": {
1351
+ "ext-ctype": "For best performance"
1352
+ },
1353
+ "type": "library",
1354
+ "extra": {
1355
+ "branch-alias": {
1356
+ "dev-master": "1.11-dev"
1357
+ }
1358
+ },
1359
+ "autoload": {
1360
+ "psr-4": {
1361
+ "Symfony\\Polyfill\\Ctype\\": ""
1362
+ },
1363
+ "files": [
1364
+ "bootstrap.php"
1365
+ ]
1366
+ },
1367
+ "notification-url": "https://packagist.org/downloads/",
1368
+ "license": [
1369
+ "MIT"
1370
+ ],
1371
+ "authors": [
1372
+ {
1373
+ "name": "Symfony Community",
1374
+ "homepage": "https://symfony.com/contributors"
1375
+ },
1376
+ {
1377
+ "name": "Gert de Pagter",
1378
+ "email": "BackEndTea@gmail.com"
1379
+ }
1380
+ ],
1381
+ "description": "Symfony polyfill for ctype functions",
1382
+ "homepage": "https://symfony.com",
1383
+ "keywords": [
1384
+ "compatibility",
1385
+ "ctype",
1386
+ "polyfill",
1387
+ "portable"
1388
+ ],
1389
+ "time": "2019-02-06T07:57:58+00:00"
1390
+ },
1391
+ {
1392
+ "name": "theseer/tokenizer",
1393
+ "version": "1.1.2",
1394
+ "source": {
1395
+ "type": "git",
1396
+ "url": "https://github.com/theseer/tokenizer.git",
1397
+ "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8"
1398
+ },
1399
+ "dist": {
1400
+ "type": "zip",
1401
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8",
1402
+ "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8",
1403
+ "shasum": ""
1404
+ },
1405
+ "require": {
1406
+ "ext-dom": "*",
1407
+ "ext-tokenizer": "*",
1408
+ "ext-xmlwriter": "*",
1409
+ "php": "^7.0"
1410
+ },
1411
+ "type": "library",
1412
+ "autoload": {
1413
+ "classmap": [
1414
+ "src/"
1415
+ ]
1416
+ },
1417
+ "notification-url": "https://packagist.org/downloads/",
1418
+ "license": [
1419
+ "BSD-3-Clause"
1420
+ ],
1421
+ "authors": [
1422
+ {
1423
+ "name": "Arne Blankerts",
1424
+ "email": "arne@blankerts.de",
1425
+ "role": "Developer"
1426
+ }
1427
+ ],
1428
+ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
1429
+ "time": "2019-04-04T09:56:43+00:00"
1430
+ },
1431
+ {
1432
+ "name": "webmozart/assert",
1433
+ "version": "1.4.0",
1434
+ "source": {
1435
+ "type": "git",
1436
+ "url": "https://github.com/webmozart/assert.git",
1437
+ "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
1438
+ },
1439
+ "dist": {
1440
+ "type": "zip",
1441
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
1442
+ "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
1443
+ "shasum": ""
1444
+ },
1445
+ "require": {
1446
+ "php": "^5.3.3 || ^7.0",
1447
+ "symfony/polyfill-ctype": "^1.8"
1448
+ },
1449
+ "require-dev": {
1450
+ "phpunit/phpunit": "^4.6",
1451
+ "sebastian/version": "^1.0.1"
1452
+ },
1453
+ "type": "library",
1454
+ "extra": {
1455
+ "branch-alias": {
1456
+ "dev-master": "1.3-dev"
1457
+ }
1458
+ },
1459
+ "autoload": {
1460
+ "psr-4": {
1461
+ "Webmozart\\Assert\\": "src/"
1462
+ }
1463
+ },
1464
+ "notification-url": "https://packagist.org/downloads/",
1465
+ "license": [
1466
+ "MIT"
1467
+ ],
1468
+ "authors": [
1469
+ {
1470
+ "name": "Bernhard Schussek",
1471
+ "email": "bschussek@gmail.com"
1472
+ }
1473
+ ],
1474
+ "description": "Assertions to validate method input/output with nice error messages.",
1475
+ "keywords": [
1476
+ "assert",
1477
+ "check",
1478
+ "validate"
1479
+ ],
1480
+ "time": "2018-12-25T11:19:39+00:00"
1481
+ }
1482
+ ],
1483
+ "aliases": [],
1484
+ "minimum-stability": "stable",
1485
+ "stability-flags": [],
1486
+ "prefer-stable": false,
1487
+ "prefer-lowest": false,
1488
+ "platform": [],
1489
+ "platform-dev": []
1490
+ }
vendor/layered/safe-eval/phpunit.xml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
5
+ backupGlobals="false"
6
+ colors="true"
7
+ bootstrap="vendor/autoload.php"
8
+ failOnRisky="true"
9
+ failOnWarning="true"
10
+ >
11
+ <php>
12
+ <ini name="error_reporting" value="-1" />
13
+ </php>
14
+
15
+ <testsuites>
16
+ <testsuite name="Layered SafeEval Test Suite">
17
+ <directory>./Tests/</directory>
18
+ </testsuite>
19
+ </testsuites>
20
+
21
+ <filter>
22
+ <whitelist>
23
+ <directory>./</directory>
24
+ <exclude>
25
+ <directory>./Tests</directory>
26
+ <directory>./vendor</directory>
27
+ </exclude>
28
+ </whitelist>
29
+ </filter>
30
+ </phpunit>