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.

Using PHP mail; getting Header warning

You can’t use header in the middle of a page, content has already been sent to the browser, so that means headers were already sent. Look at the code in the myriad of form plugins out there to see how they handle this- hook an action before the template is loaded and do your form … Read more

need a confirmation text to appear on email submission

Simply add a Success callback to your Ajax function: $(‘#sendEmail’).click(function(){ $.ajax({ type: ‘POST’, url: ‘www.example.com/email.php’, data: { content: $(‘#email-data’).html()}, success: function(data) { //data variable can be used if your ajax call returns something do_stuff_here(); } }); }); In your case, you could do something like success: function() { $(‘body’).append(‘<div class=”success”>Success!</div>’); } However, is there a … Read more

how to run loop in function.php that sends email based on specific conditions?

The post’s data is passed as an argument to the function hooked to transition_post_status, so you don’t need to query for anything (also, your query is a bit strange, using both WP_Query and query_posts, but that’s a separate matter). Here’s a trimmed version of your function showing the important changes: function a_new_post( $new_status, $old_status, $post … Read more

How to add a button to check the emails of my domain?

Based on my comment in the Question, I tested the solution of adding a menu item that opens an iframe in its screen. As expected, Gmail doesn’t allow to be displayed in an iframe. But a regular Horde Webmail does work. add_action( ‘admin_menu’, ’embed_webmail_wpse_91871′ ); function embed_webmail_wpse_91871() { // Reference: http://codex.wordpress.org/Function_Reference/add_menu_page // Check it, specially … Read more

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