Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/27/2016 08:23:37 PM (8 years ago)
Author:
djpaul
Message:

Emails: add post type and taxonomy, and supporting wp-admin customisations.

All of BuddyPress' emails have been moved into email posts. The change includes an installation routine, but this won't be run until the db_version number is bumped in a subsequent commit. Updates to functions using wp_mail will also follow.

Tokens are used to personalise the email content (e.g. to add a link to the recipient’s user profile). Each type of email in BuddyPress has been assigned a unique type, and these are mapped to the email post through a new "email type" taxonomy.

The change includes a new HTML email template based on work by Ted Goas and contributors from the Cerberus email templates project. Ted, thank you very much. Learn more at http://tedgoas.github.io/Cerberus/

See #6592. Props timersys, mercime, boonebgorges, hnla, DJPaul.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-taxonomy.php

    r10417 r10474  
    2525        'public' => false,
    2626    ) );
     27
     28    // Email type.
     29    register_taxonomy(
     30        bp_get_email_tax_type(),
     31        bp_get_email_post_type(),
     32        apply_filters( 'bp_register_email_tax_type', array(
     33            'description'   => _x( 'BuddyPress email types', 'email type taxonomy description', 'buddypress' ),
     34            'labels'        => bp_get_email_tax_type_labels(),
     35            'meta_box_cb'   => 'bp_email_tax_type_metabox',
     36            'public'        => false,
     37            'query_var'     => false,
     38            'rewrite'       => false,
     39            'show_in_menu'  => false,
     40            'show_tagcloud' => false,
     41            'show_ui'       => bp_current_user_can( 'bp_moderate' ),
     42        ) )
     43    );
    2744}
    2845add_action( 'bp_register_taxonomies', 'bp_register_default_taxonomies' );
Note: See TracChangeset for help on using the changeset viewer.