Rotary encoder, with single-, double-click, hold and rotation.

Good… !!!

To your earlier question about pull-up: I see you have to add internal pull-up resistors with the commands: pinMode (encoder0PinA, INPUT_PULLUP); and pinMode (encoder0PinB, INPUT_PULLUP); Otherwise it can not detect a “high”

Actually the commands on the buttonPin are the “old” way of doing the same :

pinMode(buttonPin, INPUT);

digitalWrite(buttonPin, HIGH );

and could be replaced with: pinMode (buttonPin, INPUT_PULLUP);

Not sure why you kept the check on the button in int rotationFunction()

if (buttonLast == HIGH) {

Is that necessary?