Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/embedpre.../Gutenber.../block-ba...
File: block-embedpress.php
<?php
[0] Fix | Delete
[1] Fix | Delete
use EmbedPress\Includes\Classes\Helper;
[2] Fix | Delete
[3] Fix | Delete
// Exit if accessed directly.
[4] Fix | Delete
if (!defined('ABSPATH')) {
[5] Fix | Delete
exit;
[6] Fix | Delete
}
[7] Fix | Delete
/**
[8] Fix | Delete
* It renders gutenberg block of embedpress on the frontend
[9] Fix | Delete
* @param array $attributes
[10] Fix | Delete
*/
[11] Fix | Delete
[12] Fix | Delete
if(!function_exists('lock_content_form_handler')){
[13] Fix | Delete
add_action('wp_ajax_lock_content_form_handler', 'lock_content_form_handler');
[14] Fix | Delete
add_action('wp_ajax_nopriv_lock_content_form_handler', 'lock_content_form_handler');
[15] Fix | Delete
[16] Fix | Delete
function lock_content_form_handler() {
[17] Fix | Delete
// print_r($embedHTML);
[18] Fix | Delete
[19] Fix | Delete
$client_id = isset($_POST['client_id']) ? sanitize_text_field($_POST['client_id']) : '';
[20] Fix | Delete
$password = isset($_POST['password']) ? sanitize_text_field($_POST['password']) : '';
[21] Fix | Delete
$post_id = isset($_POST['post_id']) ? absint($_POST['post_id']) : 0;
[22] Fix | Delete
[23] Fix | Delete
$epbase64 = get_post_meta( $post_id, 'ep_base_' .$client_id, true );
[24] Fix | Delete
$hash_key = get_post_meta( $post_id, 'hash_key_' .$client_id, true );
[25] Fix | Delete
[26] Fix | Delete
// Set the decryption key and initialization vector (IV)
[27] Fix | Delete
$key = Helper::get_hash();
[28] Fix | Delete
[29] Fix | Delete
// Decode the base64 encoded cipher
[30] Fix | Delete
$cipher = base64_decode($epbase64);
[31] Fix | Delete
// Decrypt the cipher using AES-128-CBC encryption
[32] Fix | Delete
[33] Fix | Delete
$wp_pass_key = hash('sha256', wp_salt(32) . md5($password));
[34] Fix | Delete
$iv = substr($wp_pass_key, 0, 16);
[35] Fix | Delete
[36] Fix | Delete
if ($wp_pass_key === $hash_key) {
[37] Fix | Delete
setcookie("password_correct_", $password, time()+3600);
[38] Fix | Delete
[39] Fix | Delete
$embed = openssl_decrypt($cipher, 'AES-128-CBC', $key, OPENSSL_RAW_DATA, $iv) . '<script>
[40] Fix | Delete
var now = new Date();
[41] Fix | Delete
var time = now.getTime();
[42] Fix | Delete
var expireTime = time + 1000 * 60 * 60 * 24 * 30;
[43] Fix | Delete
now.setTime(expireTime);
[44] Fix | Delete
document.cookie = "password_correct_'.esc_js($client_id).'='.esc_js($hash_key).'; expires=" + now.toUTCString() + "; path=/";
[45] Fix | Delete
</script>';
[46] Fix | Delete
[47] Fix | Delete
}
[48] Fix | Delete
else{
[49] Fix | Delete
$embed = 0;
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
// Process the form data and return a response
[53] Fix | Delete
$response = array(
[54] Fix | Delete
'success' => true,
[55] Fix | Delete
'password' => $password,
[56] Fix | Delete
'embedHtml' => $embed,
[57] Fix | Delete
'post_id' => $post_id
[58] Fix | Delete
);
[59] Fix | Delete
[60] Fix | Delete
wp_send_json($response);
[61] Fix | Delete
[62] Fix | Delete
}
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
function embedpress_block_scripts($attributes) {
[66] Fix | Delete
[67] Fix | Delete
$script_handles = [];
[68] Fix | Delete
[69] Fix | Delete
if(!empty($attributes['customPlayer'])){
[70] Fix | Delete
$script_handles[] = 'plyr.polyfilled';
[71] Fix | Delete
$script_handles[] = 'initplyr';
[72] Fix | Delete
$script_handles[] = 'vimeo-player';
[73] Fix | Delete
}
[74] Fix | Delete
[75] Fix | Delete
$script_handles[] = 'embedpress-front';
[76] Fix | Delete
[77] Fix | Delete
if(!empty($attributes['adManager'])){
[78] Fix | Delete
$script_handles[] = 'embedpress-ads';
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
if(!empty($attributes['instaLayout']) && $attributes['instaLayout'] == 'insta-carousel'){
[82] Fix | Delete
$script_handles[] = 'cg-carousel';
[83] Fix | Delete
}
[84] Fix | Delete
[85] Fix | Delete
foreach ($script_handles as $handle) {
[86] Fix | Delete
wp_enqueue_script($handle);
[87] Fix | Delete
}
[88] Fix | Delete
[89] Fix | Delete
$style_handles = [];
[90] Fix | Delete
[91] Fix | Delete
if(!empty($attributes['customPlayer'])){
[92] Fix | Delete
$style_handles[] = 'plyr';
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
if(!empty($attributes['instaLayout']) && $attributes['instaLayout'] == 'insta-carousel'){
[96] Fix | Delete
$style_handles[] = 'cg-carousel';
[97] Fix | Delete
}
[98] Fix | Delete
[99] Fix | Delete
$style_handles[] = 'embedpress_blocks-cgb-style-css';
[100] Fix | Delete
$style_handles[] = 'embedpress-style';
[101] Fix | Delete
[102] Fix | Delete
foreach ($style_handles as $handle) {
[103] Fix | Delete
wp_enqueue_style($handle);
[104] Fix | Delete
}
[105] Fix | Delete
}
[106] Fix | Delete
[107] Fix | Delete
function embedpress_render_block($attributes)
[108] Fix | Delete
{
[109] Fix | Delete
[110] Fix | Delete
embedpress_block_scripts($attributes);
[111] Fix | Delete
[112] Fix | Delete
[113] Fix | Delete
$client_id = !empty($attributes['clientId']) ? md5($attributes['clientId']) : '';
[114] Fix | Delete
$block_id = !empty($attributes['clientId']) ? $attributes['clientId'] : '';
[115] Fix | Delete
$custom_player = !empty($attributes['customPlayer']) ? $attributes['customPlayer'] : 0;
[116] Fix | Delete
$instaLayout = !empty($attributes['instaLayout']) ? ' '.$attributes['instaLayout'] : ' insta-grid';
[117] Fix | Delete
[118] Fix | Delete
$_carousel_options = '';
[119] Fix | Delete
$_carousel_id = '';
[120] Fix | Delete
if(!empty($attributes['instaLayout']) && $attributes['instaLayout'] === 'insta-carousel'){
[121] Fix | Delete
$_carousel_id = 'data-carouselid=' . esc_attr($client_id) . '';
[122] Fix | Delete
[123] Fix | Delete
$layout = $attributes['instaLayout'];
[124] Fix | Delete
$slidesShow = !empty($attributes['slidesShow']) ? $attributes['slidesShow'] : 5;
[125] Fix | Delete
$carouselAutoplay = !empty($attributes['carouselAutoplay']) ? $attributes['carouselAutoplay'] : 0;
[126] Fix | Delete
$autoplaySpeed = !empty($attributes['autoplaySpeed']) ? $attributes['autoplaySpeed'] : 3000;
[127] Fix | Delete
$transitionSpeed = !empty($attributes['transitionSpeed']) ? $attributes['transitionSpeed'] : 1000;
[128] Fix | Delete
$carouselLoop = !empty($attributes['carouselLoop']) ? $attributes['carouselLoop'] : 0;
[129] Fix | Delete
$carouselArrows = !empty($attributes['carouselArrows']) ? $attributes['carouselArrows'] : 0;
[130] Fix | Delete
$spacing = !empty($attributes['carouselSpacing']) ? $attributes['carouselSpacing'] : 0;
[131] Fix | Delete
[132] Fix | Delete
// print_r($attributes);
[133] Fix | Delete
[134] Fix | Delete
$carousel_options = [
[135] Fix | Delete
'layout' => $layout,
[136] Fix | Delete
'slideshow' => $slidesShow,
[137] Fix | Delete
'autoplay' => $carouselAutoplay,
[138] Fix | Delete
'autoplayspeed' => $autoplaySpeed,
[139] Fix | Delete
'transitionspeed' => $transitionSpeed,
[140] Fix | Delete
'loop' => $carouselLoop,
[141] Fix | Delete
'arrows' => $carouselArrows,
[142] Fix | Delete
'spacing' => $spacing
[143] Fix | Delete
];
[144] Fix | Delete
[145] Fix | Delete
$carousel_options_string = json_encode($carousel_options);
[146] Fix | Delete
$_carousel_options = 'data-carousel-options='. htmlentities($carousel_options_string, ENT_QUOTES) .'';
[147] Fix | Delete
}
[148] Fix | Delete
[149] Fix | Delete
$cEmbedType = !empty($attributes['cEmbedType']) ? ' '.$attributes['cEmbedType'] : '';
[150] Fix | Delete
[151] Fix | Delete
$_custom_player = '';
[152] Fix | Delete
$_player_options = '';
[153] Fix | Delete
[154] Fix | Delete
if (!empty($custom_player)) {
[155] Fix | Delete
[156] Fix | Delete
$is_self_hosted = Helper::check_media_format($attributes['url']);
[157] Fix | Delete
[158] Fix | Delete
$_custom_player = 'data-playerid=' . esc_attr($client_id);
[159] Fix | Delete
$player_preset = !empty($attributes['playerPreset']) ? $attributes['playerPreset'] : 'preset-default';
[160] Fix | Delete
$player_color = !empty($attributes['playerColor']) ? $attributes['playerColor'] : '';
[161] Fix | Delete
$poster_thumbnail = !empty($attributes['posterThumbnail']) ? $attributes['posterThumbnail'] : '';
[162] Fix | Delete
$player_pip = !empty($attributes['playerPip']) ? true : false;
[163] Fix | Delete
$player_restart = !empty($attributes['playerRestart']) ? true : false;
[164] Fix | Delete
$player_rewind = !empty($attributes['playerRewind']) ? true : false;
[165] Fix | Delete
$player_fastForward = !empty($attributes['playerFastForward']) ? true : false;
[166] Fix | Delete
$player_tooltip = !empty($attributes['playerTooltip']) ? true : false;
[167] Fix | Delete
$player_hide_controls = !empty($attributes['playerHideControls']) ? true : false;
[168] Fix | Delete
$player_download = !empty($attributes['playerDownload']) ? true : false;
[169] Fix | Delete
[170] Fix | Delete
$playerOptions = [
[171] Fix | Delete
'rewind' => $player_rewind,
[172] Fix | Delete
'restart' => $player_restart,
[173] Fix | Delete
'pip' => $player_pip,
[174] Fix | Delete
'poster_thumbnail' => $poster_thumbnail,
[175] Fix | Delete
'player_color' => $player_color,
[176] Fix | Delete
'player_preset' => $player_preset,
[177] Fix | Delete
'fast_forward' => $player_fastForward,
[178] Fix | Delete
'player_tooltip' => $player_tooltip,
[179] Fix | Delete
'hide_controls' => $player_hide_controls,
[180] Fix | Delete
'download' => $player_download,
[181] Fix | Delete
];
[182] Fix | Delete
[183] Fix | Delete
if(!empty($attributes['fullscreen'])){
[184] Fix | Delete
$playerOptions['fullscreen'] = $attributes['fullscreen'];
[185] Fix | Delete
}
[186] Fix | Delete
[187] Fix | Delete
if(!empty($is_self_hosted['selhosted'])){
[188] Fix | Delete
$playerOptions['self_hosted'] = $is_self_hosted['selhosted'];
[189] Fix | Delete
$playerOptions['hosted_format'] = $is_self_hosted['format'];
[190] Fix | Delete
}
[191] Fix | Delete
[192] Fix | Delete
//Youtube options
[193] Fix | Delete
if(!empty($attributes['starttime'])){
[194] Fix | Delete
$playerOptions['start'] = $attributes['starttime'];
[195] Fix | Delete
}
[196] Fix | Delete
if(!empty($attributes['endtime'])){
[197] Fix | Delete
$playerOptions['end'] = $attributes['endtime'];
[198] Fix | Delete
}
[199] Fix | Delete
if(!empty($attributes['relatedvideos'])){
[200] Fix | Delete
$playerOptions['rel'] = $attributes['relatedvideos'];
[201] Fix | Delete
}
[202] Fix | Delete
[203] Fix | Delete
//vimeo options
[204] Fix | Delete
if(!empty($attributes['vstarttime'])){
[205] Fix | Delete
$playerOptions['t'] = $attributes['vstarttime'];
[206] Fix | Delete
}
[207] Fix | Delete
if(!empty($attributes['vautoplay'])){
[208] Fix | Delete
$playerOptions['vautoplay'] = $attributes['vautoplay'];
[209] Fix | Delete
}
[210] Fix | Delete
if(!empty($attributes['vautopause'])){
[211] Fix | Delete
$playerOptions['autopause'] = $attributes['vautopause'];
[212] Fix | Delete
}
[213] Fix | Delete
if(!empty($attributes['vdnt'])){
[214] Fix | Delete
$playerOptions['dnt'] = $attributes['vdnt'];
[215] Fix | Delete
}
[216] Fix | Delete
[217] Fix | Delete
$playerOptionsString = json_encode($playerOptions);
[218] Fix | Delete
$_player_options = 'data-options='. htmlentities($playerOptionsString, ENT_QUOTES);
[219] Fix | Delete
}
[220] Fix | Delete
[221] Fix | Delete
$pass_hash_key = isset($attributes['contentPassword']) ? md5($attributes['contentPassword']): '';
[222] Fix | Delete
[223] Fix | Delete
[224] Fix | Delete
[225] Fix | Delete
if (!empty($attributes['embedHTML'])) {
[226] Fix | Delete
$embed = apply_filters('embedpress_gutenberg_embed', $attributes['embedHTML'], $attributes);
[227] Fix | Delete
[228] Fix | Delete
$content_share_class = '';
[229] Fix | Delete
$share_position_class = '';
[230] Fix | Delete
$share_position = isset($attributes['sharePosition']) ? $attributes['sharePosition'] : 'right';
[231] Fix | Delete
[232] Fix | Delete
if(!empty($attributes['contentShare'])) {
[233] Fix | Delete
$content_share_class = 'ep-content-share-enabled';
[234] Fix | Delete
$share_position_class = 'ep-share-position-'.$share_position;
[235] Fix | Delete
}
[236] Fix | Delete
[237] Fix | Delete
$password_correct = isset($_COOKIE['password_correct_'.$client_id]) ? $_COOKIE['password_correct_'.$client_id] : '';
[238] Fix | Delete
$hash_pass = hash('sha256', wp_salt(32) . md5(isset($attributes['contentPassword']) ? $attributes['contentPassword'] : ''));
[239] Fix | Delete
[240] Fix | Delete
$content_protection_class = 'ep-content-protection-enabled';
[241] Fix | Delete
if(empty($attributes['lockContent']) || empty($attributes['contentPassword']) || $hash_pass === $password_correct) {
[242] Fix | Delete
$content_protection_class = 'ep-content-protection-disabled';
[243] Fix | Delete
}
[244] Fix | Delete
[245] Fix | Delete
$aligns = [
[246] Fix | Delete
'left' => 'alignleft',
[247] Fix | Delete
'right' => 'alignright',
[248] Fix | Delete
'wide' => 'alignwide',
[249] Fix | Delete
'full' => 'alignfull',
[250] Fix | Delete
'center' => 'aligncenter',
[251] Fix | Delete
];
[252] Fix | Delete
if (isset($attributes['align'])) {
[253] Fix | Delete
$alignment = isset($aligns[$attributes['align']]) ? $aligns[$attributes['align']] . ' clear' : '';
[254] Fix | Delete
} else {
[255] Fix | Delete
$alignment = 'aligncenter'; // default alignment is center in js, so keeping same here
[256] Fix | Delete
}
[257] Fix | Delete
$embed = Helper::customLogo($embed, $attributes);
[258] Fix | Delete
$url = !empty($attributes['href']) ? $attributes['href'] : '';
[259] Fix | Delete
[260] Fix | Delete
$adsAtts = '';
[261] Fix | Delete
[262] Fix | Delete
if(!empty($attributes['adManager'])) {
[263] Fix | Delete
$ad = base64_encode(json_encode($attributes));
[264] Fix | Delete
$adsAtts = "data-sponsored-id=$client_id data-sponsored-attrs=$ad class=ad-mask";
[265] Fix | Delete
}
[266] Fix | Delete
[267] Fix | Delete
$hosted_format = '';
[268] Fix | Delete
if (!empty($custom_player)) {
[269] Fix | Delete
$self_hosted = Helper::check_media_format($attributes['url']);
[270] Fix | Delete
$hosted_format = isset($self_hosted['format']) ? $self_hosted['format'] : '';
[271] Fix | Delete
}
[272] Fix | Delete
[273] Fix | Delete
ob_start();
[274] Fix | Delete
?>
[275] Fix | Delete
<div class="embedpress-gutenberg-wrapper <?php echo esc_attr( $alignment.' '.$content_share_class.' '.$share_position_class.' '.$content_protection_class); echo esc_attr( $cEmbedType ); ?>" id="<?php echo esc_attr($block_id); ?>">
[276] Fix | Delete
<?php
[277] Fix | Delete
$share_position = isset($attributes['sharePosition']) ? $attributes['sharePosition'] : 'right';
[278] Fix | Delete
$custom_thumbnail = isset($attributes['customThumbnail']) ? $attributes['customThumbnail'] : '';
[279] Fix | Delete
?>
[280] Fix | Delete
<div class="wp-block-embed__wrapper <?php if(!empty($attributes['contentShare'])) echo esc_attr( 'position-'.$share_position.'-wraper'); ?> <?php if($attributes['videosize'] == 'responsive') echo esc_attr( 'ep-video-responsive' ); ?>">
[281] Fix | Delete
<div id="ep-gutenberg-content-<?php echo esc_attr( $client_id )?>" class="ep-gutenberg-content">
[282] Fix | Delete
<div
[283] Fix | Delete
<?php echo esc_attr( $adsAtts ); ?> >
[284] Fix | Delete
<div class="ep-embed-content-wraper <?php
[285] Fix | Delete
if (!empty($custom_player)) {
[286] Fix | Delete
echo esc_attr($player_preset);
[287] Fix | Delete
}
[288] Fix | Delete
echo esc_attr($instaLayout);
[289] Fix | Delete
?> <?php echo esc_attr($hosted_format); ?>"
[290] Fix | Delete
<?php echo esc_attr($_custom_player); ?>
[291] Fix | Delete
<?php echo esc_attr($_player_options); ?>
[292] Fix | Delete
<?php echo esc_attr( $_carousel_id ); ?>
[293] Fix | Delete
<?php echo esc_attr($_carousel_options); ?>
[294] Fix | Delete
>
[295] Fix | Delete
<?php
[296] Fix | Delete
$hash_pass = hash('sha256', wp_salt(32) . md5($attributes['contentPassword']));
[297] Fix | Delete
$password_correct = isset($_COOKIE['password_correct_'.$client_id]) ? $_COOKIE['password_correct_'.$client_id] : '';
[298] Fix | Delete
if(empty($attributes['lockContent']) || empty($attributes['contentPassword']) || (!empty(Helper::is_password_correct($client_id)) && ($hash_pass === $password_correct)) ){
[299] Fix | Delete
[300] Fix | Delete
if(!empty($attributes['contentShare'])) {
[301] Fix | Delete
$content_id = $attributes['clientId'];
[302] Fix | Delete
$embed .= Helper::embed_content_share($content_id, $attributes);
[303] Fix | Delete
}
[304] Fix | Delete
echo $embed;
[305] Fix | Delete
} else {
[306] Fix | Delete
if(!empty($attributes['contentShare'])) {
[307] Fix | Delete
$content_id = $attributes['clientId'];
[308] Fix | Delete
$embed .= Helper::embed_content_share($content_id, $attributes);
[309] Fix | Delete
}
[310] Fix | Delete
Helper::display_password_form($client_id, $embed, $pass_hash_key, $attributes);
[311] Fix | Delete
}
[312] Fix | Delete
?>
[313] Fix | Delete
</div>
[314] Fix | Delete
<?php
[315] Fix | Delete
if(!empty($attributes['adManager'])) {
[316] Fix | Delete
$embed .= Helper::generateAdTemplate($client_id, $attributes, 'gutenberg');
[317] Fix | Delete
}
[318] Fix | Delete
?>
[319] Fix | Delete
</div>
[320] Fix | Delete
</div>
[321] Fix | Delete
</div>
[322] Fix | Delete
</div>
[323] Fix | Delete
<?php
[324] Fix | Delete
[325] Fix | Delete
echo embedpress_render_block_style($attributes);
[326] Fix | Delete
[327] Fix | Delete
[328] Fix | Delete
return ob_get_clean();
[329] Fix | Delete
[330] Fix | Delete
[331] Fix | Delete
}
[332] Fix | Delete
}
[333] Fix | Delete
[334] Fix | Delete
/**
[335] Fix | Delete
* Make style function for embedpress render block
[336] Fix | Delete
*/
[337] Fix | Delete
[338] Fix | Delete
function embedpress_render_block_style($attributes)
[339] Fix | Delete
{
[340] Fix | Delete
[341] Fix | Delete
$uniqid = !empty($attributes['url']) ? '.ose-uid-' . md5($attributes['url']) : '';
[342] Fix | Delete
$client_id = !empty($attributes['clientId']) ? $attributes['clientId'] : '';
[343] Fix | Delete
[344] Fix | Delete
$custom_player = !empty($attributes['customPlayer']) ? $attributes['customPlayer'] : 0;
[345] Fix | Delete
$player_color = !empty($attributes['playerColor']) ? $attributes['playerColor'] : '';
[346] Fix | Delete
$player_pip = !empty($attributes['playerPip']) ? 'block' : 'none';
[347] Fix | Delete
$logoX = !empty($attributes['logoX']) ? $attributes['logoX'] : 5;
[348] Fix | Delete
$logoY = !empty($attributes['logoY']) ? $attributes['logoY'] : 10;
[349] Fix | Delete
$logoOpacity = !empty($attributes['logoOpacity']) ? $attributes['logoOpacity'] : '1';
[350] Fix | Delete
$player_pip = !empty($attributes['playerPip']) ? 'block' : 'none';
[351] Fix | Delete
[352] Fix | Delete
$playerStyle = '';
[353] Fix | Delete
[354] Fix | Delete
if (!empty($custom_player)) {
[355] Fix | Delete
$playerStyle = '
[356] Fix | Delete
[data-playerid="' . md5($client_id). '"] {
[357] Fix | Delete
--plyr-color-main: ' . ($player_color && strlen($player_color) === 7
[358] Fix | Delete
? 'rgba(' . hexdec(substr($player_color, 1, 2)) . ', ' . hexdec(substr($player_color, 3, 2)) . ', ' . hexdec(substr($player_color, 5, 2)) . ', .8)!important;'
[359] Fix | Delete
: 'rgba(0, 0, 0, .8)!important;'
[360] Fix | Delete
) . ';
[361] Fix | Delete
}
[362] Fix | Delete
[data-playerid="' . md5($client_id). '"].custom-player-preset-3, [data-playerid="' . md5($client_id). '"].custom-player-preset-4 {
[363] Fix | Delete
--plyr-color-main: ' . ($player_color && strlen($player_color) === 7
[364] Fix | Delete
? 'rgb(' . hexdec(substr($player_color, 1, 2)) . ', ' . hexdec(substr($player_color, 3, 2)) . ', ' . hexdec(substr($player_color, 5, 2)) . ')!important;'
[365] Fix | Delete
: 'rgba(0, 0, 0, .8)!important;'
[366] Fix | Delete
) . ';
[367] Fix | Delete
}
[368] Fix | Delete
[data-playerid="' . md5($client_id). '"] [data-plyr="pip"] {
[369] Fix | Delete
display: '.$player_pip.';
[370] Fix | Delete
}
[371] Fix | Delete
[372] Fix | Delete
[data-playerid="' . md5($client_id). '"] .plyr{
[373] Fix | Delete
width: ' . esc_attr($attributes['width']) . 'px !important;
[374] Fix | Delete
height: ' . esc_attr($attributes['height']) . 'px!important;
[375] Fix | Delete
max-height: ' . esc_attr($attributes['height']) . 'px!important;
[376] Fix | Delete
}
[377] Fix | Delete
';
[378] Fix | Delete
}
[379] Fix | Delete
[380] Fix | Delete
[381] Fix | Delete
$_iscustomlogo = '';
[382] Fix | Delete
[383] Fix | Delete
$youtubeStyles = '';
[384] Fix | Delete
[385] Fix | Delete
if(!empty($attributes['customlogo'])){
[386] Fix | Delete
$_iscustomlogo = $uniqid.' img.watermark.ep-custom-logo {
[387] Fix | Delete
display: block !important;
[388] Fix | Delete
}
[389] Fix | Delete
[390] Fix | Delete
[391] Fix | Delete
#ep-gutenberg-content-'. md5($client_id).' img.watermark {
[392] Fix | Delete
border: 0;
[393] Fix | Delete
position: absolute;
[394] Fix | Delete
bottom: '.esc_attr($logoY).'%;
[395] Fix | Delete
right: '.esc_attr($logoX).'%;
[396] Fix | Delete
max-width: 150px;
[397] Fix | Delete
max-height: 75px;
[398] Fix | Delete
-o-transition: opacity 0.5s ease-in-out;
[399] Fix | Delete
-moz-transition: opacity 0.5s ease-in-out;
[400] Fix | Delete
-webkit-transition: opacity 0.5s ease-in-out;
[401] Fix | Delete
transition: opacity 0.5s ease-in-out;
[402] Fix | Delete
z-index:1;
[403] Fix | Delete
opacity: '.esc_attr($logoOpacity).';
[404] Fix | Delete
}
[405] Fix | Delete
#ep-gutenberg-content-'. md5($client_id).' img.watermark:hover {
[406] Fix | Delete
opacity: 1;
[407] Fix | Delete
}
[408] Fix | Delete
';
[409] Fix | Delete
}
[410] Fix | Delete
$youtubeStyles = '<style>
[411] Fix | Delete
.ose-youtube' . esc_attr($uniqid) . ' {
[412] Fix | Delete
width: ' . esc_attr($attributes['width']) . 'px !important;
[413] Fix | Delete
height: ' . esc_attr($attributes['height']) . 'px!important;
[414] Fix | Delete
max-height: ' . esc_attr($attributes['height']) . 'px !important;
[415] Fix | Delete
max-width: 100%;
[416] Fix | Delete
}
[417] Fix | Delete
[418] Fix | Delete
.ose-youtube' . esc_attr($uniqid) . '>iframe {
[419] Fix | Delete
height: ' . esc_attr($attributes['height']) . 'px !important;
[420] Fix | Delete
max-height: ' . esc_attr($attributes['height']) . 'px !important;
[421] Fix | Delete
width: 100%;
[422] Fix | Delete
position: relative !important;
[423] Fix | Delete
}
[424] Fix | Delete
[425] Fix | Delete
[426] Fix | Delete
' . esc_attr($uniqid) . ' .wistia_embed {
[427] Fix | Delete
max-width: 100%;
[428] Fix | Delete
}
[429] Fix | Delete
[430] Fix | Delete
.alignright .ose-wistia' . esc_attr($uniqid) .'{
[431] Fix | Delete
margin-left: auto;
[432] Fix | Delete
}
[433] Fix | Delete
.alignleft .ose-wistia' . esc_attr($uniqid) .'{
[434] Fix | Delete
margin-right: auto;
[435] Fix | Delete
}
[436] Fix | Delete
.aligncenter .ose-wistia' . esc_attr($uniqid) .'{
[437] Fix | Delete
margin: auto;
[438] Fix | Delete
}
[439] Fix | Delete
'.$uniqid.' img.watermark{
[440] Fix | Delete
display: none;
[441] Fix | Delete
}
[442] Fix | Delete
'.$_iscustomlogo.'
[443] Fix | Delete
'.$playerStyle.'
[444] Fix | Delete
[445] Fix | Delete
[446] Fix | Delete
[447] Fix | Delete
</style>';
[448] Fix | Delete
[449] Fix | Delete
if($attributes['videosize'] == 'responsive') {
[450] Fix | Delete
[451] Fix | Delete
$width = isset($attributes['width']) ? $attributes['width'] : 600;
[452] Fix | Delete
$height = $width * (9/16);
[453] Fix | Delete
[454] Fix | Delete
[455] Fix | Delete
$youtubeStyles = '<style>
[456] Fix | Delete
.ose-youtube' . esc_attr($uniqid) . ' {
[457] Fix | Delete
position: relative;
[458] Fix | Delete
width: ' . esc_attr($attributes['width']) . 'px !important;
[459] Fix | Delete
height: ' . esc_attr($height) . 'px !important;
[460] Fix | Delete
max-width: 100%;
[461] Fix | Delete
}
[462] Fix | Delete
[463] Fix | Delete
.ose-wistia{
[464] Fix | Delete
height: auto !important;
[465] Fix | Delete
padding-top: 0;
[466] Fix | Delete
}
[467] Fix | Delete
[468] Fix | Delete
.ose-youtube' . esc_attr($uniqid) . ' > iframe {
[469] Fix | Delete
width: 100%;
[470] Fix | Delete
height: 100%;
[471] Fix | Delete
max-height:100%;
[472] Fix | Delete
}
[473] Fix | Delete
[474] Fix | Delete
.ep-video-responsive{
[475] Fix | Delete
display: inline-block!important;
[476] Fix | Delete
max-width: 100%;
[477] Fix | Delete
}
[478] Fix | Delete
'.$uniqid.' img.watermark{
[479] Fix | Delete
display: none;
[480] Fix | Delete
}
[481] Fix | Delete
'.$_iscustomlogo.'
[482] Fix | Delete
'.$playerStyle.'
[483] Fix | Delete
[484] Fix | Delete
</style>';
[485] Fix | Delete
}
[486] Fix | Delete
[487] Fix | Delete
$youtubeStyles .= '<style>
[488] Fix | Delete
.ose-matterport' . esc_attr($uniqid) . ' {
[489] Fix | Delete
position: relative;
[490] Fix | Delete
width: ' . esc_attr($attributes['width']) . 'px !important;
[491] Fix | Delete
height: ' . esc_attr($attributes['height']) . 'px !important;
[492] Fix | Delete
max-width: 100%;
[493] Fix | Delete
}
[494] Fix | Delete
.ose-giphy' . esc_attr($uniqid) . ' img{
[495] Fix | Delete
position: relative;
[496] Fix | Delete
width: ' . esc_attr($attributes['width']) . 'px !important;
[497] Fix | Delete
height: ' . esc_attr($attributes['height']) . 'px !important;
[498] Fix | Delete
max-width: 100%;
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function