All In One Schema Rich Snippets - Version 1.3.0

Version Description

  • Improvement: Updated markup data to meet Google Structured data guidelines
  • Fixed: WordPress 4.4 compatibility
  • Fixed: Admin UI on small screens
Download this release

Release Info

Developer yawalkarm
Plugin Icon 128x128 All In One Schema Rich Snippets
Version 1.3.0
Comparing to
See all releases

Code changes from version 1.2.0 to 1.3.0

Files changed (13) hide show
  1. README.md +37 -37
  2. admin/css/admin.css +19 -2
  3. admin/index.php +24 -8
  4. css/style.css +2 -1
  5. functions.php +229 -70
  6. index.php +40 -40
  7. meta-boxes.php +83 -8
  8. readme.txt +191 -185
  9. screenshot-1.png +0 -0
  10. screenshot-2.png +0 -0
  11. screenshot-3.png +0 -0
  12. screenshot-4.png +0 -0
  13. settings.php +11 -4
README.md CHANGED
@@ -1,37 +1,37 @@
1
-
2
- # All in One Schema.org Rich Snippets
3
-
4
-
5
- ## What is a Rich Snippet?
6
-
7
- It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
8
-
9
- [See Examples of Rich Snippets Here.](http://www.seomoz.org/blog/schema-examples/)
10
-
11
- ## How does a Rich Snippet help?
12
-
13
- * It gives search engines only the important & precise information to display in search result snippets.
14
- Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
15
-
16
- * See what difference it makes in CTR (Click Through Rate)
17
- * Helps you rank higher in search results
18
- * Helps Facebook display proper information when users share your links on Facebook
19
-
20
- ### Supported Content Types -
21
-
22
- This plugin supports the following types of Schemas:
23
-
24
- * Review
25
- * Event
26
- * People
27
- * Product
28
- * Recipe
29
- * Software Application
30
- * Video
31
- * Articles
32
-
33
- ### Future release would include -
34
-
35
- * Breadcrumbs
36
- * Local Business
37
- * Books
1
+
2
+ # All in One Schema.org Rich Snippets
3
+
4
+
5
+ ## What is a Rich Snippet?
6
+
7
+ It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
8
+
9
+ [See Examples of Rich Snippets Here.](http://www.seomoz.org/blog/schema-examples/)
10
+
11
+ ## How does a Rich Snippet help?
12
+
13
+ * It gives search engines only the important & precise information to display in search result snippets.
14
+ Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
15
+
16
+ * See what difference it makes in CTR (Click Through Rate)
17
+ * Helps you rank higher in search results
18
+ * Helps Facebook display proper information when users share your links on Facebook
19
+
20
+ ### Supported Content Types -
21
+
22
+ This plugin supports the following types of Schemas:
23
+
24
+ * Review
25
+ * Event
26
+ * People
27
+ * Product
28
+ * Recipe
29
+ * Software Application
30
+ * Video
31
+ * Articles
32
+
33
+ ### Future release would include -
34
+
35
+ * Breadcrumbs
36
+ * Local Business
37
+ * Books
admin/css/admin.css CHANGED
@@ -1,11 +1,28 @@
1
  html{ display:block !important;}
2
  .etabs { margin: 0; padding: 0; }
3
  .tab { display: inline-block; zoom:1; *display:inline; background: #fff; border: solid 1px #999; border-bottom: none; -moz-border-radius: 4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; font-weight:bold; }
4
- .tab a { font-size: 14px; line-height: 2em; display: block; padding: 0 10px; outline: none; text-decoration:none; color:rgb(175, 175, 175); }
5
  .tab a:hover { text-decoration: none; color:#C00; }
6
  .tab.active { background: #fff; padding-top: 6px; position: relative; top: 1px; border-color: #666; }
7
  .tab a.active { font-weight: bold; text-decoration:none; color:#333; }
8
  .tab.active a:hover { text-decoration: none; color:#C00; }
9
  .tab-container { background: #fff; padding: 10px; -moz-border-radius: 0 4px 4px 4px; -webkit-border-radius: 0 4px 4px 4px; float:left; width: 60%; }
10
  .panel-container { margin-bottom: 10px; border-top:1px solid #999; padding: 10px; margin-top: -6px; float:left; width: 98%;}
11
- .get_in_touch { padding-left: 15px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  html{ display:block !important;}
2
  .etabs { margin: 0; padding: 0; }
3
  .tab { display: inline-block; zoom:1; *display:inline; background: #fff; border: solid 1px #999; border-bottom: none; -moz-border-radius: 4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; font-weight:bold; }
4
+ .tab a { box-shadow: none; font-size: 14px; line-height: 2em; display: block; padding: 0 10px; outline: none; text-decoration:none; color:rgb(175, 175, 175); }
5
  .tab a:hover { text-decoration: none; color:#C00; }
6
  .tab.active { background: #fff; padding-top: 6px; position: relative; top: 1px; border-color: #666; }
7
  .tab a.active { font-weight: bold; text-decoration:none; color:#333; }
8
  .tab.active a:hover { text-decoration: none; color:#C00; }
9
  .tab-container { background: #fff; padding: 10px; -moz-border-radius: 0 4px 4px 4px; -webkit-border-radius: 0 4px 4px 4px; float:left; width: 60%; }
10
  .panel-container { margin-bottom: 10px; border-top:1px solid #999; padding: 10px; margin-top: -6px; float:left; width: 98%;}
11
+ .get_in_touch { padding-left: 15px; }
12
+ .panel-container.bsf-panel #poststuff {
13
+ width: 100%;
14
+ min-width: 100%;
15
+ float: left;
16
+ }
17
+ .panel-container.bsf-panel .postbox-container {
18
+ width: 98% !important;
19
+ }
20
+
21
+ .bsf-contact table.bsf_metabox input.bsf_text_medium {
22
+ width: 100% !important;
23
+ }
24
+
25
+ .bsf-contact table.bsf_metabox select{
26
+ width: 100% !important;
27
+
28
+ }
admin/index.php CHANGED
@@ -44,7 +44,7 @@ function rich_snippet_dashboard() {
44
 
45
  </ul>
46
  <div class="clear"></div>
47
- <div class="panel-container">
48
  <div id="tab-1">
49
  <div id="poststuff">
50
  <div id="postbox-container-1" class="postbox-container">
@@ -118,6 +118,10 @@ function rich_snippet_dashboard() {
118
  <td align="right"><strong><label>'.__("End Time :","rich-snippets").'</label></strong></td>
119
  <td><input class="bsf_text_medium" type="text" name="end_time" value="'.$args_event["end_time"].'"/></td>
120
  </tr>
 
 
 
 
121
  <tr><td colspan="2"></td></tr>
122
  <tr>
123
  <td></td>
@@ -203,7 +207,7 @@ function rich_snippet_dashboard() {
203
  <td><input class="bsf_text_medium" type="text" name="product_name" value="'.$args_product["product_name"].'"/></td>
204
  </tr>
205
  <tr>
206
- <td align="right"><strong><label>'.__("Product Category :","rich-snippets").'</label></strong></td>
207
  <td><input class="bsf_text_medium" type="text" name="product_agr" value="'.$args_product["product_agr"].'"/></td>
208
  </tr>
209
  <tr>
@@ -290,6 +294,10 @@ function rich_snippet_dashboard() {
290
  <td align="right"><strong><label>'.__("Author Rating :","rich-snippets").'</label></strong></td>
291
  <td><input class="bsf_text_medium" type="text" name="software_rating" value="'.$args_soft["software_rating"].'"/></td>
292
  </tr>
 
 
 
 
293
  <tr>
294
  <td align="right"><strong><label>'.__("Software Price :","rich-snippets").'</label></strong></td>
295
  <td><input class="bsf_text_medium" type="text" name="software_price" value="'.$args_soft["software_price"].'"/></td>
@@ -388,6 +396,14 @@ function rich_snippet_dashboard() {
388
  <td align="right"><strong><label>'.__("Image :","rich-snippets").'</label></strong></td>
389
  <td><input class="bsf_text_medium" type="text" name="article_image" value="'.$args_article["article_image"].'"/></td>
390
  </tr>
 
 
 
 
 
 
 
 
391
  <tr><td colspan="2"></td></tr>
392
  <tr>
393
  <td></td>
@@ -509,8 +525,8 @@ function rich_snippet_dashboard() {
509
  </div>
510
  </div> ';
511
  echo '
512
- <script src="'.plugins_url('/all-in-one-schemaorg-rich-snippets/admin/js/jquery.easytabs.min.js').'"></script>
513
- <script src="'.plugins_url('/all-in-one-schemaorg-rich-snippets/admin/js/jquery.hashchange.min.js').'"></script>
514
  <script language="javascript">
515
  jQuery("#tab-container").easytabs();
516
  jQuery("#postbox-container-1").css({"width":"87%","padding-right":"2%"});
@@ -547,7 +563,7 @@ if(isset($_POST['item_submit']))
547
  }
548
  if(isset($_POST['event_submit']))
549
  {
550
- foreach(array('snippet_title','event_title','event_location','start_time','end_time') as $option)
551
  {
552
  if(isset($_POST[$option]))
553
  {
@@ -595,7 +611,7 @@ if(isset($_POST['recipe_submit']))
595
  }
596
  if(isset($_POST['software_submit']))
597
  {
598
- foreach(array('snippet_title','software_rating','software_price','software_name','software_os','software_website') as $option)
599
  {
600
  if(isset($_POST[$option]))
601
  {
@@ -619,7 +635,7 @@ if(isset($_POST['video_submit']))
619
  }
620
  if(isset($_POST['article_submit']))
621
  {
622
- foreach(array('snippet_title','article_name','article_author','article_desc','article_image') as $option)
623
  {
624
  if(isset($_POST[$option]))
625
  {
@@ -724,7 +740,7 @@ function add_footer_script()
724
  function get_support()
725
  {
726
  $html = '
727
- <div class="postbox" style=" width: 36%; float: right; ">
728
  <h3 class="get_in_touch"><p>'.__("Get in touch with the Plugin Developers","rich-snippets").'</p></h3>
729
  <div class="inside">
730
  <form name="support" id="support_form" action="" method="post" onsubmit="return false;">
44
 
45
  </ul>
46
  <div class="clear"></div>
47
+ <div class="panel-container bsf-panel">
48
  <div id="tab-1">
49
  <div id="poststuff">
50
  <div id="postbox-container-1" class="postbox-container">
118
  <td align="right"><strong><label>'.__("End Time :","rich-snippets").'</label></strong></td>
119
  <td><input class="bsf_text_medium" type="text" name="end_time" value="'.$args_event["end_time"].'"/></td>
120
  </tr>
121
+ <tr>
122
+ <td align="right"><strong><label>'.__("Ticket Promotion :","rich-snippets").'</label></strong></td>
123
+ <td><input class="bsf_text_medium" type="text" name="events_price" value="'.$args_event["events_price"].'"/></td>
124
+ </tr>
125
  <tr><td colspan="2"></td></tr>
126
  <tr>
127
  <td></td>
207
  <td><input class="bsf_text_medium" type="text" name="product_name" value="'.$args_product["product_name"].'"/></td>
208
  </tr>
209
  <tr>
210
+ <td align="right"><strong><label>'.__("User Rating :","rich-snippets").'</label></strong></td>
211
  <td><input class="bsf_text_medium" type="text" name="product_agr" value="'.$args_product["product_agr"].'"/></td>
212
  </tr>
213
  <tr>
294
  <td align="right"><strong><label>'.__("Author Rating :","rich-snippets").'</label></strong></td>
295
  <td><input class="bsf_text_medium" type="text" name="software_rating" value="'.$args_soft["software_rating"].'"/></td>
296
  </tr>
297
+ <tr>
298
+ <td align="right"><strong><label>'.__("User Rating :","rich-snippets").'</label></strong></td>
299
+ <td><input class="bsf_text_medium" type="text" name="software_agr" value="'.$args_soft["software_agr"].'"/></td>
300
+ </tr>
301
  <tr>
302
  <td align="right"><strong><label>'.__("Software Price :","rich-snippets").'</label></strong></td>
303
  <td><input class="bsf_text_medium" type="text" name="software_price" value="'.$args_soft["software_price"].'"/></td>
396
  <td align="right"><strong><label>'.__("Image :","rich-snippets").'</label></strong></td>
397
  <td><input class="bsf_text_medium" type="text" name="article_image" value="'.$args_article["article_image"].'"/></td>
398
  </tr>
399
+ <tr>
400
+ <td align="right"><strong><label>'.__("Publisher :","rich-snippets").'</label></strong></td>
401
+ <td><input class="bsf_text_medium" type="text" name="article_publisher" value="'.$args_article["article_publisher"].'"/></td>
402
+ </tr>
403
+ <tr>
404
+ <td align="right"><strong><label>'.__("Publisher Logo :","rich-snippets").'</label></strong></td>
405
+ <td><input class="bsf_text_medium" type="text" name="article_publisher_logo" value="'.$args_article["article_publisher_logo"].'"/></td>
406
+ </tr>
407
  <tr><td colspan="2"></td></tr>
408
  <tr>
409
  <td></td>
525
  </div>
526
  </div> ';
527
  echo '
528
+ <script src="'.plugin_dir_url( __FILE__ ).'js/jquery.easytabs.min.js'.'"></script>
529
+ <script src="'.plugin_dir_url( __FILE__ ).'js/jquery.hashchange.min.js'.'"></script>
530
  <script language="javascript">
531
  jQuery("#tab-container").easytabs();
532
  jQuery("#postbox-container-1").css({"width":"87%","padding-right":"2%"});
563
  }
564
  if(isset($_POST['event_submit']))
565
  {
566
+ foreach(array('snippet_title','event_title','event_location','start_time','end_time','events_price') as $option)
567
  {
568
  if(isset($_POST[$option]))
569
  {
611
  }
612
  if(isset($_POST['software_submit']))
613
  {
614
+ foreach(array('snippet_title','software_rating','software_agr','software_price','software_name','software_os','software_website') as $option)
615
  {
616
  if(isset($_POST[$option]))
617
  {
635
  }
636
  if(isset($_POST['article_submit']))
637
  {
638
+ foreach(array('snippet_title','article_name','article_author','article_desc','article_image','article_publisher','article_publisher_logo') as $option)
639
  {
640
  if(isset($_POST[$option]))
641
  {
740
  function get_support()
741
  {
742
  $html = '
743
+ <div class="postbox bsf-contact" style=" width: 36%; float: right; ">
744
  <h3 class="get_in_touch"><p>'.__("Get in touch with the Plugin Developers","rich-snippets").'</p></h3>
745
  <div class="inside">
746
  <form name="support" id="support_form" action="" method="post" onsubmit="return false;">
css/style.css CHANGED
@@ -85,7 +85,8 @@ td .tbl-bdf-td{
85
  }
86
  .snippet-image img {
87
  border: 2px solid #FFF;
88
- box-shadow: 0px 0px 5px #D5D2CA;
 
89
  -webkit-transition: all 400ms ease-in;
90
  -moz-transition: all 400ms ease-in;
91
  -o-transition: all 400ms ease-in;
85
  }
86
  .snippet-image img {
87
  border: 2px solid #FFF;
88
+ box-shadow: none;
89
+ /*box-shadow: 0px 0px 5px #D5D2CA;*/
90
  -webkit-transition: all 400ms ease-in;
91
  -moz-transition: all 400ms ease-in;
92
  -o-transition: all 400ms ease-in;
functions.php CHANGED
@@ -61,7 +61,7 @@ function display_rich_snippet($content) {
61
 
62
  if($args_review['review_title'] != "")
63
  $review .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_review['review_title'].'</div>';
64
- $review .= '<div class="snippet-markup" itemscope itemtype="http://data-vocabulary.org/Review">';
65
  $item = get_post_meta( $post->ID, '_bsf_item_name', true );
66
  $rating = get_post_meta( $post->ID, '_bsf_rating', true );
67
  $reviewer = get_post_meta( $post->ID, '_bsf_item_reviewer', true);
@@ -69,27 +69,29 @@ function display_rich_snippet($content) {
69
  if(trim($reviewer) != "")
70
  {
71
  if($args_review['item_reviewer'] != "")
 
72
  $review .= "<div class='snippet-label'>".$args_review['item_reviewer']."</div>";
73
- $review .= " <div class='snippet-data'><span itemprop='reviewer'>".$reviewer."</span></div>";
74
  }
75
  if(isset($args_review['review_date']))
76
  {
77
  if( $args_review['review_date'] != "")
78
  $review .= "<div class='snippet-label'>".$args_review['review_date'] ."</div>";
79
- $review .= "<div class='snippet-data'> <time itemprop='dtreviewed' datetime='".$post_date."'>".$post_date."</time></div>";
80
  }
81
  if(trim($item) != "")
82
  {
83
  if( $args_review['item_name'] != "")
84
  $review .= "<div class='snippet-label'>".$args_review['item_name']."</div>";
85
- $review .= "<div class='snippet-data'> <span itemprop='itemreviewed'>".$item."</span></div>";
86
  }
87
  if(trim($rating) != "")
88
  {
89
  if( $args_review['item_rating'] != "")
 
90
  $review .= "<div class='snippet-label'>".$args_review['item_rating']."</div>";
91
 
92
- $review .= "<div class='snippet-data'> <span class='rating-value' itemprop='rating'>".$rating."</span><span class='star-img'>";
93
  for($i = 1; $i<=ceil($rating); $i++)
94
  {
95
  $review .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png">';
@@ -117,17 +119,23 @@ function display_rich_snippet($content) {
117
 
118
  if($args_event['snippet_title'] != "")
119
  $event .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_event['snippet_title'].'</div>';
120
- $event .= '<div itemscope itemtype="http://data-vocabulary.org/Event">';
121
  $event_title = get_post_meta( $post->ID, '_bsf_event_title', true );
122
  $event_org = get_post_meta( $post->ID, '_bsf_event_organization', true );
123
  $event_street = get_post_meta( $post->ID, '_bsf_event_street', true );
124
  $event_local = get_post_meta( $post->ID, '_bsf_event_local', true );
125
- $event_region = get_post_meta( $post->ID, '_bsf_event_region', true );
 
126
  $event_start_date = get_post_meta( $post->ID, '_bsf_event_start_date', true );
127
  $event_end_date = get_post_meta( $post->ID, '_bsf_event_end_date', true );
128
- $event_geo_latitude = get_post_meta( $post->ID, '_bsf_event_geo_latitude', true );
129
- $event_geo_longitude = get_post_meta( $post->ID, '_bsf_event_geo_longitude', true );
130
- $event_photo = get_post_meta( $post->ID, '_bsf_event_photo', true );
 
 
 
 
 
131
  if(trim($event_photo) != "")
132
  {
133
  $event .= '<div class="snippet-image"><img width="180" itemprop="photo" src="'.$event_photo.'"></div>';
@@ -139,39 +147,41 @@ function display_rich_snippet($content) {
139
  jQuery(".snippet-label-img").addClass("snippet-clear");
140
  });
141
  </script>';
142
- }
143
  $event .= '<div class="aio-info">';
144
 
145
  if(trim($event_title) != "")
146
  {
147
  if( $args_event['event_title'])
148
  $event .= '<div class="snippet-label-img">'.$args_event['event_title'].'</div>';
149
- $event .=' <div class="snippet-data-img">​<span itemprop="summary">'.$event_title.'</span></div><div class="snippet-clear"></div>';
150
  }
151
  if(trim($event_org) != "")
152
  {
153
  if( $args_event['event_location'] != "")
154
  $event .= '<div class="snippet-label-img">'.$args_event['event_location'].'</div>';
155
  $event .=' <div class="snippet-data-img">
156
- ​<span itemprop="location" itemscope itemtype="http://data-vocabulary.org/Organization">
157
  <span itemprop="name">'.$event_org.'</span>,';
158
  }
159
  if(trim($event_street) != "")
160
- $event .= '<span itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address">
161
- <span itemprop="street-address">'.$event_street.'</span>,';
162
  if(trim($event_local) != "")
163
- $event .= '<span itemprop="locality">'.$event_local.'</span>,';
164
  if(trim($event_region) != "")
165
- $event .= '<span itemprop="region">'.$event_region.'</span>';
 
 
166
  $event .= '</span>';
167
- $event .= ' <span itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">';
168
- if(trim($event_geo_latitude) != "")
169
- $event .= '<meta itemprop="latitude" content="'.$event_geo_latitude.'" />';
170
- if(trim($event_geo_longitude) != "")
171
 
172
- $event .= '<meta itemprop="longitude" content="'.$event_geo_longitude.'" />';
173
- $event .= '</span>
174
- </span>
175
  </div><div class="snippet-clear"></div>';
176
  if(trim($event_start_date) != "")
177
  {
@@ -186,6 +196,16 @@ function display_rich_snippet($content) {
186
  $event .= '<div class="snippet-label-img">'.$args_event['end_time'].'</div>';
187
  $event .= ' <div class="snippet-data-img"> <span itemprop="endDate" datetime="'.$event_end_date.'T00:00-00:00">'.$event_end_date.'</span></div><div class="snippet-clear"></div>';
188
  }
 
 
 
 
 
 
 
 
 
 
189
  $event .= '</div>
190
  </div></div><div class="snippet-clear"></div>';
191
  return ( is_single() || is_page() ) ? $event : $content;
@@ -251,7 +271,7 @@ function display_rich_snippet($content) {
251
 
252
  if($args_person['snippet_title'] != "")
253
  $people .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_person['snippet_title'].'</div>';
254
- $people .= '<div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Person">';
255
  $people_fn = get_post_meta( $post->ID, '_bsf_people_fn', true );
256
  $people_nickname = get_post_meta( $post->ID, '_bsf_people_nickname', true );
257
  $people_photo = get_post_meta( $post->ID, '_bsf_people_photo', true );
@@ -260,9 +280,13 @@ function display_rich_snippet($content) {
260
  $people_company = get_post_meta( $post->ID, '_bsf_people_company', true );
261
  $people_local = get_post_meta( $post->ID, '_bsf_people_local', true );
262
  $people_region = get_post_meta( $post->ID, '_bsf_people_region', true );
 
 
 
 
263
  if(trim($people_photo) != "")
264
  {
265
- $people .= '<div class="snippet-image"><img width="180" src="'.$people_photo.'" rel="v:photo" /></div>';
266
  }
267
  else
268
  {
@@ -278,43 +302,60 @@ function display_rich_snippet($content) {
278
  if($args_person['person_name'] != "")
279
  $people .= '<div class="snippet-label-img">'.$args_person['person_name'].'</div> ';
280
 
281
- $people .= '<div class="snippet-data-img"><span property="v:name">'.$people_fn.'</span></div><div class="snippet-clear"></div>';
282
  }
283
  if(trim($people_nickname) != "")
284
  {
285
  if($args_person['person_nickname'] != "")
286
  $people .= '<div class="snippet-label-img">'.$args_person['person_nickname'].'</div> ';
287
- $people .= '<div class="snippet-data-img"> (<span property="v:nickname">'.$people_nickname.'</span>)</div><div class="snippet-clear"></div>';
288
  }
289
  if(trim($people_website) != "")
290
  {
291
  if($args_person['person_website'] != "")
292
  $people .= '<div class="snippet-label-img">'.$args_person['person_website'].'</div> ';
293
- $people .= '<div class="snippet-data-img"> <a href="'.$people_website.'" rel="v:url">'.$people_website.'</a></div><div class="snippet-clear"></div>';
294
  }
295
  if(trim($people_job_title) != "")
296
  {
297
  if($args_person['person_job_title'] != "")
298
  $people .= '<div class="snippet-label-img">'.$args_person['person_job_title'].'</div> ';
299
- $people .= '<div class="snippet-data-img"> <span property="v:title">'.$people_job_title.'</span></div><div class="snippet-clear"></div>';
300
  }
301
  if(trim($people_company) != "")
302
  {
303
  if($args_person['person_company'] != "")
 
304
  $people .= '<div class="snippet-label-img">'.$args_person['person_company'].'</div> ';
305
- $people .= '<div class="snippet-data-img"> <span property="v:affiliation">'.$people_company.'</span></div><div class="snippet-clear"></div>';
 
306
  }
307
- if(trim($people_local) != "")
 
308
  {
309
  if($args_person['person_address'] != "")
310
  $people .= '<div class="snippet-label-img">'.$args_person['person_address'].'</div> ';
311
- $people .= '<div class="snippet-data-img"> <span rel="v:address">
312
- <span typeof="v:Address">
313
- <span property="v:locality">'.$people_local.'</span>,';
 
 
 
 
 
 
 
 
314
  }
315
  if(trim($people_region) != "")
316
- $people .= '<span property="v:region">'.$people_region.'</span>
317
- </span>
 
 
 
 
 
 
318
  </span></div><div class="snippet-clear"></div>';
319
  $people .= '</div>
320
  </div></div><div class="snippet-clear"></div>';
@@ -331,7 +372,7 @@ function display_rich_snippet($content) {
331
  $product .= bsf_do_rating();
332
 
333
  $product .= '</div>';
334
- $product .= '<div itemscope itemtype="http://data-vocabulary.org/Product">';
335
  $product_rating = get_post_meta( $post->ID, '_bsf_product_rating', true);
336
  $product_brand = get_post_meta( $post->ID, '_bsf_product_brand', true);
337
  $product_name = get_post_meta( $post->ID, '_bsf_product_name', true);
@@ -377,14 +418,17 @@ function display_rich_snippet($content) {
377
  }
378
  $product .= '</span></div><div class="snippet-clear"></div>';
379
  }
380
- $product .= '<span itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate">';
 
381
  if($args_product['product_agr'] != "")
382
  {
383
  $product .= '<div class="snippet-label-img">'.$args_product['product_agr'].'</div>';
384
  }
385
  $product .= '<div class="snippet-data-img">';
386
- $product .= '<span itemprop="rating">'.average_rating().'</span>';
387
- $product .= ' based on <span class="rating-count" itemprop="votes">'.rating_count().'</span> votes </span></div><div class="snippet-clear"></div>';
 
 
388
  if(trim($product_brand) != "")
389
  {
390
  if($args_product['product_brand'] != "")
@@ -397,19 +441,29 @@ function display_rich_snippet($content) {
397
  $product .= '<div class="snippet-label-img">'.$args_product['product_name'].'</div>';
398
  $product .= ' <div class="snippet-data-img"> <span itemprop="name">'.$product_name.'</span></div><div class="snippet-clear"></div>';
399
  }
 
 
400
  if(trim($product_price) != "")
401
  {
402
  if($args_product['product_price'] != "")
403
- $product .= '<div class="snippet-label-img">'.$args_product['product_price'].'</div>';
404
- $product .= '<div class="snippet-data-img"> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
405
- <meta itemprop="currency" content="'.$product_cur.'" /><span itemprop="price">'.$product_cur.' '.$product_price.'</span></div><div class="snippet-clear"></div>';
 
 
 
 
 
 
 
 
406
  }
407
- if(trim($product_status) != "")
408
  {
409
  if($args_product['product_avail'] != "")
410
  $product .= '<div class="snippet-label-img">'.$args_product['product_avail'].'</div>';
411
  $product .= ' <div class="snippet-data-img"> <span itemprop="availability" content="'.$product_status.'">'.$availability.'</span></span></div><div class="snippet-clear"></div>';
412
- }
413
  $product .= '</div>
414
  </div></div><div class="snippet-clear"></div>';
415
 
@@ -431,7 +485,7 @@ function display_rich_snippet($content) {
431
  $recipe .= bsf_do_rating();
432
  }
433
  $recipe .= '</div>';
434
- $recipe .= '<div itemscope itemtype="http://data-vocabulary.org/Recipe">';
435
  $recipes_name = get_post_meta( $post->ID, '_bsf_recipes_name', true );
436
  $recipes_preptime = get_post_meta( $post->ID, '_bsf_recipes_preptime', true );
437
  $recipes_cooktime = get_post_meta( $post->ID, '_bsf_recipes_cooktime', true );
@@ -443,7 +497,7 @@ function display_rich_snippet($content) {
443
  $agregate = average_rating();
444
  if(trim($recipes_photo) != "")
445
  {
446
- $recipe .= '<div class="snippet-image"><img width="180" itemprop="photo" src="'.$recipes_photo.'"/></div>';
447
  }
448
  else
449
  {
@@ -461,7 +515,7 @@ function display_rich_snippet($content) {
461
 
462
  $recipe .= '<div class="snippet-data-img"><span itemprop="name">'.$recipes_name.'</span></div><div class="snippet-clear"></div>';
463
  }
464
- $recipe .= '<div class="snippet-label-img">'.$args_recipe['recipe_pub'].' </div><div class="snippet-data-img"><time datetime="'.get_the_date('Y-m-d').'" itemprop="published">'.get_the_date('Y-m-d').'</time></div><div class="snippet-clear"></div>';
465
  if(trim($recipes_preptime) != "")
466
  {
467
  if($args_recipe['recipe_prep'] != "")
@@ -482,7 +536,7 @@ function display_rich_snippet($content) {
482
  }
483
  if($args_recipe['recipe_rating'] != "")
484
  $recipe .= '<div class="snippet-label-img">'.$args_recipe['recipe_rating'].'</div>';
485
- $recipe .= ' <div class="snippet-data-img"> <span itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"><span itemprop="rating" class="rating-value">'.$agregate.'</span><span class="star-img">';
486
  for($i = 1; $i<=ceil($agregate); $i++)
487
  {
488
  $recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png">';
@@ -492,7 +546,7 @@ function display_rich_snippet($content) {
492
  if($j)
493
  $recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png">';
494
  }
495
- $recipe .= '</span> Based on <span itemprop="count"><strong>'.$count.'</strong> </span> Review(s)</span></div><div class="snippet-clear"></div>';
496
  $recipe .= '</div>
497
  </div></div><div class="snippet-clear"></div>';
498
  return ( is_single() || is_page() ) ? $recipe : $content;
@@ -505,7 +559,11 @@ function display_rich_snippet($content) {
505
 
506
  $software .= '<div id="snippet-box" style="background:'.$args_color["snippet_box_bg"].'; color:'.$args_color["snippet_box_color"].'; border:1px solid '.$args_color["snippet_border"].';">';
507
  if($args_soft['snippet_title'] != "" )
508
- $software .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_soft['snippet_title'].'</div>';
 
 
 
 
509
  $software .= '<div itemscope itemtype="http://schema.org/SoftwareApplication">';
510
  $software_rating = get_post_meta( $post->ID, '_bsf_software_rating', true);
511
  $software_name = get_post_meta( $post->ID, '_bsf_software_name', true );
@@ -515,9 +573,12 @@ function display_rich_snippet($content) {
515
  $software_price = get_post_meta( $post->ID, '_bsf_software_price', true );
516
  $software_cur = get_post_meta($post->ID, '_bsf_software_cur', true);
517
  $software_os = get_post_meta( $post->ID, '_bsf_software_os', true );
 
 
 
518
  if(trim($software_image) != "")
519
  {
520
- $software .= '<div class="snippet-image"><img width="180" src="'.$software_image.'" itemprop="image" /></div>';
521
  }
522
  else
523
  {
@@ -528,7 +589,40 @@ function display_rich_snippet($content) {
528
  </script>';
529
  }
530
  $software .= '<div class="aio-info">';
 
 
 
531
  if(trim($software_rating) != "")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
532
  {
533
  if($args_soft['software_rating'] != "")
534
  $software .= '<div class="snippet-label-img">'.$args_soft['software_rating'].'</div>';
@@ -544,7 +638,7 @@ function display_rich_snippet($content) {
544
  }
545
 
546
  $software .= '</span></div><div class="snippet-clear"></div>';
547
- }
548
  if(trim($software_name) != "")
549
  {
550
  if($args_soft['software_name'] != "")
@@ -555,14 +649,20 @@ function display_rich_snippet($content) {
555
  {
556
  if($args_soft['software_os'] != "")
557
  $software .= '<div class="snippet-label-img">'.$args_soft['software_os'].'</div>';
558
- $software .= ' <div class="snippet-data-img"> <span itemprop="operatingSystems">'.$software_os.'</span></div><div class="snippet-clear"></div>';
 
 
 
 
 
 
559
  }
560
  if(trim($software_price) != "")
561
  {
562
  if($args_soft['software_price'] != "")
563
  $software .= '<div class="snippet-label-img">'.$args_soft['software_price'].'</div>';
564
- $software .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="http://data-vocabulary.org/Offer">
565
- <meta itemprop="priceCurrency" content="'.$software_cur.'" />'.$software_cur.' <span itemprop="price"> '.$software_price.'</span></div><div class="snippet-clear"></div>';
566
 
567
  }
568
  if(trim($software_desc) != "")
@@ -575,7 +675,7 @@ function display_rich_snippet($content) {
575
  {
576
  if($args_soft['software_website'] != "")
577
  $software .= '<div class="snippet-label-img">'.$args_soft['software_website'].'</div>';
578
- $software .= '<div class="snippet-data-img"> <a itemprop="url" href="'.$software_landing.'">'.$software_landing.'</a></div><div class="snippet-clear"></div>';
579
  }
580
  $software .= '</div>
581
  </div></div><div class="snippet-clear"></div>';
@@ -596,11 +696,16 @@ function display_rich_snippet($content) {
596
  $video_desc = get_post_meta( $post->ID, '_bsf_video_desc', true );
597
  $video_thumb = get_post_meta( $post->ID, '_bsf_video_thumb', true );
598
  $video_url = get_post_meta( $post->ID, '_bsf_video_url', true );
 
 
599
  $video_duration = get_post_meta( $post->ID, '_bsf_video_duration', true );
600
  $video_date = get_post_meta( $post->ID, '_bsf_video_date', true );
601
  if(trim($video_url) != "")
602
  {
603
- $video .= '<div class="snippet-image"><a itemprop="url" href="'.$video_url.'"><img width="180" src="'.$video_thumb.'"></a></div>';
 
 
 
604
  }
605
  else
606
  {
@@ -610,7 +715,7 @@ function display_rich_snippet($content) {
610
  });
611
  </script>';
612
  }
613
- $video .= '<div class="aio-info">';
614
  if(trim($video_title) != "")
615
  {
616
  if($args_video['video_title'] != "" )
@@ -625,11 +730,17 @@ function display_rich_snippet($content) {
625
  $video .= '<div class="snippet-data-img"> <p itemprop="description">'.$video_desc.'</p></div><div class="snippet-clear"></div>';
626
  }
627
  if(trim($video_thumb) != "")
628
- $video .= '<meta itemprop="thumbnail" content="'.$video_thumb.'">';
 
 
 
 
 
 
629
  if(trim($video_duration) != "")
630
  $video .= '<meta itemprop="duration" content="'.$video_duration.'">';
631
  if(trim($video_date) != "")
632
- $video .= '<meta itemprop="uploaddate" content="'.$video_date.'">';
633
  $video .= '</div>
634
  </div></div><div class="snippet-clear"></div>';
635
  return ( is_single() || is_page() ) ? $video : $content;
@@ -644,6 +755,10 @@ function display_rich_snippet($content) {
644
  $article_desc = get_post_meta( $post->ID, '_bsf_article_desc', true );
645
  $article_image = get_post_meta( $post->ID, '_bsf_article_image', true );
646
  $article_author = get_post_meta( $post->ID, '_bsf_article_author', true );
 
 
 
 
647
  $article .= '<div id="snippet-box" style="background:'.$args_color["snippet_box_bg"].'; color:'.$args_color["snippet_box_color"].'; border:1px solid '.$args_color["snippet_border"].';">';
648
  if($args_article['snippet_title'] != "" )
649
  {
@@ -653,7 +768,12 @@ function display_rich_snippet($content) {
653
  $article .= '<div itemscope itemtype="http://schema.org/Article">';
654
  if(trim($article_image) != "")
655
  {
656
- $article .= '<div class="snippet-image"><img width="180" itemprop="image" src="'.$article_image.'"/></div>';
 
 
 
 
 
657
  }
658
  else
659
  {
@@ -669,23 +789,62 @@ function display_rich_snippet($content) {
669
  if($args_article['article_name'] != "")
670
  $article .= '<div class="snippet-label-img">'.$args_article['article_name'].'</div>';
671
 
672
- $article .= '<div class="snippet-data-img"><span itemprop="name">'.$article_name.'</span></div><div class="snippet-clear"></div>';
 
 
 
 
 
 
 
673
  }
674
  if(trim($article_author) != "")
675
  {
676
  if($args_article['article_author'] != "")
677
  $article .= '<div class="snippet-label-img">'.$args_article['article_author'].'</div>';
678
 
679
- $article .= '<div class="snippet-data-img"><span itemprop="author">'.$article_author.'</span></div><div class="snippet-clear"></div>';
 
 
 
 
 
680
  }
681
- if(trim($article_desc) != "")
682
  {
683
- if($args_article['article_desc'] != "")
684
- $article .= '<div class="snippet-label-img">'.$args_article['article_desc'].'</div>';
685
-
686
- $article .= '<div class="snippet-data-img"><span itemprop="description">'.$article_desc.'</span></div><div class="snippet-clear"></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  }
688
 
 
 
 
 
 
 
689
  $article .= '</div>
690
  </div></div><div class="snippet-clear"></div>';
691
  return ( is_single() || is_page() ) ? $article : $content;
61
 
62
  if($args_review['review_title'] != "")
63
  $review .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_review['review_title'].'</div>';
64
+ $review .= '<div class="snippet-markup" itemscope itemtype="http://schema.org/Review">';
65
  $item = get_post_meta( $post->ID, '_bsf_item_name', true );
66
  $rating = get_post_meta( $post->ID, '_bsf_rating', true );
67
  $reviewer = get_post_meta( $post->ID, '_bsf_item_reviewer', true);
69
  if(trim($reviewer) != "")
70
  {
71
  if($args_review['item_reviewer'] != "")
72
+ $review .= '<span itemprop="author" itemscope itemtype="http://schema.org/Person">';
73
  $review .= "<div class='snippet-label'>".$args_review['item_reviewer']."</div>";
74
+ $review .= " <div class='snippet-data'><span itemprop='name'>".$reviewer."</span></div></span>";
75
  }
76
  if(isset($args_review['review_date']))
77
  {
78
  if( $args_review['review_date'] != "")
79
  $review .= "<div class='snippet-label'>".$args_review['review_date'] ."</div>";
80
+ $review .= "<div class='snippet-data'> <time itemprop='datePublished' datetime='".get_the_time( 'c' )."'>".$post_date."</time></div>";
81
  }
82
  if(trim($item) != "")
83
  {
84
  if( $args_review['item_name'] != "")
85
  $review .= "<div class='snippet-label'>".$args_review['item_name']."</div>";
86
+ $review .= "<div class='snippet-data'> <span itemprop='itemReviewed'>".$item."</span></div>";
87
  }
88
  if(trim($rating) != "")
89
  {
90
  if( $args_review['item_rating'] != "")
91
+ //$review .= '<span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">';
92
  $review .= "<div class='snippet-label'>".$args_review['item_rating']."</div>";
93
 
94
+ $review .= "<div class='snippet-data'> <span itemprop='reviewRating' itemscope itemtype='http://schema.org/Rating'><span class='rating-value' itemprop='ratingValue'>".$rating."</span></span><span class='star-img'>";
95
  for($i = 1; $i<=ceil($rating); $i++)
96
  {
97
  $review .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png">';
119
 
120
  if($args_event['snippet_title'] != "")
121
  $event .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_event['snippet_title'].'</div>';
122
+ $event .= '<div itemscope itemtype="http://schema.org/Event">';
123
  $event_title = get_post_meta( $post->ID, '_bsf_event_title', true );
124
  $event_org = get_post_meta( $post->ID, '_bsf_event_organization', true );
125
  $event_street = get_post_meta( $post->ID, '_bsf_event_street', true );
126
  $event_local = get_post_meta( $post->ID, '_bsf_event_local', true );
127
+ $event_region = get_post_meta( $post->ID, '_bsf_event_region', true );
128
+ $event_postal_code = get_post_meta( $post->ID, '_bsf_event_postal_code', true );
129
  $event_start_date = get_post_meta( $post->ID, '_bsf_event_start_date', true );
130
  $event_end_date = get_post_meta( $post->ID, '_bsf_event_end_date', true );
131
+
132
+ $event_ticket_url = get_post_meta( $post->ID, '_bsf_event_ticket_url', true );
133
+ $event_price = get_post_meta( $post->ID, '_bsf_event_price', true );
134
+ $event_cur = get_post_meta( $post->ID, '_bsf_event_cur', true );
135
+
136
+ //$event_geo_latitude = get_post_meta( $post->ID, '_bsf_event_geo_latitude', true );
137
+ //$event_geo_longitude = get_post_meta( $post->ID, '_bsf_event_geo_longitude', true );
138
+ /*$event_photo = get_post_meta( $post->ID, '_bsf_event_photo', true );
139
  if(trim($event_photo) != "")
140
  {
141
  $event .= '<div class="snippet-image"><img width="180" itemprop="photo" src="'.$event_photo.'"></div>';
147
  jQuery(".snippet-label-img").addClass("snippet-clear");
148
  });
149
  </script>';
150
+ }*/
151
  $event .= '<div class="aio-info">';
152
 
153
  if(trim($event_title) != "")
154
  {
155
  if( $args_event['event_title'])
156
  $event .= '<div class="snippet-label-img">'.$args_event['event_title'].'</div>';
157
+ $event .=' <div class="snippet-data-img">​<span itemprop="name">'.$event_title.'</span></div><div class="snippet-clear"></div>';
158
  }
159
  if(trim($event_org) != "")
160
  {
161
  if( $args_event['event_location'] != "")
162
  $event .= '<div class="snippet-label-img">'.$args_event['event_location'].'</div>';
163
  $event .=' <div class="snippet-data-img">
164
+ ​<span itemprop="location" itemscope itemtype="http://schema.org/Place">
165
  <span itemprop="name">'.$event_org.'</span>,';
166
  }
167
  if(trim($event_street) != "")
168
+ $event .= '<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
169
+ <span itemprop="streetAddress">'.$event_street.'</span>,';
170
  if(trim($event_local) != "")
171
+ $event .= '<span itemprop="addressLocality">'.$event_local.'</span>,';
172
  if(trim($event_region) != "")
173
+ $event .= '<span itemprop="addressRegion">'.$event_region.'</span>';
174
+ if(trim($event_postal_code) != "")
175
+ $event .= '<span itemprop="postalCode">'.$event_postal_code.'</span>';
176
  $event .= '</span>';
177
+ //$event .= ' <span itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">';
178
+ //if(trim($event_geo_latitude) != "")
179
+ // $event .= '<meta itemprop="latitude" content="'.$event_geo_latitude.'" />';
180
+ //if(trim($event_geo_longitude) != "")
181
 
182
+ // $event .= '<meta itemprop="longitude" content="'.$event_geo_longitude.'" />';
183
+ //$event .= '</span>';
184
+ $event .='</span>
185
  </div><div class="snippet-clear"></div>';
186
  if(trim($event_start_date) != "")
187
  {
196
  $event .= '<div class="snippet-label-img">'.$args_event['end_time'].'</div>';
197
  $event .= ' <div class="snippet-data-img"> <span itemprop="endDate" datetime="'.$event_end_date.'T00:00-00:00">'.$event_end_date.'</span></div><div class="snippet-clear"></div>';
198
  }
199
+
200
+ if(trim($event_price) != "")
201
+ {
202
+ if($args_event['events_price'] != "")
203
+ $event .= '<div class="snippet-label-img">'.$args_event['events_price'].'</div>';
204
+ $event .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
205
+ <span itemprop="priceCurrency">'.$event_cur.'</span><span itemprop="price">'.' '.$event_price.'</span><br><a itemprop="url" href="'.$event_ticket_url.'">Buy Tickets</a></div><div class="snippet-clear"></div>';
206
+ //$event .= '<a itemprop="url" href="'.$event_ticket_url.'">Buy Tickets</a>';
207
+ }
208
+
209
  $event .= '</div>
210
  </div></div><div class="snippet-clear"></div>';
211
  return ( is_single() || is_page() ) ? $event : $content;
271
 
272
  if($args_person['snippet_title'] != "")
273
  $people .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_person['snippet_title'].'</div>';
274
+ $people .= '<div itemscope itemtype="http://schema.org/Person"">';
275
  $people_fn = get_post_meta( $post->ID, '_bsf_people_fn', true );
276
  $people_nickname = get_post_meta( $post->ID, '_bsf_people_nickname', true );
277
  $people_photo = get_post_meta( $post->ID, '_bsf_people_photo', true );
280
  $people_company = get_post_meta( $post->ID, '_bsf_people_company', true );
281
  $people_local = get_post_meta( $post->ID, '_bsf_people_local', true );
282
  $people_region = get_post_meta( $post->ID, '_bsf_people_region', true );
283
+
284
+ $people_street = get_post_meta( $post->ID, '_bsf_people_street', true );
285
+ $people_postal = get_post_meta( $post->ID, '_bsf_people_postal', true );
286
+
287
  if(trim($people_photo) != "")
288
  {
289
+ $people .= '<div class="snippet-image"><img width="180" src="'.$people_photo.'" itemprop="image" alt="Photo of'.$people_fn.'" /></div>';
290
  }
291
  else
292
  {
302
  if($args_person['person_name'] != "")
303
  $people .= '<div class="snippet-label-img">'.$args_person['person_name'].'</div> ';
304
 
305
+ $people .= '<div class="snippet-data-img"><span itemprop="name">'.$people_fn.'</span></div><div class="snippet-clear"></div>';
306
  }
307
  if(trim($people_nickname) != "")
308
  {
309
  if($args_person['person_nickname'] != "")
310
  $people .= '<div class="snippet-label-img">'.$args_person['person_nickname'].'</div> ';
311
+ $people .= '<div class="snippet-data-img"> (<span itemprop="additionalName">'.$people_nickname.'</span>)</div><div class="snippet-clear"></div>';
312
  }
313
  if(trim($people_website) != "")
314
  {
315
  if($args_person['person_website'] != "")
316
  $people .= '<div class="snippet-label-img">'.$args_person['person_website'].'</div> ';
317
+ $people .= '<div class="snippet-data-img"> <a href="'.$people_website.'" itemprop="url">'.$people_website.'</a></div><div class="snippet-clear"></div>';
318
  }
319
  if(trim($people_job_title) != "")
320
  {
321
  if($args_person['person_job_title'] != "")
322
  $people .= '<div class="snippet-label-img">'.$args_person['person_job_title'].'</div> ';
323
+ $people .= '<div class="snippet-data-img"> <span itemprop="jobTitle">'.$people_job_title.'</span></div><div class="snippet-clear"></div>';
324
  }
325
  if(trim($people_company) != "")
326
  {
327
  if($args_person['person_company'] != "")
328
+ $people .= '<div itemprop="affiliation" itemscope itemtype="http://schema.org/Organization">';
329
  $people .= '<div class="snippet-label-img">'.$args_person['person_company'].'</div> ';
330
+ $people .= '<div class="snippet-data-img"> <span itemprop="name">'.$people_company.'</span></div><div class="snippet-clear"></div>';
331
+ $people .= '</div>';
332
  }
333
+
334
+ if(trim($people_street) != "")
335
  {
336
  if($args_person['person_address'] != "")
337
  $people .= '<div class="snippet-label-img">'.$args_person['person_address'].'</div> ';
338
+ $people .= '<div class="snippet-data-img"> <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
339
+ <!--<span typeof="v:Address">-->
340
+ <span itemprop="streetAddress">'.$people_street.'</span>,<br>';
341
+ }
342
+
343
+ if(trim($people_local) != "")
344
+ {
345
+ //if($args_person['person_address'] != "")
346
+ //$people .= '<div class="snippet-label-img">'.$args_person['person_address'].'</div> ';
347
+ //$people .= '<!--<div class="snippet-data-img"> <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <!--<span typeof="v:Address">-->';
348
+ $people .= '<span itemprop="addressLocality">'.$people_local.'</span>, ';
349
  }
350
  if(trim($people_region) != "")
351
+ {
352
+ $people .= '<span itemprop="addressRegion">'.$people_region.'</span>, ';
353
+ }
354
+ if(trim($people_postal) != "")
355
+ {
356
+ $people .= '<span itemprop="postalCode">'.$people_postal.'</span>';
357
+ }
358
+ $people .= '<!--</span>-->
359
  </span></div><div class="snippet-clear"></div>';
360
  $people .= '</div>
361
  </div></div><div class="snippet-clear"></div>';
372
  $product .= bsf_do_rating();
373
 
374
  $product .= '</div>';
375
+ $product .= '<div itemscope itemtype="http://schema.org/Product">';
376
  $product_rating = get_post_meta( $post->ID, '_bsf_product_rating', true);
377
  $product_brand = get_post_meta( $post->ID, '_bsf_product_brand', true);
378
  $product_name = get_post_meta( $post->ID, '_bsf_product_name', true);
418
  }
419
  $product .= '</span></div><div class="snippet-clear"></div>';
420
  }
421
+
422
+ $product .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">';
423
  if($args_product['product_agr'] != "")
424
  {
425
  $product .= '<div class="snippet-label-img">'.$args_product['product_agr'].'</div>';
426
  }
427
  $product .= '<div class="snippet-data-img">';
428
+ $product .= '<span itemprop="ratingValue">'.average_rating().'</span>';
429
+ $product .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
430
+
431
+
432
  if(trim($product_brand) != "")
433
  {
434
  if($args_product['product_brand'] != "")
441
  $product .= '<div class="snippet-label-img">'.$args_product['product_name'].'</div>';
442
  $product .= ' <div class="snippet-data-img"> <span itemprop="name">'.$product_name.'</span></div><div class="snippet-clear"></div>';
443
  }
444
+
445
+
446
  if(trim($product_price) != "")
447
  {
448
  if($args_product['product_price'] != "")
449
+ $product .= '<div class="offer_sec" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><div class="snippet-label-img">'.$args_product['product_price'].'</div>';
450
+ $product .= '<div class="snippet-data-img">
451
+ <span itemprop="priceCurrency">'.$product_cur.'</span><span itemprop="price">'.' '.$product_price.'</span></div>';
452
+
453
+ if(trim($product_status) != "")
454
+ {
455
+ if($args_product['product_avail'] != "")
456
+ $product .= '<div class="snippet-label-img">'.$args_product['product_avail'].'</div>';
457
+ $product .= ' <div class="snippet-data-img"> <span itemprop="availability" content="'.$product_status.'">'.$availability.'</span></span></div><div class="snippet-clear"></div>';
458
+ }
459
+ $product .= '</div><div class="snippet-clear"></div>';
460
  }
461
+ /*if(trim($product_status) != "")
462
  {
463
  if($args_product['product_avail'] != "")
464
  $product .= '<div class="snippet-label-img">'.$args_product['product_avail'].'</div>';
465
  $product .= ' <div class="snippet-data-img"> <span itemprop="availability" content="'.$product_status.'">'.$availability.'</span></span></div><div class="snippet-clear"></div>';
466
+ }*/
467
  $product .= '</div>
468
  </div></div><div class="snippet-clear"></div>';
469
 
485
  $recipe .= bsf_do_rating();
486
  }
487
  $recipe .= '</div>';
488
+ $recipe .= '<div itemscope itemtype="http://schema.org/Recipe">';
489
  $recipes_name = get_post_meta( $post->ID, '_bsf_recipes_name', true );
490
  $recipes_preptime = get_post_meta( $post->ID, '_bsf_recipes_preptime', true );
491
  $recipes_cooktime = get_post_meta( $post->ID, '_bsf_recipes_cooktime', true );
497
  $agregate = average_rating();
498
  if(trim($recipes_photo) != "")
499
  {
500
+ $recipe .= '<div class="snippet-image"><img width="180" itemprop="image" src="'.$recipes_photo.'"/></div>';
501
  }
502
  else
503
  {
515
 
516
  $recipe .= '<div class="snippet-data-img"><span itemprop="name">'.$recipes_name.'</span></div><div class="snippet-clear"></div>';
517
  }
518
+ $recipe .= '<div class="snippet-label-img">'.$args_recipe['recipe_pub'].' </div><div class="snippet-data-img"><time datetime="'.get_the_time( 'c' ).'" itemprop="datePublished">'.get_the_date('Y-m-d').'</time></div><div class="snippet-clear"></div>';
519
  if(trim($recipes_preptime) != "")
520
  {
521
  if($args_recipe['recipe_prep'] != "")
536
  }
537
  if($args_recipe['recipe_rating'] != "")
538
  $recipe .= '<div class="snippet-label-img">'.$args_recipe['recipe_rating'].'</div>';
539
+ $recipe .= ' <div class="snippet-data-img"> <span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><span itemprop="ratingValue" class="rating-value">'.$agregate.'</span><span class="star-img">';
540
  for($i = 1; $i<=ceil($agregate); $i++)
541
  {
542
  $recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png">';
546
  if($j)
547
  $recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png">';
548
  }
549
+ $recipe .= '</span> Based on <span itemprop="reviewCount"><strong>'.$count.'</strong> </span> Review(s)</span></div><div class="snippet-clear"></div>';
550
  $recipe .= '</div>
551
  </div></div><div class="snippet-clear"></div>';
552
  return ( is_single() || is_page() ) ? $recipe : $content;
559
 
560
  $software .= '<div id="snippet-box" style="background:'.$args_color["snippet_box_bg"].'; color:'.$args_color["snippet_box_color"].'; border:1px solid '.$args_color["snippet_border"].';">';
561
  if($args_soft['snippet_title'] != "" )
562
+ $software .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_soft['snippet_title'];
563
+
564
+ $software .= bsf_do_rating();
565
+ $software .= '</div>';
566
+
567
  $software .= '<div itemscope itemtype="http://schema.org/SoftwareApplication">';
568
  $software_rating = get_post_meta( $post->ID, '_bsf_software_rating', true);
569
  $software_name = get_post_meta( $post->ID, '_bsf_software_name', true );
573
  $software_price = get_post_meta( $post->ID, '_bsf_software_price', true );
574
  $software_cur = get_post_meta($post->ID, '_bsf_software_cur', true);
575
  $software_os = get_post_meta( $post->ID, '_bsf_software_os', true );
576
+ $software_cat = get_post_meta( $post->ID, '_bsf_software_cat', true );
577
+
578
+
579
  if(trim($software_image) != "")
580
  {
581
+ $software .= '<div class="snippet-image"><img width="180" src="'.$software_image.'" itemprop="screenshot" /></div>';
582
  }
583
  else
584
  {
589
  </script>';
590
  }
591
  $software .= '<div class="aio-info">';
592
+
593
+ //////////////////////////////////////////////////////////////////////
594
+
595
  if(trim($software_rating) != "")
596
+ {
597
+ //if($args_soft['product_brand'] != "")
598
+ $software .= '<div class="snippet-label-img">'.$args_soft['software_rating'].'</div>';
599
+ $software .= '<div class="snippet-data-img"><span class="star-img">';
600
+ for($i = 1; $i<=ceil($software_rating); $i++)
601
+ {
602
+ $software .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png">';
603
+ }
604
+ for($j = 0; $j<=5-ceil($software_rating); $j++)
605
+ {
606
+ if($j)
607
+ $software .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png">';
608
+ }
609
+ $software .= '</span></div><div class="snippet-clear"></div>';
610
+ }
611
+
612
+
613
+ $software .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">';
614
+ //if($args_soft['software_agr'] != "")
615
+ //{
616
+ $software .= '<div class="snippet-label-img">'.$args_soft['software_agr'].'</div>';
617
+ //}
618
+ $software .= '<div class="snippet-data-img">';
619
+ $software .= '<span itemprop="ratingValue">'.average_rating().'</span>';
620
+ $software .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
621
+
622
+ //////////////////////////////////////////////////////////////////////
623
+
624
+
625
+ /*if(trim($software_rating) != "")
626
  {
627
  if($args_soft['software_rating'] != "")
628
  $software .= '<div class="snippet-label-img">'.$args_soft['software_rating'].'</div>';
638
  }
639
 
640
  $software .= '</span></div><div class="snippet-clear"></div>';
641
+ }*/
642
  if(trim($software_name) != "")
643
  {
644
  if($args_soft['software_name'] != "")
649
  {
650
  if($args_soft['software_os'] != "")
651
  $software .= '<div class="snippet-label-img">'.$args_soft['software_os'].'</div>';
652
+ $software .= ' <div class="snippet-data-img"> <span itemprop="operatingSystem">'.$software_os.'</span></div><div class="snippet-clear"></div>';
653
+ }
654
+ if(trim($software_cat) != "")
655
+ {
656
+ //if($args_soft['software_os'] != "")
657
+ $software .= '<div class="snippet-label-img">Software Category</div>';
658
+ $software .= ' <div class="snippet-data-img"> <span itemprop="applicationCategory">'.$software_cat.'</span></div><div class="snippet-clear"></div>';
659
  }
660
  if(trim($software_price) != "")
661
  {
662
  if($args_soft['software_price'] != "")
663
  $software .= '<div class="snippet-label-img">'.$args_soft['software_price'].'</div>';
664
+ $software .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
665
+ <span itemprop="priceCurrency">'.$software_cur.'</span> <span itemprop="price"> '.$software_price.'</span></div><div class="snippet-clear"></div>';
666
 
667
  }
668
  if(trim($software_desc) != "")
675
  {
676
  if($args_soft['software_website'] != "")
677
  $software .= '<div class="snippet-label-img">'.$args_soft['software_website'].'</div>';
678
+ $software .= '<div class="snippet-data-img"> <a itemprop="featureList" href="'.$software_landing.'">'.$software_landing.'</a></div><div class="snippet-clear"></div>';
679
  }
680
  $software .= '</div>
681
  </div></div><div class="snippet-clear"></div>';
696
  $video_desc = get_post_meta( $post->ID, '_bsf_video_desc', true );
697
  $video_thumb = get_post_meta( $post->ID, '_bsf_video_thumb', true );
698
  $video_url = get_post_meta( $post->ID, '_bsf_video_url', true );
699
+ $video_emb_url = get_post_meta( $post->ID, '_bsf_video_emb_url', true );
700
+
701
  $video_duration = get_post_meta( $post->ID, '_bsf_video_duration', true );
702
  $video_date = get_post_meta( $post->ID, '_bsf_video_date', true );
703
  if(trim($video_url) != "")
704
  {
705
+ $video .= '<div class="snippet-image"><a href="'.$video_url.'"><img height="180" src="'.$video_thumb.'" alt="'.$video_title.'"></a></div>';
706
+ }
707
+ elseif (trim($video_emb_url) != "") {
708
+ $video .= '<div class="snippet-image"><a href="'.$video_emb_url.'"><img height="180" src="'.$video_thumb.'" " alt="'.$video_title.'"></a></div>';
709
  }
710
  else
711
  {
715
  });
716
  </script>';
717
  }
718
+ $video .= '<div class="aio-info" style="padding-top:25px">';
719
  if(trim($video_title) != "")
720
  {
721
  if($args_video['video_title'] != "" )
730
  $video .= '<div class="snippet-data-img"> <p itemprop="description">'.$video_desc.'</p></div><div class="snippet-clear"></div>';
731
  }
732
  if(trim($video_thumb) != "")
733
+ $video .= '<meta itemprop="thumbnailUrl" content="'.$video_thumb.'">';
734
+ if(trim($video_url) != ""){
735
+ $video .= '<meta itemprop="contentUrl" content="'.$video_url.'">';
736
+ }
737
+ elseif(trim($video_emb_url) != ""){
738
+ $video .= '<meta itemprop="embedURL" content="'.$video_emb_url.'">';
739
+ }
740
  if(trim($video_duration) != "")
741
  $video .= '<meta itemprop="duration" content="'.$video_duration.'">';
742
  if(trim($video_date) != "")
743
+ $video .= '<meta itemprop="uploadDate" content="'.$video_date.'">';
744
  $video .= '</div>
745
  </div></div><div class="snippet-clear"></div>';
746
  return ( is_single() || is_page() ) ? $video : $content;
755
  $article_desc = get_post_meta( $post->ID, '_bsf_article_desc', true );
756
  $article_image = get_post_meta( $post->ID, '_bsf_article_image', true );
757
  $article_author = get_post_meta( $post->ID, '_bsf_article_author', true );
758
+ $article_publisher = get_post_meta( $post->ID, '_bsf_article_publisher', true );
759
+ $article_publisher_logo = get_post_meta( $post->ID, '_bsf_article_publisher_logo', true );
760
+
761
+
762
  $article .= '<div id="snippet-box" style="background:'.$args_color["snippet_box_bg"].'; color:'.$args_color["snippet_box_color"].'; border:1px solid '.$args_color["snippet_border"].';">';
763
  if($args_article['snippet_title'] != "" )
764
  {
768
  $article .= '<div itemscope itemtype="http://schema.org/Article">';
769
  if(trim($article_image) != "")
770
  {
771
+ $article .= '<div class="snippet-image" itemprop="image" itemscope itemtype="https://schema.org/ImageObject">';
772
+ $article .= '<img width="180" src="'.$article_image.'"/>';
773
+ $article .= '<meta itemprop="url" content="'.$article_image.'">';
774
+ $article .= '<meta itemprop="width" content="800">';
775
+ $article .= '<meta itemprop="height" content="800">';
776
+ $article .= '</div>';
777
  }
778
  else
779
  {
789
  if($args_article['article_name'] != "")
790
  $article .= '<div class="snippet-label-img">'.$args_article['article_name'].'</div>';
791
 
792
+ $article .= '<div class="snippet-data-img"><span itemprop="headline">'.$article_name.'</span></div><div class="snippet-clear"></div>';
793
+ }
794
+ if(trim($article_desc) != "")
795
+ {
796
+ if($args_article['article_desc'] != "")
797
+ $article .= '<div class="snippet-label-img">'.$args_article['article_desc'].'</div>';
798
+
799
+ $article .= '<div class="snippet-data-img"><span itemprop="description">'.$article_desc.'</span></div><div class="snippet-clear"></div>';
800
  }
801
  if(trim($article_author) != "")
802
  {
803
  if($args_article['article_author'] != "")
804
  $article .= '<div class="snippet-label-img">'.$args_article['article_author'].'</div>';
805
 
806
+ $article .= '<div class="snippet-data-img" itemprop="author" itemscope itemtype="https://schema.org/Person">
807
+ <span itemprop="name">'.$article_author.'</span>
808
+ </div>
809
+ <div class="snippet-clear"></div>';
810
+
811
+
812
  }
813
+ if(trim($article_publisher) != "")
814
  {
815
+ if($args_article['article_publisher'] != "")
816
+ $article .= '<div class="snippet-label-img">'.$args_article['article_publisher'].'</div>';
817
+
818
+ $article .= '<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">';
819
+
820
+ $article .= '<div class="snippet-data-img">
821
+ <span itemprop="name">'.$article_publisher.'</span>
822
+ </div>
823
+
824
+
825
+ <div class="snippet-clear"></div>';
826
+ if(trim($article_publisher_logo) != "")
827
+ {
828
+ if($args_article['article_publisher_logo'] != "")
829
+ $article .= '<div class="snippet-label-img">'.$args_article['article_publisher_logo'].'</div>';
830
+
831
+ $article .= '<div class="snippet-data-img" itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">';
832
+ $article .= '<img width="180" src="'.$article_publisher_logo.'"/>';
833
+ $article .= '<meta itemprop="url" content="'.$article_publisher_logo.'">';
834
+ $article .= '<meta itemprop="width" content="800">';
835
+ $article .= '<meta itemprop="height" content="800">';
836
+ $article .= '</div>';
837
+ }
838
+
839
+ $article .= '</div>';
840
  }
841
 
842
+
843
+ $article .= '<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="'.get_permalink().'"/>';
844
+ $article .= '<meta itemprop="datePublished" content="'.get_the_time( 'c').'"/>';
845
+ $article .= '<meta itemprop="dateModified" content="'. get_the_modified_time( 'c' ).'"/>';
846
+
847
+
848
  $article .= '</div>
849
  </div></div><div class="snippet-clear"></div>';
850
  return ( is_single() || is_page() ) ? $article : $content;
index.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php
2
  /*
3
  Plugin Name: All In One Schema.org Rich Snippets
4
- Plugin URI: http://www.brainstormforce.com
5
  Author: Brainstorm Force
6
- Author URI: http://www.brainstormforce.com
7
  Description: The All in One Rich Snippets gives the power to the blog author to control the rich snippets to be shown in the search results by the search engines.
8
- Version: 1.2.0
9
  Text Domain: rich-snippets
10
  License: GPL2
11
  */
12
  /* Copyright 2013 All in One Rich Snippets (email : nitiny@brainstormforce.com)
13
  This program is free software; you can redistribute it and/or modify
14
- it under the terms of the GNU General Public License, version 2, as
15
  published by the Free Software Foundation.
16
  This program is distributed in the hope that it will be useful,
17
  but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,24 +26,24 @@ if ( !class_exists( "RichSnippets" ) )
26
  class RichSnippets
27
  {
28
  function __construct() // Constructor
29
- {
30
  register_activation_hook(__FILE__, array($this, 'register_bsf_settings'));
31
  // add_action( 'admin_notices', array($this, 'display_message') );
32
  add_action( 'admin_head', array( $this, 'star_icons') );
33
  // Add Admin Menu
34
  add_action('admin_menu', array( $this, 'register_custom_menu_page') );
35
  add_action( 'admin_init', array( $this, 'set_styles' ));
36
-
37
  add_action( 'admin_init', array( $this, 'bsf_color_scripts' ));
38
  // add_action( 'init', array( $this, 'register_bsf_settings' ));
39
-
40
  add_filter('plugins_loaded', array( $this, 'rich_snippet_translation'));
41
  add_action( 'admin_enqueue_scripts', array( $this, 'post_enqueue') );
42
  add_action( 'admin_enqueue_scripts', array( $this, 'post_new_enqueue') );
43
- $plugin = plugin_basename(__FILE__);
44
- add_filter("plugin_action_links_$plugin", array( $this,'bsf_settings_link') );
45
  add_action( 'wp_ajax_bsf_submit_request', array( $this, 'submit_request') );
46
-
47
  add_action( 'wp_ajax_bsf_submit_color', array( $this, 'submit_color') );
48
  // Admin bar menu
49
  add_action( 'admin_bar_menu', array( $this, "aiosrs_admin_bar" ),100 );
@@ -64,29 +64,29 @@ if ( !class_exists( "RichSnippets" ) )
64
  'meta' => array('target' => '_blank'),
65
  ) );
66
  }
67
- }
68
- function register_custom_menu_page()
69
  {
70
  require_once(plugin_dir_path( __FILE__ ).'admin/index.php');
71
  $page = add_menu_page('All in One Rich Snippets Dashboard', 'Rich Snippets', 'administrator', 'rich_snippet_dashboard', 'rich_snippet_dashboard', 'div');
72
  //Call the function to print the stylesheets and javascripts in only this plugins admin area
73
- add_action( 'admin_print_styles-' . $page, 'bsf_admin_styles' );
74
  add_action('admin_print_scripts-' . $page, array( $this, 'iris_enqueue_scripts' ) );
75
  }
76
  // Add settings link on plugin page
77
- function bsf_settings_link($links) {
78
- $settings_link = '<a href="admin.php?page=rich_snippet_dashboard">Settings</a>';
79
- array_unshift($links, $settings_link);
80
- return $links;
81
  }
82
  //print the star rating style on post edit page
83
  function post_enqueue($hook) {
84
  if( 'post.php' != $hook )
85
  return;
86
  // wp_enqueue_script( 'bsf_jquery' );
87
- wp_enqueue_script( 'jquery' );
88
  wp_enqueue_script( 'bsf_jquery_star' );
89
- wp_enqueue_script( 'bsf_toggle' );
90
  wp_enqueue_style( 'star_style' );
91
  wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js','', '0.9.1' );
92
  wp_enqueue_script( 'bsf-scripts' );
@@ -100,9 +100,9 @@ if ( !class_exists( "RichSnippets" ) )
100
  if('post-new.php' != $hook )
101
  return;
102
  // wp_enqueue_script( 'bsf_jquery' );
103
- wp_enqueue_script( 'jquery' );
104
  wp_enqueue_script( 'bsf_jquery_star' );
105
- wp_enqueue_script( 'bsf_toggle' );
106
  wp_enqueue_style( 'star_style' );
107
  wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
108
  wp_enqueue_script( 'bsf-scripts' );
@@ -120,11 +120,11 @@ if ( !class_exists( "RichSnippets" ) )
120
  function set_styles() {
121
  wp_register_style( 'star_style', plugins_url('/css/jquery.rating.css', __FILE__) );
122
  wp_register_style( 'meta_style', plugins_url('admin/css/style.css', __FILE__) );
123
-
124
  wp_register_style( 'admin_style', plugins_url('admin/css/admin.css', __FILE__) );
125
- wp_register_script( 'bsf_jquery_ui', plugins_url('/js/jquery-ui.js', __FILE__) );
126
- wp_register_script( 'bsf_jquery_star', plugins_url('/js/jquery.rating.min.js', __FILE__) );
127
- wp_register_script( 'bsf_toggle', plugins_url('/js/toggle.js', __FILE__) );
128
  }
129
  // Define icon styles for the custom post type
130
  function star_icons() {
@@ -140,7 +140,7 @@ if ( !class_exists( "RichSnippets" ) )
140
  background: url(<?php echo plugins_url('/images/star.png',__FILE__); ?>) no-repeat 0 -32px !important;
141
  }
142
  #star-icons-32.icon32 {background: url(<?php echo plugins_url('/images/gray-32.png',__FILE__); ?>) no-repeat;}
143
- </style>
144
  <?php }
145
  /* Translation */
146
  function rich_snippet_translation()
@@ -169,7 +169,7 @@ if ( !class_exists( "RichSnippets" ) )
169
  $message = $_POST['message'];
170
  $name = $_POST['name'];
171
  $post_url = $_POST['post_url'];
172
-
173
  if($sub == "question")
174
  $subject = "[AIOSRS] New question received from ".$name;
175
  else if($sub == "bug")
@@ -182,7 +182,7 @@ if ( !class_exists( "RichSnippets" ) )
182
  $subject = "[AIOSRS] New development contribution request by ".$name;
183
  else if($sub == "other")
184
  $subject = "[AIOSRS] New contact request received from ".$name;
185
-
186
  $html = '
187
  <html>
188
  <head>
@@ -222,9 +222,9 @@ if ( !class_exists( "RichSnippets" ) )
222
  $headers = 'MIME-Version: 1.0' . "\r\n";
223
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
224
  $headers .= 'From:'.$name.'<'.$from.'>' . "\r\n";
225
- $headers .= 'Cc: Sujay Pawar <sujay@brainstormforce.com>, Nitin Yawalkar <nitiny@brainstormforce.com>, Aniket Chavan <aniketc@bsf.io>' . "\r\n";
226
  echo mail($to,$subject,$html,$headers) ? "Thank you!" : "Something went wrong!";
227
-
228
  die();
229
  }
230
  function submit_color()
@@ -233,7 +233,7 @@ if ( !class_exists( "RichSnippets" ) )
233
  $snippet_title_bg = $_POST['snippet_title_bg'];
234
  $border_color = $_POST['snippet_border'];
235
  $title_color = $_POST['snippet_title_color'];
236
- $box_color = $_POST['snippet_box_color'];
237
  $color_opt = array(
238
  'snippet_box_bg' => $snippet_box_bg,
239
  'snippet_title_bg' => $snippet_title_bg,
@@ -242,36 +242,36 @@ if ( !class_exists( "RichSnippets" ) )
242
  'snippet_box_color' => $box_color,
243
  );
244
  echo update_option('bsf_custom',$color_opt) ? 'Settings saved !' : 'Error occured. Satings were not saved !' ;
245
-
246
  die();
247
  }
248
- function iris_enqueue_scripts()
249
  {
250
  wp_enqueue_script( 'wp-color-picker' );
251
  // load the minified version of custom script
252
  wp_enqueue_script( 'cp_custom', plugins_url( 'js/cp-script.min.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), '1.1', true );
253
  wp_enqueue_style( 'wp-color-picker' );
254
  }
255
- function bsf_color_scripts()
256
  {
257
  global $wp_version;
258
  $bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' );
259
-
260
  // styles required for cmb
261
  $bsf_style_array = array( 'thickbox' );
262
-
263
  // if we're 3.5 or later, user wp-color-picker
264
  if ( 3.5 <= $wp_version ) {
265
-
266
  $bsf_script_array[] = 'wp-color-picker';
267
  $bsf_style_array[] = 'wp-color-picker';
268
-
269
  } else {
270
-
271
  // otherwise use the older 'farbtastic'
272
  $bsf_script_array[] = 'farbtastic';
273
  $bsf_style_array[] = 'farbtastic';
274
-
275
  }
276
  }
277
  }
1
  <?php
2
  /*
3
  Plugin Name: All In One Schema.org Rich Snippets
4
+ Plugin URI: https://www.brainstormforce.com
5
  Author: Brainstorm Force
6
+ Author URI: https://www.brainstormforce.com
7
  Description: The All in One Rich Snippets gives the power to the blog author to control the rich snippets to be shown in the search results by the search engines.
8
+ Version: 1.3.0
9
  Text Domain: rich-snippets
10
  License: GPL2
11
  */
12
  /* Copyright 2013 All in One Rich Snippets (email : nitiny@brainstormforce.com)
13
  This program is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU General Public License, version 2, as
15
  published by the Free Software Foundation.
16
  This program is distributed in the hope that it will be useful,
17
  but WITHOUT ANY WARRANTY; without even the implied warranty of
26
  class RichSnippets
27
  {
28
  function __construct() // Constructor
29
+ {
30
  register_activation_hook(__FILE__, array($this, 'register_bsf_settings'));
31
  // add_action( 'admin_notices', array($this, 'display_message') );
32
  add_action( 'admin_head', array( $this, 'star_icons') );
33
  // Add Admin Menu
34
  add_action('admin_menu', array( $this, 'register_custom_menu_page') );
35
  add_action( 'admin_init', array( $this, 'set_styles' ));
36
+
37
  add_action( 'admin_init', array( $this, 'bsf_color_scripts' ));
38
  // add_action( 'init', array( $this, 'register_bsf_settings' ));
39
+
40
  add_filter('plugins_loaded', array( $this, 'rich_snippet_translation'));
41
  add_action( 'admin_enqueue_scripts', array( $this, 'post_enqueue') );
42
  add_action( 'admin_enqueue_scripts', array( $this, 'post_new_enqueue') );
43
+ $plugin = plugin_basename(__FILE__);
44
+ add_filter("plugin_action_links_$plugin", array( $this,'bsf_settings_link') );
45
  add_action( 'wp_ajax_bsf_submit_request', array( $this, 'submit_request') );
46
+
47
  add_action( 'wp_ajax_bsf_submit_color', array( $this, 'submit_color') );
48
  // Admin bar menu
49
  add_action( 'admin_bar_menu', array( $this, "aiosrs_admin_bar" ),100 );
64
  'meta' => array('target' => '_blank'),
65
  ) );
66
  }
67
+ }
68
+ function register_custom_menu_page()
69
  {
70
  require_once(plugin_dir_path( __FILE__ ).'admin/index.php');
71
  $page = add_menu_page('All in One Rich Snippets Dashboard', 'Rich Snippets', 'administrator', 'rich_snippet_dashboard', 'rich_snippet_dashboard', 'div');
72
  //Call the function to print the stylesheets and javascripts in only this plugins admin area
73
+ add_action( 'admin_print_styles-' . $page, 'bsf_admin_styles' );
74
  add_action('admin_print_scripts-' . $page, array( $this, 'iris_enqueue_scripts' ) );
75
  }
76
  // Add settings link on plugin page
77
+ function bsf_settings_link($links) {
78
+ $settings_link = '<a href="admin.php?page=rich_snippet_dashboard">Settings</a>';
79
+ array_unshift($links, $settings_link);
80
+ return $links;
81
  }
82
  //print the star rating style on post edit page
83
  function post_enqueue($hook) {
84
  if( 'post.php' != $hook )
85
  return;
86
  // wp_enqueue_script( 'bsf_jquery' );
87
+ wp_enqueue_script( 'jquery' );
88
  wp_enqueue_script( 'bsf_jquery_star' );
89
+ wp_enqueue_script( 'bsf_toggle' );
90
  wp_enqueue_style( 'star_style' );
91
  wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js','', '0.9.1' );
92
  wp_enqueue_script( 'bsf-scripts' );
100
  if('post-new.php' != $hook )
101
  return;
102
  // wp_enqueue_script( 'bsf_jquery' );
103
+ wp_enqueue_script( 'jquery' );
104
  wp_enqueue_script( 'bsf_jquery_star' );
105
+ wp_enqueue_script( 'bsf_toggle' );
106
  wp_enqueue_style( 'star_style' );
107
  wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
108
  wp_enqueue_script( 'bsf-scripts' );
120
  function set_styles() {
121
  wp_register_style( 'star_style', plugins_url('/css/jquery.rating.css', __FILE__) );
122
  wp_register_style( 'meta_style', plugins_url('admin/css/style.css', __FILE__) );
123
+
124
  wp_register_style( 'admin_style', plugins_url('admin/css/admin.css', __FILE__) );
125
+ wp_register_script( 'bsf_jquery_ui', plugins_url('/js/jquery-ui.js', __FILE__) );
126
+ wp_register_script( 'bsf_jquery_star', plugins_url('/js/jquery.rating.min.js', __FILE__) );
127
+ wp_register_script( 'bsf_toggle', plugins_url('/js/toggle.js', __FILE__) );
128
  }
129
  // Define icon styles for the custom post type
130
  function star_icons() {
140
  background: url(<?php echo plugins_url('/images/star.png',__FILE__); ?>) no-repeat 0 -32px !important;
141
  }
142
  #star-icons-32.icon32 {background: url(<?php echo plugins_url('/images/gray-32.png',__FILE__); ?>) no-repeat;}
143
+ </style>
144
  <?php }
145
  /* Translation */
146
  function rich_snippet_translation()
169
  $message = $_POST['message'];
170
  $name = $_POST['name'];
171
  $post_url = $_POST['post_url'];
172
+
173
  if($sub == "question")
174
  $subject = "[AIOSRS] New question received from ".$name;
175
  else if($sub == "bug")
182
  $subject = "[AIOSRS] New development contribution request by ".$name;
183
  else if($sub == "other")
184
  $subject = "[AIOSRS] New contact request received from ".$name;
185
+
186
  $html = '
187
  <html>
188
  <head>
222
  $headers = 'MIME-Version: 1.0' . "\r\n";
223
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
224
  $headers .= 'From:'.$name.'<'.$from.'>' . "\r\n";
225
+ $headers .= 'Cc: Sujay Pawar <sujay@brainstormforce.com>, Nitin Yawalkar <nitiny@brainstormforce.com>, Pratik Chaskar <pratikc@brainstormforce.com>, Sandesh Jangam <sandeshj@bsf.io>' . "\r\n";
226
  echo mail($to,$subject,$html,$headers) ? "Thank you!" : "Something went wrong!";
227
+
228
  die();
229
  }
230
  function submit_color()
233
  $snippet_title_bg = $_POST['snippet_title_bg'];
234
  $border_color = $_POST['snippet_border'];
235
  $title_color = $_POST['snippet_title_color'];
236
+ $box_color = $_POST['snippet_box_color'];
237
  $color_opt = array(
238
  'snippet_box_bg' => $snippet_box_bg,
239
  'snippet_title_bg' => $snippet_title_bg,
242
  'snippet_box_color' => $box_color,
243
  );
244
  echo update_option('bsf_custom',$color_opt) ? 'Settings saved !' : 'Error occured. Satings were not saved !' ;
245
+
246
  die();
247
  }
248
+ function iris_enqueue_scripts()
249
  {
250
  wp_enqueue_script( 'wp-color-picker' );
251
  // load the minified version of custom script
252
  wp_enqueue_script( 'cp_custom', plugins_url( 'js/cp-script.min.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), '1.1', true );
253
  wp_enqueue_style( 'wp-color-picker' );
254
  }
255
+ function bsf_color_scripts()
256
  {
257
  global $wp_version;
258
  $bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' );
259
+
260
  // styles required for cmb
261
  $bsf_style_array = array( 'thickbox' );
262
+
263
  // if we're 3.5 or later, user wp-color-picker
264
  if ( 3.5 <= $wp_version ) {
265
+
266
  $bsf_script_array[] = 'wp-color-picker';
267
  $bsf_style_array[] = 'wp-color-picker';
268
+
269
  } else {
270
+
271
  // otherwise use the older 'farbtastic'
272
  $bsf_script_array[] = 'farbtastic';
273
  $bsf_style_array[] = 'farbtastic';
274
+
275
  }
276
  }
277
  }
meta-boxes.php CHANGED
@@ -119,6 +119,13 @@ function bsf_metaboxes( array $meta_boxes ) {
119
  'class' => 'events',
120
  'type' => 'text_medium',
121
  ),
 
 
 
 
 
 
 
122
  /* array(
123
  'name' => __('Description ','rich-snippets'),
124
  'desc' => __('Describe the event in short.','rich-snippets'),
@@ -141,6 +148,27 @@ function bsf_metaboxes( array $meta_boxes ) {
141
  'type' => 'text_date',
142
  ),
143
  array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  'name' => __('GEO Location ','rich-snippets'),
145
  'desc' => __('Enter Latitude. <a href="http://universimmedia.pagesperso-orange.fr/geo/loc.htm" target="_blank">Find Here.</a>','rich-snippets'),
146
  'id' => $prefix . 'event_geo_latitude',
@@ -160,7 +188,7 @@ function bsf_metaboxes( array $meta_boxes ) {
160
  'id' => $prefix . 'event_photo',
161
  'class' => 'events',
162
  'type' => 'file',
163
- ),
164
  // Meta Settings for Music
165
  array(
166
  'name' => __('Rich Snippets - Music','rich-snippets'),
@@ -299,6 +327,13 @@ function bsf_metaboxes( array $meta_boxes ) {
299
  ),
300
  array(
301
  'name' => __('Address','rich-snippets'),
 
 
 
 
 
 
 
302
  'desc' => __('Enter Locality','rich-snippets'),
303
  'id' => $prefix . 'people_local',
304
  'class' => 'people',
@@ -311,6 +346,14 @@ function bsf_metaboxes( array $meta_boxes ) {
311
  'class' => 'people',
312
  'type' => 'text_medium',
313
  ),
 
 
 
 
 
 
 
 
314
  // Meta Settings for Products
315
  array(
316
  'name' => __('Rich Snippets - Products','rich-snippets'),
@@ -496,6 +539,13 @@ function bsf_metaboxes( array $meta_boxes ) {
496
  'class' => 'software',
497
  'type' => 'text_medium',
498
  ),
 
 
 
 
 
 
 
499
  array(
500
  'name' => __('Software Image','rich-snippets'),
501
  'desc' => __('Upload or select image of software. Medium size is recommended (300px X 300px)','rich-snippets'),
@@ -548,11 +598,20 @@ function bsf_metaboxes( array $meta_boxes ) {
548
  ),
549
  array(
550
  'name' => __('Video','rich-snippets'),
551
- 'desc' => __('Upload Video or enter the video file url','rich-snippets'),
552
  'id' => $prefix . 'video_url',
553
  'class' => 'video',
554
  'type' => 'file',
555
  ),
 
 
 
 
 
 
 
 
 
556
  array(
557
  'name' => __('Video Duration','rich-snippets'),
558
  'desc' => __('Enter the duration for this video','rich-snippets'),
@@ -575,6 +634,13 @@ function bsf_metaboxes( array $meta_boxes ) {
575
  'class' => 'article',
576
  'type' => 'title',
577
  ),
 
 
 
 
 
 
 
578
  array(
579
  'name' => __('Article Name','rich-snippets'),
580
  'desc' => __('Enter the name for this article','rich-snippets'),
@@ -582,6 +648,13 @@ function bsf_metaboxes( array $meta_boxes ) {
582
  'class' => 'article',
583
  'type' => 'text',
584
  ),
 
 
 
 
 
 
 
585
  array(
586
  'name' => __('Author','rich-snippets'),
587
  'desc' => __('Enter the author name for this article','rich-snippets'),
@@ -590,19 +663,21 @@ function bsf_metaboxes( array $meta_boxes ) {
590
  'type' => 'text',
591
  ),
592
  array(
593
- 'name' => __('Short Description','rich-snippets'),
594
- 'desc' => __('Enter the brief description about this article (About 30 Words)','rich-snippets'),
595
- 'id' => $prefix . 'article_desc',
596
  'class' => 'article',
597
- 'type' => 'textarea_small',
598
  ),
599
  array(
600
- 'name' => __('Article Image','rich-snippets'),
601
  'desc' => __('Upload or select image from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
602
- 'id' => $prefix . 'article_image',
603
  'class' => 'article',
604
  'type' => 'file',
605
  ),
 
 
606
  ),
607
  );
608
  // Add other metaboxes as needed
119
  'class' => 'events',
120
  'type' => 'text_medium',
121
  ),
122
+ array(
123
+ 'name' => __('','rich-snippets'),
124
+ 'desc' => __('Postal Code','rich-snippets'),
125
+ 'id' => $prefix . 'event_postal_code',
126
+ 'class' => 'events',
127
+ 'type' => 'text_medium',
128
+ ),
129
  /* array(
130
  'name' => __('Description ','rich-snippets'),
131
  'desc' => __('Describe the event in short.','rich-snippets'),
148
  'type' => 'text_date',
149
  ),
150
  array(
151
+ 'name' => __('Offer Price','rich-snippets'),
152
+ 'desc' => __('Enter the ticket Price.','rich-snippets'),
153
+ 'id' => $prefix . 'event_price',
154
+ 'class' => 'events',
155
+ 'type' => 'text_small',
156
+ ),
157
+ array(
158
+ 'name' => __('Currency ','rich-snippets'),
159
+ 'desc' => __('Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>','rich-snippets'),
160
+ 'id' => $prefix . 'event_cur',
161
+ 'class' => 'events',
162
+ 'type' => 'text_small',
163
+ ),
164
+ array(
165
+ 'name' => __('Url ','rich-snippets'),
166
+ 'desc' => __('Url of buy ticket page','rich-snippets'),
167
+ 'id' => $prefix . 'event_ticket_url',
168
+ 'class' => 'events',
169
+ 'type' => 'text',
170
+ ),
171
+ /*array(
172
  'name' => __('GEO Location ','rich-snippets'),
173
  'desc' => __('Enter Latitude. <a href="http://universimmedia.pagesperso-orange.fr/geo/loc.htm" target="_blank">Find Here.</a>','rich-snippets'),
174
  'id' => $prefix . 'event_geo_latitude',
188
  'id' => $prefix . 'event_photo',
189
  'class' => 'events',
190
  'type' => 'file',
191
+ ),*/
192
  // Meta Settings for Music
193
  array(
194
  'name' => __('Rich Snippets - Music','rich-snippets'),
327
  ),
328
  array(
329
  'name' => __('Address','rich-snippets'),
330
+ 'desc' => __('Enter Street','rich-snippets'),
331
+ 'id' => $prefix . 'people_street',
332
+ 'class' => 'people',
333
+ 'type' => 'text_medium',
334
+ ),
335
+ array(
336
+ 'name' => __('','rich-snippets'),
337
  'desc' => __('Enter Locality','rich-snippets'),
338
  'id' => $prefix . 'people_local',
339
  'class' => 'people',
346
  'class' => 'people',
347
  'type' => 'text_medium',
348
  ),
349
+ array(
350
+ 'name' => __('','rich-snippets'),
351
+ 'desc' => __('Postal Code','rich-snippets'),
352
+ 'id' => $prefix . 'people_postal',
353
+ 'class' => 'people',
354
+ 'type' => 'text_medium',
355
+ ),
356
+
357
  // Meta Settings for Products
358
  array(
359
  'name' => __('Rich Snippets - Products','rich-snippets'),
539
  'class' => 'software',
540
  'type' => 'text_medium',
541
  ),
542
+ array(
543
+ 'name' => __('Application Category','rich-snippets'),
544
+ 'desc' => __('Like Game, Multimedia','rich-snippets'),
545
+ 'id' => $prefix . 'software_cat',
546
+ 'class' => 'software',
547
+ 'type' => 'text_medium',
548
+ ),
549
  array(
550
  'name' => __('Software Image','rich-snippets'),
551
  'desc' => __('Upload or select image of software. Medium size is recommended (300px X 300px)','rich-snippets'),
598
  ),
599
  array(
600
  'name' => __('Video','rich-snippets'),
601
+ 'desc' => __('Upload Video or enter the video file url<br>Example: <br> http://www.example.com/video123.flv<br>A URL pointing to the actual video media file. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .avi, .flv, or other video file format','rich-snippets'),
602
  'id' => $prefix . 'video_url',
603
  'class' => 'video',
604
  'type' => 'file',
605
  ),
606
+
607
+ array(
608
+ 'name' => __('Embed Video','rich-snippets'),
609
+ 'desc' => __('A URL pointing to a player for the specific video. Usually this is the information in the src element of an &lt;embed&gt;tag. <br>Example: <br>Youtube: https://www.youtube.com/embed/CibazcCevOk <br>Dailymotion: http://www.dailymotion.com/swf/x1o2g<br><div class="bsf_vd_note"><h3>Add only one url either in "Video" or "Embed Video" field. Dont use both.</h3></div>','rich-snippets'),
610
+ 'id' => $prefix . 'video_emb_url',
611
+ 'class' => 'video',
612
+ 'type' => 'text',
613
+ ),
614
+
615
  array(
616
  'name' => __('Video Duration','rich-snippets'),
617
  'desc' => __('Enter the duration for this video','rich-snippets'),
634
  'class' => 'article',
635
  'type' => 'title',
636
  ),
637
+ array(
638
+ 'name' => __('Article Image','rich-snippets'),
639
+ 'desc' => __('Upload or select image from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
640
+ 'id' => $prefix . 'article_image',
641
+ 'class' => 'article',
642
+ 'type' => 'file',
643
+ ),
644
  array(
645
  'name' => __('Article Name','rich-snippets'),
646
  'desc' => __('Enter the name for this article','rich-snippets'),
648
  'class' => 'article',
649
  'type' => 'text',
650
  ),
651
+ array(
652
+ 'name' => __('Short Description','rich-snippets'),
653
+ 'desc' => __('Enter the brief description about this article (About 30 Words)','rich-snippets'),
654
+ 'id' => $prefix . 'article_desc',
655
+ 'class' => 'article',
656
+ 'type' => 'textarea_small',
657
+ ),
658
  array(
659
  'name' => __('Author','rich-snippets'),
660
  'desc' => __('Enter the author name for this article','rich-snippets'),
663
  'type' => 'text',
664
  ),
665
  array(
666
+ 'name' => __('Publisher - Orgnization','rich-snippets'),
667
+ 'desc' => __('Enter the publisher name for this article','rich-snippets'),
668
+ 'id' => $prefix . 'article_publisher',
669
  'class' => 'article',
670
+ 'type' => 'text',
671
  ),
672
  array(
673
+ 'name' => __('Publisher Logo','rich-snippets'),
674
  'desc' => __('Upload or select image from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
675
+ 'id' => $prefix . 'article_publisher_logo',
676
  'class' => 'article',
677
  'type' => 'file',
678
  ),
679
+
680
+
681
  ),
682
  );
683
  // Add other metaboxes as needed
readme.txt CHANGED
@@ -1,186 +1,192 @@
1
- === All In One Schema.org Rich Snippets ===
2
- Contributors: brainstormforce, yawalkarm
3
- Donate link: http://www.brainstormforce.com
4
- Tags: Review, Event, People, Product, Recipe, Software Application, Video, Article, rdfa, rich snippet, schema.org, schema, microdata, microformat, SERP, Google, Yahoo, Bing
5
- Requires at least: 3.7
6
- Tested up to: 4.0.0
7
- Stable tag: 1.2.0
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
11
-
12
- == Description ==
13
-
14
- = What is a Rich Snippet? =
15
- It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
16
- [See Examples of Rich Snippets Here.](http://www.seomoz.org/blog/schema-examples/ "Rich Snippets Examples")
17
-
18
- = How does a Rich Snippet help? =
19
- - It gives search engines only the important & precise information to display in search result snippets.
20
- - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
21
- - [See what difference it makes](http://dashburst.com/google-search-what-are-rich-snippets/ "See the difference") in CTR (Click Through Rate)
22
- - Helps you rank higher in search results
23
- - Helps Facebook display proper information when users share your links on Facebook
24
- > **Curious, how does this plugin work?**
25
- >
26
- > [Take a quick test drive!](http://drive.brainstormforce.com)
27
-
28
- = Supported Content Types - =
29
- This plugin supports the following types of Schemas:
30
- * Review
31
- * Event
32
- * People
33
- * Product
34
- * Recipe
35
- * Software Application
36
- * Video
37
- * Articles
38
-
39
- = Future release would include - =
40
- * Breadcrumbs
41
- * Local Business
42
- * Books
43
- = Want to contribute to the plugin? =
44
- You may now contribute to the plugin on Github: [All in one Schema.org Rich Snippets on Github](https://github.com/brainstormforce/All-In-One-Schema.org-Rich-Snippets "Contribute on Github")
45
-
46
- == Installation ==
47
-
48
- = Through Dashboard =
49
- 1. Go to Plugins -> Add New -> Search for "All in One Schema.org Rich Snippets" Or Upload the plugins zip file
50
- = Through FTP =
51
- 1. Upload the plugin into `wp-content/plugins` directory
52
- 2. Activate the plugin through the 'Plugins' menu in WordPress
53
- 3. That's It.
54
- Now go and create a new post. There you will find a meta box, select the type of post from dropdown and fill out the details, publish the post.
55
- Google will start showing rich snippets in the search results, as soon as your post is crawled.
56
-
57
- You can test the rich snippet on Google Webmasters Rich Snippets Testing Tool
58
-
59
- == Release Notes ==
60
- What's new in this version 1.1.8
61
- From the very beginning - one of the major thing we are known for is our designs. It always has been one of our major focus. In fact you can say design is our DNA. However, in previous versions on AIOSRS, we felt it was missing somehow.
62
-
63
- We have received requests for article rich snippets from a huge no. of our users. So, we have added the Article type in this new update.
64
-
65
- Also, we observed most of the people did not want the MicroData box visible to users but only to search engines and requested the feature. However as this is against Google's guidelines, we gave a though to an alternative. Rather than people using the plugin only for 'displaying rich snippets in search results' and 'comporting on front end design' - why not design the plugin in a way that people would want the plugin for displaying a beautiful post summary and rich snippets would come with that? Wouldn't that be awesome?
66
-
67
- So with this update, we stared trying the same thing; and with of course with feedbacks from our beloved users, we look forward making it even better.
68
-
69
- In brief, new things in updated version -
70
- * Redesigned Front End
71
- * Fully Responsive
72
- * Retina Ready
73
- * Options Panel to make settings and control front end display
74
- * Options Panel to make settings and control strings (Flexibility for admin & also helpful for sites in other languages)
75
- * Setting to make images look better
76
- Some of the other non design things -
77
- * Better reviews and ratings functionality
78
- * 100% MicroData. Rolled out RDFa completely
79
- * and many other small but important things
80
-
81
- Thanks [Nitin](http://profiles.wordpress.org/yawalkarm/ "Nitin Yawalkar") & Pratik for your major contributions
82
-
83
- ******************** ******************** ********************
84
- Next scheduled version will include -
85
- - Even simpler, shorter, typographic and more beautiful design of MicroData box. May be like this https://moqups.com/brainstormforce/5P0EaLtt
86
- - Redesigned admin panel
87
- - Refined MicroData input options
88
- - Support for more post types (Local Business, etc)
89
- Cheers & Regards,
90
- Sujay
91
-
92
- == Frequently Asked Questions ==
93
-
94
- = What is a Rich Snippet? =
95
- It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
96
- = How does a Rich Snippet help? =
97
- - It gives search engines only the important & precise information to display in search result snippets.
98
- - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
99
- - [See what difference it makes](http://dashburst.com/google-search-what-are-rich-snippets/ "See the difference") in CTR (Click Through Rate)
100
- - Helps you rank higher in search results
101
- - Helps Facebook display proper information when users share your links on Facebook
102
-
103
- = Which Content Types are Supported? =
104
- This plugin currently supports almost all of the content types that are released by Schema.org at one place.
105
- Review, Event, People, Product, Recipe, Software Application, Video, Articles etc.
106
-
107
- == Screenshots ==
108
- 1. Meta box in post-new under the editor screen.
109
- 2. Select content type from dropdown
110
- 3. Fill the details as much as you can
111
- 4. Test the post or page URL in Google Rich Snippets Testing
112
-
113
- == Changelog ==
114
-
115
- = 1.2.0 =
116
- * Improvement: WordPress 4.0 compatibility
117
- * Fixed: Colorpicker breaking other plugins colorpicker settings.
118
-
119
- = 1.1.9 =
120
- * Fixed: Image uploading in meta issue resolved.
121
- * Fixed: Compatibility with WordPress 3.9
122
-
123
- = 1.1.8 =
124
- * Fixed: CSS and JS now loads on the page / post where rich snippets are configured.
125
-
126
- = 1.1.7 =
127
- * Improvement: Added "Test Rich Snippets" menu in admin bar for testing rich snippets in Google Webmasters Tools
128
- * Fixed: retina.js issue resolved
129
- * Removed unnecessary code
130
-
131
- = 1.1.6 =
132
- * Improvement: Compatibility with WordPres 3.8
133
- * Fixed: Admin CSS breaking tabs in WP 3.8
134
- * Added - reference post url field in "contact developers" form on settings page
135
-
136
- = 1.1.5 =
137
- * Improvement: Replaced rating 'count' with 'votes' on products - as directed by Google
138
- * Fixed: Article snippet not displaying accurate when snippet title is blank
139
- * Fixed: Recipe string 'Published on' can be changed.
140
-
141
- = 1.1.4 =
142
- * Fixed: Illegal string offset `user_rating` Warning
143
-
144
- = 1.1.3 =
145
- * Improvement : Network Activation
146
-
147
- = 1.1.2 =
148
- * Fixed: Edit media functionality.
149
-
150
- = 1.1.1 =
151
- * Added: Article type
152
- * Added: Compatibility with WooThemes Plugins and themes
153
- * Added: New Media Manager for uploading images in metabox
154
-
155
- = 1.1.0 =
156
- * Added: Admin options
157
- * Fixed: Ratings on recipe, products and software application
158
- * Improvement: Admin options for customizing everything
159
- * Improvement: New snippet box design with responsive layout
160
-
161
- = 1.0.4 =
162
- * Fixed: Rating on Comments
163
- * Fixed: On deleting any deactivated plugin
164
- * Fixed: Error message comming on commenting
165
- * Fixed: On post save draft
166
-
167
- = 1.0.3 =
168
- * Clean up the code
169
- * Fixed: Plugin activation error
170
- * Fixed: Error on editing theme and plugin files.
171
- * Removed : Breadcrumbs
172
-
173
- = 1.0.2 =
174
- * Added: RDFa Breadcrumbs Plugin is now a part of All in One Schema.org Rich Snippets !
175
- * Added: Star rating and review for recipe
176
- * Fized: Recipe type
177
- * Fixed: Post update error
178
-
179
- = 1.0.1 =
180
- * Minor Bugs Fixes
181
-
182
- = 1.0 =
183
- * Initial Release.
184
-
185
- == Upgrade Notice ==
 
 
 
 
 
 
186
  Note: Minor bug fixes. Update the plugin to enjoy bug free blogging!
1
+ === All In One Schema.org Rich Snippets ===
2
+ Contributors: brainstormforce, yawalkarm
3
+ Donate link: http://bsf.io/pay
4
+ Tags: Review, Event, People, Product, Recipe, Software Application, Video, Article, rdfa, rich snippet, schema.org, schema, microdata, microformat, SERP, Google, Yahoo, Bing
5
+ Requires at least: 3.7
6
+ Tested up to: 4.4
7
+ Stable tag: 1.3.0
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+ Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
11
+
12
+ == Description ==
13
+
14
+ = What is a Rich Snippet? =
15
+ It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
16
+ [See Examples of Rich Snippets Here.](http://www.seomoz.org/blog/schema-examples/ "Rich Snippets Examples")
17
+
18
+ = How does a Rich Snippet help? =
19
+ - It gives search engines only the important & precise information to display in search result snippets.
20
+ - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
21
+ - [See what difference it makes](http://dashburst.com/google-search-what-are-rich-snippets/ "See the difference") in CTR (Click Through Rate)
22
+ - Helps you rank higher in search results
23
+ - Helps Facebook display proper information when users share your links on Facebook
24
+
25
+ **Curious, how does this plugin work?**
26
+
27
+
28
+ = Supported Content Types - =
29
+ This plugin supports the following types of Schemas:
30
+
31
+ * Review
32
+ * Event
33
+ * People
34
+ * Product
35
+ * Recipe
36
+ * Software Application
37
+ * Video
38
+ * Articles
39
+
40
+ = Future release would include - =
41
+ * Breadcrumbs
42
+ * Local Business
43
+ * Books
44
+ = Want to contribute to the plugin? =
45
+ You may now contribute to the plugin on Github: [All in one Schema.org Rich Snippets on Github](https://github.com/brainstormforce/All-In-One-Schema.org-Rich-Snippets "Contribute on Github")
46
+
47
+ == Installation ==
48
+
49
+ = Through Dashboard =
50
+ 1. Go to Plugins -> Add New -> Search for "All in One Schema.org Rich Snippets" Or Upload the plugins zip file
51
+ = Through FTP =
52
+ 1. Upload the plugin into `wp-content/plugins` directory
53
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
54
+ 3. That's It.
55
+ Now go and create a new post. There you will find a meta box, select the type of post from dropdown and fill out the details, publish the post.
56
+ Google will start showing rich snippets in the search results, as soon as your post is crawled.
57
+
58
+ You can test the rich snippet on Google Webmasters Rich Snippets Testing Tool
59
+
60
+ == Release Notes ==
61
+ What's new in this version 1.1.8
62
+ From the very beginning - one of the major thing we are known for is our designs. It always has been one of our major focus. In fact you can say design is our DNA. However, in previous versions on AIOSRS, we felt it was missing somehow.
63
+
64
+ We have received requests for article rich snippets from a huge no. of our users. So, we have added the Article type in this new update.
65
+
66
+ Also, we observed most of the people did not want the MicroData box visible to users but only to search engines and requested the feature. However as this is against Google's guidelines, we gave a though to an alternative. Rather than people using the plugin only for 'displaying rich snippets in search results' and 'comporting on front end design' - why not design the plugin in a way that people would want the plugin for displaying a beautiful post summary and rich snippets would come with that? Wouldn't that be awesome?
67
+
68
+ So with this update, we stared trying the same thing; and with of course with feedbacks from our beloved users, we look forward making it even better.
69
+
70
+ In brief, new things in updated version -
71
+ * Redesigned Front End
72
+ * Fully Responsive
73
+ * Retina Ready
74
+ * Options Panel to make settings and control front end display
75
+ * Options Panel to make settings and control strings (Flexibility for admin & also helpful for sites in other languages)
76
+ * Setting to make images look better
77
+ Some of the other non design things -
78
+ * Better reviews and ratings functionality
79
+ * 100% MicroData. Rolled out RDFa completely
80
+ * and many other small but important things
81
+
82
+ Thanks [Nitin](http://profiles.wordpress.org/yawalkarm/ "Nitin Yawalkar") & Pratik for your major contributions
83
+
84
+ ******************** ******************** ********************
85
+ Next scheduled version will include -
86
+ - Even simpler, shorter, typographic and more beautiful design of MicroData box. May be like this https://moqups.com/brainstormforce/5P0EaLtt
87
+ - Redesigned admin panel
88
+ - Refined MicroData input options
89
+ - Support for more post types (Local Business, etc)
90
+ Cheers & Regards,
91
+ Sujay
92
+
93
+ == Frequently Asked Questions ==
94
+
95
+ = What is a Rich Snippet? =
96
+ It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
97
+ = How does a Rich Snippet help? =
98
+ - It gives search engines only the important & precise information to display in search result snippets.
99
+ - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
100
+ - [See what difference it makes](http://dashburst.com/google-search-what-are-rich-snippets/ "See the difference") in CTR (Click Through Rate)
101
+ - Helps you rank higher in search results
102
+ - Helps Facebook display proper information when users share your links on Facebook
103
+
104
+ = Which Content Types are Supported? =
105
+ This plugin currently supports almost all of the content types that are released by Schema.org at one place.
106
+ Review, Event, People, Product, Recipe, Software Application, Video, Articles etc.
107
+
108
+ == Screenshots ==
109
+ 1. Meta box in post-new under the editor screen.
110
+ 2. Select content type from dropdown
111
+ 3. Fill the details as much as you can
112
+ 4. Test the post or page URL in Google Rich Snippets Testing
113
+
114
+ == Changelog ==
115
+
116
+ = 1.3.0 =
117
+ * Improvement: Updated markup data to meet Google Structured data guidelines
118
+ * Fixed: WordPress 4.4 compatibility
119
+ * Fixed: Admin UI on small screens
120
+
121
+ = 1.2.0 =
122
+ * Improvement: WordPress 4.0 compatibility
123
+ * Fixed: Colorpicker breaking other plugins colorpicker settings.
124
+
125
+ = 1.1.9 =
126
+ * Fixed: Image uploading in meta issue resolved.
127
+ * Fixed: Compatibility with WordPress 3.9
128
+
129
+ = 1.1.8 =
130
+ * Fixed: CSS and JS now loads on the page / post where rich snippets are configured.
131
+
132
+ = 1.1.7 =
133
+ * Improvement: Added "Test Rich Snippets" menu in admin bar for testing rich snippets in Google Webmasters Tools
134
+ * Fixed: retina.js issue resolved
135
+ * Removed unnecessary code
136
+
137
+ = 1.1.6 =
138
+ * Improvement: Compatibility with WordPres 3.8
139
+ * Fixed: Admin CSS breaking tabs in WP 3.8
140
+ * Added - reference post url field in "contact developers" form on settings page
141
+
142
+ = 1.1.5 =
143
+ * Improvement: Replaced rating 'count' with 'votes' on products - as directed by Google
144
+ * Fixed: Article snippet not displaying accurate when snippet title is blank
145
+ * Fixed: Recipe string 'Published on' can be changed.
146
+
147
+ = 1.1.4 =
148
+ * Fixed: Illegal string offset `user_rating` Warning
149
+
150
+ = 1.1.3 =
151
+ * Improvement : Network Activation
152
+
153
+ = 1.1.2 =
154
+ * Fixed: Edit media functionality.
155
+
156
+ = 1.1.1 =
157
+ * Added: Article type
158
+ * Added: Compatibility with WooThemes Plugins and themes
159
+ * Added: New Media Manager for uploading images in metabox
160
+
161
+ = 1.1.0 =
162
+ * Added: Admin options
163
+ * Fixed: Ratings on recipe, products and software application
164
+ * Improvement: Admin options for customizing everything
165
+ * Improvement: New snippet box design with responsive layout
166
+
167
+ = 1.0.4 =
168
+ * Fixed: Rating on Comments
169
+ * Fixed: On deleting any deactivated plugin
170
+ * Fixed: Error message comming on commenting
171
+ * Fixed: On post save draft
172
+
173
+ = 1.0.3 =
174
+ * Clean up the code
175
+ * Fixed: Plugin activation error
176
+ * Fixed: Error on editing theme and plugin files.
177
+ * Removed : Breadcrumbs
178
+
179
+ = 1.0.2 =
180
+ * Added: RDFa Breadcrumbs Plugin is now a part of All in One Schema.org Rich Snippets !
181
+ * Added: Star rating and review for recipe
182
+ * Fized: Recipe type
183
+ * Fixed: Post update error
184
+
185
+ = 1.0.1 =
186
+ * Minor Bugs Fixes
187
+
188
+ = 1.0 =
189
+ * Initial Release.
190
+
191
+ == Upgrade Notice ==
192
  Note: Minor bug fixes. Update the plugin to enjoy bug free blogging!
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
settings.php CHANGED
@@ -21,8 +21,9 @@ function add_event_option()
21
  'event_location' => __('Location','rich-snippets'),
22
  // 'event_desc' => __('Description','rich-snippets'),
23
  'start_time' => __('Starting on','rich-snippets'),
24
- 'end_time' => __('Ending on','rich-snippets')
25
-
 
26
  // 'geo_location' => __('GEO Location','rich-snippets')
27
  );
28
  add_option('bsf_event',$event_opt);
@@ -77,10 +78,13 @@ function add_software_option()
77
  $software_opt = array(
78
  'snippet_title' => __('Summary','rich-snippets'),
79
  'software_rating' => __('Author Rating','rich-snippets'),
 
80
  'software_price' => __('Price','rich-snippets'),
81
  'software_name' => __('Software Name','rich-snippets'),
82
  'software_os' => __('Operating System','rich-snippets'),
83
- 'software_website' => __('Landing Page','rich-snippets')
 
 
84
  // 'software_desc' => __('Brief Description','rich-snippets')
85
  );
86
  add_option('bsf_software',$software_opt);
@@ -105,7 +109,10 @@ function add_article_option()
105
  'article_name' => __('Article Name','rich-snippets'),
106
  'article_author' => __('Author','rich-snippets'),
107
  'article_desc' => __('Description','rich-snippets'),
108
- 'article_image' => __('Image','rich-snippets')
 
 
 
109
  );
110
  add_option('bsf_article',$article_opt);
111
  }
21
  'event_location' => __('Location','rich-snippets'),
22
  // 'event_desc' => __('Description','rich-snippets'),
23
  'start_time' => __('Starting on','rich-snippets'),
24
+ 'end_time' => __('Ending on','rich-snippets'),
25
+ 'events_price' => __('Offer Price','rich-snippets')
26
+
27
  // 'geo_location' => __('GEO Location','rich-snippets')
28
  );
29
  add_option('bsf_event',$event_opt);
78
  $software_opt = array(
79
  'snippet_title' => __('Summary','rich-snippets'),
80
  'software_rating' => __('Author Rating','rich-snippets'),
81
+ 'software_agr' => __('Aggregate Rating','rich-snippets'),
82
  'software_price' => __('Price','rich-snippets'),
83
  'software_name' => __('Software Name','rich-snippets'),
84
  'software_os' => __('Operating System','rich-snippets'),
85
+ 'software_website' => __('Landing Page','rich-snippets'),
86
+
87
+
88
  // 'software_desc' => __('Brief Description','rich-snippets')
89
  );
90
  add_option('bsf_software',$software_opt);
109
  'article_name' => __('Article Name','rich-snippets'),
110
  'article_author' => __('Author','rich-snippets'),
111
  'article_desc' => __('Description','rich-snippets'),
112
+ 'article_image' => __('Image','rich-snippets'),
113
+ 'article_publisher' => __('Publisher Name','rich-snippets'),
114
+ 'article_publisher_logo' => __('Publisher Logo','rich-snippets')
115
+
116
  );
117
  add_option('bsf_article',$article_opt);
118
  }