HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/triad-infosec/wp-content/plugins/fusion-builder/inc/i18n/years.php
<?php
/**
 * Years.
 *
 * @package fusion-builder
 */

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'Direct script access denied.' );
}

/**
 * Adds years predefined choices
 *
 * @param array $choices The predefined choices.
 */
function fusion_builder_predefined_years( $choices = [] ) {
	$values = [];
	$date   = (int) date( 'Y' );

	for ( $x = 0; $x <= 100; $x++ ) {
		$values[] = (string) $date;
		$date--;
	}

	$choices[] = [
		'name'   => __( 'Years', 'fusion-builder' ),
		'values' => $values,
	];
	return $choices;
}
add_filter( 'fusion_predefined_choices', 'fusion_builder_predefined_years' );