Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/19/2024 11:00:37 AM (12 months ago)
Author:
imath
Message:

Add Help tabs to inform about BP Emails management & BP Email tokens

  • Improve bp_core_add_contextual_help() to avoid code duplication.
  • Add an help tab linking to the user documentation page explaining how to manage BP Emails.
  • Add an help tab linking to the user documentation page explaining BP Email tokens usage.
  • Deprecate bp_admin_email_add_codex_notice().

Fixes #9159
Closes https://github.com/buddypress/buddypress/pull/291

File:
1 edited

Legend:

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

    r13741 r13868  
    6464    return apply_filters_deprecated( 'bp_use_wp_admin_bar', array( $use_admin_bar ), '14.0.0' );
    6565}
     66
     67/**
     68 * In emails editor, add notice linking to token documentation on Codex.
     69 *
     70 * @since 2.5.0
     71 * @deprecated 14.0.0
     72 */
     73function bp_admin_email_add_codex_notice() {
     74    _deprecated_function( __FUNCTION__, '14.0.0' );
     75
     76    if ( get_current_screen()->post_type !== bp_get_email_post_type() ) {
     77        return;
     78    }
     79
     80    bp_core_add_admin_notice(
     81        sprintf(
     82            // Translators: %s is the url to the BuddyPress codex page about BP Email tokens.
     83            __( 'Phrases wrapped in braces <code>{{ }}</code> are email tokens. <a href="%s">Learn about tokens on the BuddyPress Codex</a>.', 'buddypress' ),
     84            esc_url( 'https://codex.buddypress.org/emails/email-tokens/' )
     85        ),
     86        'error'
     87    );
     88}
Note: See TracChangeset for help on using the changeset viewer.