Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Gets all tags currently applied to the user, also update the list of available tags
- *
- * @access public
- * @return array Tags
- */
- public function get_tags( $contact_id ) {
- $this->connect();
- $result = $this->app->api( 'contact/view?id=' . $contact_id );
- return $result->tags;
- }
- /**
- * Applies tags to a contact
- *
- * @access public
- * @return bool
- */
- public function apply_tags( $tags, $contact_id ) {
- $this->connect();
- $result = $this->app->api(
- 'contact/tag_add', array(
- 'id' => $contact_id,
- 'tags' => $tags,
- )
- );
- return true;
- }
- /**
- * Removes tags from a contact
- *
- * @access public
- * @return bool
- */
- public function remove_tags( $tags, $contact_id ) {
- $this->connect();
- $result = $this->app->api(
- 'contact/tag_remove', array(
- 'id' => $contact_id,
- 'tags' => $tags,
- )
- );
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement