HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/slfopp7cb1df/www/home/wp-content/themes/nanosoft/admin/js/sidebars.js
( function( $ ) {
	"use strict";

	var remove_button_markup = '<div class="widgets-holder-toolbar">\
								<a href="" class="button"></a>\
							</div>';

	$.sidebars_remove_button = function( options ) {
		$.each( options.items || [], function ( index, value ) {
			var
			toolbar = $( remove_button_markup ),
			parent  = $( '#' + value ).parent();

			toolbar.find( 'a' )
				.attr( { 'href': ajaxurl + '?action=remove_custom_sidebar&id=' + value } )
				.text( options.button_title || 'remove this area' )
				.on( 'click', function( e ) {
					if ( ! confirm( options.confirm_message || 'Are you sure you want to remove this widget area?' ) ) {
						e.preventDefault();
					}
				} );

			parent.append( toolbar );
		});
	}

	$(function() {
		if ( _sidebarSettings )
			$.sidebars_remove_button( _sidebarSettings );
	});
} ).call( this, jQuery );