Making WordPress.org


Ignore:
Timestamp:
11/24/2016 01:38:06 AM (8 years ago)
Author:
dd32
Message:

Plugin Directory: Clean up the section templates, bring some custom functionality into their respective shortcodes and shifting the read-more logic from CSS/JS to PHP/HTML.

File:
1 edited

Legend:

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

    r4387 r4410  
    88 */
    99
    10 global $section, $section_slug, $section_content;
     10global $section, $section_slug, $section_content, $section_read_more;
     11
    1112?>
    1213
    13 <div id="<?php echo esc_attr( $section_slug ); ?>" class="read-more" aria-expanded="false">
     14<div
     15    id="<?php echo esc_attr( $section_slug ); ?>"
     16    <?php if ( $section_read_more ) : ?>
     17        class="section read-more"
     18        aria-expanded="false"
     19    <?php else: ?>
     20        class="section"
     21    <?php endif; ?>
     22>
    1423    <h2><?php echo $section['title']; ?></h2>
    1524    <?php echo $section_content; ?>
    1625</div>
     26<?php if ( $section_read_more ) : ?>
    1727<button
    1828    type="button"
     
    2232    data-read-more="<?php esc_attr_e( 'Read more', 'wporg-plugins' ); ?>"
    2333><?php _e( 'Read more', 'wporg-plugins' ); ?></button>
     34<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.