Making WordPress.org


Ignore:
Timestamp:
03/12/2024 05:27:53 AM (6 months ago)
Author:
dd32
Message:

wporg-plugins-2024: Adopt the new tile layout for the plugin cards, with description below the card header.

See #7469.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card
Files:
2 copied

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/render.php

    r13300 r13310  
    11<?php
    2 /**
    3  * Template part for displaying plugins.
    4  *
    5  * @link https://codex.wordpress.org/Template_Hierarchy
    6  *
    7  * @package WordPressdotorg\Plugin_Directory\Theme
    8  */
    9 
    10 namespace WordPressdotorg\Plugin_Directory\Theme;
     2namespace WordPressdotorg\Theme\Plugins_2024\PluginCard;
    113
    124use WordPressdotorg\Plugin_Directory\Template;
    135
    14 $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true );
     6$post = get_post();
     7// Simulates wporg/link-wrapper block until this is migrated to a block, or it supports href=permalink.
    158?>
    16 <article <?php post_class( 'plugin-card' ); ?>>
    17     <div class="entry-thumbnail">
    18         <a href="<?php the_permalink(); ?>" rel="bookmark">
    19             <?php
    20             // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
    21             echo Template::get_plugin_icon( get_post(), 'html' );
    22             ?>
    23         </a>
    24     </div><div class="entry">
     9<a class="plugin-card wp-block-wporg-link-wrapper" href="<?php the_permalink(); ?>">
     10    <div class="entry">
     11        <div class="entry-thumbnail">
     12            <?php echo Template::get_plugin_icon( get_post(), 'html' ); ?>
     13        </div>
     14
    2515        <header class="entry-header">
    26             <?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
     16            <?php the_title( '<h3 class="entry-title">', '</h3>' ); ?>
    2717        </header><!-- .entry-header -->
    2818
    29         <?php echo wp_kses_post( Template::get_star_rating() ); ?>
     19        <?php echo wp_kses_post( Template::get_star_rating( $post, false ) ); ?>
    3020
    3121        <div class="entry-excerpt">
     
    3323        </div><!-- .entry-excerpt -->
    3424    </div>
    35     <hr>
     25
    3626    <footer>
    3727        <span class="plugin-author">
     
    4232            <?php echo esc_html( Template::active_installs() ); ?>
    4333        </span>
    44         <?php if ( $tested_up_to ) : ?>
     34        <?php if ( $post->tested ) : ?>
    4535            <span class="tested-with">
    4636                <i class="dashicons dashicons-wordpress-alt"></i>
    4737                <?php
    4838                /* translators: WordPress version. */
    49                 printf( esc_html__( 'Tested with %s', 'wporg-plugins' ), esc_html( $tested_up_to ) );
     39                printf( esc_html__( 'Tested with %s', 'wporg-plugins' ), esc_html( $post->tested ) );
    5040                ?>
    5141            </span>
     
    5949        </span>
    6050    </footer>
    61     <?php /* This file must not end with a new line */ ?>
    62 </article>
     51</a>
Note: See TracChangeset for help on using the changeset viewer.