mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 14:35:07 +00:00
Privacy: Replace Policy Name with an auto increment to avoid internationalized plugin name issues.
This changeset replaces plugin sanitized names with an auto increment integer to fix an issue with accordions displaying privacy policies for plugins with special characters in their names. Follow-up to [50161]. Props ecgan, sabernhardt, audrasjb. Fixes #62713. Built from https://develop.svn.wordpress.org/trunk@59732 git-svn-id: http://core.svn.wordpress.org/trunk@59074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
49e835dd8a
commit
6376a8f6f7
@ -381,7 +381,11 @@ final class WP_Privacy_Policy_Content {
|
||||
$content = '';
|
||||
$date_format = __( 'F j, Y' );
|
||||
|
||||
$i = 0;
|
||||
|
||||
foreach ( $content_array as $section ) {
|
||||
++$i;
|
||||
|
||||
$class = '';
|
||||
$meta = '';
|
||||
$removed = '';
|
||||
@ -409,11 +413,9 @@ final class WP_Privacy_Policy_Content {
|
||||
}
|
||||
|
||||
$plugin_name = esc_html( $section['plugin_name'] );
|
||||
|
||||
$sanitized_policy_name = sanitize_title_with_dashes( $plugin_name );
|
||||
?>
|
||||
<h4 class="privacy-settings-accordion-heading">
|
||||
<button aria-expanded="false" class="privacy-settings-accordion-trigger" aria-controls="privacy-settings-accordion-block-<?php echo $sanitized_policy_name; ?>" type="button">
|
||||
<button aria-expanded="false" class="privacy-settings-accordion-trigger" aria-controls="privacy-settings-accordion-block-<?php echo $i; ?>" type="button">
|
||||
<span class="title"><?php echo $plugin_name; ?></span>
|
||||
<?php if ( ! empty( $section['removed'] ) || ! empty( $section['updated'] ) ) : ?>
|
||||
<span class="badge <?php echo $badge_class; ?>"> <?php echo $badge_title; ?></span>
|
||||
@ -421,7 +423,7 @@ final class WP_Privacy_Policy_Content {
|
||||
<span class="icon"></span>
|
||||
</button>
|
||||
</h4>
|
||||
<div id="privacy-settings-accordion-block-<?php echo $sanitized_policy_name; ?>" class="privacy-settings-accordion-panel privacy-text-box-body" hidden="hidden">
|
||||
<div id="privacy-settings-accordion-block-<?php echo $i; ?>" class="privacy-settings-accordion-panel privacy-text-box-body" hidden="hidden">
|
||||
<?php
|
||||
echo $removed;
|
||||
echo $section['policy_text'];
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59730';
|
||||
$wp_version = '6.8-alpha-59732';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user