: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$(document).ready(function($) {
$("body").on("click", "a.mks-ads-add", function(e) {
var widget_holder = $(this).closest('.widget-inside');
var cloner = widget_holder.find('.mks-ads-clone');
cloner.find('#tab-1').addClass('active');
cloner.find('#tab-1').addClass('active');
widget_holder.find('.mks-ads-container').append(cloner.html());
$(this).trigger('change');
$("body").on("click", ".mks-remove-ad", function(e) {
var deleteItem = confirm('Are you sure you want to delete this ad?');
deleteItem ? $(this).parent('li').remove() : '';
$('.mks-ads-sortable').trigger('change');
$("body").on("click", "ul.mks-tabs li", function() {
var tab_id = $(this).attr('data-tab');
this_tab.siblings('li').removeClass('active');
this_tab.parent('ul').siblings(".mks-tabs-wrapper").find('.mks-tab-content.active').removeClass('active');
this_tab.addClass('active');
var activeTab = this_tab.parent("ul").siblings(".mks-tabs-wrapper").find("#" + tab_id);
activeTab.addClass('active');
var tabType = activeTab.attr('data-type');
activeTab.closest('.mks-tabs-wrapper').find('#tab-type').val(tabType);
/* Trigger change so widget can be saved */
$("body").on("mousedown", ".mks-ads-sortable li", function(e) {
$('.mks-ads-sortable').trigger('change');
$(document).on('widget-added', function(e) {
$(document).on('widget-updated', function(e) {
/* Show/hide custom size */
$("body").on("click", "input.mks-ad-size", function(e) {
if ($(this).val() == 'custom') {
$(this).parent().next().show();
$(this).parent().next().hide();
/* Show/hide rotation speed */
$("body").on("click", "input.mks-ad-rotate", function(e) {
if ($(this).is(":checked")) {
$(this).parent().next().show();
$(this).parent().next().hide();
/* Choose image from media file */
$("body").on("click", "a.mks-ads-select-image-btn", function(e) {
.on('select', function(e) {
var uploaded_image = image.state().get('selection').first();
var thumbImage = uploaded_image.toJSON().url;
this_btn.closest('li').find('.mks-ads-field-width').val(thumbImage);
$('.mks-ads-sortable').trigger('change');
function mks_ads_sortable() {
$(".mks-ads-sortable").sortable({
placeholder: "mks-ads-sortable-drop"
$('body').on('click', '.meks-notice .notice-dismiss', function(){
action: 'meks_remove_notification'