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

Version Description

(2016-07-15) = * Updated : Security measures of the update process.

Download this release

Release Info

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

Code changes from version 3.0.1 to 3.0.2

includes/wp-structuring-admin-post.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Kazuya Takami
6
  * @since 1.0.0
7
- * @version 3.0.0
8
  */
9
  class Structuring_Markup_Admin_Post {
10
 
@@ -32,11 +32,20 @@ class Structuring_Markup_Admin_Post {
32
  */
33
  private $post_args = array();
34
 
 
 
 
 
 
 
 
 
 
35
  /**
36
  * Constructor Define.
37
  *
38
  * @since 1.0.0
39
- * @version 2.5.0
40
  * @param String $text_domain
41
  */
42
  public function __construct ( $text_domain ) {
@@ -51,8 +60,9 @@ class Structuring_Markup_Admin_Post {
51
  'value' => esc_html( $post_type->name )
52
  );
53
  }
54
-
55
- $this->text_domain = $text_domain;
 
56
 
57
  /**
58
  * Update Status
@@ -76,12 +86,14 @@ class Structuring_Markup_Admin_Post {
76
  );
77
 
78
  /** DataBase Update & Insert Mode */
79
- if ( isset( $_POST['id'] ) && is_numeric( $_POST['id'] ) ) {
80
- if ( isset( $_POST['output'] ) ) {
81
- $options['id'] = $db->update_options( $_POST );
82
- $status = "ok";
83
- } else {
84
- $status = "output";
 
 
85
  }
86
  }
87
 
@@ -107,7 +119,7 @@ class Structuring_Markup_Admin_Post {
107
  * Setting Page of the Admin Screen.
108
  *
109
  * @since 1.0.0
110
- * @version 3.0.0
111
  * @param array $options
112
  * @param string $status
113
  */
@@ -132,7 +144,11 @@ class Structuring_Markup_Admin_Post {
132
  /** Output Page Select */
133
  $html = '<hr>';
134
  $html .= '<form method="post" action="">';
135
- $html .= '<input type="hidden" name="id" value="' . esc_attr( $options['id'] ) . '">';
 
 
 
 
136
  $html .= '<input type="hidden" name="type" value="' . esc_attr( $options['type'] ) . '">';
137
  $html .= '<table class="schema-admin-table">';
138
  $html .= '<tr><th>Enabled : </th><td>';
4
  *
5
  * @author Kazuya Takami
6
  * @since 1.0.0
7
+ * @version 3.0.2
8
  */
9
  class Structuring_Markup_Admin_Post {
10
 
32
  */
33
  private $post_args = array();
34
 
35
+ /**
36
+ * Defined nonce.
37
+ *
38
+ * @since 3.0.2
39
+ * @version 3.0.2
40
+ */
41
+ private $nonce_name;
42
+ private $nonce_action;
43
+
44
  /**
45
  * Constructor Define.
46
  *
47
  * @since 1.0.0
48
+ * @version 3.0.2
49
  * @param String $text_domain
50
  */
51
  public function __construct ( $text_domain ) {
60
  'value' => esc_html( $post_type->name )
61
  );
62
  }
63
+ $this->text_domain = $text_domain;
64
+ $this->nonce_name = "_wpnonce_" . $text_domain;
65
+ $this->nonce_action = "edit-" . $text_domain;
66
 
67
  /**
68
  * Update Status
86
  );
87
 
88
  /** DataBase Update & Insert Mode */
89
+ if ( ! empty( $_POST ) && check_admin_referer( $this->nonce_action, $this->nonce_name ) ) {
90
+ if ( isset( $_POST['id'] ) && is_numeric( $_POST['id'] ) ) {
91
+ if ( isset( $_POST['output'] ) ) {
92
+ $options['id'] = $db->update_options( $_POST );
93
+ $status = "ok";
94
+ } else {
95
+ $status = "output";
96
+ }
97
  }
98
  }
99
 
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
  */
144
  /** Output Page Select */
145
  $html = '<hr>';
146
  $html .= '<form method="post" action="">';
147
+ echo $html;
148
+
149
+ wp_nonce_field( $this->nonce_action, $this->nonce_name );
150
+
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>';
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.5.3
6
- Stable tag: 3.0.1
7
 
8
  Allows you to include schema.org JSON-LD syntax markup on your website
9
 
@@ -53,6 +53,9 @@ if ( shortcode_exists( 'wp-structuring-markup-breadcrumb' ) ) {
53
 
54
  == Changelog ==
55
 
 
 
 
56
  = 3.0.1 (2016-06-25) =
57
 
58
  * Checked : WordPress version 4.5.3 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.5.3
6
+ Stable tag: 3.0.2
7
 
8
  Allows you to include schema.org JSON-LD syntax markup on your website
9
 
53
 
54
  == Changelog ==
55
 
56
+ = 3.0.2 (2016-07-15) =
57
+ * Updated : Security measures of the update process.
58
+
59
  = 3.0.1 (2016-06-25) =
60
 
61
  * Checked : WordPress version 4.5.3 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.1
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 3.0.1
23
  */
24
  class Structuring_Markup {
25
 
@@ -27,10 +27,10 @@ class Structuring_Markup {
27
  * Variable definition.
28
  *
29
  * @since 1.3.0
30
- * @version 3.0.1
31
  */
32
  private $text_domain = 'wp-structuring-markup';
33
- private $version = '3.0.1';
34
 
35
  /**
36
  * Constructor Define.
3
  Plugin Name: Markup (JSON-LD) structured in schema.org
4
  Plugin URI: https://wordpress.org/plugins/wp-structuring-markup/
5
  Description: Allows you to include schema.org JSON-LD syntax markup on your website
6
+ Version: 3.0.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 3.0.2
23
  */
24
  class Structuring_Markup {
25
 
27
  * Variable definition.
28
  *
29
  * @since 1.3.0
30
+ * @version 3.0.2
31
  */
32
  private $text_domain = 'wp-structuring-markup';
33
+ private $version = '3.0.2';
34
 
35
  /**
36
  * Constructor Define.