# ultimate-post-kit/4.5.3/includes/feedback-hub/assets/rc.js

Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider &amp; Blog Layout Widgets, version 4.5.3. 77 lines.

- Page: https://pluginprobe.com/plugins/ultimate-post-kit/4.5.3/code/includes/feedback-hub/assets/rc.js
- Raw: https://pluginprobe.com/plugins/ultimate-post-kit/4.5.3/raw/includes/feedback-hub/assets/rc.js
- Modified: 2026-09-07T07:17:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ultimate-post-kit/4.5.3/code/includes/feedback-hub/assets/rc.js#L10-L20`.

```javascript
(function ($) {
    // console.log('rc.js loaded');
    $(document).on('click', '.rc-button-allow, .rc-button-skip, .rc-button-disallow', function () {
        let nonce = $(this).data('nonce'),
            rc_name = $(this).data('rc_name'),
            date_name = $(this).data('date_name'),
            allow_name = $(this).data('allow_name'),
            review_url = $(this).data('review_url');

        $.ajax({
            url: ajaxurl,
            type: 'POST',
            data: {
                action: 'ultimate_post_kit_reviews_insights',
                button_val: this.value,
                nonce: nonce,
                rc_name: rc_name,
                date_name: date_name,
                allow_name: allow_name,
            },
            success: function (response) {
                if (response.status == 'success') {
                    if ('yes' == response.action) {
                        setTimeout(() => {
                            window.open(review_url, '_blank');
                        }, 500);
                    }
                    setTimeout(() => {
                        location.reload();
                    }, 1500);
                } else {
                    alert(response.message);
                }
            },
        });
    });

    $(document).on('click', '.rc-global-notice .notice-dismiss', function () {
        let rc_name = $(this).closest('.rc-global-notice').find("[name='rc_name']").val(),
                nonce = $(this).closest('.rc-global-notice').find("[name='nonce']").val();

        $.ajax({
            url: ajaxurl,
            type: 'POST',
            data: {
                action: 'ultimate_post_kit_reviews_dismiss_notice',
                nonce: nonce,
                rc_name: rc_name,
            },
        });
    });

    // Show only the first RC notice
    var $notices = $('.rc-global-notice');
    if ($notices.length > 0) {
        $notices.first().show();
    }
    $(document).on('click', '.rc-global-notice .notice-dismiss', function() {
        var $currentNotice = $(this).closest('.rc-global-notice');
        var $nextNotice = $currentNotice.nextAll('.rc-global-notice:first');

        if ($nextNotice.length) {
            $nextNotice.show();
        }
    });
    $('.rc-global-notice button').on('click', function() {
        var $notice = $(this).closest('.rc-global-notice');
        var $nextNotice = $notice.nextAll('.rc-global-notice:first');

        $notice.fadeOut(300, function() {
            if ($nextNotice.length) {
                $nextNotice.fadeIn();
            }
        });
    });

})(jQuery);
```
