Make WordPress Core

Ticket #60530: 60530.diff

File 60530.diff, 4.3 KB (added by swissspidy, 3 years ago)
  • src/wp-admin/includes/class-wp-privacy-policy-content.php

    diff --git src/wp-admin/includes/class-wp-privacy-policy-content.php src/wp-admin/includes/class-wp-privacy-policy-content.php
    index d676875932..e0775f7bea 100644
    final class WP_Privacy_Policy_Content {  
    466466                }
    467467
    468468                /* translators: Default privacy policy heading. */
    469                 $strings[] = '<h2>' . __( 'Who we are' ) . '</h2>';
     469                $strings[] = '<h2 class="wp-block-heading">' . __( 'Who we are' ) . '</h2>';
    470470
    471471                if ( $description ) {
    472472                        /* translators: Privacy policy tutorial. */
    … … final class WP_Privacy_Policy_Content {  
    494494                }
    495495
    496496                /* translators: Default privacy policy heading. */
    497                 $strings[] = '<h2>' . __( 'Comments' ) . '</h2>';
     497                $strings[] = '<h2 class="wp-block-heading">' . __( 'Comments' ) . '</h2>';
    498498
    499499                if ( $description ) {
    500500                        /* translators: Privacy policy tutorial. */
    … … final class WP_Privacy_Policy_Content {  
    507507                }
    508508
    509509                /* translators: Default privacy policy heading. */
    510                 $strings[] = '<h2>' . __( 'Media' ) . '</h2>';
     510                $strings[] = '<h2 class="wp-block-heading">' . __( 'Media' ) . '</h2>';
    511511
    512512                if ( $description ) {
    513513                        /* translators: Privacy policy tutorial. */
    … … final class WP_Privacy_Policy_Content {  
    525525                }
    526526
    527527                /* translators: Default privacy policy heading. */
    528                 $strings[] = '<h2>' . __( 'Cookies' ) . '</h2>';
     528                $strings[] = '<h2 class="wp-block-heading">' . __( 'Cookies' ) . '</h2>';
    529529
    530530                if ( $description ) {
    531531                        /* translators: Privacy policy tutorial. */
    … … final class WP_Privacy_Policy_Content {  
    543543
    544544                if ( ! $description ) {
    545545                        /* translators: Default privacy policy heading. */
    546                         $strings[] = '<h2>' . __( 'Embedded content from other websites' ) . '</h2>';
     546                        $strings[] = '<h2 class="wp-block-heading">' . __( 'Embedded content from other websites' ) . '</h2>';
    547547                        /* translators: Default privacy policy text. */
    548548                        $strings[] = '<p>' . $suggested_text . __( 'Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.' ) . '</p>';
    549549                        /* translators: Default privacy policy text. */
    … … final class WP_Privacy_Policy_Content {  
    560560                }
    561561
    562562                /* translators: Default privacy policy heading. */
    563                 $strings[] = '<h2>' . __( 'Who we share your data with' ) . '</h2>';
     563                $strings[] = '<h2 class="wp-block-heading">' . __( 'Who we share your data with' ) . '</h2>';
    564564
    565565                if ( $description ) {
    566566                        /* translators: Privacy policy tutorial. */
    … … final class WP_Privacy_Policy_Content {  
    573573                }
    574574
    575575                /* translators: Default privacy policy heading. */
    576                 $strings[] = '<h2>' . __( 'How long we retain your data' ) . '</h2>';
     576                $strings[] = '<h2 class="wp-block-heading">' . __( 'How long we retain your data' ) . '</h2>';
    577577
    578578                if ( $description ) {
    579579                        /* translators: Privacy policy tutorial. */
    … … final class WP_Privacy_Policy_Content {  
    586586                }
    587587
    588588                /* translators: Default privacy policy heading. */
    589                 $strings[] = '<h2>' . __( 'What rights you have over your data' ) . '</h2>';
     589                $strings[] = '<h2 class="wp-block-heading">' . __( 'What rights you have over your data' ) . '</h2>';
    590590
    591591                if ( $description ) {
    592592                        /* translators: Privacy policy tutorial. */
    … … final class WP_Privacy_Policy_Content {  
    597597                }
    598598
    599599                /* translators: Default privacy policy heading. */
    600                 $strings[] = '<h2>' . __( 'Where your data is sent' ) . '</h2>';
     600                $strings[] = '<h2 class="wp-block-heading">' . __( 'Where your data is sent' ) . '</h2>';
    601601
    602602                if ( $description ) {
    603603                        /* translators: Privacy policy tutorial. */
    … … final class WP_Privacy_Policy_Content {  
    662662                if ( $blocks ) {
    663663                        foreach ( $strings as $key => $string ) {
    664664                                if ( str_starts_with( $string, '<p>' ) ) {
    665                                         $strings[ $key ] = '<!-- wp:paragraph -->' . $string . '<!-- /wp:paragraph -->';
     665                                        $strings[ $key ] = "<!-- wp:paragraph -->\n" . $string . "\n<!-- /wp:paragraph -->\n";
    666666                                }
    667667
    668                                 if ( str_starts_with( $string, '<h2>' ) ) {
    669                                         $strings[ $key ] = '<!-- wp:heading -->' . $string . '<!-- /wp:heading -->';
     668                                if ( str_starts_with( $string, '<h2 ' ) ) {
     669                                        $strings[ $key ] = "<!-- wp:heading -->\n" . $string . "\n<!-- /wp:heading -->\n";
    670670                                }
    671671                        }
    672672                }