Version Description
- New: Gutenberg blocks for the plugin.
- New: Support for Yoast SEO Plugin.
- Fix: [+] few minor bug fixes.
Download this release
Release Info
Developer | plugins360 |
Plugin | ![]() |
Version | 1.5.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.5 to 1.5.6
- README.txt +14 -2
- admin/class-aiovg-admin-categories.php +1 -0
- admin/class-aiovg-admin-videos.php +1 -0
- all-in-one-video-gallery.php +3 -2
- blocks/.editorconfig +21 -0
- blocks/.eslintignore +9 -0
- blocks/.eslintrc.json +192 -0
- blocks/class-aiovg-blocks.php +438 -0
- blocks/dist/blocks.build.js +1 -0
- blocks/dist/blocks.editor.build.css +13 -0
- blocks/dist/blocks.style.build.css +12 -0
- blocks/dist/index.html +1 -0
- blocks/index.html +1 -0
- blocks/package-lock.json +6855 -0
- blocks/package.json +13 -0
- blocks/src/blocks.js +8 -0
- blocks/src/blocks/categories/edit.js +177 -0
- blocks/src/blocks/categories/index.html +1 -0
- blocks/src/blocks/categories/index.js +68 -0
- blocks/src/blocks/index.html +1 -0
- blocks/src/blocks/search/edit.js +90 -0
- blocks/src/blocks/search/index.html +1 -0
- blocks/src/blocks/search/index.js +48 -0
- blocks/src/blocks/video/edit.js +272 -0
- blocks/src/blocks/video/index.html +1 -0
- blocks/src/blocks/video/index.js +86 -0
- blocks/src/blocks/videos/edit.js +245 -0
- blocks/src/blocks/videos/index.html +1 -0
- blocks/src/blocks/videos/index.js +99 -0
- blocks/src/common.scss +6 -0
- blocks/src/index.html +1 -0
- blocks/src/utils/helper.js +46 -0
- blocks/src/utils/index.html +1 -0
- includes/class-aiovg.php +38 -9
- includes/functions.php +24 -1
- public/assets/css/bootstrap.css +0 -2
- public/class-aiovg-public-categories.php +4 -0
- public/class-aiovg-public.php +251 -18
- public/templates/player.php +2 -2
README.txt
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
Plugin URI: https://plugins360.com/all-in-one-video-gallery/
|
3 |
Contributors: plugins360
|
4 |
Donate link: https://plugins360.com
|
5 |
-
Tags: video, player, gallery, logo, watermark, gdpr, mp4, webm, ogv, youtube, vimeo, dailymotion, hls, dash, adaptive, 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.5.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -84,6 +84,12 @@ Most likely rewrite rules were not registered properly for some reason. Go to "W
|
|
84 |
|
85 |
== Changelog ==
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
= 1.5.5 =
|
88 |
|
89 |
* Fix: Pagination issue in single video pages.
|
@@ -136,6 +142,12 @@ Most likely rewrite rules were not registered properly for some reason. Go to "W
|
|
136 |
|
137 |
== Upgrade Notice ==
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
= 1.5.5 =
|
140 |
|
141 |
* Fix: Pagination issue in single video pages.
|
2 |
Plugin URI: https://plugins360.com/all-in-one-video-gallery/
|
3 |
Contributors: plugins360
|
4 |
Donate link: https://plugins360.com
|
5 |
+
Tags: gutenberg, video, player, gallery, logo, watermark, gdpr, mp4, webm, ogv, youtube, vimeo, dailymotion, hls, dash, adaptive, 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.5.6
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 1.5.6 =
|
88 |
+
|
89 |
+
* New: Gutenberg blocks for the plugin.
|
90 |
+
* New: Support for Yoast SEO Plugin.
|
91 |
+
* Fix: [+] few minor bug fixes.
|
92 |
+
|
93 |
= 1.5.5 =
|
94 |
|
95 |
* Fix: Pagination issue in single video pages.
|
142 |
|
143 |
== Upgrade Notice ==
|
144 |
|
145 |
+
= 1.5.6 =
|
146 |
+
|
147 |
+
* New: Gutenberg blocks for the plugin.
|
148 |
+
* New: Support for Yoast SEO Plugin.
|
149 |
+
* Fix: [+] few minor bug fixes.
|
150 |
+
|
151 |
= 1.5.5 =
|
152 |
|
153 |
* Fix: Pagination issue in single video pages.
|
admin/class-aiovg-admin-categories.php
CHANGED
@@ -59,6 +59,7 @@ class AIOVG_Admin_Categories {
|
|
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',
|
59 |
'show_ui' => true,
|
60 |
'show_admin_column' => true,
|
61 |
'show_in_nav_menus' => true,
|
62 |
+
'show_in_rest' => true,
|
63 |
'show_tagcloud' => false,
|
64 |
'capabilities' => array(
|
65 |
'manage_terms' => 'manage_aiovg_options',
|
admin/class-aiovg-admin-videos.php
CHANGED
@@ -81,6 +81,7 @@ class AIOVG_Admin_Videos {
|
|
81 |
'menu_icon' => 'dashicons-playlist-video',
|
82 |
'show_in_admin_bar' => true,
|
83 |
'show_in_nav_menus' => true,
|
|
|
84 |
'can_export' => true,
|
85 |
'has_archive' => true,
|
86 |
'exclude_from_search' => false,
|
81 |
'menu_icon' => 'dashicons-playlist-video',
|
82 |
'show_in_admin_bar' => true,
|
83 |
'show_in_nav_menus' => true,
|
84 |
+
'show_in_rest' => false,
|
85 |
'can_export' => true,
|
86 |
'has_archive' => true,
|
87 |
'exclude_from_search' => false,
|
all-in-one-video-gallery.php
CHANGED
@@ -11,8 +11,9 @@
|
|
11 |
* Plugin Name: All-in-One Video Gallery
|
12 |
* Plugin URI: https://plugins360.com/all-in-one-video-gallery/
|
13 |
* Description: Responsive & Lightweight Video gallery plugin. No coding required. Add/Manage videos through a dedicated custom post interface, group them by categories, customize the front-end display using the shortcode builder as you need, provide the option for users to search videos, plus everything you will need to build a YouTube/Vimeo like video sharing website.
|
14 |
-
* Version: 1.5.
|
15 |
* Author: Team Plugins360
|
|
|
16 |
* License: GPL-2.0+
|
17 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
18 |
* Text Domain: all-in-one-video-gallery
|
@@ -26,7 +27,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
26 |
|
27 |
// The current version of the plugin
|
28 |
if ( ! defined( 'AIOVG_PLUGIN_VERSION' ) ) {
|
29 |
-
define( 'AIOVG_PLUGIN_VERSION', '1.5.
|
30 |
}
|
31 |
|
32 |
// The unique identifier of the plugin
|
11 |
* Plugin Name: All-in-One Video Gallery
|
12 |
* Plugin URI: https://plugins360.com/all-in-one-video-gallery/
|
13 |
* Description: Responsive & Lightweight Video gallery plugin. No coding required. Add/Manage videos through a dedicated custom post interface, group them by categories, customize the front-end display using the shortcode builder as you need, provide the option for users to search videos, plus everything you will need to build a YouTube/Vimeo like video sharing website.
|
14 |
+
* Version: 1.5.6
|
15 |
* Author: Team Plugins360
|
16 |
+
* Author URI: https://plugins360.com
|
17 |
* License: GPL-2.0+
|
18 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
19 |
* Text Domain: all-in-one-video-gallery
|
27 |
|
28 |
// The current version of the plugin
|
29 |
if ( ! defined( 'AIOVG_PLUGIN_VERSION' ) ) {
|
30 |
+
define( 'AIOVG_PLUGIN_VERSION', '1.5.6' );
|
31 |
}
|
32 |
|
33 |
// The unique identifier of the plugin
|
blocks/.editorconfig
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This file is for unifying the coding style for different editors and IDEs
|
2 |
+
# editorconfig.org
|
3 |
+
|
4 |
+
# WordPress Coding Standards
|
5 |
+
# https://make.wordpress.org/core/handbook/coding-standards/
|
6 |
+
|
7 |
+
root = true
|
8 |
+
|
9 |
+
[*]
|
10 |
+
charset = utf-8
|
11 |
+
end_of_line = lf
|
12 |
+
insert_final_newline = true
|
13 |
+
trim_trailing_whitespace = true
|
14 |
+
indent_style = tab
|
15 |
+
|
16 |
+
[*.yml]
|
17 |
+
indent_style = space
|
18 |
+
indent_size = 2
|
19 |
+
|
20 |
+
[*.md]
|
21 |
+
trim_trailing_whitespace = false
|
blocks/.eslintignore
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
**/*.min.js
|
2 |
+
**/*.build.js
|
3 |
+
**/node_modules/**
|
4 |
+
**/vendor/**
|
5 |
+
build
|
6 |
+
coverage
|
7 |
+
cypress
|
8 |
+
node_modules
|
9 |
+
vendor
|
blocks/.eslintrc.json
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"root": true,
|
3 |
+
"parser": "babel-eslint",
|
4 |
+
"extends": [
|
5 |
+
"wordpress",
|
6 |
+
"plugin:react/recommended",
|
7 |
+
"plugin:jsx-a11y/recommended",
|
8 |
+
"plugin:jest/recommended"
|
9 |
+
],
|
10 |
+
"env": {
|
11 |
+
"browser": false,
|
12 |
+
"es6": true,
|
13 |
+
"node": true,
|
14 |
+
"mocha": true,
|
15 |
+
"jest/globals": true
|
16 |
+
},
|
17 |
+
"parserOptions": {
|
18 |
+
"sourceType": "module",
|
19 |
+
"ecmaFeatures": {
|
20 |
+
"jsx": true
|
21 |
+
}
|
22 |
+
},
|
23 |
+
"globals": {
|
24 |
+
"wp": true,
|
25 |
+
"wpApiSettings": true,
|
26 |
+
"window": true,
|
27 |
+
"document": true
|
28 |
+
},
|
29 |
+
"plugins": ["react", "jsx-a11y", "jest"],
|
30 |
+
"settings": {
|
31 |
+
"react": {
|
32 |
+
"pragma": "wp"
|
33 |
+
}
|
34 |
+
},
|
35 |
+
"rules": {
|
36 |
+
"array-bracket-spacing": ["error", "always"],
|
37 |
+
"brace-style": ["error", "1tbs"],
|
38 |
+
"camelcase": ["error", { "properties": "never" }],
|
39 |
+
"comma-dangle": ["error", "always-multiline"],
|
40 |
+
"comma-spacing": "error",
|
41 |
+
"comma-style": "error",
|
42 |
+
"computed-property-spacing": ["error", "always"],
|
43 |
+
"constructor-super": "error",
|
44 |
+
"dot-notation": "error",
|
45 |
+
"eol-last": "error",
|
46 |
+
"eqeqeq": "error",
|
47 |
+
"func-call-spacing": "error",
|
48 |
+
"indent": ["error", "tab", { "SwitchCase": 1 }],
|
49 |
+
"jsx-a11y/label-has-for": [
|
50 |
+
"error",
|
51 |
+
{
|
52 |
+
"required": "id"
|
53 |
+
}
|
54 |
+
],
|
55 |
+
"jsx-a11y/media-has-caption": "off",
|
56 |
+
"jsx-a11y/no-noninteractive-tabindex": "off",
|
57 |
+
"jsx-a11y/role-has-required-aria-props": "off",
|
58 |
+
"jsx-quotes": "error",
|
59 |
+
"key-spacing": "error",
|
60 |
+
"keyword-spacing": "error",
|
61 |
+
"lines-around-comment": "off",
|
62 |
+
"no-alert": "error",
|
63 |
+
"no-bitwise": "error",
|
64 |
+
"no-caller": "error",
|
65 |
+
"no-console": "error",
|
66 |
+
"no-const-assign": "error",
|
67 |
+
"no-debugger": "error",
|
68 |
+
"no-dupe-args": "error",
|
69 |
+
"no-dupe-class-members": "error",
|
70 |
+
"no-dupe-keys": "error",
|
71 |
+
"no-duplicate-case": "error",
|
72 |
+
"no-duplicate-imports": "error",
|
73 |
+
"no-else-return": "error",
|
74 |
+
"no-eval": "error",
|
75 |
+
"no-extra-semi": "error",
|
76 |
+
"no-fallthrough": "error",
|
77 |
+
"no-lonely-if": "error",
|
78 |
+
"no-mixed-operators": "error",
|
79 |
+
"no-mixed-spaces-and-tabs": "error",
|
80 |
+
"no-multiple-empty-lines": ["error", { "max": 1 }],
|
81 |
+
"no-multi-spaces": "error",
|
82 |
+
"no-multi-str": "off",
|
83 |
+
"no-negated-in-lhs": "error",
|
84 |
+
"no-nested-ternary": "error",
|
85 |
+
"no-redeclare": "error",
|
86 |
+
"no-restricted-syntax": [
|
87 |
+
"error",
|
88 |
+
{
|
89 |
+
"selector":
|
90 |
+
"ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]",
|
91 |
+
"message": "Path access on WordPress dependencies is not allowed."
|
92 |
+
},
|
93 |
+
{
|
94 |
+
"selector": "ImportDeclaration[source.value=/^blocks$/]",
|
95 |
+
"message": "Use @wordpress/blocks as import path instead."
|
96 |
+
},
|
97 |
+
{
|
98 |
+
"selector": "ImportDeclaration[source.value=/^components$/]",
|
99 |
+
"message": "Use @wordpress/components as import path instead."
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"selector": "ImportDeclaration[source.value=/^date$/]",
|
103 |
+
"message": "Use @wordpress/date as import path instead."
|
104 |
+
},
|
105 |
+
{
|
106 |
+
"selector": "ImportDeclaration[source.value=/^editor$/]",
|
107 |
+
"message": "Use @wordpress/editor as import path instead."
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"selector": "ImportDeclaration[source.value=/^element$/]",
|
111 |
+
"message": "Use @wordpress/element as import path instead."
|
112 |
+
},
|
113 |
+
{
|
114 |
+
"selector": "ImportDeclaration[source.value=/^i18n$/]",
|
115 |
+
"message": "Use @wordpress/i18n as import path instead."
|
116 |
+
},
|
117 |
+
{
|
118 |
+
"selector": "ImportDeclaration[source.value=/^data$/]",
|
119 |
+
"message": "Use @wordpress/data as import path instead."
|
120 |
+
},
|
121 |
+
{
|
122 |
+
"selector": "ImportDeclaration[source.value=/^utils$/]",
|
123 |
+
"message": "Use @wordpress/utils as import path instead."
|
124 |
+
},
|
125 |
+
{
|
126 |
+
"selector":
|
127 |
+
"CallExpression[callee.name=/^__|_n|_x$/]:not([arguments.0.type=/^Literal|BinaryExpression$/])",
|
128 |
+
"message": "Translate function arguments must be string literals."
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"selector":
|
132 |
+
"CallExpression[callee.name=/^_n|_x$/]:not([arguments.1.type=/^Literal|BinaryExpression$/])",
|
133 |
+
"message": "Translate function arguments must be string literals."
|
134 |
+
},
|
135 |
+
{
|
136 |
+
"selector":
|
137 |
+
"CallExpression[callee.name=_nx]:not([arguments.2.type=/^Literal|BinaryExpression$/])",
|
138 |
+
"message": "Translate function arguments must be string literals."
|
139 |
+
}
|
140 |
+
],
|
141 |
+
"no-shadow": "error",
|
142 |
+
"no-undef": "error",
|
143 |
+
"no-undef-init": "error",
|
144 |
+
"no-unreachable": "error",
|
145 |
+
"no-unsafe-negation": "error",
|
146 |
+
"no-unused-expressions": "error",
|
147 |
+
"no-unused-vars": "error",
|
148 |
+
"no-useless-computed-key": "error",
|
149 |
+
"no-useless-constructor": "error",
|
150 |
+
"no-useless-return": "error",
|
151 |
+
"no-var": "error",
|
152 |
+
"no-whitespace-before-property": "error",
|
153 |
+
"object-curly-spacing": ["error", "always"],
|
154 |
+
"padded-blocks": ["error", "never"],
|
155 |
+
"prefer-const": "error",
|
156 |
+
"quote-props": ["error", "as-needed"],
|
157 |
+
"react/display-name": "off",
|
158 |
+
"react/jsx-curly-spacing": [
|
159 |
+
"error",
|
160 |
+
{
|
161 |
+
"when": "always",
|
162 |
+
"children": true
|
163 |
+
}
|
164 |
+
],
|
165 |
+
"react/jsx-equals-spacing": "error",
|
166 |
+
"react/jsx-indent": ["error", "tab"],
|
167 |
+
"react/jsx-indent-props": ["error", "tab"],
|
168 |
+
"react/jsx-key": "error",
|
169 |
+
"react/jsx-tag-spacing": "error",
|
170 |
+
"react/no-children-prop": "off",
|
171 |
+
"react/no-find-dom-node": "warn",
|
172 |
+
"react/prop-types": "off",
|
173 |
+
"semi": "error",
|
174 |
+
"semi-spacing": "error",
|
175 |
+
"space-before-blocks": ["error", "always"],
|
176 |
+
"space-before-function-paren": ["error", "never"],
|
177 |
+
"space-in-parens": ["error", "always"],
|
178 |
+
"space-infix-ops": ["error", { "int32Hint": false }],
|
179 |
+
"space-unary-ops": [
|
180 |
+
"error",
|
181 |
+
{
|
182 |
+
"overrides": {
|
183 |
+
"!": true
|
184 |
+
}
|
185 |
+
}
|
186 |
+
],
|
187 |
+
"template-curly-spacing": ["error", "always"],
|
188 |
+
"valid-jsdoc": ["error", { "requireReturn": false }],
|
189 |
+
"valid-typeof": "error",
|
190 |
+
"yoda": "off"
|
191 |
+
}
|
192 |
+
}
|
blocks/class-aiovg-blocks.php
ADDED
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Blocks Initializer.
|
5 |
+
*
|
6 |
+
* @link https://plugins360.com
|
7 |
+
* @since 1.5.6
|
8 |
+
*
|
9 |
+
* @package AIOVG
|
10 |
+
* @subpackage AIOVG/blocks
|
11 |
+
*/
|
12 |
+
|
13 |
+
// Exit if accessed directly
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* AIOVG_Blocks class.
|
20 |
+
*
|
21 |
+
* @since 1.5.6
|
22 |
+
*/
|
23 |
+
class AIOVG_Blocks {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Register our custom Gutenberg block category.
|
27 |
+
*
|
28 |
+
* @since 1.5.6
|
29 |
+
* @param array $categories Default Gutenberg block categories.
|
30 |
+
* @return array Modified Gutenberg block categories.
|
31 |
+
*/
|
32 |
+
public function block_categories( $categories ) {
|
33 |
+
|
34 |
+
return array_merge(
|
35 |
+
$categories,
|
36 |
+
array(
|
37 |
+
array(
|
38 |
+
'slug' => 'all-in-one-video-gallery',
|
39 |
+
'title' => __( 'All-in-One Video Gallery', 'all-in-one-video-gallery' ),
|
40 |
+
),
|
41 |
+
)
|
42 |
+
);
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Enqueue Gutenberg block assets for backend editor.
|
48 |
+
*
|
49 |
+
* @since 1.5.6
|
50 |
+
*/
|
51 |
+
public function enqueue_block_editor_assets() {
|
52 |
+
|
53 |
+
$categories_settings = get_option( 'aiovg_categories_settings' );
|
54 |
+
$videos_settings = get_option( 'aiovg_videos_settings' );
|
55 |
+
$player_settings = get_option( 'aiovg_player_settings' );
|
56 |
+
|
57 |
+
// Scripts
|
58 |
+
wp_enqueue_script(
|
59 |
+
'aiovg-guten-blocks-js',
|
60 |
+
plugins_url( '/blocks/dist/blocks.build.js', dirname( __FILE__ ) ),
|
61 |
+
array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
|
62 |
+
filemtime( plugin_dir_path( __DIR__ ) . 'blocks/dist/blocks.build.js' ),
|
63 |
+
true
|
64 |
+
);
|
65 |
+
|
66 |
+
wp_localize_script(
|
67 |
+
'aiovg-guten-blocks-js',
|
68 |
+
'aiovg',
|
69 |
+
array(
|
70 |
+
'categories' => array(
|
71 |
+
'columns' => $categories_settings['columns'],
|
72 |
+
'orderby' => $categories_settings['orderby'],
|
73 |
+
'order' => $categories_settings['order'],
|
74 |
+
'show_description' => $categories_settings['show_description'],
|
75 |
+
'show_count' => $categories_settings['show_count'],
|
76 |
+
'hide_empty' => $categories_settings['hide_empty']
|
77 |
+
),
|
78 |
+
'videos' => array(
|
79 |
+
'category' => 0,
|
80 |
+
'columns' => $videos_settings['columns'],
|
81 |
+
'limit' => $videos_settings['limit'],
|
82 |
+
'orderby' => $videos_settings['orderby'],
|
83 |
+
'order' => $videos_settings['order'],
|
84 |
+
'featured' => false,
|
85 |
+
'related' => false,
|
86 |
+
'show_count' => isset( $videos_settings['display']['count'] ),
|
87 |
+
'show_category' => isset( $videos_settings['display']['category'] ),
|
88 |
+
'show_date' => isset( $videos_settings['display']['date'] ),
|
89 |
+
'show_user' => isset( $videos_settings['display']['user'] ),
|
90 |
+
'show_views' => isset( $videos_settings['display']['views'] ),
|
91 |
+
'show_duration' => isset( $videos_settings['display']['duration'] ),
|
92 |
+
'show_excerpt' => isset( $videos_settings['display']['excerpt'] ),
|
93 |
+
'show_pagination' => true
|
94 |
+
),
|
95 |
+
'search' => array(
|
96 |
+
'template' => 'horizontal',
|
97 |
+
'category' => false
|
98 |
+
),
|
99 |
+
'video' => array(
|
100 |
+
'src' => '',
|
101 |
+
'poster' => '',
|
102 |
+
'width' => 0,
|
103 |
+
'ratio' => $player_settings['ratio'],
|
104 |
+
'autoplay' => $player_settings['autoplay'] ? true : false,
|
105 |
+
'loop' => $player_settings['loop'] ? true : false,
|
106 |
+
'playpause' => isset( $player_settings['controls']['playpause'] ),
|
107 |
+
'current' => isset( $player_settings['controls']['current'] ),
|
108 |
+
'progress' => isset( $player_settings['controls']['progress'] ),
|
109 |
+
'duration' => isset( $player_settings['controls']['duration'] ),
|
110 |
+
'volume' => isset( $player_settings['controls']['volume'] ),
|
111 |
+
'fullscreen' => isset( $player_settings['controls']['fullscreen'] )
|
112 |
+
)
|
113 |
+
)
|
114 |
+
);
|
115 |
+
|
116 |
+
// Styles
|
117 |
+
wp_enqueue_style(
|
118 |
+
AIOVG_PLUGIN_SLUG . '-bootstrap',
|
119 |
+
AIOVG_PLUGIN_URL . 'public/assets/css/bootstrap.css',
|
120 |
+
array(),
|
121 |
+
'3.3.7'
|
122 |
+
);
|
123 |
+
|
124 |
+
wp_enqueue_style(
|
125 |
+
AIOVG_PLUGIN_SLUG . '-fontawesome',
|
126 |
+
AIOVG_PLUGIN_URL . 'public/assets/css/font-awesome.min.css',
|
127 |
+
array(),
|
128 |
+
'4.7.0'
|
129 |
+
);
|
130 |
+
|
131 |
+
wp_enqueue_style(
|
132 |
+
AIOVG_PLUGIN_SLUG . '-public',
|
133 |
+
AIOVG_PLUGIN_URL . 'public/assets/css/aiovg-public.css',
|
134 |
+
array(),
|
135 |
+
AIOVG_PLUGIN_VERSION
|
136 |
+
);
|
137 |
+
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Register our custom blocks.
|
142 |
+
*
|
143 |
+
* @since 1.5.6
|
144 |
+
*/
|
145 |
+
public function register_block_types() {
|
146 |
+
|
147 |
+
// Hook the post rendering to the block
|
148 |
+
if ( function_exists( 'register_block_type' ) ) {
|
149 |
+
|
150 |
+
// Hook a render function to the categories block
|
151 |
+
register_block_type( 'aiovg/categories', array(
|
152 |
+
'attributes' => array(
|
153 |
+
'id' => array(
|
154 |
+
'type' => 'number'
|
155 |
+
),
|
156 |
+
'columns' => array(
|
157 |
+
'type' => 'number'
|
158 |
+
),
|
159 |
+
'orderby' => array(
|
160 |
+
'type' => 'string'
|
161 |
+
),
|
162 |
+
'order' => array(
|
163 |
+
'type' => 'string'
|
164 |
+
),
|
165 |
+
'show_description' => array(
|
166 |
+
'type' => 'boolean'
|
167 |
+
),
|
168 |
+
'show_count' => array(
|
169 |
+
'type' => 'boolean'
|
170 |
+
),
|
171 |
+
'hide_empty' => array(
|
172 |
+
'type' => 'boolean'
|
173 |
+
)
|
174 |
+
),
|
175 |
+
'render_callback' => array( $this, 'render_categories_block' ),
|
176 |
+
) );
|
177 |
+
|
178 |
+
// Hook a render function to the videos block
|
179 |
+
register_block_type( 'aiovg/videos', array(
|
180 |
+
'attributes' => array(
|
181 |
+
'category' => array(
|
182 |
+
'type' => 'array'
|
183 |
+
),
|
184 |
+
'columns' => array(
|
185 |
+
'type' => 'number'
|
186 |
+
),
|
187 |
+
'limit' => array(
|
188 |
+
'type' => 'number'
|
189 |
+
),
|
190 |
+
'orderby' => array(
|
191 |
+
'type' => 'string'
|
192 |
+
),
|
193 |
+
'order' => array(
|
194 |
+
'type' => 'string'
|
195 |
+
),
|
196 |
+
'featured' => array(
|
197 |
+
'type' => 'boolean'
|
198 |
+
),
|
199 |
+
'related' => array(
|
200 |
+
'type' => 'boolean'
|
201 |
+
),
|
202 |
+
'show_count' => array(
|
203 |
+
'type' => 'boolean'
|
204 |
+
),
|
205 |
+
'show_category' => array(
|
206 |
+
'type' => 'boolean'
|
207 |
+
),
|
208 |
+
'show_date' => array(
|
209 |
+
'type' => 'boolean'
|
210 |
+
),
|
211 |
+
'show_user' => array(
|
212 |
+
'type' => 'boolean'
|
213 |
+
),
|
214 |
+
'show_views' => array(
|
215 |
+
'type' => 'boolean'
|
216 |
+
),
|
217 |
+
'show_duration' => array(
|
218 |
+
'type' => 'boolean'
|
219 |
+
),
|
220 |
+
'show_excerpt' => array(
|
221 |
+
'type' => 'boolean'
|
222 |
+
),
|
223 |
+
'show_pagination' => array(
|
224 |
+
'type' => 'boolean'
|
225 |
+
)
|
226 |
+
),
|
227 |
+
'render_callback' => array( $this, 'render_videos_block' ),
|
228 |
+
) );
|
229 |
+
|
230 |
+
// Hook a render function to the search block
|
231 |
+
register_block_type( 'aiovg/search', array(
|
232 |
+
'attributes' => array(
|
233 |
+
'template' => array(
|
234 |
+
'type' => 'string'
|
235 |
+
),
|
236 |
+
'category' => array(
|
237 |
+
'type' => 'boolean'
|
238 |
+
)
|
239 |
+
),
|
240 |
+
'render_callback' => array( $this, 'render_search_block' ),
|
241 |
+
) );
|
242 |
+
|
243 |
+
// Hook a render function to the video player block
|
244 |
+
register_block_type( 'aiovg/video', array(
|
245 |
+
'attributes' => array(
|
246 |
+
'src' => array(
|
247 |
+
'type' => 'string'
|
248 |
+
),
|
249 |
+
'poster' => array(
|
250 |
+
'type' => 'string'
|
251 |
+
),
|
252 |
+
'width' => array(
|
253 |
+
'type' => 'number'
|
254 |
+
),
|
255 |
+
'ratio' => array(
|
256 |
+
'type' => 'number'
|
257 |
+
),
|
258 |
+
'autoplay' => array(
|
259 |
+
'type' => 'boolean'
|
260 |
+
),
|
261 |
+
'loop' => array(
|
262 |
+
'type' => 'boolean'
|
263 |
+
),
|
264 |
+
'playpause' => array(
|
265 |
+
'type' => 'boolean'
|
266 |
+
),
|
267 |
+
'current' => array(
|
268 |
+
'type' => 'boolean'
|
269 |
+
),
|
270 |
+
'progress' => array(
|
271 |
+
'type' => 'boolean'
|
272 |
+
),
|
273 |
+
'duration' => array(
|
274 |
+
'type' => 'boolean'
|
275 |
+
),
|
276 |
+
'volume' => array(
|
277 |
+
'type' => 'boolean'
|
278 |
+
),
|
279 |
+
'fullscreen' => array(
|
280 |
+
'type' => 'boolean'
|
281 |
+
)
|
282 |
+
),
|
283 |
+
'render_callback' => array( $this, 'render_video_player_block' ),
|
284 |
+
) );
|
285 |
+
|
286 |
+
}
|
287 |
+
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Render the categories block frontend.
|
292 |
+
*
|
293 |
+
* @since 1.5.6
|
294 |
+
* @param array $atts An associative array of attributes.
|
295 |
+
* @return string HTML output.
|
296 |
+
*/
|
297 |
+
public function render_categories_block( $atts ) {
|
298 |
+
|
299 |
+
if ( ! is_null( $atts['columns'] ) && 0 == (int) $atts['columns'] ) {
|
300 |
+
return '';
|
301 |
+
}
|
302 |
+
|
303 |
+
return do_shortcode( '[aiovg_categories ' . $this->build_shortcode_attributes( $atts ) . ']' );
|
304 |
+
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Render the videos block frontend.
|
309 |
+
*
|
310 |
+
* @since 1.5.6
|
311 |
+
* @param array $atts An associative array of attributes.
|
312 |
+
* @return string HTML output.
|
313 |
+
*/
|
314 |
+
public function render_videos_block( $atts ) {
|
315 |
+
|
316 |
+
if ( ! is_null( $atts['columns'] ) && 0 == (int) $atts['columns'] ) {
|
317 |
+
return '';
|
318 |
+
}
|
319 |
+
|
320 |
+
return do_shortcode( '[aiovg_videos ' . $this->build_shortcode_attributes( $atts ) . ']' );
|
321 |
+
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Render the search block frontend.
|
326 |
+
*
|
327 |
+
* @since 1.5.6
|
328 |
+
* @param array $atts An associative array of attributes.
|
329 |
+
* @return string HTML output.
|
330 |
+
*/
|
331 |
+
public function render_search_block( $atts ) {
|
332 |
+
return do_shortcode( '[aiovg_search_form ' . $this->build_shortcode_attributes( $atts ) . ']' );
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Render the video player block frontend.
|
337 |
+
*
|
338 |
+
* @since 1.5.6
|
339 |
+
* @param array $atts An associative array of attributes.
|
340 |
+
* @return string HTML output.
|
341 |
+
*/
|
342 |
+
public function render_video_player_block( $atts ) {
|
343 |
+
|
344 |
+
if ( empty( $atts['src'] ) ) {
|
345 |
+
return;
|
346 |
+
}
|
347 |
+
|
348 |
+
if ( false !== strpos( $atts['src'], 'youtube.com' ) ) {
|
349 |
+
|
350 |
+
$atts['youtube'] = $atts['src'];
|
351 |
+
|
352 |
+
if ( empty( $atts['poster'] ) ) {
|
353 |
+
$atts['poster'] = aiovg_get_youtube_image_url( $atts['youtube'] );
|
354 |
+
}
|
355 |
+
|
356 |
+
} elseif ( false !== strpos( $atts['src'], 'vimeo.com' ) ) {
|
357 |
+
|
358 |
+
$atts['vimeo'] = $atts['src'];
|
359 |
+
|
360 |
+
if ( empty( $atts['poster'] ) ) {
|
361 |
+
$atts['poster'] = aiovg_get_vimeo_image_url( $atts['vimeo'] );
|
362 |
+
}
|
363 |
+
|
364 |
+
} elseif ( false !== strpos( $atts['src'], 'dailymotion.com' ) ) {
|
365 |
+
|
366 |
+
$atts['dailymotion'] = $atts['src'];
|
367 |
+
|
368 |
+
if ( empty( $atts['poster'] ) ) {
|
369 |
+
$atts['poster'] = aiovg_get_dailymotion_image_url( $atts['dailymotion'] );
|
370 |
+
}
|
371 |
+
|
372 |
+
} elseif ( false !== strpos( $atts['src'], 'facebook.com' ) ) {
|
373 |
+
|
374 |
+
$atts['facebook'] = $atts['src'];
|
375 |
+
|
376 |
+
} else {
|
377 |
+
|
378 |
+
$filetype = wp_check_filetype( $atts['src'] );
|
379 |
+
|
380 |
+
if ( in_array( $filetype['ext'], array( 'mp4', 'webm', 'ogv' ) ) ) {
|
381 |
+
$atts[ $filetype['ext'] ] = $atts['src'];
|
382 |
+
} else {
|
383 |
+
return;
|
384 |
+
}
|
385 |
+
|
386 |
+
}
|
387 |
+
|
388 |
+
unset( $atts['src'] );
|
389 |
+
|
390 |
+
foreach ( $atts as $key => $value ) {
|
391 |
+
|
392 |
+
if ( is_null( $value ) ) {
|
393 |
+
unset( $atts[ $key ] );
|
394 |
+
}
|
395 |
+
|
396 |
+
}
|
397 |
+
|
398 |
+
$post_id = 0;
|
399 |
+
|
400 |
+
return aiovg_get_player_html( $post_id, $atts );
|
401 |
+
|
402 |
+
}
|
403 |
+
|
404 |
+
/**
|
405 |
+
* Build shortcode attributes string.
|
406 |
+
*
|
407 |
+
* @since 1.5.6
|
408 |
+
* @access private
|
409 |
+
* @param array $atts Array of attributes.
|
410 |
+
* @return string Shortcode attributes string.
|
411 |
+
*/
|
412 |
+
private function build_shortcode_attributes( $atts ) {
|
413 |
+
|
414 |
+
$attributes = array();
|
415 |
+
|
416 |
+
foreach ( $atts as $key => $value ) {
|
417 |
+
|
418 |
+
if ( is_null( $value ) ) {
|
419 |
+
continue;
|
420 |
+
}
|
421 |
+
|
422 |
+
if ( empty( $value ) ) {
|
423 |
+
$value = 0;
|
424 |
+
}
|
425 |
+
|
426 |
+
if ( is_array( $value ) ) {
|
427 |
+
$value = implode( ',', $value );
|
428 |
+
}
|
429 |
+
|
430 |
+
$attributes[] = sprintf( '%s="%s"', $key, $value );
|
431 |
+
|
432 |
+
}
|
433 |
+
|
434 |
+
return implode( ' ', $attributes );
|
435 |
+
|
436 |
+
}
|
437 |
+
|
438 |
+
}
|
blocks/dist/blocks.build.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,o){"use strict";function n(e){var t,o,n={},r=[];for(o=0;o<e.length;o+=1)n[e[o].id]=o,e[o].children=[];for(o=0;o<e.length;o+=1)t=e[o],t.parent>0?e[n[t.parent]].children.push(t):r.push(t);return r}function r(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(t=0;t<e.length;t+=1)o.push({label:n+e[t].name,value:e[t].id}),e[t].children.length>0&&r(e[t].children,o,n.trim()+"--- ");return o}t.b=n,t.a=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});o(2),o(4),o(6),o(8)},function(e,t,o){"use strict";var n=o(3),r=wp.i18n.__;(0,wp.blocks.registerBlockType)("aiovg/categories",{title:r("AIOVG - Categories Grid"),description:r("Display a list of All-in-One Video Gallery Categories."),icon:"category",category:"all-in-one-video-gallery",keywords:[r("categories"),r("gallery"),r("all-in-one-video-gallery")],attributes:{id:{type:"number",default:0},columns:{type:"number",default:aiovg.categories.columns},orderby:{type:"string",default:aiovg.categories.orderby},order:{type:"string",default:aiovg.categories.order},show_description:{type:"boolean",default:aiovg.categories.show_description},show_count:{type:"boolean",default:aiovg.categories.show_count},hide_empty:{type:"boolean",default:aiovg.categories.hide_empty}},edit:n.a,save:function(e){return null}})},function(e,t,o){"use strict";function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=o(0),c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=wp.i18n.__,p=wp.components,g=p.PanelBody,d=p.RangeControl,b=p.SelectControl,f=p.ServerSideRender,m=p.ToggleControl,h=wp.element,v=h.Component,y=h.Fragment,w=wp.editor.InspectorControls,_=wp.data.withSelect,C=function(e){function t(){l(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.toggleAttribute=e.toggleAttribute.bind(e),e}return i(t,e),c(t,[{key:"getCategoriesTree",value:function(){var e=this.props.categoriesList,t=[{label:"-- "+s("Top Categories")+" --",value:0}];if(e&&e.length>0){var o=Object(u.b)(e),n=Object(u.a)(o);t=[].concat(r(t),r(n))}return t}},{key:"toggleAttribute",value:function(e){var t=this;return function(o){t.props.setAttributes(n({},e,o))}}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,n=t.id,r=t.columns,l=t.orderby,a=t.order,i=t.show_description,u=t.show_count,c=t.hide_empty,p=this.getCategoriesTree();return wp.element.createElement(y,null,wp.element.createElement(w,null,wp.element.createElement(g,{title:s("Categories Grid Settings")},wp.element.createElement(b,{label:s("Select Parent"),value:n,options:p,onChange:function(e){return o({id:e})}}),wp.element.createElement(d,{label:s("Number of Columns"),value:r,min:1,max:4,onChange:function(e){return o({columns:e})}}),wp.element.createElement(b,{label:s("Sort Categories by"),value:l,options:[{label:s("ID"),value:"id"},{label:s("Count"),value:"count"},{label:s("Name"),value:"name"},{label:s("Slug"),value:"slug"}],onChange:function(e){return o({orderby:e})}}),wp.element.createElement(b,{label:s("Order Categories by"),value:a,options:[{label:s("ASC"),value:"asc"},{label:s("DESC"),value:"desc"}],onChange:function(e){return o({order:e})}}),wp.element.createElement(m,{label:s("Show Description?"),checked:i,onChange:this.toggleAttribute("show_description")}),wp.element.createElement(m,{label:s("Show Videos Count?"),checked:u,onChange:this.toggleAttribute("show_count")}),wp.element.createElement(m,{label:s("Hide Empty Categories?"),checked:c,onChange:this.toggleAttribute("hide_empty")}))),wp.element.createElement(f,{block:"aiovg/categories",attributes:t}))}}]),t}(v);t.a=_(function(e){return{categoriesList:(0,e("core").getEntityRecords)("taxonomy","aiovg_categories",{per_page:100})}})(C)},function(e,t,o){"use strict";var n=o(5),r=wp.i18n.__;(0,wp.blocks.registerBlockType)("aiovg/search",{title:r("AIOVG - Search Form"),description:r("All-in-One Video Gallery Videos Search Form."),icon:"search",category:"all-in-one-video-gallery",keywords:[r("search"),r("videos"),r("all-in-one-video-gallery")],attributes:{template:{type:"string",default:aiovg.search.template},category:{type:"boolean",default:aiovg.search.category}},edit:n.a,save:function(e){return null}})},function(e,t,o){"use strict";function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),u=wp.i18n.__,c=wp.components,s=c.PanelBody,p=c.SelectControl,g=c.ServerSideRender,d=c.ToggleControl,b=wp.element,f=b.Component,m=b.Fragment,h=wp.editor.InspectorControls,v=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.toggleAttribute=e.toggleAttribute.bind(e),e}return a(t,e),i(t,[{key:"toggleAttribute",value:function(e){var t=this;return function(o){t.props.setAttributes(n({},e,o))}}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,n=t.template,r=t.category;return wp.element.createElement(m,null,wp.element.createElement(h,null,wp.element.createElement(s,{title:u("Search Form Settings")},wp.element.createElement(p,{label:u("Select a Template"),value:n,options:[{label:u("Vertical"),value:"vertical"},{label:u("Horizontal"),value:"horizontal"}],onChange:function(e){return o({template:e})}}),wp.element.createElement(d,{label:u("Search by Categories"),checked:r,onChange:this.toggleAttribute("category")}))),wp.element.createElement(g,{block:"aiovg/search",attributes:t}))}}]),t}(f);t.a=v},function(e,t,o){"use strict";var n=o(7),r=wp.i18n.__;(0,wp.blocks.registerBlockType)("aiovg/video",{title:r("AIOVG - Video Player"),description:r("All-in-One Video Gallery Video Player."),icon:"format-video",category:"all-in-one-video-gallery",keywords:[r("video"),r("player"),r("all-in-one-video-gallery")],attributes:{src:{type:"string"},poster:{type:"string"},width:{type:"number",default:aiovg.video.width},ratio:{type:"number",default:aiovg.video.ratio},autoplay:{type:"boolean",default:aiovg.video.autoplay},loop:{type:"boolean",default:aiovg.video.loop},playpause:{type:"boolean",default:aiovg.video.playpause},current:{type:"boolean",default:aiovg.video.current},progress:{type:"boolean",default:aiovg.video.progress},duration:{type:"boolean",default:aiovg.video.duration},volume:{type:"boolean",default:aiovg.video.volume},fullscreen:{type:"boolean",default:aiovg.video.fullscreen}},edit:n.a,save:function(e){return null}})},function(e,t,o){"use strict";function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),u=wp.i18n.__,c=wp.components,s=c.BaseControl,p=c.Button,g=c.IconButton,d=c.PanelBody,b=c.ServerSideRender,f=c.TextControl,m=c.ToggleControl,h=c.Toolbar,v=c.withNotices,y=wp.element,w=y.Component,_=y.Fragment,C=y.createRef,E=wp.editor,A=E.BlockControls,k=E.InspectorControls,O=E.MediaPlaceholder,S=E.MediaUpload,P=function(e){function t(){r(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={editing:!e.props.attributes.src},e.videoPlayer=C(),e.toggleAttribute=e.toggleAttribute.bind(e),e.onSelectURL=e.onSelectURL.bind(e),e.onSelectPoster=e.onSelectPoster.bind(e),e.onRemovePoster=e.onRemovePoster.bind(e),e}return a(t,e),i(t,[{key:"toggleAttribute",value:function(e){var t=this;return function(o){t.props.setAttributes(n({},e,o))}}},{key:"onSelectURL",value:function(e){var t=this.props,o=t.attributes,n=t.setAttributes;e!==o.src&&n({src:e}),this.setState({editing:!1})}},{key:"onSelectPoster",value:function(e){(0,this.props.setAttributes)({poster:e.url})}},{key:"onRemovePoster",value:function(){(0,this.props.setAttributes)({poster:""})}},{key:"render",value:function(){var e=this,t=this.props,o=t.attributes,n=t.setAttributes,r=t.className,l=t.noticeOperations,a=t.noticeUI,i=o.poster,c=o.width,v=o.ratio,y=o.autoplay,w=o.loop,C=o.playpause,E=o.current,P=o.progress,j=o.duration,R=o.volume,T=o.fullscreen,V=this.state.editing,x=function(){e.setState({editing:!0})},I=function(t){if(!t||!t.url)return n({src:void 0}),void x();n({src:t.url}),e.setState({src:t.url,editing:!1})};return V?wp.element.createElement(O,{icon:"media-video",labels:{title:u("Add MP4, WebM, OGV, YouTube, Vimeo, Dailymotion or a Facebook Video URL."),name:u("a video")},className:r,accept:"video/*",type:"video",value:o,onSelect:I,onSelectURL:this.onSelectURL,notices:a,onError:l.createErrorNotice}):wp.element.createElement(_,null,wp.element.createElement(A,null,wp.element.createElement(h,null,wp.element.createElement(g,{className:"components-icon-button components-toolbar__control",label:u("Edit video"),onClick:x,icon:"edit"}))),wp.element.createElement(k,null,wp.element.createElement(d,{title:u("Video Settings")},wp.element.createElement(f,{label:u("Width"),help:u("In pixels. Maximum width of the player. Leave this field empty to scale 100% of its enclosing container/html element."),value:c>0?c:"",onChange:function(e){return n({width:Number(e)})}}),wp.element.createElement(f,{label:u("Ratio"),help:u("In percentage. 1 to 100. Calculate player's height using the ratio value entered."),value:v,onChange:function(e){return n({ratio:e})}}),wp.element.createElement(m,{label:u("Autoplay"),checked:y,onChange:this.toggleAttribute("autoplay")}),wp.element.createElement(m,{label:u("Loop"),checked:w,onChange:this.toggleAttribute("loop")}),wp.element.createElement(s,{className:"editor-video-poster-control",label:u("Poster Image")},wp.element.createElement(S,{title:u("Select Poster Image"),onSelect:this.onSelectPoster,type:"image",render:function(e){var t=e.open;return wp.element.createElement(p,{isDefault:!0,onClick:t},u(i?"Replace image":"Select Poster Image"))}}),!!i&&wp.element.createElement(p,{onClick:this.onRemovePoster,isLink:!0,isDestructive:!0},u("Remove Poster Image")))),wp.element.createElement(d,{title:u("Show / Hide Player Controls")},wp.element.createElement(m,{label:u("Play / Pause"),checked:C,onChange:this.toggleAttribute("playpause")}),wp.element.createElement(m,{label:u("Current Time"),checked:E,onChange:this.toggleAttribute("current")}),wp.element.createElement(m,{label:u("Progressbar"),checked:P,onChange:this.toggleAttribute("progress")}),wp.element.createElement(m,{label:u("Duration"),checked:j,onChange:this.toggleAttribute("duration")}),wp.element.createElement(m,{label:u("Volume"),checked:R,onChange:this.toggleAttribute("volume")}),wp.element.createElement(m,{label:u("Fullscreen"),checked:T,onChange:this.toggleAttribute("fullscreen")}))),wp.element.createElement(b,{block:"aiovg/video",attributes:o}))}}]),t}(w);t.a=v(P)},function(e,t,o){"use strict";var n=o(9),r=wp.i18n.__;(0,wp.blocks.registerBlockType)("aiovg/videos",{title:r("AIOVG - Videos Grid"),description:r("Display a list of All-in-One Video Gallery Videos."),icon:"playlist-video",category:"all-in-one-video-gallery",keywords:[r("videos"),r("gallery"),r("all-in-one-video-gallery")],attributes:{category:{type:"array"},columns:{type:"number",default:aiovg.videos.columns},limit:{type:"number",default:aiovg.videos.limit},orderby:{type:"string",default:aiovg.videos.orderby},order:{type:"string",default:aiovg.videos.order},featured:{type:"boolean",default:aiovg.videos.featured},related:{type:"boolean",default:aiovg.videos.related},show_count:{type:"boolean",default:aiovg.videos.show_count},show_category:{type:"boolean",default:aiovg.videos.show_category},show_date:{type:"boolean",default:aiovg.videos.show_date},show_user:{type:"boolean",default:aiovg.videos.show_user},show_views:{type:"boolean",default:aiovg.videos.show_views},show_duration:{type:"boolean",default:aiovg.videos.show_duration},show_excerpt:{type:"boolean",default:aiovg.videos.show_excerpt},show_pagination:{type:"boolean",default:aiovg.videos.show_pagination}},edit:n.a,save:function(e){return null}})},function(e,t,o){"use strict";function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=o(0),c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=wp.i18n.__,p=wp.components,g=p.PanelBody,d=p.RangeControl,b=p.SelectControl,f=p.ServerSideRender,m=p.ToggleControl,h=wp.element,v=h.Component,y=h.Fragment,w=wp.editor.InspectorControls,_=wp.data.withSelect,C=function(e){function t(){l(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.toggleAttribute=e.toggleAttribute.bind(e),e}return i(t,e),c(t,[{key:"getCategoriesTree",value:function(){var e=this.props.categoriesList,t=[];if(e&&e.length>0){var o=Object(u.b)(e),n=Object(u.a)(o);t=[].concat(r(t),r(n))}return t}},{key:"toggleAttribute",value:function(e){var t=this;return function(o){t.props.setAttributes(n({},e,o))}}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,n=t.category,r=t.columns,l=t.limit,a=t.orderby,i=t.order,u=t.featured,c=t.related,p=t.show_count,h=t.show_category,v=t.show_date,_=t.show_user,C=t.show_views,E=t.show_duration,A=t.show_excerpt,k=t.show_pagination,O=this.getCategoriesTree();return wp.element.createElement(y,null,wp.element.createElement(w,null,wp.element.createElement(g,{title:s("Videos Grid Settings")},wp.element.createElement(b,{multiple:!0,label:s("Select Categories"),value:n,options:O,onChange:function(e){return o({category:e})}}),wp.element.createElement(d,{label:s("Number of Columns"),value:r,min:1,max:4,onChange:function(e){return o({columns:e})}}),wp.element.createElement(d,{label:s("Limit"),value:l,min:1,max:100,onChange:function(e){return o({limit:e})}}),wp.element.createElement(b,{label:s("Order By"),value:a,options:[{label:s("Title"),value:"title"},{label:s("Date Posted"),value:"date"},{label:s("Views Count"),value:"views"},{label:s("Random"),value:"rand"}],onChange:function(e){return o({orderby:e})}}),wp.element.createElement(b,{label:s("Order"),value:i,options:[{label:s("ASC"),value:"asc"},{label:s("DESC"),value:"desc"}],onChange:function(e){return o({order:e})}}),wp.element.createElement(m,{label:s("Featured Only"),checked:u,onChange:this.toggleAttribute("featured")}),wp.element.createElement(m,{label:s("Follow URL?")+"("+s("Related Videos")+")",checked:c,onChange:this.toggleAttribute("related")}),wp.element.createElement(m,{label:s("Videos Count"),checked:p,onChange:this.toggleAttribute("show_count")}),wp.element.createElement(m,{label:s("Category Name"),checked:h,onChange:this.toggleAttribute("show_category")}),wp.element.createElement(m,{label:s("Date Added"),checked:v,onChange:this.toggleAttribute("show_date")}),wp.element.createElement(m,{label:s("Author Name"),checked:_,onChange:this.toggleAttribute("show_user")}),wp.element.createElement(m,{label:s("Views Count"),checked:C,onChange:this.toggleAttribute("show_views")}),wp.element.createElement(m,{label:s("Video Duration"),checked:E,onChange:this.toggleAttribute("show_duration")}),wp.element.createElement(m,{label:s("Excerpt ( Short Description )"),checked:A,onChange:this.toggleAttribute("show_excerpt")}),wp.element.createElement(m,{label:s("Show Pagination"),checked:k,onChange:this.toggleAttribute("show_pagination")}))),wp.element.createElement(f,{block:"aiovg/videos",attributes:t}))}}]),t}(v);t.a=_(function(e){return{categoriesList:(0,e("core").getEntityRecords)("taxonomy","aiovg_categories",{per_page:100})}})(C)}]);
|
blocks/dist/blocks.editor.build.css
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Common SCSS
|
3 |
+
*
|
4 |
+
* Can include things like variables and mixins
|
5 |
+
* that are used across the project.
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* #.# Editor Styles
|
10 |
+
*
|
11 |
+
* CSS for just Backend enqueued after style.scss
|
12 |
+
* which makes it higher in priority.
|
13 |
+
*/
|
blocks/dist/blocks.style.build.css
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Common SCSS
|
3 |
+
*
|
4 |
+
* Can include things like variables and mixins
|
5 |
+
* that are used across the project.
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* #.# Styles
|
10 |
+
*
|
11 |
+
* CSS for both Frontend+Backend.
|
12 |
+
*/
|
blocks/dist/index.html
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<!DOCTYPE html><title></title>
|
blocks/index.html
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<!DOCTYPE html><title></title>
|
blocks/package-lock.json
ADDED
@@ -0,0 +1,6855 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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