$20 GRAYBYTE WORDPRESS FILE MANAGER $49

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/dantho.rw/wp-content/plugins/wpforms-lite/src/Integrations/Divi/

HOME
Current File : /home/bravrvjk/dantho.rw/wp-content/plugins/wpforms-lite/src/Integrations/Divi//WPFormsSelector.php
<?php

namespace WPForms\Integrations\Divi;

use ET_Builder_Module;

/**
 * Class WPFormsSelector.
 *
 * @since 1.6.3
 */
class WPFormsSelector extends ET_Builder_Module {

	/**
	 * Module slug.
	 *
	 * @var string
	 */
	public $slug = 'wpforms_selector';

	/**
	 * VB support.
	 *
	 * @var string
	 */
	public $vb_support = 'on';

	/**
	 * Init module.
	 *
	 * @since 1.6.3
	 */
	public function init() {

		$this->name = esc_html__( 'WPForms', 'wpforms-lite' );
	}

	/**
	 * Get list of settings.
	 *
	 * @since 1.6.3
	 *
	 * @return array
	 */
	public function get_fields(): array {

		$forms         = wpforms()->obj( 'form' )->get( '', [ 'order' => 'DESC' ] );
		$default_value = '';

		if ( ! empty( $forms ) ) {
			$forms         = wp_list_pluck( $forms, 'post_title', 'ID' );
			$forms         = array_map(
				static function ( $form ) {

					return htmlspecialchars_decode( $form, ENT_QUOTES );
				},
				$forms
			);
			$forms[0]      = esc_html__( 'Select form', 'wpforms-lite' );
			$default_value = 0;
		}

		return [
			'form_id'    => [
				'label'           => esc_html__( 'Form', 'wpforms-lite' ),
				'type'            => 'select',
				'option_category' => 'basic_option',
				'toggle_slug'     => 'main_content',
				'options'         => $forms,
				'default'         => $default_value,
			],
			'show_title' => [
				'label'           => esc_html__( 'Show Title', 'wpforms-lite' ),
				'type'            => 'yes_no_button',
				'option_category' => 'basic_option',
				'toggle_slug'     => 'main_content',
				'options'         => [
					'off' => esc_html__( 'Off', 'wpforms-lite' ),
					'on'  => esc_html__( 'On', 'wpforms-lite' ),
				],
			],
			'show_desc'  => [
				'label'           => esc_html__( 'Show Description', 'wpforms-lite' ),
				'option_category' => 'basic_option',
				'type'            => 'yes_no_button',
				'toggle_slug'     => 'main_content',
				'options'         => [
					'off' => esc_html__( 'Off', 'wpforms-lite' ),
					'on'  => esc_html__( 'On', 'wpforms-lite' ),
				],
			],
		];
	}


	/**
	 * Disable advanced fields configuration.
	 *
	 * @since 1.6.3
	 *
	 * @return array
	 */
	public function get_advanced_fields_config() {

		return [
			'link_options' => false,
			'text'         => false,
			'background'   => false,
			'borders'      => false,
			'box_shadow'   => false,
			'button'       => false,
			'filters'      => false,
			'fonts'        => false,
		];
	}

	/**
	 * Render module on the frontend.
	 *
	 * @since 1.6.3
	 *
	 * @param array  $attrs       List of unprocessed attributes.
	 * @param string $content     Content being processed.
	 * @param string $render_slug Slug of module that is used for rendering output.
	 *
	 * @return string
	 */
	public function render( $attrs, $content = null, $render_slug = '' ) {

		if ( empty( $this->props['form_id'] ) ) {
			return '';
		}

		return do_shortcode(
			sprintf(
				'[wpforms id="%1$s" title="%2$s" description="%3$s"]',
				absint( $this->props['form_id'] ),
				(bool) apply_filters( 'wpforms_divi_builder_form_title', ! empty( $this->props['show_title'] ) && 'on' === $this->props['show_title'], absint( $this->props['form_id'] ) ),
				(bool) apply_filters( 'wpforms_divi_builder_form_desc', ! empty( $this->props['show_desc'] ) && 'on' === $this->props['show_desc'], absint( $this->props['form_id'] ) )
			)
		);
	}
}


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Nov 2025 10.43 AM
bravrvjk / bravrvjk
0755
Divi.php
8.054 KB
5 Jun 2025 4.54 PM
bravrvjk / bravrvjk
0644
WPFormsSelector.php
3.276 KB
26 Sep 2024 3.36 PM
bravrvjk / bravrvjk
0644
error_log
2.396 KB
11 Nov 2025 1.54 AM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF