| 开发者 | mechter |
|---|---|
| 更新时间 | 2020年7月7日 02:17 |
| 捐献地址: | 去捐款 |
| PHP版本: | 3.6 及以上 |
| WordPress版本: | 5.4 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
"MyBlog <admin@MyBlog.foo>" (with your Blog's name and admin email)"Markus <markus@example.com>" (with the name being the user's display name on the forums, not their username)functions.php. If your theme does not have this file, you can simply create it and it will be loaded automatically. Note how the example is basically just one of the filters above, mixed with some of the snippets and a return statement. It's that simple.
add_filter( 'bbp_forum_subscription_email_subject', function( $subject, $forum_id, $topic_id ) {
$blog_name = get_bloginfo( 'name' );
$topic_author_display_name = bbp_get_topic_author_display_name( $topic_id );
$topic_title = wp_specialchars_decode( strip_tags( bbp_get_topic_title( $topic_id ) ), ENT_QUOTES );
return "[$blog_name] $topic_author_display_name created a new topic: $topic_title";
}, 10, 3); // first is priority (10 is default and just fine), second is number of arguments your filter expects
If other WP emails work normally try adding define('ALTERNATE_WP_CRON', true); to your wp-config.php
Yes. Add define('DISABLE_WP_CRON', true); to your wp-config.php and have a real cron job execute e.g. wget -q -O - http://your.blog.example.com/wp-cron.php >/dev/null 2>&1
abbps_to, use abbps_recipients insteadwp_specialchars_decode() on blog name for From namebbp_after_setup_actions hookabbps_bounce_address allows setting of bounce address for email notificationsabbps_from to match the signature of the abbps_to filter (now passes an associative array instead of two strings).abbps_to apply_filters() callabbps_to has new signature abbps_to( $to, $post_author_user_id ) where $to is array( 'name' => '', 'address' => '' )abbps_recipients filters array of recipients just before sending so you can e.g. remove blacklisted emails just in time