文件操作 - featured-image.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/the-events-calendar/src/views/blocks/featured-image.php
编辑文件内容
<?php /** * Block: Featured Image * * Override this template in your own theme by creating a file at: * [your-theme]/tribe/events/blocks/featured-image.php * * See more documentation about our Blocks Editor templating system. * * @link http://evnt.is/1aiy * * @version 4.7 * */ $event_id = $this->get( 'post_id' ); // Get the custom class from the block attributes. $class = isset( $attributes['className'] ) ? $attributes['className'] : ''; // Generate the featured image HTML. $featured_image = tribe_event_featured_image( $event_id, 'full', false ); // If a featured image and custom class are present, append the custom class to the parent container. if ( $featured_image && $class ) { $search_pattern = 'class="tribe-events-event-image"'; $replace_pattern = 'class="tribe-events-event-image ' . esc_attr( $class ) . '"'; $featured_image = str_replace( $search_pattern, $replace_pattern, $featured_image ); } echo $featured_image;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件