Make WordPress Core

Ticket #50622: 50622.diff

File 50622.diff, 4.5 KB (added by swissspidy, 6 years ago)
  • src/wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php

    diff --git src/wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php src/wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php
    index 652a2b75dd..28c7936a36 100644
    class WP_Sitemaps_Stylesheet { 
    9191                                </style>
    9292                        </head>
    9393                        <body>
    94                                 <div id="sitemap__header">
    95                                         <h1>{$title}</h1>
    96                                         <p>{$description}</p>
    97                                         <p>{$learn_more}</p>
    98                                 </div>
    99                                 <div id="sitemap__content">
    100                                         <p class="text">{$text}</p>
    101                                         <table id="sitemap__table">
    102                                                 <thead>
    103                                                         <tr>
    104                                                                 <th class="loc">{$url}</th>
    105                                                                 <xsl:if test="\$has-lastmod">
    106                                                                         <th class="lastmod">{$lastmod}</th>
    107                                                                 </xsl:if>
    108                                                                 <xsl:if test="\$has-changefreq">
    109                                                                         <th class="changefreq">{$changefreq}</th>
    110                                                                 </xsl:if>
    111                                                                 <xsl:if test="\$has-priority">
    112                                                                         <th class="priority">{$priority}</th>
    113                                                                 </xsl:if>
    114                                                         </tr>
    115                                                 </thead>
    116                                                 <tbody>
    117                                                         <xsl:for-each select="sitemap:urlset/sitemap:url">
     94                                <div id="sitemap">
     95                                        <div id="sitemap__header">
     96                                                <h1>{$title}</h1>
     97                                                <p>{$description}</p>
     98                                                <p>{$learn_more}</p>
     99                                        </div>
     100                                        <div id="sitemap__content">
     101                                                <p class="text">{$text}</p>
     102                                                <table id="sitemap__table">
     103                                                        <thead>
    118104                                                                <tr>
    119                                                                         <td class="loc"><a href="{sitemap:loc}"><xsl:value-of select="sitemap:loc" /></a></td>
     105                                                                        <th class="loc">{$url}</th>
    120106                                                                        <xsl:if test="\$has-lastmod">
    121                                                                                 <td class="lastmod"><xsl:value-of select="sitemap:lastmod" /></td>
     107                                                                                <th class="lastmod">{$lastmod}</th>
    122108                                                                        </xsl:if>
    123109                                                                        <xsl:if test="\$has-changefreq">
    124                                                                                 <td class="changefreq"><xsl:value-of select="sitemap:changefreq" /></td>
     110                                                                                <th class="changefreq">{$changefreq}</th>
    125111                                                                        </xsl:if>
    126112                                                                        <xsl:if test="\$has-priority">
    127                                                                                 <td class="priority"><xsl:value-of select="sitemap:priority" /></td>
     113                                                                                <th class="priority">{$priority}</th>
    128114                                                                        </xsl:if>
    129115                                                                </tr>
    130                                                         </xsl:for-each>
    131                                                 </tbody>
    132                                         </table>
     116                                                        </thead>
     117                                                        <tbody>
     118                                                                <xsl:for-each select="sitemap:urlset/sitemap:url">
     119                                                                        <tr>
     120                                                                                <td class="loc"><a href="{sitemap:loc}"><xsl:value-of select="sitemap:loc" /></a></td>
     121                                                                                <xsl:if test="\$has-lastmod">
     122                                                                                        <td class="lastmod"><xsl:value-of select="sitemap:lastmod" /></td>
     123                                                                                </xsl:if>
     124                                                                                <xsl:if test="\$has-changefreq">
     125                                                                                        <td class="changefreq"><xsl:value-of select="sitemap:changefreq" /></td>
     126                                                                                </xsl:if>
     127                                                                                <xsl:if test="\$has-priority">
     128                                                                                        <td class="priority"><xsl:value-of select="sitemap:priority" /></td>
     129                                                                                </xsl:if>
     130                                                                        </tr>
     131                                                                </xsl:for-each>
     132                                                        </tbody>
     133                                                </table>
     134                                        </div>
    133135                                </div>
    134136                        </body>
    135137                </html>
    XSL; 
    199201                                </style>
    200202                        </head>
    201203                        <body>
    202                                 <div id="sitemap__header">
    203                                         <h1>{$title}</h1>
    204                                         <p>{$description}</p>
    205                                         <p>{$learn_more}</p>
    206                                 </div>
    207                                 <div id="sitemap__content">
    208                                         <p class="text">{$text}</p>
    209                                         <table id="sitemap__table">
    210                                                 <thead>
    211                                                         <tr>
    212                                                                 <th class="loc">{$url}</th>
    213                                                                 <xsl:if test="\$has-lastmod">
    214                                                                         <th class="lastmod">{$lastmod}</th>
    215                                                                 </xsl:if>
    216                                                         </tr>
    217                                                 </thead>
    218                                                 <tbody>
    219                                                         <xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">
     204                                <div id="sitemap">
     205                                        <div id="sitemap__header">
     206                                                <h1>{$title}</h1>
     207                                                <p>{$description}</p>
     208                                                <p>{$learn_more}</p>
     209                                        </div>
     210                                        <div id="sitemap__content">
     211                                                <p class="text">{$text}</p>
     212                                                <table id="sitemap__table">
     213                                                        <thead>
    220214                                                                <tr>
    221                                                                         <td class="loc"><a href="{sitemap:loc}"><xsl:value-of select="sitemap:loc" /></a></td>
     215                                                                        <th class="loc">{$url}</th>
    222216                                                                        <xsl:if test="\$has-lastmod">
    223                                                                                 <td class="lastmod"><xsl:value-of select="sitemap:lastmod" /></td>
     217                                                                                <th class="lastmod">{$lastmod}</th>
    224218                                                                        </xsl:if>
    225219                                                                </tr>
    226                                                         </xsl:for-each>
    227                                                 </tbody>
    228                                         </table>
     220                                                        </thead>
     221                                                        <tbody>
     222                                                                <xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">
     223                                                                        <tr>
     224                                                                                <td class="loc"><a href="{sitemap:loc}"><xsl:value-of select="sitemap:loc" /></a></td>
     225                                                                                <xsl:if test="\$has-lastmod">
     226                                                                                        <td class="lastmod"><xsl:value-of select="sitemap:lastmod" /></td>
     227                                                                                </xsl:if>
     228                                                                        </tr>
     229                                                                </xsl:for-each>
     230                                                        </tbody>
     231                                                </table>
     232                                        </div>
    229233                                </div>
    230234                        </body>
    231235                </html>