/** * Setup actions for methods in this class * @since JetpackComments (1.4) */ protected function setup_actions() { parent::setup_actions(); // Selfishly remove everything from the existing comment form remove_all_actions('comment_form_before'); remove_all_actions('comment_form_after'); // Selfishly add only our actions back to the comment form add_action('comment_form_before', array($this, 'comment_form_before')); add_action('comment_form_after', array($this, 'comment_form_after')); // Before a comment is posted add_action('pre_comment_on_post', array($this, 'pre_comment_on_post'), 1); // After a comment is posted add_action('comment_post', array($this, 'add_comment_meta')); }
/** * Setup filters for methods in this class * @since 1.6.2 */ protected function setup_filters() { parent::setup_filters(); add_filter('comment_post_redirect', array($this, 'capture_comment_post_redirect_to_reload_parent_frame'), 100); add_filter('get_avatar', array($this, 'get_avatar'), 10, 4); }