Version Description
Download this release
Release Info
| Developer | wpdevteam |
| Plugin | |
| Version | 3.0.1 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.0 to 3.0.1
- EmbedPress/Core.php +2 -1
- EmbedPress/Ends/Back/Settings/EmbedpressSettings.php +5 -0
- EmbedPress/Ends/Back/Settings/assets/css/style.css +4 -1
- EmbedPress/Ends/Back/Settings/assets/js/settings.js +117 -2
- EmbedPress/Ends/Back/Settings/templates/custom-logo.php +14 -14
- EmbedPress/Ends/Back/Settings/templates/general.php +7 -7
- EmbedPress/Ends/Back/Settings/templates/twitch.php +8 -8
- EmbedPress/Ends/Back/Settings/templates/vimeo.php +10 -10
- EmbedPress/Ends/Back/Settings/templates/wistia.php +15 -15
- EmbedPress/Ends/Back/Settings/templates/youtube.php +10 -10
- EmbedPress/Includes/Classes/EmbedPress_Notice.php +23 -12
- EmbedPress/Includes/Classes/Feature_Enhancer.php +803 -0
- EmbedPress/Shortcode.php +5 -4
- assets/css/embedpress.css +9 -0
- embedpress.php +4 -1
- includes.php +1 -1
- readme.txt +7 -1
EmbedPress/Core.php
CHANGED
|
@@ -5,6 +5,7 @@ namespace EmbedPress;
|
|
| 5 |
use EmbedPress\Ends\Back\Handler as EndHandlerAdmin;
|
| 6 |
use EmbedPress\Ends\Back\Settings\EmbedpressSettings;
|
| 7 |
use EmbedPress\Ends\Front\Handler as EndHandlerPublic;
|
|
|
|
| 8 |
use EmbedPress\Includes\Traits\Shared;
|
| 9 |
|
| 10 |
|
|
@@ -121,7 +122,6 @@ class Core {
|
|
| 121 |
*/
|
| 122 |
public function initialize () {
|
| 123 |
global $wp_actions;
|
| 124 |
-
|
| 125 |
add_filter('oembed_providers', [$this, 'addOEmbedProviders']);
|
| 126 |
add_action('rest_api_init', [$this, 'registerOEmbedRestRoutes']);
|
| 127 |
|
|
@@ -162,6 +162,7 @@ class Core {
|
|
| 162 |
['\\EmbedPress\\ThirdParty\\BeaverBuilder', 'before_render_shortcodes']);
|
| 163 |
$this->start_plugin_tracking();
|
| 164 |
$this->loaderInstance->run();
|
|
|
|
| 165 |
}
|
| 166 |
|
| 167 |
/**
|
| 5 |
use EmbedPress\Ends\Back\Handler as EndHandlerAdmin;
|
| 6 |
use EmbedPress\Ends\Back\Settings\EmbedpressSettings;
|
| 7 |
use EmbedPress\Ends\Front\Handler as EndHandlerPublic;
|
| 8 |
+
use EmbedPress\Includes\Classes\Feature_Enhancer;
|
| 9 |
use EmbedPress\Includes\Traits\Shared;
|
| 10 |
|
| 11 |
|
| 122 |
*/
|
| 123 |
public function initialize () {
|
| 124 |
global $wp_actions;
|
|
|
|
| 125 |
add_filter('oembed_providers', [$this, 'addOEmbedProviders']);
|
| 126 |
add_action('rest_api_init', [$this, 'registerOEmbedRestRoutes']);
|
| 127 |
|
| 162 |
['\\EmbedPress\\ThirdParty\\BeaverBuilder', 'before_render_shortcodes']);
|
| 163 |
$this->start_plugin_tracking();
|
| 164 |
$this->loaderInstance->run();
|
| 165 |
+
|
| 166 |
}
|
| 167 |
|
| 168 |
/**
|
EmbedPress/Ends/Back/Settings/EmbedpressSettings.php
CHANGED
|
@@ -17,6 +17,7 @@ class EmbedpressSettings {
|
|
| 17 |
|
| 18 |
// ajax
|
| 19 |
add_action( 'wp_ajax_embedpress_elements_action', [$this, 'update_elements_list']);
|
|
|
|
| 20 |
|
| 21 |
// Migration
|
| 22 |
$option = 'embedpress_elements_updated'; // to update initially for backward compatibility
|
|
@@ -160,6 +161,7 @@ class EmbedpressSettings {
|
|
| 160 |
}
|
| 161 |
|
| 162 |
public function save_settings() {
|
|
|
|
| 163 |
if ( !empty( $_POST['ep_settings_nonce']) && wp_verify_nonce( $_POST['ep_settings_nonce'], 'ep_settings_nonce') ) {
|
| 164 |
$submit_type = !empty( $_POST['submit'] ) ? $_POST['submit'] : '';
|
| 165 |
$save_handler_method = "save_{$submit_type}_settings";
|
|
@@ -171,6 +173,9 @@ class EmbedpressSettings {
|
|
| 171 |
do_action( "after_embedpress_settings_save");
|
| 172 |
$return_url = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url();
|
| 173 |
$return_url = add_query_arg( 'success', 1, $return_url );
|
|
|
|
|
|
|
|
|
|
| 174 |
wp_safe_redirect( $return_url);
|
| 175 |
exit();
|
| 176 |
}
|
| 17 |
|
| 18 |
// ajax
|
| 19 |
add_action( 'wp_ajax_embedpress_elements_action', [$this, 'update_elements_list']);
|
| 20 |
+
add_action( 'wp_ajax_embedpress_settings_action', [$this, 'save_settings']);
|
| 21 |
|
| 22 |
// Migration
|
| 23 |
$option = 'embedpress_elements_updated'; // to update initially for backward compatibility
|
| 161 |
}
|
| 162 |
|
| 163 |
public function save_settings() {
|
| 164 |
+
// needs to check for ajax and return response accordingly.
|
| 165 |
if ( !empty( $_POST['ep_settings_nonce']) && wp_verify_nonce( $_POST['ep_settings_nonce'], 'ep_settings_nonce') ) {
|
| 166 |
$submit_type = !empty( $_POST['submit'] ) ? $_POST['submit'] : '';
|
| 167 |
$save_handler_method = "save_{$submit_type}_settings";
|
| 173 |
do_action( "after_embedpress_settings_save");
|
| 174 |
$return_url = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url();
|
| 175 |
$return_url = add_query_arg( 'success', 1, $return_url );
|
| 176 |
+
if ( wp_doing_ajax() ) {
|
| 177 |
+
wp_send_json_success();
|
| 178 |
+
}
|
| 179 |
wp_safe_redirect( $return_url);
|
| 180 |
exit();
|
| 181 |
}
|
EmbedPress/Ends/Back/Settings/assets/css/style.css
CHANGED
|
@@ -2307,7 +2307,10 @@ button.button__instagram.hover__highlight:hover .icon {
|
|
| 2307 |
display: -ms-flexbox;
|
| 2308 |
display: flex;
|
| 2309 |
}
|
| 2310 |
-
|
|
|
|
|
|
|
|
|
|
| 2311 |
@media (max-width: 1199px) {
|
| 2312 |
.frame__size__wrap {
|
| 2313 |
display: block;
|
| 2307 |
display: -ms-flexbox;
|
| 2308 |
display: flex;
|
| 2309 |
}
|
| 2310 |
+
.template__wrapper .button.ep-settings-form-changed {
|
| 2311 |
+
background: #f11d1d;
|
| 2312 |
+
color:#fff;
|
| 2313 |
+
}
|
| 2314 |
@media (max-width: 1199px) {
|
| 2315 |
.frame__size__wrap {
|
| 2316 |
display: block;
|
EmbedPress/Ends/Back/Settings/assets/js/settings.js
CHANGED
|
@@ -19,6 +19,74 @@ function embedPressRemoveURLParameter(url, parameter) {
|
|
| 19 |
return url;
|
| 20 |
}
|
| 21 |
jQuery(document).ready( function($){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
// Sidebar Menu Toggle
|
| 24 |
$('.sidebar__dropdown .sidebar__link--toggler').on('click', function(e) {
|
|
@@ -55,6 +123,8 @@ jQuery(document).ready( function($){
|
|
| 55 |
$('.preview__box img').attr('src', '');
|
| 56 |
$("#yt_logo__upload__preview").hide();
|
| 57 |
$("#yt_logo_upload_wrap").show();
|
|
|
|
|
|
|
| 58 |
})
|
| 59 |
|
| 60 |
// Logo Controller
|
|
@@ -138,6 +208,8 @@ jQuery(document).ready( function($){
|
|
| 138 |
$yt_logo_preview.attr('src', attachment.url);
|
| 139 |
$yt_logo__upload__preview.show();
|
| 140 |
curElement.attr('src', attachment.url);
|
|
|
|
|
|
|
| 141 |
}else{
|
| 142 |
console.log('something went wrong using selected image');
|
| 143 |
}
|
|
@@ -170,6 +242,51 @@ jQuery(document).ready( function($){
|
|
| 170 |
},
|
| 171 |
});
|
| 172 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
/**
|
| 174 |
* It shows success message in a toast alert
|
| 175 |
* */
|
|
@@ -191,8 +308,6 @@ jQuery(document).ready( function($){
|
|
| 191 |
}, 3000);
|
| 192 |
}
|
| 193 |
|
| 194 |
-
$('.ep-color-picker').wpColorPicker();
|
| 195 |
-
|
| 196 |
|
| 197 |
// license
|
| 198 |
$(document).on('click', '.embedpress-license-deactivation-btn', function (e) {
|
| 19 |
return url;
|
| 20 |
}
|
| 21 |
jQuery(document).ready( function($){
|
| 22 |
+
$('.ep-color-picker').wpColorPicker();
|
| 23 |
+
let formDataChanged = false;
|
| 24 |
+
let $settingsForm = $('.embedpress-settings-form');
|
| 25 |
+
let _$Forminputs = $('.embedpress-settings-form :input:not([type=submit], [disabled], button, [readonly])');
|
| 26 |
+
_$Forminputs.on('change', function(e) {
|
| 27 |
+
//':input' selector get all form fields even textarea, input, or select
|
| 28 |
+
formDataChanged = false;
|
| 29 |
+
let fields_to_avoids = ['ep_settings_nonce', '_wp_http_referer', 'g_loading_animation', 'submit'];
|
| 30 |
+
let types_to_avoid = ['button'];
|
| 31 |
+
let yes_no_type_checkbox_radios = ['yt_branding', 'embedpress_document_powered_by', 'embedpress_pro_twitch_autoplay', 'embedpress_pro_twitch_chat'];
|
| 32 |
+
let radio_names = [];
|
| 33 |
+
for (var i = 0; i < _$Forminputs.length; i++) {
|
| 34 |
+
let ip = _$Forminputs[i];
|
| 35 |
+
let input_type = ip.type;
|
| 36 |
+
let input_name = ip.name;
|
| 37 |
+
if (!fields_to_avoids.includes(input_name) && !types_to_avoid.includes(input_type)){
|
| 38 |
+
let $e_input = $(ip);
|
| 39 |
+
if ('radio' === input_type){
|
| 40 |
+
if ( !radio_names.includes(input_name)){
|
| 41 |
+
|
| 42 |
+
let $checked_radio = $(`input[name="${input_name}"]:checked`);
|
| 43 |
+
let $input__radio_wrap = $checked_radio.parents('.input__radio_wrap');
|
| 44 |
+
let checked_radio_value = $checked_radio.val();
|
| 45 |
+
$input__radio_wrap.data('value', checked_radio_value);
|
| 46 |
+
|
| 47 |
+
if ($input__radio_wrap.data('value') != $input__radio_wrap.data('default')) {
|
| 48 |
+
formDataChanged = true;
|
| 49 |
+
//break;
|
| 50 |
+
}
|
| 51 |
+
radio_names.push(input_name);
|
| 52 |
+
}
|
| 53 |
+
} else if ('checkbox' === input_type) {
|
| 54 |
+
if ($e_input.is(":checked")){
|
| 55 |
+
$e_input.data('value', $e_input.val());
|
| 56 |
+
}else{
|
| 57 |
+
if (yes_no_type_checkbox_radios.includes(input_name)){
|
| 58 |
+
$e_input.data('value', 'no');
|
| 59 |
+
}else{
|
| 60 |
+
$e_input.data('value', '');
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
if ($e_input.data('value') != $e_input.data('default')) {
|
| 64 |
+
formDataChanged = true;
|
| 65 |
+
}
|
| 66 |
+
} else {
|
| 67 |
+
if ($e_input.val() != $e_input.data('default')) {
|
| 68 |
+
formDataChanged = true;
|
| 69 |
+
//break;
|
| 70 |
+
}
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
}
|
| 76 |
+
if (formDataChanged === true) {
|
| 77 |
+
$settingsForm.find('.embedpress-submit-btn').addClass('ep-settings-form-changed');
|
| 78 |
+
} else {
|
| 79 |
+
$settingsForm.find('.embedpress-submit-btn').removeClass('ep-settings-form-changed');
|
| 80 |
+
}
|
| 81 |
+
});
|
| 82 |
+
|
| 83 |
+
window.onbeforeunload = function() {
|
| 84 |
+
if (formDataChanged === true) {
|
| 85 |
+
return "You have unsaved data. Are you sure to leave without saving them?";
|
| 86 |
+
} else {
|
| 87 |
+
return;
|
| 88 |
+
}
|
| 89 |
+
};
|
| 90 |
|
| 91 |
// Sidebar Menu Toggle
|
| 92 |
$('.sidebar__dropdown .sidebar__link--toggler').on('click', function(e) {
|
| 123 |
$('.preview__box img').attr('src', '');
|
| 124 |
$("#yt_logo__upload__preview").hide();
|
| 125 |
$("#yt_logo_upload_wrap").show();
|
| 126 |
+
$settingsForm.find('.embedpress-submit-btn').addClass('ep-settings-form-changed');
|
| 127 |
+
formDataChanged = true;
|
| 128 |
})
|
| 129 |
|
| 130 |
// Logo Controller
|
| 208 |
$yt_logo_preview.attr('src', attachment.url);
|
| 209 |
$yt_logo__upload__preview.show();
|
| 210 |
curElement.attr('src', attachment.url);
|
| 211 |
+
$settingsForm.find('.embedpress-submit-btn').addClass('ep-settings-form-changed');
|
| 212 |
+
formDataChanged = true;
|
| 213 |
}else{
|
| 214 |
console.log('something went wrong using selected image');
|
| 215 |
}
|
| 242 |
},
|
| 243 |
});
|
| 244 |
});
|
| 245 |
+
|
| 246 |
+
// track changes in settings page
|
| 247 |
+
|
| 248 |
+
// Save EmbedPRess Settings data using Ajax
|
| 249 |
+
$(document).on('submit', 'form', function (e) {
|
| 250 |
+
e.preventDefault();
|
| 251 |
+
let $form = $(this);
|
| 252 |
+
let $submit_btn = $form.find('.embedpress-submit-btn');
|
| 253 |
+
let submit_text = $submit_btn.text();
|
| 254 |
+
const form_data = $form.serializeArray();
|
| 255 |
+
const $submit_type = $submit_btn.attr('value');
|
| 256 |
+
|
| 257 |
+
$submit_btn.text('Saving...'); //@TODO; Translate the text;
|
| 258 |
+
const ajaxAction = {
|
| 259 |
+
name: "action",
|
| 260 |
+
value: 'embedpress_settings_action'
|
| 261 |
+
};
|
| 262 |
+
form_data.push(ajaxAction);
|
| 263 |
+
form_data.push({
|
| 264 |
+
name: 'submit',
|
| 265 |
+
value: $submit_type,
|
| 266 |
+
});
|
| 267 |
+
$.ajax({
|
| 268 |
+
url: ajaxurl,
|
| 269 |
+
type: 'post',
|
| 270 |
+
dataType: 'json',
|
| 271 |
+
data: form_data,
|
| 272 |
+
success: function(response) {
|
| 273 |
+
$submit_btn.removeClass('ep-settings-form-changed');
|
| 274 |
+
if (response && response.success){
|
| 275 |
+
showSuccessMessage();
|
| 276 |
+
$submit_btn.text(submit_text);
|
| 277 |
+
formDataChanged = false;
|
| 278 |
+
}else{
|
| 279 |
+
$submit_btn.text(submit_text);
|
| 280 |
+
showErrorMessage();
|
| 281 |
+
}
|
| 282 |
+
},
|
| 283 |
+
error: function(error) {
|
| 284 |
+
$submit_btn.removeClass('ep-settings-form-changed');
|
| 285 |
+
$submit_btn.text(submit_text);
|
| 286 |
+
showErrorMessage();
|
| 287 |
+
},
|
| 288 |
+
});
|
| 289 |
+
});
|
| 290 |
/**
|
| 291 |
* It shows success message in a toast alert
|
| 292 |
* */
|
| 308 |
}, 3000);
|
| 309 |
}
|
| 310 |
|
|
|
|
|
|
|
| 311 |
|
| 312 |
// license
|
| 313 |
$(document).on('click', '.embedpress-license-deactivation-btn', function (e) {
|
EmbedPress/Ends/Back/Settings/templates/custom-logo.php
CHANGED
|
@@ -14,7 +14,7 @@ $yt_logo_opacity = isset( $yt_settings['logo_opacity']) ? intval( $yt_settings['
|
|
| 14 |
$yt_logo_id = isset( $yt_settings['logo_id']) ? intval( $yt_settings['logo_id']) : 0;
|
| 15 |
$yt_logo_url = isset( $yt_settings['logo_url']) ? esc_url( $yt_settings['logo_url']) : '';
|
| 16 |
$yt_cta_url = isset( $yt_settings['cta_url']) ? esc_url( $yt_settings['cta_url']) : '';
|
| 17 |
-
$yt_branding = isset( $yt_settings['branding']) ? sanitize_text_field( $yt_settings['branding']) : (!empty( $yt_logo_url) ? 'yes': '');
|
| 18 |
|
| 19 |
|
| 20 |
$embedpress_document_powered_by = isset( $gen_settings['embedpress_document_powered_by']) ? sanitize_text_field( $gen_settings['embedpress_document_powered_by']) : 'yes';
|
|
@@ -23,7 +23,7 @@ $embedpress_document_powered_by = isset( $gen_settings['embedpress_document_powe
|
|
| 23 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 24 |
<h3><?php esc_html_e( "Global Branding Settings", "embedpress" ); ?></h3>
|
| 25 |
<div class="embedpress__settings__form">
|
| 26 |
-
<form action="" method="post" enctype="multipart/form-data">
|
| 27 |
<?php
|
| 28 |
do_action( 'embedpress_before_custom_branding_settings_fields');
|
| 29 |
echo $nonce_field ; ?>
|
|
@@ -31,7 +31,7 @@ $embedpress_document_powered_by = isset( $gen_settings['embedpress_document_powe
|
|
| 31 |
<p class="form__label">Powered by EmbedPress</p>
|
| 32 |
<div class="form__control__wrap">
|
| 33 |
<label class="input__switch switch__text">
|
| 34 |
-
<input type="checkbox" value="yes" name="embedpress_document_powered_by" <?php checked( 'yes', $embedpress_document_powered_by );?>>
|
| 35 |
<span></span>
|
| 36 |
</label>
|
| 37 |
</div>
|
|
@@ -41,14 +41,14 @@ $embedpress_document_powered_by = isset( $gen_settings['embedpress_document_powe
|
|
| 41 |
<p class="form__label"><?php esc_html_e( "YouTube Custom Branding", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">Pro</span>'; ?></p>
|
| 42 |
<div class="form__control__wrap">
|
| 43 |
<label class="input__switch switch__text <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 44 |
-
<input type="checkbox" name="yt_branding" value="yes" <?php checked( 'yes', $yt_branding);?> <?php echo $pro_active ? '': ' disabled'; ?>>
|
| 45 |
<span></span>
|
| 46 |
</label>
|
| 47 |
|
| 48 |
<div class="logo__adjust__wrap <?php echo $pro_active ? '': 'proOverlay'; ?>" style="<?php if ( ('yes' !== $yt_branding) || !$pro_active ) { echo 'display:none;'; } ?>">
|
| 49 |
<label class="logo__upload" id="yt_logo_upload_wrap" style="<?php if (!empty( $yt_logo_url)) { echo 'display:none;'; } ?>">
|
| 50 |
-
<input type="hidden" class="preview__logo__input" name="yt_logo_url" id="yt_logo_url" value="<?php echo $yt_logo_url; ?>">
|
| 51 |
-
<input type="hidden" class="preview__logo__input_id" name="yt_logo_id" id="yt_logo_id" value="<?php echo $yt_logo_id; ?>">
|
| 52 |
<span class="icon"><i class="ep-icon ep-upload"></i></span>
|
| 53 |
<span class="text"><?php esc_html_e( "Click To Upload", "embedpress" ); ?></span>
|
| 54 |
</label>
|
|
@@ -64,28 +64,28 @@ $embedpress_document_powered_by = isset( $gen_settings['embedpress_document_powe
|
|
| 64 |
<div class="logo__adjust__controller__item">
|
| 65 |
<span class="controller__label">Logo Opacity (%)</span>
|
| 66 |
<div class="logo__adjust__controller__inputs">
|
| 67 |
-
<input type="range" max="100" value="<?php echo $yt_logo_opacity; ?>" class="opacity__range" name="yt_logo_opacity">
|
| 68 |
-
<input readonly type="number" class="form__control range__value" value="<?php echo $yt_logo_opacity; ?>">
|
| 69 |
</div>
|
| 70 |
</div>
|
| 71 |
<div class="logo__adjust__controller__item">
|
| 72 |
<span class="controller__label">Logo X Position (%)</span>
|
| 73 |
<div class="logo__adjust__controller__inputs">
|
| 74 |
-
<input type="range" max="100" value="<?php echo $yt_logo_xpos; ?>" class="x__range" name="yt_logo_xpos">
|
| 75 |
-
<input readonly type="number" class="form__control range__value"
|
| 76 |
</div>
|
| 77 |
</div>
|
| 78 |
<div class="logo__adjust__controller__item">
|
| 79 |
<span class="controller__label">Logo Y Position (%)</span>
|
| 80 |
<div class="logo__adjust__controller__inputs">
|
| 81 |
-
<input type="range" max="100" value="<?php echo esc_attr( $yt_logo_ypos ); ?>" class="y__range" name="yt_logo_ypos" >
|
| 82 |
-
<input readonly type="number" class="form__control range__value" value="<?php echo esc_attr( $yt_logo_ypos ); ?>">
|
| 83 |
</div>
|
| 84 |
</div>
|
| 85 |
<div class="logo__adjust__controller__item">
|
| 86 |
<label class="controller__label" for="yt_cta_url" ><?php esc_html_e( "Call to Action Link", "embedpress" );?> </label>
|
| 87 |
<div>
|
| 88 |
-
<input type="url" name="yt_cta_url" id="yt_cta_url" class="form__control" value="<?php echo esc_attr( $yt_cta_url); ?>">
|
| 89 |
|
| 90 |
<p><?php esc_html_e( "You may link the logo to any CTA link.", "embedpress" ); ?></p>
|
| 91 |
</div>
|
|
@@ -144,7 +144,7 @@ $embedpress_document_powered_by = isset( $gen_settings['embedpress_document_powe
|
|
| 144 |
</div>
|
| 145 |
</div>
|
| 146 |
<?php do_action( 'embedpress_after_custom_branding_settings_fields'); ?>
|
| 147 |
-
<button class="button button__themeColor radius-10" name="submit" value="custom_logo"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 148 |
</form>
|
| 149 |
</div>
|
| 150 |
</div>
|
| 14 |
$yt_logo_id = isset( $yt_settings['logo_id']) ? intval( $yt_settings['logo_id']) : 0;
|
| 15 |
$yt_logo_url = isset( $yt_settings['logo_url']) ? esc_url( $yt_settings['logo_url']) : '';
|
| 16 |
$yt_cta_url = isset( $yt_settings['cta_url']) ? esc_url( $yt_settings['cta_url']) : '';
|
| 17 |
+
$yt_branding = isset( $yt_settings['branding']) ? sanitize_text_field( $yt_settings['branding']) : (!empty( $yt_logo_url) ? 'yes': 'no');
|
| 18 |
|
| 19 |
|
| 20 |
$embedpress_document_powered_by = isset( $gen_settings['embedpress_document_powered_by']) ? sanitize_text_field( $gen_settings['embedpress_document_powered_by']) : 'yes';
|
| 23 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 24 |
<h3><?php esc_html_e( "Global Branding Settings", "embedpress" ); ?></h3>
|
| 25 |
<div class="embedpress__settings__form">
|
| 26 |
+
<form action="" method="post" enctype="multipart/form-data" class="embedpress-settings-form">
|
| 27 |
<?php
|
| 28 |
do_action( 'embedpress_before_custom_branding_settings_fields');
|
| 29 |
echo $nonce_field ; ?>
|
| 31 |
<p class="form__label">Powered by EmbedPress</p>
|
| 32 |
<div class="form__control__wrap">
|
| 33 |
<label class="input__switch switch__text">
|
| 34 |
+
<input type="checkbox" data-default="<?php echo esc_attr( $embedpress_document_powered_by ); ?>" data-value="<?php echo esc_attr( $embedpress_document_powered_by ); ?>" value="yes" name="embedpress_document_powered_by" <?php checked( 'yes', $embedpress_document_powered_by );?>>
|
| 35 |
<span></span>
|
| 36 |
</label>
|
| 37 |
</div>
|
| 41 |
<p class="form__label"><?php esc_html_e( "YouTube Custom Branding", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">Pro</span>'; ?></p>
|
| 42 |
<div class="form__control__wrap">
|
| 43 |
<label class="input__switch switch__text <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 44 |
+
<input type="checkbox" name="yt_branding" data-default="<?php echo esc_attr( $yt_branding ); ?>" data-value="<?php echo esc_attr( $yt_branding ); ?>" value="yes" <?php checked( 'yes', $yt_branding);?> <?php echo $pro_active ? '': ' disabled'; ?>>
|
| 45 |
<span></span>
|
| 46 |
</label>
|
| 47 |
|
| 48 |
<div class="logo__adjust__wrap <?php echo $pro_active ? '': 'proOverlay'; ?>" style="<?php if ( ('yes' !== $yt_branding) || !$pro_active ) { echo 'display:none;'; } ?>">
|
| 49 |
<label class="logo__upload" id="yt_logo_upload_wrap" style="<?php if (!empty( $yt_logo_url)) { echo 'display:none;'; } ?>">
|
| 50 |
+
<input type="hidden" class="preview__logo__input" name="yt_logo_url" id="yt_logo_url" data-default="<?php echo esc_attr( $yt_logo_url ); ?>" value="<?php echo $yt_logo_url; ?>">
|
| 51 |
+
<input type="hidden" class="preview__logo__input_id" name="yt_logo_id" id="yt_logo_id" data-default="<?php echo esc_attr( $yt_logo_id ); ?>" value="<?php echo $yt_logo_id; ?>">
|
| 52 |
<span class="icon"><i class="ep-icon ep-upload"></i></span>
|
| 53 |
<span class="text"><?php esc_html_e( "Click To Upload", "embedpress" ); ?></span>
|
| 54 |
</label>
|
| 64 |
<div class="logo__adjust__controller__item">
|
| 65 |
<span class="controller__label">Logo Opacity (%)</span>
|
| 66 |
<div class="logo__adjust__controller__inputs">
|
| 67 |
+
<input type="range" max="100" data-default="<?php echo esc_attr( $yt_logo_opacity ); ?>" value="<?php echo $yt_logo_opacity; ?>" class="opacity__range" name="yt_logo_opacity">
|
| 68 |
+
<input readonly type="number" class="form__control range__value" data-default="<?php echo esc_attr( $yt_logo_opacity ); ?>" value="<?php echo $yt_logo_opacity; ?>">
|
| 69 |
</div>
|
| 70 |
</div>
|
| 71 |
<div class="logo__adjust__controller__item">
|
| 72 |
<span class="controller__label">Logo X Position (%)</span>
|
| 73 |
<div class="logo__adjust__controller__inputs">
|
| 74 |
+
<input type="range" max="100" data-default="<?php echo esc_attr( $yt_logo_xpos ); ?>" value="<?php echo $yt_logo_xpos; ?>" class="x__range" name="yt_logo_xpos">
|
| 75 |
+
<input readonly type="number" class="form__control range__value" data-default="<?php echo esc_attr( $yt_logo_xpos ); ?>" value="<?php echo $yt_logo_xpos; ?>">
|
| 76 |
</div>
|
| 77 |
</div>
|
| 78 |
<div class="logo__adjust__controller__item">
|
| 79 |
<span class="controller__label">Logo Y Position (%)</span>
|
| 80 |
<div class="logo__adjust__controller__inputs">
|
| 81 |
+
<input type="range" max="100" data-default="<?php echo esc_attr( $yt_logo_ypos ); ?>" value="<?php echo esc_attr( $yt_logo_ypos ); ?>" class="y__range" name="yt_logo_ypos" >
|
| 82 |
+
<input readonly type="number" class="form__control range__value" data-default="<?php echo esc_attr( $yt_logo_ypos ); ?>" value="<?php echo esc_attr( $yt_logo_ypos ); ?>">
|
| 83 |
</div>
|
| 84 |
</div>
|
| 85 |
<div class="logo__adjust__controller__item">
|
| 86 |
<label class="controller__label" for="yt_cta_url" ><?php esc_html_e( "Call to Action Link", "embedpress" );?> </label>
|
| 87 |
<div>
|
| 88 |
+
<input type="url" name="yt_cta_url" id="yt_cta_url" class="form__control" data-default="<?php echo esc_attr( $yt_cta_url ); ?>" value="<?php echo esc_attr( $yt_cta_url); ?>">
|
| 89 |
|
| 90 |
<p><?php esc_html_e( "You may link the logo to any CTA link.", "embedpress" ); ?></p>
|
| 91 |
</div>
|
| 144 |
</div>
|
| 145 |
</div>
|
| 146 |
<?php do_action( 'embedpress_after_custom_branding_settings_fields'); ?>
|
| 147 |
+
<button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="custom_logo"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 148 |
</form>
|
| 149 |
</div>
|
| 150 |
</div>
|
EmbedPress/Ends/Back/Settings/templates/general.php
CHANGED
|
@@ -5,14 +5,14 @@
|
|
| 5 |
*/
|
| 6 |
|
| 7 |
$g_settings = get_option( EMBEDPRESS_PLG_NAME);
|
| 8 |
-
$lazy_load = isset( $g_settings['g_lazyload']) ? $g_settings['g_lazyload'] :
|
| 9 |
$enableEmbedResizeHeight = isset( $g_settings['enableEmbedResizeHeight']) ? $g_settings['enableEmbedResizeHeight'] : 550;
|
| 10 |
$enableEmbedResizeWidth = isset( $g_settings['enableEmbedResizeWidth']) ? $g_settings['enableEmbedResizeWidth'] : 600;
|
| 11 |
?>
|
| 12 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 13 |
<h3>Global Embed iFrame</h3>
|
| 14 |
<div class="embedpress__settings__form">
|
| 15 |
-
<form action="" method="post">
|
| 16 |
<?php
|
| 17 |
do_action( 'embedpress_before_general_settings_fields');
|
| 18 |
echo $nonce_field ;
|
|
@@ -21,7 +21,7 @@ $enableEmbedResizeWidth = isset( $g_settings['enableEmbedResizeWidth']) ? $g_set
|
|
| 21 |
<p class="form__label"><?php esc_html_e( 'Embed iFrame Height', 'embedpress'); ?></p>
|
| 22 |
<div class="form__control__wrap">
|
| 23 |
<div class="input__flex">
|
| 24 |
-
<input type="number" name="enableEmbedResizeHeight" class="form__control" value="<?php echo esc_attr( $enableEmbedResizeHeight); ?>">
|
| 25 |
<span class="frame__unit">px</span>
|
| 26 |
</div>
|
| 27 |
</div>
|
|
@@ -30,7 +30,7 @@ $enableEmbedResizeWidth = isset( $g_settings['enableEmbedResizeWidth']) ? $g_set
|
|
| 30 |
<p class="form__label"><?php esc_html_e( 'Embed iFrame Width', 'embedpress'); ?></p>
|
| 31 |
<div class="form__control__wrap">
|
| 32 |
<div class="input__flex">
|
| 33 |
-
<input type="number" name="enableEmbedResizeWidth" class="form__control" value="<?php echo esc_attr( $enableEmbedResizeWidth); ?>">
|
| 34 |
<span class="frame__unit">px</span>
|
| 35 |
</div>
|
| 36 |
</div>
|
|
@@ -39,7 +39,7 @@ $enableEmbedResizeWidth = isset( $g_settings['enableEmbedResizeWidth']) ? $g_set
|
|
| 39 |
<p class="form__label"><?php esc_html_e( 'Lazy Load', 'embedpress'); echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?> </p>
|
| 40 |
<div class="form__control__wrap">
|
| 41 |
<label class="input__switch switch__text <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 42 |
-
<input type="checkbox" name="g_lazyload" value="1" <?php echo $pro_active ? '': 'disabled '; checked( '1', $lazy_load) ?>>
|
| 43 |
<span></span>
|
| 44 |
</label>
|
| 45 |
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
|
|
@@ -54,14 +54,14 @@ $enableEmbedResizeWidth = isset( $g_settings['enableEmbedResizeWidth']) ? $g_set
|
|
| 54 |
</p>
|
| 55 |
<div class="form__control__wrap">
|
| 56 |
<label class="input__switch switch__text isPro">
|
| 57 |
-
<input type="checkbox" name="g_loading_animation" value="1" disabled>
|
| 58 |
<span></span>
|
| 59 |
</label>
|
| 60 |
<?php include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-coming-soon.php'; ?>
|
| 61 |
</div>
|
| 62 |
</div>
|
| 63 |
<?php do_action( 'embedpress_after_general_settings_fields'); ?>
|
| 64 |
-
<button class="button button__themeColor radius-10" name="submit" value="general"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 65 |
</form>
|
| 66 |
</div>
|
| 67 |
</div>
|
| 5 |
*/
|
| 6 |
|
| 7 |
$g_settings = get_option( EMBEDPRESS_PLG_NAME);
|
| 8 |
+
$lazy_load = isset( $g_settings['g_lazyload']) ? $g_settings['g_lazyload'] : 0;
|
| 9 |
$enableEmbedResizeHeight = isset( $g_settings['enableEmbedResizeHeight']) ? $g_settings['enableEmbedResizeHeight'] : 550;
|
| 10 |
$enableEmbedResizeWidth = isset( $g_settings['enableEmbedResizeWidth']) ? $g_settings['enableEmbedResizeWidth'] : 600;
|
| 11 |
?>
|
| 12 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 13 |
<h3>Global Embed iFrame</h3>
|
| 14 |
<div class="embedpress__settings__form">
|
| 15 |
+
<form action="" method="post" class="embedpress-settings-form">
|
| 16 |
<?php
|
| 17 |
do_action( 'embedpress_before_general_settings_fields');
|
| 18 |
echo $nonce_field ;
|
| 21 |
<p class="form__label"><?php esc_html_e( 'Embed iFrame Height', 'embedpress'); ?></p>
|
| 22 |
<div class="form__control__wrap">
|
| 23 |
<div class="input__flex">
|
| 24 |
+
<input type="number" name="enableEmbedResizeHeight" class="form__control" data-default="<?php echo esc_attr( $enableEmbedResizeHeight); ?>" value="<?php echo esc_attr( $enableEmbedResizeHeight); ?>">
|
| 25 |
<span class="frame__unit">px</span>
|
| 26 |
</div>
|
| 27 |
</div>
|
| 30 |
<p class="form__label"><?php esc_html_e( 'Embed iFrame Width', 'embedpress'); ?></p>
|
| 31 |
<div class="form__control__wrap">
|
| 32 |
<div class="input__flex">
|
| 33 |
+
<input type="number" name="enableEmbedResizeWidth" class="form__control" data-default="<?php echo esc_attr( $enableEmbedResizeWidth); ?>" value="<?php echo esc_attr( $enableEmbedResizeWidth); ?>">
|
| 34 |
<span class="frame__unit">px</span>
|
| 35 |
</div>
|
| 36 |
</div>
|
| 39 |
<p class="form__label"><?php esc_html_e( 'Lazy Load', 'embedpress'); echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?> </p>
|
| 40 |
<div class="form__control__wrap">
|
| 41 |
<label class="input__switch switch__text <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 42 |
+
<input type="checkbox" name="g_lazyload" data-default="<?php echo esc_attr( $lazy_load ); ?>" data-value="<?php echo esc_attr( $lazy_load ); ?>" value="1" <?php echo $pro_active ? '': 'disabled '; checked( '1', $lazy_load) ?>>
|
| 43 |
<span></span>
|
| 44 |
</label>
|
| 45 |
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
|
| 54 |
</p>
|
| 55 |
<div class="form__control__wrap">
|
| 56 |
<label class="input__switch switch__text isPro">
|
| 57 |
+
<input type="checkbox" name="g_loading_animation" data-default="1" value="1" disabled>
|
| 58 |
<span></span>
|
| 59 |
</label>
|
| 60 |
<?php include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-coming-soon.php'; ?>
|
| 61 |
</div>
|
| 62 |
</div>
|
| 63 |
<?php do_action( 'embedpress_after_general_settings_fields'); ?>
|
| 64 |
+
<button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="general"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 65 |
</form>
|
| 66 |
</div>
|
| 67 |
</div>
|
EmbedPress/Ends/Back/Settings/templates/twitch.php
CHANGED
|
@@ -16,14 +16,14 @@ $mute = isset( $twitch_settings['embedpress_pro_twitch_mute']) ? $twitch_setting
|
|
| 16 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 17 |
<h3><?php esc_html_e( "Twitch Settings", "embedpress" ); ?></h3>
|
| 18 |
<div class="embedpress__settings__form">
|
| 19 |
-
<form action="" method="post" >
|
| 20 |
<?php
|
| 21 |
do_action( 'embedpress_before_twitch_settings_fields');
|
| 22 |
echo $nonce_field ; ?>
|
| 23 |
<div class="form__group">
|
| 24 |
<p class="form__label" ><?php esc_html_e( "Start Time (In Seconds)", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>';?> </p>
|
| 25 |
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 26 |
-
<input type="number" name="start_time" id="start_time" class="form__control" value="<?php echo esc_attr( $start_time); ?>" <?php echo $pro_active ? '': ' disabled'; ?>>
|
| 27 |
<p><?php esc_html_e( "You can put a custom time in seconds to start video. Example: 500", "embedpress" ); ?></p>
|
| 28 |
</div>
|
| 29 |
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
|
|
@@ -32,7 +32,7 @@ $mute = isset( $twitch_settings['embedpress_pro_twitch_mute']) ? $twitch_setting
|
|
| 32 |
<div class="form__group">
|
| 33 |
<p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
|
| 34 |
<div class="form__control__wrap">
|
| 35 |
-
<div class="input__flex">
|
| 36 |
<label class="input__radio">
|
| 37 |
<input type="radio" name="autoplay" value="no" <?php checked( 'no', $autoplay); ?>>
|
| 38 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -48,7 +48,7 @@ $mute = isset( $twitch_settings['embedpress_pro_twitch_mute']) ? $twitch_setting
|
|
| 48 |
<div class="form__group">
|
| 49 |
<p class="form__label"><?php esc_html_e( "Show Chat", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 50 |
<div class="form__control__wrap">
|
| 51 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 52 |
<label class="input__radio">
|
| 53 |
<input type="radio" name="show_chat" value="no" <?php echo $pro_active ? '' : 'disabled'; checked( 'no', $show_chat); ?>>
|
| 54 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -67,7 +67,7 @@ $mute = isset( $twitch_settings['embedpress_pro_twitch_mute']) ? $twitch_setting
|
|
| 67 |
<div class="form__control__wrap">
|
| 68 |
<div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 69 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 70 |
-
<select name="theme" <?php echo $pro_active ? '' : 'disabled';
|
| 71 |
<option value="dark" <?php selected( 'dark', $theme); ?>><?php esc_html_e( "Dark", "embedpress" ); ?></option>
|
| 72 |
<option value="light" <?php selected( 'light', $theme); ?>><?php esc_html_e( "Light", "embedpress" ); ?></option>
|
| 73 |
</select>
|
|
@@ -79,7 +79,7 @@ $mute = isset( $twitch_settings['embedpress_pro_twitch_mute']) ? $twitch_setting
|
|
| 79 |
<div class="form__group">
|
| 80 |
<p class="form__label"><?php esc_html_e( "Enable Fullscreen Button", "embedpress" ); ?></p>
|
| 81 |
<div class="form__control__wrap">
|
| 82 |
-
<div class="input__flex">
|
| 83 |
<label class="input__radio">
|
| 84 |
<input type="radio" name="fs" value="no" <?php checked( 'no', $fs); ?>>
|
| 85 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -95,7 +95,7 @@ $mute = isset( $twitch_settings['embedpress_pro_twitch_mute']) ? $twitch_setting
|
|
| 95 |
<div class="form__group">
|
| 96 |
<p class="form__label"><?php esc_html_e( "Mute On Start", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 97 |
<div class="form__control__wrap">
|
| 98 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 99 |
<label class="input__radio">
|
| 100 |
<input type="radio" name="mute" value="no" <?php echo $pro_active ? '' : 'disabled'; checked( 'no', $mute); ?>>
|
| 101 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -110,7 +110,7 @@ $mute = isset( $twitch_settings['embedpress_pro_twitch_mute']) ? $twitch_setting
|
|
| 110 |
</div>
|
| 111 |
</div>
|
| 112 |
<?php do_action( 'embedpress_after_twitch_settings_fields'); ?>
|
| 113 |
-
<button class="button button__themeColor radius-10" name="submit" value="twitch"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 114 |
</form>
|
| 115 |
</div>
|
| 116 |
</div>
|
| 16 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 17 |
<h3><?php esc_html_e( "Twitch Settings", "embedpress" ); ?></h3>
|
| 18 |
<div class="embedpress__settings__form">
|
| 19 |
+
<form action="" method="post" class="embedpress-settings-form">
|
| 20 |
<?php
|
| 21 |
do_action( 'embedpress_before_twitch_settings_fields');
|
| 22 |
echo $nonce_field ; ?>
|
| 23 |
<div class="form__group">
|
| 24 |
<p class="form__label" ><?php esc_html_e( "Start Time (In Seconds)", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>';?> </p>
|
| 25 |
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 26 |
+
<input type="number" name="start_time" id="start_time" class="form__control" data-default="<?php echo esc_attr( $start_time); ?>" value="<?php echo esc_attr( $start_time); ?>" <?php echo $pro_active ? '': ' disabled'; ?>>
|
| 27 |
<p><?php esc_html_e( "You can put a custom time in seconds to start video. Example: 500", "embedpress" ); ?></p>
|
| 28 |
</div>
|
| 29 |
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
|
| 32 |
<div class="form__group">
|
| 33 |
<p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
|
| 34 |
<div class="form__control__wrap">
|
| 35 |
+
<div data-default="<?php echo esc_attr( $autoplay ); ?>" data-value="<?php echo esc_attr( $autoplay ); ?>" class="input__flex input__radio_wrap">
|
| 36 |
<label class="input__radio">
|
| 37 |
<input type="radio" name="autoplay" value="no" <?php checked( 'no', $autoplay); ?>>
|
| 38 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 48 |
<div class="form__group">
|
| 49 |
<p class="form__label"><?php esc_html_e( "Show Chat", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 50 |
<div class="form__control__wrap">
|
| 51 |
+
<div data-default="<?php echo esc_attr( $show_chat ); ?>" data-value="<?php echo esc_attr( $show_chat ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 52 |
<label class="input__radio">
|
| 53 |
<input type="radio" name="show_chat" value="no" <?php echo $pro_active ? '' : 'disabled'; checked( 'no', $show_chat); ?>>
|
| 54 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 67 |
<div class="form__control__wrap">
|
| 68 |
<div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 69 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 70 |
+
<select name="theme" <?php echo $pro_active ? '' : 'disabled'; ?> data-default="<?php echo esc_attr( $theme); ?>">
|
| 71 |
<option value="dark" <?php selected( 'dark', $theme); ?>><?php esc_html_e( "Dark", "embedpress" ); ?></option>
|
| 72 |
<option value="light" <?php selected( 'light', $theme); ?>><?php esc_html_e( "Light", "embedpress" ); ?></option>
|
| 73 |
</select>
|
| 79 |
<div class="form__group">
|
| 80 |
<p class="form__label"><?php esc_html_e( "Enable Fullscreen Button", "embedpress" ); ?></p>
|
| 81 |
<div class="form__control__wrap">
|
| 82 |
+
<div data-default="<?php echo esc_attr( $fs ); ?>" data-value="<?php echo esc_attr( $fs ); ?>" class="input__flex input__radio_wrap">
|
| 83 |
<label class="input__radio">
|
| 84 |
<input type="radio" name="fs" value="no" <?php checked( 'no', $fs); ?>>
|
| 85 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 95 |
<div class="form__group">
|
| 96 |
<p class="form__label"><?php esc_html_e( "Mute On Start", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 97 |
<div class="form__control__wrap">
|
| 98 |
+
<div data-default="<?php echo esc_attr( $mute ); ?>" data-value="<?php echo esc_attr( $mute ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 99 |
<label class="input__radio">
|
| 100 |
<input type="radio" name="mute" value="no" <?php echo $pro_active ? '' : 'disabled'; checked( 'no', $mute); ?>>
|
| 101 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 110 |
</div>
|
| 111 |
</div>
|
| 112 |
<?php do_action( 'embedpress_after_twitch_settings_fields'); ?>
|
| 113 |
+
<button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="twitch"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 114 |
</form>
|
| 115 |
</div>
|
| 116 |
</div>
|
EmbedPress/Ends/Back/Settings/templates/vimeo.php
CHANGED
|
@@ -16,14 +16,14 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 16 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 17 |
<h3><?php esc_html_e( "Vimeo Settings", "embedpress" ); ?></h3>
|
| 18 |
<div class="embedpress__settings__form">
|
| 19 |
-
<form action="" method="post" >
|
| 20 |
<?php
|
| 21 |
do_action( 'embedpress_before_vimeo_settings_fields');
|
| 22 |
echo $nonce_field ; ?>
|
| 23 |
<div class="form__group">
|
| 24 |
<p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
|
| 25 |
<div class="form__control__wrap">
|
| 26 |
-
<div class="input__flex">
|
| 27 |
<label class="input__radio">
|
| 28 |
<input type="radio" name="autoplay" value="" <?php checked( '', $autoplay); ?>>
|
| 29 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -39,7 +39,7 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 39 |
<div class="form__group">
|
| 40 |
<p class="form__label"><?php esc_html_e( "Loop", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 41 |
<div class="form__control__wrap">
|
| 42 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 43 |
<label class="input__radio">
|
| 44 |
<input type="radio" name="loop" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $loop); ?>>
|
| 45 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -56,7 +56,7 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 56 |
<div class="form__group">
|
| 57 |
<p class="form__label"><?php esc_html_e( "Auto Pause", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 58 |
<div class="form__control__wrap">
|
| 59 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 60 |
<label class="input__radio">
|
| 61 |
<input type="radio" name="autopause" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $autopause); ?>>
|
| 62 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -73,7 +73,7 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 73 |
<div class="form__group">
|
| 74 |
<p class="form__label"><?php esc_html_e( "DNT", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 75 |
<div class="form__control__wrap">
|
| 76 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 77 |
<label class="input__radio">
|
| 78 |
<input type="radio" name="vimeo_dnt" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $vimeo_dnt); ?>>
|
| 79 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -90,7 +90,7 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 90 |
<div class="form__group">
|
| 91 |
<p class="form__label"><?php esc_html_e( "Color", "embedpress" ); ?></p>
|
| 92 |
<div class="form__control__wrap">
|
| 93 |
-
<input type="text" class="form__control ep-color-picker" name="color" value="<?php echo esc_attr( $color); ?>">
|
| 94 |
|
| 95 |
<p><?php esc_html_e( "Specify the color of the video controls.", "embedpress" ); ?></p>
|
| 96 |
</div>
|
|
@@ -98,7 +98,7 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 98 |
<div class="form__group">
|
| 99 |
<p class="form__label"><?php esc_html_e( "Display Title", "embedpress" ); ?></p>
|
| 100 |
<div class="form__control__wrap">
|
| 101 |
-
<div class="input__flex">
|
| 102 |
<label class="input__radio">
|
| 103 |
<input type="radio" name="display_title" value="" <?php checked( '', $display_title); ?>>
|
| 104 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -114,7 +114,7 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 114 |
<div class="form__group">
|
| 115 |
<p class="form__label"><?php esc_html_e( "Display Author", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 116 |
<div class="form__control__wrap">
|
| 117 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 118 |
<label class="input__radio">
|
| 119 |
<input type="radio" name="display_author" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $display_author); ?>>
|
| 120 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -131,7 +131,7 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 131 |
<div class="form__group">
|
| 132 |
<p class="form__label"><?php esc_html_e( "Display Avatar", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 133 |
<div class="form__control__wrap">
|
| 134 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 135 |
<label class="input__radio">
|
| 136 |
<input type="radio" name="display_avatar" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $display_avatar); ?>>
|
| 137 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -146,7 +146,7 @@ $display_avatar = isset( $vm_settings['display_avatar']) ? $vm_settings['display
|
|
| 146 |
</div>
|
| 147 |
</div>
|
| 148 |
<?php do_action( 'embedpress_after_vimeo_settings_fields'); ?>
|
| 149 |
-
<button class="button button__themeColor radius-10" name="submit" value="vimeo"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 150 |
</form>
|
| 151 |
</div>
|
| 152 |
</div>
|
| 16 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 17 |
<h3><?php esc_html_e( "Vimeo Settings", "embedpress" ); ?></h3>
|
| 18 |
<div class="embedpress__settings__form">
|
| 19 |
+
<form action="" method="post" class="embedpress-settings-form" >
|
| 20 |
<?php
|
| 21 |
do_action( 'embedpress_before_vimeo_settings_fields');
|
| 22 |
echo $nonce_field ; ?>
|
| 23 |
<div class="form__group">
|
| 24 |
<p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
|
| 25 |
<div class="form__control__wrap">
|
| 26 |
+
<div data-default="<?php echo esc_attr( $autoplay ); ?>" data-value="<?php echo esc_attr( $autoplay ); ?>" class="input__flex input__radio_wrap">
|
| 27 |
<label class="input__radio">
|
| 28 |
<input type="radio" name="autoplay" value="" <?php checked( '', $autoplay); ?>>
|
| 29 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 39 |
<div class="form__group">
|
| 40 |
<p class="form__label"><?php esc_html_e( "Loop", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 41 |
<div class="form__control__wrap">
|
| 42 |
+
<div data-default="<?php echo esc_attr( $loop ); ?>" data-value="<?php echo esc_attr( $loop ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 43 |
<label class="input__radio">
|
| 44 |
<input type="radio" name="loop" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $loop); ?>>
|
| 45 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 56 |
<div class="form__group">
|
| 57 |
<p class="form__label"><?php esc_html_e( "Auto Pause", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 58 |
<div class="form__control__wrap">
|
| 59 |
+
<div data-default="<?php echo esc_attr( $autopause ); ?>" data-value="<?php echo esc_attr( $autopause ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 60 |
<label class="input__radio">
|
| 61 |
<input type="radio" name="autopause" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $autopause); ?>>
|
| 62 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 73 |
<div class="form__group">
|
| 74 |
<p class="form__label"><?php esc_html_e( "DNT", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 75 |
<div class="form__control__wrap">
|
| 76 |
+
<div data-default="<?php echo esc_attr( $vimeo_dnt ); ?>" data-value="<?php echo esc_attr( $vimeo_dnt ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 77 |
<label class="input__radio">
|
| 78 |
<input type="radio" name="vimeo_dnt" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $vimeo_dnt); ?>>
|
| 79 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 90 |
<div class="form__group">
|
| 91 |
<p class="form__label"><?php esc_html_e( "Color", "embedpress" ); ?></p>
|
| 92 |
<div class="form__control__wrap">
|
| 93 |
+
<input type="text" class="form__control ep-color-picker" name="color" value="<?php echo esc_attr( $color); ?>" data-default="<?php echo esc_attr( $color ); ?>">
|
| 94 |
|
| 95 |
<p><?php esc_html_e( "Specify the color of the video controls.", "embedpress" ); ?></p>
|
| 96 |
</div>
|
| 98 |
<div class="form__group">
|
| 99 |
<p class="form__label"><?php esc_html_e( "Display Title", "embedpress" ); ?></p>
|
| 100 |
<div class="form__control__wrap">
|
| 101 |
+
<div data-default="<?php echo esc_attr( $display_title ); ?>" data-value="<?php echo esc_attr( $display_title ); ?>" class="input__flex input__radio_wrap">
|
| 102 |
<label class="input__radio">
|
| 103 |
<input type="radio" name="display_title" value="" <?php checked( '', $display_title); ?>>
|
| 104 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 114 |
<div class="form__group">
|
| 115 |
<p class="form__label"><?php esc_html_e( "Display Author", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 116 |
<div class="form__control__wrap">
|
| 117 |
+
<div data-default="<?php echo esc_attr( $display_author ); ?>" data-value="<?php echo esc_attr( $display_author ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 118 |
<label class="input__radio">
|
| 119 |
<input type="radio" name="display_author" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $display_author); ?>>
|
| 120 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 131 |
<div class="form__group">
|
| 132 |
<p class="form__label"><?php esc_html_e( "Display Avatar", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?></p>
|
| 133 |
<div class="form__control__wrap">
|
| 134 |
+
<div data-default="<?php echo esc_attr( $display_avatar ); ?>" data-value="<?php echo esc_attr( $display_avatar ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 135 |
<label class="input__radio">
|
| 136 |
<input type="radio" name="display_avatar" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $display_avatar); ?>>
|
| 137 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 146 |
</div>
|
| 147 |
</div>
|
| 148 |
<?php do_action( 'embedpress_after_vimeo_settings_fields'); ?>
|
| 149 |
+
<button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="vimeo"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 150 |
</form>
|
| 151 |
</div>
|
| 152 |
</div>
|
EmbedPress/Ends/Back/Settings/templates/wistia.php
CHANGED
|
@@ -22,7 +22,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 22 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 23 |
<h3><?php esc_html_e( "Wistia Settings", "embedpress" ); ?></h3>
|
| 24 |
<div class="embedpress__settings__form">
|
| 25 |
-
<form action="" method="post" >
|
| 26 |
<?php
|
| 27 |
do_action( 'embedpress_before_wistia_settings_fields');
|
| 28 |
echo $nonce_field ;
|
|
@@ -30,7 +30,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 30 |
<div class="form__group">
|
| 31 |
<p class="form__label"><?php esc_html_e( "Fullscreen Button", "embedpress" ); ?></p>
|
| 32 |
<div class="form__control__wrap">
|
| 33 |
-
<div class="input__flex">
|
| 34 |
<label class="input__radio">
|
| 35 |
<input type="radio" value="" name="display_fullscreen_button" <?php checked( '', $display_fullscreen_button); ?>>
|
| 36 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -46,7 +46,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 46 |
<div class="form__group">
|
| 47 |
<p class="form__label"><?php esc_html_e( "Playbar", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 48 |
<div class="form__control__wrap">
|
| 49 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 50 |
<label class="input__radio">
|
| 51 |
<input type="radio" value="" name="display_playbar" <?php echo $pro_active ? '' : 'disabled'; checked( '', $display_playbar); ?>>
|
| 52 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -63,7 +63,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 63 |
<div class="form__group">
|
| 64 |
<p class="form__label"><?php esc_html_e( "Small Play Button", "embedpress" ); ?></p>
|
| 65 |
<div class="form__control__wrap">
|
| 66 |
-
<div class="input__flex">
|
| 67 |
<label class="input__radio">
|
| 68 |
<input type="radio" value="" name="small_play_button" <?php checked( '', $small_play_button); ?>>
|
| 69 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -79,7 +79,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 79 |
<div class="form__group">
|
| 80 |
<p class="form__label"><?php esc_html_e( "Volume Control", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 81 |
<div class="form__control__wrap">
|
| 82 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 83 |
<label class="input__radio">
|
| 84 |
<input type="radio" value="" name="display_volume_control" <?php echo $pro_active ? '' : 'disabled'; checked( '', $display_volume_control); ?>>
|
| 85 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -97,7 +97,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 97 |
<div class="form__group">
|
| 98 |
<p class="form__label"><?php esc_html_e( "Volume", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 99 |
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 100 |
-
<input type="number" max="100" min="0" class="form__control" value="<?php echo esc_attr( $volume ); ?>" name="volume" <?php echo $pro_active ? '' : 'disabled'; ?>>
|
| 101 |
|
| 102 |
<p><?php esc_html_e( "Start the video with a custom volume level. Set values between 0 and 100.", "embedpress" ); ?></p>
|
| 103 |
</div>
|
|
@@ -108,7 +108,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 108 |
<div class="form__group">
|
| 109 |
<p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
|
| 110 |
<div class="form__control__wrap">
|
| 111 |
-
<div class="input__flex">
|
| 112 |
<label class="input__radio">
|
| 113 |
<input type="radio" value="" name="autoplay" <?php checked( '', $autoplay);?>>
|
| 114 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -125,7 +125,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 125 |
<div class="form__group">
|
| 126 |
<p class="form__label"><?php esc_html_e( "Color", "embedpress" ); ?></p>
|
| 127 |
<div class="form__control__wrap">
|
| 128 |
-
<input type="text" class="ep-color-picker" name="player_color" value="<?php echo esc_attr( $player_color ); ?>">
|
| 129 |
<p><?php esc_html_e( "Specify the color of the video controls.", "embedpress" ); ?></p>
|
| 130 |
</div>
|
| 131 |
</div>
|
|
@@ -133,7 +133,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 133 |
<div class="form__group">
|
| 134 |
<p class="form__label"><?php esc_html_e( "Plugin: Resumable", "embedpress" ); ?></p>
|
| 135 |
<div class="form__control__wrap">
|
| 136 |
-
<div class="input__flex">
|
| 137 |
<label class="input__radio">
|
| 138 |
<input type="radio" value="" name="plugin_resumable" <?php checked( '', $plugin_resumable);?>>
|
| 139 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -149,7 +149,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 149 |
<div class="form__group">
|
| 150 |
<p class="form__label"><?php esc_html_e( "Plugin: Captions", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 151 |
<div class="form__control__wrap">
|
| 152 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 153 |
<label class="input__radio">
|
| 154 |
<input type="radio" value="" name="plugin_captions" <?php echo $pro_active ? '' : 'disabled'; checked( '', $plugin_captions); ?>>
|
| 155 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -166,7 +166,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 166 |
<div class="form__group">
|
| 167 |
<p class="form__label"><?php esc_html_e( "Captions Enabled By Default", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 168 |
<div class="form__control__wrap">
|
| 169 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 170 |
<label class="input__radio">
|
| 171 |
<input type="radio" value="" name="plugin_captions_default" <?php echo $pro_active ? '' : 'disabled'; checked( '', $plugin_captions_default); ?>>
|
| 172 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -183,7 +183,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 183 |
<div class="form__group">
|
| 184 |
<p class="form__label">Plugin: Focus</p>
|
| 185 |
<div class="form__control__wrap">
|
| 186 |
-
<div class="input__flex">
|
| 187 |
<label class="input__radio">
|
| 188 |
<input type="radio" value="" name="plugin_focus" <?php checked( '', $plugin_focus); ?>>
|
| 189 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -199,7 +199,7 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 199 |
<div class="form__group">
|
| 200 |
<p class="form__label"><?php esc_html_e( "Plugin: Rewind", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 201 |
<div class="form__control__wrap">
|
| 202 |
-
<div class="input__flex <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 203 |
<label class="input__radio">
|
| 204 |
<input type="radio" value="" name="plugin_rewind" <?php echo $pro_active ? '' : 'disabled'; checked( '', $plugin_rewind); ?>>
|
| 205 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -216,13 +216,13 @@ $plugin_rewind_time = isset( $wis_settings['plugin_rewind_time']) ? intval( $wis
|
|
| 216 |
<div class="form__group">
|
| 217 |
<p class="form__label"><?php esc_html_e( "Rewind Time (In Seconds)", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 218 |
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 219 |
-
<input type="number" class="form__control" value="<?php echo esc_attr( $plugin_rewind_time );?>" name="plugin_rewind_time" <?php echo $pro_active ? '' : 'disabled'; ?>>
|
| 220 |
<p><?php esc_html_e( "The amount of time to rewind, in seconds.", "embedpress" ); ?></p>
|
| 221 |
</div>
|
| 222 |
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
|
| 223 |
</div>
|
| 224 |
<?php do_action( 'embedpress_after_wistia_settings_fields'); ?>
|
| 225 |
-
<button class="button button__themeColor radius-10" name="submit" value="wistia"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 226 |
</form>
|
| 227 |
</div>
|
| 228 |
</div>
|
| 22 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 23 |
<h3><?php esc_html_e( "Wistia Settings", "embedpress" ); ?></h3>
|
| 24 |
<div class="embedpress__settings__form">
|
| 25 |
+
<form action="" method="post" class="embedpress-settings-form" >
|
| 26 |
<?php
|
| 27 |
do_action( 'embedpress_before_wistia_settings_fields');
|
| 28 |
echo $nonce_field ;
|
| 30 |
<div class="form__group">
|
| 31 |
<p class="form__label"><?php esc_html_e( "Fullscreen Button", "embedpress" ); ?></p>
|
| 32 |
<div class="form__control__wrap">
|
| 33 |
+
<div data-default="<?php echo esc_attr( $display_fullscreen_button ); ?>" data-value="<?php echo esc_attr( $display_fullscreen_button ); ?>" class="input__flex input__radio_wrap">
|
| 34 |
<label class="input__radio">
|
| 35 |
<input type="radio" value="" name="display_fullscreen_button" <?php checked( '', $display_fullscreen_button); ?>>
|
| 36 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 46 |
<div class="form__group">
|
| 47 |
<p class="form__label"><?php esc_html_e( "Playbar", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 48 |
<div class="form__control__wrap">
|
| 49 |
+
<div data-default="<?php echo esc_attr( $display_playbar ); ?>" data-value="<?php echo esc_attr( $display_playbar ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 50 |
<label class="input__radio">
|
| 51 |
<input type="radio" value="" name="display_playbar" <?php echo $pro_active ? '' : 'disabled'; checked( '', $display_playbar); ?>>
|
| 52 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 63 |
<div class="form__group">
|
| 64 |
<p class="form__label"><?php esc_html_e( "Small Play Button", "embedpress" ); ?></p>
|
| 65 |
<div class="form__control__wrap">
|
| 66 |
+
<div data-default="<?php echo esc_attr( $small_play_button ); ?>" data-value="<?php echo esc_attr( $small_play_button ); ?>" class="input__flex input__radio_wrap">
|
| 67 |
<label class="input__radio">
|
| 68 |
<input type="radio" value="" name="small_play_button" <?php checked( '', $small_play_button); ?>>
|
| 69 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 79 |
<div class="form__group">
|
| 80 |
<p class="form__label"><?php esc_html_e( "Volume Control", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 81 |
<div class="form__control__wrap">
|
| 82 |
+
<div data-default="<?php echo esc_attr( $display_volume_control ); ?>" data-value="<?php echo esc_attr( $display_volume_control ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 83 |
<label class="input__radio">
|
| 84 |
<input type="radio" value="" name="display_volume_control" <?php echo $pro_active ? '' : 'disabled'; checked( '', $display_volume_control); ?>>
|
| 85 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 97 |
<div class="form__group">
|
| 98 |
<p class="form__label"><?php esc_html_e( "Volume", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 99 |
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 100 |
+
<input type="number" max="100" min="0" class="form__control" data-default="<?php echo esc_attr( $volume ); ?>" value="<?php echo esc_attr( $volume ); ?>" name="volume" <?php echo $pro_active ? '' : 'disabled'; ?>>
|
| 101 |
|
| 102 |
<p><?php esc_html_e( "Start the video with a custom volume level. Set values between 0 and 100.", "embedpress" ); ?></p>
|
| 103 |
</div>
|
| 108 |
<div class="form__group">
|
| 109 |
<p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
|
| 110 |
<div class="form__control__wrap">
|
| 111 |
+
<div data-default="<?php echo esc_attr( $autoplay ); ?>" data-value="<?php echo esc_attr( $autoplay ); ?>" class="input__flex input__radio_wrap">
|
| 112 |
<label class="input__radio">
|
| 113 |
<input type="radio" value="" name="autoplay" <?php checked( '', $autoplay);?>>
|
| 114 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 125 |
<div class="form__group">
|
| 126 |
<p class="form__label"><?php esc_html_e( "Color", "embedpress" ); ?></p>
|
| 127 |
<div class="form__control__wrap">
|
| 128 |
+
<input type="text" class="ep-color-picker" name="player_color" data-default="<?php echo esc_attr( $player_color ); ?>" value="<?php echo esc_attr( $player_color ); ?>">
|
| 129 |
<p><?php esc_html_e( "Specify the color of the video controls.", "embedpress" ); ?></p>
|
| 130 |
</div>
|
| 131 |
</div>
|
| 133 |
<div class="form__group">
|
| 134 |
<p class="form__label"><?php esc_html_e( "Plugin: Resumable", "embedpress" ); ?></p>
|
| 135 |
<div class="form__control__wrap">
|
| 136 |
+
<div data-default="<?php echo esc_attr( $plugin_resumable ); ?>" data-value="<?php echo esc_attr( $plugin_resumable ); ?>" class="input__flex input__radio_wrap">
|
| 137 |
<label class="input__radio">
|
| 138 |
<input type="radio" value="" name="plugin_resumable" <?php checked( '', $plugin_resumable);?>>
|
| 139 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 149 |
<div class="form__group">
|
| 150 |
<p class="form__label"><?php esc_html_e( "Plugin: Captions", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 151 |
<div class="form__control__wrap">
|
| 152 |
+
<div data-default="<?php echo esc_attr( $plugin_captions ); ?>" data-value="<?php echo esc_attr( $plugin_captions ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 153 |
<label class="input__radio">
|
| 154 |
<input type="radio" value="" name="plugin_captions" <?php echo $pro_active ? '' : 'disabled'; checked( '', $plugin_captions); ?>>
|
| 155 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 166 |
<div class="form__group">
|
| 167 |
<p class="form__label"><?php esc_html_e( "Captions Enabled By Default", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 168 |
<div class="form__control__wrap">
|
| 169 |
+
<div data-default="<?php echo esc_attr( $plugin_captions_default ); ?>" data-value="<?php echo esc_attr( $plugin_captions_default ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 170 |
<label class="input__radio">
|
| 171 |
<input type="radio" value="" name="plugin_captions_default" <?php echo $pro_active ? '' : 'disabled'; checked( '', $plugin_captions_default); ?>>
|
| 172 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 183 |
<div class="form__group">
|
| 184 |
<p class="form__label">Plugin: Focus</p>
|
| 185 |
<div class="form__control__wrap">
|
| 186 |
+
<div data-default="<?php echo esc_attr( $plugin_focus ); ?>" data-value="<?php echo esc_attr( $plugin_focus ); ?>" class="input__flex input__radio_wrap">
|
| 187 |
<label class="input__radio">
|
| 188 |
<input type="radio" value="" name="plugin_focus" <?php checked( '', $plugin_focus); ?>>
|
| 189 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 199 |
<div class="form__group">
|
| 200 |
<p class="form__label"><?php esc_html_e( "Plugin: Rewind", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 201 |
<div class="form__control__wrap">
|
| 202 |
+
<div data-default="<?php echo esc_attr( $plugin_rewind ); ?>" data-value="<?php echo esc_attr( $plugin_rewind ); ?>" class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 203 |
<label class="input__radio">
|
| 204 |
<input type="radio" value="" name="plugin_rewind" <?php echo $pro_active ? '' : 'disabled'; checked( '', $plugin_rewind); ?>>
|
| 205 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 216 |
<div class="form__group">
|
| 217 |
<p class="form__label"><?php esc_html_e( "Rewind Time (In Seconds)", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
|
| 218 |
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 219 |
+
<input type="number" class="form__control" data-default="<?php echo esc_attr( $plugin_rewind_time );?>" value="<?php echo esc_attr( $plugin_rewind_time );?>" name="plugin_rewind_time" <?php echo $pro_active ? '' : 'disabled'; ?>>
|
| 220 |
<p><?php esc_html_e( "The amount of time to rewind, in seconds.", "embedpress" ); ?></p>
|
| 221 |
</div>
|
| 222 |
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
|
| 223 |
</div>
|
| 224 |
<?php do_action( 'embedpress_after_wistia_settings_fields'); ?>
|
| 225 |
+
<button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="wistia"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 226 |
</form>
|
| 227 |
</div>
|
| 228 |
</div>
|
EmbedPress/Ends/Back/Settings/templates/youtube.php
CHANGED
|
@@ -19,14 +19,14 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 19 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 20 |
<h3><?php esc_html_e( "YouTube Settings", "embedpress" ); ?></h3>
|
| 21 |
<div class="embedpress__settings__form">
|
| 22 |
-
<form action="" method="post" >
|
| 23 |
<?php
|
| 24 |
do_action( 'embedpress_before_youtube_settings_fields');
|
| 25 |
echo $nonce_field ; ?>
|
| 26 |
<div class="form__group">
|
| 27 |
<p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
|
| 28 |
<div class="form__control__wrap">
|
| 29 |
-
<div class="input__flex">
|
| 30 |
<label class="input__radio">
|
| 31 |
<input type="radio" name="autoplay" value="" <?php checked( '', $autoplay); ?>>
|
| 32 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -44,7 +44,7 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 44 |
<div class="form__control__wrap">
|
| 45 |
<div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 46 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 47 |
-
<select name="color" id="color" <?php echo !$pro_active ? 'disabled' : '';
|
| 48 |
<option value="red" <?php selected( 'red', $color); ?> ><?php esc_html_e( "Red", "embedpress" ); ?></option>
|
| 49 |
<option value="white" <?php selected( 'white', $color); ?> ><?php esc_html_e( "White", "embedpress" ); ?></option>
|
| 50 |
</select>
|
|
@@ -57,7 +57,7 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 57 |
<div class="form__group">
|
| 58 |
<p class="form__label"><?php esc_html_e( "Force Closed Captions", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>': ''; ?></p>
|
| 59 |
<div class="form__control__wrap">
|
| 60 |
-
<div class="input__flex
|
| 61 |
<label class="input__radio">
|
| 62 |
<input type="radio" name="cc_load_policy" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $cc_load_policy); ?>>
|
| 63 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -77,7 +77,7 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 77 |
<div class="form__control__wrap">
|
| 78 |
<div class="embedpress__select">
|
| 79 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 80 |
-
<select name="controls">
|
| 81 |
<option value="1" <?php selected( '1', $controls); ?>><?php esc_html_e( 'Display immediately', 'embedpress'); ?></option>
|
| 82 |
<option value="2" <?php selected( '2', $controls); ?>><?php esc_html_e( 'Display after user initiation', 'embedpress'); ?></option>
|
| 83 |
<option value="0" <?php selected( '0', $controls); ?>><?php esc_html_e( 'Hide controls', 'embedpress'); ?></option>
|
|
@@ -89,7 +89,7 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 89 |
<div class="form__group">
|
| 90 |
<p class="form__label"><?php esc_html_e( "Enable Fullscreen Button", "embedpress" ); ?></p>
|
| 91 |
<div class="form__control__wrap">
|
| 92 |
-
<div class="input__flex">
|
| 93 |
<label class="input__radio">
|
| 94 |
<input type="radio" name="fs" value="" <?php checked( '', $fs); ?> >
|
| 95 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
|
@@ -107,7 +107,7 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 107 |
<div class="form__control__wrap">
|
| 108 |
<div class="embedpress__select">
|
| 109 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 110 |
-
<select name="iv_load_policy">
|
| 111 |
<option value="1" <?php selected( '1', $iv_load_policy); ?>><?php esc_html_e( "Show", "embedpress" ); ?></option>
|
| 112 |
<option value="3" <?php selected( '3', $iv_load_policy); ?>><?php esc_html_e( "Hide", "embedpress" ); ?></option>
|
| 113 |
</select>
|
|
@@ -120,7 +120,7 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 120 |
<div class="form__control__wrap">
|
| 121 |
<div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 122 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 123 |
-
<select name="rel" <?php echo $pro_active ? '' : 'disabled'; ?>>
|
| 124 |
<option value="" <?php selected( '', $rel); ?>><?php esc_html_e( "From the same channel of the video", "embedpress" ); ?></option>
|
| 125 |
<option value="1" <?php selected( '1', $rel); ?>><?php esc_html_e( "Based on User's watch history", "embedpress" ); ?></option>
|
| 126 |
</select>
|
|
@@ -136,7 +136,7 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 136 |
<div class="form__control__wrap">
|
| 137 |
<div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 138 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 139 |
-
<select name="modestbranding"
|
| 140 |
<option value="1" <?php selected( '1', $modestbranding); ?>><?php esc_html_e( "Hide", "embedpress" ); ?></option>
|
| 141 |
<option value="0" <?php selected( '0', $modestbranding); ?>><?php esc_html_e( "Show", "embedpress" ); ?></option>
|
| 142 |
</select>
|
|
@@ -147,7 +147,7 @@ $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestb
|
|
| 147 |
</div>
|
| 148 |
</div>
|
| 149 |
<?php do_action( 'embedpress_after_youtube_settings_fields'); ?>
|
| 150 |
-
<button class="button button__themeColor radius-10" name="submit" value="youtube"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 151 |
</form>
|
| 152 |
</div>
|
| 153 |
</div>
|
| 19 |
<div class="embedpress__settings background__white radius-25 p40">
|
| 20 |
<h3><?php esc_html_e( "YouTube Settings", "embedpress" ); ?></h3>
|
| 21 |
<div class="embedpress__settings__form">
|
| 22 |
+
<form action="" method="post" class="embedpress-settings-form" >
|
| 23 |
<?php
|
| 24 |
do_action( 'embedpress_before_youtube_settings_fields');
|
| 25 |
echo $nonce_field ; ?>
|
| 26 |
<div class="form__group">
|
| 27 |
<p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
|
| 28 |
<div class="form__control__wrap">
|
| 29 |
+
<div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $autoplay ); ?>" data-value="<?php echo esc_attr( $autoplay ); ?>">
|
| 30 |
<label class="input__radio">
|
| 31 |
<input type="radio" name="autoplay" value="" <?php checked( '', $autoplay); ?>>
|
| 32 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 44 |
<div class="form__control__wrap">
|
| 45 |
<div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 46 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 47 |
+
<select name="color" id="color" <?php echo !$pro_active ? 'disabled' : ''; ?> data-default="<?php echo esc_attr( $color ); ?>">
|
| 48 |
<option value="red" <?php selected( 'red', $color); ?> ><?php esc_html_e( "Red", "embedpress" ); ?></option>
|
| 49 |
<option value="white" <?php selected( 'white', $color); ?> ><?php esc_html_e( "White", "embedpress" ); ?></option>
|
| 50 |
</select>
|
| 57 |
<div class="form__group">
|
| 58 |
<p class="form__label"><?php esc_html_e( "Force Closed Captions", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>': ''; ?></p>
|
| 59 |
<div class="form__control__wrap">
|
| 60 |
+
<div class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>" data-default="<?php echo esc_attr( $cc_load_policy ); ?>" data-value="<?php echo esc_attr( $cc_load_policy ); ?>">
|
| 61 |
<label class="input__radio">
|
| 62 |
<input type="radio" name="cc_load_policy" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $cc_load_policy); ?>>
|
| 63 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 77 |
<div class="form__control__wrap">
|
| 78 |
<div class="embedpress__select">
|
| 79 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 80 |
+
<select name="controls" data-default="<?php echo esc_attr( $controls); ?>">
|
| 81 |
<option value="1" <?php selected( '1', $controls); ?>><?php esc_html_e( 'Display immediately', 'embedpress'); ?></option>
|
| 82 |
<option value="2" <?php selected( '2', $controls); ?>><?php esc_html_e( 'Display after user initiation', 'embedpress'); ?></option>
|
| 83 |
<option value="0" <?php selected( '0', $controls); ?>><?php esc_html_e( 'Hide controls', 'embedpress'); ?></option>
|
| 89 |
<div class="form__group">
|
| 90 |
<p class="form__label"><?php esc_html_e( "Enable Fullscreen Button", "embedpress" ); ?></p>
|
| 91 |
<div class="form__control__wrap">
|
| 92 |
+
<div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $fs ); ?>" data-value="<?php echo esc_attr( $fs ); ?>">
|
| 93 |
<label class="input__radio">
|
| 94 |
<input type="radio" name="fs" value="" <?php checked( '', $fs); ?> >
|
| 95 |
<span><?php esc_html_e( "No", "embedpress" ); ?></span>
|
| 107 |
<div class="form__control__wrap">
|
| 108 |
<div class="embedpress__select">
|
| 109 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 110 |
+
<select name="iv_load_policy" data-default="<?php echo esc_attr( $iv_load_policy ); ?>">
|
| 111 |
<option value="1" <?php selected( '1', $iv_load_policy); ?>><?php esc_html_e( "Show", "embedpress" ); ?></option>
|
| 112 |
<option value="3" <?php selected( '3', $iv_load_policy); ?>><?php esc_html_e( "Hide", "embedpress" ); ?></option>
|
| 113 |
</select>
|
| 120 |
<div class="form__control__wrap">
|
| 121 |
<div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 122 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 123 |
+
<select name="rel" data-default="<?php echo esc_attr( $rel); ?>" <?php echo $pro_active ? '' : 'disabled'; ?>>
|
| 124 |
<option value="" <?php selected( '', $rel); ?>><?php esc_html_e( "From the same channel of the video", "embedpress" ); ?></option>
|
| 125 |
<option value="1" <?php selected( '1', $rel); ?>><?php esc_html_e( "Based on User's watch history", "embedpress" ); ?></option>
|
| 126 |
</select>
|
| 136 |
<div class="form__control__wrap">
|
| 137 |
<div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
|
| 138 |
<span><i class="ep-icon ep-caret-down"></i></span>
|
| 139 |
+
<select name="modestbranding" data-default="<?php echo esc_attr( $modestbranding); ?>" <?php echo !$pro_active ? 'disabled' : ''; ?>>
|
| 140 |
<option value="1" <?php selected( '1', $modestbranding); ?>><?php esc_html_e( "Hide", "embedpress" ); ?></option>
|
| 141 |
<option value="0" <?php selected( '0', $modestbranding); ?>><?php esc_html_e( "Show", "embedpress" ); ?></option>
|
| 142 |
</select>
|
| 147 |
</div>
|
| 148 |
</div>
|
| 149 |
<?php do_action( 'embedpress_after_youtube_settings_fields'); ?>
|
| 150 |
+
<button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="youtube"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
|
| 151 |
</form>
|
| 152 |
</div>
|
| 153 |
</div>
|
EmbedPress/Includes/Classes/EmbedPress_Notice.php
CHANGED
|
@@ -344,6 +344,10 @@ class EmbedPress_Notice {
|
|
| 344 |
$classes .= 'notice-has-thumbnail';
|
| 345 |
}
|
| 346 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 347 |
echo '<div data-notice="'. $current_notice .'" class="'. $classes .' wpdeveloper-'. $current_notice .'-notice">';
|
| 348 |
}
|
| 349 |
/**
|
|
@@ -351,6 +355,10 @@ class EmbedPress_Notice {
|
|
| 351 |
* @return void
|
| 352 |
*/
|
| 353 |
public function after(){
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
echo '</div>';
|
| 355 |
}
|
| 356 |
/**
|
|
@@ -458,6 +466,9 @@ class EmbedPress_Notice {
|
|
| 458 |
}
|
| 459 |
return false;
|
| 460 |
}
|
|
|
|
|
|
|
|
|
|
| 461 |
/**
|
| 462 |
* This method is responsible for get messages.
|
| 463 |
*
|
|
@@ -613,15 +624,11 @@ class EmbedPress_Notice {
|
|
| 613 |
* @return void
|
| 614 |
*/
|
| 615 |
public function first_install_end(){
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
// $args = wp_parse_args( $args, $options_data[ $this->plugin_name ] );
|
| 622 |
-
// $this->update_options_data( $args );
|
| 623 |
-
// }
|
| 624 |
-
delete_option( 'wpdeveloper_plugins_data' );
|
| 625 |
}
|
| 626 |
/**
|
| 627 |
* Get all options from database!
|
|
@@ -645,9 +652,13 @@ class EmbedPress_Notice {
|
|
| 645 |
* @param array $args
|
| 646 |
* @return void
|
| 647 |
*/
|
| 648 |
-
protected function update_options_data( $args = array() ){
|
| 649 |
-
$
|
| 650 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 651 |
update_option( 'wpdeveloper_plugins_data', $options_data );
|
| 652 |
}
|
| 653 |
/**
|
| 344 |
$classes .= 'notice-has-thumbnail';
|
| 345 |
}
|
| 346 |
|
| 347 |
+
if( ! $this->has_notice( $current_notice ) ) {
|
| 348 |
+
return;
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
echo '<div data-notice="'. $current_notice .'" class="'. $classes .' wpdeveloper-'. $current_notice .'-notice">';
|
| 352 |
}
|
| 353 |
/**
|
| 355 |
* @return void
|
| 356 |
*/
|
| 357 |
public function after(){
|
| 358 |
+
$current_notice = current( $this->next_notice() );
|
| 359 |
+
if( ! $this->has_notice( $current_notice ) ) {
|
| 360 |
+
return;
|
| 361 |
+
}
|
| 362 |
echo '</div>';
|
| 363 |
}
|
| 364 |
/**
|
| 466 |
}
|
| 467 |
return false;
|
| 468 |
}
|
| 469 |
+
private function has_notice( $notice ){
|
| 470 |
+
return isset( $this->data['message'], $this->data['message'][ $notice ] );
|
| 471 |
+
}
|
| 472 |
/**
|
| 473 |
* This method is responsible for get messages.
|
| 474 |
*
|
| 624 |
* @return void
|
| 625 |
*/
|
| 626 |
public function first_install_end(){
|
| 627 |
+
$options_data = $this->get_options_data();
|
| 628 |
+
if( isset( $options_data[ $this->plugin_name ] ) ) {
|
| 629 |
+
unset( $options_data[ $this->plugin_name ] );
|
| 630 |
+
$this->update_options_data( $options_data, true );
|
| 631 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 632 |
}
|
| 633 |
/**
|
| 634 |
* Get all options from database!
|
| 652 |
* @param array $args
|
| 653 |
* @return void
|
| 654 |
*/
|
| 655 |
+
protected function update_options_data( $args = array(), $update = false ){
|
| 656 |
+
if( $update ) {
|
| 657 |
+
$options_data = $args;
|
| 658 |
+
} else {
|
| 659 |
+
$options_data = $this->get_options_data();
|
| 660 |
+
$options_data[ $this->plugin_name ] = $args;
|
| 661 |
+
}
|
| 662 |
update_option( 'wpdeveloper_plugins_data', $options_data );
|
| 663 |
}
|
| 664 |
/**
|
EmbedPress/Includes/Classes/Feature_Enhancer.php
ADDED
|
@@ -0,0 +1,803 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
namespace EmbedPress\Includes\Classes;
|
| 3 |
+
|
| 4 |
+
class Feature_Enhancer {
|
| 5 |
+
|
| 6 |
+
public function __construct() {
|
| 7 |
+
add_filter( 'embedpress:onAfterEmbed', [$this, 'enhance_youtube'] );
|
| 8 |
+
add_filter( 'embedpress:onAfterEmbed', [$this, 'enhance_vimeo'] );
|
| 9 |
+
add_filter( 'embedpress:onAfterEmbed', [$this, 'enhance_wistia'] );
|
| 10 |
+
add_filter( 'embedpress:onAfterEmbed', [$this, 'enhance_twitch'] );
|
| 11 |
+
add_filter( 'embedpress_gutenberg_youtube_params',
|
| 12 |
+
[$this, 'embedpress_gutenberg_register_block_youtube'] );
|
| 13 |
+
add_action( 'init', array( $this, 'embedpress_gutenberg_register_block_vimeo' ) );
|
| 14 |
+
add_action('embedpress_gutenberg_wistia_block_after_embed', array($this,'embedpress_wistia_block_after_embed'));
|
| 15 |
+
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
public function getOptions($provider='', $schema=[])
|
| 19 |
+
{
|
| 20 |
+
$options = (array)get_option(EMBEDPRESS_PLG_NAME . ':' . $provider, []);
|
| 21 |
+
if (empty($options) || (count($options) === 1 && empty($options[0]))) {
|
| 22 |
+
$options = [];
|
| 23 |
+
|
| 24 |
+
foreach ($schema as $fieldSlug => $field) {
|
| 25 |
+
$value = isset($field['default']) ? $field['default'] : "";
|
| 26 |
+
|
| 27 |
+
settype($value, isset($field['type']) && in_array(strtolower($field['type']),
|
| 28 |
+
['bool', 'boolean', 'int', 'integer', 'float', 'string']) ? $field['type'] : 'string');
|
| 29 |
+
|
| 30 |
+
if ($fieldSlug === "license_key") {
|
| 31 |
+
$options['license'] = [
|
| 32 |
+
'key' => true,
|
| 33 |
+
'status' => "missing",
|
| 34 |
+
];
|
| 35 |
+
} else {
|
| 36 |
+
$options[$fieldSlug] = $value;
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
$options['license'] = [
|
| 42 |
+
'key' => true,
|
| 43 |
+
'status' => "missing",
|
| 44 |
+
];
|
| 45 |
+
return apply_filters( 'emebedpress_get_options', $options);
|
| 46 |
+
}
|
| 47 |
+
public function get_youtube_params( $options )
|
| 48 |
+
{
|
| 49 |
+
$params = [];
|
| 50 |
+
|
| 51 |
+
// Handle `autoplay` option.
|
| 52 |
+
if ( isset( $options[ 'autoplay' ] ) && (bool)$options[ 'autoplay' ] === true ) {
|
| 53 |
+
$params[ 'autoplay' ] = 1;
|
| 54 |
+
} else {
|
| 55 |
+
unset( $params[ 'autoplay' ] );
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
// Handle `controls` option.
|
| 59 |
+
if ( isset( $options[ 'controls' ] ) && in_array( (int)$options[ 'controls' ], [0, 1, 2] ) ) {
|
| 60 |
+
$params[ 'controls' ] = (int)$options[ 'controls' ];
|
| 61 |
+
} else {
|
| 62 |
+
unset( $params[ 'controls' ] );
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
// Handle `fs` option.
|
| 66 |
+
if ( isset( $options[ 'fs' ] ) && in_array( (int)$options[ 'fs' ], [0, 1] ) ) {
|
| 67 |
+
$params[ 'fs' ] = (int)$options[ 'fs' ];
|
| 68 |
+
} else {
|
| 69 |
+
unset( $params[ 'fs' ] );
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
// Handle `iv_load_policy` option.
|
| 73 |
+
if ( isset( $options[ 'iv_load_policy' ] ) && in_array( (int)$options[ 'iv_load_policy' ], [1, 3] ) ) {
|
| 74 |
+
$params[ 'iv_load_policy' ] = (int)$options[ 'iv_load_policy' ];
|
| 75 |
+
} else {
|
| 76 |
+
unset( $params[ 'iv_load_policy' ] );
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
return apply_filters( 'embedpress_youtube_params', $params);
|
| 80 |
+
|
| 81 |
+
}
|
| 82 |
+
public function get_vimeo_params($options) {
|
| 83 |
+
$params = [];
|
| 84 |
+
|
| 85 |
+
// Handle `display_title` option.
|
| 86 |
+
if (isset($options['display_title']) && (bool)$options['display_title'] === true) {
|
| 87 |
+
$params['title'] = 1;
|
| 88 |
+
} else {
|
| 89 |
+
$params['title'] = 0;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
// Handle `autoplay` option.
|
| 93 |
+
if (!empty($options['autoplay'])) {
|
| 94 |
+
$params['autoplay'] = 1;
|
| 95 |
+
} else {
|
| 96 |
+
unset($params['autoplay']);
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
// Handle `color` option.
|
| 100 |
+
if (!empty($options['color'])) {
|
| 101 |
+
$params['color'] = str_replace('#', '', $options['color']);
|
| 102 |
+
} else {
|
| 103 |
+
unset($params['color']);
|
| 104 |
+
}
|
| 105 |
+
return apply_filters( 'embedpress_vimeo_params', $params);
|
| 106 |
+
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
public function enhance_youtube( $embed )
|
| 110 |
+
{
|
| 111 |
+
$isYoutube = ( isset($embed->provider_name) && strtoupper( $embed->provider_name ) === 'YOUTUBE' ) || (isset( $embed->url) && isset( $embed->{$embed->url}) && isset( $embed->{$embed->url}['provider_name']) && strtoupper($embed->{$embed->url}['provider_name'] ) === 'YOUTUBE');
|
| 112 |
+
|
| 113 |
+
if ( $isYoutube && isset( $embed->embed )
|
| 114 |
+
&& preg_match( '/src=\"(.+?)\"/', $embed->embed, $match ) ) {
|
| 115 |
+
// for compatibility only, @TODO; remove later after deep testing.
|
| 116 |
+
$options = $this->getOptions('youtube', $this->get_youtube_settings_schema());
|
| 117 |
+
// Parse the url to retrieve all its info like variables etc.
|
| 118 |
+
$url_full = $match[ 1 ];
|
| 119 |
+
$query = parse_url( $url_full, PHP_URL_QUERY );
|
| 120 |
+
parse_str( $query, $params );
|
| 121 |
+
|
| 122 |
+
// Handle `autoplay` option.
|
| 123 |
+
if ( isset( $options[ 'autoplay' ] ) && (bool)$options[ 'autoplay' ] === true ) {
|
| 124 |
+
$params[ 'autoplay' ] = 1;
|
| 125 |
+
} else {
|
| 126 |
+
unset( $params[ 'autoplay' ] );
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
// Handle `controls` option.
|
| 130 |
+
if ( isset( $options[ 'controls' ] ) && in_array( (int)$options[ 'controls' ], [0, 1, 2] ) ) {
|
| 131 |
+
$params[ 'controls' ] = (int)$options[ 'controls' ];
|
| 132 |
+
} else {
|
| 133 |
+
unset( $params[ 'controls' ] );
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
// Handle `fs` option.
|
| 137 |
+
if ( isset( $options[ 'fs' ] ) && in_array( (int)$options[ 'fs' ], [0, 1] ) ) {
|
| 138 |
+
$params[ 'fs' ] = (int)$options[ 'fs' ];
|
| 139 |
+
} else {
|
| 140 |
+
unset( $params[ 'fs' ] );
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
// Handle `iv_load_policy` option.
|
| 144 |
+
if ( isset( $options[ 'iv_load_policy' ] ) && in_array( (int)$options[ 'iv_load_policy' ], [1, 3] ) ) {
|
| 145 |
+
$params[ 'iv_load_policy' ] = (int)$options[ 'iv_load_policy' ];
|
| 146 |
+
} else {
|
| 147 |
+
unset( $params[ 'iv_load_policy' ] );
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
// pro controls will be handled by the pro so remove it from the free.
|
| 152 |
+
$pro_controls = ['color', 'cc_load_policy', 'rel', 'modestbranding'];
|
| 153 |
+
foreach ( $pro_controls as $pro_control ) {
|
| 154 |
+
if ( isset( $params[ $pro_control ]) ) {
|
| 155 |
+
unset( $params[ $pro_control ]);
|
| 156 |
+
}
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
preg_match( '/(.+)?\?/', $url_full, $url );
|
| 161 |
+
$url = $url[ 1 ];
|
| 162 |
+
|
| 163 |
+
// Reassemble the url with the new variables.
|
| 164 |
+
$url_modified = $url . '?';
|
| 165 |
+
foreach ( $params as $paramName => $paramValue ) {
|
| 166 |
+
$url_modified .= $paramName . '=' . $paramValue . '&';
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
// Replaces the old url with the new one.
|
| 170 |
+
$embed->embed = str_replace( $url_full, rtrim( $url_modified, '&' ), $embed->embed );
|
| 171 |
+
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
return $embed;
|
| 175 |
+
}
|
| 176 |
+
public function enhance_vimeo( $embed ) {
|
| 177 |
+
if ( isset( $embed->provider_name )
|
| 178 |
+
&& strtoupper( $embed->provider_name ) === 'VIMEO'
|
| 179 |
+
&& isset( $embed->embed )
|
| 180 |
+
&& preg_match( '/src=\"(.+?)\"/', $embed->embed, $match ) ) {
|
| 181 |
+
// old schema is for backward compatibility only @todo; remove it in the next version after deep test
|
| 182 |
+
$options = $this->getOptions('vimeo', $this->get_vimeo_settings_schema());
|
| 183 |
+
|
| 184 |
+
$url_full = $match[1];
|
| 185 |
+
$params = [];
|
| 186 |
+
|
| 187 |
+
// Handle `display_title` option.
|
| 188 |
+
if ( isset( $options['display_title'] ) && (bool)$options['display_title'] === true ) {
|
| 189 |
+
$params['title'] = 1;
|
| 190 |
+
} else {
|
| 191 |
+
$params['title'] = 0;
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
// Handle `autoplay` option.
|
| 195 |
+
if ( isset( $options['autoplay'] ) && (bool)$options['autoplay'] === true ) {
|
| 196 |
+
$params['autoplay'] = 1;
|
| 197 |
+
} else {
|
| 198 |
+
unset( $params['autoplay'] );
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
// Handle `color` option.
|
| 202 |
+
if ( !empty( $options['color'] ) ) {
|
| 203 |
+
$params['color'] = str_replace( '#', '', $options['color'] );
|
| 204 |
+
} else {
|
| 205 |
+
unset( $params['color'] );
|
| 206 |
+
}
|
| 207 |
+
// NOTE: 'vimeo_dnt' is actually only 'dnt' in the params, so unset 'dnt' only
|
| 208 |
+
//@todo; maybe extract unsetting pro vars to a function later
|
| 209 |
+
$pro_controls = ['loop', 'autopause', 'dnt', 'portrait', 'byline'];
|
| 210 |
+
foreach ( $pro_controls as $pro_control ) {
|
| 211 |
+
if ( isset( $params[ $pro_control ]) ) {
|
| 212 |
+
unset( $params[ $pro_control ]);
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
// Reassemble the url with the new variables.
|
| 216 |
+
$url_modified = $url_full;
|
| 217 |
+
foreach ( $params as $param => $value ) {
|
| 218 |
+
$url_modified = add_query_arg( $param, $value, $url_modified );
|
| 219 |
+
}
|
| 220 |
+
do_action( 'embedpress_after_modified_url', $url_modified, $url_full, $params);
|
| 221 |
+
// Replaces the old url with the new one.
|
| 222 |
+
$embed->embed = str_replace( $url_full, $url_modified, $embed->embed );
|
| 223 |
+
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
return $embed;
|
| 227 |
+
}
|
| 228 |
+
public function enhance_wistia( $embed ) {
|
| 229 |
+
if (isset($embed->provider_name)
|
| 230 |
+
&& strtoupper($embed->provider_name) === 'WISTIA, INC.'
|
| 231 |
+
&& isset($embed->embed)
|
| 232 |
+
&& preg_match('/src=\"(.+?)\"/', $embed->embed, $match)) {
|
| 233 |
+
$options = $this->getOptions('wistia', $this->get_wistia_settings_schema());
|
| 234 |
+
|
| 235 |
+
$url_full = $match[1];
|
| 236 |
+
|
| 237 |
+
// Parse the url to retrieve all its info like variables etc.
|
| 238 |
+
$query = parse_url($embed->url, PHP_URL_QUERY);
|
| 239 |
+
$url = str_replace('?'.$query, '', $url_full);
|
| 240 |
+
|
| 241 |
+
parse_str($query, $params);
|
| 242 |
+
|
| 243 |
+
// Set the class in the attributes
|
| 244 |
+
$embed->attributes->class = str_replace('{provider_alias}', 'wistia', $embed->attributes->class);
|
| 245 |
+
$embed->embed = str_replace('ose-wistia, inc.', 'ose-wistia', $embed->embed);
|
| 246 |
+
|
| 247 |
+
// Embed Options
|
| 248 |
+
$embedOptions = new \stdClass;
|
| 249 |
+
$embedOptions->videoFoam = true;
|
| 250 |
+
$embedOptions->fullscreenButton = (isset($options['display_fullscreen_button']) && (bool) $options['display_fullscreen_button'] === true);
|
| 251 |
+
$embedOptions->smallPlayButton = (isset($options['small_play_button']) && (bool) $options['small_play_button'] === true);
|
| 252 |
+
|
| 253 |
+
$embedOptions->autoPlay = (isset($options['autoplay']) && (bool) $options['autoplay'] === true);
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
if (isset($options['player_color'])) {
|
| 257 |
+
$color = $options['player_color'];
|
| 258 |
+
if (null !== $color) {
|
| 259 |
+
$embedOptions->playerColor = $color;
|
| 260 |
+
}
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
// Plugins
|
| 264 |
+
$pluginsBaseURL = plugins_url('assets/js/wistia/min', dirname(__DIR__).'/embedpress-Wistia.php');
|
| 265 |
+
|
| 266 |
+
$pluginList = array();
|
| 267 |
+
|
| 268 |
+
// Resumable
|
| 269 |
+
if (isset($options['plugin_resumable'])) {
|
| 270 |
+
$isResumableEnabled = $options['plugin_resumable'];
|
| 271 |
+
if ($isResumableEnabled) {
|
| 272 |
+
// Add the resumable plugin
|
| 273 |
+
$pluginList['resumable'] = array(
|
| 274 |
+
'src' => $pluginsBaseURL.'/resumable.min.js',
|
| 275 |
+
'async' => false
|
| 276 |
+
);
|
| 277 |
+
}
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
// Add a fix for the autoplay and resumable work better together
|
| 281 |
+
if (isset($options->autoPlay)) {
|
| 282 |
+
if ($isResumableEnabled) {
|
| 283 |
+
$pluginList['fixautoplayresumable'] = array(
|
| 284 |
+
'src' => $pluginsBaseURL.'/fixautoplayresumable.min.js'
|
| 285 |
+
);
|
| 286 |
+
}
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
// Focus plugin
|
| 290 |
+
if (isset($options['plugin_focus'])) {
|
| 291 |
+
$isFocusEnabled = $options['plugin_focus'];
|
| 292 |
+
$pluginList['dimthelights'] = array(
|
| 293 |
+
'src' => $pluginsBaseURL.'/dimthelights.min.js',
|
| 294 |
+
'autoDim' => $isFocusEnabled
|
| 295 |
+
);
|
| 296 |
+
$embedOptions->focus = $isFocusEnabled;
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
$embedOptions->plugin = $pluginList;
|
| 301 |
+
$embedOptions = json_encode($embedOptions);
|
| 302 |
+
|
| 303 |
+
// Get the video ID
|
| 304 |
+
$videoId = $this->getVideoIDFromURL($embed->url);
|
| 305 |
+
$shortVideoId = substr($videoId, 0, 3);
|
| 306 |
+
|
| 307 |
+
// Responsive?
|
| 308 |
+
|
| 309 |
+
$class = array(
|
| 310 |
+
'wistia_embed',
|
| 311 |
+
'wistia_async_'.$videoId
|
| 312 |
+
);
|
| 313 |
+
|
| 314 |
+
$attribs = array(
|
| 315 |
+
sprintf('id="wistia_%s"', $videoId),
|
| 316 |
+
sprintf('class="%s"', join(' ', $class)),
|
| 317 |
+
sprintf('style="width:%spx; height:%spx;"', $embed->width, $embed->height)
|
| 318 |
+
);
|
| 319 |
+
|
| 320 |
+
$labels = array(
|
| 321 |
+
'watch_from_beginning' => __('Watch from the beginning', 'embedpress-wistia'),
|
| 322 |
+
'skip_to_where_you_left_off' => __('Skip to where you left off', 'embedpress-wistia'),
|
| 323 |
+
'you_have_watched_it_before' => __('It looks like you\'ve watched<br />part of this video before!',
|
| 324 |
+
'embedpress-wistia'),
|
| 325 |
+
);
|
| 326 |
+
$labels = json_encode($labels);
|
| 327 |
+
|
| 328 |
+
preg_match('/ose-uid-([a-z0-9]*)/', $embed->embed, $matches);
|
| 329 |
+
$uid = $matches[1];
|
| 330 |
+
|
| 331 |
+
$html = "<div class=\"embedpress-wrapper ose-wistia ose-uid-{$uid} responsive\">";
|
| 332 |
+
$html .= '<script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>';
|
| 333 |
+
$html .= "<script>window.pp_embed_wistia_labels = {$labels};</script>\n";
|
| 334 |
+
$html .= "<script>window._wq = window._wq || []; _wq.push({\"{$shortVideoId}\": {$embedOptions}});</script>\n";
|
| 335 |
+
$html .= '<div '.join(' ', $attribs)."></div>\n";
|
| 336 |
+
$html .= '</div>';
|
| 337 |
+
$embed->embed = $html;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
return $embed;
|
| 341 |
+
}
|
| 342 |
+
public function enhance_twitch( $embed_content ) {
|
| 343 |
+
$e = isset( $embed_content->url) && isset( $embed_content->{$embed_content->url}) ? $embed_content->{$embed_content->url} : [];
|
| 344 |
+
if ( isset( $e['provider_name'] ) && strtoupper( $e['provider_name'] ) === 'TWITCH' && isset( $embed_content->embed ) ) {
|
| 345 |
+
$settings = $this->getOptions('twitch', $this->get_twitch_settings_schema());
|
| 346 |
+
|
| 347 |
+
$atts = isset( $embed_content->attributes) ? $embed_content->attributes : [];
|
| 348 |
+
$type = $e['type'];
|
| 349 |
+
$content_id = $e['content_id'];
|
| 350 |
+
$channel = 'channel' === $type ? $content_id : '';
|
| 351 |
+
$video = 'video' === $type ? $content_id : '';
|
| 352 |
+
$full_screen = ('yes' === $settings['embedpress_pro_fs']) ? 'true': 'false';
|
| 353 |
+
$autoplay = ('yes' === $settings['embedpress_pro_twitch_autoplay']) ? 'true': 'false';
|
| 354 |
+
$layout = 'video';
|
| 355 |
+
$width = !empty( $atts->{'data-width'}) ? (int) $atts->{'data-width'} : 800;
|
| 356 |
+
$height = !empty( $atts->{'data-height'}) ? (int) $atts->{'data-height'} : 450;
|
| 357 |
+
|
| 358 |
+
$url = "https://embed.twitch.tv?autoplay={$autoplay}&channel={$channel}&height={$height}&layout={$layout}&migration=true&video={$video}&width={$width}&allowfullscreen={$full_screen}";
|
| 359 |
+
$pars_url = wp_parse_url(get_site_url());
|
| 360 |
+
$url = !empty($pars_url['host'])?$url.'&parent='.$pars_url['host']:$url;
|
| 361 |
+
ob_start();
|
| 362 |
+
?>
|
| 363 |
+
<div class="embedpress_wrapper" data-url="<?php echo esc_attr(esc_url( $embed_content->url));?>">
|
| 364 |
+
<iframe src="<?php echo esc_url( $url); ?>" allowfullscreen="" scrolling="no" frameborder="0" allow="autoplay; fullscreen" title="Twitch" sandbox="allow-modals allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox" width="<?php echo esc_attr($width); ?>" height="<?php echo esc_attr($height); ?>" style="max-width: 100%; max-height:<?php echo esc_attr($width); ?>px;"></iframe>
|
| 365 |
+
</div>
|
| 366 |
+
<?php
|
| 367 |
+
$c = ob_get_clean();
|
| 368 |
+
$embed_content->embed = $c;
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
return $embed_content;
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
public function embedpress_gutenberg_register_block_youtube( $youtube_params ) {
|
| 375 |
+
$youtube_options = $this->getOptions('youtube', $this->get_youtube_settings_schema());
|
| 376 |
+
return $this->get_youtube_params( $youtube_options );
|
| 377 |
+
}
|
| 378 |
+
public function embedpress_gutenberg_register_block_vimeo() {
|
| 379 |
+
if ( function_exists( 'register_block_type' ) ) :
|
| 380 |
+
register_block_type( 'embedpress/vimeo-block', array(
|
| 381 |
+
'attributes' => array(
|
| 382 |
+
'url' => array(
|
| 383 |
+
'type' => 'string',
|
| 384 |
+
'default' => ''
|
| 385 |
+
),
|
| 386 |
+
'iframeSrc' => array(
|
| 387 |
+
'type' => 'string',
|
| 388 |
+
'default' => ''
|
| 389 |
+
),
|
| 390 |
+
),
|
| 391 |
+
'render_callback' => [ $this, 'embedpress_gutenberg_render_block_vimeo' ]
|
| 392 |
+
) );
|
| 393 |
+
endif;
|
| 394 |
+
}
|
| 395 |
+
public function embedpress_gutenberg_render_block_vimeo( $attributes ) {
|
| 396 |
+
ob_start();
|
| 397 |
+
if ( !empty( $attributes ) && !empty( $attributes['iframeSrc'] ) ) :
|
| 398 |
+
$vimeo_options = $this->getOptions('vimeo', $this->get_vimeo_settings_schema());
|
| 399 |
+
$vimeo_params = $this->get_vimeo_params( $vimeo_options );
|
| 400 |
+
$iframeUrl = $attributes['iframeSrc'];
|
| 401 |
+
$align = 'align' . ( isset( $attributes[ 'align' ] ) ? $attributes[ 'align' ] : 'center' );
|
| 402 |
+
foreach ( $vimeo_params as $param => $value ) {
|
| 403 |
+
$iframeUrl = add_query_arg( $param, $value, $iframeUrl );
|
| 404 |
+
}
|
| 405 |
+
//@TODO; test responsive without static height width, keeping for now backward compatibility
|
| 406 |
+
?>
|
| 407 |
+
<div class="ose-vimeo wp-block-embed-vimeo <?php echo $align; ?>">
|
| 408 |
+
<iframe src="<?php echo $iframeUrl; ?>" allowtransparency="true" frameborder="0" width="640" height="360">
|
| 409 |
+
</iframe>
|
| 410 |
+
</div>
|
| 411 |
+
<?php
|
| 412 |
+
endif;
|
| 413 |
+
|
| 414 |
+
return apply_filters( 'embedpress_gutenberg_block_markup', ob_get_clean());
|
| 415 |
+
}
|
| 416 |
+
public function get_youtube_settings_schema() {
|
| 417 |
+
return [
|
| 418 |
+
'autoplay' => [
|
| 419 |
+
'type' => 'bool',
|
| 420 |
+
'label' => 'Auto Play',
|
| 421 |
+
'description' => 'Automatically start to play the videos when the player loads.',
|
| 422 |
+
'default' => false
|
| 423 |
+
],
|
| 424 |
+
'color' => [
|
| 425 |
+
'type' => 'string',
|
| 426 |
+
'label' => 'Progress bar color',
|
| 427 |
+
'description' => 'Specifies the color that will be used in the player\'s video progress bar to highlight the amount of the video that the viewer has already seen.<br/>Note: Setting the color to <strong>white</strong> will disable the <strong>Modest Branding</strong> option (causing a YouTube logo to be displayed in the control bar).',
|
| 428 |
+
'options' => [
|
| 429 |
+
'red' => 'Red',
|
| 430 |
+
'white' => 'White'
|
| 431 |
+
],
|
| 432 |
+
'default' => 'red'
|
| 433 |
+
],
|
| 434 |
+
'cc_load_policy' => [
|
| 435 |
+
'type' => 'bool',
|
| 436 |
+
'label' => 'Force Closed Captions',
|
| 437 |
+
'description' => 'Setting this option to <strong>Yes</strong> causes closed captions to be shown by default, even if the user has turned captions off. This will be based on user preference otherwise.',
|
| 438 |
+
'default' => false
|
| 439 |
+
],
|
| 440 |
+
'controls' => [
|
| 441 |
+
'type' => 'string',
|
| 442 |
+
'label' => 'Display Controls',
|
| 443 |
+
'description' => 'Indicates whether the video player controls are displayed.',
|
| 444 |
+
'options' => [
|
| 445 |
+
'1' => 'Display immediately',
|
| 446 |
+
'2' => 'Display after user initiation',
|
| 447 |
+
'0' => 'Hide controls',
|
| 448 |
+
],
|
| 449 |
+
'default' => '1'
|
| 450 |
+
],
|
| 451 |
+
'fs' => [
|
| 452 |
+
'type' => 'bool',
|
| 453 |
+
'label' => 'Enable Fullscreen button',
|
| 454 |
+
'description' => 'Indicates whether the fullscreen button is enabled.',
|
| 455 |
+
'default' => true
|
| 456 |
+
],
|
| 457 |
+
'iv_load_policy' => [
|
| 458 |
+
'type' => 'radio',
|
| 459 |
+
'label' => 'Display video annotations',
|
| 460 |
+
'description' => 'Indicates whether video annotations are displayed.',
|
| 461 |
+
'options' => [
|
| 462 |
+
'1' => 'Display',
|
| 463 |
+
'3' => 'Do not display'
|
| 464 |
+
],
|
| 465 |
+
'default' => '1'
|
| 466 |
+
],
|
| 467 |
+
'rel' => [
|
| 468 |
+
'type' => 'bool',
|
| 469 |
+
'label' => 'Display related videos',
|
| 470 |
+
'description' => 'Indicates whether the player should show related videos when playback of the initial video ends.',
|
| 471 |
+
'default' => true
|
| 472 |
+
],
|
| 473 |
+
'modestbranding' => [
|
| 474 |
+
'type' => 'string',
|
| 475 |
+
'label' => 'Modest Branding',
|
| 476 |
+
'description' => 'Indicates whether the player should display a YouTube logo in the control bar.',
|
| 477 |
+
'options' => [
|
| 478 |
+
'0' => 'Display',
|
| 479 |
+
'1' => 'Do not display'
|
| 480 |
+
],
|
| 481 |
+
'default' => '0'
|
| 482 |
+
],
|
| 483 |
+
'logo_url' => [
|
| 484 |
+
'type' => 'url',
|
| 485 |
+
'label' => __('Custom Logo URL', 'embedpress-pro'),
|
| 486 |
+
'description' => __('You can show custom logo watermark on your video', 'embedpress-pro'),
|
| 487 |
+
],
|
| 488 |
+
'logo_xpos' => [
|
| 489 |
+
'type' => 'number',
|
| 490 |
+
'label' => __( 'Logo X Position (%)', 'embedpress-pro' ),
|
| 491 |
+
'description' => __( 'Change this number to move your logo in horizontal direction.', 'embedpress-pro' ),
|
| 492 |
+
'default' => 10
|
| 493 |
+
],
|
| 494 |
+
'logo_ypos' => [
|
| 495 |
+
'type' => 'number',
|
| 496 |
+
'label' => __( 'Logo Y Position (%)', 'embedpress-pro' ),
|
| 497 |
+
'description' => __( 'Change this number to move your logo in vertical direction.', 'embedpress-pro' ),
|
| 498 |
+
'default' => 10
|
| 499 |
+
],
|
| 500 |
+
'cta_url' => [
|
| 501 |
+
'type' => 'url',
|
| 502 |
+
'label' => __( 'CTA link for Logo', 'embedpress-pro' ),
|
| 503 |
+
'description' => __( 'You can show the logo inside a link. Leave it empty to hide it', 'embedpress-pro' ),
|
| 504 |
+
],
|
| 505 |
+
];
|
| 506 |
+
}
|
| 507 |
+
public function get_vimeo_settings_schema() {
|
| 508 |
+
return array(
|
| 509 |
+
'autoplay' => array(
|
| 510 |
+
'type' => 'bool',
|
| 511 |
+
'label' => 'Autoplay',
|
| 512 |
+
'description' => 'Automatically start to play the videos when the player loads.',
|
| 513 |
+
'default' => false
|
| 514 |
+
),
|
| 515 |
+
'loop' => array(
|
| 516 |
+
'type' => 'bool',
|
| 517 |
+
'label' => 'Loop',
|
| 518 |
+
'description' => 'Play the video again automatically when it reaches the end.',
|
| 519 |
+
'default' => false
|
| 520 |
+
),
|
| 521 |
+
'autopause' => array(
|
| 522 |
+
'type' => 'bool',
|
| 523 |
+
'label' => 'Autopause',
|
| 524 |
+
'description' => 'Pause this video automatically when another one plays.',
|
| 525 |
+
'default' => false
|
| 526 |
+
),
|
| 527 |
+
'vimeo_dnt' => array(
|
| 528 |
+
'type' => 'bool',
|
| 529 |
+
'label' => 'DNT',
|
| 530 |
+
'description' => 'Setting this parameter to "yes" will block the player from tracking any session data, including all cookies',
|
| 531 |
+
'default' => true,
|
| 532 |
+
),
|
| 533 |
+
'color' => array(
|
| 534 |
+
'type' => 'text',
|
| 535 |
+
'label' => 'Color',
|
| 536 |
+
'description' => 'Specify the color of the video controls.',
|
| 537 |
+
'default' => '#00adef',
|
| 538 |
+
'classes' => 'color-field'
|
| 539 |
+
),
|
| 540 |
+
'display_title' => array(
|
| 541 |
+
'type' => 'bool',
|
| 542 |
+
'label' => 'Display Title',
|
| 543 |
+
'description' => 'Indicates whether the title is displayed.',
|
| 544 |
+
'default' => true
|
| 545 |
+
),
|
| 546 |
+
'display_author' => array(
|
| 547 |
+
'type' => 'bool',
|
| 548 |
+
'label' => 'Display Author',
|
| 549 |
+
'description' => 'Indicates whether the author is displayed.',
|
| 550 |
+
'default' => true
|
| 551 |
+
),
|
| 552 |
+
'display_avatar' => array(
|
| 553 |
+
'type' => 'bool',
|
| 554 |
+
'label' => 'Display Avatar',
|
| 555 |
+
'description' => 'Indicates whether the avatar is displayed.',
|
| 556 |
+
'default' => true
|
| 557 |
+
)
|
| 558 |
+
);
|
| 559 |
+
}
|
| 560 |
+
public function get_wistia_settings_schema() {
|
| 561 |
+
$schema = array(
|
| 562 |
+
'display_fullscreen_button' => array(
|
| 563 |
+
'type' => 'bool',
|
| 564 |
+
'label' => __('Fullscreen Button', 'embedpress-wistia'),
|
| 565 |
+
'description' => __('Indicates whether the fullscreen button is visible.', 'embedpress-wistia'),
|
| 566 |
+
'default' => true
|
| 567 |
+
),
|
| 568 |
+
'display_playbar' => array(
|
| 569 |
+
'type' => 'bool',
|
| 570 |
+
'label' => __('Playbar', 'embedpress-wistia'),
|
| 571 |
+
'description' => __('Indicates whether the playbar is visible.', 'embedpress-wistia'),
|
| 572 |
+
'default' => true
|
| 573 |
+
),
|
| 574 |
+
'small_play_button' => array(
|
| 575 |
+
'type' => 'bool',
|
| 576 |
+
'label' => __('Small Play Button', 'embedpress-wistia'),
|
| 577 |
+
'description' => __('Indicates whether the small play button is visible on the bottom left.',
|
| 578 |
+
'embedpress-wistia'),
|
| 579 |
+
'default' => true
|
| 580 |
+
),
|
| 581 |
+
'display_volume_control' => array(
|
| 582 |
+
'type' => 'bool',
|
| 583 |
+
'label' => __('Volume Control', 'embedpress-wistia'),
|
| 584 |
+
'description' => __('Indicates whether the volume control is visible.', 'embedpress-wistia'),
|
| 585 |
+
'default' => true
|
| 586 |
+
),
|
| 587 |
+
'autoplay' => array(
|
| 588 |
+
'type' => 'bool',
|
| 589 |
+
'label' => __('Auto Play', 'embedpress-wistia'),
|
| 590 |
+
'description' => __('Automatically start to play the videos when the player loads.',
|
| 591 |
+
'embedpress-wistia'),
|
| 592 |
+
'default' => false
|
| 593 |
+
),
|
| 594 |
+
'volume' => array(
|
| 595 |
+
'type' => 'text',
|
| 596 |
+
'label' => __('Volume', 'embedpress-wistia'),
|
| 597 |
+
'description' => __('Start the video with a custom volume level. Set values between 0 and 100.',
|
| 598 |
+
'embedpress-wistia'),
|
| 599 |
+
'default' => '100'
|
| 600 |
+
),
|
| 601 |
+
'player_color' => array(
|
| 602 |
+
'type' => 'text',
|
| 603 |
+
'label' => __('Color', 'embedpress-wistia'),
|
| 604 |
+
'description' => __('Specify the color of the video controls.', 'embedpress-wistia'),
|
| 605 |
+
'default' => '#00adef',
|
| 606 |
+
'classes' => 'color-field'
|
| 607 |
+
),
|
| 608 |
+
'plugin_resumable' => array(
|
| 609 |
+
'type' => 'bool',
|
| 610 |
+
'label' => __('Plugin: Resumable', 'embedpress-wistia'),
|
| 611 |
+
'description' => __('Indicates whether the Resumable plugin is active. Allow to resume the video or start from the begining.',
|
| 612 |
+
'embedpress-wistia'),
|
| 613 |
+
'default' => false
|
| 614 |
+
),
|
| 615 |
+
'plugin_captions' => array(
|
| 616 |
+
'type' => 'bool',
|
| 617 |
+
'label' => __('Plugin: Captions', 'embedpress-wistia'),
|
| 618 |
+
'description' => __('Indicates whether the Captions plugin is active.', 'embedpress-wistia'),
|
| 619 |
+
'default' => false
|
| 620 |
+
),
|
| 621 |
+
'plugin_captions_default' => array(
|
| 622 |
+
'type' => 'bool',
|
| 623 |
+
'label' => __('Captions Enabled By Default', 'embedpress-wistia'),
|
| 624 |
+
'description' => __('Indicates whether the Captions are enabled by default.', 'embedpress-wistia'),
|
| 625 |
+
'default' => false
|
| 626 |
+
),
|
| 627 |
+
'plugin_focus' => array(
|
| 628 |
+
'type' => 'bool',
|
| 629 |
+
'label' => __('Plugin: Focus', 'embedpress-wistia'),
|
| 630 |
+
'description' => __('Indicates whether the Focus plugin is active.', 'embedpress-wistia'),
|
| 631 |
+
'default' => false
|
| 632 |
+
),
|
| 633 |
+
'plugin_rewind' => array(
|
| 634 |
+
'type' => 'bool',
|
| 635 |
+
'label' => __('Plugin: Rewind', 'embedpress-wistia'),
|
| 636 |
+
'description' => __('Indicates whether the Rewind plugin is active.', 'embedpress-wistia'),
|
| 637 |
+
'default' => false
|
| 638 |
+
),
|
| 639 |
+
'plugin_rewind_time' => array(
|
| 640 |
+
'type' => 'text',
|
| 641 |
+
'label' => __('Rewind time (seconds)', 'embedpress-wistia'),
|
| 642 |
+
'description' => __('The amount of time to rewind, in seconds.', 'embedpress-wistia'),
|
| 643 |
+
'default' => '10'
|
| 644 |
+
),
|
| 645 |
+
);
|
| 646 |
+
|
| 647 |
+
return $schema;
|
| 648 |
+
}
|
| 649 |
+
public function getVideoIDFromURL ($url) {
|
| 650 |
+
// https://fast.wistia.com/embed/medias/xf1edjzn92.jsonp
|
| 651 |
+
// https://ostraining-1.wistia.com/medias/xf1edjzn92
|
| 652 |
+
preg_match('#\/medias\\\?\/([a-z0-9]+)\.?#i', $url, $matches);
|
| 653 |
+
|
| 654 |
+
$id = false;
|
| 655 |
+
if (isset($matches[1])) {
|
| 656 |
+
$id = $matches[1];
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
return $id;
|
| 660 |
+
}
|
| 661 |
+
|
| 662 |
+
public function embedpress_wistia_block_after_embed( $attributes ){
|
| 663 |
+
$embedOptions= $this->embedpress_wisita_pro_get_options();
|
| 664 |
+
// Get the video ID
|
| 665 |
+
$videoId = $this->getVideoIDFromURL($attributes['url']);
|
| 666 |
+
$shortVideoId = $videoId;
|
| 667 |
+
|
| 668 |
+
$labels = array(
|
| 669 |
+
'watch_from_beginning' => __('Watch from the beginning', 'embedpress-wistia'),
|
| 670 |
+
'skip_to_where_you_left_off' => __('Skip to where you left off', 'embedpress-wistia'),
|
| 671 |
+
'you_have_watched_it_before' => __('It looks like you\'ve watched<br />part of this video before!', 'embedpress-wistia'),
|
| 672 |
+
);
|
| 673 |
+
$labels = json_encode($labels);
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
$html = '<script src="https://fast.wistia.com/assets/external/E-v1.js"></script>';
|
| 677 |
+
$html .= "<script>window.pp_embed_wistia_labels = {$labels};</script>\n";
|
| 678 |
+
$html .= "<script>wistiaEmbed = Wistia.embed( \"{$shortVideoId}\", {$embedOptions} );</script>\n";
|
| 679 |
+
echo $html;
|
| 680 |
+
}
|
| 681 |
+
public function embedpress_wisita_pro_get_options() {
|
| 682 |
+
$options = $this->getOptions('wistia', $this->get_wistia_settings_schema());
|
| 683 |
+
// Embed Options
|
| 684 |
+
$embedOptions = new \stdClass;
|
| 685 |
+
$embedOptions->videoFoam = true;
|
| 686 |
+
$embedOptions->fullscreenButton = (isset($options['display_fullscreen_button']) && (bool)$options['display_fullscreen_button'] === true);
|
| 687 |
+
$embedOptions->smallPlayButton = (isset($options['small_play_button']) && (bool)$options['small_play_button'] === true);
|
| 688 |
+
$embedOptions->autoPlay = (isset($options['autoplay']) && (bool)$options['autoplay'] === true);
|
| 689 |
+
|
| 690 |
+
if (isset($options['player_color'])) {
|
| 691 |
+
$color = $options['player_color'];
|
| 692 |
+
if (null !== $color) {
|
| 693 |
+
$embedOptions->playerColor = $color;
|
| 694 |
+
}
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
// Plugins
|
| 698 |
+
$pluginsBaseURL = plugins_url('assets/js/wistia/min', dirname(__DIR__) . '/embedpress-Wistia.php');
|
| 699 |
+
|
| 700 |
+
$pluginList = array();
|
| 701 |
+
|
| 702 |
+
// Resumable
|
| 703 |
+
if (isset($options['plugin_resumable'])) {
|
| 704 |
+
$isResumableEnabled = $options['plugin_resumable'];
|
| 705 |
+
if ($isResumableEnabled) {
|
| 706 |
+
// Add the resumable plugin
|
| 707 |
+
$pluginList['resumable'] = array(
|
| 708 |
+
'src' => '//fast.wistia.com/labs/resumable/plugin.js',
|
| 709 |
+
'async' => false
|
| 710 |
+
);
|
| 711 |
+
}
|
| 712 |
+
}
|
| 713 |
+
// Add a fix for the autoplay and resumable work better together
|
| 714 |
+
//@TODO; check baseurl deeply, not looking good
|
| 715 |
+
if ($options['autoplay']) {
|
| 716 |
+
if ($isResumableEnabled) {
|
| 717 |
+
$pluginList['fixautoplayresumable'] = array(
|
| 718 |
+
'src' => $pluginsBaseURL . '/fixautoplayresumable.min.js'
|
| 719 |
+
);
|
| 720 |
+
}
|
| 721 |
+
}
|
| 722 |
+
|
| 723 |
+
|
| 724 |
+
// Focus plugin
|
| 725 |
+
if (isset($options['plugin_focus'])) {
|
| 726 |
+
$isFocusEnabled = $options['plugin_focus'];
|
| 727 |
+
$pluginList['dimthelights'] = array(
|
| 728 |
+
'src' => '//fast.wistia.com/labs/dim-the-lights/plugin.js',
|
| 729 |
+
'autoDim' => $isFocusEnabled
|
| 730 |
+
);
|
| 731 |
+
$embedOptions->focus = $isFocusEnabled;
|
| 732 |
+
}
|
| 733 |
+
|
| 734 |
+
$embedOptions->plugin = $pluginList;
|
| 735 |
+
$embedOptions = apply_filters( 'embedpress_wistia_params', $embedOptions);
|
| 736 |
+
$embedOptions = json_encode($embedOptions);
|
| 737 |
+
return apply_filters( 'embedpress_wistia_params_after_encode', $embedOptions);
|
| 738 |
+
}
|
| 739 |
+
|
| 740 |
+
public function get_twitch_settings_schema() {
|
| 741 |
+
return [
|
| 742 |
+
'embedpress_pro_video_start_time' => [
|
| 743 |
+
'type' => 'number',
|
| 744 |
+
'label' => __( 'Start Time (in Seconds)', 'embedpress-pro' ),
|
| 745 |
+
'description' => __( 'You can put a custom time in seconds to start the video from. Example: 500', 'embedpress-pro' ),
|
| 746 |
+
'default' => 0,
|
| 747 |
+
],
|
| 748 |
+
'embedpress_pro_twitch_autoplay' => [
|
| 749 |
+
'type' => 'string',
|
| 750 |
+
'label' => __( 'Auto Play', 'embedpress-pro' ),
|
| 751 |
+
'description' => __( 'Automatically start to play the videos when the player loads.', 'embedpress-pro' ),
|
| 752 |
+
'options' => [
|
| 753 |
+
'yes' => __( 'Yes', 'embedpress-pro' ),
|
| 754 |
+
'no' => __( 'No', 'embedpress-pro' ),
|
| 755 |
+
],
|
| 756 |
+
'default' => 'no',
|
| 757 |
+
],
|
| 758 |
+
'embedpress_pro_twitch_chat' => [
|
| 759 |
+
'type' => 'string',
|
| 760 |
+
'label' => __( 'Show chat', 'embedpress-pro' ),
|
| 761 |
+
'description' => __( 'You can show or hide chat using this settings' ),
|
| 762 |
+
'options' => [
|
| 763 |
+
'yes' => __( 'Yes', 'embedpress-pro' ),
|
| 764 |
+
'no' => __( 'No', 'embedpress-pro' ),
|
| 765 |
+
],
|
| 766 |
+
'default' => 'no',
|
| 767 |
+
],
|
| 768 |
+
|
| 769 |
+
'embedpress_pro_twitch_theme' => [
|
| 770 |
+
'type' => 'string',
|
| 771 |
+
'label' => __( 'Theme', 'embedpress-pro' ),
|
| 772 |
+
'description' => __( 'Set dark or light theme for the twitch comment', 'embedpress-pro' ),
|
| 773 |
+
'options' => [
|
| 774 |
+
'dark' => __( 'Dark', 'embedpress-pro' ),
|
| 775 |
+
'light' => __( 'Light', 'embedpress-pro' ),
|
| 776 |
+
],
|
| 777 |
+
'default' => 'dark',
|
| 778 |
+
],
|
| 779 |
+
'embedpress_pro_fs' => [
|
| 780 |
+
'type' => 'string',
|
| 781 |
+
'label' => 'Enable Fullscreen button',
|
| 782 |
+
'description' => __( 'Indicates whether the fullscreen button is enabled.', 'embedpress-pro' ),
|
| 783 |
+
'options' => [
|
| 784 |
+
'yes' => __( 'Yes', 'embedpress-pro' ),
|
| 785 |
+
'no' => __( 'No', 'embedpress-pro' ),
|
| 786 |
+
],
|
| 787 |
+
'default' => 'yes',
|
| 788 |
+
],
|
| 789 |
+
'embedpress_pro_twitch_mute' => [
|
| 790 |
+
'type' => 'string',
|
| 791 |
+
'label' => __( 'Mute on start', 'embedpress-pro' ),
|
| 792 |
+
'description' => __( 'Set it to Yes to mute the video on start.', 'embedpress-pro' ),
|
| 793 |
+
'options' => [
|
| 794 |
+
'yes' => __( 'Yes', 'embedpress-pro' ),
|
| 795 |
+
'no' => __( 'No', 'embedpress-pro' ),
|
| 796 |
+
],
|
| 797 |
+
'default' => 'yes',
|
| 798 |
+
],
|
| 799 |
+
|
| 800 |
+
];
|
| 801 |
+
}
|
| 802 |
+
|
| 803 |
+
}
|
EmbedPress/Shortcode.php
CHANGED
|
@@ -119,10 +119,11 @@ class Shortcode {
|
|
| 119 |
$hash = 'embedpress_'.$content_uid . md5( implode( ':', array_values( $customAttributes)));
|
| 120 |
|
| 121 |
// check if we have data cached
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
|
|
|
| 126 |
self::$ombed_attributes = self::parseContentAttributes( $customAttributes, $content_uid );
|
| 127 |
self::set_embera_settings(self::$ombed_attributes);
|
| 128 |
|
| 119 |
$hash = 'embedpress_'.$content_uid . md5( implode( ':', array_values( $customAttributes)));
|
| 120 |
|
| 121 |
// check if we have data cached
|
| 122 |
+
//@TODO; add caching later and remove caching on settings save
|
| 123 |
+
//if ( $embed = get_transient( $hash) ) {
|
| 124 |
+
// $embed = apply_filters( 'embedpress:onAfterEmbed', $embed );
|
| 125 |
+
// return $embed;
|
| 126 |
+
//}
|
| 127 |
self::$ombed_attributes = self::parseContentAttributes( $customAttributes, $content_uid );
|
| 128 |
self::set_embera_settings(self::$ombed_attributes);
|
| 129 |
|
assets/css/embedpress.css
CHANGED
|
@@ -125,3 +125,12 @@
|
|
| 125 |
padding-bottom: 0;
|
| 126 |
width: 100%;
|
| 127 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
padding-bottom: 0;
|
| 126 |
width: 100%;
|
| 127 |
}
|
| 128 |
+
.elementor-widget-container iframe {
|
| 129 |
+
max-height: 100% !important;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
@media only screen and (max-width: 800px) {
|
| 133 |
+
.elementor-widget-container iframe {
|
| 134 |
+
max-height: 100% !important;
|
| 135 |
+
}
|
| 136 |
+
}
|
embedpress.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: EmbedPress lets you embed videos, images, posts, audio, maps and uplaoad PDF, DOC, PPT & all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors. 100+ sources supported.
|
| 6 |
* Author: WPDeveloper
|
| 7 |
* Author URI: https://wpdeveloper.net
|
| 8 |
-
* Version: 3.0.
|
| 9 |
* Text Domain: embedpress
|
| 10 |
* Domain Path: /languages
|
| 11 |
*
|
|
@@ -24,6 +24,7 @@ use EmbedPress\Compatibility;
|
|
| 24 |
use EmbedPress\Core;
|
| 25 |
use EmbedPress\CoreLegacy;
|
| 26 |
use EmbedPress\Elementor\Embedpress_Elementor_Integration;
|
|
|
|
| 27 |
|
| 28 |
defined('ABSPATH') or die("No direct script access allowed.");
|
| 29 |
|
|
@@ -77,7 +78,9 @@ if ( ! is_plugin_active('gutenberg/gutenberg.php')) {
|
|
| 77 |
} else {
|
| 78 |
$embedPressPlugin = new CoreLegacy();
|
| 79 |
}
|
|
|
|
| 80 |
$embedPressPlugin->initialize();
|
|
|
|
| 81 |
}
|
| 82 |
|
| 83 |
if ( is_plugin_active('elementor/elementor.php')) {
|
| 5 |
* Description: EmbedPress lets you embed videos, images, posts, audio, maps and uplaoad PDF, DOC, PPT & all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors. 100+ sources supported.
|
| 6 |
* Author: WPDeveloper
|
| 7 |
* Author URI: https://wpdeveloper.net
|
| 8 |
+
* Version: 3.0.1
|
| 9 |
* Text Domain: embedpress
|
| 10 |
* Domain Path: /languages
|
| 11 |
*
|
| 24 |
use EmbedPress\Core;
|
| 25 |
use EmbedPress\CoreLegacy;
|
| 26 |
use EmbedPress\Elementor\Embedpress_Elementor_Integration;
|
| 27 |
+
use EmbedPress\Includes\Classes\Feature_Enhancer;
|
| 28 |
|
| 29 |
defined('ABSPATH') or die("No direct script access allowed.");
|
| 30 |
|
| 78 |
} else {
|
| 79 |
$embedPressPlugin = new CoreLegacy();
|
| 80 |
}
|
| 81 |
+
|
| 82 |
$embedPressPlugin->initialize();
|
| 83 |
+
new Feature_Enhancer();
|
| 84 |
}
|
| 85 |
|
| 86 |
if ( is_plugin_active('elementor/elementor.php')) {
|
includes.php
CHANGED
|
@@ -22,7 +22,7 @@ if ( ! defined('EMBEDPRESS_PLG_NAME')) {
|
|
| 22 |
}
|
| 23 |
|
| 24 |
if ( ! defined('EMBEDPRESS_VERSION')) {
|
| 25 |
-
define('EMBEDPRESS_VERSION', "3.0.
|
| 26 |
/**
|
| 27 |
* @deprecated 2.2.0
|
| 28 |
*/
|
| 22 |
}
|
| 23 |
|
| 24 |
if ( ! defined('EMBEDPRESS_VERSION')) {
|
| 25 |
+
define('EMBEDPRESS_VERSION', "3.0.1");
|
| 26 |
/**
|
| 27 |
* @deprecated 2.2.0
|
| 28 |
*/
|
readme.txt
CHANGED
|
@@ -6,7 +6,7 @@ Tags: embed, embed youtube, gutenberg embed, pdf, doc, docs, ppt, elementor embe
|
|
| 6 |
Requires at least: 4.6
|
| 7 |
Tested up to: 5.7
|
| 8 |
Requires PHP: 5.6
|
| 9 |
-
Stable tag: 3.0.
|
| 10 |
License: GPLv3 or later
|
| 11 |
License URI: https://opensource.org/licenses/GPL-3.0
|
| 12 |
|
|
@@ -301,6 +301,12 @@ Not at all. You can set up everything your team needs without any coding knowled
|
|
| 301 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
| 302 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
| 303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
|
| 305 |
= [3.0.0] - 2021-05-19 =
|
| 306 |
* Redesigned : Entire Settings panel.
|
| 6 |
Requires at least: 4.6
|
| 7 |
Tested up to: 5.7
|
| 8 |
Requires PHP: 5.6
|
| 9 |
+
Stable tag: 3.0.1
|
| 10 |
License: GPLv3 or later
|
| 11 |
License URI: https://opensource.org/licenses/GPL-3.0
|
| 12 |
|
| 301 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
| 302 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
| 303 |
|
| 304 |
+
= [3.0.1] - 2021-05-27 =
|
| 305 |
+
* Added : Settings panel AJAX saving.
|
| 306 |
+
* Improved : Saving method, user will get notified for any unsaved data.
|
| 307 |
+
* Fixed: Responsive issues for facebook.
|
| 308 |
+
* Few minor bug fix and improvements.
|
| 309 |
+
|
| 310 |
|
| 311 |
= [3.0.0] - 2021-05-19 =
|
| 312 |
* Redesigned : Entire Settings panel.
|
