Making WordPress.org

Changeset 6232


Ignore:
Timestamp:
12/04/2017 05:46:22 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Plugin Directory: Remove unnecessary closure in template-parts/plugin-single.php.

See #2627.

File:
1 edited

Legend:

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

    r6230 r6232  
    124124        </div>
    125125   
    126         <?php
     126        <?php 
    127127        if ( in_array( $status, array( 'closed', 'disabled' ) ) ) {
    128             add_filter( 'the_title', function( $title, $id ) {
    129                 $post = get_post( $id );
    130                 return $post->post_name;
    131             }, 10, 2 );
     128            $plugin_title = $post->post_name;
     129        } else {
     130            $plugin_title = get_the_title();
    132131        }
    133         the_title( '<h1 class="plugin-title"><a href="' . esc_url( get_permalink() ) . '">', '</a></h1>' ); ?>
     132        ?>
     133        <h1 class="plugin-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo $plugin_title; ?></a></h1>
    134134
    135135        <span class="byline"><?php
Note: See TracChangeset for help on using the changeset viewer.