PHP Interface Mlp_Language_Api_Interface

Author: Inpsyde GmbH, toscho
Show file Open project: inpsyde/multilingual-press Interface Usage Examples

Public Methods

Method Description
get_translations ( array $args = [] ) : Inpsyde\MultilingualPress\Common\Type\Translation[] Ask for specific translations with arguments.

Method Details

get_translations() public method

Possible arguments are: - 'site_id' Base site - 'content_id' post or term_taxonomy ID, *not* term ID - 'type' see Mlp_Language_Api::get_request_type(), - 'strict' When TRUE only matching exact translations will be included - 'search_term' if you want to translate a search - 'post_type' for post type archives - 'include_base' bool. Include the base site in returned list
public get_translations ( array $args = [] ) : Inpsyde\MultilingualPress\Common\Type\Translation[]
$args array Optional. If left out, some magic happens.
return Inpsyde\MultilingualPress\Common\Type\Translation[] Array of Mlp_Translation instances, site IDs are the keys