şeklinde yani her değerlendirme seçimi için değil 2 tane değerlendirme seçiminde bir aşağıya inecek. Yardımcı olursanız sevinirim.
<?php
/** * Shortcode function for displaying the rating form. This function can also be called explicitly * * e.g. [displayRatingForm post_id="1"] */ function display_rating_form( $atts = null) { extract( shortcode_atts( array( 'post_id' => null, 'title' => 'Hastaneyi Değerlendirin', 'before_title' => '<h4>', 'after_title' => '</h4>' ), $atts ) );
global $wpdb; global $post;
if (!isset($post_id) && isset($post)) { $post_id = $post->ID; } else if (!isset($post) && !isset($post_id)) { return '<p class="error">No post ID available to display multi rating form</p>'; }
// get table data $query = "SELECT * FROM ".$wpdb->prefix.Multi_Rating::RATING_ITEM_TBL_NAME; $rows = $wpdb->get_results($query);
/** * Shortcode function for displaying the rating result * * e.g. [displayRatingResult post_id=1] * * @param unknown_type $atts */ function display_rating_result( $atts = null ) { extract( shortcode_atts( array( 'post_id' => null, 'show_no_result_text' => true ), $atts ) );
global $wpdb; global $post;
// Use post id from the loop if not passed if (!isset($post_id) && isset($post)) { $post_id = $post->ID; } else if (!isset($post) && !isset($post_id)) { return '<p class="error">No post ID available to display multi rating form</p>'; }
// get the current rating items that we need to check $post_type = get_post_type( $post );
/** * Shortcode function for displaying the rating form. This function can also be called explicitly * * e.g. [displayRatingForm post_id="1"] */ function display_rating_form( $atts = null) { extract( shortcode_atts( array( 'post_id' => null, 'title' => 'Hastaneyi Değerlendirin', 'before_title' => '<h4>', 'after_title' => '</h4>' ), $atts ) );
global $wpdb; global $post;
if (!isset($post_id) && isset($post)) { $post_id = $post->ID; } else if (!isset($post) && !isset($post_id)) { return '<p class="error">No post ID available to display multi rating form</p>'; }
// get table data $query = "SELECT * FROM ".$wpdb->prefix.Multi_Rating::RATING_ITEM_TBL_NAME; $rows = $wpdb->get_results($query);
/** * Shortcode function for displaying the rating result * * e.g. [displayRatingResult post_id=1] * * @param unknown_type $atts */ function display_rating_result( $atts = null ) { extract( shortcode_atts( array( 'post_id' => null, 'show_no_result_text' => true ), $atts ) );
global $wpdb; global $post;
// Use post id from the loop if not passed if (!isset($post_id) && isset($post)) { $post_id = $post->ID; } else if (!isset($post) && !isset($post_id)) { return '<p class="error">No post ID available to display multi rating form</p>'; }
// get the current rating items that we need to check $post_type = get_post_type( $post );