HEX
Server: Apache
System: Linux s1 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: gerold (1018)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals
Upload Files
File: /home/gerold/public_html/wp-content/plugins/snapshot-backups/tpl/elements/tree.php
<?php //phpcs:ignore
/**
 * Template file for Directory Tree
 *
 * @package snapshot
 * @var array $excluded List of excluded files.
 *
 * @since 4.1.4
 */

$count       = 1;
$total_count = count( $files );
foreach ( $files as $file ) :
	$file_path  = $file['path'];
	$suspicious = is_suspicious_file_name( $file_path );

	if ( $suspicious ) {
		continue;
	}

	$checked = in_array( $file_path, $excluded, true );
	$class   = ( isset( $file['browsable'] ) && $file['browsable'] && 'dir' === $file['type'] ) ? 'is-browsable' : 'not-browsable';
	$class  .= ' node-type--' . $file['type'];
	$class  .= ( 'ajax' === $type ) ? ' node--appended' : '';
	$class  .= $checked ? ' node--enabled' : ' node--disabled';
	$class  .= ( $count === $total_count && $more_items_flag ) ? ' explorer-last-item' : '';
	$size    = $file['size'];
	?>
<li class="<?php echo esc_attr( $class ); ?>" data-path="<?php echo esc_attr( wp_strip_all_tags( $file['path'] ) ); ?>"
	data-name="<?php echo esc_attr( $file['name'] ); ?>" data-type="<?php echo esc_attr( $file['type'] ); ?>"
	data-page="<?php echo esc_attr( 0 ); ?>" role="treeitem"
							<?php
							if ( 'dir' === $file['type'] ) :
								?>
								aria-expanded="false" <?php endif; ?> aria-selected="<?php echo $checked ? 'false' : 'true'; ?>">
	<span class="sui-tree-node">
		<?php if ( 'dir' === $file['type'] ) : ?>
		<span role="button" class="loading-icon" data-button="expander"
			aria-label="<?php esc_attr_e( 'Expand or compress item', 'snapshot' ); ?>"></span>
		<?php endif; ?>
		<span class="sui-node-checkbox" role="checkbox"
			aria-label="<?php esc_attr_e( 'Select this item', 'snapshot' ); ?>"></span>
		<span class="snapshot-icon" aria-hidden="true"></span>
		<span class="sui-node-text">
			<?php echo esc_html( $file['name'] ); ?>
		</span>

		<?php if ( 'file' === $file['type'] ) : ?>
		<span class="sui-node-text-right"><?php echo esc_html( $size ); ?></span>
		<?php endif; ?>
	</span>
	<?php
	if ( $count === $total_count && $more_items_flag ) {
		?>
	<div class="exp-load-more-container">
		<div class="exp-last-item-overlay"></div>
		<div class="exp-load-more-content">
			<span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
			<span class="text"><?php echo esc_html__( 'Please wait, loading more results', 'snapshot' ); ?></span>
		</div>
	</div>
		<?php
	}
	?>
</li>
	<?php
	++$count;
endforeach;
?>