How to disable all WordPress emails modularly and programatically?

Option 1: Remove the ‘to’ argument from wp_mail function in WordPress, it will keep your system running without sending any default WordPress emails. add_filter(‘wp_mail’,’disabling_emails’, 10,1); function disabling_emails( $args ){ unset ( $args[‘to’] ); return $args; } The wp_mail is a wrapper for the phpmailer class and it will not send any emails if there is … Read more

What params are available with the_content filter?

I don’t think there are any additional parameters passed, per se, to the_content, but global variables like $post are accessible. So something like this would work: add_filter( ‘the_content’, ‘check_for_post_parent’ ); function check_for_post_parent($content) { global $post; if ($parent_id == $post->post_parent) { //do what you want to $content here, //now that you know $parent_id //… } return … Read more

Store source permalink on XMLRPC calls

From look at source metaWeblog.newPost seems to be processed in wp_xmlrpc_server->mw_newPost() method. At the end of this method there is following hook call: do_action( ‘xmlrpc_call_success_mw_newPost’, $post_ID, $args ); which seems to be very fitting to process and save any additional information for post that have just been created by its ID provided.

SSL certificate for the host could not be verified

I wouldn’t recommend disabling ssl verification – that leaves your system vulnerable to potential man in the middle attacks as explained in this SO post. Also, your use of sslv3 is most likely causing this issue now SPECIFICALLY because Authorize.net identified it as vulnerable to the POODLE compromise. Since that happened, many vendors removed the … Read more

AJAX filter posts on click based on category

This line in functions.php is your problem: $cat_id = get_post_meta($_REQUEST[‘cat’]); I think you are misunderstanding the purpose of the get_post_meta() function. It is designed to get metadata for a WordPress Post, not data from a POST request to the site. The first parameter of the get_post_meta() function is the $post_id, but since you are passing … Read more

Is it possible to remove the filter from 4.8 text widget?

We now have a new filter widget_text_content introduced in 4.8 src, with the following default callbacks: add_filter( ‘widget_text_content’, ‘capital_P_dangit’, 11 ); add_filter( ‘widget_text_content’, ‘wptexturize’ ); add_filter( ‘widget_text_content’, ‘convert_smilies’, 20 ); add_filter( ‘widget_text_content’, ‘wpautop’ ); that are applied if the filter settings, for the widget instance, is set to ‘content’. When you remove the filter settings … Read more