Version Description
(2016-01-19)
- Fixed : Improved wording on admin pages
- Fixed : Added alternate methods to get image dimensions for systems running legacy SSL
Download this release
Release Info
Developer | miiitaka |
Plugin | Markup (JSON-LD) structured in schema.org |
Version | 2.3.3 |
Comparing to | |
See all releases |
Code changes from version 2.3.2 to 2.3.3
- css/style.css +1 -0
- includes/wp-structuring-admin-list.php +3 -3
- includes/wp-structuring-admin-post.php +4 -4
- includes/wp-structuring-admin-type-article.php +3 -3
- includes/wp-structuring-admin-type-blog-posting.php +3 -3
- includes/wp-structuring-admin-type-breadcrumb.php +3 -3
- includes/wp-structuring-admin-type-local-business.php +5 -5
- includes/wp-structuring-admin-type-news-article.php +3 -3
- includes/wp-structuring-admin-type-organization.php +3 -3
- includes/wp-structuring-admin-type-website.php +3 -3
- includes/wp-structuring-display.php +54 -10
- readme.txt +6 -1
- wp-structuring-markup.php +4 -4
css/style.css
CHANGED
@@ -42,6 +42,7 @@
|
|
42 |
width: 150px;
|
43 |
}
|
44 |
.schema-admin-table td {
|
|
|
45 |
vertical-align: middle;
|
46 |
}
|
47 |
.schema-admin-table td label {
|
42 |
width: 150px;
|
43 |
}
|
44 |
.schema-admin-table td {
|
45 |
+
padding: 1px 0 0 0;
|
46 |
vertical-align: middle;
|
47 |
}
|
48 |
.schema-admin-table td label {
|
includes/wp-structuring-admin-list.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
* @since 1.0.0
|
7 |
-
* @version 2.
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
*/
|
10 |
class Structuring_Markup_Admin_List {
|
@@ -33,7 +33,7 @@ class Structuring_Markup_Admin_List {
|
|
33 |
* LIST Page HTML Render.
|
34 |
*
|
35 |
* @since 1.0.0
|
36 |
-
* @version 2.
|
37 |
*/
|
38 |
private function page_render () {
|
39 |
$post_url = 'admin.php?page=' . $this->text_domain . '-post';
|
@@ -62,7 +62,7 @@ class Structuring_Markup_Admin_List {
|
|
62 |
if ( $results ) {
|
63 |
foreach ( $results as $row ) {
|
64 |
$html = '<tr><td>';
|
65 |
-
$html .= $row->activate === 'on' ? '<span class="active">
|
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 )];
|
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 {
|
33 |
* LIST Page HTML Render.
|
34 |
*
|
35 |
* @since 1.0.0
|
36 |
+
* @version 2.3.3
|
37 |
*/
|
38 |
private function page_render () {
|
39 |
$post_url = 'admin.php?page=' . $this->text_domain . '-post';
|
62 |
if ( $results ) {
|
63 |
foreach ( $results as $row ) {
|
64 |
$html = '<tr><td>';
|
65 |
+
$html .= $row->activate === 'on' ? '<span class="active">Enabled' : '<span class="stop">Disabled';
|
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 )];
|
includes/wp-structuring-admin-post.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
* @since 1.0.0
|
7 |
-
* @version 2.
|
8 |
*/
|
9 |
class Structuring_Markup_Admin_Post {
|
10 |
|
@@ -80,7 +80,7 @@ class Structuring_Markup_Admin_Post {
|
|
80 |
* Setting Page of the Admin Screen.
|
81 |
*
|
82 |
* @since 1.0.0
|
83 |
-
* @version 2.
|
84 |
* @param array $options
|
85 |
* @param string $status
|
86 |
*/
|
@@ -108,10 +108,10 @@ class Structuring_Markup_Admin_Post {
|
|
108 |
$html .= '<input type="hidden" name="id" value="' . esc_attr( $options['id'] ) . '">';
|
109 |
$html .= '<input type="hidden" name="type" value="' . esc_attr( $options['type'] ) . '">';
|
110 |
$html .= '<table class="schema-admin-table">';
|
111 |
-
$html .= '<tr><th>
|
112 |
$html .= '<input type="checkbox" name="activate" value="on"';
|
113 |
$html .= ( isset( $options['activate'] ) && $options['activate'] === "on" ) ? ' checked' : '';
|
114 |
-
$html .= '
|
115 |
$html .= '<tr><th>' . esc_html__( 'Output Page', $this->text_domain ) . ' : </th><td>';
|
116 |
echo $html;
|
117 |
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
* @since 1.0.0
|
7 |
+
* @version 2.3.3
|
8 |
*/
|
9 |
class Structuring_Markup_Admin_Post {
|
10 |
|
80 |
* Setting Page of the Admin Screen.
|
81 |
*
|
82 |
* @since 1.0.0
|
83 |
+
* @version 2.3.3
|
84 |
* @param array $options
|
85 |
* @param string $status
|
86 |
*/
|
108 |
$html .= '<input type="hidden" name="id" value="' . esc_attr( $options['id'] ) . '">';
|
109 |
$html .= '<input type="hidden" name="type" value="' . esc_attr( $options['type'] ) . '">';
|
110 |
$html .= '<table class="schema-admin-table">';
|
111 |
+
$html .= '<tr><th>Enabled : </th><td>';
|
112 |
$html .= '<input type="checkbox" name="activate" value="on"';
|
113 |
$html .= ( isset( $options['activate'] ) && $options['activate'] === "on" ) ? ' checked' : '';
|
114 |
+
$html .= '></td></tr>';
|
115 |
$html .= '<tr><th>' . esc_html__( 'Output Page', $this->text_domain ) . ' : </th><td>';
|
116 |
echo $html;
|
117 |
|
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.
|
7 |
* @since 1.1.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link http://schema.org/Article
|
@@ -30,7 +30,7 @@ class Structuring_Markup_Type_Article {
|
|
30 |
* Form Layout Render
|
31 |
*
|
32 |
* @since 1.1.0
|
33 |
-
* @version 2.
|
34 |
* @param array $option
|
35 |
*/
|
36 |
private function page_render ( array $option ) {
|
@@ -76,7 +76,7 @@ class Structuring_Markup_Type_Article {
|
|
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
|
80 |
$html .= '<tr><th>width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
|
81 |
$html .= '</table>';
|
82 |
echo $html;
|
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
|
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 ) {
|
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;
|
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.
|
7 |
* @since 1.2.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link http://schema.org/BlogPosting
|
@@ -30,7 +30,7 @@ class Structuring_Markup_Type_Blog_Posting {
|
|
30 |
* Form Layout Render
|
31 |
*
|
32 |
* @since 1.2.0
|
33 |
-
* @version 2.
|
34 |
* @param array $option
|
35 |
*/
|
36 |
private function page_render ( array $option ) {
|
@@ -76,7 +76,7 @@ class Structuring_Markup_Type_Blog_Posting {
|
|
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
|
80 |
$html .= '<tr><th>width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
|
81 |
$html .= '</table>';
|
82 |
echo $html;
|
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
|
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 ) {
|
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;
|
includes/wp-structuring-admin-type-breadcrumb.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Schema.org Type Breadcrumb
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @version 2.
|
7 |
* @since 2.0.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link https://schema.org/BreadcrumbList
|
@@ -28,7 +28,7 @@ class Structuring_Markup_Type_Breadcrumb {
|
|
28 |
/**
|
29 |
* Form Layout Render
|
30 |
*
|
31 |
-
* @since 2.
|
32 |
* @param array $option
|
33 |
*/
|
34 |
private function page_render ( array $option ) {
|
@@ -39,7 +39,7 @@ class Structuring_Markup_Type_Breadcrumb {
|
|
39 |
if ( isset( $option['home_on'] ) && $option['home_on'] === 'on' ) {
|
40 |
$html .= ' checked="checked"';
|
41 |
}
|
42 |
-
$html .= '>
|
43 |
$html .= '<small>( Installed the HOME to breadcrumbs )</small>';
|
44 |
$html .= '</td></tr>';
|
45 |
$html .= '<tr><th><label for="home_name">Home Name :</label></th><td>';
|
3 |
* Schema.org Type Breadcrumb
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @version 2.3.3
|
7 |
* @since 2.0.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link https://schema.org/BreadcrumbList
|
28 |
/**
|
29 |
* Form Layout Render
|
30 |
*
|
31 |
+
* @since 2.3.3
|
32 |
* @param array $option
|
33 |
*/
|
34 |
private function page_render ( array $option ) {
|
39 |
if ( isset( $option['home_on'] ) && $option['home_on'] === 'on' ) {
|
40 |
$html .= ' checked="checked"';
|
41 |
}
|
42 |
+
$html .= '>Enabled';
|
43 |
$html .= '<small>( Installed the HOME to breadcrumbs )</small>';
|
44 |
$html .= '</td></tr>';
|
45 |
$html .= '<tr><th><label for="home_name">Home Name :</label></th><td>';
|
includes/wp-structuring-admin-type-local-business.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Schema.org Type Organization
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @since 2.3.
|
7 |
* @see wp-structuring-admin-db.php
|
8 |
* @link http://schema.org/LocalBusiness
|
9 |
* @link https://developers.google.com/structured-data/local-businesses/
|
@@ -203,7 +203,7 @@ class Structuring_Markup_Type_LocalBusiness {
|
|
203 |
/**
|
204 |
* Form Layout Render
|
205 |
*
|
206 |
-
* @since 2.3.
|
207 |
* @param array $option
|
208 |
*/
|
209 |
private function page_render ( array $option ) {
|
@@ -223,7 +223,7 @@ class Structuring_Markup_Type_LocalBusiness {
|
|
223 |
if ( !isset( $option['food_active'] ) ) {
|
224 |
$option['food_active'] = "";
|
225 |
}
|
226 |
-
$html .= $this->set_form_checkbox( 'food_active', 'Setting', $option['food_active'], '
|
227 |
$html .= $this->set_form_text( 'menu', 'Menu url', $option['menu'], false, 'For food establishments, the fully-qualified URL of the menu.' );
|
228 |
if ( !isset( $option['accepts_reservations'] ) ) {
|
229 |
$option['accepts_reservations'] = "";
|
@@ -249,7 +249,7 @@ class Structuring_Markup_Type_LocalBusiness {
|
|
249 |
if ( !isset( $option['geo_active'] ) ) {
|
250 |
$option['geo_active'] = "";
|
251 |
}
|
252 |
-
$html .= $this->set_form_checkbox( 'geo_active', 'Setting', $option['geo_active'], '
|
253 |
$html .= $this->set_form_text( 'latitude', 'Latitude', $option['latitude'], false );
|
254 |
$html .= $this->set_form_text( 'longitude', 'Longitude', $option['longitude'], false );
|
255 |
$html .= '</table>';
|
@@ -263,7 +263,7 @@ class Structuring_Markup_Type_LocalBusiness {
|
|
263 |
if ( !isset( $option[$value['type']] ) ) {
|
264 |
$option[$value['type']] = "";
|
265 |
}
|
266 |
-
$html .= $this->set_form_checkbox( $value['type'], $value['display'], $option[$value['type']], '
|
267 |
$html .= $this->set_form_time( $value['type'], '', $option[$value['type'] . '-open'], $option[$value['type'] . '-close'], '' );
|
268 |
}
|
269 |
|
3 |
* Schema.org Type Organization
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @since 2.3.3
|
7 |
* @see wp-structuring-admin-db.php
|
8 |
* @link http://schema.org/LocalBusiness
|
9 |
* @link https://developers.google.com/structured-data/local-businesses/
|
203 |
/**
|
204 |
* Form Layout Render
|
205 |
*
|
206 |
+
* @since 2.3.3
|
207 |
* @param array $option
|
208 |
*/
|
209 |
private function page_render ( array $option ) {
|
223 |
if ( !isset( $option['food_active'] ) ) {
|
224 |
$option['food_active'] = "";
|
225 |
}
|
226 |
+
$html .= $this->set_form_checkbox( 'food_active', 'Setting', $option['food_active'], 'Enabled' );
|
227 |
$html .= $this->set_form_text( 'menu', 'Menu url', $option['menu'], false, 'For food establishments, the fully-qualified URL of the menu.' );
|
228 |
if ( !isset( $option['accepts_reservations'] ) ) {
|
229 |
$option['accepts_reservations'] = "";
|
249 |
if ( !isset( $option['geo_active'] ) ) {
|
250 |
$option['geo_active'] = "";
|
251 |
}
|
252 |
+
$html .= $this->set_form_checkbox( 'geo_active', 'Setting', $option['geo_active'], 'Enabled' );
|
253 |
$html .= $this->set_form_text( 'latitude', 'Latitude', $option['latitude'], false );
|
254 |
$html .= $this->set_form_text( 'longitude', 'Longitude', $option['longitude'], false );
|
255 |
$html .= '</table>';
|
263 |
if ( !isset( $option[$value['type']] ) ) {
|
264 |
$option[$value['type']] = "";
|
265 |
}
|
266 |
+
$html .= $this->set_form_checkbox( $value['type'], $value['display'], $option[$value['type']], 'Enabled' );
|
267 |
$html .= $this->set_form_time( $value['type'], '', $option[$value['type'] . '-open'], $option[$value['type'] . '-close'], '' );
|
268 |
}
|
269 |
|
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.
|
7 |
* @since 1.0.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link http://schema.org/NewsArticle
|
@@ -30,7 +30,7 @@ class Structuring_Markup_Type_NewsArticle {
|
|
30 |
* Form Layout Render
|
31 |
*
|
32 |
* @since 1.0.0
|
33 |
-
* @version 2.
|
34 |
* @param array $option
|
35 |
*/
|
36 |
private function page_render ( array $option ) {
|
@@ -76,7 +76,7 @@ class Structuring_Markup_Type_NewsArticle {
|
|
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
|
80 |
$html .= '<tr><th>width :</th><td><small>Auto : width <= 600px.</small></td></tr>';
|
81 |
$html .= '</table>';
|
82 |
echo $html;
|
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
|
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 ) {
|
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;
|
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.
|
7 |
* @since 1.0.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link https://schema.org/Organization
|
@@ -66,7 +66,7 @@ class Structuring_Markup_Type_Organization {
|
|
66 |
* Form Layout Render
|
67 |
*
|
68 |
* @since 1.0.0
|
69 |
-
* @version 2.3.
|
70 |
* @param array $option
|
71 |
*/
|
72 |
private function page_render ( array $option ) {
|
@@ -96,7 +96,7 @@ class Structuring_Markup_Type_Organization {
|
|
96 |
if ( isset( $option['contact_point'] ) && $option['contact_point'] === 'on' ) {
|
97 |
$html .= ' checked="checked"';
|
98 |
}
|
99 |
-
$html .= '>
|
100 |
$html .= '</td></tr>';
|
101 |
$html .= '<tr><th><label for="telephone">telephone :</label></th><td>';
|
102 |
$html .= '<input type="text" name="option[' . "telephone" . ']" id="telephone" class="regular-text" value="' . esc_attr( $option['telephone'] ) . '">';
|
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
|
66 |
* Form Layout Render
|
67 |
*
|
68 |
* @since 1.0.0
|
69 |
+
* @version 2.3.3
|
70 |
* @param array $option
|
71 |
*/
|
72 |
private function page_render ( array $option ) {
|
96 |
if ( isset( $option['contact_point'] ) && $option['contact_point'] === 'on' ) {
|
97 |
$html .= ' checked="checked"';
|
98 |
}
|
99 |
+
$html .= '>Enabled';
|
100 |
$html .= '</td></tr>';
|
101 |
$html .= '<tr><th><label for="telephone">telephone :</label></th><td>';
|
102 |
$html .= '<input type="text" name="option[' . "telephone" . ']" id="telephone" class="regular-text" value="' . esc_attr( $option['telephone'] ) . '">';
|
includes/wp-structuring-admin-type-website.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Schema.org Type WebSite
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @version
|
7 |
* @since 1.0.0
|
8 |
* @see wp-structuring-admin-db.php
|
9 |
* @link https://schema.org/WebSite
|
@@ -29,7 +29,7 @@ class Structuring_Markup_Type_Website {
|
|
29 |
/**
|
30 |
* Form Layout Render
|
31 |
*
|
32 |
-
* @since
|
33 |
* @param array $option
|
34 |
*/
|
35 |
private function page_render ( array $option ) {
|
@@ -57,7 +57,7 @@ class Structuring_Markup_Type_Website {
|
|
57 |
if ( isset( $option['potential_action'] ) && $option['potential_action'] === 'on' ) {
|
58 |
$html .= ' checked="checked"';
|
59 |
}
|
60 |
-
$html .= '>
|
61 |
$html .= '</td></tr>';
|
62 |
$html .= '<tr><th><label for="target">target :</label></th><td>';
|
63 |
$html .= '<input type="text" name="option[' . "target" . ']" id="target" class="regular-text" value="' . esc_attr( $option['target'] ) . '">';
|
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 |
/**
|
30 |
* Form Layout Render
|
31 |
*
|
32 |
+
* @since 2.3.3
|
33 |
* @param array $option
|
34 |
*/
|
35 |
private function page_render ( array $option ) {
|
57 |
if ( isset( $option['potential_action'] ) && $option['potential_action'] === 'on' ) {
|
58 |
$html .= ' checked="checked"';
|
59 |
}
|
60 |
+
$html .= '>Enabled';
|
61 |
$html .= '</td></tr>';
|
62 |
$html .= '<tr><th><label for="target">target :</label></th><td>';
|
63 |
$html .= '<input type="text" name="option[' . "target" . ']" id="target" class="regular-text" value="' . esc_attr( $option['target'] ) . '">';
|
includes/wp-structuring-display.php
CHANGED
@@ -3,7 +3,8 @@
|
|
3 |
* Schema.org Display
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @
|
|
|
7 |
* @since 1.0.0
|
8 |
*/
|
9 |
class Structuring_Markup_Display {
|
@@ -126,11 +127,57 @@ class Structuring_Markup_Display {
|
|
126 |
return (string) str_replace( array( "\r", "\n" ), '', strip_tags( $text ) );
|
127 |
}
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
/**
|
130 |
* Setting schema.org Article
|
131 |
*
|
132 |
* @since 1.1.0
|
133 |
-
* @version 2.
|
134 |
* @param array $options
|
135 |
*/
|
136 |
private function set_schema_article ( array $options ) {
|
@@ -138,9 +185,8 @@ class Structuring_Markup_Display {
|
|
138 |
|
139 |
$options['logo'] = isset( $options['logo'] ) ? esc_url( $options['logo'] ) : "";
|
140 |
|
141 |
-
if ( has_post_thumbnail( $post->ID ) &&
|
142 |
$images = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
|
143 |
-
$logo = getimagesize( $options['logo'] );
|
144 |
$excerpt = $this->escape_text_tags( $post->post_excerpt );
|
145 |
$content = $excerpt === "" ? mb_substr( $this->escape_text_tags( $post->post_content ), 0, 110 ) : $excerpt;
|
146 |
|
@@ -184,7 +230,7 @@ class Structuring_Markup_Display {
|
|
184 |
* Setting schema.org BlogPosting
|
185 |
*
|
186 |
* @since 1.2.0
|
187 |
-
* @version 2.
|
188 |
* @param array $options
|
189 |
*/
|
190 |
private function set_schema_blog_posting ( array $options ) {
|
@@ -192,9 +238,8 @@ class Structuring_Markup_Display {
|
|
192 |
|
193 |
$options['logo'] = isset( $options['logo'] ) ? esc_url( $options['logo'] ) : "";
|
194 |
|
195 |
-
if ( has_post_thumbnail( $post->ID ) &&
|
196 |
$images = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
|
197 |
-
$logo = getimagesize( $options['logo'] );
|
198 |
$excerpt = $this->escape_text_tags( $post->post_excerpt );
|
199 |
$content = $excerpt === "" ? mb_substr( $this->escape_text_tags( $post->post_content ), 0, 110 ) : $excerpt;
|
200 |
|
@@ -393,7 +438,7 @@ class Structuring_Markup_Display {
|
|
393 |
* Setting schema.org NewsArticle
|
394 |
*
|
395 |
* @since 1.0.0
|
396 |
-
* @version 2.
|
397 |
* @param array $options
|
398 |
*/
|
399 |
private function set_schema_news_article ( array $options ) {
|
@@ -401,9 +446,8 @@ class Structuring_Markup_Display {
|
|
401 |
|
402 |
$options['logo'] = isset( $options['logo'] ) ? esc_url( $options['logo'] ) : "";
|
403 |
|
404 |
-
if ( has_post_thumbnail( $post->ID ) &&
|
405 |
$images = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
|
406 |
-
$logo = getimagesize( $options['logo'] );
|
407 |
$excerpt = $this->escape_text_tags( $post->post_excerpt );
|
408 |
$content = $excerpt === "" ? mb_substr( $this->escape_text_tags( $post->post_content ), 0, 110 ) : $excerpt;
|
409 |
|
3 |
* Schema.org Display
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @author Justin Frydman
|
7 |
+
* @version 2.3.3
|
8 |
* @since 1.0.0
|
9 |
*/
|
10 |
class Structuring_Markup_Display {
|
127 |
return (string) str_replace( array( "\r", "\n" ), '', strip_tags( $text ) );
|
128 |
}
|
129 |
|
130 |
+
/**
|
131 |
+
* Return image dimensions
|
132 |
+
*
|
133 |
+
* @since 2.3.3
|
134 |
+
* @version 2.3.3
|
135 |
+
* @author Justin Frydman
|
136 |
+
* @param string $url
|
137 |
+
* @return array $dimensions
|
138 |
+
*/
|
139 |
+
private function get_image_dimensions ( $url ) {
|
140 |
+
if( $image = wp_get_attachment_image_src( attachment_url_to_postid( $url ), 'full' ) ) {
|
141 |
+
return array( $image[1], $image[2] );
|
142 |
+
}
|
143 |
+
|
144 |
+
if( function_exists( 'curl_version' ) ) {
|
145 |
+
$headers = array( 'Range: bytes=0-32768' );
|
146 |
+
|
147 |
+
$curl = curl_init( $url );
|
148 |
+
curl_setopt( $curl, CURLOPT_HTTPHEADER, $headers );
|
149 |
+
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
|
150 |
+
curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, 0 );
|
151 |
+
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, 0 );
|
152 |
+
$data = curl_exec( $curl );
|
153 |
+
curl_close( $curl );
|
154 |
+
|
155 |
+
$image = @imagecreatefromstring( $data );
|
156 |
+
|
157 |
+
if( $image ) {
|
158 |
+
$width = imagesx( $image );
|
159 |
+
$height = imagesy( $image );
|
160 |
+
|
161 |
+
return array( $width, $height );
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
if( $image = @getimagesize( $url ) ) {
|
166 |
+
return array( $image[0], $image[1] );
|
167 |
+
}
|
168 |
+
|
169 |
+
if( $image = @getimagesize( str_replace( 'https://', 'http://', $url ) ) ) {
|
170 |
+
return array( $image[0], $image[1] );
|
171 |
+
}
|
172 |
+
|
173 |
+
return false;
|
174 |
+
}
|
175 |
+
|
176 |
/**
|
177 |
* Setting schema.org Article
|
178 |
*
|
179 |
* @since 1.1.0
|
180 |
+
* @version 2.3.3
|
181 |
* @param array $options
|
182 |
*/
|
183 |
private function set_schema_article ( array $options ) {
|
185 |
|
186 |
$options['logo'] = isset( $options['logo'] ) ? esc_url( $options['logo'] ) : "";
|
187 |
|
188 |
+
if ( has_post_thumbnail( $post->ID ) && $logo = $this->get_image_dimensions( $options['logo'] ) ) {
|
189 |
$images = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
|
|
|
190 |
$excerpt = $this->escape_text_tags( $post->post_excerpt );
|
191 |
$content = $excerpt === "" ? mb_substr( $this->escape_text_tags( $post->post_content ), 0, 110 ) : $excerpt;
|
192 |
|
230 |
* Setting schema.org BlogPosting
|
231 |
*
|
232 |
* @since 1.2.0
|
233 |
+
* @version 2.3.3
|
234 |
* @param array $options
|
235 |
*/
|
236 |
private function set_schema_blog_posting ( array $options ) {
|
238 |
|
239 |
$options['logo'] = isset( $options['logo'] ) ? esc_url( $options['logo'] ) : "";
|
240 |
|
241 |
+
if ( has_post_thumbnail( $post->ID ) && $logo = $this->get_image_dimensions( $options['logo'] ) ) {
|
242 |
$images = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
|
|
|
243 |
$excerpt = $this->escape_text_tags( $post->post_excerpt );
|
244 |
$content = $excerpt === "" ? mb_substr( $this->escape_text_tags( $post->post_content ), 0, 110 ) : $excerpt;
|
245 |
|
438 |
* Setting schema.org NewsArticle
|
439 |
*
|
440 |
* @since 1.0.0
|
441 |
+
* @version 2.3.3
|
442 |
* @param array $options
|
443 |
*/
|
444 |
private function set_schema_news_article ( array $options ) {
|
446 |
|
447 |
$options['logo'] = isset( $options['logo'] ) ? esc_url( $options['logo'] ) : "";
|
448 |
|
449 |
+
if ( has_post_thumbnail( $post->ID ) && $logo = $this->get_image_dimensions( $options['logo'] ) ) {
|
450 |
$images = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
|
|
|
451 |
$excerpt = $this->escape_text_tags( $post->post_excerpt );
|
452 |
$content = $excerpt === "" ? mb_substr( $this->escape_text_tags( $post->post_content ), 0, 110 ) : $excerpt;
|
453 |
|
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.4.1
|
6 |
-
Stable tag: 2.3.
|
7 |
|
8 |
It is plug in to implement structured markup (JSON-LD syntax) by schema.org definition on an post page, fixed page and etc.
|
9 |
|
@@ -51,6 +51,11 @@ if ( shortcode_exists( 'wp-structuring-markup-breadcrumb' ) ) {
|
|
51 |
|
52 |
== Changelog ==
|
53 |
|
|
|
|
|
|
|
|
|
|
|
54 |
= 2.3.2 (2016-01-10) =
|
55 |
|
56 |
* Fixed : Fixed a bug that Organization type of display error of contactType comes out.
|
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.4.1
|
6 |
+
Stable tag: 2.3.3
|
7 |
|
8 |
It is plug in to implement structured markup (JSON-LD syntax) by schema.org definition on an post page, fixed page and etc.
|
9 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 2.3.3 (2016-01-19)
|
55 |
+
|
56 |
+
* Fixed : Improved wording on admin pages
|
57 |
+
* Fixed : Added alternate methods to get image dimensions for systems running legacy SSL
|
58 |
+
|
59 |
= 2.3.2 (2016-01-10) =
|
60 |
|
61 |
* Fixed : Fixed a bug that Organization type of display error of contactType comes out.
|
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: It is plug in to implement structured markup (JSON-LD syntax) by schema.org definition on an article or the fixed page.
|
6 |
-
Version: 2.3.
|
7 |
Author: Kazuya Takami
|
8 |
Author URI: http://programp.com/
|
9 |
License: GPLv2 or later
|
@@ -19,7 +19,7 @@ new Structuring_Markup();
|
|
19 |
*
|
20 |
* @author Kazuya Takami
|
21 |
* @since 1.0.0
|
22 |
-
* @version 2.3.
|
23 |
*/
|
24 |
class Structuring_Markup {
|
25 |
|
@@ -27,10 +27,10 @@ class Structuring_Markup {
|
|
27 |
* Variable definition.
|
28 |
*
|
29 |
* @since 1.3.0
|
30 |
-
* @version 2.3.
|
31 |
*/
|
32 |
private $text_domain = 'wp-structuring-markup';
|
33 |
-
private $version = '2.3.
|
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: It is plug in to implement structured markup (JSON-LD syntax) by schema.org definition on an article or the fixed page.
|
6 |
+
Version: 2.3.3
|
7 |
Author: Kazuya Takami
|
8 |
Author URI: http://programp.com/
|
9 |
License: GPLv2 or later
|
19 |
*
|
20 |
* @author Kazuya Takami
|
21 |
* @since 1.0.0
|
22 |
+
* @version 2.3.3
|
23 |
*/
|
24 |
class Structuring_Markup {
|
25 |
|
27 |
* Variable definition.
|
28 |
*
|
29 |
* @since 1.3.0
|
30 |
+
* @version 2.3.3
|
31 |
*/
|
32 |
private $text_domain = 'wp-structuring-markup';
|
33 |
+
private $version = '2.3.3';
|
34 |
|
35 |
/**
|
36 |
* Constructor Define.
|