HEX
Server: nginx/1.28.1
System: Linux iZgw8b5bpgd4jyptfmmmxgZ 6.6.102-5.2.alnx4.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 27 23:11:10 CST 2025 x86_64
User: www (1000)
PHP: 8.2.28
Disabled: 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
Upload Files
File: /www/wwwroot/www.scdc-marine.com/wp-content/plugins/Polylang-Pro/js/build/bulk-translate.js
var __webpack_exports__ = {};
/**
 * Bulk translate
 *
 * @package Polylang-Pro
 */

jQuery(
	function( $ ) {
		var t = this;

		$( '.editinline' ).on(
			'click',
			function(){
				$( '#pll-translate' ).find( '.cancel' ).trigger( 'click' ); // Close the form on quick edit
			}
		);

		$( '#doaction, #doaction2' ).on(
			'click',
			function( e ){
				t.whichBulkButtonId = $( this ).attr( 'id' );
				var n = t.whichBulkButtonId.substr( 2 );

				if ( 'pll_translate' === $( 'select[name="' + n + '"]' ).val() ) {
					e.preventDefault();

					if ( typeof inlineEditPost !== 'undefined' ) { // Not available for media.
						inlineEditPost.revert(); // Close Bulk edit and Quick edit if open.
					}

					$( '#pll-translate td' ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
					// The hidden tr allows to keep the background color.
					// HTML prepended is hardcoded. So prepend is safe and as no need to be escaped.
					$( 'table.widefat tbody' ).prepend( $( '#pll-translate' ) ).prepend( '<tr class="hidden"></tr>' ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
				} else {
					$( '#pll-translate' ).find( '.cancel' ).trigger( 'click' );
				}
			}
		);

		// Cancel
		$( '#pll-translate' ).on(
			'click',
			'.cancel',
			function(){
				// Close the form on any other bulk action
				$( '#pll-translate' ).siblings( '.hidden' ).remove();
				// #pll-translate is built and come from server side and is well escaped when necessary
				$( '#pll-bulk-translate' ).append( $( '#pll-translate' ) ); //phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append

				// Move focus back to the Bulk Action button that was activated.
				$( '#' + t.whichBulkButtonId ).trigger( 'focus' );
			}
		);

		// Act when pressing enter or esc
		$( '#pll-translate' ).on(
			'keydown',
			function( event ){
				if ( 'Enter' === event.key && ! $( event.target ).hasClass( 'cancel' ) ) {
					event.preventDefault();
					$( this ).find( 'input[type=submit]' ).trigger( 'click' );
				}
				if ( 'Escape' === event.key ) {
					event.preventDefault();
					$( this ).find( '.cancel' ).trigger( 'click' );
				}
			}
		);

		// Clean DOM in case of file download
		$( '#posts-filter' ).on(
			'submit',
			function() {
				$( '.settings-error' ).remove();
				setTimeout(
					function() {
						$( 'input[type=checkbox]:checked' ).attr( 'checked', false );
						$( '#pll-translate' ).find( '.cancel' ).trigger( 'click' );
					},
					500
				);
			}
		);
	}
);