All-in-One Video Gallery - Version 1.6.0

Version Description

  • Fix: Security fix.
  • Fix: [+] few minor bug fixes.
Download this release

Release Info

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

Code changes from version 1.5.9 to 1.6.0

README.txt CHANGED
@@ -4,9 +4,9 @@ Contributors: plugins360, freemius
4
Donate link: https://plugins360.com
5
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.9
10
License: GPLv2 or later
11
License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
@@ -91,6 +91,11 @@ Most likely rewrite rules were not registered properly for some reason. Go to "W
91
92
== Changelog ==
93
94
= 1.5.9 =
95
96
* Fix: Fixes a SERIOUS BUG. Pages created infinitely in some WordPress Environments.
@@ -168,6 +173,11 @@ Most likely rewrite rules were not registered properly for some reason. Go to "W
168
169
== Upgrade Notice ==
170
171
= 1.5.9 =
172
173
* Fix: Fixes a SERIOUS BUG. Pages created infinitely in some WordPress Environments.
4
Donate link: https://plugins360.com
5
Tags: player, youtube, vimeo, live, stream
6
Requires at least: 4.4.0
7
+ Tested up to: 5.1
8
Requires PHP: 5.3.0
9
+ Stable tag: 1.6.0
10
License: GPLv2 or later
11
License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
91
92
== Changelog ==
93
94
+ = 1.6.0 =
95
+
96
+ * Fix: Security fix.
97
+ * Fix: [+] few minor bug fixes.
98
+
99
= 1.5.9 =
100
101
* Fix: Fixes a SERIOUS BUG. Pages created infinitely in some WordPress Environments.
173
174
== Upgrade Notice ==
175
176
+ = 1.6.0 =
177
+
178
+ * Fix: Security fix.
179
+ * Fix: [+] few minor bug fixes.
180
+
181
= 1.5.9 =
182
183
* Fix: Fixes a SERIOUS BUG. Pages created infinitely in some WordPress Environments.
admin/assets/css/admin.css CHANGED
@@ -78,7 +78,8 @@
78
*
79
*--------------------------------------------------------------------------------------------*/
80
#aiovg-welcome .aiovg-badge {
81
- background: #0073aa url('../images/logo.png') no-repeat center;
82
}
83
84
/*----------------------------------------------------------------------------------------------
78
*
79
*--------------------------------------------------------------------------------------------*/
80
#aiovg-welcome .aiovg-badge {
81
+ margin-bottom: 0;
82
+ background: #0073aa url( '../images/logo.png' ) no-repeat top;
83
}
84
85
/*----------------------------------------------------------------------------------------------
admin/categories.php CHANGED
@@ -56,7 +56,7 @@ class AIOVG_Admin_Categories {
56
'public' => true,
57
'show_ui' => true,
58
'show_admin_column' => true,
59
- 'show_in_nav_menus' => true,
60
'show_in_rest' => true,
61
'show_tagcloud' => false,
62
'capabilities' => array(
56
'public' => true,
57
'show_ui' => true,
58
'show_admin_column' => true,
59
+ 'show_in_nav_menus' => false,
60
'show_in_rest' => true,
61
'show_tagcloud' => false,
62
'capabilities' => array(
admin/partials/welcome.php CHANGED
@@ -1,5 +1,5 @@
1
- <?php
2
-
3
/**
4
* Welcome page.
5
*
@@ -7,142 +7,158 @@
7
* @since 1.0.0
8
*
9
* @package All_In_One_Video_Gallery
10
- */
11
- ?>
12
13
<div id="aiovg-welcome" class="wrap about-wrap full-width-layout aiovg-welcome">
14
15
- <h1><?php printf( __( 'Welcome to "All-in-One Video Gallery - %s"', 'all-in-one-video-gallery' ), AIOVG_PLUGIN_VERSION ); ?></h1>
16
17
<p class="about-text">
18
- <?php _e( 'No coding required. A Responsive & Lightweight video gallery plugin.', 'all-in-one-video-gallery' ); ?>
19
</p>
20
21
- <p class="about-text">
22
- <?php _e( '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.', 'all-in-one-video-gallery' ); ?>
23
- </p>
24
25
- <div class="wp-badge aiovg-badge"></div>
26
27
<h2 class="nav-tab-wrapper wp-clearfix">
28
- <?php
29
- foreach ( $tabs as $tab => $title ) {
30
- $class = ( $tab == $active_tab ) ? 'nav-tab nav-tab-active' : 'nav-tab';
31
- printf( '<a href="%s" class="%s">%s</a>', esc_url( admin_url( add_query_arg( 'page', $tab, 'index.php' ) ) ), $class, $title );
32
- }
33
- ?>
34
</h2>
35
36
- <?php if ( 'aiovg_welcome' == $active_tab ) : ?>
37
<p class="about-description">
38
- <?php _e( "Supports any browser & video formats such as MP4, WebM, OGV and embeddable players like YouTube, Vimeo, Dailymotion, Facebook, etc.", 'all-in-one-video-gallery' ); ?>
39
</p>
40
-
41
- <div class="changelog">
42
- <div class="two-col">
43
- <div class="col">
44
- <!-- 1. Configure Settings -->
45
- <h3>
46
- <span>1.</span>
47
- <a href="<?php echo admin_url( 'edit.php?post_type=aiovg_videos&page=aiovg_settings' ); ?>">
48
- <?php _e( 'Configure Settings', 'all-in-one-video-gallery' ); ?>
49
- </a>
50
- </h3>
51
-
52
- <p>
53
- <?php _e( '100+ Settings. Configure player options like "Autoplay", "Loop", "Preload" and gallery options like "Number of Columns", "Pagination", "Comments", etc.', 'all-in-one-video-gallery' ); ?>
54
- </p>
55
-
56
- <br />
57
-
58
- <!-- 2. Categories => Add -->
59
- <h3>
60
- <span>2.</span>
61
- <a href="<?php echo admin_url( 'edit-tags.php?taxonomy=aiovg_categories&post_type=aiovg_videos' ); ?>">
62
- <?php _e( 'Categories &rarr; Add', 'all-in-one-video-gallery' ); ?>
63
- </a>
64
- </h3>
65
-
66
- <p>
67
- <?php _e( "Create unlimited categories and subcategory levels. Categories allow you to organize your videos in a way that makes it easy for your users to find exactly what they're looking for.", 'all-in-one-video-gallery' ); ?>
68
- </p>
69
70
- <br />
71
-
72
- <!-- 3. Video Gallery => Add New -->
73
- <h3>
74
- <span>3.</span>
75
- <a href="<?php echo admin_url( 'post-new.php?post_type=aiovg_videos' ); ?>">
76
- <?php _e( 'Video Gallery &rarr; Add New', 'all-in-one-video-gallery' ); ?>
77
- </a>
78
- </h3>
79
-
80
- <p>
81
- <?php _e( 'Add unlimited videos. "All-in-One Video Gallery" videos are CUSTOM POST TYPE called "aiovg_videos". So, each video is a POST. This makes the gallery more powerful and the possibility of extending the plugin is huge.', 'all-in-one-video-gallery' ); ?>
82
- </p>
83
- </div>
84
-
85
- <div class="col">
86
- <!-- 4. Front-End Gallery Display -->
87
- <h3>
88
- <span>4.</span>
89
- <?php _e( 'Front-End Gallery Display', 'all-in-one-video-gallery' ); ?>
90
- </h3>
91
-
92
- <p>
93
- <?php _e( "100% Gutenberg compatible. Visually build your gallery using the plugin's Gutenberg Blocks. There is a Shortcode Builder for the old classic WP Editor.", 'all-in-one-video-gallery' ); ?>
94
- </p>
95
-
96
- <br />
97
-
98
- <!-- 5. Configure Sidebars -->
99
- <h3>
100
- <span>5.</span>
101
- <?php _e( 'Configure Sidebars', 'all-in-one-video-gallery' ); ?>
102
- </h3>
103
-
104
- <p>
105
- <?php _e( 'Decorate your website sidebars using our Widgets. There are separate Widgets available for categories display, video gallery, single video player, search form, etc.', 'all-in-one-video-gallery' ); ?>
106
- </p>
107
-
108
- <br />
109
-
110
- <!-- More Features -->
111
- <h3>
112
- <span>[+]</span>
113
- <?php _e( 'More Features', 'all-in-one-video-gallery' ); ?>
114
- </h3>
115
-
116
- <p>
117
- <?php _e( 'There is a PREMIUM version with even more powerful features like Custom Logo & Branding, HLS / M(PEG)-Dash support, Live Streaming, Popup Gallery, Videos Slider, VAST / VPAID Ads, etc.', 'all-in-one-video-gallery' ); ?>
118
- </p>
119
- </div>
120
- </div>
121
- </div>
122
- <?php endif; ?>
123
124
- <?php if ( 'aiovg_support' == $active_tab ) : ?>
125
- <p class="about-description"><?php _e( 'Need Help?', 'all-in-one-video-gallery' ); ?></p>
126
127
<div class="changelog">
128
<div class="two-col">
129
<div class="col">
130
- <h3><?php _e( 'Phenomenal Support', 'all-in-one-video-gallery' ); ?></h3>
131
132
<p>
133
- <?php printf( __( 'We do our best to provide the best support we can. If you encounter a problem or have a question, simply submit your question using our <a href="%s" target="_blank">support form</a>.', 'all-in-one-video-gallery' ), 'https://wordpress.org/support/plugin/all-in-one-video-gallery' ); ?>
134
</p>
135
</div>
136
137
<div class="col">
138
- <h3><?php _e( 'Need Even Faster Support?', 'all-in-one-video-gallery' ); ?></h3>
139
140
<p>
141
- <?php printf( __( 'Our <a href="%s" target="_blank">Priority Support</a> system is there for customers that need faster and/or more in-depth assistance.', 'all-in-one-video-gallery' ), 'https://plugins360.com/support/' ); ?>
142
</p>
143
</div>
144
</div>
145
</div>
146
- <?php endif; ?>
147
148
</div>
1
+ <?php
2
+
3
/**
4
* Welcome page.
5
*
7
* @since 1.0.0
8
*
9
* @package All_In_One_Video_Gallery
10
+ */
11
+ ?>
12
13
<div id="aiovg-welcome" class="wrap about-wrap full-width-layout aiovg-welcome">
14
15
+ <h1><?php
16
+ printf( __( 'All-in-One Video Gallery - %s', 'all-in-one-video-gallery' ), AIOVG_PLUGIN_VERSION );
17
+ ?></h1>
18
19
<p class="about-text">
20
+ <?php
21
+ _e( "The last video player & gallery plugin you'll ever need.", 'all-in-one-video-gallery' );
22
+ ?>
23
</p>
24
25
+ <?php
26
+ ?>
27
28
+ <div class="wp-badge aiovg-badge"><?php
29
+ printf( __( 'Version %s', 'all-in-one-video-gallery' ), AIOVG_PLUGIN_VERSION );
30
+ ?></div>
31
32
<h2 class="nav-tab-wrapper wp-clearfix">
33
+ <?php
34
+ foreach ( $tabs as $tab => $title ) {
35
+ $class = ( $tab == $active_tab ? 'nav-tab nav-tab-active' : 'nav-tab' );
36
+ printf(
37
+ '<a href="%s" class="%s">%s</a>',
38
+ esc_url( admin_url( add_query_arg( 'page', $tab, 'index.php' ) ) ),
39
+ $class,
40
+ $title
41
+ );
42
+ }
43
+ ?>
44
</h2>
45
46
+ <?php
47
+
48
+ if ( 'aiovg_welcome' == $active_tab ) {
49
+ ?>
50
<p class="about-description">
51
+ <strong><?php
52
+ printf( __( 'Step #%d:', 'all-in-one-video-gallery' ), 0 );
53
+ ?></strong>
54
+ &rarr;
55
+ <?php
56
+ _e( 'Install & Activate <strong>All-in-One Video Gallery</strong>', 'all-in-one-video-gallery' );
57
+ ?>
58
</p>
59
60
+ <p class="about-description">
61
+ <strong><?php
62
+ printf( __( 'Step #%d:', 'all-in-one-video-gallery' ), 1 );
63
+ ?></strong>
64
+ &rarr;
65
+ <code><?php
66
+ _e( 'Optional', 'all-in-one-video-gallery' );
67
+ ?></code>
68
+ <a href="<?php
69
+ echo esc_url( admin_url( 'edit-tags.php?taxonomy=aiovg_categories&post_type=aiovg_videos' ) ) ;
70
+ ?>">
71
+ <?php
72
+ _e( 'Add Categories', 'all-in-one-video-gallery' );
73
+ ?>
74
+ </a>
75
+ </p>
76
+
77
+ <p class="about-description">
78
+ <strong><?php
79
+ printf( __( 'Step #%d:', 'all-in-one-video-gallery' ), 2 );
80
+ ?></strong>
81
+ &rarr;
82
+ <a href="<?php
83
+ echo esc_url( admin_url( 'post-new.php?post_type=aiovg_videos' ) ) ;
84
+ ?>">
85
+ <?php
86
+ _e( 'Add Videos', 'all-in-one-video-gallery' );
87
+ ?>
88
+ </a>
89
+ </p>
90
+
91
+ <p class="about-description">
92
+ <strong><?php
93
+ printf( __( 'Step #%d:', 'all-in-one-video-gallery' ), 3 );
94
+ ?></strong>
95
+ &rarr;
96
+ <code><?php
97
+ _e( 'Optional', 'all-in-one-video-gallery' );
98
+ ?></code>
99
+ <?php
100
+ printf( __( 'Add a Categories <a href="%s">Page</a> to your site front-end. Find step by step instructions <a href="%s" target="_blank">here</a>', 'all-in-one-video-gallery' ), esc_url( admin_url( 'post-new.php?post_type=page' ) ), 'https://plugins360.com/all-in-one-video-gallery/displaying-categories/' );
101
+ ?>
102
+ </p>
103
+
104
+ <p class="about-description">
105
+ <strong><?php
106
+ printf( __( 'Step #%d:', 'all-in-one-video-gallery' ), 4 );
107
+ ?></strong>
108
+ &rarr;
109
+ <?php
110
+ printf( __( 'Add a Videos <a href="%s">Page</a> to your site front-end. Find step by step instructions <a href="%s" target="_blank">here</a>', 'all-in-one-video-gallery' ), esc_url( admin_url( 'post-new.php?post_type=page' ) ), 'https://plugins360.com/all-in-one-video-gallery/displaying-video-gallery/' );
111
+ ?>
112
+ </p>
113
+
114
+ <p>
115
+ <?php
116
+ printf( __( 'Please <a href="%s" target="_blank">refer</a> for more advanced tutorials.', 'all-in-one-video-gallery' ), 'https://plugins360.com/all-in-one-video-gallery/documentation/' );
117
+ ?>
118
+ </p>
119
+ <?php
120
+ }
121
+
122
+ ?>
123
124
+ <?php
125
+
126
+ if ( 'aiovg_support' == $active_tab ) {
127
+ ?>
128
+ <p class="about-description"><?php
129
+ _e( 'Need Help?', 'all-in-one-video-gallery' );
130
+ ?></p>
131
132
<div class="changelog">
133
<div class="two-col">
134
<div class="col">
135
+ <h3><?php
136
+ _e( 'Phenomenal Support', 'all-in-one-video-gallery' );
137
+ ?></h3>
138
139
<p>
140
+ <?php
141
+ printf( __( 'We do our best to provide the best support we can. If you encounter a problem or have a question, simply submit your question using our <a href="%s" target="_blank">support form</a>.', 'all-in-one-video-gallery' ), 'https://wordpress.org/support/plugin/all-in-one-video-gallery' );
142
+ ?>
143
</p>
144
</div>
145
146
<div class="col">
147
+ <h3><?php
148
+ _e( 'Need Even Faster Support?', 'all-in-one-video-gallery' );
149
+ ?></h3>
150
151
<p>
152
+ <?php
153
+ printf( __( 'Our <a href="%s" target="_blank">Priority Support</a> system is there for customers that need faster and/or more in-depth assistance.', 'all-in-one-video-gallery' ), 'https://plugins360.com/support/' );
154
+ ?>
155
</p>
156
</div>
157
</div>
158
</div>
159
+ <?php
160
+ }
161
+
162
+ ?>
163
164
</div>
admin/videos.php CHANGED
@@ -78,7 +78,7 @@ class AIOVG_Admin_Videos {
78
'menu_position' => 10,
79
'menu_icon' => 'dashicons-playlist-video',
80
'show_in_admin_bar' => true,
81
- 'show_in_nav_menus' => true,
82
'show_in_rest' => false,
83
'can_export' => true,
84
'has_archive' => true,
78
'menu_position' => 10,
79
'menu_icon' => 'dashicons-playlist-video',
80
'show_in_admin_bar' => true,
81
+ 'show_in_nav_menus' => false,
82
'show_in_rest' => false,
83
'can_export' => true,
84
'has_archive' => true,
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.9
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.9' );
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.6.0
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.6.0' );
80
}
81
// The unique identifier of the plugin
82
if ( !defined( 'AIOVG_PLUGIN_SLUG' ) ) {
freemius/includes/class-freemius.php CHANGED
@@ -2977,6 +2977,10 @@
2977
* @since 1.1.7.3
2978
*/
2979
static function _toggle_debug_mode() {
2980
$is_on = fs_request_get( 'is_on', false, 'post' );
2981
2982
if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) {
@@ -3008,8 +3012,16 @@
3008
* @since 1.2.1.7
3009
*/
3010
static function _get_db_option() {
3011
$option_name = fs_request_get( 'option_name' );
3012
3013
$value = get_option( $option_name );
3014
3015
$result = array(
@@ -3032,7 +3044,16 @@
3032
* @since 1.2.1.7
3033
*/
3034
static function _set_db_option() {
3035
- $option_name = fs_request_get( 'option_name' );
3036
$option_value = fs_request_get( 'option_value' );
3037
3038
if ( ! empty( $option_value ) ) {
2977
* @since 1.1.7.3
2978
*/
2979
static function _toggle_debug_mode() {
2980
+ if ( ! is_super_admin() ) {
2981
+ return;
2982
+ }
2983
+
2984
$is_on = fs_request_get( 'is_on', false, 'post' );
2985
2986
if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) {
3012
* @since 1.2.1.7
3013
*/
3014
static function _get_db_option() {
3015
+ check_admin_referer( 'fs_get_db_option' );
3016
+
3017
$option_name = fs_request_get( 'option_name' );
3018
3019
+ if ( ! is_super_admin() ||
3020
+ ! fs_starts_with( $option_name, 'fs_' )
3021
+ ) {
3022
+ self::shoot_ajax_failure();
3023
+ }
3024
+
3025
$value = get_option( $option_name );
3026
3027
$result = array(
3044
* @since 1.2.1.7
3045
*/
3046
static function _set_db_option() {
3047
+ check_admin_referer( 'fs_set_db_option' );
3048
+
3049
+ $option_name = fs_request_get( 'option_name' );
3050
+
3051
+ if ( ! is_super_admin() ||
3052
+ ! fs_starts_with( $option_name, 'fs_' )
3053
+ ) {
3054
+ self::shoot_ajax_failure();
3055
+ }
3056
+
3057
$option_value = fs_request_get( 'option_value' );
3058
3059
if ( ! empty( $option_value ) ) {
freemius/start.php CHANGED
@@ -15,7 +15,7 @@
15
*
16
* @var string
17
*/
18
- $this_sdk_version = '2.2.3';
19
20
#region SDK Selection Logic --------------------------------------------------------------------
21
15
*
16
* @var string
17
*/
18
+ $this_sdk_version = '2.2.4';
19
20
#region SDK Selection Logic --------------------------------------------------------------------
21
freemius/templates/debug.php CHANGED
@@ -113,6 +113,7 @@
113
if (optionName) {
114
$.post(ajaxurl, {
115
action : 'fs_get_db_option',
116
option_name: optionName
117
}, function (response) {
118
if (response.data.value)
@@ -132,6 +133,7 @@
132
if (optionValue) {
133
$.post(ajaxurl, {
134
action : 'fs_set_db_option',
135
option_name : optionName,
136
option_value: optionValue
137
}, function () {
113
if (optionName) {
114
$.post(ajaxurl, {
115
action : 'fs_get_db_option',
116
+ _wpnonce : '<?php echo wp_create_nonce( 'fs_get_db_option' ) ?>',
117
option_name: optionName
118
}, function (response) {
119
if (response.data.value)
133
if (optionValue) {
134
$.post(ajaxurl, {
135
action : 'fs_set_db_option',
136
+ _wpnonce : '<?php echo wp_create_nonce( 'fs_set_db_option' ) ?>',
137
option_name : optionName,
138
option_value: optionValue
139
}, function () {
freemius/templates/forms/deactivation/form.php CHANGED
@@ -1,497 +1,497 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.1.2
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * @var array $VARS
15
- */
16
- $fs = freemius( $VARS['id'] );
17
- $slug = $fs->get_slug();
18
-
19
- $confirmation_message = $fs->apply_filters( 'uninstall_confirmation_message', '' );
20
-
21
- $reasons = $VARS['reasons'];
22
-
23
- $reasons_list_items_html = '';
24
-
25
- foreach ( $reasons as $reason ) {
26
- $list_item_classes = 'reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' );
27
-
28
- if ( isset( $reason['internal_message'] ) && ! empty( $reason['internal_message'] ) ) {
29
- $list_item_classes .= ' has-internal-message';
30
- $reason_internal_message = $reason['internal_message'];
31
- } else {
32
- $reason_internal_message = '';
33
- }
34
-
35
- $reason_input_type = ( ! empty( $reason['input_type'] ) ? $reason['input_type'] : '' );
36
- $reason_input_placeholder = ( ! empty( $reason['input_placeholder'] ) ? $reason['input_placeholder'] : '' );
37
-
38
- $reason_list_item_html = <<< HTML
39
- <li class="{$list_item_classes}"
40
- data-input-type="{$reason_input_type}"
41
- data-input-placeholder="{$reason_input_placeholder}">
42
- <label>
43
- <span>
44
- <input type="radio" name="selected-reason" value="{$reason['id']}"/>
45
- </span>
46
- <span>{$reason['text']}</span>
47
- </label>
48
- <div class="internal-message">{$reason_internal_message}</div>
49
- </li>
50
- HTML;
51
-
52
- $reasons_list_items_html .= $reason_list_item_html;
53
- }
54
-
55
- $is_anonymous = ( ! $fs->is_registered() );
56
- if ( $is_anonymous ) {
57
- $anonymous_feedback_checkbox_html = sprintf(
58
- '<label class="anonymous-feedback-label"><input type="checkbox" class="anonymous-feedback-checkbox"> %s</label>',
59
- fs_esc_html_inline( 'Anonymous feedback', 'anonymous-feedback', $slug )
60
- );
61
- } else {
62
- $anonymous_feedback_checkbox_html = '';
63
- }
64
-
65
- // Aliases.
66
- $deactivate_text = fs_text_inline( 'Deactivate', 'deactivate', $slug );
67
- $theme_text = fs_text_inline( 'Theme', 'theme', $slug );
68
- $activate_x_text = fs_text_inline( 'Activate %s', 'activate-x', $slug );
69
-
70
- fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
71
- ?>
72
- <?php $fs->_maybe_add_subscription_cancellation_dialog_box() ?>
73
- <script type="text/javascript">
74
- (function ($) {
75
- var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ) ?>,
76
- modalHtml =
77
- '<div class="fs-modal fs-modal-deactivation-feedback<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
78
- + ' <div class="fs-modal-dialog">'
79
- + ' <div class="fs-modal-header">'
80
- + ' <h4><?php fs_esc_attr_echo_inline( 'Quick Feedback', 'quick-feedback' , $slug ) ?></h4>'
81
- + ' </div>'
82
- + ' <div class="fs-modal-body">'
83
- + ' <div class="fs-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
84
- + ' <div class="fs-modal-panel active" data-panel-id="reasons"><h3><strong><?php echo esc_js( sprintf( fs_text_inline( 'If you have a moment, please let us know why you are %s', 'deactivation-share-reason' , $slug ), ( $fs->is_plugin() ? fs_text_inline( 'deactivating', 'deactivating', $slug ) : fs_text_inline( 'switching', 'switching', $slug ) ) ) ) ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
85
- + ' </div>'
86
- + ' <div class="fs-modal-footer">'
87
- + ' <?php echo $anonymous_feedback_checkbox_html ?>'
88
- + ' <a href="#" class="button button-secondary button-deactivate"></a>'
89
- + ' <a href="#" class="button button-primary button-close"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>'
90
- + ' </div>'
91
- + ' </div>'
92
- + '</div>',
93
- $modal = $(modalHtml),
94
- $deactivateLink = $('#the-list .deactivate > [data-module-id=<?php echo $fs->get_id() ?>].fs-module-id').prev(),
95
- selectedReasonID = false,
96
- redirectLink = '',
97
- $anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
98
- isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
99
- otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
100
- dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
101
- deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_any_active_valid_license() ? 'true' : 'false' ?>,
102
- $subscriptionCancellationModal = $( '.fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>' );
103
-
104
- $modal.appendTo($('body'));
105
-
106
- if ( 0 !== $subscriptionCancellationModal.length ) {
107
- $subscriptionCancellationModal.on( '<?php echo $fs->get_action_tag( 'subscription_cancellation_action' ) ?>', function( evt, cancelSubscription ) {
108
- if ( false === cancelSubscription ) {
109
- showModal();
110
-
111
- $subscriptionCancellationModal.trigger( 'closeModal' );
112
- } else {
113
- var $errorMessage = $subscriptionCancellationModal.find( '.notice-error' );
114
-
115
- <?php
116
- $subscription_cancellation_context = $fs->is_paid_trial() ?
117
- fs_text_inline( 'trial', 'trial', $slug ) :
118
- fs_text_inline( 'subscription', 'subscription', $slug );
119
- ?>
120
-
121
- $.ajax({
122
- url : ajaxurl,
123
- method : 'POST',
124
- data : {
125
- action : '<?php echo $fs->get_ajax_action( 'cancel_subscription_or_trial' ) ?>',
126
- security : '<?php echo $fs->get_ajax_security( 'cancel_subscription_or_trial' ) ?>',
127
- module_id: '<?php echo $fs->get_id() ?>'
128
- },
129
- beforeSend: function() {
130
- $errorMessage.hide();
131
-
132
- $subscriptionCancellationModal.find( '.fs-modal-footer .button' ).addClass( 'disabled' );
133
- $subscriptionCancellationModal.find( '.fs-modal-footer .button-primary' ).text( '<?php echo esc_js(
134
- sprintf( fs_text_inline( 'Cancelling %s...', 'cancelling-x' , $slug ), $subscription_cancellation_context )
135
- ) ?>' );
136
- },
137
- success: function( result ) {
138
- if ( result.success ) {
139
- $subscriptionCancellationModal.removeClass( 'has-subscription-actions' );
140
- $subscriptionCancellationModal.find( '.fs-modal-footer .button-primary' ).removeClass( 'warn' );
141
-
142
- $subscriptionCancellationModal.remove();
143
- showModal();
144
- } else {
145
- $errorMessage.find( '> p' ).html( result.error );
146
- $errorMessage.show();
147
-
148
- $subscriptionCancellationModal.find( '.fs-modal-footer .button' ).removeClass( 'disabled' );
149
- $subscriptionCancellationModal.find( '.fs-modal-footer .button-primary' ).html( <?php echo json_encode( sprintf(
150
- fs_text_inline( 'Cancel %s & Proceed', 'cancel-x-and-proceed', $slug ),
151
- ucfirst( $subscription_cancellation_context )
152
- ) ) ?> );
153
- }
154
- }
155
- });
156
- }
157
- });
158
- }
159
-
160
- registerEventHandlers();
161
-
162
- function registerEventHandlers() {
163
- $deactivateLink.click(function (evt) {
164
- evt.preventDefault();
165
-
166
- redirectLink = $(this).attr('href');
167
-
168
- if ( 0 == $subscriptionCancellationModal.length ) {
169
- showModal();
170
- } else {
171
- $subscriptionCancellationModal.trigger( 'showModal' );
172
- }
173
- });
174
-
175
- <?php
176
- if ( ! $fs->is_plugin() ) {
177
- /**
178
- * For "theme" module type, the modal is shown when the current user clicks on
179
- * the "Activate" button of any other theme. The "Activate" button is actually
180
- * a link to the "Themes" page (/wp-admin/themes.php) containing query params
181
- * that tell WordPress to deactivate the current theme and activate a different theme.
182
- *
183
- * @author Leo Fajardo (@leorw)
184
- * @since 1.2.2
185
- *
186
- * @since 1.2.2.7 Don't trigger the deactivation feedback form if activating the premium version of the theme.
187
- */
188
- ?>
189
- $('body').on('click', '.theme-browser .theme:not([data-slug=<?php echo $fs->get_premium_slug() ?>]) .theme-actions .button.activate', function (evt) {
190
- evt.preventDefault();
191
-
192
- redirectLink = $(this).attr('href');
193
-
194
- showModal();
195
- });
196
- <?php
197
- } ?>
198
-
199
- $modal.on('input propertychange', '.reason-input input', function () {
200
- if (!isOtherReasonSelected()) {
201
- return;
202
- }
203
-
204
- var reason = $(this).val().trim();
205
-
206
- /**
207
- * If reason is not empty, remove the error-message class of the message container
208
- * to change the message color back to default.
209
- */
210
- if (reason.length > 0) {
211
- $('.message').removeClass('error-message');
212
- enableDeactivateButton();
213
- }
214
- });
215
-
216
- $modal.on('blur', '.reason-input input', function () {
217
- var $userReason = $(this);
218
-
219
- setTimeout(function () {
220
- if (!isOtherReasonSelected()) {
221
- return;
222
- }
223
-
224
- /**
225
- * If reason is empty, add the error-message class to the message container
226
- * to change the message color to red.
227
- */
228
- if (0 === $userReason.val().trim().length) {
229
- $('.message').addClass('error-message');
230
- disableDeactivateButton();
231
- }
232
- }, 150);
233
- });
234
-
235
- $modal.on('click', '.fs-modal-footer .button', function (evt) {
236
- evt.preventDefault();
237
-
238
- if ($(this).hasClass('disabled')) {
239
- return;
240
- }
241
-
242
- var _parent = $(this).parents('.fs-modal:first');
243
- var _this = $(this);
244
-
245
- if (_this.hasClass('allow-deactivate')) {
246
- var $radio = $('input[type="radio"]:checked');
247
-
248
- if (0 === $radio.length) {
249
- if ( ! deleteThemeUpdateData ) {
250
- // If no selected reason, just deactivate the plugin.
251
- window.location.href = redirectLink;
252
- } else {
253
- $.ajax({
254
- url : ajaxurl,
255
- method : 'POST',
256
- data : {
257
- action : '<?php echo $fs->get_ajax_action( 'delete_theme_update_data' ) ?>',
258
- security : '<?php echo $fs->get_ajax_security( 'delete_theme_update_data' ) ?>',
259
- module_id: '<?php echo $fs->get_id() ?>'
260
- },
261
- beforeSend: function() {
262
- _parent.find( '.fs-modal-footer .button' ).addClass( 'disabled' );
263
- _parent.find( '.fs-modal-footer .button-secondary' ).text( 'Processing...' );
264
- },
265
- complete : function() {
266
- window.location.href = redirectLink;
267
- }
268
- });
269
- }
270
-
271
- return;
272
- }
273
-
274
- var $selected_reason = $radio.parents('li:first'),
275
- $input = $selected_reason.find('textarea, input[type="text"]'),
276
- userReason = ( 0 !== $input.length ) ? $input.val().trim() : '';
277
-
278
- if (isOtherReasonSelected() && ( '' === userReason )) {
279
- return;
280
- }
281
-
282
- $.ajax({
283
- url : ajaxurl,
284
- method : 'POST',
285
- data : {
286
- action : '<?php echo $fs->get_ajax_action( 'submit_uninstall_reason' ) ?>',
287
- security : '<?php echo $fs->get_ajax_security( 'submit_uninstall_reason' ) ?>',
288
- module_id : '<?php echo $fs->get_id() ?>',
289
- reason_id : $radio.val(),
290
- reason_info : userReason,
291
- is_anonymous: isAnonymousFeedback()
292
- },
293
- beforeSend: function () {
294
- _parent.find('.fs-modal-footer .button').addClass('disabled');
295
- _parent.find('.fs-modal-footer .button-secondary').text('Processing...');
296
- },
297
- complete : function () {
298
- // Do not show the dialog box, deactivate the plugin.
299
- window.location.href = redirectLink;
300
- }
301
- });
302
- } else if (_this.hasClass('button-deactivate')) {
303
- // Change the Deactivate button's text and show the reasons panel.
304
- _parent.find('.button-deactivate').addClass('allow-deactivate');
305
-
306
- showPanel('reasons');
307
- }
308
- });
309
-
310
- $modal.on('click', 'input[type="radio"]', function () {
311
- var $selectedReasonOption = $( this );
312
-
313
- // If the selection has not changed, do not proceed.
314
- if (selectedReasonID === $selectedReasonOption.val())
315
- return;
316
-
317
- selectedReasonID = $selectedReasonOption.val();
318
-
319
- if ( isAnonymous ) {
320
- if ( isReasonSelected( dontShareDataReasonID ) ) {
321
- $anonymousFeedback.hide();
322
- } else {
323
- $anonymousFeedback.show();
324
- }
325
- }
326
-
327
- var _parent = $(this).parents('li:first');
328
-
329
- $modal.find('.reason-input').remove();
330
- $modal.find( '.internal-message' ).hide();
331
- $modal.find('.button-deactivate').html('<?php echo esc_js( sprintf(
332
- fs_text_inline( 'Submit & %s', 'deactivation-modal-button-submit' , $slug ),
333
- $fs->is_plugin() ?
334
- $deactivate_text :
335
- sprintf( $activate_x_text, $theme_text )
336
- ) ) ?>');
337
-
338
- enableDeactivateButton();
339
-
340
- if ( _parent.hasClass( 'has-internal-message' ) ) {
341
- _parent.find( '.internal-message' ).show();
342
- }
343
-
344
- if (_parent.hasClass('has-input')) {
345
- var inputType = _parent.data('input-type'),
346
- inputPlaceholder = _parent.data('input-placeholder'),
347
- reasonInputHtml = '<div class="reason-input"><span class="message"></span>' + ( ( 'textfield' === inputType ) ? '<input type="text" />' : '<textarea rows="5"></textarea>' ) + '</div>';
348
-
349
- _parent.append($(reasonInputHtml));
350
- _parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
351
-
352
- if (isOtherReasonSelected()) {
353
- showMessage('<?php echo esc_js( fs_text_inline( 'Kindly tell us the reason so we can improve.', 'ask-for-reason-message' , $slug ) ); ?>');
354
- disableDeactivateButton();
355
- }
356
- }
357
- });
358
-
359
- // If the user has clicked outside the window, cancel it.
360
- $modal.on('click', function (evt) {
361
- var $target = $(evt.target);
362
-
363
- // If the user has clicked anywhere in the modal dialog, just return.
364
- if ($target.hasClass('fs-modal-body') || $target.hasClass('fs-modal-footer')) {
365
- return;
366
- }
367
-
368
- // If the user has not clicked the close button and the clicked element is inside the modal dialog, just return.
369
- if (
370
- ! $target.hasClass( 'button-close' ) &&
371
- ( $target.parents( '.fs-modal-body' ).length > 0 || $target.parents( '.fs-modal-footer' ).length > 0 )
372
- ) {
373
- return;
374
- }
375
-
376
- closeModal();
377
-
378
- return false;
379
- });
380
- }
381
-
382
- function isAnonymousFeedback() {
383
- if ( ! isAnonymous ) {
384
- return false;
385
- }
386
-
387
- return ( isReasonSelected( dontShareDataReasonID ) || $anonymousFeedback.find( 'input' ).prop( 'checked' ) );
388
- }
389
-
390
- function isReasonSelected( reasonID ) {
391
- // Get the selected radio input element.
392
- var $selectedReasonOption = $modal.find('input[type="radio"]:checked');
393
-
394
- return ( reasonID == $selectedReasonOption.val() );
395
- }
396
-
397
- function isOtherReasonSelected() {
398
- return isReasonSelected( otherReasonID );
399
- }
400
-
401
- function showModal() {
402
- resetModal();
403
-
404
- // Display the dialog box.
405
- $modal.addClass('active');
406
-
407
- $('body').addClass('has-fs-modal');
408
- }
409
-
410
- function closeModal() {
411
- $modal.removeClass('active');
412
-
413
- $('body').removeClass('has-fs-modal');
414
- }
415
-
416
- function resetModal() {
417
- selectedReasonID = false;
418
-
419
- enableDeactivateButton();
420
-
421
- // Uncheck all radio buttons.
422
- $modal.find('input[type="radio"]').prop('checked', false);
423
-
424
- // Remove all input fields ( textfield, textarea ).
425
- $modal.find('.reason-input').remove();
426
-
427
- $modal.find('.message').hide();
428
-
429
- if ( isAnonymous ) {
430
- $anonymousFeedback.find( 'input' ).prop( 'checked', false );
431
-
432
- // Hide, since by default there is no selected reason.
433
- $anonymousFeedback.hide();
434
- }
435
-
436
- var $deactivateButton = $modal.find('.button-deactivate');
437
-
438
- /*
439
- * If the modal dialog has no confirmation message, that is, it has only one panel, then ensure
440
- * that clicking the deactivate button will actually deactivate the plugin.
441
- */
442
- if ( $modal.hasClass( 'no-confirmation-message' ) ) {
443
- $deactivateButton.addClass( 'allow-deactivate' );
444
-
445
- showPanel( 'reasons' );
446
- } else {
447
- $deactivateButton.removeClass( 'allow-deactivate' );
448
-
449
- showPanel( 'confirm' );
450
- }
451
- }
452
-
453
- function showMessage(message) {
454
- $modal.find('.message').text(message).show();
455
- }
456
-
457
- function enableDeactivateButton() {
458
- $modal.find('.button-deactivate').removeClass('disabled');
459
- }
460
-
461
- function disableDeactivateButton() {
462
- $modal.find('.button-deactivate').addClass('disabled');
463
- }
464
-
465
- function showPanel(panelType) {
466
- $modal.find( '.fs-modal-panel' ).removeClass( 'active' );
467
- $modal.find( '[data-panel-id="' + panelType + '"]' ).addClass( 'active' );
468
-
469
- updateButtonLabels();
470
- }
471
-
472
- function updateButtonLabels() {
473
- var $deactivateButton = $modal.find( '.button-deactivate' );
474
-
475
- // Reset the deactivate button's text.
476
- if ( 'confirm' === getCurrentPanel() ) {
477
- $deactivateButton.text( <?php echo json_encode( sprintf(
478
- fs_text_inline( 'Yes - %s', 'deactivation-modal-button-confirm', $slug ),
479
- $fs->is_plugin() ?
480
- $deactivate_text :
481
- sprintf( $activate_x_text, $theme_text )
482
- ) ) ?> );
483
- } else {
484
- $deactivateButton.html( <?php echo json_encode( sprintf(
485
- fs_text_inline('Skip & %s', 'skip-and-x', $slug ),
486
- $fs->is_plugin() ?
487
- $deactivate_text :
488
- sprintf( $activate_x_text, $theme_text )
489
- ) ) ?> );
490
- }
491
- }
492
-
493
- function getCurrentPanel() {
494
- return $modal.find('.fs-modal-panel.active').attr('data-panel-id');
495
- }
496
- })(jQuery);
497
- </script>
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.1.2
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ */
16
+ $fs = freemius( $VARS['id'] );
17
+ $slug = $fs->get_slug();
18
+
19
+ $confirmation_message = $fs->apply_filters( 'uninstall_confirmation_message', '' );
20
+
21
+ $reasons = $VARS['reasons'];
22
+
23
+ $reasons_list_items_html = '';
24
+
25
+ foreach ( $reasons as $reason ) {
26
+ $list_item_classes = 'reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' );
27
+
28
+ if ( isset( $reason['internal_message'] ) && ! empty( $reason['internal_message'] ) ) {
29
+ $list_item_classes .= ' has-internal-message';
30
+ $reason_internal_message = $reason['internal_message'];
31
+ } else {
32
+ $reason_internal_message = '';
33
+ }
34
+
35
+ $reason_input_type = ( ! empty( $reason['input_type'] ) ? $reason['input_type'] : '' );
36
+ $reason_input_placeholder = ( ! empty( $reason['input_placeholder'] ) ? $reason['input_placeholder'] : '' );
37
+
38
+ $reason_list_item_html = <<< HTML
39
+ <li class="{$list_item_classes}"
40
+ data-input-type="{$reason_input_type}"
41
+ data-input-placeholder="{$reason_input_placeholder}">
42
+ <label>
43
+ <span>
44
+ <input type="radio" name="selected-reason" value="{$reason['id']}"/>
45
+ </span>
46
+ <span>{$reason['text']}</span>
47
+ </label>
48
+ <div class="internal-message">{$reason_internal_message}</div>
49
+ </li>
50
+ HTML;
51
+
52
+ $reasons_list_items_html .= $reason_list_item_html;
53
+ }
54
+
55
+ $is_anonymous = ( ! $fs->is_registered() );
56
+ if ( $is_anonymous ) {
57
+ $anonymous_feedback_checkbox_html = sprintf(
58
+ '<label class="anonymous-feedback-label"><input type="checkbox" class="anonymous-feedback-checkbox"> %s</label>',
59
+ fs_esc_html_inline( 'Anonymous feedback', 'anonymous-feedback', $slug )
60
+ );
61
+ } else {
62
+ $anonymous_feedback_checkbox_html = '';
63
+ }
64
+
65
+ // Aliases.
66
+ $deactivate_text = fs_text_inline( 'Deactivate', 'deactivate', $slug );
67
+ $theme_text = fs_text_inline( 'Theme', 'theme', $slug );
68
+ $activate_x_text = fs_text_inline( 'Activate %s', 'activate-x', $slug );
69
+
70
+ fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
71
+ ?>
72
+ <?php $fs->_maybe_add_subscription_cancellation_dialog_box() ?>
73
+ <script type="text/javascript">
74
+ (function ($) {
75
+ var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ) ?>,
76
+ modalHtml =
77
+ '<div class="fs-modal fs-modal-deactivation-feedback<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
78
+ + ' <div class="fs-modal-dialog">'
79
+ + ' <div class="fs-modal-header">'
80
+ + ' <h4><?php fs_esc_attr_echo_inline( 'Quick Feedback', 'quick-feedback' , $slug ) ?></h4>'
81
+ + ' </div>'
82
+ + ' <div class="fs-modal-body">'
83
+ + ' <div class="fs-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
84
+ + ' <div class="fs-modal-panel active" data-panel-id="reasons"><h3><strong><?php echo esc_js( sprintf( fs_text_inline( 'If you have a moment, please let us know why you are %s', 'deactivation-share-reason' , $slug ), ( $fs->is_plugin() ? fs_text_inline( 'deactivating', 'deactivating', $slug ) : fs_text_inline( 'switching', 'switching', $slug ) ) ) ) ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
85
+ + ' </div>'
86
+ + ' <div class="fs-modal-footer">'
87
+ + ' <?php echo $anonymous_feedback_checkbox_html ?>'
88
+ + ' <a href="#" class="button button-secondary button-deactivate"></a>'
89
+ + ' <a href="#" class="button button-primary button-close"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>'
90
+ + ' </div>'
91
+ + ' </div>'
92
+ + '</div>',
93
+ $modal = $(modalHtml),
94
+ $deactivateLink = $('#the-list .deactivate > [data-module-id=<?php echo $fs->get_id() ?>].fs-module-id').prev(),
95
+ selectedReasonID = false,
96
+ redirectLink = '',
97
+ $anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
98
+ isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
99
+ otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
100
+ dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
101
+ deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_any_active_valid_license() ? 'true' : 'false' ?>,
102
+ $subscriptionCancellationModal = $( '.fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>' );
103
+
104
+ $modal.appendTo($('body'));
105
+
106
+ if ( 0 !== $subscriptionCancellationModal.length ) {
107
+ $subscriptionCancellationModal.on( '<?php echo $fs->get_action_tag( 'subscription_cancellation_action' ) ?>', function( evt, cancelSubscription ) {
108
+ if ( false === cancelSubscription ) {
109
+ showModal();
110
+
111
+ $subscriptionCancellationModal.trigger( 'closeModal' );
112
+ } else {
113
+ var $errorMessage = $subscriptionCancellationModal.find( '.notice-error' );
114
+
115
+ <?php
116
+ $subscription_cancellation_context = $fs->is_paid_trial() ?
117
+ fs_text_inline( 'trial', 'trial', $slug ) :
118
+ fs_text_inline( 'subscription', 'subscription', $slug );
119
+ ?>
120
+
121
+ $.ajax({
122
+ url : ajaxurl,
123
+ method : 'POST',
124
+ data : {
125
+ action : '<?php echo $fs->get_ajax_action( 'cancel_subscription_or_trial' ) ?>',
126
+ security : '<?php echo $fs->get_ajax_security( 'cancel_subscription_or_trial' ) ?>',
127
+ module_id: '<?php echo $fs->get_id() ?>'
128
+ },
129
+ beforeSend: function() {
130
+ $errorMessage.hide();
131
+
132
+ $subscriptionCancellationModal.find( '.fs-modal-footer .button' ).addClass( 'disabled' );
133
+ $subscriptionCancellationModal.find( '.fs-modal-footer .button-primary' ).text( '<?php echo esc_js(
134
+ sprintf( fs_text_inline( 'Cancelling %s...', 'cancelling-x' , $slug ), $subscription_cancellation_context )
135
+ ) ?>' );
136
+ },
137
+ success: function( result ) {
138
+ if ( result.success ) {
139
+ $subscriptionCancellationModal.removeClass( 'has-subscription-actions' );
140
+ $subscriptionCancellationModal.find( '.fs-modal-footer .button-primary' ).removeClass( 'warn' );
141
+
142
+ $subscriptionCancellationModal.remove();
143
+ showModal();
144
+ } else {
145
+ $errorMessage.find( '> p' ).html( result.error );
146
+ $errorMessage.show();
147
+
148
+ $subscriptionCancellationModal.find( '.fs-modal-footer .button' ).removeClass( 'disabled' );
149
+ $subscriptionCancellationModal.find( '.fs-modal-footer .button-primary' ).html( <?php echo json_encode( sprintf(
150
+ fs_text_inline( 'Cancel %s & Proceed', 'cancel-x-and-proceed', $slug ),
151
+ ucfirst( $subscription_cancellation_context )
152
+ ) ) ?> );
153
+ }
154
+ }
155
+ });
156
+ }
157
+ });
158
+ }
159
+
160
+ registerEventHandlers();
161
+
162
+ function registerEventHandlers() {
163
+ $deactivateLink.click(function (evt) {
164
+ evt.preventDefault();
165
+
166
+ redirectLink = $(this).attr('href');
167
+
168
+ if ( 0 == $subscriptionCancellationModal.length ) {
169
+ showModal();
170
+ } else {
171
+ $subscriptionCancellationModal.trigger( 'showModal' );
172
+ }
173
+ });
174
+
175
+ <?php
176
+ if ( ! $fs->is_plugin() ) {
177
+ /**
178
+ * For "theme" module type, the modal is shown when the current user clicks on
179
+ * the "Activate" button of any other theme. The "Activate" button is actually
180
+ * a link to the "Themes" page (/wp-admin/themes.php) containing query params
181
+ * that tell WordPress to deactivate the current theme and activate a different theme.
182
+ *
183
+ * @author Leo Fajardo (@leorw)
184
+ * @since 1.2.2
185
+ *
186
+ * @since 1.2.2.7 Don't trigger the deactivation feedback form if activating the premium version of the theme.
187
+ */
188
+ ?>
189
+ $('body').on('click', '.theme-browser .theme:not([data-slug=<?php echo $fs->get_premium_slug() ?>]) .theme-actions .button.activate', function (evt) {
190
+ evt.preventDefault();
191
+
192
+ redirectLink = $(this).attr('href');
193
+
194
+ showModal();
195
+ });
196
+ <?php
197
+ } ?>
198
+
199
+ $modal.on('input propertychange', '.reason-input input', function () {
200
+ if (!isOtherReasonSelected()) {
201
+ return;
202
+ }
203
+
204
+ var reason = $(this).val().trim();
205
+
206
+ /**
207
+ * If reason is not empty, remove the error-message class of the message container
208
+ * to change the message color back to default.
209
+ */
210
+ if (reason.length > 0) {
211
+ $('.message').removeClass('error-message');
212
+ enableDeactivateButton();
213
+ }
214
+ });
215
+
216
+ $modal.on('blur', '.reason-input input', function () {
217
+ var $userReason = $(this);
218
+
219
+ setTimeout(function () {
220
+ if (!isOtherReasonSelected()) {
221
+ return;
222
+ }
223
+
224
+ /**
225
+ * If reason is empty, add the error-message class to the message container
226
+ * to change the message color to red.
227
+ */
228
+ if (0 === $userReason.val().trim().length) {
229
+ $('.message').addClass('error-message');
230
+ disableDeactivateButton();
231
+ }
232
+ }, 150);
233
+ });
234
+
235
+ $modal.on('click', '.fs-modal-footer .button', function (evt) {
236
+ evt.preventDefault();
237
+
238
+ if ($(this).hasClass('disabled')) {
239
+ return;
240
+ }
241
+
242
+ var _parent = $(this).parents('.fs-modal:first');
243
+ var _this = $(this);
244
+
245
+ if (_this.hasClass('allow-deactivate')) {
246
+ var $radio = $('input[type="radio"]:checked');
247
+
248
+ if (0 === $radio.length) {
249
+ if ( ! deleteThemeUpdateData ) {
250
+ // If no selected reason, just deactivate the plugin.
251
+ window.location.href = redirectLink;
252
+ } else {
253
+ $.ajax({
254
+ url : ajaxurl,
255
+ method : 'POST',
256
+ data : {
257
+ action : '<?php echo $fs->get_ajax_action( 'delete_theme_update_data' ) ?>',
258
+ security : '<?php echo $fs->get_ajax_security( 'delete_theme_update_data' ) ?>',
259
+ module_id: '<?php echo $fs->get_id() ?>'
260
+ },
261
+ beforeSend: function() {
262
+ _parent.find( '.fs-modal-footer .button' ).addClass( 'disabled' );
263
+ _parent.find( '.fs-modal-footer .button-secondary' ).text( 'Processing...' );
264
+ },
265
+ complete : function() {
266
+ window.location.href = redirectLink;
267
+ }
268
+ });
269
+ }
270
+
271
+ return;
272
+ }
273
+
274
+ var $selected_reason = $radio.parents('li:first'),
275
+ $input = $selected_reason.find('textarea, input[type="text"]'),
276
+ userReason = ( 0 !== $input.length ) ? $input.val().trim() : '';
277
+
278
+ if (isOtherReasonSelected() && ( '' === userReason )) {
279
+ return;
280
+ }
281
+
282
+ $.ajax({
283
+ url : ajaxurl,
284
+ method : 'POST',
285
+ data : {
286
+ action : '<?php echo $fs->get_ajax_action( 'submit_uninstall_reason' ) ?>',
287
+ security : '<?php echo $fs->get_ajax_security( 'submit_uninstall_reason' ) ?>',
288
+ module_id : '<?php echo $fs->get_id() ?>',
289
+ reason_id : $radio.val(),
290
+ reason_info : userReason,
291
+ is_anonymous: isAnonymousFeedback()
292
+ },
293
+ beforeSend: function () {
294
+ _parent.find('.fs-modal-footer .button').addClass('disabled');
295
+ _parent.find('.fs-modal-footer .button-secondary').text('Processing...');
296
+ },
297
+ complete : function () {
298
+ // Do not show the dialog box, deactivate the plugin.
299
+ window.location.href = redirectLink;
300
+ }
301
+ });
302
+ } else if (_this.hasClass('button-deactivate')) {
303
+ // Change the Deactivate button's text and show the reasons panel.
304
+ _parent.find('.button-deactivate').addClass('allow-deactivate');
305
+
306
+ showPanel('reasons');
307
+ }
308
+ });
309
+
310
+ $modal.on('click', 'input[type="radio"]', function () {
311
+ var $selectedReasonOption = $( this );
312
+
313
+ // If the selection has not changed, do not proceed.
314
+ if (selectedReasonID === $selectedReasonOption.val())
315
+ return;
316
+
317
+ selectedReasonID = $selectedReasonOption.val();
318
+
319
+ if ( isAnonymous ) {
320
+ if ( isReasonSelected( dontShareDataReasonID ) ) {
321
+ $anonymousFeedback.hide();
322
+ } else {
323
+ $anonymousFeedback.show();
324
+ }
325
+ }
326
+
327
+ var _parent = $(this).parents('li:first');
328
+
329
+ $modal.find('.reason-input').remove();
330
+ $modal.find( '.internal-message' ).hide();
331
+ $modal.find('.button-deactivate').html('<?php echo esc_js( sprintf(
332
+ fs_text_inline( 'Submit & %s', 'deactivation-modal-button-submit' , $slug ),
333
+ $fs->is_plugin() ?
334
+ $deactivate_text :
335
+ sprintf( $activate_x_text, $theme_text )
336
+ ) ) ?>');
337
+
338
+ enableDeactivateButton();
339
+
340
+ if ( _parent.hasClass( 'has-internal-message' ) ) {
341
+ _parent.find( '.internal-message' ).show();
342
+ }
343
+
344
+ if (_parent.hasClass('has-input')) {
345
+ var inputType = _parent.data('input-type'),
346
+ inputPlaceholder = _parent.data('input-placeholder'),
347
+ reasonInputHtml = '<div class="reason-input"><span class="message"></span>' + ( ( 'textfield' === inputType ) ? '<input type="text" />' : '<textarea rows="5"></textarea>' ) + '</div>';
348
+
349
+ _parent.append($(reasonInputHtml));
350
+ _parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
351
+
352
+ if (isOtherReasonSelected()) {
353
+ showMessage('<?php echo esc_js( fs_text_inline( 'Kindly tell us the reason so we can improve.', 'ask-for-reason-message' , $slug ) ); ?>');
354
+ disableDeactivateButton();
355
+ }
356
+ }
357
+ });
358
+
359
+ // If the user has clicked outside the window, cancel it.
360
+ $modal.on('click', function (evt) {
361
+ var $target = $(evt.target);
362
+
363
+ // If the user has clicked anywhere in the modal dialog, just return.
364
+ if ($target.hasClass('fs-modal-body') || $target.hasClass('fs-modal-footer')) {
365
+ return;
366
+ }
367
+
368
+ // If the user has not clicked the close button and the clicked element is inside the modal dialog, just return.
369
+ if (
370
+ ! $target.hasClass( 'button-close' ) &&
371
+ ( $target.parents( '.fs-modal-body' ).length > 0 || $target.parents( '.fs-modal-footer' ).length > 0 )
372
+ ) {
373
+ return;
374
+ }
375
+
376
+ closeModal();
377
+
378
+ return false;
379
+ });
380
+ }
381
+
382
+ function isAnonymousFeedback() {
383
+ if ( ! isAnonymous ) {
384
+ return false;
385
+ }
386
+
387
+ return ( isReasonSelected( dontShareDataReasonID ) || $anonymousFeedback.find( 'input' ).prop( 'checked' ) );
388
+ }
389
+
390
+ function isReasonSelected( reasonID ) {
391
+ // Get the selected radio input element.
392
+ var $selectedReasonOption = $modal.find('input[type="radio"]:checked');
393
+
394
+ return ( reasonID == $selectedReasonOption.val() );
395
+ }
396
+
397
+ function isOtherReasonSelected() {
398
+ return isReasonSelected( otherReasonID );
399
+ }
400
+
401
+ function showModal() {
402
+ resetModal();
403
+
404
+ // Display the dialog box.
405
+ $modal.addClass('active');
406
+
407
+ $('body').addClass('has-fs-modal');
408
+ }
409
+
410
+ function closeModal() {
411
+ $modal.removeClass('active');
412
+
413
+ $('body').removeClass('has-fs-modal');
414
+ }
415
+
416
+ function resetModal() {
417
+ selectedReasonID = false;
418
+
419
+ enableDeactivateButton();
420
+
421
+ // Uncheck all radio buttons.
422
+ $modal.find('input[type="radio"]').prop('checked', false);
423
+
424
+ // Remove all input fields ( textfield, textarea ).
425
+ $modal.find('.reason-input').remove();
426
+
427
+ $modal.find('.message').hide();
428
+
429
+ if ( isAnonymous ) {
430
+ $anonymousFeedback.find( 'input' ).prop( 'checked', false );
431
+
432
+ // Hide, since by default there is no selected reason.
433
+ $anonymousFeedback.hide();
434
+ }
435
+
436
+ var $deactivateButton = $modal.find('.button-deactivate');
437
+
438
+ /*
439
+ * If the modal dialog has no confirmation message, that is, it has only one panel, then ensure
440
+ * that clicking the deactivate button will actually deactivate the plugin.
441
+ */
442
+ if ( $modal.hasClass( 'no-confirmation-message' ) ) {
443
+ $deactivateButton.addClass( 'allow-deactivate' );
444
+
445
+ showPanel( 'reasons' );
446
+ } else {
447
+ $deactivateButton.removeClass( 'allow-deactivate' );
448
+
449
+ showPanel( 'confirm' );
450
+ }
451
+ }
452
+
453
+ function showMessage(message) {
454
+ $modal.find('.message').text(message).show();
455
+ }
456
+
457
+ function enableDeactivateButton() {
458
+ $modal.find('.button-deactivate').removeClass('disabled');
459
+ }
460
+
461
+ function disableDeactivateButton() {
462
+ $modal.find('.button-deactivate').addClass('disabled');
463
+ }
464
+
465
+ function showPanel(panelType) {
466
+ $modal.find( '.fs-modal-panel' ).removeClass( 'active' );
467
+ $modal.find( '[data-panel-id="' + panelType + '"]' ).addClass( 'active' );
468
+
469
+ updateButtonLabels();
470
+ }
471
+
472
+ function updateButtonLabels() {
473
+ var $deactivateButton = $modal.find( '.button-deactivate' );
474
+
475
+ // Reset the deactivate button's text.
476
+ if ( 'confirm' === getCurrentPanel() ) {
477
+ $deactivateButton.text( <?php echo json_encode( sprintf(
478
+ fs_text_inline( 'Yes - %s', 'deactivation-modal-button-confirm', $slug ),
479
+ $fs->is_plugin() ?
480
+ $deactivate_text :
481
+ sprintf( $activate_x_text, $theme_text )
482
+ ) ) ?> );
483
+ } else {
484
+ $deactivateButton.html( <?php echo json_encode( sprintf(
485
+ fs_text_inline('Skip & %s', 'skip-and-x', $slug ),
486
+ $fs->is_plugin() ?
487
+ $deactivate_text :
488
+ sprintf( $activate_x_text, $theme_text )
489
+ ) ) ?> );
490
+ }
491
+ }
492
+
493
+ function getCurrentPanel() {
494
+ return $modal.find('.fs-modal-panel.active').attr('data-panel-id');
495
+ }
496
+ })(jQuery);
497
+ </script>
includes/functions.php CHANGED
@@ -758,7 +758,6 @@ function aiovg_get_default_settings() {
758
'fullscreen' => 'fullscreen'
759
),
760
'use_native_controls' => array(
761
- 'vimeo' => 'vimeo',
762
'dailymotion' => 'dailymotion',
763
'facebook' => 'facebook'
764
)
@@ -973,7 +972,6 @@ function aiovg_get_page_number() {
973
function aiovg_get_player_html( $post_id = 0, $atts = array() ) {
974
// Vars
975
$player_settings = get_option( 'aiovg_player_settings' );
976
- $privacy_settings = get_option( 'aiovg_privacy_settings' );
977
978
$attributes = array_merge( array(
979
'width' => $player_settings['width'],
@@ -998,47 +996,17 @@ function aiovg_get_player_html( $post_id = 0, $atts = array() ) {
998
), $atts );
999
1000
$url = aiovg_get_player_page_url( $post_id, $attributes );
1001
-
1002
- $show_consent = 0;
1003
- if ( ! isset( $_COOKIE['aiovg_gdpr_consent'] ) && ! empty( $privacy_settings['show_consent'] ) && ! empty( $privacy_settings['consent_message'] ) && ! empty( $privacy_settings['consent_button_label'] ) ) {
1004
- $show_consent = 1;
1005
- }
1006
1007
// Process output
1008
$html = '';
1009
1010
if ( ! empty( $url ) ) {
1011
- $url = esc_url( $url );
1012
- $iframe = sprintf( '<iframe width="560" height="315" src="%s" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>', $url );
1013
-
1014
- if ( $show_consent ) {
1015
- $url_parts = explode( '?' , $url );
1016
-
1017
- $is_youtube = ( false !== strpos( $url_parts[0], 'youtube.com' ) );
1018
- $is_vimeo = ( false !== strpos( $url_parts[0], 'vimeo.com' ) );
1019
- $is_dailymotion = ( false !== strpos( $url_parts[0], 'dailymotion.com' ) );
1020
- $is_facebook = ( false !== strpos( $url_parts[0], 'facebook.com' ) );
1021
-
1022
- if ( $is_youtube || $is_vimeo || $is_dailymotion || $is_facebook ) {
1023
- $video = add_query_arg( 'autoplay', 1, $url );
1024
-
1025
- $image = '';
1026
- if ( $post_id > 0 ) {
1027
- $post_meta = get_post_meta( $post_id );
1028
- $image = aiovg_get_image_url( $post_meta['image_id'][0], 'large', $post_meta['image'][0], 'player' );
1029
- }
1030
-
1031
- $iframe = sprintf( '<iframe width="560" height="315" data-src="%s" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>', $video );
1032
- $iframe .= sprintf( '<div class="aiovg-privacy-wrapper" style="background-image: url(%s);">', $image );
1033
- $iframe .= '<div class="aiovg-privacy-consent-block">';
1034
- $iframe .= sprintf( '<div class="aiovg-privacy-consent-message">%s</div>', wp_kses_post( $privacy_settings['consent_message'] ) );
1035
- $iframe .= sprintf( '<div class="aiovg-privacy-consent-button">%s</div>', sanitize_text_field( $privacy_settings['consent_button_label'] ) );
1036
- $iframe .= '</div>';
1037
- $iframe .= '</div>';
1038
- }
1039
- }
1040
1041
- $html = sprintf(
1042
'<div class="aiovg-player-container" style="max-width: %s;"><div class="aiovg-player" style="padding-bottom: %s;">%s</div></div>',
1043
! empty( $attributes['width'] ) ? (int) $attributes['width'] . 'px' : '100%',
1044
! empty( $attributes['ratio'] ) ? (float) $attributes['ratio'] . '%' : '56.25%',
@@ -1059,7 +1027,6 @@ function aiovg_get_player_html( $post_id = 0, $atts = array() ) {
1059
* @return string $url Player page URL.
1060
*/
1061
function aiovg_get_player_page_url( $post_id = 0, $atts = array() ) {
1062
- $player_settings = get_option( 'aiovg_player_settings' );
1063
$page_settings = get_option( 'aiovg_page_settings' );
1064
1065
$url = '';
@@ -1120,74 +1087,6 @@ function aiovg_get_player_page_url( $post_id = 0, $atts = array() ) {
1120
$url = add_query_arg( $query_args, $url );
1121
}
1122
1123
- // Overwrite URL for embedded sources
1124
- $embedded_sources = array( 'youtube', 'vimeo', 'dailymotion', 'facebook' );
1125
-
1126
- if ( $post_id > 0 ) {
1127
- $type = get_post_meta( $post_id, 'type', true );
1128
-
1129
- if ( 'embedcode' == $type ) {
1130
- $embedcode = get_post_meta( $post_id, 'embedcode', true );
1131
-
1132
- $document = new DOMDocument();
1133
- $document->loadHTML( $embedcode );
1134
-
1135
- $iframes = $document->getElementsByTagName( 'iframe' );
1136
- $url = $iframes->item(0)->getAttribute( 'src' );
1137
- } elseif ( in_array( $type, $embedded_sources ) && isset( $player_settings['use_native_controls'][ $type ] ) ) {
1138
- if ( ! array_key_exists( $type, $query_args ) ) {
1139
- $query_args[ $type ] = get_post_meta( $post_id, $type, true );
1140
- }
1141
- }
1142
- }
1143
-
1144
- foreach ( $embedded_sources as $source ) {
1145
- if ( array_key_exists( $source, $query_args ) && isset( $player_settings['use_native_controls'][ $source ] ) ) {
1146
- switch ( $source ) {
1147
- case 'youtube':
1148
- $url = 'https://www.youtube.com/embed/' . aiovg_get_youtube_id_from_url( urldecode( $query_args['youtube'] ) ) . '?showinfo=0&rel=0&iv_load_policy=3';
1149
- break;
1150
- case 'vimeo':
1151
- $url = 'https://player.vimeo.com/video/' . aiovg_get_vimeo_id_from_url( urldecode( $query_args['vimeo'] ) ) . '?title=0&byline=0&portrait=0';
1152
- break;
1153
- case 'dailymotion':
1154
- $url = 'https://www.dailymotion.com/embed/video/' . aiovg_get_dailymotion_id_from_url( urldecode( $query_args['dailymotion'] ) ) . '?queue-autoplay-next=0&queue-enable=0&sharing-enable=0&ui-logo=0&ui-start-screen-info=0';
1155
- break;
1156
- case 'facebook':
1157
- $url = 'https://www.facebook.com/plugins/video.php?href=' . urlencode( urldecode( $query_args['facebook'] ) ) . '&width=560&height=315&show_text=false&appId';
1158
- break;
1159
- }
1160
-
1161
- $features = array( 'playpause', 'current', 'progress', 'duration', 'volume', 'fullscreen' );
1162
- $controls = array();
1163
- foreach ( $features as $feature ) {
1164
- if ( array_key_exists( $feature, $query_args ) ) {
1165
- if ( 1 == (int) $query_args[ $feature ] ) {
1166
- $controls[] = $feature;
1167
- }
1168
- } else {
1169
- if ( isset( $player_settings['controls'][ $feature ] ) ) {
1170
- $controls[] = $feature;
1171
- }
1172
- }
1173
- }
1174
-
1175
- if ( empty( $controls ) ) {
1176
- $url = add_query_arg( 'controls', 0, $url );
1177
- } else {
1178
- if ( ! array_key_exists( 'fullscreen', $controls ) ) {
1179
- $url = add_query_arg( 'fs', 0, $url );
1180
- }
1181
- }
1182
-
1183
- $autoplay = array_key_exists( 'autoplay', $query_args ) ? $query_args['autoplay'] : $player_settings['autoplay'];
1184
- $url = add_query_arg( 'autoplay', (int) $autoplay, $url );
1185
-
1186
- $loop = array_key_exists( 'loop', $query_args ) ? $query_args['loop'] : $player_settings['loop'];
1187
- $url = add_query_arg( 'loop', (int) $loop, $url );
1188
- }
1189
- }
1190
-
1191
// Return
1192
return apply_filters( 'aiovg_player_page_url', $url, $post_id, $atts );
1193
}
@@ -1622,14 +1521,6 @@ function the_aiovg_pagination( $numpages = '', $pagerange = '', $paged = '' ) {
1622
*/
1623
function the_aiovg_player( $post_id = 0, $atts = array() ) {
1624
echo aiovg_get_player_html( $post_id, $atts );
1625
-
1626
- // Update views count for Iframe Embed Codes
1627
- if ( $post_id > 0 ) {
1628
- $type = get_post_meta( $post_id, 'type', true );
1629
- if ( 'embedcode' == $type ) {
1630
- aiovg_update_views_count( $post_id );
1631
- }
1632
- }
1633
}
1634
1635
/**
758
'fullscreen' => 'fullscreen'
759
),
760
'use_native_controls' => array(
761
'dailymotion' => 'dailymotion',
762
'facebook' => 'facebook'
763
)
972
function aiovg_get_player_html( $post_id = 0, $atts = array() ) {
973
// Vars
974
$player_settings = get_option( 'aiovg_player_settings' );
975
976
$attributes = array_merge( array(
977
'width' => $player_settings['width'],
996
), $atts );
997
998
$url = aiovg_get_player_page_url( $post_id, $attributes );
999
1000
// Process output
1001
$html = '';
1002
1003
if ( ! empty( $url ) ) {
1004
+ $iframe = sprintf(
1005
+ '<iframe width="560" height="315" src="%s" frameborder="0" scrolling="no" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',
1006
+ esc_url( $url )
1007
+ );
1008
1009
+ $html = sprintf(
1010
'<div class="aiovg-player-container" style="max-width: %s;"><div class="aiovg-player" style="padding-bottom: %s;">%s</div></div>',
1011
! empty( $attributes['width'] ) ? (int) $attributes['width'] . 'px' : '100%',
1012
! empty( $attributes['ratio'] ) ? (float) $attributes['ratio'] . '%' : '56.25%',
1027
* @return string $url Player page URL.
1028
*/
1029
function aiovg_get_player_page_url( $post_id = 0, $atts = array() ) {
1030
$page_settings = get_option( 'aiovg_page_settings' );
1031
1032
$url = '';
1087
$url = add_query_arg( $query_args, $url );
1088
}
1089
1090
// Return
1091
return apply_filters( 'aiovg_player_page_url', $url, $post_id, $atts );
1092
}
1521
*/
1522
function the_aiovg_player( $post_id = 0, $atts = array() ) {
1523
echo aiovg_get_player_html( $post_id, $atts );
1524
}
1525
1526
/**
languages/all-in-one-video-gallery.pot CHANGED
@@ -1,8 +1,8 @@
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: All-in-One Video Gallery\n"
4
- "POT-Creation-Date: 2019-02-15 10:00+0530\n"
5
- "PO-Revision-Date: 2019-02-15 10:00+0530\n"
6
"Last-Translator: \n"
7
"Language-Team: \n"
8
"Language: en_US\n"
@@ -113,7 +113,7 @@ msgid "Categories list navigation"
113
msgstr ""
114
115
#: admin/categories.php:124 admin/settings.php:331 admin/videos.php:393
116
- #: blocks/blocks.php:81 includes/functions.php:282
117
#: widgets/forms/categories.php:64
118
msgid "ID"
119
msgstr ""
@@ -186,7 +186,7 @@ msgid "OGV"
186
msgstr ""
187
188
#: admin/partials/video-sources.php:92 admin/partials/video-sources.php:95
189
- #: admin/settings.php:279 includes/functions.php:1263
190
msgid "YouTube"
191
msgstr ""
192
@@ -195,7 +195,7 @@ msgid "Example: https://www.youtube.com/watch?v=twYp6W6vt2U"
195
msgstr ""
196
197
#: admin/partials/video-sources.php:103 admin/partials/video-sources.php:106
198
- #: admin/settings.php:280 includes/functions.php:1264
199
msgid "Vimeo"
200
msgstr ""
201
@@ -204,7 +204,7 @@ msgid "Example: https://vimeo.com/108018156"
204
msgstr ""
205
206
#: admin/partials/video-sources.php:114 admin/partials/video-sources.php:117
207
- #: admin/settings.php:281 includes/functions.php:1265
208
msgid "Dailymotion"
209
msgstr ""
210
@@ -213,8 +213,8 @@ msgid "Example: https://www.dailymotion.com/video/x11prnt"
213
msgstr ""
214
215
#: admin/partials/video-sources.php:125 admin/partials/video-sources.php:128
216
- #: admin/settings.php:282 admin/settings.php:502 includes/functions.php:1266
217
- #: includes/functions.php:1663
218
msgid "Facebook"
219
msgstr ""
220
@@ -231,7 +231,7 @@ msgid "Enter your Iframe Embed Code here"
231
msgstr ""
232
233
#: admin/partials/video-sources.php:160 admin/partials/video-sources.php:163
234
- #: admin/settings.php:266 blocks/blocks.php:121 includes/functions.php:599
235
#: widgets/forms/video.php:84
236
msgid "Duration"
237
msgstr ""
@@ -294,100 +294,75 @@ msgstr ""
294
295
#: admin/partials/welcome.php:15
296
#, php-format
297
- msgid "Welcome to \"All-in-One Video Gallery - %s\""
298
msgstr ""
299
300
#: admin/partials/welcome.php:18
301
- msgid "No coding required. A Responsive & Lightweight video gallery plugin."
302
msgstr ""
303
304
- #: admin/partials/welcome.php:22
305
- msgid ""
306
- "HTML5 Video Player, Custom Post Type interface, Categories, Visual Gallery "
307
- "Builder (Gutenberg), forms to Search Videos, Social Sharing and everything "
308
- "you will need to build a YouTube/Vimeo like video sharing website."
309
- msgstr ""
310
-
311
- #: admin/partials/welcome.php:38
312
- msgid ""
313
- "Supports any browser & video formats such as MP4, WebM, OGV and embeddable "
314
- "players like YouTube, Vimeo, Dailymotion, Facebook, etc."
315
- msgstr ""
316
-
317
- #: admin/partials/welcome.php:48
318
- msgid "Configure Settings"
319
- msgstr ""
320
-
321
- #: admin/partials/welcome.php:53
322
- msgid ""
323
- "100+ Settings. Configure player options like \"Autoplay\", \"Loop\", "
324
- "\"Preload\" and gallery options like \"Number of Columns\", \"Pagination\", "
325
- "\"Comments\", etc."
326
- msgstr ""
327
-
328
- #: admin/partials/welcome.php:62
329
- msgid "Categories &rarr; Add"
330
msgstr ""
331
332
- #: admin/partials/welcome.php:67
333
- msgid ""
334
- "Create unlimited categories and subcategory levels. Categories allow you to "
335
- "organize your videos in a way that makes it easy for your users to find "
336
- "exactly what they're looking for."
337
msgstr ""
338
339
#: admin/partials/welcome.php:76
340
- msgid "Video Gallery &rarr; Add New"
341
msgstr ""
342
343
- #: admin/partials/welcome.php:81
344
- msgid ""
345
- "Add unlimited videos. \"All-in-One Video Gallery\" videos are CUSTOM POST "
346
- "TYPE called \"aiovg_videos\". So, each video is a POST. This makes the "
347
- "gallery more powerful and the possibility of extending the plugin is huge."
348
msgstr ""
349
350
- #: admin/partials/welcome.php:89
351
- msgid "Front-End Gallery Display"
352
msgstr ""
353
354
- #: admin/partials/welcome.php:93
355
- msgid ""
356
- "100% Gutenberg compatible. Visually build your gallery using the plugin's "
357
- "Gutenberg Blocks. There is a Shortcode Builder for the old classic WP Editor."
358
msgstr ""
359
360
- #: admin/partials/welcome.php:101
361
- msgid "Configure Sidebars"
362
msgstr ""
363
364
- #: admin/partials/welcome.php:105
365
msgid ""
366
- "Decorate your website sidebars using our Widgets. There are separate Widgets "
367
- "available for categories display, video gallery, single video player, search "
368
- "form, etc."
369
msgstr ""
370
371
- #: admin/partials/welcome.php:113
372
- msgid "More Features"
373
msgstr ""
374
375
- #: admin/partials/welcome.php:117
376
msgid ""
377
- "There is a PREMIUM version with even more powerful features like Custom Logo "
378
- "& Branding, HLS / M(PEG)-Dash support, Live Streaming, Popup Gallery, Videos "
379
- "Slider, VAST / VPAID Ads, etc."
380
msgstr ""
381
382
- #: admin/partials/welcome.php:125
383
msgid "Need Help?"
384
msgstr ""
385
386
- #: admin/partials/welcome.php:130
387
msgid "Phenomenal Support"
388
msgstr ""
389
390
- #: admin/partials/welcome.php:133
391
#, php-format
392
msgid ""
393
"We do our best to provide the best support we can. If you encounter a "
@@ -395,11 +370,11 @@ msgid ""
395
"\"%s\" target=\"_blank\">support form</a>."
396
msgstr ""
397
398
- #: admin/partials/welcome.php:138
399
msgid "Need Even Faster Support?"
400
msgstr ""
401
402
- #: admin/partials/welcome.php:141
403
#, php-format
404
msgid ""
405
"Our <a href=\"%s\" target=\"_blank\">Priority Support</a> system is there "
@@ -418,9 +393,9 @@ msgstr ""
418
msgid "Advanced"
419
msgstr ""
420
421
- #: admin/settings.php:117 blocks/blocks.php:106 includes/functions.php:231
422
- #: includes/functions.php:333 includes/functions.php:534
423
- #: includes/functions.php:630
424
msgid "General Settings"
425
msgstr ""
426
@@ -492,7 +467,7 @@ msgid ""
492
msgstr ""
493
494
#: admin/settings.php:203 admin/settings.php:290 blocks/blocks.php:107
495
- #: includes/functions.php:545 premium/widgets/forms/companion.php:15
496
#: widgets/forms/video.php:46
497
msgid "Width"
498
msgstr ""
@@ -505,8 +480,8 @@ msgid ""
505
msgstr ""
506
507
#: admin/settings.php:210 admin/settings.php:297 blocks/blocks.php:109
508
- #: includes/functions.php:261 includes/functions.php:419
509
- #: includes/functions.php:552 widgets/forms/video.php:51
510
msgid "Ratio"
511
msgstr ""
512
@@ -544,7 +519,7 @@ msgstr ""
544
msgid "Cinemascope"
545
msgstr ""
546
547
- #: admin/settings.php:227 blocks/blocks.php:111 includes/functions.php:559
548
#: widgets/forms/video.php:57
549
msgid "Autoplay"
550
msgstr ""
@@ -553,7 +528,7 @@ msgstr ""
553
msgid "Check this to start playing the video as soon as it is ready"
554
msgstr ""
555
556
- #: admin/settings.php:234 blocks/blocks.php:112 includes/functions.php:566
557
#: widgets/forms/video.php:62
558
msgid "Loop"
559
msgstr ""
@@ -596,37 +571,37 @@ msgstr ""
596
msgid "None"
597
msgstr ""
598
599
- #: admin/settings.php:259 blocks/blocks.php:117 includes/functions.php:574
600
#: widgets/forms/video.php:65
601
msgid "Player Controls"
602
msgstr ""
603
604
- #: admin/settings.php:263 blocks/blocks.php:118 includes/functions.php:578
605
#: widgets/forms/video.php:69
606
msgid "Play / Pause"
607
msgstr ""
608
609
- #: admin/settings.php:264 blocks/blocks.php:119 includes/functions.php:585
610
#: widgets/forms/video.php:74
611
msgid "Current Time"
612
msgstr ""
613
614
- #: admin/settings.php:265 blocks/blocks.php:120 includes/functions.php:592
615
#: widgets/forms/video.php:79
616
msgid "Progressbar"
617
msgstr ""
618
619
- #: admin/settings.php:267 admin/videos.php:143 includes/functions.php:606
620
#: widgets/forms/video.php:89
621
msgid "Subtitles"
622
msgstr ""
623
624
- #: admin/settings.php:268 blocks/blocks.php:122 includes/functions.php:613
625
#: widgets/forms/video.php:94
626
msgid "Volume"
627
msgstr ""
628
629
- #: admin/settings.php:269 blocks/blocks.php:123 includes/functions.php:620
630
#: widgets/forms/video.php:99
631
msgid "Fullscreen"
632
msgstr ""
@@ -655,24 +630,24 @@ msgid ""
655
msgstr ""
656
657
#: admin/settings.php:306 admin/settings.php:381 blocks/blocks.php:76
658
- #: includes/functions.php:242 includes/functions.php:344
659
- #: includes/functions.php:634 widgets/forms/categories.php:39
660
#: widgets/forms/search.php:20
661
msgid "Select Template"
662
msgstr ""
663
664
- #: admin/settings.php:310 blocks/blocks.php:77 includes/functions.php:246
665
#: widgets/forms/categories.php:43
666
msgid "Grid"
667
msgstr ""
668
669
- #: admin/settings.php:311 blocks/blocks.php:78 includes/functions.php:247
670
#: widgets/forms/categories.php:44
671
msgid "List"
672
msgstr ""
673
674
#: admin/settings.php:317 admin/settings.php:389 blocks/blocks.php:79
675
- #: includes/functions.php:268 includes/functions.php:426
676
#: widgets/forms/categories.php:55
677
msgid "Columns"
678
msgstr ""
@@ -685,23 +660,23 @@ msgstr ""
685
msgid "Order by"
686
msgstr ""
687
688
- #: admin/settings.php:332 blocks/blocks.php:82 includes/functions.php:283
689
#: widgets/forms/categories.php:65
690
msgid "Count"
691
msgstr ""
692
693
- #: admin/settings.php:333 blocks/blocks.php:83 includes/functions.php:284
694
#: widgets/forms/categories.php:66
695
msgid "Name"
696
msgstr ""
697
698
- #: admin/settings.php:334 blocks/blocks.php:84 includes/functions.php:285
699
#: widgets/forms/categories.php:67
700
msgid "Slug"
701
msgstr ""
702
703
#: admin/settings.php:340 admin/settings.php:419 blocks/blocks.php:85
704
- #: includes/functions.php:291 includes/functions.php:389
705
#: widgets/forms/categories.php:78
706
msgid "Order"
707
msgstr ""
@@ -714,7 +689,7 @@ msgstr ""
714
msgid "Descending"
715
msgstr ""
716
717
- #: admin/settings.php:351 blocks/blocks.php:88 includes/functions.php:302
718
#: widgets/forms/categories.php:95
719
msgid "Show Hierarchy"
720
msgstr ""
@@ -723,7 +698,7 @@ msgstr ""
723
msgid "Check this to show the child categories"
724
msgstr ""
725
726
- #: admin/settings.php:358 blocks/blocks.php:89 includes/functions.php:309
727
#: widgets/forms/categories.php:100
728
msgid "Show Description"
729
msgstr ""
@@ -732,8 +707,8 @@ msgstr ""
732
msgid "Check this to show the categories description"
733
msgstr ""
734
735
- #: admin/settings.php:365 blocks/blocks.php:90 includes/functions.php:316
736
- #: includes/functions.php:447 widgets/forms/categories.php:105
737
msgid "Show Videos Count"
738
msgstr ""
739
@@ -741,7 +716,7 @@ msgstr ""
741
msgid "Check this to show the videos count next to the category name"
742
msgstr ""
743
744
- #: admin/settings.php:372 blocks/blocks.php:91 includes/functions.php:323
745
#: widgets/forms/categories.php:110
746
msgid "Hide Empty Categories"
747
msgstr ""
@@ -750,7 +725,7 @@ msgstr ""
750
msgid "Check this to hide categories with no videos"
751
msgstr ""
752
753
- #: admin/settings.php:382 includes/functions.php:345
754
#, php-format
755
msgid ""
756
"<a href=\"%s\" target=\"_blank\">Upgrade Pro</a> for more templates (Popup, "
@@ -761,7 +736,7 @@ msgstr ""
761
msgid "Enter the number of columns you like to have in the gallery view."
762
msgstr ""
763
764
- #: admin/settings.php:399 includes/functions.php:366
765
msgid "Limit (per page)"
766
msgstr ""
767
@@ -770,39 +745,39 @@ msgid ""
770
"Number of videos to show per page. Use a value of \"0\" to show all videos."
771
msgstr ""
772
773
- #: admin/settings.php:406 blocks/blocks.php:80 includes/functions.php:278
774
- #: includes/functions.php:376 widgets/forms/categories.php:60
775
msgid "Order By"
776
msgstr ""
777
778
- #: admin/settings.php:410 includes/functions.php:235 includes/functions.php:337
779
- #: includes/functions.php:380 widgets/forms/categories.php:15
780
#: widgets/forms/search.php:15 widgets/forms/video.php:15
781
msgid "Title"
782
msgstr ""
783
784
- #: admin/settings.php:411 includes/functions.php:381
785
msgid "Date Posted"
786
msgstr ""
787
788
#: admin/settings.php:412 admin/settings.php:449 admin/settings.php:473
789
- #: includes/functions.php:382
790
msgid "Views Count"
791
msgstr ""
792
793
- #: admin/settings.php:413 includes/functions.php:383
794
msgid "Random"
795
msgstr ""
796
797
- #: admin/settings.php:430 includes/functions.php:436
798
msgid "Thumbnail Style"
799
msgstr ""
800
801
- #: admin/settings.php:434 includes/functions.php:440
802
msgid "Image Top Aligned"
803
msgstr ""
804
805
- #: admin/settings.php:435 includes/functions.php:441
806
msgid "Image Left Aligned"
807
msgstr ""
808
@@ -834,7 +809,7 @@ msgstr ""
834
msgid "Video Excerpt"
835
msgstr ""
836
837
- #: admin/settings.php:457 includes/functions.php:496
838
msgid "Excerpt Length"
839
msgstr ""
840
@@ -842,7 +817,7 @@ msgstr ""
842
msgid "Number of characters."
843
msgstr ""
844
845
- #: admin/settings.php:474 includes/functions.php:407
846
msgid "Related Videos"
847
msgstr ""
848
@@ -868,7 +843,7 @@ msgstr ""
868
msgid "Enable Services"
869
msgstr ""
870
871
- #: admin/settings.php:503 includes/functions.php:1668
872
msgid "Twitter"
873
msgstr ""
874
@@ -876,7 +851,7 @@ msgstr ""
876
msgid "Google Plus"
877
msgstr ""
878
879
- #: admin/settings.php:505 includes/functions.php:1678
880
msgid "Linkedin"
881
msgstr ""
882
@@ -1168,17 +1143,17 @@ msgstr ""
1168
msgid "Categories Settings"
1169
msgstr ""
1170
1171
- #: blocks/blocks.php:75 includes/functions.php:253
1172
#: widgets/forms/categories.php:20 widgets/forms/categories.php:23
1173
msgid "Select Parent"
1174
msgstr ""
1175
1176
- #: blocks/blocks.php:86 includes/functions.php:295 includes/functions.php:393
1177
#: widgets/forms/categories.php:82
1178
msgid "ASC"
1179
msgstr ""
1180
1181
- #: blocks/blocks.php:87 includes/functions.php:296 includes/functions.php:394
1182
#: widgets/forms/categories.php:83
1183
msgid "DESC"
1184
msgstr ""
@@ -1207,15 +1182,15 @@ msgstr ""
1207
msgid "Search Form Settings"
1208
msgstr ""
1209
1210
- #: blocks/blocks.php:98 includes/functions.php:638 widgets/forms/search.php:24
1211
msgid "Vertical"
1212
msgstr ""
1213
1214
- #: blocks/blocks.php:99 includes/functions.php:639 widgets/forms/search.php:25
1215
msgid "Horizontal"
1216
msgstr ""
1217
1218
- #: blocks/blocks.php:100 includes/functions.php:645 widgets/forms/search.php:37
1219
msgid "Search By Categories"
1220
msgstr ""
1221
@@ -1255,71 +1230,71 @@ msgstr ""
1255
msgid "Remove Poster Image"
1256
msgstr ""
1257
1258
- #: includes/functions.php:352
1259
msgid "Select Categories"
1260
msgstr ""
1261
1262
- #: includes/functions.php:359
1263
msgid "Exclude Video ID(s)"
1264
msgstr ""
1265
1266
- #: includes/functions.php:400
1267
msgid "Featured Only"
1268
msgstr ""
1269
1270
- #: includes/functions.php:407
1271
msgid "Follow URL"
1272
msgstr ""
1273
1274
- #: includes/functions.php:415
1275
msgid "Gallery Settings"
1276
msgstr ""
1277
1278
- #: includes/functions.php:454
1279
msgid "Show Category Name"
1280
msgstr ""
1281
1282
- #: includes/functions.php:461
1283
msgid "Show Date Added"
1284
msgstr ""
1285
1286
- #: includes/functions.php:468
1287
msgid "Show Author Name"
1288
msgstr ""
1289
1290
- #: includes/functions.php:475
1291
msgid "Show Views Count"
1292
msgstr ""
1293
1294
- #: includes/functions.php:482
1295
msgid "Show Video Duration"
1296
msgstr ""
1297
1298
- #: includes/functions.php:489
1299
msgid "Show Video Excerpt"
1300
msgstr ""
1301
1302
- #: includes/functions.php:503
1303
msgid "Show Pagination"
1304
msgstr ""
1305
1306
- #: includes/functions.php:510
1307
msgid "Show More Button"
1308
msgstr ""
1309
1310
- #: includes/functions.php:517
1311
msgid "More Button Label"
1312
msgstr ""
1313
1314
- #: includes/functions.php:520
1315
msgid "Show More"
1316
msgstr ""
1317
1318
- #: includes/functions.php:524
1319
msgid "More Button Link"
1320
msgstr ""
1321
1322
- #: includes/functions.php:538 widgets/forms/video.php:20
1323
msgid "Select Video"
1324
msgstr ""
1325
@@ -1337,56 +1312,56 @@ msgstr ""
1337
msgid "No Items found."
1338
msgstr ""
1339
1340
- #: includes/functions.php:1262
1341
msgid "Self Hosted"
1342
msgstr ""
1343
1344
- #: includes/functions.php:1262
1345
msgid "External URL"
1346
msgstr ""
1347
1348
- #: includes/functions.php:1267
1349
msgid "Iframe Embed Code"
1350
msgstr ""
1351
1352
- #: includes/functions.php:1281
1353
msgid "Classic"
1354
msgstr ""
1355
1356
- #: includes/functions.php:1412
1357
msgid "Video Category"
1358
msgstr ""
1359
1360
- #: includes/functions.php:1416 widgets/search.php:109
1361
msgid "Search Videos"
1362
msgstr ""
1363
1364
- #: includes/functions.php:1420
1365
msgid "User Videos"
1366
msgstr ""
1367
1368
- #: includes/functions.php:1424
1369
msgid "Player Embed"
1370
msgstr ""
1371
1372
- #: includes/functions.php:1594
1373
msgid "&laquo;"
1374
msgstr ""
1375
1376
- #: includes/functions.php:1595
1377
msgid "&raquo;"
1378
msgstr ""
1379
1380
- #: includes/functions.php:1610
1381
#, php-format
1382
msgid "Page %d of %d"
1383
msgstr ""
1384
1385
- #: includes/functions.php:1673
1386
msgid "Google+"
1387
msgstr ""
1388
1389
- #: includes/functions.php:1683
1390
msgid "Pin It"
1391
msgstr ""
1392
@@ -1499,83 +1474,83 @@ msgstr ""
1499
msgid "Popup"
1500
msgstr ""
1501
1502
- #: premium/admin/slider.php:99
1503
msgid "Slider"
1504
msgstr ""
1505
1506
- #: premium/admin/slider.php:119 premium/admin/slider.php:256
1507
msgid "Slider Layout"
1508
msgstr ""
1509
1510
- #: premium/admin/slider.php:123 premium/admin/slider.php:260
1511
msgid "Player Only"
1512
msgstr ""
1513
1514
- #: premium/admin/slider.php:124 premium/admin/slider.php:261
1515
msgid "Thumbnails Only"
1516
msgstr ""
1517
1518
- #: premium/admin/slider.php:125 premium/admin/slider.php:262
1519
msgid "Player + Thumbnails"
1520
msgstr ""
1521
1522
- #: premium/admin/slider.php:137 premium/admin/slider.php:271
1523
msgid "Arrows"
1524
msgstr ""
1525
1526
- #: premium/admin/slider.php:144 premium/admin/slider.php:278
1527
msgid "Arrow Size (in pixels)"
1528
msgstr ""
1529
1530
- #: premium/admin/slider.php:154 premium/admin/slider.php:288
1531
msgid "Arrow BG Color"
1532
msgstr ""
1533
1534
- #: premium/admin/slider.php:161 premium/admin/slider.php:295
1535
msgid "Arrow Icon Color"
1536
msgstr ""
1537
1538
- #: premium/admin/slider.php:168 premium/admin/slider.php:302
1539
msgid "Arrow Radius (in pixels)"
1540
msgstr ""
1541
1542
- #: premium/admin/slider.php:178
1543
msgid "Arrow Top Offset"
1544
msgstr ""
1545
1546
- #: premium/admin/slider.php:188
1547
msgid "Arrow Left Offset"
1548
msgstr ""
1549
1550
- #: premium/admin/slider.php:198
1551
msgid "Arrow Right Offset"
1552
msgstr ""
1553
1554
- #: premium/admin/slider.php:208 premium/admin/slider.php:342
1555
msgid "Dots"
1556
msgstr ""
1557
1558
- #: premium/admin/slider.php:215
1559
msgid "Dot Size (in pixels)"
1560
msgstr ""
1561
1562
- #: premium/admin/slider.php:225 premium/admin/slider.php:359
1563
msgid "Dot Color"
1564
msgstr ""
1565
1566
- #: premium/admin/slider.php:312
1567
msgid "Arrow Top Offset (in percentage)"
1568
msgstr ""
1569
1570
- #: premium/admin/slider.php:322
1571
msgid "Arrow Left Offset (in pixels)"
1572
msgstr ""
1573
1574
- #: premium/admin/slider.php:332
1575
msgid "Arrow Right Offset (in pixels)"
1576
msgstr ""
1577
1578
- #: premium/admin/slider.php:349
1579
msgid "Dot Size"
1580
msgstr ""
1581
@@ -1624,10 +1599,6 @@ msgstr ""
1624
msgid "%d videos"
1625
msgstr ""
1626
1627
- #: public/templates/player.php:557
1628
- msgid "Please wait"
1629
- msgstr ""
1630
-
1631
#: public/templates/search-form-template-horizontal.php:27
1632
#: public/templates/search-form-template-vertical.php:27
1633
msgid "Select a Category"
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: All-in-One Video Gallery\n"
4
+ "POT-Creation-Date: 2019-03-05 21:45+0530\n"
5
+ "PO-Revision-Date: 2019-03-05 21:47+0530\n"
6
"Last-Translator: \n"
7
"Language-Team: \n"
8
"Language: en_US\n"
113
msgstr ""
114
115
#: admin/categories.php:124 admin/settings.php:331 admin/videos.php:393
116
+ #: blocks/blocks.php:81 includes/functions.php:283
117
#: widgets/forms/categories.php:64
118
msgid "ID"
119
msgstr ""
186
msgstr ""
187
188
#: admin/partials/video-sources.php:92 admin/partials/video-sources.php:95
189
+ #: admin/settings.php:279 includes/functions.php:1163
190
msgid "YouTube"
191
msgstr ""
192
195
msgstr ""
196
197
#: admin/partials/video-sources.php:103 admin/partials/video-sources.php:106
198
+ #: admin/settings.php:280 includes/functions.php:1164
199
msgid "Vimeo"
200
msgstr ""
201
204
msgstr ""
205
206
#: admin/partials/video-sources.php:114 admin/partials/video-sources.php:117
207
+ #: admin/settings.php:281 includes/functions.php:1165
208
msgid "Dailymotion"
209
msgstr ""
210
213
msgstr ""
214
215
#: admin/partials/video-sources.php:125 admin/partials/video-sources.php:128
216
+ #: admin/settings.php:282 admin/settings.php:502 includes/functions.php:1166
217
+ #: includes/functions.php:1555
218
msgid "Facebook"
219
msgstr ""
220
231
msgstr ""
232
233
#: admin/partials/video-sources.php:160 admin/partials/video-sources.php:163
234
+ #: admin/settings.php:266 blocks/blocks.php:121 includes/functions.php:600
235
#: widgets/forms/video.php:84
236
msgid "Duration"
237
msgstr ""
294
295
#: admin/partials/welcome.php:15
296
#, php-format
297
+ msgid "All-in-One Video Gallery - %s"
298
msgstr ""
299
300
#: admin/partials/welcome.php:18
301
+ msgid "The last video player & gallery plugin you'll ever need."
302
msgstr ""
303
304
+ #: admin/partials/welcome.php:23
305
+ msgid "Getting Started - Premium Features"
306
msgstr ""
307
308
+ #: admin/partials/welcome.php:27
309
+ #, php-format
310
+ msgid "Version %s"
311
msgstr ""
312
313
+ #: admin/partials/welcome.php:40 admin/partials/welcome.php:46
314
+ #: admin/partials/welcome.php:55 admin/partials/welcome.php:63
315
#: admin/partials/welcome.php:76
316
+ #, php-format
317
+ msgid "Step #%d:"
318
msgstr ""
319
320
+ #: admin/partials/welcome.php:42
321
+ msgid "Install & Activate <strong>All-in-One Video Gallery</strong>"
322
msgstr ""
323
324
+ #: admin/partials/welcome.php:48 admin/partials/welcome.php:65
325
+ msgid "Optional"
326
msgstr ""
327
328
+ #: admin/partials/welcome.php:50
329
+ msgid "Add Categories"
330
msgstr ""
331
332
+ #: admin/partials/welcome.php:58
333
+ msgid "Add Videos"
334
msgstr ""
335
336
+ #: admin/partials/welcome.php:68
337
+ #, php-format
338
msgid ""
339
+ "Add a Categories <a href=\"%s\">Page</a> to your site front-end. Find step "
340
+ "by step instructions <a href=\"%s\" target=\"_blank\">here</a>"
341
msgstr ""
342
343
+ #: admin/partials/welcome.php:80
344
+ #, php-format
345
+ msgid ""
346
+ "Add a Videos <a href=\"%s\">Page</a> to your site front-end. Find step by "
347
+ "step instructions <a href=\"%s\" target=\"_blank\">here</a>"
348
msgstr ""
349
350
+ #: admin/partials/welcome.php:90
351
+ #, php-format
352
msgid ""
353
+ "Please <a href=\"%s\" target=\"_blank\">refer</a> for more advanced "
354
+ "tutorials."
355
msgstr ""
356
357
+ #: admin/partials/welcome.php:98
358
msgid "Need Help?"
359
msgstr ""
360
361
+ #: admin/partials/welcome.php:103
362
msgid "Phenomenal Support"
363
msgstr ""
364
365
+ #: admin/partials/welcome.php:106
366
#, php-format
367
msgid ""
368
"We do our best to provide the best support we can. If you encounter a "
370
"\"%s\" target=\"_blank\">support form</a>."
371
msgstr ""
372
373
+ #: admin/partials/welcome.php:111
374
msgid "Need Even Faster Support?"
375
msgstr ""
376
377
+ #: admin/partials/welcome.php:114
378
#, php-format
379
msgid ""
380
"Our <a href=\"%s\" target=\"_blank\">Priority Support</a> system is there "
393
msgid "Advanced"
394
msgstr ""
395
396
+ #: admin/settings.php:117 blocks/blocks.php:106 includes/functions.php:232
397
+ #: includes/functions.php:334 includes/functions.php:535
398
+ #: includes/functions.php:631
399
msgid "General Settings"
400
msgstr ""
401
467
msgstr ""
468
469
#: admin/settings.php:203 admin/settings.php:290 blocks/blocks.php:107
470
+ #: includes/functions.php:546 premium/widgets/forms/companion.php:15
471
#: widgets/forms/video.php:46
472
msgid "Width"
473
msgstr ""
480
msgstr ""
481
482
#: admin/settings.php:210 admin/settings.php:297 blocks/blocks.php:109
483
+ #: includes/functions.php:262 includes/functions.php:420
484
+ #: includes/functions.php:553 widgets/forms/video.php:51
485
msgid "Ratio"
486
msgstr ""
487
519
msgid "Cinemascope"
520
msgstr ""
521
522
+ #: admin/settings.php:227 blocks/blocks.php:111 includes/functions.php:560
523
#: widgets/forms/video.php:57
524
msgid "Autoplay"
525
msgstr ""
528
msgid "Check this to start playing the video as soon as it is ready"
529
msgstr ""
530
531
+ #: admin/settings.php:234 blocks/blocks.php:112 includes/functions.php:567
532
#: widgets/forms/video.php:62
533
msgid "Loop"
534
msgstr ""
571
msgid "None"
572
msgstr ""
573
574
+ #: admin/settings.php:259 blocks/blocks.php:117 includes/functions.php:575
575
#: widgets/forms/video.php:65
576
msgid "Player Controls"
577
msgstr ""
578
579
+ #: admin/settings.php:263 blocks/blocks.php:118 includes/functions.php:579
580
#: widgets/forms/video.php:69
581
msgid "Play / Pause"
582
msgstr ""
583
584
+ #: admin/settings.php:264 blocks/blocks.php:119 includes/functions.php:586
585
#: widgets/forms/video.php:74
586
msgid "Current Time"
587
msgstr ""
588
589
+ #: admin/settings.php:265 blocks/blocks.php:120 includes/functions.php:593
590
#: widgets/forms/video.php:79
591
msgid "Progressbar"
592
msgstr ""
593
594
+ #: admin/settings.php:267 admin/videos.php:143 includes/functions.php:607
595
#: widgets/forms/video.php:89
596
msgid "Subtitles"
597
msgstr ""
598
599
+ #: admin/settings.php:268 blocks/blocks.php:122 includes/functions.php:614
600
#: widgets/forms/video.php:94
601
msgid "Volume"
602
msgstr ""
603
604
+ #: admin/settings.php:269 blocks/blocks.php:123 includes/functions.php:621
605
#: widgets/forms/video.php:99
606
msgid "Fullscreen"
607
msgstr ""
630
msgstr ""
631
632
#: admin/settings.php:306 admin/settings.php:381 blocks/blocks.php:76
633
+ #: includes/functions.php:243 includes/functions.php:345
634
+ #: includes/functions.php:635 widgets/forms/categories.php:39
635
#: widgets/forms/search.php:20
636
msgid "Select Template"
637
msgstr ""
638
639
+ #: admin/settings.php:310 blocks/blocks.php:77 includes/functions.php:247
640
#: widgets/forms/categories.php:43
641
msgid "Grid"
642
msgstr ""
643
644
+ #: admin/settings.php:311 blocks/blocks.php:78 includes/functions.php:248
645
#: widgets/forms/categories.php:44
646
msgid "List"
647
msgstr ""
648
649
#: admin/settings.php:317 admin/settings.php:389 blocks/blocks.php:79
650
+ #: includes/functions.php:269 includes/functions.php:427
651
#: widgets/forms/categories.php:55
652
msgid "Columns"
653
msgstr ""
660
msgid "Order by"
661
msgstr ""
662
663
+ #: admin/settings.php:332 blocks/blocks.php:82 includes/functions.php:284
664
#: widgets/forms/categories.php:65
665
msgid "Count"
666
msgstr ""
667
668
+ #: admin/settings.php:333 blocks/blocks.php:83 includes/functions.php:285
669
#: widgets/forms/categories.php:66
670
msgid "Name"
671
msgstr ""
672
673
+ #: admin/settings.php:334 blocks/blocks.php:84 includes/functions.php:286
674
#: widgets/forms/categories.php:67
675
msgid "Slug"
676
msgstr ""
677
678
#: admin/settings.php:340 admin/settings.php:419 blocks/blocks.php:85
679
+ #: includes/functions.php:292 includes/functions.php:390
680
#: widgets/forms/categories.php:78
681
msgid "Order"
682
msgstr ""
689
msgid "Descending"
690
msgstr ""
691
692
+ #: admin/settings.php:351 blocks/blocks.php:88 includes/functions.php:303
693
#: widgets/forms/categories.php:95
694
msgid "Show Hierarchy"
695
msgstr ""
698
msgid "Check this to show the child categories"
699
msgstr ""
700
701
+ #: admin/settings.php:358 blocks/blocks.php:89 includes/functions.php:310
702
#: widgets/forms/categories.php:100
703
msgid "Show Description"
704
msgstr ""
707
msgid "Check this to show the categories description"
708
msgstr ""
709
710
+ #: admin/settings.php:365 blocks/blocks.php:90 includes/functions.php:317
711
+ #: includes/functions.php:448 widgets/forms/categories.php:105
712
msgid "Show Videos Count"
713
msgstr ""
714
716
msgid "Check this to show the videos count next to the category name"
717
msgstr ""
718
719
+ #: admin/settings.php:372 blocks/blocks.php:91 includes/functions.php:324
720
#: widgets/forms/categories.php:110
721
msgid "Hide Empty Categories"
722
msgstr ""
725
msgid "Check this to hide categories with no videos"
726
msgstr ""
727
728
+ #: admin/settings.php:382 includes/functions.php:346
729
#, php-format
730
msgid ""
731
"<a href=\"%s\" target=\"_blank\">Upgrade Pro</a> for more templates (Popup, "
736
msgid "Enter the number of columns you like to have in the gallery view."
737
msgstr ""
738
739
+ #: admin/settings.php:399 includes/functions.php:367
740
msgid "Limit (per page)"
741
msgstr ""
742
745
"Number of videos to show per page. Use a value of \"0\" to show all videos."
746
msgstr ""
747
748
+ #: admin/settings.php:406 blocks/blocks.php:80 includes/functions.php:279
749
+ #: includes/functions.php:377 widgets/forms/categories.php:60
750
msgid "Order By"
751
msgstr ""
752
753
+ #: admin/settings.php:410 includes/functions.php:236 includes/functions.php:338
754
+ #: includes/functions.php:381 widgets/forms/categories.php:15
755
#: widgets/forms/search.php:15 widgets/forms/video.php:15
756
msgid "Title"
757
msgstr ""
758
759
+ #: admin/settings.php:411 includes/functions.php:382
760
msgid "Date Posted"
761
msgstr ""
762
763
#: admin/settings.php:412 admin/settings.php:449 admin/settings.php:473
764
+ #: includes/functions.php:383
765
msgid "Views Count"
766
msgstr ""
767
768
+ #: admin/settings.php:413 includes/functions.php:384
769
msgid "Random"
770
msgstr ""
771
772
+ #: admin/settings.php:430 includes/functions.php:437
773
msgid "Thumbnail Style"
774
msgstr ""
775
776
+ #: admin/settings.php:434 includes/functions.php:441
777
msgid "Image Top Aligned"
778
msgstr ""
779
780
+ #: admin/settings.php:435 includes/functions.php:442
781
msgid "Image Left Aligned"
782
msgstr ""
783
809
msgid "Video Excerpt"
810
msgstr ""
811
812
+ #: admin/settings.php:457 includes/functions.php:497
813
msgid "Excerpt Length"
814
msgstr ""
815
817
msgid "Number of characters."
818
msgstr ""
819
820
+ #: admin/settings.php:474 includes/functions.php:408
821
msgid "Related Videos"
822
msgstr ""
823
843
msgid "Enable Services"
844
msgstr ""
845
846
+ #: admin/settings.php:503 includes/functions.php:1560
847
msgid "Twitter"
848
msgstr ""
849
851
msgid "Google Plus"
852
msgstr ""
853
854
+ #: admin/settings.php:505 includes/functions.php:1570
855
msgid "Linkedin"
856
msgstr ""
857
1143
msgid "Categories Settings"
1144
msgstr ""
1145
1146
+ #: blocks/blocks.php:75 includes/functions.php:254
1147
#: widgets/forms/categories.php:20 widgets/forms/categories.php:23
1148
msgid "Select Parent"
1149
msgstr ""
1150
1151
+ #: blocks/blocks.php:86 includes/functions.php:296 includes/functions.php:394
1152
#: widgets/forms/categories.php:82
1153
msgid "ASC"
1154
msgstr ""
1155
1156
+ #: blocks/blocks.php:87 includes/functions.php:297 includes/functions.php:395
1157
#: widgets/forms/categories.php:83
1158
msgid "DESC"
1159
msgstr ""
1182
msgid "Search Form Settings"
1183
msgstr ""
1184
1185
+ #: blocks/blocks.php:98 includes/functions.php:639 widgets/forms/search.php:24
1186
msgid "Vertical"
1187
msgstr ""
1188
1189
+ #: blocks/blocks.php:99 includes/functions.php:640 widgets/forms/search.php:25
1190
msgid "Horizontal"
1191
msgstr ""
1192
1193
+ #: blocks/blocks.php:100 includes/functions.php:646 widgets/forms/search.php:37
1194
msgid "Search By Categories"
1195
msgstr ""
1196
1230
msgid "Remove Poster Image"
1231
msgstr ""
1232
1233
+ #: includes/functions.php:353
1234
msgid "Select Categories"
1235
msgstr ""
1236
1237
+ #: includes/functions.php:360
1238
msgid "Exclude Video ID(s)"
1239
msgstr ""
1240
1241
+ #: includes/functions.php:401
1242
msgid "Featured Only"
1243
msgstr ""
1244
1245
+ #: includes/functions.php:408
1246
msgid "Follow URL"
1247
msgstr ""
1248
1249
+ #: includes/functions.php:416
1250
msgid "Gallery Settings"
1251
msgstr ""
1252
1253
+ #: includes/functions.php:455
1254
msgid "Show Category Name"
1255
msgstr ""
1256
1257
+ #: includes/functions.php:462
1258
msgid "Show Date Added"
1259
msgstr ""
1260
1261
+ #: includes/functions.php:469
1262
msgid "Show Author Name"
1263
msgstr ""
1264
1265
+ #: includes/functions.php:476
1266
msgid "Show Views Count"
1267
msgstr ""
1268
1269
+ #: includes/functions.php:483
1270
msgid "Show Video Duration"
1271
msgstr ""
1272
1273
+ #: includes/functions.php:490
1274
msgid "Show Video Excerpt"
1275
msgstr ""
1276
1277
+ #: includes/functions.php:504
1278
msgid "Show Pagination"
1279
msgstr ""
1280
1281
+ #: includes/functions.php:511
1282
msgid "Show More Button"
1283
msgstr ""
1284
1285
+ #: includes/functions.php:518
1286
msgid "More Button Label"
1287
msgstr ""
1288
1289
+ #: includes/functions.php:521
1290
msgid "Show More"
1291
msgstr ""
1292
1293
+ #: includes/functions.php:525
1294
msgid "More Button Link"
1295
msgstr ""
1296
1297
+ #: includes/functions.php:539 widgets/forms/video.php:20
1298
msgid "Select Video"
1299
msgstr ""
1300
1312
msgid "No Items found."
1313
msgstr ""
1314
1315
+ #: includes/functions.php:1162
1316
msgid "Self Hosted"
1317
msgstr ""
1318
1319
+ #: includes/functions.php:1162
1320
msgid "External URL"
1321
msgstr ""
1322
1323
+ #: includes/functions.php:1167
1324
msgid "Iframe Embed Code"
1325
msgstr ""
1326
1327
+ #: includes/functions.php:1181
1328
msgid "Classic"
1329
msgstr ""
1330