Skip to content

Commit

Permalink
🔥 Remove Schema.org markups
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsoyes committed May 1, 2020
1 parent 32261be commit 001c8dc
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 55 deletions.
11 changes: 5 additions & 6 deletions classes/class-mokime-walker-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ protected function html5_comment( $comment, $depth, $args ) {

echo '<' . $tag; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>>

<article itemscope itemtype="https://schema.org/Comment" id="div-comment-<?php comment_ID(); ?>"
class="media comment-body">
<article id="div-comment-<?php comment_ID(); ?>" class="media comment-body">

<?php $avatar = get_avatar( $comment, 48, '', $comment_author ); ?>
<?php if ( 0 !== $args['avatar_size'] ) : ?>
Expand Down Expand Up @@ -66,7 +65,7 @@ class="media comment-body">

?>
<small class="tag">
<time itemprop="dateCreated" datetime="<?php comment_time( 'c' ); ?>">
<time datetime="<?php comment_time( 'c' ); ?>">
<?php echo esc_html( $comment_timestamp ); ?>
</time>
</small>
Expand All @@ -77,7 +76,7 @@ class="media comment-body">
ob_get_clean();

printf(
'<p><span itemprop="name">%1$s</span><span >%2$s</span> %3$s</p>',
'<p><span>%1$s</span><span >%2$s</span> %3$s</p>',
esc_html( $comment_author ),
//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
$output,
Expand All @@ -86,7 +85,7 @@ class="media comment-body">
);

?>
<span itemprop="text">
<span>
<?php comment_text(); ?>
</span>

Expand Down Expand Up @@ -130,7 +129,7 @@ class="media comment-body">
}

echo sprintf(
' &bull; <a itemprop="url" href="%1$s" class="has-regular-font-size">%2$s</a>',
' &bull; <a href="%1$s" class="has-regular-font-size">%2$s</a>',
esc_url( get_comment_link( $comment, $args ) ),
esc_html__( 'Link to the comment', 'mokime' )
);
Expand Down
11 changes: 2 additions & 9 deletions template-parts/content/content-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@
*/
$column_width = is_active_sidebar( 'sidebar-single' ) ? 70 : 100; ?>

<article itemscope itemtype="https://schema.org/Article"
<?php post_class( 'post' ); ?> id="post-<?php the_ID(); ?>">

<meta itemprop="mainEntityOfPage" content="<?php echo esc_html( get_the_permalink() ); ?>"/>
<meta itemprop="inLanguage" content="<?php echo esc_html( get_bloginfo( 'language' ) ); ?>">
<article <?php post_class( 'post' ); ?> id="post-<?php the_ID(); ?>">

<header class="article-header">
<?php get_template_part( 'template-parts/entry/entry-header' ); ?>
<?php $header_image = get_the_post_thumbnail_url( null, 'large' ); ?>
<?php if ( $header_image ) : ?>
<meta itemprop="image thumbnailUrl" content="<?php echo esc_html( $header_image ); ?>"/>
<?php endif; ?>
</header><!-- .article-header -->

<?php mokime_the_ads( 'advertising_global_top' ); ?>
Expand All @@ -43,7 +36,7 @@

</div><!-- .wp-block-columns -->

<div itemprop="articleBody" class="post-inner">
<div class="post-inner">
<?php the_content(); ?>
</div><!-- .post-inner -->

Expand Down
4 changes: 2 additions & 2 deletions template-parts/entry/entry-article-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
$categories = get_the_category();

if ( $categories ) {
echo '<div class="tags categories" itemscope itemtype =http://schema.org/CreativeWork>';
echo '<div class="tags categories">';
}

foreach ( $categories as $category ) {
$category_link = sprintf(
'<a href="%1$s" title="%2$s" itemprop="about" class="tag">%3$s</a>',
'<a href="%1$s" title="%2$s" class="tag">%3$s</a>',
esc_url( get_category_link( $category->term_id ) ),
sprintf(
/* translators: %s: name of the category */
Expand Down
4 changes: 2 additions & 2 deletions template-parts/entry/entry-article-dates.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div class="section-inner__date">
<p>
<?php esc_html_e( 'Post published on ', 'mokime' ); ?>
<time itemprop="datePublished" class="tag" datetime="<?php echo esc_html( get_the_date( 'c' ) ); ?>">
<time class="tag" datetime="<?php echo esc_html( get_the_date( 'c' ) ); ?>">
<?php echo esc_html( get_the_date( 'j F Y' ) ); ?>
</time>
</p>
<p>
<?php esc_html_e( ' Last modified on ', 'mokime' ); ?>
<time itemprop="dateModified" class="tag" datetime="<?php echo esc_html( get_the_modified_date( 'c' ) ); ?>">
<time class="tag" datetime="<?php echo esc_html( get_the_modified_date( 'c' ) ); ?>">
<?php echo esc_html( get_the_modified_date( 'j F Y' ) ); ?>
</time>
</p>
Expand Down
19 changes: 3 additions & 16 deletions template-parts/entry/entry-author-bio.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@
*/

?>
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<?php if ( has_custom_logo() ) : ?>
<div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="<?php echo esc_html( mokime_get_custom_logo_url() ); ?>">
</div>
<meta itemprop="name" content="<?php echo esc_html( get_bloginfo( 'name' ) ); ?>">
<?php endif; ?>
</div>

<div itemprop="author" itemscope itemtype="https://schema.org/Person" class="author-box has-text-align-center
<div class="author-box has-text-align-center
<?php
if ( ! (bool) get_theme_mod( 'single_post_author_bio', true ) ) :
?>
Expand All @@ -28,9 +19,6 @@
96,
'',
get_the_author(),
array(
'itemprop' => 'image',
)
);
?>
</figure><!-- .author-image -->
Expand All @@ -46,14 +34,13 @@

<div class="media-content-center content">

<p itemprop="name" class="h3 has-text-weight-bold"><?php echo esc_html( get_the_author() ); ?></p>
<p class="h3 has-text-weight-bold"><?php echo esc_html( get_the_author() ); ?></p>

<div class="author-description">
<div itemprop="description">
<div>
<?php echo wp_kses_post( wpautop( get_the_author_meta( 'description' ) ) ); ?>
</div>
<a class="author-link"
itemprop="url"
href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"
rel="author<?php if ( $index_author_page ) :?> nofollow<?php endif; ?>">
<?php
Expand Down
3 changes: 0 additions & 3 deletions template-parts/entry/entry-comment-title.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

<div class="comments-header section-inner">

<meta itemprop="commentCount" content="<?php echo esc_html( $comments_number ); ?>">

<p class="h2 comment-reply-title">
<?php
if ( ! have_comments() ) {
esc_html_e( 'Leave a comment', 'mokime' );
} else {
echo wp_kses_post( sprintf( '<meta itemprop="commentCount" content="%s">', $comments_number ) );
echo wp_kses_post(
sprintf(
/* translators: 1: number of comments, 2: post title */
Expand Down
12 changes: 2 additions & 10 deletions template-parts/entry/entry-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,12 @@

<div class="hero-body<?php echo esc_html( $header_class ); ?>">
<?php if ( isset( $header_title ) && $header_title ) : ?>
<h1
<?php
if ( is_single() ) :
?>
itemprop="name headline"<?php endif; ?> class="hero-title has-text-weight-bold">
<h1 class="hero-title has-text-weight-bold">
<?php echo wp_kses_post( $header_title ); ?>
</h1>
<?php endif; ?>
<?php if ( isset( $header_description ) && $header_description ) : ?>
<div
<?php
if ( is_single() ) :
?>
itemprop="description"<?php endif; ?> class="hero-desc">
<div class="hero-desc">
<?php echo wp_kses_post( $header_description ); ?>
</div><!-- .hero-desc -->
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion template-parts/header/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

?>
<nav itemscope="itemscope" itemtype="http://www.schema.org/SiteNavigationElement" class="navbar is-transparent" role="navigation" aria-label="main navigation">
<nav class="navbar is-transparent" role="navigation" aria-label="main navigation">

<div class="navbar-brand">

Expand Down
9 changes: 3 additions & 6 deletions template-parts/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,21 @@
} ?>

<nav class="pagination-single section-inner<?php echo esc_attr( $pagination_classes ); ?>"
itemscope itemtype="http://schema.org/SiteNavigationElement"
aria-label="<?php esc_attr_e( 'Post', 'mokime' ); ?>" role="navigation">

<hr aria-hidden="true"/>
<hr aria-hidden="true" />

<div class="pagination-single-inner wp-block-columns">

<?php
if ( $prev_post ) {
?>

<div class="wp-block-column">
<p class="title-navigation h4 has-text-weight-bold">
<span class="arrow"
aria-hidden="true">&larr;</span> <?php esc_html_e( 'Previous post', 'mokime' ); ?>
</p>
<a itemprop="url" class="previous-post h4" href="<?php echo esc_url( get_permalink( $prev_post->ID ) ); ?>">
<a class="previous-post h4" href="<?php echo esc_url( get_permalink( $prev_post->ID ) ); ?>">
<span class="title">
<span class="title-inner"><?php echo wp_kses_post( get_the_title( $prev_post->ID ) ); ?></span>
</span>
Expand All @@ -48,7 +46,6 @@
</span>
</div>
</div>

<?php
}

Expand All @@ -59,7 +56,7 @@
<p class="title-navigation h4 has-text-weight-bold"><?php esc_html_e( 'Next post', 'mokime' ); ?>
<span class="arrow" aria-hidden="true">&rarr;</span>
</p>
<a itemprop="url" class="next-post h4" href="<?php echo esc_url( get_permalink( $next_post->ID ) ); ?>">
<a class="next-post h4" href="<?php echo esc_url( get_permalink( $next_post->ID ) ); ?>">
<span class="title">
<span class="title-inner"><?php echo wp_kses_post( get_the_title( $next_post->ID ) ); ?></span>
</span>
Expand Down

0 comments on commit 001c8dc

Please sign in to comment.