title: Wordpress - Send message to users if function_exists by using Front End PM plugin
body: <p>I'm using the plugin "<a href="https://wordpress.org/plugins/front-end-pm/" rel="nofollow noreferrer">Front End PM</a>" and i have the snippet below for sending message to the frontend when authors posts is published, but not working for me and the error i get " unexpected '   ' (T_STRING) ", so the problem in between [' '] but i'm sorry i can't fix it.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>add_action( 'publish_post', 'fep_cus_user_publish_send_messaage', 10, 2 );
  
  function fep_cus_user_publish_send_messaage( $ID, $post ){
  
      if ( ! function_exists( 'fep_send_message' ) )
      return;
      $message = [];
   
      $message['message_to_id'] = $post-&gt;post_author; /* Post author ID. */
      $name = get_the_author_meta( 'display_name', $post-&gt;post_author );
      $title = $post-&gt;post_title;
      $permalink = get_permalink( $ID ); 
      $message['message_title'] = sprintf( 'Published: %s', $title );
      $message['message_content'] = sprintf ('Congratulations, %s! Your article “%s” has been published.' . "\n\n", $name, $title );
      $message['message_content'] .= sprintf( 'View: %s', $permalink ); 
      $override = array('post_author' =&gt; 1, //change with message sender id         
      );
  
      // Send message
      fep_send_message( $message, $override );      
  }</code></pre>
  </div>
  </div>
  </p>