All-in-One Video Gallery - Version 1.0.0

Version Description

  • Initial release.

=

Download this release

Release Info

Developer plugins360
Plugin Icon 128x128 All-in-One Video Gallery
Version 1.0.0
Comparing to
See all releases

Version 1.0.0

Files changed (82) hide show
  1. LICENSE.txt +339 -0
  2. README.txt +93 -0
  3. admin/assets/css/aiovg-admin.css +281 -0
  4. admin/assets/css/index.html +1 -0
  5. admin/assets/images/index.html +1 -0
  6. admin/assets/images/logo.png +0 -0
  7. admin/assets/index.html +1 -0
  8. admin/assets/js/aiovg-admin.js +330 -0
  9. admin/assets/js/index.html +1 -0
  10. admin/class-aiovg-admin-categories.php +194 -0
  11. admin/class-aiovg-admin-settings.php +958 -0
  12. admin/class-aiovg-admin-shortcode.php +397 -0
  13. admin/class-aiovg-admin-videos.php +474 -0
  14. admin/class-aiovg-admin-welcome.php +99 -0
  15. admin/class-aiovg-admin.php +104 -0
  16. admin/index.html +1 -0
  17. admin/templates/category-image.php +44 -0
  18. admin/templates/index.html +1 -0
  19. admin/templates/settings.php +36 -0
  20. admin/templates/shortcode-builder.php +117 -0
  21. admin/templates/video-sources.php +164 -0
  22. admin/templates/video-submitbox.php +33 -0
  23. admin/templates/video-tracks.php +91 -0
  24. admin/templates/welcome.php +142 -0
  25. all-in-one-video-gallery.php +95 -0
  26. includes/class-aiovg-activator.php +132 -0
  27. includes/class-aiovg-deactivator.php +37 -0
  28. includes/class-aiovg-i18n.php +40 -0
  29. includes/class-aiovg-loader.php +128 -0
  30. includes/class-aiovg-roles.php +242 -0
  31. includes/class-aiovg-walker-terms-checklist.php +76 -0
  32. includes/class-aiovg.php +304 -0
  33. includes/functions.php +1032 -0
  34. includes/index.html +1 -0
  35. index.html +1 -0
  36. languages/all-in-one-video-gallery.pot +1360 -0
  37. languages/index.html +1 -0
  38. public/assets/css/aiovg-public.css +229 -0
  39. public/assets/css/bootstrap.css +2337 -0
  40. public/assets/css/font-awesome.css +2337 -0
  41. public/assets/css/font-awesome.min.css +4 -0
  42. public/assets/css/index.html +1 -0
  43. public/assets/css/magnific-popup.css +351 -0
  44. public/assets/fonts/FontAwesome.otf +0 -0
  45. public/assets/fonts/fontawesome-webfont.eot +0 -0
  46. public/assets/fonts/fontawesome-webfont.svg +2671 -0
  47. public/assets/fonts/fontawesome-webfont.ttf +0 -0
  48. public/assets/fonts/fontawesome-webfont.woff +0 -0
  49. public/assets/fonts/fontawesome-webfont.woff2 +0 -0
  50. public/assets/fonts/index.html +1 -0
  51. public/assets/images/index.html +1 -0
  52. public/assets/images/placeholder-image.png +0 -0
  53. public/assets/images/play.png +0 -0
  54. public/assets/index.html +1 -0
  55. public/assets/js/aiovg-public.js +13 -0
  56. public/assets/js/index.html +1 -0
  57. public/assets/js/magnific-popup.js +1499 -0
  58. public/assets/js/magnific-popup.min.js +3 -0
  59. public/assets/mediaelement/index.html +1 -0
  60. public/assets/mediaelement/lang/ca.js +89 -0
  61. public/assets/mediaelement/lang/cs.js +90 -0
  62. public/assets/mediaelement/lang/de.js +90 -0
  63. public/assets/mediaelement/lang/es.js +90 -0
  64. public/assets/mediaelement/lang/fa.js +90 -0
  65. public/assets/mediaelement/lang/fr.js +91 -0
  66. public/assets/mediaelement/lang/hr.js +87 -0
  67. public/assets/mediaelement/lang/hu.js +90 -0
  68. public/assets/mediaelement/lang/index.html +1 -0
  69. public/assets/mediaelement/lang/it.js +90 -0
  70. public/assets/mediaelement/lang/ja.js +90 -0
  71. public/assets/mediaelement/lang/ko.js +90 -0
  72. public/assets/mediaelement/lang/nl.js +91 -0
  73. public/assets/mediaelement/lang/pl.js +90 -0
  74. public/assets/mediaelement/lang/pt.js +92 -0
  75. public/assets/mediaelement/lang/ro.js +90 -0
  76. public/assets/mediaelement/lang/ru.js +90 -0
  77. public/assets/mediaelement/lang/sk.js +90 -0
  78. public/assets/mediaelement/lang/sv.js +89 -0
  79. public/assets/mediaelement/lang/uk.js +89 -0
  80. public/assets/mediaelement/lang/zh-cn.js +90 -0
  81. public/assets/mediaelement/lang/zh.js +91 -0
  82. public/assets/mediaelement/mediaelement-and-player.js +2296 -0
LICENSE.txt ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ <one line to give the program's name and a brief idea of what it does.>
294
+ Copyright (C) <year> <name of author>
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ <signature of Ty Coon>, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
README.txt ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === All in One Video Gallery ===
2
+ Plugin URI: https://plugins360.com
3
+ Contributors: plugins360
4
+ Donate link: https://plugins360.com
5
+ Tags: video, player, gallery, mp4, webm, ogv, youtube, vimeo, hls, live, stream, popup, carousel, slider
6
+ Requires at least: 4.4.0
7
+ Tested up to: 4.9
8
+ Requires PHP: 5.3.0
9
+ Stable tag: 1.0.0
10
+ License: GPLv2 or later
11
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
+
13
+ Responsive & Lightweight Video gallery plugin. HTML5 with FLASH fallbacks. Supports any browser & video formats such as MP4, WebM, OGV and embeddable players like YouTube, Vimeo, etc.
14
+
15
+ == Description ==
16
+
17
+ Add a single video or build a complete video gallery in minutes.
18
+
19
+ "All in One Video Gallery" is a lightweight responsive video gallery plugin. Supports any browser & video formats such as MP4, WebM, OGV and embeddable players like YouTube, Vimeo, etc. Works with ANY properly coded WordPress theme and you can use it on new or existing site.
20
+
21
+ **Links**
22
+
23
+ * [WordPress Video Gallery Plugin](https://plugins360.com) - official site.
24
+ * [View Demo](https://demo.plugins360.com/) - see plugin frontend.
25
+ * [Documentation](https://plugins360.com/documentation/) - mainly for users.
26
+
27
+ **Key Features**
28
+
29
+ * Modern, Responsive design.
30
+ * Unlimited Categories.
31
+ * Unlimited Videos.
32
+ * Thumbnail Gallery (you can select how many rows, columns to display and pagination).
33
+ * Beautiful HTML5 Player with FLASH fallback.
34
+ * Supported Formats: MP4, WebM, OGV and embeddable players like YouTube & Vimeo.
35
+ * Configure Player controls: playpause, timer, progressbar, duration, volume, fullscreen
36
+ * Configure Player properties: autoplay, loop, preload
37
+ * Video Subtitles.
38
+ * Comment on videos.
39
+ * Sharing of videos through Facebook, Twitter, Google Plus, Linkedin & Pinterest.
40
+ * Search videos by title, description or category.
41
+ * Widgets to list categories, videos, display a video player with a selective video and to search videos.
42
+ * Detailed user and developer documentation.
43
+
44
+ **Translations**
45
+
46
+ This is a brand new plugin and currently available only in English. But, the plugin is translation ready and you can translate [All in One Video Gallery](https://plugins360.com/documentation/translate/) to your language on [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/all-in-one-video-gallery).
47
+
48
+ **Get Involved**
49
+
50
+ * Wording - I am not a native English speaker, if you find any typo, grammer mistake or etc. please [report](https://plugins360.com/support/) on our website.
51
+ * Translation - If you have translated the plugin to your language, feel free to submit translation.
52
+ * Rate Plugin - If you find this plugin useful, please leave a [positive review](https://wordpress.org/support/plugin/all-in-one-video-gallery/reviews/).
53
+ * Submit a Bug - If you find any issue, please [submit a bug](https://plugins360.com/support/) on our website.
54
+
55
+ == Installation ==
56
+
57
+ 1. Download the plugin.
58
+ 2. From the WordPress Admin Panel, click on Plugins => Add New.
59
+ 3. Click on Upload, so you can directly upload your plugin zip file.
60
+ 4. Use the browse button to select the plugin zip file that was downloaded, and then click on Install Now.
61
+ 5. Once installed, click "Activate".
62
+
63
+ For more detailed instructions visit plugin [documentation](https://plugins360.com/documentation/)
64
+
65
+ == Frequently Asked Questions ==
66
+
67
+ = I have a problem what now? =
68
+ Please describe your issue and submit a ticket on our plugin support forum, you should receive reply within 24 hours (except Sunday).
69
+
70
+ = Getting a 404 error? =
71
+ Most likely rewrite rules were not registered properly for some reason. Go to "wp-admin => Settings => Permalinks" panel and click "Save Changes" button without actually changing anything, this should reset router and fix URLs.
72
+
73
+ == Screenshots ==
74
+
75
+ 1. All Categories [aiovg_categories].
76
+ 2. Videos list [aiovg_videos] displayed as a grid (you can select how many columns to display).
77
+ 3. Video details page.
78
+ 4. Videos list in wp-admin panel.
79
+ 5. Video edit page in wp-admin panel.
80
+ 6. Category edit page with image select.
81
+ 7. Plugin Settings.
82
+
83
+ == Changelog ==
84
+
85
+ = 1.0.0 =
86
+
87
+ * Initial release.
88
+
89
+ == Upgrade Notice ==
90
+
91
+ = 1.0.0 =
92
+
93
+ * Initial release.
admin/assets/css/aiovg-admin.css ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*----------------------------------------------------------------------------------------------
2
+ *
3
+ * Global
4
+ *
5
+ *--------------------------------------------------------------------------------------------*/
6
+ .aiovg-no-border {
7
+ border: 0 none;
8
+ }
9
+
10
+ .aiovg-toggle-fields {
11
+ display: none;
12
+ }
13
+
14
+ .aiovg-checklist {
15
+ max-height: 100px;
16
+ padding: 7px 10px;
17
+ border: 1px solid #ddd;
18
+ box-sizing: border-box;
19
+ overflow-y: scroll;
20
+ }
21
+
22
+ .aiovg-checklist li {
23
+ margin: 0;
24
+ }
25
+
26
+ .aiovg-checklist .children li {
27
+ padding: 0 18px;
28
+ }
29
+
30
+ .aiovg-checklist label {
31
+ display: block;
32
+ line-height: 22px;
33
+ }
34
+
35
+ .aiovg-pipe-separator {
36
+ padding: 7px 0;
37
+ color: #CCC;
38
+ }
39
+
40
+ .aiovg-tick-cross {
41
+ display: inline-block;
42
+ width: 40px;
43
+ text-align: center;
44
+ }
45
+
46
+ @media (max-width: 767px) {
47
+ .aiovg-hidden-xs {
48
+ display: none !important;
49
+ }
50
+ }
51
+
52
+ @media (min-width: 768px) and (max-width: 991px) {
53
+ .aiovg-hidden-sm {
54
+ display: none !important;
55
+ }
56
+ }
57
+
58
+ @media (min-width: 992px) and (max-width: 1199px) {
59
+ .aiovg-hidden-md {
60
+ display: none !important;
61
+ }
62
+ }
63
+
64
+ @media (min-width: 1200px) {
65
+ .aiovg-hidden-lg {
66
+ display: none !important;
67
+ }
68
+ }
69
+
70
+ /*----------------------------------------------------------------------------------------------
71
+ *
72
+ * Welcome
73
+ *
74
+ *--------------------------------------------------------------------------------------------*/
75
+ #aiovg-welcome .aiovg-badge {
76
+ background: #0073aa url('../images/logo.png') no-repeat center;
77
+ }
78
+
79
+ /*----------------------------------------------------------------------------------------------
80
+ *
81
+ * Videos
82
+ *
83
+ *--------------------------------------------------------------------------------------------*/
84
+ .misc-pub-aiovg-shortcode label,
85
+ .misc-pub-aiovg-shortcode strong {
86
+ display: block;
87
+ margin-bottom: 7px;
88
+ }
89
+
90
+ table.aiovg-table {
91
+ background: #FFF;
92
+ border: 0 none;
93
+ }
94
+
95
+ table.aiovg-table td {
96
+ padding: 13px 15px;
97
+ border-top: 0 none;
98
+ border-bottom: 1px solid #F5F5F5;
99
+ }
100
+
101
+ table.aiovg-table td.label {
102
+ width: 15%;
103
+ background: #F9F9F9;
104
+ border-right: 1px solid #E1E1E1;
105
+ border-bottom: 1px solid #F0F0F0;
106
+ text-align: center;
107
+ vertical-align: middle;
108
+ }
109
+
110
+ table.aiovg-table label {
111
+ display: block;
112
+ margin: 0 0 3px;
113
+ padding: 0;
114
+ color: #333;
115
+ font-size: 13px;
116
+ line-height: 1.4em;
117
+ }
118
+
119
+ table.aiovg-table span.required {
120
+ display: inline;
121
+ margin-left: 3px;
122
+ color: #F00;
123
+ }
124
+
125
+ table.aiovg-table td.label p {
126
+ display: block;
127
+ margin: 3px 0 0 !important;
128
+ padding: 0 !important;
129
+ color: #899194;
130
+ font-size: 12px;
131
+ font-style: normal;
132
+ line-height: 16px;
133
+ }
134
+
135
+ table.aiovg-table input[type="text"],
136
+ table.aiovg-table textarea,
137
+ table.aiovg-table select {
138
+ width: 99.95%;
139
+ padding: 3px 5px;
140
+ outline: none;
141
+ }
142
+
143
+ table.aiovg-table input[type="text"]:focus,
144
+ table.aiovg-table textarea:focus,
145
+ table.aiovg-table select:focus {
146
+ border-color: #98B6CB;
147
+ }
148
+
149
+ table.aiovg-table input::placeholder,
150
+ table.aiovg-table textarea::placeholder {
151
+ color: #BBB;
152
+ }
153
+
154
+ table.aiovg-table .aiovg-input-wrap {
155
+ position: relative;
156
+ overflow: hidden;
157
+ }
158
+
159
+ table.aiovg-table .aiovg-input-wrap input[type="text"] {
160
+ height: 29px;
161
+ margin: 0;
162
+ }
163
+
164
+ table.aiovg-table select {
165
+ padding: 2px;
166
+ }
167
+
168
+ table.aiovg-table option {
169
+ padding: 3px;
170
+ }
171
+
172
+ table.aiovg-table .aiovg-handle {
173
+ color: #999;
174
+ vertical-align: middle;
175
+ cursor: move;
176
+ }
177
+
178
+ .aiovg-radio-list,
179
+ .aiovg-checkbox-list {
180
+ position: relative;
181
+ display: block;
182
+ background: transparent !important;
183
+ margin: 0;
184
+ padding: 1px;
185
+ }
186
+
187
+ .aiovg-radio-list.horizontal,
188
+ .aiovg-checkbox-list.horizontal {
189
+ overflow: hidden;
190
+ }
191
+
192
+ .aiovg-radio-list.horizontal li,
193
+ .aiovg-checkbox-list.horizontal li {
194
+ float: left;
195
+ margin-right: 20px;
196
+ }
197
+
198
+ .aiovg-radio-list input,
199
+ .aiovg-checkbox-list input {
200
+ margin-top: -1px;
201
+ margin-right: 5px !important;
202
+ }
203
+
204
+ @media (max-width: 767px) {
205
+ table.aiovg-table .aiovg-media-uploader input[type="text"] {
206
+ width: 100%;
207
+ }
208
+
209
+ table.aiovg-table .aiovg-media-uploader .button {
210
+ width: 100%;
211
+ margin-top: 10px;
212
+ text-align: center;
213
+ }
214
+
215
+ .aiovg-tracks-row td {
216
+ display: block !important;
217
+ border-bottom: none !important;
218
+ }
219
+ }
220
+
221
+ @media (min-width: 768px) {
222
+ table.aiovg-table .aiovg-media-uploader input[type="text"] {
223
+ width: 75%;
224
+ }
225
+ }
226
+
227
+ /*----------------------------------------------------------------------------------------------
228
+ *
229
+ * Categories
230
+ *
231
+ *--------------------------------------------------------------------------------------------*/
232
+ #aiovg-categories-image-wrapper img {
233
+ max-width: 200px;
234
+ }
235
+
236
+ /*----------------------------------------------------------------------------------------------
237
+ *
238
+ * Settings
239
+ *
240
+ *--------------------------------------------------------------------------------------------*/
241
+ .aiovg-settings h2 {
242
+ margin-top: 2em;
243
+ padding-bottom: 10px;
244
+ border-bottom: 1px dashed #CCC;
245
+ }
246
+
247
+ .aiovg-settings .search {
248
+ background-color: transparent;
249
+ }
250
+
251
+ /*----------------------------------------------------------------------------------------------
252
+ *
253
+ * Shortcode Builder
254
+ *
255
+ *--------------------------------------------------------------------------------------------*/
256
+ #aiovg-media-button .dashicons:before {
257
+ color: #FFF;
258
+ }
259
+
260
+ #aiovg-shortcode-builder {
261
+ position: relative;
262
+ width: auto;
263
+ max-width: 500px;
264
+ margin: 32px auto;
265
+ padding: 20px;
266
+ background: #FFF;
267
+ }
268
+
269
+ #aiovg-shortcode .aiovg-shortcode-selector,
270
+ #aiovg-shortcode .aiovg-shortcode-field {
271
+ margin-bottom: 10px;
272
+ }
273
+
274
+ #aiovg-shortcode label {
275
+ display: block;
276
+ margin-bottom: 5px;
277
+ }
278
+
279
+ #aiovg-shortcode label.selectit {
280
+ margin-bottom: 0;
281
+ }
admin/assets/css/index.html ADDED
@@ -0,0 +1 @@
 
1
+ <!DOCTYPE html><title></title>
admin/assets/images/index.html ADDED
@@ -0,0 +1 @@
 
1
+ <!DOCTYPE html><title></title>
admin/assets/images/logo.png ADDED
Binary file
admin/assets/index.html ADDED
@@ -0,0 +1 @@
 
1
+ <!DOCTYPE html><title></title>
admin/assets/js/aiovg-admin.js ADDED
@@ -0,0 +1,330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $ ) {
2
+ 'use strict';
3
+
4
+ /**
5
+ * Display the media uploader.
6
+ *
7
+ * @since 1.0.0
8
+ */
9
+ function aiovg_render_media_uploader( $elem, form ) {
10
+
11
+ var file_frame, attachment;
12
+
13
+ // If an instance of file_frame already exists, then we can open it rather than creating a new instance
14
+ if ( file_frame ) {
15
+ file_frame.open();
16
+ return;
17
+ };
18
+
19
+ // Use the wp.media library to define the settings of the media uploader
20
+ file_frame = wp.media.frames.file_frame = wp.media({
21
+ frame: 'post',
22
+ state: 'insert',
23
+ multiple: false
24
+ });
25
+
26
+ // Setup an event handler for what to do when a media has been selected
27
+ file_frame.on( 'insert', function() {
28
+
29
+ // Read the JSON data returned from the media uploader
30
+ attachment = file_frame.state().get( 'selection' ).first().toJSON();
31
+
32
+ // First, make sure that we have the URL of the media to display
33
+ if ( 0 > $.trim( attachment.url.length ) ) {
34
+ return;
35
+ };
36
+
37
+ // Set the data
38
+ switch ( form ) {
39
+ case 'videos':
40
+ var id = $elem.data( 'format' );
41
+ $( '#aiovg-' + id ).val( attachment.url );
42
+ break;
43
+ case 'tracks':
44
+ var id = $elem.closest( 'tr' ).find( '.aiovg-track-src' ).attr( 'id' );
45
+ $( '#' + id ).val( attachment.url );
46
+ break;
47
+ case 'categories':
48
+ $( '#aiovg-categories-image-id' ).val( attachment.id );
49
+ $( '#aiovg-categories-image-wrapper' ).html( '<img src="' + attachment.url + '" />' );
50
+
51
+ $( '#aiovg-categories-upload-image' ).hide();
52
+ $( '#aiovg-categories-remove-image' ).show();
53
+ break;
54
+ case 'settings':
55
+ $elem.prev( '.aiovg-url' ).val( attachment.url );
56
+ break;
57
+ };
58
+
59
+ });
60
+
61
+ // Now display the actual file_frame
62
+ file_frame.open();
63
+
64
+ };
65
+
66
+ /**
67
+ * Make tracks inside the video form sortable.
68
+ *
69
+ * @since 1.0.0
70
+ */
71
+ function aiovg_sort_tracks() {
72
+
73
+ var $sortable_element = $( '#aiovg-tracks tbody' );
74
+
75
+ if ( $sortable_element.hasClass( 'ui-sortable' ) ) {
76
+ $sortable_element.sortable( 'destroy' );
77
+ };
78
+
79
+ $sortable_element.sortable({
80
+ handle: '.aiovg-handle'
81
+ });
82
+
83
+ };
84
+
85
+ /**
86
+ * Called when the page has loaded.
87
+ *
88
+ * @since 1.0.0
89
+ */
90
+ $(function() {
91
+
92
+ // Admin: Dismiss admin notice
93
+ $( '#aiovg-admin-notice' ).on( 'click', '.notice-dismiss', function( e ) {
94
+
95
+ e.preventDefault();
96
+
97
+ var data = {
98
+ 'action': 'aiovg_dismiss_admin_notice',
99
+ 'security': $( '#aiovg-admin-notice' ).data( 'security' )
100
+ };
101
+
102
+ $.post( ajaxurl, data );
103
+
104
+ });
105
+
106
+ // Videos: Show or Hide fields basd on the selected video source type
107
+ $( '#aiovg-video-type' ).on( 'change', function( e ) {
108
+
109
+ e.preventDefault();
110
+
111
+ var type = $( this ).val();
112
+
113
+ $( '.aiovg-toggle-fields' ).hide();
114
+ $( '.aiovg-type-'+type ).show( 300 );
115
+
116
+ if ( 'default' == type ) {
117
+ $( '#aiovg-has-webm, #aiovg-has-ogv' ).trigger( 'change' );
118
+ }
119
+
120
+ }).trigger( 'change' );
121
+
122
+ // Videos: Show or Hide WebM fields
123
+ $( '#aiovg-has-webm' ).on( 'change', function( e ) {
124
+
125
+ e.preventDefault();
126
+
127
+ if ( $( this ).is( ':checked' ) ) {
128
+ $( '#aiovg-field-webm' ).show( 300 );
129
+ } else {
130
+ $( '#aiovg-field-webm' ).hide( 300 );
131
+ }
132
+
133
+ }).trigger( 'change' );
134
+
135
+ // Videos: Show or Hide OGV fields
136
+ $( '#aiovg-has-ogv' ).on( 'change', function( e ) {
137
+
138
+ e.preventDefault();
139
+
140
+ if ( $( this ).is( ':checked' ) ) {
141
+ $( '#aiovg-field-ogv' ).show( 300 );
142
+ } else {
143
+ $( '#aiovg-field-ogv' ).hide( 300 );
144
+ }
145
+
146
+ }).trigger( 'change' );
147
+
148
+ // Videos: Display the media uploader when "Upload Media" button clicked
149
+ $( '.aiovg-upload-media' ).on( 'click', function( e ) {
150
+
151
+ e.preventDefault();
152
+ aiovg_render_media_uploader( $( this ), 'videos' );
153
+
154
+ });
155
+
156
+ // Videos: Add new subtitle fields when "Add New File" button clicked
157
+ $( '#aiovg-add-new-track' ).on( 'click', function( e ) {
158
+
159
+ e.preventDefault();
160
+
161
+ var id = $( '.aiovg-tracks-row', '#aiovg-tracks' ).length;
162
+
163
+ var $row = $( '#aiovg-tracks-clone' ).find( 'tr' ).clone();
164
+ $row.find( '.aiovg-track-src' ).attr( 'id', 'aiovg-track-'+id );
165
+
166
+ $( '#aiovg-tracks' ).append( $row );
167
+
168
+ });
169
+
170
+ if( ! $( '.aiovg-tracks-row', '#aiovg-tracks' ).length ) {
171
+ $( '#aiovg-add-new-track' ).trigger( 'click' );
172
+ }
173
+
174
+ // Videos: Display the media uploader for adding subtitles when "Upload File" button clicked
175
+ $( 'body' ).on( 'click', '.aiovg-upload-track', function( e ) {
176
+
177
+ e.preventDefault();
178
+ aiovg_render_media_uploader( $( this ), 'tracks' );
179
+
180
+ });
181
+
182
+ // Videos: Delete a subtitles fields set when "Delete" button clicked
183
+ $( 'body' ).on( 'click', '.aiovg-delete-track', function( e ) {
184
+
185
+ e.preventDefault();
186
+ $( this ).closest( 'tr' ).remove();
187
+
188
+ });
189
+
190
+ // Videos: Make the subtitles fields sortable
191
+ aiovg_sort_tracks();
192
+
193
+ // Categories: Display the media uploader when "Add Image" button clicked
194
+ $( '#aiovg-categories-upload-image' ).on( 'click', function( e ) {
195
+
196
+ e.preventDefault();
197
+ aiovg_render_media_uploader( $( this ), 'categories' );
198
+
199
+ });
200
+
201
+ // Categories: Delete the image when "Remove Image" button clicked
202
+ $( '#aiovg-categories-remove-image' ).on( 'click', function( e ) {
203
+
204
+ e.preventDefault();
205
+
206
+ var id = parseInt( $( '#aiovg-categories-image-id' ).val() );
207
+
208
+ if ( id > 0 ) {
209
+
210
+ var data = {
211
+ 'action': 'aiovg_delete_category_image',
212
+ 'attachment_id': id,
213
+ 'security': $( '#aiovg_category_image_nonce' ).val()
214
+ };
215
+
216
+ $.post( ajaxurl, data, function(response) {
217
+ $( '#aiovg-categories-image-id' ).val( '' );
218
+ $( '#aiovg-categories-image-wrapper' ).html( '' );
219
+
220
+ $( '#aiovg-categories-remove-image' ).hide();
221
+ $( '#aiovg-categories-upload-image' ).show();
222
+ });
223
+
224
+ };
225
+
226
+ });
227
+
228
+ // Categories: Clear the image field after a category was created
229
+ $( document ).ajaxComplete(function( e, xhr, settings ) {
230
+
231
+ if ( $( "#aiovg-categories-image-id" ).length ) {
232
+
233
+ var queryStringArr = settings.data.split( '&' );
234
+
235
+ if ( -1 !== $.inArray( 'action=add-tag', queryStringArr ) ) {
236
+ var xml = xhr.responseXML;
237
+ var response = $( xml ).find( 'term_id' ).text();
238
+ if ( '' != response ) {
239
+ $( '#aiovg-categories-image-id' ).val( '' );
240
+ $( '#aiovg-categories-image-wrapper' ).html( '' );
241
+
242
+ $( '#aiovg-categories-remove-image' ).hide();
243
+ $( '#aiovg-categories-upload-image' ).show();
244
+ };
245
+ };
246
+
247
+ };
248
+
249
+ });
250
+
251
+ // Settings: Initiate color picker
252
+ $( '.aiovg-color-picker-field', '#aiovg-settings' ).wpColorPicker();
253
+
254
+ // Settings: Browse button
255
+ $( '.aiovg-browse', '#aiovg-settings' ).on( 'click', function( e ) {
256
+
257
+ e.preventDefault();
258
+ aiovg_render_media_uploader( $( this ), 'settings' );
259
+
260
+ });
261
+
262
+ // Shortcode: Initialize popup
263
+ $( '#aiovg-media-button' ).magnificPopup({
264
+ type: 'inline'
265
+ });
266
+
267
+ // Shortcode: Show or Hide fields basd on the selected shortcode type
268
+ $( '#aiovg-shortcode-type' ).on( 'change', function( e ) {
269
+
270
+ e.preventDefault();
271
+
272
+ var type = $( this ).val();
273
+
274
+ $( '.aiovg-shortcode-field' ).hide();
275
+ $( '.aiovg-shortcode-type-' + type ).fadeIn();
276
+
277
+ }).trigger( 'change' );
278
+
279
+ // Shortcode: Insert shortcode
280
+ $( '#aiovg-insert-shortcode' ).on( 'click', function( e ) {
281
+
282
+ e.preventDefault();
283
+
284
+ var shortcode = $( '#aiovg-shortcode-type' ).val();
285
+ var attrs = '';
286
+
287
+ $( '.aiovg-shortcode-type-' + shortcode ).each(function() {
288
+
289
+ var $elem = $( this ).find( '.aiovg-shortcode-input' );
290
+
291
+ if ( $elem.length ) {
292
+ var type = $elem.attr( 'type' );
293
+ var id = $elem.attr( 'id' );
294
+ var name = id.replace( 'aiovg-shortcode-' + shortcode + '-', '' );
295
+ var def = $elem.data( 'default' );
296
+ var value = $elem.val();
297
+
298
+ if ( 'category' == name ) {
299
+ value = $( 'input[type="checkbox"]:checked', $elem ).map(function() {
300
+ return this.value;
301
+ }).get().join( "," );
302
+ }
303
+
304
+ if ( 'checkbox' == type ) {
305
+ value = $elem.is( ':checked' ) ? 1 : 0;
306
+ }
307
+
308
+ if ( value != def ) {
309
+ attrs += ( ' ' + name + '="' + value + '"' );
310
+ }
311
+ }
312
+
313
+ });
314
+
315
+ window.send_to_editor( '[aiovg_' + shortcode + attrs + ']' );
316
+ $.magnificPopup.close();
317
+
318
+ }).trigger( 'change' );
319
+
320
+ // Shortcode: Close shortcode builder
321
+ $( '#aiovg-cancel-shortcode-insert' ).on( 'click', function( e ) {
322
+
323
+ e.preventDefault();
324
+ $.magnificPopup.close();
325
+
326
+ });
327
+
328
+ });
329
+
330
+ })( jQuery );
admin/assets/js/index.html ADDED
@@ -0,0 +1 @@
 
1
+ <!DOCTYPE html><title></title>
admin/class-aiovg-admin-categories.php ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Categories
5
+ *
6
+ * @link https://plugins360.com
7
+ * @since 1.0.0
8
+ *
9
+ * @package AIOVG
10
+ * @subpackage AIOVG/admin
11
+ */
12
+
13
+ // Exit if accessed directly
14
+ if ( ! defined( 'WPINC' ) ) {
15
+ die;
16
+ }
17
+
18
+ /**
19
+ * AIOVG_Admin_Categories class.
20
+ *
21
+ * @since 1.0.0
22
+ */
23
+ class AIOVG_Admin_Categories {
24
+
25
+ /**
26
+ * Register the custom taxonomy "aiovg_categories".
27
+ *
28
+ * @since 1.0.0
29
+ */
30
+ public function register_taxonomy() {
31
+
32
+ $labels = array(
33
+ 'name' => _x( 'Categories', 'Taxonomy General Name', 'all-in-one-video-gallery' ),
34
+ 'singular_name' => _x( 'Category', 'Taxonomy Singular Name', 'all-in-one-video-gallery' ),
35
+ 'menu_name' => __( 'Categories', 'all-in-one-video-gallery' ),
36
+ 'all_items' => __( 'All Categories', 'all-in-one-video-gallery' ),
37
+ 'parent_item' => __( 'Parent Category', 'all-in-one-video-gallery' ),
38
+ 'parent_item_colon' => __( 'Parent Category:', 'all-in-one-video-gallery' ),
39
+ 'new_item_name' => __( 'New Category Name', 'all-in-one-video-gallery' ),
40
+ 'add_new_item' => __( 'Add New Category', 'all-in-one-video-gallery' ),
41
+ 'edit_item' => __( 'Edit Category', 'all-in-one-video-gallery' ),
42
+ 'update_item' => __( 'Update Category', 'all-in-one-video-gallery' ),
43
+ 'view_item' => __( 'View Category', 'all-in-one-video-gallery' ),
44
+ 'separate_items_with_commas' => __( 'Separate categories with commas', 'all-in-one-video-gallery' ),
45
+ 'add_or_remove_items' => __( 'Add or remove categories', 'all-in-one-video-gallery' ),
46
+ 'choose_from_most_used' => __( 'Choose from the most used', 'all-in-one-video-gallery' ),
47
+ 'popular_items' => __( 'Popular Categories', 'all-in-one-video-gallery' ),
48
+ 'search_items' => __( 'Search Categories', 'all-in-one-video-gallery' ),
49
+ 'not_found' => __( 'Not Found', 'all-in-one-video-gallery' ),
50
+ 'no_terms' => __( 'No categories', 'all-in-one-video-gallery' ),
51
+ 'items_list' => __( 'Categories list', 'all-in-one-video-gallery' ),
52
+ 'items_list_navigation' => __( 'Categories list navigation', 'all-in-one-video-gallery' ),
53
+ );
54
+
55
+ $args = array(
56
+ 'labels' => $labels,
57
+ 'hierarchical' => true,
58
+ 'public' => true,
59
+ 'show_ui' => true,
60
+ 'show_admin_column' => true,
61
+ 'show_in_nav_menus' => true,
62
+ 'show_tagcloud' => false,
63
+ 'capabilities' => array(
64
+ 'manage_terms' => 'manage_aiovg_options',
65
+ 'edit_terms' => 'manage_aiovg_options',
66
+ 'delete_terms' => 'manage_aiovg_options',
67
+ 'assign_terms' => 'edit_aiovg_videos'
68
+ )
69
+ );
70
+
71
+ register_taxonomy( 'aiovg_categories', array( 'aiovg_videos' ), $args );
72
+
73
+ }
74
+
75
+ /**
76
+ * Add image field.
77
+ *
78
+ * @since 1.0.0
79
+ */
80
+ public function add_image_field() {
81
+
82
+ $form = 'add';
83
+ require_once AIOVG_PLUGIN_DIR . 'admin/templates/category-image.php';
84
+
85
+ }
86
+
87
+ /**
88
+ * Edit image field.
89
+ *
90
+ * @since 1.0.0
91
+ * @param object $term Taxonomy term object.
92
+ */
93
+ public function edit_image_field( $term ) {
94
+
95
+ $form = 'edit';
96
+
97
+ $image_id = get_term_meta( $term->term_id, 'image_id', true );
98
+ $image_url = $image_id ? wp_get_attachment_url( (int) $image_id ) : '';
99
+
100
+ require_once AIOVG_PLUGIN_DIR . 'admin/templates/category-image.php';
101
+
102
+ }
103
+
104
+ /**
105
+ * Save the image field.
106
+ *
107
+ * @since 1.0.0
108
+ * @param int $term_id Term ID.
109
+ */
110
+ public function save_image_field( $term_id ) {
111
+
112
+ // Check if "aiovg_category_image_nonce" nonce is set
113
+ if ( isset( $_POST['aiovg_category_image_nonce'] ) ) {
114
+
115
+ // Verify that the nonce is valid
116
+ if ( wp_verify_nonce( $_POST['aiovg_category_image_nonce'], 'aiovg_process_category_image' ) ) {
117
+
118
+ // OK to save meta data
119
+ $image_id = isset( $_POST['image_id'] ) ? (int) $_POST['image_id'] : 0;
120
+ update_term_meta( $term_id, 'image_id', $image_id );
121
+
122
+ }
123
+
124
+ }
125
+
126
+ }
127
+
128
+ /**
129
+ * Retrieve the table columns.
130
+ *
131
+ * @since 1.0.0
132
+ * @param array $columns Array of default table columns.
133
+ * @return array $columns Updated list of table columns.
134
+ */
135
+ public function get_columns( $columns ) {
136
+
137
+ $columns['tax_id'] = __( 'ID', 'all-in-one-video-gallery' );
138
+ return $columns;
139
+
140
+ }
141
+
142
+ /**
143
+ * This function renders the custom columns in the list table.
144
+ *
145
+ * @since 1.0.0
146
+ * @param string $content Content of the column.
147
+ * @param string $column Name of the column.
148
+ * @param string $term_id Term ID.
149
+ */
150
+ public function custom_column_content( $content, $column, $term_id ) {
151
+
152
+ if ( 'tax_id' == $column ) {
153
+ $content = $term_id;
154
+ }
155
+
156
+ return $content;
157
+
158
+ }
159
+
160
+ /**
161
+ * Delete attachments.
162
+ *
163
+ * @since 1.0.0
164
+ * @param int $term_id Term ID.
165
+ * @param string $taxonomy Taxonomy Name.
166
+ */
167
+ public function pre_delete_term( $term_id, $taxonomy ) {
168
+
169
+ if ( 'aiovg_categories' != $taxonomy ) {
170
+ return;
171
+ }
172
+
173
+ aiovg_delete_category_attachments( $term_id );
174
+
175
+ }
176
+
177
+ /**
178
+ * Delete category image.
179
+ *
180
+ * @since 1.0.0
181
+ */
182
+ public function ajax_callback_delete_category_image() {
183
+
184
+ check_ajax_referer( 'aiovg_process_category_image', 'security' );
185
+
186
+ if ( isset( $_POST['attachment_id'] ) ) {
187
+ wp_delete_attachment( (int) $_POST['attachment_id'], true );
188
+ }
189
+
190
+ wp_die();
191
+
192
+ }
193
+
194
+ }
admin/class-aiovg-admin-settings.php ADDED
@@ -0,0 +1,958 @@