Version Description
(2016-11-22) = * Updated : Event Type select item of Schema.org type "Event". * Updated : Short Code display changed of Schema.org type "BreadcrumbList".
Download this release
Release Info
Developer | miiitaka |
Plugin | Markup (JSON-LD) structured in schema.org |
Version | 3.1.3 |
Comparing to | |
See all releases |
Code changes from version 3.1.2 to 3.1.3
- css/style.css +13 -1
- includes/wp-structuring-admin-list.php +13 -21
- includes/wp-structuring-admin-type-breadcrumb.php +10 -1
- includes/wp-structuring-admin-type-event.php +3 -2
- includes/wp-structuring-custom-post-event.php +58 -14
- includes/wp-structuring-display.php +4 -2
- readme.txt +5 -1
- wp-structuring-markup.php +4 -4
css/style.css
CHANGED
@@ -1,8 +1,16 @@
|
|
1 |
/** List Setting */
|
2 |
-
.schema-admin-table-list
|
3 |
width: 10em;
|
4 |
}
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
.schema-admin-table-list td {
|
7 |
vertical-align: middle;
|
8 |
}
|
@@ -19,6 +27,10 @@
|
|
19 |
color: #fff;
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
22 |
.schema-admin-table-list td:nth-child(1) span.stop {
|
23 |
background: #ddd;
|
24 |
}
|
1 |
/** List Setting */
|
2 |
+
.schema-admin-table-list .schema-admin-table-list-status {
|
3 |
width: 10em;
|
4 |
}
|
5 |
|
6 |
+
.schema-admin-table-list .schema-admin-table-list-type {
|
7 |
+
width: 15%;
|
8 |
+
}
|
9 |
+
|
10 |
+
.schema-admin-table-list .schema-admin-table-list-output {
|
11 |
+
width: 30%;
|
12 |
+
}
|
13 |
+
|
14 |
.schema-admin-table-list td {
|
15 |
vertical-align: middle;
|
16 |
}
|
27 |
color: #fff;
|
28 |
}
|
29 |
|
30 |
+
.schema-admin-table-list tr.active {
|
31 |
+
background: #efefef;
|
32 |
+
}
|
33 |
+
|
34 |
.schema-admin-table-list td:nth-child(1) span.stop {
|
35 |
background: #ddd;
|
36 |
}
|
includes/wp-structuring-admin-list.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
* Schema.org Admin List
|
4 |
*
|
5 |
* @author Kazuya Takami
|
|
|
6 |
* @since 1.0.0
|
7 |
-
* @version 2.3.3
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
*/
|
10 |
class Structuring_Markup_Admin_List {
|
@@ -12,16 +12,16 @@ class Structuring_Markup_Admin_List {
|
|
12 |
/**
|
13 |
* Variable definition.
|
14 |
*
|
15 |
-
* @since 1.3.0
|
16 |
* @version 2.0.0
|
|
|
17 |
*/
|
18 |
private $text_domain;
|
19 |
|
20 |
/**
|
21 |
* Constructor Define.
|
22 |
*
|
23 |
-
* @since 1.0.0
|
24 |
* @version 2.0.0
|
|
|
25 |
* @param String $text_domain
|
26 |
*/
|
27 |
public function __construct ( $text_domain ) {
|
@@ -32,8 +32,8 @@ class Structuring_Markup_Admin_List {
|
|
32 |
/**
|
33 |
* LIST Page HTML Render.
|
34 |
*
|
|
|
35 |
* @since 1.0.0
|
36 |
-
* @version 2.4.1
|
37 |
*/
|
38 |
private function page_render () {
|
39 |
$post_url = 'admin.php?page=' . $this->text_domain . '-post';
|
@@ -47,10 +47,9 @@ class Structuring_Markup_Admin_List {
|
|
47 |
$html = '<hr>';
|
48 |
$html .= '<table class="wp-list-table widefat fixed striped posts schema-admin-table-list">';
|
49 |
$html .= '<tr>';
|
50 |
-
$html .= '<th scope="row">' . esc_html__( 'Status', $this->text_domain ) . '</th>';
|
51 |
-
$html .= '<th scope="row">'
|
52 |
-
$html .= '<th scope="row">' . esc_html__( 'Output On', $this->text_domain ) . '</th>';
|
53 |
-
$html .= '<th scope="row">' . esc_html__( 'ShortCode', $this->text_domain ) . '</th>';
|
54 |
$html .= '<th scope="row"> </th>';
|
55 |
$html .= '</tr>';
|
56 |
echo $html;
|
@@ -61,22 +60,16 @@ class Structuring_Markup_Admin_List {
|
|
61 |
|
62 |
if ( $results ) {
|
63 |
foreach ( $results as $row ) {
|
64 |
-
$
|
65 |
-
|
|
|
|
|
|
|
66 |
$html .= '</span></td>';
|
67 |
$html .= '<td><a href="';
|
68 |
$html .= admin_url( $post_url . '&type=' . esc_html( $row->type ) . '&schema_post_id=' . esc_html( $row->id ) ) . '">' . $type_array[esc_html( $row->type )];
|
69 |
$html .= '</a></td>';
|
70 |
$html .= '<td>' . $this->unserialize_output( $row->output ) . '</td>';
|
71 |
-
$html .= '<td>';
|
72 |
-
|
73 |
-
if ( $row->type === 'breadcrumb' ) {
|
74 |
-
$html .= '<input type="text" onfocus="this.select();" readonly="readonly" value="[wp-structuring-markup-breadcrumb]" class="large-text code">';
|
75 |
-
} else {
|
76 |
-
$html .= '-';
|
77 |
-
}
|
78 |
-
$html .= '</td>';
|
79 |
-
|
80 |
$html .= '<td><a href="';
|
81 |
$html .= admin_url( $post_url . '&type=' . esc_html( $row->type ) . '&schema_post_id=' . esc_html( $row->id ) ) . '">' . esc_html__( 'Edit', $this->text_domain );
|
82 |
$html .= '</a></td>';
|
@@ -86,7 +79,6 @@ class Structuring_Markup_Admin_List {
|
|
86 |
} else {
|
87 |
echo '<td colspan="5">' . esc_html__( 'Without registration.', $this->text_domain ) . '</td>';
|
88 |
}
|
89 |
-
|
90 |
$html = '</table>';
|
91 |
$html .= '</div>';
|
92 |
echo $html;
|
@@ -95,8 +87,8 @@ class Structuring_Markup_Admin_List {
|
|
95 |
/**
|
96 |
* LIST Page HTML Render.
|
97 |
*
|
98 |
-
* @since 1.0.0
|
99 |
* @version 2.0.0
|
|
|
100 |
* @param string $obj
|
101 |
* @return string $output
|
102 |
*/
|
3 |
* Schema.org Admin List
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @version 3.1.3
|
7 |
* @since 1.0.0
|
|
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
*/
|
10 |
class Structuring_Markup_Admin_List {
|
12 |
/**
|
13 |
* Variable definition.
|
14 |
*
|
|
|
15 |
* @version 2.0.0
|
16 |
+
* @since 1.3.0
|
17 |
*/
|
18 |
private $text_domain;
|
19 |
|
20 |
/**
|
21 |
* Constructor Define.
|
22 |
*
|
|
|
23 |
* @version 2.0.0
|
24 |
+
* @since 1.0.0
|
25 |
* @param String $text_domain
|
26 |
*/
|
27 |
public function __construct ( $text_domain ) {
|
32 |
/**
|
33 |
* LIST Page HTML Render.
|
34 |
*
|
35 |
+
* @version 3.1.3
|
36 |
* @since 1.0.0
|
|
|
37 |
*/
|
38 |
private function page_render () {
|
39 |
$post_url = 'admin.php?page=' . $this->text_domain . '-post';
|
47 |
$html = '<hr>';
|
48 |
$html .= '<table class="wp-list-table widefat fixed striped posts schema-admin-table-list">';
|
49 |
$html .= '<tr>';
|
50 |
+
$html .= '<th scope="row" class="schema-admin-table-list-status">' . esc_html__( 'Status', $this->text_domain ) . '</th>';
|
51 |
+
$html .= '<th scope="row" class="schema-admin-table-list-type">' . esc_html__( 'Schema.org Type', $this->text_domain ) . '</th>';
|
52 |
+
$html .= '<th scope="row" class="schema-admin-table-list-output">' . esc_html__( 'Output On', $this->text_domain ) . '</th>';
|
|
|
53 |
$html .= '<th scope="row"> </th>';
|
54 |
$html .= '</tr>';
|
55 |
echo $html;
|
60 |
|
61 |
if ( $results ) {
|
62 |
foreach ( $results as $row ) {
|
63 |
+
if ( $row->activate === 'on' ) {
|
64 |
+
$html = '<tr class="active"><td><span class="active">Enabled';
|
65 |
+
} else {
|
66 |
+
$html = '<tr><td><span class="stop">Disabled';
|
67 |
+
}
|
68 |
$html .= '</span></td>';
|
69 |
$html .= '<td><a href="';
|
70 |
$html .= admin_url( $post_url . '&type=' . esc_html( $row->type ) . '&schema_post_id=' . esc_html( $row->id ) ) . '">' . $type_array[esc_html( $row->type )];
|
71 |
$html .= '</a></td>';
|
72 |
$html .= '<td>' . $this->unserialize_output( $row->output ) . '</td>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
$html .= '<td><a href="';
|
74 |
$html .= admin_url( $post_url . '&type=' . esc_html( $row->type ) . '&schema_post_id=' . esc_html( $row->id ) ) . '">' . esc_html__( 'Edit', $this->text_domain );
|
75 |
$html .= '</a></td>';
|
79 |
} else {
|
80 |
echo '<td colspan="5">' . esc_html__( 'Without registration.', $this->text_domain ) . '</td>';
|
81 |
}
|
|
|
82 |
$html = '</table>';
|
83 |
$html .= '</div>';
|
84 |
echo $html;
|
87 |
/**
|
88 |
* LIST Page HTML Render.
|
89 |
*
|
|
|
90 |
* @version 2.0.0
|
91 |
+
* @since 1.0.0
|
92 |
* @param string $obj
|
93 |
* @return string $output
|
94 |
*/
|
includes/wp-structuring-admin-type-breadcrumb.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Schema.org Type Breadcrumb
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @version
|
7 |
* @since 2.0.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link https://schema.org/BreadcrumbList
|
@@ -50,6 +50,15 @@ class Structuring_Markup_Type_Breadcrumb {
|
|
50 |
$html .= '</table>';
|
51 |
echo $html;
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
echo '<p>Setting Knowledge : <a href="https://developers.google.com/search/docs/data-types/breadcrumbs" target="_blank">https://developers.google.com/search/docs/data-types/breadcrumbs</a></p>';
|
54 |
submit_button();
|
55 |
}
|
3 |
* Schema.org Type Breadcrumb
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @version 3.1.3
|
7 |
* @since 2.0.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link https://schema.org/BreadcrumbList
|
50 |
$html .= '</table>';
|
51 |
echo $html;
|
52 |
|
53 |
+
$html = '<table class="schema-admin-table">';
|
54 |
+
$html .= '<caption>Short Code</caption>';
|
55 |
+
$html .= '<tr><th><label for="home_on">Short Code Copy :</label></th><td>';
|
56 |
+
$html .= '<input type="text" onfocus="this.select();" readonly="readonly" value="[wp-structuring-markup-breadcrumb]" class="large-text code">';
|
57 |
+
$html .= '<small>Option : id="id_name" and class="class_name" attribute additional ol element.</small>';
|
58 |
+
$html .= '</td></tr>';
|
59 |
+
$html .= '</table>';
|
60 |
+
echo $html;
|
61 |
+
|
62 |
echo '<p>Setting Knowledge : <a href="https://developers.google.com/search/docs/data-types/breadcrumbs" target="_blank">https://developers.google.com/search/docs/data-types/breadcrumbs</a></p>';
|
63 |
submit_button();
|
64 |
}
|
includes/wp-structuring-admin-type-event.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Schema.org Type Event
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @version 3.
|
7 |
* @since 2.1.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link http://schema.org/Event
|
@@ -25,12 +25,13 @@ class Structuring_Markup_Type_Event {
|
|
25 |
/**
|
26 |
* Form Layout Render
|
27 |
*
|
28 |
-
* @version 3.
|
29 |
* @since 2.1.0
|
30 |
*/
|
31 |
private function page_render () {
|
32 |
$html = '<table class="schema-admin-table">';
|
33 |
$html .= '<caption>Basic Setting</caption>';
|
|
|
34 |
$html .= '<tr><th class="require">name :</th><td><small>Input a custom post: field name "schema_event_name"</small></td></tr>';
|
35 |
$html .= '<tr><th class="require">startDate :</th><td><small>Input a custom post: field name "schema_event_date" & "schema_event_time"</small></td></tr>';
|
36 |
$html .= '<tr><th>url :</th><td><small>Input a custom post: field name "schema_event_url"</small></td></tr>';
|
3 |
* Schema.org Type Event
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @version 3.1.3
|
7 |
* @since 2.1.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link http://schema.org/Event
|
25 |
/**
|
26 |
* Form Layout Render
|
27 |
*
|
28 |
+
* @version 3.1.3
|
29 |
* @since 2.1.0
|
30 |
*/
|
31 |
private function page_render () {
|
32 |
$html = '<table class="schema-admin-table">';
|
33 |
$html .= '<caption>Basic Setting</caption>';
|
34 |
+
$html .= '<tr><th class="require">type :</th><td><small>Select a event type: field name "schema_event_type"</small></td></tr>';
|
35 |
$html .= '<tr><th class="require">name :</th><td><small>Input a custom post: field name "schema_event_name"</small></td></tr>';
|
36 |
$html .= '<tr><th class="require">startDate :</th><td><small>Input a custom post: field name "schema_event_date" & "schema_event_time"</small></td></tr>';
|
37 |
$html .= '<tr><th>url :</th><td><small>Input a custom post: field name "schema_event_url"</small></td></tr>';
|
includes/wp-structuring-custom-post-event.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
* Schema.org Custom Post "Event"
|
4 |
*
|
5 |
* @author Kazuya Takami
|
|
|
6 |
* @since 2.1.0
|
7 |
-
* @version 2.2.1
|
8 |
*/
|
9 |
class Structuring_Markup_Custom_Post_Event {
|
10 |
|
@@ -17,11 +17,39 @@ class Structuring_Markup_Custom_Post_Event {
|
|
17 |
private $text_domain;
|
18 |
private $custom_type = 'schema_event_post';
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Constructor Define.
|
22 |
*
|
23 |
-
* @since 2.1.0
|
24 |
* @version 3.0.0
|
|
|
25 |
* @param String $text_domain
|
26 |
*/
|
27 |
public function __construct ( $text_domain ) {
|
@@ -57,8 +85,8 @@ class Structuring_Markup_Custom_Post_Event {
|
|
57 |
/**
|
58 |
* admin init.
|
59 |
*
|
60 |
-
* @since 2.1.0
|
61 |
* @version 2.1.0
|
|
|
62 |
*/
|
63 |
public function admin_init () {
|
64 |
add_action( 'save_post_' . $this->custom_type, array( $this, 'save_post' ) );
|
@@ -67,8 +95,8 @@ class Structuring_Markup_Custom_Post_Event {
|
|
67 |
/**
|
68 |
* admin meta boxes.
|
69 |
*
|
70 |
-
* @since 2.1.0
|
71 |
* @version 2.1.0
|
|
|
72 |
*/
|
73 |
public function admin_menu () {
|
74 |
$custom_field_title = esc_html__( 'Schema.org Type Event', $this->text_domain );
|
@@ -78,25 +106,41 @@ class Structuring_Markup_Custom_Post_Event {
|
|
78 |
/**
|
79 |
* Set custom fields.
|
80 |
*
|
|
|
81 |
* @since 2.1.0
|
82 |
-
* @version 2.1.0
|
83 |
*/
|
84 |
public function set_custom_fields () {
|
85 |
$args = get_post_meta( get_the_ID(), $this->custom_type, false );
|
86 |
$args = isset( $args[0] ) ? unserialize( $args[0] ) : "";
|
87 |
|
88 |
-
if ( !isset( $args['
|
89 |
-
if ( !isset( $args['
|
90 |
-
if ( !isset( $args['
|
91 |
-
if ( !isset( $args['
|
92 |
-
if ( !isset( $args['
|
93 |
-
if ( !isset( $args['
|
94 |
-
if ( !isset( $args['
|
95 |
-
if ( !isset( $args['
|
|
|
|
|
|
|
96 |
if ( !isset( $args['schema_event_offers_currency'] ) ) $args['schema_event_offers_currency'] = esc_html__( 'USD', $this->text_domain );
|
97 |
|
98 |
$html = '';
|
99 |
$html .= '<table>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
$html .= '<tr><th><label for="schema_event_name">';
|
101 |
$html .= esc_html__( 'Event Name', $this->text_domain );
|
102 |
$html .= '</label></th><td>';
|
@@ -147,8 +191,8 @@ class Structuring_Markup_Custom_Post_Event {
|
|
147 |
/**
|
148 |
* Save custom post.
|
149 |
*
|
150 |
-
* @since 2.1.0
|
151 |
* @version 2.1.0
|
|
|
152 |
* @param integer $post_id The post ID.
|
153 |
*/
|
154 |
public function save_post ( $post_id ) {
|
3 |
* Schema.org Custom Post "Event"
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @version 3.1.3
|
7 |
* @since 2.1.0
|
|
|
8 |
*/
|
9 |
class Structuring_Markup_Custom_Post_Event {
|
10 |
|
17 |
private $text_domain;
|
18 |
private $custom_type = 'schema_event_post';
|
19 |
|
20 |
+
/**
|
21 |
+
* Event Type.
|
22 |
+
*
|
23 |
+
* @version 3.1.3
|
24 |
+
* @since 3.1.3
|
25 |
+
*/
|
26 |
+
private $event_type = array(
|
27 |
+
"Event",
|
28 |
+
"BusinessEvent",
|
29 |
+
"ChildrensEvent",
|
30 |
+
"ComedyEvent",
|
31 |
+
"DanceEvent",
|
32 |
+
"DeliveryEvent",
|
33 |
+
"EducationEvent",
|
34 |
+
"ExhibitionEvent",
|
35 |
+
"Festival",
|
36 |
+
"FoodEvent",
|
37 |
+
"LiteraryEvent",
|
38 |
+
"MusicEvent",
|
39 |
+
"PublicationEvent",
|
40 |
+
"SaleEvent",
|
41 |
+
"ScreeningEvent",
|
42 |
+
"SocialEvent",
|
43 |
+
"SportsEvent",
|
44 |
+
"TheaterEvent",
|
45 |
+
"VisualArtsEvent"
|
46 |
+
);
|
47 |
+
|
48 |
/**
|
49 |
* Constructor Define.
|
50 |
*
|
|
|
51 |
* @version 3.0.0
|
52 |
+
* @since 2.1.0
|
53 |
* @param String $text_domain
|
54 |
*/
|
55 |
public function __construct ( $text_domain ) {
|
85 |
/**
|
86 |
* admin init.
|
87 |
*
|
|
|
88 |
* @version 2.1.0
|
89 |
+
* @since 2.1.0
|
90 |
*/
|
91 |
public function admin_init () {
|
92 |
add_action( 'save_post_' . $this->custom_type, array( $this, 'save_post' ) );
|
95 |
/**
|
96 |
* admin meta boxes.
|
97 |
*
|
|
|
98 |
* @version 2.1.0
|
99 |
+
* @since 2.1.0
|
100 |
*/
|
101 |
public function admin_menu () {
|
102 |
$custom_field_title = esc_html__( 'Schema.org Type Event', $this->text_domain );
|
106 |
/**
|
107 |
* Set custom fields.
|
108 |
*
|
109 |
+
* @version 3.1.3
|
110 |
* @since 2.1.0
|
|
|
111 |
*/
|
112 |
public function set_custom_fields () {
|
113 |
$args = get_post_meta( get_the_ID(), $this->custom_type, false );
|
114 |
$args = isset( $args[0] ) ? unserialize( $args[0] ) : "";
|
115 |
|
116 |
+
if ( !isset( $args['schema_event_type'] ) ) $args['schema_event_type'] = 'Event';
|
117 |
+
if ( !isset( $args['schema_event_name'] ) ) $args['schema_event_name'] = '';
|
118 |
+
if ( !isset( $args['schema_event_date'] ) ) $args['schema_event_date'] = date( 'Y-m-d' );
|
119 |
+
if ( !isset( $args['schema_event_time'] ) ) $args['schema_event_time'] = date( 'h:i' );
|
120 |
+
if ( !isset( $args['schema_event_date_end'] ) ) $args['schema_event_date_end'] = date( 'Y-m-d' );
|
121 |
+
if ( !isset( $args['schema_event_time_end'] ) ) $args['schema_event_time_end'] = date( 'h:i' );
|
122 |
+
if ( !isset( $args['schema_event_url'] ) ) $args['schema_event_url'] = '';
|
123 |
+
if ( !isset( $args['schema_event_place_name'] ) ) $args['schema_event_place_name'] = '';
|
124 |
+
if ( !isset( $args['schema_event_place_url'] ) ) $args['schema_event_place_url'] = '';
|
125 |
+
if ( !isset( $args['schema_event_place_address'] ) ) $args['schema_event_place_address'] = '';
|
126 |
+
if ( !isset( $args['schema_event_offers_price'] ) ) $args['schema_event_offers_price'] = 0;
|
127 |
if ( !isset( $args['schema_event_offers_currency'] ) ) $args['schema_event_offers_currency'] = esc_html__( 'USD', $this->text_domain );
|
128 |
|
129 |
$html = '';
|
130 |
$html .= '<table>';
|
131 |
+
$html .= '<tr><th><label for="schema_event_type">';
|
132 |
+
$html .= esc_html__( 'Event Type', $this->text_domain );
|
133 |
+
$html .= '</label></th><td>';
|
134 |
+
$html .= '<select name="option[' . "schema_event_type" . ']" id="schema_event_type">';
|
135 |
+
foreach( $this->event_type as $value) {
|
136 |
+
$html .= '<option';
|
137 |
+
if ( $value === $args['schema_event_type'] ) {
|
138 |
+
$html .= ' selected="selected"';
|
139 |
+
}
|
140 |
+
$html .= ' value="' . $value . '">' . $value . '</option>';
|
141 |
+
}
|
142 |
+
$html .= '</select>';
|
143 |
+
$html .= '</td></tr>';
|
144 |
$html .= '<tr><th><label for="schema_event_name">';
|
145 |
$html .= esc_html__( 'Event Name', $this->text_domain );
|
146 |
$html .= '</label></th><td>';
|
191 |
/**
|
192 |
* Save custom post.
|
193 |
*
|
|
|
194 |
* @version 2.1.0
|
195 |
+
* @since 2.1.0
|
196 |
* @param integer $post_id The post ID.
|
197 |
*/
|
198 |
public function save_post ( $post_id ) {
|
includes/wp-structuring-display.php
CHANGED
@@ -427,7 +427,7 @@ class Structuring_Markup_Display {
|
|
427 |
/**
|
428 |
* Setting schema.org Event
|
429 |
*
|
430 |
-
* @version 3.1.
|
431 |
* @since 2.1.0
|
432 |
*/
|
433 |
private function set_schema_event () {
|
@@ -437,6 +437,7 @@ class Structuring_Markup_Display {
|
|
437 |
if ( isset( $meta[0] ) ) {
|
438 |
$meta = unserialize( $meta[0] );
|
439 |
|
|
|
440 |
if ( !isset( $meta['schema_event_name']) ) $meta['schema_event_name'] = '';
|
441 |
if ( !isset( $meta['schema_event_date']) ) $meta['schema_event_date'] = date('Y-m-d');
|
442 |
if ( !isset( $meta['schema_event_time']) ) $meta['schema_event_time'] = date('h:i');
|
@@ -449,7 +450,7 @@ class Structuring_Markup_Display {
|
|
449 |
|
450 |
$args = array(
|
451 |
"@context" => "http://schema.org",
|
452 |
-
"@type" =>
|
453 |
"name" => esc_html( $meta['schema_event_name'] ),
|
454 |
"startDate" => esc_html( $meta['schema_event_date'] ) . 'T' . esc_html( $meta['schema_event_time'] ),
|
455 |
"url" => esc_url( $meta['schema_event_url'] ),
|
@@ -466,6 +467,7 @@ class Structuring_Markup_Display {
|
|
466 |
"url" => esc_url( $meta['schema_event_url'] )
|
467 |
)
|
468 |
);
|
|
|
469 |
$this->set_schema_json( $args );
|
470 |
}
|
471 |
}
|
427 |
/**
|
428 |
* Setting schema.org Event
|
429 |
*
|
430 |
+
* @version 3.1.3
|
431 |
* @since 2.1.0
|
432 |
*/
|
433 |
private function set_schema_event () {
|
437 |
if ( isset( $meta[0] ) ) {
|
438 |
$meta = unserialize( $meta[0] );
|
439 |
|
440 |
+
if ( !isset( $meta['schema_event_type']) ) $meta['schema_event_type'] = 'Event';
|
441 |
if ( !isset( $meta['schema_event_name']) ) $meta['schema_event_name'] = '';
|
442 |
if ( !isset( $meta['schema_event_date']) ) $meta['schema_event_date'] = date('Y-m-d');
|
443 |
if ( !isset( $meta['schema_event_time']) ) $meta['schema_event_time'] = date('h:i');
|
450 |
|
451 |
$args = array(
|
452 |
"@context" => "http://schema.org",
|
453 |
+
"@type" => esc_html( $meta['schema_event_type'] ),
|
454 |
"name" => esc_html( $meta['schema_event_name'] ),
|
455 |
"startDate" => esc_html( $meta['schema_event_date'] ) . 'T' . esc_html( $meta['schema_event_time'] ),
|
456 |
"url" => esc_url( $meta['schema_event_url'] ),
|
467 |
"url" => esc_url( $meta['schema_event_url'] )
|
468 |
)
|
469 |
);
|
470 |
+
|
471 |
$this->set_schema_json( $args );
|
472 |
}
|
473 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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.6.1
|
6 |
-
Stable tag: 3.1.
|
7 |
|
8 |
Allows you to include schema.org JSON-LD syntax markup on your website
|
9 |
|
@@ -54,6 +54,10 @@ if ( shortcode_exists( 'wp-structuring-markup-breadcrumb' ) ) {
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
|
|
57 |
= 3.1.2 (2016-09-27) =
|
58 |
* Updated : homeLocation input item of Schema.org type "Person".
|
59 |
|
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.6.1
|
6 |
+
Stable tag: 3.1.3
|
7 |
|
8 |
Allows you to include schema.org JSON-LD syntax markup on your website
|
9 |
|
54 |
|
55 |
== Changelog ==
|
56 |
|
57 |
+
= 3.1.3 (2016-11-22) =
|
58 |
+
* Updated : Event Type select item of Schema.org type "Event".
|
59 |
+
* Updated : Short Code display changed of Schema.org type "BreadcrumbList".
|
60 |
+
|
61 |
= 3.1.2 (2016-09-27) =
|
62 |
* Updated : homeLocation input item of Schema.org type "Person".
|
63 |
|
wp-structuring-markup.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Markup (JSON-LD) structured in schema.org
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-structuring-markup/
|
5 |
Description: Allows you to include schema.org JSON-LD syntax markup on your website
|
6 |
-
Version: 3.1.
|
7 |
Author: Kazuya Takami
|
8 |
Author URI: http://programp.com/
|
9 |
License: GPLv2 or later
|
@@ -18,7 +18,7 @@ new Structuring_Markup();
|
|
18 |
* Schema.org Basic Class
|
19 |
*
|
20 |
* @author Kazuya Takami
|
21 |
-
* @version 3.1.
|
22 |
* @since 1.0.0
|
23 |
*/
|
24 |
class Structuring_Markup {
|
@@ -26,11 +26,11 @@ class Structuring_Markup {
|
|
26 |
/**
|
27 |
* Variable definition.
|
28 |
*
|
29 |
-
* @version 3.1.
|
30 |
* @since 1.3.0
|
31 |
*/
|
32 |
private $text_domain = 'wp-structuring-markup';
|
33 |
-
private $version = '3.1.
|
34 |
|
35 |
/**
|
36 |
* Constructor Define.
|
3 |
Plugin Name: Markup (JSON-LD) structured in schema.org
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-structuring-markup/
|
5 |
Description: Allows you to include schema.org JSON-LD syntax markup on your website
|
6 |
+
Version: 3.1.3
|
7 |
Author: Kazuya Takami
|
8 |
Author URI: http://programp.com/
|
9 |
License: GPLv2 or later
|
18 |
* Schema.org Basic Class
|
19 |
*
|
20 |
* @author Kazuya Takami
|
21 |
+
* @version 3.1.3
|
22 |
* @since 1.0.0
|
23 |
*/
|
24 |
class Structuring_Markup {
|
26 |
/**
|
27 |
* Variable definition.
|
28 |
*
|
29 |
+
* @version 3.1.3
|
30 |
* @since 1.3.0
|
31 |
*/
|
32 |
private $text_domain = 'wp-structuring-markup';
|
33 |
+
private $version = '3.1.3';
|
34 |
|
35 |
/**
|
36 |
* Constructor Define.
|