WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/14/2018 04:45:57 PM (2 years ago)
Author:
azaozz
Message:

Privacy: fix markup for the table of contents on privacy policy guide screen.

Props ocean90, azaozz.
Fixes #44056.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r43263 r43265  
    16101610
    16111611        $content = '';
    1612         $toc = array( '<li><a href="#">' . __( 'Introduction' ) . '</a></li>' );
    1613         $date_format = get_option( 'date_format' );
     1612        $toc = array( '<li><a href="#wp-privacy-policy-guide-introduction">' . __( 'Introduction' ) . '</a></li>' );
     1613        $date_format = __( 'F j, Y' );
    16141614        $copy = __( 'Copy' );
    16151615        $return_to_top = '<a href="#" class="return-to-top">' . __( '&uarr; Return to Top' ) . '</a>';
     
    16361636
    16371637            $plugin_name = esc_html( $section['plugin_name'] );
    1638             $toc_id = sanitize_title( $plugin_name );
     1638            $toc_id = 'wp-privacy-policy-guide-' . sanitize_title( $plugin_name );
    16391639            $toc[] = sprintf( '<li><a href="#%1$s">%2$s</a>' . $meta . '</li>', $toc_id, $plugin_name );
    16401640
    16411641            $content .= '<div class="privacy-text-section' . $class . '">';
    16421642            $content .= '<a id="' . $toc_id . '">&nbsp;</a>';
     1643            /* translators: %s: plugin name */
    16431644            $content .= '<h2>' . sprintf( __( 'Source: %s' ), $plugin_name ) . '</h2>';
    16441645            $content .= $removed;
     
    16731674        <div class="privacy-text-box">
    16741675            <div class="privacy-text-box-head">
     1676                <a id="wp-privacy-policy-guide-introduction">&nbsp;</a>
    16751677                <h2><?php _e( 'Introduction' ); ?></h2>
    16761678                <p><?php _e( 'Hello,' ); ?></p>
Note: See TracChangeset for help on using the changeset viewer.