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

Version Description

Download this release

Release Info

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

Code changes from version 1.1.0 to 1.1.1

{css → trunk/css}/style.css RENAMED
File without changes
readme.txt → trunk/readme.txt RENAMED
@@ -21,9 +21,13 @@ Base knowledge is "https://developers.google.com/structured-data/"
21
 
22
  == Changelog ==
23
 
24
- = 1.1.0
25
 
26
- * Schema.org Type "Article" Add.
 
 
 
 
27
 
28
  = 1.0.1 - 1.0.8 =
29
 
21
 
22
  == Changelog ==
23
 
24
+ = 1.1.1 =
25
 
26
+ * Schema.org type "Article" image add.
27
+
28
+ = 1.1.0 =
29
+
30
+ * Schema.org type "Article" add.
31
 
32
  = 1.0.1 - 1.0.8 =
33
 
uninstall.php → trunk/uninstall.php RENAMED
File without changes
wp-structuring-admin-db.php → trunk/wp-structuring-admin-db.php RENAMED
File without changes
wp-structuring-admin-list.php → trunk/wp-structuring-admin-list.php RENAMED
File without changes
wp-structuring-admin-post.php → trunk/wp-structuring-admin-post.php RENAMED
File without changes
wp-structuring-admin-type-article.php → trunk/wp-structuring-admin-type-article.php RENAMED
File without changes
wp-structuring-admin-type-news-article.php → trunk/wp-structuring-admin-type-news-article.php RENAMED
File without changes
wp-structuring-admin-type-organization.php → trunk/wp-structuring-admin-type-organization.php RENAMED
File without changes
wp-structuring-admin-type-website.php → trunk/wp-structuring-admin-type-website.php RENAMED
File without changes
wp-structuring-display.php → trunk/wp-structuring-display.php RENAMED
@@ -163,28 +163,24 @@ class Structuring_Markup_Display {
163
  * Setting schema.org Article
164
  *
165
  * @since 1.1.0
166
- * @version 1.1.0
167
  */
168
  private function set_schema_article() {
169
  global $post;
170
-
171
- $args = array(
172
- "@context" => "http://schema.org",
173
- "@type" => "Article",
174
- "headline" => esc_html( $post->post_title ),
175
- "datePublished" => get_the_time( DATE_ISO8601, $post->ID ),
176
- "author" => esc_html( get_the_author_meta( 'display_name', $post->post_author ) ),
177
- "description" => esc_html( $post->post_excerpt ),
178
- "articleBody" => esc_html( $post->post_content )
179
- );
180
-
181
  if ( has_post_thumbnail( $post->ID ) ) {
182
  list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
183
  $args = array(
184
- "image" => array( $thumbnail_url ),
 
 
 
 
 
 
 
185
  );
 
186
  }
187
- $this->set_schema_json( $args );
188
  }
189
 
190
  /**
163
  * Setting schema.org Article
164
  *
165
  * @since 1.1.0
166
+ * @version 1.1.1
167
  */
168
  private function set_schema_article() {
169
  global $post;
 
 
 
 
 
 
 
 
 
 
 
170
  if ( has_post_thumbnail( $post->ID ) ) {
171
  list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
172
  $args = array(
173
+ "@context" => "http://schema.org",
174
+ "@type" => "Article",
175
+ "headline" => esc_html( $post->post_title ),
176
+ "datePublished" => get_the_time( DATE_ISO8601, $post->ID ),
177
+ "author" => esc_html( get_the_author_meta( 'display_name', $post->post_author ) ),
178
+ "image" => array( $thumbnail_url ),
179
+ "description" => esc_html( $post->post_excerpt ),
180
+ "articleBody" => esc_html( $post->post_content )
181
  );
182
+ $this->set_schema_json( $args );
183
  }
 
184
  }
185
 
186
  /**
wp-structuring-markup.php DELETED
@@ -1,101 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Markup (JSON-LD) structured in schema.org
4
- Plugin URI: https://github.com/miiitaka/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.1.0
7
- Author: Kazuya Takami
8
- Author URI: http://programp.com/
9
- License: GPLv2 or later
10
- Text Domain: wp-structuring-markup
11
- */
12
- require_once( plugin_dir_path( __FILE__ ) . 'wp-structuring-admin-db.php' );
13
-
14
- new Structuring_Markup();
15
-
16
- /**
17
- * Schema.org Basic Class
18
- *
19
- * @author Kazuya Takami
20
- * @version 1.0.0
21
- * @since 1.0.0
22
- */
23
- class Structuring_Markup {
24
-
25
- /**
26
- * Constructor Define.
27
- *
28
- * @since 1.0.0
29
- */
30
- public function __construct() {
31
- $db = new Structuring_Markup_Admin_Db();
32
- $db->create_table();
33
-
34
- if ( is_admin() ) {
35
- add_action( 'admin_menu', array( $this, 'set_menu' ) );
36
- } else {
37
- add_action( 'wp_head', array( $this, 'display_page_render' ) );
38
- }
39
- }
40
-
41
- /**
42
- * Add Menu to the Admin Screen.
43
- *
44
- * @since 1.0.0
45
- */
46
- public function set_menu() {
47
- add_menu_page(
48
- 'Scheme.org Setting',
49
- 'Scheme.org Setting',
50
- 'manage_options',
51
- plugin_basename( __FILE__ ),
52
- array($this, 'list_page_render')
53
- );
54
- add_submenu_page(
55
- __FILE__,
56
- 'Setting All',
57
- 'Setting All',
58
- 'manage_options',
59
- plugin_basename( __FILE__ ),
60
- array($this, 'list_page_render')
61
- );
62
- add_submenu_page(
63
- __FILE__,
64
- 'Scheme.org Setting Post',
65
- 'Add New',
66
- 'manage_options',
67
- plugin_dir_path( __FILE__ ) . 'wp-structuring-admin-post.php',
68
- array($this, 'post_page_render')
69
- );
70
- }
71
-
72
- /**
73
- * LIST Page Template Require.
74
- *
75
- * @since 1.0.0
76
- */
77
- public function list_page_render() {
78
- require_once( plugin_dir_path( __FILE__ ) . 'wp-structuring-admin-list.php' );
79
- new Structuring_Markup_Admin_List();
80
- }
81
-
82
- /**
83
- * POST Page Template Require.
84
- *
85
- * @since 1.0.0
86
- */
87
- public function post_page_render() {
88
- require_once( plugin_dir_path( __FILE__ ) . 'wp-structuring-admin-post.php' );
89
- new Structuring_Markup_Admin_Post();
90
- }
91
-
92
- /**
93
- * Display Page Template Require.
94
- *
95
- * @since 1.0.0
96
- */
97
- public function display_page_render() {
98
- require_once( plugin_dir_path( __FILE__ ) . 'wp-structuring-display.php' );
99
- new Structuring_Markup_Display();
100
- }
101
- }