/home/desid573/verdenaturopathy.com.au/wp-content/plugins/pagelayer/main
NameSizeModeActions
ajax.php486010644editdlrm
class.php38560644editdlrm
font-options.php149510644editdlrm
functions.php728090644editdlrm
getting_started.php100030644editdlrm
import.php453750644editdlrm
license.php65380644editdlrm
live-body.php72290644editdlrm
live.php100200644editdlrm
post_metas.php168700644editdlrm
replace-media.php67910644editdlrm
settings.php247670644editdlrm
shortcodes.php3083500644editdlrm
shortcode_functions.php352440644editdlrm
template.php435790644editdlrm
website.php230310644editdlrm
Edit: /home/desid573/verdenaturopathy.com.au/wp-content/plugins/pagelayer/main/replace-media.php (6791B)
0){ $pl_error['upload_error'] = __('There was some error uploading the file ! Please try again.'); pagelayer_media_replace_theme(); return; } $filedata = wp_check_filetype_and_ext($_FILES['userfile']['tmp_name'], $_FILES['userfile']['name']); if ($filedata['ext'] == false){ $pl_error['ext_error'] = __('The File type could not be determined. Please upload a permitted file type.'); pagelayer_media_replace_theme(); return; } $result = pagelayer_replace_attachment($_FILES['userfile']['tmp_name'], $post_id, $err); if(empty($result)){ $pl_error['replace_error'] = $err; pagelayer_media_replace_theme(); return; } $redirect_success = admin_url('post.php'); $redirect_success = add_query_arg(array( 'action' => 'edit', 'post' => $post_id, ), $redirect_success); echo ''; } // Show the theme pagelayer_media_replace_theme(); } // Theme of the page function pagelayer_media_replace_theme(){ global $pl_error; pagelayer_report_error($pl_error);echo '
'; $id = (int) $_GET['id']; ?>

" />
0){ chmod( $targetFile, $permissions ); // restore permissions } $updated = update_attached_file($post_id, $targetFile); $target_url = wp_get_attachment_url($post_id); // Run the filter, so other plugins can hook if needed. $filtered = apply_filters( 'wp_handle_upload', array( 'file' => $targetFile, 'url' => $target_url, 'type' => $fileMime, ), 'sideload'); // Check if file changed during filter. Set changed to attached file meta properly. if (isset($filtered['file']) && $filtered['file'] != $targetFile ){ update_attached_file($post_id, $filtered['file']); } $metadata = wp_generate_attachment_metadata($post_id, $targetFile); wp_update_attachment_metadata($post_id, $metadata); return true; } function pagelayer_remove_attahment_files($post_id){ $meta = wp_get_attachment_metadata( $post_id ); if (function_exists('wp_get_original_image_path')){ // WP 5.3+ $fullfilepath = wp_get_original_image_path($post_id); }else{ $fullFilePath = trim(get_attached_file($post_id, apply_filters( 'pagelayer_unfiltered_get_attached_file', true ))); } $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true ); $file = $fullFilePath; $result = wp_delete_attachment_files($post_id, $meta, $backup_sizes, $file ); // If attached file is not the same path as file, this indicates a -scaled images is in play. $attached_file = get_attached_file($post_id); if ($file !== $attached_file && file_exists($attached_file)){ @unlink($attached_file); } }