文件操作 - post-class.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/jimbrandstatter/public_html/wp-content/themes/Total/inc/hooks/post-class.php
编辑文件内容
<?php namespace TotalTheme\Hooks; \defined( 'ABSPATH' ) || exit; /** * Hooks into "post_class". */ final class Post_Class { /** * Static-only class. */ private function __construct() {} /** * Callback method. */ public static function callback( $classes, $class = '', $post_id = '' ) { if ( ! $post_id ) { return $classes; } $type = \get_post_type( $post_id ); if ( 'forum' === $type || 'topic' === $type ) { return $classes; } $classes[] = 'entry'; if ( \wpex_post_has_media( $post_id ) ) { $classes[] = 'has-media'; } else { $classes[] = 'no-media'; } if ( \wpex_get_post_redirect_link( $post_id ) ) { $classes[] = 'has-redirect'; } if ( \is_sticky( $post_id ) ) { $classes[] = 'sticky'; } return $classes; } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件