roles, true ) ) { return; } self::notify( __( 'An administrator just signed in', 'aegistha' ), sprintf( /* translators: %s: username */ __( 'The administrator account "%s" just signed in to your site. If this was you, no action is needed.', 'aegistha' ), $user_login ) ); } public static function on_role( $user_id, $role ) { if ( 'administrator' !== $role ) { return; } $user = get_userdata( $user_id ); self::notify( __( 'A new administrator was added', 'aegistha' ), sprintf( /* translators: %s: username */ __( 'The account "%s" was just given administrator access. If you did not do this, review your users immediately.', 'aegistha' ), $user ? $user->user_login : (string) $user_id ) ); } public static function on_plugin( $plugin ) { self::notify( __( 'A plugin was activated', 'aegistha' ), sprintf( /* translators: %s: plugin file */ __( 'The plugin "%s" was just activated on your site.', 'aegistha' ), $plugin ) ); } public static function on_theme( $new_name ) { self::notify( __( 'Your theme was changed', 'aegistha' ), sprintf( /* translators: %s: theme name */ __( 'Your active theme was just changed to "%s".', 'aegistha' ), $new_name ) ); } }