It means Priority. You can read more about it here
Thread Starter
gwenm
(@gwenm)
Thank you, I don’t understand better. It must be too complicated for me… the main thing is that it works 🙂
Thread Starter
gwenm
(@gwenm)
I understand the sentence but I don’t see what function(4) it refers to ..
add_action( ‘wp_head’, ‘add_custom_meta_des’, 4 );
The function is “add_custom_meta_des”
The 4 helps define the order in which various added callbacks are executed. Any added with priority 0 go first, then any added with 1, then 2, etc. Does that help in your understanding? That’s all you really need to know, but there is more to this if you’re interested.
The default is 10 if not otherwise specified. If you used something like 64000 it’ll likely be executed last, even though much larger integers are possible. The absolute largest possible integer is assigned to the constant PHP_INT_MAX. Its value depends on the binary word width (commonly 64 bits wide) of your system.
The order of execution of various callbacks added with the same priority value is officially undefined, but apparently in practice they execute in alphabetical order of function name. Not something to depend on.