PHP Interface Inpsyde\MultilingualPress\Widget\Dashboard\UntranslatedPosts\PostRepository

Since: 3.0.0
Show file Open project: inpsyde/multilingual-press Interface Usage Examples

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.

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.