HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: //proc/self/cwd/wp-content/themes/xts-luman/framework/integration/elementor/assets/js/functions.js
jQuery(window).on('elementor:init', function() {
	elementor.hooks.addAction('panel/open_editor/widget', function(panel, model, view) {
		jQuery(panel.$el).find('.xts-html-block-links select').each(function() {
			changeLink(jQuery(this));
		});

		jQuery(panel.$el).on('change load', '.xts-html-block-links select', function() {
			changeLink(jQuery(this));
		});

		function changeLink($select) {
			var $link = $select.parents('.xts-html-block-links').find('.xts-edit-block-link');
			var selectValue = $select.find('option:selected').val();
			var currentHref = $link.attr('href');

			var newHref = currentHref.split('post=')[0] + 'post=' + selectValue + '&action=elementor';

			if (!selectValue || 0 == selectValue) {
				$link.hide();
			} else {
				$link.attr('href', newHref).show();
			}
		}
	});
});