
WordPress te avisa (si así lo tienes configurado en las opciones de “discusión”) cuando hay nuevos comentarios, ya estén pendientes de aprobación o no. Estos mensajes, estándar, no gustan a todo el mundo, pero es posible cambiarlos.
Para ello tenemos dos funciones: wp_notify_postauthor() y wp_notify_moderator(). Y ambas podemos definirlas a nuestro antojo. Para ello debemos buscarlas, y las encontraremos en el fichero “/wp-includes/pluggable.php“.
Una vez localizadas solo tenemos que copiarlas en el archivo “functions.php” de nuestro theme para disponer de ellas como si fuera un plugin. En principio serían estas funciones:
if ( ! function_exists('wp_notify_postauthor') ) :
/**
* Notify an author of a comment/trackback/pingback to one of their posts.
*
* @since 1.0.0
*
* @param int $comment_id Comment ID
* @param string $comment_type Optional. The comment type either 'comment' (default), 'trackback', or 'pingback'
* @return bool False if user email does not exist. True on completion.
*/
function wp_notify_postauthor($comment_id, $comment_type='') {
… … …
}
endif;
if ( !function_exists('wp_notify_moderator') ) :
/**
* Notifies the moderator of the blog about a new comment that is awaiting approval.
*
* @since 1.0
* @uses $wpdb
*
* @param int $comment_id Comment ID
* @return bool Always returns true
*/
function wp_notify_moderator($comment_id) {
global $wpdb;
if( get_option( "moderation_notify" ) == 0 )
return true;
… … …
}
endif;
A partir de ahí en tu mano está modificar los textos, incluso eliminar enlaces, tu decides.
Inicio




Pingback: Bitacoras.com