skip helper

0

Hi,

I have a post-save helper that sends an email to the user. It works well in the admin, but would it be possible to skip it or "disable it" while saving the data coming from a form (a custom made form on a public page, that saves the data through the PODS api)?

Thanks in advance

asked Jun 14 '10 at 5:56

kjj

1

add comment
enter at least 15 characters

1 Answer

1

Try using the Wordpress conditional tag "is_admin()" to only perform actions if the script is running on the admin:

<?php
if(is_admin()) {
     //script is running on the admin
} else {
    //script is running on the front-end
}
?>

answered Jun 14 '10 at 7:48

clarinetlord

456

add comment
enter at least 15 characters