403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.168
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/www/wp-content/themes/woodmart/inc/modules/nav-menu-images/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mypckeys/www/wp-content/themes/woodmart/inc/modules/nav-menu-images/inc/nmi.js
/**
 * Display thumb when set as featured.
 *
 * Overwritess built in function.
 */
function WPSetThumbnailID(id) {
	tb_remove();
	jQuery.post(ajaxurl, {
			action      : 'nmi_added_thumbnail',
			thumbnail_id: id,
			post_id     : window.clicked_item_id,
			security    : woodmartConfig.mega_menu_added_thumbnail_nonce
		}, function(response) {
			jQuery('li#menu-item-' + window.clicked_item_id + ' .nmi-current-image').html(response);
			tb_remove();
		}
	);
}

function WPSetThumbnailHTML(html) {
}

jQuery(document).ready(function($) {
	// Get all menu items
	var items = $('ul#menu-to-edit li.menu-item');

	// Go through all items and display link & thumb
	for (var i = 0; i < items.length; i++) {
		var id = $(items[i]).children('#nmi_item_id').val();

		var sibling = $('#edit-menu-item-attr-title-' + id).parent().parent();
		var image_div = $('li#menu-item-' + id + ' .nmi-current-image');
		var link_div = $('li#menu-item-' + id + ' .nmi-upload-link');
		var customFields = $('li#menu-item-' + id + ' .nmi-item-custom-fields');

		if (customFields) {
			sibling.after(customFields);
			customFields.show();
		}

		if (link_div) {
			link_div.show();
		}

		if (image_div) {
			image_div.show();
		}
	}

	// Save item ID on click on a link
	$('.nmi-upload-link').click(function() {
		window.clicked_item_id = $(this).parent().parent().children('#nmi_item_id').val();
	});

	// Display alert when not added as featured
	window.send_to_editor = function(html) {
		alert(nmi_vars.alert);
		tb_remove();
	};

	$('.nmi-item-custom-fields').find('select').on('change', function() {
		var $this = $(this);
		var selectValue = $this.val();

		if ( 'nmi-design' === $this.data('field') ) {
			$this.parents('li.menu-item').removeClass('wd-design-default wd-design-full-width wd-design-full-height wd-design-sized wd-design-aside').addClass('wd-design-' + selectValue );
		}

	}).trigger('change');

	// Menu block edit link
	$('.nmi-block select').on('change', function() {
		$('.edit-block-link').attr('href', $(this).find('option:selected').data('edit-link')).show();
	})
});

Youez - 2016 - github.com/yon3zu
LinuXploit