WordPress.org

Making WordPress.org


Ignore:
Timestamp:
11/21/2016 03:23:52 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Toggle the "Read More" links to "Show Less" after the section is expanded.
This also fixes a bug where the toggle was incorrectly hidden when visiting a page such as /hello-dolly/#changelog.

Fixes #2206

File:
1 edited

Legend:

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

    r4223 r4387  
    1515    <?php echo $section_content; ?>
    1616</div>
    17 <button type="button" class="button-link section-toggle" aria-controls="<?php echo esc_attr( $section_slug ); ?>"><?php _e( 'Read more', 'wporg-plugins' ); ?></button>
     17<button
     18    type="button"
     19    class="button-link section-toggle"
     20    aria-controls="<?php echo esc_attr( $section_slug ); ?>"
     21    data-show-less="<?php esc_attr_e( 'Show less', 'wporg-plugins' ); ?>"
     22    data-read-more="<?php esc_attr_e( 'Read more', 'wporg-plugins' ); ?>"
     23><?php _e( 'Read more', 'wporg-plugins' ); ?></button>
Note: See TracChangeset for help on using the changeset viewer.