GRAYBYTE WORDPRESS FILE MANAGER8873

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/swamivivekananda.co.in/wp-content/plugins/wp-smushit/core/avif/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/swamivivekananda.co.in/wp-content/plugins/wp-smushit/core/avif//class-avif-dir.php
<?php

namespace Smush\Core\Avif;

use Smush\Core\Upload_Dir;

class Avif_Dir extends Upload_Dir {
	private $avif_path;

	private $avif_rel_path;

	private $avif_url;
	/**
	 * @var array
	 */
	private $wp_upload_dir;

	/**
	 * @return string
	 */
	public function get_avif_path() {
		if ( is_null( $this->avif_path ) ) {
			$this->avif_path = $this->prepare_avif_path();
		}

		return $this->avif_path;
	}

	/**
	 * @return string
	 */
	public function get_avif_rel_path() {
		if ( is_null( $this->avif_rel_path ) ) {
			$this->avif_rel_path = $this->prepare_avif_rel_path();
		}

		return $this->avif_rel_path;
	}

	/**
	 * @return string
	 */
	public function get_avif_url() {
		if ( is_null( $this->avif_url ) ) {
			$this->avif_url = $this->prepare_avif_url();
		}

		return $this->avif_url;
	}

	public function get_wp_upload_dir() {
		if ( is_null( $this->wp_upload_dir ) ) {
			$this->wp_upload_dir = $this->prepare_wp_upload_dir();
		}

		return $this->wp_upload_dir;
	}

	private function prepare_wp_upload_dir() {
		if ( ! is_multisite() || is_main_site() ) {
			$upload = wp_upload_dir();
		} else {
			// Use the main site's upload directory for all subsite's avif converted images.
			// This makes it easier to have a single rule on the server configs for serving avif in mu.
			$blog_id = get_main_site_id();
			switch_to_blog( $blog_id );
			$upload = wp_upload_dir();
			restore_current_blog();
		}

		return $upload;
	}

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

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

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

	protected function prepare_root_path() {
		return apply_filters( 'smush_avif_rules_root_path_base', parent::prepare_root_path() );
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:33
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:34
giriqfky / giriqfky
0644
class-avif-configuration.php
1.724 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
class-avif-controller.php
6.127 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
class-avif-converter.php
1.367 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
class-avif-dir.php
1.855 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
class-avif-helper.php
1.755 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
class-avif-optimization.php
7.475 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
class-avif-transform.php
0.883 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF