ID, "ta_post_review_rating", TRUE) == null) { return $content;} else { // Get the author name // @since 0.0.9.8 $author_id = $post->post_author; $user_info = get_userdata( $author_id ); $review_author = $user_info->first_name . ' ' . $user_info->last_name; $rating = $custom["ta_post_review_rating"][0]; $fb_rating = $rating; //$rating = $rating[0]; // commented this to enable half stars since 0.0.9.1 if(!empty($fb_rating)) { $fb_rating_star = $fb_rating * 20; // set options $box_width = $options['wpar_box_width']; // set rating box width if ($options['wpar_box_width'] != '') {$rating_box_width = $options['wpar_box_width'];} else {$rating_box_width = '300';} // set button color if ($options['wpar_drp_button_color'] != '') {$rating_box_btn_color = $options['wpar_drp_button_color'];} else {$rating_box_btn_color = 'orange';} // set rating box alignment if ($options['wpar_drp_box_align'] != '') { if ($options['wpar_drp_box_align'] == 'right') { $ta_box_align_class = "ta_box_right"; } if ($options['wpar_drp_box_align'] == 'left') { $ta_box_align_class = "ta_box_left"; } if ($options['wpar_drp_box_align'] == 'none') { $ta_box_align_class = "ta_box_align_none"; } } else { $ta_box_align_class = "ta_box_right"; // set to right as default } //----------------------------------------------------- // let's get the thing // @since 1.0.1.3 //----------------------------------------------------- $ar_thing_name = get_post_meta($post->ID, 'ta_post_review_name', TRUE); $ar_thing = '
'; $ar_thing .= ''; $ar_thing .= '
'; // things are good.... // let's do it........ // start our hReview main container div $before_box = '
'; $before_box .= '
'; $ar_thing_name = get_post_meta($post->ID, 'ta_post_review_name', TRUE); $before_box .= ''; $before_box .= '
'; // rating box start here $box = '
'; $box .= '
'; $box .= '
'; $box .= ''; $box .= '
'; $box .= '
'; // check review type field if (get_post_meta($post->ID, 'ta_post_review_type', TRUE) && get_post_meta($post->ID, 'ta_post_review_author', TRUE)) { $box .= '
' . get_post_meta($post->ID, 'ta_post_review_type', TRUE) . ':
'; } else { // use "Product" as a default if author only is used if (get_post_meta($post->ID, 'ta_post_review_author', TRUE)) $box .= '
Product by:
'; } // end of check review type field // check review url field if (get_post_meta($post->ID, 'ta_post_review_author', TRUE)) { $box .= '
'; $box .= '' . get_post_meta($post->ID, 'ta_post_review_author', TRUE) . ''; $box .= '
'; $box .= '
'; $box .= '
'; } // end of check review url field // check review version field if (get_post_meta($post->ID, 'ta_post_review_version', TRUE)) { $box .= '
Version:
'; $box .= '
' . get_post_meta($post->ID, 'ta_post_review_version', TRUE) .'
'; $box .= '
'; } // end of check review version field // check review version field if (get_post_meta($post->ID, 'ta_post_review_price', TRUE)) { $box .= '
Price:
'; $box .= '
' . get_post_meta($post->ID, 'ta_post_review_price', TRUE) .'
'; $box .= '
'; } // end of check review version field $box .= '

'; $box .= '
Reviewed by:
'; $box .= '
'; $box .= '
Rating:
'; $box .= '
'; $box .= '
'; $box .= ''; $box .= ''; $box .= ''; //$box .= ''; $box .= '
' . $rating . '
'; $box .= '
'; $box .= '
'; $box .= '
'; $box .= '
On '; $box .= '' . get_the_time(get_option('date_format')) . '
'; $box .= '
Last modified:'; $box .= ''; $box .= '' . get_the_modified_time(get_option('date_format')) . '
'; $box .= '
'; $box .= '

'; $box .= '

Summary:

'; $box .= '
'; $box .= '

' . str_replace("\n","
", get_post_meta($post->ID, 'ta_post_review_summary', TRUE)) . '

'; $box .= '
'; $box .= '
'; $box .= '
'; $box .= ''; $box .= '
'; $box .= '
'; $box .= '
'; $box .= '
'; // here ends our rating box /////////////////////////////////////////////////////// // now, let's decide whither to display the rating box // of simply hide it // in this case we will // add meta into the post ///////////////////////// $hideit = (isset($options['wpar_chk_rating_box_hide'])); if (!$hideit) { // show the full rating box $content = $before_box . $box . '
' . $ar_thing . $content . '
' . '
'; } else { // hide the rating box $content = $before_box.'
'.$box.'
'.$ar_thing.$content.'
'; } // display box below post $options = get_option('wpar_options'); // get options // display rating box below posts $wpar_rating_after_single_display = (isset($options['wpar_chk_rating_after_post_display'])); //if ($options['wpar_chk_rating_after_post_display'] !='') {$wpar_rating_after_single_display = $options['wpar_chk_rating_after_post_display'];} if ($wpar_rating_after_single_display) { $box_below = '
'; $box_below .= '
' . get_post_meta($post->ID, 'ta_post_review_summary', TRUE) . '
'; $box_below .= '
'; $box_below .= ''; $box_below .= '
'; $box_below .= '
'; $box_below .= '
'; $content .= $box_below; } } } } return $content; } //add +snippets to meta tags function ta_post_add_more_snippet() { global $wp; global $ta_post_cpt; if (is_single()) { global $post; $custom = get_post_custom(); if (!get_post_meta($post->ID, "ta_post_review_rating", TRUE) == null) { $rating = get_post_meta($post->ID, "ta_post_review_rating", TRUE); //$rating = $custom["ta_post_review_rating"][0]; $rating = $rating[0]; $image = get_post_meta($post->ID, 'thesis_post_image', $single = true); if (!$image) $image = ''; ?> "> // these are provided by commentluv, so no need to dusplicate them here for now. */ ?>

' . $content; } } } return $content; } // ------------------------------------------------------------------------------ // DISPLAY OPTIONS // ------------------------------------------------------------------------------ $options = get_option('wpar_options'); // get options // display rating stars on home page and archives $wpar_rating_home_display = (isset($options['wpar_chk_rating_home_display'])); if ($wpar_rating_home_display) { add_filter('the_content', 'ta_post_home_page_stars'); //display rating stars on home page full content add_filter('the_excerpt', 'ta_post_home_page_stars'); //display rating stars on home page excerpt } ?>