jQuery(
(function ($) {
"use strict";
var URLiveUser = {
init: function () {
typeof wp.heartbeat !== "undefined" &&
wp.heartbeat.interval("fast");
this.sendDataToHeartbeat();
this.handleHeartbeatResponse();
},
sendDataToHeartbeat: function () {
$(document).on("heartbeat-send", function (event, data) {
data.user_registration_new_user_notice = true;
});
},
handleHeartbeatResponse: function () {
$(document).on("heartbeat-tick", function (event, data) {
var $user_menu = $("#menu-users .wp-menu-name"),
$user_list = $("body.users-php .wp-list-table.users"),
columnsCount = $user_list.find(
"thead tr:first-child td, thead tr:first-child th"
).length;
if (
typeof data.user_registration_new_user_count ===
"undefined" ||
!$user_list
) {
return;
}
if (data.user_registration_new_user_count > 0) {
if (!$user_menu.find(".user-registration").length) {
$user_menu.append(
'
' +
data.user_registration_new_user_count +
""
);
}
if (
!$user_list.find("tr.ur-user-notification").length
) {
$user_list
.find("thead")
.append(
'
'
);
}
$user_menu
.find(".user-registration .user-count")
.text(data.user_registration_new_user_count);
$user_list
.find(".ur-user-notification a")
.html(data.user_registration_new_user_message)
.slideDown({
duration: 500,
start: function () {
$(this).css("display", "block");
},
});
} else {
$user_menu.find(".user-registration").remove();
$user_list.find("tr.ur-user-notification").remove();
}
typeof wp.heartbeat !== "undefined" &&
wp.heartbeat.interval("standard");
});
},
};
$(document).ready(function () {
URLiveUser.init();
});
})(jQuery)
);
(function($) {
$(document).ready(function() {
var file_frame;
$('select.blog').change(function() {
var blog = $(this).val();
if (blog != '') {
var postbox = $(this).parents('div.postbox');
postbox.find('select.author').html('
');
postbox.find('select.altauthor').html('
');
postbox.find('select.cat').html('
');
$.getJSON(ajaxurl, {action: 'autoblog-get-blog-authors', id: blog, nocache: new Date().getTime()}, function(ret) {
var opts = "";
for (var author in ret.data) {
opts += "
";
}
postbox.find('select.altauthor').html(opts);
opts = '
' + opts;
postbox.find('select.author').html(opts);
});
$.getJSON(ajaxurl, {action: 'autoblog-get-blog-categories', id: blog, nocache: new Date().getTime()}, function(ret) {
var opts = "";
for (var cat in ret.data) {
opts += "
";
}
postbox.find('select.cat').html(opts);
});
}
});
$('#abtble_posttype').change(function() {
var post_type = $(this).val();
$('#abtble_feedcatsare option').each(function() {
var $this = $(this),
objects = $this.attr('data-objects');
if (objects) {
if ( objects.split(',').indexOf(post_type) < 0 ) {
$this.attr('disabled', 'disabled');
} else {
$this.removeAttr('disabled');
}
}
});
$("#abtble_feedcatsare").val($('#abtble_feedcatsare option[value]:not(:disabled):first').val());
});
$('#featureddefault_select').click(function(e) {
var $this = $(this);
e.preventDefault();
if (file_frame) {
file_frame.open();
return;
}
file_frame = wp.media.frames.file_frame = wp.media({
title: autoblog.fileframe.title,
button: {text: autoblog.fileframe.button},
multiple: false
});
file_frame.on('select', function() {
var attachment = file_frame.state().get('selection').first().toJSON(),
td = $this.parents('td');
td.find('input').val(attachment.id);
td.find('img').attr('src', attachment.url);
});
file_frame.open();
});
$('#featureddefault_delete').click(function() {
var td = $(this).parents('td');
td.find('input').val('');
td.find('img').attr('src', '');
});
});
})(jQuery);{"version":"1.0","provider_name":"Glitters Studio Pvt. Ltd.","provider_url":"https:\/\/glitters.studio","author_name":"admin","author_url":"https:\/\/glitters.studio\/author\/admin\/","title":"Movie Releases","type":"rich","width":600,"height":338,"html":"
Movie Releases<\/a><\/blockquote>