Make WordPress Core


Ignore:
Timestamp:
05/14/2018 04:47:37 PM (7 years ago)
Author:
azaozz
Message:

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

Props ocean90, azaozz.
Merges [43265] to the 4.9 branch.
Fixes #44056.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/misc.php

    r43264 r43266  
    15591559
    15601560        $content = '';
    1561         $toc = array( '<li><a href="#">' . __( 'Introduction' ) . '</a></li>' );
    1562         $date_format = get_option( 'date_format' );
     1561        $toc = array( '<li><a href="#wp-privacy-policy-guide-introduction">' . __( 'Introduction' ) . '</a></li>' );
     1562        $date_format = __( 'F j, Y' );
    15631563        $copy = __( 'Copy' );
    15641564        $return_to_top = '<a href="#" class="return-to-top">' . __( '&uarr; Return to Top' ) . '</a>';
     
    15851585
    15861586            $plugin_name = esc_html( $section['plugin_name'] );
    1587             $toc_id = sanitize_title( $plugin_name );
     1587            $toc_id = 'wp-privacy-policy-guide-' . sanitize_title( $plugin_name );
    15881588            $toc[] = sprintf( '<li><a href="#%1$s">%2$s</a>' . $meta . '</li>', $toc_id, $plugin_name );
    15891589
    15901590            $content .= '<div class="privacy-text-section' . $class . '">';
    15911591            $content .= '<a id="' . $toc_id . '">&nbsp;</a>';
     1592            /* translators: %s: plugin name */
    15921593            $content .= '<h2>' . sprintf( __( 'Source: %s' ), $plugin_name ) . '</h2>';
    15931594            $content .= $removed;
     
    16221623        <div class="privacy-text-box">
    16231624            <div class="privacy-text-box-head">
     1625                <a id="wp-privacy-policy-guide-introduction">&nbsp;</a>
    16241626                <h2><?php _e( 'Introduction' ); ?></h2>
    16251627                <p><?php _e( 'Hello,' ); ?></p>
Note: See TracChangeset for help on using the changeset viewer.