WordPress at a glance
функция не описана

WP_Sitemaps_Stylesheet::get_stylesheet_css() public WP 5.5.0

Gets the CSS to be included in sitemap XSL stylesheets.

It's a method of the class: WP_Sitemaps_Stylesheet{}

Hooks from the method
Возвращает

String. The CSS.

Использование

$WP_Sitemaps_Stylesheet = new WP_Sitemaps_Stylesheet();
$WP_Sitemaps_Stylesheet->get_stylesheet_css();

Changelog

Since 5.5.0 Introduced.

Код WP_Sitemaps_Stylesheet::get_stylesheet_css() WP 5.5.1

<?php
public function get_stylesheet_css() {
	$text_align = is_rtl() ? 'right' : 'left';

	$css = <<<EOF

				body {
					font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
					color: #444;
				}

				#sitemap__table {
					border: solid 1px #ccc;
					border-collapse: collapse;
				}

		 		#sitemap__table tr td.loc {
					/*
					 * URLs should always be LTR.
					 * See https://core.trac.wordpress.org/ticket/16834
					 * and https://core.trac.wordpress.org/ticket/49949
					 */
					direction: ltr;
				}

				#sitemap__table tr th {
					text-align: {$text_align};
				}

				#sitemap__table tr td,
				#sitemap__table tr th {
					padding: 10px;
				}

				#sitemap__table tr:nth-child(odd) td {
					background-color: #eee;
				}

				a:hover {
					text-decoration: none;
				}

EOF;

	/**
	 * Filters the CSS only for the sitemap stylesheet.
	 *
	 * @since 5.5.0
	 *
	 * @param string $css CSS to be applied to default XSL file.
	 */
	return apply_filters( 'wp_sitemaps_stylesheet_css', $css );
}