Version Description
- Fixed : Fixed translation.
- Added : Additional output comment.
Download this release
Release Info
Developer | miiitaka |
Plugin | Markup (JSON-LD) structured in schema.org |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.3.2
- css/style.css +3 -1
- includes/wp-structuring-admin-db.php +17 -15
- includes/wp-structuring-admin-list.php +3 -3
- includes/wp-structuring-admin-post.php +1 -1
- includes/wp-structuring-display.php +5 -2
- languages/wp-structuring-markup-ja.mo +0 -0
- languages/wp-structuring-markup-ja.po +4 -4
- languages/wp-structuring-markup.pot +3 -3
- readme.txt +10 -5
- wp-structuring-markup.php +9 -9
css/style.css
CHANGED
@@ -8,8 +8,10 @@
|
|
8 |
text-align: left;
|
9 |
}
|
10 |
.schema-admin-table th {
|
|
|
11 |
text-align: right;
|
12 |
-
|
|
|
13 |
}
|
14 |
.schema-admin-table td label{
|
15 |
margin: 0 10px 0 0;
|
8 |
text-align: left;
|
9 |
}
|
10 |
.schema-admin-table th {
|
11 |
+
padding: 3px 5px 0 0;
|
12 |
text-align: right;
|
13 |
+
vertical-align: top;
|
14 |
+
width: 120px;
|
15 |
}
|
16 |
.schema-admin-table td label{
|
17 |
margin: 0 10px 0 0;
|
includes/wp-structuring-admin-db.php
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
<?php
|
2 |
-
define( 'WP_STRUCTURING_MARKUP_DB', 'structuring_markup' );
|
3 |
-
|
4 |
/**
|
5 |
* Schema.org Admin DB Connection
|
6 |
*
|
7 |
* @author Kazuya Takami
|
8 |
-
* @version 1.0.0
|
9 |
* @since 1.0.0
|
|
|
10 |
*/
|
11 |
class Structuring_Markup_Admin_Db {
|
12 |
private $table_name;
|
@@ -14,11 +12,12 @@ class Structuring_Markup_Admin_Db {
|
|
14 |
/**
|
15 |
* Constructor Define.
|
16 |
*
|
17 |
-
* @since
|
|
|
18 |
*/
|
19 |
public function __construct() {
|
20 |
global $wpdb;
|
21 |
-
$this->table_name = $wpdb->prefix .
|
22 |
}
|
23 |
|
24 |
/**
|
@@ -52,15 +51,16 @@ class Structuring_Markup_Admin_Db {
|
|
52 |
/**
|
53 |
* Get Data.
|
54 |
*
|
55 |
-
* @since
|
56 |
-
* @
|
57 |
-
* @
|
|
|
58 |
*/
|
59 |
public function get_options( $id ) {
|
60 |
global $wpdb;
|
61 |
|
62 |
$query = "SELECT * FROM " . $this->table_name . " WHERE id = %d";
|
63 |
-
$data = array( $id );
|
64 |
$prepared = $wpdb->prepare( $query, $data );
|
65 |
$args = $wpdb->get_row( $prepared );
|
66 |
$results = array();
|
@@ -133,8 +133,9 @@ class Structuring_Markup_Admin_Db {
|
|
133 |
/**
|
134 |
* Update Data.
|
135 |
*
|
136 |
-
* @since
|
137 |
-
* @
|
|
|
138 |
*/
|
139 |
public function update_options( array $post ) {
|
140 |
global $wpdb;
|
@@ -145,7 +146,7 @@ class Structuring_Markup_Admin_Db {
|
|
145 |
'options' => isset( $post['option'] ) ? serialize( $post['option'] ) : "",
|
146 |
'update_date' => date( "Y-m-d H:i:s" )
|
147 |
);
|
148 |
-
$key = array( 'id' => $post['id'] );
|
149 |
$prepared = array( '%s', '%s', '%s' );
|
150 |
$key_prepared = array( '%d' );
|
151 |
|
@@ -155,13 +156,14 @@ class Structuring_Markup_Admin_Db {
|
|
155 |
/**
|
156 |
* Delete Data.
|
157 |
*
|
158 |
-
* @since
|
159 |
-
* @
|
|
|
160 |
*/
|
161 |
public function delete_options( $id ) {
|
162 |
global $wpdb;
|
163 |
|
164 |
-
$key = array( 'id' => $id );
|
165 |
$key_prepared = array( '%d' );
|
166 |
|
167 |
$wpdb->delete( $this->table_name, $key, $key_prepared );
|
1 |
<?php
|
|
|
|
|
2 |
/**
|
3 |
* Schema.org Admin DB Connection
|
4 |
*
|
5 |
* @author Kazuya Takami
|
|
|
6 |
* @since 1.0.0
|
7 |
+
* @version 1.0.0
|
8 |
*/
|
9 |
class Structuring_Markup_Admin_Db {
|
10 |
private $table_name;
|
12 |
/**
|
13 |
* Constructor Define.
|
14 |
*
|
15 |
+
* @since 1.0.0
|
16 |
+
* @version 1.3.2
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
global $wpdb;
|
20 |
+
$this->table_name = $wpdb->prefix . 'structuring_markup';
|
21 |
}
|
22 |
|
23 |
/**
|
51 |
/**
|
52 |
* Get Data.
|
53 |
*
|
54 |
+
* @since 1.0.0
|
55 |
+
* @version 1.3.2
|
56 |
+
* @param integer $id
|
57 |
+
* @return array $results
|
58 |
*/
|
59 |
public function get_options( $id ) {
|
60 |
global $wpdb;
|
61 |
|
62 |
$query = "SELECT * FROM " . $this->table_name . " WHERE id = %d";
|
63 |
+
$data = array( esc_html( $id ) );
|
64 |
$prepared = $wpdb->prepare( $query, $data );
|
65 |
$args = $wpdb->get_row( $prepared );
|
66 |
$results = array();
|
133 |
/**
|
134 |
* Update Data.
|
135 |
*
|
136 |
+
* @since 1.0.0
|
137 |
+
* @version 1.3.2
|
138 |
+
* @param array $post($_POST)
|
139 |
*/
|
140 |
public function update_options( array $post ) {
|
141 |
global $wpdb;
|
146 |
'options' => isset( $post['option'] ) ? serialize( $post['option'] ) : "",
|
147 |
'update_date' => date( "Y-m-d H:i:s" )
|
148 |
);
|
149 |
+
$key = array( 'id' => esc_html( $post['id'] ) );
|
150 |
$prepared = array( '%s', '%s', '%s' );
|
151 |
$key_prepared = array( '%d' );
|
152 |
|
156 |
/**
|
157 |
* Delete Data.
|
158 |
*
|
159 |
+
* @since 1.0.0
|
160 |
+
* @version 1.3.2
|
161 |
+
* @param integer $id
|
162 |
*/
|
163 |
public function delete_options( $id ) {
|
164 |
global $wpdb;
|
165 |
|
166 |
+
$key = array( 'id' => esc_html( $id ) );
|
167 |
$key_prepared = array( '%d' );
|
168 |
|
169 |
$wpdb->delete( $this->table_name, $key, $key_prepared );
|
includes/wp-structuring-admin-list.php
CHANGED
@@ -52,7 +52,7 @@ class Structuring_Markup_Admin_List {
|
|
52 |
* LIST Page HTML Render.
|
53 |
*
|
54 |
* @since 1.0.0
|
55 |
-
* @version 1.3.
|
56 |
* @param Structuring_Markup_Admin_Db $db
|
57 |
* @param String $mode
|
58 |
*/
|
@@ -62,8 +62,8 @@ class Structuring_Markup_Admin_List {
|
|
62 |
|
63 |
$html = '';
|
64 |
$html .= '<div class="wrap">';
|
65 |
-
$html .= '<h1>' . esc_html__( 'Schema.org
|
66 |
-
$html .= '<a href="' . $post_url . '" class="page-title-action">' . esc_html__( 'Add New',
|
67 |
$html .= '</h1>';
|
68 |
echo $html;
|
69 |
|
52 |
* LIST Page HTML Render.
|
53 |
*
|
54 |
* @since 1.0.0
|
55 |
+
* @version 1.3.2
|
56 |
* @param Structuring_Markup_Admin_Db $db
|
57 |
* @param String $mode
|
58 |
*/
|
62 |
|
63 |
$html = '';
|
64 |
$html .= '<div class="wrap">';
|
65 |
+
$html .= '<h1>' . esc_html__( 'Schema.org Settings List', $this->text_domain );
|
66 |
+
$html .= '<a href="' . $post_url . '" class="page-title-action">' . esc_html__( 'Add New', $this->text_domain ) . '</a>';
|
67 |
$html .= '</h1>';
|
68 |
echo $html;
|
69 |
|
includes/wp-structuring-admin-post.php
CHANGED
@@ -136,7 +136,7 @@ class Structuring_Markup_Admin_Post {
|
|
136 |
$html .= '<input type="hidden" name="page" value="wp-structuring-markup/includes/wp-structuring-admin-post.php">';
|
137 |
$html .= '<table class="schema-admin-table">';
|
138 |
$html .= '<tr><th><label for="type">Schema Type :</label></th><td>';
|
139 |
-
$html .= '<select id="type" name="type" onchange="this.form.submit();">';
|
140 |
foreach ( $this->type_array as $value ) {
|
141 |
$html .= '<option value="' . $value['type'] . '"';
|
142 |
if ( $value['type'] === $options['type'] ) {
|
136 |
$html .= '<input type="hidden" name="page" value="wp-structuring-markup/includes/wp-structuring-admin-post.php">';
|
137 |
$html .= '<table class="schema-admin-table">';
|
138 |
$html .= '<tr><th><label for="type">Schema Type :</label></th><td>';
|
139 |
+
$html .= '<select id="type" name="type" autofocus onchange="this.form.submit();">';
|
140 |
foreach ( $this->type_array as $value ) {
|
141 |
$html .= '<option value="' . $value['type'] . '"';
|
142 |
if ( $value['type'] === $options['type'] ) {
|
includes/wp-structuring-display.php
CHANGED
@@ -21,10 +21,12 @@ class Structuring_Markup_Display {
|
|
21 |
/**
|
22 |
* Setting schema.org
|
23 |
*
|
24 |
-
* @since
|
25 |
-
* @
|
|
|
26 |
*/
|
27 |
private function set_schema( Structuring_Markup_Admin_Db $db ) {
|
|
|
28 |
$this->get_schema_data( $db, 'all' );
|
29 |
if ( is_home() ) {
|
30 |
$this->get_schema_data( $db, 'home' );
|
@@ -35,6 +37,7 @@ class Structuring_Markup_Display {
|
|
35 |
if ( is_page() ) {
|
36 |
$this->get_schema_data( $db, 'page' );
|
37 |
}
|
|
|
38 |
}
|
39 |
|
40 |
/**
|
21 |
/**
|
22 |
* Setting schema.org
|
23 |
*
|
24 |
+
* @since 1.0.0
|
25 |
+
* @version 1.3.2
|
26 |
+
* @param Structuring_Markup_Admin_Db $db
|
27 |
*/
|
28 |
private function set_schema( Structuring_Markup_Admin_Db $db ) {
|
29 |
+
echo '<!-- WP Markup (JSON-LD) structured in schema.org START -->' , PHP_EOL;
|
30 |
$this->get_schema_data( $db, 'all' );
|
31 |
if ( is_home() ) {
|
32 |
$this->get_schema_data( $db, 'home' );
|
37 |
if ( is_page() ) {
|
38 |
$this->get_schema_data( $db, 'page' );
|
39 |
}
|
40 |
+
echo '<!-- WP Markup (JSON-LD) structured in schema.org END -->' , PHP_EOL;
|
41 |
}
|
42 |
|
43 |
/**
|
languages/wp-structuring-markup-ja.mo
CHANGED
Binary file
|
languages/wp-structuring-markup-ja.po
CHANGED
@@ -14,7 +14,7 @@ msgstr ""
|
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
|
16 |
#: includes/wp-structuring-admin-list.php:65
|
17 |
-
msgid "Schema.org
|
18 |
msgstr "Schema.org 設定一覧"
|
19 |
|
20 |
#: includes/wp-structuring-admin-list.php:66 wp-structuring-markup.php:95
|
@@ -78,15 +78,15 @@ msgid "Fixed Page"
|
|
78 |
msgstr "固定ページ"
|
79 |
|
80 |
#: wp-structuring-markup.php:78 wp-structuring-markup.php:79
|
81 |
-
msgid "Scheme.org
|
82 |
msgstr "Scheme.org 設定"
|
83 |
|
84 |
#: wp-structuring-markup.php:86 wp-structuring-markup.php:87
|
85 |
-
msgid "
|
86 |
msgstr "設定一覧"
|
87 |
|
88 |
#: wp-structuring-markup.php:94
|
89 |
-
msgid "Scheme.org
|
90 |
msgstr "新規登録"
|
91 |
|
92 |
#. Plugin Name of the plugin/theme
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
|
16 |
#: includes/wp-structuring-admin-list.php:65
|
17 |
+
msgid "Schema.org Settings List"
|
18 |
msgstr "Schema.org 設定一覧"
|
19 |
|
20 |
#: includes/wp-structuring-admin-list.php:66 wp-structuring-markup.php:95
|
78 |
msgstr "固定ページ"
|
79 |
|
80 |
#: wp-structuring-markup.php:78 wp-structuring-markup.php:79
|
81 |
+
msgid "Scheme.org Settings"
|
82 |
msgstr "Scheme.org 設定"
|
83 |
|
84 |
#: wp-structuring-markup.php:86 wp-structuring-markup.php:87
|
85 |
+
msgid "All Settings"
|
86 |
msgstr "設定一覧"
|
87 |
|
88 |
#: wp-structuring-markup.php:94
|
89 |
+
msgid "Scheme.org Settings Post"
|
90 |
msgstr "新規登録"
|
91 |
|
92 |
#. Plugin Name of the plugin/theme
|
languages/wp-structuring-markup.pot
CHANGED
@@ -14,7 +14,7 @@ msgstr ""
|
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
|
16 |
#: includes/wp-structuring-admin-list.php:65
|
17 |
-
msgid "Schema.org
|
18 |
msgstr ""
|
19 |
|
20 |
#: includes/wp-structuring-admin-list.php:66 wp-structuring-markup.php:95
|
@@ -78,11 +78,11 @@ msgid "Fixed Page"
|
|
78 |
msgstr ""
|
79 |
|
80 |
#: wp-structuring-markup.php:78 wp-structuring-markup.php:79
|
81 |
-
msgid "Scheme.org
|
82 |
msgstr ""
|
83 |
|
84 |
#: wp-structuring-markup.php:86 wp-structuring-markup.php:87
|
85 |
-
msgid "
|
86 |
msgstr ""
|
87 |
|
88 |
#: wp-structuring-markup.php:94
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
|
16 |
#: includes/wp-structuring-admin-list.php:65
|
17 |
+
msgid "Schema.org Settings List"
|
18 |
msgstr ""
|
19 |
|
20 |
#: includes/wp-structuring-admin-list.php:66 wp-structuring-markup.php:95
|
78 |
msgstr ""
|
79 |
|
80 |
#: wp-structuring-markup.php:78 wp-structuring-markup.php:79
|
81 |
+
msgid "Scheme.org Settings"
|
82 |
msgstr ""
|
83 |
|
84 |
#: wp-structuring-markup.php:86 wp-structuring-markup.php:87
|
85 |
+
msgid "All Settings"
|
86 |
msgstr ""
|
87 |
|
88 |
#: wp-structuring-markup.php:94
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: miiitaka
|
|
3 |
Tags: schema, schema.org, json, json-ld, seo, post, posts, google
|
4 |
Requires at least: 4.3.1
|
5 |
Tested up to: 4.3.1
|
6 |
-
Stable tag: 1.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 |
|
@@ -17,11 +17,11 @@ Base knowledge is "https://schema.org/" and "https://developers.google.com/struc
|
|
17 |
|
18 |
= Schema.org Type =
|
19 |
|
20 |
-
* Website: https://schema.org/WebSite
|
21 |
-
* Organization: https://schema.org/Organization
|
22 |
* Article: http://schema.org/Article
|
23 |
* BlogPosting: http://schema.org/BlogPosting
|
24 |
* NewsArticle: http://schema.org/NewsArticle
|
|
|
|
|
25 |
|
26 |
== Installation ==
|
27 |
|
@@ -32,6 +32,11 @@ Base knowledge is "https://schema.org/" and "https://developers.google.com/struc
|
|
32 |
|
33 |
== Changelog ==
|
34 |
|
|
|
|
|
|
|
|
|
|
|
35 |
= 1.3.1 =
|
36 |
|
37 |
* Fixed : none-function fixed.
|
@@ -71,5 +76,5 @@ Base knowledge is "https://schema.org/" and "https://developers.google.com/struc
|
|
71 |
|
72 |
== Contact ==
|
73 |
|
74 |
-
email to foundationmeister[at]outlook.com
|
75 |
-
twitter @miiitaka
|
3 |
Tags: schema, schema.org, json, json-ld, seo, post, posts, google
|
4 |
Requires at least: 4.3.1
|
5 |
Tested up to: 4.3.1
|
6 |
+
Stable tag: 1.3.2
|
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 |
|
17 |
|
18 |
= Schema.org Type =
|
19 |
|
|
|
|
|
20 |
* Article: http://schema.org/Article
|
21 |
* BlogPosting: http://schema.org/BlogPosting
|
22 |
* NewsArticle: http://schema.org/NewsArticle
|
23 |
+
* Organization: https://schema.org/Organization
|
24 |
+
* Website: https://schema.org/WebSite
|
25 |
|
26 |
== Installation ==
|
27 |
|
32 |
|
33 |
== Changelog ==
|
34 |
|
35 |
+
= 1.3.2 =
|
36 |
+
|
37 |
+
* Fixed : Fixed translation.
|
38 |
+
* Added : Additional output comment.
|
39 |
+
|
40 |
= 1.3.1 =
|
41 |
|
42 |
* Fixed : none-function fixed.
|
76 |
|
77 |
== Contact ==
|
78 |
|
79 |
+
* email to foundationmeister[at]outlook.com
|
80 |
+
* twitter @miiitaka
|
wp-structuring-markup.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Markup (JSON-LD) structured in schema.org
|
4 |
-
Plugin URI: https://
|
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: 1.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 1.3.
|
23 |
*/
|
24 |
class Structuring_Markup {
|
25 |
|
@@ -78,20 +78,20 @@ class Structuring_Markup {
|
|
78 |
* Add Menu to the Admin Screen.
|
79 |
*
|
80 |
* @since 1.0.0
|
81 |
-
* @version 1.2
|
82 |
*/
|
83 |
public function admin_menu() {
|
84 |
add_menu_page(
|
85 |
-
esc_html__( 'Scheme.org
|
86 |
-
esc_html__( 'Scheme.org
|
87 |
'manage_options',
|
88 |
plugin_basename( __FILE__ ),
|
89 |
array( $this, 'list_page_render' )
|
90 |
);
|
91 |
add_submenu_page(
|
92 |
__FILE__,
|
93 |
-
esc_html__( '
|
94 |
-
esc_html__( '
|
95 |
'manage_options',
|
96 |
plugin_basename( __FILE__ ),
|
97 |
array( $this, 'list_page_render' )
|
@@ -105,7 +105,7 @@ class Structuring_Markup {
|
|
105 |
array( $this, 'post_page_render' )
|
106 |
);
|
107 |
|
108 |
-
|
109 |
add_action( 'admin_print_styles-' . $page, array( $this, 'add_style' ) );
|
110 |
}
|
111 |
|
1 |
<?php
|
2 |
/*
|
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: 1.3.2
|
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 1.3.2
|
23 |
*/
|
24 |
class Structuring_Markup {
|
25 |
|
78 |
* Add Menu to the Admin Screen.
|
79 |
*
|
80 |
* @since 1.0.0
|
81 |
+
* @version 1.3.2
|
82 |
*/
|
83 |
public function admin_menu() {
|
84 |
add_menu_page(
|
85 |
+
esc_html__( 'Scheme.org Settings', $this->text_domain ),
|
86 |
+
esc_html__( 'Scheme.org Settings', $this->text_domain ),
|
87 |
'manage_options',
|
88 |
plugin_basename( __FILE__ ),
|
89 |
array( $this, 'list_page_render' )
|
90 |
);
|
91 |
add_submenu_page(
|
92 |
__FILE__,
|
93 |
+
esc_html__( 'All Settings', $this->text_domain ),
|
94 |
+
esc_html__( 'All Settings', $this->text_domain ),
|
95 |
'manage_options',
|
96 |
plugin_basename( __FILE__ ),
|
97 |
array( $this, 'list_page_render' )
|
105 |
array( $this, 'post_page_render' )
|
106 |
);
|
107 |
|
108 |
+
/** Using registered $page handle to hook stylesheet loading */
|
109 |
add_action( 'admin_print_styles-' . $page, array( $this, 'add_style' ) );
|
110 |
}
|
111 |
|