Making WordPress.org


Ignore:
Timestamp:
04/02/2020 01:42:12 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Always show the section tabs, including in the Advanced view.

Props audrasjb for initial patch.
Fixes #2854.

File:
1 edited

Legend:

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

    r9152 r9680  
    5151    </header><!-- .entry-header -->
    5252
    53     <?php if ( ! get_query_var( 'plugin_advanced' ) ) : ?>
    54         <span id="description"></span>
    55         <span id="reviews"></span>
    56         <span id="installation"></span>
    57         <span id="developers"></span>
    58         <ul class="tabs clear">
    59             <li id="tablink-description"><a href="#description"><?php esc_html_e( 'Details', 'wporg-plugins' ); ?></a></li>
    60             <li id="tablink-reviews"><a href="#reviews"><?php esc_html_e( 'Reviews', 'wporg-plugins' ); ?></a></li>
    61             <?php if ( isset( $content['installation'] ) && ! $is_closed ) : ?>
    62                 <li id="tablink-installation">
    63                     <a href="#installation"><?php esc_html_e( 'Installation', 'wporg-plugins' ); ?></a>
    64                 </li>
    65             <?php endif; ?>
    66             <li id="tablink-support">
    67                 <a href="<?php echo esc_url( Template::get_support_url() ); ?>"><?php esc_html_e( 'Support', 'wporg-plugins' ); ?></a>
     53    <span id="description"></span>
     54    <span id="reviews"></span>
     55    <span id="installation"></span>
     56    <span id="developers"></span>
     57    <span id="advanced" class="<?php if ( get_query_var( 'plugin_advanced' ) ) { echo 'displayed'; } ?>"></span>
     58    <ul class="tabs clear">
     59        <li id="tablink-description"><a href="<?php the_permalink(); ?>#description"><?php esc_html_e( 'Details', 'wporg-plugins' ); ?></a></li>
     60        <li id="tablink-reviews"><a href="<?php the_permalink(); ?>#reviews"><?php esc_html_e( 'Reviews', 'wporg-plugins' ); ?></a></li>
     61        <?php if ( isset( $content['installation'] ) && ! $is_closed ) : ?>
     62            <li id="tablink-installation">
     63                <a href="<?php the_permalink(); ?>#installation"><?php esc_html_e( 'Installation', 'wporg-plugins' ); ?></a>
    6864            </li>
    69             <li id="tablink-developers"><a href="#developers"><?php esc_html_e( 'Development', 'wporg-plugins' ); ?></a></li>
    70         </ul>
    71         <script type="text/javascript">if ( '#changelog' == window.location.hash ) { window.setTimeout( function() { window.location.hash = '#developers'; }, 10 ); }</script>
    72     <?php endif; ?>
     65        <?php endif; ?>
     66        <li id="tablink-support">
     67            <a href="<?php echo esc_url( Template::get_support_url() ); ?>"><?php esc_html_e( 'Support', 'wporg-plugins' ); ?></a>
     68        </li>
     69        <li id="tablink-developers"><a href="<?php the_permalink(); ?>#developers"><?php esc_html_e( 'Development', 'wporg-plugins' ); ?></a></li>
     70        <?php if ( get_query_var( 'plugin_advanced' ) ) : ?>
     71            <li id="tablink-advanced"><a href="<?php the_permalink(); ?>advanced/"><?php esc_html_e( 'Advanced View', 'wporg-plugins' ); ?></a></li>
     72        <?php endif; ?>
     73    </ul>
     74    <script type="text/javascript">if ( '#changelog' == window.location.hash ) { window.setTimeout( function() { window.location.hash = '#developers'; }, 10 ); }</script>
    7375
    7476    <div class="entry-content">
Note: See TracChangeset for help on using the changeset viewer.