Making WordPress.org

Ticket #2317: 2317.diff

File 2317.diff, 1.0 KB (added by audrasjb, 7 years ago)

add accessible link to specific sections on plugin's page

  • wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section.php

    diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section.php
    index cebb291..3bcfb2f 100644
    a b global $section, $section_slug, $section_content, $section_read_more; 
    2222        class="plugin-<?php echo esc_attr( $section_slug ); ?> section <?php if ( $section_read_more ) { echo 'read-more'; } ?>"
    2323>
    2424        <h2 id="<?php echo esc_attr( $section_slug . '-header' ); ?>"><?php echo $section['title']; ?></h2>
     25        <a href="#<?php echo esc_attr( $prefix.$section_slug ); ?>" class="anchor"><span aria-hidden="true" class="dashicons dashicons-admin-links"></span><span class="screen-reader-text"><?php echo $section['title']; ?></span></a>
     26
    2527        <?php echo $section_content; ?>
    2628</div>
    2729<?php if ( $section_read_more ) : ?>