| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/xsl.tar |
default.php 0000666 00000031502 15114462405 0006710 0 ustar 00 <?php
/**
* XSL stylesheet for the sitemap.
*
* @since 4.0.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// phpcs:disable
$utmMedium = 'xml-sitemap';
if ( '/sitemap.rss' === $sitemapPath ) {
$utmMedium = 'rss-sitemap';
}
?>
<xsl:stylesheet
version="2.0"
xmlns:html="http://www.w3.org/TR/html40"
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:variable name="fileType">
<xsl:choose>
<xsl:when test="//channel">RSS</xsl:when>
<xsl:when test="//sitemap:url">Sitemap</xsl:when>
<xsl:otherwise>SitemapIndex</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<xsl:choose>
<xsl:when test="$fileType='Sitemap' or $fileType='RSS'"><?php echo $title; ?></xsl:when>
<xsl:otherwise><?php _e( 'Sitemap Index', 'all-in-one-seo-pack' ); ?></xsl:otherwise>
</xsl:choose>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php aioseo()->templates->getTemplate( 'sitemap/xsl/styles.php' ); ?>
</head>
<body>
<xsl:variable name="amountOfURLs">
<xsl:choose>
<xsl:when test="$fileType='RSS'">
<xsl:value-of select="count(//channel/item)"></xsl:value-of>
</xsl:when>
<xsl:when test="$fileType='Sitemap'">
<xsl:value-of select="count(sitemap:urlset/sitemap:url)"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="count(sitemap:sitemapindex/sitemap:sitemap)"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="Header">
<xsl:with-param name="title"><?php echo $title; ?></xsl:with-param>
<xsl:with-param name="amountOfURLs" select="$amountOfURLs"/>
<xsl:with-param name="fileType" select="$fileType"/>
</xsl:call-template>
<div class="content">
<div class="container">
<xsl:choose>
<xsl:when test="$amountOfURLs = 0"><xsl:call-template name="emptySitemap"/></xsl:when>
<xsl:when test="$fileType='Sitemap'"><xsl:call-template name="sitemapTable"/></xsl:when>
<xsl:when test="$fileType='RSS'"><xsl:call-template name="sitemapRSS"/></xsl:when>
<xsl:otherwise><xsl:call-template name="siteindexTable"/></xsl:otherwise>
</xsl:choose>
</div>
</div>
</body>
</html>
</xsl:template>
<xsl:template name="siteindexTable">
<?php
$sitemapIndex = aioseo()->sitemap->helpers->filename( 'general' );
$sitemapIndex = $sitemapIndex ? $sitemapIndex : 'sitemap';
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/breadcrumb.php',
[
'items' => [
[ 'title' => __( 'Sitemap Index', 'all-in-one-seo-pack' ), 'url' => $sitemapUrl ],
]
]
);
?>
<div class="table-wrapper">
<table cellpadding="3">
<thead>
<tr>
<th class="left">
<?php _e( 'URL', 'all-in-one-seo-pack' ); ?>
</th>
<th><?php _e( 'URL Count', 'all-in-one-seo-pack' ); ?></th>
<th>
<?php
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/sortable-column.php',
[
'parameters' => $sitemapParams,
'sitemapUrl' => $sitemapUrl,
'column' => 'date',
'title' => __( 'Last Updated', 'all-in-one-seo-pack' )
]
);
?>
</th>
</tr>
</thead>
<tbody>
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">
<?php
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/xsl-sort.php',
[
'parameters' => $sitemapParams,
'node' => 'sitemap:lastmod',
]
);
?>
<tr>
<xsl:if test="position() mod 2 != 0">
<xsl:attribute name="class">stripe</xsl:attribute>
</xsl:if>
<td class="left">
<a>
<xsl:attribute name="href">
<xsl:value-of select="sitemap:loc" />
</xsl:attribute>
<xsl:value-of select="sitemap:loc"/>
</a>
</td>
<td>
<?php if ( ! empty( $xslParams['counts'] ) ) : ?>
<div class="item-count">
<xsl:choose>
<?php foreach ( $xslParams['counts'] as $slug => $count ) : ?>
<xsl:when test="contains(sitemap:loc, '<?php echo $slug; ?>')"><?php echo $count; ?></xsl:when>
<?php endforeach; ?>
<xsl:otherwise><?php echo $linksPerIndex; ?></xsl:otherwise>
</xsl:choose>
</div>
<?php endif; ?>
</td>
<td class="datetime">
<?php
if ( ! empty( $xslParams['datetime'] ) ) {
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/date-time.php',
[
'datetime' => $xslParams['datetime'],
'node' => 'sitemap:loc'
]
);
}
?>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</div>
</xsl:template>
<xsl:template name="sitemapRSS">
<?php
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/breadcrumb.php',
[
'items' => [
[ 'title' => $title, 'url' => $sitemapUrl ],
]
]
);
?>
<div class="table-wrapper">
<table cellpadding="3">
<thead>
<tr>
<th class="left"><?php _e( 'URL', 'all-in-one-seo-pack' ); ?></th>
<th>
<?php
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/sortable-column.php',
[
'parameters' => $sitemapParams,
'sitemapUrl' => $sitemapUrl,
'column' => 'date',
'title' => __( 'Publication Date', 'all-in-one-seo-pack' )
]
);
?>
</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="//channel/item">
<?php
if ( ! empty( $sitemapParams['sitemap-order'] ) ) {
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/xsl-sort.php',
[
'parameters' => $sitemapParams,
'node' => 'pubDate',
]
);
}
?>
<tr>
<xsl:if test="position() mod 2 != 0">
<xsl:attribute name="class">stripe</xsl:attribute>
</xsl:if>
<td class="left">
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:value-of select="link"/>
</a>
</td>
<td class="datetime">
<?php
if ( ! empty( $xslParams['datetime'] ) ) {
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/date-time.php',
[
'datetime' => $xslParams['datetime'],
'node' => 'link'
]
);
}
?>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</div>
</xsl:template>
<xsl:template name="sitemapTable">
<?php
$sitemapIndex = aioseo()->sitemap->helpers->filename( 'general' );
$sitemapIndex = $sitemapIndex ?: 'sitemap';
$excludeImages = isset( $excludeImages ) ? $excludeImages : aioseo()->sitemap->helpers->excludeImages();
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/breadcrumb.php',
[
'items' => [
[ 'title' => __( 'Sitemap Index', 'all-in-one-seo-pack' ), 'url' => home_url( "/$sitemapIndex.xml" ) ],
[ 'title' => $title, 'url' => $sitemapUrl ],
]
]
);
?>
<div class="table-wrapper">
<table cellpadding="3">
<thead>
<tr>
<th class="left">
<?php _e( 'URL', 'all-in-one-seo-pack' ); ?>
</th>
<?php if ( ! $excludeImages ) : ?>
<th>
<?php
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/sortable-column.php',
[
'parameters' => $sitemapParams,
'sitemapUrl' => $sitemapUrl,
'column' => 'image',
'title' => __( 'Images', 'all-in-one-seo-pack' )
]
);
?>
</th>
<?php endif; ?>
<th>
<?php
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/sortable-column.php',
[
'parameters' => $sitemapParams,
'sitemapUrl' => $sitemapUrl,
'column' => 'changefreq',
'title' => __( 'Change Frequency', 'all-in-one-seo-pack' )
]
);
?>
</th>
<th>
<?php
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/sortable-column.php',
[
'parameters' => $sitemapParams,
'sitemapUrl' => $sitemapUrl,
'column' => 'priority',
'title' => __( 'Priority', 'all-in-one-seo-pack' )
]
);
?>
</th>
<th>
<?php
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/sortable-column.php',
[
'parameters' => $sitemapParams,
'sitemapUrl' => $sitemapUrl,
'column' => 'date',
'title' => __( 'Last Updated', 'all-in-one-seo-pack' )
]
);
?>
</th>
</tr>
</thead>
<tbody>
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:for-each select="sitemap:urlset/sitemap:url">
<?php
if ( ! empty( $sitemapParams['sitemap-order'] ) ) {
switch ( $sitemapParams['sitemap-order'] ) {
case 'image':
$node = 'count(image:image)';
break;
case 'date':
$node = 'sitemap:lastmod';
break;
default:
$node = 'sitemap:' . $sitemapParams['sitemap-order'];
break;
}
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/xsl-sort.php',
[
'parameters' => $sitemapParams,
'node' => $node,
]
);
}
?>
<tr>
<xsl:if test="position() mod 2 != 0">
<xsl:attribute name="class">stripe</xsl:attribute>
</xsl:if>
<td class="left">
<xsl:variable name="itemURL">
<xsl:value-of select="sitemap:loc"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="count(./*[@rel='alternate']) > 0">
<xsl:for-each select="./*[@rel='alternate']">
<xsl:if test="position() = last()">
<a href="{current()/@href}" class="localized">
<xsl:value-of select="@href"/>
</a>  → <xsl:value-of select="@hreflang"/>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<a href="{$itemURL}">
<xsl:value-of select="sitemap:loc"/>
</a>
</xsl:otherwise>
</xsl:choose>
<xsl:for-each select="./*[@rel='alternate']">
<br />
<xsl:if test="position() != last()">
<a href="{current()/@href}" class="localized">
<xsl:value-of select="@href"/>
</a>  → <xsl:value-of select="@hreflang"/>
</xsl:if>
</xsl:for-each>
</td>
<?php if ( ! $excludeImages ) : ?>
<td>
<div class="item-count">
<xsl:value-of select="count(image:image)"/>
</div>
</td>
<?php endif; ?>
<td>
<xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/>
</td>
<td>
<xsl:if test="string(number(sitemap:priority))!='NaN'">
<xsl:call-template name="formatPriority">
<xsl:with-param name="priority" select="sitemap:priority"/>
</xsl:call-template>
</xsl:if>
</td>
<td class="datetime">
<?php
if ( ! empty( $xslParams['datetime'] ) ) {
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/date-time.php',
[
'datetime' => $xslParams['datetime'],
'node' => 'sitemap:loc'
]
);
}
?>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</div>
<?php
if ( ! empty( $xslParams['pagination'] ) ) {
aioseo()->templates->getTemplate(
'sitemap/xsl/partials/pagination.php',
[
'sitemapUrl' => $sitemapUrl,
'currentPage' => $currentPage,
'linksPerIndex' => $linksPerIndex,
'total' => $xslParams['pagination']['total'],
'showing' => $xslParams['pagination']['showing']
]
);
}
?>
</xsl:template>
<?php aioseo()->templates->getTemplate( 'sitemap/xsl/templates/header.php', [ 'utmMedium' => $utmMedium ] ); ?>
<?php aioseo()->templates->getTemplate( 'sitemap/xsl/templates/format-priority.php' ); ?>
<?php
aioseo()->templates->getTemplate( 'sitemap/xsl/templates/empty-sitemap.php', [
'utmMedium' => $utmMedium,
'items' => [
[ 'title' => __( 'Sitemap Index', 'all-in-one-seo-pack' ), 'url' => $sitemapUrl ]
]
] );
?>
</xsl:stylesheet>
styles.php 0000666 00000003512 15114462405 0006607 0 ustar 00 <?php
/**
* Styles for the sitemap.
*
* @since 4.1.5
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// phpcs:disable
?>
<style type="text/css">
body {
margin: 0;
font-family: Helvetica, Arial, sans-serif;
font-size: 68.5%;
}
#content-head {
background-color: #141B38;
padding: 20px 40px;
}
#content-head h1,
#content-head p,
#content-head a {
color: #fff;
font-size: 1.2em;
}
#content-head h1 {
font-size: 2em;
}
table {
margin: 20px 40px;
border: none;
border-collapse: collapse;
font-size: 1em;
width: 75%;
}
th {
border-bottom: 1px solid #ccc;
text-align: left;
padding: 15px 5px;
font-size: 14px;
}
td {
padding: 10px 5px;
border-left: 3px solid #fff;
}
tr.stripe {
background-color: #f7f7f7;
}
table td a:not(.localized) {
display: block;
}
table td a img {
max-height: 30px;
margin: 6px 3px;
}
.empty-sitemap {
margin: 20px 40px;
width: 75%;
}
.empty-sitemap__title {
font-size: 18px;
line-height: 125%;
margin: 12px 0;
}
.empty-sitemap svg {
width: 140px;
height: 140px;
}
.empty-sitemap__buttons {
margin-bottom: 30px;
}
.empty-sitemap__buttons .button {
margin-right: 5px;
}
.breadcrumb {
margin: 20px 40px;
width: 75%;
display: flex;
align-items: center;
font-size: 12px;
font-weight: 600;
}
.breadcrumb a {
color: #141B38;
text-decoration: none;
}
.breadcrumb svg {
margin: 0 10px;
}
@media (max-width: 1023px) {
.breadcrumb svg:not(.back),
.breadcrumb a:not(:last-of-type),
.breadcrumb span {
display: none;
}
.breadcrumb a:last-of-type::before {
content: '<?php _e( 'Back', 'all-in-one-seo-pack' ); ?>'
}
}
@media (min-width: 1024px) {
.breadcrumb {
font-size: 14px;
}
.breadcrumb a {
font-weight: 400;
}
.breadcrumb svg.back {
display: none;
}
}
</style>
partials/pagination.php 0000666 00000003645 15114462405 0011243 0 ustar 00 <?php
/**
* XSL Pagination partial for the sitemap.
*
* @since 4.1.5
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Don't allow pagination for now.
return;
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
// Check if requires pagination.
if ( $data['showing'] === $data['total'] ) {
return;
}
$currentPage = (int) $data['currentPage'];
$totalLinks = (int) $data['total'];
$showing = (int) $data['showing'];
$linksPerIndex = (int) $data['linksPerIndex'];
$totalPages = ceil( $totalLinks / $linksPerIndex );
$start = ( ( $currentPage - 1 ) * $linksPerIndex ) + 1;
$end = ( ( $currentPage - 1 ) * $linksPerIndex ) + $showing;
$hasNextPage = $totalPages > $currentPage;
$hasPrevPage = $currentPage > 1;
$nextPageUri = $hasNextPage ? preg_replace( '/sitemap([0-9]*)\.xml/', 'sitemap' . ( $currentPage + 1 ) . '.xml', (string) $data['sitemapUrl'] ) : '#';
$prevPageUri = $hasPrevPage ? preg_replace( '/sitemap([0-9]*)\.xml/', 'sitemap' . ( $currentPage - 1 ) . '.xml', (string) $data['sitemapUrl'] ) : '#';
?>
<div class="pagination">
<div class="label">
<?php
echo esc_html(
sprintf(
// Translators: 1 - The "start-end" pagination results, 2 - Total items.
__( 'Showing %1$s of %2$s', 'all-in-one-seo-pack' ),
"$start-$end",
$totalLinks
)
);
?>
</div>
<a href="<?php echo esc_attr( $prevPageUri ); ?>" class="<?php echo $hasPrevPage ? '' : 'disabled'; ?>">
<svg width="7" height="10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.842 8.825L3.025 5l3.817-3.825L5.667 0l-5 5 5 5 1.175-1.175z" fill="#141B38"/></svg>
</a>
<a href="<?php echo esc_attr( $nextPageUri ); ?>" class="<?php echo $hasNextPage ? '' : 'disabled'; ?>">
<svg width="7" height="10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M.158 8.825L3.975 5 .158 1.175 1.333 0l5 5-5 5L.158 8.825z" fill="#141B38"/></svg>
</a>
</div>