Version Description
- Lat/Log issue fix
- Rating issue
- Image issue
Download this release
Release Info
Developer | kcseopro |
Plugin | WP SEO Structured Data Schema |
Version | 2.5 |
Comparing to | |
See all releases |
Code changes from version 2.4.1 to 2.5
- assets/css/admin.css +54 -3
- assets/js/admin.js +9 -3
- lib/classes/KcSeoInit.php +9 -0
- lib/classes/KcSeoMetaData.php +13 -3
- lib/classes/KcSeoOutput.php +6 -2
- lib/models/KcSeoSchemaModel.php +204 -100
- lib/views/schema-options.php +531 -472
- lib/views/settings.php +57 -27
- readme.txt +46 -14
- wp-seo-structured-data-schema.php +4 -4
assets/css/admin.css
CHANGED
@@ -1,3 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.kSeo-hidden{
|
2 |
display: none;
|
3 |
}
|
@@ -66,14 +117,14 @@ ul.rt-tab-nav li:focus{
|
|
66 |
outline: none;
|
67 |
}
|
68 |
ul.rt-tab-nav li.active a , ul.rt-tab-nav li a:hover{
|
69 |
-
background: #
|
70 |
}
|
71 |
ul.rt-tab-nav li.active a:after , ul.rt-tab-nav li a:hover:after{
|
72 |
width: 0;
|
73 |
height: 0;
|
74 |
border-left: 10px solid transparent;
|
75 |
border-right: 10px solid transparent;
|
76 |
-
border-top: 5px solid #
|
77 |
position: absolute;
|
78 |
bottom: -5px;
|
79 |
left: 0;
|
@@ -87,7 +138,7 @@ ul.rt-tab-nav li a{
|
|
87 |
display: block;
|
88 |
padding: 8px 10px;
|
89 |
border-right: 1px solid;
|
90 |
-
background: #
|
91 |
color: #fff;
|
92 |
position: relative;
|
93 |
font-weight: bold;
|
1 |
+
#kcseo-wordpres-seo-structured-data-schema-meta-box .hndle a{
|
2 |
+
font-size: inherit;
|
3 |
+
}
|
4 |
+
#kcseo-settings *{
|
5 |
+
box-sizing: border-box;
|
6 |
+
}
|
7 |
+
#kcseo-settings:after{
|
8 |
+
clear: both;
|
9 |
+
content: "";
|
10 |
+
display: block;
|
11 |
+
}
|
12 |
+
#kcseo-settings #kcseo-options {
|
13 |
+
float: left;
|
14 |
+
width: 60%;
|
15 |
+
max-width: 700px;
|
16 |
+
}
|
17 |
+
#kcseo-settings .kc-get-pro{
|
18 |
+
float: right;
|
19 |
+
width: 35%;
|
20 |
+
max-width: 300px;
|
21 |
+
}
|
22 |
+
.kc-get-pro{
|
23 |
+
padding: 10px;
|
24 |
+
background: #5c842e;
|
25 |
+
max-width: 550px;
|
26 |
+
color: #fff;
|
27 |
+
}
|
28 |
+
.kc-get-pro a.button {
|
29 |
+
background: #2d5181;
|
30 |
+
border-color: #2d5161;
|
31 |
+
box-shadow: inset 0 2px 0 #2d5161;
|
32 |
+
|
33 |
+
}
|
34 |
+
.kc-get-pro a.button:hover {
|
35 |
+
background: #375e81;
|
36 |
+
border-color: #375e61;
|
37 |
+
box-shadow: inset 0 2px 0 #375e61;
|
38 |
+
}
|
39 |
+
|
40 |
+
.kc-pro-action {
|
41 |
+
text-align: center;
|
42 |
+
margin: 10px 0;
|
43 |
+
}
|
44 |
+
.kc-get-pro h3{
|
45 |
+
margin-top: 10px;
|
46 |
+
color: #fff;
|
47 |
+
border-bottom: 1px solid #ccc;
|
48 |
+
text-align: center;
|
49 |
+
padding-bottom: 10px;
|
50 |
+
}
|
51 |
+
|
52 |
.kSeo-hidden{
|
53 |
display: none;
|
54 |
}
|
117 |
outline: none;
|
118 |
}
|
119 |
ul.rt-tab-nav li.active a , ul.rt-tab-nav li a:hover{
|
120 |
+
background: #5c842e;
|
121 |
}
|
122 |
ul.rt-tab-nav li.active a:after , ul.rt-tab-nav li a:hover:after{
|
123 |
width: 0;
|
124 |
height: 0;
|
125 |
border-left: 10px solid transparent;
|
126 |
border-right: 10px solid transparent;
|
127 |
+
border-top: 5px solid #5c842e;
|
128 |
position: absolute;
|
129 |
bottom: -5px;
|
130 |
left: 0;
|
138 |
display: block;
|
139 |
padding: 8px 10px;
|
140 |
border-right: 1px solid;
|
141 |
+
background: #2d5181;
|
142 |
color: #fff;
|
143 |
position: relative;
|
144 |
font-weight: bold;
|
assets/js/admin.js
CHANGED
@@ -11,9 +11,9 @@
|
|
11 |
}
|
12 |
});
|
13 |
|
14 |
-
|
15 |
$("#site_type, #_schema_aggregate_rating_schema_type").change(function () {
|
16 |
-
|
17 |
});
|
18 |
|
19 |
if ($("#kcseo-wordpres-seo-structured-data-schema-meta-box").length) {
|
@@ -116,7 +116,7 @@
|
|
116 |
}
|
117 |
});
|
118 |
|
119 |
-
function
|
120 |
if($('#_schema_aggregate_rating_schema_type').length){
|
121 |
var id = $("#_schema_aggregate_rating_schema_type option:selected").val();
|
122 |
}
|
@@ -134,6 +134,12 @@
|
|
134 |
} else {
|
135 |
$(".form-table tr.business-info,.form-table tr.all-type-data, .aggregate-except-organization-holder").show();
|
136 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
}
|
138 |
|
139 |
$("#kcseo-option-settings").on('submit', function (e) {
|
11 |
}
|
12 |
});
|
13 |
|
14 |
+
wpSeoShowHideType();
|
15 |
$("#site_type, #_schema_aggregate_rating_schema_type").change(function () {
|
16 |
+
wpSeoShowHideType();
|
17 |
});
|
18 |
|
19 |
if ($("#kcseo-wordpres-seo-structured-data-schema-meta-box").length) {
|
116 |
}
|
117 |
});
|
118 |
|
119 |
+
function wpSeoShowHideType() {
|
120 |
if($('#_schema_aggregate_rating_schema_type').length){
|
121 |
var id = $("#_schema_aggregate_rating_schema_type option:selected").val();
|
122 |
}
|
134 |
} else {
|
135 |
$(".form-table tr.business-info,.form-table tr.all-type-data, .aggregate-except-organization-holder").show();
|
136 |
}
|
137 |
+
|
138 |
+
if($.inArray(id, ['FoodEstablishment', 'Bakery','BarOrPub','Brewery','CafeOrCoffeeShop','FastFoodRestaurant','IceCreamShop','Restaurant','Winery']) >= 0){
|
139 |
+
$(".form-table tr.restaurant").show();
|
140 |
+
}else {
|
141 |
+
$(".form-table tr.restaurant").hide();
|
142 |
+
}
|
143 |
}
|
144 |
|
145 |
$("#kcseo-option-settings").on('submit', function (e) {
|
lib/classes/KcSeoInit.php
CHANGED
@@ -20,6 +20,15 @@ if ( ! class_exists( 'KcSeoInit' ) ):
|
|
20 |
// register_deactivation_hook(KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array($this, 'uninstall'));
|
21 |
// Uninstall hook
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
|
20 |
// register_deactivation_hook(KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array($this, 'uninstall'));
|
21 |
// Uninstall hook
|
22 |
|
23 |
+
add_filter( 'plugin_action_links_' . KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME,
|
24 |
+
array( $this, 'schema_marketing' ) );
|
25 |
+
|
26 |
+
}
|
27 |
+
|
28 |
+
function schema_marketing($links){
|
29 |
+
$links[] = '<a target="_blank" href="' . esc_url( 'https://wpsemplugins.com/documentation/' ) . '">Documentation</a>';
|
30 |
+
$links[] = '<a target="_blank" href="' . esc_url( 'https://wpsemplugins.com/downloads/wordpress-schema-plugin/' ) . '">Get Pro</a>';
|
31 |
+
return $links;
|
32 |
}
|
33 |
|
34 |
|
lib/classes/KcSeoMetaData.php
CHANGED
@@ -41,7 +41,7 @@ if(!class_exists('KcSeoMetaData')):
|
|
41 |
foreach($pt as $postType){
|
42 |
add_meta_box(
|
43 |
'kcseo-wordpres-seo-structured-data-schema-meta-box',
|
44 |
-
__('WP SEO Structured Data Schema by <a href="
|
45 |
array($this,'meta_box_wp_schema'),
|
46 |
$postType,
|
47 |
'normal',
|
@@ -54,11 +54,21 @@ if(!class_exists('KcSeoMetaData')):
|
|
54 |
function meta_box_wp_schema($post){
|
55 |
global $KcSeoWPSchema;
|
56 |
wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' );
|
57 |
-
$schemas = new KcSeoSchemaModel;
|
58 |
$html = null;
|
59 |
$html .="<div class='schema-tips'>";
|
60 |
-
$html .= "<p><span>Tip:</span> For more detailed information on how to configure this plugin, please visit: <a href='
|
61 |
$html .= "<p><span>Tip:</span> Once you save these structured data schema settings, validate this page url here: <a href='https://developers.google.com/structured-data/testing-tool/'>https://developers.google.com/structured-data/testing-tool/</a></p>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
$html .="</div>";
|
63 |
$html .= "<div class='schema-holder'>";
|
64 |
$html .= '<div id="meta-tab-holder" class="rt-tab-container">';
|
41 |
foreach($pt as $postType){
|
42 |
add_meta_box(
|
43 |
'kcseo-wordpres-seo-structured-data-schema-meta-box',
|
44 |
+
__('WP SEO Structured Data Schema by <a href="https://wpsemplugins.com/">WPSEMPlugins.com</a>', KCSEO_WP_SCHEMA_SLUG),
|
45 |
array($this,'meta_box_wp_schema'),
|
46 |
$postType,
|
47 |
'normal',
|
54 |
function meta_box_wp_schema($post){
|
55 |
global $KcSeoWPSchema;
|
56 |
wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' );
|
57 |
+
$schemas = new KcSeoSchemaModel();
|
58 |
$html = null;
|
59 |
$html .="<div class='schema-tips'>";
|
60 |
+
$html .= "<p><span>Tip:</span> For more detailed information on how to configure this plugin, please visit: <a href='https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/'>https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/</a></p>";
|
61 |
$html .= "<p><span>Tip:</span> Once you save these structured data schema settings, validate this page url here: <a href='https://developers.google.com/structured-data/testing-tool/'>https://developers.google.com/structured-data/testing-tool/</a></p>";
|
62 |
+
$html .= "<div class='kc-get-pro'>
|
63 |
+
<strong>Pro Version Features</strong>
|
64 |
+
<ol>
|
65 |
+
<li>Includes Auto-fill function <---Popular</li>
|
66 |
+
<li>Supports Custom Post Types beyond default page and posts</li>
|
67 |
+
<li>Supports WordPress Multisite</li>
|
68 |
+
<li>Supports more schema types: ( Books, Courses, Job Postings, Movies, Music, Recipe, TV Episode) </li>
|
69 |
+
</ol>
|
70 |
+
<a class='button button-primary' href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>Get the Pro Version</a>
|
71 |
+
</div>";
|
72 |
$html .="</div>";
|
73 |
$html .= "<div class='schema-holder'>";
|
74 |
$html .= '<div id="meta-tab-holder" class="rt-tab-container">';
|
lib/classes/KcSeoOutput.php
CHANGED
@@ -143,11 +143,15 @@ if ( ! class_exists( 'KcSeoOutput' ) ):
|
|
143 |
}
|
144 |
$webMeta["geo"] = array(
|
145 |
"@type" => "GeoCoordinates",
|
|
|
146 |
"longitude" => ! empty( $settings['business_info']['longitude'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['business_info']['longitude'] ) : null,
|
147 |
-
"latitude" => ! empty( $settings['business_info']['latitude'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['business_info']['latitude'] ) : null
|
148 |
);
|
149 |
}
|
150 |
|
|
|
|
|
|
|
|
|
151 |
$webMeta["url"] = ! empty( $settings['web_url'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['web_url'], 'url' ) : $KcSeoWPSchema->sanitizeOutPut( get_home_url(), 'url');
|
152 |
if ( ! empty( $settings['social'] ) && is_array( $settings['social'] ) ) {
|
153 |
$link = array();
|
@@ -163,7 +167,7 @@ if ( ! class_exists( 'KcSeoOutput' ) ):
|
|
163 |
|
164 |
$webMeta["contactPoint"] = array(
|
165 |
"@type" => "ContactPoint",
|
166 |
-
"telephone" => ! empty( $settings['contact']['telephone'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['contact']['telephone'] ) : '',
|
167 |
"contactType" => ! empty( $settings['contact']['contactType'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['contact']['contactType'] ) : '',
|
168 |
"email" => ! empty( $settings['contact']['email'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['contact']['email'] ) : '',
|
169 |
"contactOption" => ! empty( $settings['contact']['contactOption'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['contact']['contactOption'] ) : '',
|
143 |
}
|
144 |
$webMeta["geo"] = array(
|
145 |
"@type" => "GeoCoordinates",
|
146 |
+
"latitude" => ! empty( $settings['business_info']['latitude'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['business_info']['latitude'] ) : null,
|
147 |
"longitude" => ! empty( $settings['business_info']['longitude'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['business_info']['longitude'] ) : null,
|
|
|
148 |
);
|
149 |
}
|
150 |
|
151 |
+
if(in_array($siteType, array('FoodEstablishment', 'Bakery','BarOrPub','Brewery','CafeOrCoffeeShop','FastFoodRestaurant','IceCreamShop','Restaurant','Winery'))){
|
152 |
+
$webMeta["servesCuisine"] = !empty($settings['restaurant']['servesCuisine']) ? $KcSeoWPSchema->sanitizeOutPut( $settings['restaurant']['servesCuisine'], 'textarea' ) : null;
|
153 |
+
}
|
154 |
+
|
155 |
$webMeta["url"] = ! empty( $settings['web_url'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['web_url'], 'url' ) : $KcSeoWPSchema->sanitizeOutPut( get_home_url(), 'url');
|
156 |
if ( ! empty( $settings['social'] ) && is_array( $settings['social'] ) ) {
|
157 |
$link = array();
|
167 |
|
168 |
$webMeta["contactPoint"] = array(
|
169 |
"@type" => "ContactPoint",
|
170 |
+
"telephone" => ! empty( $settings['contact']['telephone'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['contact']['telephone'] ) : (! empty( $settings['site_telephone'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['site_telephone'] ) : null),
|
171 |
"contactType" => ! empty( $settings['contact']['contactType'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['contact']['contactType'] ) : '',
|
172 |
"email" => ! empty( $settings['contact']['email'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['contact']['email'] ) : '',
|
173 |
"contactOption" => ! empty( $settings['contact']['contactOption'] ) ? $KcSeoWPSchema->sanitizeOutPut( $settings['contact']['contactOption'] ) : '',
|
lib/models/KcSeoSchemaModel.php
CHANGED
@@ -555,7 +555,7 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
|
|
555 |
$id = $data['id'];
|
556 |
$name = $data['name'];
|
557 |
$value = $data['value'];
|
558 |
-
$attr = !empty($data['attr']) ? $data['attr'] : null;
|
559 |
|
560 |
$class = isset( $data['class'] ) ? ( $data['class'] ? $data['class'] : null ) : null;
|
561 |
$require = ( isset( $data['required'] ) ? ( $data['required'] ? "<span class='required'>*</span>" : null ) : null );
|
@@ -578,7 +578,7 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
|
|
578 |
break;
|
579 |
|
580 |
case 'number':
|
581 |
-
|
582 |
break;
|
583 |
case 'textarea':
|
584 |
$html .= "<textarea id='{$id}' class='{$class}' name='{$name}' >" . wp_kses( $value,
|
@@ -625,6 +625,45 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
|
|
625 |
}
|
626 |
$html .= "</select>";
|
627 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
default:
|
629 |
$html .= "<input id='{$id}' type='{$data['type']}' value='" . esc_attr( $value ) . "' name='$name' />";
|
630 |
break;
|
@@ -949,6 +988,7 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
|
|
949 |
'ratingValue' => array(
|
950 |
'title' => 'Ratting value',
|
951 |
'type' => 'number',
|
|
|
952 |
'desc' => "Rating value. (1 , 2.5, 3, 5 etc)"
|
953 |
),
|
954 |
'reviewCount' => array(
|
@@ -1210,7 +1250,7 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
|
|
1210 |
),
|
1211 |
'schema_type' => array(
|
1212 |
'title' => 'Schema type',
|
1213 |
-
'type' => '
|
1214 |
'required' => true,
|
1215 |
'options' => $this->site_type(),
|
1216 |
'empty' => "Select one",
|
@@ -1252,27 +1292,27 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
|
|
1252 |
'ratingCount' => array(
|
1253 |
'title' => 'Rating Count',
|
1254 |
'type' => 'number',
|
1255 |
-
'attr'
|
1256 |
'required' => true,
|
1257 |
'desc' => "The total number of ratings for the item on your site. <span class='required'>* At least one of ratingCount or reviewCount is required.</span>"
|
1258 |
),
|
1259 |
'reviewCount' => array(
|
1260 |
'title' => 'Review Count',
|
1261 |
'type' => 'number',
|
1262 |
-
'attr'
|
1263 |
'required' => true,
|
1264 |
'desc' => "Specifies the number of people who provided a review with or without an accompanying rating. At least one of ratingCount or reviewCount is required."
|
1265 |
),
|
1266 |
'ratingValue' => array(
|
1267 |
'title' => 'Rating Value',
|
1268 |
'type' => 'number',
|
1269 |
-
'attr'
|
1270 |
'required' => true,
|
1271 |
'desc' => "A numerical quality rating for the item."
|
1272 |
),
|
1273 |
'ratingValue' => array(
|
1274 |
'title' => 'Rating Value',
|
1275 |
-
'attr'
|
1276 |
'type' => 'number',
|
1277 |
'required' => true,
|
1278 |
'desc' => "A numerical quality rating for the item."
|
@@ -1280,14 +1320,14 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
|
|
1280 |
'bestRating' => array(
|
1281 |
'title' => 'Best Rating',
|
1282 |
'type' => 'number',
|
1283 |
-
'attr'
|
1284 |
'required' => true,
|
1285 |
'desc' => "The highest value allowed in this rating system. <span class='required'>* Required if the rating system is not a 5-point scale.</span> If bestRating is omitted, 5 is assumed."
|
1286 |
),
|
1287 |
'worstRating' => array(
|
1288 |
'title' => 'Worst Rating',
|
1289 |
'type' => 'number',
|
1290 |
-
'attr'
|
1291 |
'required' => true,
|
1292 |
'desc' => "The lowest value allowed in this rating system. <span class='required'>* Required if the rating system is not a 5-point scale.</span> If worstRating is omitted, 1 is assumed."
|
1293 |
)
|
@@ -1410,97 +1450,161 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
|
|
1410 |
function site_type() {
|
1411 |
return array(
|
1412 |
'Organization',
|
1413 |
-
'LocalBusiness'
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1504 |
);
|
1505 |
}
|
1506 |
|
555 |
$id = $data['id'];
|
556 |
$name = $data['name'];
|
557 |
$value = $data['value'];
|
558 |
+
$attr = ! empty( $data['attr'] ) ? $data['attr'] : null;
|
559 |
|
560 |
$class = isset( $data['class'] ) ? ( $data['class'] ? $data['class'] : null ) : null;
|
561 |
$require = ( isset( $data['required'] ) ? ( $data['required'] ? "<span class='required'>*</span>" : null ) : null );
|
578 |
break;
|
579 |
|
580 |
case 'number':
|
581 |
+
$html .= "<input type='number' {$attr} id='{$id}' class='{$class}' name='{$name}' value='" . esc_attr( $value ) . "' />";
|
582 |
break;
|
583 |
case 'textarea':
|
584 |
$html .= "<textarea id='{$id}' class='{$class}' name='{$name}' >" . wp_kses( $value,
|
625 |
}
|
626 |
$html .= "</select>";
|
627 |
break;
|
628 |
+
case 'schema_type':
|
629 |
+
$html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
|
630 |
+
if ( ! empty( $data['empty'] ) ) {
|
631 |
+
$html .= "<option value=''>{$data['empty']}</option>";
|
632 |
+
}
|
633 |
+
|
634 |
+
foreach ( $data['options'] as $key => $site ) {
|
635 |
+
if ( is_array( $site ) ) {
|
636 |
+
$slt = ( $key == $value ? "selected" : null );
|
637 |
+
$html .= "<option value='$key' $slt> $key</option>";
|
638 |
+
foreach ( $site as $inKey => $inSite ) {
|
639 |
+
if ( is_array( $inSite ) ) {
|
640 |
+
$slt = ( $inKey == $value ? "selected" : null );
|
641 |
+
$html .= "<option value='$inKey' $slt> $inKey</option>";
|
642 |
+
foreach ( $inSite as $inInKey => $inInSite ) {
|
643 |
+
if ( is_array( $inInSite ) ) {
|
644 |
+
$slt = ( $inInKey == $value ? "selected" : null );
|
645 |
+
$html .= "<option value='$inInKey' $slt> $inInKey</option>";
|
646 |
+
foreach ( $inInSite as $iSite ) {
|
647 |
+
$slt = ( $iSite == $value ? "selected" : null );
|
648 |
+
$html .= "<option value='$iSite' $slt> $iSite</option>";
|
649 |
+
}
|
650 |
+
} else {
|
651 |
+
$slt = ( $inInSite == $value ? "selected" : null );
|
652 |
+
$html .= "<option value='$inInSite' $slt> $inInSite</option>";
|
653 |
+
}
|
654 |
+
}
|
655 |
+
} else {
|
656 |
+
$slt = ( $inSite == $value ? "selected" : null );
|
657 |
+
$html .= "<option value='$inSite' $slt> $inSite</option>";
|
658 |
+
}
|
659 |
+
}
|
660 |
+
} else {
|
661 |
+
$slt = ( $site == $value ? "selected" : null );
|
662 |
+
$html .= "<option value='$site' $slt>$site</option>";
|
663 |
+
}
|
664 |
+
}
|
665 |
+
$html .= "</select>";
|
666 |
+
break;
|
667 |
default:
|
668 |
$html .= "<input id='{$id}' type='{$data['type']}' value='" . esc_attr( $value ) . "' name='$name' />";
|
669 |
break;
|
988 |
'ratingValue' => array(
|
989 |
'title' => 'Ratting value',
|
990 |
'type' => 'number',
|
991 |
+
'attr' => 'step="any"',
|
992 |
'desc' => "Rating value. (1 , 2.5, 3, 5 etc)"
|
993 |
),
|
994 |
'reviewCount' => array(
|
1250 |
),
|
1251 |
'schema_type' => array(
|
1252 |
'title' => 'Schema type',
|
1253 |
+
'type' => 'schema_type',
|
1254 |
'required' => true,
|
1255 |
'options' => $this->site_type(),
|
1256 |
'empty' => "Select one",
|
1292 |
'ratingCount' => array(
|
1293 |
'title' => 'Rating Count',
|
1294 |
'type' => 'number',
|
1295 |
+
'attr' => 'step="any"',
|
1296 |
'required' => true,
|
1297 |
'desc' => "The total number of ratings for the item on your site. <span class='required'>* At least one of ratingCount or reviewCount is required.</span>"
|
1298 |
),
|
1299 |
'reviewCount' => array(
|
1300 |
'title' => 'Review Count',
|
1301 |
'type' => 'number',
|
1302 |
+
'attr' => 'step="any"',
|
1303 |
'required' => true,
|
1304 |
'desc' => "Specifies the number of people who provided a review with or without an accompanying rating. At least one of ratingCount or reviewCount is required."
|
1305 |
),
|
1306 |
'ratingValue' => array(
|
1307 |
'title' => 'Rating Value',
|
1308 |
'type' => 'number',
|
1309 |
+
'attr' => 'step="any"',
|
1310 |
'required' => true,
|
1311 |
'desc' => "A numerical quality rating for the item."
|
1312 |
),
|
1313 |
'ratingValue' => array(
|
1314 |
'title' => 'Rating Value',
|
1315 |
+
'attr' => 'step="any"',
|
1316 |
'type' => 'number',
|
1317 |
'required' => true,
|
1318 |
'desc' => "A numerical quality rating for the item."
|
1320 |
'bestRating' => array(
|
1321 |
'title' => 'Best Rating',
|
1322 |
'type' => 'number',
|
1323 |
+
'attr' => 'step="any"',
|
1324 |
'required' => true,
|
1325 |
'desc' => "The highest value allowed in this rating system. <span class='required'>* Required if the rating system is not a 5-point scale.</span> If bestRating is omitted, 5 is assumed."
|
1326 |
),
|
1327 |
'worstRating' => array(
|
1328 |
'title' => 'Worst Rating',
|
1329 |
'type' => 'number',
|
1330 |
+
'attr' => 'step="any"',
|
1331 |
'required' => true,
|
1332 |
'desc' => "The lowest value allowed in this rating system. <span class='required'>* Required if the rating system is not a 5-point scale.</span> If worstRating is omitted, 1 is assumed."
|
1333 |
)
|
1450 |
function site_type() {
|
1451 |
return array(
|
1452 |
'Organization',
|
1453 |
+
'LocalBusiness' => array(
|
1454 |
+
'AnimalShelter',
|
1455 |
+
'AutomotiveBusiness' => array(
|
1456 |
+
'AutoBodyShop',
|
1457 |
+
'AutoDealer',
|
1458 |
+
'AutoPartsStore',
|
1459 |
+
'AutoRental',
|
1460 |
+
'AutoRepair',
|
1461 |
+
'AutoWash',
|
1462 |
+
'GasStation',
|
1463 |
+
'MotorcycleDealer',
|
1464 |
+
'MotorcycleRepair'
|
1465 |
+
),
|
1466 |
+
'ChildCare',
|
1467 |
+
'DryCleaningOrLaundry',
|
1468 |
+
'EmergencyService',
|
1469 |
+
'EmploymentAgency',
|
1470 |
+
'EntertainmentBusiness' => array(
|
1471 |
+
'AdultEntertainment',
|
1472 |
+
'AmusementPark',
|
1473 |
+
'ArtGallery',
|
1474 |
+
'Casino',
|
1475 |
+
'ComedyClub',
|
1476 |
+
'MovieTheater',
|
1477 |
+
'NightClub',
|
1478 |
+
|
1479 |
+
),
|
1480 |
+
'FinancialService' => array(
|
1481 |
+
'AccountingService',
|
1482 |
+
'AutomatedTeller',
|
1483 |
+
'BankOrCreditUnion',
|
1484 |
+
'InsuranceAgency',
|
1485 |
+
),
|
1486 |
+
'FoodEstablishment' => array(
|
1487 |
+
'Bakery',
|
1488 |
+
'BarOrPub',
|
1489 |
+
'Brewery',
|
1490 |
+
'CafeOrCoffeeShop',
|
1491 |
+
'FastFoodRestaurant',
|
1492 |
+
'IceCreamShop',
|
1493 |
+
'Restaurant',
|
1494 |
+
'Winery',
|
1495 |
+
),
|
1496 |
+
'GovernmentOffice',
|
1497 |
+
'HealthAndBeautyBusiness' => array(
|
1498 |
+
'BeautySalon',
|
1499 |
+
'DaySpa',
|
1500 |
+
'HairSalon',
|
1501 |
+
'HealthClub',
|
1502 |
+
'NailSalon',
|
1503 |
+
'TattooParlor',
|
1504 |
+
),
|
1505 |
+
'HomeAndConstructionBusiness' => array(
|
1506 |
+
'Electrician',
|
1507 |
+
'GeneralContractor',
|
1508 |
+
'HVACBusiness',
|
1509 |
+
'HousePainter',
|
1510 |
+
'Locksmith',
|
1511 |
+
'MovingCompany',
|
1512 |
+
'Plumber',
|
1513 |
+
'RoofingContractor',
|
1514 |
+
),
|
1515 |
+
'InternetCafe',
|
1516 |
+
'LegalService' => array(
|
1517 |
+
'Attorney',
|
1518 |
+
'Notary',
|
1519 |
+
),
|
1520 |
+
'Library',
|
1521 |
+
'MedicalBusiness' => array(
|
1522 |
+
'CommunityHealth',
|
1523 |
+
'Dentist',
|
1524 |
+
'Dermatology',
|
1525 |
+
'DietNutrition',
|
1526 |
+
'Emergency',
|
1527 |
+
'Geriatric',
|
1528 |
+
'Gynecologic',
|
1529 |
+
'MedicalClinic',
|
1530 |
+
'Midwifery',
|
1531 |
+
'Nursing',
|
1532 |
+
'Obstetric',
|
1533 |
+
'Oncologic',
|
1534 |
+
'Optician',
|
1535 |
+
'Optometric',
|
1536 |
+
'Otolaryngologic',
|
1537 |
+
'Pediatric',
|
1538 |
+
'Pharmacy',
|
1539 |
+
'Physician',
|
1540 |
+
'Physiotherapy',
|
1541 |
+
'PlasticSurgery',
|
1542 |
+
'Podiatric',
|
1543 |
+
'PrimaryCare',
|
1544 |
+
'Psychiatric',
|
1545 |
+
'PublicHealth',
|
1546 |
+
),
|
1547 |
+
'LodgingBusiness' => array(
|
1548 |
+
'BedAndBreakfast',
|
1549 |
+
'Campground',
|
1550 |
+
'Hostel',
|
1551 |
+
'Hotel',
|
1552 |
+
'Motel',
|
1553 |
+
'Resort',
|
1554 |
+
),
|
1555 |
+
'ProfessionalService',
|
1556 |
+
'RadioStation',
|
1557 |
+
'RealEstateAgent',
|
1558 |
+
'RecyclingCenter',
|
1559 |
+
'SelfStorage',
|
1560 |
+
'ShoppingCenter',
|
1561 |
+
'SportsActivityLocation' => array(
|
1562 |
+
'BowlingAlley',
|
1563 |
+
'ExerciseGym',
|
1564 |
+
'GolfCourse',
|
1565 |
+
'HealthClub',
|
1566 |
+
'PublicSwimmingPool',
|
1567 |
+
'SkiResort',
|
1568 |
+
'SportsClub',
|
1569 |
+
'StadiumOrArena',
|
1570 |
+
'TennisComplex',
|
1571 |
+
),
|
1572 |
+
'Store' => array(
|
1573 |
+
'AutoPartsStore',
|
1574 |
+
'BikeStore',
|
1575 |
+
'BookStore',
|
1576 |
+
'ClothingStore',
|
1577 |
+
'ComputerStore',
|
1578 |
+
'ConvenienceStore',
|
1579 |
+
'DepartmentStore',
|
1580 |
+
'ElectronicsStore',
|
1581 |
+
'Florist',
|
1582 |
+
'FurnitureStore',
|
1583 |
+
'GardenStore',
|
1584 |
+
'GroceryStore',
|
1585 |
+
'HardwareStore',
|
1586 |
+
'HobbyShop',
|
1587 |
+
'HomeGoodsStore',
|
1588 |
+
'JewelryStore',
|
1589 |
+
'LiquorStore',
|
1590 |
+
'MensClothingStore',
|
1591 |
+
'MobilePhoneStore',
|
1592 |
+
'MovieRentalStore',
|
1593 |
+
'MusicStore',
|
1594 |
+
'OfficeEquipmentStore',
|
1595 |
+
'OutletStore',
|
1596 |
+
'PawnShop',
|
1597 |
+
'PetStore',
|
1598 |
+
'ShoeStore',
|
1599 |
+
'SportingGoodsStore',
|
1600 |
+
'TireShop',
|
1601 |
+
'ToyStore',
|
1602 |
+
'WholesaleStore'
|
1603 |
+
),
|
1604 |
+
'TelevisionStation',
|
1605 |
+
'TouristInformationCenter',
|
1606 |
+
'TravelAgency'
|
1607 |
+
)
|
1608 |
);
|
1609 |
}
|
1610 |
|
lib/views/schema-options.php
CHANGED
@@ -4,487 +4,546 @@ $settings = get_option( $KcSeoWPSchema->options['settings'] );
|
|
4 |
$schemaModel = new KcSeoSchemaModel;
|
5 |
?>
|
6 |
<div class="wrap">
|
7 |
-
<div id="upf-icon-edit-pages" class="icon32 icon32-posts-page"><br/></div>
|
8 |
<h2><?php _e( 'WP SEO Structured Data Schema', KCSEO_WP_SCHEMA_SLUG ); ?></h2>
|
9 |
-
<form id="kcseo-option-settings">
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
<table width="40%" cellpadding="10" class="form-table">
|
15 |
-
<tr class="default">
|
16 |
-
<th>Website Url <span class="required">*</span></th>
|
17 |
-
<td align="left" scope="row">
|
18 |
-
<div class="with-tooltip">
|
19 |
-
<input type="text" class="regular-text" name="web_url"
|
20 |
-
value="<?php echo( ! empty( $settings['web_url'] ) ? esc_attr( $settings['web_url'] ) : get_home_url() ); ?>"/>
|
21 |
-
<div class="schema-tooltip-holder">
|
22 |
-
<span class="schema-tooltip"></span>
|
23 |
-
<div class="hidden">
|
24 |
-
<p><b>Tip:</b> For more detailed information on how to configure this plugin, please
|
25 |
-
visit:
|
26 |
-
<a href="http://kcseopro.com/wordpress-seo-structured-data-schema-plugin/">http://kcseopro.com/wordpress-seo-structured-data-schema-plugin/</a>
|
27 |
-
</p>
|
28 |
-
</div>
|
29 |
-
</div>
|
30 |
-
</div>
|
31 |
-
</td>
|
32 |
-
</tr>
|
33 |
-
<tr class="default">
|
34 |
-
<th>Type</th>
|
35 |
-
<td align="left" scope="row">
|
36 |
-
<select id="site_type" name="site_type" class="select2">
|
37 |
-
<option value="">Select one type</option>
|
38 |
-
<?php
|
39 |
-
$siteType = ! empty( $settings['site_type'] ) ? $settings['site_type'] : null;
|
40 |
-
foreach ( $schemaModel->site_type() as $site ) {
|
41 |
-
$slt = ( $site == $siteType ? "selected" : null );
|
42 |
-
echo "<option value='$site' $slt>$site</option>";
|
43 |
-
}
|
44 |
-
?>
|
45 |
-
</select>
|
46 |
-
</td>
|
47 |
-
</tr>
|
48 |
-
<tr class="default">
|
49 |
-
<th>Organization or Business name</th>
|
50 |
-
<td align="left" scope="row">
|
51 |
-
<input type="text" class="regular-text" name="type_name"
|
52 |
-
value="<?php echo( ! empty( $settings['type_name'] ) ? $settings['type_name'] : null ); ?>"/>
|
53 |
-
</td>
|
54 |
-
</tr>
|
55 |
-
<tr class="default all-type-data">
|
56 |
-
<th>Site Image <span class="required">*</span></th>
|
57 |
-
<td align="left" scope="row">
|
58 |
-
<div class="kSeo-image">
|
59 |
-
<div class="kSeo-image-wrapper">
|
60 |
-
<?php
|
61 |
-
$siteImageId = ! empty( $settings['site_image'] ) ? absint( $settings['site_image'] ) : 0;
|
62 |
-
$siteImage = $ingInfo = null;
|
63 |
-
if ( $siteImageId ) {
|
64 |
-
$siteImage = wp_get_attachment_image( $siteImageId, "thumbnail" );
|
65 |
-
$imgData = $KcSeoWPSchema->imageInfo( $siteImageId );
|
66 |
-
$ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
|
67 |
-
$ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
|
68 |
-
$ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
|
69 |
-
}
|
70 |
-
?>
|
71 |
-
<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
|
72 |
-
<span class="kSeoImgRemove <?php echo( $siteImageId ? null : "kSeo-hidden" ); ?>"><span
|
73 |
-
class="dashicons dashicons-trash"></span></span>
|
74 |
-
<div class="kSeo-image-preview"><?php echo $siteImage; ?></div>
|
75 |
-
<input type="hidden" name="site_image" value="<?php echo $siteImageId; ?>"/>
|
76 |
-
</div>
|
77 |
-
<div class='image-info'><?php echo $ingInfo; ?></div>
|
78 |
-
</div>
|
79 |
-
</td>
|
80 |
-
</tr>
|
81 |
-
<tr class="default all-type-data">
|
82 |
-
<th>Price Range <span class="required">*</span></th>
|
83 |
-
<td align="left" scope="row">
|
84 |
-
<input type="text" class="regular-text" name="site_price_range"
|
85 |
-
value="<?php echo( ! empty( $settings['site_price_range'] ) ? $settings['site_price_range'] : null ); ?>"/>
|
86 |
-
<div class="description">The price range of the business, for example $$$.</div>
|
87 |
-
</td>
|
88 |
-
</tr>
|
89 |
-
<tr class="default all-type-data">
|
90 |
-
<th>Site Telephone <span class="required">*</span></th>
|
91 |
-
<td align="left" scope="row">
|
92 |
-
<input type="text" class="regular-text" name="site_telephone"
|
93 |
-
value="<?php echo( ! empty( $settings['site_telephone'] ) ? $settings['site_telephone'] : null ); ?>"/>
|
94 |
-
<div class="description">The telephone number.</div>
|
95 |
-
</td>
|
96 |
-
</tr>
|
97 |
-
<tr class="default">
|
98 |
-
<th>Additional Type</th>
|
99 |
-
<td align="left" scope="row">
|
100 |
-
<div class="with-tooltip">
|
101 |
-
<textarea name="additionalType"
|
102 |
-
placeholder="http://example1.com http://example2.com http://example3.com"
|
103 |
-
rows="6" cols="50"
|
104 |
-
class="additional-type"><?php echo( ! empty( $settings['additionalType'] ) ? esc_attr( @$settings['additionalType'] ) : null ); ?></textarea>
|
105 |
-
<p class="description">Add "Additional Type" URL(s) by separate ideas</p>
|
106 |
-
<div class="schema-tooltip-holder">
|
107 |
-
<span class="schema-tooltip"></span>
|
108 |
-
<div class="hidden">
|
109 |
-
<p><b>Tip:</b> Product Ontology is an extension to schema using WikiPedia
|
110 |
-
definitions that enables you to further define a type by adding an
|
111 |
-
“AdditionalType” attribute.Example for a Tailor (which is not available as a
|
112 |
-
schema “Type”): Pick LocalBusiness as a generic Type, then add additional type
|
113 |
-
as follows:
|
114 |
-
<a href="https://en.wikipedia.org/wiki/Tailor">https://en.wikipedia.org/wiki/<span>Tailor</span></a>
|
115 |
-
Change to this format and enter in Additional Type field:
|
116 |
-
<a href="http://www.productontology.org/id/Tailor">http://www.productontology.org/id/<span>Tailor</span></a>
|
117 |
-
For more info visit:<a href="http://kcseopro.com/product-ontology-schema/">http://kcseopro.com/product-ontology-schema/</a>
|
118 |
-
</p>
|
119 |
-
</div>
|
120 |
-
</div>
|
121 |
-
</div>
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
</p>
|
155 |
-
</div>
|
156 |
-
</div>
|
157 |
-
</td>
|
158 |
-
</tr>
|
159 |
-
<tr class="default business-info">
|
160 |
-
<th style="font-size: 16px;">GeoCoordinates</th>
|
161 |
-
</tr>
|
162 |
-
<tr class="default business-info">
|
163 |
-
<th style="text-align: right">Longitude</th>
|
164 |
-
<td align="left" scope="row">
|
165 |
-
<input type="text" class="regular-text" name="business_info[longitude]"
|
166 |
-
value="<?php echo( ! empty( $settings['business_info']['longitude'] ) ? esc_attr( $settings['business_info']['longitude'] ) : null ); ?>"/>
|
167 |
-
</td>
|
168 |
-
</tr>
|
169 |
-
<tr class="default business-info">
|
170 |
-
<th style="text-align: right">Latitude</th>
|
171 |
-
<td align="left" scope="row">
|
172 |
-
<input type="text" class="regular-text" name="business_info[latitude]"
|
173 |
-
value="<?php echo( ! empty( $settings['business_info']['latitude'] ) ? esc_attr( $settings['business_info']['latitude'] ) : null ); ?>"/>
|
174 |
-
</td>
|
175 |
-
</tr>
|
176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
value="<?php echo( ! empty( $settings['person']['name'] ) ? esc_attr( $settings['person']['name'] ) : null ); ?>"/>
|
186 |
-
</td>
|
187 |
-
</tr>
|
188 |
-
<tr class="default person">
|
189 |
-
<th>Work For</th>
|
190 |
-
<td align="left" scope="row">
|
191 |
-
<input type="text" class="regular-text" name="person[worksFor]"
|
192 |
-
value="<?php echo( ! empty( $settings['person']['worksFor'] ) ? esc_attr( $settings['person']['worksFor'] ) : null ); ?>"/>
|
193 |
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
<th style="font-size: 18px; padding: 30px 0 5px;">Address</th>
|
229 |
-
</tr>
|
230 |
-
<tr class="default">
|
231 |
-
<th>Address Country</th>
|
232 |
-
<td align="left" scope="row">
|
233 |
-
<select class="select2" name="address[country]">
|
234 |
-
<option value="">Select a country</option>
|
235 |
-
<?php
|
236 |
-
$aCountry = ! empty( $settings['address']['country'] ) ? $settings['address']['country'] : null;
|
237 |
-
foreach ( $schemaModel->countryList() as $country ) {
|
238 |
-
$slt = ( $country == $aCountry ? "selected" : null );
|
239 |
-
echo "<option value='$country' $slt>$country</option>";
|
240 |
-
}
|
241 |
-
?>
|
242 |
-
</select>
|
243 |
-
</td>
|
244 |
-
</tr>
|
245 |
-
<tr class="default">
|
246 |
-
<th>Address Locality</th>
|
247 |
-
<td align="left" scope="row">
|
248 |
-
<input type="text" class="regular-text" name="address[locality]"
|
249 |
-
value="<?php echo( ! empty( $settings['address']['locality'] ) ? esc_attr( $settings['address']['locality'] ) : null ); ?>"/>
|
250 |
-
<p class="description">City (i.e Kansas city)</p>
|
251 |
-
</tr>
|
252 |
-
<tr class="default">
|
253 |
-
<th>Address Region</th>
|
254 |
-
<td align="left" scope="row">
|
255 |
-
<input type="text" class="regular-text" name="address[region]"
|
256 |
-
value="<?php echo( ! empty( $settings['address']['region'] ) ? esc_attr( $settings['address']['region'] ) : null ); ?>"/>
|
257 |
-
<p class="description">State (i.e. MO)</p>
|
258 |
-
</tr>
|
259 |
-
<tr class="default">
|
260 |
-
<th>Postal Code</th>
|
261 |
-
<td align="left" scope="row">
|
262 |
-
<input type="text" class="regular-text" name="address[postalcode]"
|
263 |
-
value="<?php echo( ! empty( $settings['address']['postalcode'] ) ? esc_attr( $settings['address']['postalcode'] ) : null ); ?>"/>
|
264 |
-
</tr>
|
265 |
-
<tr class="default">
|
266 |
-
<th>Street Address</th>
|
267 |
-
<td align="left" scope="row">
|
268 |
-
<input type="text" class="regular-text" name="address[street]"
|
269 |
-
value="<?php echo( ! empty( $settings['address']['street'] ) ? esc_attr( $settings['address']['street'] ) : null ); ?>"/>
|
270 |
-
</tr>
|
271 |
-
</table>
|
272 |
-
</div>
|
273 |
-
<div id="tabs-kcseo-container" class="rt-tab-container">
|
274 |
-
<ul class="rt-tab-nav">
|
275 |
-
<li class="current"><a href="#tab-logo-url">Organization Logo</a></li>
|
276 |
-
<li><a href="#tab-social-profile">Social Profile</a></li>
|
277 |
-
<li><a href="#tab-corporate-contract">Corporate Contacts</a></li>
|
278 |
-
</ul>
|
279 |
-
<div id="tab-logo-url" class="rt-tab-content">
|
280 |
-
<table width="100%" cellpadding="10" class="form-table">
|
281 |
-
<tr class="field_logo">
|
282 |
-
<th>Select Organization Logo</th>
|
283 |
-
<td scope="row" style="position: relative">
|
284 |
-
<div class="kSeo-image">
|
285 |
-
<div class="kSeo-image-wrapper">
|
286 |
-
<?php
|
287 |
-
$organizationLogoId = ! empty( $settings['organization_logo'] ) ? absint( $settings['organization_logo'] ) : null;
|
288 |
-
$organizeImage = $imgInfo = null;
|
289 |
-
if ( $organizationLogoId ) {
|
290 |
-
$organizeImage = wp_get_attachment_image( $organizationLogoId, "thumbnail" );
|
291 |
-
$imgData = $KcSeoWPSchema->imageInfo( $organizationLogoId );
|
292 |
-
$imgInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
|
293 |
-
$imgInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
|
294 |
-
$imgInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
|
295 |
-
}
|
296 |
-
?>
|
297 |
-
<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
|
298 |
-
<span
|
299 |
-
class="kSeoImgRemove <?php echo( $organizationLogoId ? null : "kSeo-hidden" ); ?>"><span
|
300 |
-
class="dashicons dashicons-trash"></span></span>
|
301 |
-
<div class="kSeo-image-preview"><?php echo $organizeImage; ?></div>
|
302 |
-
<input type="hidden" name="organization_logo" value="<?php echo $organizationLogoId; ?>"/>
|
303 |
-
</div>
|
304 |
-
<div class='image-info'><?php echo $imgInfo; ?></div>
|
305 |
-
</div>
|
306 |
-
<div class="schema-tooltip-holder" style="left: 200px">
|
307 |
-
<span class="schema-tooltip"></span>
|
308 |
-
<div class="hidden">
|
309 |
-
<p><b>Tip:</b> For some Rich Snippets that use the image property, no dimensions are specified, For other Rich Snippets that use the image property, Google specifies at least 160x90 pixels and at most 1920x1080 pixels. For Google Search, the documentation for their Rich Snippets is at
|
310 |
-
<a href="https://developers.google.com/structured-data/rich-snippets/.">https://developers.google.com/structured-data/rich-snippets/.</a>
|
311 |
-
</p>
|
312 |
-
</div>
|
313 |
-
</div>
|
314 |
-
</td>
|
315 |
-
</tr>
|
316 |
-
</table>
|
317 |
-
</div>
|
318 |
-
<div id="tab-social-profile" class="rt-tab-content">
|
319 |
-
<table width="100%" cellpadding="10" class="form-table">
|
320 |
-
<tr class="field_social">
|
321 |
-
<th>Company Name</th>
|
322 |
-
<td align="left" scope="row">
|
323 |
-
<input type="text" class="regular-text" name="social_company_name"
|
324 |
-
value="<?php echo( ! empty( $settings['social_company_name'] ) ? esc_attr( $settings['social_company_name'] ) : null ); ?>"/>
|
325 |
-
</td>
|
326 |
-
</tr>
|
327 |
-
<tr class="field_social_title">
|
328 |
-
<th style="font-size: 18px; padding: 10px 0;">Social Profiles</th>
|
329 |
-
</tr>
|
330 |
-
<tr class="social_field_link">
|
331 |
-
<th>Social Profile</th>
|
332 |
-
<th>
|
333 |
-
<div id="social-field-holder">
|
334 |
-
<?php
|
335 |
-
$socialP = ( ! empty( $settings['social'] ) ? $settings['social'] : array() );
|
336 |
-
if ( is_array( $socialP ) && ! empty( $socialP ) ) {
|
337 |
-
$html = null;
|
338 |
-
$i = 0;
|
339 |
-
foreach ( $socialP as $socialD ) {
|
340 |
-
$html .= "<div class='sfield'>";
|
341 |
-
$html .= "<select name='social[$i][id]'>";
|
342 |
-
foreach ( $schemaModel->socialList() as $sId => $social ) {
|
343 |
-
$slt = ( $sId == $socialD['id'] ? "selected" : null );
|
344 |
-
$html .= "<option value='$sId' $slt>$social</option>";
|
345 |
-
}
|
346 |
-
$html .= "</select>";
|
347 |
-
$html .= "<input type='text' name='social[$i][link]' value='{$socialD['link']}'>";
|
348 |
-
$html .= '<span class="dashicons dashicons-trash social-remove"></span>';
|
349 |
-
$html .= "</div>";
|
350 |
-
$i ++;
|
351 |
-
}
|
352 |
-
echo $html;
|
353 |
-
}
|
354 |
-
?>
|
355 |
-
</div>
|
356 |
-
<a class="button button-primary add-new" id="social-add">Add Social Profile</a>
|
357 |
-
</th>
|
358 |
-
</tr>
|
359 |
-
</table>
|
360 |
-
</div>
|
361 |
-
<div id="tab-corporate-contract" class="rt-tab-content">
|
362 |
-
<table width="100%" cellpadding="10" class="form-table">
|
363 |
-
<tr class="field_contact">
|
364 |
-
<th style="font-size: 18px; padding: 10px 0;">Contacts</th>
|
365 |
-
</tr>
|
366 |
-
<tr class="field_contact">
|
367 |
-
<th>Contact Type</th>
|
368 |
-
<td scope="row">
|
369 |
-
<select name="contact[contactType]" class="select2" style="width: 200px">
|
370 |
-
<?php
|
371 |
-
$contactType = ! empty( $settings['contact']['contactType'] ) ? $settings['contact']['contactType'] : null;
|
372 |
-
foreach ( $schemaModel->contactType() as $cType ) {
|
373 |
-
$slt = ( $cType == $contactType ? "selected" : null );
|
374 |
-
echo "<option value='$cType' $slt>$cType</option>";
|
375 |
-
}
|
376 |
-
|
377 |
-
?>
|
378 |
-
</select>
|
379 |
-
</td>
|
380 |
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
|
487 |
-
|
488 |
-
|
489 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
</div>
|
4 |
$schemaModel = new KcSeoSchemaModel;
|
5 |
?>
|
6 |
<div class="wrap">
|
|
|
7 |
<h2><?php _e( 'WP SEO Structured Data Schema', KCSEO_WP_SCHEMA_SLUG ); ?></h2>
|
|
|
8 |
|
9 |
+
<div id="kcseo-settings">
|
10 |
+
<div id="kcseo-options">
|
11 |
+
<form id="kcseo-option-settings">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
<h3><?php _e( 'General settings for WP SEO Structured Data Schema by <a href="https://wpsemplugins.com/">WPSEMPlugins.com</a>',
|
14 |
+
KCSEO_WP_SCHEMA_SLUG ); ?></h3>
|
15 |
+
<div class="setting-holder">
|
16 |
+
<table width="40%" cellpadding="10" class="form-table">
|
17 |
+
<tr class="default">
|
18 |
+
<th>Website Url <span class="required">*</span></th>
|
19 |
+
<td align="left" scope="row">
|
20 |
+
<div class="with-tooltip">
|
21 |
+
<input type="text" class="regular-text" name="web_url"
|
22 |
+
value="<?php echo( ! empty( $settings['web_url'] ) ? esc_attr( $settings['web_url'] ) : get_home_url() ); ?>"/>
|
23 |
+
<div class="schema-tooltip-holder">
|
24 |
+
<span class="schema-tooltip"></span>
|
25 |
+
<div class="hidden">
|
26 |
+
<p><b>Tip:</b> For more detailed information on how to configure this plugin, please
|
27 |
+
visit:
|
28 |
+
<a href="https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/">https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/</a>
|
29 |
+
</p>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
<tr class="default">
|
36 |
+
<th>Type</th>site_type
|
37 |
+
<td align="left" scope="row">
|
38 |
+
<select id="site_type" name="site_type" class="select2">
|
39 |
+
<option value="">Select one type</option>
|
40 |
+
<?php
|
41 |
+
$siteType = ! empty( $settings['site_type'] ) ? $settings['site_type'] : null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
+
foreach ( $schemaModel->site_type() as $key => $site ) {
|
44 |
+
if(is_array($site)){
|
45 |
+
$slt = ( $key == $siteType ? "selected" : null );
|
46 |
+
echo "<option value='$key' $slt> $key</option>";
|
47 |
+
foreach ($site as $inKey => $inSite){
|
48 |
+
if(is_array($inSite)){
|
49 |
+
$slt = ( $inKey == $siteType ? "selected" : null );
|
50 |
+
echo "<option value='$inKey' $slt> $inKey</option>";
|
51 |
+
foreach ($inSite as $inInKey => $inInSite){
|
52 |
+
if(is_array($inInSite)) {
|
53 |
+
$slt = ( $inInKey == $siteType ? "selected" : null );
|
54 |
+
echo "<option value='$inInKey' $slt> $inInKey</option>";
|
55 |
+
foreach ($inInSite as $iSite){
|
56 |
+
$slt = ( $iSite == $siteType ? "selected" : null );
|
57 |
+
echo "<option value='$iSite' $slt> $iSite</option>";
|
58 |
+
}
|
59 |
+
}else{
|
60 |
+
$slt = ( $inInSite == $siteType ? "selected" : null );
|
61 |
+
echo "<option value='$inInSite' $slt> $inInSite</option>";
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}else{
|
65 |
+
$slt = ( $inSite == $siteType ? "selected" : null );
|
66 |
+
echo "<option value='$inSite' $slt> $inSite</option>";
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}else {
|
70 |
+
$slt = ( $site == $siteType ? "selected" : null );
|
71 |
+
echo "<option value='$site' $slt>$site</option>";
|
72 |
+
}
|
73 |
+
}
|
74 |
+
?>
|
75 |
+
</select>
|
76 |
+
</td>
|
77 |
+
</tr>
|
78 |
+
<tr class="default">
|
79 |
+
<th>Organization or Business name</th>
|
80 |
+
<td align="left" scope="row">
|
81 |
+
<input type="text" class="regular-text" name="type_name"
|
82 |
+
value="<?php echo( ! empty( $settings['type_name'] ) ? $settings['type_name'] : null ); ?>"/>
|
83 |
+
</td>
|
84 |
+
</tr>
|
85 |
+
<tr class="default all-type-data">
|
86 |
+
<th>Site Image <span class="required">*</span></th>
|
87 |
+
<td align="left" scope="row">
|
88 |
+
<div class="kSeo-image">
|
89 |
+
<div class="kSeo-image-wrapper">
|
90 |
+
<?php
|
91 |
+
$siteImageId = ! empty( $settings['site_image'] ) ? absint( $settings['site_image'] ) : 0;
|
92 |
+
$siteImage = $ingInfo = null;
|
93 |
+
if ( $siteImageId ) {
|
94 |
+
$siteImage = wp_get_attachment_image( $siteImageId, "thumbnail" );
|
95 |
+
$imgData = $KcSeoWPSchema->imageInfo( $siteImageId );
|
96 |
+
$ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
|
97 |
+
$ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
|
98 |
+
$ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
|
99 |
+
}
|
100 |
+
?>
|
101 |
+
<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
|
102 |
+
<span class="kSeoImgRemove <?php echo( $siteImageId ? null : "kSeo-hidden" ); ?>"><span
|
103 |
+
class="dashicons dashicons-trash"></span></span>
|
104 |
+
<div class="kSeo-image-preview"><?php echo $siteImage; ?></div>
|
105 |
+
<input type="hidden" name="site_image" value="<?php echo $siteImageId; ?>"/>
|
106 |
+
</div>
|
107 |
+
<div class='image-info'><?php echo $ingInfo; ?></div>
|
108 |
+
</div>
|
109 |
+
</td>
|
110 |
+
</tr>
|
111 |
+
<tr class="default all-type-data">
|
112 |
+
<th>Price Range <span class="required">*</span></th>
|
113 |
+
<td align="left" scope="row">
|
114 |
+
<input type="text" class="regular-text" name="site_price_range"
|
115 |
+
value="<?php echo( ! empty( $settings['site_price_range'] ) ? $settings['site_price_range'] : null ); ?>"/>
|
116 |
+
<div class="description">The price range of the business, for example $$$.</div>
|
117 |
+
</td>
|
118 |
+
</tr>
|
119 |
+
<tr class="default all-type-data">
|
120 |
+
<th>Site Telephone <span class="required">*</span></th>
|
121 |
+
<td align="left" scope="row">
|
122 |
+
<input type="text" class="regular-text" name="site_telephone"
|
123 |
+
value="<?php echo( ! empty( $settings['site_telephone'] ) ? $settings['site_telephone'] : null ); ?>"/>
|
124 |
+
<div class="description">The telephone number.</div>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
+
<tr class="default">
|
128 |
+
<th>Additional Type</th>
|
129 |
+
<td align="left" scope="row">
|
130 |
+
<div class="with-tooltip">
|
131 |
+
<textarea name="additionalType"
|
132 |
+
placeholder="http://example1.com http://example2.com http://example3.com"
|
133 |
+
rows="6" cols="50"
|
134 |
+
class="additional-type"><?php echo( ! empty( $settings['additionalType'] ) ? esc_attr( @$settings['additionalType'] ) : null ); ?></textarea>
|
135 |
+
<p class="description">Add "Additional Type" URL(s) by separate ideas</p>
|
136 |
+
<div class="schema-tooltip-holder">
|
137 |
+
<span class="schema-tooltip"></span>
|
138 |
+
<div class="hidden">
|
139 |
+
<p><b>Tip:</b> Product Ontology is an extension to schema using WikiPedia
|
140 |
+
definitions that enables you to further define a type by adding an
|
141 |
+
“AdditionalType” attribute.Example for a Tailor (which is not available as a
|
142 |
+
schema “Type”): Pick LocalBusiness as a generic Type, then add additional type
|
143 |
+
as follows:
|
144 |
+
<a href="https://en.wikipedia.org/wiki/Tailor">https://en.wikipedia.org/wiki/<span>Tailor</span></a>
|
145 |
+
Change to this format and enter in Additional Type field:
|
146 |
+
<a href="http://www.productontology.org/id/Tailor">http://www.productontology.org/id/<span>Tailor</span></a>
|
147 |
+
For more info visit:<a href="https://wpsemplugins.com/product-ontology-schema/">https://wpsemplugins.com/product-ontology-schema/</a>
|
148 |
+
</p>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
</td>
|
153 |
+
</tr>
|
154 |
+
<tr class="default restaurant">
|
155 |
+
<th style="font-size: 18px; padding: 30px 0 5px;">Restaurant Information</th>
|
156 |
+
</tr>
|
157 |
+
<tr class="default restaurant">
|
158 |
+
<th>The cuisine of the restaurant. <span class="required">*</span></th>
|
159 |
+
<td align="left" scope="row">
|
160 |
+
<textarea cols="50" rows="6"
|
161 |
+
name="restaurant[servesCuisine]"><?php echo( ! empty( $settings['restaurant']['servesCuisine'] ) ? esc_attr( $settings['restaurant']['servesCuisine'] ) : null ); ?></textarea>
|
162 |
+
</td>
|
163 |
+
</tr>
|
164 |
+
<tr class="default business-info">
|
165 |
+
<th style="font-size: 18px; padding: 30px 0 5px;">Others local business info</th>
|
166 |
+
</tr>
|
167 |
+
<tr class="default business-info">
|
168 |
+
<th>Description</th>
|
169 |
+
<td align="left" scope="row">
|
170 |
+
<textarea cols="50" rows="6"
|
171 |
+
name="business_info[description]"><?php echo( ! empty( $settings['business_info']['description'] ) ? esc_attr( $settings['business_info']['description'] ) : null ); ?></textarea>
|
172 |
+
</td>
|
173 |
+
</tr>
|
174 |
+
<tr class="default business-info">
|
175 |
+
<th>Operation Hours</th>
|
176 |
+
<td align="left" scope="row">
|
177 |
+
<div class="with-tooltip">
|
178 |
+
<textarea name="business_info[openingHours]"
|
179 |
+
placeholder="Mo-Sa 11:00-14:30 Mo-Th 17:00-21:30 Fr-Sa 17:00-22:00"
|
180 |
+
rows="4" cols="50"
|
181 |
+
class="additional-type"><?php echo( ! empty( $settings['business_info']['openingHours'] ) ? esc_attr( $settings['business_info']['openingHours'] ) : null ); ?></textarea>
|
182 |
+
<p class="description">- Days are specified using the following two-letter combinations: Mo,
|
183 |
+
Tu, We, Th, Fr, Sa, Su.</br>
|
184 |
+
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00. <br>
|
185 |
+
- Add Opening Hours by separate line</p>
|
186 |
+
<div class="schema-tooltip-holder">
|
187 |
+
<span class="schema-tooltip"></span>
|
188 |
+
<div class="hidden">
|
189 |
+
<p>
|
190 |
+
<b>Tip:</b> Once you save these structured data schema settings, validate your
|
191 |
+
home page url here:
|
192 |
+
<a href="https://developers.google.com/structured-data/testing-tool/">https://developers.google.com/structured-data/testing-tool/</a>
|
193 |
+
</p>
|
194 |
+
</div>
|
195 |
+
</div>
|
196 |
+
</td>
|
197 |
+
</tr>
|
198 |
+
<tr class="default business-info">
|
199 |
+
<th style="font-size: 16px;">GeoCoordinates</th>
|
200 |
+
</tr>
|
201 |
+
<tr class="default business-info">
|
202 |
+
<th style="text-align: right">Latitude</th>
|
203 |
+
<td align="left" scope="row">
|
204 |
+
<input type="text" class="regular-text" name="business_info[latitude]"
|
205 |
+
value="<?php echo( ! empty( $settings['business_info']['latitude'] ) ? esc_attr( $settings['business_info']['latitude'] ) : null ); ?>"/>
|
206 |
+
</td>
|
207 |
+
</tr>
|
208 |
+
<tr class="default business-info">
|
209 |
+
<th style="text-align: right">Longitude</th>
|
210 |
+
<td align="left" scope="row">
|
211 |
+
<input type="text" class="regular-text" name="business_info[longitude]"
|
212 |
+
value="<?php echo( ! empty( $settings['business_info']['longitude'] ) ? esc_attr( $settings['business_info']['longitude'] ) : null ); ?>"/>
|
213 |
+
</td>
|
214 |
+
</tr>
|
215 |
+
<tr class="default person">
|
216 |
+
<th style="font-size: 18px; padding: 30px 0 5px;">Person</th>
|
217 |
+
</tr>
|
218 |
+
<tr class="default person">
|
219 |
+
<th>Name</th>
|
220 |
+
<td align="left" scope="row">
|
221 |
+
<input type="text" class="regular-text" name="person[name]"
|
222 |
+
value="<?php echo( ! empty( $settings['person']['name'] ) ? esc_attr( $settings['person']['name'] ) : null ); ?>"/>
|
223 |
+
</td>
|
224 |
+
</tr>
|
225 |
+
<tr class="default person">
|
226 |
+
<th>Work For</th>
|
227 |
+
<td align="left" scope="row">
|
228 |
+
<input type="text" class="regular-text" name="person[worksFor]"
|
229 |
+
value="<?php echo( ! empty( $settings['person']['worksFor'] ) ? esc_attr( $settings['person']['worksFor'] ) : null ); ?>"/>
|
230 |
|
231 |
+
</td>
|
232 |
+
</tr>
|
233 |
+
<tr class="default person">
|
234 |
+
<th>Job Title</th>
|
235 |
+
<td align="left" scope="row">
|
236 |
+
<input type="text" class="regular-text" name="person[jobTitle]"
|
237 |
+
value="<?php echo( @$settings['person']['jobTitle'] ? @$settings['person']['jobTitle'] : null ); ?>"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
|
239 |
+
</td>
|
240 |
+
</tr>
|
241 |
+
<tr class="default person">
|
242 |
+
<th>Image</th>
|
243 |
+
<td align="left" scope="row">
|
244 |
+
<input type="text" class="regular-text" name="person[image]"
|
245 |
+
value="<?php echo( ! empty( $settings['person']['image'] ) ? esc_attr( $settings['person']['image'] ) : null ); ?>"/>
|
246 |
+
<p class="description">Add your personal photo here</p>
|
247 |
+
</td>
|
248 |
+
</tr>
|
249 |
+
<tr class="default person">
|
250 |
+
<th>Description</th>
|
251 |
+
<td align="left" scope="row">
|
252 |
+
<input type="text" class="regular-text" name="person[description]"
|
253 |
+
value="<?php echo( ! empty( $settings['person']['description'] ) ? esc_attr( $settings['person']['description'] ) : null ); ?>"/>
|
254 |
+
</td>
|
255 |
+
</tr>
|
256 |
+
<tr class="default person">
|
257 |
+
<th>Birth date</th>
|
258 |
+
<td align="left" scope="row">
|
259 |
+
<input type="text" class="regular-text kcseo-date" name="person[birthDate]"
|
260 |
+
value="<?php echo( ! empty( $settings['person']['birthDate'] ) ? esc_attr( $settings['person']['birthDate'] ) : null ); ?>"/>
|
261 |
|
262 |
+
</td>
|
263 |
+
</tr>
|
264 |
+
<tr class="default">
|
265 |
+
<th style="font-size: 18px; padding: 30px 0 5px;">Address</th>
|
266 |
+
</tr>
|
267 |
+
<tr class="default">
|
268 |
+
<th>Address Country</th>
|
269 |
+
<td align="left" scope="row">
|
270 |
+
<select class="select2" name="address[country]">
|
271 |
+
<option value="">Select a country</option>
|
272 |
+
<?php
|
273 |
+
$aCountry = ! empty( $settings['address']['country'] ) ? $settings['address']['country'] : null;
|
274 |
+
foreach ( $schemaModel->countryList() as $country ) {
|
275 |
+
$slt = ( $country == $aCountry ? "selected" : null );
|
276 |
+
echo "<option value='$country' $slt>$country</option>";
|
277 |
+
}
|
278 |
+
?>
|
279 |
+
</select>
|
280 |
+
</td>
|
281 |
+
</tr>
|
282 |
+
<tr class="default">
|
283 |
+
<th>Address Locality</th>
|
284 |
+
<td align="left" scope="row">
|
285 |
+
<input type="text" class="regular-text" name="address[locality]"
|
286 |
+
value="<?php echo( ! empty( $settings['address']['locality'] ) ? esc_attr( $settings['address']['locality'] ) : null ); ?>"/>
|
287 |
+
<p class="description">City (i.e Kansas city)</p>
|
288 |
+
</tr>
|
289 |
+
<tr class="default">
|
290 |
+
<th>Address Region</th>
|
291 |
+
<td align="left" scope="row">
|
292 |
+
<input type="text" class="regular-text" name="address[region]"
|
293 |
+
value="<?php echo( ! empty( $settings['address']['region'] ) ? esc_attr( $settings['address']['region'] ) : null ); ?>"/>
|
294 |
+
<p class="description">State (i.e. MO)</p>
|
295 |
+
</tr>
|
296 |
+
<tr class="default">
|
297 |
+
<th>Postal Code</th>
|
298 |
+
<td align="left" scope="row">
|
299 |
+
<input type="text" class="regular-text" name="address[postalcode]"
|
300 |
+
value="<?php echo( ! empty( $settings['address']['postalcode'] ) ? esc_attr( $settings['address']['postalcode'] ) : null ); ?>"/>
|
301 |
+
</tr>
|
302 |
+
<tr class="default">
|
303 |
+
<th>Street Address</th>
|
304 |
+
<td align="left" scope="row">
|
305 |
+
<input type="text" class="regular-text" name="address[street]"
|
306 |
+
value="<?php echo( ! empty( $settings['address']['street'] ) ? esc_attr( $settings['address']['street'] ) : null ); ?>"/>
|
307 |
+
</tr>
|
308 |
+
</table>
|
309 |
+
</div>
|
310 |
+
<div id="tabs-kcseo-container" class="rt-tab-container">
|
311 |
+
<ul class="rt-tab-nav">
|
312 |
+
<li class="current"><a href="#tab-logo-url">Organization Logo</a></li>
|
313 |
+
<li><a href="#tab-social-profile">Social Profile</a></li>
|
314 |
+
<li><a href="#tab-corporate-contract">Corporate Contacts</a></li>
|
315 |
+
</ul>
|
316 |
+
<div id="tab-logo-url" class="rt-tab-content">
|
317 |
+
<table width="100%" cellpadding="10" class="form-table">
|
318 |
+
<tr class="field_logo">
|
319 |
+
<th>Select Organization Logo</th>
|
320 |
+
<td scope="row" style="position: relative">
|
321 |
+
<div class="kSeo-image">
|
322 |
+
<div class="kSeo-image-wrapper">
|
323 |
+
<?php
|
324 |
+
$organizationLogoId = ! empty( $settings['organization_logo'] ) ? absint( $settings['organization_logo'] ) : null;
|
325 |
+
$organizeImage = $imgInfo = null;
|
326 |
+
if ( $organizationLogoId ) {
|
327 |
+
$organizeImage = wp_get_attachment_image( $organizationLogoId, "thumbnail" );
|
328 |
+
$imgData = $KcSeoWPSchema->imageInfo( $organizationLogoId );
|
329 |
+
$imgInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
|
330 |
+
$imgInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
|
331 |
+
$imgInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
|
332 |
+
}
|
333 |
+
?>
|
334 |
+
<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
|
335 |
+
<span
|
336 |
+
class="kSeoImgRemove <?php echo( $organizationLogoId ? null : "kSeo-hidden" ); ?>"><span
|
337 |
+
class="dashicons dashicons-trash"></span></span>
|
338 |
+
<div class="kSeo-image-preview"><?php echo $organizeImage; ?></div>
|
339 |
+
<input type="hidden" name="organization_logo" value="<?php echo $organizationLogoId; ?>"/>
|
340 |
+
</div>
|
341 |
+
<div class='image-info'><?php echo $imgInfo; ?></div>
|
342 |
+
</div>
|
343 |
+
<div class="schema-tooltip-holder" style="left: 200px">
|
344 |
+
<span class="schema-tooltip"></span>
|
345 |
+
<div class="hidden">
|
346 |
+
<p><b>Tip:</b> For some Rich Snippets that use the image property, no dimensions are specified, For other Rich Snippets that use the image property, Google specifies at least 160x90 pixels and at most 1920x1080 pixels. For Google Search, the documentation for their Rich Snippets is at
|
347 |
+
<a href="https://developers.google.com/structured-data/rich-snippets/.">https://developers.google.com/structured-data/rich-snippets/.</a>
|
348 |
+
</p>
|
349 |
+
</div>
|
350 |
+
</div>
|
351 |
+
</td>
|
352 |
+
</tr>
|
353 |
+
</table>
|
354 |
+
</div>
|
355 |
+
<div id="tab-social-profile" class="rt-tab-content">
|
356 |
+
<table width="100%" cellpadding="10" class="form-table">
|
357 |
+
<tr class="field_social">
|
358 |
+
<th>Company Name</th>
|
359 |
+
<td align="left" scope="row">
|
360 |
+
<input type="text" class="regular-text" name="social_company_name"
|
361 |
+
value="<?php echo( ! empty( $settings['social_company_name'] ) ? esc_attr( $settings['social_company_name'] ) : null ); ?>"/>
|
362 |
+
</td>
|
363 |
+
</tr>
|
364 |
+
<tr class="field_social_title">
|
365 |
+
<th style="font-size: 18px; padding: 10px 0;">Social Profiles</th>
|
366 |
+
</tr>
|
367 |
+
<tr class="social_field_link">
|
368 |
+
<th>Social Profile</th>
|
369 |
+
<th>
|
370 |
+
<div id="social-field-holder">
|
371 |
+
<?php
|
372 |
+
$socialP = ( ! empty( $settings['social'] ) ? $settings['social'] : array() );
|
373 |
+
if ( is_array( $socialP ) && ! empty( $socialP ) ) {
|
374 |
+
$html = null;
|
375 |
+
$i = 0;
|
376 |
+
foreach ( $socialP as $socialD ) {
|
377 |
+
$html .= "<div class='sfield'>";
|
378 |
+
$html .= "<select name='social[$i][id]'>";
|
379 |
+
foreach ( $schemaModel->socialList() as $sId => $social ) {
|
380 |
+
$slt = ( $sId == $socialD['id'] ? "selected" : null );
|
381 |
+
$html .= "<option value='$sId' $slt>$social</option>";
|
382 |
+
}
|
383 |
+
$html .= "</select>";
|
384 |
+
$html .= "<input type='text' name='social[$i][link]' value='{$socialD['link']}'>";
|
385 |
+
$html .= '<span class="dashicons dashicons-trash social-remove"></span>';
|
386 |
+
$html .= "</div>";
|
387 |
+
$i ++;
|
388 |
+
}
|
389 |
+
echo $html;
|
390 |
+
}
|
391 |
+
?>
|
392 |
+
</div>
|
393 |
+
<a class="button button-primary add-new" id="social-add">Add Social Profile</a>
|
394 |
+
</th>
|
395 |
+
</tr>
|
396 |
+
</table>
|
397 |
+
</div>
|
398 |
+
<div id="tab-corporate-contract" class="rt-tab-content">
|
399 |
+
<table width="100%" cellpadding="10" class="form-table">
|
400 |
+
<tr class="field_contact">
|
401 |
+
<th style="font-size: 18px; padding: 10px 0;">Contacts</th>
|
402 |
+
</tr>
|
403 |
+
<tr class="field_contact">
|
404 |
+
<th>Contact Type</th>
|
405 |
+
<td scope="row">
|
406 |
+
<select name="contact[contactType]" class="select2" style="width: 200px">
|
407 |
+
<?php
|
408 |
+
$contactType = ! empty( $settings['contact']['contactType'] ) ? $settings['contact']['contactType'] : null;
|
409 |
+
foreach ( $schemaModel->contactType() as $cType ) {
|
410 |
+
$slt = ( $cType == $contactType ? "selected" : null );
|
411 |
+
echo "<option value='$cType' $slt>$cType</option>";
|
412 |
+
}
|
413 |
|
414 |
+
?>
|
415 |
+
</select>
|
416 |
+
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
|
418 |
+
</tr>
|
419 |
+
<tr class="field_contact">
|
420 |
+
<th>Contact Phone</th>
|
421 |
+
<td align="left" scope="row">
|
422 |
+
<input type="text" class="regular-text" name="contact[telephone]"
|
423 |
+
value="<?php echo( ! empty( $settings['contact']['telephone'] ) ? esc_attr( $settings['contact']['telephone'] ) : null ); ?>"/>
|
424 |
+
<p class="description kco-telephone">Please follow the format below<span
|
425 |
+
style="font-size: 11px;">+1-505-998-3793</span><span style="font-size: 11px;">(425) 123-4567</span><span
|
426 |
+
style="font-size: 11px;">( 33 1) 42 68 53 01</span><span style="font-size: 11px;">+44-2078225951</span><span
|
427 |
+
style="font-size: 11px;">1 (855) 469-6378</span>
|
428 |
+
</p>
|
429 |
+
</td>
|
430 |
+
</tr>
|
431 |
+
<tr class="field_contact">
|
432 |
+
<th>Contact Email</th>
|
433 |
+
<td align="left" scope="row">
|
434 |
+
<input type="text" class="regular-text" name="contact[email]"
|
435 |
+
value="<?php echo( ! empty( $settings['contact']['email'] ) ? sanitize_email( $settings['contact']['email'] ) : null ); ?>"/>
|
436 |
+
</td>
|
437 |
+
</tr>
|
438 |
+
<tr class="field_contact">
|
439 |
+
<th>Contact Option</th>
|
440 |
+
<td align="left" scope="row">
|
441 |
+
<select name="contact[contactOption]" class="select2 withEmptyOption" style="width: 200px">
|
442 |
+
<option value="">Select an option</option>
|
443 |
+
<option value="TollFree" <?php
|
444 |
+
$cPtOpt = ! empty( $settings['contact']['contactOption'] ) ? $settings['contact']['contactOption'] : null;
|
445 |
+
echo( $cPtOpt == "TollFree" ? "selected" : null ); ?>>TollFree
|
446 |
+
</option>
|
447 |
+
<option
|
448 |
+
value="HearingImpairedSupported" <?php echo( $settings['contact']['contactOption'] == "HearingImpairedSupported" ? "selected" : null ); ?>>
|
449 |
+
HearingImpairedSupported
|
450 |
+
</option>
|
451 |
+
</select>
|
452 |
+
</td>
|
453 |
+
</tr>
|
454 |
+
<tr class="field_contact">
|
455 |
+
<th>Area Served</th>
|
456 |
+
<td align="left" scope="row">
|
457 |
+
<div class="area_served_wrapper">
|
458 |
+
<select id="area_served" class="select2" name="area_served[]" multiple="multiple"
|
459 |
+
style="width: 50%">
|
460 |
+
<?php
|
461 |
+
$areaServed = ! empty( $settings['area_served'] ) ? $settings['area_served'] : array();
|
462 |
+
foreach ( $schemaModel->countryList() as $country ) {
|
463 |
+
$slt = ( in_array( $country, $areaServed ) ? "selected" : null );
|
464 |
+
echo "<option value='$country' $slt>$country</option>";
|
465 |
+
}
|
466 |
+
?>
|
467 |
+
</select>
|
468 |
+
</div>
|
469 |
+
</td>
|
470 |
+
</tr>
|
471 |
+
<tr class="field_contact">
|
472 |
+
<th>Available language</th>
|
473 |
+
<td scope="row" class="lang">
|
474 |
+
<select class="select2" name="availableLanguage[]" style="width: 50%" multiple="multiple">
|
475 |
+
<?php
|
476 |
+
$lanAvailable = ! empty( $settings['availableLanguage'] ) ? $settings['availableLanguage'] : array();
|
477 |
+
foreach ( $schemaModel->languageList() as $language ) {
|
478 |
+
$slt = ( in_array( $language, $lanAvailable ) ? "selected" : null );
|
479 |
+
echo "<option value='$language' $slt>$language</option>";
|
480 |
+
}
|
481 |
+
?>
|
482 |
+
</select>
|
483 |
+
</td>
|
484 |
+
</tr>
|
485 |
+
</table>
|
486 |
+
</div>
|
487 |
+
</div>
|
488 |
|
489 |
+
<h2>Site Name in Search Results</h2>
|
490 |
+
<table width="100%" cellpadding="10" class="form-table">
|
491 |
+
<tr class="default">
|
492 |
+
<th>Enable Site link Search Box</th>
|
493 |
+
<td align="left" scope="row">
|
494 |
+
<input type="checkbox"
|
495 |
+
name="homeonly" <?php echo( ! empty( $settings['homeonly'] ) ? "checked" : null ); ?>
|
496 |
+
value="1"/>
|
497 |
+
</td>
|
498 |
+
</tr>
|
499 |
+
<tr class="default">
|
500 |
+
<th>Site Name:</th>
|
501 |
+
<td align="left" scope="row">
|
502 |
+
<input type="text" class="regular-text" name="sitename"
|
503 |
+
value="<?php echo( ! empty( $settings['sitename'] ) ? esc_attr( $settings['sitename'] ) : null ); ?>"/>
|
504 |
+
</td>
|
505 |
+
</tr>
|
506 |
+
<tr class="default">
|
507 |
+
<th>Site Alternative Name:</th>
|
508 |
+
<td align="left" scope="row">
|
509 |
+
<input type="text" class="regular-text" name="siteaname"
|
510 |
+
value="<?php echo( ! empty( $settings['siteaname'] ) ? esc_attr( $settings['siteaname'] ) : null ); ?>"/>
|
511 |
+
</td>
|
512 |
+
</tr>
|
513 |
+
<tr class="default">
|
514 |
+
<th>Site Url:</th>
|
515 |
+
<td align="left" scope="row">
|
516 |
+
<input type="text" class="regular-text" name="siteurl"
|
517 |
+
value="<?php echo( ! empty( $settings['siteurl'] ) ? esc_attr( $settings['siteurl'] ) : get_home_url() ); ?>"/>
|
518 |
+
</td>
|
519 |
+
</tr>
|
520 |
+
</table>
|
521 |
+
<p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
|
522 |
+
value="<?php _e( 'Save Changes', KCSEO_WP_SCHEMA_SLUG ); ?>"></p>
|
523 |
|
524 |
+
<?php wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' ); ?>
|
525 |
+
</form>
|
526 |
+
<div id="response"></div>
|
527 |
+
</div>
|
528 |
+
<div class='kc-get-pro'>
|
529 |
+
<h3>Pro Version Features</h3>
|
530 |
+
<ol>
|
531 |
+
<li>Includes Auto-fill function <---Popular</li>
|
532 |
+
<li>Supports Custom Post Types beyond default page and posts</li>
|
533 |
+
<li>Supports WordPress Multisite</li>
|
534 |
+
<li>Supports more schema types:
|
535 |
+
<ol>
|
536 |
+
<li>Books</li>
|
537 |
+
<li>Courses</li>
|
538 |
+
<li>Job Postings</li>
|
539 |
+
<li>Movies</li>
|
540 |
+
<li>Music</li>
|
541 |
+
<li>Recipe</li>
|
542 |
+
<li>TV Episode</li>
|
543 |
+
</ol>
|
544 |
+
</li>
|
545 |
+
</ol>
|
546 |
+
<div class="kc-pro-action"><a class='button button-primary' href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>Get the Pro Version</a></div>
|
547 |
+
</div>
|
548 |
+
</div>
|
549 |
</div>
|
lib/views/settings.php
CHANGED
@@ -1,34 +1,64 @@
|
|
1 |
<?php
|
2 |
global $KcSeoWPSchema;
|
3 |
-
$settings
|
4 |
?>
|
5 |
<div class="wrap">
|
6 |
-
|
7 |
-
<h2><?php _e( 'Schema Settings', KCSEO_WP_SCHEMA_SLUG ); ?></h2>
|
8 |
-
<form id="kcseo-main-settings" >
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
<
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
<?php wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' ); ?>
|
32 |
-
</form>
|
33 |
-
<div id="response"></div>
|
34 |
</div>
|
1 |
<?php
|
2 |
global $KcSeoWPSchema;
|
3 |
+
$settings = get_option( $KcSeoWPSchema->options['main_settings'] );
|
4 |
?>
|
5 |
<div class="wrap">
|
6 |
+
<h2><?php _e( 'Schema Settings', KCSEO_WP_SCHEMA_SLUG ); ?></h2>
|
|
|
|
|
7 |
|
8 |
+
<div id="kcseo-settings">
|
9 |
+
<div id="kcseo-options">
|
10 |
+
<form id="kcseo-main-settings">
|
11 |
+
<table width="40%" cellpadding="10" class="form-table">
|
12 |
+
<tr class="default">
|
13 |
+
<th>Business / Org Schema</th>
|
14 |
+
<td align="left" scope="row">
|
15 |
+
<?php $dd = ! empty( $settings['site_schema'] ) ? $settings['site_schema'] : 'home_page'; ?>
|
16 |
+
<input type="radio" <?php echo( $dd == 'home_page' ? 'checked' : null ); ?> name="site_schema"
|
17 |
+
value="home_page" id="site_schema_home"><label for="site_schema_home">Home page
|
18 |
+
only</label><br>
|
19 |
+
<input type="radio" <?php echo( $dd == 'all' ? 'checked' : null ); ?> name="site_schema" value="all"
|
20 |
+
id="site_schema_all"><label for="site_schema_all">Sitewide (Apply General Settings schema
|
21 |
+
sitewide)</label>
|
22 |
+
</td>
|
23 |
+
</tr>
|
24 |
+
<tr class="default">
|
25 |
+
<th>Delete all data</th>
|
26 |
+
<td align="left" scope="row">
|
27 |
+
<?php $dd = ! empty( $settings['delete-data'] ) ? "checked" : null; ?>
|
28 |
+
<input type="checkbox" <?php echo $dd; ?> name="delete-data" value="1" id="delete-data"><label
|
29 |
+
for="delete-data">Enable</label>
|
30 |
+
<p class="description">This will delete all schema created and applied by this plugin when plugin is
|
31 |
+
deleted.</p>
|
32 |
+
</td>
|
33 |
+
</tr>
|
34 |
+
</table>
|
35 |
+
<p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
|
36 |
+
value="<?php _e( 'Save Changes', KCSEO_WP_SCHEMA_SLUG ); ?>"></p>
|
37 |
+
|
38 |
+
<?php wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' ); ?>
|
39 |
+
</form>
|
40 |
+
<div id="response"></div>
|
41 |
+
</div>
|
42 |
+
<div class='kc-get-pro'>
|
43 |
+
<h3>Pro Version Features</h3>
|
44 |
+
<ol>
|
45 |
+
<li>Includes Auto-fill function <---Popular</li>
|
46 |
+
<li>Supports Custom Post Types beyond default page and posts</li>
|
47 |
+
<li>Supports WordPress Multisite</li>
|
48 |
+
<li>Supports more schema types:
|
49 |
+
<ol>
|
50 |
+
<li>Books</li>
|
51 |
+
<li>Courses</li>
|
52 |
+
<li>Job Postings</li>
|
53 |
+
<li>Movies</li>
|
54 |
+
<li>Music</li>
|
55 |
+
<li>Recipe</li>
|
56 |
+
<li>TV Episode</li>
|
57 |
+
</ol>
|
58 |
+
</li>
|
59 |
+
</ol>
|
60 |
+
<div class="kc-pro-action"><a class='button button-primary' href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>Get the Pro Version</a></div>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
|
|
|
|
|
|
|
64 |
</div>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: seo, schema, structured data, rich snippets, microdata, json-ld, search engine optimization, local seo, google, sitelinks, schema.org, microformat, serp, amp
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,23 +12,40 @@ Comprehensive JSON-LD based Structured Data solution for WordPress for adding sc
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
Structured data and schema are becoming more and more important for search engine optimization.
|
|
|
|
|
|
|
|
|
16 |
|
17 |
* Organizations
|
18 |
* Local Businesses
|
19 |
-
* Articles
|
20 |
* Blog Postings
|
21 |
* Events
|
22 |
* Products
|
23 |
* Videos
|
24 |
* Services
|
25 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
So we made our own.
|
29 |
|
30 |
= What is Structured Data & Schema? =
|
31 |
-
Structured data adds context to your website content by way of using standardized search engine “vocabulary” at Schema.org.
|
32 |
|
33 |
= What is a Rich Snippet? =
|
34 |
Rich snippets are the extra information that you often see right in the search results, such as:
|
@@ -42,11 +59,20 @@ Rich snippets are the extra information that you often see right in the search r
|
|
42 |
In other words, rich snippets are the visible result of structured data that appears in the SERPs.
|
43 |
|
44 |
= Does Structured Data Help With SEO? =
|
45 |
-
Absolutely!
|
46 |
|
47 |
-
|
48 |
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
= Why JSON-LD? =
|
52 |
In summary, there are three structured data formats:
|
@@ -55,7 +81,7 @@ In summary, there are three structured data formats:
|
|
55 |
* **RFDa** (HTML based)
|
56 |
* **JSON-LD** (Java Script based)
|
57 |
|
58 |
-
We used JSON-LD for many reasons.
|
59 |
Read more about [JSON-LD](http://json-ld.org/).
|
60 |
|
61 |
= We Follow Google Standards =
|
@@ -66,11 +92,12 @@ You can validate structured data on any web page here:
|
|
66 |
[https://developers.google.com/structured-data/testing-tool/](https://developers.google.com/structured-data/testing-tool/)
|
67 |
For more information on the plugin author visit:
|
68 |
|
69 |
-
* [
|
|
|
70 |
* [Twitter](https://twitter.com/kcseopro)
|
71 |
* [Google+](https://plus.google.com/+Kcseopro-kansas-city-seo)
|
72 |
* [Phil Singleton](https://www.linkedin.com/in/seokansascity)
|
73 |
-
* [
|
74 |
|
75 |
|
76 |
== Installation ==
|
@@ -83,7 +110,7 @@ For more information on the plugin author visit:
|
|
83 |
|
84 |
== Frequently Asked Questions ==
|
85 |
|
86 |
-
You'll find the [FAQ on Kcseopro.com](
|
87 |
|
88 |
== Screenshots ==
|
89 |
|
@@ -93,6 +120,11 @@ You'll find the [FAQ on Kcseopro.com](http://kcseopro.com/).
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
= 2.4 =
|
97 |
* Delete data when delete your plugin (Fixed)
|
98 |
|
4 |
Tags: seo, schema, structured data, rich snippets, microdata, json-ld, search engine optimization, local seo, google, sitelinks, schema.org, microformat, serp, amp
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Structured data and schema are becoming more and more important for search engine optimization.
|
16 |
+
|
17 |
+
The bad news is that this is pretty complicated stuff and even the most seasoned SEO specialists struggle with the proper implementation of structured data and schema on a website.
|
18 |
+
|
19 |
+
The good news is that we have created the WordPress SEO Structured Data Schema plugin which enables web designers and business owners a super-easy way to add schema for:
|
20 |
|
21 |
* Organizations
|
22 |
* Local Businesses
|
23 |
+
* News Articles
|
24 |
* Blog Postings
|
25 |
* Events
|
26 |
* Products
|
27 |
* Videos
|
28 |
* Services
|
29 |
+
* Reviews
|
30 |
+
* Aggregate Ratings
|
31 |
+
* Restaurants
|
32 |
+
|
33 |
+
= Pro Features =
|
34 |
+
* Includes Auto-fill function <---Popular
|
35 |
+
* Supports Custom Post Types beyond default page and posts
|
36 |
+
* Supports WordPress Multisite
|
37 |
+
* Supports more schema types:(Books,Courses,Job Postings,Movies,Music,Recipe,TV Episode)
|
38 |
+
|
39 |
+
[Get Pro Version](https://wpsemplugins.com/downloads/wordpress-schema-plugin/)
|
40 |
+
|
41 |
+
We created this plugin for our own websites and for our clients websites after trying dozens of free and premium schema and rich snippet plugins for WordPress. There are some great ones out there for specific kinds of content. There are also some plugins that try to automate schema markup without the ability to customize on a page-by-page level.
|
42 |
+
|
43 |
+
We could not find an easy-to-use, comprehensive JSON-LD plugin that provided features that most business websites need, that also included a high level of manual tweaking.
|
44 |
|
45 |
+
So we made our own and we get great results with it. And we strive to make these (the free and pro versions) the [best WordPress schema plugins](https://bloggerlocal.com/national/reviews/best-wordpress-schema-plugins) you can find, especially for bloggers, local businesses and ecommerce sites.
|
|
|
46 |
|
47 |
= What is Structured Data & Schema? =
|
48 |
+
Structured data adds context to your website content by way of using standardized search engine “vocabulary” at Schema.org. When implemented correctly, structured data increases the chances that search engines like Google will show additional information about your content directly in the search engine results pages (aka SERPs) via “rich snippets”. In other words, if you are searching for a WordPress rich snippet plugin, this may be the one you are looking for….
|
49 |
|
50 |
= What is a Rich Snippet? =
|
51 |
Rich snippets are the extra information that you often see right in the search results, such as:
|
59 |
In other words, rich snippets are the visible result of structured data that appears in the SERPs.
|
60 |
|
61 |
= Does Structured Data Help With SEO? =
|
62 |
+
Absolutely! There is no question that structured data that produces rich snippet “bling” that improves SERP click through rates (CTR). Virtually every search engine expert on the planet will tell you that organic click through rates are a major search engine optimization ranking factor. This, structured data has a very high correlation (ie indirect relationship) with search engine rankings.
|
63 |
|
64 |
+
Proper structured data and schema markup on a website are also thought to increase a web page’s chances of triggering a “position zero” knowledge box or answer box at the verp top of the SERPs, and may even help improve your rankings in voice search.
|
65 |
|
66 |
+
Is there a direct effect on SEO? Maybe. Recent communication from Google indicates that [structured data may become a direct ranking factor in the near future](https://searchengineland.com/google-may-add-structured-markup-data-to-ranking-algorithm-230402).
|
67 |
+
|
68 |
+
= Is This a “One and Done: Plugin Installation? =
|
69 |
+
No! The big difference with our WordPress schema plugin and some of the other ones out there is that our allows for a high degree of manual customization. There are some sitewide schema settings you can apply, but in general, you set schema up page-by-page, just as you do with many SEO plugins.
|
70 |
+
|
71 |
+
Just like all things on the Internet, it’s garbage in, garbage out. Just installing this plugin will not do anything for your website unless you use it correctly, and properly and accurately configure the data.
|
72 |
+
|
73 |
+
In other words, you should never add schema markup code the backside of your web page, if the data does not exist on the front.
|
74 |
+
|
75 |
+
Please don’t use our plugin to spam Google or any other search engine.
|
76 |
|
77 |
= Why JSON-LD? =
|
78 |
In summary, there are three structured data formats:
|
81 |
* **RFDa** (HTML based)
|
82 |
* **JSON-LD** (Java Script based)
|
83 |
|
84 |
+
We used JSON-LD for many reasons. For one, JSON is less invasive from a coding standpoint. Second, Google can read JSON-LD data that is dynamically injected from Javascript code and embedded widgets. In layman’s terms, JSON is the latest and greatest…it’s where structured data is headed and in our opinion, it should be used to implement structured data on all WordPress websites.
|
85 |
Read more about [JSON-LD](http://json-ld.org/).
|
86 |
|
87 |
= We Follow Google Standards =
|
92 |
[https://developers.google.com/structured-data/testing-tool/](https://developers.google.com/structured-data/testing-tool/)
|
93 |
For more information on the plugin author visit:
|
94 |
|
95 |
+
* [WP SEM Plugins](https://wpsemplugins.com/)
|
96 |
+
* [Kansas City SEO®](https://kcseopro.com/)
|
97 |
* [Twitter](https://twitter.com/kcseopro)
|
98 |
* [Google+](https://plus.google.com/+Kcseopro-kansas-city-seo)
|
99 |
* [Phil Singleton](https://www.linkedin.com/in/seokansascity)
|
100 |
+
* [SEO for Growth](https://seoforgrowth.com/)
|
101 |
|
102 |
|
103 |
== Installation ==
|
110 |
|
111 |
== Frequently Asked Questions ==
|
112 |
|
113 |
+
You'll find the [FAQ on Kcseopro.com](https://wpsemplugins.com/).
|
114 |
|
115 |
== Screenshots ==
|
116 |
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 2.5 =
|
124 |
+
* Lat/Log issue fix
|
125 |
+
* Rating issue
|
126 |
+
* Image issue
|
127 |
+
|
128 |
= 2.4 =
|
129 |
* Delete data when delete your plugin (Fixed)
|
130 |
|
wp-seo-structured-data-schema.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*Plugin Name: WP SEO Structured Data Schema
|
4 |
-
* Plugin URI:
|
5 |
* Description: Comprehensive JSON-LD based Structured Data solution for WordPress for adding schema for organizations, businesses, blog posts, ratings & more.
|
6 |
-
* Version: 2.
|
7 |
-
* Author:
|
8 |
-
* Author URI:
|
9 |
* License: A "Slug" license name e.g. GPL2
|
10 |
*/
|
11 |
if ( ! defined( 'ABSPATH' ) ) {
|
1 |
<?php
|
2 |
/**
|
3 |
*Plugin Name: WP SEO Structured Data Schema
|
4 |
+
* Plugin URI: https://wpsemplugins.com/
|
5 |
* Description: Comprehensive JSON-LD based Structured Data solution for WordPress for adding schema for organizations, businesses, blog posts, ratings & more.
|
6 |
+
* Version: 2.5
|
7 |
+
* Author: WPSEMPlugins
|
8 |
+
* Author URI: https://wpsemplugins.com/
|
9 |
* License: A "Slug" license name e.g. GPL2
|
10 |
*/
|
11 |
if ( ! defined( 'ABSPATH' ) ) {
|