PHP Class Mlp_Advanced_Translator_View

Data model for post translation. Handles inserts of new posts only.
Author: Inpsyde GmbH, toscho
Datei anzeigen Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( Mlp_Advanced_Translator_Data_Interface $data ) Constructor.
blog_id_input ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
show_copy_button ( string $editor_id, integer $remote_site_id ) : void Add a button next to the media button to copy the source post.
show_editor ( WP_Post $source_post, integer $remote_blog_id, WP_Post $remote_post ) : void
show_excerpt ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
show_name ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
show_taxonomies ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
show_thumbnail_checkbox ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
show_title ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
show_trashed_message ( ) : void Shows a warning message in the metabox that the remote post is trashed.

Private Methods

Method Description
get_id ( integer $blog_id, string $name ) : string Get the value for the id attribute.
get_name ( integer $blog_id, string $name ) : string Get the value for the name attribute.
get_placeholder_title ( WP_Post $post ) : string | void Get placeholder attribute text.
list_terms ( string $taxonomy, array $data, integer $remote_blog_id, string $input_type ) : void List terms which are mutually exclusive, like post formats.
term_box ( string $title, string $html ) : void Container HTML for term selection.

Method Details

__construct() public method

Constructor.
public __construct ( Mlp_Advanced_Translator_Data_Interface $data )
$data Mlp_Advanced_Translator_Data_Interface

blog_id_input() public method

public blog_id_input ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
$source_post WP_Post
$remote_blog_id integer
$post WP_Post
return void

show_copy_button() public method

Add a button next to the media button to copy the source post.
public show_copy_button ( string $editor_id, integer $remote_site_id ) : void
$editor_id string tinyMCE editor ID.
$remote_site_id integer Remote site ID.
return void

show_editor() public method

public show_editor ( WP_Post $source_post, integer $remote_blog_id, WP_Post $remote_post ) : void
$source_post WP_Post
$remote_blog_id integer
$remote_post WP_Post
return void

show_excerpt() public method

public show_excerpt ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
$source_post WP_Post
$remote_blog_id integer
$post WP_Post Remote post
return void

show_name() public method

public show_name ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
$source_post WP_Post
$remote_blog_id integer
$post WP_Post Remote post
return void

show_taxonomies() public method

public show_taxonomies ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
$source_post WP_Post
$remote_blog_id integer
$post WP_Post
return void

show_thumbnail_checkbox() public method

public show_thumbnail_checkbox ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
$source_post WP_Post
$remote_blog_id integer
$post WP_Post
return void

show_title() public method

public show_title ( WP_Post $source_post, integer $remote_blog_id, WP_Post $post ) : void
$source_post WP_Post
$remote_blog_id integer
$post WP_Post Remote post
return void

show_trashed_message() public method

Shows a warning message in the metabox that the remote post is trashed.
public show_trashed_message ( ) : void
return void