X7ROOT File Manager
Current Path:
/home/katmhsmi/public_html/wp-content/plugins/xagio/models
home
/
katmhsmi
/
public_html
/
wp-content
/
plugins
/
xagio
/
models
/
📁
..
📄
.htaccess
(420 B)
📄
wp_affiliate.php
(14.41 KB)
📄
wp_api.php
(131.08 KB)
📄
wp_batches.php
(3.67 KB)
📄
wp_bulk_image_converter.php
(2.25 KB)
📄
wp_captcha.php
(2.33 KB)
📄
wp_captcha_comment.php
(1.8 KB)
📄
wp_captcha_login.php
(976 B)
📄
wp_captcha_register.php
(819 B)
📄
wp_clone.php
(21.76 KB)
📄
wp_comments.php
(1.26 KB)
📄
wp_default.php
(6.98 KB)
📄
wp_exif.php
(11.1 KB)
📄
wp_extend_widgets.php
(4.21 KB)
📄
wp_freshstart.php
(16.03 KB)
📄
wp_groups.php
(30.02 KB)
📄
wp_keywords.php
(52.68 KB)
📄
wp_log404.php
(19.68 KB)
📄
wp_migration.php
(16.26 KB)
📄
wp_redirects.php
(5.16 KB)
📄
wp_rescue.php
(17.66 KB)
📄
wp_review.php
(3.2 KB)
📄
wp_reviewr.php
(3.76 KB)
📄
wp_reviews.php
(16.82 KB)
📄
wp_schema.php
(16.12 KB)
📄
wp_seo.php
(79.76 KB)
📄
wp_settings.php
(32.76 KB)
📄
wp_sync.php
(1.74 KB)
📄
wp_tinymce_buttons.php
(6.23 KB)
📄
wp_troubleshooting.php
(2.91 KB)
📄
wp_update.php
(7.9 KB)
Editing: wp_bulk_image_converter.php
<?php if ( ! class_exists( 'MXAG_Bulk_image_converter' ) ) { class MXAG_Bulk_image_converter { public static function initialize() { add_filter('bulk_actions-upload', array('MXAG_Bulk_image_converter', 'addAction')); add_filter('handle_bulk_actions-upload', array('MXAG_Bulk_image_converter', 'handleAction'), 10, 3); } public static function addAction($bulk_actions) { $bulk_actions['convert'] = 'Convert to JPEG'; return $bulk_actions; } public static function handleAction( $redirect_to, $action_name, $attachment_ids) { if ( 'convert' === $action_name ) { // Make sure that this file is included, as wp_generate_attachment_metadata() depends on it. require_once(ABSPATH . 'wp-admin/includes/image.php'); foreach ( $attachment_ids as $id ) { $mime = get_post_mime_type($id); $file = get_attached_file($id); if ($mime == 'image/png') { $image = imagecreatefrompng($file); $ext = '.png'; } elseif ($mime == 'image/gif') { $image = imagecreatefromgif($file); $ext = '.gif'; } else { continue; } $outputFile = str_replace($ext, '.jpg', $file); imagejpeg($image, $outputFile, 100); imagedestroy($image); // Check the type of file. We'll use this as the 'post_mime_type'. $filetype = wp_check_filetype(basename($outputFile), null); // Get the path to the upload directory. $wp_upload_dir = wp_upload_dir(); // Prepare an array of post data for the attachment. $attachment = array( 'guid' => $wp_upload_dir['url'] . '/' . basename($outputFile), 'post_mime_type' => $filetype['type'], 'post_title' => preg_replace('/\.[^.]+$/', '', basename($outputFile)), 'post_content' => '', 'post_status' => 'inherit' ); // Insert the attachment. $attach_id = wp_insert_attachment($attachment, $outputFile); // Generate the metadata for the attachment, and update the database record. $attach_data = wp_generate_attachment_metadata($attach_id, $outputFile); wp_update_attachment_metadata($attach_id, $attach_data); } $redirect_to = add_query_arg( 'bulk_convert_images_processed', count( $attachment_ids ), $redirect_to ); return $redirect_to; } else { return $redirect_to; } } } }
Upload File
Create Folder