Skip to content

Commit 49d3a7f

Browse files
Add hooks for multisite (#10)
Co-authored-by: Jeff Hegeman <jeff.hegeman@wisconsin.edu>
1 parent 65a7a82 commit 49d3a7f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

includes/class-ss-disable-user-login-plugin.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ private function add_hooks() {
125125
add_action( 'wp_ajax_ssdul_enable_disable_user', array( $this, 'enable_disable_user' ) );
126126
}
127127

128+
if ( is_network_admin() ) {
129+
add_action( 'network_admin_notices', array( $this, 'bulk_disable_user_notices' ) );
130+
}
131+
128132
// Disabled hook
129133
add_action( 'disable_user_login.user_disabled', array( $this, 'force_logout' ), 10, 1 );
130134

@@ -137,6 +141,11 @@ private function add_hooks() {
137141
add_filter( 'user_row_actions', array( $this, 'add_quick_links' ), 10, 2 );
138142
add_filter( 'wp_is_application_passwords_available_for_user', array( $this, 'maybe_disable_application_passwords_for_user' ), 10, 2 );
139143

144+
// Multisite Filters
145+
add_filter( 'ms_user_row_actions', array( $this, 'add_quick_links' ), 10, 2 );// Adds custom action link to network's users page
146+
add_filter( 'bulk_actions-users-network', array( $this, 'bulk_action_disable_users' ) );
147+
add_filter( 'handle_network_bulk_actions-users-network', array( $this, 'handle_bulk_disable_users' ), 10, 3 );
148+
140149
} //end function add_hooks
141150

142151
/**

0 commit comments

Comments
 (0)