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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/embedpre.../Gutenber...
File: plugin.php
}
[1000] Fix | Delete
[1001] Fix | Delete
$src = $renderer . ((strpos($renderer, '?') == false) ? '?' : '&') . 'file=' . urlencode($attributes['href']) . getParamData($attributes);
[1002] Fix | Delete
[1003] Fix | Delete
$pass_hash_key = isset($attributes['contentPassword']) ? md5($attributes['contentPassword']) : '';
[1004] Fix | Delete
[1005] Fix | Delete
$aligns = [
[1006] Fix | Delete
'left' => 'ep-alignleft',
[1007] Fix | Delete
'right' => 'ep-alignright',
[1008] Fix | Delete
'center' => 'ep-aligncenter',
[1009] Fix | Delete
'wide' => 'ep-alignwide',
[1010] Fix | Delete
'full' => 'ep-alignfull'
[1011] Fix | Delete
];
[1012] Fix | Delete
$alignment = isset($attributes['align']) && isset($aligns[$attributes['align']]) ? $aligns[$attributes['align']] : '';
[1013] Fix | Delete
$dimension = "width:$width;height:$height";
[1014] Fix | Delete
ob_start();
[1015] Fix | Delete
?>
[1016] Fix | Delete
[1017] Fix | Delete
[1018] Fix | Delete
<?php
[1019] Fix | Delete
[1020] Fix | Delete
$url = !empty($attributes['href']) ? $attributes['href'] : '';
[1021] Fix | Delete
[1022] Fix | Delete
$embed_code = '<iframe title="' . esc_attr(Helper::get_file_title($attributes['href'])) . '" class="embedpress-embed-document-pdf ' . esc_attr($id) . '" style="' . esc_attr($dimension) . '; max-width:100%; display: inline-block" src="' . esc_url($src) . '" frameborder="0" oncontextmenu="return false;"></iframe> ';
[1023] Fix | Delete
if(isset($attributes['viewerStyle']) && $attributes['viewerStyle'] === 'flip-book') {
[1024] Fix | Delete
$src = urlencode($url).getParamData($attributes);
[1025] Fix | Delete
$embed_code = '<iframe title="' . esc_attr(Helper::get_file_title($attributes['href'])) . '" class="embedpress-embed-document-pdf ' . esc_attr($id) . '" style="' . esc_attr($dimension) . '; max-width:100%; display: inline-block" src="'.esc_url(EMBEDPRESS_URL_ASSETS . 'pdf-flip-book/viewer.html?file='.$src).'" frameborder="0" oncontextmenu="return false;"></iframe> ';
[1026] Fix | Delete
}
[1027] Fix | Delete
if ($powered_by) {
[1028] Fix | Delete
$embed_code .= sprintf('<p class="embedpress-el-powered">%s</p>', __('Powered By EmbedPress', 'embedpress'));
[1029] Fix | Delete
}
[1030] Fix | Delete
[1031] Fix | Delete
$adsAtts = '';
[1032] Fix | Delete
if (!empty($attributes['adManager'])) {
[1033] Fix | Delete
$ad = base64_encode(json_encode($attributes));
[1034] Fix | Delete
$adsAtts = "data-sponsored-id=$client_id data-sponsored-attrs=$ad class=ad-mask";
[1035] Fix | Delete
}
[1036] Fix | Delete
?>
[1037] Fix | Delete
[1038] Fix | Delete
<div id="ep-gutenberg-content-<?php echo esc_attr($client_id) ?>" class="ep-gutenberg-content <?php echo esc_attr($alignment . ' ' . $width_class . ' ' . $content_share_class . ' ' . $share_position_class . ' ' . $content_protection_class); ?> ">
[1039] Fix | Delete
<div class="embedpress-inner-iframe <?php if ($unitoption === '%') {
[1040] Fix | Delete
echo esc_attr('emebedpress-unit-percent');
[1041] Fix | Delete
} ?> ep-doc-<?php echo esc_attr($client_id); ?>" <?php if ($unitoption === '%' && !empty($attributes['width'])) {
[1042] Fix | Delete
$style_attr = 'max-width:' . $attributes['width'] . '%';
[1043] Fix | Delete
} else {
[1044] Fix | Delete
$style_attr = 'max-width:100%';
[1045] Fix | Delete
} ?> style="<?php echo esc_attr($style_attr); ?>" id="<?php echo esc_attr($id); ?>">
[1046] Fix | Delete
<div <?php echo esc_attr($adsAtts); ?>>
[1047] Fix | Delete
<?php
[1048] Fix | Delete
do_action('embedpress_pdf_gutenberg_after_embed', $client_id, 'pdf', $attributes, $pdf_url);
[1049] Fix | Delete
$embed = $embed_code;
[1050] Fix | Delete
if (empty($attributes['lockContent']) || empty($attributes['contentPassword']) || (!empty(Helper::is_password_correct($client_id)) && ($hash_pass === $password_correct))) {
[1051] Fix | Delete
[1052] Fix | Delete
$custom_thumbnail = isset($attributes['customThumbnail']) ? $attributes['customThumbnail'] : '';
[1053] Fix | Delete
[1054] Fix | Delete
echo '<div class="ep-embed-content-wraper">';
[1055] Fix | Delete
$embed = '<div class="position-' . esc_attr($share_position) . '-wraper gutenberg-pdf-wraper">';
[1056] Fix | Delete
$embed .= $embed_code;
[1057] Fix | Delete
$embed .= '</div>';
[1058] Fix | Delete
[1059] Fix | Delete
if (!empty($attributes['contentShare'])) {
[1060] Fix | Delete
$content_id = $attributes['id'];
[1061] Fix | Delete
$embed .= Helper::embed_content_share($content_id, $attributes);
[1062] Fix | Delete
}
[1063] Fix | Delete
echo $embed;
[1064] Fix | Delete
echo '</div>';
[1065] Fix | Delete
} else {
[1066] Fix | Delete
if (!empty($attributes['contentShare'])) {
[1067] Fix | Delete
$content_id = $attributes['clientId'];
[1068] Fix | Delete
$embed = '<div class="position-' . esc_attr($share_position) . '-wraper gutenberg-pdf-wraper">';
[1069] Fix | Delete
$embed .= $embed_code;
[1070] Fix | Delete
$embed .= '</div>';
[1071] Fix | Delete
$embed .= Helper::embed_content_share($content_id, $attributes);
[1072] Fix | Delete
}
[1073] Fix | Delete
echo '<div class="ep-embed-content-wraper">';
[1074] Fix | Delete
Helper::display_password_form($client_id, $embed, $pass_hash_key, $attributes);
[1075] Fix | Delete
echo '</div>';
[1076] Fix | Delete
}
[1077] Fix | Delete
?>
[1078] Fix | Delete
[1079] Fix | Delete
<?php
[1080] Fix | Delete
if(!empty($attributes['adManager'])) {
[1081] Fix | Delete
$embed .= Helper::generateAdTemplate($client_id, $attributes, 'gutenberg');
[1082] Fix | Delete
}
[1083] Fix | Delete
?>
[1084] Fix | Delete
</div>
[1085] Fix | Delete
</div>
[1086] Fix | Delete
</div>
[1087] Fix | Delete
<?php
[1088] Fix | Delete
return ob_get_clean();
[1089] Fix | Delete
}
[1090] Fix | Delete
}
[1091] Fix | Delete
[1092] Fix | Delete
function isGoogleCalendar($url) {
[1093] Fix | Delete
$pattern = '/^https:\/\/calendar\.google\.com\/calendar\/embed\?.*$/';
[1094] Fix | Delete
return preg_match($pattern, $url);
[1095] Fix | Delete
}
[1096] Fix | Delete
[1097] Fix | Delete
function embedpress_calendar_render_block($attributes)
[1098] Fix | Delete
{
[1099] Fix | Delete
[1100] Fix | Delete
$id = !empty($attributes['id']) ? $attributes['id'] : 'embedpress-calendar-' . rand(100, 10000);
[1101] Fix | Delete
$url = !empty($attributes['url']) ? $attributes['url'] : '';
[1102] Fix | Delete
[1103] Fix | Delete
if(!isGoogleCalendar($url))
[1104] Fix | Delete
{
[1105] Fix | Delete
return;
[1106] Fix | Delete
}
[1107] Fix | Delete
[1108] Fix | Delete
$is_private = isset($attributes['is_public']);
[1109] Fix | Delete
$client_id = md5($id);
[1110] Fix | Delete
$width = !empty($attributes['width']) ? $attributes['width'] . 'px' : '600px';
[1111] Fix | Delete
$height = !empty($attributes['height']) ? $attributes['height'] . 'px' : '600px';
[1112] Fix | Delete
$gen_settings = get_option(EMBEDPRESS_PLG_NAME);
[1113] Fix | Delete
$powered_by = isset($gen_settings['embedpress_document_powered_by']) && 'yes' === $gen_settings['embedpress_document_powered_by'];
[1114] Fix | Delete
if (isset($attributes['powered_by'])) {
[1115] Fix | Delete
$powered_by = $attributes['powered_by'];
[1116] Fix | Delete
}
[1117] Fix | Delete
[1118] Fix | Delete
$aligns = [
[1119] Fix | Delete
'left' => 'alignleft',
[1120] Fix | Delete
'right' => 'alignright',
[1121] Fix | Delete
'wide' => 'alignwide',
[1122] Fix | Delete
'full' => 'alignfull'
[1123] Fix | Delete
];
[1124] Fix | Delete
$alignment = isset($attributes['align']) && isset($aligns[$attributes['align']]) ? $aligns[$attributes['align']] : '';
[1125] Fix | Delete
$dimension = "width:$width;height:$height";
[1126] Fix | Delete
ob_start();
[1127] Fix | Delete
?>
[1128] Fix | Delete
<div class="embedpress-calendar-gutenberg embedpress-calendar ose-calendar <?php echo esc_attr($alignment) ?>" style="<?php echo esc_attr($dimension); ?>; max-width:100%;">
[1129] Fix | Delete
[1130] Fix | Delete
<?php
[1131] Fix | Delete
if (!empty($url) && !$is_private) {
[1132] Fix | Delete
?>
[1133] Fix | Delete
<iframe title="<?php echo esc_attr(Helper::get_file_title($url)); ?>" style="<?php echo esc_attr($dimension); ?>; max-width:100%; display: inline-block" src="<?php echo esc_url($url); ?>"></iframe>
[1134] Fix | Delete
<?php } else {
[1135] Fix | Delete
if (is_embedpress_pro_active()) {
[1136] Fix | Delete
echo Embedpress_Google_Helper::shortcode();
[1137] Fix | Delete
}
[1138] Fix | Delete
} ?>
[1139] Fix | Delete
<?php do_action('embedpress_calendar_gutenberg_after_embed', $client_id, 'calendar', $attributes); ?>
[1140] Fix | Delete
[1141] Fix | Delete
<?php
[1142] Fix | Delete
if ($powered_by) {
[1143] Fix | Delete
printf('<p class="embedpress-el-powered" style="width:' . esc_attr($width) . '" >%s</p>', __('Powered By EmbedPress', 'embedpress'));
[1144] Fix | Delete
} ?>
[1145] Fix | Delete
[1146] Fix | Delete
</div>
[1147] Fix | Delete
<?php
[1148] Fix | Delete
return ob_get_clean();
[1149] Fix | Delete
}
[1150] Fix | Delete
[1151] Fix | Delete
function embedpress_document_block_scripts() {
[1152] Fix | Delete
if (!is_admin() && has_block('embedpress/document')) {
[1153] Fix | Delete
$script_handles = [
[1154] Fix | Delete
'embedpress-pdfobject',
[1155] Fix | Delete
'embedpress-front',
[1156] Fix | Delete
'embedpress_documents_viewer_script'
[1157] Fix | Delete
];
[1158] Fix | Delete
[1159] Fix | Delete
foreach ($script_handles as $handle) {
[1160] Fix | Delete
wp_enqueue_script($handle);
[1161] Fix | Delete
}
[1162] Fix | Delete
[1163] Fix | Delete
$style_handles = [
[1164] Fix | Delete
'embedpress_blocks-cgb-style-css',
[1165] Fix | Delete
'embedpress-style'
[1166] Fix | Delete
];
[1167] Fix | Delete
[1168] Fix | Delete
foreach ($style_handles as $handle) {
[1169] Fix | Delete
wp_enqueue_style($handle);
[1170] Fix | Delete
}
[1171] Fix | Delete
}
[1172] Fix | Delete
}
[1173] Fix | Delete
add_action('wp_enqueue_scripts', 'embedpress_document_block_scripts');
[1174] Fix | Delete
[1175] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function