Definition:
function comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) {}
Display the comment type of the current comment.
Parameters
- string $commenttxt: The string to display for comment type
- string $trackbacktxt: The string to display for trackback type
- string $pingbacktxt: The string to display for pingback type
Source code
function comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) { if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' ); if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' ); if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' ); $type = get_comment_type(); switch( $type ) { case 'trackback' : echo $trackbacktxt; break; case 'pingback' : echo $pingbacktxt; break; default : echo $commenttxt; } }
707
No comments yet... Be the first to leave a reply!