| Server IP : 213.186.33.4 / Your IP : 216.73.216.146 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www/wp-content/plugins/polylang/integrations/custom-field-template/ |
Upload File : |
<?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;
}
}
}