| @@ -64,9 +64,9 @@ | ||
| 64 | 64 | */ |
| 65 | 65 | protected function get_default_settings() { |
| 66 | 66 | return [ |
| 67 | 67 | 'label_block' => true, |
| 68 | - 'placeholder' => esc_html__( 'Type or paste your URL', 'elementor' ), | |
| 68 | + 'placeholder' => esc_html__( 'Paste URL or type', 'elementor' ), | |
| 69 | 69 | 'autocomplete' => true, |
| 70 | 70 | 'options' => [ 'is_external', 'nofollow', 'custom_attributes' ], |
| 71 | 71 | 'dynamic' => [ |
| 72 | 72 | 'categories' => [ TagsModule::URL_CATEGORY ], |
| @@ -71,13 +71,10 @@ | ||
| 71 | 71 | 'dynamic' => [ |
| 72 | 72 | 'categories' => [ TagsModule::URL_CATEGORY ], |
| 73 | 73 | 'property' => 'url', |
| 74 | 74 | ], |
| 75 | - 'custom_attributes_description' => sprintf( | |
| 76 | - '%1$s <a target="_blank" href="https://go.elementor.com/panel-link-custom-attributes/">%2$s</a>', | |
| 77 | - 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' ), | |
| 78 | - esc_html__( 'Learn more', 'elementor' ) | |
| 79 | - ), | |
| 75 | + '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' ) | |
| 76 | + . ' <a href="https://go.elementor.com/panel-link-custom-attributes/" target="_blank">' . esc_html__( 'Learn More', 'elementor' ) . '</a>', | |
| 80 | 77 | ]; |
| 81 | 78 | } |
| 82 | 79 | |
| 83 | 80 | /** |
| @@ -95,18 +92,15 @@ | ||
| 95 | 92 | <div class="elementor-control-field elementor-control-url-external-{{{ ( data.options.length || data.show_external ) ? 'show' : 'hide' }}}"> |
| 96 | 93 | <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label> |
| 97 | 94 | <div class="elementor-control-input-wrapper elementor-control-dynamic-switcher-wrapper"> |
| 98 | 95 | <i class="elementor-control-url-autocomplete-spinner eicon-loading eicon-animation-spin" aria-hidden="true"></i> |
| 99 | - <input id="<?php $this->print_control_uid(); ?>" class="elementor-control-tag-area elementor-input" data-setting="url" placeholder="{{ view.getControlPlaceholder() }}" /> | |
| 96 | + <input id="<?php $this->print_control_uid(); ?>" class="elementor-control-tag-area elementor-input" data-setting="url" placeholder="{{ elementor.getPanelView().currentPageView.children.findByModelCid( data._cid )?.getControlPlaceholder() }}" /> | |
| 100 | 97 | <?php // PHPCS - Nonces don't require escaping. ?> |
| 101 | 98 | <input id="_ajax_linking_nonce" type="hidden" value="<?php echo wp_create_nonce( 'internal-linking' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" /> |
| 102 | - <# if ( !! data.options ) { #> | |
| 103 | - <button class="elementor-control-url-more tooltip-target elementor-control-unit-1" data-tooltip="<?php echo esc_attr__( 'Link Options', 'elementor' ); ?>" aria-label="<?php echo esc_attr__( 'Link Options', 'elementor' ); ?>"> | |
| 99 | + <div class="elementor-control-url-more tooltip-target elementor-control-unit-1" data-tooltip="<?php echo esc_html__( 'Link Options', 'elementor' ); ?>"> | |
| 104 | 100 | <i class="eicon-cog" aria-hidden="true"></i> |
| 105 | - </button> | |
| 106 | - <# } #> | |
| 101 | + </div> | |
| 107 | 102 | </div> |
| 108 | - <# if ( !! data.options ) { #> | |
| 109 | 103 | <div class="elementor-control-url-more-options"> |
| 110 | 104 | <div class="elementor-control-url-option"> |
| 111 | 105 | <input id="<?php $this->print_control_uid( 'is_external' ); ?>" type="checkbox" class="elementor-control-url-option-input" data-setting="is_external"> |
| 112 | 106 | <label for="<?php $this->print_control_uid( 'is_external' ); ?>"><?php echo esc_html__( 'Open in new window', 'elementor' ); ?></label> |
| @@ -114,9 +108,9 @@ | ||
| 114 | 108 | <div class="elementor-control-url-option"> |
| 115 | 109 | <input id="<?php $this->print_control_uid( 'nofollow' ); ?>" type="checkbox" class="elementor-control-url-option-input" data-setting="nofollow"> |
| 116 | 110 | <label for="<?php $this->print_control_uid( 'nofollow' ); ?>"><?php echo esc_html__( 'Add nofollow', 'elementor' ); ?></label> |
| 117 | 111 | </div> |
| 118 | - <div class="elementor-control-url__custom-attributes elementor-control-direction-ltr"> | |
| 112 | + <div class="elementor-control-url__custom-attributes"> | |
| 119 | 113 | <label for="<?php $this->print_control_uid( 'custom_attributes' ); ?>" class="elementor-control-url__custom-attributes-label"><?php echo esc_html__( 'Custom Attributes', 'elementor' ); ?></label> |
| 120 | 114 | <input type="text" id="<?php $this->print_control_uid( 'custom_attributes' ); ?>" class="elementor-control-unit-5" placeholder="key|value" data-setting="custom_attributes"> |
| 121 | 115 | </div> |
| 122 | 116 | <# if ( ( data.options && -1 !== data.options.indexOf( 'custom_attributes' ) ) && data.custom_attributes_description ) { #> |
| @@ -122,9 +116,8 @@ | ||
| 122 | 116 | <# if ( ( data.options && -1 !== data.options.indexOf( 'custom_attributes' ) ) && data.custom_attributes_description ) { #> |
| 123 | 117 | <div class="elementor-control-field-description">{{{ data.custom_attributes_description }}}</div> |
| 124 | 118 | <# } #> |
| 125 | 119 | </div> |
| 126 | - <# } #> | |
| 127 | 120 | </div> |
| 128 | 121 | <# if ( data.description ) { #> |
| 129 | 122 | <div class="elementor-control-field-description">{{{ data.description }}}</div> |
| 130 | 123 | <# } #> |