403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.217.33
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/d2m/sofident_cz/wp-content/plugins/sitepress-multilingual-cms/res/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/d2m/sofident_cz/wp-content/plugins/sitepress-multilingual-cms/res/js//orphan-comments.js
/*jslint browser: true, nomen: true, laxbreak: true*/
/*global ajaxurl */

"use strict";

jQuery(document).ready(
	function ($) {

		var deleted = 0;
		var deleting = false;
		var initial_orphans_count = 0;

		var orphansCount = $('#wpml_orphans_count');
		var orphansCheckCount = orphansCount.find('.check-orphans');
		var orphansCountResults = orphansCount.find('.orphans-check-results');
		var orphansCountProgress = orphansCount.find('.count-in-progress');
		var deletingProgress = orphansCount.find('.delete-in-progress');
		var deletedOrphans = orphansCount.find('.deleted');
		var cleanOrphans = orphansCount.find('.clean-orphans');
		var noOrphans = orphansCount.find('.no_orphans');
		var orphansCheckLoader = orphansCount.find('.check_loader');

		deletedOrphans.hide();
		noOrphans.hide();
		orphansCountProgress.hide();
		orphansCountResults.hide();
		orphansCheckLoader.hide();

		orphansCount.show();

		orphansCheckCount.on('click', count_orphans);
		cleanOrphans.on('click', delete_orphans);

		var nonce = orphansCount.find('#wpml_orphan_comment_nonce').val();

		function resetDeletion() {
			deletingProgress.fadeOut();
			deleted = 0;
			deleting = 0;
		}

		function count_orphans() {
			if(!deleting) {
				orphansCheckCount.fadeOut();
				orphansCountProgress.fadeIn();
			}
			var data = {
				action    : 'wpml_count_orphans',
				_icl_nonce: nonce
			};

			$.post(
				ajaxurl, data, function (res) {
					orphansCountProgress.fadeOut();
					var orphansCountResult = res.success ? res.data : 0;
					orphansCheckLoader.fadeOut();
					orphansCountResults.find('.count').html(orphansCountResult);
					if (orphansCountResult > 0) {
						if (initial_orphans_count == 0) {
							initial_orphans_count = orphansCountResult;
							cleanOrphans.fadeIn();
						}
						noOrphans.fadeOut();
						orphansCountResults.fadeIn();

						if (deleting) {
							delete_orphans();
						} else {
							resetDeletion();
						}
					} else {
						resetDeletion();
						noOrphans.fadeIn();
						orphansCountResults.fadeOut();
						orphansCheckCount.fadeIn();
					}
				}
			);
		}

		function delete_orphans() {

			cleanOrphans.fadeOut();
			deletingProgress.fadeIn();
			deleting = true;

			deletedOrphans.fadeIn();

			var data = {
				'action'  : 'wpml_delete_orphans',
				'data'    : {how_many: Math.max(10, initial_orphans_count / 10)},
				_icl_nonce: nonce
			};
			$.post(
				ajaxurl, data, function (res) {
					var deletedComments = res.success ? res.data : 0;
					deleted += parseInt(deletedComments);
					deletedOrphans.html(deleted);
					count_orphans();
				}
			);
		}
	}
);

Youez - 2016 - github.com/yon3zu
LinuXploit