• This is probably a very simple question for those who know the answer.
    I’ve got problems with my plugin: It needs two filters – comment_text and get_comment_ID – but when I try it in this form

    function my_filter_function($comment_text, $get_comment_ID) {
    ...
    }
    add_filter('comment_text', 'my_filter_function');
    add_filter('get_comment_ID', 'my_filter_function');

    I get this message:
    Warning: Missing argument 2 for my_filter_function() in /var/…path…/wp-content/plugins/my_plugin.php on line 20

    “line 20” is “function my_filter_function($comment_text, $get_comment_ID) {“
    I guess, the second variable (“argument 2”) isn’t delivered.

    So: How can I use several filters for one function?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Several “add_filter”’ is closed to new replies.