Skip to content

Instantly share code, notes, and snippets.

@mgratch
Last active February 7, 2017 03:59
Show Gist options
  • Save mgratch/ab36768e2d4f6cc76bdf to your computer and use it in GitHub Desktop.
Save mgratch/ab36768e2d4f6cc76bdf to your computer and use it in GitHub Desktop.
Only check wp-content files when using advanced push for SiteGround staging.
var $ = jQuery;
$.each($(".databox").find("input[type='checkbox']"), function(){
var label = $(this).next("label").text();
if (label.indexOf('wp-content') > -1 && $(this).attr('disabled') !== true && $(this).attr('disabled') !== 'disabled'){
console.log('check-me');
$(this).attr('checked',true);
} else {
console.log('no-check');
$(this).attr('checked', false);
}
if (label.indexOf('wp-content/uploads') > -1 && $(this).attr('disabled') !== true && $(this).attr('disabled') !== 'disabled'){
console.log('no-check');
$(this).attr('checked', false);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment