| Server IP : 38.190.208.107 / Your IP : 216.73.216.187 Web Server : nginx/1.28.1 System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 User : root ( 0) PHP Version : 8.2.28 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/wp.9/wp-content/themes/woodmart/inc/modules/nav-menu-images/inc/ |
Upload File : |
/**
* 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) {
}
(function($) {
$(document).on('menu-item-added', function() {
initCustomMenuFields();
});
jQuery(document).ready(function() {
initCustomMenuFields();
});
function initCustomMenuFields() {
// 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 customFields = $('li#menu-item-' + id + ' .nmi-item-custom-fields');
if (customFields) {
sibling.after(customFields);
}
}
// 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('.nmi-item-custom-fields').removeClass('wd-design-default wd-design-full-width wd-design-full-height wd-design-sized wd-design-aside').addClass('wd-design-' + selectValue );
}
})
// Menu block edit link
$('.nmi-block select').on('change', function() {
$('.edit-block-link').attr('href', $(this).find('option:selected').data('edit-link')).show();
})
}
})(jQuery);