Making WordPress.org

Changeset 6475


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

Plugins: Remove remaining read-more links.

Props SergeyBiryukov.
Fixes #3032.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
Files:
1 deleted
3 edited

Legend:

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

    r6474 r6475  
    6868
    6969    if ( is_singular( 'plugin' ) ) {
    70         wp_enqueue_script( 'wporg-plugins-accordion', get_template_directory_uri() . '/js/section-accordion.js', array(), '20161121', true );
    7170        wp_enqueue_script( 'wporg-plugins-faq', get_template_directory_uri() . '/js/section-faq.js', array(), '20171218', true );
    7271    }
     
    141140        'wporg-plugins-locale-banner',
    142141        'wporg-plugins-stats',
    143         'wporg-plugins-accordion',
    144142        'wporg-plugins-client',
    145143        'wporg-plugins-faq',
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php

    r6469 r6475  
    1313use WordPressdotorg\Plugin_Directory\Template;
    1414
    15 global $section, $section_slug, $section_content, $section_read_more, $post;
     15global $section, $section_slug, $section_content, $post;
    1616
    1717$content   = Plugin_Directory::instance()->split_post_content_into_pages( get_the_content() );
     
    100100                $section = array_pop( $section );
    101101
    102                 $section_no_read_mores = array( 'description', 'screenshots', 'installation', 'faq', 'reviews' );
    103                 // If the FAQ section is the newer `<dl>` form, no need to do read-more for it.
    104                 if ( false !== stripos( $section_content, '<dl>' ) ) {
    105                     $section_no_read_mores[] = 'faq';
    106                 }
    107 
    108                 $section_read_more = ! in_array( $section_slug, $section_no_read_mores, true );
    109 
    110102                get_template_part( 'template-parts/section' );
    111103            endforeach;
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section.php

    r6296 r6475  
    88 */
    99
    10 global $section, $section_slug, $section_content, $section_read_more;
     10global $section, $section_slug, $section_content;
    1111
    1212$prefix = in_array( $section_slug, array( 'screenshots', 'faq' ), true ) ? '' : 'tab-';
    1313
    1414$classes = [ 'plugin-' . $section_slug, 'section' ];
    15 if ( $section_read_more ) {
    16     $classes[] = 'read-more';
    17 }
    1815$classes = implode( ' ', $classes );
    1916?>
     
    2320    <?php echo $section_content; ?>
    2421</div>
    25 <?php if ( $section_read_more ) : ?>
    26     <button
    27         type="button"
    28         class="button-link section-toggle"
    29         aria-controls="<?php echo esc_attr( $prefix . $section_slug ); ?>"
    30         aria-describedby="<?php echo esc_attr( $section_slug . '-header' ); ?>"
    31         aria-expanded="false"
    32         data-show-less="<?php esc_attr_e( 'Show less', 'wporg-plugins' ); ?>"
    33         data-read-more="<?php esc_attr_e( 'Read more', 'wporg-plugins' ); ?>"
    34     >
    35     <?php esc_html_e( 'Read more', 'wporg-plugins' ); ?>
    36     </button>
    37 <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.