wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
comment_type › WordPress Function
Od0.71
Przestarzałyn/a
› comment_type ( $commenttxt = false, $trackbacktxt = false, $pingbacktxt = false )
Parametry: (3) |
|
Zdefiniowane na: |
|
Codex: |
Displays the comment type of the current comment.
Źródło
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; } }