The accepted arguments value is used by WordPress as $length
argument for array_slice
when performing the action.
It means that, yes, if you pass 0
no argument will be passed to your callback.
However, you should care of that only if your function acts differently if an argument is passed or not.
A function like the one in OP, is defined without any argument, nor any function like func_get_args()
or func_get_arg()
is used in it, so it means that you can pass any number of arguments to that function, but it will not change its behaviour.
For that reason you can just ignore the 4th argument of add_action
like so:
add_action( 'load-edit.php', 'my_function', 10 );
also consider that 10 is default priority, so previous line has same effect of
add_action( 'load-edit.php', 'my_function' );
It’s not worse nor better from a code quality point of view, avoid to pass irrelevant arguments just saves you to type some chars.