Make WordPress Core

Changeset 10953


Ignore:
Timestamp:
04/16/2009 06:51:50 PM (16 years ago)
Author:
ryan
Message:

Translate defaults. Props nbachiyski. fixes #9548

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r10931 r10953  
    641641 * @param string $pingbacktxt The string to display for pingback type
    642642 */
    643 function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') {
     643function comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) {
     644    if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' );
     645    if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' );
     646    if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' );
    644647    $type = get_comment_type();
    645648    switch( $type ) {
     
    842845    }
    843846
    844     define('COMMENTS_TEMPLATE', true);
     847    if ( !defined('COMMENTS_TEMPLATE') || !COMMENTS_TEMPLATE)
     848        define('COMMENTS_TEMPLATE', true);
    845849
    846850    $include = apply_filters('comments_template', STYLESHEETPATH . $file );
     
    903907 * @return null Returns null on single posts and pages.
    904908 */
    905 function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = '% Comments', $css_class = '', $none = 'Comments Off' ) {
     909function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {
    906910    global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post;
    907 
     911   
     912    if ( false === $zero ) $zero = __( 'No Comments' );
     913    if ( false === $one ) $one = __( '1 Comment' );
     914    if ( false === $more ) $more = __( '% Comments' );
     915    if ( false === $none ) $none = __( 'Comments Off' );
     916   
    908917    $number = get_comments_number( $id );
    909918
     
    11051114 * @param string $linktoparent Optional. Boolean to control making the author's name a link to their comment.
    11061115 */
    1107 function comment_form_title( $noreplytext = 'Leave a Reply', $replytext = 'Leave a Reply to %s', $linktoparent = TRUE ) {
     1116function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) {
    11081117    global $comment;
     1118   
     1119    if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' );
     1120    if ( false === $replytext ) $replytext = __( 'Leave a Reply to %s' );
    11091121
    11101122    $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
Note: See TracChangeset for help on using the changeset viewer.