Schema & Structured Data for WP & AMP - Version 1.9.2

Version Description

(28 Aug 2019) =

  • Added: Compatibility with SEO Framework ( https://wordpress.org/plugins/autodescription/ ) #426
  • Added: Compatibility with SEOPress ( https://wordpress.org/plugins/wp-seopress/ ) #421
  • Added: Compatibility with Smartcrawl SEO ( https://wordpress.org/plugins/smartcrawl-seo/ ) #319
  • Added: Compatibility with All in One SEO Pack ( https://wordpress.org/plugins/all-in-one-seo-pack/ ) #383
  • Bug Fixed: @type ImageObject and VideoObject are getting created eventhough values are not present on the site #437
  • Bug Fixed: Post specific schema fields are not showing on first button click inside custom post types #424
  • Bug Fixed: Fatal Error ( Cannot access protected property saswp_post_specific::$_local_sub_business ) #443
  • Bug Fixed: HowTo Schema (If steps images are not there its type should not come in json markup). #442
  • Bug Fixed: Missing datePublished and mainEntityOfPage fields in DiscussionForumPosting schema #438
Download this release

Release Info

Developer magazine3
Plugin Icon 128x128 Schema & Structured Data for WP & AMP
Version 1.9.2
Comparing to
See all releases

Code changes from version 1.9.1 to 1.9.2

admin_section/common-function.php CHANGED
@@ -1242,7 +1242,8 @@ if ( ! defined('ABSPATH') ) exit;
1242
  'data-id' => array(),
1243
  'checked' => array(),
1244
  'step' => array(),
1245
- 'min' => array()
 
1246
  );
1247
  $my_allowed['hidden'] = array(
1248
  'id' => array(),
@@ -1656,9 +1657,10 @@ if ( ! defined('ABSPATH') ) exit;
1656
 
1657
  <?php
1658
  }
1659
-
1660
-
1661
- if((has_shortcode( get_the_content(), 'saswp_google_review') || is_active_widget( false, false, 'saswp_google_review_widget',true )) && isset($sd_data['saswp-google-review']) && $sd_data['saswp-google-review'] == 1 ){
 
1662
  ?>
1663
 
1664
  /*** Review Design CSS ****/
@@ -1898,7 +1900,7 @@ if ( ! defined('ABSPATH') ) exit;
1898
 
1899
  }
1900
 
1901
- if(saswp_global_option() && saswp_remove_warnings($sd_data, 'saswp-yoast', 'saswp_string') == 1){
1902
 
1903
  $yoast_meta_des = saswp_convert_yoast_metafields($post->ID, 'metadesc');
1904
 
@@ -1909,7 +1911,55 @@ if ( ! defined('ABSPATH') ) exit;
1909
  }
1910
 
1911
  }
1912
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1913
  return $excerpt;
1914
  }
1915
  /**
@@ -1932,6 +1982,7 @@ if ( ! defined('ABSPATH') ) exit;
1932
  }
1933
  return '';
1934
  }
 
1935
  /**
1936
  * since @1.8.7
1937
  * Here we are modifying the default title
@@ -1943,29 +1994,85 @@ if ( ! defined('ABSPATH') ) exit;
1943
  global $post;
1944
  global $sd_data;
1945
 
1946
- if(saswp_global_option() && saswp_remove_warnings($sd_data, 'saswp-yoast', 'saswp_string') == 1){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1947
 
1948
  if(is_object($post)){
 
 
 
 
 
 
 
 
1949
 
1950
- $yoast_title = saswp_convert_yoast_metafields($post->ID, 'title');
1951
 
 
 
 
 
1952
  }
 
 
 
 
 
 
1953
 
1954
- if($yoast_title){
1955
 
1956
- $title = $yoast_title;
1957
 
1958
- }else{
1959
 
1960
- $title = get_the_title();
1961
 
1962
- }
1963
 
1964
- }else{
1965
 
1966
- $title = get_the_title();
1967
  }
1968
-
1969
  if (strlen($title) > 110){
1970
  $title = substr($title, 0, 106) . ' ...';
1971
  }
@@ -2088,6 +2195,15 @@ function saswp_check_plugin_active_status($pname){
2088
  'smart_crawl' => array(
2089
  'free' => 'smartcrawl-seo/wpmu-dev-seo.php',
2090
  ),
 
 
 
 
 
 
 
 
 
2091
 
2092
  );
2093
 
1242
  'data-id' => array(),
1243
  'checked' => array(),
1244
  'step' => array(),
1245
+ 'min' => array(),
1246
+ 'max' => array()
1247
  );
1248
  $my_allowed['hidden'] = array(
1249
  'id' => array(),
1657
 
1658
  <?php
1659
  }
1660
+
1661
+ if((has_shortcode( get_the_content(), 'saswp_google_review') || is_active_widget( false, false, 'saswp_google_review_widget',true )) &&
1662
+ ((isset($sd_data['saswp-google-review']) && $sd_data['saswp-google-review'] == 1) || (isset($sd_data['saswp-shopper-approved-review']) && $sd_data['saswp-shopper-approved-review'] == 1))
1663
+ ){
1664
  ?>
1665
 
1666
  /*** Review Design CSS ****/
1900
 
1901
  }
1902
 
1903
+ if(saswp_remove_warnings($sd_data, 'saswp-yoast', 'saswp_string') == 1){
1904
 
1905
  $yoast_meta_des = saswp_convert_yoast_metafields($post->ID, 'metadesc');
1906
 
1911
  }
1912
 
1913
  }
1914
+
1915
+ if(saswp_remove_warnings($sd_data, 'saswp-smart-crawl', 'saswp_string') == 1){
1916
+
1917
+ if(class_exists('Smartcrawl_OpenGraph_Value_Helper')){
1918
+
1919
+ $value_helper = new Smartcrawl_OpenGraph_Value_Helper();
1920
+
1921
+ $smart_meta_des = $value_helper->get_description();
1922
+
1923
+ if($smart_meta_des){
1924
+ $excerpt = $smart_meta_des;
1925
+ }
1926
+
1927
+ }
1928
+
1929
+ }
1930
+
1931
+ //All in one Seo pack
1932
+ if(saswp_remove_warnings($sd_data, 'saswp-aiosp', 'saswp_string') == 1){
1933
+
1934
+ global $aiosp, $post;
1935
+ $c_excerpt = $aiosp->get_aioseop_description($post);
1936
+ if($c_excerpt){
1937
+ $excerpt = $c_excerpt;
1938
+ }
1939
+
1940
+ }
1941
+
1942
+ //SEOPress
1943
+ if(saswp_remove_warnings($sd_data, 'saswp-seo-press', 'saswp_string') == 1){
1944
+ require_once ( WP_PLUGIN_DIR. '/wp-seopress/inc/functions/options-titles-metas.php'); //Social
1945
+ $c_excerpt = seopress_titles_the_description_content($post);
1946
+
1947
+ if($c_excerpt){
1948
+ $excerpt = $c_excerpt;
1949
+ }
1950
+
1951
+ }
1952
+
1953
+ if(saswp_remove_warnings($sd_data, 'saswp-the-seo-framework', 'saswp_string') == 1){
1954
+
1955
+ $c_excerpt = get_post_meta($post->ID, '_genesis_description', true);
1956
+
1957
+ if($c_excerpt){
1958
+ $excerpt = $c_excerpt;
1959
+ }
1960
+
1961
+ }
1962
+
1963
  return $excerpt;
1964
  }
1965
  /**
1982
  }
1983
  return '';
1984
  }
1985
+
1986
  /**
1987
  * since @1.8.7
1988
  * Here we are modifying the default title
1994
  global $post;
1995
  global $sd_data;
1996
 
1997
+ $title = get_the_title();
1998
+
1999
+ //SEOPress
2000
+ if(saswp_remove_warnings($sd_data, 'saswp-seo-press', 'saswp_string') == 1){
2001
+ require_once ( WP_PLUGIN_DIR. '/wp-seopress/inc/functions/options-titles-metas.php'); //Social
2002
+ $c_title = seopress_titles_the_title();
2003
+
2004
+ if($c_title){
2005
+ $title = $c_title;
2006
+ }
2007
+
2008
+ }
2009
+
2010
+ //All in one Seo pack
2011
+ if(saswp_remove_warnings($sd_data, 'saswp-aiosp', 'saswp_string') == 1){
2012
+
2013
+ global $aiosp;
2014
+
2015
+ $c_title = $aiosp->wp_title();
2016
+
2017
+ if($c_title){
2018
+ $title = $c_title;
2019
+ }
2020
+
2021
+ }
2022
+
2023
+ //The seo framework
2024
+ if(saswp_remove_warnings($sd_data, 'saswp-the-seo-framework', 'saswp_string') == 1){
2025
+
2026
+ $c_title = get_post_meta($post->ID, '_genesis_title', true);
2027
+
2028
+ if($c_title){
2029
+ $title = $c_title;
2030
+ }
2031
+
2032
+ }
2033
+
2034
+ //SmartCrawl title
2035
+
2036
+ if(saswp_remove_warnings($sd_data, 'saswp-smart-crawl', 'saswp_string') == 1){
2037
 
2038
  if(is_object($post)){
2039
+
2040
+ if(class_exists('Smartcrawl_OpenGraph_Value_Helper')){
2041
+
2042
+ $value_helper = new Smartcrawl_OpenGraph_Value_Helper();
2043
+
2044
+ $c_title = $value_helper->get_title();
2045
+
2046
+ if($c_title){
2047
 
2048
+ $title = $c_title;
2049
 
2050
+ }
2051
+
2052
+ }
2053
+
2054
  }
2055
+
2056
+ }
2057
+
2058
+
2059
+ //Yoast title
2060
+ if(saswp_remove_warnings($sd_data, 'saswp-yoast', 'saswp_string') == 1){
2061
 
2062
+ if(is_object($post)){
2063
 
2064
+ $c_title = saswp_convert_yoast_metafields($post->ID, 'title');
2065
 
2066
+ }
2067
 
2068
+ if($c_title){
2069
 
2070
+ $title = $c_title;
2071
 
2072
+ }
2073
 
 
2074
  }
2075
+
2076
  if (strlen($title) > 110){
2077
  $title = substr($title, 0, 106) . ' ...';
2078
  }
2195
  'smart_crawl' => array(
2196
  'free' => 'smartcrawl-seo/wpmu-dev-seo.php',
2197
  ),
2198
+ 'the_seo_framework' => array(
2199
+ 'free' => 'autodescription/autodescription.php',
2200
+ ),
2201
+ 'seo_press' => array(
2202
+ 'free' => 'wp-seopress/seopress.php',
2203
+ ),
2204
+ 'aiosp' => array(
2205
+ 'free' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
2206
+ ),
2207
 
2208
  );
2209
 
admin_section/css/main-style.css CHANGED
@@ -585,6 +585,17 @@ On/Off Buttons ends here
585
  .option-table-class tr > td{width: 30%;}
586
  .option-table-class tr td:last-child{width: 60%;}
587
 
 
 
 
 
 
 
 
 
 
 
 
588
  .saswp-option-table-class input[type="text"], .saswp-option-table-class select{
589
  width:100%;
590
  }
@@ -592,10 +603,6 @@ On/Off Buttons ends here
592
  width:100%;
593
  }
594
 
595
- .saswp-custom-fields-table select{
596
- width: 100%;
597
- }
598
-
599
  /*
600
  Compatibility tab css starts here
601
  */
@@ -904,7 +911,7 @@ Google review module ends here
904
  height: 20px;
905
  }
906
  .saswp-g-plus img{
907
- width:100%;
908
  }
909
  .saswp-rtng{
910
  padding-left: 5px;
@@ -943,7 +950,7 @@ Google review module ends here
943
  border: 1px solid #d8d8d8;
944
  display: inline-block;
945
  margin-top: 10px;
946
- width: 100%;
947
  }
948
  .saswp-upgrade-pro h2{
949
  font-size: 20px;
@@ -1043,7 +1050,10 @@ Google review module ends here
1043
 
1044
  .saswp-g-reviews-settings-table input{
1045
  width: 100%;
1046
- }
 
 
 
1047
  .saswp_rv_module_pro_notice{
1048
  border: 1px solid #d8d8d8;
1049
  background: #fff;
@@ -1051,9 +1061,6 @@ Google review module ends here
1051
 
1052
  /*** Review Module section ***/
1053
 
1054
- *, *:before, *:after{
1055
- box-sizing:border-box;
1056
- }
1057
  .saswp-settings-list .saswp-rev-mod{
1058
  width: 100%;
1059
  display: inline-block;
@@ -1167,3 +1174,6 @@ Google review module ends here
1167
  font-weight: 600;
1168
  font-size: 18px;
1169
  }
 
 
 
585
  .option-table-class tr > td{width: 30%;}
586
  .option-table-class tr td:last-child{width: 60%;}
587
 
588
+ .saswp-custom-fields-table{
589
+ width: 100%;
590
+ }
591
+ .saswp-custom-fields-table input{
592
+ width: 100%;
593
+ }
594
+ .saswp-custom-fields-table tr td {padding: 10px 10px 10px 10px ;}
595
+ .saswp-custom-fields-table td{
596
+ width: 30%;
597
+ }
598
+
599
  .saswp-option-table-class input[type="text"], .saswp-option-table-class select{
600
  width:100%;
601
  }
603
  width:100%;
604
  }
605
 
 
 
 
 
606
  /*
607
  Compatibility tab css starts here
608
  */
911
  height: 20px;
912
  }
913
  .saswp-g-plus img{
914
+ max-width:100%;
915
  }
916
  .saswp-rtng{
917
  padding-left: 5px;
950
  border: 1px solid #d8d8d8;
951
  display: inline-block;
952
  margin-top: 10px;
953
+ width: 81%;
954
  }
955
  .saswp-upgrade-pro h2{
956
  font-size: 20px;
1050
 
1051
  .saswp-g-reviews-settings-table input{
1052
  width: 100%;
1053
+ }
1054
+ .saswp-s-reviews-settings-table input{
1055
+ width: 100%;
1056
+ }
1057
  .saswp_rv_module_pro_notice{
1058
  border: 1px solid #d8d8d8;
1059
  background: #fff;
1061
 
1062
  /*** Review Module section ***/
1063
 
 
 
 
1064
  .saswp-settings-list .saswp-rev-mod{
1065
  width: 100%;
1066
  display: inline-block;
1174
  font-weight: 600;
1175
  font-size: 18px;
1176
  }
1177
+ .select2-container{
1178
+ width:100% !important;
1179
+ }
admin_section/css/main-style.min.css CHANGED
@@ -1,1173 +1 @@
1
- /*
2
- To change this license header, choose License Headers in Project Properties.
3
- To change this template file, choose Tools | Templates
4
- and open the template in the editor.
5
- */
6
- /*
7
- Created on : Jul 27, 2018, 5:36:26 PM
8
- Author : Magazine3
9
- */
10
- .saswp_warning{
11
- color: #ef6c00 !important;
12
- }
13
-
14
- .saswp_hide{
15
- display: none;
16
- }
17
- .saswp-general table th{
18
- width: auto;
19
- font-weight: 600;
20
- padding: 0px;
21
- }
22
- .saswp-general table{
23
- margin-top: 0px;
24
- }
25
- .saswp-general table td{
26
- padding: 5px;
27
- }
28
- .saswp-knowledge table th{
29
- width: auto;
30
- padding: 0px;
31
- }
32
- .saswp-knowledge table{
33
- margin-top: 0px;
34
- }
35
- .saswp-knowledge table td{
36
- padding: 5px;
37
- }
38
- .saswp-schema table th{
39
- width: auto;
40
- padding: 0px;
41
- }
42
- .saswp-schema table{
43
- margin-top: 0px;
44
- }
45
- .saswp-schema table td{
46
- padding: 5px;
47
- }
48
- .saswp-amp table th{
49
- width: auto;
50
- padding: 0px;
51
- }
52
- .saswp-amp table{
53
- margin-top: 0px;
54
- }
55
- .saswp-amp table td{
56
- padding: 5px;
57
- }
58
- .saswp-help table th{
59
- width: auto;
60
- padding: 0px;
61
- }
62
- .saswp-support table th{
63
- width: auto;
64
- padding: 0px;
65
- }
66
- .saswp-review table th{
67
- width: auto;
68
- padding: 0px;
69
- }
70
- .saswp-help table{
71
- margin-top: 0px;
72
- }
73
- .saswp-help table td{
74
- padding: 5px;
75
- }
76
- .saswp-settings-list{
77
- display:inline-block;
78
- width:100%
79
- }
80
- .saswp-settings-list li{
81
- padding-left:0px;
82
- }
83
- .saswp-settings-list li div label{
84
- font-weight: 600;
85
- }
86
- .saswp-general h2{
87
- margin-bottom: 0px;
88
- }
89
- .saswp-knowledge h2{
90
- margin-bottom: 0px;
91
- }
92
- .saswp-schema h2{
93
- margin-bottom: 0px;
94
- }
95
- .saswp-help h2{
96
- margin-bottom: 0px;
97
- }
98
- .saswp-settings-form p.submit{
99
- margin-top:0px;
100
- }
101
- .saswp_qanda_p{
102
- font-weight: 500;
103
- }
104
- .saswp-display-none{
105
- display: none !important;
106
- }
107
- .saswp-placement-groups{
108
- border: 1px solid #e5e5e5;
109
- }
110
- .saswp-query-success{
111
- color: #006600;
112
- }
113
- .saswp-query-error{
114
- color: #bf3322;
115
- }
116
- .saswp-tools table th{
117
- width: auto;
118
- padding: 0px;
119
- }
120
- .saswp-tools table{
121
- margin-top: 0px;
122
- }
123
- .saswp-tools table td{
124
- padding: 5px;
125
- }
126
- .saswp-tools-field-title strong{
127
- padding-right: 130px;
128
- }
129
- .saswp-tools .saswp-tooltip{
130
- width: 230px;
131
- }
132
- .saswp-tools .saswp-knowledge-label {
133
- float: left;
134
- }
135
- .saswp-error{
136
- color: #ff0000 !important;
137
- }
138
- /*
139
- Tooltip css starts here
140
-
141
- */
142
- .saswp-tooltip {
143
- position: relative;
144
- display: inline-block;
145
- }
146
- .saswp-tooltip .saswp-tooltiptext {
147
- visibility: hidden;
148
- width: 200px;
149
- background-color: black;
150
- color: #fff;
151
- text-align: center;
152
- border-radius: 6px;
153
- padding: 5px 0;
154
-
155
- /* Position the tooltip */
156
- position: absolute;
157
- z-index: 1;
158
- bottom: 100%;
159
- left: 50%;
160
- margin-left: -25px;
161
- }
162
- /*.saswp-tooltip:hover .saswp-tooltiptext {
163
- visibility: visible;
164
- }*/
165
-
166
- .saswp-tooltiptext::after {
167
- content: "";
168
- position: absolute;
169
- top: 100%;
170
- left: 10%;
171
- margin-left: -5px;
172
- border-width: 5px;
173
- border-style: solid;
174
- border-color: black transparent transparent transparent;
175
- }
176
-
177
- /*
178
- Tooltip css ends here
179
-
180
- */
181
- .saswp-knowledge-base .saswp-knowledge-label{
182
- width:200px;
183
- float:left;
184
- clear: both;
185
-
186
- }
187
- .saswp-knowledge-base .saswp-knowledge-field{
188
- width:75%;
189
- float:right;
190
- }
191
-
192
- .saswp-social-fileds ul{
193
- display: grid;
194
- grid-template-columns: 26.5% 1fr;
195
- }
196
- .saswp-social-fileds li{
197
- display: flex;
198
- }
199
- .saswp-social-fileds .saswp-knowledge-field{
200
- width: 100%;
201
- margin-left: 10px;
202
- }
203
- .saswp-social-fileds .saswp-knowledge-field input{
204
- float: right;
205
- margin: inherit;
206
- }
207
- .saswp-schema-type-fields .saswp-knowledge-label{
208
- width:200px;
209
- float:left;
210
- clear: both;
211
- }
212
- .saswp-schema-type-fields .saswp-knowledge-field{
213
- width:75%;
214
- float:right;
215
- }
216
- .saswp-settings-first-div{
217
- width: 70%;
218
- }
219
- .saswp-settings-container{
220
- display: inline-flex;
221
- width: 100%;
222
- }
223
- .saswp-settings-second-div{
224
- float: right;
225
- position: relative;
226
- top: 20px;
227
- margin-right: 30px;
228
- margin-top: 37px;
229
- }
230
- .saswp-feedback-panel{
231
- height: 200px;
232
- width: 280px;
233
- background: #ffffff;
234
- position: relative;
235
-
236
- }
237
- .saswp-start-quck-setup{
238
- position: relative;
239
- float: inherit;
240
- top: 7px;
241
- left:15px;
242
- }
243
- .saswp-feedback-panel ul{
244
- list-style-type: circle;
245
- list-style:decimal;
246
- padding-left: 30px;
247
- font-size: 15px;
248
-
249
- }
250
- .saswp-feedback-panel a{
251
- text-decoration: none;
252
-
253
- }
254
- .saswp-feedback-panel h2{
255
- text-align: center;
256
- padding-top: 18px;
257
-
258
- }
259
- .saswp-social-sharing-buttons {
260
- text-align: center;
261
- padding-top: 20px;
262
-
263
-
264
- }
265
- .saswp-facebook-share{
266
- background: #3B5998;
267
- box-shadow: 0 0px 0 #1b95e0 !important;
268
- color: #fff !important;
269
- line-height: 20px !important;
270
- height: 21px !important;
271
- border-radius: 3px;
272
- margin-right: 5px;
273
- }
274
- .saswp-social-sharing-buttons a{
275
- text-align: center;
276
- padding: 8px;
277
-
278
-
279
- }
280
- .twitter-share-button{
281
- background: #1b95e0 !important;
282
- box-shadow: 0 0px 0 #1b95e0 !important;
283
- color:#fff !important;
284
- line-height: 20px !important;
285
- height: 21px !important;
286
- border-radius: 3px;
287
- margin-left: 5px;
288
-
289
- }
290
- .saswp-placement-button{
291
- padding: 3px 10px;
292
- color: #0d0d0d;
293
- font-size: 14px;
294
- border: 1px solid #aaa;
295
- border-radius: 2px;
296
- background: linear-gradient(#ededed, #ffffff);
297
- }
298
- .saswp-placement-table td {
299
- padding: 5px 10px !important;
300
- }
301
- .saswp-archive-div .saswp-knowledge-field{
302
- float: right;
303
- width: 75%;
304
- padding-bottom: 10px;
305
- }
306
- .saswp-archive-div .saswp-knowledge-label{
307
- float:left;
308
- clear: both;
309
- }
310
-
311
- .saswp-amp .saswp-knowledge-field{
312
- float: right;
313
- width: 75%;
314
- padding-bottom: 10px;
315
- }
316
- .saswp-amp .saswp-knowledge-label{
317
- float:left;
318
- clear: both;
319
- }
320
-
321
- .saswp-review .saswp-knowledge-field{
322
- float: right;
323
- width: 75%;
324
- padding-bottom: 10px;
325
- }
326
- .saswp-review .saswp-knowledge-label{
327
- float:left;
328
- clear: both;
329
- }
330
-
331
- .saswp-compativility-div .saswp-knowledge-field{
332
- float: right;
333
- width: 75%;
334
- padding-bottom: 10px;
335
- }
336
- .saswp-compativility-div .saswp-knowledge-label{
337
- float:left;
338
- clear: both;
339
- }
340
- .saswp-compativility-div li {
341
- display: inline-flex;
342
- }
343
- .saswp-seller-div .saswp-knowledge-label{
344
- float: left;
345
-
346
- clear: both;
347
- }
348
- .saswp-seller-div .saswp-knowledge-field{
349
- float: left;
350
- width: 70%;
351
- }
352
- .saswp-post-specific-tab-wrapper{
353
- display: inline-block;
354
- width: 25%;
355
- vertical-align: top;
356
- box-sizing: border-box;
357
- padding-right:10px;
358
- }
359
- .saswp-post-specific-container{
360
- display: inline-block;
361
- width: calc(75% - 1px );
362
- border-left: 1px solid #eee;
363
- }
364
- .saswp-post-specific-wrapper{
365
- padding: 10px;
366
- }
367
- .saswp-tab a.selected {
368
- background-color: #ccc;
369
- }
370
- .saswp-tab-links{
371
- display: block;
372
- background-color: inherit;
373
- color: black;
374
- padding: 6px 10px;
375
- outline: none;
376
- text-align: left;
377
- cursor: pointer;
378
- transition: 0.3s;
379
- font-size: 15px;
380
- width: 130px;
381
- overflow: hidden;
382
- margin-right: 10px;
383
- }
384
- .saswp-star-rating{
385
- cursor: pointer;
386
- }
387
- .saswp-post-specific-wrapper select{
388
- width: 100%;
389
- }
390
- .saswp-review-tables{
391
- width: 100%;
392
- }
393
- .saswp-over-all-raring{
394
- float: right;
395
- }
396
-
397
- .saswp-review-pros-and-cons{
398
- position: relative;
399
- clear:both;
400
- }
401
- .saswp-review-pros-and-cons > div:first{
402
- padding-left: 10px;
403
- }
404
- .saswp-review-pros-and-cons > div{
405
- width: 49%;
406
- display: inline-block;
407
- }
408
- .saswp-review-pros-and-cons > div:nth-child(2){
409
- padding-left: 12px;
410
- }
411
- .saswp-wp-ediot-desc{
412
- margin-bottom: -23px;
413
- display: block;
414
- }
415
- .saswp-review-description{
416
- margin-top: 40px;
417
- padding-top: 10px;
418
- border-top: 1px solid #eee;
419
- }
420
- .saswp-review-pros-and-cons{
421
- margin-top: 40px;
422
- padding-top: 10px;
423
- border-top: 1px solid #eee;
424
- }
425
- .saspw-review-item-list{
426
- margin-top: 20px;
427
- border-top: 1px solid #eee;
428
- }
429
- .saswp-review-item-list-table{
430
- padding-bottom: 10px;
431
- }
432
- #sasw-review input[type=text] {
433
- width: 180px;
434
- }
435
- #sasw-review input[type=number] {
436
- width: 180px;
437
- }
438
- #saswp-review-item-enable{
439
- width: 10px;
440
- }
441
- .saswp-enable-review-on-post{
442
- padding-bottom: 10px;
443
- }
444
- .saswp-enable-review-on-post label{
445
- font-weight: 500;
446
- }
447
- /*
448
- Compatibility tab css starts here
449
- */
450
- .saswp-compatibility table th{
451
- width: auto;
452
- padding: 0px;
453
- }
454
- .saswp-compatibility .saswp-knowledge-label {
455
- float: left;
456
- clear: both;
457
- }
458
- .saswp-tools .saswp-knowledge-label {
459
- float: left;
460
- clear: both;
461
- }
462
- .saswp-tools .saswp-knowledge-field {
463
- float: right;
464
- width: 69%;
465
- padding-bottom: 10px;
466
- }
467
- .saswp_kg_logo, .saswp_person_fields{
468
- background-color: #fff !important;
469
- }
470
- .saswp_image_thumbnail{
471
- padding-top: 5px;
472
- display: inline-block;
473
- }
474
- .saswp-compatibility .saswp-knowledge-field {
475
- float: right;
476
- width: 75%;
477
- padding-bottom: 10px;
478
- }
479
- .saswp-schem-type-note, .saswp-job-posting-note{
480
- color: chocolate;
481
- }
482
- .saswp-custom-fields-name{
483
- border: 1px solid #aaa;
484
- border-radius: 4px;
485
- }
486
- /*
487
- Compatibility tab css ends
488
- */
489
- .saswp-option-table-class p{
490
- margin: auto;
491
- font-style: italic;
492
- color: #666;
493
- }
494
- /*
495
- On/Off Buttons starts here
496
- */
497
- .saswp-switch {
498
- position: relative;
499
- display: inline-block;
500
- width: 40px;
501
- height: 22px;
502
- border: 20px;
503
- }
504
-
505
- .saswp-switch input {
506
- opacity: 0;
507
- width: 0;
508
- height: 0;
509
- }
510
-
511
- .saswp-slider {
512
- position: absolute;
513
- cursor: pointer;
514
- top: 0;
515
- left: 0;
516
- right: 0;
517
- bottom: 0;
518
- background-color: #5a6783;
519
- transition: .4s;
520
- border-radius: 20px;
521
- }
522
-
523
- .saswp-slider:before {
524
- position: absolute;
525
- content: "";
526
- height: 15px;
527
- width: 15px;
528
- left: 4px;
529
- bottom: 4px;
530
- background-color: white;
531
- transition: .4s;
532
- border-radius: 20px;
533
- }
534
-
535
- input:checked + .saswp-slider {
536
- background-color: #61bd3b;
537
- border-radius: 30px;
538
- }
539
-
540
- input:focus + .saswp-slider {
541
- box-shadow: 0 0 1px #2196F3;
542
- }
543
-
544
- input:checked + .saswp-slider:before {
545
-
546
- transform: translateX(15px);
547
- }
548
-
549
- /* Rounded sliders */
550
- .saswp-slider.saswp-round {
551
- border-radius: 34px;
552
- }
553
-
554
- .saswp-slider.saswp-round:before {
555
- border-radius: 50%;
556
- }
557
-
558
- .saswp-tab-nav li{
559
- display: flex;
560
- align-items: center;
561
- justify-content: space-between;
562
- margin-bottom:10px;
563
- border-bottom: 1px solid #eee;
564
- }
565
-
566
- .saswp-tab-nav .selected{
567
- background-color: #ccc;
568
- }
569
- .saswp-single-post-restore .saswp-switch{
570
- height: 28px;
571
- }
572
- .saswp-single-post-restore .saswp-slider:before{
573
- height: 20px;
574
- }
575
- /*
576
- On/Off Buttons ends here
577
- */
578
- .saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px;}
579
- .saswp-wdi-rate-stars svg{fill:#ffb900;}
580
- .saswp-wdi-rate-stars svg:hover{fill:#ffb900}
581
- .saswp-wdi-rate-stars svg:hover ~ svg{fill:none;}
582
-
583
- .option-table-class {width:100%;}
584
- .option-table-class tr td {padding: 10px 10px 10px 10px ;}
585
- .option-table-class tr > td{width: 30%;}
586
- .option-table-class tr td:last-child{width: 60%;}
587
-
588
- .saswp-custom-fields-table{
589
- width: 100%;
590
- }
591
- .saswp-custom-fields-table input{
592
- width: 100%;
593
- }
594
- .saswp-custom-fields-table tr td {padding: 10px 10px 10px 10px ;}
595
- .saswp-custom-fields-table td{
596
- width: 30%;
597
- }
598
-
599
- .saswp-option-table-class input[type="text"], .saswp-option-table-class select{
600
- width:100%;
601
- }
602
- .saswp-paywall-table-class input[type="text"], .saswp-paywall-table-class select{
603
- width:100%;
604
- }
605
-
606
- /*
607
- Compatibility tab css starts here
608
- */
609
- .saswp-email_schema table th{
610
- width: auto;
611
- padding: 0px;
612
- }
613
- .saswp-email_schema .saswp-knowledge-label {
614
- float: left;
615
- clear: both;
616
- }
617
- .saswp-email_schema .saswp-knowledge-field {
618
- float: right;
619
- width: 75%;
620
- padding-bottom: 10px;
621
- }
622
- /*
623
- Compatibility tab css ends
624
- */
625
- .saswp-add-on-plugin label{
626
- margin-top: 10px;
627
- }
628
- .saswp-add-on-plugin span{
629
- width: 250px;
630
- display: inline-block;
631
- }
632
- .saswp-knowledge-label label[for="saswp_search_box_schema_checkbox"] {
633
- padding-left: 10px;
634
- }
635
-
636
- .saswp-knowledge-label label[for="saswp-woocommerce-booking-checkbox"] {
637
- padding-left: 10px;
638
- }
639
-
640
- .saswp-knowledge-label label[for="saswp-woocommerce-membership-checkbox"] {
641
- padding-left: 10px;
642
- }
643
-
644
- .saswp-global-selected{
645
- color: #000000;
646
- font-weight: 500;
647
- }
648
- #saswp-global-tabs a{
649
- cursor: pointer;
650
- }
651
- #saswp-global-tabs{
652
- padding-left: 5px;
653
- }
654
- #saswp-tools-tabs a{
655
- cursor: pointer;
656
- }
657
- #saswp-review-tabs a{
658
- cursor: pointer;
659
- }
660
- #saswp-tools-tabs{
661
- padding-left: 5px;
662
- }
663
- .saswp-need-help {
664
- padding-left: 60px;
665
- }
666
- .saswp-heading{
667
- display: inline-flex;
668
- align-items: baseline;
669
- }
670
- .saswp-heading h2{
671
- margin-bottom: 0px;
672
- }
673
- .saswp-view-docs a{
674
- margin-right: 5px !important;
675
- margin-top: 10px !important;
676
- }
677
- .saswp-tabs .nav-tab{
678
- margin-left: 4px;
679
- }
680
-
681
- /*
682
- Google review module starts here
683
- */
684
- .saswp-panel {
685
- padding: 7px 18px;
686
- background-color: white;
687
- box-shadow: 0px 0px 20px 1px #d2cccc;
688
- }
689
-
690
- /*** Review Design CSS ****/
691
- .saswp-g-review-header{
692
- margin-top: 50px;
693
- }
694
- .saswp-g-review-body{
695
- display:inline-grid;
696
- grid-template-columns: 1fr 300px;
697
- grid-gap:30px;
698
- margin-top:30px;
699
- }
700
- .saswp-review-list{}
701
- .saswp-channel-list{
702
- margin-right: 15px;
703
- }
704
- .saswp-input-fields{
705
- display: inline-flex;
706
- align-items: center;
707
- margin-bottom: 8px;
708
- width: 100%;
709
- }
710
- .saswp-input-fields label{
711
- width: 130px;
712
- }
713
- .saswp-input-fields select{
714
- width:100%;
715
- }
716
- .saswp-panel h3{
717
- font-size: 20px;
718
- line-height: 1.4;
719
- color: #222;
720
- text-align: center;
721
- margin: 10px 0px 20px 0px;
722
- }
723
- .saswp-input-fields a.button-primary{
724
- margin-top:10px;
725
- }
726
- .saswp-glg-review-body{
727
- display: grid;
728
- grid-template-columns: 100px 1fr;
729
- grid-gap: 20px;
730
- background: #fff;
731
- padding: 20px;
732
- box-shadow: 0px 0px 20px 1px #d2cccc;
733
- margin-bottom: 30px;
734
- }
735
- .saswp-g-plus{
736
- float: right;
737
- font-size: 15px;
738
- }
739
- .saswp-rtng{
740
- padding-left: 5px;
741
- font-size: 14px;
742
- }
743
- .saswp-pt-dt {
744
- font-size: 12px;
745
- color: #999;
746
- font-weight: 600;
747
- margin-top: 5px;
748
- display: inline-block;
749
- }
750
- .saswp-str{
751
- display: inline-block;
752
- width: 100%;
753
- vertical-align: middle;
754
- }
755
- .saswp-athr{
756
- font-size: 15px;
757
- line-height: 1.4;
758
- color: #000;
759
- font-weight: bold;
760
- display: inline-block;
761
- vertical-align: middle;
762
- }
763
- .saswp-str-rtng .saswp-rvw-str{
764
- display: inline-block;
765
- vertical-align: middle;
766
- padding-left: 10px;
767
- width: auto;
768
- }
769
- .saswp-rv-cnt p{
770
- font-size: 16px;
771
- line-height: 1.6;
772
- color: #000;
773
- margin: 10px 0px 0px 0px;
774
- }
775
- .saswp-rv-img img{
776
- max-width:100px;
777
- border-radius: 100%;
778
- }
779
- /*
780
- Google review module ends here
781
- */
782
-
783
- /** Premium Feature CSS **/
784
- .saswp-premium_features table th, .saswp-services table th{
785
- width: auto;
786
- padding: 0px;
787
- }
788
- .saswp-features-blocks{
789
- display: inline-grid;
790
- grid-template-columns: 1fr 1fr;
791
- grid-gap: 20px;
792
- }
793
- .saswp-features-blocks li{
794
- background:#fff;
795
- padding: 25px;
796
- border: 1px solid #d8d8d8;
797
- }
798
- .saswp-features-blocks li a{
799
- text-decoration: none;
800
- }
801
- .saswp-ele-ic{
802
- border-radius: 256px;
803
- display: inline-block;
804
- padding:8px 10px 8px 10px;
805
- width: 70px;
806
- margin-right: 20px;
807
- float: left;
808
- }
809
- .saswp-ele-ic img{
810
- width:100%;
811
- }
812
- .saswp-ele-1{
813
- background: #96588a;
814
- }
815
- .saswp-ele-2{
816
- background: #00a97e;
817
- }
818
- .saswp-ele-3{
819
- background: #cacaca;
820
- }.saswp-ele-4{
821
- background: #9c56cc;
822
- }
823
- .saswp-ele-tlt h3{
824
- margin:0;
825
- font-size: 18px;
826
- line-height: 1.4;
827
- }
828
- .saswp-ele-tlt p{
829
- margin-top:10px;
830
- }
831
- .saswp-sts-btn{
832
- box-sizing: border-box;
833
- height: 52px;
834
- margin-top: 20px;
835
- padding: 6px 15px;
836
- border: 1px solid #e5e5e5;
837
- border-radius: 3px;
838
- display: flex;
839
- align-items: center;
840
- justify-content: space-between;
841
- }
842
- .saswp-d-btn{
843
- background: #d2150a;
844
- padding: 6px 18px;
845
- border-radius: 30px;
846
- font-size: 14px;
847
- color: #fff;
848
- }
849
- .form-wrap .saswp-sts-txt{
850
- font-size: 16px;
851
- color:#000;
852
- }
853
- .saswp-sts-txt span{
854
- color:#bebfc0;
855
- padding-left:5px;
856
- }
857
-
858
- /** star rating Feature CSS **/
859
- .saswp_review_platform .saswp-g-plus{
860
- float: left;
861
- }
862
- .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
863
- .str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
864
- /*** Review Design CSS ****/
865
- .saswp-g-review-header{
866
- margin-top: 50px;
867
- }
868
- .saswp-g-review-body{
869
- display:inline-grid;
870
- grid-template-columns: 1fr 300px;
871
- grid-gap:30px;
872
- margin-top:30px;
873
- width:100%;
874
- }
875
- .saswp-review-list{}
876
- .saswp-channel-list{
877
- margin-right: 15px;
878
- }
879
- .saswp-input-fields{
880
- display: inline-flex;
881
- align-items: center;
882
- margin-bottom: 8px;
883
- width: 100%;
884
- }
885
- .saswp-input-fields label{
886
- width: 130px;
887
- }
888
- .saswp-panel h3{
889
- font-size: 20px;
890
- line-height: 1.4;
891
- color: #222;
892
- text-align: center;
893
- margin: 10px 0px 20px 0px;
894
- }
895
- .saswp-input-fields a.button-primary{
896
- margin-top:10px;
897
- }
898
- .saswp-glg-review-body{
899
- display: grid;
900
- grid-template-columns: 100px 1fr;
901
- grid-gap: 20px;
902
- background: #fff;
903
- padding: 20px;
904
- box-shadow: 0px 0px 20px 1px #d2cccc;
905
- margin-bottom: 30px;
906
- }
907
- .saswp-g-plus{
908
- float: right;
909
- font-size: 15px;
910
- width: 20px;
911
- height: 20px;
912
- }
913
- .saswp-g-plus img{
914
- max-width:100%;
915
- }
916
- .saswp-rtng{
917
- padding-left: 5px;
918
- font-size: 14px;
919
- }
920
- .saswp-pt-dt {
921
- font-size: 12px;
922
- color: #999;
923
- font-weight: 600;
924
- margin-top: 5px;
925
- display: inline-block;
926
- }
927
- .saswp-athr{
928
- font-size: 15px;
929
- line-height: 1.4;
930
- color: #000;
931
- font-weight: bold;
932
- }
933
- .saswp-rv-cnt p{
934
- font-size: 16px;
935
- line-height: 1.6;
936
- color: #000;
937
- margin: 10px 0px 0px 0px;
938
- }
939
- .saswp-rv-img img{
940
- max-width:100px;
941
- }
942
- .saswp-g-review-header div{
943
- margin-top:10px;
944
- }
945
-
946
- /*** Upgrade Pro CSS ***/
947
- .saswp-upgrade-pro{
948
- background: #fff;
949
- padding: 25px;
950
- border: 1px solid #d8d8d8;
951
- display: inline-block;
952
- margin-top: 10px;
953
- width: 81%;
954
- }
955
- .saswp-upgrade-pro h2{
956
- font-size: 20px;
957
- margin: 0;
958
- color: #23282d;
959
- font-weight: 600;
960
- text-align: center;
961
- }
962
- .saswp-upgrade-pro ul{
963
- margin: 25px 0px 20px 0px;
964
- display: inline-block;
965
- }
966
- .saswp-upgrade-pro ul li{
967
- position: relative;
968
- padding-left: 30px;
969
- font-size: 14px;
970
- line-height: 1.4;
971
- margin-bottom: 10px;
972
- }
973
- .saswp-upgrade-pro ul li:before {
974
- content: "";
975
- background-image: url(../images/check.png);
976
- background-repeat: no-repeat;
977
- background-size: 20px;
978
- width: 20px;
979
- height: 20px;
980
- position: absolute;
981
- left: 2px;
982
- top: 2px;
983
- }
984
- .saswp-upgrade-pro a{
985
- background: #d2150a;
986
- padding: 10px 0px;
987
- display: block;
988
- text-align: center;
989
- color: #fff;
990
- text-decoration: none;
991
- font-size: 16px;
992
- font-weight: 600;
993
- letter-spacing: 1px;
994
- border-radius: 5px;
995
- }
996
- .saswp_image_prev{
997
- max-width: 200px;
998
- max-height: 200px;
999
- float: left;
1000
- padding-left:2px;
1001
- }
1002
- .saswp_prev_close {
1003
- position: relative;
1004
- width:30px;
1005
- height:30px;
1006
- top: 12px;
1007
- font-size: 20px;
1008
- top: -5px;
1009
- text-decoration:none;
1010
- }
1011
- .saswp-add-custom-schema-div{
1012
- margin-top: 10px;
1013
- border-top: 1px solid #eee;
1014
- padding-top: 5px;
1015
- }
1016
-
1017
- .saswp-nav-menu-list label{
1018
- padding-left: 10px;
1019
- }
1020
- /*** How to schema css starts here ***/
1021
-
1022
- .saswp-how-to-supply-table-div,
1023
- .saswp-how-to-tool-table-div,
1024
- .saswp-how-to-step-table-div,
1025
- .saswp-tvseries-actor-table-div,
1026
- .saswp-tvseries-season-table-div,
1027
- .saswp-mc-symptom-table-div,
1028
- .saswp-mc-risk_factor-table-div,
1029
- .saswp-trip-itinerary-table-div,
1030
- .saswp-faq-question-table-div,
1031
- .saswp-mc-cause-table-div
1032
- {
1033
- border: 1px solid #aaa;
1034
- margin-top: 5px;
1035
- margin-bottom: 5px;
1036
-
1037
- }
1038
- .saswp-table-close{
1039
- float: right;
1040
- cursor: pointer;
1041
- }
1042
- .saswp-table-create-onajax table th, .saswp-table-create-onajax table td{
1043
- padding: 5px;
1044
- }
1045
- .saswp-table-create-onajax select{
1046
- width: 98%;
1047
- }
1048
-
1049
- /*** How to schema css ends here ***/
1050
-
1051
- .saswp-g-reviews-settings-table input{
1052
- width: 100%;
1053
- }
1054
- .saswp_rv_module_pro_notice{
1055
- border: 1px solid #d8d8d8;
1056
- background: #fff;
1057
- }
1058
-
1059
- /*** Review Module section ***/
1060
-
1061
- .saswp-settings-list .saswp-rev-mod{
1062
- width: 100%;
1063
- display: inline-block;
1064
- margin-top: 20px;
1065
- }
1066
- .saswp-rev-mod .saswp-knowledge-label{
1067
- width: 100%;
1068
- display: inline-block;
1069
- padding: 10px 16px;
1070
- font-weight: 600;
1071
- font-size: 16px;
1072
- color: #333;
1073
- background: #f9f9f9;
1074
- border: 1px solid #d8d8d8;
1075
- border-bottom: none;
1076
- }
1077
- .saswp-rev-mod .saswp-knowledge-field{
1078
- width:100%;
1079
- display: inline-block;
1080
- }
1081
- .saswp-rev-mod .saswp_rv_module_pro_notice{
1082
- padding:20px;
1083
- }
1084
- .saswp_cmpny_lst{
1085
- width:100%;
1086
- display: inline-block;
1087
- margin-top:30px;
1088
- }
1089
- .saswp_rv_module_pro_notice ul{
1090
- margin: 15px 0px 20px 0px;
1091
- width: 100%;
1092
- display: inline-grid;
1093
- grid-template-columns: 1fr 1fr 1fr;
1094
- grid-gap: 20px;
1095
- border-bottom: 1px solid #eee;
1096
- padding-bottom: 20px;
1097
- }
1098
- .saswp_rv_module_pro_notice ul li{
1099
- position: relative;
1100
- font-size: 15px;
1101
- line-height: 1.5;
1102
- color: #444;
1103
- margin: 0;
1104
- }
1105
- .saswp_rv_module_pro_notice ul li span{
1106
- padding-left:3px;
1107
- }
1108
- /*.saswp_rv_module_pro_notice ul li.check-img:before{
1109
- content: "";
1110
- background-image: url(../images/check.png);
1111
- background-repeat: no-repeat;
1112
- background-size: 16px;
1113
- width: 16px;
1114
- height: 16px;
1115
- position: absolute;
1116
- left: 2px;
1117
- top: 6px;
1118
- }*/
1119
- .saswp_rv_module_pro_notice h2{
1120
- text-align: center;
1121
- font-size: 31px;
1122
- }
1123
- .saswp_rv_module_pro_notice .saswp_desc{
1124
- text-align: center;
1125
- font-size: 18px;
1126
- font-style: normal;
1127
- color: #000;
1128
- }
1129
- .saswp_rv_module_pro_notice .saswp_desc a{
1130
- font-style: italic;
1131
- }
1132
- .saswp_rv_module_pro_notice .saswp_lst{
1133
- color: #808080;
1134
- font-family: georgia;
1135
- font-style: italic;
1136
- font-style: italic;
1137
- font-size: 15px;
1138
- font-weight: 600;
1139
- }
1140
- .saswp_rv_module_pro_notice .saswp_avlbl{
1141
- color: #2a902e;
1142
- font-family: georgia;
1143
- font-style: italic;
1144
- font-size: 15px;
1145
- font-weight: 600;
1146
- }
1147
- .saswp_rv_module_pro_notice ul li img{
1148
- width:20px;
1149
- height:20px;
1150
- position: relative;
1151
- top: 4px;
1152
- }
1153
- .saswp-rev-btn{
1154
- width:100%;
1155
- display: inline-block;
1156
- margin-top:20px;
1157
- text-align: center;
1158
- }
1159
- .saswp-rev-btn span{
1160
- display: block;
1161
- font-size: 13px;
1162
- margin-bottom: 15px;
1163
- }
1164
- .saswp-rev-btn a{
1165
- padding: 12px 18px;
1166
- display: inline-block;
1167
- text-decoration: none;
1168
- border-radius: 5px;
1169
- background: #0085ba;
1170
- color: #fff;
1171
- font-weight: 600;
1172
- font-size: 18px;
1173
- }
1
+ .saswp_warning{color:#ef6c00!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:70%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:30px;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box;padding-right:10px}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{background-color:#ccc}.saswp-tab-links{display:block;background-color:inherit;color:#000;padding:6px 10px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:130px;overflow:hidden;margin-right:10px}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:10px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:40px;height:22px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#5a6783;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:15px;width:15px;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#61bd3b;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;border-bottom:1px solid #eee}.saswp-tab-nav .selected{background-color:#ccc}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.saswp-wdi-rate-stars svg{fill:#ffb900}.saswp-wdi-rate-stars svg:hover{fill:#ffb900}.saswp-wdi-rate-stars svg:hover~svg{fill:none}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{color:#000;font-weight:500}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-str-rtng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;float:left}.saswp-ele-ic img{width:100%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:20px;height:20px}.saswp-g-plus img{max-width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.saswp-g-review-header div{margin-top:10px}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:81%}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"";background-image:url(../images/check.png);background-repeat:no-repeat;background-size:20px;width:20px;height:20px;position:absolute;left:2px;top:2px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp_image_prev{max-width:200px;max-height:200px;float:left;padding-left:2px}.saswp_prev_close{position:relative;width:30px;height:30px;top:12px;font-size:20px;top:-5px;text-decoration:none}.saswp-add-custom-schema-div{margin-top:10px;border-top:1px solid #eee;padding-top:5px}.saswp-nav-menu-list label{padding-left:10px}.saswp-faq-question-table-div,.saswp-how-to-step-table-div,.saswp-how-to-supply-table-div,.saswp-how-to-tool-table-div,.saswp-mc-cause-table-div,.saswp-mc-risk_factor-table-div,.saswp-mc-symptom-table-div,.saswp-trip-itinerary-table-div,.saswp-tvseries-actor-table-div,.saswp-tvseries-season-table-div{border:1px solid #aaa;margin-top:5px;margin-bottom:5px}.saswp-table-close{float:right;cursor:pointer}.saswp-table-create-onajax table td,.saswp-table-create-onajax table th{padding:5px}.saswp-table-create-onajax select{width:98%}.saswp-g-reviews-settings-table input{width:100%}.saswp-s-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}.saswp-settings-list .saswp-rev-mod{width:100%;display:inline-block;margin-top:20px}.saswp-rev-mod .saswp-knowledge-label{width:100%;display:inline-block;padding:10px 16px;font-weight:600;font-size:16px;color:#333;background:#f9f9f9;border:1px solid #d8d8d8;border-bottom:none}.saswp-rev-mod .saswp-knowledge-field{width:100%;display:inline-block}.saswp-rev-mod .saswp_rv_module_pro_notice{padding:20px}.saswp_cmpny_lst{width:100%;display:inline-block;margin-top:30px}.saswp_rv_module_pro_notice ul{margin:15px 0 20px 0;width:100%;display:inline-grid;grid-template-columns:1fr 1fr 1fr;grid-gap:20px;border-bottom:1px solid #eee;padding-bottom:20px}.saswp_rv_module_pro_notice ul li{position:relative;font-size:15px;line-height:1.5;color:#444;margin:0}.saswp_rv_module_pro_notice ul li span{padding-left:3px}.saswp_rv_module_pro_notice h2{text-align:center;font-size:31px}.saswp_rv_module_pro_notice .saswp_desc{text-align:center;font-size:18px;font-style:normal;color:#000}.saswp_rv_module_pro_notice .saswp_desc a{font-style:italic}.saswp_rv_module_pro_notice .saswp_lst{color:grey;font-family:georgia;font-style:italic;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice .saswp_avlbl{color:#2a902e;font-family:georgia;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice ul li img{width:20px;height:20px;position:relative;top:4px}.saswp-rev-btn{width:100%;display:inline-block;margin-top:20px;text-align:center}.saswp-rev-btn span{display:block;font-size:13px;margin-bottom:15px}.saswp-rev-btn a{padding:12px 18px;display:inline-block;text-decoration:none;border-radius:5px;background:#0085ba;color:#fff;font-weight:600;font-size:18px}.select2-container{width:100%!important}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin_section/fields-generator.php CHANGED
@@ -248,6 +248,9 @@ class saswp_fields_generator {
248
  <li class="check-img"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/google-1-img.png">
249
  <span class="saswp_cmpny">Google Reviews (Unlimited)</span>
250
  </li>
 
 
 
251
  </ul>
252
  <span class="saswp_lst">Integrations Coming soon</span>
253
  <ul>
@@ -518,11 +521,34 @@ class saswp_fields_generator {
518
  . '<p><a target="_blank" href="https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder">'.esc_html__( 'Place ID Finder', 'schema-and-structured-data-for-wp' ).'</a></p>'
519
  . '</div>'
520
  . '</div>';
521
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
522
 
523
  $input = $reviews;
524
 
525
- break;
 
526
 
527
  default:
528
 
248
  <li class="check-img"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/google-1-img.png">
249
  <span class="saswp_cmpny">Google Reviews (Unlimited)</span>
250
  </li>
251
+ <li class="check-img"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/shopper-approved-img.png">
252
+ <span class="saswp_cmpny">Shopper Approved (Unlimited)</span>
253
+ </li>
254
  </ul>
255
  <span class="saswp_lst">Integrations Coming soon</span>
256
  <ul>
521
  . '<p><a target="_blank" href="https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder">'.esc_html__( 'Place ID Finder', 'schema-and-structured-data-for-wp' ).'</a></p>'
522
  . '</div>'
523
  . '</div>';
524
+
525
+ $input = $reviews;
526
+
527
+ break;
528
+
529
+ case 'saswp-shopper-approved-section':
530
+
531
+ $reviews = '<div class="saswp-s-approved-reviews-settings saswp-knowledge-label">'
532
+ . '<table class="saswp-s-reviews-settings-table" style="width:100%">'
533
+ . '<tr>'
534
+ . '<td style="width:12%;"><strong>'.esc_html__( 'Site Id', 'schema-and-structured-data-for-wp' ).'</strong></td>'
535
+ . '<td style="width:10%;"><input class="saswp-g-location-field" id="saswp_s_approved_site_id" name="sd_data[saswp_s_approved_site_id]" type="text" value="'.$settings['saswp_s_approved_site_id'].'"></td>'
536
+ . '<td style="width:10%;"><strong>'.esc_html__( 'Token', 'schema-and-structured-data-for-wp' ).'</strong></td>'
537
+ . '<td style="width:20%;"><input class="saswp-g-blocks-field" id="saswp_s_approved_token" name="sd_data[saswp_s_approved_token]" type="text" value="'.$settings['saswp_s_approved_token'].'"></td>'
538
+ . '<td style="width:5%;"><strong>'.esc_html__( 'Reviews', 'schema-and-structured-data-for-wp' ).'</strong></td>'
539
+ . '<td style="width:15%;"><input class="saswp-g-blocks-field" id="saswp_s_approved_reviews" name="sd_data[saswp_s_approved_reviews]" type="number" min="1" max="500" value="'.$settings['saswp_s_approved_reviews'].'"></td>'
540
+ . '<td style="width:10%;"><a class="button button-default saswp-fetch-s-approved-reviews">'.esc_html__( 'Fetch', 'schema-and-structured-data-for-wp' ).'</a></td>'
541
+ . '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
542
+ . '</tr>'
543
+ . '</table>'
544
+ . '<div>'
545
+ . '</div>'
546
+ . '</div>';
547
 
548
  $input = $reviews;
549
 
550
+ break;
551
+
552
 
553
  default:
554
 
admin_section/images/reviews_platform_icon/shopper-approved-img.png ADDED
Binary file
admin_section/js/main-script.js CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  function getParameterByName(name, url) {
2
  if (!url){
3
  url = window.location.href;
@@ -19,7 +23,64 @@ function getParameterByName(name, url) {
19
 
20
  }
21
 
22
- var saswp_meta_fields = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  function saswp_get_post_specific_schema_fields(index, meta_name, div_type, schema_id, fields_type){
24
 
25
  if (!saswp_meta_fields[fields_type]) {
@@ -51,6 +112,7 @@ function getParameterByName(name, url) {
51
 
52
 
53
  }
 
54
  function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
55
 
56
  var html = '';
@@ -376,6 +438,43 @@ jQuery(document).ready(function($){
376
 
377
 
378
  switch(id){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
  case 'saswp-for-wordpress-checkbox':
380
 
381
  if ($(this).is(':checked')) {
@@ -709,6 +808,17 @@ jQuery(document).ready(function($){
709
  }
710
  break;
711
 
 
 
 
 
 
 
 
 
 
 
 
712
  case 'saswp-google-review-checkbox':
713
 
714
  if ($(this).is(':checked')) {
@@ -775,7 +885,7 @@ jQuery(document).ready(function($){
775
  $("#saswp-markup-footer").val(0);
776
  }
777
  break;
778
-
779
  case 'saswp-pretty-print-checkbox':
780
 
781
  if ($(this).is(':checked')) {
@@ -1300,7 +1410,16 @@ jQuery(document).ready(function($){
1300
 
1301
  $('#saswp-global-tabs a:first').addClass('saswp-global-selected');
1302
  $('.saswp-global-container').hide();
1303
- $('.saswp-global-container:first').show();
 
 
 
 
 
 
 
 
 
1304
 
1305
  $('#saswp-global-tabs a').click(function(){
1306
  var t = $(this).attr('data-id');
@@ -1364,18 +1483,21 @@ jQuery(document).ready(function($){
1364
  $(".saswp-custom-fields-div").hide();
1365
  }
1366
  });
1367
- $(document).on('change','.saswp-custom-fields-name',function(){
1368
-
1369
- $(this).parent().parent('tr').find("td:eq(1)").html('');
1370
- var field_name = $(this).val();
1371
- var html = '';
1372
- html += '<select class="saswp-custom-fields-select2" name="saswp_custom_fields['+field_name+']">';
1373
- html += '</select>';
1374
- $(this).parent().parent('tr').find("td:eq(1)").html(html);
1375
- saswpCustomSelect2();
1376
- } );
1377
-
1378
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1379
  $(document).on("click", '.saswp-skip-button', function(e){
1380
  e.preventDefault();
1381
  $(this).parent().parent().hide();
@@ -1412,48 +1534,55 @@ jQuery(document).ready(function($){
1412
  });
1413
 
1414
  //How to schema js ends here
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1415
 
1416
  $(document).on("click", '.saswp-add-custom-fields', function(){
1417
  var schema_type = $('select#schema_type option:selected').val();
1418
  var post_id = $('#post_ID').val();
1419
  if(schema_type !=''){
1420
- $.ajax({
 
 
 
1421
  type: "POST",
1422
  url:ajaxurl,
1423
  dataType: "json",
1424
  data:{action:"saswp_get_schema_type_fields",post_id:post_id, schema_type:schema_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1425
- success:function(response){
1426
-
1427
- if(response.length !=0){
1428
- var i =0;
1429
- var name ='';
1430
- var html = '<tr>';
1431
- html += '<td>';
1432
-
1433
- html += '<select class="saswp-custom-fields-name">';
1434
- $.each(response, function(key,value){
1435
- if(i==0){
1436
- name = key;
1437
- }
1438
- html += '<option value="'+key+'">'+value+'</option>';
1439
- i++;
1440
- });
1441
- html += '</select>';
1442
-
1443
- html += '</td>';
1444
- html += '<td>';
1445
- html += '<select class="saswp-custom-fields-select2" name="saswp_custom_fields['+name+']">';
1446
- html += '</select>';
1447
- html += '</td>';
1448
- html += '</tr>';
1449
- $(".saswp-custom-fields-table").append(html);
1450
- saswpCustomSelect2();
1451
- }
1452
  },
1453
  error: function(response){
1454
  console.log(response);
1455
  }
1456
  });
 
 
 
 
 
 
1457
  }
1458
  });
1459
  saswpCustomSelect2();
@@ -1597,6 +1726,85 @@ jQuery(document).ready(function($){
1597
 
1598
  });
1599
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1600
  $(document).on("click", '.saswp-fetch-g-reviews', function(){
1601
 
1602
  var current = $(this);
1
+ var saswp_meta_list = [];
2
+ var saswp_meta_fields = [];
3
+ var saswp_meta_list_fields = null;
4
+
5
  function getParameterByName(name, url) {
6
  if (!url){
7
  url = window.location.href;
23
 
24
  }
25
 
26
+
27
+ function saswp_meta_list_html(response, fields, field_name, id){
28
+
29
+ var re_html = '';
30
+ re_html += '<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+field_name+']">';
31
+ $.each(response, function(key,value){
32
+
33
+ re_html += '<optgroup label="'+value['label']+'">';
34
+
35
+ $.each(value['meta-list'], function(key, value){
36
+ re_html += '<option value="'+key+'">'+value+'</option>';
37
+ });
38
+ re_html += '</optgroup>';
39
+
40
+ });
41
+ re_html += '</select>';
42
+
43
+ if(fields){
44
+ var html = '<tr>';
45
+ html += '<td>';
46
+ html += '<select class="saswp-custom-fields-name">';
47
+ $.each(fields, function(key,value){
48
+ html += '<option value="'+key+'">'+value+'</option>';
49
+ });
50
+ html += '</select>';
51
+ html += '</td>';
52
+ html += '<td>';
53
+ html += re_html;
54
+ html += '</td>';
55
+ html += '</tr>';
56
+ $(".saswp-custom-fields-table").append(html);
57
+
58
+ }else{
59
+ $(id).html(re_html);
60
+ }
61
+
62
+ }
63
+
64
+
65
+
66
+
67
+ function saswp_get_meta_list(type, fields, id, fields_name){
68
+ if (!saswp_meta_list[type]) {
69
+
70
+ $.get(ajaxurl,
71
+ { action:"saswp_get_meta_list", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
72
+ function(response){
73
+ saswp_meta_list[type] = response[type];
74
+ saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id);
75
+
76
+ },'json');
77
+
78
+ }else{
79
+ saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id);
80
+ }
81
+
82
+ }
83
+
84
  function saswp_get_post_specific_schema_fields(index, meta_name, div_type, schema_id, fields_type){
85
 
86
  if (!saswp_meta_fields[fields_type]) {
112
 
113
 
114
  }
115
+
116
  function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
117
 
118
  var html = '';
438
 
439
 
440
  switch(id){
441
+
442
+ case 'saswp-the-seo-framework-checkbox':
443
+ saswp_compatibliy_notes(current, id);
444
+ if ($(this).is(':checked')) {
445
+ $("#saswp-the-seo-framework").val(1);
446
+ }else{
447
+ $("#saswp-the-seo-framework").val(0);
448
+ }
449
+ break;
450
+
451
+ case 'saswp-seo-press-checkbox':
452
+ saswp_compatibliy_notes(current, id);
453
+ if ($(this).is(':checked')) {
454
+ $("#saswp-seo-press").val(1);
455
+ }else{
456
+ $("#saswp-seo-press").val(0);
457
+ }
458
+ break;
459
+
460
+ case 'saswp-aiosp-checkbox':
461
+ saswp_compatibliy_notes(current, id);
462
+ if ($(this).is(':checked')) {
463
+ $("#saswp-aiosp").val(1);
464
+ }else{
465
+ $("#saswp-aiosp").val(0);
466
+ }
467
+ break;
468
+
469
+ case 'saswp-smart-crawl-checkbox':
470
+ saswp_compatibliy_notes(current, id);
471
+ if ($(this).is(':checked')) {
472
+ $("#saswp-smart-crawl").val(1);
473
+ }else{
474
+ $("#saswp-smart-crawl").val(0);
475
+ }
476
+ break;
477
+
478
  case 'saswp-for-wordpress-checkbox':
479
 
480
  if ($(this).is(':checked')) {
808
  }
809
  break;
810
 
811
+ case 'saswp-shopper-approved-review-checkbox':
812
+ saswp_compatibliy_notes(current, id);
813
+ if ($(this).is(':checked')) {
814
+ $("#saswp-shopper-approved-review").val(1);
815
+ $(".saswp-s-reviews-settings-table").parent().parent().parent().show();
816
+ }else{
817
+ $("#saswp-shopper-approved-review").val(0);
818
+ $(".saswp-s-reviews-settings-table").parent().parent().parent().hide();
819
+ }
820
+ break;
821
+
822
  case 'saswp-google-review-checkbox':
823
 
824
  if ($(this).is(':checked')) {
885
  $("#saswp-markup-footer").val(0);
886
  }
887
  break;
888
+
889
  case 'saswp-pretty-print-checkbox':
890
 
891
  if ($(this).is(':checked')) {
1410
 
1411
  $('#saswp-global-tabs a:first').addClass('saswp-global-selected');
1412
  $('.saswp-global-container').hide();
1413
+
1414
+ var hash = window.location.hash;
1415
+
1416
+ if(hash == '#saswp-default-container'){
1417
+ $('.saswp-global-container:eq(2)').show();
1418
+ }else{
1419
+ $('.saswp-global-container:first').show();
1420
+ }
1421
+
1422
+
1423
 
1424
  $('#saswp-global-tabs a').click(function(){
1425
  var t = $(this).attr('data-id');
1483
  $(".saswp-custom-fields-div").hide();
1484
  }
1485
  });
 
 
 
 
 
 
 
 
 
 
 
1486
 
1487
+ $(document).on('change','.saswp-custom-fields-name',function(){
1488
+
1489
+ var type = 'text';
1490
+ var fields_name = $(this).val();
1491
+ var str2 = "image";
1492
+ if(fields_name.indexOf(str2) != -1){
1493
+ type = 'image';
1494
+ }
1495
+
1496
+ var id = $(this).parent().parent('tr').find("td:eq(1)");
1497
+ saswp_get_meta_list(type, null, id, fields_name);
1498
+ $(this).parent().parent('tr').find("td:gt(1)").remove();
1499
+ });
1500
+
1501
  $(document).on("click", '.saswp-skip-button', function(e){
1502
  e.preventDefault();
1503
  $(this).parent().parent().hide();
1534
  });
1535
 
1536
  //How to schema js ends here
1537
+
1538
+
1539
+ $(document).on("change",".saswp-custom-meta-list", function(){
1540
+
1541
+ var meta_val = $(this).val();
1542
+ var field_name = $(this).parent().parent('tr').find(".saswp-custom-fields-name").val();
1543
+ var html = '';
1544
+ if(meta_val == 'manual_text'){
1545
+ html = '<td><input type="text" name="saswp_fixed_text['+field_name+']"></td>';
1546
+ }
1547
+
1548
+ if(meta_val == 'custom_field'){
1549
+ html += '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+field_name+']">';
1550
+ html += '</select></td>';
1551
+
1552
+ }
1553
+ $(this).parent().parent('tr').find("td:gt(1)").remove();
1554
+ $(this).parent().parent('tr').append(html);
1555
+ saswpCustomSelect2();
1556
+
1557
+ });
1558
 
1559
  $(document).on("click", '.saswp-add-custom-fields', function(){
1560
  var schema_type = $('select#schema_type option:selected').val();
1561
  var post_id = $('#post_ID').val();
1562
  if(schema_type !=''){
1563
+
1564
+ if(!saswp_meta_list_fields){
1565
+
1566
+ $.ajax({
1567
  type: "POST",
1568
  url:ajaxurl,
1569
  dataType: "json",
1570
  data:{action:"saswp_get_schema_type_fields",post_id:post_id, schema_type:schema_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1571
+ success:function(response){
1572
+ saswp_meta_list_fields = response;
1573
+ saswp_get_meta_list('text', saswp_meta_list_fields, null, null);
1574
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1575
  },
1576
  error: function(response){
1577
  console.log(response);
1578
  }
1579
  });
1580
+
1581
+
1582
+ }else{
1583
+ saswp_get_meta_list('text', saswp_meta_list_fields, null, null);
1584
+ }
1585
+
1586
  }
1587
  });
1588
  saswpCustomSelect2();
1726
 
1727
  });
1728
 
1729
+ function saswp_fetch_s_approved_reviews(current){
1730
+
1731
+ current.addClass('updating-message');
1732
+ $.get(ajaxurl,
1733
+ { action:"saswp_fetch_s_approved_reviews", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1734
+ function(response){
1735
+ current.removeClass('updating-message');
1736
+ console.log(response);
1737
+ if(response['status']){
1738
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1739
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
1740
+ }else{
1741
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1742
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1743
+ }
1744
+
1745
+ },'json');
1746
+
1747
+ }
1748
+
1749
+ function saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page, loop_run){
1750
+ current.addClass('updating-message');
1751
+ $.get(ajaxurl,
1752
+ { action:"saswp_add_s_approved_reviews",site_id:site_id,token:token,limit:limit,api_key:api_key,page:page, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1753
+ function(response){
1754
+ current.removeClass('updating-message');
1755
+ console.log(response);
1756
+ if(response['status']){
1757
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1758
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
1759
+ }else{
1760
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1761
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1762
+ }
1763
+ page++;
1764
+ if(page <loop_run){
1765
+ saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page);
1766
+ }else{
1767
+ saswp_fetch_s_approved_reviews(current);
1768
+ }
1769
+ },'json');
1770
+
1771
+ }
1772
+
1773
+ $(document).on("click",".saswp-fetch-s-approved-reviews", function(e){
1774
+
1775
+ e.preventDefault();
1776
+ var current = $(this);
1777
+ current.addClass('updating-message');
1778
+ var site_id = $("#saswp_s_approved_site_id").val();
1779
+ var token = $("#saswp_s_approved_token").val();
1780
+ var limit = $("#saswp_s_approved_reviews").val();
1781
+ var api_key = $("#reviews_addon_license_key").val();
1782
+ var loop_run = 1;
1783
+ var page = 0;
1784
+
1785
+ if(limit > 100){
1786
+ var div_limit = limit/100;
1787
+ var div_remainder = limit%100;
1788
+ loop_run = div_limit;
1789
+
1790
+ if(div_remainder){
1791
+ loop_run++;
1792
+ }
1793
+
1794
+ }
1795
+
1796
+ if(site_id && token && api_key){
1797
+
1798
+ saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page, loop_run);
1799
+
1800
+ }else{
1801
+ current.removeClass('updating-message');
1802
+ alert('Fill the site id and token with valid api key');
1803
+ }
1804
+
1805
+ });
1806
+
1807
+
1808
  $(document).on("click", '.saswp-fetch-g-reviews', function(){
1809
 
1810
  var current = $(this);
admin_section/js/main-script.min.js CHANGED
@@ -1,1784 +1 @@
1
- var saswp_meta_list = [];
2
- var saswp_meta_fields = [];
3
- var saswp_meta_list_fields = null;
4
-
5
- function getParameterByName(name, url) {
6
- if (!url){
7
- url = window.location.href;
8
- }
9
- name = name.replace(/[\[\]]/g, "\\$&");
10
- var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
11
- results = regex.exec(url);
12
- if (!results) return null;
13
- if (!results[2]) return "";
14
- return decodeURIComponent(results[2].replace(/\+/g, " "));
15
- }
16
-
17
- function saswp_schema_datepicker(){
18
-
19
- jQuery('.saswp-datepicker-picker').datepicker({
20
- dateFormat: "yy-mm-dd",
21
- minDate: 0
22
- });
23
-
24
- }
25
-
26
-
27
- function saswp_meta_list_html(response, fields, field_name, id){
28
-
29
- var re_html = '';
30
- re_html += '<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+field_name+']">';
31
- $.each(response, function(key,value){
32
-
33
- re_html += '<optgroup label="'+value['label']+'">';
34
-
35
- $.each(value['meta-list'], function(key, value){
36
- re_html += '<option value="'+key+'">'+value+'</option>';
37
- });
38
- re_html += '</optgroup>';
39
-
40
- });
41
- re_html += '</select>';
42
-
43
- if(fields){
44
- var html = '<tr>';
45
- html += '<td>';
46
- html += '<select class="saswp-custom-fields-name">';
47
- $.each(fields, function(key,value){
48
- html += '<option value="'+key+'">'+value+'</option>';
49
- });
50
- html += '</select>';
51
- html += '</td>';
52
- html += '<td>';
53
- html += re_html;
54
- html += '</td>';
55
- html += '</tr>';
56
- $(".saswp-custom-fields-table").append(html);
57
-
58
- }else{
59
- $(id).html(re_html);
60
- }
61
-
62
- }
63
-
64
-
65
-
66
-
67
- function saswp_get_meta_list(type, fields, id, fields_name){
68
- if (!saswp_meta_list[type]) {
69
-
70
- $.get(ajaxurl,
71
- { action:"saswp_get_meta_list", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
72
- function(response){
73
- saswp_meta_list[type] = response[type];
74
- saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id);
75
-
76
- },'json');
77
-
78
- }else{
79
- saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id);
80
- }
81
-
82
- }
83
-
84
- function saswp_get_post_specific_schema_fields(index, meta_name, div_type, schema_id, fields_type){
85
-
86
- if (!saswp_meta_fields[fields_type]) {
87
-
88
- $.get(ajaxurl,
89
- { action:"saswp_get_schema_dynamic_fields_ajax",meta_name:meta_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
90
- function(response){
91
- saswp_meta_fields[fields_type] = response;
92
- console.log(saswp_meta_fields);
93
- var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, response);
94
-
95
- if(html){
96
- $('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
97
- saswp_schema_datepicker();
98
- }
99
-
100
- },'json');
101
-
102
- }else{
103
-
104
- var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, saswp_meta_fields[fields_type]);
105
-
106
- if(html){
107
- $('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
108
- saswp_schema_datepicker();
109
- }
110
-
111
- }
112
-
113
-
114
- }
115
-
116
- function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
117
-
118
- var html = '';
119
-
120
- html += '<div class="saswp-'+div_type+'-table-div" data-id="'+index+'">'
121
- + '<a class="saswp-table-close">X</a>'
122
- + '<table class="form-table saswp-'+div_type+'-table">'
123
-
124
- $.each(schema_fields, function(eachindex, element){
125
-
126
- var meta_class = "";
127
- if(element.name == 'saswp_tvseries_season_published_date'){
128
- meta_class = "saswp-datepicker-picker";
129
- }
130
-
131
- switch(element.type) {
132
-
133
- case "text":
134
-
135
- html += '<tr>'
136
- + '<th>'+element.label+'</th><td><input class="'+meta_class+'" style="width:100%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']"></td>'
137
- + '</tr>';
138
-
139
- break;
140
-
141
- case "textarea":
142
-
143
- html += '<tr>'
144
- + '<th>'+element.label+'</th><td><textarea style="width: 100%" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']" rows="5"></textarea></td>'
145
- + '</tr>';
146
-
147
- break;
148
- case "select":
149
-
150
- var options_html = "";
151
- $.each(element.options, function(opt_index, opt_element){
152
- options_html += '<option value="'+opt_index+'">'+opt_element+'</option>';
153
- });
154
-
155
- html += '<tr>'
156
- + '<th>'+element.label+'</th>'
157
- + '<td>'
158
-
159
- + '<select id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']">'
160
- + options_html
161
- + '</select>'
162
-
163
- + '</td>'
164
- + '</tr>';
165
-
166
- break;
167
-
168
- case "media":
169
-
170
- html += '<tr>'
171
- + '<th>'+element.label+'</th>'
172
- + '<td>'
173
- + '<fieldset>'
174
- + '<input style="width:80%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+element.name+'_'+index+'_'+schema_id+'">'
175
- + '<input type="hidden" data-id="'+element.name+'_'+index+'_'+schema_id+'_id" name="'+fields_type+schema_id+'['+index+']['+element.name+'_id]" id="'+element.name+'_'+index+'_'+schema_id+'_id">'
176
- + '<input data-id="media" style="width: 19%" class="button" id="'+element.name+'_'+index+'_'+schema_id+'_button" name="'+element.name+'_'+index+'_'+schema_id+'_button" type="button" value="Upload">'
177
- + '<div class="saswp_image_div_'+element.name+'_'+index+'_'+schema_id+'">'
178
- + '</div>'
179
- + '</fieldset>'
180
- + '</td>'
181
- + '</tr>';
182
-
183
- break;
184
- default:
185
- // code block
186
- }
187
-
188
- });
189
- html += '</table>'
190
- + '</div>';
191
-
192
- return html;
193
-
194
- }
195
-
196
- jQuery(document).ready(function($){
197
-
198
- /* Newletters js starts here */
199
-
200
- if(saswp_localize_data.do_tour){
201
-
202
- var content = '<h3>Thanks for using Structured Data!</h3>';
203
- content += '<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>';
204
- content += '<style type="text/css">';
205
- content += '.wp-pointer-buttons{ padding:0; overflow: hidden; }';
206
- content += '.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }';
207
- content += '</style>';
208
- content += '<div id="afw_mc_embed_signup">';
209
- content += '<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">';
210
- content += '<div id="afw_mc_embed_signup_scroll">';
211
- content += '<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">';
212
- content += '<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">';
213
- content += '<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">';
214
- content += '<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">';
215
- content += '<input type="hidden" name="ml-submit" value="1" />';
216
- content += '</div>';
217
- content += '<div id="mce-responses">';
218
- content += '<div class="response" id="mce-error-response" style="display:none"></div>';
219
- content += '<div class="response" id="mce-success-response" style="display:none"></div>';
220
- content += '</div>';
221
- content += '<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>';
222
- content += '<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">';
223
- content += '</div>';
224
- content += '</form>';
225
- content += '</div>';
226
-
227
- var setup;
228
- var wp_pointers_tour_opts = {
229
- content:content,
230
- position:{
231
- edge:"top",
232
- align:"left"
233
- }
234
- };
235
-
236
- wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, {
237
- buttons: function (event, t) {
238
- button= jQuery ('<a id="pointer-close" class="button-secondary">' + saswp_localize_data.button1 + '</a>');
239
- button_2= jQuery ('#pointer-close.button');
240
- button.bind ('click.pointer', function () {
241
- t.element.pointer ('close');
242
- });
243
- button_2.on('click', function() {
244
- t.element.pointer ('close');
245
- } );
246
- return button;
247
- },
248
- close: function () {
249
- $.post (saswp_localize_data.ajax_url, {
250
- pointer: 'saswp_subscribe_pointer222',
251
- action: 'dismiss-wp-pointer'
252
- });
253
- },
254
- show: function(event, t){
255
- t.pointer.css({'left':'170px', 'top':'160px'});
256
- }
257
- });
258
- setup = function () {
259
- $(saswp_localize_data.displayID).pointer(wp_pointers_tour_opts).pointer('open');
260
- if (saswp_localize_data.button2) {
261
- jQuery ('#pointer-close').after ('<a id="pointer-primary" class="button-primary">' + saswp_localize_data.button2+ '</a>');
262
- jQuery ('#pointer-primary').click (function () {
263
- saswp_localize_data.function_name;
264
- });
265
- jQuery ('#pointer-close').click (function () {
266
- $.post (saswp_localize_data.ajax_url, {
267
- pointer: 'saswp_subscribe_pointer222',
268
- action: 'dismiss-wp-pointer'
269
- });
270
- });
271
- }
272
- };
273
- if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) {
274
- $(window).bind('load.wp-pointers', setup);
275
- }
276
- else {
277
- setup ();
278
- }
279
-
280
- }
281
-
282
- /* Newletters js ends here */
283
-
284
-
285
- $(".saswp-tabs a").click(function(e){
286
- var href = $(this).attr('href');
287
- var currentTab = getParameterByName('tab',href);
288
- if(!currentTab){
289
- currentTab = "general";
290
- }
291
- $(this).siblings().removeClass("nav-tab-active");
292
- $(this).addClass("nav-tab-active");
293
- $(".form-wrap").find(".saswp-"+currentTab).siblings().hide();
294
- $(".form-wrap .saswp-"+currentTab).show();
295
- window.history.pushState("", "", href);
296
- return false;
297
- });
298
-
299
- $(".saswp-schame-type-select").change(function(){
300
- $(".saswp-custom-fields-table").html('');
301
- var schematype = $ (this).val();
302
-
303
- $(".saswp-option-table-class tr").each(function(index,value){
304
- if(index>0){
305
- $(this).hide();
306
- $(this).find('select').attr('disabled', true);
307
- }
308
- });
309
- if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
310
-
311
- $(".saswp-enable-speakable").parent().parent().show();
312
- }else{
313
- $(".saswp-enable-speakable").parent().parent().hide();
314
- }
315
-
316
- if(schematype == 'local_business'){
317
- $(".saswp-option-table-class tr").eq(1).show();
318
- $(".saswp-business-text-field-tr").show();
319
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
320
- // $("#saswp_dayofweek").attr('disabled', false);
321
- $('.select-post-type').val('show_globally').trigger('change');
322
- }
323
- if(schematype == 'Service'){
324
- $(".saswp-service-text-field-tr").show();
325
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
326
- }
327
- if(schematype == 'Review'){
328
- $(".saswp-review-text-field-tr").show();
329
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
330
- saswp_item_reviewed_call();
331
- }
332
- if(schematype == 'Product'){
333
- $(".saswp-product-text-field-tr").show();
334
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
335
- }
336
- if(schematype == 'Event'){
337
- $(".saswp-event-text-field-tr").show();
338
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
339
- }
340
- if(schematype == 'AudioObject'){
341
- $(".saswp-audio-text-field-tr").show();
342
- }
343
- if(schematype == 'SoftwareApplication'){
344
- $(".saswp-softwareapplication-text-field-tr").show();
345
- }
346
-
347
- $(".saswp-schem-type-note").addClass('saswp_hide');
348
- if(schematype == 'qanda'){
349
- $(".saswp-schem-type-note").removeClass('saswp_hide');
350
- }
351
-
352
- $(".saswp-job-posting-note").addClass('saswp_hide');
353
-
354
- // if(schematype == 'JobPosting'){
355
- // $(".saswp-job-posting-note").removeClass('saswp_hide');
356
- // }
357
-
358
- saswp_enable_rating_review();
359
- });
360
-
361
- $("#saswp_business_type").change(function(){
362
- var businesstype = $ (this).val();
363
- var schematype = $(".saswp-schame-type-select").val();
364
-
365
- $(".saswp-option-table-class tr").each(function(index,value){
366
- if(index>1){
367
- $(this).hide();
368
- $(this).find('select').attr('disabled', true);
369
- }
370
- });
371
-
372
- if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
373
-
374
- $(".saswp-enable-speakable").parent().parent().show();
375
- }else{
376
- $(".saswp-enable-speakable").parent().parent().hide();
377
- }
378
-
379
- if(schematype == 'local_business'){
380
- $(".saswp-"+businesstype+'-tr').show();
381
- $(".saswp-business-text-field-tr").show();
382
- $(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
383
- // $("#saswp_dayofweek").attr('disabled', false);
384
- }
385
- if(schematype == 'Service'){
386
- $(".saswp-service-text-field-tr").show();
387
- $(".saswp-service-text-field-tr").find('select').attr('disabled', false);
388
- }
389
- if(schematype == 'Product'){
390
- $(".saswp-product-text-field-tr").show();
391
- $(".saswp-product-text-field-tr").find('select').attr('disabled', false);
392
- }
393
- if(schematype == 'AudioObject'){
394
- $(".saswp-audio-text-field-tr").show();
395
- }
396
- if(schematype == 'SoftwareApplication'){
397
- $(".saswp-softwareapplication-text-field-tr").show();
398
- }
399
-
400
- if(schematype == 'Review'){
401
- $(".saswp-review-text-field-tr").show();
402
- $(".saswp-review-text-field-tr").find('select').attr('disabled', false);
403
- }
404
- if(schematype == 'Event'){
405
- $(".saswp-event-text-field-tr").show();
406
- $(".saswp-event-text-field-tr").find('select').attr('disabled', false);
407
- }
408
- saswp_enable_rating_review();
409
- }).change();
410
-
411
-
412
- //Settings page jquery starts here
413
-
414
-
415
- function saswp_compatibliy_notes(current, id){
416
-
417
- var plugin_name = id.replace('-checkbox','');
418
- var text = $("#"+plugin_name).next('p').text();
419
-
420
- if (current.is(':checked') && text !=='') {
421
- $("#"+plugin_name).next('p').removeClass('saswp_hide');
422
- }else{
423
-
424
- if($("#"+plugin_name).next('p').attr('data-id') == 1){
425
- $("#"+plugin_name).next('p').text('This feature is only available in pro version');
426
- }else{
427
- $("#"+plugin_name).next('p').addClass('saswp_hide');
428
- }
429
- }
430
-
431
- }
432
-
433
-
434
- $(".saswp-checkbox").change(function(){
435
-
436
- var id = $(this).attr("id");
437
- var current = $(this);
438
-
439
-
440
- switch(id){
441
-
442
- case 'saswp-smart-crawl-checkbox':
443
-
444
- if ($(this).is(':checked')) {
445
- $("#saswp-smart-crawl").val(1);
446
- }else{
447
- $("#saswp-smart-crawl").val(0);
448
- }
449
- break;
450
-
451
- case 'saswp-for-wordpress-checkbox':
452
-
453
- if ($(this).is(':checked')) {
454
- $("#saswp-for-wordpress").val(1);
455
- }else{
456
- $("#saswp-for-wordpress").val(0);
457
- }
458
- break;
459
- case 'saswp-facebook-enable-checkbox':
460
-
461
- if ($(this).is(':checked')) {
462
- $("#saswp-facebook-enable").val(1);
463
- $("#sd_facebook").show();
464
- }else{
465
- $("#saswp-facebook-enable").val(0);
466
- $("#sd_facebook").hide();
467
- }
468
- break;
469
- case 'saswp-twitter-enable-checkbox':
470
-
471
- if ($(this).is(':checked')) {
472
- $("#saswp-twitter-enable").val(1);
473
- $("#sd_twitter").show();
474
- }else{
475
- $("#saswp-twitter-enable").val(0);
476
- $("#sd_twitter").hide();
477
- }
478
- break;
479
- case 'saswp-google-plus-enable-checkbox':
480
-
481
- if ($(this).is(':checked')) {
482
- $("#saswp-google-plus-enable").val(1);
483
- $("#sd_google_plus").show();
484
- }else{
485
- $("#saswp-google-plus-enable").val(0);
486
- $("#sd_google_plus").hide();
487
- }
488
- break;
489
- case 'saswp-instagram-enable-checkbox':
490
-
491
- if ($(this).is(':checked')) {
492
- $("#saswp-instagram-enable").val(1);
493
- $("#sd_instagram").show();
494
- }else{
495
- $("#saswp-instagram-enable").val(0);
496
- $("#sd_instagram").hide();
497
- }
498
- break;
499
- case 'saswp-youtube-enable-checkbox':
500
-
501
- if ($(this).is(':checked')) {
502
- $("#sd_youtube").show();
503
- $("#saswp-youtube-enable").val(1);
504
- }else{
505
- $("#saswp-youtube-enable").val(0);
506
- $("#sd_youtube").hide();
507
- }
508
- break;
509
- case 'saswp-linkedin-enable-checkbox':
510
-
511
- if ($(this).is(':checked')) {
512
- $("#saswp-linkedin-enable").val(1);
513
- $("#sd_linkedin").show();
514
- }else{
515
- $("#saswp-linkedin-enable").val(0);
516
- $("#sd_linkedin").hide();
517
- }
518
- break;
519
- case 'saswp-pinterest-enable-checkbox':
520
-
521
- if ($(this).is(':checked')) {
522
- $("#saswp-pinterest-enable").val(1);
523
- $("#sd_pinterest").show();
524
- }else{
525
- $("#saswp-pinterest-enable").val(0);
526
- $("#sd_pinterest").hide();
527
- }
528
- break;
529
- case 'saswp-soundcloud-enable-checkbox':
530
-
531
- if ($(this).is(':checked')) {
532
- $("#saswp-soundcloud-enable").val(1);
533
- $("#sd_soundcloud").show();
534
- }else{
535
- $("#saswp-soundcloud-enable").val(0);
536
- $("#sd_soundcloud").hide();
537
- }
538
- break;
539
- case 'saswp-tumblr-enable-checkbox':
540
-
541
- if ($(this).is(':checked')) {
542
- $("#saswp-tumblr-enable").val(1);
543
- $("#sd_tumblr").show();
544
- }else{
545
- $("#saswp-tumblr-enable").val(0);
546
- $("#sd_tumblr").hide();
547
- }
548
- break;
549
- case 'saswp-for-amp-checkbox':
550
-
551
- if ($(this).is(':checked')) {
552
- $("#saswp-for-amp").val(1);
553
- }else{
554
- $("#saswp-for-amp").val(0);
555
- }
556
- break;
557
- case 'saswp_kb_contact_1_checkbox':
558
-
559
- if ($(this).is(':checked')) {
560
- $("#saswp_kb_contact_1").val(1);
561
- $("#saswp_kb_telephone, #saswp_contact_type").parent().parent('li').removeClass("saswp-display-none");
562
- }else{
563
- $("#saswp_kb_contact_1").val(0);
564
- $("#saswp_kb_telephone, #saswp_contact_type").parent().parent('li').addClass("saswp-display-none");
565
- }
566
- break;
567
- case 'saswp-logo-dimensions-check':
568
-
569
- if ($(this).is(':checked')) {
570
- $("#saswp-logo-dimensions").val(1);
571
- $("#saswp-logo-width, #saswp-logo-height").parent().parent('li').show();
572
- }else{
573
- $("#saswp-logo-dimensions").val(0);
574
- $("#saswp-logo-width, #saswp-logo-height").parent().parent('li').hide();
575
- }
576
- break;
577
- case 'saswp_archive_schema_checkbox':
578
-
579
- if ($(this).is(':checked')) {
580
- $("#saswp_archive_schema").val(1);
581
- $(".saswp_archive_schema_type_class").parent().parent().show();
582
- }else{
583
- $("#saswp_archive_schema").val(0);
584
- $(".saswp_archive_schema_type_class").parent().parent().hide();
585
- }
586
- break;
587
-
588
- case 'saswp_website_schema_checkbox':
589
-
590
- if ($(this).is(':checked')) {
591
- $("#saswp_website_schema").val(1);
592
- $("#saswp_search_box_schema").parent().parent().show();
593
- }else{
594
- $("#saswp_website_schema").val(0);
595
- $("#saswp_search_box_schema").parent().parent().hide();
596
- }
597
- break;
598
-
599
- case 'saswp_search_box_schema_checkbox':
600
-
601
- if ($(this).is(':checked')) {
602
- $("#saswp_search_box_schema").val(1);
603
- }else{
604
- $("#saswp_search_box_schema").val(0);
605
- }
606
- break;
607
-
608
- case 'saswp_breadcrumb_schema_checkbox':
609
-
610
- if ($(this).is(':checked')) {
611
- $("#saswp_breadcrumb_schema").val(1);
612
- }else{
613
- $("#saswp_breadcrumb_schema").val(0);
614
- }
615
- break;
616
-
617
- case 'saswp_comments_schema_checkbox':
618
-
619
- if ($(this).is(':checked')) {
620
- $("#saswp_comments_schema").val(1);
621
- }else{
622
- $("#saswp_comments_schema").val(0);
623
- }
624
- break;
625
-
626
- case 'saswp-compativility-checkbox':
627
-
628
- if ($(this).is(':checked')) {
629
- $("#saswp-flexmlx-compativility").val(1);
630
- }else{
631
- $("#saswp-flexmlx-compativility").val(0);
632
- }
633
- break;
634
-
635
- case 'saswp-review-module-checkbox':
636
-
637
- if ($(this).is(':checked')) {
638
- $("#saswp-review-module").val(1);
639
- }else{
640
- $("#saswp-review-module").val(0);
641
- }
642
- break;
643
-
644
- case 'saswp-kk-star-raring-checkbox':
645
-
646
- saswp_compatibliy_notes(current, id);
647
- if ($(this).is(':checked')) {
648
- $("#saswp-kk-star-raring").val(1);
649
- }else{
650
- $("#saswp-kk-star-raring").val(0);
651
- }
652
- break;
653
- case 'saswp-woocommerce-checkbox':
654
- saswp_compatibliy_notes(current, id);
655
- if ($(this).is(':checked')) {
656
- $("#saswp-woocommerce").val(1);
657
- }else{
658
- $("#saswp-woocommerce").val(0);
659
- }
660
- break;
661
-
662
- case 'saswp-extra-checkbox':
663
- saswp_compatibliy_notes(current, id);
664
- if ($(this).is(':checked')) {
665
- $("#saswp-extra").val(1);
666
- }else{
667
- $("#saswp-extra").val(0);
668
- }
669
- break;
670
-
671
- case 'saswp-dw-question-answer-checkbox':
672
- saswp_compatibliy_notes(current, id);
673
- if ($(this).is(':checked')) {
674
- $("#saswp-dw-question-answer").val(1);
675
- }else{
676
- $("#saswp-dw-question-answer").val(0);
677
- }
678
- break;
679
-
680
- case 'saswp-wp-job-manager-checkbox':
681
- saswp_compatibliy_notes(current, id);
682
- if ($(this).is(':checked')) {
683
- $("#saswp-wp-job-manager").val(1);
684
- }else{
685
- $("#saswp-wp-job-manager").val(0);
686
- }
687
- break;
688
-
689
- case 'saswp-yoast-checkbox':
690
- saswp_compatibliy_notes(current, id);
691
- if ($(this).is(':checked')) {
692
- $("#saswp-yoast").val(1);
693
- }else{
694
- $("#saswp-yoast").val(0);
695
- }
696
- break;
697
-
698
- case 'saswp-rankmath-checkbox':
699
- saswp_compatibliy_notes(current, id);
700
- if ($(this).is(':checked')) {
701
- $("#saswp-rankmath").val(1);
702
- }else{
703
- $("#saswp-rankmath").val(0);
704
- }
705
- break;
706
-
707
- case 'saswp-tagyeem-checkbox':
708
- saswp_compatibliy_notes(current, id);
709
- if ($(this).is(':checked')) {
710
- $("#saswp-tagyeem").val(1);
711
- }else{
712
- $("#saswp-tagyeem").val(0);
713
- }
714
- break;
715
-
716
- case 'saswp-the-events-calendar-checkbox':
717
- saswp_compatibliy_notes(current, id);
718
- if ($(this).is(':checked')) {
719
- $("#saswp-the-events-calendar").val(1);
720
- }else{
721
- $("#saswp-the-events-calendar").val(0);
722
- }
723
- break;
724
-
725
-
726
- case 'saswp-woocommerce-booking-checkbox':
727
- saswp_compatibliy_notes(current, id);
728
- if ($(this).is(':checked')) {
729
- $("#saswp-woocommerce-booking").val(1);
730
- $("#saswp-woocommerce-booking-main").val(1);
731
- }else{
732
- $("#saswp-woocommerce-booking").val(0);
733
- $("#saswp-woocommerce-booking-main").val(0);
734
- }
735
- break;
736
-
737
- case 'saswp-woocommerce-booking-main-checkbox':
738
- saswp_compatibliy_notes(current, id);
739
- if ($(this).is(':checked')) {
740
- $("#saswp-woocommerce-booking-main").val(1);
741
- $("#saswp-woocommerce-booking").val(1);
742
- }else{
743
- $("#saswp-woocommerce-booking-main").val(0);
744
- $("#saswp-woocommerce-booking").val(0);
745
- }
746
- break;
747
-
748
- case 'saswp-woocommerce-membership-checkbox':
749
- saswp_compatibliy_notes(current, id);
750
- if ($(this).is(':checked')) {
751
- $("#saswp-woocommerce-membership").val(1);
752
- }else{
753
- $("#saswp-woocommerce-membership").val(0);
754
- }
755
- break;
756
-
757
- case 'saswp-defragment-checkbox':
758
-
759
- if ($(this).is(':checked')) {
760
- $("#saswp-defragment").val(1);
761
- }else{
762
- $("#saswp-defragment").val(0);
763
- }
764
- break;
765
-
766
- case 'saswp-cooked-checkbox':
767
- saswp_compatibliy_notes(current, id);
768
- if ($(this).is(':checked')) {
769
- $("#saswp-cooked").val(1);
770
- }else{
771
- $("#saswp-cooked").val(0);
772
- }
773
- break;
774
-
775
- case 'saswp-flexmlx-compativility-checkbox':
776
- saswp_compatibliy_notes(current, id);
777
- if ($(this).is(':checked')) {
778
- $("#saswp-flexmlx-compativility").val(1);
779
- }else{
780
- $("#saswp-flexmlx-compativility").val(0);
781
- }
782
- break;
783
-
784
- case 'saswp-google-review-checkbox':
785
-
786
- if ($(this).is(':checked')) {
787
-
788
- $("#saswp-google-review").val(1);
789
-
790
- if($("#saswp-google-rv-free-checkbox").length){
791
-
792
- $("#saswp-google-review-free").parent().parent().show();
793
-
794
- if($("#saswp-google-rv-free-checkbox").is(":checked")){
795
- $("#saswp_google_place_api_key").parent().parent().show();
796
- }else{
797
- $("#saswp_google_place_api_key").parent().parent().hide();
798
- }
799
- }else{
800
- $("#saswp_google_place_api_key").parent().parent().show();
801
- }
802
- $(".saswp-g-reviews-settings-table").parent().parent().parent().show();
803
-
804
- }else{
805
-
806
- $("#saswp-google-review").val(0);
807
- $("#saswp_google_place_api_key").parent().parent().hide();
808
- $(".saswp-g-reviews-settings-table").parent().parent().parent().hide();
809
-
810
- if($("#saswp-google-rv-free-checkbox").length){
811
- $("#saswp-google-review-free").parent().parent().hide();
812
-
813
- }
814
-
815
-
816
-
817
-
818
-
819
- }
820
- break;
821
-
822
- case 'saswp-google-rv-free-checkbox':
823
-
824
- if($("#saswp-google-review-checkbox").is(":checked")){
825
- if ($(this).is(':checked')) {
826
- $("#saswp-google-review-free").val(1);
827
- $("#saswp_google_place_api_key").parent().parent().show();
828
- }else{
829
- $("#saswp-google-review-free").val(0);
830
- $("#saswp_google_place_api_key").parent().parent().hide();
831
- }
832
-
833
- }else{
834
- $("#saswp-google-review-free").val(0);
835
- $("#saswp_google_place_api_key").parent().parent().hide();
836
- }
837
-
838
-
839
- break;
840
-
841
-
842
- case 'saswp-markup-footer-checkbox':
843
-
844
- if ($(this).is(':checked')) {
845
- $("#saswp-markup-footer").val(1);
846
- }else{
847
- $("#saswp-markup-footer").val(0);
848
- }
849
- break;
850
-
851
- case 'saswp-pretty-print-checkbox':
852
-
853
- if ($(this).is(':checked')) {
854
- $("#saswp-pretty-print").val(1);
855
- }else{
856
- $("#saswp-pretty-print").val(0);
857
- }
858
- break;
859
-
860
- case 'saswp-wppostratings-raring-checkbox':
861
- saswp_compatibliy_notes(current, id);
862
- if ($(this).is(':checked')) {
863
- $("#saswp-wppostratings-raring").val(1);
864
- }else{
865
- $("#saswp-wppostratings-raring").val(0);
866
- }
867
- break;
868
-
869
- case 'saswp-bbpress-checkbox':
870
- saswp_compatibliy_notes(current, id);
871
- if ($(this).is(':checked')) {
872
- $("#saswp-bbpress").val(1);
873
- }else{
874
- $("#saswp-bbpress").val(0);
875
- }
876
- break;
877
-
878
- case 'saswp-microdata-cleanup-checkbox':
879
-
880
- if ($(this).is(':checked')) {
881
- $("#saswp-microdata-cleanup").val(1);
882
- }else{
883
- $("#saswp-microdata-cleanup").val(0);
884
- }
885
- break;
886
-
887
-
888
- default:
889
- break;
890
- }
891
-
892
- }).change();
893
-
894
- $("#saswp_kb_type").change(function(){
895
-
896
- var datatype = $(this).val();
897
-
898
- $(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass('saswp_hide');
899
- $(".saswp_kg_logo").parent().parent().parent().addClass('saswp_hide');
900
- $("#sd-person-image").parent().parent().parent().addClass('saswp_hide');
901
-
902
-
903
- if(datatype == 'Organization'){
904
-
905
- $(".saswp_org_fields").parent().parent().removeClass('saswp_hide');
906
- $(".saswp_person_fields").parent().parent().addClass('saswp_hide');
907
- $(".saswp_kg_logo").parent().parent().parent().removeClass('saswp_hide');
908
- $("#sd-person-image").parent().parent().parent().addClass('saswp_hide');
909
- }
910
- if(datatype == 'Person'){
911
-
912
- $(".saswp_org_fields").parent().parent().addClass('saswp_hide');
913
- $(".saswp_person_fields").parent().parent().removeClass('saswp_hide');
914
- $(".saswp_kg_logo").parent().parent().parent().removeClass('saswp_hide');
915
- $("#sd-person-image").parent().parent().parent().removeClass('saswp_hide');
916
- }
917
-
918
- }).change();
919
-
920
- $(document).on("click", "input[data-id=media]" ,function(e) { // Application Icon upload
921
- e.preventDefault();
922
- var current = $(this);
923
- var button = current;
924
- var id = button.attr('id').replace('_button', '');
925
- var saswpMediaUploader = wp.media({
926
- title: "Application Icon",
927
- button: {
928
- text: "Select Icon"
929
- },
930
- multiple: false, // Set this to true to allow multiple files to be selected
931
- library:{type : 'image'}
932
- })
933
- .on("select", function() {
934
- var attachment = saswpMediaUploader.state().get('selection').first().toJSON();
935
-
936
- $("#"+id).val(attachment.url);
937
- $("input[data-id='"+id+"_id']").val(attachment.id);
938
- $("input[data-id='"+id+"_height']").val(attachment.height);
939
- $("input[data-id='"+id+"_width']").val(attachment.width);
940
- $("input[data-id='"+id+"_thumbnail']").val(attachment.url);
941
-
942
- if(current.attr('id') === 'sd_default_image_button'){
943
-
944
- $("#sd_default_image_width").val(attachment.width);
945
- $("#sd_default_image_height").val(attachment.height);
946
-
947
- }
948
- var smaller_img_notice = '';
949
- if("saswp_image_div_"+id == 'saswp_image_div_sd_default_image' && attachment.height < 1200){
950
- smaller_img_notice = '<p class="saswp_warning">Image size is smaller than recommended size</p>';
951
- }
952
-
953
- $(".saswp_image_div_"+id).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+attachment.url+'"/><a data-id="'+id+'" href="#" class="saswp_prev_close">X</a></div>'+smaller_img_notice);
954
-
955
- })
956
- .open();
957
- });
958
-
959
- $(document).on("click", ".saswp_prev_close", function(e){
960
- e.preventDefault();
961
-
962
- var id = $(this).attr('data-id');
963
- console.log(id);
964
- $(this).parent().remove();
965
- $("#"+id).val('');
966
- $("input[data-id='"+id+"_id']").val('');
967
- $("input[data-id='"+id+"_height']").val('');
968
- $("input[data-id='"+id+"_width']").val('');
969
- $("input[data-id='"+id+"_thumbnail']").val('');
970
-
971
- if(id === 'sd_default_image'){
972
-
973
- $("#sd_default_image_width").val('');
974
- $("#sd_default_image_height").val('');
975
-
976
- }
977
-
978
-
979
- });
980
-
981
- //Settings page jquery ends here
982
-
983
-
984
- $(document).on("change",".saswp-schema-type-toggle", function(e){
985
- var schema_id = $(this).attr("data-schema-id");
986
- var post_id = $(this).attr("data-post-id");
987
- if($(this).is(':checked')){
988
- var status = 1;
989
- }else{
990
- var status = 0;
991
- }
992
- $.ajax({
993
- type: "POST",
994
- url:ajaxurl,
995
- dataType: "json",
996
- data:{action:"saswp_enable_disable_schema_on_post",status:status, schema_id:schema_id, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
997
- success:function(response){
998
- },
999
- error: function(response){
1000
- console.log(response);
1001
- }
1002
- });
1003
-
1004
- });
1005
-
1006
-
1007
- $(document).on("click",".saswp-reset-data", function(e){
1008
- e.preventDefault();
1009
-
1010
- var saswp_confirm = confirm("Are you sure?");
1011
-
1012
- if(saswp_confirm == true){
1013
-
1014
- $.ajax({
1015
- type: "POST",
1016
- url:ajaxurl,
1017
- dataType: "json",
1018
- data:{action:"saswp_reset_all_settings", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1019
- success:function(response){
1020
- setTimeout(function(){ location.reload(); }, 1000);
1021
- },
1022
- error: function(response){
1023
- console.log(response);
1024
- }
1025
- });
1026
-
1027
- }
1028
-
1029
-
1030
- });
1031
-
1032
- //Licensing jquery starts here
1033
- $(document).on("click",".saswp_license_activation", function(e){
1034
- e.preventDefault();
1035
- var current = $(this);
1036
- current.addClass('updating-message');
1037
- var license_status = $(this).attr('license-status');
1038
- var add_on = $(this).attr('add-on');
1039
- var license_key = $("#"+add_on+"_addon_license_key").val();
1040
-
1041
- if(license_status && add_on && license_key){
1042
-
1043
- $.ajax({
1044
- type: "POST",
1045
- url:ajaxurl,
1046
- dataType: "json",
1047
- data:{action:"saswp_license_status_check",license_key:license_key,license_status:license_status, add_on:add_on, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1048
- success:function(response){
1049
-
1050
- $("#"+add_on+"_addon_license_key_status").val(response['status']);
1051
-
1052
- if(response['status'] =='active'){
1053
- $(".saswp-"+add_on+"-dashicons").addClass('dashicons-yes');
1054
- $(".saswp-"+add_on+"-dashicons").removeClass('dashicons-no-alt');
1055
- $(".saswp-"+add_on+"-dashicons").css("color", "green");
1056
-
1057
- $(".saswp_license_activation[add-on='" + add_on + "']").attr("license-status", "inactive");
1058
- $(".saswp_license_activation[add-on='" + add_on + "']").text("Deactivate");
1059
-
1060
- $(".saswp_license_status_msg[add-on='" + add_on + "']").text('Activated');
1061
-
1062
- $(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "green");
1063
- $(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
1064
-
1065
- }else{
1066
-
1067
- $(".saswp-"+add_on+"-dashicons").addClass('dashicons-no-alt');
1068
- $(".saswp-"+add_on+"-dashicons").removeClass('dashicons-yes');
1069
- $(".saswp-"+add_on+"-dashicons").css("color", "red");
1070
-
1071
- $(".saswp_license_activation[add-on='" + add_on + "']").attr("license-status", "active");
1072
- $(".saswp_license_activation[add-on='" + add_on + "']").text("Activate");
1073
-
1074
- $(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "red");
1075
- $(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
1076
- }
1077
- current.removeClass('updating-message');
1078
- },
1079
- error: function(response){
1080
- console.log(response);
1081
- }
1082
- });
1083
-
1084
- }else{
1085
- alert('Please enter value license key');
1086
- current.removeClass('updating-message');
1087
- }
1088
-
1089
- });
1090
- //Licensing jquery ends here
1091
- //query form send starts here
1092
-
1093
- $(".saswp-send-query").on("click", function(e){
1094
- e.preventDefault();
1095
- var message = $("#saswp_query_message").val();
1096
- if($.trim(message) !=''){
1097
- $.ajax({
1098
- type: "POST",
1099
- url:ajaxurl,
1100
- dataType: "json",
1101
- data:{action:"saswp_send_query_message", message:message, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1102
- success:function(response){
1103
- if(response['status'] =='t'){
1104
- $(".saswp-query-success").show();
1105
- $(".saswp-query-error").hide();
1106
- }else{
1107
- console.log('dd');
1108
- $(".saswp-query-success").hide();
1109
- $(".saswp-query-error").show();
1110
- }
1111
- },
1112
- error: function(response){
1113
- console.log(response);
1114
- }
1115
- });
1116
- }else{
1117
- alert('Please enter the message');
1118
- }
1119
-
1120
- });
1121
-
1122
- //Importer from schema plugin starts here
1123
-
1124
- $(".saswp-import-plugins").on("click", function(e){
1125
- e.preventDefault();
1126
- var current_selection = $(this);
1127
- current_selection.addClass('updating-message');
1128
- var plugin_name = $(this).attr('data-id');
1129
- $.get(ajaxurl,
1130
- { action:"saswp_import_plugin_data", plugin_name:plugin_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1131
- function(response){
1132
- if(response['status'] =='t'){
1133
- $(current_selection).parent().find(".saswp-imported-message").text(response['message']);
1134
- $(current_selection).parent().find(".saswp-imported-message").removeClass('saswp-error');
1135
- setTimeout(function(){ location.reload(); }, 2000);
1136
- }else{
1137
- $(current_selection).parent().find(".saswp-imported-message").addClass('saswp-error');
1138
- $(current_selection).parent().find(".saswp-imported-message").text(response['message']);
1139
- }
1140
- current_selection.removeClass('updating-message');
1141
- },'json');
1142
- });
1143
-
1144
-
1145
- $(".saswp-feedback-no-thanks").on("click", function(e){
1146
- e.preventDefault();
1147
- $.get(ajaxurl,
1148
- { action:"saswp_feeback_no_thanks"},
1149
- function(response){
1150
- if(response['status'] =='t'){
1151
- $(".saswp-feedback-notice").hide();
1152
- }
1153
- },'json');
1154
- });
1155
-
1156
- $(".saswp-feedback-remindme").on("click", function(e){
1157
- e.preventDefault();
1158
- $.get(ajaxurl,
1159
- { action:"saswp_feeback_remindme"},
1160
- function(response){
1161
- if(response['status'] =='t'){
1162
- $(".saswp-feedback-notice").hide();
1163
- }
1164
- },'json');
1165
- });
1166
-
1167
- $(document).on("change",'.saswp-local-business-type-select', function(e){
1168
- e.preventDefault();
1169
- var current = $(this);
1170
- var business_type = $(this).val();
1171
- $.get(ajaxurl,
1172
- { action:"saswp_get_sub_business_ajax", business_type:business_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1173
- function(response){
1174
-
1175
- if(response['status'] =='t'){
1176
- $(".saswp-local-business-name-select").parents('tr').remove();
1177
- var schema_id = current.parents('.saswp-post-specific-wrapper').attr('data-id');
1178
- var html ='<tr><th><label for="saswp_business_name_'+schema_id+'">Sub Business Type</label></th>';
1179
- html +='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+schema_id+'" name="saswp_business_name_'+schema_id+'">';
1180
- $.each(response['result'], function(index, element){
1181
- html +='<option value="'+index+'">'+element+'</option>';
1182
- });
1183
- html +='</select></td>';
1184
- html +='</tr>';
1185
- current.parents('.form-table tr:first').after(html);
1186
- }else{
1187
- $(".saswp-local-business-name-select").parents('tr').remove();
1188
- }
1189
- },'json');
1190
- });
1191
-
1192
-
1193
- function saswp_item_reviewed_call(){
1194
-
1195
- $(".saswp-item-reviewed").change(function(e){
1196
- e.preventDefault();
1197
- var schema_type ="";
1198
-
1199
- if($('select#schema_type option:selected').val()){
1200
- schema_type = $('select#schema_type option:selected').val();
1201
- }
1202
- if($(".saswp-tab-links.selected").attr('saswp-schema-type')){
1203
- schema_type = $(".saswp-tab-links.selected").attr('saswp-schema-type');
1204
- }
1205
-
1206
- if(schema_type === 'Review'){
1207
-
1208
- var current = $(this);
1209
- var item = $(this).val();
1210
- var post_id = saswp_localize_data.post_id;
1211
- var schema_id = $(current).attr('data-id');
1212
- var post_specific = $(current).attr('post-specific');
1213
- $.get(ajaxurl,
1214
- { action:"saswp_get_item_reviewed_fields",schema_id:schema_id, post_specific:post_specific ,item:item, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1215
- function(response){
1216
-
1217
- $(current).parent().parent().nextAll().remove(".saswp-review-tr");
1218
- $(current).parent().parent().after(response);
1219
-
1220
- });
1221
-
1222
- }
1223
-
1224
-
1225
- }).change();
1226
-
1227
- }
1228
- saswp_item_reviewed_call();
1229
-
1230
- function saswpAddTimepicker(){
1231
- $('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
1232
- }
1233
- $('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
1234
-
1235
- $(document).on("click",".saswp-add-custom-schema", function(e){
1236
-
1237
- e.preventDefault();
1238
-
1239
- $(".saswp-add-custom-schema-field").removeClass('saswp_hide');
1240
- $(this).hide();
1241
-
1242
- });
1243
-
1244
- $(document).on("click", ".saswp-delete-custom-schema", function(e){
1245
-
1246
- e.preventDefault();
1247
-
1248
- $("#saswp_custom_schema_field").val('');
1249
- $(".saswp-add-custom-schema-field").addClass('saswp_hide');
1250
- $(".saswp-add-custom-schema").show();
1251
-
1252
- });
1253
-
1254
- $(".saswp-modify_schema_post_enable").on("click", function(e){
1255
- var current = $(this);
1256
- current.addClass('updating-message');
1257
- e.preventDefault();
1258
- $.get(ajaxurl,
1259
- { action:"saswp_modify_schema_post_enable", post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1260
- function(response){
1261
- current.remove();
1262
- $(".saswp-add-custom-schema-div").remove();
1263
- $("#post_specific .inside").append(response);
1264
- current.removeClass('updating-message');
1265
- saswpAddTimepicker();
1266
- saswp_schema_datepicker();
1267
- saswp_enable_rating_review();
1268
- saswp_item_reviewed_call();
1269
- });
1270
-
1271
- });
1272
- saswp_schema_datepicker();
1273
-
1274
- saswp_reviews_datepicker();
1275
- function saswp_reviews_datepicker(){
1276
-
1277
- $('.saswp-reviews-datepicker-picker').datepicker({
1278
- dateFormat: "yy-mm-dd"
1279
- });
1280
- }
1281
-
1282
- //Review js starts here
1283
-
1284
- $(document).on("click", ".saswp-add-more-item",function(e){
1285
- e.preventDefault();
1286
- var rows = $('.saswp-review-item-list-table tr').length;
1287
- console.log(rows);
1288
- var html = '<tr class="saswp-review-item-tr">';
1289
- html += '<td>Review Item Feature</td>';
1290
- html += '<td><input type="text" name="saswp-review-item-feature[]"></td>';
1291
- html += '<td>Rating</td>';
1292
- html += '<td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td>';
1293
- html += '<td><a type="button" class="saswp-remove-review-item button">x</a></td>';
1294
- html += '</tr>';
1295
- $(".saswp-review-item-list-table").append(html);
1296
-
1297
- });
1298
-
1299
- $(document).on("click", ".saswp-remove-review-item", function(e){
1300
- e.preventDefault();
1301
- $(this).parent().parent('tr').remove();
1302
- });
1303
-
1304
- $(document).on("focusout", ".saswp-review-item-tr input[type=number]", function(e){
1305
- e.preventDefault();
1306
- var total_rating = 0;
1307
- var element_count = $(".saswp-review-item-tr input[type=number]").length;
1308
- $(".saswp-review-item-tr input[type=number]").each(function(index, element){
1309
- if($(element).val() ==''){
1310
- total_rating += parseFloat(0);
1311
- }else{
1312
- total_rating += parseFloat($(element).val());
1313
- }
1314
-
1315
- });
1316
- var over_all_rating = total_rating / element_count;
1317
- $("#saswp-review-item-over-all").val(over_all_rating);
1318
- });
1319
-
1320
- $("#saswp-review-location").change(function(){
1321
- var location = $(this).val();
1322
- $(".saswp-review-shortcode").addClass('saswp_hide');
1323
- if(location == 3){
1324
- $(".saswp-review-shortcode").removeClass('saswp_hide');
1325
- }
1326
- }).change();
1327
-
1328
- $("#saswp-review-item-enable").change(function(){
1329
- if ($(this).is(':checked')) {
1330
- $(".saswp-review-fields").show();
1331
- }else{
1332
- $(".saswp-review-fields").hide();
1333
- }
1334
- }).change();
1335
-
1336
- $(document).on("click", ".saswp-restore-post-schema", function(e){
1337
- e.preventDefault();
1338
- var current = $(this);
1339
- current.addClass('updating-message');
1340
-
1341
- if($(".saswp-post-specific-schema-ids").val()){
1342
- var schema_ids = JSON.parse($(".saswp-post-specific-schema-ids").val());
1343
- }
1344
-
1345
- $.post(ajaxurl,
1346
- { action:"saswp_restore_schema", schema_ids:schema_ids,post_id: saswp_localize_data.post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1347
- function(response){
1348
- if(response['status'] =='t'){
1349
- setTimeout(function(){ location.reload(); }, 1000);
1350
- }else{
1351
- alert(response['msg']);
1352
- setTimeout(function(){ location.reload(); }, 1000);
1353
- }
1354
- current.removeClass('updating-message');
1355
- },'json');
1356
- });
1357
-
1358
- //Review js ends here
1359
-
1360
- $(document).on("click","div.saswp-tab ul.saswp-tab-nav a", function(e){
1361
- e.preventDefault();
1362
- var attr = $(this).attr('data-id');
1363
- $(".saswp-post-specific-wrapper").hide();
1364
- $("#"+attr).show();
1365
- $('div.saswp-tab ul.saswp-tab-nav a').removeClass('selected');
1366
- $('div.saswp-tab ul.saswp-tab-nav li').removeClass('selected');
1367
- $(this).addClass('selected');
1368
- $(this).parent().addClass('selected');
1369
- saswp_enable_rating_review();
1370
- });
1371
-
1372
-
1373
- $('#saswp-global-tabs a:first').addClass('saswp-global-selected');
1374
- $('.saswp-global-container').hide();
1375
-
1376
- var hash = window.location.hash;
1377
-
1378
- if(hash == '#saswp-default-container'){
1379
- $('.saswp-global-container:eq(2)').show();
1380
- }else{
1381
- $('.saswp-global-container:first').show();
1382
- }
1383
-
1384
-
1385
-
1386
- $('#saswp-global-tabs a').click(function(){
1387
- var t = $(this).attr('data-id');
1388
-
1389
- if(!$(this).hasClass('saswp-global-selected')){
1390
- $('#saswp-global-tabs a').removeClass('saswp-global-selected');
1391
- $(this).addClass('saswp-global-selected');
1392
-
1393
- $('.saswp-global-container').hide();
1394
- $('#'+t).show();
1395
- }
1396
- });
1397
-
1398
-
1399
- $('#saswp-tools-tabs a:first').addClass('saswp-global-selected');
1400
- $('.saswp-tools-container').hide();
1401
- $('.saswp-tools-container:first').show();
1402
-
1403
- $('#saswp-tools-tabs a').click(function(){
1404
- var t = $(this).attr('data-id');
1405
-
1406
- if(!$(this).hasClass('saswp-global-selected')){
1407
- $('#saswp-tools-tabs a').removeClass('saswp-global-selected');
1408
- $(this).addClass('saswp-global-selected');
1409
-
1410
- $('.saswp-tools-container').hide();
1411
- $('#'+t).show();
1412
- }
1413
- });
1414
-
1415
-
1416
- $('#saswp-review-tabs a:first').addClass('saswp-global-selected');
1417
- $('.saswp-review-container').hide();
1418
- $('.saswp-review-container:first').show();
1419
-
1420
- $('#saswp-review-tabs a').click(function(){
1421
- var t = $(this).attr('data-id');
1422
-
1423
- if(!$(this).hasClass('saswp-global-selected')){
1424
- $('#saswp-review-tabs a').removeClass('saswp-global-selected');
1425
- $(this).addClass('saswp-global-selected');
1426
-
1427
- $('.saswp-review-container').hide();
1428
- $('#'+t).show();
1429
- }
1430
- });
1431
-
1432
-
1433
- //Importer from schema plugin ends here
1434
-
1435
- //custom fields modify schema starts here
1436
-
1437
- //Changing the url of add new schema type
1438
- $('a[href="'+saswp_localize_data.new_url_selector+'"]').attr( 'href', saswp_localize_data.new_url_href);
1439
-
1440
-
1441
- $("#saswp_enable_custom_field").change(function(){
1442
- if ($(this).is(':checked')) {
1443
- $(".saswp-custom-fields-div").show();
1444
- }else{
1445
- $(".saswp-custom-fields-div").hide();
1446
- }
1447
- });
1448
-
1449
- $(document).on('change','.saswp-custom-fields-name',function(){
1450
-
1451
- var type = 'text';
1452
- var fields_name = $(this).val();
1453
- var str2 = "image";
1454
- if(fields_name.indexOf(str2) != -1){
1455
- type = 'image';
1456
- }
1457
-
1458
- var id = $(this).parent().parent('tr').find("td:eq(1)");
1459
- saswp_get_meta_list(type, null, id, fields_name);
1460
- $(this).parent().parent('tr').find("td:gt(1)").remove();
1461
- });
1462
-
1463
- $(document).on("click", '.saswp-skip-button', function(e){
1464
- e.preventDefault();
1465
- $(this).parent().parent().hide();
1466
-
1467
- $.post(ajaxurl,
1468
- { action:"saswp_skip_wizard", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1469
- function(response){
1470
-
1471
- },'json');
1472
-
1473
- });
1474
-
1475
- $(document).on("click", ".saswp_add_schema_fields_on_fly", function(e){
1476
- e.preventDefault();
1477
-
1478
- var schema_id = $(this).attr('data-id');
1479
- var fields_type = $(this).attr('fields_type');
1480
- var div_type = $(this).attr('div_type');
1481
-
1482
- var count = $(".saswp-"+div_type+"-table-div").length;
1483
- var index = $( ".saswp-"+div_type+"-table-div:nth-child("+count+")" ).attr('data-id');
1484
- index = ++index;
1485
-
1486
- if(!index){
1487
- index = 0;
1488
- }
1489
-
1490
- saswp_get_post_specific_schema_fields(index, fields_type, div_type, schema_id, fields_type+'_');
1491
-
1492
- });
1493
-
1494
- $(document).on("click", ".saswp-table-close", function(){
1495
- $(this).parent().remove();
1496
- });
1497
-
1498
- //How to schema js ends here
1499
-
1500
-
1501
- $(document).on("change",".saswp-custom-meta-list", function(){
1502
-
1503
- var meta_val = $(this).val();
1504
- var field_name = $(this).parent().parent('tr').find(".saswp-custom-fields-name").val();
1505
- var html = '';
1506
- if(meta_val == 'manual_text'){
1507
- html = '<td><input type="text" name="saswp_fixed_text['+field_name+']"></td>';
1508
- }
1509
-
1510
- if(meta_val == 'custom_field'){
1511
- html += '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+field_name+']">';
1512
- html += '</select></td>';
1513
-
1514
- }
1515
- $(this).parent().parent('tr').find("td:gt(1)").remove();
1516
- $(this).parent().parent('tr').append(html);
1517
- saswpCustomSelect2();
1518
-
1519
- });
1520
-
1521
- $(document).on("click", '.saswp-add-custom-fields', function(){
1522
- var schema_type = $('select#schema_type option:selected').val();
1523
- var post_id = $('#post_ID').val();
1524
- if(schema_type !=''){
1525
-
1526
- if(!saswp_meta_list_fields){
1527
-
1528
- $.ajax({
1529
- type: "POST",
1530
- url:ajaxurl,
1531
- dataType: "json",
1532
- data:{action:"saswp_get_schema_type_fields",post_id:post_id, schema_type:schema_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1533
- success:function(response){
1534
- saswp_meta_list_fields = response;
1535
- saswp_get_meta_list('text', saswp_meta_list_fields, null, null);
1536
-
1537
- },
1538
- error: function(response){
1539
- console.log(response);
1540
- }
1541
- });
1542
-
1543
-
1544
- }else{
1545
- saswp_get_meta_list('text', saswp_meta_list_fields, null, null);
1546
- }
1547
-
1548
- }
1549
- });
1550
- saswpCustomSelect2();
1551
- function saswpCustomSelect2(){
1552
- if((saswp_localize_data.post_type == 'saswp' || saswp_localize_data.page_now =='saswp') && saswp_localize_data.page_now !='saswp_page_structured_data_options'){
1553
-
1554
- $('.saswp-custom-fields-select2').select2({
1555
- ajax: {
1556
- type: "POST",
1557
- url: ajaxurl, // AJAX URL is predefined in WordPress admin
1558
- dataType: 'json',
1559
- delay: 250, // delay in ms while typing when to perform a AJAX search
1560
- data: function (params) {
1561
- return {
1562
- saswp_security_nonce: saswp_localize_data.saswp_security_nonce,
1563
- q: params.term, // search query
1564
- action: 'saswp_get_custom_meta_fields' // AJAX action for admin-ajax.php
1565
- };
1566
- },
1567
- processResults: function( data ) {
1568
- return {
1569
- results: data
1570
- };
1571
- },
1572
- cache: true
1573
- },
1574
- minimumInputLength: 2 // the minimum of symbols to input before perform a search
1575
- });
1576
-
1577
- }
1578
-
1579
- }
1580
-
1581
- function saswp_enable_rating_review(){
1582
- var schema_type ="";
1583
- if($('select#schema_type option:selected').val()){
1584
- schema_type = $('select#schema_type option:selected').val();
1585
- }
1586
- if($(".saswp-tab-links.selected").attr('saswp-schema-type')){
1587
- schema_type = $(".saswp-tab-links.selected").attr('saswp-schema-type');
1588
- }
1589
-
1590
- if(schema_type){
1591
- $(".saswp-enable-rating-review-"+schema_type.toLowerCase()).change(function(){
1592
-
1593
- if($(this).is(':checked')){
1594
- $(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).show();
1595
- }else{
1596
- $(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).hide();
1597
- }
1598
-
1599
- }).change();
1600
- }
1601
-
1602
- }
1603
- saswp_enable_rating_review();
1604
-
1605
- //custom fields modify schema ends here
1606
-
1607
-
1608
- //Google review js starts here
1609
-
1610
- $('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr( 'href', saswp_localize_data.collection_post_add_new_url);
1611
-
1612
-
1613
-
1614
- $(document).on("click", '.saswp_coonect_google_place', function(){
1615
-
1616
- var place_id = $("#saswp_google_place_id").val();
1617
- var language = $("#saswp_language_list").val();
1618
- var google_api = $("#saswp_googel_api").val();
1619
-
1620
- if(place_id !=''){
1621
- $.ajax({
1622
- type: "POST",
1623
- url:ajaxurl,
1624
- dataType: "json",
1625
- data:{action:"saswp_connect_google_place",place_id:place_id, language:language, google_api:google_api, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1626
- success:function(response){
1627
- console.log(response['status']);
1628
- },
1629
- error: function(response){
1630
- console.log(response);
1631
- }
1632
- });
1633
- }
1634
- });
1635
-
1636
- //google review js ends here
1637
-
1638
- //Adding settings button beside add schema type button on schema type list page
1639
-
1640
- if ('saswp' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
1641
-
1642
- jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
1643
-
1644
- }
1645
-
1646
- //star rating stars here
1647
- if(typeof(saswp_reviews_data) !== 'undefined'){
1648
-
1649
- $(".saswp-rating-div").rateYo({
1650
-
1651
- rating: saswp_reviews_data.rating_val,
1652
- halfStar: true,
1653
- //normalFill: "#ffd700",
1654
- readOnly: saswp_reviews_data.readonly,
1655
- onSet: function (rating, rateYoInstance) {
1656
- $(this).next().val(rating);
1657
- console.log(rating);
1658
- }
1659
-
1660
- });
1661
-
1662
- }
1663
- $(document).on("click", ".saswp-add-g-location-btn", function(e){
1664
-
1665
- var blocks_field = '';
1666
-
1667
- if($("#saswp_google_place_api_key").length){
1668
-
1669
- blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">';
1670
- }else{
1671
- blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">';
1672
- }
1673
-
1674
- e.preventDefault();
1675
- var html = '';
1676
- html += '<tr>'
1677
- + '<td style="width:12%;"><strong>Place Id</strong></td>'
1678
- + '<td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td>'
1679
- + '<td style="width:10%;"><strong>Reviews</strong></td>'
1680
- + '<td style="width:10%;">'+blocks_field+'</td>'
1681
- + '<td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td>'
1682
- + '<td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td>'
1683
- + '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
1684
- + '</tr>';
1685
- if(html){
1686
- $(".saswp-g-reviews-settings-table").append(html);
1687
- }
1688
-
1689
- });
1690
-
1691
- $(document).on("click", '.saswp-fetch-g-reviews', function(){
1692
-
1693
- var current = $(this);
1694
- var premium_status = 'free';
1695
- current.addClass('updating-message');
1696
-
1697
- var location = $(this).parent().parent().find('.saswp-g-location-field').val();
1698
- var blocks = $(this).parent().parent().find('.saswp-g-blocks-field').val();
1699
- var g_api = $("#saswp_google_place_api_key").val();
1700
- var reviews_api = $("#reviews_addon_license_key").val();
1701
- var reviews_api_status = $("#reviews_addon_license_key_status").val();
1702
-
1703
- if($("#saswp_google_place_api_key").length){
1704
- premium_status = 'free';
1705
- }else{
1706
- premium_status = 'premium';
1707
- }
1708
-
1709
- if(premium_status == 'premium'){
1710
-
1711
- if(blocks > 0){
1712
-
1713
- var blocks_remainder = blocks % 10;
1714
-
1715
- if(blocks_remainder != 0){
1716
-
1717
- current.parent().parent().find('.saswp-rv-fetched-msg').text('Reviews count should be in step of 10');
1718
- current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1719
- current.removeClass('updating-message');
1720
- return false;
1721
-
1722
- }
1723
-
1724
- }else{
1725
- alert('Blocks value is zero');
1726
- current.removeClass('updating-message');
1727
- return false;
1728
- }
1729
-
1730
- }
1731
-
1732
- if(location !='' && (reviews_api || g_api)){
1733
- $.ajax({
1734
- type: "POST",
1735
- url:ajaxurl,
1736
- dataType: "json",
1737
- data:{action:"saswp_fetch_google_reviews",reviews_api_status:reviews_api_status, reviews_api:reviews_api,location:location,blocks:blocks,g_api:g_api,premium_status:premium_status, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1738
- success:function(response){
1739
- if(response['status'] =='t'){
1740
- current.parent().parent().find('.saswp-rv-fetched-msg').text('Success');
1741
- current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
1742
- }else{
1743
- current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1744
- current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1745
- }
1746
- current.removeClass('updating-message');
1747
- },
1748
- error: function(response){
1749
- console.log(response);
1750
- }
1751
- });
1752
- }else{
1753
- if(location ==''){
1754
- alert('Please enter place id');
1755
- }
1756
- if(g_api ==''){
1757
- alert('Please enter api key');
1758
- }
1759
- if(reviews_api ==''){
1760
- alert('Please enter reviews api key');
1761
- }
1762
- current.removeClass('updating-message');
1763
- }
1764
- });
1765
-
1766
- //rating ends here
1767
-
1768
- $("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){
1769
- var current = $(this);
1770
-
1771
- current.parent().find('.saswp-phone-validation').remove();
1772
-
1773
- var pnumber = $(this).val();
1774
- var p_regex = /^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/;
1775
-
1776
- if(!p_regex.test(pnumber)){
1777
- current.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>');
1778
- }else{
1779
- current.parent().find('.saswp-phone-validation').remove();
1780
- }
1781
-
1782
- });
1783
-
1784
- });
1
+ var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=null;function getParameterByName(e,s){s||(s=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(s);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd",minDate:0})}function saswp_meta_list_html(e,s,a,t){var i="";if(i+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+a+']">',$.each(e,function(e,s){i+='<optgroup label="'+s.label+'">',$.each(s["meta-list"],function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</optgroup>"}),i+="</select>",s){var n="<tr>";n+="<td>",n+='<select class="saswp-custom-fields-name">',$.each(s,function(e,s){n+='<option value="'+e+'">'+s+"</option>"}),n+="</select>",n+="</td>",n+="<td>",n+=i,n+="</td>",n+="</tr>",$(".saswp-custom-fields-table").append(n)}else $(t).html(i)}function saswp_get_meta_list(e,s,a,t){saswp_meta_list[e]?saswp_meta_list_html(saswp_meta_list[e],s,t,a):$.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(i){saswp_meta_list[e]=i[e],saswp_meta_list_html(saswp_meta_list[e],s,t,a)},"json")}function saswp_get_post_specific_schema_fields(e,s,a,t,i){if(saswp_meta_fields[i]){var n=saswp_fields_html_generator(e,t,i,a,saswp_meta_fields[i]);n&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(n),saswp_schema_datepicker())}else $.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){saswp_meta_fields[i]=s,console.log(saswp_meta_fields);var n=saswp_fields_html_generator(e,t,i,a,s);n&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(n),saswp_schema_datepicker())},"json")}function saswp_fields_html_generator(e,s,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',$.each(i,function(t,i){var o="";switch("saswp_tvseries_season_published_date"==i.name&&(o="saswp-datepicker-picker"),i.type){case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+o+'" style="width:100%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var p="";$.each(i.options,function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+p+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+i.name+"_"+e+"_"+s+'"><input type="hidden" data-id="'+i.name+"_"+e+"_"+s+'_id" name="'+a+s+"["+e+"]["+i.name+'_id]" id="'+i.name+"_"+e+"_"+s+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+e+"_"+s+'_button" name="'+i.name+"_"+e+"_"+s+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+e+"_"+s+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}jQuery(document).ready(function(e){if(saswp_localize_data.do_tour){var s,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};s=function(){e(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})}))},(t=e.extend(t,{buttons:function(e,s){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){s.element.pointer("close")}),button_2.on("click",function(){s.element.pointer("close")}),button},close:function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})},show:function(e,s){s.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?e(window).bind("load.wp-pointers",s):s()}function i(s,a){var t=a.replace("-checkbox",""),i=e("#"+t).next("p").text();s.is(":checked")&&""!==i?e("#"+t).next("p").removeClass("saswp_hide"):1==e("#"+t).next("p").attr("data-id")?e("#"+t).next("p").text("This feature is only available in pro version"):e("#"+t).next("p").addClass("saswp_hide")}function n(){e(".saswp-item-reviewed").change(function(s){s.preventDefault();var a="";if(e("select#schema_type option:selected").val()&&(a=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(a=e(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===a){var t=e(this),i=e(this).val(),n=saswp_localize_data.post_id,o=e(t).attr("data-id"),p=e(t).attr("post-specific");e.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:o,post_specific:p,item:i,post_id:n,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){e(t).parent().parent().nextAll().remove(".saswp-review-tr"),e(t).parent().parent().after(s)})}}).change()}function o(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||e(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(e){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:e.term,action:"saswp_get_custom_meta_fields"}},processResults:function(e){return{results:e}},cache:!0},minimumInputLength:2})}function p(){var s="";e("select#schema_type option:selected").val()&&(s=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=e(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&e(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}function c(s,a,t,i,n,o,p){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_add_s_approved_reviews",site_id:a,token:t,limit:i,api_key:n,page:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(l){s.removeClass("updating-message"),console.log(l),l.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text(l.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(l.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),++o<p?c(s,a,t,i,n,o):function(s){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_fetch_s_approved_reviews",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s.removeClass("updating-message"),console.log(e),e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"))},"json")}(s)},"json")}e(".saswp-tabs a").click(function(s){var a=e(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),e(this).siblings().removeClass("nav-tab-active"),e(this).addClass("nav-tab-active"),e(".form-wrap").find(".saswp-"+t).siblings().hide(),e(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),e(".saswp-schame-type-select").change(function(){e(".saswp-custom-fields-table").html("");var s=e(this).val();e(".saswp-option-table-class tr").each(function(s,a){s>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==s||"Article"==s||"Blogposting"==s||"NewsArticle"==s||"WebPage"==s?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==s&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==s&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==s&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),n()),"Product"==s&&(e(".saswp-product-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==s&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"AudioObject"==s&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==s&&e(".saswp-softwareapplication-text-field-tr").show(),e(".saswp-schem-type-note").addClass("saswp_hide"),"qanda"==s&&e(".saswp-schem-type-note").removeClass("saswp_hide"),e(".saswp-job-posting-note").addClass("saswp_hide"),p()}),e("#saswp_business_type").change(function(){var s=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(s,a){s>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+s+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+s+"-tr").find("select").attr("disabled",!1)),"Service"==a&&(e(".saswp-service-text-field-tr").show(),e(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Product"==a&&(e(".saswp-product-text-field-tr").show(),e(".saswp-product-text-field-tr").find("select").attr("disabled",!1)),"AudioObject"==a&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==a&&e(".saswp-softwareapplication-text-field-tr").show(),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-event-text-field-tr").find("select").attr("disabled",!1)),p()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-the-seo-framework-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-the-seo-framework").val(1):e("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-seo-press").val(1):e("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-aiosp").val(1):e("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-smart-crawl").val(1):e("#saswp-smart-crawl").val(0);break;case"saswp-for-wordpress-checkbox":e(this).is(":checked")?e("#saswp-for-wordpress").val(1):e("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":e(this).is(":checked")?(e("#saswp-facebook-enable").val(1),e("#sd_facebook").show()):(e("#saswp-facebook-enable").val(0),e("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":e(this).is(":checked")?(e("#saswp-twitter-enable").val(1),e("#sd_twitter").show()):(e("#saswp-twitter-enable").val(0),e("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":e(this).is(":checked")?(e("#saswp-google-plus-enable").val(1),e("#sd_google_plus").show()):(e("#saswp-google-plus-enable").val(0),e("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":e(this).is(":checked")?(e("#saswp-instagram-enable").val(1),e("#sd_instagram").show()):(e("#saswp-instagram-enable").val(0),e("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":e(this).is(":checked")?(e("#sd_youtube").show(),e("#saswp-youtube-enable").val(1)):(e("#saswp-youtube-enable").val(0),e("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":e(this).is(":checked")?(e("#saswp-linkedin-enable").val(1),e("#sd_linkedin").show()):(e("#saswp-linkedin-enable").val(0),e("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":e(this).is(":checked")?(e("#saswp-pinterest-enable").val(1),e("#sd_pinterest").show()):(e("#saswp-pinterest-enable").val(0),e("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":e(this).is(":checked")?(e("#saswp-soundcloud-enable").val(1),e("#sd_soundcloud").show()):(e("#saswp-soundcloud-enable").val(0),e("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":e(this).is(":checked")?(e("#saswp-tumblr-enable").val(1),e("#sd_tumblr").show()):(e("#saswp-tumblr-enable").val(0),e("#sd_tumblr").hide());break;case"saswp-for-amp-checkbox":e(this).is(":checked")?e("#saswp-for-amp").val(1):e("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":e(this).is(":checked")?(e("#saswp_kb_contact_1").val(1),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(e("#saswp_kb_contact_1").val(0),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":e(this).is(":checked")?(e("#saswp-logo-dimensions").val(1),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(e("#saswp-logo-dimensions").val(0),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":e(this).is(":checked")?(e("#saswp_archive_schema").val(1),e(".saswp_archive_schema_type_class").parent().parent().show()):(e("#saswp_archive_schema").val(0),e(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":e(this).is(":checked")?(e("#saswp_website_schema").val(1),e("#saswp_search_box_schema").parent().parent().show()):(e("#saswp_website_schema").val(0),e("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":e(this).is(":checked")?e("#saswp_search_box_schema").val(1):e("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":e(this).is(":checked")?e("#saswp_breadcrumb_schema").val(1):e("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":e(this).is(":checked")?e("#saswp_comments_schema").val(1):e("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":e(this).is(":checked")?e("#saswp-review-module").val(1):e("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-kk-star-raring").val(1):e("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-woocommerce").val(1):e("#saswp-woocommerce").val(0);break;case"saswp-extra-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-extra").val(1):e("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-dw-question-answer").val(1):e("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wp-job-manager").val(1):e("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-yoast").val(1):e("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-rankmath").val(1):e("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-tagyeem").val(1):e("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-the-events-calendar").val(1):e("#saswp-the-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking").val(1),e("#saswp-woocommerce-booking-main").val(1)):(e("#saswp-woocommerce-booking").val(0),e("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking-main").val(1),e("#saswp-woocommerce-booking").val(1)):(e("#saswp-woocommerce-booking-main").val(0),e("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-woocommerce-membership").val(1):e("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":e(this).is(":checked")?e("#saswp-defragment").val(1):e("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-cooked").val(1):e("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-shopper-approved-review").val(1),e(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-shopper-approved-review").val(0),e(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":e(this).is(":checked")?(e("#saswp-google-review").val(1),e("#saswp-google-rv-free-checkbox").length?(e("#saswp-google-review-free").parent().parent().show(),e("#saswp-google-rv-free-checkbox").is(":checked")?e("#saswp_google_place_api_key").parent().parent().show():e("#saswp_google_place_api_key").parent().parent().hide()):e("#saswp_google_place_api_key").parent().parent().show(),e(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-google-review").val(0),e("#saswp_google_place_api_key").parent().parent().hide(),e(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),e("#saswp-google-rv-free-checkbox").length&&e("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":e("#saswp-google-review-checkbox").is(":checked")&&e(this).is(":checked")?(e("#saswp-google-review-free").val(1),e("#saswp_google_place_api_key").parent().parent().show()):(e("#saswp-google-review-free").val(0),e("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":e(this).is(":checked")?e("#saswp-markup-footer").val(1):e("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":e(this).is(":checked")?e("#saswp-pretty-print").val(1):e("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wppostratings-raring").val(1):e("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-bbpress").val(1):e("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":e(this).is(":checked")?e("#saswp-microdata-cleanup").val(1):e("#saswp-microdata-cleanup").val(0)}}).change(),e("#saswp_kb_type").change(function(){var s=e(this).val();e(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==s&&(e(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==s&&(e(".saswp_org_fields").parent().parent().addClass("saswp_hide"),e(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),e(document).on("click","input[data-id=media]",function(s){s.preventDefault();var a=e(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var s=i.state().get("selection").first().toJSON();e("#"+t).val(s.url),e("input[data-id='"+t+"_id']").val(s.id),e("input[data-id='"+t+"_height']").val(s.height),e("input[data-id='"+t+"_width']").val(s.width),e("input[data-id='"+t+"_thumbnail']").val(s.url),"sd_default_image_button"===a.attr("id")&&(e("#sd_default_image_width").val(s.width),e("#sd_default_image_height").val(s.height));var n="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(n='<p class="saswp_warning">Image size is smaller than recommended size</p>'),e(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+s.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+n)}).open()}),e(document).on("click",".saswp_prev_close",function(s){s.preventDefault();var a=e(this).attr("data-id");console.log(a),e(this).parent().remove(),e("#"+a).val(""),e("input[data-id='"+a+"_id']").val(""),e("input[data-id='"+a+"_height']").val(""),e("input[data-id='"+a+"_width']").val(""),e("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(e("#sd_default_image_width").val(""),e("#sd_default_image_height").val(""))}),e(document).on("change",".saswp-schema-type-toggle",function(s){var a=e(this).attr("data-schema-id"),t=e(this).attr("data-post-id");if(e(this).is(":checked"))var i=1;else i=0;e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-reset-data",function(s){s.preventDefault(),1==confirm("Are you sure?")&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){setTimeout(function(){location.reload()},1e3)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp_license_activation",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("license-status"),i=e(this).attr("add-on"),n=e("#"+i+"_addon_license_key").val();t&&i&&n?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:n,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e("#"+i+"_addon_license_key_status").val(s.status),"active"==s.status?(e(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").css("color","green"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),e(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),e(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)):(e(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").css("color","red"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),e(".saswp_license_activation[add-on='"+i+"']").text("Activate"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)),a.removeClass("updating-message")},error:function(e){console.log(e)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),e(".saswp-send-query").on("click",function(s){s.preventDefault();var a=e("#saswp_query_message").val();""!=e.trim(a)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e(".saswp-query-success").show(),e(".saswp-query-error").hide()):(console.log("dd"),e(".saswp-query-success").hide(),e(".saswp-query-error").show())},error:function(e){console.log(e)}}):alert("Please enter the message")}),e(".saswp-import-plugins").on("click",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id");e.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?(e(a).parent().find(".saswp-imported-message").text(s.message),e(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(e(a).parent().find(".saswp-imported-message").addClass("saswp-error"),e(a).parent().find(".saswp-imported-message").text(s.message)),a.removeClass("updating-message")},"json")}),e(".saswp-feedback-no-thanks").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_no_thanks"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(".saswp-feedback-remindme").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_remindme"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(document).on("change",".saswp-local-business-type-select",function(s){s.preventDefault();var a=e(this),t=e(this).val();e.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if("t"==s.status){e(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',e.each(s.result,function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else e(".saswp-local-business-name-select").parents("tr").remove()},"json")}),n(),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),e(document).on("click",".saswp-add-custom-schema",function(s){s.preventDefault(),e(".saswp-add-custom-schema-field").removeClass("saswp_hide"),e(this).hide()}),e(document).on("click",".saswp-delete-custom-schema",function(s){s.preventDefault(),e("#saswp_custom_schema_field").val(""),e(".saswp-add-custom-schema-field").addClass("saswp_hide"),e(".saswp-add-custom-schema").show()}),e(".saswp-modify_schema_post_enable").on("click",function(s){var a=e(this);a.addClass("updating-message"),s.preventDefault(),e.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){a.remove(),e(".saswp-add-custom-schema-div").remove(),e("#post_specific .inside").append(s),a.removeClass("updating-message"),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),saswp_schema_datepicker(),p(),n()})}),saswp_schema_datepicker(),e(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"}),e(document).on("click",".saswp-add-more-item",function(s){s.preventDefault();var a=e(".saswp-review-item-list-table tr").length;console.log(a);e(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),e(document).on("click",".saswp-remove-review-item",function(s){s.preventDefault(),e(this).parent().parent("tr").remove()}),e(document).on("focusout",".saswp-review-item-tr input[type=number]",function(s){s.preventDefault();var a=0,t=e(".saswp-review-item-tr input[type=number]").length;e(".saswp-review-item-tr input[type=number]").each(function(s,t){""==e(t).val()?a+=parseFloat(0):a+=parseFloat(e(t).val())});var i=a/t;e("#saswp-review-item-over-all").val(i)}),e("#saswp-review-location").change(function(){var s=e(this).val();e(".saswp-review-shortcode").addClass("saswp_hide"),3==s&&e(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),e("#saswp-review-item-enable").change(function(){e(this).is(":checked")?e(".saswp-review-fields").show():e(".saswp-review-fields").hide()}).change(),e(document).on("click",".saswp-restore-post-schema",function(s){s.preventDefault();var a=e(this);if(a.addClass("updating-message"),e(".saswp-post-specific-schema-ids").val())var t=JSON.parse(e(".saswp-post-specific-schema-ids").val());e.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?setTimeout(function(){location.reload()},1e3):(alert(e.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),e(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(s){s.preventDefault();var a=e(this).attr("data-id");e(".saswp-post-specific-wrapper").hide(),e("#"+a).show(),e("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),e("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),e(this).addClass("selected"),e(this).parent().addClass("selected"),p()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?e(".saswp-global-container:eq(2)").show():e(".saswp-global-container:first").show(),e("#saswp-global-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-global-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e("#"+s).show())}),e("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e(".saswp-tools-container:first").show(),e("#saswp-tools-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-tools-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e("#"+s).show())}),e("#saswp-review-tabs a:first").addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e(".saswp-review-container:first").show(),e("#saswp-review-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-review-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e("#"+s).show())}),e('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),e("#saswp_enable_custom_field").change(function(){e(this).is(":checked")?e(".saswp-custom-fields-div").show():e(".saswp-custom-fields-div").hide()}),e(document).on("change",".saswp-custom-fields-name",function(){var s="text",a=e(this).val();-1!=a.indexOf("image")&&(s="image"),saswp_get_meta_list(s,null,e(this).parent().parent("tr").find("td:eq(1)"),a),e(this).parent().parent("tr").find("td:gt(1)").remove()}),e(document).on("click",".saswp-skip-button",function(s){s.preventDefault(),e(this).parent().parent().hide(),e.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){},"json")}),e(document).on("click",".saswp_add_schema_fields_on_fly",function(s){s.preventDefault();var a=e(this).attr("data-id"),t=e(this).attr("fields_type"),i=e(this).attr("div_type"),n=e(".saswp-"+i+"-table-div").length,o=e(".saswp-"+i+"-table-div:nth-child("+n+")").attr("data-id");(o=++o)||(o=0),saswp_get_post_specific_schema_fields(o,t,i,a,t+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("change",".saswp-custom-meta-list",function(){var s=e(this).val(),a=e(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),t="";"manual_text"==s&&(t='<td><input type="text" name="saswp_fixed_text['+a+']"></td>'),"custom_field"==s&&(t+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+a+']">',t+="</select></td>"),e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(t),o()}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e("select#schema_type option:selected").val(),a=e("#post_ID").val();""!=s&&(saswp_meta_list_fields?saswp_get_meta_list("text",saswp_meta_list_fields,null,null):e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:a,schema_type:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){saswp_get_meta_list("text",saswp_meta_list_fields=e,null,null)},error:function(e){console.log(e)}}))}),o(),p(),e('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),e(document).on("click",".saswp_coonect_google_place",function(){var s=e("#saswp_google_place_id").val(),a=e("#saswp_language_list").val(),t=e("#saswp_googel_api").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:s,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){console.log(e.status)},error:function(e){console.log(e)}})}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&e(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(s,a){e(this).next().val(s),console.log(s)}}),e(document).on("click",".saswp-add-g-location-btn",function(s){var a="";a=e("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',s.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&e(".saswp-g-reviews-settings-table").append(t)}),e(document).on("click",".saswp-fetch-s-approved-reviews",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e("#saswp_s_approved_site_id").val(),i=e("#saswp_s_approved_token").val(),n=e("#saswp_s_approved_reviews").val(),o=e("#reviews_addon_license_key").val(),p=1;n>100&&(p=n/100,n%100&&p++);t&&i&&o?c(a,t,i,n,o,0,p):(a.removeClass("updating-message"),alert("Fill the site id and token with valid api key"))}),e(document).on("click",".saswp-fetch-g-reviews",function(){var s=e(this),a="free";s.addClass("updating-message");var t=e(this).parent().parent().find(".saswp-g-location-field").val(),i=e(this).parent().parent().find(".saswp-g-blocks-field").val(),n=e("#saswp_google_place_api_key").val(),o=e("#reviews_addon_license_key").val(),p=e("#reviews_addon_license_key_status").val();if("premium"==(a=e("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),s.removeClass("updating-message"),!1;if(0!=i%10)return s.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),s.removeClass("updating-message"),!1}""!=t&&(o||n)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:p,reviews_api:o,location:t,blocks:i,g_api:n,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),s.removeClass("updating-message")},error:function(e){console.log(e)}}):(""==t&&alert("Please enter place id"),""==n&&alert("Please enter api key"),""==o&&alert("Please enter reviews api key"),s.removeClass("updating-message"))}),e("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var s=e(this);s.parent().find(".saswp-phone-validation").remove();var a=e(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?s.parent().find(".saswp-phone-validation").remove():s.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')})});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin_section/settings.php CHANGED
@@ -1318,23 +1318,24 @@ function saswp_import_callback(){
1318
 
1319
  function saswp_get_license_section_html($on, $license_key, $license_status, $license_status_msg, $label=null, $limits=null){
1320
 
1321
- $limits_html = $response = '';
1322
 
1323
- if($limits){
1324
- $limits_html = '<span style="padding:10px;">Maximum Reviews Limits '. esc_attr($limits).'</span>';
1325
- }
1326
 
1327
- $response.= '<div class="saswp-tools-field-title">';
 
 
 
 
1328
 
1329
  if($label == true){
1330
 
1331
- $response.= '<div class="" style="display:inline-block">';
1332
- $response.= '<strong>'.esc_html__(''.$on.' Compatibility For Schema','schema-and-structured-data-for-wp').'</strong>';
1333
- $response.= '</div>';
1334
 
1335
  }
1336
-
1337
-
1338
  if($license_status == 'active'){
1339
 
1340
  $response.= '<span class="dashicons dashicons-yes saswp-'.strtolower($on).'-dashicons" style="color: #46b450;"></span>';
@@ -1399,19 +1400,19 @@ function saswp_review_page_callback(){
1399
  'type' => 'text',
1400
  ),
1401
  array(
1402
- 'label' => 'Place',
1403
  'id' => 'saswp-google-place-section',
1404
  'name' => 'sd_data[saswp-google-place-section]',
1405
  'type' => 'text',
1406
 
1407
- ),
1408
- // array(
1409
- // 'label' => 'Review Module',
1410
- // 'id' => 'saswp-reviews-module-section',
1411
- // 'name' => 'sd_data[saswp-reviews-module-section]',
1412
- // 'type' => 'text',
1413
- //
1414
- // )
1415
 
1416
 
1417
  );
@@ -1526,6 +1527,44 @@ function saswp_compatibility_page_callback(){
1526
  )
1527
  );
1528
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1529
  $the_events_calendar = array(
1530
  'label' => 'The Events Calendar',
1531
  'id' => 'saswp-the-events-calendar-checkbox',
@@ -1732,6 +1771,9 @@ function saswp_compatibility_page_callback(){
1732
  //$wpjobmanager,
1733
  $yoast,
1734
  $smart_crawl,
 
 
 
1735
  $rankmath
1736
 
1737
  );
@@ -1935,7 +1977,10 @@ function saswp_get_field_note($pname){
1935
  'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
1936
  'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
1937
  'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>',
1938
- 'smart_crawl' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/smartcrawl-seo/">SmartCrawl Seo</a>'
 
 
 
1939
  );
1940
 
1941
  if(!saswp_check_plugin_active_status($pname)){
1318
 
1319
  function saswp_get_license_section_html($on, $license_key, $license_status, $license_status_msg, $label=null, $limits=null){
1320
 
1321
+ $limits_html = $response = '';
1322
 
1323
+ $limits = get_option('reviews_addon_reviews_limits');
 
 
1324
 
1325
+ if($limits){
1326
+ $limits_html = '<span style="padding:10px;">Maximum Reviews Limits '. esc_attr($limits).'</span>';
1327
+ }
1328
+
1329
+ $response.= '<div class="saswp-tools-field-title">';
1330
 
1331
  if($label == true){
1332
 
1333
+ $response.= '<div class="" style="display:inline-block">';
1334
+ $response.= '<strong>'.esc_html__(''.$on.' Compatibility For Schema','schema-and-structured-data-for-wp').'</strong>';
1335
+ $response.= '</div>';
1336
 
1337
  }
1338
+
 
1339
  if($license_status == 'active'){
1340
 
1341
  $response.= '<span class="dashicons dashicons-yes saswp-'.strtolower($on).'-dashicons" style="color: #46b450;"></span>';
1400
  'type' => 'text',
1401
  ),
1402
  array(
1403
+ 'label' => '',
1404
  'id' => 'saswp-google-place-section',
1405
  'name' => 'sd_data[saswp-google-place-section]',
1406
  'type' => 'text',
1407
 
1408
+ ),
1409
+ array(
1410
+ 'label' => 'Review Module',
1411
+ 'id' => 'saswp-reviews-module-section',
1412
+ 'name' => 'sd_data[saswp-reviews-module-section]',
1413
+ 'type' => 'text',
1414
+
1415
+ )
1416
 
1417
 
1418
  );
1527
  )
1528
  );
1529
 
1530
+ $the_seo_framework = array(
1531
+ 'label' => 'The SEO Framework',
1532
+ 'id' => 'saswp-the-seo-framework-checkbox',
1533
+ 'name' => 'saswp-the-seo-framework-checkbox',
1534
+ 'type' => 'checkbox',
1535
+ 'class' => 'checkbox saswp-checkbox',
1536
+ 'note' => saswp_get_field_note('the_seo_framework'),
1537
+ 'hidden' => array(
1538
+ 'id' => 'saswp-the-seo-framework',
1539
+ 'name' => 'sd_data[saswp-the-seo-framework]',
1540
+ )
1541
+ );
1542
+
1543
+ $seo_press = array(
1544
+ 'label' => 'SEOPress',
1545
+ 'id' => 'saswp-seo-press-checkbox',
1546
+ 'name' => 'saswp-seo-press-checkbox',
1547
+ 'type' => 'checkbox',
1548
+ 'class' => 'checkbox saswp-checkbox',
1549
+ 'note' => saswp_get_field_note('seo_press'),
1550
+ 'hidden' => array(
1551
+ 'id' => 'saswp-seo-press',
1552
+ 'name' => 'sd_data[saswp-seo-press]',
1553
+ )
1554
+ );
1555
+ $aiosp = array(
1556
+ 'label' => 'All in One SEO Pack',
1557
+ 'id' => 'saswp-aiosp-checkbox',
1558
+ 'name' => 'saswp-aiosp-checkbox',
1559
+ 'type' => 'checkbox',
1560
+ 'class' => 'checkbox saswp-checkbox',
1561
+ 'note' => saswp_get_field_note('aiosp'),
1562
+ 'hidden' => array(
1563
+ 'id' => 'saswp-aiosp',
1564
+ 'name' => 'sd_data[saswp-aiosp]',
1565
+ )
1566
+ );
1567
+
1568
  $the_events_calendar = array(
1569
  'label' => 'The Events Calendar',
1570
  'id' => 'saswp-the-events-calendar-checkbox',
1771
  //$wpjobmanager,
1772
  $yoast,
1773
  $smart_crawl,
1774
+ $seo_press,
1775
+ $the_seo_framework,
1776
+ $aiosp,
1777
  $rankmath
1778
 
1779
  );
1977
  'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
1978
  'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
1979
  'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>',
1980
+ 'smart_crawl' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/smartcrawl-seo/">SmartCrawl Seo</a>',
1981
+ 'the_seo_framework' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/autodescription/">The Seo Framework</a>',
1982
+ 'seo_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-seopress/">SEOPress</a>',
1983
+ 'aiosp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in One SEO Pack</a>'
1984
  );
1985
 
1986
  if(!saswp_check_plugin_active_status($pname)){
core/array-list/meta_list.php CHANGED
@@ -2,55 +2,55 @@
2
  return array(
3
  'text' => array(
4
  array(
5
- 'label' => __( 'Single Element', 'wp-schema-pro' ),
6
  'meta-list' => array(
7
- 'blogname' => __( 'Site Title', 'wp-schema-pro' ),
8
- 'blogdescription' => __( 'Tagline', 'wp-schema-pro' ),
9
- 'site_url' => __( 'Site URL', 'wp-schema-pro' ),
10
- 'post_title' => __( 'Title', 'wp-schema-pro' ),
11
- 'post_content' => __( 'Content', 'wp-schema-pro' ),
12
- 'post_excerpt' => __( 'Excerpt', 'wp-schema-pro' ),
13
- 'post_permalink' => __( 'Permalink', 'wp-schema-pro' ),
14
- 'author_name' => __( 'Author name', 'wp-schema-pro' ),
15
- 'author_first_name' => __( 'Author first name', 'wp-schema-pro' ),
16
- 'author_last_name' => __( 'Author last name', 'wp-schema-pro' ),
17
- 'post_date' => __( 'Publish Date', 'wp-schema-pro' ),
18
- 'post_modified' => __( 'Last Modify Date', 'wp-schema-pro' ),
19
  ),
20
  ),
21
  array(
22
- 'label' => __( 'Manual Field', 'wp-schema-pro' ),
23
  'meta-list' => array(
24
- 'manual_text' => __( 'Manual Text', 'wp-schema-pro' ),
25
  ),
26
  ),
27
  array(
28
- 'label' => __( 'Custom Field', 'wp-schema-pro' ),
29
  'meta-list' => array(
30
- 'custom_field' => __( 'Custom Field', 'wp-schema-pro' ),
31
  ),
32
  ),
33
  ),
34
  'image' => array(
35
 
36
  array(
37
- 'label' => __( 'Single Element', 'wp-schema-pro' ),
38
  'meta-list' => array(
39
- 'featured_img' => __( 'Featured image', 'wp-schema-pro' ),
40
- 'author_image' => __( 'Author image', 'wp-schema-pro' ),
41
- 'site_logo' => __( 'Logo', 'wp-schema-pro' ),
42
  ),
43
  ),
44
  array(
45
- 'label' => __( 'Manual field', 'wp-schema-pro' ),
46
  'meta-list' => array(
47
- 'manual_text' => __( 'Manual Image URL', 'wp-schema-pro' ),
48
  ),
49
  ),
50
  array(
51
- 'label' => __( 'Custom Field', 'wp-schema-pro' ),
52
  'meta-list' => array(
53
- 'custom_field' => __( 'Custom Field', 'wp-schema-pro' ),
54
  ),
55
  ),
56
  ),
2
  return array(
3
  'text' => array(
4
  array(
5
+ 'label' => __( 'Single Element', 'schema-and-structured-data-for-wp' ),
6
  'meta-list' => array(
7
+ 'blogname' => __( 'Site Title', 'schema-and-structured-data-for-wp' ),
8
+ 'blogdescription' => __( 'Tagline', 'schema-and-structured-data-for-wp' ),
9
+ 'site_url' => __( 'Site URL', 'schema-and-structured-data-for-wp' ),
10
+ 'post_title' => __( 'Title', 'schema-and-structured-data-for-wp' ),
11
+ 'post_content' => __( 'Content', 'schema-and-structured-data-for-wp' ),
12
+ 'post_excerpt' => __( 'Excerpt', 'schema-and-structured-data-for-wp' ),
13
+ 'post_permalink' => __( 'Permalink', 'schema-and-structured-data-for-wp' ),
14
+ 'author_name' => __( 'Author name', 'schema-and-structured-data-for-wp' ),
15
+ 'author_first_name' => __( 'Author first name', 'schema-and-structured-data-for-wp' ),
16
+ 'author_last_name' => __( 'Author last name', 'schema-and-structured-data-for-wp' ),
17
+ 'post_date' => __( 'Publish Date', 'schema-and-structured-data-for-wp' ),
18
+ 'post_modified' => __( 'Last Modify Date', 'schema-and-structured-data-for-wp' ),
19
  ),
20
  ),
21
  array(
22
+ 'label' => __( 'Manual Field', 'schema-and-structured-data-for-wp' ),
23
  'meta-list' => array(
24
+ 'manual_text' => __( 'Manual Text', 'schema-and-structured-data-for-wp' ),
25
  ),
26
  ),
27
  array(
28
+ 'label' => __( 'Custom Field', 'schema-and-structured-data-for-wp' ),
29
  'meta-list' => array(
30
+ 'custom_field' => __( 'Custom Field', 'schema-and-structured-data-for-wp' ),
31
  ),
32
  ),
33
  ),
34
  'image' => array(
35
 
36
  array(
37
+ 'label' => __( 'Single Element', 'schema-and-structured-data-for-wp' ),
38
  'meta-list' => array(
39
+ 'featured_img' => __( 'Featured image', 'schema-and-structured-data-for-wp' ),
40
+ 'author_image' => __( 'Author image', 'schema-and-structured-data-for-wp' ),
41
+ 'site_logo' => __( 'Logo', 'schema-and-structured-data-for-wp' ),
42
  ),
43
  ),
44
  array(
45
+ 'label' => __( 'Manual field', 'schema-and-structured-data-for-wp' ),
46
  'meta-list' => array(
47
+ 'manual_text' => __( 'Manual Image URL', 'schema-and-structured-data-for-wp' ),
48
  ),
49
  ),
50
  array(
51
+ 'label' => __( 'Custom Field', 'schema-and-structured-data-for-wp' ),
52
  'meta-list' => array(
53
+ 'custom_field' => __( 'Custom Field', 'schema-and-structured-data-for-wp' ),
54
  ),
55
  ),
56
  ),
core/array-list/plugins.php CHANGED
@@ -65,5 +65,23 @@ return array(
65
  'path_free' => 'smartcrawl-seo/wpmu-dev-seo.php',
66
  'status_key' => 'saswp-smart-crawl',
67
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  );
65
  'path_free' => 'smartcrawl-seo/wpmu-dev-seo.php',
66
  'status_key' => 'saswp-smart-crawl',
67
  ),
68
+ array(
69
+ 'key' => 'the_seo_framework',
70
+ 'name' => 'The SEO Framework',
71
+ 'path_free' => 'autodescription/autodescription.php',
72
+ 'status_key' => 'saswp-the-seo-framework',
73
+ ),
74
+ array(
75
+ 'key' => 'seo_press',
76
+ 'name' => 'SEOPress',
77
+ 'path_free' => 'wp-seopress/seopress.php',
78
+ 'status_key' => 'saswp-seo-press',
79
+ ),
80
+ array(
81
+ 'key' => 'aiosp',
82
+ 'name' => 'All in One SEO Pack',
83
+ 'path_free' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
84
+ 'status_key' => 'saswp-aiosp',
85
+ ),
86
 
87
  );
output/compatibility.php CHANGED
@@ -67,9 +67,24 @@ class saswp_output_compatibility{
67
  $this->saswp_remove_yoast_product_schema();
68
  }
69
 
 
 
 
 
70
  public function saswp_smart_crawl_override(){
71
  add_filter('wds-schema-data', '__return_false');
72
  }
 
 
 
 
 
 
 
 
 
 
 
73
  public function saswp_woocommerce_override(){
74
 
75
  if(class_exists('WooCommerce')){
67
  $this->saswp_remove_yoast_product_schema();
68
  }
69
 
70
+ public function saswp_the_seo_framework_override(){
71
+
72
+ add_filter('the_seo_framework_receive_json_data', '__return_false');
73
+ }
74
  public function saswp_smart_crawl_override(){
75
  add_filter('wds-schema-data', '__return_false');
76
  }
77
+ public function saswp_seo_press_hooks(){
78
+
79
+ remove_action('wp_head', 'seopress_social_accounts_jsonld_hook',1);
80
+ remove_action('wp_head', 'seopress_social_website_option',1);
81
+
82
+ }
83
+ public function saswp_seo_press_override(){
84
+
85
+ add_action('wp_head', array($this, 'saswp_seo_press_hooks'),0);
86
+
87
+ }
88
  public function saswp_woocommerce_override(){
89
 
90
  if(class_exists('WooCommerce')){
output/function.php CHANGED
@@ -737,14 +737,22 @@ function saswp_json_print_format($output_array){
737
  */
738
  function saswp_remove_microdata($content){
739
 
 
 
740
  if(saswp_global_option()){
741
-
742
  $content = preg_replace("/itemscope itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
743
  $content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
744
  $content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
745
  $content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
746
  $content = preg_replace("/vcard/", "", $content);
747
  $content = preg_replace("/hentry/", "", $content);
 
 
 
 
 
 
748
  }
749
 
750
  return $content;
737
  */
738
  function saswp_remove_microdata($content){
739
 
740
+ global $sd_data;
741
+
742
  if(saswp_global_option()){
743
+ //Clean MicroData
744
  $content = preg_replace("/itemscope itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
745
  $content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
746
  $content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
747
  $content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
748
  $content = preg_replace("/vcard/", "", $content);
749
  $content = preg_replace("/hentry/", "", $content);
750
+
751
+ //Clean json markup
752
+ if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
753
+ $content = preg_replace('/<script type=\"application\/ld\+json" class=\"aioseop-schema"\>(.*?)<\/script>/', "", $content);
754
+ }
755
+
756
  }
757
 
758
  return $content;
output/output.php CHANGED
@@ -289,27 +289,240 @@ function saswp_schema_output() {
289
  $extra_theme_review = array();
290
  $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
291
 
 
 
 
 
 
292
 
293
- if( $schema_type == 'VideoGame' ||
294
- $schema_type == 'HowTo' ||
295
- $schema_type == 'TVSeries' ||
296
- $schema_type == 'MedicalCondition' ||
297
- $schema_type == 'FAQ' ||
298
- $schema_type == 'Apartment' ||
299
- $schema_type == 'House' ||
300
- $schema_type == 'TouristDestination' ||
301
- $schema_type == 'TouristAttraction' ||
302
- $schema_type == 'LandmarksOrHistoricalBuildings' ||
303
- $schema_type == 'HinduTemple' ||
304
- $schema_type == 'Church' ||
305
- $schema_type == 'Mosque' ||
306
- $schema_type == 'JobPosting' ||
307
- $schema_type == 'Trip' ||
308
- $schema_type == 'Person' ||
309
- $schema_type == 'SingleFamilyResidence' ) {
310
-
311
- $input1 = array();
312
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
 
314
  if( 'Course' === $schema_type){
315
 
@@ -358,7 +571,8 @@ function saswp_schema_output() {
358
  $input1 = array(
359
  '@context' => 'http://schema.org',
360
  '@type' => 'DiscussionForumPosting' ,
361
- '@id' => bbp_get_topic_permalink().'#discussionforumposting',
 
362
  'headline' => bbp_get_topic_title(get_the_ID()),
363
  'description' => saswp_get_the_excerpt(),
364
  "articleSection" => bbp_get_forum_title(),
@@ -380,9 +594,10 @@ function saswp_schema_output() {
380
  '@context' => 'http://schema.org',
381
  '@type' => 'DiscussionForumPosting' ,
382
  '@id' => trailingslashit(get_permalink()).'#blogposting',
383
- 'headline' => saswp_get_the_title(),
384
- 'description' => saswp_get_the_excerpt(),
385
  'url' => trailingslashit(get_permalink()),
 
 
 
386
  'datePublished' => esc_html($date),
387
  'dateModified' => esc_html($modified_date),
388
  'author' => saswp_get_author_details()
@@ -1917,9 +2132,6 @@ function saswp_post_specific_schema_output() {
1917
  }
1918
 
1919
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
1920
- // $input1['openingHours'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_opening_hours_'.$schema_id, 'saswp_array');
1921
- // $input1['currenciesAccepted'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_currencies_accepted_'.$schema_id, 'saswp_array');
1922
- // $input1['paymentAccepted'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_payment_accepted_'.$schema_id, 'saswp_array');
1923
 
1924
  $input1['address']['@type'] = 'PostalAddress';
1925
  $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_address_country_'.$schema_id, 'saswp_array');
@@ -2084,9 +2296,13 @@ function saswp_post_specific_schema_output() {
2084
 
2085
  }
2086
 
2087
- $input1['estimatedCost']['@type'] = 'MonetaryAmount';
2088
- $input1['estimatedCost']['currency']= saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array');
2089
- $input1['estimatedCost']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array');
 
 
 
 
2090
 
2091
  $supply_arr = array();
2092
  if(!empty($supply)){
@@ -2094,13 +2310,18 @@ function saswp_post_specific_schema_output() {
2094
  foreach($supply as $val){
2095
 
2096
  $supply_data = array();
2097
- $supply_data['@type'] = 'HowToSupply';
2098
- $supply_data['name'] = $val['saswp_howto_supply_name'];
2099
- $supply_data['url'] = $val['saswp_howto_supply_url'];
2100
 
2101
- if(isset($val['saswp_howto_supply_image_id'])){
 
 
 
 
 
 
 
 
2102
 
2103
- $image_details = wp_get_attachment_image_src($val['saswp_howto_supply_image_id']);
2104
 
2105
  $supply_data['image']['@type'] = 'ImageObject';
2106
  $supply_data['image']['url'] = esc_url($image_details[0]);
@@ -2121,11 +2342,14 @@ function saswp_post_specific_schema_output() {
2121
  foreach($tool as $val){
2122
 
2123
  $supply_data = array();
2124
- $supply_data['@type'] = 'HowToTool';
2125
- $supply_data['name'] = $val['saswp_howto_tool_name'];
2126
- $supply_data['url'] = $val['saswp_howto_tool_url'];
2127
 
2128
- if(isset($val['saswp_howto_tool_image_id'])){
 
 
 
 
 
 
2129
 
2130
  $image_details = wp_get_attachment_image_src($val['saswp_howto_tool_image_id']);
2131
 
@@ -2153,29 +2377,34 @@ function saswp_post_specific_schema_output() {
2153
  $direction = array();
2154
  $tip = array();
2155
 
2156
- $direction['@type'] = 'HowToDirection';
2157
- $direction['text'] = $val['saswp_howto_direction_text'];
2158
-
2159
- $tip['@type'] = 'HowToTip';
2160
- $tip['text'] = $val['saswp_howto_tip_text'];
2161
 
 
 
 
 
 
 
2162
 
2163
  $supply_data['@type'] = 'HowToStep';
2164
  $supply_data['url'] = trailingslashit(get_permalink()).'#step'.++$key;
2165
- $supply_data['name'] = $val['saswp_howto_step_name'];
2166
- $supply_data['itemListElement'] = array($direction, $tip);
2167
 
2168
- if(isset($val['saswp_howto_step_image_id'])){
2169
-
2170
- $image_details = wp_get_attachment_image_src($val['saswp_howto_step_image_id']);
 
 
2171
 
 
2172
  $supply_data['image']['@type'] = 'ImageObject';
2173
  $supply_data['image']['url'] = esc_url($image_details[0]);
2174
  $supply_data['image']['width'] = esc_attr($image_details[1]);
2175
  $supply_data['image']['height'] = esc_attr($image_details[2]);
2176
-
2177
-
2178
-
2179
  }
2180
 
2181
  $step_arr[] = $supply_data;
@@ -2474,20 +2703,39 @@ function saswp_post_specific_schema_output() {
2474
 
2475
  if( 'DiscussionForumPosting' === $schema_type){
2476
 
 
 
2477
  $input1 = array(
2478
  '@context' => 'http://schema.org',
2479
  '@type' => 'DiscussionForumPosting' ,
2480
  '@id' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array').'#blogposting',
 
2481
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_headline_'.$schema_id, 'saswp_array'),
2482
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_description_'.$schema_id, 'saswp_array'),
2483
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array'),
 
 
 
 
 
 
2484
  'datePublished' => isset($all_post_meta['saswp_dfp_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_published_'.$schema_id][0])):'',
2485
  'dateModified' => isset($all_post_meta['saswp_dfp_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_modified_'.$schema_id][0])):'',
2486
  'author' => array(
2487
  '@type' => 'Person',
2488
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_name_'.$schema_id, 'saswp_array'),
2489
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_description_'.$schema_id, 'saswp_array')
2490
- )
 
 
 
 
 
 
 
 
 
 
2491
  );
2492
  }
2493
 
@@ -2880,13 +3128,13 @@ function saswp_post_specific_schema_output() {
2880
  '@type' => $schema_type ,
2881
  '@id' => trailingslashit(get_permalink()).'#recipe',
2882
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
2883
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
2884
- 'image' =>array(
2885
- '@type' => 'ImageObject',
2886
- 'url' => saswp_remove_warnings( $recipe_image, 'thumbnail', 'saswp_string'),
2887
- 'width' => saswp_remove_warnings( $recipe_image, 'width', 'saswp_string'),
2888
- 'height' => saswp_remove_warnings( $recipe_image , 'height', 'saswp_string'),
2889
- ),
2890
  'author' => array(
2891
  '@type' => 'Person',
2892
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_name_'.$schema_id, 'saswp_array'),
@@ -2912,18 +3160,7 @@ function saswp_post_specific_schema_output() {
2912
  'calories' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_nutrition_'.$schema_id, 'saswp_array'),
2913
  ),
2914
  'recipeIngredient' => $ingredient,
2915
- 'recipeInstructions' => $instruction,
2916
- 'video' => array(
2917
- '@type' => 'VideoObject',
2918
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array'),
2919
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array'),
2920
- 'thumbnailUrl' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array'),
2921
- 'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_contenturl_'.$schema_id, 'saswp_array'),
2922
- 'embedUrl' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_embedurl_'.$schema_id, 'saswp_array'),
2923
- 'uploadDate' => isset($all_post_meta['saswp_recipe_video_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_video_upload_date_'.$schema_id][0])):'',
2924
- 'duration' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_duration_'.$schema_id, 'saswp_array'),
2925
- ),
2926
-
2927
  'datePublished' => isset($all_post_meta['saswp_recipe_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_date_published_'.$schema_id][0])):'',
2928
  'dateModified' => isset($all_post_meta['saswp_recipe_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_date_modified_'.$schema_id][0])):'',
2929
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_description_'.$schema_id, 'saswp_array'),
@@ -2943,7 +3180,20 @@ function saswp_post_specific_schema_output() {
2943
  ),
2944
 
2945
 
2946
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
2947
  if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_review_count_'.$schema_id, 'saswp_array')){
2948
 
2949
  $input1['aggregateRating'] = array(
289
  $extra_theme_review = array();
290
  $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
291
 
292
+ if( 'FAQ' === $schema_type){
293
+
294
+ $input1 = array();
295
+
296
+ }
297
 
298
+ if( 'VideoGame' === $schema_type){
299
+
300
+ $input1['@context'] = 'http://schema.org';
301
+ $input1['@type'] = 'VideoGame';
302
+ $input1['@id'] = trailingslashit(get_permalink()).'#VideoGame';
303
+ $input1['author']['@type'] = 'Organization';
304
+ $input1['offers']['@type'] = 'Offer';
305
+
306
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
307
+ $service = new saswp_output_service();
308
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
309
+ }
310
+
311
+ }
312
+
313
+ if( 'MedicalCondition' === $schema_type){
314
+
315
+ $input1['@context'] = 'http://schema.org';
316
+ $input1['@type'] = 'MedicalCondition';
317
+ $input1['@id'] = trailingslashit(get_permalink()).'#MedicalCondition';
318
+ $input1['associatedAnatomy']['@type'] = 'AnatomicalStructure';
319
+ $input1['code']['@type'] = 'MedicalCode';
320
+
321
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
322
+ $service = new saswp_output_service();
323
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
324
+ }
325
+
326
+ }
327
+
328
+ if( 'TVSeries' === $schema_type){
329
+
330
+ $input1['@context'] = 'http://schema.org';
331
+ $input1['@type'] = 'TVSeries';
332
+ $input1['@id'] = trailingslashit(get_permalink()).'#TVSeries';
333
+ $input1['author']['@type'] = 'Person';
334
+
335
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
336
+ $service = new saswp_output_service();
337
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
338
+ }
339
+
340
+ }
341
+
342
+ if( 'HowTo' === $schema_type){
343
+
344
+ $input1['@context'] = 'http://schema.org';
345
+ $input1['@type'] = 'HowTo';
346
+ $input1['@id'] = trailingslashit(get_permalink()).'#HowTo';
347
+ $input1['estimatedCost']['@type'] = 'MonetaryAmount';
348
+
349
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
350
+ $service = new saswp_output_service();
351
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
352
+ }
353
+
354
+ }
355
+
356
+ if( 'Trip' === $schema_type){
357
+
358
+ $input1['@context'] = 'http://schema.org';
359
+ $input1['@type'] = 'Trip';
360
+ $input1['@id'] = trailingslashit(get_permalink()).'#Trip';
361
+
362
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
363
+ $service = new saswp_output_service();
364
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
365
+ }
366
+
367
+ }
368
+
369
+ if( 'SingleFamilyResidence' === $schema_type){
370
+
371
+ $input1['@context'] = 'http://schema.org';
372
+ $input1['@type'] = 'SingleFamilyResidence';
373
+ $input1['@id'] = trailingslashit(get_permalink()).'#SingleFamilyResidence';
374
+ $input1['address']['@type'] = 'PostalAddress';
375
+
376
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
377
+ $service = new saswp_output_service();
378
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
379
+ }
380
+
381
+ }
382
+
383
+ if( 'House' === $schema_type){
384
+
385
+ $input1['@context'] = 'http://schema.org';
386
+ $input1['@type'] = 'House';
387
+ $input1['@id'] = trailingslashit(get_permalink()).'#House';
388
+ $input1['address']['@type'] = 'PostalAddress';
389
+
390
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
391
+ $service = new saswp_output_service();
392
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
393
+ }
394
+
395
+ }
396
+
397
+ if( 'Apartment' === $schema_type){
398
+
399
+ $input1['@context'] = 'http://schema.org';
400
+ $input1['@type'] = 'Apartment';
401
+ $input1['@id'] = trailingslashit(get_permalink()).'#Apartment';
402
+ $input1['address']['@type'] = 'PostalAddress';
403
+
404
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
405
+ $service = new saswp_output_service();
406
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
407
+ }
408
+
409
+ }
410
+
411
+ if( 'TouristDestination' === $schema_type){
412
+
413
+ $input1['@context'] = 'http://schema.org';
414
+ $input1['@type'] = 'TouristDestination';
415
+ $input1['@id'] = trailingslashit(get_permalink()).'#TouristDestination';
416
+ $input1['address']['@type'] = 'PostalAddress';
417
+
418
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
419
+ $service = new saswp_output_service();
420
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
421
+ }
422
+
423
+ }
424
+
425
+ if( 'TouristAttraction' === $schema_type){
426
+
427
+ $input1['@context'] = 'http://schema.org';
428
+ $input1['@type'] = 'TouristAttraction';
429
+ $input1['@id'] = trailingslashit(get_permalink()).'#TouristAttraction';
430
+ $input1['address']['@type'] = 'PostalAddress';
431
+
432
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
433
+ $service = new saswp_output_service();
434
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
435
+ }
436
+
437
+ }
438
+
439
+ if( 'LandmarksOrHistoricalBuildings' === $schema_type){
440
+
441
+ $input1['@context'] = 'http://schema.org';
442
+ $input1['@type'] = 'LandmarksOrHistoricalBuildings';
443
+ $input1['@id'] = trailingslashit(get_permalink()).'#LandmarksOrHistoricalBuildings';
444
+ $input1['address']['@type'] = 'PostalAddress';
445
+
446
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
447
+ $service = new saswp_output_service();
448
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
449
+ }
450
+
451
+ }
452
+
453
+ if( 'HinduTemple' === $schema_type){
454
+
455
+ $input1['@context'] = 'http://schema.org';
456
+ $input1['@type'] = 'HinduTemple';
457
+ $input1['@id'] = trailingslashit(get_permalink()).'#HinduTemple';
458
+ $input1['address']['@type'] = 'PostalAddress';
459
+
460
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
461
+ $service = new saswp_output_service();
462
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
463
+ }
464
+
465
+ }
466
+
467
+ if( 'Church' === $schema_type){
468
+
469
+ $input1['@context'] = 'http://schema.org';
470
+ $input1['@type'] = 'Church';
471
+ $input1['@id'] = trailingslashit(get_permalink()).'#Church';
472
+ $input1['address']['@type'] = 'PostalAddress';
473
+
474
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
475
+ $service = new saswp_output_service();
476
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
477
+ }
478
+
479
+ }
480
+
481
+ if( 'Mosque' === $schema_type){
482
+
483
+ $input1['@context'] = 'http://schema.org';
484
+ $input1['@type'] = 'Mosque';
485
+ $input1['@id'] = trailingslashit(get_permalink()).'#Mosque';
486
+ $input1['address']['@type'] = 'PostalAddress';
487
+
488
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
489
+ $service = new saswp_output_service();
490
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
491
+ }
492
+
493
+ }
494
+
495
+ if( 'JobPosting' === $schema_type){
496
+
497
+ $input1['@context'] = 'http://schema.org';
498
+ $input1['@type'] = 'JobPosting';
499
+ $input1['@id'] = trailingslashit(get_permalink()).'#JobPosting';
500
+ $input1['hiringOrganization']['@type'] = 'Organization';
501
+ $input1['jobLocation']['@type'] = 'Place';
502
+ $input1['jobLocation']['address']['@type'] = 'PostalAddress';
503
+ $input1['baseSalary']['@type'] = 'MonetaryAmount';
504
+ $input1['baseSalary']['value']['@type'] = 'QuantitativeValue';
505
+
506
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
507
+ $service = new saswp_output_service();
508
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
509
+ }
510
+
511
+ }
512
+
513
+ if( 'Person' === $schema_type){
514
+
515
+ $input1['@context'] = 'http://schema.org';
516
+ $input1['@type'] = 'Person';
517
+ $input1['@id'] = trailingslashit(get_permalink()).'#Person';
518
+ $input1['address']['@type'] = 'PostalAddress';
519
+
520
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
521
+ $service = new saswp_output_service();
522
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
523
+ }
524
+
525
+ }
526
 
527
  if( 'Course' === $schema_type){
528
 
571
  $input1 = array(
572
  '@context' => 'http://schema.org',
573
  '@type' => 'DiscussionForumPosting' ,
574
+ '@id' => bbp_get_topic_permalink().'#discussionforumposting',
575
+ 'mainEntityOfPage' => bbp_get_topic_permalink(),
576
  'headline' => bbp_get_topic_title(get_the_ID()),
577
  'description' => saswp_get_the_excerpt(),
578
  "articleSection" => bbp_get_forum_title(),
594
  '@context' => 'http://schema.org',
595
  '@type' => 'DiscussionForumPosting' ,
596
  '@id' => trailingslashit(get_permalink()).'#blogposting',
 
 
597
  'url' => trailingslashit(get_permalink()),
598
+ 'mainEntityOfPage' => get_permalink(),
599
+ 'headline' => saswp_get_the_title(),
600
+ 'description' => saswp_get_the_excerpt(),
601
  'datePublished' => esc_html($date),
602
  'dateModified' => esc_html($modified_date),
603
  'author' => saswp_get_author_details()
2132
  }
2133
 
2134
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
 
 
 
2135
 
2136
  $input1['address']['@type'] = 'PostalAddress';
2137
  $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_address_country_'.$schema_id, 'saswp_array');
2296
 
2297
  }
2298
 
2299
+ if(saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array') !='')
2300
+ {
2301
+ $input1['estimatedCost']['@type'] = 'MonetaryAmount';
2302
+ $input1['estimatedCost']['currency']= saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array');
2303
+ $input1['estimatedCost']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array');
2304
+ }
2305
+
2306
 
2307
  $supply_arr = array();
2308
  if(!empty($supply)){
2310
  foreach($supply as $val){
2311
 
2312
  $supply_data = array();
 
 
 
2313
 
2314
+ if($val['saswp_howto_supply_name'] || $val['saswp_howto_supply_url']){
2315
+ $supply_data['@type'] = 'HowToSupply';
2316
+ $supply_data['name'] = $val['saswp_howto_supply_name'];
2317
+ $supply_data['url'] = $val['saswp_howto_supply_url'];
2318
+ }
2319
+
2320
+
2321
+
2322
+ if(isset($val['saswp_howto_supply_image_id']) && $val['saswp_howto_supply_image_id'] !=''){
2323
 
2324
+ $image_details = wp_get_attachment_image_src($val['saswp_howto_supply_image_id']);
2325
 
2326
  $supply_data['image']['@type'] = 'ImageObject';
2327
  $supply_data['image']['url'] = esc_url($image_details[0]);
2342
  foreach($tool as $val){
2343
 
2344
  $supply_data = array();
 
 
 
2345
 
2346
+ if($val['saswp_howto_tool_name'] || $val['saswp_howto_tool_url']){
2347
+ $supply_data['@type'] = 'HowToTool';
2348
+ $supply_data['name'] = $val['saswp_howto_tool_name'];
2349
+ $supply_data['url'] = $val['saswp_howto_tool_url'];
2350
+ }
2351
+
2352
+ if(isset($val['saswp_howto_tool_image_id']) && $val['saswp_howto_tool_image_id'] !=''){
2353
 
2354
  $image_details = wp_get_attachment_image_src($val['saswp_howto_tool_image_id']);
2355
 
2377
  $direction = array();
2378
  $tip = array();
2379
 
2380
+ if($val['saswp_howto_direction_text']){
2381
+ $direction['@type'] = 'HowToDirection';
2382
+ $direction['text'] = $val['saswp_howto_direction_text'];
2383
+ }
 
2384
 
2385
+ if($val['saswp_howto_tip_text']){
2386
+
2387
+ $tip['@type'] = 'HowToTip';
2388
+ $tip['text'] = $val['saswp_howto_tip_text'];
2389
+
2390
+ }
2391
 
2392
  $supply_data['@type'] = 'HowToStep';
2393
  $supply_data['url'] = trailingslashit(get_permalink()).'#step'.++$key;
2394
+ $supply_data['name'] = $val['saswp_howto_step_name'];
 
2395
 
2396
+ if($direction['text'] || $tip['text']){
2397
+ $supply_data['itemListElement'] = array($direction, $tip);
2398
+ }
2399
+
2400
+ if(isset($val['saswp_howto_step_image_id']) && $val['saswp_howto_step_image_id'] !=''){
2401
 
2402
+ $image_details = wp_get_attachment_image_src($val['saswp_howto_step_image_id']);
2403
  $supply_data['image']['@type'] = 'ImageObject';
2404
  $supply_data['image']['url'] = esc_url($image_details[0]);
2405
  $supply_data['image']['width'] = esc_attr($image_details[1]);
2406
  $supply_data['image']['height'] = esc_attr($image_details[2]);
2407
+
 
 
2408
  }
2409
 
2410
  $step_arr[] = $supply_data;
2703
 
2704
  if( 'DiscussionForumPosting' === $schema_type){
2705
 
2706
+ $event_image = get_post_meta( get_the_ID(), 'saswp_dfp_image_'.$schema_id.'_detail',true);
2707
+ $slogo = get_post_meta( get_the_ID(), 'saswp_dfp_organization_logo_'.$schema_id.'_detail',true);
2708
  $input1 = array(
2709
  '@context' => 'http://schema.org',
2710
  '@type' => 'DiscussionForumPosting' ,
2711
  '@id' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array').'#blogposting',
2712
+ 'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_main_entity_of_page_'.$schema_id, 'saswp_array'),
2713
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_headline_'.$schema_id, 'saswp_array'),
2714
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_description_'.$schema_id, 'saswp_array'),
2715
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array'),
2716
+ 'image' => array(
2717
+ '@type' =>'ImageObject',
2718
+ 'url' => isset($event_image['thumbnail']) ? esc_url($event_image['thumbnail']):'' ,
2719
+ 'width' => isset($event_image['width']) ? esc_attr($event_image['width']) :'' ,
2720
+ 'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
2721
+ ),
2722
  'datePublished' => isset($all_post_meta['saswp_dfp_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_published_'.$schema_id][0])):'',
2723
  'dateModified' => isset($all_post_meta['saswp_dfp_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_modified_'.$schema_id][0])):'',
2724
  'author' => array(
2725
  '@type' => 'Person',
2726
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_name_'.$schema_id, 'saswp_array'),
2727
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_description_'.$schema_id, 'saswp_array')
2728
+ ),
2729
+ 'publisher' => array(
2730
+ '@type' => 'Organization',
2731
+ 'logo' => array(
2732
+ '@type' => 'ImageObject',
2733
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_organization_logo_'.$schema_id, 'saswp_array'),
2734
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
2735
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
2736
+ ),
2737
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_organization_name_'.$schema_id, 'saswp_array'),
2738
+ ),
2739
  );
2740
  }
2741
 
3128
  '@type' => $schema_type ,
3129
  '@id' => trailingslashit(get_permalink()).'#recipe',
3130
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
3131
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
3132
+ 'image' =>array(
3133
+ '@type' => 'ImageObject',
3134
+ 'url' => saswp_remove_warnings( $recipe_image, 'thumbnail', 'saswp_string'),
3135
+ 'width' => saswp_remove_warnings( $recipe_image, 'width', 'saswp_string'),
3136
+ 'height' => saswp_remove_warnings( $recipe_image , 'height', 'saswp_string'),
3137
+ ),
3138
  'author' => array(
3139
  '@type' => 'Person',
3140
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_name_'.$schema_id, 'saswp_array'),
3160
  'calories' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_nutrition_'.$schema_id, 'saswp_array'),
3161
  ),
3162
  'recipeIngredient' => $ingredient,
3163
+ 'recipeInstructions' => $instruction,
 
 
 
 
 
 
 
 
 
 
 
3164
  'datePublished' => isset($all_post_meta['saswp_recipe_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_date_published_'.$schema_id][0])):'',
3165
  'dateModified' => isset($all_post_meta['saswp_recipe_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_date_modified_'.$schema_id][0])):'',
3166
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_description_'.$schema_id, 'saswp_array'),
3180
  ),
3181
 
3182
 
3183
+ );
3184
+
3185
+ if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array') !=''){
3186
+
3187
+ $input1['video']['@type'] = 'VideoObject';
3188
+ $input1['video']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array');
3189
+ $input1['video']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array');
3190
+ $input1['video']['thumbnailUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array');
3191
+ $input1['video']['contentUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_contenturl_'.$schema_id, 'saswp_array');
3192
+ $input1['video']['embedUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_embedurl_'.$schema_id, 'saswp_array');
3193
+ $input1['video']['uploadDate'] = isset($all_post_meta['saswp_recipe_video_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_video_upload_date_'.$schema_id][0])):'';
3194
+ $input1['video']['duration'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_duration_'.$schema_id, 'saswp_array');
3195
+ }
3196
+
3197
  if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_review_count_'.$schema_id, 'saswp_array')){
3198
 
3199
  $input1['aggregateRating'] = array(
output/service.php CHANGED
@@ -647,6 +647,16 @@ Class saswp_output_service{
647
  if(isset($custom_fields['saswp_dfp_author_name'])){
648
  $input1['author']['name'] = $custom_fields['saswp_dfp_author_name'];
649
  }
 
 
 
 
 
 
 
 
 
 
650
 
651
  break;
652
 
@@ -979,16 +989,16 @@ Class saswp_output_service{
979
  case 'TVSeries':
980
 
981
  if(isset($custom_fields['saswp_tvseries_schema_name'])){
982
- $input1['mainEntityOfPage'] = $custom_fields['saswp_tvseries_schema_name'];
983
  }
984
  if(isset($custom_fields['saswp_tvseries_schema_description'])){
985
- $input1['mainEntityOfPage'] = $custom_fields['saswp_tvseries_schema_description'];
986
  }
987
  if(isset($custom_fields['saswp_tvseries_schema_image'])){
988
- $input1['mainEntityOfPage'] = $custom_fields['saswp_tvseries_schema_image'];
989
  }
990
  if(isset($custom_fields['saswp_tvseries_schema_author_name'])){
991
- $input1['mainEntityOfPage'] = $custom_fields['saswp_tvseries_schema_author_name'];
992
  }
993
 
994
  break;
@@ -996,31 +1006,31 @@ Class saswp_output_service{
996
  case 'TouristAttraction':
997
 
998
  if(isset($custom_fields['saswp_ta_schema_name'])){
999
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_name'];
1000
  }
1001
  if(isset($custom_fields['saswp_ta_schema_description'])){
1002
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_description'];
1003
  }
1004
  if(isset($custom_fields['saswp_ta_schema_image'])){
1005
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_image'];
1006
  }
1007
  if(isset($custom_fields['saswp_ta_schema_url'])){
1008
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_url'];
1009
  }
1010
  if(isset($custom_fields['saswp_ta_schema_is_acceesible_free'])){
1011
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_is_acceesible_free'];
1012
  }
1013
  if(isset($custom_fields['saswp_ta_schema_locality'])){
1014
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_locality'];
1015
  }
1016
  if(isset($custom_fields['saswp_ta_schema_region'])){
1017
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_region'];
1018
  }
1019
  if(isset($custom_fields['saswp_ta_schema_country'])){
1020
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_country'];
1021
  }
1022
  if(isset($custom_fields['saswp_ta_schema_postal_code'])){
1023
- $input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_postal_code'];
1024
  }
1025
 
1026
  break;
@@ -1032,28 +1042,28 @@ Class saswp_output_service{
1032
  case 'TouristDestination':
1033
 
1034
  if(isset($custom_fields['saswp_td_schema_name'])){
1035
- $input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_name'];
1036
  }
1037
  if(isset($custom_fields['saswp_td_schema_description'])){
1038
- $input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_description'];
1039
  }
1040
  if(isset($custom_fields['saswp_td_schema_image'])){
1041
- $input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_image'];
1042
  }
1043
  if(isset($custom_fields['saswp_td_schema_url'])){
1044
- $input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_url'];
1045
  }
1046
  if(isset($custom_fields['saswp_td_schema_locality'])){
1047
- $input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_locality'];
1048
  }
1049
  if(isset($custom_fields['saswp_td_schema_region'])){
1050
- $input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_region'];
1051
  }
1052
  if(isset($custom_fields['saswp_td_schema_country'])){
1053
- $input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_country'];
1054
  }
1055
  if(isset($custom_fields['saswp_td_schema_postal_code'])){
1056
- $input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_postal_code'];
1057
  }
1058
 
1059
  break;
@@ -1061,37 +1071,37 @@ Class saswp_output_service{
1061
  case 'LandmarksOrHistoricalBuildings':
1062
 
1063
  if(isset($custom_fields['saswp_lorh_schema_name'])){
1064
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_name'];
1065
  }
1066
  if(isset($custom_fields['saswp_lorh_schema_description'])){
1067
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_description'];
1068
  }
1069
  if(isset($custom_fields['saswp_lorh_schema_image'])){
1070
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_image'];
1071
  }
1072
  if(isset($custom_fields['saswp_lorh_schema_url'])){
1073
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_url'];
1074
  }
1075
  if(isset($custom_fields['saswp_lorh_schema_hasmap'])){
1076
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_hasmap'];
1077
  }
1078
  if(isset($custom_fields['saswp_lorh_schema_is_acceesible_free'])){
1079
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_is_acceesible_free'];
1080
  }
1081
  if(isset($custom_fields['saswp_lorh_schema_maximum_a_capacity'])){
1082
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_maximum_a_capacity'];
1083
  }
1084
  if(isset($custom_fields['saswp_lorh_schema_locality'])){
1085
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_locality'];
1086
  }
1087
  if(isset($custom_fields['saswp_lorh_schema_region'])){
1088
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_region'];
1089
  }
1090
  if(isset($custom_fields['saswp_lorh_schema_country'])){
1091
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_country'];
1092
  }
1093
  if(isset($custom_fields['saswp_lorh_schema_postal_code'])){
1094
- $input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_postal_code'];
1095
  }
1096
 
1097
  break;
@@ -1099,37 +1109,37 @@ Class saswp_output_service{
1099
  case 'HinduTemple':
1100
 
1101
  if(isset($custom_fields['saswp_hindutemple_schema_name'])){
1102
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_name'];
1103
  }
1104
  if(isset($custom_fields['saswp_hindutemple_schema_description'])){
1105
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_description'];
1106
  }
1107
  if(isset($custom_fields['saswp_hindutemple_schema_image'])){
1108
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_image'];
1109
  }
1110
  if(isset($custom_fields['saswp_hindutemple_schema_url'])){
1111
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_url'];
1112
  }
1113
  if(isset($custom_fields['saswp_hindutemple_schema_hasmap'])){
1114
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_hasmap'];
1115
  }
1116
  if(isset($custom_fields['saswp_hindutemple_schema_is_accesible_free'])){
1117
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_is_accesible_free'];
1118
  }
1119
  if(isset($custom_fields['saswp_hindutemple_schema_maximum_a_capacity'])){
1120
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_maximum_a_capacity'];
1121
  }
1122
  if(isset($custom_fields['saswp_hindutemple_schema_locality'])){
1123
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_locality'];
1124
  }
1125
  if(isset($custom_fields['saswp_hindutemple_schema_region'])){
1126
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_region'];
1127
  }
1128
  if(isset($custom_fields['saswp_hindutemple_schema_country'])){
1129
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_country'];
1130
  }
1131
  if(isset($custom_fields['saswp_hindutemple_schema_postal_code'])){
1132
- $input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_postal_code'];
1133
  }
1134
 
1135
  break;
@@ -1137,37 +1147,37 @@ Class saswp_output_service{
1137
  case 'Church':
1138
 
1139
  if(isset($custom_fields['saswp_church_schema_name'])){
1140
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_name'];
1141
  }
1142
  if(isset($custom_fields['saswp_church_schema_description'])){
1143
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_description'];
1144
  }
1145
  if(isset($custom_fields['saswp_church_schema_image'])){
1146
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_image'];
1147
  }
1148
  if(isset($custom_fields['saswp_church_schema_url'])){
1149
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_url'];
1150
  }
1151
  if(isset($custom_fields['saswp_church_schema_hasmap'])){
1152
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_hasmap'];
1153
  }
1154
  if(isset($custom_fields['saswp_church_schema_is_accesible_free'])){
1155
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_is_accesible_free'];
1156
  }
1157
  if(isset($custom_fields['saswp_church_schema_maximum_a_capacity'])){
1158
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_maximum_a_capacity'];
1159
  }
1160
  if(isset($custom_fields['saswp_church_schema_locality'])){
1161
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_locality'];
1162
  }
1163
  if(isset($custom_fields['saswp_church_schema_region'])){
1164
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_region'];
1165
  }
1166
  if(isset($custom_fields['saswp_church_schema_country'])){
1167
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_country'];
1168
  }
1169
  if(isset($custom_fields['saswp_church_schema_postal_code'])){
1170
- $input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_postal_code'];
1171
  }
1172
 
1173
  break;
@@ -1175,37 +1185,37 @@ Class saswp_output_service{
1175
  case 'Mosque':
1176
 
1177
  if(isset($custom_fields['saswp_mosque_schema_name'])){
1178
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_name'];
1179
  }
1180
  if(isset($custom_fields['saswp_mosque_schema_description'])){
1181
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_description'];
1182
  }
1183
  if(isset($custom_fields['saswp_mosque_schema_image'])){
1184
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_image'];
1185
  }
1186
  if(isset($custom_fields['saswp_mosque_schema_url'])){
1187
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_url'];
1188
  }
1189
  if(isset($custom_fields['saswp_mosque_schema_hasmap'])){
1190
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_hasmap'];
1191
  }
1192
  if(isset($custom_fields['saswp_mosque_schema_is_accesible_free'])){
1193
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_is_accesible_free'];
1194
  }
1195
  if(isset($custom_fields['saswp_mosque_schema_maximum_a_capacity'])){
1196
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_maximum_a_capacity'];
1197
  }
1198
  if(isset($custom_fields['saswp_mosque_schema_locality'])){
1199
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_locality'];
1200
  }
1201
  if(isset($custom_fields['saswp_mosque_schema_region'])){
1202
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_region'];
1203
  }
1204
  if(isset($custom_fields['saswp_mosque_schema_country'])){
1205
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_country'];
1206
  }
1207
  if(isset($custom_fields['saswp_mosque_schema_postal_code'])){
1208
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_postal_code'];
1209
  }
1210
 
1211
  break;
@@ -1264,34 +1274,34 @@ Class saswp_output_service{
1264
  case 'Apartment':
1265
 
1266
  if(isset($custom_fields['saswp_apartment_schema_name'])){
1267
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_name'];
1268
  }
1269
  if(isset($custom_fields['saswp_apartment_schema_url'])){
1270
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_url'];
1271
  }
1272
  if(isset($custom_fields['saswp_apartment_schema_image'])){
1273
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_image'];
1274
  }
1275
  if(isset($custom_fields['saswp_apartment_schema_description'])){
1276
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_description'];
1277
  }
1278
  if(isset($custom_fields['saswp_apartment_schema_numberofrooms'])){
1279
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_numberofrooms'];
1280
  }
1281
  if(isset($custom_fields['saswp_apartment_schema_country'])){
1282
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_country'];
1283
  }
1284
  if(isset($custom_fields['saswp_apartment_schema_locality'])){
1285
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_locality'];
1286
  }
1287
  if(isset($custom_fields['saswp_apartment_schema_region'])){
1288
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_region'];
1289
  }
1290
  if(isset($custom_fields['saswp_apartment_schema_postalcode'])){
1291
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_postalcode'];
1292
  }
1293
  if(isset($custom_fields['saswp_apartment_schema_telephone'])){
1294
- $input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_telephone'];
1295
  }
1296
 
1297
  break;
@@ -1299,34 +1309,34 @@ Class saswp_output_service{
1299
  case 'House':
1300
 
1301
  if(isset($custom_fields['saswp_house_schema_name'])){
1302
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_name'];
1303
  }
1304
  if(isset($custom_fields['saswp_house_schema_url'])){
1305
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_url'];
1306
  }
1307
  if(isset($custom_fields['saswp_house_schema_image'])){
1308
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_image'];
1309
  }
1310
  if(isset($custom_fields['saswp_house_schema_description'])){
1311
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_description'];
1312
  }
1313
  if(isset($custom_fields['saswp_house_schema_pets_allowed'])){
1314
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_pets_allowed'];
1315
  }
1316
  if(isset($custom_fields['saswp_house_schema_country'])){
1317
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_country'];
1318
  }
1319
  if(isset($custom_fields['saswp_house_schema_locality'])){
1320
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_locality'];
1321
  }
1322
  if(isset($custom_fields['saswp_house_schema_region'])){
1323
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_region'];
1324
  }
1325
  if(isset($custom_fields['saswp_house_schema_postalcode'])){
1326
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_postalcode'];
1327
  }
1328
  if(isset($custom_fields['saswp_house_schema_telephone'])){
1329
- $input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_telephone'];
1330
  }
1331
 
1332
  break;
@@ -1334,37 +1344,37 @@ Class saswp_output_service{
1334
  case 'SingleFamilyResidence':
1335
 
1336
  if(isset($custom_fields['saswp_sfr_schema_name'])){
1337
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_name'];
1338
  }
1339
  if(isset($custom_fields['saswp_sfr_schema_url'])){
1340
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_url'];
1341
  }
1342
  if(isset($custom_fields['saswp_sfr_schema_image'])){
1343
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_image'];
1344
  }
1345
  if(isset($custom_fields['saswp_sfr_schema_description'])){
1346
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_description'];
1347
  }
1348
  if(isset($custom_fields['saswp_sfr_schema_numberofrooms'])){
1349
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_numberofrooms'];
1350
  }
1351
  if(isset($custom_fields['saswp_sfr_schema_pets_allowed'])){
1352
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_pets_allowed'];
1353
  }
1354
  if(isset($custom_fields['saswp_sfr_schema_country'])){
1355
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_country'];
1356
  }
1357
  if(isset($custom_fields['saswp_sfr_schema_locality'])){
1358
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_locality'];
1359
  }
1360
  if(isset($custom_fields['saswp_sfr_schema_region'])){
1361
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_region'];
1362
  }
1363
  if(isset($custom_fields['saswp_sfr_schema_postalcode'])){
1364
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_postalcode'];
1365
  }
1366
  if(isset($custom_fields['saswp_sfr_schema_telephone'])){
1367
- $input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_telephone'];
1368
  }
1369
 
1370
  break;
@@ -1372,55 +1382,55 @@ Class saswp_output_service{
1372
  case 'VideoGame':
1373
 
1374
  if(isset($custom_fields['saswp_vg_schema_name'])){
1375
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_name'];
1376
  }
1377
  if(isset($custom_fields['saswp_vg_schema_url'])){
1378
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_url'];
1379
  }
1380
  if(isset($custom_fields['saswp_vg_schema_image'])){
1381
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_image'];
1382
  }
1383
  if(isset($custom_fields['saswp_vg_schema_description'])){
1384
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_description'];
1385
  }
1386
  if(isset($custom_fields['saswp_vg_schema_operating_system'])){
1387
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_operating_system'];
1388
  }
1389
  if(isset($custom_fields['saswp_vg_schema_application_category'])){
1390
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_application_category'];
1391
  }
1392
  if(isset($custom_fields['saswp_vg_schema_author_name'])){
1393
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_author_name'];
1394
  }
1395
  if(isset($custom_fields['saswp_vg_schema_price'])){
1396
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_price'];
1397
  }
1398
  if(isset($custom_fields['saswp_vg_schema_price_currency'])){
1399
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_price_currency'];
1400
  }
1401
  if(isset($custom_fields['saswp_vg_schema_price_availability'])){
1402
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_price_availability'];
1403
  }
1404
  if(isset($custom_fields['saswp_vg_schema_publisher'])){
1405
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_publisher'];
1406
  }
1407
  if(isset($custom_fields['saswp_vg_schema_genre'])){
1408
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_genre'];
1409
  }
1410
  if(isset($custom_fields['saswp_vg_schema_processor_requirements'])){
1411
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_processor_requirements'];
1412
  }
1413
  if(isset($custom_fields['saswp_vg_schema_memory_requirements'])){
1414
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_memory_requirements'];
1415
  }
1416
  if(isset($custom_fields['saswp_vg_schema_storage_requirements'])){
1417
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_storage_requirements'];
1418
  }
1419
  if(isset($custom_fields['saswp_vg_schema_game_platform'])){
1420
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_game_platform'];
1421
  }
1422
  if(isset($custom_fields['saswp_vg_schema_cheat_code'])){
1423
- $input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_cheat_code'];
1424
  }
1425
 
1426
  break;
@@ -1428,55 +1438,55 @@ Class saswp_output_service{
1428
  case 'JobPosting':
1429
 
1430
  if(isset($custom_fields['saswp_jobposting_schema_title'])){
1431
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_title'];
1432
  }
1433
  if(isset($custom_fields['saswp_jobposting_schema_description'])){
1434
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_description'];
1435
  }
1436
  if(isset($custom_fields['saswp_jobposting_schema_url'])){
1437
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_url'];
1438
  }
1439
  if(isset($custom_fields['saswp_jobposting_schema_dateposted'])){
1440
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_dateposted'];
1441
  }
1442
  if(isset($custom_fields['saswp_jobposting_schema_validthrough'])){
1443
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_validthrough'];
1444
  }
1445
  if(isset($custom_fields['saswp_jobposting_schema_employment_type'])){
1446
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_employment_type'];
1447
  }
1448
  if(isset($custom_fields['saswp_jobposting_schema_ho_name'])){
1449
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_ho_name'];
1450
  }
1451
  if(isset($custom_fields['saswp_jobposting_schema_ho_url'])){
1452
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_ho_url'];
1453
  }
1454
  if(isset($custom_fields['saswp_jobposting_schema_ho_logo'])){
1455
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_ho_logo'];
1456
  }
1457
  if(isset($custom_fields['saswp_jobposting_schema_street_address'])){
1458
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_street_address'];
1459
  }
1460
  if(isset($custom_fields['saswp_jobposting_schema_locality'])){
1461
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_locality'];
1462
  }
1463
  if(isset($custom_fields['saswp_jobposting_schema_region'])){
1464
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_region'];
1465
  }
1466
  if(isset($custom_fields['saswp_jobposting_schema_postalcode'])){
1467
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_postalcode'];
1468
  }
1469
  if(isset($custom_fields['saswp_jobposting_schema_country'])){
1470
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_country'];
1471
  }
1472
  if(isset($custom_fields['saswp_jobposting_schema_bs_currency'])){
1473
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_bs_currency'];
1474
  }
1475
  if(isset($custom_fields['saswp_jobposting_schema_bs_value'])){
1476
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_bs_value'];
1477
  }
1478
  if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
1479
- $input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
1480
  }
1481
 
1482
  break;
@@ -1484,16 +1494,16 @@ Class saswp_output_service{
1484
  case 'Trip':
1485
 
1486
  if(isset($custom_fields['saswp_trip_schema_name'])){
1487
- $input1['mainEntityOfPage'] = $custom_fields['saswp_trip_schema_name'];
1488
  }
1489
  if(isset($custom_fields['saswp_trip_schema_description'])){
1490
- $input1['mainEntityOfPage'] = $custom_fields['saswp_trip_schema_description'];
1491
  }
1492
  if(isset($custom_fields['saswp_trip_schema_url'])){
1493
- $input1['mainEntityOfPage'] = $custom_fields['saswp_trip_schema_url'];
1494
  }
1495
  if(isset($custom_fields['saswp_trip_schema_image'])){
1496
- $input1['mainEntityOfPage'] = $custom_fields['saswp_trip_schema_image'];
1497
  }
1498
 
1499
  break;
@@ -1501,29 +1511,26 @@ Class saswp_output_service{
1501
  case 'MedicalCondition':
1502
 
1503
  if(isset($custom_fields['saswp_mc_schema_name'])){
1504
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_name'];
1505
  }
1506
  if(isset($custom_fields['saswp_mc_schema_alternate_name'])){
1507
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_alternate_name'];
1508
  }
1509
  if(isset($custom_fields['saswp_mc_schema_description'])){
1510
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_description'];
1511
  }
1512
  if(isset($custom_fields['saswp_mc_schema_image'])){
1513
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_image'];
1514
  }
1515
  if(isset($custom_fields['saswp_mc_schema_anatomy_name'])){
1516
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_anatomy_name'];
1517
  }
1518
  if(isset($custom_fields['saswp_mc_schema_medical_code'])){
1519
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_medical_code'];
1520
  }
1521
  if(isset($custom_fields['saswp_mc_schema_coding_system'])){
1522
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_coding_system'];
1523
- }
1524
- if(isset($custom_fields['saswp_mc_schema_diagnosis_name'])){
1525
- $input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_diagnosis_name'];
1526
- }
1527
 
1528
  break;
1529
 
@@ -2109,12 +2116,15 @@ Class saswp_output_service{
2109
  case 'DiscussionForumPosting':
2110
 
2111
  $meta_field = array(
2112
- 'saswp_dfp_headline' => 'Headline',
2113
- 'saswp_dfp_description' => 'Description',
2114
- 'saswp_dfp_url' => 'URL',
2115
- 'saswp_dfp_date_published' => 'Date Published',
2116
- 'saswp_dfp_date_modified' => 'Date Modified',
2117
- 'saswp_dfp_author_name' => 'Author Name',
 
 
 
2118
  );
2119
 
2120
  break;
647
  if(isset($custom_fields['saswp_dfp_author_name'])){
648
  $input1['author']['name'] = $custom_fields['saswp_dfp_author_name'];
649
  }
650
+
651
+ if(isset($custom_fields['saswp_dfp_main_entity_of_page'])){
652
+ $input1['mainEntityOfPage'] = $custom_fields['saswp_dfp_main_entity_of_page'];
653
+ }
654
+ if(isset($custom_fields['saswp_dfp_organization_name'])){
655
+ $input1['publisher']['name'] = $custom_fields['saswp_dfp_organization_name'];
656
+ }
657
+ if(isset($custom_fields['saswp_dfp_organization_logo'])){
658
+ $input1['publisher']['logo'] = $custom_fields['saswp_dfp_organization_logo'];
659
+ }
660
 
661
  break;
662
 
989
  case 'TVSeries':
990
 
991
  if(isset($custom_fields['saswp_tvseries_schema_name'])){
992
+ $input1['name'] = $custom_fields['saswp_tvseries_schema_name'];
993
  }
994
  if(isset($custom_fields['saswp_tvseries_schema_description'])){
995
+ $input1['description'] = $custom_fields['saswp_tvseries_schema_description'];
996
  }
997
  if(isset($custom_fields['saswp_tvseries_schema_image'])){
998
+ $input1['image'] = $custom_fields['saswp_tvseries_schema_image'];
999
  }
1000
  if(isset($custom_fields['saswp_tvseries_schema_author_name'])){
1001
+ $input1['author']['name'] = $custom_fields['saswp_tvseries_schema_author_name'];
1002
  }
1003
 
1004
  break;
1006
  case 'TouristAttraction':
1007
 
1008
  if(isset($custom_fields['saswp_ta_schema_name'])){
1009
+ $input1['name'] = $custom_fields['saswp_ta_schema_name'];
1010
  }
1011
  if(isset($custom_fields['saswp_ta_schema_description'])){
1012
+ $input1['description'] = $custom_fields['saswp_ta_schema_description'];
1013
  }
1014
  if(isset($custom_fields['saswp_ta_schema_image'])){
1015
+ $input1['image'] = $custom_fields['saswp_ta_schema_image'];
1016
  }
1017
  if(isset($custom_fields['saswp_ta_schema_url'])){
1018
+ $input1['url'] = $custom_fields['saswp_ta_schema_url'];
1019
  }
1020
  if(isset($custom_fields['saswp_ta_schema_is_acceesible_free'])){
1021
+ $input1['isAccessibleForFree'] = $custom_fields['saswp_ta_schema_is_acceesible_free'];
1022
  }
1023
  if(isset($custom_fields['saswp_ta_schema_locality'])){
1024
+ $input1['address']['addressLocality'] = $custom_fields['saswp_ta_schema_locality'];
1025
  }
1026
  if(isset($custom_fields['saswp_ta_schema_region'])){
1027
+ $input1['address']['addressRegion'] = $custom_fields['saswp_ta_schema_region'];
1028
  }
1029
  if(isset($custom_fields['saswp_ta_schema_country'])){
1030
+ $input1['address']['addressCountry'] = $custom_fields['saswp_ta_schema_country'];
1031
  }
1032
  if(isset($custom_fields['saswp_ta_schema_postal_code'])){
1033
+ $input1['address']['PostalCode'] = $custom_fields['saswp_ta_schema_postal_code'];
1034
  }
1035
 
1036
  break;
1042
  case 'TouristDestination':
1043
 
1044
  if(isset($custom_fields['saswp_td_schema_name'])){
1045
+ $input1['name'] = $custom_fields['saswp_td_schema_name'];
1046
  }
1047
  if(isset($custom_fields['saswp_td_schema_description'])){
1048
+ $input1['description'] = $custom_fields['saswp_td_schema_description'];
1049
  }
1050
  if(isset($custom_fields['saswp_td_schema_image'])){
1051
+ $input1['image'] = $custom_fields['saswp_td_schema_image'];
1052
  }
1053
  if(isset($custom_fields['saswp_td_schema_url'])){
1054
+ $input1['url'] = $custom_fields['saswp_td_schema_url'];
1055
  }
1056
  if(isset($custom_fields['saswp_td_schema_locality'])){
1057
+ $input1['address']['addressLocality'] = $custom_fields['saswp_td_schema_locality'];
1058
  }
1059
  if(isset($custom_fields['saswp_td_schema_region'])){
1060
+ $input1['address']['addressRegion'] = $custom_fields['saswp_td_schema_region'];
1061
  }
1062
  if(isset($custom_fields['saswp_td_schema_country'])){
1063
+ $input1['address']['addressCountry'] = $custom_fields['saswp_td_schema_country'];
1064
  }
1065
  if(isset($custom_fields['saswp_td_schema_postal_code'])){
1066
+ $input1['address']['PostalCode'] = $custom_fields['saswp_td_schema_postal_code'];
1067
  }
1068
 
1069
  break;
1071
  case 'LandmarksOrHistoricalBuildings':
1072
 
1073
  if(isset($custom_fields['saswp_lorh_schema_name'])){
1074
+ $input1['name'] = $custom_fields['saswp_lorh_schema_name'];
1075
  }
1076
  if(isset($custom_fields['saswp_lorh_schema_description'])){
1077
+ $input1['description'] = $custom_fields['saswp_lorh_schema_description'];
1078
  }
1079
  if(isset($custom_fields['saswp_lorh_schema_image'])){
1080
+ $input1['image'] = $custom_fields['saswp_lorh_schema_image'];
1081
  }
1082
  if(isset($custom_fields['saswp_lorh_schema_url'])){
1083
+ $input1['url'] = $custom_fields['saswp_lorh_schema_url'];
1084
  }
1085
  if(isset($custom_fields['saswp_lorh_schema_hasmap'])){
1086
+ $input1['hasMap'] = $custom_fields['saswp_lorh_schema_hasmap'];
1087
  }
1088
  if(isset($custom_fields['saswp_lorh_schema_is_acceesible_free'])){
1089
+ $input1['isAccessibleForFree'] = $custom_fields['saswp_lorh_schema_is_acceesible_free'];
1090
  }
1091
  if(isset($custom_fields['saswp_lorh_schema_maximum_a_capacity'])){
1092
+ $input1['maximumAttendeeCapacity'] = $custom_fields['saswp_lorh_schema_maximum_a_capacity'];
1093
  }
1094
  if(isset($custom_fields['saswp_lorh_schema_locality'])){
1095
+ $input1['address']['addressLocality'] = $custom_fields['saswp_lorh_schema_locality'];
1096
  }
1097
  if(isset($custom_fields['saswp_lorh_schema_region'])){
1098
+ $input1['address']['addressRegion'] = $custom_fields['saswp_lorh_schema_region'];
1099
  }
1100
  if(isset($custom_fields['saswp_lorh_schema_country'])){
1101
+ $input1['address']['addressCountry'] = $custom_fields['saswp_lorh_schema_country'];
1102
  }
1103
  if(isset($custom_fields['saswp_lorh_schema_postal_code'])){
1104
+ $input1['address']['PostalCode'] = $custom_fields['saswp_lorh_schema_postal_code'];
1105
  }
1106
 
1107
  break;
1109
  case 'HinduTemple':
1110
 
1111
  if(isset($custom_fields['saswp_hindutemple_schema_name'])){
1112
+ $input1['name'] = $custom_fields['saswp_hindutemple_schema_name'];
1113
  }
1114
  if(isset($custom_fields['saswp_hindutemple_schema_description'])){
1115
+ $input1['description'] = $custom_fields['saswp_hindutemple_schema_description'];
1116
  }
1117
  if(isset($custom_fields['saswp_hindutemple_schema_image'])){
1118
+ $input1['image'] = $custom_fields['saswp_hindutemple_schema_image'];
1119
  }
1120
  if(isset($custom_fields['saswp_hindutemple_schema_url'])){
1121
+ $input1['url'] = $custom_fields['saswp_hindutemple_schema_url'];
1122
  }
1123
  if(isset($custom_fields['saswp_hindutemple_schema_hasmap'])){
1124
+ $input1['hasMap'] = $custom_fields['saswp_hindutemple_schema_hasmap'];
1125
  }
1126
  if(isset($custom_fields['saswp_hindutemple_schema_is_accesible_free'])){
1127
+ $input1['isAccessibleForFree'] = $custom_fields['saswp_hindutemple_schema_is_accesible_free'];
1128
  }
1129
  if(isset($custom_fields['saswp_hindutemple_schema_maximum_a_capacity'])){
1130
+ $input1['maximumAttendeeCapacity'] = $custom_fields['saswp_hindutemple_schema_maximum_a_capacity'];
1131
  }
1132
  if(isset($custom_fields['saswp_hindutemple_schema_locality'])){
1133
+ $input1['address']['addressLocality'] = $custom_fields['saswp_hindutemple_schema_locality'];
1134
  }
1135
  if(isset($custom_fields['saswp_hindutemple_schema_region'])){
1136
+ $input1['address']['addressRegion'] = $custom_fields['saswp_hindutemple_schema_region'];
1137
  }
1138
  if(isset($custom_fields['saswp_hindutemple_schema_country'])){
1139
+ $input1['address']['addressCountry'] = $custom_fields['saswp_hindutemple_schema_country'];
1140
  }
1141
  if(isset($custom_fields['saswp_hindutemple_schema_postal_code'])){
1142
+ $input1['address']['PostalCode'] = $custom_fields['saswp_hindutemple_schema_postal_code'];
1143
  }
1144
 
1145
  break;
1147
  case 'Church':
1148
 
1149
  if(isset($custom_fields['saswp_church_schema_name'])){
1150
+ $input1['name'] = $custom_fields['saswp_church_schema_name'];
1151
  }
1152
  if(isset($custom_fields['saswp_church_schema_description'])){
1153
+ $input1['description'] = $custom_fields['saswp_church_schema_description'];
1154
  }
1155
  if(isset($custom_fields['saswp_church_schema_image'])){
1156
+ $input1['image'] = $custom_fields['saswp_church_schema_image'];
1157
  }
1158
  if(isset($custom_fields['saswp_church_schema_url'])){
1159
+ $input1['url'] = $custom_fields['saswp_church_schema_url'];
1160
  }
1161
  if(isset($custom_fields['saswp_church_schema_hasmap'])){
1162
+ $input1['hasMap'] = $custom_fields['saswp_church_schema_hasmap'];
1163
  }
1164
  if(isset($custom_fields['saswp_church_schema_is_accesible_free'])){
1165
+ $input1['isAccessibleForFree'] = $custom_fields['saswp_church_schema_is_accesible_free'];
1166
  }
1167
  if(isset($custom_fields['saswp_church_schema_maximum_a_capacity'])){
1168
+ $input1['maximumAttendeeCapacity'] = $custom_fields['saswp_church_schema_maximum_a_capacity'];
1169
  }
1170
  if(isset($custom_fields['saswp_church_schema_locality'])){
1171
+ $input1['address']['addressLocality'] = $custom_fields['saswp_church_schema_locality'];
1172
  }
1173
  if(isset($custom_fields['saswp_church_schema_region'])){
1174
+ $input1['address']['addressRegion'] = $custom_fields['saswp_church_schema_region'];
1175
  }
1176
  if(isset($custom_fields['saswp_church_schema_country'])){
1177
+ $input1['address']['addressCountry'] = $custom_fields['saswp_church_schema_country'];
1178
  }
1179
  if(isset($custom_fields['saswp_church_schema_postal_code'])){
1180
+ $input1['address']['PostalCode'] = $custom_fields['saswp_church_schema_postal_code'];
1181
  }
1182
 
1183
  break;
1185
  case 'Mosque':
1186
 
1187
  if(isset($custom_fields['saswp_mosque_schema_name'])){
1188
+ $input1['name'] = $custom_fields['saswp_mosque_schema_name'];
1189
  }
1190
  if(isset($custom_fields['saswp_mosque_schema_description'])){
1191
+ $input1['description'] = $custom_fields['saswp_mosque_schema_description'];
1192
  }
1193
  if(isset($custom_fields['saswp_mosque_schema_image'])){
1194
+ $input1['image'] = $custom_fields['saswp_mosque_schema_image'];
1195
  }
1196
  if(isset($custom_fields['saswp_mosque_schema_url'])){
1197
+ $input1['url'] = $custom_fields['saswp_mosque_schema_url'];
1198
  }
1199
  if(isset($custom_fields['saswp_mosque_schema_hasmap'])){
1200
+ $input1['hasMap'] = $custom_fields['saswp_mosque_schema_hasmap'];
1201
  }
1202
  if(isset($custom_fields['saswp_mosque_schema_is_accesible_free'])){
1203
+ $input1['isAccessibleForFree'] = $custom_fields['saswp_mosque_schema_is_accesible_free'];
1204
  }
1205
  if(isset($custom_fields['saswp_mosque_schema_maximum_a_capacity'])){
1206
+ $input1['maximumAttendeeCapacity'] = $custom_fields['saswp_mosque_schema_maximum_a_capacity'];
1207
  }
1208
  if(isset($custom_fields['saswp_mosque_schema_locality'])){
1209
+ $input1['address']['addressLocality'] = $custom_fields['saswp_mosque_schema_locality'];
1210
  }
1211
  if(isset($custom_fields['saswp_mosque_schema_region'])){
1212
+ $input1['address']['addressRegion'] = $custom_fields['saswp_mosque_schema_region'];
1213
  }
1214
  if(isset($custom_fields['saswp_mosque_schema_country'])){
1215
+ $input1['address']['addressCountry'] = $custom_fields['saswp_mosque_schema_country'];
1216
  }
1217
  if(isset($custom_fields['saswp_mosque_schema_postal_code'])){
1218
+ $input1['address']['PostalCode'] = $custom_fields['saswp_mosque_schema_postal_code'];
1219
  }
1220
 
1221
  break;
1274
  case 'Apartment':
1275
 
1276
  if(isset($custom_fields['saswp_apartment_schema_name'])){
1277
+ $input1['name'] = $custom_fields['saswp_apartment_schema_name'];
1278
  }
1279
  if(isset($custom_fields['saswp_apartment_schema_url'])){
1280
+ $input1['url'] = $custom_fields['saswp_apartment_schema_url'];
1281
  }
1282
  if(isset($custom_fields['saswp_apartment_schema_image'])){
1283
+ $input1['image'] = $custom_fields['saswp_apartment_schema_image'];
1284
  }
1285
  if(isset($custom_fields['saswp_apartment_schema_description'])){
1286
+ $input1['description'] = $custom_fields['saswp_apartment_schema_description'];
1287
  }
1288
  if(isset($custom_fields['saswp_apartment_schema_numberofrooms'])){
1289
+ $input1['numberOfRooms'] = $custom_fields['saswp_apartment_schema_numberofrooms'];
1290
  }
1291
  if(isset($custom_fields['saswp_apartment_schema_country'])){
1292
+ $input1['address']['addressCountry'] = $custom_fields['saswp_apartment_schema_country'];
1293
  }
1294
  if(isset($custom_fields['saswp_apartment_schema_locality'])){
1295
+ $input1['address']['addressLocality'] = $custom_fields['saswp_apartment_schema_locality'];
1296
  }
1297
  if(isset($custom_fields['saswp_apartment_schema_region'])){
1298
+ $input1['address']['addressRegion'] = $custom_fields['saswp_apartment_schema_region'];
1299
  }
1300
  if(isset($custom_fields['saswp_apartment_schema_postalcode'])){
1301
+ $input1['address']['PostalCode'] = $custom_fields['saswp_apartment_schema_postalcode'];
1302
  }
1303
  if(isset($custom_fields['saswp_apartment_schema_telephone'])){
1304
+ $input1['telephone'] = $custom_fields['saswp_apartment_schema_telephone'];
1305
  }
1306
 
1307
  break;
1309
  case 'House':
1310
 
1311
  if(isset($custom_fields['saswp_house_schema_name'])){
1312
+ $input1['name'] = $custom_fields['saswp_house_schema_name'];
1313
  }
1314
  if(isset($custom_fields['saswp_house_schema_url'])){
1315
+ $input1['url'] = $custom_fields['saswp_house_schema_url'];
1316
  }
1317
  if(isset($custom_fields['saswp_house_schema_image'])){
1318
+ $input1['image'] = $custom_fields['saswp_house_schema_image'];
1319
  }
1320
  if(isset($custom_fields['saswp_house_schema_description'])){
1321
+ $input1['description'] = $custom_fields['saswp_house_schema_description'];
1322
  }
1323
  if(isset($custom_fields['saswp_house_schema_pets_allowed'])){
1324
+ $input1['petsAllowed'] = $custom_fields['saswp_house_schema_pets_allowed'];
1325
  }
1326
  if(isset($custom_fields['saswp_house_schema_country'])){
1327
+ $input1['address']['addressCountry'] = $custom_fields['saswp_house_schema_country'];
1328
  }
1329
  if(isset($custom_fields['saswp_house_schema_locality'])){
1330
+ $input1['address']['addressLocality'] = $custom_fields['saswp_house_schema_locality'];
1331
  }
1332
  if(isset($custom_fields['saswp_house_schema_region'])){
1333
+ $input1['address']['addressRegion'] = $custom_fields['saswp_house_schema_region'];
1334
  }
1335
  if(isset($custom_fields['saswp_house_schema_postalcode'])){
1336
+ $input1['address']['PostalCode'] = $custom_fields['saswp_house_schema_postalcode'];
1337
  }
1338
  if(isset($custom_fields['saswp_house_schema_telephone'])){
1339
+ $input1['telephone'] = $custom_fields['saswp_house_schema_telephone'];
1340
  }
1341
 
1342
  break;
1344
  case 'SingleFamilyResidence':
1345
 
1346
  if(isset($custom_fields['saswp_sfr_schema_name'])){
1347
+ $input1['name'] = $custom_fields['saswp_sfr_schema_name'];
1348
  }
1349
  if(isset($custom_fields['saswp_sfr_schema_url'])){
1350
+ $input1['url'] = $custom_fields['saswp_sfr_schema_url'];
1351
  }
1352
  if(isset($custom_fields['saswp_sfr_schema_image'])){
1353
+ $input1['image'] = $custom_fields['saswp_sfr_schema_image'];
1354
  }
1355
  if(isset($custom_fields['saswp_sfr_schema_description'])){
1356
+ $input1['description'] = $custom_fields['saswp_sfr_schema_description'];
1357
  }
1358
  if(isset($custom_fields['saswp_sfr_schema_numberofrooms'])){
1359
+ $input1['numberOfRooms'] = $custom_fields['saswp_sfr_schema_numberofrooms'];
1360
  }
1361
  if(isset($custom_fields['saswp_sfr_schema_pets_allowed'])){
1362
+ $input1['petsAllowed'] = $custom_fields['saswp_sfr_schema_pets_allowed'];
1363
  }
1364
  if(isset($custom_fields['saswp_sfr_schema_country'])){
1365
+ $input1['address']['addressCountry'] = $custom_fields['saswp_sfr_schema_country'];
1366
  }
1367
  if(isset($custom_fields['saswp_sfr_schema_locality'])){
1368
+ $input1['address']['addressLocality'] = $custom_fields['saswp_sfr_schema_locality'];
1369
  }
1370
  if(isset($custom_fields['saswp_sfr_schema_region'])){
1371
+ $input1['address']['addressRegion'] = $custom_fields['saswp_sfr_schema_region'];
1372
  }
1373
  if(isset($custom_fields['saswp_sfr_schema_postalcode'])){
1374
+ $input1['address']['PostalCode'] = $custom_fields['saswp_sfr_schema_postalcode'];
1375
  }
1376
  if(isset($custom_fields['saswp_sfr_schema_telephone'])){
1377
+ $input1['telephone'] = $custom_fields['saswp_sfr_schema_telephone'];
1378
  }
1379
 
1380
  break;
1382
  case 'VideoGame':
1383
 
1384
  if(isset($custom_fields['saswp_vg_schema_name'])){
1385
+ $input1['name'] = $custom_fields['saswp_vg_schema_name'];
1386
  }
1387
  if(isset($custom_fields['saswp_vg_schema_url'])){
1388
+ $input1['url'] = $custom_fields['saswp_vg_schema_url'];
1389
  }
1390
  if(isset($custom_fields['saswp_vg_schema_image'])){
1391
+ $input1['image'] = $custom_fields['saswp_vg_schema_image'];
1392
  }
1393
  if(isset($custom_fields['saswp_vg_schema_description'])){
1394
+ $input1['description'] = $custom_fields['saswp_vg_schema_description'];
1395
  }
1396
  if(isset($custom_fields['saswp_vg_schema_operating_system'])){
1397
+ $input1['operatingSystem'] = $custom_fields['saswp_vg_schema_operating_system'];
1398
  }
1399
  if(isset($custom_fields['saswp_vg_schema_application_category'])){
1400
+ $input1['applicationCategory'] = $custom_fields['saswp_vg_schema_application_category'];
1401
  }
1402
  if(isset($custom_fields['saswp_vg_schema_author_name'])){
1403
+ $input1['author']['name'] = $custom_fields['saswp_vg_schema_author_name'];
1404
  }
1405
  if(isset($custom_fields['saswp_vg_schema_price'])){
1406
+ $input1['offers']['price'] = $custom_fields['saswp_vg_schema_price'];
1407
  }
1408
  if(isset($custom_fields['saswp_vg_schema_price_currency'])){
1409
+ $input1['offers']['priceCurrency'] = $custom_fields['saswp_vg_schema_price_currency'];
1410
  }
1411
  if(isset($custom_fields['saswp_vg_schema_price_availability'])){
1412
+ $input1['offers']['availability'] = $custom_fields['saswp_vg_schema_price_availability'];
1413
  }
1414
  if(isset($custom_fields['saswp_vg_schema_publisher'])){
1415
+ $input1['publisher'] = $custom_fields['saswp_vg_schema_publisher'];
1416
  }
1417
  if(isset($custom_fields['saswp_vg_schema_genre'])){
1418
+ $input1['genre'] = $custom_fields['saswp_vg_schema_genre'];
1419
  }
1420
  if(isset($custom_fields['saswp_vg_schema_processor_requirements'])){
1421
+ $input1['processorRequirements'] = $custom_fields['saswp_vg_schema_processor_requirements'];
1422
  }
1423
  if(isset($custom_fields['saswp_vg_schema_memory_requirements'])){
1424
+ $input1['memoryRequirements'] = $custom_fields['saswp_vg_schema_memory_requirements'];
1425
  }
1426
  if(isset($custom_fields['saswp_vg_schema_storage_requirements'])){
1427
+ $input1['storageRequirements'] = $custom_fields['saswp_vg_schema_storage_requirements'];
1428
  }
1429
  if(isset($custom_fields['saswp_vg_schema_game_platform'])){
1430
+ $input1['gamePlatform'] = $custom_fields['saswp_vg_schema_game_platform'];
1431
  }
1432
  if(isset($custom_fields['saswp_vg_schema_cheat_code'])){
1433
+ $input1['cheatCode'] = $custom_fields['saswp_vg_schema_cheat_code'];
1434
  }
1435
 
1436
  break;
1438
  case 'JobPosting':
1439
 
1440
  if(isset($custom_fields['saswp_jobposting_schema_title'])){
1441
+ $input1['title'] = $custom_fields['saswp_jobposting_schema_title'];
1442
  }
1443
  if(isset($custom_fields['saswp_jobposting_schema_description'])){
1444
+ $input1['description'] = $custom_fields['saswp_jobposting_schema_description'];
1445
  }
1446
  if(isset($custom_fields['saswp_jobposting_schema_url'])){
1447
+ $input1['url'] = $custom_fields['saswp_jobposting_schema_url'];
1448
  }
1449
  if(isset($custom_fields['saswp_jobposting_schema_dateposted'])){
1450
+ $input1['datePosted'] = $custom_fields['saswp_jobposting_schema_dateposted'];
1451
  }
1452
  if(isset($custom_fields['saswp_jobposting_schema_validthrough'])){
1453
+ $input1['validThrough'] = $custom_fields['saswp_jobposting_schema_validthrough'];
1454
  }
1455
  if(isset($custom_fields['saswp_jobposting_schema_employment_type'])){
1456
+ $input1['employmentType'] = $custom_fields['saswp_jobposting_schema_employment_type'];
1457
  }
1458
  if(isset($custom_fields['saswp_jobposting_schema_ho_name'])){
1459
+ $input1['hiringOrganization']['name'] = $custom_fields['saswp_jobposting_schema_ho_name'];
1460
  }
1461
  if(isset($custom_fields['saswp_jobposting_schema_ho_url'])){
1462
+ $input1['hiringOrganization']['sameAs'] = $custom_fields['saswp_jobposting_schema_ho_url'];
1463
  }
1464
  if(isset($custom_fields['saswp_jobposting_schema_ho_logo'])){
1465
+ $input1['hiringOrganization']['logo'] = $custom_fields['saswp_jobposting_schema_ho_logo'];
1466
  }
1467
  if(isset($custom_fields['saswp_jobposting_schema_street_address'])){
1468
+ $input1['jobLocation']['address']['streetAddress'] = $custom_fields['saswp_jobposting_schema_street_address'];
1469
  }
1470
  if(isset($custom_fields['saswp_jobposting_schema_locality'])){
1471
+ $input1['jobLocation']['address']['addressLocality'] = $custom_fields['saswp_jobposting_schema_locality'];
1472
  }
1473
  if(isset($custom_fields['saswp_jobposting_schema_region'])){
1474
+ $input1['jobLocation']['address']['addressRegion'] = $custom_fields['saswp_jobposting_schema_region'];
1475
  }
1476
  if(isset($custom_fields['saswp_jobposting_schema_postalcode'])){
1477
+ $input1['jobLocation']['address']['PostalCode'] = $custom_fields['saswp_jobposting_schema_postalcode'];
1478
  }
1479
  if(isset($custom_fields['saswp_jobposting_schema_country'])){
1480
+ $input1['jobLocation']['address']['addressCountry'] = $custom_fields['saswp_jobposting_schema_country'];
1481
  }
1482
  if(isset($custom_fields['saswp_jobposting_schema_bs_currency'])){
1483
+ $input1['baseSalary']['currency'] = $custom_fields['saswp_jobposting_schema_bs_currency'];
1484
  }
1485
  if(isset($custom_fields['saswp_jobposting_schema_bs_value'])){
1486
+ $input1['baseSalary']['value']['value'] = $custom_fields['saswp_jobposting_schema_bs_value'];
1487
  }
1488
  if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
1489
+ $input1['baseSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
1490
  }
1491
 
1492
  break;
1494
  case 'Trip':
1495
 
1496
  if(isset($custom_fields['saswp_trip_schema_name'])){
1497
+ $input1['name'] = $custom_fields['saswp_trip_schema_name'];
1498
  }
1499
  if(isset($custom_fields['saswp_trip_schema_description'])){
1500
+ $input1['description'] = $custom_fields['saswp_trip_schema_description'];
1501
  }
1502
  if(isset($custom_fields['saswp_trip_schema_url'])){
1503
+ $input1['url'] = $custom_fields['saswp_trip_schema_url'];
1504
  }
1505
  if(isset($custom_fields['saswp_trip_schema_image'])){
1506
+ $input1['image'] = $custom_fields['saswp_trip_schema_image'];
1507
  }
1508
 
1509
  break;
1511
  case 'MedicalCondition':
1512
 
1513
  if(isset($custom_fields['saswp_mc_schema_name'])){
1514
+ $input1['name'] = $custom_fields['saswp_mc_schema_name'];
1515
  }
1516
  if(isset($custom_fields['saswp_mc_schema_alternate_name'])){
1517
+ $input1['alternateName'] = $custom_fields['saswp_mc_schema_alternate_name'];
1518
  }
1519
  if(isset($custom_fields['saswp_mc_schema_description'])){
1520
+ $input1['description'] = $custom_fields['saswp_mc_schema_description'];
1521
  }
1522
  if(isset($custom_fields['saswp_mc_schema_image'])){
1523
+ $input1['image'] = $custom_fields['saswp_mc_schema_image'];
1524
  }
1525
  if(isset($custom_fields['saswp_mc_schema_anatomy_name'])){
1526
+ $input1['associatedAnatomy']['name'] = $custom_fields['saswp_mc_schema_anatomy_name'];
1527
  }
1528
  if(isset($custom_fields['saswp_mc_schema_medical_code'])){
1529
+ $input1['code']['code'] = $custom_fields['saswp_mc_schema_medical_code'];
1530
  }
1531
  if(isset($custom_fields['saswp_mc_schema_coding_system'])){
1532
+ $input1['code']['codingSystem'] = $custom_fields['saswp_mc_schema_coding_system'];
1533
+ }
 
 
 
1534
 
1535
  break;
1536
 
2116
  case 'DiscussionForumPosting':
2117
 
2118
  $meta_field = array(
2119
+ 'saswp_dfp_headline' => 'Headline',
2120
+ 'saswp_dfp_description' => 'Description',
2121
+ 'saswp_dfp_url' => 'URL',
2122
+ 'saswp_dfp_date_published' => 'Date Published',
2123
+ 'saswp_dfp_date_modified' => 'Date Modified',
2124
+ 'saswp_dfp_author_name' => 'Author Name',
2125
+ 'saswp_dfp_main_entity_of_page' => 'Main Entity of Page',
2126
+ 'saswp_dfp_organization_name' => 'Organization Name',
2127
+ 'saswp_dfp_organization_logo' => 'Organization Logo',
2128
  );
2129
 
2130
  break;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.2
6
- Stable tag: 1.9.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -110,6 +110,19 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
110
 
111
  == Changelog ==
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  = 1.9.1 (21 Aug 2019) =
114
 
115
  * Major Feature: Option to add schema fields value from give dropdown meta list inside Modify Schema Output section #192
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.2
6
+ Stable tag: 1.9.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
110
 
111
  == Changelog ==
112
 
113
+ = 1.9.2 (28 Aug 2019) =
114
+
115
+ * Added: Compatibility with SEO Framework ( https://wordpress.org/plugins/autodescription/ ) #426
116
+ * Added: Compatibility with SEOPress ( https://wordpress.org/plugins/wp-seopress/ ) #421
117
+ * Added: Compatibility with Smartcrawl SEO ( https://wordpress.org/plugins/smartcrawl-seo/ ) #319
118
+ * Added: Compatibility with All in One SEO Pack ( https://wordpress.org/plugins/all-in-one-seo-pack/ ) #383
119
+ * Bug Fixed: @type ImageObject and VideoObject are getting created eventhough values are not present on the site #437
120
+ * Bug Fixed: Post specific schema fields are not showing on first button click inside custom post types #424
121
+ * Bug Fixed: Fatal Error ( Cannot access protected property saswp_post_specific::$_local_sub_business ) #443
122
+ * Bug Fixed: HowTo Schema (If steps images are not there its type should not come in json markup). #442
123
+ * Bug Fixed: Missing datePublished and mainEntityOfPage fields in DiscussionForumPosting schema #438
124
+
125
+
126
  = 1.9.1 (21 Aug 2019) =
127
 
128
  * Major Feature: Option to add schema fields value from give dropdown meta list inside Modify Schema Output section #192
reviews/reviews_service.php CHANGED
@@ -118,10 +118,16 @@ class saswp_reviews_service {
118
  $term_slug = 'google';
119
  }
120
 
 
 
 
 
 
 
121
  $output.= '<div class="saswp-g-review-panel">
122
  <div class="saswp-glg-review-body">
123
  <div class="saswp-rv-img">
124
- <img src="'.esc_url($review['saswp_reviewer_image']).'" alt="'.$review['saswp_reviewer_name'].'">
125
  </div>
126
  <div class="saswp-rv-cnt">
127
  <div class="saswp-str-rtng">
118
  $term_slug = 'google';
119
  }
120
 
121
+ $img_src = SASWP_DIR_URI.'/admin_section/images/default_user.jpg';
122
+
123
+ if(isset($review['saswp_reviewer_image']) && $review['saswp_reviewer_image'] !=''){
124
+ $img_src = $review['saswp_reviewer_image'];
125
+ }
126
+
127
  $output.= '<div class="saswp-g-review-panel">
128
  <div class="saswp-glg-review-body">
129
  <div class="saswp-rv-img">
130
+ <img src="'.esc_url($img_src).'" alt="'.$review['saswp_reviewer_name'].'">
131
  </div>
132
  <div class="saswp-rv-cnt">
133
  <div class="saswp-str-rtng">
reviews/reviews_setup.php CHANGED
@@ -311,7 +311,8 @@ function saswp_create_platform_custom_taxonomy() {
311
  'ReserveOut',
312
  'Sitejabber',
313
  'Siftery',
314
- 'SoftwareAdvice',
 
315
  'Talabat',
316
  'The Knot',
317
  'Thumbtack',
311
  'ReserveOut',
312
  'Sitejabber',
313
  'Siftery',
314
+ 'SoftwareAdvice',
315
+ 'Shopper Approved',
316
  'Talabat',
317
  'The Knot',
318
  'Thumbtack',
structured-data-for-wp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Schema & Structured Data for WP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
- Version: 1.9.1
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
@@ -13,7 +13,7 @@ License: GPL2
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
- define('SASWP_VERSION', '1.9.1');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
2
  /*
3
  Plugin Name: Schema & Structured Data for WP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
+ Version: 1.9.2
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
+ define('SASWP_VERSION', '1.9.2');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
view/post_specific.php CHANGED
@@ -18,7 +18,7 @@ class saswp_post_specific {
18
  protected $all_schema = null;
19
  protected $options_response = array();
20
  protected $modify_schema_post_enable = false;
21
- protected $_local_sub_business = array();
22
 
23
  private $schema_type_element = array(
24
  'FAQ' => array(
@@ -585,6 +585,7 @@ class saswp_post_specific {
585
  }
586
  public function saswp_post_meta_box_fields($post){
587
 
 
588
  $tabs = '';
589
  $tabs_fields = '';
590
  $schema_ids = array();
@@ -648,48 +649,48 @@ class saswp_post_specific {
648
  $schema_ids[] =$schema->ID;
649
  }
650
 
651
- echo '<div>';
652
- echo '<div><a href="#" class="saswp-restore-post-schema button">'.esc_html__( 'Restore Default', 'schema-and-structured-data-for-wp' ).'</a></div>';
653
- echo '<div class="saswp-tab saswp-post-specific-tab-wrapper">';
654
- echo '<ul class="saswp-tab-nav">';
655
- echo $tabs;
656
- echo '</ul>';
657
- echo '</div>';
658
- echo '<div class="saswp-post-specific-container">';
659
- echo $tabs_fields;
660
- echo '</div>';
661
 
662
  //custom schema starts here
663
 
664
  $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
665
 
666
- echo '<div class="saswp-add-custom-schema-div">';
667
 
668
  if($custom_markup){
669
 
670
- echo '<a style="display:none;" class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
671
- echo '<div class="saswp-add-custom-schema-field">';
672
 
673
  }else{
674
 
675
- echo '<a class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
676
- echo '<div class="saswp-add-custom-schema-field saswp_hide">';
677
  }
678
 
679
- echo '<a class="button saswp-delete-custom-schema">'.esc_html__( 'Delete Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>';
680
- echo '<textarea style="margin-left:5px;" placeholder="{ Json Markup }" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="100">'
681
  . $custom_markup
682
  . '</textarea>';
683
  if(json_decode($custom_markup) == false){
684
- echo '<p style="text-align:center;color:red;margin-top:0px;">'.esc_html__( 'Not a valid json', 'schema-and-structured-data-for-wp' ).'</p>';
685
  }
686
- echo '</div>';
687
- echo '</div>';
688
 
689
  //custom schema ends here
690
 
691
- echo '<input class="saswp-post-specific-schema-ids" type="hidden" value="'. json_encode($schema_ids).'">';
692
- echo '</div>';
693
 
694
  }else{
695
 
@@ -748,49 +749,66 @@ class saswp_post_specific {
748
 
749
  $tabs_fields .= '<input class="saswp-post-specific-schema-ids" type="hidden" value="'. json_encode($schema_ids).'">';
750
  $tabs_fields .= '</div>';
751
- echo $tabs_fields;
 
752
  }
 
 
753
  }
754
 
755
- public function saswp_post_meta_box_callback() {
756
-
757
- global $post;
758
 
759
- wp_nonce_field( 'post_specific_data', 'post_specific_nonce' );
 
 
 
 
 
 
 
760
  $modify_option = get_option('modify_schema_post_enable_'.esc_attr($post->ID));
761
 
762
  if($modify_option == 'enable'){
763
 
764
- $this->saswp_post_meta_box_fields($post);
765
 
766
  }else{
767
 
768
- echo '<a class="button saswp-modify_schema_post_enable">'.esc_html__( 'Modify Current Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
769
 
770
  $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
771
 
772
- echo '<div class="saswp-add-custom-schema-div">';
773
 
774
  if($custom_markup){
775
 
776
- echo '<a style="display:none;" class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
777
- echo '<div class="saswp-add-custom-schema-field">';
778
 
779
  }else{
780
 
781
- echo '<a class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
782
- echo '<div class="saswp-add-custom-schema-field saswp_hide">';
783
  }
784
 
785
- echo '<a class="button saswp-delete-custom-schema">Delete Custom Schema</a>';
786
- echo '<textarea style="margin-left:5px;" placeholder="{ Json Markup }" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="100">'
787
  . $custom_markup
788
  . '</textarea>';
789
- echo '</div>';
790
- echo '</div>';
791
 
792
 
793
- }
 
 
 
 
 
 
 
 
 
794
 
795
  }
796
  /**
@@ -856,24 +874,18 @@ class saswp_post_specific {
856
  }
857
 
858
  $post_id = intval($_GET['post_id']);
 
859
  update_option('modify_schema_post_enable_'.$post_id, 'enable');
 
 
 
 
 
 
860
 
861
- $args = array(
862
- 'p' => $post_id, // ID of a page, post, or custom type
863
- 'post_type' => 'any'
864
- );
865
 
866
- $my_posts = new WP_Query($args);
867
-
868
- if ( $my_posts->have_posts() ) {
869
-
870
- while ( $my_posts->have_posts() ) : $my_posts->the_post();
871
-
872
- echo $this->saswp_post_meta_box_callback();
873
-
874
- endwhile;
875
-
876
- }
877
 
878
  wp_die();
879
 
@@ -1290,7 +1302,7 @@ class saswp_post_specific {
1290
 
1291
  }
1292
 
1293
- $response = $this->saswp_get_fields_by_schema_type($schema->ID);
1294
 
1295
  $this->meta_fields = $response;
1296
 
@@ -1362,7 +1374,7 @@ class saswp_post_specific {
1362
  * @return array
1363
  * @since version 1.0.4
1364
  */
1365
- public function saswp_get_fields_by_schema_type( $schema_id ) {
1366
 
1367
  global $post;
1368
  global $sd_data;
@@ -1412,7 +1424,25 @@ class saswp_post_specific {
1412
 
1413
  $sub_business_options = array();
1414
 
1415
- if(!empty($this->_local_sub_business)){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1416
 
1417
  $sub_business_options = array(
1418
  'label' => 'Sub Business Type',
@@ -1423,6 +1453,8 @@ class saswp_post_specific {
1423
  );
1424
 
1425
  }
 
 
1426
 
1427
  $meta_field = array(
1428
  array(
@@ -2325,6 +2357,12 @@ class saswp_post_specific {
2325
 
2326
  case 'DiscussionForumPosting':
2327
  $meta_field = array(
 
 
 
 
 
 
2328
  array(
2329
  'label' => 'Headline',
2330
  'id' => 'saswp_dfp_headline_'.$schema_id,
@@ -2342,7 +2380,13 @@ class saswp_post_specific {
2342
  'id' => 'saswp_dfp_url_'.$schema_id,
2343
  'type' => 'text',
2344
  'default' => get_permalink()
2345
- ),
 
 
 
 
 
 
2346
  array(
2347
  'label' => 'Date Published',
2348
  'id' => 'saswp_dfp_date_published_'.$schema_id,
@@ -2366,7 +2410,19 @@ class saswp_post_specific {
2366
  'id' => 'saswp_dfp_author_description_'.$schema_id,
2367
  'type' => 'textarea',
2368
  'default' => $author_desc
2369
- )
 
 
 
 
 
 
 
 
 
 
 
 
2370
 
2371
  );
2372
  break;
18
  protected $all_schema = null;
19
  protected $options_response = array();
20
  protected $modify_schema_post_enable = false;
21
+ public $_local_sub_business = array();
22
 
23
  private $schema_type_element = array(
24
  'FAQ' => array(
585
  }
586
  public function saswp_post_meta_box_fields($post){
587
 
588
+ $response_html = '';
589
  $tabs = '';
590
  $tabs_fields = '';
591
  $schema_ids = array();
649
  $schema_ids[] =$schema->ID;
650
  }
651
 
652
+ $response_html .= '<div>';
653
+ $response_html .= '<div><a href="#" class="saswp-restore-post-schema button">'.esc_html__( 'Restore Default', 'schema-and-structured-data-for-wp' ).'</a></div>';
654
+ $response_html .= '<div class="saswp-tab saswp-post-specific-tab-wrapper">';
655
+ $response_html .= '<ul class="saswp-tab-nav">';
656
+ $response_html .= $tabs;
657
+ $response_html .= '</ul>';
658
+ $response_html .= '</div>';
659
+ $response_html .= '<div class="saswp-post-specific-container">';
660
+ $response_html .= $tabs_fields;
661
+ $response_html .= '</div>';
662
 
663
  //custom schema starts here
664
 
665
  $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
666
 
667
+ $response_html .= '<div class="saswp-add-custom-schema-div">';
668
 
669
  if($custom_markup){
670
 
671
+ $response_html .= '<a style="display:none;" class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
672
+ $response_html .= '<div class="saswp-add-custom-schema-field">';
673
 
674
  }else{
675
 
676
+ $response_html .= '<a class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
677
+ $response_html .= '<div class="saswp-add-custom-schema-field saswp_hide">';
678
  }
679
 
680
+ $response_html .= '<a class="button saswp-delete-custom-schema">'.esc_html__( 'Delete Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>';
681
+ $response_html .= '<textarea style="margin-left:5px;" placeholder="{ Json Markup }" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="100">'
682
  . $custom_markup
683
  . '</textarea>';
684
  if(json_decode($custom_markup) == false){
685
+ $response_html .= '<p style="text-align:center;color:red;margin-top:0px;">'.esc_html__( 'Not a valid json', 'schema-and-structured-data-for-wp' ).'</p>';
686
  }
687
+ $response_html .= '</div>';
688
+ $response_html .= '</div>';
689
 
690
  //custom schema ends here
691
 
692
+ $response_html .= '<input class="saswp-post-specific-schema-ids" type="hidden" value="'. json_encode($schema_ids).'">';
693
+ $response_html .= '</div>';
694
 
695
  }else{
696
 
749
 
750
  $tabs_fields .= '<input class="saswp-post-specific-schema-ids" type="hidden" value="'. json_encode($schema_ids).'">';
751
  $tabs_fields .= '</div>';
752
+
753
+ $response_html .= $tabs_fields;
754
  }
755
+
756
+ return $response_html;
757
  }
758
 
759
+ public function saswp_post_meta_box_html($std_post){
 
 
760
 
761
+ global $post;
762
+
763
+ if(!is_object($post)){
764
+ $post = $std_post;
765
+ }
766
+
767
+ $response_html = '';
768
+
769
  $modify_option = get_option('modify_schema_post_enable_'.esc_attr($post->ID));
770
 
771
  if($modify_option == 'enable'){
772
 
773
+ $response_html .= $this->saswp_post_meta_box_fields($post);
774
 
775
  }else{
776
 
777
+ $response_html .= '<a class="button saswp-modify_schema_post_enable">'.esc_html__( 'Modify Current Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
778
 
779
  $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
780
 
781
+ $response_html .= '<div class="saswp-add-custom-schema-div">';
782
 
783
  if($custom_markup){
784
 
785
+ $response_html .= '<a style="display:none;" class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
786
+ $response_html .= '<div class="saswp-add-custom-schema-field">';
787
 
788
  }else{
789
 
790
+ $response_html .= '<a class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
791
+ $response_html .= '<div class="saswp-add-custom-schema-field saswp_hide">';
792
  }
793
 
794
+ $response_html .= '<a class="button saswp-delete-custom-schema">Delete Custom Schema</a>';
795
+ $response_html .= '<textarea style="margin-left:5px;" placeholder="{ Json Markup }" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="100">'
796
  . $custom_markup
797
  . '</textarea>';
798
+ $response_html .= '</div>';
799
+ $response_html .= '</div>';
800
 
801
 
802
+ }
803
+
804
+ return $response_html;
805
+ }
806
+
807
+ public function saswp_post_meta_box_callback() {
808
+
809
+ global $post;
810
+ wp_nonce_field( 'post_specific_data', 'post_specific_nonce' );
811
+ echo $this->saswp_post_meta_box_html($post);
812
 
813
  }
814
  /**
874
  }
875
 
876
  $post_id = intval($_GET['post_id']);
877
+
878
  update_option('modify_schema_post_enable_'.$post_id, 'enable');
879
+
880
+ $post = array(
881
+ 'ID' => $post_id,
882
+ );
883
+
884
+ $post = (object)$post;
885
 
886
+ $response = $this->saswp_post_meta_box_html($post);
 
 
 
887
 
888
+ echo $response;
 
 
 
 
 
 
 
 
 
 
889
 
890
  wp_die();
891
 
1302
 
1303
  }
1304
 
1305
+ $response = $this->saswp_get_fields_by_schema_type($schema->ID, 'save');
1306
 
1307
  $this->meta_fields = $response;
1308
 
1374
  * @return array
1375
  * @since version 1.0.4
1376
  */
1377
+ public function saswp_get_fields_by_schema_type( $schema_id, $condition = null ) {
1378
 
1379
  global $post;
1380
  global $sd_data;
1424
 
1425
  $sub_business_options = array();
1426
 
1427
+ if($condition !=null){
1428
+
1429
+
1430
+ if(!empty($this->_local_sub_business)){
1431
+
1432
+ $sub_business_options = array(
1433
+ 'label' => 'Sub Business Type',
1434
+ 'id' => 'saswp_business_name_'.$schema_id,
1435
+ 'type' => 'select',
1436
+ 'options' => $this->_local_sub_business[$business_type],
1437
+ 'default' => $business_name
1438
+ );
1439
+
1440
+ }
1441
+
1442
+
1443
+ }else{
1444
+
1445
+ if(!empty($this->_local_sub_business) && array_key_exists($business_type, $this->_local_sub_business)){
1446
 
1447
  $sub_business_options = array(
1448
  'label' => 'Sub Business Type',
1453
  );
1454
 
1455
  }
1456
+
1457
+ }
1458
 
1459
  $meta_field = array(
1460
  array(
2357
 
2358
  case 'DiscussionForumPosting':
2359
  $meta_field = array(
2360
+ array(
2361
+ 'label' => 'mainEntityOfPage',
2362
+ 'id' => 'saswp_dfp_main_entity_of_page_'.$schema_id,
2363
+ 'type' => 'text',
2364
+ 'default' => get_permalink()
2365
+ ),
2366
  array(
2367
  'label' => 'Headline',
2368
  'id' => 'saswp_dfp_headline_'.$schema_id,
2380
  'id' => 'saswp_dfp_url_'.$schema_id,
2381
  'type' => 'text',
2382
  'default' => get_permalink()
2383
+ ),
2384
+ array(
2385
+ 'label' => 'Image',
2386
+ 'id' => 'saswp_dfp_image_'.$schema_id,
2387
+ 'type' => 'media',
2388
+ 'default' => $image_details[0]
2389
+ ),
2390
  array(
2391
  'label' => 'Date Published',
2392
  'id' => 'saswp_dfp_date_published_'.$schema_id,
2410
  'id' => 'saswp_dfp_author_description_'.$schema_id,
2411
  'type' => 'textarea',
2412
  'default' => $author_desc
2413
+ ),
2414
+ array(
2415
+ 'label' => 'Organization Name',
2416
+ 'id' => 'saswp_dfp_organization_name_'.$schema_id,
2417
+ 'type' => 'text',
2418
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
2419
+ ),
2420
+ array(
2421
+ 'label' => 'Organization Logo',
2422
+ 'id' => 'saswp_dfp_organization_logo_'.$schema_id,
2423
+ 'type' => 'media',
2424
+ 'default' => $sd_data['sd_logo']['url']
2425
+ ),
2426
 
2427
  );
2428
  break;