Making WordPress.org


Ignore:
Timestamp:
02/09/2024 03:15:54 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Allow tags to be filtered by taxonomies.

This adjusts the styles and templates to simplify the behaviour, allowing for an "empty" archive to be displayed.

Closes https://github.com/WordPress/wordpress.org/pull/198.
See #7430.

File:
1 edited

Legend:

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

    r10233 r13196  
    1313        <main id="main" class="site-main" role="main">
    1414
    15                 <?php if ( have_posts() ) : ?>
     15                <header class="page-header">
     16                        <h1 class="page-title">
     17                                <?php
     18                                printf(
     19                                        /* translators: Search query. */
     20                                        esc_html__( 'Showing results for: %s', 'wporg-plugins' ),
     21                                        '<strong>' . get_search_query() . '</strong>'
     22                                );
     23                                ?>
     24                        </h1>
     25                        <?php
     26                        if ( get_query_var( 'block_search' ) ) {
     27                                printf(
     28                                        /* translators: %s: Search URL */
     29                                        '<p>' . __( 'Searching the block directory. <a href="%s">Search all plugins</a>.', 'wporg-plugins' ) . '</p>',
     30                                        remove_query_arg( 'block_search' )
     31                                );
     32                        }
     33                        ?>
     34                </header><!-- .page-header -->
    1635
    17                         <header class="page-header">
    18                                 <h1 class="page-title">
    19                                         <?php
    20                                         printf(
    21                                                 /* translators: Search query. */
    22                                                 esc_html__( 'Showing results for: %s', 'wporg-plugins' ),
    23                                                 '<strong>' . get_search_query() . '</strong>'
    24                                         );
    25                                         ?>
    26                                 </h1>
    27                                 <?php
    28                                 if ( get_query_var( 'block_search' ) ) {
    29                                         printf(
    30                                                 /* translators: %s: Search URL */
    31                                                 '<p>' . __( 'Searching the block directory. <a href="%s">Search all plugins</a>.', 'wporg-plugins' ) . '</p>',
    32                                                 remove_query_arg( 'block_search' )
    33                                         );
    34                                 }
    35                                 ?>
    36                         </header><!-- .page-header -->
     36                <?php
     37                /* Start the Loop */
     38                while ( have_posts() ) :
     39                        the_post();
    3740
    38                         <?php
    39                         /* Start the Loop */
    40                         while ( have_posts() ) :
    41                                 the_post();
     41                        get_template_part( 'template-parts/plugin', 'index' );
     42                endwhile;
    4243
    43                                 get_template_part( 'template-parts/plugin', 'index' );
    44                         endwhile;
     44                if ( ! have_posts() ) {
     45                        get_template_part( 'template-parts/no-results' );
     46                }
    4547
    46                         the_posts_pagination();
     48                the_posts_pagination();
    4749
    48                 else :
    49                         get_template_part( 'template-parts/content', 'none' );
    50                 endif;
    5150                ?>
    5251
Note: See TracChangeset for help on using the changeset viewer.