Version Description
- Updated : Read admin menu css -> wp_register_style setting
- Fixed : Typo Missing.
Download this release
Release Info
Developer | miiitaka |
Plugin | Markup (JSON-LD) structured in schema.org |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
- readme.txt +6 -1
- wp-structuring-admin-post.php +1 -2
- wp-structuring-display.php +4 -3
- wp-structuring-markup.php +19 -8
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: miiitaka
|
|
3 |
Tags: schema, json, seo, post, posts, google,
|
4 |
Requires at least: 4.3.1
|
5 |
Tested up to: 4.3.1
|
6 |
-
Stable tag: 1.2.
|
7 |
|
8 |
It is plug in to implement structured markup (JSON-LD syntax) by schema.org definition on an article or the fixed page.
|
9 |
|
@@ -42,6 +42,11 @@ Base knowledge is "https://schema.org/" and "https://developers.google.com/struc
|
|
42 |
|
43 |
== Changelog ==
|
44 |
|
|
|
|
|
|
|
|
|
|
|
45 |
= 1.2.0 =
|
46 |
|
47 |
* Added : Schema.org type "BlogPosting".
|
3 |
Tags: schema, json, seo, post, posts, google,
|
4 |
Requires at least: 4.3.1
|
5 |
Tested up to: 4.3.1
|
6 |
+
Stable tag: 1.2.1
|
7 |
|
8 |
It is plug in to implement structured markup (JSON-LD syntax) by schema.org definition on an article or the fixed page.
|
9 |
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
+
= 1.2.1 =
|
46 |
+
|
47 |
+
* Updated : Read admin menu css -> wp_register_style setting
|
48 |
+
* Fixed : Typo Missing.
|
49 |
+
|
50 |
= 1.2.0 =
|
51 |
|
52 |
* Added : Schema.org type "BlogPosting".
|
wp-structuring-admin-post.php
CHANGED
@@ -98,14 +98,13 @@ class Structuring_Markup_Admin_Post {
|
|
98 |
* Setting Page of the Admin Screen.
|
99 |
*
|
100 |
* @since 1.0.0
|
101 |
-
* @version 1.2.
|
102 |
* @param array $options
|
103 |
* @param string $mode
|
104 |
* @param string $status
|
105 |
*/
|
106 |
private function page_render( array $options, $mode, $status ) {
|
107 |
$html = '';
|
108 |
-
$html .= '<link rel="stylesheet" href="' . plugins_url() . '/wp-structuring-markup/css/style.css">';
|
109 |
$html .= '<div class="wrap">';
|
110 |
$html .= '<h1>Schema.org Post</h1>';
|
111 |
echo $html;
|
98 |
* Setting Page of the Admin Screen.
|
99 |
*
|
100 |
* @since 1.0.0
|
101 |
+
* @version 1.2.1
|
102 |
* @param array $options
|
103 |
* @param string $mode
|
104 |
* @param string $status
|
105 |
*/
|
106 |
private function page_render( array $options, $mode, $status ) {
|
107 |
$html = '';
|
|
|
108 |
$html .= '<div class="wrap">';
|
109 |
$html .= '<h1>Schema.org Post</h1>';
|
110 |
echo $html;
|
wp-structuring-display.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Schema.org Display
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @version 1.1
|
7 |
* @since 1.0.0
|
8 |
*/
|
9 |
class Structuring_Markup_Display {
|
@@ -136,7 +136,8 @@ class Structuring_Markup_Display {
|
|
136 |
/**
|
137 |
* Setting schema.org Organization
|
138 |
*
|
139 |
-
* @since
|
|
|
140 |
* @param array $options
|
141 |
*/
|
142 |
private function set_schema_organization( array $options ) {
|
@@ -167,7 +168,7 @@ class Structuring_Markup_Display {
|
|
167 |
|
168 |
foreach ( $options['social'] as $value ) {
|
169 |
if ( !empty( $value ) ) {
|
170 |
-
$socials["sameAs"][] =
|
171 |
}
|
172 |
}
|
173 |
$args = array_merge( $args, $socials );
|
3 |
* Schema.org Display
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @version 1.2.1
|
7 |
* @since 1.0.0
|
8 |
*/
|
9 |
class Structuring_Markup_Display {
|
136 |
/**
|
137 |
* Setting schema.org Organization
|
138 |
*
|
139 |
+
* @since 1.0.0
|
140 |
+
* @version 1.2.1
|
141 |
* @param array $options
|
142 |
*/
|
143 |
private function set_schema_organization( array $options ) {
|
168 |
|
169 |
foreach ( $options['social'] as $value ) {
|
170 |
if ( !empty( $value ) ) {
|
171 |
+
$socials["sameAs"][] = esc_html( $value );
|
172 |
}
|
173 |
}
|
174 |
$args = array_merge( $args, $socials );
|
wp-structuring-markup.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.2.
|
7 |
Author: Kazuya Takami
|
8 |
Author URI: http://programp.com/
|
9 |
License: GPLv2 or later
|
@@ -17,21 +17,26 @@ new Structuring_Markup();
|
|
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
|
|
|
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' ) );
|
@@ -41,7 +46,8 @@ class Structuring_Markup {
|
|
41 |
/**
|
42 |
* Add Menu to the Admin Screen.
|
43 |
*
|
44 |
-
* @since
|
|
|
45 |
*/
|
46 |
public function set_menu() {
|
47 |
add_menu_page(
|
@@ -49,7 +55,7 @@ class Structuring_Markup {
|
|
49 |
'Scheme.org Setting',
|
50 |
'manage_options',
|
51 |
plugin_basename( __FILE__ ),
|
52 |
-
array($this, 'list_page_render')
|
53 |
);
|
54 |
add_submenu_page(
|
55 |
__FILE__,
|
@@ -57,16 +63,21 @@ class Structuring_Markup {
|
|
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 |
/**
|
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.2.1
|
7 |
Author: Kazuya Takami
|
8 |
Author URI: http://programp.com/
|
9 |
License: GPLv2 or later
|
17 |
* Schema.org Basic Class
|
18 |
*
|
19 |
* @author Kazuya Takami
|
|
|
20 |
* @since 1.0.0
|
21 |
+
* @version 1.2.1
|
22 |
*/
|
23 |
class Structuring_Markup {
|
24 |
|
25 |
/**
|
26 |
* Constructor Define.
|
27 |
*
|
28 |
+
* @since 1.0.0
|
29 |
+
* @version 1.2.1
|
30 |
*/
|
31 |
public function __construct() {
|
32 |
$db = new Structuring_Markup_Admin_Db();
|
33 |
$db->create_table();
|
34 |
|
35 |
if ( is_admin() ) {
|
36 |
+
/** Register Plug-in CSS */
|
37 |
+
add_action( 'admin_init', function () {
|
38 |
+
wp_register_style( 'wp-structuring-markup-admin-style', plugins_url( 'css/style.css', __FILE__ ) );
|
39 |
+
});
|
40 |
add_action( 'admin_menu', array( $this, 'set_menu' ) );
|
41 |
} else {
|
42 |
add_action( 'wp_head', array( $this, 'display_page_render' ) );
|
46 |
/**
|
47 |
* Add Menu to the Admin Screen.
|
48 |
*
|
49 |
+
* @since 1.0.0
|
50 |
+
* @version 1.2.1
|
51 |
*/
|
52 |
public function set_menu() {
|
53 |
add_menu_page(
|
55 |
'Scheme.org Setting',
|
56 |
'manage_options',
|
57 |
plugin_basename( __FILE__ ),
|
58 |
+
array( $this, 'list_page_render' )
|
59 |
);
|
60 |
add_submenu_page(
|
61 |
__FILE__,
|
63 |
'Setting All',
|
64 |
'manage_options',
|
65 |
plugin_basename( __FILE__ ),
|
66 |
+
array( $this, 'list_page_render' )
|
67 |
);
|
68 |
+
$page = add_submenu_page(
|
69 |
__FILE__,
|
70 |
'Scheme.org Setting Post',
|
71 |
'Add New',
|
72 |
'manage_options',
|
73 |
plugin_dir_path( __FILE__ ) . 'wp-structuring-admin-post.php',
|
74 |
+
array( $this, 'post_page_render' )
|
75 |
);
|
76 |
+
|
77 |
+
/* Using registered $page handle to hook stylesheet loading */
|
78 |
+
add_action( 'admin_print_styles-' . $page, function () {
|
79 |
+
wp_enqueue_style( 'wp-structuring-markup-admin-style' );
|
80 |
+
});
|
81 |
}
|
82 |
|
83 |
/**
|