WordPress.org

Make WordPress Core

Ticket #10177: 10177.diff

File 10177.diff, 1.3 KB (added by kapeels, 7 years ago)
  • (a) Base vs. (b) Locally

    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    a b  
    570570 * @param string $zero Text for no comments
    571571 * @param string $one Text for one comment
    572572 * @param string $more Text for more than one comment
    573  * @param string $deprecated Not used.
    574573 */
    575 function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
     574function comments_number($zero = false, $one = false, $more = false, $deprecated = '') {       
     575        echo get_comments_number_text( $zero, $one, $more, $deprecated );
     576}
     577
     578/**
     579 * Return the language string for the number of comments the current post has.
     580 *
     581 * @since 2.9
     582 * @uses $id
     583 * @uses apply_filters() Calls the 'comments_number' hook on the output and number of comments respectively.
     584 *
     585 * @param string $zero Text for no comments
     586 * @param string $one Text for one comment
     587 * @param string $more Text for more than one comment
     588 */
     589function get_comments_number_text( $zero = false, $one = false, $more = false ) {
    576590        global $id;
    577591
    578592        if ( !empty( $deprecated ) )
     
    587601        else // must be one
    588602                $output = ( false === $one ) ? __('1 Comment') : $one;
    589603
    590         echo apply_filters('comments_number', $output, $number);
     604        return apply_filters('comments_number', $output, $number);
    591605}
    592606
    593607/**