Created
October 2, 2020 15:25
-
-
Save ajgagnon/2b809742b79b19896b200bc9ae00ce75 to your computer and use it in GitHub Desktop.
Forces mockups to approve entire project instead of individual images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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