Files
roi-theme/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-stylesheet.php
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

70 lines
1.6 KiB
PHP
Executable File

<?php
/**
* The stylesheet class for the sitemaps.
*
* @since 0.9.0
* @package RankMath
* @subpackage RankMath\Sitemap
* @author Rank Math <support@rankmath.com>
*
* @copyright Copyright (C) 2008-2019, Yoast BV
* The following code is a derivative work of the code from the Yoast(https://github.com/Yoast/wordpress-seo/), which is licensed under GPL v3.
*/
namespace RankMath\Sitemap;
use RankMath\Traits\Hooker;
defined( 'ABSPATH' ) || exit;
/**
* Stylesheet class.
*/
class Stylesheet extends XML {
use Hooker;
/**
* Hold sitemap type.
*
* @var string
*/
public $type;
/**
* Output the XSL for the XML sitemap.
*
* @param string $type Sitemap type.
*/
public function output( $type ) {
$this->type = $type;
$expires = gmdate( 'D, d M Y H:i:s', ( time() + YEAR_IN_SECONDS ) );
$this->send_headers(
[
'Cache-Control' => 'maxage=' . YEAR_IN_SECONDS,
'Expires' => $expires . ' GMT',
'Etag' => md5( $expires . $this->type ),
],
true
);
/* translators: 1. separator, 2. blogname */
$title = sprintf( __( 'XML Sitemap %1$s %2$s', 'rank-math' ), '-', get_bloginfo( 'name', 'display' ) );
/* translators: 1. separator, 2. blogname */
$kml_title = sprintf( __( 'Locations Sitemap %1$s %2$s', 'rank-math' ), '-', get_bloginfo( 'name', 'display' ) );
if ( 'main' !== $type ) {
/**
* Fires for the output of XSL for XML sitemaps, other than type "main".
*/
$this->do_action( "sitemap/xsl_{$type}", $title, $kml_title );
die;
}
require_once 'sitemap-xsl.php';
die;
}
}