Last active
February 7, 2017 03:59
-
-
Save mgratch/ab36768e2d4f6cc76bdf to your computer and use it in GitHub Desktop.
Only check wp-content files when using advanced push for SiteGround staging.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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