Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Created April 5, 2016 17:25
Show Gist options
  • Save thomasplevy/b1b99f7cb64ad5e58177a1d73c5b7f15 to your computer and use it in GitHub Desktop.
Save thomasplevy/b1b99f7cb64ad5e58177a1d73c5b7f15 to your computer and use it in GitHub Desktop.
<?php // don't include this when pasting
add_action( 'wp_print_footer_scripts', 'i_know_this_is_bad' );
function i_know_this_is_bad() {
// lets only load this on lessons where it would be used
if ( 'lesson' === get_post_type() ) {
echo "
<script>
jQuery( document ).ready( function() {
var $btn = jQuery( 'input[name=\"mark_complete\"]' );
$btn.hide();
setTimeout( function() {
$btn.show();
}, 10000 );
} );
</script>
";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment