Markup (JSON-LD) structured in schema.org - Version 3.0.5

Version Description

(2016-09-06) = * Fixed : CSS & JavaScript version control. * Fixed : Registration screen display adjustment.

Download this release

Release Info

Developer miiitaka
Plugin Icon 128x128 Markup (JSON-LD) structured in schema.org
Version 3.0.5
Comparing to
See all releases

Code changes from version 3.0.4 to 3.0.5

css/style.css CHANGED
@@ -1,87 +1,116 @@
1
  /** List Setting */
2
  .schema-admin-table-list th:nth-child(1) {
3
- width: 10em;
4
  }
 
5
  .schema-admin-table-list td {
6
- vertical-align: middle;
7
  }
 
8
  .schema-admin-table-list td:nth-child(1) span {
9
- display: inline-block;
10
- padding: 0 1em 0 1em;
11
- text-align: center;
12
- width: 8em;
13
  }
 
14
  .schema-admin-table-list td:nth-child(1) span.active {
15
- background: #00a0d2;
16
- color: #ffffff;
17
  }
 
18
  .schema-admin-table-list td:nth-child(1) span.stop {
19
- background: #CCCCCC;
20
  }
21
 
22
  /** Posts page */
23
  .schema-admin-h1-span {
24
- display: inline-block;
25
- font-size: 80%;
26
- margin: 0 0 0 10px;
27
  }
 
 
 
 
 
 
 
28
  .schema-admin-table {
29
- margin: 15px 0 15px 0;
30
  }
 
31
  .schema-admin-table caption {
32
- border-left: solid 4px #00a0d2;
33
- margin: 0 0 5px 0;
34
- padding: 3px 0 3px 7px;
35
- text-align: left;
36
  }
 
37
  .schema-admin-table th {
38
- height: 2em;
39
- padding: 0 5px 0 0;
40
- text-align: right;
41
- vertical-align: middle;
42
- width: 150px;
43
  }
 
 
 
 
 
 
 
44
  .schema-admin-table td {
45
- vertical-align: middle;
46
  }
 
47
  .schema-admin-table td label {
48
- margin: 0 10px 0 0;
49
  }
 
50
  .schema-admin-table small {
51
- margin: 0 0 0 5px;
 
 
 
52
  }
 
53
  .schema-admin-table input[type="checkbox"] {
54
- margin: 0 5px 0 0;
 
 
 
 
55
  }
56
 
57
  /** LocalBusiness */
58
  .markup-time {
59
- color: #999;
60
- cursor: pointer;
61
- width: 18px;
62
- height: 18px;
63
- line-height: 20px;
64
- font-size: 14px;
65
- border: transparent solid 1px;
66
- border-color: #BBB;
67
- background-color: #fff;
68
- border-radius: 100%;
69
- margin-top: 5px;
70
  }
71
 
72
  .markup-time:hover {
73
- color: #fff;
74
- border-color: transparent;
75
  }
76
 
77
- .markup-time.plus:hover {
78
- background-color: #00a0d2;
79
  }
80
 
81
- .markup-time.minus {
82
- line-height: 18px;
83
  }
84
 
85
- .markup-time.minus:hover {
86
- background-color: #F55E4F;
87
  }
1
  /** List Setting */
2
  .schema-admin-table-list th:nth-child(1) {
3
+ width: 10em;
4
  }
5
+
6
  .schema-admin-table-list td {
7
+ vertical-align: middle;
8
  }
9
+
10
  .schema-admin-table-list td:nth-child(1) span {
11
+ display: inline-block;
12
+ padding: 0 1em 0 1em;
13
+ text-align: center;
14
+ width: 8em;
15
  }
16
+
17
  .schema-admin-table-list td:nth-child(1) span.active {
18
+ background: #00a0d2;
19
+ color: #fff;
20
  }
21
+
22
  .schema-admin-table-list td:nth-child(1) span.stop {
23
+ background: #ddd;
24
  }
25
 
26
  /** Posts page */
27
  .schema-admin-h1-span {
28
+ display: inline-block;
29
+ font-size: 80%;
30
+ margin: 0 0 0 10px;
31
  }
32
+
33
+ .schema-admin-require::before {
34
+ color: #a00;
35
+ content: "*";
36
+ margin: 0 3px 0 0;
37
+ }
38
+
39
  .schema-admin-table {
40
+ margin: 15px 0 15px 0;
41
  }
42
+
43
  .schema-admin-table caption {
44
+ border-left: solid 4px #00a0d2;
45
+ margin: 0 0 5px 0;
46
+ padding: 3px 0 3px 7px;
47
+ text-align: left;
48
  }
49
+
50
  .schema-admin-table th {
51
+ height: 2em;
52
+ padding: 0 5px 0 0;
53
+ text-align: right;
54
+ vertical-align: middle;
55
+ width: 200px;
56
  }
57
+
58
+ .schema-admin-table th.require::before {
59
+ color: #a00;
60
+ content: "*";
61
+ margin: 0 3px 0 0;
62
+ }
63
+
64
  .schema-admin-table td {
65
+ vertical-align: middle;
66
  }
67
+
68
  .schema-admin-table td label {
69
+ margin: 0 10px 0 0;
70
  }
71
+
72
  .schema-admin-table small {
73
+ display: block;
74
+ margin: 2px 0 2px 1px;
75
+ background: #ddd;
76
+ padding: 0 5px;
77
  }
78
+
79
  .schema-admin-table input[type="checkbox"] {
80
+ margin: 0 5px 0 0;
81
+ }
82
+
83
+ .schema-admin-table input:invalid {
84
+ box-shadow: 0 0 1px 1px #a00;
85
  }
86
 
87
  /** LocalBusiness */
88
  .markup-time {
89
+ color: #999;
90
+ cursor: pointer;
91
+ width: 18px;
92
+ height: 18px;
93
+ line-height: 20px;
94
+ font-size: 14px;
95
+ border: solid 1px #bbb;
96
+ background-color: #fff;
97
+ border-radius: 100%;
98
+ margin-top: 5px;
 
99
  }
100
 
101
  .markup-time:hover {
102
+ color: #fff;
103
+ border-color: transparent;
104
  }
105
 
106
+ .markup-time .plus:hover {
107
+ background-color: #00a0d2;
108
  }
109
 
110
+ .markup-time .minus {
111
+ line-height: 18px;
112
  }
113
 
114
+ .markup-time .minus:hover {
115
+ background-color: #f55e4f;
116
  }
includes/wp-structuring-admin-post.php CHANGED
@@ -3,8 +3,8 @@
3
  * Schema.org Admin Post
4
  *
5
  * @author Kazuya Takami
 
6
  * @since 1.0.0
7
- * @version 3.0.2
8
  */
9
  class Structuring_Markup_Admin_Post {
10
 
@@ -118,8 +118,8 @@ class Structuring_Markup_Admin_Post {
118
  /**
119
  * Setting Page of the Admin Screen.
120
  *
 
121
  * @since 1.0.0
122
- * @version 3.0.2
123
  * @param array $options
124
  * @param string $status
125
  */
@@ -143,6 +143,9 @@ class Structuring_Markup_Admin_Post {
143
 
144
  /** Output Page Select */
145
  $html = '<hr>';
 
 
 
146
  $html .= '<form method="post" action="">';
147
  echo $html;
148
 
@@ -151,7 +154,7 @@ class Structuring_Markup_Admin_Post {
151
  $html = '<input type="hidden" name="id" value="' . esc_attr( $options['id'] ) . '">';
152
  $html .= '<input type="hidden" name="type" value="' . esc_attr( $options['type'] ) . '">';
153
  $html .= '<table class="schema-admin-table">';
154
- $html .= '<tr><th>Enabled : </th><td>';
155
  $html .= '<input type="checkbox" name="activate" value="on"';
156
  $html .= ( isset( $options['activate'] ) && $options['activate'] === "on" ) ? ' checked' : '';
157
  $html .= '></td></tr>';
3
  * Schema.org Admin Post
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 1.0.0
 
8
  */
9
  class Structuring_Markup_Admin_Post {
10
 
118
  /**
119
  * Setting Page of the Admin Screen.
120
  *
121
+ * @version 3.0.5
122
  * @since 1.0.0
 
123
  * @param array $options
124
  * @param string $status
125
  */
143
 
144
  /** Output Page Select */
145
  $html = '<hr>';
146
+ $html .= '<p class="schema-admin-require">';
147
+ $html .= esc_html__( 'Please note that all fields followed by an asterisk must be filled in.', $this->text_domain );
148
+ $html .= '</p>';
149
  $html .= '<form method="post" action="">';
150
  echo $html;
151
 
154
  $html = '<input type="hidden" name="id" value="' . esc_attr( $options['id'] ) . '">';
155
  $html .= '<input type="hidden" name="type" value="' . esc_attr( $options['type'] ) . '">';
156
  $html .= '<table class="schema-admin-table">';
157
+ $html .= '<tr><th class="require">Enabled : </th><td>';
158
  $html .= '<input type="checkbox" name="activate" value="on"';
159
  $html .= ( isset( $options['activate'] ) && $options['activate'] === "on" ) ? ' checked' : '';
160
  $html .= '></td></tr>';
includes/wp-structuring-admin-type-article.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type Article
4
  *
5
  * @author Kazuya Takami
6
- * @version 2.3.3
7
  * @since 1.1.0
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/Article
@@ -14,8 +14,8 @@ class Structuring_Markup_Type_Article {
14
  /**
15
  * Constructor Define.
16
  *
17
- * @since 1.0.0
18
  * @version 2.2.0
 
19
  * @param array $option
20
  */
21
  public function __construct ( array $option ) {
@@ -29,40 +29,40 @@ class Structuring_Markup_Type_Article {
29
  /**
30
  * Form Layout Render
31
  *
 
32
  * @since 1.1.0
33
- * @version 2.3.3
34
  * @param array $option
35
  */
36
  private function page_render ( array $option ) {
37
  $html = '<table class="schema-admin-table">';
38
  $html .= '<caption>Basic Setting</caption>';
39
- $html .= '<tr><th>headline :</th><td><small>Default : post_title</small></td></tr>';
40
- $html .= '<tr><th>datePublished :</th><td><small>Default : get_the_time( DATE_ISO8601, ID )</small></td></tr>';
41
  $html .= '<tr><th>dateModified :</th><td><small>Default : get_the_modified_time( DATE_ISO8601, false, ID )</small></td></tr>';
42
  $html .= '<tr><th>description :</th><td><small>Default : post_excerpt</small></td></tr>';
43
  $html .= '</table>';
44
  echo $html;
45
 
46
  $html = '<table class="schema-admin-table">';
47
- $html .= '<caption>mainEntityOfPage ( recommended )</caption>';
48
  $html .= '<tr><th>@type :</th><td><small>"WebPage"</small></td></tr>';
49
  $html .= '<tr><th>@id :</th><td><small>Default : get_permalink( ID )</small></td></tr>';
50
  $html .= '</table>';
51
  echo $html;
52
 
53
  $html = '<table class="schema-admin-table">';
54
- $html .= '<caption>image ( required )</caption>';
55
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
56
- $html .= '<tr><th>url :</th><td><small>Default : thumbnail</small></td></tr>';
57
- $html .= '<tr><th>height :</th><td><small>Auto : The height of the image, in pixels.</small></td></tr>';
58
- $html .= '<tr><th>width :</th><td><small>Auto : The width of the image, in pixels. Images should be at least 696 pixels wide.</small></td></tr>';
59
  $html .= '</table>';
60
  echo $html;
61
 
62
  $html = '<table class="schema-admin-table">';
63
- $html .= '<caption>publisher( required )</caption>';
64
  $html .= '<tr><th>@type :</th><td><small>"Organization"</small></td></tr>';
65
- $html .= '<tr><th><label for="name">Organization Name :</label></th><td>';
66
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
67
  $html .= '<small>Default : bloginfo("name")</small>';
68
  $html .= '</td></tr>';
@@ -70,14 +70,15 @@ class Structuring_Markup_Type_Article {
70
  echo $html;
71
 
72
  $html = '<table class="schema-admin-table">';
73
- $html .= '<caption>logo ( required )</caption>';
74
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
75
- $html .= '<tr><th><label for="logo">url :</label></th><td>';
76
  $html .= '<input type="text" name="option[' . "logo" . ']" id="logo" class="regular-text" required value="' . esc_attr( $option['logo'] ) . '">';
77
  $html .= '<small>Default : bloginfo("logo") + "/images/logo.png"</small>';
 
78
  $html .= '</td></tr>';
79
- $html .= '<tr><th>height :</th><td><small>Auto : height <= 60px.</small></td></tr>';
80
- $html .= '<tr><th>width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
81
  $html .= '</table>';
82
  echo $html;
83
 
3
  * Schema.org Type Article
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 1.1.0
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/Article
14
  /**
15
  * Constructor Define.
16
  *
 
17
  * @version 2.2.0
18
+ * @since 1.0.0
19
  * @param array $option
20
  */
21
  public function __construct ( array $option ) {
29
  /**
30
  * Form Layout Render
31
  *
32
+ * @version 3.0.5
33
  * @since 1.1.0
 
34
  * @param array $option
35
  */
36
  private function page_render ( array $option ) {
37
  $html = '<table class="schema-admin-table">';
38
  $html .= '<caption>Basic Setting</caption>';
39
+ $html .= '<tr><th class="require">headline :</th><td><small>Default : post_title</small></td></tr>';
40
+ $html .= '<tr><th class="require">datePublished :</th><td><small>Default : get_the_time( DATE_ISO8601, ID )</small></td></tr>';
41
  $html .= '<tr><th>dateModified :</th><td><small>Default : get_the_modified_time( DATE_ISO8601, false, ID )</small></td></tr>';
42
  $html .= '<tr><th>description :</th><td><small>Default : post_excerpt</small></td></tr>';
43
  $html .= '</table>';
44
  echo $html;
45
 
46
  $html = '<table class="schema-admin-table">';
47
+ $html .= '<caption>mainEntityOfPage</caption>';
48
  $html .= '<tr><th>@type :</th><td><small>"WebPage"</small></td></tr>';
49
  $html .= '<tr><th>@id :</th><td><small>Default : get_permalink( ID )</small></td></tr>';
50
  $html .= '</table>';
51
  echo $html;
52
 
53
  $html = '<table class="schema-admin-table">';
54
+ $html .= '<caption>image</caption>';
55
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
56
+ $html .= '<tr><th class="require">url :</th><td><small>Default : thumbnail</small></td></tr>';
57
+ $html .= '<tr><th class="require">height :</th><td><small>Auto : The height of the image, in pixels.</small></td></tr>';
58
+ $html .= '<tr><th class="require">width :</th><td><small>Auto : The width of the image, in pixels. Images should be at least 696 pixels wide.</small></td></tr>';
59
  $html .= '</table>';
60
  echo $html;
61
 
62
  $html = '<table class="schema-admin-table">';
63
+ $html .= '<caption>publisher</caption>';
64
  $html .= '<tr><th>@type :</th><td><small>"Organization"</small></td></tr>';
65
+ $html .= '<tr><th class="require"><label for="name">Organization Name :</label></th><td>';
66
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
67
  $html .= '<small>Default : bloginfo("name")</small>';
68
  $html .= '</td></tr>';
70
  echo $html;
71
 
72
  $html = '<table class="schema-admin-table">';
73
+ $html .= '<caption>publisher.logo</caption>';
74
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
75
+ $html .= '<tr><th class="require"><label for="logo">url :</label></th><td>';
76
  $html .= '<input type="text" name="option[' . "logo" . ']" id="logo" class="regular-text" required value="' . esc_attr( $option['logo'] ) . '">';
77
  $html .= '<small>Default : bloginfo("logo") + "/images/logo.png"</small>';
78
+ $html .= '<small>Logos should be no wider than 600px, and no taller than 60px.</small>';
79
  $html .= '</td></tr>';
80
+ $html .= '<tr><th class="require">height :</th><td><small>Auto : height <= 60px.</small></td></tr>';
81
+ $html .= '<tr><th class="require">width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
82
  $html .= '</table>';
83
  echo $html;
84
 
includes/wp-structuring-admin-type-blog-posting.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type BlogPosting
4
  *
5
  * @author Kazuya Takami
6
- * @version 2.3.3
7
  * @since 1.2.0
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/BlogPosting
@@ -14,8 +14,8 @@ class Structuring_Markup_Type_Blog_Posting {
14
  /**
15
  * Constructor Define.
16
  *
17
- * @since 1.0.0
18
  * @version 2.2.0
 
19
  * @param array $option
20
  */
21
  public function __construct ( array $option ) {
@@ -29,40 +29,40 @@ class Structuring_Markup_Type_Blog_Posting {
29
  /**
30
  * Form Layout Render
31
  *
 
32
  * @since 1.2.0
33
- * @version 2.3.3
34
  * @param array $option
35
  */
36
  private function page_render ( array $option ) {
37
  $html = '<table class="schema-admin-table">';
38
  $html .= '<caption>Basic Setting</caption>';
39
- $html .= '<tr><th>headline :</th><td><small>Default : post_title</small></td></tr>';
40
- $html .= '<tr><th>datePublished :</th><td><small>Default : get_the_time( DATE_ISO8601, ID )</small></td></tr>';
41
  $html .= '<tr><th>dateModified :</th><td><small>Default : get_the_modified_time( DATE_ISO8601, false, ID )</small></td></tr>';
42
  $html .= '<tr><th>description :</th><td><small>Default : post_excerpt</small></td></tr>';
43
  $html .= '</table>';
44
  echo $html;
45
 
46
  $html = '<table class="schema-admin-table">';
47
- $html .= '<caption>mainEntityOfPage ( recommended )</caption>';
48
  $html .= '<tr><th>@type :</th><td><small>"WebPage"</small></td></tr>';
49
  $html .= '<tr><th>@id :</th><td><small>Default : get_permalink( ID )</small></td></tr>';
50
  $html .= '</table>';
51
  echo $html;
52
 
53
  $html = '<table class="schema-admin-table">';
54
- $html .= '<caption>image ( required )</caption>';
55
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
56
- $html .= '<tr><th>url :</th><td><small>Default : thumbnail</small></td></tr>';
57
- $html .= '<tr><th>height :</th><td><small>Auto : The height of the image, in pixels.</small></td></tr>';
58
- $html .= '<tr><th>width :</th><td><small>Auto : The width of the image, in pixels. Images should be at least 696 pixels wide.</small></td></tr>';
59
  $html .= '</table>';
60
  echo $html;
61
 
62
  $html = '<table class="schema-admin-table">';
63
- $html .= '<caption>publisher ( required )</caption>';
64
  $html .= '<tr><th>@type :</th><td><small>"Organization"</small></td></tr>';
65
- $html .= '<tr><th><label for="name">Organization Name :</label></th><td>';
66
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
67
  $html .= '<small>Default : bloginfo("name")</small>';
68
  $html .= '</td></tr>';
@@ -70,14 +70,15 @@ class Structuring_Markup_Type_Blog_Posting {
70
  echo $html;
71
 
72
  $html = '<table class="schema-admin-table">';
73
- $html .= '<caption>logo ( required )</caption>';
74
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
75
- $html .= '<tr><th><label for="logo">url :</label></th><td>';
76
  $html .= '<input type="text" name="option[' . "logo" . ']" id="logo" class="regular-text" required value="' . esc_attr( $option['logo'] ) . '">';
77
  $html .= '<small>Default : bloginfo("logo") + "/images/logo.png"</small>';
 
78
  $html .= '</td></tr>';
79
- $html .= '<tr><th>height :</th><td><small>Auto : height <= 60px.</small></td></tr>';
80
- $html .= '<tr><th>width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
81
  $html .= '</table>';
82
  echo $html;
83
 
@@ -88,8 +89,8 @@ class Structuring_Markup_Type_Blog_Posting {
88
  /**
89
  * Return the default options array
90
  *
91
- * @since 2.2.0
92
  * @version 2.2.0
 
93
  * @param array $args
94
  * @return array $args
95
  */
3
  * Schema.org Type BlogPosting
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 1.2.0
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/BlogPosting
14
  /**
15
  * Constructor Define.
16
  *
 
17
  * @version 2.2.0
18
+ * @since 1.0.0
19
  * @param array $option
20
  */
21
  public function __construct ( array $option ) {
29
  /**
30
  * Form Layout Render
31
  *
32
+ * @version 3.0.5
33
  * @since 1.2.0
 
34
  * @param array $option
35
  */
36
  private function page_render ( array $option ) {
37
  $html = '<table class="schema-admin-table">';
38
  $html .= '<caption>Basic Setting</caption>';
39
+ $html .= '<tr><th class="require">headline :</th><td><small>Default : post_title</small></td></tr>';
40
+ $html .= '<tr><th class="require">datePublished :</th><td><small>Default : get_the_time( DATE_ISO8601, ID )</small></td></tr>';
41
  $html .= '<tr><th>dateModified :</th><td><small>Default : get_the_modified_time( DATE_ISO8601, false, ID )</small></td></tr>';
42
  $html .= '<tr><th>description :</th><td><small>Default : post_excerpt</small></td></tr>';
43
  $html .= '</table>';
44
  echo $html;
45
 
46
  $html = '<table class="schema-admin-table">';
47
+ $html .= '<caption>mainEntityOfPage</caption>';
48
  $html .= '<tr><th>@type :</th><td><small>"WebPage"</small></td></tr>';
49
  $html .= '<tr><th>@id :</th><td><small>Default : get_permalink( ID )</small></td></tr>';
50
  $html .= '</table>';
51
  echo $html;
52
 
53
  $html = '<table class="schema-admin-table">';
54
+ $html .= '<caption>image</caption>';
55
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
56
+ $html .= '<tr><th class="require">url :</th><td><small>Default : thumbnail</small></td></tr>';
57
+ $html .= '<tr><th class="require">height :</th><td><small>Auto : The height of the image, in pixels.</small></td></tr>';
58
+ $html .= '<tr><th class="require">width :</th><td><small>Auto : The width of the image, in pixels. Images should be at least 696 pixels wide.</small></td></tr>';
59
  $html .= '</table>';
60
  echo $html;
61
 
62
  $html = '<table class="schema-admin-table">';
63
+ $html .= '<caption>publisher</caption>';
64
  $html .= '<tr><th>@type :</th><td><small>"Organization"</small></td></tr>';
65
+ $html .= '<tr><th class="require"><label for="name">Organization Name :</label></th><td>';
66
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
67
  $html .= '<small>Default : bloginfo("name")</small>';
68
  $html .= '</td></tr>';
70
  echo $html;
71
 
72
  $html = '<table class="schema-admin-table">';
73
+ $html .= '<caption>publisher.logo</caption>';
74
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
75
+ $html .= '<tr><th class="require"><label for="logo">url :</label></th><td>';
76
  $html .= '<input type="text" name="option[' . "logo" . ']" id="logo" class="regular-text" required value="' . esc_attr( $option['logo'] ) . '">';
77
  $html .= '<small>Default : bloginfo("logo") + "/images/logo.png"</small>';
78
+ $html .= '<small>Logos should be no wider than 600px, and no taller than 60px.</small>';
79
  $html .= '</td></tr>';
80
+ $html .= '<tr><th class="require">height :</th><td><small>Auto : height <= 60px.</small></td></tr>';
81
+ $html .= '<tr><th class="require">width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
82
  $html .= '</table>';
83
  echo $html;
84
 
89
  /**
90
  * Return the default options array
91
  *
 
92
  * @version 2.2.0
93
+ * @since 2.2.0
94
  * @param array $args
95
  * @return array $args
96
  */
includes/wp-structuring-admin-type-event.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type Event
4
  *
5
  * @author Kazuya Takami
6
- * @version 2.1.3
7
  * @since 2.1.0
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/Event
@@ -25,29 +25,30 @@ class Structuring_Markup_Type_Event {
25
  /**
26
  * Form Layout Render
27
  *
28
- * @since 2.1.0
 
29
  */
30
  private function page_render () {
31
  $html = '<table class="schema-admin-table">';
32
  $html .= '<caption>Basic Setting</caption>';
33
- $html .= '<tr><th>name :</th><td><small>Input a custom post: field name "schema_event_name"</small></td></tr>';
34
- $html .= '<tr><th>startDate :</th><td><small>Input a custom post: field name "schema_event_date" & "schema_event_time"</small></td></tr>';
35
  $html .= '<tr><th>url :</th><td><small>Input a custom post: field name "schema_event_url"</small></td></tr>';
36
  $html .= '</table>';
37
  echo $html;
38
 
39
  $html = '<table class="schema-admin-table">';
40
  $html .= '<caption>Location Type "Place" Setting</caption>';
41
- $html .= '<tr><th>name :</th><td><small>Input a custom post: field name "schema_event_place_name"</small></td></tr>';
42
  $html .= '<tr><th>url(sameAs) :</th><td><small>Input a custom post: field name "schema_event_place_url"</small></td></tr>';
43
- $html .= '<tr><th>address :</th><td><small>Input a custom post: field name "schema_event_place_address"</small></td></tr>';
44
  $html .= '</table>';
45
  echo $html;
46
 
47
  $html = '<table class="schema-admin-table">';
48
  $html .= '<caption>Location Type "Offers" Setting</caption>';
49
  $html .= '<tr><th>price :</th><td><small>Input a custom post: field name "schema_event_place_name"</small></td></tr>';
50
- $html .= '<tr><th>priceCurrency :</th><td><small>Input a custom post: field name "schema_event_place_address"</small></td></tr>';
51
  $html .= '<tr><th>url :</th><td><small>Input a custom post: field name "schema_event_place_url"</small></td></tr>';
52
  $html .= '</table>';
53
  echo $html;
3
  * Schema.org Type Event
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
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.0.5
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>';
37
  $html .= '</table>';
38
  echo $html;
39
 
40
  $html = '<table class="schema-admin-table">';
41
  $html .= '<caption>Location Type "Place" Setting</caption>';
42
+ $html .= '<tr><th class="require">name :</th><td><small>Input a custom post: field name "schema_event_place_name"</small></td></tr>';
43
  $html .= '<tr><th>url(sameAs) :</th><td><small>Input a custom post: field name "schema_event_place_url"</small></td></tr>';
44
+ $html .= '<tr><th class="require">address :</th><td><small>Input a custom post: field name "schema_event_place_address"</small></td></tr>';
45
  $html .= '</table>';
46
  echo $html;
47
 
48
  $html = '<table class="schema-admin-table">';
49
  $html .= '<caption>Location Type "Offers" Setting</caption>';
50
  $html .= '<tr><th>price :</th><td><small>Input a custom post: field name "schema_event_place_name"</small></td></tr>';
51
+ $html .= '<tr><th class="require">priceCurrency :</th><td><small>Input a custom post: field name "schema_event_place_address"</small></td></tr>';
52
  $html .= '<tr><th>url :</th><td><small>Input a custom post: field name "schema_event_place_url"</small></td></tr>';
53
  $html .= '</table>';
54
  echo $html;
includes/wp-structuring-admin-type-local-business.php CHANGED
@@ -3,12 +3,12 @@
3
  * Schema.org Type Organization
4
  *
5
  * @author Kazuya Takami
 
6
  * @since 2.3.3
7
- * @version 2.5.0
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/LocalBusiness
10
  * @link https://schema.org/GeoCircle
11
- * @link https://developers.google.com/search/docs/guides/intro-structured-data
12
  */
13
  class Structuring_Markup_Type_LocalBusiness {
14
 
@@ -17,7 +17,7 @@ class Structuring_Markup_Type_LocalBusiness {
17
  *
18
  * @since 2.3.0
19
  */
20
- /** LoacalBusiness Type defined. */
21
  private $business_type_array = array(
22
  array( "type" => "LocalBusiness", "display" => "LocalBusiness" ),
23
 
@@ -205,14 +205,14 @@ class Structuring_Markup_Type_LocalBusiness {
205
  /**
206
  * Form Layout Render
207
  *
 
208
  * @since 2.3.3
209
- * @version 2.5.0
210
  * @param array $option
211
  */
212
  private function page_render ( array $option ) {
213
  /** Local Business Type */
214
  $html = '<table class="schema-admin-table">';
215
- $html .= '<caption>Local Business ( required )</caption>';
216
  $html .= $this->set_form_select( 'business_type', 'Local Business Type', $option['business_type'], 'Default : "Local Business"' );
217
  $html .= $this->set_form_text( 'name', 'Business Name', $option['name'], true, 'Default : bloginfo("name")' );
218
  $html .= $this->set_form_text( 'url', 'Url', $option['url'], true, 'Default : bloginfo("url")' );
@@ -222,7 +222,7 @@ class Structuring_Markup_Type_LocalBusiness {
222
 
223
  /** For food establishments */
224
  $html = '<table class="schema-admin-table">';
225
- $html .= '<caption>For food establishments ( recommended )</caption>';
226
  if ( !isset( $option['food_active'] ) ) {
227
  $option['food_active'] = "";
228
  }
@@ -237,7 +237,7 @@ class Structuring_Markup_Type_LocalBusiness {
237
 
238
  /** Postal Address */
239
  $html = '<table class="schema-admin-table">';
240
- $html .= '<caption>Postal Address ( required )</caption>';
241
  $html .= $this->set_form_text( 'street_address', 'Street Address', $option['street_address'], true );
242
  $html .= $this->set_form_text( 'address_locality', 'Address Locality', $option['address_locality'], true );
243
  $html .= $this->set_form_text( 'address_region', 'Address Region', $option['address_region'], false );
@@ -248,7 +248,7 @@ class Structuring_Markup_Type_LocalBusiness {
248
 
249
  /** Geo Circle */
250
  $html = '<table class="schema-admin-table">';
251
- $html .= '<caption>Geo Circle ( recommended )</caption>';
252
  if ( !isset( $option['geo_circle_active'] ) ) {
253
  $option['geo_circle_active'] = "";
254
  }
@@ -262,7 +262,7 @@ class Structuring_Markup_Type_LocalBusiness {
262
 
263
  /** Geo Coordinates */
264
  $html = '<table class="schema-admin-table">';
265
- $html .= '<caption>Geo Coordinates ( recommended )</caption>';
266
  if ( !isset( $option['geo_active'] ) ) {
267
  $option['geo_active'] = "";
268
  }
@@ -274,7 +274,7 @@ class Structuring_Markup_Type_LocalBusiness {
274
 
275
  /** Opening Hours Specification */
276
  $html = '<table class="schema-admin-table">';
277
- $html .= '<caption>Opening Hours Specification ( recommended )</caption>';
278
 
279
  $i = 0;
280
 
@@ -307,7 +307,7 @@ class Structuring_Markup_Type_LocalBusiness {
307
 
308
  /** Holiday Opening Hours */
309
  $html = '<table class="schema-admin-table">';
310
- $html .= '<caption>Holiday Opening Hours ( recommended )</caption>';
311
  if ( !isset( $option['holiday_active'] ) ) {
312
  $option['holiday_active'] = "";
313
  }
@@ -331,7 +331,7 @@ class Structuring_Markup_Type_LocalBusiness {
331
  $html .= '</table>';
332
  echo $html;
333
 
334
- echo '<p>Setting Knowledge : <a href="https://developers.google.com/search/docs/guides/intro-structured-data" target="_blank">https://developers.google.com/search/docs/guides/intro-structured-data</a></p>';
335
  submit_button();
336
  }
337
 
@@ -379,6 +379,7 @@ class Structuring_Markup_Type_LocalBusiness {
379
  /**
380
  * Return the form text
381
  *
 
382
  * @since 2.3.0
383
  * @param string $id
384
  * @param string $display
@@ -390,8 +391,14 @@ class Structuring_Markup_Type_LocalBusiness {
390
  private function set_form_text ( $id, $display, $value = "", $required = false, $note = "" ) {
391
  $value = esc_attr( $value );
392
 
393
- $format = '<tr><th><label for=%s>%s :</label></th><td>';
 
 
 
 
 
394
  $format .= '<input type="text" name="option[%s]" id="%s" class="regular-text" value="%s"';
 
395
  if ( $required ) {
396
  $format .= ' required';
397
  }
@@ -401,9 +408,9 @@ class Structuring_Markup_Type_LocalBusiness {
401
  }
402
 
403
  /**
404
- * Return the form text
405
  *
406
- * @since 2.5.0
407
  * @version 2.5.0
408
  * @param string $id
409
  * @param string $display
@@ -428,6 +435,7 @@ class Structuring_Markup_Type_LocalBusiness {
428
  /**
429
  * Return the form checkbox
430
  *
 
431
  * @since 2.3.0
432
  * @param string $id
433
  * @param string $display
@@ -443,7 +451,7 @@ class Structuring_Markup_Type_LocalBusiness {
443
  if ( $value === 'on' ) {
444
  $format .= ' checked="checked"';
445
  }
446
- $format .= '><small>%s</small></td></tr>';
447
 
448
  return (string) sprintf( $format, $id, $display, $id, $id, $note );
449
  }
@@ -461,7 +469,7 @@ class Structuring_Markup_Type_LocalBusiness {
461
  private function set_form_select ( $id, $display, $value = "", $note = "" ) {
462
  $value = esc_attr( $value );
463
 
464
- $format = '<tr><th><label for=%s>%s :</label></th><td>';
465
  $format .= '<select id="%s" name="option[%s]">';
466
  foreach ( $this->business_type_array as $args ) {
467
  $format .= '<option value="' . $args['type'] . '"';
@@ -479,8 +487,8 @@ class Structuring_Markup_Type_LocalBusiness {
479
  /**
480
  * Return the form time
481
  *
 
482
  * @since 2.3.0
483
- * @version 2.4.0
484
  * @param string $id
485
  * @param string $display
486
  * @param string $value1
@@ -496,7 +504,7 @@ class Structuring_Markup_Type_LocalBusiness {
496
  $format = '<tr class="opening-hours %s"><th><label for=%s>%s :</label></th><td>';
497
  $format .= 'Open Time : <input type="time" name="option[week][%s][%d][open]" id="%s-open" value="%s">';
498
  $format .= ' Close Time : <input type="time" name="option[week][%s][%d][close]" id="%s-close" value="%s">';
499
- $format .= '<small>%s</small><a class="dashicons dashicons-plus markup-time plus"></a>';
500
  if( $count !== 0 ) {
501
  $format .= '<a class="dashicons dashicons-minus markup-time minus"></a>';
502
  }
@@ -525,4 +533,4 @@ class Structuring_Markup_Type_LocalBusiness {
525
 
526
  return (string) sprintf( $format, $value1, $value2 );
527
  }
528
- }
3
  * Schema.org Type Organization
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 2.3.3
 
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/LocalBusiness
10
  * @link https://schema.org/GeoCircle
11
+ * @link https://developers.google.com/search/docs/data-types/local-businesses
12
  */
13
  class Structuring_Markup_Type_LocalBusiness {
14
 
17
  *
18
  * @since 2.3.0
19
  */
20
+ /** LocalBusiness Type defined. */
21
  private $business_type_array = array(
22
  array( "type" => "LocalBusiness", "display" => "LocalBusiness" ),
23
 
205
  /**
206
  * Form Layout Render
207
  *
208
+ * @version 3.0.5
209
  * @since 2.3.3
 
210
  * @param array $option
211
  */
212
  private function page_render ( array $option ) {
213
  /** Local Business Type */
214
  $html = '<table class="schema-admin-table">';
215
+ $html .= '<caption>Local Business</caption>';
216
  $html .= $this->set_form_select( 'business_type', 'Local Business Type', $option['business_type'], 'Default : "Local Business"' );
217
  $html .= $this->set_form_text( 'name', 'Business Name', $option['name'], true, 'Default : bloginfo("name")' );
218
  $html .= $this->set_form_text( 'url', 'Url', $option['url'], true, 'Default : bloginfo("url")' );
222
 
223
  /** For food establishments */
224
  $html = '<table class="schema-admin-table">';
225
+ $html .= '<caption>For food establishments</caption>';
226
  if ( !isset( $option['food_active'] ) ) {
227
  $option['food_active'] = "";
228
  }
237
 
238
  /** Postal Address */
239
  $html = '<table class="schema-admin-table">';
240
+ $html .= '<caption>Postal Address</caption>';
241
  $html .= $this->set_form_text( 'street_address', 'Street Address', $option['street_address'], true );
242
  $html .= $this->set_form_text( 'address_locality', 'Address Locality', $option['address_locality'], true );
243
  $html .= $this->set_form_text( 'address_region', 'Address Region', $option['address_region'], false );
248
 
249
  /** Geo Circle */
250
  $html = '<table class="schema-admin-table">';
251
+ $html .= '<caption>Geo Circle</caption>';
252
  if ( !isset( $option['geo_circle_active'] ) ) {
253
  $option['geo_circle_active'] = "";
254
  }
262
 
263
  /** Geo Coordinates */
264
  $html = '<table class="schema-admin-table">';
265
+ $html .= '<caption>Geo Coordinates</caption>';
266
  if ( !isset( $option['geo_active'] ) ) {
267
  $option['geo_active'] = "";
268
  }
274
 
275
  /** Opening Hours Specification */
276
  $html = '<table class="schema-admin-table">';
277
+ $html .= '<caption>Opening Hours Specification</caption>';
278
 
279
  $i = 0;
280
 
307
 
308
  /** Holiday Opening Hours */
309
  $html = '<table class="schema-admin-table">';
310
+ $html .= '<caption>Holiday Opening Hours</caption>';
311
  if ( !isset( $option['holiday_active'] ) ) {
312
  $option['holiday_active'] = "";
313
  }
331
  $html .= '</table>';
332
  echo $html;
333
 
334
+ echo '<p>Setting Knowledge : <a href="https://developers.google.com/search/docs/data-types/local-businesses" target="_blank">https://developers.google.com/search/docs/data-types/local-businesses</a></p>';
335
  submit_button();
336
  }
337
 
379
  /**
380
  * Return the form text
381
  *
382
+ * @version 3.0.5
383
  * @since 2.3.0
384
  * @param string $id
385
  * @param string $display
391
  private function set_form_text ( $id, $display, $value = "", $required = false, $note = "" ) {
392
  $value = esc_attr( $value );
393
 
394
+ if ( $required ) {
395
+ $format = '<tr><th class="require"><label for=%s>%s :</label></th><td>';
396
+ } else {
397
+ $format = '<tr><th><label for=%s>%s :</label></th><td>';
398
+ }
399
+
400
  $format .= '<input type="text" name="option[%s]" id="%s" class="regular-text" value="%s"';
401
+
402
  if ( $required ) {
403
  $format .= ' required';
404
  }
408
  }
409
 
410
  /**
411
+ * Return the form date
412
  *
413
+ * @since 3.0.5
414
  * @version 2.5.0
415
  * @param string $id
416
  * @param string $display
435
  /**
436
  * Return the form checkbox
437
  *
438
+ * @version 3.0.5
439
  * @since 2.3.0
440
  * @param string $id
441
  * @param string $display
451
  if ( $value === 'on' ) {
452
  $format .= ' checked="checked"';
453
  }
454
+ $format .= '>%s</td></tr>';
455
 
456
  return (string) sprintf( $format, $id, $display, $id, $id, $note );
457
  }
469
  private function set_form_select ( $id, $display, $value = "", $note = "" ) {
470
  $value = esc_attr( $value );
471
 
472
+ $format = '<tr><th class="require"><label for=%s>%s :</label></th><td>';
473
  $format .= '<select id="%s" name="option[%s]">';
474
  foreach ( $this->business_type_array as $args ) {
475
  $format .= '<option value="' . $args['type'] . '"';
487
  /**
488
  * Return the form time
489
  *
490
+ * @version 3.0.5
491
  * @since 2.3.0
 
492
  * @param string $id
493
  * @param string $display
494
  * @param string $value1
504
  $format = '<tr class="opening-hours %s"><th><label for=%s>%s :</label></th><td>';
505
  $format .= 'Open Time : <input type="time" name="option[week][%s][%d][open]" id="%s-open" value="%s">';
506
  $format .= ' Close Time : <input type="time" name="option[week][%s][%d][close]" id="%s-close" value="%s">';
507
+ $format .= '%s<a class="dashicons dashicons-plus markup-time plus"></a>';
508
  if( $count !== 0 ) {
509
  $format .= '<a class="dashicons dashicons-minus markup-time minus"></a>';
510
  }
533
 
534
  return (string) sprintf( $format, $value1, $value2 );
535
  }
536
+ }
includes/wp-structuring-admin-type-news-article.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type News Article
4
  *
5
  * @author Kazuya Takami
6
- * @version 2.3.3
7
  * @since 1.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/NewsArticle
@@ -14,8 +14,8 @@ class Structuring_Markup_Type_NewsArticle {
14
  /**
15
  * Constructor Define.
16
  *
17
- * @since 1.0.0
18
  * @version 2.2.0
 
19
  * @param array $option
20
  */
21
  public function __construct ( array $option ) {
@@ -29,40 +29,40 @@ class Structuring_Markup_Type_NewsArticle {
29
  /**
30
  * Form Layout Render
31
  *
 
32
  * @since 1.0.0
33
- * @version 2.3.3
34
  * @param array $option
35
  */
36
  private function page_render ( array $option ) {
37
  $html = '<table class="schema-admin-table">';
38
  $html .= '<caption>Basic Setting</caption>';
39
- $html .= '<tr><th>headline :</th><td><small>Default : post_title</small></td></tr>';
40
- $html .= '<tr><th>datePublished :</th><td><small>Default : get_the_time( DATE_ISO8601, ID )</small></td></tr>';
41
  $html .= '<tr><th>dateModified :</th><td><small>Default : get_the_modified_time( DATE_ISO8601, false, ID )</small></td></tr>';
42
  $html .= '<tr><th>description :</th><td><small>Default : post_excerpt</small></td></tr>';
43
  $html .= '</table>';
44
  echo $html;
45
 
46
  $html = '<table class="schema-admin-table">';
47
- $html .= '<caption>mainEntityOfPage ( recommended )</caption>';
48
  $html .= '<tr><th>@type :</th><td><small>"WebPage"</small></td></tr>';
49
  $html .= '<tr><th>@id :</th><td><small>Default : get_permalink( ID )</small></td></tr>';
50
  $html .= '</table>';
51
  echo $html;
52
 
53
  $html = '<table class="schema-admin-table">';
54
- $html .= '<caption>image ( required )</caption>';
55
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
56
- $html .= '<tr><th>url :</th><td><small>Default : thumbnail</small></td></tr>';
57
- $html .= '<tr><th>height :</th><td><small>Auto : The height of the image, in pixels.</small></td></tr>';
58
- $html .= '<tr><th>width :</th><td><small>Auto : The width of the image, in pixels. Images should be at least 696 pixels wide.</small></td></tr>';
59
  $html .= '</table>';
60
  echo $html;
61
 
62
  $html = '<table class="schema-admin-table">';
63
- $html .= '<caption>publisher ( required )</caption>';
64
  $html .= '<tr><th>@type :</th><td><small>"Organization"</small></td></tr>';
65
- $html .= '<tr><th><label for="name">Organization Name :</label></th><td>';
66
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
67
  $html .= '<small>Default : bloginfo("name")</small>';
68
  $html .= '</td></tr>';
@@ -70,14 +70,15 @@ class Structuring_Markup_Type_NewsArticle {
70
  echo $html;
71
 
72
  $html = '<table class="schema-admin-table">';
73
- $html .= '<caption>logo ( required )</caption>';
74
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
75
- $html .= '<tr><th><label for="logo">url :</label></th><td>';
76
  $html .= '<input type="text" name="option[' . "logo" . ']" id="logo" class="regular-text" required value="' . esc_attr( $option['logo'] ) . '">';
77
  $html .= '<small>Default : bloginfo("logo") + "/images/logo.png"</small>';
 
78
  $html .= '</td></tr>';
79
- $html .= '<tr><th>height :</th><td><small>Auto : height <= 60px.</small></td></tr>';
80
- $html .= '<tr><th>width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
81
  $html .= '</table>';
82
  echo $html;
83
 
3
  * Schema.org Type News Article
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 1.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/NewsArticle
14
  /**
15
  * Constructor Define.
16
  *
 
17
  * @version 2.2.0
18
+ * @since 1.0.0
19
  * @param array $option
20
  */
21
  public function __construct ( array $option ) {
29
  /**
30
  * Form Layout Render
31
  *
32
+ * @version 3.0.5
33
  * @since 1.0.0
 
34
  * @param array $option
35
  */
36
  private function page_render ( array $option ) {
37
  $html = '<table class="schema-admin-table">';
38
  $html .= '<caption>Basic Setting</caption>';
39
+ $html .= '<tr><th class="require">headline :</th><td><small>Default : post_title</small></td></tr>';
40
+ $html .= '<tr><th class="require">datePublished :</th><td><small>Default : get_the_time( DATE_ISO8601, ID )</small></td></tr>';
41
  $html .= '<tr><th>dateModified :</th><td><small>Default : get_the_modified_time( DATE_ISO8601, false, ID )</small></td></tr>';
42
  $html .= '<tr><th>description :</th><td><small>Default : post_excerpt</small></td></tr>';
43
  $html .= '</table>';
44
  echo $html;
45
 
46
  $html = '<table class="schema-admin-table">';
47
+ $html .= '<caption>mainEntityOfPage</caption>';
48
  $html .= '<tr><th>@type :</th><td><small>"WebPage"</small></td></tr>';
49
  $html .= '<tr><th>@id :</th><td><small>Default : get_permalink( ID )</small></td></tr>';
50
  $html .= '</table>';
51
  echo $html;
52
 
53
  $html = '<table class="schema-admin-table">';
54
+ $html .= '<caption>image</caption>';
55
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
56
+ $html .= '<tr><th class="require">url :</th><td><small>Default : thumbnail</small></td></tr>';
57
+ $html .= '<tr><th class="require">height :</th><td><small>Auto : The height of the image, in pixels.</small></td></tr>';
58
+ $html .= '<tr><th class="require">width :</th><td><small>Auto : The width of the image, in pixels. Images should be at least 696 pixels wide.</small></td></tr>';
59
  $html .= '</table>';
60
  echo $html;
61
 
62
  $html = '<table class="schema-admin-table">';
63
+ $html .= '<caption>publisher</caption>';
64
  $html .= '<tr><th>@type :</th><td><small>"Organization"</small></td></tr>';
65
+ $html .= '<tr><th class="require"><label for="name">Organization Name :</label></th><td>';
66
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
67
  $html .= '<small>Default : bloginfo("name")</small>';
68
  $html .= '</td></tr>';
70
  echo $html;
71
 
72
  $html = '<table class="schema-admin-table">';
73
+ $html .= '<caption>publisher.logo</caption>';
74
  $html .= '<tr><th>@type :</th><td><small>"ImageObject"</small></td></tr>';
75
+ $html .= '<tr><th class="require"><label for="logo">url :</label></th><td>';
76
  $html .= '<input type="text" name="option[' . "logo" . ']" id="logo" class="regular-text" required value="' . esc_attr( $option['logo'] ) . '">';
77
  $html .= '<small>Default : bloginfo("logo") + "/images/logo.png"</small>';
78
+ $html .= '<small>Logos should be no wider than 600px, and no taller than 60px.</small>';
79
  $html .= '</td></tr>';
80
+ $html .= '<tr><th class="require">height :</th><td><small>Auto : height <= 60px.</small></td></tr>';
81
+ $html .= '<tr><th class="require">width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
82
  $html .= '</table>';
83
  echo $html;
84
 
includes/wp-structuring-admin-type-organization.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type Organization
4
  *
5
  * @author Kazuya Takami
6
- * @version 2.3.3
7
  * @since 1.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/Organization
@@ -14,8 +14,8 @@ class Structuring_Markup_Type_Organization {
14
  /**
15
  * Variable definition.
16
  *
17
- * @since 1.0.0
18
  * @version 2.3.2
 
19
  */
20
  /** contactType defined. */
21
  private $contact_type_array = array(
@@ -62,23 +62,23 @@ class Structuring_Markup_Type_Organization {
62
  /**
63
  * Form Layout Render
64
  *
 
65
  * @since 1.0.0
66
- * @version 2.3.3
67
  * @param array $option
68
  */
69
  private function page_render ( array $option ) {
70
  /** Logos */
71
  $html = '<table class="schema-admin-table">';
72
  $html .= '<caption>Logos</caption>';
73
- $html .= '<tr><th><label for="name">Organization Name :</label></th><td>';
74
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
75
  $html .= '<small>Default : bloginfo("name")</small>';
76
  $html .= '</td></tr>';
77
- $html .= '<tr><th><label for="url">url :</label></th><td>';
78
  $html .= '<input type="text" name="option[' . "url" . ']" id="url" class="regular-text" required value="' . esc_attr( $option['url'] ) . '">';
79
  $html .= '<small>Default : bloginfo("url")</small>';
80
  $html .= '</td></tr>';
81
- $html .= '<tr><th><label for="logo">logo :</label></th><td>';
82
  $html .= '<input type="text" name="option[' . "logo" . ']" id="logo" class="regular-text" required value="' . esc_attr( $option['logo'] ) . '">';
83
  $html .= '<small>Default : bloginfo("logo") + "/images/logo.png"</small>';
84
  $html .= '</td></tr>';
@@ -127,7 +127,7 @@ class Structuring_Markup_Type_Organization {
127
  }
128
  $html .= '>TollFree</label><br>';
129
  $html .= '</td></tr>';
130
- $html .= '<tr><th><label for="available_language">available<br>Language :</label></th><td>';
131
  $html .= '<input type="text" name="option[' . "available_language" . ']" id="available_language" class="regular-text" value="' . esc_attr( $option['available_language'] ) . '">';
132
  $html .= '<small>Default : "English"&nbsp;&nbsp;Multiple : "French,English"</small>';
133
  $html .= '</td></tr>';
3
  * Schema.org Type Organization
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 1.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/Organization
14
  /**
15
  * Variable definition.
16
  *
 
17
  * @version 2.3.2
18
+ * @since 1.0.0
19
  */
20
  /** contactType defined. */
21
  private $contact_type_array = array(
62
  /**
63
  * Form Layout Render
64
  *
65
+ * @version 3.0.5
66
  * @since 1.0.0
 
67
  * @param array $option
68
  */
69
  private function page_render ( array $option ) {
70
  /** Logos */
71
  $html = '<table class="schema-admin-table">';
72
  $html .= '<caption>Logos</caption>';
73
+ $html .= '<tr><th class="require"><label for="name">Organization Name :</label></th><td>';
74
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
75
  $html .= '<small>Default : bloginfo("name")</small>';
76
  $html .= '</td></tr>';
77
+ $html .= '<tr><th class="require"><label for="url">url :</label></th><td>';
78
  $html .= '<input type="text" name="option[' . "url" . ']" id="url" class="regular-text" required value="' . esc_attr( $option['url'] ) . '">';
79
  $html .= '<small>Default : bloginfo("url")</small>';
80
  $html .= '</td></tr>';
81
+ $html .= '<tr><th class="require"><label for="logo">logo :</label></th><td>';
82
  $html .= '<input type="text" name="option[' . "logo" . ']" id="logo" class="regular-text" required value="' . esc_attr( $option['logo'] ) . '">';
83
  $html .= '<small>Default : bloginfo("logo") + "/images/logo.png"</small>';
84
  $html .= '</td></tr>';
127
  }
128
  $html .= '>TollFree</label><br>';
129
  $html .= '</td></tr>';
130
+ $html .= '<tr><th><label for="available_language">available&nbsp;Language :</label></th><td>';
131
  $html .= '<input type="text" name="option[' . "available_language" . ']" id="available_language" class="regular-text" value="' . esc_attr( $option['available_language'] ) . '">';
132
  $html .= '<small>Default : "English"&nbsp;&nbsp;Multiple : "French,English"</small>';
133
  $html .= '</td></tr>';
includes/wp-structuring-admin-type-person.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type Person
4
  *
5
  * @author Kazuya Takami
6
- * @version 2.4.0
7
  * @since 2.4.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/Person
@@ -14,8 +14,8 @@ class Structuring_Markup_Type_Person {
14
  /**
15
  * Variable definition.
16
  *
17
- * @since 2.4.0
18
  * @version 2.4.0
 
19
  */
20
  /** Social Profile */
21
  private $social_array = array(
@@ -34,8 +34,8 @@ class Structuring_Markup_Type_Person {
34
  /**
35
  * Constructor Define.
36
  *
37
- * @since 2.4.0
38
  * @version 2.4.0
 
39
  * @param array $option
40
  */
41
  public function __construct ( array $option ) {
@@ -49,19 +49,19 @@ class Structuring_Markup_Type_Person {
49
  /**
50
  * Form Layout Render
51
  *
 
52
  * @since 2.4.0
53
- * @version 2.4.0
54
  * @param array $option
55
  */
56
  private function page_render ( array $option ) {
57
  /** Basic Settings */
58
  $html = '<table class="schema-admin-table">';
59
  $html .= '<caption>Basic Settings</caption>';
60
- $html .= '<tr><th><label for="name">Name :</label></th><td>';
61
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
62
  $html .= '<small>Default : bloginfo("name")</small>';
63
  $html .= '</td></tr>';
64
- $html .= '<tr><th><label for="url">url :</label></th><td>';
65
  $html .= '<input type="text" name="option[' . "url" . ']" id="url" class="regular-text" required value="' . esc_attr( $option['url'] ) . '">';
66
  $html .= '<small>Default : bloginfo("url")</small>';
67
  $html .= '</td></tr>';
3
  * Schema.org Type Person
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 2.4.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/Person
14
  /**
15
  * Variable definition.
16
  *
 
17
  * @version 2.4.0
18
+ * @since 2.4.0
19
  */
20
  /** Social Profile */
21
  private $social_array = array(
34
  /**
35
  * Constructor Define.
36
  *
 
37
  * @version 2.4.0
38
+ * @since 2.4.0
39
  * @param array $option
40
  */
41
  public function __construct ( array $option ) {
49
  /**
50
  * Form Layout Render
51
  *
52
+ * @version 3.0.5
53
  * @since 2.4.0
 
54
  * @param array $option
55
  */
56
  private function page_render ( array $option ) {
57
  /** Basic Settings */
58
  $html = '<table class="schema-admin-table">';
59
  $html .= '<caption>Basic Settings</caption>';
60
+ $html .= '<tr><th class="require"><label for="name">Name :</label></th><td>';
61
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
62
  $html .= '<small>Default : bloginfo("name")</small>';
63
  $html .= '</td></tr>';
64
+ $html .= '<tr><th class="require"><label for="url">url :</label></th><td>';
65
  $html .= '<input type="text" name="option[' . "url" . ']" id="url" class="regular-text" required value="' . esc_attr( $option['url'] ) . '">';
66
  $html .= '<small>Default : bloginfo("url")</small>';
67
  $html .= '</td></tr>';
includes/wp-structuring-admin-type-video.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type Video
4
  *
5
  * @author Kazuya Takami
6
- * @version 3.0.0
7
  * @since 3.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/VideoObject
@@ -23,15 +23,16 @@ class Structuring_Markup_Type_Videos {
23
  /**
24
  * Form Layout Render
25
  *
26
- * @since 3.0.0
 
27
  */
28
  private function page_render () {
29
  $html = '<table class="schema-admin-table">';
30
  $html .= '<caption>Basic Setting</caption>';
31
- $html .= '<tr><th>name :</th><td><small>Post Title</small></td></tr>';
32
- $html .= '<tr><th>Description :</th><td><small>Post Description</small></td></tr>';
33
- $html .= '<tr><th>thumbnailUrl :</th><td><small>Featured Image URL</small></td></tr>';
34
- $html .= '<tr><th>uploadDate :</th><td><small>Update Date</small></td></tr>';
35
  $html .= '<tr><th>duration :</th><td><small>Input a custom post: field name "schema_video_duration"</small></td></tr>';
36
  $html .= '<tr><th>contentUrl :</th><td><small>Input a custom post: field name "schema_video_content_url"</small></td></tr>';
37
  $html .= '<tr><th>embedUrl :</th><td><small>Input a custom post: field name "schema_video_embed_url"</small></td></tr>';
3
  * Schema.org Type Video
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 3.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/VideoObject
23
  /**
24
  * Form Layout Render
25
  *
26
+ * @version 3.0.5
27
+ * @since 3.0.0
28
  */
29
  private function page_render () {
30
  $html = '<table class="schema-admin-table">';
31
  $html .= '<caption>Basic Setting</caption>';
32
+ $html .= '<tr><th class="require">name :</th><td><small>Post Title</small></td></tr>';
33
+ $html .= '<tr><th class="require">Description :</th><td><small>Post Description</small></td></tr>';
34
+ $html .= '<tr><th class="require">thumbnailUrl :</th><td><small>Featured Image URL</small></td></tr>';
35
+ $html .= '<tr><th class="require">uploadDate :</th><td><small>Update Date</small></td></tr>';
36
  $html .= '<tr><th>duration :</th><td><small>Input a custom post: field name "schema_video_duration"</small></td></tr>';
37
  $html .= '<tr><th>contentUrl :</th><td><small>Input a custom post: field name "schema_video_content_url"</small></td></tr>';
38
  $html .= '<tr><th>embedUrl :</th><td><small>Input a custom post: field name "schema_video_embed_url"</small></td></tr>';
includes/wp-structuring-admin-type-website.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type WebSite
4
  *
5
  * @author Kazuya Takami
6
- * @version 2.3.3
7
  * @since 1.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/WebSite
@@ -29,13 +29,14 @@ class Structuring_Markup_Type_Website {
29
  /**
30
  * Form Layout Render
31
  *
32
- * @since 2.3.3
33
- * @param array $option
 
34
  */
35
  private function page_render ( array $option ) {
36
  $html = '<table class="schema-admin-table">';
37
  $html .= '<caption>Basic Setting</caption>';
38
- $html .= '<tr><th><label for="name">name :</label></th><td>';
39
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
40
  $html .= '<small>Default : bloginfo("name")</small>';
41
  $html .= '</td></tr>';
@@ -43,7 +44,7 @@ class Structuring_Markup_Type_Website {
43
  $html .= '<input type="text" name="option[' . "alternateName" . ']" id="alternateName" class="regular-text" value="' . esc_attr( $option['alternateName'] ) . '">';
44
  $html .= '<small>Default : bloginfo("name")</small>';
45
  $html .= '</td></tr>';
46
- $html .= '<tr><th><label for="url">url :</label></th><td>';
47
  $html .= '<input type="text" name="option[' . "url" . ']" id="url" class="regular-text" required value="' . esc_attr( $option['url'] ) . '">';
48
  $html .= '<small>Default : bloginfo("url")</small>';
49
  $html .= '</td></tr>';
@@ -73,8 +74,8 @@ class Structuring_Markup_Type_Website {
73
  /**
74
  * Return the default options array
75
  *
76
- * @since 1.0.0
77
  * @version 2.0.0
 
78
  * @param array $args
79
  * @return array $args
80
  */
3
  * Schema.org Type WebSite
4
  *
5
  * @author Kazuya Takami
6
+ * @version 3.0.5
7
  * @since 1.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/WebSite
29
  /**
30
  * Form Layout Render
31
  *
32
+ * @version 3.0.5
33
+ * @since 2.3.3
34
+ * @param array $option
35
  */
36
  private function page_render ( array $option ) {
37
  $html = '<table class="schema-admin-table">';
38
  $html .= '<caption>Basic Setting</caption>';
39
+ $html .= '<tr><th class="require"><label for="name">name :</label></th><td>';
40
  $html .= '<input type="text" name="option[' . "name" . ']" id="name" class="regular-text" required value="' . esc_attr( $option['name'] ) . '">';
41
  $html .= '<small>Default : bloginfo("name")</small>';
42
  $html .= '</td></tr>';
44
  $html .= '<input type="text" name="option[' . "alternateName" . ']" id="alternateName" class="regular-text" value="' . esc_attr( $option['alternateName'] ) . '">';
45
  $html .= '<small>Default : bloginfo("name")</small>';
46
  $html .= '</td></tr>';
47
+ $html .= '<tr><th class="require"><label for="url">url :</label></th><td>';
48
  $html .= '<input type="text" name="option[' . "url" . ']" id="url" class="regular-text" required value="' . esc_attr( $option['url'] ) . '">';
49
  $html .= '<small>Default : bloginfo("url")</small>';
50
  $html .= '</td></tr>';
74
  /**
75
  * Return the default options array
76
  *
 
77
  * @version 2.0.0
78
+ * @since 1.0.0
79
  * @param array $args
80
  * @return array $args
81
  */
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.0
6
- Stable tag: 3.0.4
7
 
8
  Allows you to include schema.org JSON-LD syntax markup on your website
9
 
@@ -53,6 +53,10 @@ if ( shortcode_exists( 'wp-structuring-markup-breadcrumb' ) ) {
53
 
54
  == Changelog ==
55
 
 
 
 
 
56
  = 3.0.4 (2016-08-17) =
57
  * Fixed : Type Person and Organization Non-display case "sameAs" is empty.
58
  * Checked : WordPress version 4.6.0 operation check.
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.0
6
+ Stable tag: 3.0.5
7
 
8
  Allows you to include schema.org JSON-LD syntax markup on your website
9
 
53
 
54
  == Changelog ==
55
 
56
+ = 3.0.5 (2016-09-06) =
57
+ * Fixed : CSS & JavaScript version control.
58
+ * Fixed : Registration screen display adjustment.
59
+
60
  = 3.0.4 (2016-08-17) =
61
  * Fixed : Type Person and Organization Non-display case "sameAs" is empty.
62
  * Checked : WordPress version 4.6.0 operation check.
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.0.4
7
  Author: Kazuya Takami
8
  Author URI: http://programp.com/
9
  License: GPLv2 or later
@@ -18,25 +18,25 @@ new Structuring_Markup();
18
  * Schema.org Basic Class
19
  *
20
  * @author Kazuya Takami
 
21
  * @since 1.0.0
22
- * @version 3.0.3
23
  */
24
  class Structuring_Markup {
25
 
26
  /**
27
  * Variable definition.
28
  *
 
29
  * @since 1.3.0
30
- * @version 3.0.3
31
  */
32
  private $text_domain = 'wp-structuring-markup';
33
- private $version = '3.0.3';
34
 
35
  /**
36
  * Constructor Define.
37
  *
38
- * @since 1.0.0
39
  * @version 2.4.0
 
40
  */
41
  public function __construct() {
42
  register_activation_hook( __FILE__, array( $this, 'create_table' ) );
@@ -49,7 +49,6 @@ class Structuring_Markup {
49
  if ( is_admin() ) {
50
  add_action( 'admin_init', array( $this, 'admin_init' ) );
51
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
52
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts') );
53
  } else {
54
  add_action( 'wp_head', array( $this, 'wp_head' ) );
55
  }
@@ -58,8 +57,8 @@ class Structuring_Markup {
58
  /**
59
  * Create table.
60
  *
61
- * @since 2.0.0
62
  * @version 2.0.0
 
63
  */
64
  public function create_table() {
65
  $db = new Structuring_Markup_Admin_Db();
@@ -69,8 +68,8 @@ class Structuring_Markup {
69
  /**
70
  * Breadcrumb ShortCode Register.
71
  *
72
- * @since 2.0.0
73
  * @version 2.3.1
 
74
  * @param string $args short code params
75
  * @return string $html
76
  */
@@ -92,8 +91,8 @@ class Structuring_Markup {
92
  /**
93
  * i18n.
94
  *
95
- * @since 1.3.0
96
  * @version 1.3.0
 
97
  */
98
  public function plugins_loaded () {
99
  load_plugin_textdomain( $this->text_domain, __return_false(), dirname( plugin_basename( __FILE__ ) ) . '/languages' );
@@ -102,8 +101,8 @@ class Structuring_Markup {
102
  /**
103
  * Create custom post type.
104
  *
105
- * @since 2.1.0
106
  * @version 3.0.0
 
107
  */
108
  function create_post_type () {
109
  require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-custom-post-event.php' );
@@ -115,8 +114,8 @@ class Structuring_Markup {
115
  /**
116
  * admin init.
117
  *
 
118
  * @since 1.3.1
119
- * @version 2.1.1
120
  */
121
  public function admin_init () {
122
  /** version up check */
@@ -125,25 +124,28 @@ class Structuring_Markup {
125
  $this->create_table();
126
  }
127
 
128
- wp_register_style( 'wp-structuring-markup-admin-style', plugins_url( 'css/style.css', __FILE__ ) );
129
  }
130
 
131
  /**
132
  * admin_scripts
133
  *
134
- * @since 2.4.0
135
- * @version 2.4.0
136
  * @author Justin Frydman
 
 
 
137
  */
138
  public function admin_scripts () {
139
- wp_enqueue_script( 'wp-structuring-markup-admin-main-js', plugins_url( 'js/main.min.js', __FILE__ ), array('jquery'), '1.0' );
 
 
140
  }
141
 
142
  /**
143
  * Add Menu to the Admin Screen.
144
  *
 
145
  * @since 1.0.0
146
- * @version 2.0.0
147
  */
148
  public function admin_menu () {
149
  $list_page = add_menu_page(
@@ -163,8 +165,9 @@ class Structuring_Markup {
163
  );
164
 
165
  /** Using registered $page handle to hook stylesheet loading */
166
- add_action( 'admin_print_styles-' . $list_page, array( $this, 'add_style' ) );
167
- add_action( 'admin_print_styles-' . $post_page, array( $this, 'add_style' ) );
 
168
 
169
  /** Custom post menu controls */
170
  if ( isset( $_GET['page'] ) && $_GET['page'] === $this->text_domain . '-post' && !empty( $_POST ) ) {
@@ -197,8 +200,8 @@ class Structuring_Markup {
197
  /**
198
  * CSS admin add.
199
  *
200
- * @since 1.3.1
201
  * @version 1.3.1
 
202
  */
203
  public function add_style () {
204
  wp_enqueue_style( 'wp-structuring-markup-admin-style' );
@@ -207,8 +210,8 @@ class Structuring_Markup {
207
  /**
208
  * LIST Page Template Require.
209
  *
210
- * @since 1.0.0
211
  * @version 1.3.0
 
212
  */
213
  public function list_page_render () {
214
  require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-admin-list.php' );
@@ -218,8 +221,8 @@ class Structuring_Markup {
218
  /**
219
  * POST Page Template Require.
220
  *
221
- * @since 1.0.0
222
  * @version 1.3.0
 
223
  */
224
  public function post_page_render () {
225
  require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-admin-post.php' );
@@ -229,8 +232,8 @@ class Structuring_Markup {
229
  /**
230
  * Display Page Template Require.
231
  *
232
- * @since 1.3.0
233
  * @version 2.4.2
 
234
  */
235
  public function wp_head () {
236
  require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-cache.php' );
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.0.5
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.0.5
22
  * @since 1.0.0
 
23
  */
24
  class Structuring_Markup {
25
 
26
  /**
27
  * Variable definition.
28
  *
29
+ * @version 3.0.5
30
  * @since 1.3.0
 
31
  */
32
  private $text_domain = 'wp-structuring-markup';
33
+ private $version = '3.0.5';
34
 
35
  /**
36
  * Constructor Define.
37
  *
 
38
  * @version 2.4.0
39
+ * @since 1.0.0
40
  */
41
  public function __construct() {
42
  register_activation_hook( __FILE__, array( $this, 'create_table' ) );
49
  if ( is_admin() ) {
50
  add_action( 'admin_init', array( $this, 'admin_init' ) );
51
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
 
52
  } else {
53
  add_action( 'wp_head', array( $this, 'wp_head' ) );
54
  }
57
  /**
58
  * Create table.
59
  *
 
60
  * @version 2.0.0
61
+ * @since 2.0.0
62
  */
63
  public function create_table() {
64
  $db = new Structuring_Markup_Admin_Db();
68
  /**
69
  * Breadcrumb ShortCode Register.
70
  *
 
71
  * @version 2.3.1
72
+ * @since 2.0.0
73
  * @param string $args short code params
74
  * @return string $html
75
  */
91
  /**
92
  * i18n.
93
  *
 
94
  * @version 1.3.0
95
+ * @since 1.3.0
96
  */
97
  public function plugins_loaded () {
98
  load_plugin_textdomain( $this->text_domain, __return_false(), dirname( plugin_basename( __FILE__ ) ) . '/languages' );
101
  /**
102
  * Create custom post type.
103
  *
 
104
  * @version 3.0.0
105
+ * @since 2.1.0
106
  */
107
  function create_post_type () {
108
  require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-custom-post-event.php' );
114
  /**
115
  * admin init.
116
  *
117
+ * @version 3.0.5
118
  * @since 1.3.1
 
119
  */
120
  public function admin_init () {
121
  /** version up check */
124
  $this->create_table();
125
  }
126
 
127
+ wp_register_style( 'wp-structuring-markup-admin-style', plugins_url( 'css/style.css', __FILE__ ), array(), $this->version );
128
  }
129
 
130
  /**
131
  * admin_scripts
132
  *
 
 
133
  * @author Justin Frydman
134
+ * @author Kazuya Takami
135
+ * @version 3.0.5
136
+ * @since 2.4.0
137
  */
138
  public function admin_scripts () {
139
+ if ( isset( $_GET["type"] ) && $_GET["type"] === 'local_business' ) {
140
+ wp_enqueue_script ( 'wp-structuring-markup-admin-main-js', plugins_url ( 'js/main.min.js', __FILE__ ), array( 'jquery' ), $this->version );
141
+ }
142
  }
143
 
144
  /**
145
  * Add Menu to the Admin Screen.
146
  *
147
+ * @version 3.0.5
148
  * @since 1.0.0
 
149
  */
150
  public function admin_menu () {
151
  $list_page = add_menu_page(
165
  );
166
 
167
  /** Using registered $page handle to hook stylesheet loading */
168
+ add_action( 'admin_print_styles-' . $list_page, array( $this, 'add_style' ) );
169
+ add_action( 'admin_print_styles-' . $post_page, array( $this, 'add_style' ) );
170
+ add_action( 'admin_print_scripts-' . $post_page, array( $this, 'admin_scripts' ) );
171
 
172
  /** Custom post menu controls */
173
  if ( isset( $_GET['page'] ) && $_GET['page'] === $this->text_domain . '-post' && !empty( $_POST ) ) {
200
  /**
201
  * CSS admin add.
202
  *
 
203
  * @version 1.3.1
204
+ * @since 1.3.1
205
  */
206
  public function add_style () {
207
  wp_enqueue_style( 'wp-structuring-markup-admin-style' );
210
  /**
211
  * LIST Page Template Require.
212
  *
 
213
  * @version 1.3.0
214
+ * @since 1.0.0
215
  */
216
  public function list_page_render () {
217
  require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-admin-list.php' );
221
  /**
222
  * POST Page Template Require.
223
  *
 
224
  * @version 1.3.0
225
+ * @since 1.0.0
226
  */
227
  public function post_page_render () {
228
  require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-admin-post.php' );
232
  /**
233
  * Display Page Template Require.
234
  *
 
235
  * @version 2.4.2
236
+ * @since 1.3.0
237
  */
238
  public function wp_head () {
239
  require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-cache.php' );