Changeset 13310 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/render.php
- Timestamp:
- 03/12/2024 05:27:53 AM (6 months ago)
- 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 1 1 <?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; 2 namespace WordPressdotorg\Theme\Plugins_2024\PluginCard; 11 3 12 4 use WordPressdotorg\Plugin_Directory\Template; 13 5 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. 15 8 ?> 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 25 15 <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>' ); ?> 27 17 </header><!-- .entry-header --> 28 18 29 <?php echo wp_kses_post( Template::get_star_rating( ) ); ?>19 <?php echo wp_kses_post( Template::get_star_rating( $post, false ) ); ?> 30 20 31 21 <div class="entry-excerpt"> … … 33 23 </div><!-- .entry-excerpt --> 34 24 </div> 35 <hr> 25 36 26 <footer> 37 27 <span class="plugin-author"> … … 42 32 <?php echo esc_html( Template::active_installs() ); ?> 43 33 </span> 44 <?php if ( $ tested_up_to) : ?>34 <?php if ( $post->tested ) : ?> 45 35 <span class="tested-with"> 46 36 <i class="dashicons dashicons-wordpress-alt"></i> 47 37 <?php 48 38 /* 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 ) ); 50 40 ?> 51 41 </span> … … 59 49 </span> 60 50 </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.