HEX
Server: Apache/2
System: Linux server-27-254-144-72.da.direct 5.10.0-33-amd64 #1 SMP Debian 5.10.226-1 (2024-10-03) x86_64
User: chok2006 (1409)
PHP: 8.1.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/chok2006/domains/chok2006.com/public_html/wp-content/themes/sydney/inc/schema.php
<?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 );
	}
}