Making WordPress.org

Changeset 7794


Ignore:
Timestamp:
10/27/2018 07:57:15 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Make/Meetings: Add an Edit link for each meeting for easier access.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/archive-meeting.php

    r2957 r7794  
    1616        <tr id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1717            <td><?php echo $post->team; ?></td>
    18             <td><a href="<?php echo $post->link; ?>"><?php the_title(); ?></a></td>
     18            <td><?php
     19                $title = get_the_title();
     20                printf(
     21                    '<a href="%s">%s</a>',
     22                    esc_url( $post->link ),
     23                    $title
     24                );
     25                if ( current_user_can( 'edit_post', get_the_ID() ) ) {
     26                    printf(
     27                        ' <a class="edit" href="%s" aria-label="%s">%s</a>',
     28                        get_edit_post_link(),
     29                        /* translators: %s: post title */
     30                        esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;', 'make-wporg' ), $title ) ),
     31                        __( '(Edit)', 'make-wporg' )
     32                    );
     33                }
     34            ?></td>
    1935            <td><?php
    2036            // convert the date time to a pretty format
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/style.css

    r5811 r7794  
    335335  padding: 5px 3px;
    336336}
     337
     338table.schedule .edit {
     339    visibility: hidden;
     340}
     341
     342table.schedule td:hover .edit{
     343    visibility: visible;
     344}
     345
     346table.schedule td:focus-within .edit {
     347    /* Separated from the block above due to browsers that don't support :focus-within */
     348    visibility: visible;
     349}
Note: See TracChangeset for help on using the changeset viewer.