AppCommunity Action Hook Example
<?php | |
// add this code to a plugin to modify a response | |
add_action('appcommunity_activity_get_item', function( $item, $retval, $request ) { | |
$retvalhasbadwords = false; | |
// check for bad words here... | |
if( $retvalhasbadwords ) { | |
// check response for bad words, and maybe send an admin email | |
wp_mail( get_option('admin_email'), "Bad words in activity", "Check out the recent activity from " . $request['user_id'] ); | |
} | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment