From 3fa8e971e9d92b98e7367f920a8010ce24809c4a Mon Sep 17 00:00:00 2001 From: Mike Hemberger Date: Mon, 4 Jan 2021 13:34:38 -0500 Subject: [PATCH 1/4] Fix deprecated jQuery load() function --- assets/js/admin/customize-controls.js | 5 +---- assets/js/admin/customize-controls.min.js | 2 +- lib/settings/metaboxes/sections.php | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/assets/js/admin/customize-controls.js b/assets/js/admin/customize-controls.js index 5c0e2a4..56596b6 100644 --- a/assets/js/admin/customize-controls.js +++ b/assets/js/admin/customize-controls.js @@ -1,7 +1,4 @@ -jQuery(window).load( function($) { - - var $ = jQuery; - +jQuery( document ).ready( function( $ ) { /** * Slider multicheck. */ diff --git a/assets/js/admin/customize-controls.min.js b/assets/js/admin/customize-controls.min.js index 5bebd74..65586c3 100644 --- a/assets/js/admin/customize-controls.min.js +++ b/assets/js/admin/customize-controls.min.js @@ -1 +1 @@ -jQuery(window).load(function($){var $;($=jQuery)(".customize-control-multicheck").each(function(){$(this).find('input[type="checkbox"]').on("change",function(){checkboxValues=$(this).parents(".customize-control").find('input[type="checkbox"]:checked').map(function(){return this.value}).get().join(","),$(this).parents(".customize-control").find('input[type="hidden"]').val(checkboxValues).trigger("change")})})}); \ No newline at end of file +jQuery(document).ready((function($){$(".customize-control-multicheck").each((function(){$(this).find('input[type="checkbox"]').on("change",(function(){checkboxValues=$(this).parents(".customize-control").find('input[type="checkbox"]:checked').map((function(){return this.value})).get().join(","),$(this).parents(".customize-control").find('input[type="hidden"]').val(checkboxValues).trigger("change")}))}))})); \ No newline at end of file diff --git a/lib/settings/metaboxes/sections.php b/lib/settings/metaboxes/sections.php index 10fb091..9b5f66c 100644 --- a/lib/settings/metaboxes/sections.php +++ b/lib/settings/metaboxes/sections.php @@ -504,8 +504,8 @@ function mai_change_from_sections_template_warning( $object_id, $cmb ) { $alert = __( 'Warning! Changing to another page template will delete Sections template settings and data. Your content will be moved to the regular editor, but there is no going back!', 'mai-theme-engine' ); printf( "