Skip to:
Content

bbPress.org

Changeset 5932


Ignore:
Timestamp:
08/26/2015 07:04:51 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Admin: Swap %d for %s in bbp_filter_dashboard_glance_items().

This changeset fixes a bug causing numbers to be truncated at the first non-numeric character.

Fixes #2857.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/metaboxes.php

    r5930 r5932  
    2626        if ( current_user_can( 'publish_forums' ) ) {
    2727                $link       = add_query_arg( array( 'post_type' => bbp_get_forum_post_type() ), get_admin_url( null, 'edit.php' ) );
    28                 $text       = sprintf( _n( '%d Forum', '%d Forums', $r['forum_count'], 'bbpress' ), $r['forum_count'] );
     28                $text       = sprintf( _n( '%s Forum', '%s Forums', $r['forum_count'], 'bbpress' ), $r['forum_count'] );
    2929                $elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-forums">' . esc_html( $text ) . '</a>';
    3030        }
    … …  
    3333        if ( current_user_can( 'publish_topics' ) ) {
    3434                $link       = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) );
    35                 $text       = sprintf( _n( '%d Topic', '%d Topics', $r['topic_count'], 'bbpress' ), $r['topic_count'] );
     35                $text       = sprintf( _n( '%s Topic', '%s Topics', $r['topic_count'], 'bbpress' ), $r['topic_count'] );
    3636                $elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-topics">' . esc_html( $text ) . '</a>';
    3737        }
    … …  
    4040        if ( current_user_can( 'publish_replies' ) ) {
    4141                $link       = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) );
    42                 $text       = sprintf( _n( '%d Reply', '%d Replies', $r['reply_count'], 'bbpress' ), $r['reply_count'] );
     42                $text       = sprintf( _n( '%s Reply', '%s Replies', $r['reply_count'], 'bbpress' ), $r['reply_count'] );
    4343                $elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-replies">' . esc_html( $text ) . '</a>';
    4444        }
    … …  
    4747        if ( bbp_allow_topic_tags() && current_user_can( 'manage_topic_tags' ) ) {
    4848                $link       = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) );
    49                 $text       = sprintf( _n( '%d Topic Tag', '%d Topic Tags', $r['topic_tag_count'], 'bbpress' ), $r['topic_tag_count'] );
     49                $text       = sprintf( _n( '%s Topic Tag', '%s Topic Tags', $r['topic_tag_count'], 'bbpress' ), $r['topic_tag_count'] );
    5050                $elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-topic-tags">' . esc_html( $text ) . '</a>';
    5151        }
Note: See TracChangeset for help on using the changeset viewer.