Initial commit: Atomaste website
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra Breadcrumb Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_Breadcrumb_Schema extends Astra_Schema {
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() {
|
||||
add_action( 'wp', array( $this, 'disable_schema_before_title' ), 20 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable Schema for Before Title option of Breadcrumb Position.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disable_schema_before_title() {
|
||||
$breadcrumb_position = astra_get_option( 'breadcrumb-position' );
|
||||
$breadcrumb_source = astra_get_option( 'select-breadcrumb-source' );
|
||||
|
||||
if ( ( 'astra_entry_top' === $breadcrumb_position && ( 'default' === $breadcrumb_source || empty( $breadcrumb_source ) ) ) || ( true !== $this->schema_enabled() ) ) {
|
||||
add_filter( 'astra_breadcrumb_trail_args', array( $this, 'breadcrumb_schema' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable schema by passing false to the 'schema' param to the filter.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*
|
||||
* @param array $args An array of default values.
|
||||
*
|
||||
* @return array Updated schema param.
|
||||
*/
|
||||
public function breadcrumb_schema( $args ) {
|
||||
$args['schema'] = false;
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_breadcrumb_schema_enabled', parent::schema_enabled() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_Breadcrumb_Schema();
|
||||
@@ -0,0 +1,245 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra CreativeWork Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_CreativeWork_Schema extends Astra_Schema {
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() {
|
||||
|
||||
if ( true !== $this->schema_enabled() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
add_filter( 'astra_attr_article-blog', array( $this, 'creative_work_schema' ) );
|
||||
add_filter( 'astra_attr_article-page', array( $this, 'creative_work_schema' ) );
|
||||
add_filter( 'astra_attr_article-single', array( $this, 'creative_work_schema' ) );
|
||||
add_filter( 'astra_attr_article-content', array( $this, 'creative_work_schema' ) );
|
||||
add_filter( 'astra_attr_article-title-blog', array( $this, 'article_title_blog_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-title-blog-single', array( $this, 'article_title_blog_single_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-title-content-page', array( $this, 'article_title_content_page_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-title-content', array( $this, 'article_title_content_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-entry-content-blog-layout', array( $this, 'article_content_blog_layout_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-entry-content-page', array( $this, 'article_content_page_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-entry-content', array( $this, 'article_content_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-entry-content-blog-layout-2', array( $this, 'article_content_blog_layout_2_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-entry-content-blog-layout-3', array( $this, 'article_content_blog_layout_3_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-entry-content-single-layout', array( $this, 'article_content_single_layout_schema_prop' ) );
|
||||
add_filter( 'astra_post_thumbnail_itemprop', array( $this, 'article_image_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-image-blog-archive', array( $this, 'article_image_blog_archive_schema_prop' ) );
|
||||
add_filter( 'astra_attr_article-image-blog-single-post', array( $this, 'article_image_blog_single_post_schema_prop' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function creative_work_schema( $attr ) {
|
||||
$attr['itemtype'] = 'https://schema.org/CreativeWork';
|
||||
$attr['itemscope'] = 'itemscope';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_title_blog_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'headline';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_title_blog_single_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'headline';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_title_content_page_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'headline';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_title_content_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'headline';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_content_blog_layout_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'text';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_content_page_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'text';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_content_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'text';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_content_blog_layout_2_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'text';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_content_blog_layout_3_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'text';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_content_single_layout_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'text';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_image_schema_prop( $attr ) {
|
||||
$attr = 'itemprop=image';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_image_blog_archive_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'image';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function article_image_blog_single_post_schema_prop( $attr ) {
|
||||
$attr['itemprop'] = 'image';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_creativework_schema_enabled', parent::schema_enabled() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_CreativeWork_Schema();
|
||||
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra CreativeWork Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_Organization_Schema extends Astra_Schema {
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() {
|
||||
|
||||
if ( true !== $this->schema_enabled() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
add_filter( 'astra_attr_site-identity', array( $this, 'organization_Schema' ) );
|
||||
add_filter( 'astra_attr_site-title', array( $this, 'site_title_attr' ) );
|
||||
add_filter( 'astra_attr_site-title-link', array( $this, 'site_title_link_attr' ) );
|
||||
add_filter( 'astra_attr_site-title-custom-link', array( $this, 'site_title_custom_link_attr' ) );
|
||||
add_filter( 'astra_attr_site-title-sticky-custom-link', array( $this, 'site_title_sticky_custom_link_attr' ) );
|
||||
add_filter( 'astra_attr_site-title-none-sticky-custom-link', array( $this, 'site_title_none_sticky_custom_link_attr' ) );
|
||||
add_filter( 'astra_attr_site-title-sticky-custom-logo-link', array( $this, 'site_title_sticky_custom_logo_link_attr' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function organization_Schema( $attr ) {
|
||||
$attr['itemtype'] = 'https://schema.org/Organization';
|
||||
$attr['itemscope'] = 'itemscope';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function site_title_attr( $attr ) {
|
||||
$attr['itemprop'] = 'name';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function site_title_link_attr( $attr ) {
|
||||
$attr['itemprop'] = 'url';
|
||||
$attr['class'] = '';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function site_title_custom_link_attr( $attr ) {
|
||||
$attr['itemprop'] = 'url';
|
||||
$attr['class'] = '';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function site_title_sticky_custom_link_attr( $attr ) {
|
||||
$attr['itemprop'] = 'url';
|
||||
$attr['class'] = '';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function site_title_none_sticky_custom_link_attr( $attr ) {
|
||||
$attr['itemprop'] = 'url';
|
||||
$attr['class'] = '';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function site_title_sticky_custom_logo_link_attr( $attr ) {
|
||||
$attr['itemprop'] = 'url';
|
||||
$attr['class'] = '';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_organization_schema_enabled', parent::schema_enabled() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_Organization_Schema();
|
||||
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra CreativeWork Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_Person_Schema extends Astra_Schema {
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() {
|
||||
|
||||
if ( true !== $this->schema_enabled() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
add_filter( 'astra_attr_post-meta-author', array( $this, 'person_Schema' ) );
|
||||
add_filter( 'astra_attr_comment-meta-author', array( $this, 'author_schema_class' ) );
|
||||
add_filter( 'astra_attr_archive-meta-author', array( $this, 'author_schema_class' ) );
|
||||
add_filter( 'astra_attr_author-name', array( $this, 'author_name_schema_itemprop' ) );
|
||||
add_filter( 'astra_attr_author-url', array( $this, 'author_url_schema_itemprop' ) );
|
||||
add_filter( 'astra_attr_author-name-info', array( $this, 'author_name_info_schema_itemprop' ) );
|
||||
add_filter( 'astra_attr_author-url-info', array( $this, 'author_info_url_schema_itemprop' ) );
|
||||
add_filter( 'astra_attr_author-item-info', array( $this, 'author_item_schema_itemprop' ) );
|
||||
add_filter( 'astra_attr_author-desc-info', array( $this, 'author_desc_schema_itemprop' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function person_Schema( $attr ) {
|
||||
$attr['itemtype'] = 'https://schema.org/Person';
|
||||
$attr['itemscope'] = 'itemscope';
|
||||
$attr['itemprop'] = 'author';
|
||||
$attr['class'] = 'posted-by vcard author';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update author schema markup class attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup class attribute.
|
||||
*
|
||||
* @since 4.8.2
|
||||
*/
|
||||
public function author_schema_class( $attr ) {
|
||||
$attr['class'] = isset( $attr['class'] ) ? $attr['class'] : '';
|
||||
$attr['class'] .= ' vcard';
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function author_name_schema_itemprop( $attr ) {
|
||||
$attr['itemprop'] = 'name';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function author_name_info_schema_itemprop( $attr ) {
|
||||
$attr['itemprop'] = 'name';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function author_url_schema_itemprop( $attr ) {
|
||||
$attr['itemprop'] = 'url';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function author_info_url_schema_itemprop( $attr ) {
|
||||
$attr['itemprop'] = 'url';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function author_desc_schema_itemprop( $attr ) {
|
||||
$attr['itemprop'] = 'description';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function author_item_schema_itemprop( $attr ) {
|
||||
$attr['itemprop'] = 'author';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_person_schema_enabled', parent::schema_enabled() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_Person_Schema();
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_Schema {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->include_schemas();
|
||||
|
||||
add_action( 'wp', array( $this, 'setup_schema' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() { }
|
||||
|
||||
/**
|
||||
* Include schema files.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
private function include_schemas() {
|
||||
// @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
|
||||
require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-creativework-schema.php';
|
||||
require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-wpheader-schema.php';
|
||||
require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-wpfooter-schema.php';
|
||||
require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-wpsidebar-schema.php';
|
||||
require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-person-schema.php';
|
||||
require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-organization-schema.php';
|
||||
require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-site-navigation-schema.php';
|
||||
require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-breadcrumb-schema.php';
|
||||
// @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_schema_enabled', true );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_Schema();
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra CreativeWork Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_Site_Navigation_Schema extends Astra_Schema {
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() {
|
||||
|
||||
if ( true !== $this->schema_enabled() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
add_filter( 'astra_attr_site-navigation', array( $this, 'site_navigation_schema' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function site_navigation_schema( $attr ) {
|
||||
$attr['itemtype'] = 'https://schema.org/SiteNavigationElement';
|
||||
$attr['itemscope'] = 'itemscope';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_site_navigation_schema_enabled', parent::schema_enabled() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_Site_Navigation_Schema();
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra CreativeWork Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_WPFooter_Schema extends Astra_Schema {
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() {
|
||||
|
||||
if ( true !== $this->schema_enabled() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
add_filter( 'astra_attr_footer', array( $this, 'wpfooter_Schema' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function wpfooter_Schema( $attr ) {
|
||||
$attr['itemtype'] = 'https://schema.org/WPFooter';
|
||||
$attr['itemscope'] = 'itemscope';
|
||||
$attr['itemid'] = '#colophon';
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_wpfooter_schema_enabled', parent::schema_enabled() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_WPFooter_Schema();
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra CreativeWork Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_WPHeader_Schema extends Astra_Schema {
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() {
|
||||
|
||||
if ( true !== $this->schema_enabled() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
add_filter( 'astra_attr_header', array( $this, 'wpheader_Schema' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function wpheader_Schema( $attr ) {
|
||||
$attr['itemtype'] = 'https://schema.org/WPHeader';
|
||||
$attr['itemscope'] = 'itemscope';
|
||||
$attr['itemid'] = '#masthead';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_wpheader_schema_enabled', parent::schema_enabled() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_WPHeader_Schema();
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema markup.
|
||||
*
|
||||
* @package Astra
|
||||
* @link https://wpastra.com/
|
||||
* @since Astra 2.1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Astra CreativeWork Schema Markup.
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
class Astra_WPSideBar_Schema extends Astra_Schema {
|
||||
|
||||
/**
|
||||
* Setup schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
public function setup_schema() {
|
||||
|
||||
if ( true !== $this->schema_enabled() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
add_filter( 'astra_attr_sidebar', array( $this, 'wpsidebar_Schema' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Schema markup attribute.
|
||||
*
|
||||
* @param array $attr An array of attributes.
|
||||
*
|
||||
* @return array Updated embed markup.
|
||||
*/
|
||||
public function wpsidebar_Schema( $attr ) {
|
||||
$attr['itemtype'] = 'https://schema.org/WPSideBar';
|
||||
$attr['itemscope'] = 'itemscope';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled schema
|
||||
*
|
||||
* @since 2.1.3
|
||||
*/
|
||||
protected function schema_enabled() {
|
||||
return apply_filters( 'astra_wpsidebar_schema_enabled', parent::schema_enabled() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Astra_WPSideBar_Schema();
|
||||
Reference in New Issue
Block a user