Exempt admin from Pending Messages


Home Forums Front End PM PRO Exempt admin from Pending Messages

This topic is: Not Resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28051
    Randy Morris
    Participant

    I love the ability to have pending messages that must be approved by the admin
    However, message to and from the admin – should not be required to have approval
    How can I release those messages and allow them to be published immediately

    #28076
    Shamim Hasan
    Keymaster

    You can add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_filter_message_before_send', function( $message ) {
    	if ( fep_is_user_admin() ) {
    		$message['mgs_status'] = 'publish';
    	}
    	return $message;
    });
    
    #28078
    Randy Morris
    Participant

    I tried to add that code but I got an error message as follows:

    Warning: There is 1 line that has double semi-colons:
    publish';
    PHP Syntax Check: Parse error: syntax error, unexpected ‘&’ in your code on line 1
    add_filter( 'fep_filter_message_before_send', function( $message ) {
    PHP Syntax Check: Errors parsing your code

    #28081
    Shamim Hasan
    Keymaster

    what is your php version?
    in which file you added this code?
    Can you please give me screenshot of your code after adding this code (including 2 lines before and after)?

Viewing 4 posts - 1 through 4 (of 4 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.