Skip to content

Instantly share code, notes, and snippets.

@jjeaton
Created June 25, 2014 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jjeaton/ed4d22245943c2eaa4fa to your computer and use it in GitHub Desktop.
Save jjeaton/ed4d22245943c2eaa4fa to your computer and use it in GitHub Desktop.
<?php
// ...<snip>...
<span class="milestone"><# wp.hooks.doAction('milestonerevs.metadata', data) #></span>
// ...<snip>...
add_action( 'admin_footer-revision.php', 'wpse151630_test' );
function wpse151630_test() {
?>
<script>
(function($) {
wp.hooks.addAction('milestonerevs.metadata', function( data ) {
setTimeout(function(){
$('.diff-meta-to .milestone').text(data.id);
}, 100);
});
})(jQuery);
</script>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment