Support Forum
HI, I need to hide the email address and the IP address from the email that is sent to admins who have enabled the "receive email notifications on all topics/posts" option here: wp-admin/admin.php?page=simple-press/admin/panel-admins/spa-admins.php
The email that is sent has "From" and "Poster IP" fields. Can you direct me to the file I need to edit in order to remove the email address from the "From" field and remove the "Poster IP" field completely? Any tips on how to edit the file would also be most helpful
Thanks!
that is not the best way to do that... editing core that is... you will have to make the same change on every update...
you would be better off using the filter 'sph_admin_email' on the email and stripping out the stuff you dont want... save upgrades later...
still, good work...
Visit Cruise Talk Central and Mr Papa's World
The filter passes three data items - the final message text, the $newpost array and the admins email address. From this you can freely restructure the email message as all the data necessary is available. And the $newpost array is already familiar to you from editing the current code.
To use this you would define the use of the filter in the sp theme spFunctions.php (templates folder). As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/.....g-a-theme/)
You might be able to put it in the WP theme functions file as well as I believe that should be loaded in time. Might be worth a try.
You use this like any WP filter:
add_filter('sph_admin_email', 'your_function_name', 1, 3); function your_function_name($message, $newpost, $admin_email) { # do whatever you want to the $message; return $message; }
Your alterations to the $message text - or replacement $message will be what is used in the email.
YELLOW
SWORDFISH
|
1 Guest(s)