Skip to content

Instantly share code, notes, and snippets.

@ericandrewlewis
Forked from jjeaton/gist:ed4d22245943c2eaa4fa
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericandrewlewis/3f3f39dc7ebdc4a56681 to your computer and use it in GitHub Desktop.
Save ericandrewlewis/3f3f39dc7ebdc4a56681 to your computer and use it in GitHub Desktop.
<?php
// ...<snip>...
<span class="milestone"><# wp.hooks.applyFilters('milestonerevs.metadata', data) #></span>
// ...<snip>...
add_action( 'admin_footer-revision.php', 'wpse151630_test' );
function wpse151630_test() {
?>
<script>
(function($) {
wp.hooks.addFilter('milestonerevs.metadata', function( data ) {
return data.id;
}, 100);
});
})(jQuery);
</script>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment