Version Description
(2016-01-07) =
- Check : WordPress version 4.4.1 operation check.
- Added : Breadcrumb ShortCode option add.
Download this release
Release Info
Developer | miiitaka |
Plugin | Markup (JSON-LD) structured in schema.org |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.3.0 to 2.3.1
- includes/wp-structuring-short-code-breadcrumb.php +33 -11
- readme.txt +15 -4
- wp-structuring-markup.php +8 -7
includes/wp-structuring-short-code-breadcrumb.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Breadcrumb ShortCode Settings
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
-
* @version 2.
|
7 |
* @since 2.0.0
|
8 |
*/
|
9 |
class Structuring_Markup_ShortCode_Breadcrumb {
|
@@ -11,22 +11,44 @@ class Structuring_Markup_ShortCode_Breadcrumb {
|
|
11 |
/**
|
12 |
* ShortCode Display.
|
13 |
*
|
14 |
-
* @since
|
15 |
-
* @
|
16 |
-
* @
|
17 |
-
* @
|
|
|
|
|
18 |
*/
|
19 |
-
public function short_code_display ( array $options ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
$item_array = $this->breadcrumb_array_setting( $options );
|
21 |
$html = '';
|
22 |
|
23 |
-
if ( $item_array ) {
|
24 |
$html .= '<!-- Markup (JSON-LD) structured in schema.org Breadcrumb START -->' . PHP_EOL;
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
$html .= '<li>';
|
28 |
-
$html .= '<a href="' . esc_url($item['@id']) . '">';
|
29 |
-
$html .= esc_html($item['name']);
|
30 |
$html .= '</a>';
|
31 |
$html .= '</li>' . PHP_EOL;
|
32 |
}
|
3 |
* Breadcrumb ShortCode Settings
|
4 |
*
|
5 |
* @author Kazuya Takami
|
6 |
+
* @version 2.3.1
|
7 |
* @since 2.0.0
|
8 |
*/
|
9 |
class Structuring_Markup_ShortCode_Breadcrumb {
|
11 |
/**
|
12 |
* ShortCode Display.
|
13 |
*
|
14 |
+
* @since 2.0.0
|
15 |
+
* @version 2.3.1
|
16 |
+
* @access public
|
17 |
+
* @param array $options
|
18 |
+
* @param string $args
|
19 |
+
* @return string $html
|
20 |
*/
|
21 |
+
public function short_code_display ( array $options, $args ) {
|
22 |
+
extract( shortcode_atts( array (
|
23 |
+
'id' => "",
|
24 |
+
'class' => ""
|
25 |
+
), $args ) );
|
26 |
+
|
27 |
+
$instance = array(
|
28 |
+
'id' => esc_attr( $id ),
|
29 |
+
'class' => esc_attr( $class )
|
30 |
+
);
|
31 |
+
|
32 |
$item_array = $this->breadcrumb_array_setting( $options );
|
33 |
$html = '';
|
34 |
|
35 |
+
if ( isset( $item_array ) && count( $item_array ) > 0 ) {
|
36 |
$html .= '<!-- Markup (JSON-LD) structured in schema.org Breadcrumb START -->' . PHP_EOL;
|
37 |
+
|
38 |
+
if ( $id !== '' && $class !== '' ) {
|
39 |
+
$html .= '<ol id="' . $id . '" class="' . $class . '">';
|
40 |
+
} else if ( $id !== '' && $class === '' ) {
|
41 |
+
$html .= '<ol id="' . $id . '">';
|
42 |
+
} else if ( $id === '' && $class !== '' ) {
|
43 |
+
$html .= '<ol class="' . $class . '">';
|
44 |
+
} else {
|
45 |
+
$html .= '<ol>';
|
46 |
+
}
|
47 |
+
$html .= PHP_EOL;
|
48 |
+
foreach ( $item_array as $item ) {
|
49 |
$html .= '<li>';
|
50 |
+
$html .= '<a href="' . esc_url( $item['@id'] ) . '">';
|
51 |
+
$html .= esc_html( $item['name'] );
|
52 |
$html .= '</a>';
|
53 |
$html .= '</li>' . PHP_EOL;
|
54 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
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
|
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 |
|
@@ -30,12 +30,18 @@ You can display the breadcrumbs in the short code. Breadcrumb definition is avai
|
|
30 |
[ Example ]
|
31 |
`
|
32 |
<?php
|
33 |
-
if (shortcode_exists('wp-structuring-markup-breadcrumb')) {
|
34 |
-
echo do_shortcode('[wp-structuring-markup-breadcrumb]');
|
35 |
}
|
36 |
?>
|
37 |
`
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
== Installation ==
|
40 |
|
41 |
* A plug-in installation screen is displayed in the WordPress admin panel.
|
@@ -45,6 +51,11 @@ if (shortcode_exists('wp-structuring-markup-breadcrumb')) {
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
|
|
|
|
48 |
= 2.3.0 (2016-01-03) =
|
49 |
|
50 |
* Added : Schema.org type "LocalBusiness".
|
2 |
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.1
|
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 |
|
30 |
[ Example ]
|
31 |
`
|
32 |
<?php
|
33 |
+
if ( shortcode_exists( 'wp-structuring-markup-breadcrumb' ) ) {
|
34 |
+
echo do_shortcode( '[wp-structuring-markup-breadcrumb]' );
|
35 |
}
|
36 |
?>
|
37 |
`
|
38 |
|
39 |
+
[ ShortCode Options ]
|
40 |
+
|
41 |
+
* Option : id="id_name" attribute additional ol element.
|
42 |
+
* Option : class="class_name" attribute additional ol element.
|
43 |
+
|
44 |
+
|
45 |
== Installation ==
|
46 |
|
47 |
* A plug-in installation screen is displayed in the WordPress admin panel.
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 2.3.1 (2016-01-07) =
|
55 |
+
|
56 |
+
* Check : WordPress version 4.4.1 operation check.
|
57 |
+
* Added : Breadcrumb ShortCode option add.
|
58 |
+
|
59 |
= 2.3.0 (2016-01-03) =
|
60 |
|
61 |
* Added : Schema.org type "LocalBusiness".
|
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.
|
@@ -69,10 +69,11 @@ class Structuring_Markup {
|
|
69 |
* Breadcrumb ShortCode Register.
|
70 |
*
|
71 |
* @since 2.0.0
|
72 |
-
* @version 2.
|
|
|
73 |
* @return string $html
|
74 |
*/
|
75 |
-
public function short_code_init_breadcrumb () {
|
76 |
$db = new Structuring_Markup_Admin_Db();
|
77 |
$results = $db->get_type_options( 'breadcrumb' );
|
78 |
|
@@ -81,7 +82,7 @@ class Structuring_Markup {
|
|
81 |
|
82 |
require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-short-code-breadcrumb.php');
|
83 |
$obj = new Structuring_Markup_ShortCode_Breadcrumb();
|
84 |
-
return $obj->short_code_display( $options );
|
85 |
}
|
86 |
}
|
87 |
|
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.1
|
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.1
|
23 |
*/
|
24 |
class Structuring_Markup {
|
25 |
|
27 |
* Variable definition.
|
28 |
*
|
29 |
* @since 1.3.0
|
30 |
+
* @version 2.3.1
|
31 |
*/
|
32 |
private $text_domain = 'wp-structuring-markup';
|
33 |
+
private $version = '2.3.1';
|
34 |
|
35 |
/**
|
36 |
* Constructor Define.
|
69 |
* Breadcrumb ShortCode Register.
|
70 |
*
|
71 |
* @since 2.0.0
|
72 |
+
* @version 2.3.1
|
73 |
+
* @param string $args short code params
|
74 |
* @return string $html
|
75 |
*/
|
76 |
+
public function short_code_init_breadcrumb ( $args ) {
|
77 |
$db = new Structuring_Markup_Admin_Db();
|
78 |
$results = $db->get_type_options( 'breadcrumb' );
|
79 |
|
82 |
|
83 |
require_once( plugin_dir_path( __FILE__ ) . 'includes/wp-structuring-short-code-breadcrumb.php');
|
84 |
$obj = new Structuring_Markup_ShortCode_Breadcrumb();
|
85 |
+
return $obj->short_code_display( $options, $args );
|
86 |
}
|
87 |
}
|
88 |
|