?> <th scope="col"><?php _e("Comment Integration", "gd-star-rating"); ?> </th> <?php } ?> </tr> </thead> <tbody> <?php $tr_class = ""; $multi_sets = GDSRDBMulti::get_multis_tinymce(); $post_types = gdsr_get_public_post_types(); $multis = array(); foreach ($multi_sets as $ms) { $multis[$ms->folder] = $ms->name; } foreach ($rows as $row) { $row = gdsrAdmDB::convert_row($row, $multis); $moderate_articles = $moderate_comments = ""; if ($options["moderation_active"] == 1) { $moderate_articles = gdsrAdmDB::get_moderation_count($row->pid); $moderate_comments = gdsrAdmDB::get_moderation_count_joined($row->pid); $recc_moderate_articles = gdsrAdmDB::get_moderation_count($row->pid, "artthumb"); $recc_moderate_comments = gdsrAdmDB::get_moderation_count_joined($row->pid, "artthumb"); if ($moderate_articles == 0) { $moderate_articles = "[ 0 ] "; } else {
function get_combo_post_types($selected = "0", $name = "gdsr_postype") { $ptypes = gdsr_get_public_post_types(); ?> <select name="<?php echo $name; ?> "> <option <?php if ($selected == "0") { echo ' selected="selected"'; } ?> value='0'><?php _e("Show all post types", "gd-star-rating"); ?> </option> <?php foreach ($ptypes as $t => $p) { $default = $t == $selected ? ' selected="selected"' : ''; echo "<option{$default} value='{$t}'>{$p}</option>\n"; } ?> </select><?php }
function form($instance) { global $gdsr; $instance = wp_parse_args((array) $instance, $gdsr->default_widget); $custom_post_types = gdsr_get_public_post_types(); $select_post_types = gdsr_widget_convert_select($instance); $wptr = $gdsr->g->trend; $wpst = $gdsr->g->stars; $wptt = $gdsr->g->thumbs; $wpvr = $gdsr->wp_version; $wpml = GDSRDBMulti::get_multis_tinymce(); echo '<div class="gdsr-widget-controls">'; include STARRATING_PATH . 'widgets/rating_28/part_basic.php'; include STARRATING_PATH . 'widgets/rating_28/part_trend.php'; include STARRATING_PATH . 'widgets/rating_28/part_filter.php'; include STARRATING_PATH . 'widgets/rating_28/part_image.php'; include STARRATING_PATH . 'widgets/rating_28/part_stars.php'; echo '</div>'; }
?> </small></em> </td> <td class="gdsrright"> <select id="srSelect" name="srSelect" style="width: 130px;<?php echo $gdsr_tinymce ? ' height: 40px' : 'height: 64px'; ?> "<?php if ($wpv > 29) { echo ' multiple'; } ?> > <?php if ($wpv > 29) { $custom_post_types = gdsr_get_public_post_types(); ?> <?php foreach ($custom_post_types as $cp_name => $cp_label) { echo '<option value="' . $cp_name . '">' . $cp_label . '</option>'; } ?> <?php } else { ?> <option value="postpage"><?php _e("Posts And Pages", "gd-star-rating"); ?> </option> <option value="post"><?php _e("Posts Only", "gd-star-rating");