HEX
Server: Apache/2
System: Linux server1c 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64
User: swtinter (1023)
PHP: 8.2.23
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/swtinter/domains/swtintertrade.net/public_html/wp-content/plugins/polylang/js/build/admin.js
/******/ "use strict";

;// ./js/src/lib/ajax-filter/index.js
/**
 * @package Polylang
 */

/**
 * Adds data to all ajax requests made with jQuery.
 *
 * @since 3.7
 *
 * @param {Object} data The data to add.
 * @returns {void}
 */
function ajaxFilter( data ) {
	if ( 'undefined' === typeof jQuery || ! data ) {
		return;
	}

	jQuery(
		function ( $ ) {
			const dataStr = $.param( data );

			$.ajaxPrefilter( function ( options ) {
				if ( -1 === options.url.indexOf( ajaxurl ) && -1 === ajaxurl.indexOf( options.url ) ) {
					return;
				}

				if (
					'undefined' === typeof options.data ||
					null === options.data ||
					'string' === typeof options.data && '' === options.data.trim()
				) {
					// An empty string or null/undefined.
					options.data = dataStr;
				} else if ( 'string' === typeof options.data ) {
					// A non-empty string: can be a JSON string or a query string.
					try {
						options.data = JSON.stringify( Object.assign( JSON.parse( options.data ), data ) );
					} catch ( exception ) {
						// A non-empty non-JSON string is considered a query string.
						options.data = `${ options.data }&${ dataStr }`;
					}
				} else if ( $.isPlainObject( options.data ) ) {
					// An object.
					options.data = Object.assign( options.data, data );
				}
			} );
		}
	);
}

;// ./js/src/admin.js
/**
 * @package Polylang
 */



ajaxFilter( pll_admin?.ajax_filter );