function geodir_reviewrating_navigations($tabs) { $total_readunread_reviews = ''; if (geodir_reviewrating_unread_reviews()) { $total_readunread_reviews = '<span id="unaproved_reviews">' . geodir_reviewrating_unread_reviews() . '</span>'; } $tabs['multirating_fields'] = array('label' => __('MultiRatings', GEODIRREVIEWRATING_TEXTDOMAIN), 'subtabs' => array(array('subtab' => 'geodir_multirating_options', 'label' => __('General', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_setting')), array('subtab' => 'geodir_rating_settings', 'label' => __('Overall Rating', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_overall_setting')), array('subtab' => 'geodir_rating_style', 'label' => __('Rating Styles', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_styles')), array('subtab' => 'geodir_create_rating', 'label' => __('Create Ratings', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_rating_category')), array('subtab' => 'geodir_manage_review', 'label' => __('Like / Unlike Icons', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_review_setting')))); $tabs['reviews_fields'] = array('label' => __('Reviews <span id="">' . $total_readunread_reviews . '</span>', GEODIRREVIEWRATING_TEXTDOMAIN), 'subtabs' => array(array('subtab' => 'all', 'label' => __('All (' . geodir_reviewrating_get_comments_count() . ')', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_setting')), array('subtab' => 'pending', 'label' => __('Pending (' . geodir_reviewrating_get_comments_count('pending') . ')', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_overall_setting')), array('subtab' => 'approved', 'label' => __('Approve (' . geodir_reviewrating_get_comments_count('approved') . ')', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_styles')), array('subtab' => 'spam', 'label' => __('Spam (' . geodir_reviewrating_get_comments_count('spam') . ')', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_rating_category')), array('subtab' => 'trash', 'label' => __('Trash (' . geodir_reviewrating_get_comments_count('trash') . ')', GEODIRREVIEWRATING_TEXTDOMAIN), 'form_action' => admin_url('admin-ajax.php?action=geodir_reviewrating_ajax&ajax_action=update_review_setting')))); return $tabs; }
/** * Adds Sub Tabs to the GD settings 'Reviews' main Tab. * * @since 1.0.0 * @package GeoDirectory_Review_Rating_Manager * * @param $seleted */ function geodir_reviewrating_show_tab_head($seleted) { ?> <dd id="geodir_reviewrating_listing" class="<?php if ($seleted == '') { echo 'gd-tab-active'; } ?> "> <a href="<?php echo admin_url('admin.php?page=geodirectory&tab=reviews_fields&subtab=all'); ?> "><?php _e('All', GEODIRREVIEWRATING_TEXTDOMAIN); echo ' (' . geodir_reviewrating_get_comments_count(), ')'; ?> </a> </dd> <dd id="geodir_reviewrating_listing" class="<?php if ($seleted == 'pending') { echo 'gd-tab-active'; } ?> "> <a href="<?php echo admin_url('admin.php?page=geodirectory&tab=reviews_fields&subtab=pending'); ?> "> <?php _e('Pending', GEODIRREVIEWRATING_TEXTDOMAIN); echo ' (' . geodir_reviewrating_get_comments_count('pending'), ')'; ?> </a> </dd> <dd id="geodir_reviewrating_listing" class="<?php if ($seleted == 'approved') { echo 'gd-tab-active'; } ?> "> <a href="<?php echo admin_url('admin.php?page=geodirectory&tab=reviews_fields&subtab=approved'); ?> "> <?php _e('Approve', GEODIRREVIEWRATING_TEXTDOMAIN); echo ' (' . geodir_reviewrating_get_comments_count('approved'), ')'; ?> </a> </dd> <dd id="geodir_reviewrating_listing" class="<?php if ($seleted == 'spam') { echo 'gd-tab-active'; } ?> "> <a href="<?php echo admin_url('admin.php?page=geodirectory&tab=reviews_fields&subtab=spam'); ?> "> <?php _e('Spam', GEODIRREVIEWRATING_TEXTDOMAIN); echo ' (' . geodir_reviewrating_get_comments_count('spam'), ')'; ?> </a> </dd> <dd id="geodir_reviewrating_listing" class="<?php if ($seleted == 'trash') { echo 'gd-tab-active'; } ?> "> <a href="<?php echo admin_url('admin.php?page=geodirectory&tab=reviews_fields&subtab=trash'); ?> "> <?php _e('Trash', GEODIRREVIEWRATING_TEXTDOMAIN); echo ' (' . geodir_reviewrating_get_comments_count('trash'), ')'; ?> </a> </dd> <?php }