HEX
Server: LiteSpeed
System: Linux server315.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: globfdxw (6114)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //home/globfdxw/www/wp-content/plugins/wpforms-surveys-polls/templates/entries/controls.php
<?php
/**
 * Graph controls elements template.
 *
 * @since 1.18.0
 *
 * @var int   $field_id          Field ID.
 * @var array $filter_settings   Filter settings.
 * @var bool  $show_settings     Whether to display the Settings (gear) menu.
 * @var bool  $settings_hidden   Whether to initially hide settings (JS toggles on field switch).
 * @var bool  $show_export_scope Whether to display the Export Scope.
 * @var bool  $has_chart         Whether to display the chart.
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// Default to true for backward compatibility if not provided.
$show_settings   = isset( $show_settings ) ? (bool) $show_settings : true;
$settings_hidden = ! empty( $settings_hidden );

// Only show Export Scope on the Survey Results page, not on the Entries list preview.
$show_export_scope = isset( $show_export_scope ) && (bool) $show_export_scope;

// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo wpforms_render(
	WPFORMS_SURVEYS_POLLS_PATH . 'templates/entries/export-menu',
	[
		'field_id'          => $field_id,
		'show_export_scope' => $show_export_scope,
		'has_chart'         => $has_chart ?? true,
		'content_hidden'    => isset( $content_hidden ) && (bool) $content_hidden,
	],
	true
);

if ( ! empty( $filter_settings['enabled'] ) ) {
	$filter_settings['wrapper_style'] = ! empty( $filter_settings['hidden'] ) ? 'display:none' : '';

	// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	echo wpforms_render( WPFORMS_SURVEYS_POLLS_PATH . 'templates/entries/filter-menu', $filter_settings, true );
}

if ( $show_settings ) {
	// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	echo wpforms_render(
		WPFORMS_SURVEYS_POLLS_PATH . 'templates/entries/settings-menu',
		[
			'field_id'        => $field_id,
			'settings_hidden' => $settings_hidden,
			'hide_apply_all'  => isset( $hide_apply_all ) && (bool) $hide_apply_all,
		],
		true
	);
}