Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have added 2 hooks that display a notice to the end user if the user updates a post, submit a post (using gravity form), or try to go to a url that is not authorized. Here is the example for updating a post:

add_filter('post_updated','alert_user');

function alert_user()
{
add_action('the_content','prepare_text');
}

function prepare_text($content){
return 'You did it!'.$content;
}

The problem: Even though prepare_text is called. the text 'You did it' doesn't appear in the front_end, because of the redirection either in gravity form or wp_redirect, used in unauthorized requests. I checked in the logs, the hook is added.

Any help is very much welcomed.

Thanks,

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.