. */ /** * File tags. * * @since 4.6.0 */ namespace Textpattern\Tag\Syntax; class File { /** * Checks if the file is the first in the list. * * @param array $atts * @param string $thing * @return string */ public static function renderIfFirstFile($atts, $thing) { global $thisfile; assert_file(); return parse(EvalElse($thing, !empty($thisfile['is_first']))); } /** * Checks if the file is the last in the list. * * @param array $atts * @param string $thing * @return string */ public static function renderIfLastFile($atts, $thing) { global $thisfile; assert_file(); return parse(EvalElse($thing, !empty($thisfile['is_last']))); } }