Version Description
(2018-05-15) = * Checked : WordPress version 4.9.5 operation check. * Fixed : If there is a child element on that page in the top fixed page, the parent element duplicates. * Fixed : Taxonomy name of custom posting is not displayed in a custom taxonomy archive page.
Download this release
Release Info
Developer | miiitaka |
Plugin | Markup (JSON-LD) structured in schema.org |
Version | 4.2.2 |
Comparing to | |
See all releases |
Code changes from version 4.2.1 to 4.2.2
- includes/wp-structuring-short-code-breadcrumb.php +10 -7
- readme.txt +7 -2
- wp-structuring-markup.php +4 -4
includes/wp-structuring-short-code-breadcrumb.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Breadcrumb ShortCode Settings
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @version 4.2.
|
7 |
* @since 2.0.0
|
8 |
*/
|
9 |
class Structuring_Markup_ShortCode_Breadcrumb {
|
@@ -62,7 +62,7 @@ class Structuring_Markup_ShortCode_Breadcrumb {
|
|
62 |
/**
|
63 |
* Breadcrumb array setting.
|
64 |
*
|
65 |
-
* @version 4.
|
66 |
* @since 2.0.0
|
67 |
* @access public
|
68 |
* @param array $options
|
@@ -75,7 +75,7 @@ class Structuring_Markup_ShortCode_Breadcrumb {
|
|
75 |
$item_array = array();
|
76 |
$current_url = esc_url( home_url() . $_SERVER['REQUEST_URI'] );
|
77 |
|
78 |
-
if ( get_option( 'show_on_front' )
|
79 |
$front_page_id = get_option( 'page_on_front' );
|
80 |
} else {
|
81 |
$front_page_id = null;
|
@@ -120,11 +120,13 @@ class Structuring_Markup_ShortCode_Breadcrumb {
|
|
120 |
$item_array[] = $this->set_schema_breadcrumb_item( get_category_link( $categories->term_id ), $categories->name );
|
121 |
} elseif ( is_author() ) {
|
122 |
$item_array[] = $this->set_schema_breadcrumb_item( $current_url, get_the_author_meta( 'display_name', get_query_var( 'author' ) ) );
|
123 |
-
} elseif ( is_page() && $front_page_id
|
124 |
if( $post->post_parent !== 0 ) {
|
125 |
$ancestors = array_reverse( get_post_ancestors( $post->ID ) );
|
126 |
-
foreach( $ancestors as $ancestor ){
|
127 |
-
|
|
|
|
|
128 |
}
|
129 |
}
|
130 |
$item_array[] = $this->set_schema_breadcrumb_item( $current_url, $post->post_title );
|
@@ -151,7 +153,8 @@ class Structuring_Markup_ShortCode_Breadcrumb {
|
|
151 |
if( $term->parent !== 0 ) {
|
152 |
$ancestors = array_reverse( get_ancestors( $term->term_taxonomy_id, $tax_slug ) );
|
153 |
foreach( $ancestors as $ancestor ) {
|
154 |
-
$
|
|
|
155 |
}
|
156 |
}
|
157 |
$item_array[] = $this->set_schema_breadcrumb_item( get_term_link( $term_slug, $tax_slug ), esc_html( $term->name ) );
|
3 |
* Breadcrumb ShortCode Settings
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @version 4.2.2
|
7 |
* @since 2.0.0
|
8 |
*/
|
9 |
class Structuring_Markup_ShortCode_Breadcrumb {
|
62 |
/**
|
63 |
* Breadcrumb array setting.
|
64 |
*
|
65 |
+
* @version 4.2.2
|
66 |
* @since 2.0.0
|
67 |
* @access public
|
68 |
* @param array $options
|
75 |
$item_array = array();
|
76 |
$current_url = esc_url( home_url() . $_SERVER['REQUEST_URI'] );
|
77 |
|
78 |
+
if ( get_option( 'show_on_front' ) === 'page' ) {
|
79 |
$front_page_id = get_option( 'page_on_front' );
|
80 |
} else {
|
81 |
$front_page_id = null;
|
120 |
$item_array[] = $this->set_schema_breadcrumb_item( get_category_link( $categories->term_id ), $categories->name );
|
121 |
} elseif ( is_author() ) {
|
122 |
$item_array[] = $this->set_schema_breadcrumb_item( $current_url, get_the_author_meta( 'display_name', get_query_var( 'author' ) ) );
|
123 |
+
} elseif ( is_page() && (int) $front_page_id !== $post->ID ) {
|
124 |
if( $post->post_parent !== 0 ) {
|
125 |
$ancestors = array_reverse( get_post_ancestors( $post->ID ) );
|
126 |
+
foreach( $ancestors as $ancestor ) {
|
127 |
+
if ( (int) $front_page_id !== $ancestor ) {
|
128 |
+
$item_array[] = $this->set_schema_breadcrumb_item( get_permalink( $ancestor ), get_the_title( $ancestor ) );
|
129 |
+
}
|
130 |
}
|
131 |
}
|
132 |
$item_array[] = $this->set_schema_breadcrumb_item( $current_url, $post->post_title );
|
153 |
if( $term->parent !== 0 ) {
|
154 |
$ancestors = array_reverse( get_ancestors( $term->term_taxonomy_id, $tax_slug ) );
|
155 |
foreach( $ancestors as $ancestor ) {
|
156 |
+
$ancestor_term = get_term( $ancestor, $tax_slug );
|
157 |
+
$item_array[] = $this->set_schema_breadcrumb_item( esc_url( get_term_link( $ancestor ) ), esc_html( $ancestor_term->name ) );
|
158 |
}
|
159 |
}
|
160 |
$item_array[] = $this->set_schema_breadcrumb_item( get_term_link( $term_slug, $tax_slug ), esc_html( $term->name ) );
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: miiitaka
|
3 |
Tags: schema, schema.org, json, json-ld, seo, post, posts, google, shortcode, breadcrumb
|
4 |
Requires at least: 4.3.1
|
5 |
-
Tested up to: 4.9.
|
6 |
-
Stable tag: 4.2.
|
7 |
|
8 |
Allows you to include schema.org JSON-LD syntax markup on your website
|
9 |
|
@@ -54,6 +54,11 @@ if ( shortcode_exists( 'wp-structuring-markup-breadcrumb' ) ) {
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
|
|
|
|
57 |
= 4.2.1 (2018-03-23) =
|
58 |
* Fixed : Taxonomy name of custom posting is not displayed.
|
59 |
|
2 |
Contributors: miiitaka
|
3 |
Tags: schema, schema.org, json, json-ld, seo, post, posts, google, shortcode, breadcrumb
|
4 |
Requires at least: 4.3.1
|
5 |
+
Tested up to: 4.9.5
|
6 |
+
Stable tag: 4.2.2
|
7 |
|
8 |
Allows you to include schema.org JSON-LD syntax markup on your website
|
9 |
|
54 |
|
55 |
== Changelog ==
|
56 |
|
57 |
+
= 4.2.2 (2018-05-15) =
|
58 |
+
* Checked : WordPress version 4.9.5 operation check.
|
59 |
+
* Fixed : If there is a child element on that page in the top fixed page, the parent element duplicates.
|
60 |
+
* Fixed : Taxonomy name of custom posting is not displayed in a custom taxonomy archive page.
|
61 |
+
|
62 |
= 4.2.1 (2018-03-23) =
|
63 |
* Fixed : Taxonomy name of custom posting is not displayed.
|
64 |
|
wp-structuring-markup.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Markup (JSON-LD) structured in schema.org
|
4 |
Plugin URI: https://github.com/miiitaka/wp-structuring-markup
|
5 |
Description: Allows you to include schema.org JSON-LD syntax markup on your website
|
6 |
-
Version: 4.2.
|
7 |
Author: Kazuya Takami
|
8 |
Author URI: https://www.terakoya.work/
|
9 |
License: GPLv2 or later
|
@@ -18,7 +18,7 @@ new Structuring_Markup();
|
|
18 |
* Schema.org Basic Class
|
19 |
*
|
20 |
* @author Kazuya Takami
|
21 |
-
* @version 4.2.
|
22 |
* @since 1.0.0
|
23 |
*/
|
24 |
class Structuring_Markup {
|
@@ -26,10 +26,10 @@ class Structuring_Markup {
|
|
26 |
/**
|
27 |
* Variable definition version.
|
28 |
*
|
29 |
-
* @version 4.2.
|
30 |
* @since 1.3.0
|
31 |
*/
|
32 |
-
private $version = '4.2.
|
33 |
|
34 |
/**
|
35 |
* Variable definition Text Domain.
|
3 |
Plugin Name: Markup (JSON-LD) structured in schema.org
|
4 |
Plugin URI: https://github.com/miiitaka/wp-structuring-markup
|
5 |
Description: Allows you to include schema.org JSON-LD syntax markup on your website
|
6 |
+
Version: 4.2.2
|
7 |
Author: Kazuya Takami
|
8 |
Author URI: https://www.terakoya.work/
|
9 |
License: GPLv2 or later
|
18 |
* Schema.org Basic Class
|
19 |
*
|
20 |
* @author Kazuya Takami
|
21 |
+
* @version 4.2.2
|
22 |
* @since 1.0.0
|
23 |
*/
|
24 |
class Structuring_Markup {
|
26 |
/**
|
27 |
* Variable definition version.
|
28 |
*
|
29 |
+
* @version 4.2.2
|
30 |
* @since 1.3.0
|
31 |
*/
|
32 |
+
private $version = '4.2.2';
|
33 |
|
34 |
/**
|
35 |
* Variable definition Text Domain.
|