Make WordPress Core

Ticket #44360: wp-includes-widgets.diff

File wp-includes-widgets.diff, 1.6 KB (added by niq1982, 6 years ago)

Fixes the translator comments in all files in /wp-includes/widgets/ folder

  • src/wp-includes/widgets/class-wp-nav-menu-widget.php

    diff --git a/src/wp-includes/widgets/class-wp-nav-menu-widget.php b/src/wp-includes/widgets/class-wp-nav-menu-widget.php
    index 8954312..67f7ce4 100644
    a b class WP_Nav_Menu_Widget extends WP_Widget { 
    142142                                $url = admin_url( 'nav-menus.php' );
    143143                        }
    144144                        ?>
    145                         <?php echo sprintf( __( 'No menus have been created yet. <a href="%s">Create some</a>.' ), esc_attr( $url ) ); ?>
     145                        <?php
     146                        /* translators: %s: URL to menu edit page */
     147                        echo sprintf( __( 'No menus have been created yet. <a href="%s">Create some</a>.' ), esc_attr( $url ) ); ?>
    146148                </p>
    147149                <div class="nav-menu-widget-form-controls" <?php echo $empty_menus_style; ?>>
    148150                        <p>
  • src/wp-includes/widgets/class-wp-widget-recent-comments.php

    diff --git a/src/wp-includes/widgets/class-wp-widget-recent-comments.php b/src/wp-includes/widgets/class-wp-widget-recent-comments.php
    index c7b0c26..98f9efa 100644
    a b class WP_Widget_Recent_Comments extends WP_Widget { 
    118118
    119119                        foreach ( (array) $comments as $comment ) {
    120120                                $output .= '<li class="recentcomments">';
    121                                 /* translators: comments widget: 1: comment author, 2: post link */
    122121                                $output .= sprintf(
     122                                        /* translators: comments widget: 1: comment author, 2: post link */
    123123                                        _x( '%1$s on %2$s', 'widgets' ),
    124124                                        '<span class="comment-author-link">' . get_comment_author_link( $comment ) . '</span>',
    125125                                        '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'