- Timestamp:
- 04/12/2020 02:24:38 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-privacy-policy-content.php
r47284 r47572 373 373 374 374 $content_array = self::get_suggested_policy_text(); 375 376 375 $content = ''; 377 376 $toc = array( '<li><a href="#wp-privacy-policy-guide-introduction">' . __( 'Introduction' ) . '</a></li>' ); 378 377 $date_format = __( 'F j, Y' ); 379 $copy = __( 'Copy this section to clipboard' );380 $return_to_top = '<a href="#" class="return-to-top">' . __( '↑ Return to Top' ) . '</a>';381 378 382 379 foreach ( $content_array as $section ) { … … 386 383 387 384 if ( ! empty( $section['removed'] ) ) { 388 $class = ' 385 $class = 'text-removed'; 389 386 $date = date_i18n( $date_format, $section['removed'] ); 390 387 /* translators: %s: Date of plugin deactivation. */ … … 395 392 $removed = '<div class="error inline"><p>' . sprintf( $removed, $date ) . '</p></div>'; 396 393 } elseif ( ! empty( $section['updated'] ) ) { 397 $class = ' 394 $class = 'text-updated'; 398 395 $date = date_i18n( $date_format, $section['updated'] ); 399 396 /* translators: %s: Date of privacy policy text update. */ … … 409 406 $toc[] = sprintf( '<li><a href="#%1$s">%2$s</a>' . $meta . '</li>', $toc_id, $plugin_name ); 410 407 411 $content .= '<div class="privacy-text-section ' . $class . '">';408 $content .= '<div class="privacy-text-section ' . $class . '">'; 412 409 $content .= '<a id="' . $toc_id . '"> </a>'; 413 410 /* translators: %s: Plugin name. */ … … 416 413 417 414 $content .= '<div class="policy-text">' . $section['policy_text'] . '</div>'; 418 $content .= $return_to_top;415 $content .= '<a href="#" class="return-to-top">' . __( '↑ Return to Top' ) . '</a>'; 419 416 420 417 if ( empty( $section['removed'] ) ) { 421 $content .= '<div class="privacy-text-actions">'; 422 $content .= '<button type="button" class="privacy-text-copy button">'; 423 $content .= $copy; 424 $content .= '<span class="screen-reader-text">'; 425 /* translators: %s: Plugin name. */ 426 $content .= sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name ); 427 $content .= '</span>'; 428 $content .= '</button>'; 429 $content .= '</div>'; 430 } 431 432 $content .= "</div>\n"; // End of .privacy-text-section. 418 $content .= '<div class="privacy-text-actions">'; 419 $content .= '<button type="button" class="privacy-text-copy button">'; 420 $content .= __( 'Copy this section to clipboard' ); 421 $content .= '<span class="screen-reader-text">'; 422 /* translators: %s: Plugin name. */ 423 $content .= sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name ); 424 $content .= '</span>'; 425 $content .= '</button>'; 426 $content .= '<span class="success" aria-hidden="true">' . __( 'Copied!' ) . '</span>'; 427 $content .= '</div>'; 428 } 429 430 $content .= '</div>'; // End of .privacy-text-section. 433 431 } 434 432 435 433 if ( count( $toc ) > 2 ) { 436 434 ?> 437 <div 435 <div class="privacy-text-box-toc"> 438 436 <p><?php _e( 'Table of Contents' ); ?></p> 439 437 <ol> 440 <?php echo implode( "\n",$toc ); ?>438 <?php echo implode( $toc ); ?> 441 439 </ol> 442 440 </div>
Note: See TracChangeset
for help on using the changeset viewer.