Making WordPress.org


Ignore:
Timestamp:
05/17/2021 06:57:24 PM (5 years ago)
Author:
ryelle
Message:

Pattern Directory: Sync with git WordPress/pattern-directory@4325f4c27e58232cc4a5553bad65ba258947742f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/single-wporg-pattern.php

    r10952 r10983  
    1111
    1212get_header();
     13
     14$user_has_reported = is_user_logged_in() ? user_has_flagged_pattern() : false;
     15
    1316?>
    1417        <input id="block-data" type="hidden" value="<?php echo rawurlencode( wp_json_encode( get_the_content() ) ); ?>" />
     
    2427                                        <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    2528                                        <p>A large hero section with an example background image and a heading in the center.</p>
    26                                         <div id="pattern-actions" class="pattern-actions">
     29                                        <div id="pattern-actions" class="pattern-actions" data-id="<?php the_ID(); ?>">
    2730                                                <button class="button button-primary">Copy Pattern</button>
    2831                                                <button class="button">Add to favorites</button>
     
    4548                                                        ?>
    4649                                                </div>
    47                                                 <div class="pattern__report">
     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                                                        ">
    4856                                                        <button class="button">Report this pattern</button>
    4957                                                </div>
Note: See TracChangeset for help on using the changeset viewer.