Making WordPress.org


Ignore:
Timestamp:
09/05/2022 05:14:31 AM (4 years ago)
Author:
dufresnesteven
Message:

wporg-developer: Sync with https://github.com/WordPress/wporg-developer/commit/790d402933d2725374de0d19e6bf6a576c8b15d2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/search.php

    r9325 r12050  
    2323                </div>
    2424
    25                 <?php get_search_form(); ?>
     25                <main id="main" class="site-main" role="main">
    2626
    27                 <main id="main" class="site-main" role="main">
     27                <?php get_search_form() ?>
     28
     29        <div class="search-results-summary"><?php
     30        $count = (int) $GLOBALS['wp_query']->found_posts;
     31
     32        if ( $count ) {
     33                if ( is_paged() ) {
     34                        $start = get_query_var( 'posts_per_page' ) * ( get_query_var( 'paged' ) - 1 );
     35                } else {
     36                        $start = 0;
     37                }
     38                $end = min( $count, $start + get_query_var( 'posts_per_page' ) );
     39                printf(
     40                        _n( '<strong>%d</strong> result found for "<strong>%s</strong>".', '<strong>%d</strong> results found for "<strong>%s</strong>". Showing results %d to %d.', $count, 'wporg' ),
     41                        $count,
     42                        esc_html( get_search_query() ),
     43                        $start + 1,
     44                        $end
     45                );
     46        } else {
     47                printf( __( '<strong>%d</strong> results found for "<strong>%s</strong>".', 'wporg' ), $count, esc_html( get_search_query() ) );
     48        }
     49        ?></div>
    2850
    2951                <?php if ( have_posts() ) : ?>
Note: See TracChangeset for help on using the changeset viewer.