| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/HostingSpaces/admin/tickwaves.co.uk/wwwroot/wp-content/themes/sydney/inc/ |
Upload File : |
<?php
/**
* Schema related features
*
* @package Sydney
*/
if ( ! function_exists( 'sydney_get_schema' ) ) {
function sydney_get_schema( $location ) {
$enable = get_theme_mod( 'sydney_enable_schema', 0 );
if ( !$enable ) {
return;
}
switch ( $location ) {
case 'html':
if ( is_home() || is_front_page() ) {
$schema = 'itemscope="itemscope" itemtype="https://schema.org/WebPage"';
} elseif ( is_category() || is_tag() ) {
$schema = 'itemscope="itemscope" itemtype="https://schema.org/Blog"';
} elseif ( is_singular( 'post') ) {
$schema = 'itemscope="itemscope" itemtype="https://schema.org/Article"';
} elseif ( is_page() ) {
$schema = 'itemscope="itemscope" itemtype="https://schema.org/WebPage"';
} else {
$schema = 'itemscope="itemscope" itemtype="https://schema.org/WebPage"';
}
break;
case 'header';
$schema = 'itemscope="itemscope" itemtype="https://schema.org/WPHeader"';
break;
case 'logo';
$schema = 'itemscope itemtype="https://schema.org/Brand"';
break;
case 'nav';
$schema = 'itemscope="itemscope" itemtype="https://schema.org/SiteNavigationElement"';
break;
case 'sidebar';
$schema = 'itemscope="itemscope" itemtype="https://schema.org/WPSideBar"';
break;
case 'footer';
$schema = 'itemscope="itemscope" itemtype="https://schema.org/WPFooter"';
break;
case 'headline';
$schema = 'itemprop="headline"';
break;
case 'entry_content';
$schema = 'itemprop="text"';
break;
case 'published_date';
$schema = 'itemprop="datePublished"';
break;
case 'modified_date';
$schema = 'itemprop="dateModified"';
break;
case 'author_name';
$schema = 'itemprop="name"';
break;
case 'image';
$schema = 'itemprop="image"';
break;
default:
$schema = '';
break;
}
return $schema;
}
}
if ( ! function_exists( 'sydney_do_schema' ) ) {
function sydney_do_schema( $location ) {
echo sydney_get_schema( $location );
}
}