WordPress.org

Make WordPress Core

Ticket #8863: transition_comment_status_test.php

File transition_comment_status_test.php, 430 bytes (added by Captaffy, 6 years ago)

Plugin used to test whether the transition_comment_status hook has fired

Line 
1<?php
2
3/*
4Plugin Name: transition_comment_status Test
5Plugin URI:
6Description: Outputs text when the transition_comment_status hook fires
7Version: 1.0
8Author: Captaffy
9Author URI:
10*/
11
12function tcst_transition_comment_status_fired($new_status, $old_status, $comment)
13{
14        echo 'transition_comment_status Fired!';
15        exit;
16}
17
18add_action('transition_comment_status', 'tcst_transition_comment_status_fired', 10, 3);
19
20?>