Skip to content

Instantly share code, notes, and snippets.

@ajgagnon
Created October 2, 2020 15:25
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 ajgagnon/2b809742b79b19896b200bc9ae00ce75 to your computer and use it in GitHub Desktop.
Save ajgagnon/2b809742b79b19896b200bc9ae00ce75 to your computer and use it in GitHub Desktop.
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