Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: comment_{$new_status}_{$comment->comment_type}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1835       *
1836       * Typical comment types include an empty string (standard comment), 'pingback',
1837       * or 'trackback'.
1838       *
1839       * @since 2.7.0
1840       *
1841       * @param int        $comment_ID The comment ID.
1842       * @param WP_Comment $comment    Comment object.
1843       */
1844      do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );
1845 }
1846
1847 /**
1848  * Clear the lastcommentmodified cached value when a comment status is changed.
1849  *
1850  * Deletes the lastcommentmodified cache key when a comment enters or leaves
1851  * 'approved' status.
1852  *
1853  * @since 4.7.0