Making WordPress.org

Changeset 8953


Ignore:
Timestamp:
06/14/2019 06:09:56 AM (5 years ago)
Author:
tellyworth
Message:

Make/meetings: fix post count for 'more' param in [8952]

See #3078

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-meeting-posttype/wporg-meeting-posttype.php

    r8952 r8953  
    488488            $out .= esc_html( $attr['before'] );
    489489            $out .= '<strong class="meeting-title">' . esc_html( $post->post_title ) . '</strong>';
    490             $display_count = count( $query->posts ) - 1;
     490            $display_count = $query->found_posts - count($query->posts);
    491491            if ( $attr['more'] ) {
    492492                $out .= $display_count === 0 ? '' : ' <a title="Click to view all meetings for this team" href="/meetings#' . esc_attr( $attr['team'] ) . '">' . sprintf( __( '(+%s more)'), $display_count ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.