Groups 4.9.0 has 34 actions and 97 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Groups fires an action
add_action( 'groups_access_meta_boxes_after_groups_read_update', function( $post_id, $group_ids, $update_result ) {
// Your code runs here.
}, 10, 3 );
// Change a value Groups is about to use
add_filter( 'groups_add_submenu_page_function', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Fires after the post access group IDs were updated for the post. */ do_action( 'groups_access_meta_boxes_after_groups_read_update', $post_id, $group_ids, $update_result ); -
/** * Fires before post access group IDs are updated for the post. */ do_action( 'groups_access_meta_boxes_before_groups_read_update', $post_id, $group_ids ); -
groups_filter_the_posts
filter/** * Whether Groups should apply its the_posts filter. By default, the filter is * not applied. */ apply_filters( 'groups_filter_the_posts', false ); -
/** * This filter allows to override the Groups’ verdict on whether a user can * access a post. */ apply_filters( 'groups_post_access_user_can_read_post', $result, $post_id, $user_id ); -
/** * Filter the output of the read groups box. */ apply_filters( 'groups_access_meta_boxes_groups', $output, $object, $box ); -
/** * Filter the output after the read groups box. */ apply_filters( 'groups_access_meta_boxes_groups_after_read_groups', '', $object, $box ); -
/** * Filter the output before the read groups box. */ apply_filters( 'groups_access_meta_boxes_groups_before_read_groups', '', $object, $box ); -
/** * Filter the options used to obtain available groups shown in the read groups * box. */ apply_filters( 'groups_access_meta_boxes_groups_get_groups_options', array( 'order_by' => 'name', 'order' => 'ASC', 'include' => $include ), $object, $box ); -
/** * Filter the group IDs that the user can use to restrict access. */ apply_filters( 'groups_access_meta_boxes_user_can_restrict_group_ids', $group_ids, $user_id ); -
/** * Filter if capability is selected. */ apply_filters( 'groups_access_restrictions_capability_selected', in_array( $capability->capability, $read_caps ), $capability->capability, $capability->capability_id, $read_caps, $post_id, $post_type ); -
/** * Relates to the admin screen that allows to add a group. */ apply_filters( 'groups_admin_groups_add_form_after_fields', '' ); -
/** * Fires after the request to add a group has been successful. */ do_action( 'groups_admin_groups_add_submit_success', $group_id ); -
/** * Allows to add markup after the standard bulk actions fields of the groups * table. */ apply_filters( 'groups_admin_groups_bulk_actions_fields_epilogue', '' ); -
/** * Allows to process the HTML of the bulk actions section of the groups table. */ apply_filters( 'groups_admin_groups_bulk_actions_html', $bulk_html ); -
/** * Provide the row's output for the column identified by $key for the group * given by its ID. */ apply_filters( 'groups_admin_groups_column_content', '', $key, $group->get_group_id() ); -
groups_admin_groups_columns
filter/** * Allows to modify the columns of the groups table. */ apply_filters( 'groups_admin_groups_columns', $columns ); -
/** * Relates to the admin screen that allows to edit a group. */ apply_filters( 'groups_admin_groups_edit_form_after_fields', '', $group_id ); -
/** * Fires after a request to update a group has been successful. */ do_action( 'groups_admin_groups_edit_submit_success', $group_id ); -
/** * Allows to add markup after the standard filter fields of the groups table. */ apply_filters( 'groups_admin_groups_filters_fields_epilogue', '' ); -
/** * Allows to process the HTML of the filters section of the groups table. */ apply_filters( 'groups_admin_groups_filters_html', $filters_html ); -
/** * Handle the requested action and produce the corresponding output. */ do_action( 'groups_admin_groups_handle_action', groups_sanitize_get( 'action' ), groups_sanitize_get( 'group_id' ) ); -
/** * Fires after the posted data for an action was accepted. */ do_action( 'groups_admin_groups_handle_action_confirm', groups_sanitize_post( 'action' ) ); -
/** * Fires after the posted data for an action was rejected. */ do_action( 'groups_admin_groups_handle_action_reject', groups_sanitize_post( 'action' ) ); -
/** * Handle a requested action after $_POST. */ apply_filters( 'groups_admin_groups_handle_action_submit', false, groups_sanitize_post( 'action' ) ); -
/** * Handle the requested bulk action. */ do_action( 'groups_admin_groups_handle_bulk_action', $bulk_action, $group_id ); -
groups_admin_groups_query
filter/** * Allows to modify the query for the groups table. */ apply_filters( 'groups_admin_groups_query', $query ); -
groups_admin_groups_results
filter/** * Allows to modify the results for the groups table. */ apply_filters( 'groups_admin_groups_results', $results ); -
/** * Allows to alter the row actions for a group in the groups table. */ apply_filters( 'groups_admin_groups_row_actions', $row_actions, intval( $result->group_id ) ); -
/** * Allows to process the HTML of the row actions for a group in the groups * table. */ apply_filters( 'groups_admin_groups_row_actions_html', $row_actions_html, intval( $result->group_id ) ); -
groups_admin_options_legacy
action/** * Fires if legacy setting has changed. */ do_action( 'groups_admin_options_legacy', $groups_legacy_enable !== $previous_legacy_enable ); -
/** * Filter groups used to filter access restrictions. */ apply_filters( 'groups_admin_posts_restrict_manage_posts_get_groups', Groups_Group::get_groups( apply_filters( 'groups_admin_posts_restrict_manage_posts_get_groups_options', array( 'order_by' => 'name', 'order' => 'ASC' ) ) ) ); -
/** * Filter options used to get groups used to filter access restrictions. */ apply_filters( 'groups_admin_posts_restrict_manage_posts_get_groups_options', array( 'order_by' => 'name', 'order' => 'ASC' ) ); -
/** * Allow to filter the groups offered. */ apply_filters( 'groups_admin_user_profile_edit_user_profile_groups', $wpdb->get_results( "SELECT * FROM $groups_table ORDER BY name" ), $user->get_user()->ID ); -
/** * Filter groups provided during user profile update. */ apply_filters( 'groups_admin_user_profile_edit_user_profile_update_groups', $wpdb->get_results( "SELECT * FROM $groups_table" ), $user_id ); -
/** * Allow to filter the groups. */ apply_filters( 'groups_admin_user_profile_user_new_form_groups', $wpdb->get_results( "SELECT * FROM $groups_table ORDER BY name" ), $type ); -
/** * Allow to filter the groups offered. */ apply_filters( 'groups_admin_user_profile_user_register_groups', $wpdb->get_results( "SELECT * FROM $groups_table" ), $user_id ); -
/** * Filter groups provided to filter. */ apply_filters( 'groups_admin_users_restrict_manage_users_groups', $wpdb->get_results( "SELECT * FROM $groups_table ORDER BY name" ) ); -
/** * Filter user counts per group. */ apply_filters( 'groups_admin_users_views_users_counts', $wpdb->get_results( "SELECT COUNT(user_id) AS count, group_id FROM $user_group_table GROUP BY group_id" ) ); -
/** * Filter available groups. */ apply_filters( 'groups_admin_users_views_users_groups', Groups_Group::get_groups( array( 'order_by' => 'name', 'order' => 'ASC' ) ) ); -
/** * Filter the delete lock timeout. */ apply_filters( 'groups_cache_delete_lock_timeout', self::LOCK_TIMEOUT, $key, $group ); -
/** * Apply suffix to extended key. */ apply_filters( 'groups_cache_extend_key_suffix', '', $key, $flags ); -
/** * Filter the lock timeout. */ apply_filters( 'groups_cache_get_lock_timeout', self::LOCK_TIMEOUT, $key, $group ); -
groups_cache_group_suffix
filter/** * Apply suffix to extended group. */ apply_filters( 'groups_cache_group_suffix', '', $group, $flags ); -
/** * Filter comment groups. */ apply_filters( 'groups_cache_robot_comment_groups', self::$comment_groups ); -
groups_cache_robot_flush_all
filter/** * Add all groups to flush? */ apply_filters( 'groups_cache_robot_flush_all', true, current_action(), $args ); -
/** * Add comment groups to flush? */ apply_filters( 'groups_cache_robot_flush_comment', true, current_action(), $args ); -
/** * Filter groups to flush. */ apply_filters( 'groups_cache_robot_flush_groups', self::$flush_groups ); -
/** * Add post groups to flush? */ apply_filters( 'groups_cache_robot_flush_post', $apply, current_action(), $args ); -
/** * Add term groups to flush? */ apply_filters( 'groups_cache_robot_flush_term', $apply, current_action(), $args ); -
/** * Add user groups to flush? */ apply_filters( 'groups_cache_robot_flush_user', true, current_action(), $args ); -
/** * Filter post groups. */ apply_filters( 'groups_cache_robot_post_groups', self::$post_groups ); -
/** * Filter term groups. */ apply_filters( 'groups_cache_robot_term_groups', self::$term_groups ); -
/** * Filter user groups. */ apply_filters( 'groups_cache_robot_user_groups', self::$user_groups ); -
groups_cache_set_expires
filter/** * Filter when cache entry expires. */ apply_filters( 'groups_cache_set_expires', $expires, $key, $value, $group ); -
/** * Indefinite value. */ apply_filters( 'groups_cache_set_expires_indefinite', PHP_INT_MAX ); -
/** * Filter setting the lock timeout. */ apply_filters( 'groups_cache_set_lock_timeout', self::LOCK_TIMEOUT, $key, $group ); -
/** * Filter the lock timeout. */ apply_filters( 'groups_capability_lock_timeout', self::LOCK_TIMEOUT ); -
/** * Filter the comment count where clause. */ apply_filters( 'groups_comment_access_comment_count_where', $where, $post_id ); -
/** * Whether to apply the comment feed where clause filter. */ apply_filters( 'groups_comment_access_comment_feed_where_apply', true, $where, $query ); -
/** * Whether to filter the comments array. */ apply_filters( 'groups_comment_access_comments_array_apply', true, $comments, $post_id ); -
/** * Whether to apply the comment clauses filter. */ apply_filters( 'groups_comment_access_comments_clauses_apply', true, $pieces, $comment_query ); -
/** * Whether to filter the comments. */ apply_filters( 'groups_comment_access_the_comments_apply', true, $comments, $comment_query ); -
/** * Whether to filter the comment counts. */ apply_filters( 'groups_comment_access_wp_count_comments_apply', true, $count, $post_id ); -
groups_created_capability
action/** * Fires after a capability has been persisted. */ do_action( 'groups_created_capability', $result ); -
groups_created_group
action/** * Fires after a group has been persisted. */ do_action( 'groups_created_group', $result ); -
/** * Fires after a group-capability relation has been persisted. */ do_action( 'groups_created_group_capability', $group_id, $capability_id ); -
/** * Fires after a user-capability has been persisted. */ do_action( 'groups_created_user_capability', $user_id, $capability_id ); -
groups_created_user_group
action/** * Fires after a user-group has been persisted. */ do_action( 'groups_created_user_group', $user_id, $group_id ); -
groups_deleted_capability
action/** * Fires after a capability has been deleted. */ do_action( 'groups_deleted_capability', $result ); -
/** * Fires after a capability has been deleted. */ do_action( 'groups_deleted_capability_capability', $capability->capability ); -
groups_deleted_group
action/** * Fires after a group has been deleted. */ do_action( 'groups_deleted_group', $result ); -
/** * Fires after a group-capability has been deleted. */ do_action( 'groups_deleted_group_capability', $group_id, $capability_id ); -
groups_deleted_option
action/** * Fires after an option has been deleted. */ do_action( 'groups_deleted_option', $option ); -
/** * Fires after a user capability has been deleted. */ do_action( 'groups_deleted_user_capability', $user_id, $capability_id ); -
groups_deleted_user_group
action/** * Fires after a user-group has been deleted. */ do_action( 'groups_deleted_user_group', $user_id, $group_id ); -
groups_deleted_user_option
action/** * Fires after a user option has been deleted. */ do_action( 'groups_deleted_user_option', $user_id, $option ); -
groups_flushed_options
action/** * Fires after options have been deleted. */ do_action( 'groups_flushed_options' ); -
groups_get_table_prefix
filter/** * Filters the prefix of the database table to query. */ apply_filters( 'groups_get_table_prefix', $wpdb->prefix ); -
groups_group_can
filter/** * Filter whether the group has the capability. */ apply_filters_ref_array( 'groups_group_can', array( $result, &$this, $capability, $object, $args ) ); -
groups_group_lock_timeout
filter/** * Filter the lock timeout. */ apply_filters( 'groups_group_lock_timeout', self::LOCK_TIMEOUT ); -
/** * Maximum number of map entries. */ apply_filters( 'groups_group_read_by_name_max_map', self::MAX_MAP ); -
groups_group_read_max_map
filter/** * Maximum number of map entries read. */ apply_filters( 'groups_group_read_max_map', self::MAX_MAP ); -
/** * Maximum time delta for submit validation. */ apply_filters( 'groups_join_submit_max_time_delta', self::MAX_TIME_DELTA ); -
groups_join_submit_redirect
filter/** * Whether to redirect after submit and successful addition to group. */ apply_filters( 'groups_join_submit_redirect', $redirect, $atts, $options ); -
/** * Maximum time delta for submit. */ apply_filters( 'groups_leave_submit_max_time_delta', self::MAX_TIME_DELTA ); -
groups_leave_submit_redirect
filter/** * Whether to redirect after acceptedsubmit and successful removal from group. */ apply_filters( 'groups_leave_submit_redirect', $redirect, $atts, $options ); -
groups_lock_path
filter/** * Modify the lock file path. */ apply_filters( 'groups_lock_path', $path, $name, $blog_id ); -
groups_lock_sleep
filter/** * Modify the lock sleep gap (microseconds). */ apply_filters( 'groups_lock_sleep', $this->sleep, $name, $blog_id ); -
groups_lock_timeout
filter/** * Modify the lock timeout (microseconds). */ apply_filters( 'groups_lock_timeout', $this->timeout, $name, $blog_id ); -
/** * Whether to filter get_terms. */ apply_filters( 'groups_post_access_filter_get_terms', true, $terms, $taxonomies, $query_vars, $term_query ); -
/** * Whether to process this block pre rendering. */ apply_filters( 'groups_post_access_filter_pre_render_block', true, $pre_render, $parsed_block, $parent_block ); -
/** * Whether to process this block. */ apply_filters( 'groups_post_access_filter_render_block', true, $block_content, $parsed_block, $block ); -
/** * Whether to filter get_terms. */ apply_filters( 'groups_post_access_filter_widget_categories_args', true, $cat_args, $instance ); -
/** * Whether to filter get_terms. */ apply_filters( 'groups_post_access_filter_widget_categories_dropdown_args', true, $cat_args, $instance ); -
/** * Whether to apply the get_pages filter. */ apply_filters( 'groups_post_access_get_pages_apply', true, $pages ); -
/** * Whether to filter the excerpt. */ apply_filters( 'groups_post_access_get_the_excerpt_apply', true, $output ); -
/** * Allow to modify the where clause. */ apply_filters( 'groups_post_access_posts_where', $where, $query ); -
/** * Whether to apply the posts_where filter. */ apply_filters( 'groups_post_access_posts_where_apply', true, $where, $query ); -
/** * Whether to filter for all post types. */ apply_filters( 'groups_post_access_posts_where_filter_all', false ); -
/** * The post types considered for evaluation. */ apply_filters( 'groups_post_access_posts_where_query_get_post_types', $query->get( 'post_type', null ), $where, $query ); -
/** * Whether to apply the the_content filter. */ apply_filters( 'groups_post_access_the_content_apply', true, $output ); -
/** * Whether to apply the the_posts filter. */ apply_filters( 'groups_post_access_the_posts_apply', true, $posts, $query ); -
/** * Fires after the post count query. */ do_action( 'groups_post_access_wp_count_posts_after_query', $query_args, $counts, $type, $perm ); -
/** * Fires before the post count query. */ do_action( 'groups_post_access_wp_count_posts_before_query', $query_args, $counts, $type, $perm ); -
/** * Whether processing shortcode tag. */ apply_filters( 'groups_shortcodes_is_processing', $result, $tag, $atts ); -
/** * Filter the blocks to preprocess. */ apply_filters( 'groups_shortcodes_preprocess_blocks', array( 'core/latest-posts' ) ); -
groups_shortcodes_validate
filter/** * Allow to filter final validation result. */ apply_filters( 'groups_shortcodes_validate', $valid, $tag, $atts, $content ); -
/** * Allow to filter the contents considered for shortcode validation. */ apply_filters( 'groups_shortcodes_validate_contents', $contents, $tag, $atts, $content ); -
/** * Allow widgets to provide content that should be checked during shortcode * validation. */ apply_filters( 'groups_shortcodes_widget_display_callback_widget_content', null, $instance, $widget, $args ); -
/** * Allows to determine the maximum number of options displayed in the dropdown. */ apply_filters( 'groups_uie_render_select_display_limit', null ); -
groups_uie_which_select
filter/** * Allow to filter the select to use. */ apply_filters( 'groups_uie_which_select', self::$select ); -
groups_updated_capability
action/** * Fires after a capability has been updated. */ do_action( 'groups_updated_capability', $result ); -
groups_updated_group
action/** * Fires after a group has been updated. */ do_action( 'groups_updated_group', $result ); -
/** * Fires after a group-capability has been deleted. */ do_action( 'groups_updated_group_capability', $group_id, $capability_id ); -
groups_updated_option
action/** * Fires after a option has been updated. */ do_action( 'groups_updated_option', $option, $new_value ); -
/** * Fires after a user-capability has been updated. */ do_action( 'groups_updated_user_capability', $user_id, $capability_id ); -
groups_updated_user_group
action/** * Fires after a user-group has been updated. */ do_action( 'groups_updated_user_group', $user_id, $group_id ); -
groups_updated_user_option
action/** * Fires after a user option has been updated. */ do_action( 'groups_updated_user_option', $option, $new_value, $user_id ); -
/** * This filter allows to reduce the capabilities that are taken into account * when evaluation the user capability set during cache initialization. */ apply_filters( 'groups_user_add_role_capabilities', true ); -
groups_user_can
filter/** * Filter whether the user has the capability. */ apply_filters_ref_array( 'groups_user_can', array( $result, &$this, $capability, $object, $args ) ); -
groups_user_has_cap
filter/** * Allows to filter the capabilities mapping for the user. */ apply_filters( 'groups_user_has_cap', $allcaps, $caps, $args, $user ); -
groups_user_is_member
filter/** * Allow to modify the result of whether the user belongs to a given group. */ apply_filters( 'groups_user_is_member', $result, $this, $group_id ); -
groups_welcome_show
filter/** * Whether to show the welcome. */ apply_filters( 'groups_welcome_show', true ); -
plugin_locale
filter/** * Filter the plugin locale. */ apply_filters( 'plugin_locale', $locale, 'groups' );
Generated from Groups's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: