✏️ 编辑:class-rest-content.php
路径:
/home/forge/kingkrunch.com/wp/wp-content/plugins/wp-smush-pro/core/parser/class-rest-content.php
大小:958 B · 修改:2026-09-29 06:58:27 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php namespace Smush\Core\Parser; class Rest_Content { /** * @var string */ private $content; /** * @var Image_URL[] */ private $image_urls; public function __construct( $content, $image_urls ) { $this->content = $content; $this->image_urls = $image_urls; } /** * @return string */ public function get_content() { return $this->content; } 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->content; foreach ( $this->image_urls as $image_url ) { if ( $image_url->has_updates() ) { $updated = str_replace( $image_url->get_previous_url(), $image_url->get_url(), $updated ); } } return $updated; } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF