get_comment
Fires after a comment is retrieved.
Description
Parameters (1)
- 0. $comment (mixed)
- Comment data.
Usage
- To run the hook, copy the example below.
- $comment = apply_filters( 'get_comment', $comment );
- if ( !empty( $comment ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the get_comment callback
- function filter_get_comment( $comment ) {
- // make filter magic happen here...
- return $comment;
- };
- // add the filter
- add_filter( 'get_comment', 'filter_get_comment', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'get_comment', 'filter_get_comment', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/comment.php
- $_comment = apply_filters( 'get_comment', $_comment );