HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/ridesyre/public/wp-content/plugins/polylang/integrations/custom-field-template/cft.php
<?php
/**
 * @package Polylang
 */

/**
 * Manages the compatibility with Custom Field Template.
 *
 * @since 2.8
 */
class PLL_Cft {
	/**
	 * Setups actions.
	 *
	 * @since 2.8
	 */
	public function init() {
		add_action( 'add_meta_boxes', array( $this, 'cft_copy' ), 10, 2 );
	}

	/**
	 * Custom field template does check $_REQUEST['post'] to populate the custom fields values.
	 *
	 * @since 1.0.2
	 *
	 * @param string  $post_type Unused.
	 * @param WP_Post $post      Current post object.
	 */
	public function cft_copy( $post_type, $post ) {
		global $custom_field_template;
		if ( isset( $custom_field_template, $_REQUEST['from_post'], $_REQUEST['new_lang'] ) && ! empty( $post ) ) { // phpcs:ignore WordPress.Security.NonceVerification
			$_REQUEST['post'] = $post->ID;
		}
	}
}