public
|
get_post_mapping(int $post_id): array|bool
Get the mapping for a particular Wordpress post
Get the mapping for a particular Wordpress post
Deprecated
Use get_full_post_mapping instead.
Parameters
| $post_id |
The WP post ID to look up.
|
Returns
An array of the basic mapping details. False if no mapping.
|
#
|
public
|
get_full_post_mapping(int $post_id): object|null
Get the full mapping record for a particular Wordpress post.
Get the full mapping record for a particular Wordpress post.
Parameters
| $post_id |
The WP post ID to look up.
|
Returns
A full mapping record, or null if no mapping.
|
#
|
public
|
update_post_mapping(int $post_id, string $endpoint, int $remote_id): bool
Change which CH record a WP post is mapped to. Replaces any existing mapping.
Change which CH record a WP post is mapped to. Replaces any existing mapping.
Parameters
| $post_id |
The Wordpress post ID
|
| $endpoint |
The CultureHosts record type, e.g. events
|
| $remote_id |
The CultureHosts record ID
|
Returns
|
#
|
public
|
delete_post_mapping(int $post_id): bool
Delete an existing mapping.
Delete an existing mapping.
Parameters
| $post_id |
The Wordpress post ID
|
Returns
|
#
|
public
|
get_mapped_post(string $endpoint, int $remote_id): WP_Post|null
Get the WP post mapped to a remote record.
Get the WP post mapped to a remote record.
Parameters
| $endpoint |
The CultureHosts record type, e.g. events
|
| $remote_id |
The CultureHosts record ID
|
Returns
The post object, or false on failure.
|
#
|