Is there a way to turn off the ‘Are you sure you want to open 25 items?’ warning in Mojave?
This works for me using the latest version of macOS Mojave.

I seem to have found a workaround which will bypass the "Are you sure you want to open 25 items?" Dialog box in Finder.  This following AppleScript code will open the selected files in the front most Finder window, without the warning.

tell application "Finder"
    set frontmost to true
    set selectedFiles to get selection as alias list
    open selectedFiles
end tell


You can create a new Automator quick action and add a "run AppleScript" command to the workflow... with the AppleScript code. Then name and save the file. I named my Automator quick service "Open More Than 25.workflow"



Now you can assign your own keyboard shortcut in System Preferences … which will run the "Open More Than 25.workflow", bypassing the "Are you sure you want to open 25 items?" Dialog box in Finder.



Now anytime you have selected files in Finder, pressing that new keyboard shortcut will open the files without the annoying "Are you sure you want to open 25 items?" Dialog box.

Here it is in action using the new "Quick Action"



Here it is in action using the new keyboard shortcut.



If your newly created keyboard shortcut does not work when trying it with the selected files in Finder, it probably means the keyboard shortcut you created is already being used with something else. If so, go back and assign different keys to your keyboard shortcut.