email

function set_mail_html_content_type() {
return ‘text/html’;
}

add_action( ‘publish_post’, ‘author_publish_notice’, 10 ,2 );

function author_publish_notice( $ID, $post ) {
if( ‘post’ == $post->post_type ) {
return;
}
$to = ‘author@email.com’;
$subject = ‘Your Article Is Online’;
$message = ‘

Congratulations!

Your article is now online and
is sure to receives trillions of comments. Please do hang around and answer any questions
viewers may have!

‘ . $post->post_title . ‘

‘;

add_filter( ‘wp_mail_content_type’, ‘set_mail_html_content_type’ );
wp_mail( $to, $subject, $message );
remove_filter( ‘wp_mail_content_type’, ‘set_mail_html_content_type’ );

}

Buscar

junio 2022

  • L
  • M
  • X
  • J
  • V
  • S
  • D
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

julio 2022

  • L
  • M
  • X
  • J
  • V
  • S
  • D
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
0 Adultos
0 Niños
Mascotas
Tamaño
Precio
Comodidades
Facilidades

Comparar listados

Comparar