Created
October 6, 2021 10:43
-
-
Save gamaup/38da82b6d3a40e837753a5edf8b8d2a4 to your computer and use it in GitHub Desktop.
Passing parameters into add_action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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