Skip to content
Advertisement

WordPress – Send message to users if function_exists by using Front End PM plugin

I’m using the plugin “Front End PM” 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.

JavaScript

Advertisement

Answer

Edit your snippet in a proper text editor like sublime text, notepad++, Vim (just to name a few). Behind some lines you have characters that are copied from non well formatted code block from a site or from a tool that is not made for writing code. If you remove those characters your code will not generate a syntax error.

The snippet like this should work:

JavaScript

EDIT: post_author was deprecated and removed. Use mgs_author instead.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement