wordpress/wp-content/themes/basic/themify/themify-builder/includes/plugin-compat/wpml.php
/**
	 * Load Builder content from original page when "Copy content" feature in WPML is used
	 *
	 * @access public
	 * @since 1.4.3
	 */
Load Builder content from original page when "Copy content" feature in WPML is used
@access public
@since 1.4.3
Load Builder content from original page when " Copy content " feature in WPML is used @access public @since 1 . 4 . 3
public static function icl_copy_from_original() {
		if ( isset( $_POST['source_page_id'],$_POST['source_page_lang'] )) {
			global $ThemifyBuilder, $wpdb;
			$post_id = $wpdb->get_var(
				$wpdb->prepare(
					"SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='%d' AND language_code='%s' LIMIT 1",
					$_POST[ 'source_page_id' ],
					$_POST[ 'source_page_lang' ]
				)
			);
			$post = ! empty( $post_id ) ? get_post( $post_id ) : null;
			if ( ! empty( $post ) ) {
				$builder_data = $ThemifyBuilder->get_builder_data( $post->ID );
				echo json_encode( $builder_data );
			} else {
				echo '-1';
			}
		}
		die;
	}
public static function icl_copy_from_original ( ) { if ( isset ( $ _POST [ 'source_page_id' ] , $ _POST [ 'source_page_lang' ] ) ) { global $ ThemifyBuilder , $ wpdb ; $ post_id = $ wpdb -> get_var ( $ wpdb -> prepare ( " SELECT element_id FROM  { $ wpdb -> prefix } icl_translations WHERE trid='%d' AND language_code='%s' LIMIT 1 " , $ _POST [ 'source_page_id' ] , $ _POST [ 'source_page_lang' ] ) ) ; $ post = ! empty ( $ post_id ) ? get_post ( $ post_id ) : null ; if ( ! empty ( $ post ) ) { $ builder_data = $ ThemifyBuilder -> get_builder_data ( $ post -> ID ) ; echo json_encode ( $ builder_data ) ; } else { echo '-1' ; } } die ; }
Load Builder content from original page when "Copy content" feature in WPML is used
 @access public
 @since 1.4.3
Load Builder content from original page when " Copy content " feature in WPML is used @access public @since 1 . 4 . 3