Changeset 60779
- Timestamp:
- 09/17/2025 10:44:00 PM (2 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/comment-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r60408 r60779 1181 1181 * @since 0.71 1182 1182 * 1183 * @param string|false $comment txt Optional. String to display for comment type. Default false.1184 * @param string|false $trackback txt Optional. String to display for trackback type. Default false.1185 * @param string|false $pingback txt Optional. String to display for pingback type. Default false.1186 */ 1187 function comment_type( $comment txt = false, $trackbacktxt = false, $pingbacktxt = false ) {1188 if ( false === $comment txt ) {1189 $comment txt = _x( 'Comment', 'noun' );1190 } 1191 if ( false === $trackback txt ) {1192 $trackback txt = __( 'Trackback' );1193 } 1194 if ( false === $pingback txt ) {1195 $pingback txt = __( 'Pingback' );1183 * @param string|false $comment_text Optional. String to display for comment type. Default false. 1184 * @param string|false $trackback_text Optional. String to display for trackback type. Default false. 1185 * @param string|false $pingback_text Optional. String to display for pingback type. Default false. 1186 */ 1187 function comment_type( $comment_text = false, $trackback_text = false, $pingback_text = false ) { 1188 if ( false === $comment_text ) { 1189 $comment_text = _x( 'Comment', 'noun' ); 1190 } 1191 if ( false === $trackback_text ) { 1192 $trackback_text = __( 'Trackback' ); 1193 } 1194 if ( false === $pingback_text ) { 1195 $pingback_text = __( 'Pingback' ); 1196 1196 } 1197 1197 $type = get_comment_type(); 1198 1198 switch ( $type ) { 1199 1199 case 'trackback': 1200 echo $trackback txt;1200 echo $trackback_text; 1201 1201 break; 1202 1202 case 'pingback': 1203 echo $pingback txt;1203 echo $pingback_text; 1204 1204 break; 1205 1205 default: 1206 echo $comment txt;1206 echo $comment_text; 1207 1207 } 1208 1208 }
Note: See TracChangeset
for help on using the changeset viewer.