stumped on add_action hook to delete_comment – any ideas?

Unless you’re passing $force_delete as true when calling wp_delete_comment(), the delete_comment hook doesn’t fire. This is because WordPress calls wp_trash_comment() at the beginning of wp_delete_comment() if $force_delete isn’t set true. Try hooking into the trash_comment action hook: function _dbdb_delete_comment( $comment_id ){ $filter = current_filter(); var_dump( $filter ); var_dump( $comment_id ); wp_die( __FUNCTION__ ); } add_action(‘delete_comment’, … Read more

How to use filter on comment submission/insert

There is no wp_notify_postauthor filter, a pluggable function is one you override with your own function: if( ! function_exists(‘wp_notify_postauthor’) ) { function wp_notify_postauthor( $comment_id, $comment_type=”” ) { // your own wp_notify_postauthor code } } I suggest looking at the function in source to see what it does.

Hide Trackbacks/Pingbaks if none exists

I am using a helper function for that. functions.php /** * Count amount of pingbacks + trackbacks for a post. * * @param int $post_id Post ID for comment query. Default is current post. * @return int */ function t5_count_pings( $post_id = NULL ) { $pings = 0; $comments = FALSE; if ( NULL !== … Read more

Comments numbering on multiple pages

To fix the numbering, you’ll have to modify the first code to reset numbering via CSS. This way (untested, but you’ll catch the idea 😉 ). <?php if ( have_comments() ) : ?> <h3 class=”com”><span class=”com-titlu”><?php comments_number(‘Niciun comentariu’, ‘Un comentariu’, ‘% comentarii’ );?></span> la: <?php the_title(); ?></h3> <?php $number = intval(get_query_var( ‘cpage’ )) * intval(get_query_var( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)