Plugin Directory

Changeset 3431049


Ignore:
Timestamp:
01/02/2026 01:09:24 PM (7 weeks ago)
Author:
wbcomdesigns
Message:

Updated version

Location:
review-buddypress-groups
Files:
132 added
16 edited

Legend:

Unmodified
Added
Removed
  • review-buddypress-groups/trunk/admin/assets/js/min/bgr-admin.min.js

    r3430846 r3431049  
    1 function BGRGetBGRDynamicTextBox(value){return'<span class="move-icons">&equiv;</span><input name="BGRDynamicTextBox" class="draggable" type="text" value="'+value+'" /><input type="button" value="Remove" class="remove button button-secondary bgr-remove" /><label class="wb-switch"><input type="checkbox" class="bgr-criteria-state" name="bgr-criteria-state" data-attr="" checked="checked" ><div class="wb-slider wb-round"></div></label>'}jQuery.noConflict(),jQuery(document).ready(function(){jQuery("#bgr-settings-updated").hide(),jQuery(document).on("click",".notice-dismiss",function(){jQuery(this).closest(".notice").fadeOut()}),jQuery("#bgr-exclude-group-review").selectize({placeholder:"Select groups",plugins:["remove_button"]}),jQuery(document).on("click","#bgr-save-admin-criteria-settings",function(){jQuery(this).addClass("bgr-btn-ajax"),jQuery(".bgr-admin-criteria-settings-spinner").show();var field_values=[],criteria=[];jQuery("input[name=BGRDynamicTextBox]").each(function(){var criteria_val;""!=jQuery(this).val().trim()&&(criteria_val=jQuery(this).val(),field_values.push(criteria_val),jQuery(this).siblings(".wb-switch").children(".bgr-criteria-state").attr("data-attr",criteria_val))}),jQuery(".bgr-criteria-state").each(function(){var criteriaAttr;""!=jQuery(this).val().trim()&&jQuery(this).is(":checked")&&(criteriaAttr=jQuery(this).attr("data-attr"),criteria.push(criteriaAttr))}),jQuery.post(ajaxurl,{action:"bp_group_review_save_admin_criteria_settings",nonce:bgr_admin_js.wbcom_nonce,field_values:field_values,active_criterias:criteria},function(response){"admin-criteria-settings-saved"===response&&(location.reload(),jQuery("#bgr-settings-updated").show(),jQuery("#bgr-save-admin-criteria-settings").removeClass("bgr-btn-ajax"),jQuery(".bgr-admin-criteria-settings-spinner").hide())})}),jQuery(document).on("click","#bgr-save-admin-general-settings",function(){jQuery(this).addClass("bgr-btn-ajax"),jQuery(".bgr-admin-general-settings-spinner").show();var exclude_groups=jQuery("#bgr-exclude-group-review").val(),bgr_multi_reviews=jQuery("#bgr-multi-reviews").is(":checked")?"yes":"no",bgr_auto_approve_reviews=jQuery("#bgr-auto-approve-reviews").is(":checked")?"yes":"no",reviews_per_page=jQuery("#reviews_per_page").val(),bgr_allow_notification=jQuery("#bgr-notification").is(":checked")?"yes":"no",bgr_allow_activity=jQuery("#bgr-activity").is(":checked")?"yes":"no";jQuery.post(ajaxurl,{action:"bp_group_review_save_admin_general_settings",nonce:bgr_admin_js.wbcom_nonce,multi_reviews:bgr_multi_reviews,bgr_auto_approve_reviews:bgr_auto_approve_reviews,reviews_per_page:reviews_per_page,allow_notification:bgr_allow_notification,allow_activity:bgr_allow_activity,exclude_groups:exclude_groups},function(response){"admin-general-settings-saved"===response&&(jQuery("#bgr-settings-updated").show(),jQuery("#bgr-save-admin-general-settings").removeClass("bgr-btn-ajax"),jQuery(".bgr-admin-general-settings-spinner").hide())})}),jQuery(document).on("click","#bgr-save-admin-display-settings",function(){jQuery(this).addClass("bgr-btn-ajax"),jQuery(".bgr-admin-display-settings-spinner").show();var review_label=jQuery("#bgrReviewLabel").val(),manage_review_label=jQuery("#bgrManageReviewLabel").val(),bgr_rating_color=jQuery("#bgr-rating-color").val();jQuery.post(ajaxurl,{action:"bp_group_review_save_admin_display_settings",nonce:bgr_admin_js.wbcom_nonce,review_label:review_label,manage_review_label:manage_review_label,bgr_rating_color:bgr_rating_color},function(response){"admin-display-settings-saved"===response&&(jQuery("#bgr-settings-updated").show(),jQuery("#bgr-save-admin-display-settings").removeClass("bgr-btn-ajax"),jQuery(".bgr-admin-display-settings-spinner").hide())})}),jQuery("#bgr-field-add").bind("click",function(){var div=jQuery("<div class='rating-review-div' />");div.html(BGRGetBGRDynamicTextBox("")),jQuery("#bgr-textbox-container").append(div).addClass("ui-sortable-handle")}),jQuery("body").on("click",".remove",function(){jQuery(this).closest("div").remove()}),jQuery(document).on("click",".bgr-faq-accordion",function(){"block"===jQuery(this).next().css("display")?(jQuery(".bgr-faq-panel").slideUp(500),jQuery(".bgr-faq-accordion").removeClass("bgr-faq-accordion-active")):(jQuery(".bgr-faq-panel").hide(),jQuery(".bgr-faq-accordion").removeClass("bgr-faq-accordion-active"),jQuery(this).next().slideDown(500),jQuery(this).addClass("bgr-faq-accordion-active"))}),jQuery("#bgr-textbox-container").sortable(),jQuery("#bgr-textbox-container").disableSelection();for(var acc=document.getElementsByClassName("bgr-accordion"),i=0;i<acc.length;i++)acc[i].onclick=function(){this.classList.toggle("active");var panel=this.nextElementSibling;panel.style.maxHeight?panel.style.maxHeight=null:panel.style.maxHeight=panel.scrollHeight+"px"};jQuery(document).on("click",".bgr-accordion",function(){return!1}),jQuery(document).on("change","#bgr-email",function(){1==jQuery(this).prop("checked")?jQuery(".review-email-section").show():jQuery(".review-email-section").hide()}),jQuery(document).on("click",".bgr-approve-review",function(){var review_id=jQuery(this).data("rid");jQuery(this).html("Approving.."),jQuery.post(ajaxurl,{action:"bp_group_review_admin_approve_review",review_id:review_id,nonce:bgr_admin_js.wbcom_nonce},function(response){"review-approved-successfully"===response&&(window.location.href=window.location.href)})}),jQuery(document).on("click",".bgr-deny-review",function(){var review_id=jQuery(this).data("rid");confirm("Are you sure you want to deny this review? It will be moved to trash.")&&(jQuery(this).html("Denying.."),jQuery.post(ajaxurl,{action:"bp_group_review_admin_deny_review",review_id:review_id,nonce:bgr_admin_js.wbcom_nonce},function(response){"review-denied-successfully"===response&&(window.location.href=window.location.href)}))})});
     1function BGRGetBGRDynamicTextBox(value){return'<span class="move-icons">&equiv;</span><input name="BGRDynamicTextBox" class="draggable" type="text" value="'+value+'" /><input type="button" value="Remove" class="remove button button-secondary bgr-remove" /><label class="wb-switch"><input type="checkbox" class="bgr-criteria-state" name="bgr-criteria-state" data-attr="" checked="checked" ><div class="wb-slider wb-round"></div></label>'}jQuery.noConflict(),jQuery(document).ready(function(){jQuery("#bgr-settings-updated").hide(),jQuery(document).on("click",".notice-dismiss",function(){jQuery(this).closest(".notice").fadeOut()}),jQuery("#bgr-exclude-group-review").selectize({placeholder:"Select groups",plugins:["remove_button"]}),jQuery(document).on("click","#bgr-save-admin-criteria-settings",function(){jQuery(this).addClass("bgr-btn-ajax"),jQuery(".bgr-admin-criteria-settings-spinner").show();var field_values=[],criteria=[];jQuery("input[name=BGRDynamicTextBox]").each(function(){var criteria_val;""!=jQuery(this).val().trim()&&(criteria_val=jQuery(this).val(),field_values.push(criteria_val),jQuery(this).siblings(".wb-switch").children(".bgr-criteria-state").attr("data-attr",criteria_val))}),jQuery(".bgr-criteria-state").each(function(){var criteriaAttr;""!=jQuery(this).val().trim()&&jQuery(this).is(":checked")&&(criteriaAttr=jQuery(this).attr("data-attr"),criteria.push(criteriaAttr))}),jQuery.post(ajaxurl,{action:"bp_group_review_save_admin_criteria_settings",nonce:bgr_admin_js.wbcom_nonce,field_values:field_values,active_criterias:criteria},function(response){"admin-criteria-settings-saved"===response&&(location.reload(),jQuery("#bgr-settings-updated").show(),jQuery("#bgr-save-admin-criteria-settings").removeClass("bgr-btn-ajax"),jQuery(".bgr-admin-criteria-settings-spinner").hide())})}),jQuery(document).on("click","#bgr-save-admin-general-settings",function(){jQuery(this).addClass("bgr-btn-ajax"),jQuery(".bgr-admin-general-settings-spinner").show();var exclude_groups=jQuery("#bgr-exclude-group-review").val(),bgr_multi_reviews=jQuery("#bgr-multi-reviews").is(":checked")?"yes":"no",bgr_auto_approve_reviews=jQuery("#bgr-auto-approve-reviews").is(":checked")?"yes":"no",reviews_per_page=jQuery("#reviews_per_page").val(),bgr_allow_notification=jQuery("#bgr-notification").is(":checked")?"yes":"no",bgr_allow_activity=jQuery("#bgr-activity").is(":checked")?"yes":"no",bgr_enable_group_criteria=jQuery("#bgr-enable-group-criteria").is(":checked")?"yes":"no";jQuery.post(ajaxurl,{action:"bp_group_review_save_admin_general_settings",nonce:bgr_admin_js.wbcom_nonce,multi_reviews:bgr_multi_reviews,bgr_auto_approve_reviews:bgr_auto_approve_reviews,reviews_per_page:reviews_per_page,allow_notification:bgr_allow_notification,allow_activity:bgr_allow_activity,exclude_groups:exclude_groups,enable_group_criteria:bgr_enable_group_criteria},function(response){"admin-general-settings-saved"===response&&(jQuery("#bgr-settings-updated").show(),jQuery("#bgr-save-admin-general-settings").removeClass("bgr-btn-ajax"),jQuery(".bgr-admin-general-settings-spinner").hide())})}),jQuery(document).on("click","#bgr-save-admin-display-settings",function(){jQuery(this).addClass("bgr-btn-ajax"),jQuery(".bgr-admin-display-settings-spinner").show();var review_label=jQuery("#bgrReviewLabel").val(),manage_review_label=jQuery("#bgrManageReviewLabel").val(),bgr_rating_color=jQuery("#bgr-rating-color").val();jQuery.post(ajaxurl,{action:"bp_group_review_save_admin_display_settings",nonce:bgr_admin_js.wbcom_nonce,review_label:review_label,manage_review_label:manage_review_label,bgr_rating_color:bgr_rating_color},function(response){"admin-display-settings-saved"===response&&(jQuery("#bgr-settings-updated").show(),jQuery("#bgr-save-admin-display-settings").removeClass("bgr-btn-ajax"),jQuery(".bgr-admin-display-settings-spinner").hide())})}),jQuery("#bgr-field-add").bind("click",function(){var div=jQuery("<div class='rating-review-div' />");div.html(BGRGetBGRDynamicTextBox("")),jQuery("#bgr-textbox-container").append(div).addClass("ui-sortable-handle")}),jQuery("body").on("click",".remove",function(){jQuery(this).closest("div").remove()}),jQuery(document).on("click",".bgr-faq-accordion",function(){"block"===jQuery(this).next().css("display")?(jQuery(".bgr-faq-panel").slideUp(500),jQuery(".bgr-faq-accordion").removeClass("bgr-faq-accordion-active")):(jQuery(".bgr-faq-panel").hide(),jQuery(".bgr-faq-accordion").removeClass("bgr-faq-accordion-active"),jQuery(this).next().slideDown(500),jQuery(this).addClass("bgr-faq-accordion-active"))}),jQuery("#bgr-textbox-container").sortable(),jQuery("#bgr-textbox-container").disableSelection();for(var acc=document.getElementsByClassName("bgr-accordion"),i=0;i<acc.length;i++)acc[i].onclick=function(){this.classList.toggle("active");var panel=this.nextElementSibling;panel.style.maxHeight?panel.style.maxHeight=null:panel.style.maxHeight=panel.scrollHeight+"px"};jQuery(document).on("click",".bgr-accordion",function(){return!1}),jQuery(document).on("change","#bgr-email",function(){1==jQuery(this).prop("checked")?jQuery(".review-email-section").show():jQuery(".review-email-section").hide()}),jQuery(document).on("click",".bgr-approve-review",function(){var review_id=jQuery(this).data("rid");jQuery(this).html("Approving.."),jQuery.post(ajaxurl,{action:"bp_group_review_admin_approve_review",review_id:review_id,nonce:bgr_admin_js.wbcom_nonce},function(response){"review-approved-successfully"===response&&(window.location.href=window.location.href)})}),jQuery(document).on("click",".bgr-deny-review",function(){var review_id=jQuery(this).data("rid");confirm("Are you sure you want to deny this review? It will be moved to trash.")&&(jQuery(this).html("Denying.."),jQuery.post(ajaxurl,{action:"bp_group_review_admin_deny_review",review_id:review_id,nonce:bgr_admin_js.wbcom_nonce},function(response){"review-denied-successfully"===response&&(window.location.href=window.location.href)}))})});
  • review-buddypress-groups/trunk/admin/review-admin-options-page.php

    r3430846 r3431049  
    300300                        </label>
    301301                    <?php } ?>
     302                </div>
     303            </div>
     304            <div class="bgr-row wbcom-settings-section-wrap">
     305                <div class="wbcom-settings-section-options-heading">
     306                    <label><?php esc_html_e( 'Enable Group-Level Criteria', 'bp-group-reviews' ); ?></label>
     307                    <p class="description"><?php esc_html_e( 'Allow group admins to customize review criteria for their specific groups.', 'bp-group-reviews' ); ?></p>
     308                </div>
     309                <div class="wbcom-settings-section-options">
     310                    <label class="wb-switch" for="bgr-enable-group-criteria">
     311                        <input type="checkbox" id="bgr-enable-group-criteria"
     312                        <?php
     313                        $enable_group_criteria = isset( $bgr['enable_group_criteria'] ) ? $bgr['enable_group_criteria'] : 'no';
     314                        if ( 'yes' === $enable_group_criteria ) {
     315                            echo 'checked="checked"'; }
     316                        ?>
     317                        >
     318                        <div class="wb-slider wb-round"></div>
     319                    </label>
    302320                </div>
    303321            </div>
  • review-buddypress-groups/trunk/assets/js/min/bgr-front.min.js

    r3430846 r3431049  
    1 jQuery(document).ready(function(e){jQuery("#manage-"+bgr_front_js_object.review_label).addClass("manage-review");var review_label=bgr_front_js_object.review_label;"yes"==bgr_front_js_object.check_group_admin&&"yes"!=bgr_front_js_object.auto_approve_reviews||jQuery("#"+review_label+"-management").hide(),"true"==bgr_front_js_object.exclude_groups&&(jQuery("#nav-add-feedback").hide(),jQuery("#nav-add-"+review_label+"-groups-li").hide(),jQuery("#nav-manage-"+review_label+"-groups-li").hide(),jQuery("#manage-"+review_label).parent().hide()),jQuery("#bgr_review_success_msg_modal").hide(),jQuery("#request-review-list #bp-group-edit-add-review-submit").hide(),jQuery(document).on("click","#add-review",function(){jQuery("#bgr-add-review-modal").css("display","block")}),jQuery(document).on("click","#groupbutton-85 a",function(e){var show_content=jQuery(this).attr("show");localStorage.setItem("bgr_show_form",show_content)}),jQuery(document).on("click","#add-review-no-popup",function(){jQuery(".bgr-group-review-no-popup-add-block").slideToggle()}),jQuery(document).on("click",".accept-button",function(){var accept_review_id=jQuery(this).next().val(),accept_gid=jQuery(this).attr("data-group-type");jQuery.post(ajaxurl,{action:"bp_group_review_accept_review",nonce:bgr_front_js_object.wbcom_nonce,accept_review_id:accept_review_id,group_id:accept_gid},function(response){location.reload()})}),jQuery(document).on("click",".deny-button",function(){var deny_review_id=jQuery(this).next().val(),deny_gid=jQuery(this).attr("data-group-type");jQuery.post(ajaxurl,{action:"bp_group_review_deny_review",nonce:bgr_front_js_object.wbcom_nonce,deny_review_id:deny_review_id,group_id:deny_gid},function(response){location.reload()})}),jQuery(document).on("click",".remove-review-button",function(){var remove_review_id=jQuery(this).next().val();jQuery.post(ajaxurl,{action:"bp_group_remove_review",nonce:bgr_front_js_object.wbcom_nonce,remove_review_id:remove_review_id},function(response){location.reload()})}),jQuery("#form-group-id").on("change",function(){jQuery(this).siblings(".bgr-error-fields").hide()}),jQuery('textarea[name*= "review-desc"]').on("keydown",function(){jQuery(this).siblings(".bgr-error-fields").hide()}),jQuery(".bgr-stars").on("click",function(){jQuery(this).parent().next(".bgr-error-fields").hide()}),jQuery(document).on("click",".expand-review-des",function(){"block"===jQuery(this).parent().children(".review-full-description").css("display")?(jQuery(".review-full-description").slideUp(500),jQuery(this).parent().children(".review-excerpt").slideDown(500),jQuery(this).text(bgr_front_js_object.view_more_text)):(jQuery(".review-full-description").hide(),jQuery(".review-excerpt").show(),jQuery(".review-full-description").next().text("View More.."),jQuery(this).parent().children(".review-excerpt").slideUp(500),jQuery(this).parent().children(".review-full-description").slideDown(500),jQuery(this).text(bgr_front_js_object.view_less_text))}),jQuery("#bgr-add-review-form").submit(function(e){e.preventDefault();var rating_exist=[],e=jQuery("#form-group-id",this).val(),bgr_review_desc=jQuery('textarea[name*= "review-desc"]',this).val(),rating_field_counter=jQuery(this).children().find("#rating_field_counter").val();jQuery(".bgr_mrating",this).each(function(){var rate_val=jQuery(this).val();0<rate_val?0:jQuery(this).parent().next(".bgr-error-fields").show(),rating_exist.push(rate_val)}),0<rating_field_counter?""==e?jQuery("#form-group-id",this).siblings(".bgr-error-fields").show():-1==jQuery.inArray("0",rating_exist)&&jQuery.post(ajaxurl,{action:"bp_group_submit_review",nonce:bgr_front_js_object.wbcom_nonce,data:jQuery(this).serialize()},function(response){jQuery(".bgr-bp-success p").html(response).css("display","block"),jQuery(".bgr-bp-success").fadeIn(),jQuery(".bgr-group-review-no-popup-add-block").hide(),jQuery("#bgr-add-review-modal").hide(),jQuery("#bgr-message").html(response),jQuery("#bgr-message").css("display","block");var date=new Date;date.setTime(date.getTime()+2e4),jQuery.cookie("res_content",response,{expires:date})}):""==e||""==bgr_review_desc?(""==e&&jQuery("#form-group-id",this).siblings(".bgr-error-fields ").show(),""==bgr_review_desc&&jQuery('textarea[name*= "review-desc"]',this).siblings(".bgr-error-fields ").show()):jQuery.post(ajaxurl,{action:"bp_group_submit_review",nonce:bgr_front_js_object.wbcom_nonce,data:jQuery(this).serialize()},function(response){jQuery(".bgr-bp-success p").html(response).css("display","block"),jQuery(".bgr-bp-success").fadeIn(),jQuery(".bgr-group-review-no-popup-add-block").hide(),jQuery("#bgr-add-review-modal").hide(),jQuery("#bgr-message").html(response),jQuery("#bgr-message").css("display","block");var date=new Date;date.setTime(date.getTime()+2e4),jQuery.cookie("res_content",response,{expires:date})})}),jQuery(document).on("click","#bp-group-rating-list-options > a",function(event){event.preventDefault();var jQ=jQuery(this),event=(jQ.siblings("a").removeClass("selected"),jQ.attr("attr-val")),limit=jQ.parent().siblings(".group-rating-limit").val();jQuery.post(ajaxurl,{action:"bp_group_review_filter_ratings",nonce:bgr_front_js_object.wbcom_nonce,filter:event,limit:limit,group_id:bgr_front_js_object.group_id},function(response){response=JSON.parse(response);jQ.addClass("selected"),jQ.parent().siblings("#bp-group-rating").html(response.html)})})}),jQuery(function(){jQuery.cookie("res_content")&&(jQuery(".error").hide(),jQuery.cookie("res_content","",-1))}),jQuery(function(){var show_last_form=localStorage.getItem("bgr_show_form");null!=show_last_form&&"form"==show_last_form&&(jQuery(".bgr-group-review-no-popup-add-block").show(),localStorage.setItem("bgr_show_form",null))});
     1jQuery(document).ready(function(e){jQuery("#manage-"+bgr_front_js_object.review_label).addClass("manage-review");var review_label=bgr_front_js_object.review_label;"yes"==bgr_front_js_object.check_group_admin&&"yes"!=bgr_front_js_object.auto_approve_reviews||jQuery("#"+review_label+"-management").hide(),"true"==bgr_front_js_object.exclude_groups&&(jQuery("#nav-add-feedback").hide(),jQuery("#nav-add-"+review_label+"-groups-li").hide(),jQuery("#nav-manage-"+review_label+"-groups-li").hide(),jQuery("#manage-"+review_label).parent().hide()),jQuery("#bgr_review_success_msg_modal").hide(),jQuery("#request-review-list #bp-group-edit-add-review-submit").hide(),jQuery(document).on("click","#add-review",function(){jQuery("#bgr-add-review-modal").css("display","block")}),jQuery(document).on("click","#groupbutton-85 a",function(e){var show_content=jQuery(this).attr("show");localStorage.setItem("bgr_show_form",show_content)}),jQuery(document).on("click","#add-review-no-popup",function(){jQuery(".bgr-group-review-no-popup-add-block").slideToggle()}),jQuery(document).on("click",".accept-button",function(){var accept_review_id=jQuery(this).next().val(),accept_gid=jQuery(this).attr("data-group-type");jQuery.post(ajaxurl,{action:"bp_group_review_accept_review",nonce:bgr_front_js_object.wbcom_nonce,accept_review_id:accept_review_id,group_id:accept_gid},function(response){location.reload()})}),jQuery(document).on("click",".deny-button",function(){var deny_review_id=jQuery(this).next().val(),deny_gid=jQuery(this).attr("data-group-type");jQuery.post(ajaxurl,{action:"bp_group_review_deny_review",nonce:bgr_front_js_object.wbcom_nonce,deny_review_id:deny_review_id,group_id:deny_gid},function(response){location.reload()})}),jQuery(document).on("click",".remove-review-button",function(){var remove_review_id=jQuery(this).next().val();jQuery.post(ajaxurl,{action:"bp_group_remove_review",nonce:bgr_front_js_object.wbcom_nonce,remove_review_id:remove_review_id},function(response){location.reload()})}),jQuery("#form-group-id").on("change",function(){jQuery(this).siblings(".bgr-error-fields").hide()}),jQuery('textarea[name*= "review-desc"]').on("keydown",function(){jQuery(this).siblings(".bgr-error-fields").hide()}),jQuery(".bgr-stars").on("click",function(){jQuery(this).parent().next(".bgr-error-fields").hide()}),jQuery(document).on("click",".expand-review-des",function(){"block"===jQuery(this).parent().children(".review-full-description").css("display")?(jQuery(".review-full-description").slideUp(500),jQuery(this).parent().children(".review-excerpt").slideDown(500),jQuery(this).text(bgr_front_js_object.view_more_text)):(jQuery(".review-full-description").hide(),jQuery(".review-excerpt").show(),jQuery(".review-full-description").next().text("View More.."),jQuery(this).parent().children(".review-excerpt").slideUp(500),jQuery(this).parent().children(".review-full-description").slideDown(500),jQuery(this).text(bgr_front_js_object.view_less_text))}),jQuery("#bgr-add-review-form").on("submit",function(e){e.preventDefault();var rating_exist=[],e=jQuery("#form-group-id",this).val(),bgr_review_desc=jQuery('textarea[name*= "review-desc"]',this).val(),rating_field_counter=jQuery(this).children().find("#rating_field_counter").val();jQuery(".bgr_mrating",this).each(function(){var rate_val=jQuery(this).val();0<rate_val?0:jQuery(this).parent().next(".bgr-error-fields").show(),rating_exist.push(rate_val)}),0<rating_field_counter?""==e?jQuery("#form-group-id",this).siblings(".bgr-error-fields").show():-1==jQuery.inArray("0",rating_exist)&&jQuery.post(ajaxurl,{action:"bp_group_submit_review",nonce:bgr_front_js_object.wbcom_nonce,data:jQuery(this).serialize()},function(response){jQuery(".bgr-bp-success p").html(response).css("display","block"),jQuery(".bgr-bp-success").fadeIn(),jQuery(".bgr-group-review-no-popup-add-block").hide(),jQuery("#bgr-add-review-modal").hide(),jQuery("#bgr-message").html(response),jQuery("#bgr-message").css("display","block");var date=new Date;date.setTime(date.getTime()+2e4),jQuery.cookie("res_content",response,{expires:date})}):""==e||""==bgr_review_desc?(""==e&&jQuery("#form-group-id",this).siblings(".bgr-error-fields ").show(),""==bgr_review_desc&&jQuery('textarea[name*= "review-desc"]',this).siblings(".bgr-error-fields ").show()):jQuery.post(ajaxurl,{action:"bp_group_submit_review",nonce:bgr_front_js_object.wbcom_nonce,data:jQuery(this).serialize()},function(response){jQuery(".bgr-bp-success p").html(response).css("display","block"),jQuery(".bgr-bp-success").fadeIn(),jQuery(".bgr-group-review-no-popup-add-block").hide(),jQuery("#bgr-add-review-modal").hide(),jQuery("#bgr-message").html(response),jQuery("#bgr-message").css("display","block");var date=new Date;date.setTime(date.getTime()+2e4),jQuery.cookie("res_content",response,{expires:date})})}),jQuery(document).on("click","#bp-group-rating-list-options > a",function(event){event.preventDefault();var jQ=jQuery(this),event=(jQ.siblings("a").removeClass("selected"),jQ.attr("attr-val")),limit=jQ.parent().siblings(".group-rating-limit").val();jQuery.post(ajaxurl,{action:"bp_group_review_filter_ratings",nonce:bgr_front_js_object.wbcom_nonce,filter:event,limit:limit,group_id:bgr_front_js_object.group_id},function(response){response=JSON.parse(response);jQ.addClass("selected"),jQ.parent().siblings("#bp-group-rating").html(response.html)})})}),jQuery(function(){jQuery.cookie("res_content")&&(jQuery(".error").hide(),jQuery.cookie("res_content","",-1))}),jQuery(function(){var show_last_form=localStorage.getItem("bgr_show_form");null!=show_last_form&&"form"==show_last_form&&(jQuery(".bgr-group-review-no-popup-add-block").show(),localStorage.setItem("bgr_show_form",null))});
  • review-buddypress-groups/trunk/assets/js/min/bgr-ratings.min.js

    r3250032 r3431049  
    1 jQuery(document).ready(function(){reviews_pluginurl=jQuery("#reviews_pluginurl").val(),bgrRatingColor=jQuery("#bgr-rate-color").val(),jQuery(".bgr-stars").mouseenter(function(){jQuery(this).parent().children().eq(0).val("not_clicked");var id=jQuery(this).attr("data-attr"),parent_id=jQuery(this).parent().attr("id");for(i=1;i<=id;i++)jQuery("#"+parent_id).children("."+i).addClass("fas").removeClass("far")}),jQuery(".bgr-stars").mouseleave(function(){var clicked_id=jQuery(this).parent().children().eq(1).val(),parent_id=(jQuery(this).attr("data-attr"),jQuery(this).parent().attr("id"));if("clicked"!==jQuery(this).parent().children().eq(0).val()){clicked_id=parseInt(clicked_id)+1;for(i=clicked_id;i<=5;i++)jQuery("#"+parent_id).children("."+i).addClass("far").removeClass("fas")}}),jQuery(".bgr-stars").on("click",function(){attr=jQuery(this).attr("data-attr"),clicked_id=attr;var parent_id=jQuery(this).parent().attr("id");for(jQuery(this).parent().children().eq(1).val(attr),jQuery(this).parent().children().eq(0).val("clicked"),i=1;i<=attr;i++)jQuery("#"+parent_id).children("."+i).addClass("fas").removeClass("far");var k=parseInt(attr)+1;for(j=k;j<=5;j++)jQuery("#"+parent_id).children("."+j).addClass("far").removeClass("fas")})});
     1jQuery(document).ready(function(){reviews_pluginurl=jQuery("#reviews_pluginurl").val(),bgrRatingColor=jQuery("#bgr-rate-color").val(),jQuery(".bgr-stars").on("mouseenter",function(){jQuery(this).parent().children().eq(0).val("not_clicked");var id=jQuery(this).attr("data-attr"),parent_id=jQuery(this).parent().attr("id");for(i=1;i<=id;i++)jQuery("#"+parent_id).children("."+i).addClass("fas").removeClass("far")}),jQuery(".bgr-stars").on("mouseleave",function(){var clicked_id=jQuery(this).parent().children().eq(1).val(),parent_id=(jQuery(this).attr("data-attr"),jQuery(this).parent().attr("id"));if("clicked"!==jQuery(this).parent().children().eq(0).val()){clicked_id=parseInt(clicked_id)+1;for(i=clicked_id;i<=5;i++)jQuery("#"+parent_id).children("."+i).addClass("far").removeClass("fas")}}),jQuery(".bgr-stars").on("click",function(){attr=jQuery(this).attr("data-attr"),clicked_id=attr;var parent_id=jQuery(this).parent().attr("id");for(jQuery(this).parent().children().eq(1).val(attr),jQuery(this).parent().children().eq(0).val("clicked"),i=1;i<=attr;i++)jQuery("#"+parent_id).children("."+i).addClass("fas").removeClass("far");var k=parseInt(attr)+1;for(j=k;j<=5;j++)jQuery("#"+parent_id).children("."+j).addClass("far").removeClass("fas")})});
  • review-buddypress-groups/trunk/includes/bgr-ajax.php

    r3430846 r3431049  
    274274                $active_rating_fields_values = array_unique( $active_rating_fields );
    275275
     276                // Get old settings to compare for deleted/archived criteria.
     277                $old_settings = get_option( 'bgr_admin_criteria_settings', array() );
     278                $old_all      = isset( $old_settings['add_review_rating_fields'] ) ? $old_settings['add_review_rating_fields'] : array();
     279                $old_active   = isset( $old_settings['active_rating_fields'] ) ? $old_settings['active_rating_fields'] : array();
     280
    276281                $bgr_admin_settings = array(
    277282                    'add_review_rating_fields' => $rating_field_values,
     
    280285
    281286                update_option( 'bgr_admin_criteria_settings', $bgr_admin_settings );
     287
     288                // Fire hooks for deleted/archived criteria so groups can sync.
     289                $deleted_criteria  = array_diff( $old_all, $rating_field_values );
     290                $archived_criteria = array_diff( $old_active, $active_rating_fields_values );
     291
     292                foreach ( $deleted_criteria as $deleted ) {
     293                    /**
     294                     * Fires when a global criterion is deleted.
     295                     *
     296                     * @since 3.7.0
     297                     * @param string $deleted The deleted criterion name.
     298                     */
     299                    do_action( 'bgr_global_criteria_deleted', $deleted );
     300                }
     301
     302                foreach ( $archived_criteria as $archived ) {
     303                    // Only fire if it wasn't deleted (just deactivated).
     304                    if ( in_array( $archived, $rating_field_values, true ) ) {
     305                        /**
     306                         * Fires when a global criterion is archived (deactivated but not deleted).
     307                         *
     308                         * @since 3.7.0
     309                         * @param string $archived The archived criterion name.
     310                         */
     311                        do_action( 'bgr_global_criteria_archived', $archived );
     312                    }
     313                }
     314
    282315                echo 'admin-criteria-settings-saved';
    283316                die;
     
    298331            }
    299332            if ( isset( $_POST['action'] ) && 'bp_group_review_save_admin_general_settings' === $_POST['action'] && current_user_can( 'manage_options' ) ) {
    300                 $multi_reviews        = isset( $_POST['multi_reviews'] ) ? sanitize_text_field( wp_unslash( $_POST['multi_reviews'] ) ) : '';
    301                 $auto_approve_reviews = isset( $_POST['bgr_auto_approve_reviews'] ) ? sanitize_text_field( wp_unslash( $_POST['bgr_auto_approve_reviews'] ) ) : '';
    302                 $reviews_per_page     = isset( $_POST['reviews_per_page'] ) ? sanitize_text_field( wp_unslash( $_POST['reviews_per_page'] ) ) : '';
    303                 $allow_notification   = isset( $_POST['allow_notification'] ) ? sanitize_text_field( wp_unslash( $_POST['allow_notification'] ) ) : '';
    304                 $allow_activity       = isset( $_POST['allow_activity'] ) ? sanitize_text_field( wp_unslash( $_POST['allow_activity'] ) ) : '';
    305                 $exclude_groups       = isset( $_POST['exclude_groups'] ) ? array_map( 'absint', wp_unslash( $_POST['exclude_groups'] ) ) : array();
     333                $multi_reviews         = isset( $_POST['multi_reviews'] ) ? sanitize_text_field( wp_unslash( $_POST['multi_reviews'] ) ) : '';
     334                $auto_approve_reviews  = isset( $_POST['bgr_auto_approve_reviews'] ) ? sanitize_text_field( wp_unslash( $_POST['bgr_auto_approve_reviews'] ) ) : '';
     335                $reviews_per_page      = isset( $_POST['reviews_per_page'] ) ? sanitize_text_field( wp_unslash( $_POST['reviews_per_page'] ) ) : '';
     336                $allow_notification    = isset( $_POST['allow_notification'] ) ? sanitize_text_field( wp_unslash( $_POST['allow_notification'] ) ) : '';
     337                $allow_activity        = isset( $_POST['allow_activity'] ) ? sanitize_text_field( wp_unslash( $_POST['allow_activity'] ) ) : '';
     338                $enable_group_criteria = isset( $_POST['enable_group_criteria'] ) ? sanitize_text_field( wp_unslash( $_POST['enable_group_criteria'] ) ) : 'no';
     339                $exclude_groups        = isset( $_POST['exclude_groups'] ) ? array_map( 'absint', wp_unslash( $_POST['exclude_groups'] ) ) : array();
    306340                // Filter out any zero values that may result from invalid input.
    307341                $exclude_groups     = array_filter( $exclude_groups );
    308342                $bgr_admin_settings = array(
    309                     'multi_reviews'        => $multi_reviews,
    310                     'auto_approve_reviews' => $auto_approve_reviews,
    311                     'reviews_per_page'     => $reviews_per_page,
    312                     'allow_notification'   => $allow_notification,
    313                     'allow_activity'       => $allow_activity,
    314                     'exclude_groups'       => $exclude_groups,
     343                    'multi_reviews'         => $multi_reviews,
     344                    'auto_approve_reviews'  => $auto_approve_reviews,
     345                    'reviews_per_page'      => $reviews_per_page,
     346                    'allow_notification'    => $allow_notification,
     347                    'allow_activity'        => $allow_activity,
     348                    'enable_group_criteria' => $enable_group_criteria,
     349                    'exclude_groups'        => $exclude_groups,
    315350                );
    316351                update_option( 'bgr_admin_general_settings', $bgr_admin_settings );
     
    378413            $form_group_id  = isset( $formarray['form-group-id'] ) ? absint( $formarray['form-group-id'] ) : 0;
    379414
    380             // Validate required fields.
    381             if ( empty( $review_desc ) ) {
    382                 wp_send_json_error( new WP_Error( '004', esc_html__( 'Review description is required.', 'bp-group-reviews' ), 'empty_content' ) );
    383             }
    384 
    385415            // Validate group exists.
    386416            if ( empty( $form_group_id ) ) {
     
    418448            $bgr_allow_email                = isset( $bp_group_review_email_settings['bgr_allow_email'] ) ? $bp_group_review_email_settings['bgr_allow_email'] : '';
    419449            $user_name                      = $current_user->display_name;
    420             $active_rating_fields           = $bgr['active_rating_fields'];
    421             $allow_notification             = $bgr['allow_notification'];
    422             $allow_email                    = $bgr_allow_email;
    423             $allow_activity                 = $bgr['allow_activity'];
    424             $review_label                   = $bgr['review_label'];
    425             $auto_approve_reviews           = $bgr['auto_approve_reviews'];
    426             $multi_reviews                  = $bgr['multi_reviews'];
     450            // Use group-level criteria if available, otherwise fall back to global.
     451            $active_rating_fields = function_exists( 'bgr_get_effective_criteria' )
     452                ? bgr_get_effective_criteria( $form_group_id )
     453                : $bgr['active_rating_fields'];
     454            $allow_notification   = $bgr['allow_notification'];
     455            $allow_email          = $bgr_allow_email;
     456            $allow_activity       = $bgr['allow_activity'];
     457            $review_label         = $bgr['review_label'];
     458            $auto_approve_reviews = $bgr['auto_approve_reviews'];
     459            $multi_reviews        = $bgr['multi_reviews'];
    427460            /* Translators: %1$s: Review Label */
    428461            $review_email_subject = ( isset( $bgr['review_email_subject'] ) ) ? $bgr['review_email_subject'] : sprintf( esc_html__( 'A new %1$s posted.', 'bp-group-reviews' ), $review_label );
  • review-buddypress-groups/trunk/includes/bgr-bp-rest-integration.php

    r3430846 r3431049  
    486486
    487487            if ( ! empty( $ratings ) && is_array( $ratings ) ) {
    488                 update_post_meta( $review_id, 'review_star_rating', $ratings );
     488                $sanitized_ratings = array();
     489                foreach ( $ratings as $key => $value ) {
     490                    $sanitized_key                       = sanitize_text_field( $key );
     491                    $sanitized_value                     = min( 5, max( 1, absint( $value ) ) );
     492                    $sanitized_ratings[ $sanitized_key ] = $sanitized_value;
     493                }
     494                update_post_meta( $review_id, 'review_star_rating', $sanitized_ratings );
    489495            }
    490496
     
    555561
    556562            if ( ! empty( $ratings ) && is_array( $ratings ) ) {
    557                 update_post_meta( $review_id, 'review_star_rating', $ratings );
     563                $sanitized_ratings = array();
     564                foreach ( $ratings as $key => $value ) {
     565                    $sanitized_key                       = sanitize_text_field( $key );
     566                    $sanitized_value                     = min( 5, max( 1, absint( $value ) ) );
     567                    $sanitized_ratings[ $sanitized_key ] = $sanitized_value;
     568                }
     569                update_post_meta( $review_id, 'review_star_rating', $sanitized_ratings );
    558570            }
    559571
  • review-buddypress-groups/trunk/includes/bgr-filters.php

    r3430846 r3431049  
    238238            $exclude_groups   = isset( $bgr['exclude_groups'] ) ? array_map( 'absint', (array) $bgr['exclude_groups'] ) : array();
    239239            $current_group_id = absint( bp_get_current_group_id() );
     240            $current_user_id  = bp_loggedin_user_id();
     241
     242            // Check if current group is excluded from reviews.
     243            if ( ! empty( $exclude_groups ) && in_array( $current_group_id, $exclude_groups, true ) ) {
     244                return;
     245            }
     246
     247            // Group admins should not see the "Add Review" button on their own groups.
     248            if ( groups_is_user_admin( $current_user_id, $current_group_id ) ) {
     249                return;
     250            }
     251
     252            // Non-members should not see the "Add Review" button.
     253            if ( ! groups_is_user_member( $current_user_id, $current_group_id ) ) {
     254                return;
     255            }
     256
    240257            // Build group URL safely for both BuddyPress and BuddyBoss.
    241258            $current_group = groups_get_group( array( 'group_id' => $current_group_id ) );
     
    247264            }
    248265            $current_group_link .= 'add-' . bp_group_review_tab_slug();
    249             // Check if current group is excluded from reviews.
    250             if ( ! empty( $exclude_groups ) && in_array( $current_group_id, $exclude_groups, true ) ) {
    251                 return;
    252             }
    253 
    254             // Group admins should not see the "Add Review" button on their own groups.
    255             if ( groups_is_user_admin( bp_loggedin_user_id(), bp_get_current_group_id() ) ) {
    256                 return;
    257             }
    258266            ?>
    259267            <div class="group-button group-actions-absolute public generic-button" id="add-review-groupbutton">
     
    822830                    $gp_parent_url = bp_get_groups_directory_permalink() . $bp->groups->current_group->slug . '/';
    823831                }
     832
     833                // Check if user can add reviews (must be logged in, member, and not admin).
     834                $current_group_id = absint( $bp->groups->current_group->id );
     835                $current_user_id  = bp_loggedin_user_id();
     836                $can_add_review   = is_user_logged_in()
     837                    && groups_is_user_member( $current_user_id, $current_group_id )
     838                    && ! groups_is_user_admin( $current_user_id, $current_group_id );
     839
    824840                if ( ! empty( $bgr_admin_general_settings ) ) {
    825                     $exclude_groups   = isset( $bgr['exclude_groups'] ) ? array_map( 'absint', (array) $bgr['exclude_groups'] ) : array();
    826                     $current_group_id = absint( $bp->groups->current_group->id );
     841                    $exclude_groups = isset( $bgr['exclude_groups'] ) ? array_map( 'absint', (array) $bgr['exclude_groups'] ) : array();
    827842                    if ( ! empty( $exclude_groups ) ) {
    828843                        if ( ! in_array( $current_group_id, $exclude_groups, true ) ) {
    829                             $tab_args[] = array(
     844                            // Always add the Reviews listing tab.
     845                            bp_core_new_subnav_item(
     846                                array(
     847                                    'name'            => $review_label . ' ' . $count_notification,
     848                                    'slug'            => sanitize_title( $bgr['manage_review_label'] ),
     849                                    'parent_slug'     => $bp->groups->current_group->slug,
     850                                    'parent_url'      => $gp_parent_url,
     851                                    'screen_function' => array( $this, 'bp_group_review_tab' ),
     852                                    'position'        => 198,
     853                                    'item_css_id'     => 'reviews',
     854                                )
     855                            );
     856
     857                            // Only add the "Add Review" tab if user can add reviews.
     858                            if ( $can_add_review ) {
     859                                bp_core_new_subnav_item(
     860                                    array(
     861                                        /* translators: %s: review label (e.g., "Review") */
     862                                        'name'            => sprintf( __( 'Adds %s', 'bp-group-reviews' ), $add_review_label ),
     863                                        'slug'            => 'add-' . bp_group_review_tab_slug(),
     864                                        'parent_slug'     => $bp->groups->current_group->slug,
     865                                        'parent_url'      => $gp_parent_url,
     866                                        'screen_function' => array( $this, 'bp_group_review_add_review_tab' ),
     867                                        'position'        => 199,
     868                                        'item_css_id'     => 'add-review',
     869                                    )
     870                                );
     871                            }
     872                        }
     873                    } else {
     874                        // Always add the Reviews listing tab.
     875                        bp_core_new_subnav_item(
     876                            array(
    830877                                'name'            => $review_label . ' ' . $count_notification,
    831878                                'slug'            => sanitize_title( $bgr['manage_review_label'] ),
     
    835882                                'position'        => 198,
    836883                                'item_css_id'     => 'reviews',
     884                            )
     885                        );
     886
     887                        // Only add the "Add Review" tab if user can add reviews.
     888                        if ( $can_add_review ) {
     889                            bp_core_new_subnav_item(
     890                                array(
     891                                    /* translators: %s: review label (e.g., "Review") */
     892                                    'name'            => sprintf( __( 'Adds %s', 'bp-group-reviews' ), $add_review_label ),
     893                                    'slug'            => 'add-' . bp_group_review_tab_slug(),
     894                                    'parent_slug'     => $bp->groups->current_group->slug,
     895                                    'parent_url'      => $gp_parent_url,
     896                                    'screen_function' => array( $this, 'bp_group_review_add_review_tab' ),
     897                                    'position'        => 199,
     898                                    'item_css_id'     => 'add-review',
     899                                )
    837900                            );
    838 
    839                             $tab_args[] = array(
     901                        }
     902                    }
     903                } else {
     904                    // Always add the Reviews listing tab.
     905                    bp_core_new_subnav_item(
     906                        array(
     907                            'name'            => $review_label . ' ' . $count_notification,
     908                            'slug'            => sanitize_title( $bgr['manage_review_label'] ),
     909                            'parent_slug'     => $bp->groups->current_group->slug,
     910                            'parent_url'      => $gp_parent_url,
     911                            'screen_function' => array( $this, 'bp_group_review_tab' ),
     912                            'position'        => 198,
     913                            'item_css_id'     => 'reviews',
     914                        )
     915                    );
     916
     917                    // Only add the "Add Review" tab if user can add reviews.
     918                    if ( $can_add_review ) {
     919                        bp_core_new_subnav_item(
     920                            array(
    840921                                /* translators: %s: review label (e.g., "Review") */
    841922                                'name'            => sprintf( __( 'Adds %s', 'bp-group-reviews' ), $add_review_label ),
     
    846927                                'position'        => 199,
    847928                                'item_css_id'     => 'add-review',
    848                             );
    849 
    850                             foreach ( $tab_args as $tab ) {
    851                                 bp_core_new_subnav_item( $tab );
    852                             }
    853                         }
    854                     } else {
    855                         $tab_args[] = array(
    856                             'name'            => $review_label . ' ' . $count_notification,
    857                             'slug'            => sanitize_title( $bgr['manage_review_label'] ),
    858                             'parent_slug'     => $bp->groups->current_group->slug,
    859                             'parent_url'      => $gp_parent_url,
    860                             'screen_function' => array( $this, 'bp_group_review_tab' ),
    861                             'position'        => 198,
    862                             'item_css_id'     => 'reviews',
     929                            )
    863930                        );
    864 
    865                         $tab_args[] = array(
    866                             /* translators: %s: review label (e.g., "Review") */
    867                             'name'            => sprintf( __( 'Adds %s', 'bp-group-reviews' ), $add_review_label ),
    868                             'slug'            => 'add-' . bp_group_review_tab_slug(),
    869                             'parent_slug'     => $bp->groups->current_group->slug,
    870                             'parent_url'      => $gp_parent_url,
    871                             'screen_function' => array( $this, 'bp_group_review_add_review_tab' ),
    872                             'position'        => 199,
    873                             'item_css_id'     => 'add-review',
    874                         );
    875 
    876                         foreach ( $tab_args as $tab ) {
    877                             bp_core_new_subnav_item( $tab );
    878                         }
    879                     }
    880                 } else {
    881                     $tab_args[] = array(
    882                         'name'            => $review_label . ' ' . $count_notification,
    883                         'slug'            => sanitize_title( $bgr['manage_review_label'] ),
    884                         'parent_slug'     => $bp->groups->current_group->slug,
    885                         'parent_url'      => $gp_parent_url,
    886                         'screen_function' => array( $this, 'bp_group_review_tab' ),
    887                         'position'        => 198,
    888                         'item_css_id'     => 'reviews',
    889                     );
    890 
    891                     $tab_args[] = array(
    892                         /* translators: %s: review label (e.g., "Review") */
    893                         'name'            => sprintf( __( 'Adds %s', 'bp-group-reviews' ), $add_review_label ),
    894                         'slug'            => 'add-' . bp_group_review_tab_slug(),
    895                         'parent_slug'     => $bp->groups->current_group->slug,
    896                         'parent_url'      => $gp_parent_url,
    897                         'screen_function' => array( $this, 'bp_group_review_add_review_tab' ),
    898                         'position'        => 199,
    899                         'item_css_id'     => 'add-review',
    900                     );
    901 
    902                     foreach ( $tab_args as $tab ) {
    903                         bp_core_new_subnav_item( $tab );
    904931                    }
    905932                }
  • review-buddypress-groups/trunk/includes/bgr-globals.php

    r3430846 r3431049  
    2626
    2727    if ( ! empty( $bgr_admin_general_settings ) ) {
    28         $auto_approve_reviews = isset( $bgr_admin_general_settings['auto_approve_reviews'] ) ? $bgr_admin_general_settings['auto_approve_reviews'] : 'no';
    29         $reviews_per_page     = isset( $bgr_admin_general_settings['reviews_per_page'] ) ? $bgr_admin_general_settings['reviews_per_page'] : 5;
    30         $allow_notification   = isset( $bgr_admin_general_settings['allow_notification'] ) ? $bgr_admin_general_settings['allow_notification'] : 'yes';
    31         $allow_activity       = isset( $bgr_admin_general_settings['allow_activity'] ) ? $bgr_admin_general_settings['allow_activity'] : 'yes';
    32         $exclude_groups       = isset( $bgr_admin_general_settings['exclude_groups'] ) ? $bgr_admin_general_settings['exclude_groups'] : array();
    33         $multi_reviews        = isset( $bgr_admin_general_settings['multi_reviews'] ) ? $bgr_admin_general_settings['multi_reviews'] : 'no';
     28        $auto_approve_reviews  = isset( $bgr_admin_general_settings['auto_approve_reviews'] ) ? $bgr_admin_general_settings['auto_approve_reviews'] : 'no';
     29        $reviews_per_page      = isset( $bgr_admin_general_settings['reviews_per_page'] ) ? $bgr_admin_general_settings['reviews_per_page'] : 5;
     30        $allow_notification    = isset( $bgr_admin_general_settings['allow_notification'] ) ? $bgr_admin_general_settings['allow_notification'] : 'yes';
     31        $allow_activity        = isset( $bgr_admin_general_settings['allow_activity'] ) ? $bgr_admin_general_settings['allow_activity'] : 'yes';
     32        $exclude_groups        = isset( $bgr_admin_general_settings['exclude_groups'] ) ? $bgr_admin_general_settings['exclude_groups'] : array();
     33        $multi_reviews         = isset( $bgr_admin_general_settings['multi_reviews'] ) ? $bgr_admin_general_settings['multi_reviews'] : 'no';
     34        $enable_group_criteria = isset( $bgr_admin_general_settings['enable_group_criteria'] ) ? $bgr_admin_general_settings['enable_group_criteria'] : 'no';
    3435    } else {
    35         $multi_reviews        = 'no';
    36         $reviews_per_page     = 5;
    37         $allow_notification   = 'yes';
    38         $allow_activity       = 'yes';
    39         $exclude_groups       = array();
    40         $auto_approve_reviews = 'no';
     36        $multi_reviews         = 'no';
     37        $reviews_per_page      = 5;
     38        $allow_notification    = 'yes';
     39        $allow_activity        = 'yes';
     40        $exclude_groups        = array();
     41        $auto_approve_reviews  = 'no';
     42        $enable_group_criteria = 'no';
    4143    }
    4244
     
    113115        'allow_activity'              => $allow_activity,
    114116        'exclude_groups'              => $exclude_groups,
     117        'enable_group_criteria'       => $enable_group_criteria,
    115118        'review_email_subject'        => $review_email_subject,
    116119        'review_email_message'        => $review_email_message,
  • review-buddypress-groups/trunk/includes/bgr-grp-extn.php

    r3430846 r3431049  
    6767            }
    6868
    69             // Only proceed with tab creation if group is not excluded
     69            // Only proceed with tab creation if group is not excluded.
    7070            if ( ! $is_group_excluded ) {
    7171                if ( ! empty( $bgr_admin_general_settings ) ) {
     
    175175                                <div class="item-description">
    176176                                    <div class="review-description">
     177                                        <?php
     178                                        $trimcontent = get_the_content();
     179                                        if ( ! empty( $trimcontent ) ) :
     180                                            ?>
    177181                                        <div class="review-excerpt bgr-col-12">
    178182                                            <b> <?php esc_html_e( 'Short Description ', 'bp-group-reviews' ); ?>: </b>
    179183                                            <?php
    180                                             $trimcontent = get_the_content();
    181                                             if ( ! empty( $trimcontent ) ) {
    182184                                                $len = strlen( $trimcontent );
    183                                                 if ( $len > 150 ) {
    184                                                     $shortexcerpt = substr( $trimcontent, 0, 150 );
    185                                                     echo wp_kses_post( $shortexcerpt );
    186                                                 } else {
    187                                                     echo wp_kses_post( $trimcontent );
    188                                                 }
     185                                            if ( $len > 150 ) {
     186                                                $shortexcerpt = substr( $trimcontent, 0, 150 );
     187                                                echo wp_kses_post( $shortexcerpt );
     188                                            } else {
     189                                                echo wp_kses_post( $trimcontent );
    189190                                            }
    190191                                            ?>
     
    200201                                        </div>
    201202                                        <a class="expand-review-des"><?php esc_html_e( 'View More..', 'bp-group-reviews' ); ?> </a>
     203                                        <?php else : ?>
     204                                        <div class="review-ratings-only bgr-col-12">
     205                                            <?php do_action( 'bgr_display_ratings', $post->ID ); ?>
     206                                        </div>
     207                                        <?php endif; ?>
    202208                                    </div>
    203209                                </div>
     
    268274    bp_register_group_extension( 'Group_Reviews_Management_Extn' );
    269275
    270 
     276    /**
     277     * Group Criteria Settings Extension.
     278     *
     279     * Allows group admins to customize review criteria for their group.
     280     *
     281     * @since 3.7.0
     282     */
     283    class Group_Reviews_Criteria_Extn extends BP_Group_Extension {
     284
     285        /**
     286         * Constructor.
     287         *
     288         * @param array $args Arguments.
     289         */
     290        public function __construct( $args = array() ) {
     291            global $bgr;
     292
     293            $enabled                    = true;
     294            $bgr_admin_general_settings = get_option( 'bgr_admin_general_settings' );
     295
     296            // Check if group-level criteria feature is enabled by site admin.
     297            $enable_group_criteria = isset( $bgr_admin_general_settings['enable_group_criteria'] ) ? $bgr_admin_general_settings['enable_group_criteria'] : 'no';
     298            if ( 'yes' !== $enable_group_criteria ) {
     299                return; // Feature not enabled, don't register this extension.
     300            }
     301
     302            // Check if current group is excluded from reviews.
     303            $current_group_id  = absint( bp_get_current_group_id() );
     304            $is_group_excluded = false;
     305
     306            if ( ! empty( $bgr_admin_general_settings ) && isset( $bgr_admin_general_settings['exclude_groups'] ) ) {
     307                $exclude_groups = array_map( 'absint', (array) $bgr_admin_general_settings['exclude_groups'] );
     308                if ( ! empty( $exclude_groups ) && in_array( $current_group_id, $exclude_groups, true ) ) {
     309                    $enabled           = false;
     310                    $is_group_excluded = true;
     311                }
     312            }
     313
     314            if ( ! $is_group_excluded ) {
     315                $args = array(
     316                    'slug'              => 'review-criteria',
     317                    'nav_item_position' => 201,
     318                    'name'              => __( 'Review Criteria', 'bp-group-reviews' ),
     319                    'enable_nav_item'   => false,
     320                    'screens'           => array(
     321                        'admin' => array(
     322                            'name'    => __( 'Review Criteria', 'bp-group-reviews' ),
     323                            'slug'    => 'review-criteria',
     324                            'enabled' => $enabled,
     325                        ),
     326                    ),
     327                    'show_tab'          => false,
     328                );
     329                parent::init( $args );
     330            }
     331        }
     332
     333        /**
     334         * Display the criteria settings screen.
     335         *
     336         * @param int $group_id Group ID.
     337         */
     338        public function admin_screen( $group_id = null ) {
     339            $this->edit_screen( $group_id );
     340        }
     341
     342        /**
     343         * Display the criteria settings screen.
     344         *
     345         * @param int $group_id Group ID.
     346         */
     347        public function edit_screen( $group_id = null ) {
     348            // Load the template.
     349            $template_path = BGR_PLUGIN_PATH . 'includes/templates/bgr-group-criteria-settings.php';
     350            if ( file_exists( $template_path ) ) {
     351                include $template_path;
     352            }
     353            // Hidden submit button to satisfy BP Group Extension requirements.
     354            echo '<input type="submit" name="save" style="display:none;" id="bp-group-edit-review-criteria-submit">';
     355        }
     356
     357        /**
     358         * Save the criteria settings.
     359         *
     360         * @param int $group_id Group ID.
     361         */
     362        public function admin_screen_save( $group_id = null ) {
     363            // Settings are saved via AJAX, so nothing needed here.
     364        }
     365
     366        /**
     367         * Save the criteria settings.
     368         *
     369         * @param int $group_id Group ID.
     370         */
     371        public function edit_screen_save( $group_id = null ) {
     372            // Settings are saved via AJAX, so nothing needed here.
     373        }
     374    }
     375    // Only register the criteria extension if the feature is enabled by site admin.
     376    $bgr_criteria_settings     = get_option( 'bgr_admin_general_settings' );
     377    $enable_criteria_extension = isset( $bgr_criteria_settings['enable_group_criteria'] ) ? $bgr_criteria_settings['enable_group_criteria'] : 'no';
     378    if ( 'yes' === $enable_criteria_extension ) {
     379        bp_register_group_extension( 'Group_Reviews_Criteria_Extn' );
     380    }
    271381
    272382endif;
  • review-buddypress-groups/trunk/includes/bgr-rating-display.php

    r3430846 r3431049  
    8686         *  Actions performed for rating display type : Star
    8787         *
    88          *  @since   1.0.0
    89          *  @author  Wbcom Designs
    90          *
    91          * @param array $review_rating_fields Review rating fields.
    92          * @param array $review_ratings Review rating.
     88         *  Display all criteria ratings from the review itself, including archived/legacy criteria.
     89         *  This ensures historical reviews display correctly even when criteria have changed.
     90         *
     91         *  @since   1.0.0
     92         *  @since   3.7.0 Updated to display all review criteria regardless of current active status.
     93         *  @author  Wbcom Designs
     94         *
     95         * @param array $review_rating_fields Review rating fields (global or group-level active criteria).
     96         * @param array $review_ratings Review rating data from post meta.
    9397         */
    9498        public function bp_group_review_display_star_rating( $review_rating_fields, $review_ratings ) {
    95             // Ensure $review_ratings[0] is an array before using array_key_exists.
    96             if ( ! empty( $review_rating_fields ) && ! empty( $review_ratings[0] ) && is_array( $review_ratings[0] ) ) :
    97                 foreach ( $review_rating_fields as $review_field ) {
    98                     if ( array_key_exists( $review_field, $review_ratings[0] ) ) {
     99            // Ensure $review_ratings[0] is an array.
     100            if ( empty( $review_ratings[0] ) || ! is_array( $review_ratings[0] ) ) {
     101                return;
     102            }
     103
     104            $actual_review_ratings = $review_ratings[0];
     105
     106            // Get currently active criteria for comparison (to identify archived ones).
     107            global $bgr;
     108            $active_criteria = ! empty( $bgr['active_rating_fields'] ) ? $bgr['active_rating_fields'] : array();
     109
     110            // Display all criteria that the review actually has.
     111            foreach ( $actual_review_ratings as $review_field => $rating_value ) {
     112                // Skip non-string keys (legacy numeric arrays).
     113                if ( is_int( $review_field ) ) {
     114                    continue;
     115                }
     116
     117                // Check if this criterion is currently active.
     118                $is_archived = ! in_array( $review_field, $active_criteria, true );
     119                ?>
     120                <div class="multi-review <?php echo $is_archived ? 'bgr-archived-criteria' : ''; ?>">
     121                    <div class="bgr-col-6">
     122                        <?php
     123                        echo esc_html( $review_field ) . ' : ';
     124                        if ( $is_archived ) {
     125                            ?>
     126                            <span class="bgr-legacy-indicator" title="<?php esc_attr_e( 'This criterion is no longer active', 'bp-group-reviews' ); ?>">
     127                                <small>(<?php esc_html_e( 'legacy', 'bp-group-reviews' ); ?>)</small>
     128                            </span>
     129                            <?php
     130                        }
    99131                        ?>
    100                         <div class="multi-review">
    101                             <div class="bgr-col-6">
    102                                 <?php echo esc_html( $review_field ) . ' : '; ?>
    103                             </div>
    104                             <div class="bgr-col-6">
     132                    </div>
     133                    <div class="bgr-col-6">
     134                    <?php
     135                        $stars_on  = absint( $rating_value );
     136                        $stars_off = 5 - $stars_on;
     137                    for ( $i = 1; $i <= $stars_on; $i++ ) {
     138                        ?>
     139                            <span class="fas fa-star stars bgr-star-rate"></span>
    105140                            <?php
    106                                 /*** Ratings *****/
    107                                 $stars_on  = $review_ratings[0][ $review_field ];
    108                                 $stars_off = 5 - $stars_on;
    109                             for ( $i = 1; $i <= $stars_on; $i++ ) {
    110                                 ?>
    111                                     <span class="fas fa-star stars bgr-star-rate"></span>
    112                                     <?php
    113                             }
    114                             for ( $i = 1; $i <= $stars_off; $i++ ) {
    115                                 ?>
    116                                     <span class="far fa-star stars bgr-star-rate"></span>
    117                                     <?php
    118                             }
    119                             ?>
    120                                 </div>
    121                             </div>
     141                    }
     142                    for ( $i = 1; $i <= $stars_off; $i++ ) {
     143                        ?>
     144                            <span class="far fa-star stars bgr-star-rate"></span>
    122145                            <?php
    123146                    }
    124                 }
    125                 endif;
     147                    ?>
     148                    </div>
     149                </div>
     150                <?php
     151            }
    126152        }
    127153
  • review-buddypress-groups/trunk/includes/bgr-scripts.php

    r3430846 r3431049  
    191191                wp_enqueue_script( 'bgr-ratings-js' );
    192192            }
     193
     194            // Enqueue group criteria admin script on group admin pages.
     195            if ( function_exists( 'bp_is_group' ) && bp_is_group() && bp_is_group_admin_page() ) {
     196                wp_register_script(
     197                    'bgr-group-criteria-admin-js',
     198                    BGR_PLUGIN_URL . 'assets/js' . $script_path . '/bgr-group-criteria-admin' . $script_extension,
     199                    array( 'jquery' ),
     200                    BGR_PLUGIN_VERSION,
     201                    true
     202                );
     203                wp_enqueue_script( 'bgr-group-criteria-admin-js' );
     204                wp_localize_script(
     205                    'bgr-group-criteria-admin-js',
     206                    'bgr_group_criteria',
     207                    array(
     208                        'ajaxurl' => admin_url( 'admin-ajax.php' ),
     209                        'nonce'   => wp_create_nonce( 'bgr_group_criteria_nonce' ),
     210                    )
     211                );
     212            }
    193213        }
    194214
  • review-buddypress-groups/trunk/includes/bgr-shortcodes.php

    r3430846 r3431049  
    4242            global $bgr;
    4343            $review_rating_fields = $bgr['review_rating_fields'];
    44             $active_rating_fields = $bgr['active_rating_fields'];
    4544            $review_label         = $bgr['review_label'];
    4645            $admin_exclude_groups = $bgr['exclude_groups'];
     
    5554                $current_group_id = bp_get_current_group_id();
    5655            }
    57             $group_args   = array(
     56
     57            // Use group-level criteria if available, otherwise fall back to global.
     58            $active_rating_fields = function_exists( 'bgr_get_effective_criteria' ) && $current_group_id
     59                ? bgr_get_effective_criteria( $current_group_id )
     60                : $bgr['active_rating_fields'];
     61            $group_args           = array(
    5862                'post_type'   => 'review',
    5963                'category'    => 'group',
     
    7175                ),
    7276            );
    73             $reviews_args = new WP_Query( $group_args );
     77            $reviews_args         = new WP_Query( $group_args );
    7478            if ( ! is_user_logged_in() ) {
    7579                $output .= '<div id="message" class="bp-messages bp-feedback error">';
     
    174178                        </p>
    175179                        <?php $this->bp_group_review_display_form_rating(); ?>
    176                         <span class="bgr-error-fields">*<?php esc_html_e( 'This field is required.', 'bp-group-reviews' ); ?></span>
    177180                    <?php /* translators: %s: search term */ ?>
    178                             <textarea class="review_desc" name="review-desc" placeholder="<?php printf( esc_attr__( '%1$s Description', 'bp-group-reviews' ), esc_attr( $review_label ) ); ?>" rows="3" cols="50" required></textarea>
     181                            <textarea class="review_desc" name="review-desc" placeholder="<?php printf( esc_attr__( '%1$s Description (optional)', 'bp-group-reviews' ), esc_attr( $review_label ) ); ?>" rows="3" cols="50"></textarea>
    179182                            <br/>
    180183                        <p>
     
    200203        public function bp_group_review_display_form_rating() {
    201204            global $bgr;
    202             $this->bp_group_review_display_form_star_rating();
     205            $group_id = bp_get_current_group_id();
     206            $this->bp_group_review_display_form_star_rating( $group_id );
    203207        }
    204208
     
    206210         * Check active rating fields
    207211         *
     212         * @param int $group_id Optional group ID for group-level criteria.
    208213         * @return bool True if there are active rating fields, false otherwise.
    209214         */
    210         public function bp_group_review_display_star() {
    211             global $bgr;
    212             $active_rating_fields = $bgr['active_rating_fields'];
     215        public function bp_group_review_display_star( $group_id = 0 ) {
     216            global $bgr;
     217            // Use group-level criteria if available.
     218            $active_rating_fields = function_exists( 'bgr_get_effective_criteria' ) && $group_id
     219                ? bgr_get_effective_criteria( $group_id )
     220                : $bgr['active_rating_fields'];
    213221            if ( ! empty( $active_rating_fields ) ) {
    214222                $show_rating = true;
     
    224232         *  @since   1.0.0
    225233         *  @author  Wbcom Designs
    226          */
    227         public function bp_group_review_display_form_star_rating() {
    228             global $bgr;
    229             $review_rating_fields         = $bgr['review_rating_fields'];
    230             $active_rating_fields         = $bgr['active_rating_fields'];
    231             $bp_group_review_display_star = $this->bp_group_review_display_star();
     234         *  @param   int $group_id Optional group ID for group-level criteria.
     235         */
     236        public function bp_group_review_display_form_star_rating( $group_id = 0 ) {
     237            global $bgr;
     238            // Use group-level criteria if available.
     239            $active_rating_fields = function_exists( 'bgr_get_effective_criteria' ) && $group_id
     240                ? bgr_get_effective_criteria( $group_id )
     241                : $bgr['active_rating_fields'];
     242            // For the form, we only show the active criteria (whether global or group-level).
     243            $review_rating_fields         = $active_rating_fields;
     244            $bp_group_review_display_star = $this->bp_group_review_display_star( $group_id );
    232245            if ( true === $bp_group_review_display_star ) {
    233246                $field_counter = 1;
  • review-buddypress-groups/trunk/includes/templates/bgr-single-review-template.php

    r3430846 r3431049  
    1818$review_id            = 0;
    1919if ( preg_match( '/\/view\/(\d+)/', $url, $matches ) ) {
    20     $review_id = absint( $matches[1] );
     20    $review_id = absint( $matches[1] );
    2121}
    2222
    2323// Bail early if no valid review ID found.
    2424if ( empty( $review_id ) ) {
    25     echo '<div class="bp-feedback error"><p>' . esc_html__( 'Review not found.', 'bp-group-reviews' ) . '</p></div>';
    26     return;
     25    echo '<div class="bp-feedback error"><p>' . esc_html__( 'Review not found.', 'bp-group-reviews' ) . '</p></div>';
     26    return;
    2727}
    2828
     
    3131// Bail if review doesn't exist.
    3232if ( ! $review || 'review' !== $review->post_type ) {
    33     echo '<div class="bp-feedback error"><p>' . esc_html__( 'Review not found.', 'bp-group-reviews' ) . '</p></div>';
    34     return;
     33    echo '<div class="bp-feedback error"><p>' . esc_html__( 'Review not found.', 'bp-group-reviews' ) . '</p></div>';
     34    return;
    3535}
    36 $review_title         = $review->post_title;
    37 $author               = absint( $review->post_author );
    38 $author_details       = get_userdata( $author );
     36$review_title   = $review->post_title;
     37$author         = absint( $review->post_author );
     38$author_details = get_userdata( $author );
    3939?>
    4040<div class="bgr-single-review">
     
    5252                <div class="item-description">
    5353                    <div class="review-description">
     54                        <?php if ( ! empty( $review->post_content ) ) : ?>
    5455                        <div class="bgr-col-12">
    5556                            <?php echo esc_html( $review->post_content ); ?>
    5657                        </div>
     58                        <?php endif; ?>
    5759                        <?php
    5860                            $review_ratings = get_post_meta( $review_id, 'review_star_rating', false );
  • review-buddypress-groups/trunk/languages/bp-group-reviews.pot

    r3430846 r3431049  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Wbcom Designs - BuddyPress Group Reviews 3.6.0\n"
     5"Project-Id-Version: Wbcom Designs - BuddyPress Group Reviews 3.7.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/buddypress-groups-review\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-01-02T04:15:17+00:00\n"
     12"POT-Creation-Date: 2026-01-02T12:17:30+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    9696
    9797#: admin/bgr-admin.php:95
    98 #: admin/review-admin-options-page.php:419
    99 #: admin/review-admin-options-page.php:463
    100 #: admin/review-admin-options-page.php:506
     98#: admin/review-admin-options-page.php:437
     99#: admin/review-admin-options-page.php:481
     100#: admin/review-admin-options-page.php:524
    101101msgid "Emails"
    102102msgstr ""
     
    104104#: admin/bgr-admin.php:107
    105105#: admin/wbcom/templates/wbcom-license-page.php:9
    106 #: includes/bgr-filters.php:996
     106#: includes/bgr-filters.php:1023
    107107msgid "BuddyPress Group Review"
    108108msgstr ""
     
    116116
    117117#: admin/bgr-admin.php:121
    118 #: admin/review-admin-options-page.php:352
     118#: admin/review-admin-options-page.php:370
    119119msgid "Settings Saved."
    120120msgstr ""
    121121
    122122#: admin/bgr-admin.php:125
    123 #: admin/review-admin-options-page.php:355
     123#: admin/review-admin-options-page.php:373
    124124msgid "Dismiss this notice."
    125125msgstr ""
     
    129129#: admin/bgr-admin.php:154
    130130#: admin/review-admin-options-page.php:241
    131 #: includes/bgr-globals.php:91
    132 #: includes/bgr-globals.php:95
    133 #: includes/bgr-globals.php:135
     131#: includes/bgr-globals.php:93
     132#: includes/bgr-globals.php:97
     133#: includes/bgr-globals.php:138
    134134#: includes/bgr-grp-extn.php:52
    135135#: includes/bgr-grp-extn.php:134
     
    140140#: admin/bgr-admin.php:152
    141141#: admin/review-admin-options-page.php:121
    142 #: includes/bgr-filters.php:445
    143 #: includes/bgr-filters.php:795
    144 #: includes/bgr-globals.php:90
    145 #: includes/bgr-globals.php:94
    146 #: includes/bgr-globals.php:143
     142#: includes/bgr-filters.php:453
     143#: includes/bgr-filters.php:803
     144#: includes/bgr-globals.php:92
     145#: includes/bgr-globals.php:96
     146#: includes/bgr-globals.php:146
    147147#: includes/bgr-grp-extn.php:53
    148148msgid "Review"
     
    277277
    278278#: admin/review-admin-options-page.php:60
     279#: includes/bgr-grp-extn.php:318
     280#: includes/bgr-grp-extn.php:322
    279281msgid "Review Criteria"
    280282msgstr ""
     
    294296#: admin/review-admin-options-page.php:93
    295297#: admin/review-admin-options-page.php:150
    296 #: admin/review-admin-options-page.php:331
     298#: admin/review-admin-options-page.php:349
    297299msgid "Save Settings"
    298300msgstr ""
     
    389391
    390392#: admin/review-admin-options-page.php:306
     393msgid "Enable Group-Level Criteria"
     394msgstr ""
     395
     396#: admin/review-admin-options-page.php:307
     397msgid "Allow group admins to customize review criteria for their specific groups."
     398msgstr ""
     399
     400#: admin/review-admin-options-page.php:324
    391401msgid "Exclude Groups from Reviews"
    392402msgstr ""
    393403
    394 #: admin/review-admin-options-page.php:307
     404#: admin/review-admin-options-page.php:325
    395405msgid "Select the groups that should not have review functionality."
    396406msgstr ""
    397407
    398 #: admin/review-admin-options-page.php:361
     408#: admin/review-admin-options-page.php:379
    399409msgid "Email Settings"
    400410msgstr ""
    401411
    402 #: admin/review-admin-options-page.php:414
     412#: admin/review-admin-options-page.php:432
    403413msgid "Review Submission"
    404414msgstr ""
    405415
    406 #: admin/review-admin-options-page.php:420
     416#: admin/review-admin-options-page.php:438
    407417msgid "Enable this option to notify the group admin and reviewer via email when a review is added, accepted, or denied."
    408418msgstr ""
    409419
    410 #: admin/review-admin-options-page.php:432
    411 #: admin/review-admin-options-page.php:475
    412 #: admin/review-admin-options-page.php:519
     420#: admin/review-admin-options-page.php:450
     421#: admin/review-admin-options-page.php:493
     422#: admin/review-admin-options-page.php:537
    413423msgid "Email Subject"
    414424msgstr ""
    415425
    416 #: admin/review-admin-options-page.php:433
     426#: admin/review-admin-options-page.php:451
    417427msgid "Enter the email subject for review notifications."
    418428msgstr ""
    419429
    420 #: admin/review-admin-options-page.php:442
    421 #: admin/review-admin-options-page.php:485
    422 #: admin/review-admin-options-page.php:529
     430#: admin/review-admin-options-page.php:460
     431#: admin/review-admin-options-page.php:503
     432#: admin/review-admin-options-page.php:547
    423433msgid "Email Message"
    424434msgstr ""
    425435
    426 #: admin/review-admin-options-page.php:443
     436#: admin/review-admin-options-page.php:461
    427437msgid "Enter the email message for review notifications."
    428438msgstr ""
    429439
    430 #: admin/review-admin-options-page.php:460
     440#: admin/review-admin-options-page.php:478
    431441msgid "Review Acceptance"
    432442msgstr ""
    433443
    434 #: admin/review-admin-options-page.php:464
     444#: admin/review-admin-options-page.php:482
    435445msgid "Enable this option to notify the reviewer via email when their review is accepted."
    436446msgstr ""
    437447
    438 #: admin/review-admin-options-page.php:476
     448#: admin/review-admin-options-page.php:494
    439449msgid "Enter the email subject for review acceptance notifications."
    440450msgstr ""
    441451
    442 #: admin/review-admin-options-page.php:486
     452#: admin/review-admin-options-page.php:504
    443453msgid "Enter the email message for review acceptance notifications."
    444454msgstr ""
    445455
    446 #: admin/review-admin-options-page.php:503
     456#: admin/review-admin-options-page.php:521
    447457msgid "Review Denial"
    448458msgstr ""
    449459
    450 #: admin/review-admin-options-page.php:507
     460#: admin/review-admin-options-page.php:525
    451461msgid "Enable this option to notify the reviewer via email when their review is denied."
    452462msgstr ""
    453463
    454 #: admin/review-admin-options-page.php:520
     464#: admin/review-admin-options-page.php:538
    455465msgid "Enter the email subject for review denial notifications."
    456466msgstr ""
    457467
    458 #: admin/review-admin-options-page.php:530
     468#: admin/review-admin-options-page.php:548
    459469msgid "Enter the email message for review denial notifications."
    460470msgstr ""
     
    481491#: admin/wbcom/templates/wbcom-license-page.php:29
    482492#: admin/wbcom/templates/wbcom-license-page.php:41
    483 #: includes/bgr-filters.php:661
     493#: includes/bgr-filters.php:669
    484494msgid "Status"
    485495msgstr ""
     
    11311141
    11321142#: admin/wbcom/wbcom-admin-settings.php:211
    1133 #: includes/bgr-scripts.php:232
     1143#: includes/bgr-scripts.php:252
    11341144msgid "Activate"
    11351145msgstr ""
    11361146
    11371147#: admin/wbcom/wbcom-admin-settings.php:212
    1138 #: includes/bgr-scripts.php:233
     1148#: includes/bgr-scripts.php:253
    11391149msgid "Deactivate"
    11401150msgstr ""
     
    11581168
    11591169#: admin/wbcom/wbcom-admin-settings.php:328
    1160 #: review-bp-grps.php:163
     1170#: review-bp-grps.php:162
    11611171msgid "Settings"
    11621172msgstr ""
     
    11871197#: includes/bgr-ajax.php:191
    11881198#: includes/bgr-ajax.php:229
    1189 #: includes/bgr-ajax.php:360
    1190 #: includes/bgr-ajax.php:610
    1191 #: includes/bgr-ajax.php:725
    1192 #: includes/bgr-ajax.php:834
    1193 #: includes/bgr-filters.php:625
     1199#: includes/bgr-ajax.php:395
     1200#: includes/bgr-ajax.php:643
     1201#: includes/bgr-ajax.php:758
     1202#: includes/bgr-ajax.php:867
     1203#: includes/bgr-filters.php:633
     1204#: includes/bgr-group-criteria-ajax.php:23
     1205#: includes/bgr-group-criteria-ajax.php:75
     1206#: includes/bgr-group-criteria-ajax.php:124
     1207#: includes/bgr-group-criteria-ajax.php:162
     1208#: includes/bgr-group-criteria-ajax.php:200
     1209#: includes/bgr-group-criteria-ajax.php:239
    11941210msgid "Security check failed."
    11951211msgstr ""
     
    12141230#: includes/bgr-ajax.php:200
    12151231#: includes/bgr-ajax.php:238
    1216 #: includes/bgr-ajax.php:622
    1217 #: includes/bgr-ajax.php:736
    1218 #: includes/bgr-ajax.php:844
    1219 #: includes/bgr-bp-rest-integration.php:509
    1220 #: includes/bgr-bp-rest-integration.php:537
    1221 #: includes/bgr-bp-rest-integration.php:577
    1222 #: includes/bgr-bp-rest-integration.php:648
    1223 #: includes/bgr-bp-rest-integration.php:669
     1232#: includes/bgr-ajax.php:655
     1233#: includes/bgr-ajax.php:769
     1234#: includes/bgr-ajax.php:877
     1235#: includes/bgr-bp-rest-integration.php:515
     1236#: includes/bgr-bp-rest-integration.php:543
     1237#: includes/bgr-bp-rest-integration.php:589
     1238#: includes/bgr-bp-rest-integration.php:660
     1239#: includes/bgr-bp-rest-integration.php:681
    12241240msgid "Invalid review ID."
    12251241msgstr ""
     
    12271243#: includes/bgr-ajax.php:206
    12281244#: includes/bgr-ajax.php:244
    1229 #: includes/bgr-ajax.php:628
    1230 #: includes/bgr-ajax.php:742
    1231 #: includes/bgr-ajax.php:850
     1245#: includes/bgr-ajax.php:661
     1246#: includes/bgr-ajax.php:775
     1247#: includes/bgr-ajax.php:883
    12321248#: includes/templates/bgr-single-review-template.php:25
    12331249#: includes/templates/bgr-single-review-template.php:33
     
    12351251msgstr ""
    12361252
    1237 #: includes/bgr-ajax.php:364
     1253#: includes/bgr-ajax.php:399
    12381254msgid "You must be logged in to submit a review."
    12391255msgstr ""
    12401256
    1241 #: includes/bgr-ajax.php:373
     1257#: includes/bgr-ajax.php:408
    12421258msgid "Invalid form data."
    12431259msgstr ""
    12441260
    1245 #: includes/bgr-ajax.php:382
    1246 msgid "Review description is required."
    1247 msgstr ""
    1248 
    1249 #: includes/bgr-ajax.php:387
     1261#: includes/bgr-ajax.php:417
    12501262msgid "Invalid group."
    12511263msgstr ""
    12521264
    1253 #: includes/bgr-ajax.php:394
     1265#: includes/bgr-ajax.php:424
    12541266msgid "Group not found."
    12551267msgstr ""
    12561268
    1257 #: includes/bgr-ajax.php:402
     1269#: includes/bgr-ajax.php:432
    12581270msgid "Group administrators cannot review their own groups."
    12591271msgstr ""
    12601272
    1261 #: includes/bgr-ajax.php:407
     1273#: includes/bgr-ajax.php:437
    12621274#: includes/bgr-bp-rest-integration.php:430
    12631275msgid "You must be a member of this group to submit a review."
    12641276msgstr ""
    12651277
    1266 #: includes/bgr-ajax.php:414
     1278#: includes/bgr-ajax.php:444
    12671279msgid "Reviews are not enabled for this group."
    12681280msgstr ""
    12691281
    12701282#. Translators: %1$s: Review Label
    1271 #: includes/bgr-ajax.php:428
     1283#: includes/bgr-ajax.php:461
    12721284#, php-format
    12731285msgid "A new %1$s posted."
     
    12751287
    12761288#. Translators: %1$s: Review Label %2$s Group Name %3$s User Name %4$s User Link
    1277 #: includes/bgr-ajax.php:430
     1289#: includes/bgr-ajax.php:463
    12781290#, php-format
    12791291msgid "A new %1$s for %2$s added by %3$s. Link: %4$s"
     
    12811293
    12821294#. Translators: %1$s: User Name %2$s Review Label %3$s Group Name
    1283 #: includes/bgr-ajax.php:433
     1295#: includes/bgr-ajax.php:466
    12841296#, php-format
    12851297msgid "%1$s %2$ss Group %3$s."
     
    12871299
    12881300#. translators: %1$s is replaced with review_label
    1289 #: includes/bgr-ajax.php:463
     1301#: includes/bgr-ajax.php:496
    12901302#, php-format
    12911303msgid "You have already submitted a %1$s for this group."
    12921304msgstr ""
    12931305
    1294 #: includes/bgr-ajax.php:470
     1306#: includes/bgr-ajax.php:503
    12951307msgid "Please wait, your review is being processed."
    12961308msgstr ""
    12971309
    12981310#. translators: %1$s is replaced with review_label
    1299 #: includes/bgr-ajax.php:480
     1311#: includes/bgr-ajax.php:513
    13001312#, php-format
    13011313msgid "Thank you for sharing your %1$s!"
     
    13031315
    13041316#. translators: %1$s is replaced with review_label
    1305 #: includes/bgr-ajax.php:484
     1317#: includes/bgr-ajax.php:517
    13061318#, php-format
    13071319msgid "Thank you for your %1$s! It will be published after the group admin approves it."
    13081320msgstr ""
    13091321
    1310 #: includes/bgr-ajax.php:509
     1322#: includes/bgr-ajax.php:542
    13111323msgid "Failed to create review. Please try again."
    13121324msgstr ""
    13131325
    13141326#. translators: %1$s: review label, %2$s: group name
    1315 #: includes/bgr-ajax.php:547
     1327#: includes/bgr-ajax.php:580
    13161328#, php-format
    13171329msgid "New %1$s submitted for %2$s"
    13181330msgstr ""
    13191331
    1320 #: includes/bgr-ajax.php:614
    1321 #: includes/bgr-ajax.php:729
    1322 #: includes/bgr-ajax.php:838
     1332#: includes/bgr-ajax.php:647
     1333#: includes/bgr-ajax.php:762
     1334#: includes/bgr-ajax.php:871
    13231335msgid "You must be logged in."
    13241336msgstr ""
    13251337
    1326 #: includes/bgr-ajax.php:634
    1327 #: includes/bgr-ajax.php:748
    1328 #: includes/bgr-ajax.php:856
     1338#: includes/bgr-ajax.php:667
     1339#: includes/bgr-ajax.php:781
     1340#: includes/bgr-ajax.php:889
    13291341msgid "Invalid group for this review."
    13301342msgstr ""
    13311343
    1332 #: includes/bgr-ajax.php:640
    1333 #: includes/bgr-ajax.php:754
     1344#: includes/bgr-ajax.php:673
     1345#: includes/bgr-ajax.php:787
    13341346msgid "You do not have permission to manage reviews for this group."
    13351347msgstr ""
    13361348
    13371349#. translators: %1$s: review label, %2$s: group name
    1338 #: includes/bgr-ajax.php:679
     1350#: includes/bgr-ajax.php:712
    13391351#, php-format
    13401352msgid "Your %1$s for %2$s has been approved"
     
    13421354
    13431355#. translators: %1$s: review label, %2$s: group name
    1344 #: includes/bgr-ajax.php:790
     1356#: includes/bgr-ajax.php:823
    13451357#, php-format
    13461358msgid "Your %1$s for %2$s was not approved"
    13471359msgstr ""
    13481360
    1349 #: includes/bgr-ajax.php:862
     1361#: includes/bgr-ajax.php:895
    13501362msgid "You do not have permission to remove reviews for this group."
    13511363msgstr ""
     
    13721384
    13731385#: includes/bgr-bp-rest-integration.php:420
     1386#: includes/bgr-group-criteria-ajax.php:30
     1387#: includes/bgr-group-criteria-ajax.php:245
    13741388msgid "Invalid group ID."
    13751389msgstr ""
     
    13871401msgstr ""
    13881402
    1389 #: includes/bgr-bp-rest-integration.php:515
     1403#: includes/bgr-bp-rest-integration.php:521
    13901404msgid "Review does not belong to this group."
    13911405msgstr ""
    13921406
    1393 #: includes/bgr-bp-rest-integration.php:583
     1407#: includes/bgr-bp-rest-integration.php:595
    13941408msgid "The review could not be deleted."
    13951409msgstr ""
    13961410
    1397 #: includes/bgr-bp-rest-integration.php:652
     1411#: includes/bgr-bp-rest-integration.php:664
    13981412msgid "You do not have permission to edit this review."
    13991413msgstr ""
    14001414
    1401 #: includes/bgr-bp-rest-integration.php:673
     1415#: includes/bgr-bp-rest-integration.php:685
    14021416msgid "You do not have permission to delete this review."
    14031417msgstr ""
    14041418
    1405 #: includes/bgr-bp-rest-integration.php:691
     1419#: includes/bgr-bp-rest-integration.php:703
    14061420msgid "Review ID."
    14071421msgstr ""
    14081422
    1409 #: includes/bgr-bp-rest-integration.php:697
     1423#: includes/bgr-bp-rest-integration.php:709
    14101424msgid "Group ID."
    14111425msgstr ""
    14121426
    1413 #: includes/bgr-bp-rest-integration.php:703
     1427#: includes/bgr-bp-rest-integration.php:715
    14141428msgid "Review title."
    14151429msgstr ""
    14161430
    1417 #: includes/bgr-bp-rest-integration.php:709
     1431#: includes/bgr-bp-rest-integration.php:721
    14181432msgid "Review content."
    14191433msgstr ""
    14201434
    1421 #: includes/bgr-bp-rest-integration.php:715
     1435#: includes/bgr-bp-rest-integration.php:727
    14221436msgid "Review status."
    14231437msgstr ""
    14241438
    1425 #: includes/bgr-bp-rest-integration.php:721
     1439#: includes/bgr-bp-rest-integration.php:733
    14261440msgid "Review author."
    14271441msgstr ""
    14281442
    1429 #: includes/bgr-bp-rest-integration.php:727
     1443#: includes/bgr-bp-rest-integration.php:739
    14301444msgid "Star ratings by criteria."
    14311445msgstr ""
    14321446
    1433 #: includes/bgr-bp-rest-integration.php:732
     1447#: includes/bgr-bp-rest-integration.php:744
    14341448msgid "Creation date."
    14351449msgstr ""
    14361450
    1437 #: includes/bgr-bp-rest-integration.php:739
     1451#: includes/bgr-bp-rest-integration.php:751
    14381452msgid "Last modified date."
    14391453msgstr ""
    14401454
    14411455#. translators: %1$s is replaced with bp_group_review_add_review_tab_name()
    1442 #: includes/bgr-filters.php:263
     1456#: includes/bgr-filters.php:271
    14431457#, php-format
    14441458msgid "Add %1$s"
    14451459msgstr ""
    14461460
    1447 #: includes/bgr-filters.php:447
     1461#: includes/bgr-filters.php:455
    14481462msgid "Rating "
    14491463msgstr ""
    14501464
    1451 #: includes/bgr-filters.php:468
    1452 #: includes/bgr-filters.php:754
     1465#: includes/bgr-filters.php:476
     1466#: includes/bgr-filters.php:762
    14531467msgid "Approve"
    14541468msgstr ""
    14551469
    1456 #: includes/bgr-filters.php:469
    1457 #: includes/bgr-filters.php:759
    1458 #: includes/bgr-grp-extn.php:210
     1470#: includes/bgr-filters.php:477
     1471#: includes/bgr-filters.php:767
     1472#: includes/bgr-grp-extn.php:216
    14591473msgid "Deny"
    14601474msgstr ""
    14611475
    14621476#. translators: %d: number of reviews
    1463 #: includes/bgr-filters.php:555
     1477#: includes/bgr-filters.php:563
    14641478#, php-format
    14651479msgid "%d review approved."
     
    14691483
    14701484#. translators: %d: number of reviews
    1471 #: includes/bgr-filters.php:567
     1485#: includes/bgr-filters.php:575
    14721486#, php-format
    14731487msgid "%d review denied and moved to trash."
     
    14761490msgstr[1] ""
    14771491
    1478 #: includes/bgr-filters.php:604
     1492#: includes/bgr-filters.php:612
    14791493msgid "Export to CSV"
    14801494msgstr ""
    14811495
    1482 #: includes/bgr-filters.php:621
     1496#: includes/bgr-filters.php:629
    14831497msgid "You do not have permission to export reviews."
    14841498msgstr ""
    14851499
    1486 #: includes/bgr-filters.php:659
     1500#: includes/bgr-filters.php:667
    14871501msgid "Review ID"
    14881502msgstr ""
    14891503
    1490 #: includes/bgr-filters.php:660
     1504#: includes/bgr-filters.php:668
    14911505msgid "Date"
    14921506msgstr ""
    14931507
    1494 #: includes/bgr-filters.php:662
     1508#: includes/bgr-filters.php:670
    14951509msgid "Reviewer"
    14961510msgstr ""
    14971511
    1498 #: includes/bgr-filters.php:663
     1512#: includes/bgr-filters.php:671
    14991513msgid "Reviewer Email"
    15001514msgstr ""
    15011515
    1502 #: includes/bgr-filters.php:664
     1516#: includes/bgr-filters.php:672
    15031517msgid "Group Name"
    15041518msgstr ""
    15051519
    1506 #: includes/bgr-filters.php:665
     1520#: includes/bgr-filters.php:673
    15071521msgid "Group ID"
    15081522msgstr ""
    15091523
    1510 #: includes/bgr-filters.php:666
     1524#: includes/bgr-filters.php:674
    15111525msgid "Review Content"
    15121526msgstr ""
    15131527
    1514 #: includes/bgr-filters.php:667
     1528#: includes/bgr-filters.php:675
    15151529msgid "Average Rating"
    15161530msgstr ""
    15171531
    1518 #: includes/bgr-filters.php:672
    1519 #: includes/bgr-rating-display.php:155
     1532#: includes/bgr-filters.php:680
     1533#: includes/bgr-rating-display.php:181
    15201534msgid "Rating"
    15211535msgstr ""
    15221536
    1523 #: includes/bgr-filters.php:683
     1537#: includes/bgr-filters.php:691
    15241538msgid "Unknown Group"
    15251539msgstr ""
    15261540
    1527 #: includes/bgr-filters.php:696
     1541#: includes/bgr-filters.php:704
    15281542msgid "Unknown"
    15291543msgstr ""
    15301544
    1531 #: includes/bgr-filters.php:750
     1545#: includes/bgr-filters.php:758
    15321546msgid "View"
    15331547msgstr ""
    15341548
    15351549#. translators: %s: review label (e.g., "Review")
    1536 #: includes/bgr-filters.php:841
    1537 #: includes/bgr-filters.php:867
    1538 #: includes/bgr-filters.php:893
     1550#: includes/bgr-filters.php:862
     1551#: includes/bgr-filters.php:892
     1552#: includes/bgr-filters.php:922
    15391553#, php-format
    15401554msgid "Adds %s"
    15411555msgstr ""
    15421556
    1543 #: includes/bgr-filters.php:980
     1557#: includes/bgr-filters.php:1007
    15441558msgid "Your Response added. This will be published when group admin has approved it."
    15451559msgstr ""
    15461560
    1547 #: includes/bgr-filters.php:997
     1561#: includes/bgr-filters.php:1024
    15481562msgid "Give Group Review"
     1563msgstr ""
     1564
     1565#: includes/bgr-group-criteria-ajax.php:35
     1566#: includes/bgr-group-criteria-ajax.php:86
     1567#: includes/bgr-group-criteria-ajax.php:135
     1568#: includes/bgr-group-criteria-ajax.php:173
     1569#: includes/bgr-group-criteria-ajax.php:212
     1570msgid "You do not have permission to manage this group."
     1571msgstr ""
     1572
     1573#: includes/bgr-group-criteria-ajax.php:60
     1574msgid "Criteria settings saved successfully."
     1575msgstr ""
     1576
     1577#: includes/bgr-group-criteria-ajax.php:82
     1578#: includes/bgr-group-criteria-ajax.php:131
     1579#: includes/bgr-group-criteria-ajax.php:169
     1580#: includes/bgr-group-criteria-ajax.php:208
     1581msgid "Invalid group ID or criteria name."
     1582msgstr ""
     1583
     1584#: includes/bgr-group-criteria-ajax.php:93
     1585msgid "Criteria name must be 50 characters or less."
     1586msgstr ""
     1587
     1588#: includes/bgr-group-criteria-ajax.php:98
     1589msgid "A global criterion with this name already exists."
     1590msgstr ""
     1591
     1592#: includes/bgr-group-criteria-ajax.php:106
     1593msgid "Custom criterion added successfully."
     1594msgstr ""
     1595
     1596#: includes/bgr-group-criteria-ajax.php:111
     1597msgid "A criterion with this name already exists."
     1598msgstr ""
     1599
     1600#: includes/bgr-group-criteria-ajax.php:144
     1601msgid "Criterion archived successfully."
     1602msgstr ""
     1603
     1604#: includes/bgr-group-criteria-ajax.php:149
     1605msgid "Failed to archive criterion."
     1606msgstr ""
     1607
     1608#: includes/bgr-group-criteria-ajax.php:182
     1609msgid "Criterion deleted successfully."
     1610msgstr ""
     1611
     1612#: includes/bgr-group-criteria-ajax.php:187
     1613msgid "Failed to delete criterion."
     1614msgstr ""
     1615
     1616#: includes/bgr-group-criteria-ajax.php:221
     1617msgid "Criterion enabled."
     1618msgstr ""
     1619
     1620#: includes/bgr-group-criteria-ajax.php:221
     1621msgid "Criterion disabled."
     1622msgstr ""
     1623
     1624#: includes/bgr-group-criteria-ajax.php:226
     1625msgid "Failed to update criterion."
    15491626msgstr ""
    15501627
     
    15561633msgstr ""
    15571634
    1558 #: includes/bgr-grp-extn.php:178
     1635#: includes/bgr-grp-extn.php:182
    15591636msgid "Short Description "
    15601637msgstr ""
    15611638
    1562 #: includes/bgr-grp-extn.php:195
     1639#: includes/bgr-grp-extn.php:196
    15631640msgid "Full Description"
    15641641msgstr ""
    15651642
    1566 #: includes/bgr-grp-extn.php:201
     1643#: includes/bgr-grp-extn.php:202
    15671644#: includes/bgr-scripts.php:180
    15681645msgid "View More.."
    15691646msgstr ""
    15701647
    1571 #: includes/bgr-grp-extn.php:207
     1648#: includes/bgr-grp-extn.php:213
    15721649msgid "Accept"
    15731650msgstr ""
    15741651
    1575 #: includes/bgr-grp-extn.php:231
     1652#: includes/bgr-grp-extn.php:237
    15761653msgid "Prev"
    15771654msgstr ""
    15781655
    1579 #: includes/bgr-grp-extn.php:232
     1656#: includes/bgr-grp-extn.php:238
    15801657msgid "Next"
    15811658msgstr ""
    15821659
    15831660#. translators: %s is replaced with review_label
    1584 #: includes/bgr-grp-extn.php:254
     1661#: includes/bgr-grp-extn.php:260
    15851662#, php-format
    15861663msgid "Sorry, no %s were found."
     
    16211698#, php-format
    16221699msgid "Your %1$s for %2$s was denied by the group admin."
     1700msgstr ""
     1701
     1702#: includes/bgr-rating-display.php:126
     1703msgid "This criterion is no longer active"
     1704msgstr ""
     1705
     1706#: includes/bgr-rating-display.php:127
     1707msgid "legacy"
    16231708msgstr ""
    16241709
     
    16331718
    16341719#. translators: %1$s is used for review lable
    1635 #: includes/bgr-shortcodes.php:80
     1720#: includes/bgr-shortcodes.php:84
    16361721#, php-format
    16371722msgid "You should %1$s for post %2$s."
    16381723msgstr ""
    16391724
    1640 #: includes/bgr-shortcodes.php:81
     1725#: includes/bgr-shortcodes.php:85
    16411726msgid "login"
    16421727msgstr ""
    16431728
    16441729#. translators: %1$s is used for review label
    1645 #: includes/bgr-shortcodes.php:108
     1730#: includes/bgr-shortcodes.php:112
    16461731#, php-format
    16471732msgid "You already posted a %1$s for this group."
     
    16491734
    16501735#. translators: %1$s is used for review label
    1651 #: includes/bgr-shortcodes.php:167
     1736#: includes/bgr-shortcodes.php:171
    16521737#, php-format
    16531738msgid "Write a %1$s"
    16541739msgstr ""
    16551740
    1656 #: includes/bgr-shortcodes.php:176
    1657 #: includes/bgr-shortcodes.php:246
    1658 #: includes/bgr-shortcodes.php:266
     1741#. translators: %s: search term
     1742#: includes/bgr-shortcodes.php:181
     1743#, php-format
     1744msgid "%1$s Description (optional)"
     1745msgstr ""
     1746
     1747#. translators: %1$s is used for review label
     1748#: includes/bgr-shortcodes.php:189
     1749#, php-format
     1750msgid "Submit %1$s"
     1751msgstr ""
     1752
     1753#: includes/bgr-shortcodes.php:259
     1754#: includes/bgr-shortcodes.php:279
    16591755msgid "This field is required."
    16601756msgstr ""
    16611757
    1662 #. translators: %s: search term
    1663 #: includes/bgr-shortcodes.php:178
    1664 #, php-format
    1665 msgid "%1$s Description"
    1666 msgstr ""
    1667 
    1668 #. translators: %1$s is used for review label
    1669 #: includes/bgr-shortcodes.php:186
    1670 #, php-format
    1671 msgid "Submit %1$s"
    1672 msgstr ""
    1673 
    1674 #: includes/bgr-shortcodes.php:258
     1758#: includes/bgr-shortcodes.php:271
    16751759msgid "Your Rating"
    16761760msgstr ""
     
    16921776#, php-format
    16931777msgid "%1$s requires BuddyPress to be active on this subsite. The plugin has been deactivated."
     1778msgstr ""
     1779
     1780#: includes/templates/bgr-group-criteria-settings.php:33
     1781msgid "Criteria Mode"
     1782msgstr ""
     1783
     1784#: includes/templates/bgr-group-criteria-settings.php:34
     1785msgid "Choose whether to use site-wide criteria or customize criteria for this group."
     1786msgstr ""
     1787
     1788#: includes/templates/bgr-group-criteria-settings.php:40
     1789msgid "Use site-wide criteria"
     1790msgstr ""
     1791
     1792#: includes/templates/bgr-group-criteria-settings.php:41
     1793msgid "Reviews will use the default criteria set by the site administrator."
     1794msgstr ""
     1795
     1796#: includes/templates/bgr-group-criteria-settings.php:48
     1797msgid "Customize criteria for this group"
     1798msgstr ""
     1799
     1800#: includes/templates/bgr-group-criteria-settings.php:49
     1801msgid "Choose which criteria to enable and add custom criteria for this group."
     1802msgstr ""
     1803
     1804#: includes/templates/bgr-group-criteria-settings.php:59
     1805msgid "Site-Wide Criteria"
     1806msgstr ""
     1807
     1808#: includes/templates/bgr-group-criteria-settings.php:60
     1809msgid "Select which site-wide criteria to enable for this group."
     1810msgstr ""
     1811
     1812#: includes/templates/bgr-group-criteria-settings.php:73
     1813msgid "Inactive globally"
     1814msgstr ""
     1815
     1816#: includes/templates/bgr-group-criteria-settings.php:78
     1817msgid "No site-wide criteria defined."
     1818msgstr ""
     1819
     1820#: includes/templates/bgr-group-criteria-settings.php:86
     1821msgid "Custom Criteria"
     1822msgstr ""
     1823
     1824#: includes/templates/bgr-group-criteria-settings.php:87
     1825msgid "Add custom criteria specific to this group."
     1826msgstr ""
     1827
     1828#: includes/templates/bgr-group-criteria-settings.php:96
     1829msgid "Archive"
     1830msgstr ""
     1831
     1832#: includes/templates/bgr-group-criteria-settings.php:105
     1833msgid "Enter criteria name..."
     1834msgstr ""
     1835
     1836#: includes/templates/bgr-group-criteria-settings.php:107
     1837msgid "Add Criteria"
     1838msgstr ""
     1839
     1840#: includes/templates/bgr-group-criteria-settings.php:122
     1841msgid "Archived Criteria"
     1842msgstr ""
     1843
     1844#: includes/templates/bgr-group-criteria-settings.php:123
     1845msgid "These criteria are no longer active but may have historical reviews."
     1846msgstr ""
     1847
     1848#: includes/templates/bgr-group-criteria-settings.php:128
     1849#: includes/templates/bgr-group-criteria-settings.php:140
     1850msgid "Archived"
     1851msgstr ""
     1852
     1853#: includes/templates/bgr-group-criteria-settings.php:138
     1854msgid "Global criteria removed"
     1855msgstr ""
     1856
     1857#: includes/templates/bgr-group-criteria-settings.php:155
     1858msgid "Save Criteria Settings"
     1859msgstr ""
     1860
     1861#: includes/templates/bgr-group-criteria-settings.php:161
     1862msgid "Current Active Criteria"
     1863msgstr ""
     1864
     1865#: includes/templates/bgr-group-criteria-settings.php:162
     1866msgid "These criteria will be shown on the review form for this group."
    16941867msgstr ""
    16951868
     
    18452018msgstr ""
    18462019
    1847 #: review-bp-grps.php:150
     2020#: review-bp-grps.php:149
    18482021msgid "BuddyPress Group Reviews requires the BuddyPress Groups Component to be active."
    18492022msgstr ""
  • review-buddypress-groups/trunk/readme.txt

    r3430846 r3431049  
    66Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 3.6.0
     8Stable tag: 3.7.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    110110
    111111== Changelog ==
     112
     113= 3.7.0 =
     114* New: Group-Level Review Criteria - Group admins can now customize review criteria for their specific groups
     115* New: Site admin toggle to enable/disable group-level criteria customization
     116* New: Groups can use global criteria, select specific criteria, or add custom criteria
     117* New: Archived criteria tracking when global criteria are deactivated
     118* Fixed: jQuery deprecation warnings for .submit(), .mouseenter(), .mouseleave() methods
     119* Fixed: Added missing CSS file for group criteria admin panel
     120* Improved: Better separation of global vs group-specific review criteria
    112121
    113122= 3.6.0 =
  • review-buddypress-groups/trunk/review-bp-grps.php

    r3430846 r3431049  
    1616 * Plugin URI: https://wbcomdesigns.com/contact/
    1717 * Description: This plugin allows BuddyPress Members to give reviews to BuddyPress groups on the site. The review form allows users to give text reviews and even rate the group based on multiple criteria.
    18  * Version: 3.6.0
     18 * Version: 3.7.0
    1919 * Author: Wbcom Designs
    2020 * Author URI: http://wbcomdesigns.com
     
    4646function bp_group_review_load_textdomain() {
    4747    $domain = 'bp-group-reviews';
    48     load_plugin_textdomain( $domain, false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
     48    load_plugin_textdomain( $domain, false, plugin_basename( __DIR__ ) . '/languages' );
    4949}
    5050
     
    5555 *  @author  Wbcom Designs
    5656*/
    57 define( 'BGR_PLUGIN_VERSION', '3.6.0' );
     57define( 'BGR_PLUGIN_VERSION', '3.7.0' );
    5858define( 'BGR_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
    5959define( 'BGR_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    6060
    6161if ( ! defined( 'BP_ROOT_BLOG' ) ) {
    62     define( 'BP_ROOT_BLOG', 1 );
     62    define( 'BP_ROOT_BLOG', 1 );
    6363}
    6464
     
    120120function bp_group_review_admin_notice() {
    121121    if ( is_multisite() ) {
    122         return;
    123     }
     122        return;
     123    }
    124124    $bpquotes_plugin = esc_html__( 'BuddyPress Group Reviews', 'bp-group-reviews' );
    125125    $bp_plugin       = esc_html__( 'BuddyPress', 'bp-group-reviews' );
    126126    echo '<div class="error"><p>';
    127     if( class_exists( 'BuddyPress' ) ){
    128         if(  ! bp_is_active( 'groups' ) ){
    129             $bp_gp_component       = esc_html__( 'BuddyPress Groups Component', 'bp-group-reviews' );
     127    if ( class_exists( 'BuddyPress' ) ) {
     128        if ( ! bp_is_active( 'groups' ) ) {
     129            $bp_gp_component = esc_html__( 'BuddyPress Groups Component', 'bp-group-reviews' );
    130130            /* translators: %s: search term */
    131             echo sprintf( esc_html__( '%1$s requires %2$s to be installed and active, and the %3$s to be enabled.', 'bp-group-reviews' ), '<strong>' . esc_html( $bpquotes_plugin ) . '</strong>', '<strong>' . esc_html( $bp_plugin ) . '</strong>', '<strong>' . esc_html( $bp_gp_component ) . '</strong>' );
     131            printf( esc_html__( '%1$s requires %2$s to be installed and active, and the %3$s to be enabled.', 'bp-group-reviews' ), '<strong>' . esc_html( $bpquotes_plugin ) . '</strong>', '<strong>' . esc_html( $bp_plugin ) . '</strong>', '<strong>' . esc_html( $bp_gp_component ) . '</strong>' );
    132132        }
    133133    } else {
    134134        /* translators: %s: search term */
    135             echo sprintf( esc_html__( '%1$s requires %2$s to be installed and active.', 'bp-group-reviews' ), '<strong>' . esc_html( $bpquotes_plugin ) . '</strong>', '<strong>' . esc_html( $bp_plugin ) . '</strong>' );
     135            printf( esc_html__( '%1$s requires %2$s to be installed and active.', 'bp-group-reviews' ), '<strong>' . esc_html( $bpquotes_plugin ) . '</strong>', '<strong>' . esc_html( $bp_plugin ) . '</strong>' );
    136136    }
    137137    echo '</p></div>';
    138 
    139138}
    140139
     
    196195        'includes/widgets/group-rating.php',
    197196        'includes/bgr-functions.php',
     197        'includes/class-bgr-group-criteria.php',
     198        'includes/bgr-group-criteria-functions.php',
     199        'includes/bgr-group-criteria-ajax.php',
    198200    );
    199201    foreach ( $include_files as $include_file ) {
     
    202204        }
    203205    }
     206
     207    // Initialize the group criteria singleton to register its hooks.
     208    if ( class_exists( 'BGR_Group_Criteria' ) ) {
     209        BGR_Group_Criteria::get_instance();
     210    }
    204211}
    205212
     
    209216 * @return void
    210217 */
    211 function  bp_group_review_add_multi_support(){
     218function bp_group_review_add_multi_support() {
    212219    include 'includes/class-bgr-multi-support.php';
    213220}
     
    230237        }
    231238    }
    232 
    233239}
    234240add_action( 'activated_plugin', 'bp_group_review_activation_redirect_settings' );
Note: See TracChangeset for help on using the changeset viewer.