GRAYBYTE WORDPRESS FILE MANAGER3093

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/wp-optimize/webp/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/wp-optimize/webp//class-wpo-webp-convert.php
<?php

if (!defined('WPO_VERSION')) die('No direct access allowed');

if (!class_exists('WPO_WebP_Convert')) :

class WPO_WebP_Convert {

	public $converters = null;

	public function __construct() {
		$this->converters = WP_Optimize()->get_options()->get_option('webp_converters');
	}

	/**
	 * Converts uploaded image to webp format
	 *
	 * @param string $source - path of the source file
	 */
	public function convert($source) {
		if (count($this->converters) < 1) return false;

		$destination = $this->get_destination_path($source);
		$this->check_converters_and_do_conversion($source, $destination);
	}

	/**
	 * Returns the destination full path
	 *
	 * @param string $source - path of the source file
	 *
	 * @return string $destination - path of destination file
	 */
	protected function get_destination_path($source) {
		$path_parts = pathinfo($source);
		$destination =   $path_parts['dirname'] . '/'. basename($source) . '.webp';
		return $destination;
	}

	/**
	 * Loop through available converters and do the conversion
	 *
	 * @param string $source      - path of source file
	 * @param string $destination - path of destination file
	 */
	protected function check_converters_and_do_conversion($source, $destination) {
		foreach ($this->converters as $converter) {
			WPO_WebP_Utils::perform_webp_conversion($converter, $source, $destination);
			break;
		}
	}
}
endif;

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:24
giriqfky / giriqfky
0644
class-wp-optimize-webp-images.php
3.242 KB
March 13 2023 19:14:32
giriqfky / giriqfky
0644
class-wp-optimize-webp.php
15.646 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wpo-htaccess-capabilities.php
1.648 KB
June 21 2022 03:11:04
giriqfky / giriqfky
0644
class-wpo-server-info.php
1.898 KB
June 03 2022 22:20:18
giriqfky / giriqfky
0644
class-wpo-webp-alter-html.php
4.627 KB
September 16 2024 16:17:24
giriqfky / giriqfky
0644
class-wpo-webp-convert.php
1.353 KB
July 06 2023 16:18:20
giriqfky / giriqfky
0644
class-wpo-webp-self-test.php
1.589 KB
October 16 2023 19:36:50
giriqfky / giriqfky
0644
class-wpo-webp-test-run.php
1.316 KB
July 06 2023 16:18:20
giriqfky / giriqfky
0644
class-wpo-webp-utils.php
2.517 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF