HEX
Server: Apache
System: Linux nc-ph-4101.simplemoneygoals.com 5.14.0-503.21.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jan 12 09:45:05 EST 2025 x86_64
User: dailygoldindex (1004)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/dailygoldindex/public_html/wp-content/themes/jnews/class/Customizer/sections/search_live.php
<?php

$options = [];

$options[] = [
	'id'          => 'jnews_live_search_show',
	'transport'   => 'postMessage',
	'default'     => true,
	'type'        => 'jnews-toggle',
	'label'       => esc_html__( 'Enable Live Search Block', 'jnews' ),
	'description' => esc_html__( 'Turn this option on to enable live search.', 'jnews' ),
];

$options[] = [
	'id'              => 'jnews_live_search_number_post',
	'transport'       => 'postMessage',
	'default'         => 4,
	'type'            => 'jnews-slider',
	'label'           => esc_html__( 'Live Search Number of Post', 'jnews' ),
	'description'     => esc_html__( 'Set the number of post on live search result.', 'jnews' ),
	'choices'         => [
		'min'  => '1',
		'max'  => '10',
		'step' => '1',
	],
	'active_callback' => [
		[
			'setting'  => 'jnews_live_search_show',
			'operator' => '==',
			'value'    => true,
		],
	],
];

$options[] = [
	'id'              => 'jnews_live_search_date',
	'transport'       => 'postMessage',
	'default'         => 'default',
	'type'            => 'jnews-select',
	'label'           => esc_html__( 'Live Search Date Format', 'jnews' ),
	'description'     => esc_html__( 'Choose which date format you want to use for live search.', 'jnews' ),
	'multiple'        => 1,
	'choices'         => [
		'ago'     => esc_attr__( 'Relative Date/Time Format (ago)', 'jnews' ),
		'default' => esc_attr__( 'WordPress Default Format', 'jnews' ),
		'custom'  => esc_attr__( 'Custom Format', 'jnews' ),
	],
	'active_callback' => [
		[
			'setting'  => 'jnews_live_search_show',
			'operator' => '==',
			'value'    => true,
		],
	],
];

$options[] = [
	'id'              => 'jnews_live_search_date_custom',
	'transport'       => 'postMessage',
	'default'         => 'Y/m/d',
	'type'            => 'jnews-text',
	'label'           => esc_html__( 'Custom Live Search Date Format', 'jnews' ),
	'description'     => wp_kses( sprintf( __( "Please set custom date format for live search. For more detail about this format, please refer to
                                <a href='%s' target='_blank'>Developer Codex</a>.", "jnews" ), "https://developer.wordpress.org/reference/functions/current_time/" ),
		wp_kses_allowed_html() ),
	'active_callback' => [
		[
			'setting'  => 'jnews_live_search_date',
			'operator' => '==',
			'value'    => 'custom',
		],
		[
			'setting'  => 'jnews_live_search_show',
			'operator' => '==',
			'value'    => true,
		],
	],
];

return $options;