Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Forces mockups to approve entire project instead of individual images
<?php
add_action('wp_footer', function () {
global $post;
if (get_post_type($post) !== 'ph-project') {
return;
} ?>
<script>
ph.hooks.addFilter('approve_project_default', 'my_plugin', function() {
return true;
});
ph.hooks.addFilter('show_approve_project_toggle', 'my_plugin', function() {
return true;
});
</script>
<?php
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment