mlp/translate.php
/**
	 * Hooks into MultilingualPress to translate data when copying.
	 *
	 * @param  Array $data
	 *  array(
 	 *  'siteID'         => $remote_site_id,
 	 *  'title'          => $title,
 	 *  'slug'           => $slug,
 	 *  'tinyMCEContent' => $tmce_content,
 	 *  'content'        => $content,
 	 *	'excerpt'        => $excerpt,
 	 * )
	 * @param  Integer $main_site_id   Main site ID (Generally the English site)
	 * @param  Integer $post_id        Post ID.
	 * @param  Integer $remote_site_id Remote Site ID, used to get the language target.
	 *
	 * @return Array                 Modified array of data.
	 */
Hooks into MultilingualPress to translate data when copying.

@return Array                 Modified array of data.
Hooks into MultilingualPress to translate data when copying . @return Array Modified array of data .
public function translate_content_on_copy( $data, $main_site_id, $post_id, $remote_site_id ) {
		$site_language = mlp_get_blog_language( $data['siteID'] );
		$title         = $this->translate( $data['title']  , $site_language );
		$content       = $this->translate_content( $data['content'], $site_language );
		$excerpt       = $this->translate( $data['excerpt'], $site_language );
		$data['tinyMCEContent'] = $content;
		$data['title']          = $title;
		$data['content']        = $content;
		$data['excerpt']        = $excerpt;
		return $data;
	}
public function translate_content_on_copy ( $ data , $ main_site_id , $ post_id , $ remote_site_id ) { $ site_language = mlp_get_blog_language ( $ data [ 'siteID' ] ) ; $ title = $ this -> translate ( $ data [ 'title' ] , $ site_language ) ; $ content = $ this -> translate_content ( $ data [ 'content' ] , $ site_language ) ; $ excerpt = $ this -> translate ( $ data [ 'excerpt' ] , $ site_language ) ; $ data [ 'tinyMCEContent' ] = $ content ; $ data [ 'title' ] = $ title ; $ data [ 'content' ] = $ content ; $ data [ 'excerpt' ] = $ excerpt ; return $ data ; }
Hooks into MultilingualPress to translate data when copying.
Hooks into MultilingualPress to translate data when copying .