Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.112.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : class-webp-dir.php
<?php

namespace Smush\Core\Webp;

use Smush\Core\Upload_Dir;

class Webp_Dir extends Upload_Dir {
	private $webp_path;

	private $webp_rel_path;

	private $webp_url;

	/**
	 * @return string
	 */
	public function get_webp_path() {
		if ( is_null( $this->webp_path ) ) {
			$this->webp_path = $this->prepare_webp_path();
		}

		return $this->webp_path;
	}

	/**
	 * @return string
	 */
	public function get_webp_rel_path() {
		if ( is_null( $this->webp_rel_path ) ) {
			$this->webp_rel_path = $this->prepare_webp_rel_path();
		}

		return $this->webp_rel_path;
	}

	/**
	 * @return string
	 */
	public function get_webp_url() {
		if ( is_null( $this->webp_url ) ) {
			$this->webp_url = $this->prepare_webp_url();
		}

		return $this->webp_url;
	}

	private function prepare_webp_path() {
		return dirname( $this->get_upload_path() ) . '/smush-webp';
	}

	private function prepare_webp_rel_path() {
		return dirname( $this->get_upload_rel_path() ) . '/smush-webp';
	}

	private function prepare_webp_url() {
		return dirname( $this->get_upload_url() ) . '/smush-webp';
	}

	protected function prepare_root_path() {
		return apply_filters( 'smush_webp_rules_root_path_base', parent::prepare_root_path() );
	}
}
© 2025 XylotrechusZ