PHP Class Inpsyde\MultilingualPress\Widget\Dashboard\UntranslatedPosts\TypeSafePostRepository

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Widget\Dashboard\UntranslatedPosts\PostRepository
Show file Open project: inpsyde/multilingual-press

Public Methods

Method Description
get_untranslated_posts ( ) : WP_Pos\WP_Post[] Returns all untranslated posts for the current site.
is_post_translated ( integer $post_id ) : boolean Checks if the post with the given ID has been translated.
update_post ( integer $post_id, boolean $value ) : boolean Updates the translation complete setting value for the post with the given ID.

Private Methods

Method Description
update_deprecated_post_meta ( integer $post_id ) : void Updates the meta value for the given post (i.e., deletes the deprecated key and uses the correct one).

Method Details

get_untranslated_posts() public method

Returns all untranslated posts for the current site.
Since: 3.0.0
public get_untranslated_posts ( ) : WP_Pos\WP_Post[]
return WP_Pos\WP_Post[] All untranslated posts for the current site.

is_post_translated() public method

Checks if the post with the given ID has been translated.
Since: 3.0.0
public is_post_translated ( integer $post_id ) : boolean
$post_id integer Optional. Post ID. Defaults to 0.
return boolean Whether or not the post with the given ID has been translated.

update_post() public method

Updates the translation complete setting value for the post with the given ID.
Since: 3.0.0
public update_post ( integer $post_id, boolean $value ) : boolean
$post_id integer Post ID.
$value boolean Setting value to be set.
return boolean Whether or not the translation complete setting value was updated successfully.