File manager - Edit - /home/premiey/www/wp-includes/images/media/url.php.tar
Back
home/premiey/www/wp-content/plugins/metform/widgets/url/url.php 0000666 00000013456 15165415170 0021027 0 ustar 00 <?php namespace Elementor; defined( 'ABSPATH' ) || exit; Class MetForm_Input_Url extends Widget_Base{ use \MetForm\Traits\Common_Controls; use \MetForm\Traits\Conditional_Controls; use \MetForm\Widgets\Widget_Notice; public function get_name() { return 'mf-url'; } public function get_title() { return esc_html__( 'URL', 'metform' ); } public function show_in_panel() { return 'metform-form' == get_post_type(); } public function get_categories() { return [ 'metform' ]; } public function get_keywords() { return ['metform', 'input', 'url', 'link']; } public function get_help_url() { return 'https://wpmet.com/doc/form-widgets/#url'; } protected function register_controls() { $this->start_controls_section( 'content_section', [ 'label' => esc_html__( 'Content', 'metform' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->input_content_controls(); $this->end_controls_section(); $this->start_controls_section( 'settings_section', [ 'label' => esc_html__( 'Settings', 'metform' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->input_setting_controls(); $this->add_control( 'mf_input_validation_type', [ 'label' => __( 'Validation Type', 'metform' ), 'type' => \Elementor\Controls_Manager::HIDDEN, 'default' => 'none', ] ); $this->input_get_params_controls(); $this->end_controls_section(); if(class_exists('\MetForm_Pro\Base\Package')){ $this->input_conditional_control(); } $this->start_controls_section( 'label_section', [ 'label' => esc_html__( 'Label', 'metform' ), 'tab' => Controls_Manager::TAB_STYLE, 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'name' => 'mf_input_label_status', 'operator' => '===', 'value' => 'yes', ], [ 'name' => 'mf_input_required', 'operator' => '===', 'value' => 'yes', ], ], ], ] ); $this->input_label_controls(); $this->end_controls_section(); $this->start_controls_section( 'input_section', [ 'label' => esc_html__( 'Input', 'metform' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->input_controls(); $this->end_controls_section(); $this->start_controls_section( 'placeholder_section', [ 'label' => esc_html__( 'Place Holder', 'metform' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->input_place_holder_controls(); $this->end_controls_section(); $this->start_controls_section( 'help_text_section', [ 'label' => esc_html__( 'Help Text', 'metform' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'mf_input_help_text!' => '' ] ] ); $this->input_help_text_controls(); $this->end_controls_section(); $this->insert_pro_message(); } protected function render($instance = []){ $settings = $this->get_settings_for_display(); extract($settings); $render_on_editor = false; $is_edit_mode = 'metform-form' === get_post_type() && \Elementor\Plugin::$instance->editor->is_edit_mode(); $class = (isset($settings['mf_conditional_logic_form_list']) ? 'mf-conditional-input' : ''); $configData = [ 'message' => $errorMessage = isset($mf_input_validation_warning_message) ? !empty($mf_input_validation_warning_message) ? $mf_input_validation_warning_message : esc_html__('This field is required.', 'metform') : esc_html__('This field is required.', 'metform'), 'urlMessage' => esc_html__('Please enter a valid URL', 'metform'), 'minLength' => isset($mf_input_min_length) ? $mf_input_min_length : 1, 'maxLength' => isset($mf_input_max_length) ? $mf_input_max_length : '', 'type' => isset($mf_input_validation_type) ? $mf_input_validation_type : '', 'required' => isset($mf_input_required) && $mf_input_required == 'yes' ? true : false, 'expression' => isset($mf_input_validation_expression) && !empty(trim($mf_input_validation_expression)) ? trim($mf_input_validation_expression) : 'null' ]; ?> <div class="mf-input-wrapper"> <?php if ( 'yes' == $mf_input_label_status ): ?> <label class="mf-input-label" for="mf-input-url-<?php echo esc_attr( $this->get_id() ); ?>"> <?php echo esc_html(\MetForm\Utils\Util::react_entity_support( $mf_input_label, $render_on_editor )); ?> <span class="mf-input-required-indicator"><?php echo esc_html( ($mf_input_required === 'yes') ? '*' : '' );?></span> </label> <?php endif; ?> <input type="url" class="mf-input <?php echo esc_attr($class); ?>" id="mf-input-url-<?php echo esc_attr($this->get_id()); ?>" name="<?php echo esc_attr($mf_input_name); ?>" placeholder="<?php echo esc_html(\MetForm\Utils\Util::react_entity_support( $mf_input_placeholder, $render_on_editor )); ?>" <?php if ( !$is_edit_mode ): ?> onInput=${ parent.handleChange } aria-invalid=${validation.errors['<?php echo esc_attr($mf_input_name); ?>'] ? 'true' : 'false'} ref=${ el => parent.activateValidation(<?php echo json_encode($configData); ?>, el)} <?php endif; ?> /> <?php if ( !$is_edit_mode ) : ?> <${validation.ErrorMessage} errors=${validation.errors} name="<?php echo esc_attr( $mf_input_name ); ?>" as=${html`<span className="mf-error-message"></span>`} /> <?php endif; ?> <?php echo ('' !== trim($mf_input_help_text) ? sprintf('<span class="mf-input-help"> %s </span>', esc_html( \MetForm\Utils\Util::react_entity_support(trim($mf_input_help_text), $render_on_editor))) : ''); ?> </div> <?php } } home/premiey/www/wp-content/plugins/elementor/includes/controls/url.php 0000666 00000012013 15165473272 0022544 0 ustar 00 <?php namespace Elementor; use Elementor\Modules\DynamicTags\Module as TagsModule; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Elementor URL control. * * A base control for creating url control. Displays a URL input with the * ability to set the target of the link to `_blank` to open in a new tab. * * @since 1.0.0 */ class Control_URL extends Control_Base_Multiple { /** * Get url control type. * * Retrieve the control type, in this case `url`. * * @since 1.0.0 * @access public * * @return string Control type. */ public function get_type() { return 'url'; } /** * Get url control default values. * * Retrieve the default value of the url control. Used to return the default * values while initializing the url control. * * @since 1.0.0 * @access public * * @return array Control default value. */ public function get_default_value() { return [ 'url' => '', 'is_external' => '', 'nofollow' => '', 'custom_attributes' => '', ]; } /** * Get url control default settings. * * Retrieve the default settings of the url control. Used to return the default * settings while initializing the url control. * * @since 1.0.0 * @access protected * * @return array Control default settings. */ protected function get_default_settings() { return [ 'label_block' => true, 'placeholder' => esc_html__( 'Paste URL or type', 'elementor' ), 'autocomplete' => true, 'options' => [ 'is_external', 'nofollow', 'custom_attributes' ], 'dynamic' => [ 'categories' => [ TagsModule::URL_CATEGORY ], 'property' => 'url', ], 'custom_attributes_description' => esc_html__( 'Set custom attributes for the link element. Separate attribute keys from values using the | (pipe) character. Separate key-value pairs with a comma.', 'elementor' ) . ' <a href="https://go.elementor.com/panel-link-custom-attributes/" target="_blank">' . esc_html__( 'Learn More', 'elementor' ) . '</a>', ]; } /** * Render url control output in the editor. * * Used to generate the control HTML in the editor using Underscore JS * template. The variables for the class are available using `data` JS * object. * * @since 1.0.0 * @access public */ public function content_template() { ?> <div class="elementor-control-field elementor-control-url-external-{{{ ( data.options.length || data.show_external ) ? 'show' : 'hide' }}}"> <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label> <div class="elementor-control-input-wrapper elementor-control-dynamic-switcher-wrapper"> <i class="elementor-control-url-autocomplete-spinner eicon-loading eicon-animation-spin" aria-hidden="true"></i> <input id="<?php $this->print_control_uid(); ?>" class="elementor-control-tag-area elementor-input" data-setting="url" placeholder="{{ view.getControlPlaceholder() }}" /> <?php // PHPCS - Nonces don't require escaping. ?> <input id="_ajax_linking_nonce" type="hidden" value="<?php echo wp_create_nonce( 'internal-linking' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" /> <button class="elementor-control-url-more tooltip-target elementor-control-unit-1" data-tooltip="<?php echo esc_attr__( 'Link Options', 'elementor' ); ?>"> <i class="eicon-cog" aria-hidden="true"></i> <span class="elementor-screen-only"><?php echo esc_html__( 'Link Options', 'elementor' ); ?></span> </button> </div> <div class="elementor-control-url-more-options"> <div class="elementor-control-url-option"> <input id="<?php $this->print_control_uid( 'is_external' ); ?>" type="checkbox" class="elementor-control-url-option-input" data-setting="is_external"> <label for="<?php $this->print_control_uid( 'is_external' ); ?>"><?php echo esc_html__( 'Open in new window', 'elementor' ); ?></label> </div> <div class="elementor-control-url-option"> <input id="<?php $this->print_control_uid( 'nofollow' ); ?>" type="checkbox" class="elementor-control-url-option-input" data-setting="nofollow"> <label for="<?php $this->print_control_uid( 'nofollow' ); ?>"><?php echo esc_html__( 'Add nofollow', 'elementor' ); ?></label> </div> <div class="elementor-control-url__custom-attributes"> <label for="<?php $this->print_control_uid( 'custom_attributes' ); ?>" class="elementor-control-url__custom-attributes-label"><?php echo esc_html__( 'Custom Attributes', 'elementor' ); ?></label> <input type="text" id="<?php $this->print_control_uid( 'custom_attributes' ); ?>" class="elementor-control-unit-5" placeholder="key|value" data-setting="custom_attributes"> </div> <# if ( ( data.options && -1 !== data.options.indexOf( 'custom_attributes' ) ) && data.custom_attributes_description ) { #> <div class="elementor-control-field-description">{{{ data.custom_attributes_description }}}</div> <# } #> </div> </div> <# if ( data.description ) { #> <div class="elementor-control-field-description">{{{ data.description }}}</div> <# } #> <?php } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings