Class Disciple_Tools_Contacts Functions for creating, finding, updating or deleting contacts
| package |
Disciple_Tools\Posts\Groups |
|---|
__construct()
add_connection_to_post(\string $post_type, \int $post_id, \string $field_key, \int $value)
\string
\int
\string
\int
add_post_contact_method(array $post_settings, \int $post_id, \string $key, \string $value, array $field)
array
\int
\string
\string
array
add_shared_on_group(integer $post_id, integer $user_id, array $meta = null, boolean $send_notifications = true, boolean $check_permissions = true) : false|integer|\WP_Error
integer
integer
array
boolean
boolean
false|integer|\WP_Error
adjust_post_custom_fields(array $post_settings, integer $post_id, array &$fields, array $fields_to_return = array(), null $meta_fields = null, null $post_user_meta = null) : void
arrayThis is what get_custom_fields_settings() returns
integerThe ID number of the contact
arrayThis array will be mutated with the results
arrayif not empty only add the fields that are specified (optional)
nulla way to pass in the post's meta fields instead of getting in from the database (optional)
nullpass in the user post meta if already available (optional)
can_access(string $post_type) : boolean
string
boolean
can_create(string $post_type) : boolean
string
boolean
can_delete(string $post_type) : boolean
string
boolean
can_update(string $post_type, integer $post_id) : boolean
string
integer
boolean
can_view(string $post_type, integer $post_id) : boolean
string
integer
boolean
can_view_all(string $post_type) : boolean
string
boolean
check_for_invalid_post_fields(array $post_settings, array $fields, array $allowed_fields = array()) : array
array
array
array
array
check_requires_update( $group_id)
create_group(array $fields = array(), boolean|true $check_permissions = true) : integer
array, the new group's data
boolean|true
integer| WP_Error
create_post_field_hook( $fields, $post_type)
delete_comment(\int $group_id, \int $comment_id, \bool $check_permissions = true)
\int
\int
\bool
delete_post(\int $post_id, \string $post_type)
\int
\string
dt_comment_created( $post_type, $post_id, $comment_id, $type)
dt_get_post_fields_filter( $fields, $post_type)
dt_user_list_filters( $filters, $post_type)
filter_wp_post_object_fields(object $post) : array
object
array
format_post_contact_details( $post_settings, $meta_fields, $type, $key, $value)
get_activity(integer $group_id) : array|null|object|\WP_Error
integer
array|null|object|\WP_Error
get_all_groups_status_type()
get_comments(integer $group_id) : array|integer|\WP_Error
integer
array|integer|\WP_Error
get_group(integer $group_id, boolean $check_permissions = true, boolean $load_cache = false) : array|\WP_Error
integer
boolean
boolean
array|\WP_Error
get_group_default_filter_counts( $tab = "all", $show_closed = false)
get_label_for_post_type( $post_type, $singular = false)
get_most_recent_activity_for_field( $post_id, $field_key) : mixed
mixed
get_my_groups_status_type()
get_post_by_title_cached(string $title, string $output = OBJECT, string|array $post_type = 'page', $connection_type = 'none') : \WP_Post|null
| link |
Uncached Functions |
|---|
stringPage title
stringOptional. Output type; OBJECT*, ARRAY_N, or ARRAY_A.
string|arrayOptional. Post type; default is 'page'.
\WP_Post|nullWP_Post on success or null on failure
get_posts_shared_with_user(string $post_type, integer $user_id, $search_for_post_name = '') : array
string
integer
array
get_settings() : array|\WP_Error
array|\WP_Error
get_shared_with_on_group(integer $post_id) : array|mixed
integer
array|mixed
get_subassigned_users( $post_id)
get_viewable(string $post_type, integer $most_recent) : array|\WP_Error|\WP_Query
string
integer
array|\WP_Error|\WP_Query
get_viewable_groups(integer $most_recent) : array|\WP_Query
integer
array|\WP_Query
increment( &$var, $val)
is_post_key_contact_method_or_connection( $post_settings, $key)
post_connection_added( $post_type, $post_id, $field_key, $value)
post_connection_removed( $post_type, $post_id, $field_key, $value)
post_created_hook( $post_type, $post_id, $initial_fields)
post_updated_hook( $post_type, $post_id, $initial_fields)
remove_connection_from_post(\string $post_type, \int $post_id, \string $field_key, \int $value)
\string
\int
\string
\int
remove_shared_on_group(integer $post_id, integer $user_id) : false|integer|\WP_Error
integer
integer
false|integer|\WP_Error
search_viewable_groups(array $query, \bool $check_permissions = true)
array
\bool
search_viewable_post(\string $post_type, array $query, \bool $check_permissions = true)
\string
array
\bool
unique_hash()
update_comment(\int $group_id, \int $comment_id, \string $comment_content, \bool $check_permissions = true)
\int
\int
\string
\bool
update_connections(array $post_settings, \int $post_id, array $fields, $existing_contact = null)
array
\int
array
update_group(integer $group_id, array $fields, boolean $check_permissions = true) : integer
| access |
public |
|---|---|
| since | 0.1.0 |
integer, the post id for the group
array, the meta fields
boolean
integer| WP_Error of group ID
update_group_member_count( $group_id, $action = "added")
update_location_grid_fields(array $field_settings, \int $post_id, array $fields, $post_type, array $existing_post = null)
array
\int
array
array
update_multi_select_fields(array $field_settings, \int $post_id, array $fields, array $existing_contact = null)
array
\int
array
array
update_post_contact_method(\int $post_id, \string $key, array $values)
\int
\string
array
update_post_contact_methods(array $post_settings, \int $post_id, array $fields, array $existing_contact = null)
array
\int
array
array
update_post_field_hook( $fields, $post_type, $post_id)
address_types :
group_fields :
group_connection_types :
channel_list :
add_comment
Arguments
$group_id
integer$comment_html
string$type
string$args
array$check_permissions
boolean$silent
booleanResponse
false|integer|\WP_Error