2013-07-03, 04:02 PM
I made plugin that replace all "a" with "b" before saving post.
It works good except quick reply - you need to reload after quick reply to see results.
Why quick reply is not affected by this hook? Isn't it has all post validations? What hook should I use to change quick reply?
$plugins->add_hook("datahandler_post_validate_post", "test");
function test_info()
{
return array(
"name" => "test",
"description" => "test",
"author" => "test",
"version" => "1.0",
"guid" => "",
"compatibility" => "*"
);
}
function test($post)
{
$post->data['message'] = str_replace('a', 'b', $post->data['message']);
}
It works good except quick reply - you need to reload after quick reply to see results.
Why quick reply is not affected by this hook? Isn't it has all post validations? What hook should I use to change quick reply?