__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
/*global ajaxurl, woocommerce_term_ordering_params */

/* Modifided script from the simple-page-ordering plugin */
jQuery( function( $ ) {

	var table_selector   = 'table.wp-list-table',
		item_selector    = 'tbody tr:not(.inline-edit-row)',
		term_id_selector = '.column-handle input[name="term_id"]',
		column_handle    = '<td class="column-handle"></td>';

	if ( 0 === $( table_selector ).find( '.column-handle' ).length ) {
		$( table_selector ).find( 'tr:not(.inline-edit-row)' ).append( column_handle );

		term_id_selector = '.check-column input';
	}

	// Stand-in wcTracks.recordEvent in case tracks is not available (for any reason).
	window.wcTracks = window.wcTracks || {};
	window.wcTracks.recordEvent = window.wcTracks.recordEvent  || function() { };

	$( table_selector ).find( '.column-handle' ).show();

	$.wc_add_missing_sort_handles = function() {
		var all_table_rows = $( table_selector ).find('tbody > tr');
		var rows_with_handle = $( table_selector ).find('tbody > tr > td.column-handle').parent();
		if ( all_table_rows.length !== rows_with_handle.length ) {
			all_table_rows.each(function(index, elem){
				if ( ! rows_with_handle.is( elem ) ) {
					$( elem ).append( column_handle );
				}
			});
		}
		$( table_selector ).find( '.column-handle' ).show();
	};

	$( document ).ajaxComplete( function( event, request, options ) {
		if (
			request &&
			4 === request.readyState &&
			200 === request.status &&
			options.data &&
			( 0 <= options.data.indexOf( '_inline_edit' ) || 0 <= options.data.indexOf( 'add-tag' ) )
		) {
			$.wc_add_missing_sort_handles();
			$( document.body ).trigger( 'init_tooltips' );
		}
	} );

	$( table_selector ).sortable({
		items: item_selector,
		cursor: 'move',
		handle: '.column-handle',
		axis: 'y',
		forcePlaceholderSize: true,
		helper: 'clone',
		opacity: 0.65,
		placeholder: 'product-cat-placeholder',
		scrollSensitivity: 40,
		start: function( event, ui ) {
			if ( ! ui.item.hasClass( 'alternate' ) ) {
				ui.item.css( 'background-color', '#ffffff' );
			}
			ui.item.children( 'td, th' ).css( 'border-bottom-width', '0' );
			ui.item.css( 'outline', '1px solid #aaa' );
		},
		stop: function( event, ui ) {
			ui.item.removeAttr( 'style' );
			ui.item.children( 'td, th' ).css( 'border-bottom-width', '1px' );
		},
		update: function( event, ui ) {
			var termid     = ui.item.find( term_id_selector ).val(); // this post id
			var termparent = ui.item.find( '.parent' ).html();            // post parent

			var prevtermid = ui.item.prev().find( term_id_selector ).val();
			var nexttermid = ui.item.next().find( term_id_selector ).val();

			// Can only sort in same tree
			var prevtermparent, nexttermparent;
			if ( prevtermid !== undefined ) {
				prevtermparent = ui.item.prev().find( '.parent' ).html();
				if ( prevtermparent !== termparent) {
					prevtermid = undefined;
				}
			}

			if ( nexttermid !== undefined ) {
				nexttermparent = ui.item.next().find( '.parent' ).html();
				if ( nexttermparent !== termparent) {
					nexttermid = undefined;
				}
			}

			// If previous and next not at same tree level, or next not at same tree level and
			// the previous is the parent of the next, or just moved item beneath its own children.
			if (
				( prevtermid === undefined && nexttermid === undefined ) ||
				( nexttermid === undefined && nexttermparent === prevtermid ) ||
				( nexttermid !== undefined && prevtermparent === termid )
			) {
				$( table_selector ).sortable( 'cancel' );
				return;
			}

			window.wcTracks.recordEvent( 'product_attributes_ordering_term', {
				is_category:
					woocommerce_term_ordering_params.taxonomy === 'product_cat'
						? 'yes'
						: 'no',
			} );

			// Show Spinner
			ui.item.find( '.check-column input' ).hide();
			ui.item
				.find( '.check-column' )
				.append( '<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />' );

			// Go do the sorting stuff via ajax.
			$.post(
				ajaxurl,
				{
					action: 'woocommerce_term_ordering',
					id: termid,
					nextid: nexttermid,
					thetaxonomy: woocommerce_term_ordering_params.taxonomy
				},
				function(response) {
					if ( response === 'children' ) {
						window.location.reload();
					} else {
						ui.item.find( '.check-column input' ).show();
						ui.item.find( '.check-column' ).find( 'img' ).remove();
					}
				}
			);

			// Fix cell colors
			$( 'table.widefat tbody tr' ).each( function() {
				var i = jQuery( 'table.widefat tbody tr' ).index( this );
				if ( i%2 === 0 ) {
					jQuery( this ).addClass( 'alternate' );
				} else {
					jQuery( this ).removeClass( 'alternate' );
				}
			});
		}
	});

});

Filemanager

Name Type Size Permission Actions
api-keys.js File 3.89 KB 0664
api-keys.min.js File 2.23 KB 0664
backbone-modal.js File 4.35 KB 0664
backbone-modal.min.js File 2.77 KB 0664
marketplace-suggestions.js File 16.84 KB 0664
marketplace-suggestions.min.js File 6.66 KB 0664
meta-boxes-coupon.js File 2.99 KB 0664
meta-boxes-coupon.min.js File 1.61 KB 0664
meta-boxes-order.js File 54.3 KB 0664
meta-boxes-order.min.js File 32.97 KB 0664
meta-boxes-product-variation.js File 42.26 KB 0664
meta-boxes-product-variation.min.js File 22.55 KB 0664
meta-boxes-product.js File 34.25 KB 0664
meta-boxes-product.min.js File 18.04 KB 0664
meta-boxes.js File 4.88 KB 0664
meta-boxes.min.js File 2.97 KB 0664
network-orders.js File 2.34 KB 0664
network-orders.min.js File 1.25 KB 0664
order-attribution-admin.js File 1.16 KB 0664
order-attribution-admin.min.js File 730 B 0664
product-editor.js File 696 B 0664
product-editor.min.js File 298 B 0664
product-ordering.js File 2.49 KB 0664
product-ordering.min.js File 1.61 KB 0664
quick-edit.js File 7.06 KB 0664
quick-edit.min.js File 4.58 KB 0664
reports.js File 5.39 KB 0664
reports.min.js File 2.7 KB 0664
settings-views-html-settings-tax.js File 12.04 KB 0664
settings-views-html-settings-tax.min.js File 6.08 KB 0664
settings.js File 11.95 KB 0664
settings.min.js File 6.25 KB 0664
system-status.js File 5.29 KB 0664
system-status.min.js File 3.06 KB 0664
term-ordering.js File 4.57 KB 0664
term-ordering.min.js File 2.47 KB 0664
users.js File 3.78 KB 0664
users.min.js File 1.87 KB 0664
wc-brands-enhanced-select.js File 4.06 KB 0664
wc-brands-enhanced-select.min.js File 1.59 KB 0664
wc-clipboard.js File 869 B 0664
wc-clipboard.min.js File 336 B 0664
wc-customer-stock-notifications.js File 1.61 KB 0664
wc-customer-stock-notifications.min.js File 1.13 KB 0664
wc-enhanced-select.js File 13.58 KB 0664
wc-enhanced-select.min.js File 7.71 KB 0664
wc-orders.js File 1.98 KB 0664
wc-orders.min.js File 1.17 KB 0664
wc-product-export.js File 3.79 KB 0664
wc-product-export.min.js File 2.09 KB 0664
wc-product-import.js File 2.92 KB 0664
wc-product-import.min.js File 1.7 KB 0664
wc-setup.js File 10.05 KB 0664
wc-setup.min.js File 6.35 KB 0664
wc-shipping-classes.js File 6.57 KB 0664
wc-shipping-classes.min.js File 3.57 KB 0664
wc-shipping-zone-methods.js File 35.06 KB 0664
wc-shipping-zone-methods.min.js File 17.07 KB 0664
wc-shipping-zones.js File 9.23 KB 0664
wc-shipping-zones.min.js File 4.85 KB 0664
wc-status-widget-async.js File 1.28 KB 0664
wc-status-widget-async.min.js File 519 B 0664
wc-status-widget.js File 1.78 KB 0664
wc-status-widget.min.js File 1.05 KB 0664
woocommerce_admin.js File 22.38 KB 0664
woocommerce_admin.min.js File 11.98 KB 0664
Filemanager