文件操作 - Image.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/the-events-calendar/common/src/Common/Admin/Entities/Image.php
编辑文件内容
<?php /** * Image element. * * @since 6.1.0 */ declare( strict_types=1 ); namespace TEC\Common\Admin\Entities; use Tribe\Utils\Element_Attributes as Attributes; /** * Class Image * * @since 6.1.0 */ class Image extends Base_Entity { /** * The URL for the image. * * @var string */ protected string $url = ''; /** * Image constructor. * * @since 6.1.0 * * @param string $url The URL for the image. * @param ?Attributes $attributes The attributes for the image element. */ public function __construct( string $url, ?Attributes $attributes = null ) { $this->url = $url; if ( $attributes ) { $this->attributes = $attributes; } } /** * Render the image. * * @since 6.1.0 * * @return void */ public function render() { printf( '<img src="%s" %s />', esc_url( $this->url ), $this->get_attributes() // phpcs:ignore StellarWP.XSS.EscapeOutput,WordPress.Security.EscapeOutput ); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件