Gifari Industries - BD Cyber Security Team
Home
/
home
/
decohaslibrary
/
bist
/
wp-content
/
plugins
/
user-registration
/
assets
/
js
/
admin
/
✏️
Editing: live-user-notice.min.js
jQuery(function(t){"use strict";var e={init:function(){"undefined"!=typeof wp.heartbeat&&wp.heartbeat.interval("fast"),this.sendDataToHeartbeat(),this.handleHeartbeatResponse()},sendDataToHeartbeat:function(){t(document).on("heartbeat-send",function(t,e){e.user_registration_new_user_notice=!0})},handleHeartbeatResponse:function(){t(document).on("heartbeat-tick",function(e,n){var r=t("#menu-users .wp-menu-name"),i=t("body.users-php .wp-list-table.users"),a=i.find("thead tr:first-child td, thead tr:first-child th").length;"undefined"!=typeof n.user_registration_new_user_count&&i&&(n.user_registration_new_user_count>0?(r.find(".user-registration").length||r.append('<span class="user-registration awaiting-mod"><span class="user-count">'+n.user_registration_new_user_count+"</span></span>"),i.find("tr.ur-user-notification").length||i.find("thead").append('<tr class="ur-user-notification"><td colspan="'+a+'"><a href="javascript:void()" onClick="window.location.reload(true);"></a></td></tr>'),r.find(".user-registration .user-count").text(n.user_registration_new_user_count),i.find(".ur-user-notification a").html(n.user_registration_new_user_message).slideDown({duration:500,start:function(){t(this).css("display","block")}})):(r.find(".user-registration").remove(),i.find("tr.ur-user-notification").remove()),"undefined"!=typeof wp.heartbeat&&wp.heartbeat.interval("standard"))})}};t(document).ready(function(){e.init()})}(jQuery));
💾 Save
❌ Cancel