PHP 클래스 Mlp_Advanced_Translator_Data

상속: implements Mlp_Advanced_Translator_Data_Interface, implements Mlp_Save_Post_Interface
파일 보기 프로젝트 열기: inpsyde/multilingual-press

공개 메소드들

메소드 설명
__construct ( $deprecated, Mlp_Translatable_Post_Data_Interface $basic_data, array $allowed_post_types, Inpsyde\MultilingualPress\API\SiteRelations $relations, Inpsyde\MultilingualPress\Factory\NonceFactory $nonce_factory )
get_id_base ( ) : string Base string for ID attribute in translation view.
get_name_base ( ) : string Base string for name attribute in translation view.
get_taxonomies ( WP_Post $post, integer $blog_id ) : array Wrapper for get_taxonomies_with_terms( $post ).
save ( integer $post_id, WP_Post $post ) : void Save the post to the blogs

비공개 메소드들

메소드 설명
copy_thumb ( integer $new_id, string $featured_image_path ) : boolean Copy the featured image.
create_post_to_send ( array $post_data, string $post_type, integer $blog_id ) : array Create the default post data for the save() method.
get_featured_image_path ( integer $post_id ) : string Fetch data of original featured image.
get_remote_post_content ( array $data ) : string Prepare the content for the post we want to synchronize.
get_remote_post_excerpt ( array $data ) : string Prepare the excerpt for the post we want to synchronize.
get_remote_post_name ( array $data ) : string Prepare the title for the post we want to synchronize.
get_remote_post_title ( array $data ) : string Prepare the title for the post we want to synchronize.
get_taxonomies_with_terms ( WP_Post $post ) : array Get all existing taxonomies for the given post, including existing terms.
is_auto_draft ( WP_Post $post, array $request ) : boolean Check for hidden auto-draft
is_connectable_status ( WP_Post $post ) : boolean Check post status.
is_empty_remote_post ( string $title, string $content, string $post_type ) : boolean Check if there actually is content in the translation. Prevents creation of emptytranslation drafts.
is_valid_save_request ( WP_Post $post ) : boolean Check if the current request should be processed by save().
set_active_terms ( array $terms, string $taxonomy, WP_Post $post ) : array Mark active terms for the post.
set_remote_tax_terms ( integer $new_id, array $tax_data ) : boolean Update terms for each taxonomy.
sync_post ( array $new_post, integer $post_id, integer $remote_blog_id, boolean $update ) : integer | WP_Error Insert the (updated) post.
taxonomy_is_mutually_exclusive ( string $taxonomy ) : boolean Checks if more than one term can be assigned to a taxonomy.

메소드 상세

__construct() 공개 메소드

public __construct ( $deprecated, Mlp_Translatable_Post_Data_Interface $basic_data, array $allowed_post_types, Inpsyde\MultilingualPress\API\SiteRelations $relations, Inpsyde\MultilingualPress\Factory\NonceFactory $nonce_factory )
$deprecated
$basic_data Mlp_Translatable_Post_Data_Interface
$allowed_post_types array
$relations Inpsyde\MultilingualPress\API\SiteRelations
$nonce_factory Inpsyde\MultilingualPress\Factory\NonceFactory Nonce factory object.

get_id_base() 공개 메소드

Base string for ID attribute in translation view.
public get_id_base ( ) : string
리턴 string

get_name_base() 공개 메소드

Base string for name attribute in translation view.
public get_name_base ( ) : string
리턴 string

get_taxonomies() 공개 메소드

Wraps the call into a blog switch.
public get_taxonomies ( WP_Post $post, integer $blog_id ) : array
$post WP_Post
$blog_id integer
리턴 array

save() 공개 메소드

Save the post to the blogs
public save ( integer $post_id, WP_Post $post ) : void
$post_id integer
$post WP_Post
리턴 void