Class Theater_Event_Date_Link
Maintains the link between events and event dates.
Methods summary
public static
|
#
init( )
Adds the action hooks that maintain the link between events and event dates.
Adds the action hooks that maintain the link between events and event dates.
Since
0.16
|
public static
|
#
delete_dates( integer $post_id )
Delete all connected dates of an event.
Delete all connected dates of an event.
Whenever an event is deleted (not just trashed), make sure that all connected dates are deleted as well.
Dates that are already in the trash are left alone.
Parameters
- $post_id
- The ID of the trashed event.
Since
0.7
0.12 Added support for events with an 'auto-draft' post_status.
|
public static
|
|
public static
|
#
sync_categories( integer $object_id, array $terms, array $tt_ids, string $taxonomy, boolean $append, array $old_tt_ids )
Overwrites the categories of an event date with the categories of the event.
Overwrites the categories of an event date with the categories of the event.
Triggered if the categories of an event are set. Walks through all connected dates and
overwrites the categories of the dates with the categories of the event.
Parameters
- $object_id
- Object ID.
- $terms
- An array of object terms.
- $tt_ids
- An array of term taxonomy IDs.
- $taxonomy
- Taxonomy slug.
- $append
- Whether to append new terms to the old terms.
- $old_tt_ids
- Old array of term taxonomy IDs.
Since
0.?
|
public static
|
#
sync_season( null|boolean $meta_id, integer $object_id, string $meta_key, mixed $meta_value, mixed $prev_value,… )
Updates the season of event dates to the season of the parent event.
Updates the season of event dates to the season of the parent event.
Triggered by the updated_post_meta action.
Used when:
- an event is saved through the admin screen or
- an event date is attached to an event.
Parameters
- $meta_id
- $check Whether to allow updating metadata for the given type.
- $object_id
- Object ID.
- $meta_key
- Meta key.
- $meta_value
- Meta value. Must be serializable if non-scalar.
- $prev_value,…
Optional. If specified, only update existing
metadata entries with the specified value.
Otherwise, update all entries.
Since
0.7
|
public static
|
#
trash_dates( integer $post_id )
Trash all connected dates of an event.
Trash all connected dates of an event.
Whenever an event is trashed (not deleted), make sure that all connected dates are trashed as well.
Parameters
- $post_id
- The ID of the trashed event.
Since
0.7
|
public static
|
#
untrash_dates( integer $post_id )
Untrash all connected dates of an event.
Untrash all connected dates of an event.
Whenever an event is untrashed, make sure that all connected dates are untrashed as well.
Parameters
- $post_id
- The ID of the trashed event.
Since
0.7
|