The Groups API provides the following filters.
groups_access_meta_boxes_groups
Filter the output of the read groups box.
Parameters
$output string$object object$box object
Files
- lib/access/class-groups-access-meta-boxes.php
groups_access_meta_boxes_groups_after_read_groups
Filter the output after the read groups box.
Parameters
$result string– defaults to ”$object object$box object
Files
- lib/access/class-groups-access-meta-boxes.php
groups_access_meta_boxes_groups_before_read_groups
Filter the output before the read groups box.
Parameters
$result string– defaults to ”$object object$box object
Files
- lib/access/class-groups-access-meta-boxes.php
groups_access_meta_boxes_groups_get_groups_options
Filter the options used to obtain available groups shown in the read groups box.
Parameters
$result array$object object$box object
Files
- lib/access/class-groups-access-meta-boxes.php
groups_access_meta_boxes_user_can_restrict_group_ids
Filter the group IDs that the user can use to restrict access.
Parameters
$group_ids int[]$user_id int
Files
- lib/access/class-groups-access-meta-boxes.php
groups_access_restrictions_capability_selected
Filter if capability is selected.
Parameters
$result boolean$capability string$capability_id string|int$read_caps mixed$post_id sintrg|int$post_type string
Files
- legacy/access/class-groups-access-meta-boxes-legacy.php
groups_add_menu_page_function
Determines the function that outputs the Groups menu page.
Parameters
$result string– function name
Files
- lib/admin/class-groups-admin.php
groups_add_submenu_page_function
Invoked when a Groups submenu page is added, determines the function that renders the submenu page.
Parameters
$result string– function name
Files
- lib/admin/class-groups-admin.php
groups_admin_groups_add_form_after_fields
Relates to the admin screen that allows to add a group.
This filter allows to add HTML within the form presented to add a group. The filter receives an empty string by default and is expected to return desired additional valid HTML. Use this filter for additional fields that should be processed upon form submission. Use the groups_admin_groups_add_submit_success action to process the additional data.
Parameters
$result string– additional valid HTML to be rendered within the form, default: ”
Files
- lib/admin/groups-admin-groups-add.php
groups_admin_groups_bulk_actions_fields_epilogue
Allows to add markup after the standard bulk actions fields of the groups table.
Parameters
$result string– additional markup
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_bulk_actions_html
Allows to process the HTML of the bulk actions section of the groups table.
Parameters
$result string– markup
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_column_content
Provide the row’s output for the column identified by $key for the group given by its ID.
Parameters
$content string– column content$key string– the column key$group_id int– the group’s ID
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_columns
Allows to modify the columns of the groups table.
Parameters
$columns array– maps column keys to column details; keys must be alphanumeric allowing also for underscores ‘_’ and dashes ‘-‘, columns with invalid keys are removed; ‘checkbox’ is a reserved column key and must not be used
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_edit_form_after_fields
Relates to the admin screen that allows to edit a group.
Allows to add HTML within the form used to edit a group. The filter receives an empty string and is expected to return desired additional HTML. Use this filter to for additional fields that should be processed upon form submission. Use the groups_admin_groups_edit_submit_success action to process the additional data.
Parameters
$result string– additional valid HTML to be rendered within the form, default: ”$group_id int– the ID of the group
Files
- lib/admin/groups-admin-groups-edit.php
groups_admin_groups_filters_fields_epilogue
Allows to add markup after the standard filter fields of the groups table.
Parameters
$markup string– additional markup
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_filters_html
Allows to process the HTML of the filters section of the groups table.
Parameters
$filters_html string– markup
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_handle_action_submit
Handle a requested action after $_POST.
Parameters
$handle boolean– whether to handle the posted action$action string– the requested action
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_query
Allows to modify the query for the groups table.
Parameters
$query string– the query
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_results
Allows to modify the results for the groups table.
Parameters
$results object[]– result to show
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_row_actions
Allows to alter the row actions for a group in the groups table.
Parameters
$row_actions array– row actions as HTML$group_id int– ID of the group
Files
- lib/admin/groups-admin-groups.php
groups_admin_groups_row_actions_html
Allows to process the HTML of the row actions for a group in the groups table.
Parameters
$row_actions_html string– markup$group_id int– ID of the group
Files
- lib/admin/groups-admin-groups.php
groups_admin_posts_restrict_manage_posts_get_groups
Filter groups used to filter access restrictions.
Parameters
$result array
Files
- lib/admin/class-groups-admin-posts.php
groups_admin_posts_restrict_manage_posts_get_groups_options
Filter options used to get groups used to filter access restrictions.
Parameters
$result array
Files
- lib/admin/class-groups-admin-posts.php
groups_admin_user_profile_edit_user_profile_groups
Allow to filter the groups offered.
Parameters
$groups array$user_id int
Files
- lib/admin/class-groups-admin-user-profile.php
groups_admin_user_profile_edit_user_profile_update_groups
Filter groups provided during user profile update.
Parameters
$result array|null$user_id int
Files
- lib/admin/class-groups-admin-user-profile.php
groups_admin_user_profile_user_new_form_groups
Allow to filter the groups.
Parameters
$groups array$type string– form context
Files
- lib/admin/class-groups-admin-user-profile.php
groups_admin_user_profile_user_register_groups
Allow to filter the groups offered.
Parameters
$groups array$user_id int
Files
- lib/admin/class-groups-admin-user-profile.php
groups_admin_users_restrict_manage_users_groups
Filter groups provided to filter.
Parameters
$result array|null
Files
- lib/admin/class-groups-admin-users.php
groups_admin_users_views_users_counts
Filter user counts per group.
Parameters
$result array|null
Files
- lib/admin/class-groups-admin-users.php
groups_admin_users_views_users_groups
Filter available groups.
Parameters
$result array
Files
- lib/admin/class-groups-admin-users.php
groups_cache_delete_lock_timeout
Filter the delete lock timeout.
Parameters
$result int– lock timeout$key string$group string
Files
- lib/core/class-groups-cache.php
groups_cache_extend_key_suffix
Apply suffix to extended key.
Parameters
$suffix string$key string$flags int
Files
- lib/core/class-groups-cache.php
groups_cache_get_lock_timeout
Filter the lock timeout.
Parameters
$result int– lock timeout$key string$group string
Files
- lib/core/class-groups-cache.php
groups_cache_group_suffix
Apply suffix to extended group.
Parameters
$suffix string$group string$flags int
Files
- lib/core/class-groups-cache.php
groups_cache_robot_comment_groups
Filter comment groups.
Parameters
$groups string[]
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_flush_all
Add all groups to flush?
Parameters
$apply boolean$action string$args array|Traversable
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_flush_comment
Add comment groups to flush?
Parameters
$apply boolean$action string$args array|Traversable
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_flush_groups
Filter groups to flush.
Parameters
$groups string[]
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_flush_post
Add post groups to flush?
Parameters
$apply boolean$action string$args array|Traversable
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_flush_term
Add term groups to flush?
Parameters
$apply boolean$action string$args array|Traversable
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_flush_user
Add user groups to flush?
Parameters
$apply boolean$action string$args array|Traversable
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_post_groups
Filter post groups.
Parameters
$groups string[]
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_term_groups
Filter term groups.
Parameters
$groups string[]
Files
- lib/core/class-groups-cache-robot.php
groups_cache_robot_user_groups
Filter user groups.
Parameters
$groups string[]
Files
- lib/core/class-groups-cache-robot.php
groups_cache_set_expires
Filter when cache entry expires.
Parameters
$expires int|null$key string$value mixed$group string
Files
- lib/core/class-groups-cache.php
groups_cache_set_expires_indefinite
Indefinite value.
Parameters
$value int
Files
- lib/core/class-groups-cache.php
groups_cache_set_lock_timeout
Filter setting the lock timeout.
Parameters
$result int– lock timeout$key string$group string
Files
- lib/core/class-groups-cache.php
groups_capability_lock_timeout
Filter the lock timeout.
Parameters
$result int– lock timeout
Files
- lib/core/class-groups-capability.php
groups_comment_access_comment_count_where
Filter the comment count where clause.
Parameters
$where string$post_id int
Files
- lib/access/class-groups-comment-access.php
groups_comment_access_comment_feed_where_apply
Whether to apply the comment feed where clause filter.
Parameters
$result boolean– whether to filter the where clause$where string– the where clause$query WP_Query– the query
Files
- lib/access/class-groups-comment-access.php
groups_comment_access_comments_array_apply
Whether to filter the comments array.
Parameters
$result boolean– whether to filter$comments array– the comments$post_id int– the post ID
Files
- lib/access/class-groups-comment-access.php
groups_comment_access_comments_clauses_apply
Whether to apply the comment clauses filter.
Parameters
$result boolean– whether to filter$pieces array– the clauses$comment_query WP_Comment_Query– the comment query
Files
- lib/access/class-groups-comment-access.php
groups_comment_access_the_comments_apply
Whether to filter the comments.
Parameters
$result boolean– whether to filter$comments array– the comments$comment_query WP_Comment_Query– the comment query
Files
- lib/access/class-groups-comment-access.php
groups_comment_access_wp_count_comments_apply
Whether to filter the comment counts.
Parameters
$result boolean– whether to filter$count array$post_id int
Files
- lib/access/class-groups-comment-access.php
groups_filter_the_posts
Whether Groups should apply its the_posts filter. By default, the filter is not applied.
Parameters
$result boolean– whether to apply Groups’ the_posts filter
Files
- legacy/access/class-groups-post-access-legacy.php
- lib/access/class-groups-post-access.php
groups_footer
Determines the footer content.
Parameters
$footer string– content
Files
- lib/core/class-groups-help.php
groups_get_table_prefix
Filters the prefix of the database table to query.
This filters the prefix of database tables used by Groups. The current WordPress table prefix is used by default. Allowed characters used as the prefix are the characters a-z, A-Z, 0-9 the dash – character and the underscore _ character. The potential application for this particular filter is e.g. to concentrate all database queries related to Groups’ tables on a single database within the context of a WordPress multisite environment. This would allow to use shared data across its sites.
Parameters
$prefix string– the table prefix to use
Files
- lib/core/wp-init.php
groups_group_can
Filter whether the group has the capability.
Parameters
$result boolean– current evaluation result, true if the group has the capability, false otherwise$group Groups_Group– the group object$capability string– the capability ID or name that is queried for the group$object mixed$args mixed
Files
- lib/core/class-groups-group.php
groups_group_lock_timeout
Filter the lock timeout.
Parameters
$result int– lock timeout
Files
- lib/core/class-groups-group.php
groups_group_read_by_name_max_map
Maximum number of map entries.
Parameters
$result int
Files
- lib/core/class-groups-group.php
groups_group_read_max_map
Maximum number of map entries read.
Parameters
$result int
Files
- lib/core/class-groups-group.php
groups_join_submit_max_time_delta
Maximum time delta for submit validation.
Parameters
$result int
Files
- lib/views/class-groups-shortcodes.php
groups_join_submit_redirect
Whether to redirect after submit and successful addition to group.
Parameters
$redirect boolean|string– true to redirect to current ULR, string to redirect to specific URL, false not to redirect$atts array– shortcode attributes$options array– evaluated shortcode options
Files
- lib/views/class-groups-shortcodes.php
groups_leave_submit_max_time_delta
Maximum time delta for submit.
Parameters
$result int
Files
- lib/views/class-groups-shortcodes.php
groups_leave_submit_redirect
Whether to redirect after acceptedsubmit and successful removal from group.
Parameters
$redirect boolean|string– true to redirect to current ULR, string to redirect to specific URL, false not to redirect$atts array– shortcode attributes$options array– evaluated shortcode options
Files
- lib/views/class-groups-shortcodes.php
groups_lock_path
Modify the lock file path.
Parameters
$path string$name string$blog_id int
Files
- lib/core/class-groups-lock.php
groups_lock_sleep
Modify the lock sleep gap (microseconds).
Parameters
$sleep int$name string$blog_id int
Files
- lib/core/class-groups-lock.php
groups_lock_timeout
Modify the lock timeout (microseconds).
Parameters
$timeout int$name string$blog_id int
Files
- lib/core/class-groups-lock.php
groups_post_access_filter_block_core_navigation_render_inner_blocks
Whether to filter the inner blocks.
Parameters
$filter boolean– whether to filter$inner_blocks \WP_Block_List– the inner blocks
Files
- lib/access/class-groups-post-access.php
groups_post_access_filter_get_terms
Whether to filter get_terms.
Parameters
$filter boolean– whether to filter$terms array$taxonomies array|null$query_vars array$term_query \WP_Term_Query
Files
- lib/access/class-groups-post-access.php
groups_post_access_filter_pre_render_block
Whether to process this block pre rendering.
Parameters
$filter boolean– whether to filter$pre_render string– block content$parsed_block array– the parsed block$parent_block \WP_Block– the parent block
Files
- lib/access/class-groups-post-access.php
groups_post_access_filter_render_block
Whether to process this block.
Parameters
$filter boolean– whether to filter the block$block_content string– the block’s content$parsed_block array– the parsed block$block \WP_Block– the block
Files
- lib/access/class-groups-post-access.php
groups_post_access_filter_widget_categories_args
Whether to filter get_terms.
Parameters
$filter boolean– whether to filter$cat_args array– category parameters$instance array– instance details
Files
- lib/access/class-groups-post-access.php
groups_post_access_filter_widget_categories_dropdown_args
Whether to filter get_terms.
Parameters
$filter boolean– whether to filter$cat_args array– category parameters$instance array– instance details
Files
- lib/access/class-groups-post-access.php
groups_post_access_get_pages_apply
Whether to apply the get_pages filter.
Parameters
$result boolean– whether to filter$pages array– the pages
Files
- lib/access/class-groups-post-access.php
groups_post_access_get_the_excerpt_apply
Whether to filter the excerpt.
Parameters
$result boolean– whether to filter$output string– the content
Files
- lib/access/class-groups-post-access.php
groups_post_access_posts_where
Allow to modify the where clause.
Parameters
$where string$query WP_Query
Files
- lib/access/class-groups-post-access.php
groups_post_access_posts_where_apply
Whether to apply the posts_where filter.
Parameters
$result boolean– whether to filter$where string– the where conditions$query WP_Query– the query
Files
- lib/access/class-groups-post-access.php
groups_post_access_posts_where_filter_all
Whether to filter for all post types.
Parameters
$result boolean– whether to filter
Files
- lib/access/class-groups-post-access.php
groups_post_access_posts_where_query_get_post_types
The post types considered for evaluation.
Parameters
$post_types string[]|string– the post type(s)$where string– the where conditions$query WP_Query– the query
Files
- lib/access/class-groups-post-access.php
groups_post_access_the_content_apply
Whether to apply the the_content filter.
Parameters
$result boolean– whether to filter$output string– the content
Files
- lib/access/class-groups-post-access.php
groups_post_access_the_posts_apply
Whether to apply the the_posts filter.
Parameters
$result boolean– whether to filter$posts array– the posts$query WP_Query– the query
Files
- lib/access/class-groups-post-access.php
groups_post_access_user_can_read_post
This filter allows to override the Groups’ verdict on whether a user can access a post.
Parameters
$result boolean– whether the user can access the post$post_id int– the post ID$user_id int– the user ID
Files
- legacy/access/class-groups-post-access-legacy.php
- lib/access/class-groups-post-access.php
groups_post_access_wp_get_nav_menu_items_apply
Whether to filter menu items.
Parameters
$result boolean– whether to filter$items array– menu items$menu mixed– the menu$args array
Files
- lib/access/class-groups-post-access.php
groups_shortcodes_is_processing
Whether processing shortcode tag.
Parameters
$result boolean– whether shortcode tag is being processed$tag string– shortcode$atts array– attributes
Files
- lib/views/class-groups-shortcodes.php
groups_shortcodes_preprocess_blocks
Filter the blocks to preprocess.
Parameters
$result string[]– blocks to process
Files
- lib/views/class-groups-shortcodes.php
groups_shortcodes_validate
Allow to filter final validation result.
Parameters
$valid boolean– whether shortcode validates$tag string– shortcode tag$atts array– shortcode attributes$content string– shortcode content
Files
- lib/views/class-groups-shortcodes.php
groups_shortcodes_validate_contents
Allow to filter the contents considered for shortcode validation.
Parameters
$contents string– contents considered$tag string– shortcode tag$atts array– shortcode attributes$content string– shortcode content
Files
- lib/views/class-groups-shortcodes.php
groups_shortcodes_widget_display_callback_widget_content
Allow widgets to provide content that should be checked during shortcode validation.
Parameters
$content string|null– widget content to check for shortcodes$instance array– widget instance settings$widget WP_Widget– widget object$args array– widget arguments
Files
- lib/views/class-groups-shortcodes.php
groups_uie_render_select_display_limit
Allows to determine the maximum number of options displayed in the dropdown.
Provide a number > 0, or null for no limit. Defaults to null for unlimited options displayed. This limits the number of options that are displayed, but not the total available options.
Parameters
$max_options int|null
Files
- lib/views/class-groups-uie.php
groups_uie_which_select
Allow to filter the select to use.
Parameters
$select string– which select
Files
- lib/views/class-groups-uie.php
groups_user_add_role_capabilities
This filter allows to reduce the capabilities that are taken into account when evaluation the user capability set during cache initialization.
By default, capabilities that are assigned to the user’s role(s) are added. If false is returned for this filter, they are not added.
Parameters
$result boolean– defaults to true, indicating that the user’s role(s) capabilities should also be added to its capability set
Files
- lib/core/class-groups-user.php
groups_user_can
Filter whether the user has the capability.
Provides the current in $result: true if the user has the capability, false otherwise.
Parameters
$result boolean– whether the user has the capability$group_user Groups_User– the Groups_User object$capability string– the capability ID or name$object mixed$args mixed
Files
- lib/core/class-groups-user.php
groups_user_has_cap
Allows to filter the capabilities mapping for the user.
Parameters
$allcaps array– capability names mapped to boolean values$caps array– required primitive capabilities for the requested capability$args array– requested capability data$user WP_User– the user
Files
- lib/wp/class-groups-wordpress.php
groups_user_is_member
Allow to modify the result of whether the user belongs to a given group.
Parameters
$result boolean– whether the user belongs to the group$object Groups_User– this object$group_id int– the group ID
Files
- lib/core/class-groups-user.php
groups_welcome_show
Whether to show the welcome.
Parameters
$result boolean
Files
- lib/admin/class-groups-admin-welcome.php
plugin_locale
Filter the plugin locale.
Parameters
$locale string$domain string
Files
- lib/core/class-groups-controller.php
