Log Message
- do_action(string $action, string $plugin_slug, string $message_slug, array $vars) void
- Parameters:
$action (
string) – Must bewp_fail2ban_log_message.$plugin_slug (
string) – The plugin slug used in Register Plugin.$message_slug (
string) – The message slug used in Register Message.$vars (
array) – The variable substitutions registered with the message.
- Throws:
InvalidArgumentException– Plugin or message not registered.
Example
function myplugin_foobar()
{
$vars = [
'VAR1' => 12345,
'VAR2' => 'xyz'
];
do_action(
'wp_fail2ban_log_message',
'my-plugin-slug',
'my-plugin-msg-slug-1',
$vars
);
}