Making WordPress.org

Changeset 5843


Ignore:
Timestamp:
08/28/2017 03:55:51 PM (7 years ago)
Author:
drewapicture
Message:

Developer: Adjust the "Associated with" link in the Explanation editor to always link to the associated reference article, rather than its edit screen.

The most common path after editing an explanation is the front end of the associated reference to check formatting, currently only possible with two clicks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/explanations.php

    r3661 r5843  
    220220                    <strong><?php _e( 'Associated with: ', 'wporg' ); ?></strong>
    221221                    <?php
    222                     // Edit link if the current user can edit, otherwise view link.
    223                     if ( current_user_can( 'edit_post', $post->post_parent ) ) :
    224                         edit_post_link( get_the_title( $post->post_parent ), '', '', $post->post_parent );
    225                     else :
    226                         printf( '<a href="%1$s">%2$s</a>',
    227                             esc_url( get_permalink( $post->post_parent ) ),
    228                             str_replace( 'Explanation: ', '', get_the_title( $post->post_parent ) )
    229                         );
    230                     endif;
     222                    printf( '<a href="%1$s">%2$s</a>',
     223                        esc_url( get_permalink( $post->post_parent ) ),
     224                        str_replace( 'Explanation: ', '', get_the_title( $post->post_parent ) )
     225                    );
    231226                    ?>
    232227                </div>
Note: See TracChangeset for help on using the changeset viewer.