Making WordPress.org

Changeset 6469


Ignore:
Timestamp:
01/30/2018 04:55:10 PM (7 years ago)
Author:
obenland
Message:

Plugins: Only link plugin title when needed.

Props joostdevalk, SergeyBiryukov, bmoredrew.
Fixes #2779.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php

    r6284 r6469  
    1717$content   = Plugin_Directory::instance()->split_post_content_into_pages( get_the_content() );
    1818$is_closed = in_array( get_post_status(), [ 'closed', 'disabled' ], true );
     19
     20$plugin_title = $is_closed ? $post->post_name : get_the_title();
    1921?>
    2022
     
    4042        </div>
    4143
    42         <?php $plugin_title = $is_closed ? $post->post_name : get_the_title(); ?>
     44        <?php if ( get_query_var( 'plugin_advanced' ) ) : ?>
    4345        <h1 class="plugin-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo wp_kses_post( $plugin_title ); ?></a></h1>
     46        <?php else : ?>
     47        <h1 class="plugin-title"><?php echo wp_kses_post( $plugin_title ); ?></h1>
     48        <?php endif; ?>
    4449
    4550        <span class="byline"><?php the_author_byline(); ?></span>
Note: See TracChangeset for help on using the changeset viewer.