add_action('wp_footer', function($arguments) use ($myvar) {
echo $myvar;
}, $priority_integer, $accepted_arguments_integer);
// Hooks a function on to a specific action.
add_action( string $tag, callable $function_to_add, int $priority = 10,
int $accepted_args = 1 )