Primero tenemos que abrir el archivo wp-comments-post.php que
está en la raíz de la instalación de wordpress
El código que ocupe es el siguiente (descargar aquí), se pone antes del
exit() y ya tiene agregado html para empezar a darle forma a nuestro correo
<?phpif($user->exists()){$correos = 'correo@hotmail.com,
correo@gmail.com,correo@hotmail.com,
correo@gmail.com,correo@hotmail.com,
correo@gmail.com,acaxao.mx@gmail.com
';///MENSAJE HTML//////ob_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title></title></head><body> <a style="color:#2E1361;" href="<?php echo get_permalink($comment_post_ID) ?>"><?php echo $user->display_name.' ha comentado' ?></a><?php echo nl2br($comment_content); ?></body></html><?php/////////////////$message = ob_get_contents();
ob_end_clean();wp_mail( $correos, 'Comentario Nuevo por '.$user->display_name , $message, 'Content-type: text/html' );}
?>
saludos
No hay comentarios:
Publicar un comentario