Changeset 9021
- Timestamp:
- 07/03/2019 10:39:41 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-meeting-posttype/wporg-meeting-posttype.php
r8953 r9021 459 459 array( 460 460 'post_type' => 'meeting', 461 ' posts_per_page' => $attr['limit'],461 'nopaging' => true, 462 462 'meta_query' => array( 463 463 'relation' => 'AND', … … 472 472 ); 473 473 474 $limit = $attr['limit'] > 0 ? $attr['limit'] : count( $query->posts ); 475 474 476 $out = ''; 475 foreach ( $query->postsas $post ) {477 foreach ( array_slice( $query->posts, 0, $limit ) as $post ) { 476 478 $next_meeting_datestring = $post->next_date; 477 479 $utc_time = strftime( '%H:%M:%S', strtotime( $post->time ) ); … … 488 490 $out .= esc_html( $attr['before'] ); 489 491 $out .= '<strong class="meeting-title">' . esc_html( $post->post_title ) . '</strong>'; 490 $display_ count = $query->found_posts - count($query->posts);491 if ( $ attr['more']) {492 $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>';492 $display_more = $query->found_posts - intval( $limit ); 493 if ( $display_more > 0 ) { 494 $out .= $display_count === 0 ? '' : ' <a title="Click to view all meetings for this team" href="/meetings#' . esc_attr( $attr['team'] ) . '">' . sprintf( __( '(+%s more)'), $display_more ) . '</a>'; 493 495 } 494 496 $out .= '</br>';
Note: See TracChangeset
for help on using the changeset viewer.