AsynCRONous bbPress Subscriptions
Per default, bbPress is sending subscription notification emails as one email with a bunch of BCCs. There are various reasons why it would make more sense to send individual emails. This plugin does that, quietly in the background via WP cron, without slowing down page load times. Also increases notification performance and reduces database load on large sites. Translations by @mauriciogarofalo and @mechter Defaults If you don’t customize this plugin, this is what you’ll get: Sends mails from "MyBlog " (with your Blog’s name and admin email) Sends mail to "Markus " (with the name being the user’s display name on the forums, not their username) Subject and Message have more user friendly defaults, use the available filters (see below) to make them your own. Customization You can install and activate this plugin and it just works, but you have full control over the details if you want to. Below are some filters and code snippets that help you do what you want. If you’re new to working directly with code, please see the example at the bottom of this page. Available filters bbp_subscription_email_from( $from ) // $from can be a string or array('name'=>string, 'address'=>string) bbp_subscription_email_recipients( $recipients ) // $recipients is array of array('name'=>string, 'address'=>string) bbp_subscription_email_headers( $headers ) bbp_forum_subscription_email_subject( $subject, $forum_id, $topic_id ) bbp_forum_subscription_email_message( $message, $forum_id, $topic_id ) bbp_topic_subscription_email_subject( $subject, $forum_id, $topic_id, $reply_id ) bbp_topic_subscription_email_message( $message, $forum_id, $topic_id, $reply_id ) bbp_bounce_address( $bounce_address ) bbp_subscription_disable_async( false ) bbp_forum_subscription_disable_async( false ) bbp_topic_subscription_disable_async( false ) bbp_forum_subscription_notify_author( false ) bbp_topic_subscription_notify_author( false ) Helpful Snippets Here are some pointers to get the data you might want in your notifications: $blog_name = get_bloginfo( 'name' ); $forum_title = bbp_get_forum_title( $forum_id ); $topic_author_user_id = bbp_get_topic_author_id( $topic_id ); $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 ); $topic_content = wp_specialchars_decode( strip_tags( bbp_get_topic_content( $topic_id ) ), ENT_QUOTES ); $topic_url = get_permalink( $topic_id ); $reply_author_user_id = bbp_get_reply_author_id( $reply_id ); $reply_author_display_name = bbp_get_topic_author_display_name( $reply_id ); $reply_content = strip_tags( bbp_get_reply_content( $reply_id ) ); $reply_url = bbp_get_reply_url( $reply_id ); // note that it's not get_permalink() Example To have a nice subject line for new topic notifications, add this to your theme’s 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
Top keywords
- topic34×5.91%
- id28×4.87%
- bbp24×4.17%
- subscription14×2.43%
- author13×2.26%
- forum13×2.26%
- name13×2.26%
- reply13×2.26%
- topic id12×2.09%
- email10×1.74%
- id topic10×1.74%
- display8×1.39%
Content Aware Sidebars – Fastest Widget Area Plugin
Content Aware Sidebars is the #1 WordPress Sidebar Plugin You can optimize conversion rates, boost on-site SEO, upsell products, and much more by displaying different widget areas on different conditions. Create tailored widget areas in seconds. No widget logic coding required. Show or Hide Widgets on Any Page (Yes, any) Replace your theme sidebars on different conditions, or insert widget areas with shortcodes. The following Display Conditions are available out of the box: Posts, Pages & Custom Post Types Content with Tags, Categories, or Custom Taxonomies Content written by select Authors Page Templates Blog Page & Post Type Archives Author Archives Taxonomy Archives Front Page, Search Results, 404 Not Found Page bbPress Profiles, Forums & Topics BuddyPress Profile Sections Languages (Polylang, qTranslate X, TranslatePress, Transposh, Weglot, WPML) Pods Pages You can even combine conditions in any way you like! E.g. target all posts in a select category and written by a specific author. Add Unlimited Sidebars & Widget Areas Create a post sidebar, a page sidebar, a category sidebar, or any custom sidebar you need – no coding required. CAS will never slow down your site, even if you create a lot of custom sidebars and conditions. Sidebars – Quick Select© lets you add or select widget areas directly when editing a post or page. Schedule & Disable Custom Sidebars In the All-in-one Sidebar Manager you just pick a start and end date for when widget areas should be displayed, and CAS will take care of the rest. 1-Click Sidebar Activation© lets you activate or deactivate widget areas instantly. The Most User-friendly Widget Manager When adding new widgets to sidebars, Live Search will find widgets instantly, and the smart split-screen makes it a joy to manage a lot of widgets and sidebars. The Enhanced Widget Manager adds the signature turquoise line to easily identify custom sidebars. Sidebar Plugin Integrations & Support CAS autodetects Custom Post Types and Taxonomies created by any plugin or theme. Built-in support for some of the most popular WordPress plugins means that you e.g. can create WooCommerce sidebars for select products or BuddyPress sidebars for your members. bbPress BuddyPress / BuddyBoss Easy Digital Downloads qTranslate X Pods Polylang TranslatePress Transposh Translation Filter WooCommerce Weglot WPML Customize Your Widget Areas Your Way Without writing any code, you can modify the HTML and CSS classes of widget areas, widgets, and widget titles. You get full control over the look and feel of your sidebars and widget areas, no matter what theme you use. Sidebar Visibility lets you elegantly hide any widget area for logged-out users. Complete control over your WordPress widget areas Upgrade to Content Aware Sidebars Pro and get these additional powerful features: Totem – Smart Floating Button Like the button you may have seen by Intercom or Helpscout, only this is for all your widgets Sticky Sidebars & Widget Areas Make any sidebar or widget area sticky without hurting site performance. No jQuery and no bloat Widget Areas after Paragraphs Display a widget area after a specific number or percentage of paragraphs in your content Even More Display Conditions Advanced Custom Fields data Meta Box data URLs + wildcards Referrer URLs Date Archives & Content by publish date BuddyPress Groups Random Widget Area Designer Add responsive widget columns and edit colors, backgrounds, paddings, etc. Widget Areas in Theme Hooks Intelligently infuse new widget areas into your theme without coding Automatic Widgets Backup Easily restore any changed or deleted widgets Widget Cleaner Save memory and remove clutter by disabling and removing unused widgets Extended User Visibility Show or hide widget areas for User Roles, BuddyPress Groups, and more Time & Weekday Schedule Display widget areas only in select time ranges on given days Container Widget Turn widget areas into reusable blocks and show the same widgets in different places Duplicate Widget Areas A real time-saver when adding new similar widget areas and so much more… Upgrade at anytime instantly and securely from your website’s Admin Dashboard. More Information Documentation GitHub Twitter