These functions can be used to manipulate Venue data. These functions may be useful for integration with other WordPress plugins and extended functionality.
Table Of Contents
Create a Venue
tribe_create_venue(array $args)
$args accepts all the args that can be passed to wp_insert_post(). In addition to that, the following args can be passed specifically for the process of creating a Venue:
- Venue string – Title of the Venue. (required)
- Country string – Country code for the Venue country.
- Address string – Street address of the Venue.
- City string – City of the Venue.
- State string – Two letter state abbreviation.
- Province string – Province of the Venue.
- Zip string – Zip code of the Venue.
- Phone string – Phone number for the Venue.
Parameters
-
array
$args: Elements that make up post to insert.
Returns
- int
More Info
- return: ID of the Venue that was created. False if insert failed.
- see: wp_insert_post()
- link: http://codex.wordpress.org/Function_Reference/wp_insert_post
- since: 2.0.1
Delete a Venue
tribe_delete_venue(int $postId, [bool $force_delete = false])
Parameters
-
int
$postId: ID of the Venue to be deleted. -
bool
$force_delete: Whether to bypass trash and force deletion. Defaults to false.
Returns
- bool
More Info
- return: false if delete failed.
- see: wp_delete_post()
- link: http://codex.wordpress.org/Function_Reference/wp_delete_post
- since: 2.0.1
Update a Venue
tribe_update_venue(int $postId, array $args)
Parameters
-
int
$postId: ID of the Venue to be modified. -
array
$args: Args for updating the post. See tribe_create_venue() for more info.
Returns
- int
More Info
- return: ID of the Venue that was created. False if update failed.
- see: tribe_create_venue()
- see: wp_update_post()
- link: http://codex.wordpress.org/Function_Reference/wp_update_post
- since: 2.0.1
