<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][13868] trunk/src/bp-core: Add Help tabs to inform about BP Emails management & BP Email tokens</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/13868">13868</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/13868","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>imath</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-05-19 11:00:37 +0000 (Sun, 19 May 2024)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>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 <a href="http://buddypress.trac.wordpress.org/ticket/9159">#9159</a>
Closes https://github.com/buddypress/buddypress/pull/291</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpcoreadminbpcoreadminfunctionsphp">trunk/src/bp-core/admin/bp-core-admin-functions.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpadminphp">trunk/src/bp-core/classes/class-bp-admin.php</a></li>
<li><a href="#trunksrcbpcoredeprecated140php">trunk/src/bp-core/deprecated/14.0.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpcoreadminbpcoreadminfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/admin/bp-core-admin-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/admin/bp-core-admin-functions.php       2024-05-17 05:08:14 UTC (rev 13867)
+++ trunk/src/bp-core/admin/bp-core-admin-functions.php 2024-05-19 11:00:37 UTC (rev 13868)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -702,12 +702,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_core_add_contextual_help( $screen = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $screen   = get_current_screen();
-       $bp_forum = sprintf(
-               '<a href="%1$s">%2$s</a>',
-               esc_url( 'https://buddypress.org/support/' ),
-               esc_html__( 'Support Forums', 'buddypress' )
-       );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $screen             = get_current_screen();
+       $documentation_link = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        switch ( $screen->id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -723,18 +719,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $manage_components = sprintf(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $documentation_link = sprintf(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 '<a href="%1$s">%2$s</a>',
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/settings/components.md' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_html__( 'Managing Components', 'buddypress' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-                       // Help panel - sidebar links.
-                       $screen->set_help_sidebar(
-                               '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' .
-                               '<p>' . $manage_components . '</p>' .
-                               '<p>' . $bp_forum . '</p>'
-                       );
</del><span class="cx" style="display: block; padding: 0 10px">                         break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Rewrites page.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -749,18 +738,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $manage_rewrites = sprintf(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $documentation_link = sprintf(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 '<a href="%1$s">%2$s</a>',
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/settings/urls.md' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_html__( 'Managing URLs', 'buddypress' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-                       // Help panel - sidebar links.
-                       $screen->set_help_sidebar(
-                               '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' .
-                               '<p>' . $manage_rewrites . '</p>' .
-                               '<p>' . $bp_forum . '</p>'
-                       );
</del><span class="cx" style="display: block; padding: 0 10px">                         break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Settings page.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -775,19 +757,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $manage_settings = sprintf(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $documentation_link = sprintf(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 '<a href="%1$s">%2$s</a>',
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/settings/options.md' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_html__( 'Managing Settings', 'buddypress' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-                       // Help panel - sidebar links.
-                       $screen->set_help_sidebar(
-                               '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' .
-                               '<p>' . $manage_settings . '</p>' .
-                               '<p>' . $bp_forum . '</p>'
-                       );
-
</del><span class="cx" style="display: block; padding: 0 10px">                         break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Profile fields page.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -802,19 +776,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $manage_profile_fields = sprintf(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $documentation_link = sprintf(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 '<a href="%1$s">%2$s</a>',
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/users/xprofile.md' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_html__( 'Managing Profile Fields', 'buddypress' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-                       // Help panel - sidebar links.
-                       $screen->set_help_sidebar(
-                               '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' .
-                               '<p>' . $manage_profile_fields . '</p>' .
-                               '<p>' . $bp_forum . '</p>'
-                       );
-
</del><span class="cx" style="display: block; padding: 0 10px">                         break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                case 'edit-bp_member_type' :
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -827,21 +793,62 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $manage_member_types = sprintf(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $documentation_link = sprintf(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 '<a href="%1$s">%2$s</a>',
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/users/member-types.md' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                esc_html__( 'Managing Member Types', 'buddypress' )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        break;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        // Help panel - sidebar links.
-                       $screen->set_help_sidebar(
-                               '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' .
-                               '<p>' . $manage_member_types . '</p>' .
-                               '<p>' . $bp_forum . '</p>'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         case 'edit-bp-email':
+                       // Help tab.
+                       $screen->add_help_tab(
+                               array(
+                                       'id'      => 'bp-emails-overview',
+                                       'title'   => __( 'Overview', 'buddypress' ),
+                                       'content' => bp_core_add_contextual_help_content( 'bp-emails-overview' ),
+                               )
</ins><span class="cx" style="display: block; padding: 0 10px">                         );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        $documentation_link = sprintf(
+                               '<a href="%1$s">%2$s</a>',
+                               esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/emails/README.md' ),
+                               esc_html__( 'Managing BP Emails', 'buddypress' )
+                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                         break;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               case 'bp-email':
+                       // Help tab.
+                       $screen->add_help_tab(
+                               array(
+                                       'id'      => 'bp-email-overview',
+                                       'title'   => __( 'Overview', 'buddypress' ),
+                                       'content' => bp_core_add_contextual_help_content( 'bp-email-overview' ),
+                               )
+                       );
+
+                       $documentation_link = sprintf(
+                               '<a href="%1$s">%2$s</a>',
+                               esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/emails/tokens.md' ),
+                               esc_html__( 'BP Email tokens usage', 'buddypress' )
+                       );
+                       break;
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+       if ( $documentation_link ) {
+               $bp_forum = sprintf(
+                       '<a href="%1$s">%2$s</a>',
+                       esc_url( 'https://buddypress.org/support/' ),
+                       esc_html__( 'Support Forums', 'buddypress' )
+               );
+
+               // Help panel - sidebar links.
+               $screen->set_help_sidebar(
+                       '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' .
+                       '<p>' . $documentation_link . '</p>' .
+                       '<p>' . $bp_forum . '</p>'
+               );
+       }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'load-settings_page_bp-components', 'bp_core_add_contextual_help' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'load-settings_page_bp-rewrites', 'bp_core_add_contextual_help' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -884,6 +891,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $retval = __( 'Member Types in BuddyPress provide a powerful way to classify users within your community. By defining various member types, such as "Students", "Teachers", or "Alumni", you can create a more organized and tailored community environment. This feature is especially useful for communities with diverse user groups, allowing customized interactions, content access, and privileges.', 'buddypress' );
</span><span class="cx" style="display: block; padding: 0 10px">                        break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                case 'bp-emails-overview':
+                       $retval = __( 'This screen provides access to all BP Emails. Hovering over a row in the BP Emails list will display action links that allow you to manage the corresponding BP Email.', 'buddypress' );
+                       break;
+
+               case 'bp-email-overview':
+                       $retval = sprintf(
+                               /* Translators: %s contains braces within a code tag. */
+                               __( 'Phrases wrapped in braces %s are email tokens. Tokens are variable strings that will get replaced with dynamic content when the email gets sent.', 'buddypress' ),
+                               '<code>{{ }}</code>'
+                       );
+                       break;
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 default:
</span><span class="cx" style="display: block; padding: 0 10px">                        $retval = false;
</span><span class="cx" style="display: block; padding: 0 10px">                        break;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1257,27 +1276,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'admin_head-edit.php', 'bp_admin_email_maybe_add_translation_notice' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * In emails editor, add notice linking to token documentation on Codex.
- *
- * @since 2.5.0
- */
-function bp_admin_email_add_codex_notice() {
-       if ( get_current_screen()->post_type !== bp_get_email_post_type() ) {
-               return;
-       }
-
-       bp_core_add_admin_notice(
-               sprintf(
-                       // Translators: %s is the url to the BuddyPress codex page about BP Email tokens.
-                       __( 'Phrases wrapped in braces <code>{{ }}</code> are email tokens. <a href="%s">Learn about tokens on the BuddyPress Codex</a>.', 'buddypress' ),
-                       esc_url( 'https://codex.buddypress.org/emails/email-tokens/' )
-               ),
-               'error'
-       );
-}
-add_action( 'admin_head-post.php', 'bp_admin_email_add_codex_notice' );
-
-/**
</del><span class="cx" style="display: block; padding: 0 10px">  * Display metabox for email taxonomy type.
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * Shows the term description in a list, rather than the term name itself.
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpadminphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-admin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-admin.php      2024-05-17 05:08:14 UTC (rev 13867)
+++ trunk/src/bp-core/classes/class-bp-admin.php        2024-05-19 11:00:37 UTC (rev 13868)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -226,6 +226,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Emails
</span><span class="cx" style="display: block; padding: 0 10px">                add_filter( 'bp_admin_menu_order', array( $this, 'emails_admin_menu_order' ), 20 );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                add_action( 'load-edit.php', array( $this, 'post_type_load_admin_screen' ), 20 );
+               add_action( 'load-post.php', array( $this, 'post_type_load_admin_screen' ), 20 );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Official BuddyPress supported Add-ons.
</span><span class="cx" style="display: block; padding: 0 10px">                add_filter( 'install_plugins_tabs', array( $this, 'addons_tab' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1289,6 +1291,24 @@
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        /**
+        * Adds BP Custom Post Types Admin screen's help tab.
+        *
+        * @since 14.0.0
+        */
+       public function post_type_load_admin_screen() {
+               $screen = null;
+               if ( function_exists( 'get_current_screen' ) ) {
+                       $screen = get_current_screen();
+               }
+
+               if ( ! isset( $screen->post_type ) || bp_get_email_post_type() !== $screen->post_type ) {
+                       return;
+               }
+
+               bp_core_add_contextual_help( $screen );
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         /** Helpers ***************************************************************/
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre></div>
<a id="trunksrcbpcoredeprecated140php"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/deprecated/14.0.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/deprecated/14.0.php     2024-05-17 05:08:14 UTC (rev 13867)
+++ trunk/src/bp-core/deprecated/14.0.php       2024-05-19 11:00:37 UTC (rev 13868)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,3 +63,26 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        return apply_filters_deprecated( 'bp_use_wp_admin_bar', array( $use_admin_bar ), '14.0.0' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * In emails editor, add notice linking to token documentation on Codex.
+ *
+ * @since 2.5.0
+ * @deprecated 14.0.0
+ */
+function bp_admin_email_add_codex_notice() {
+       _deprecated_function( __FUNCTION__, '14.0.0' );
+
+       if ( get_current_screen()->post_type !== bp_get_email_post_type() ) {
+               return;
+       }
+
+       bp_core_add_admin_notice(
+               sprintf(
+                       // Translators: %s is the url to the BuddyPress codex page about BP Email tokens.
+                       __( 'Phrases wrapped in braces <code>{{ }}</code> are email tokens. <a href="%s">Learn about tokens on the BuddyPress Codex</a>.', 'buddypress' ),
+                       esc_url( 'https://codex.buddypress.org/emails/email-tokens/' )
+               ),
+               'error'
+       );
+}
</ins></span></pre>
</div>
</div>

</body>
</html>