Skip to content

Instantly share code, notes, and snippets.

@gamaup
Created October 6, 2021 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gamaup/38da82b6d3a40e837753a5edf8b8d2a4 to your computer and use it in GitHub Desktop.
Save gamaup/38da82b6d3a40e837753a5edf8b8d2a4 to your computer and use it in GitHub Desktop.
Passing parameters into add_action
<?php
$variable = "Some value"; // bisa array juga.
add_action( 'hook_name, function() use ($variable) {
// callback.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment