Changeset 11008 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/single-wporg-pattern.php
- Timestamp:
- 06/04/2021 07:18:50 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/single-wporg-pattern.php
r10983 r11008 26 26 <header class="entry-header"> 27 27 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> 28 <p>A large hero section with an example background image and a heading in the center.</p> 29 <div id="pattern-actions" class="pattern-actions" data-id="<?php the_ID(); ?>"> 30 <button class="button button-primary">Copy Pattern</button> 31 <button class="button">Add to favorites</button> 28 <div class="pattern__categories"> 29 <?php 30 $categories_list = get_the_term_list( get_the_ID(), 'wporg-pattern-category' ); 31 if ( $categories_list ) { 32 echo $categories_list; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 33 } 34 ?> 32 35 </div> 33 36 </header><!-- .entry-header --> 34 37 35 <div class="pattern-preview__container" hidden> 38 <div 39 hidden 40 class="pattern-preview__container" 41 data-post-id="<?php echo intval( get_the_ID() ); ?>" 42 data-logged-in="<?php echo json_encode( is_user_logged_in() ); ?>" 43 data-user-has-reported="<?php echo json_encode( $user_has_reported ); ?>" 44 > 36 45 <?php echo rawurlencode( wp_json_encode( get_the_content() ) ); ?> 37 46 </div> 38 47 39 <div class="pattern__meta">40 <div>41 <div class="pattern__categories">42 <?php43 $categories_list = get_the_term_list( get_the_ID(), 'wporg-pattern-category', '', ', ' );44 if ( $categories_list ) {45 /* translators: 1: list of pattern categories. */46 printf( esc_html__( 'Categories: %1$s', 'wporg-patterns' ), $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped47 }48 ?>49 </div>50 <div id="pattern-report"51 class="pattern__report"52 data-post-id="<?php echo intval( get_the_ID() ); ?>"53 data-logged-in="<?php echo json_encode( is_user_logged_in() ); ?>"54 data-user-has-reported="<?php echo json_encode( $user_has_reported ); ?>"55 ">56 <button class="button">Report this pattern</button>57 </div>58 </div>59 </div>60 61 48 <div class="entry-content"> 62 <h2>More from this designer</h2> 63 <div class="pattern-grid"> 64 <ul> 65 <li>Pattern A</li> 66 <li>Pattern B</li> 67 <li>Pattern C</li> 68 </ul> 69 </div> 49 <h2><?php esc_html_e( 'More from this designer', 'wporg-patterns' ); ?></h2> 50 <div class="pattern-grid"></div> 70 51 </div><!-- .entry-content --> 71 52 </article><!-- #post-## -->
Note: See TracChangeset
for help on using the changeset viewer.