Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets-rebuild.corals.io/wp-content/plugins/wp-smushit/core/parser/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets-rebuild.corals.io/wp-content/plugins/wp-smushit/core/parser/class-style.php
<?php

namespace Smush\Core\Parser;

class Style {
	/**
	 * @var string
	 */
	private $css;
	/**
	 * @var Image_URL[]
	 */
	private $image_urls;

	public function __construct( $css, $image_urls ) {
		$this->css        = $css;
		$this->image_urls = $image_urls;
	}

	/**
	 * @return string
	 */
	public function get_css() {
		return $this->css;
	}

	public function get_image_urls() {
		return $this->image_urls;
	}

	public function has_updates() {
		foreach ( $this->image_urls as $image_url ) {
			if ( $image_url->has_updates() ) {
				return true;
			}
		}

		return false;
	}

	public function get_updated() {
		$updated = $this->css;
		foreach ( $this->image_urls as $image_url ) {
			if ( $image_url->has_updates() ) {
				$updated = str_replace(
					$image_url->get_previous_url(),
					esc_url_raw( $image_url->get_url() ),
					$updated
				);
			}
		}

		return $updated;
	}
}

Spamworldpro Mini