All In One Schema Rich Snippets - Version 1.0.4

Version Description

  • Bug Fix - Rating on Comments
  • Bug Fix - On deleting any deactivated plugin
  • Bug Fix - Error message comming on commenting
  • Bug Fix - On post save draft
Download this release

Release Info

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

Code changes from version 1.0.3 to 1.0.4

Files changed (3) hide show
  1. functions.php +3 -3
  2. index.php +4 -23
  3. readme.txt +9 -2
functions.php CHANGED
@@ -327,11 +327,11 @@ add_filter('the_content','display_rich_snippet');
327
  require_once('meta-boxes.php');
328
 
329
  function enque() {
330
- wp_enqueue_style('rating.css', plugin_dir_url(__FILE__) . 'css/jquery.rating.css');
331
  wp_enqueue_script('jquery');
332
- wp_enqueue_script('jquery.rating', plugin_dir_url(__FILE__) . 'js/jquery.rating.min.js', array('jquery'));
333
  }
334
- add_action('init', 'enque');
335
 
336
  function display_rating() {
337
  $rating .= '<br/><strong>Your Rating:</strong><div class="star-blocks">';
327
  require_once('meta-boxes.php');
328
 
329
  function enque() {
330
+ wp_enqueue_style('rating_style', plugin_dir_url(__FILE__) . 'css/jquery.rating.css');
331
  wp_enqueue_script('jquery');
332
+ wp_enqueue_script('jquery_rating', plugin_dir_url(__FILE__) . 'js/jquery.rating.min.js', array('jquery'));
333
  }
334
+ add_action('wp_enqueue_scripts', 'enque');
335
 
336
  function display_rating() {
337
  $rating .= '<br/><strong>Your Rating:</strong><div class="star-blocks">';
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: All In One Schema.org Rich Snippets
4
  Plugin URI: http://www.brainstormforce.com
5
  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.
6
- Version: 1.0.3
7
  Author: Brainstorm Force
8
  Author URI: http://www.brainstormforce.com
9
  License: GPL2
@@ -65,11 +65,8 @@ if ( !class_exists( "RichSnippets" ) )
65
  // Save the comment meta data along with comment
66
 
67
  add_action( 'comment_post', array( $this,'save_comment_meta_data' ));
68
- // Add the filter to check if the comment meta data has been filled or not
69
-
70
- add_filter( 'preprocess_comment', array( $this,'verify_comment_meta_data' ));
71
- //Add an edit option in comment edit screen
72
 
 
73
  add_action( 'edit_comment', array( $this,'extend_comment_edit_metafields' ));
74
 
75
  // Add the comment meta (saved earlier) to the comment text
@@ -205,11 +202,7 @@ if ( !class_exists( "RichSnippets" ) )
205
  echo '<p class="comment-form-rating">';
206
  }
207
  }
208
- function save_comment_meta_data( $comment_id ) {
209
- if ( ( isset( $_POST['phone'] ) ) && ( $_POST['phone'] != '') )
210
- $phone = wp_filter_nohtml_kses($_POST['phone']);
211
- add_comment_meta( $comment_id, 'phone', $phone );
212
-
213
  if ( ( isset( $_POST['title'] ) ) && ( $_POST['title'] != '') )
214
  $title = wp_filter_nohtml_kses($_POST['title']);
215
  add_comment_meta( $comment_id, 'title', $title );
@@ -218,21 +211,9 @@ if ( !class_exists( "RichSnippets" ) )
218
  $rating = wp_filter_nohtml_kses($_POST['rating']);
219
  add_comment_meta( $comment_id, 'rating', $rating );
220
  }
221
- function verify_comment_meta_data( $commentdata ) {
222
- if ( ! isset( $_POST['rating'] ) )
223
- wp_die( __( 'Error: You did not add your rating. Hit the BACK button of your Web browser and resubmit your comment with rating.' ) );
224
- return $commentdata;
225
- }
226
  function extend_comment_edit_metafields( $comment_id ) {
227
  if( ! isset( $_POST['extend_comment_update'] ) || ! wp_verify_nonce( $_POST['extend_comment_update'], 'extend_comment_update' ) ) return;
228
-
229
- if ( ( isset( $_POST['phone'] ) ) && ( $_POST['phone'] != '') ) :
230
- $phone = wp_filter_nohtml_kses($_POST['phone']);
231
- update_comment_meta( $comment_id, 'phone', $phone );
232
- else :
233
- delete_comment_meta( $comment_id, 'phone');
234
- endif;
235
-
236
  if ( ( isset( $_POST['title'] ) ) && ( $_POST['title'] != '') ):
237
  $title = wp_filter_nohtml_kses($_POST['title']);
238
  update_comment_meta( $comment_id, 'title', $title );
3
  Plugin Name: All In One Schema.org Rich Snippets
4
  Plugin URI: http://www.brainstormforce.com
5
  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.
6
+ Version: 1.0.4
7
  Author: Brainstorm Force
8
  Author URI: http://www.brainstormforce.com
9
  License: GPL2
65
  // Save the comment meta data along with comment
66
 
67
  add_action( 'comment_post', array( $this,'save_comment_meta_data' ));
 
 
 
 
68
 
69
+ //Add an edit option in comment edit screen
70
  add_action( 'edit_comment', array( $this,'extend_comment_edit_metafields' ));
71
 
72
  // Add the comment meta (saved earlier) to the comment text
202
  echo '<p class="comment-form-rating">';
203
  }
204
  }
205
+ function save_comment_meta_data( $comment_id ) {
 
 
 
 
206
  if ( ( isset( $_POST['title'] ) ) && ( $_POST['title'] != '') )
207
  $title = wp_filter_nohtml_kses($_POST['title']);
208
  add_comment_meta( $comment_id, 'title', $title );
211
  $rating = wp_filter_nohtml_kses($_POST['rating']);
212
  add_comment_meta( $comment_id, 'rating', $rating );
213
  }
 
 
 
 
 
214
  function extend_comment_edit_metafields( $comment_id ) {
215
  if( ! isset( $_POST['extend_comment_update'] ) || ! wp_verify_nonce( $_POST['extend_comment_update'], 'extend_comment_update' ) ) return;
216
+
 
 
 
 
 
 
 
217
  if ( ( isset( $_POST['title'] ) ) && ( $_POST['title'] != '') ):
218
  $title = wp_filter_nohtml_kses($_POST['title']);
219
  update_comment_meta( $comment_id, 'title', $title );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.brainstormforce.com
4
  Tags: Review, Event, Organization, People, Product, Recipe, Software Application, Video, rdfa, rich snippet, schema.org, schema, microdata, microformat, SERP, Google, Yahoo, Bing
5
  Requires at least: 3.0
6
  Tested up to: 3.5.1
7
- Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -84,6 +84,13 @@ Review, Event, Organization, People, Product, Recipe, Software Application, Vide
84
  4. Test the post or page URL in Google Rich Snippets Testing
85
 
86
  == Changelog ==
 
 
 
 
 
 
 
87
  = 1.0.3 =
88
  * Clean up the code
89
  * Bug fix on plugin activation
@@ -103,4 +110,4 @@ Review, Event, Organization, People, Product, Recipe, Software Application, Vide
103
  * Initial Release.
104
 
105
  == Upgrade Notice ==
106
- Note: This is a security release. Please update your plugin immediately to keep your WordPress secure.
4
  Tags: Review, Event, Organization, People, Product, Recipe, Software Application, Video, rdfa, rich snippet, schema.org, schema, microdata, microformat, SERP, Google, Yahoo, Bing
5
  Requires at least: 3.0
6
  Tested up to: 3.5.1
7
+ Stable tag: 1.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
84
  4. Test the post or page URL in Google Rich Snippets Testing
85
 
86
  == Changelog ==
87
+
88
+ = 1.0.4 =
89
+ * Bug Fix - Rating on Comments
90
+ * Bug Fix - On deleting any deactivated plugin
91
+ * Bug Fix - Error message comming on commenting
92
+ * Bug Fix - On post save draft
93
+
94
  = 1.0.3 =
95
  * Clean up the code
96
  * Bug fix on plugin activation
110
  * Initial Release.
111
 
112
  == Upgrade Notice ==
113
+ Note: Major bug fixes are included. Please update your plugin immediately to keep your WordPress secure.