Settings'; array_unshift($links, $settings_link); return $links; } function run_on_activate() { wp_enqueue_style('wp-pointer'); wp_enqueue_script('wp-pointer'); add_action('admin_print_footer_scripts', array( $this,'custom_print_footer_scripts') ); } function custom_print_footer_scripts(){ $pointer_content = '

Rich Snippets Installed !

'; $pointer_content .= '

Check out this panel to know more about "All in One Schema.org Rich Snippets".

'; ?> '. ''. ( $req ? '*' : '' ). '

'; $fields[ 'email' ] = '

'. ''. ( $req ? '*' : '' ). '

'; $fields[ 'url' ] = '

'. ''. '

'; $fields[ 'phone' ] = '

'. ''. '

'; return $fields; } function additional_fields () { global $post; $id = $post->ID; $type = get_post_meta($id, '_bsf_post_type', true); if($type == '7') { echo '
'; for( $i=1; $i <= 5; $i++ ) echo ''; echo'

'; echo '

'. ''. '

'; echo '

'; } } function save_comment_meta_data( $comment_id ) { if ( ( isset( $_POST['phone'] ) ) && ( $_POST['phone'] != '') ) $phone = wp_filter_nohtml_kses($_POST['phone']); add_comment_meta( $comment_id, 'phone', $phone ); if ( ( isset( $_POST['title'] ) ) && ( $_POST['title'] != '') ) $title = wp_filter_nohtml_kses($_POST['title']); add_comment_meta( $comment_id, 'title', $title ); if ( ( isset( $_POST['rating'] ) ) && ( $_POST['rating'] != '') ) $rating = wp_filter_nohtml_kses($_POST['rating']); add_comment_meta( $comment_id, 'rating', $rating ); } function verify_comment_meta_data( $commentdata ) { if ( ! isset( $_POST['rating'] ) ) wp_die( __( 'Error: You did not add your rating. Hit the BACK button of your Web browser and resubmit your comment with rating.' ) ); return $commentdata; } function extend_comment_edit_metafields( $comment_id ) { if( ! isset( $_POST['extend_comment_update'] ) || ! wp_verify_nonce( $_POST['extend_comment_update'], 'extend_comment_update' ) ) return; if ( ( isset( $_POST['phone'] ) ) && ( $_POST['phone'] != '') ) : $phone = wp_filter_nohtml_kses($_POST['phone']); update_comment_meta( $comment_id, 'phone', $phone ); else : delete_comment_meta( $comment_id, 'phone'); endif; if ( ( isset( $_POST['title'] ) ) && ( $_POST['title'] != '') ): $title = wp_filter_nohtml_kses($_POST['title']); update_comment_meta( $comment_id, 'title', $title ); else : delete_comment_meta( $comment_id, 'title'); endif; if ( ( isset( $_POST['rating'] ) ) && ( $_POST['rating'] != '') ): $rating = wp_filter_nohtml_kses($_POST['rating']); update_comment_meta( $comment_id, 'rating', $rating ); else : delete_comment_meta( $comment_id, 'rating'); endif; } function modify_comment( $text ){ $plugin_url_path = WP_PLUGIN_URL; if( $commenttitle = get_comment_meta( get_comment_ID(), 'title', true ) ) { $commenttitle = '' . esc_attr( $commenttitle ) . '
'; $text = $commenttitle . $text; } if( $commentrating = get_comment_meta( get_comment_ID(), 'rating', true ) ) { $commentrating = '


Rating: '. $commentrating .' / 5

'; $text = $text . $commentrating; return $text; } else { return $text; } } function rdfa_breadcrumb_settings() { //Settings page for RDFa Breadcrumb $opt = array( 'prefix' => '

', 'suffix' => '

', 'title' => __( ' ', 'rich-snippets' ), 'home_title' => __( 'Home', 'rich-snippets' ), 'separator' => '»', 'front_page' => false, 'show_blog' => false, 'singular_post_taxonomy'=> 'category', 'echo' => true ); add_option("rdfa_options",$opt); } } } require_once('functions.php'); require_once('rdfa-breadcrumbs.php'); add_filter( 'bsf_meta_boxes', 'bsf_metaboxes' ); // Instantiating the Class if (class_exists("RichSnippets")) { $RichSnippets= new RichSnippets(); } ?>