HEX
Server: LiteSpeed
System: Linux cp4.porkbun.com 5.14.0-611.20.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 14 06:35:04 EST 2026 x86_64
User: vxblllubpkafjsjw (1110)
PHP: 8.4.19
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/styler-for-wpforms/includes/form-select.php
<?php
/**
 * Control to select the form in customizer.
 */

$wp_customize->add_section(
	'sfwf_select_form_section',
	array(
		'title' => 'Select WPForm',
		'panel' => 'sfwf_panel',
	)
);

$wp_customize->add_setting(
	'sfwf_select_form_id',
	array(
		'default'   => '-1',
		'transport' => 'postMessage',
		'type'      => 'option',
	)
);

// get all WPForms forms created by user.
if ( function_exists( 'wpforms' ) || class_exists( 'WPForms' ) ) {
	$wpforms_hander = wpforms()->form;
	$forms          = $wpforms_hander->get();
	$select_form    = array( -1 => '---Select form --' );
	if ( $forms ) {
		foreach ( $forms as $form ) {
			$select_form[ $form->ID ] = $form->post_title;
		}
	}
} else {
	$select_form['form not installed'] = 'WPForms not installed';
}

$wp_customize->add_control(
	'sfwf_select_form_id',
	array(
		'type'     => 'select',
		'priority' => 10, // Within the section.
		'section'  => 'sfwf_select_form_section', // Required, core or custom.
		'label'    => __( 'Select WPForm' ),
		'choices'  => $select_form,

	)
);