PHP Class Mlp_Term_Connector

Author: Inpsyde GmbH, toscho, tf
Mostra file Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( Inpsyde\MultilingualPress\API\ContentRelations $content_relations, Inpsyde\MultilingualPress\Common\Nonce\Nonce $nonce, array $taxonomies, array $post_data ) Constructor. Set up the properties.
change_term_relationships ( integer $term_id, integer $term_taxonomy_id, string $taxonomy ) : boolean Handle term changes.
create_term ( integer $term_taxonomy_id ) : boolean Handle term creation.
delete_term ( integer $term_taxonomy_id ) : boolean Handle term deletion.
edit_term ( integer $term_taxonomy_id ) : boolean Handle term edits.

Private Methods

Method Description
update_terms ( array $existing, integer $source_term_taxonomy_id, integer $target_site_id, integer $target_term_taxonomy_id ) : boolean

Method Details

__construct() public method

Constructor. Set up the properties.
public __construct ( Inpsyde\MultilingualPress\API\ContentRelations $content_relations, Inpsyde\MultilingualPress\Common\Nonce\Nonce $nonce, array $taxonomies, array $post_data )
$content_relations Inpsyde\MultilingualPress\API\ContentRelations Content relations object.
$nonce Inpsyde\MultilingualPress\Common\Nonce\Nonce Nonce object.
$taxonomies array Taxonomy names.
$post_data array Post data.

change_term_relationships() public method

Handle term changes.
public change_term_relationships ( integer $term_id, integer $term_taxonomy_id, string $taxonomy ) : boolean
$term_id integer Term ID. Not used.
$term_taxonomy_id integer Term taxonomy ID.
$taxonomy string Taxonomy slug.
return boolean

create_term() public method

Handle term creation.
public create_term ( integer $term_taxonomy_id ) : boolean
$term_taxonomy_id integer Term taxonomy ID.
return boolean

delete_term() public method

Handle term deletion.
public delete_term ( integer $term_taxonomy_id ) : boolean
$term_taxonomy_id integer Term taxonomy ID.
return boolean

edit_term() public method

Handle term edits.
public edit_term ( integer $term_taxonomy_id ) : boolean
$term_taxonomy_id integer Term taxonomy ID.
return boolean