Version Description
- Fix: Fixes a SERIOUS BUG. Pages created infinitely in some WordPress Environments.
- Fix: Replaced "plugins_loaded" hook with "init" hook to initialize the Gutenberg blocks.
Download this release
Release Info
Developer | plugins360 |
Plugin | All-in-One Video Gallery |
Version | 1.5.9 |
Comparing to | |
See all releases |
Code changes from version 1.5.8 to 1.5.9
- README.txt +13 -3
- all-in-one-video-gallery.php +2 -2
- blocks/blocks.php +2 -3
- includes/functions.php +22 -16
- includes/init.php +1 -1
README.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: player, youtube, vimeo, live, stream
|
|
6 |
Requires at least: 4.4.0
|
7 |
Tested up to: 5.0
|
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 |
|
@@ -91,9 +91,14 @@ Most likely rewrite rules were not registered properly for some reason. Go to "W
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
94 |
= 1.5.8 =
|
95 |
|
96 |
-
*
|
97 |
|
98 |
= 1.5.7 =
|
99 |
|
@@ -163,9 +168,14 @@ Most likely rewrite rules were not registered properly for some reason. Go to "W
|
|
163 |
|
164 |
== Upgrade Notice ==
|
165 |
|
|
|
|
|
|
|
|
|
|
|
166 |
= 1.5.8 =
|
167 |
|
168 |
-
*
|
169 |
|
170 |
= 1.5.7 =
|
171 |
|
6 |
Requires at least: 4.4.0
|
7 |
Tested up to: 5.0
|
8 |
Requires PHP: 5.3.0
|
9 |
+
Stable tag: 1.5.9
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 1.5.9 =
|
95 |
+
|
96 |
+
* Fix: Fixes a SERIOUS BUG. Pages created infinitely in some WordPress Environments.
|
97 |
+
* Fix: Replaced "plugins_loaded" hook with "init" hook to initialize the Gutenberg blocks.
|
98 |
+
|
99 |
= 1.5.8 =
|
100 |
|
101 |
+
* Tweak: "wp_loaded" hook used to insert missing plugin options was updated with a version number check.
|
102 |
|
103 |
= 1.5.7 =
|
104 |
|
168 |
|
169 |
== Upgrade Notice ==
|
170 |
|
171 |
+
= 1.5.9 =
|
172 |
+
|
173 |
+
* Fix: Fixes a SERIOUS BUG. Pages created infinitely in some WordPress Environments.
|
174 |
+
* Fix: Replaced "plugins_loaded" hook with "init" hook to initialize the Gutenberg blocks.
|
175 |
+
|
176 |
= 1.5.8 =
|
177 |
|
178 |
+
* Tweak: "wp_loaded" hook used to insert missing plugin options was updated with a version number check.
|
179 |
|
180 |
= 1.5.7 =
|
181 |
|
all-in-one-video-gallery.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* Plugin Name: All-in-One Video Gallery
|
12 |
* Plugin URI: https://plugins360.com/all-in-one-video-gallery/
|
13 |
* Description: No coding required. A Responsive & Lightweight video gallery plugin. HTML5 Video Player, Custom Post Type interface, Categories, Visual Gallery Builder (Gutenberg), forms to Search Videos, Social Sharing and everything you will need to build a YouTube/Vimeo like video sharing website.
|
14 |
-
* Version: 1.5.
|
15 |
* Author: Team Plugins360
|
16 |
* Author URI: https://plugins360.com
|
17 |
* License: GPL-2.0+
|
@@ -76,7 +76,7 @@ if ( !function_exists( 'aiovg_fs' ) ) {
|
|
76 |
|
77 |
// The current version of the plugin
|
78 |
if ( !defined( 'AIOVG_PLUGIN_VERSION' ) ) {
|
79 |
-
define( 'AIOVG_PLUGIN_VERSION', '1.5.
|
80 |
}
|
81 |
// The unique identifier of the plugin
|
82 |
if ( !defined( 'AIOVG_PLUGIN_SLUG' ) ) {
|
11 |
* Plugin Name: All-in-One Video Gallery
|
12 |
* Plugin URI: https://plugins360.com/all-in-one-video-gallery/
|
13 |
* Description: No coding required. A Responsive & Lightweight video gallery plugin. HTML5 Video Player, Custom Post Type interface, Categories, Visual Gallery Builder (Gutenberg), forms to Search Videos, Social Sharing and everything you will need to build a YouTube/Vimeo like video sharing website.
|
14 |
+
* Version: 1.5.9
|
15 |
* Author: Team Plugins360
|
16 |
* Author URI: https://plugins360.com
|
17 |
* License: GPL-2.0+
|
76 |
|
77 |
// The current version of the plugin
|
78 |
if ( !defined( 'AIOVG_PLUGIN_VERSION' ) ) {
|
79 |
+
define( 'AIOVG_PLUGIN_VERSION', '1.5.9' );
|
80 |
}
|
81 |
// The unique identifier of the plugin
|
82 |
if ( !defined( 'AIOVG_PLUGIN_SLUG' ) ) {
|
blocks/blocks.php
CHANGED
@@ -235,9 +235,8 @@ class AIOVG_Blocks {
|
|
235 |
|
236 |
if ( 'categories' == $field['type'] ) {
|
237 |
$attributes[ $field['name'] ] = array(
|
238 |
-
'type'
|
239 |
-
'
|
240 |
-
'items' => array(
|
241 |
'type' => 'integer',
|
242 |
)
|
243 |
);
|
235 |
|
236 |
if ( 'categories' == $field['type'] ) {
|
237 |
$attributes[ $field['name'] ] = array(
|
238 |
+
'type' => 'array',
|
239 |
+
'items' => array(
|
|
|
240 |
'type' => 'integer',
|
241 |
)
|
242 |
);
|
includes/functions.php
CHANGED
@@ -219,10 +219,10 @@ function aiovg_get_attachment_id( $url, $media = 'image' ) {
|
|
219 |
*/
|
220 |
function aiovg_get_block_fields() {
|
221 |
$defaults = aiovg_get_default_settings();
|
222 |
-
$image_settings = get_option( 'aiovg_image_settings' );
|
223 |
-
$categories_settings = array_merge( $defaults['aiovg_categories_settings'], get_option( 'aiovg_categories_settings' ) );
|
224 |
-
$videos_settings = array_merge( $defaults['aiovg_videos_settings'], get_option( 'aiovg_videos_settings' ) );
|
225 |
-
$player_settings = array_merge( $defaults['aiovg_player_settings'], get_option( 'aiovg_player_settings' ) );
|
226 |
$video_templates = aiovg_get_video_templates();
|
227 |
|
228 |
// Fields
|
@@ -1430,18 +1430,24 @@ function aiovg_insert_custom_pages() {
|
|
1430 |
$pages = array();
|
1431 |
|
1432 |
foreach ( $page_definitions as $slug => $page ) {
|
1433 |
-
$
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1445 |
}
|
1446 |
} else {
|
1447 |
$pages = get_option( 'aiovg_page_settings' );
|
219 |
*/
|
220 |
function aiovg_get_block_fields() {
|
221 |
$defaults = aiovg_get_default_settings();
|
222 |
+
$image_settings = array_merge( $defaults['aiovg_image_settings'], get_option( 'aiovg_image_settings', array() ) );
|
223 |
+
$categories_settings = array_merge( $defaults['aiovg_categories_settings'], get_option( 'aiovg_categories_settings', array() ) );
|
224 |
+
$videos_settings = array_merge( $defaults['aiovg_videos_settings'], get_option( 'aiovg_videos_settings', array() ) );
|
225 |
+
$player_settings = array_merge( $defaults['aiovg_player_settings'], get_option( 'aiovg_player_settings', array() ) );
|
226 |
$video_templates = aiovg_get_video_templates();
|
227 |
|
228 |
// Fields
|
1430 |
$pages = array();
|
1431 |
|
1432 |
foreach ( $page_definitions as $slug => $page ) {
|
1433 |
+
$page_check = get_page_by_title( $page['title'] );
|
1434 |
+
|
1435 |
+
if ( null == $page_check ) {
|
1436 |
+
$id = wp_insert_post(
|
1437 |
+
array(
|
1438 |
+
'post_title' => $page['title'],
|
1439 |
+
'post_content' => $page['content'],
|
1440 |
+
'post_status' => 'publish',
|
1441 |
+
'post_author' => 1,
|
1442 |
+
'post_type' => 'page',
|
1443 |
+
'comment_status' => 'closed'
|
1444 |
+
)
|
1445 |
+
);
|
1446 |
+
|
1447 |
+
$pages[ $slug ] = $id;
|
1448 |
+
} else {
|
1449 |
+
$pages[ $slug ] = $page_check->ID;
|
1450 |
+
}
|
1451 |
}
|
1452 |
} else {
|
1453 |
$pages = get_option( 'aiovg_page_settings' );
|
includes/init.php
CHANGED
@@ -263,7 +263,7 @@ class AIOVG_Init {
|
|
263 |
private function blocks_init() {
|
264 |
$blocks = new AIOVG_Blocks();
|
265 |
|
266 |
-
$this->loader->add_action( '
|
267 |
$this->loader->add_action( 'enqueue_block_editor_assets', $blocks, 'enqueue_block_editor_assets' );
|
268 |
|
269 |
$this->loader->add_filter( 'block_categories', $blocks, 'block_categories' );
|
263 |
private function blocks_init() {
|
264 |
$blocks = new AIOVG_Blocks();
|
265 |
|
266 |
+
$this->loader->add_action( 'init', $blocks, 'register_block_types' );
|
267 |
$this->loader->add_action( 'enqueue_block_editor_assets', $blocks, 'enqueue_block_editor_assets' );
|
268 |
|
269 |
$this->loader->add_filter( 'block_categories', $blocks, 'block_categories' );
|