How can I hook into the wp_mail function used by BackWPup?

Looking at the source of the wp_mail() function, there’s a filter right near the top: $atts = apply_filters( ‘wp_mail’, compact( ‘to’, ‘subject’, ‘message’, ‘headers’, ‘attachments’ ) ); // Expanded for clarity. (Aside: compact() is a PHP function that creates an array from a set of arguments. In this case, it’s making an array of the … Read more

What is deprecated_argument_run meant to do exactly?

As @sally-cj already hinted at in his comment this is used for debugging purposes, helping developers by notifying them of the use of deprecated arguments in their codebase. In core this is for example used to alert people of wrong arguments when using the REST API: https://core.trac.wordpress.org/browser/branches/5.2/src/wp-includes/rest-api.php#L177 But you could add your own function to … Read more

Custom filter not working

I believe your the simple nature of your example may have led to a misunderstanding of the way appy_filters() would operate. There is a great article that really explains how to use add_filter() and apply_filters() well, using very readable examples. Basically, the problem appears to be that your code declares add_filter() AFTER you define it … Read more

How to use embed_content hook?

No, WordPress does not pass any arguments to the hook’s callbacks. And you can use that hook to display something after the embed excerpt is displayed. But this is of course, if the theme is using the default embed template for post embeds — with custom template, you could, if you want to, display the … Read more

ACF for custom post type archive pages: which hook to use?

Is this a sequence mismatch between the hooks? I would argue so, yes. acf/init gets executed by class ACF’s init method, all in the root file acf.php – this method is hooked to WordPress’ init with a priority of 5 like so add_action( ‘init’, array($this, ‘init’), 5 ); And you probably add your CPTs with … Read more