Make WordPress Core

Ticket #50449: 50449.3.diff

File 50449.3.diff, 1.9 KB (added by ramiy, 5 years ago)
  • wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php

     
    248248         * @return string The CSS.
    249249         */
    250250        public function get_stylesheet_css() {
    251                 $css = '
    252                         body {
    253                                 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    254                                 color: #444;
    255                         }
     251                $text_align = is_rtl() ? 'right' : 'left';
    256252
    257                         #sitemap__table {
    258                                 border: solid 1px #ccc;
    259                                 border-collapse: collapse;
    260                         }
     253                $css = <<<EOF
     254               
     255                                        body {
     256                                                font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
     257                                                color: #444;
     258                                        }
     259                                       
     260                                        #sitemap__table {
     261                                                border: solid 1px #ccc;
     262                                                border-collapse: collapse;
     263                                        }
     264                                       
     265                                        #sitemap__table tr th.loc,
     266                                        #sitemap__table tr td.loc {
     267                                                /*
     268                                                 * URLs should always be LTR.
     269                                                 * see https://core.trac.wordpress.org/ticket/16834 and
     270                                                 * https://core.trac.wordpress.org/ticket/49949
     271                                                 */
     272                                                direction: ltr;
     273                                                text-align: left;
     274                                        }
     275                                       
     276                                        #sitemap__table tr th.loc {
     277                                                text-align: {$text_align};
     278                                        }
     279                                       
     280                                        #sitemap__table tr td,
     281                                        #sitemap__table tr th {
     282                                                padding: 10px;
     283                                        }
     284                                       
     285                                        #sitemap__table tr:nth-child(odd) td {
     286                                                background-color: #eee;
     287                                        }
     288                                       
     289                                        a:hover {
     290                                                text-decoration: none;
     291                                        }
     292EOF;
    261293
    262                         #sitemap__table tr th {
    263                                 text-align: left;
    264                         }
    265 
    266                         #sitemap__table tr td,
    267                         #sitemap__table tr th {
    268                                 padding: 10px;
    269                         }
    270 
    271                         #sitemap__table tr:nth-child(odd) td {
    272                                 background-color: #eee;
    273                         }
    274 
    275                         a:hover {
    276                                 text-decoration: none;
    277                         }';
    278 
    279294                /**
    280295                 * Filters the CSS only for the sitemap stylesheet.
    281296                 *