<!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][13974] trunk/src: Administration: add a function to check a BP Admin Screen is displayed</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/13974">13974</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/13974","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-07-24 08:36:35 +0000 (Wed, 24 Jul 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'>Administration: add a function to check a BP Admin Screen is displayed
`bp_is_admin()` accepts an optional parameter: a string containing the BP Admin Screen ID. If provided: it checks this screen is loaded, if not it only checks a BP Admin Screen is displayed. This function will help us put together a specific community dashboard in the future.
For now it's helping us making sure the WP Plugin dependency warning is not displayed into the WP Admin > Add new plugin > BP Add-ons tab as this tab is generated by BuddyPress: so it is available & activated!
Props emaralive.
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/9212">#9212</a>
Closes https://github.com/buddypress/buddypress/pull/334</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpactivitybpactivityadminphp">trunk/src/bp-activity/bp-activity-admin.php</a></li>
<li><a href="#trunksrcbpcoreadminbpcoreadminfunctionsphp">trunk/src/bp-core/admin/bp-core-admin-functions.php</a></li>
<li><a href="#trunksrcbpcorebpcorefunctionsphp">trunk/src/bp-core/bp-core-functions.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpadminphp">trunk/src/bp-core/classes/class-bp-admin.php</a></li>
<li><a href="#trunksrcbpgroupsbpgroupsadminphp">trunk/src/bp-groups/bp-groups-admin.php</a></li>
<li><a href="#trunksrcbpmembersclassesclassbpmembersadminphp">trunk/src/bp-members/classes/class-bp-members-admin.php</a></li>
<li><a href="#trunksrcbpxprofilebpxprofileadminphp">trunk/src/bp-xprofile/bp-xprofile-admin.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpactivitybpactivityadminphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/bp-activity-admin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/bp-activity-admin.php 2024-07-24 08:15:38 UTC (rev 13973)
+++ trunk/src/bp-activity/bp-activity-admin.php 2024-07-24 08:36:35 UTC (rev 13974)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -179,8 +179,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_activity_admin_load() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $bp_activity_list_table;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $bp = buddypress();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $bp = buddypress();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Traces the current BP Admin screen.
+ $bp->admin->trace_current_screen();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $doaction = bp_admin_list_table_current_bulk_action();
</span><span class="cx" style="display: block; padding: 0 10px"> $min = bp_core_get_minified_asset_suffix();
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<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-07-24 08:15:38 UTC (rev 13973)
+++ trunk/src/bp-core/admin/bp-core-admin-functions.php 2024-07-24 08:36:35 UTC (rev 13974)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1767,3 +1767,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'set_screen_option_tools_page_bp_optouts_network_per_page', 'bp_admin_set_screen_options', 10, 3 );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'set_screen_option_tools_page_bp_members_invitations_per_page', 'bp_admin_set_screen_options', 10, 3 );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'set_screen_option_tools_page_bp_members_invitations_network_per_page', 'bp_admin_set_screen_options', 10, 3 );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * Remove the Plugin Dependency warning from BP add-ons listed into the Plugin/Add BP Addons tab.
+ *
+ * @since 15.0.0
+ *
+ * @param false|object|array $result The result object or array. Default false.
+ * @param string $action The type of information being requested from the Plugin Installation API.
+ * @param object $args Plugin API arguments.
+ */
+function bp_admin_edit_available_addons_properties( $addons, $action, $args ) {
+ if ( 'query_plugins' === $action && bp_is_admin( 'plugin-install' ) && isset( $args->author ) && 'buddypress' === $args->author ) {
+ foreach ( $addons->plugins as $key => $plugin_data ) {
+ if ( ! isset( $plugin_data['requires_plugins'] ) || ! in_array( 'buddypress', $plugin_data['requires_plugins'], true ) ) {
+ continue;
+ }
+
+ // The BP Add-ons tab is generated by BuddyPress, so BuddyPress is installed, no need to add a Plugin Dependency warning about it.
+ $addons->plugins[ $key ]['requires_plugins'] = array_diff( $plugin_data['requires_plugins'], array( 'buddypress' ) );
+ }
+ }
+
+ return $addons;
+}
+add_filter( 'plugins_api_result', 'bp_admin_edit_available_addons_properties', 10, 3 );
</ins></span></pre></div>
<a id="trunksrcbpcorebpcorefunctionsphp"></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/bp-core-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/bp-core-functions.php 2024-07-24 08:15:38 UTC (rev 13973)
+++ trunk/src/bp-core/bp-core-functions.php 2024-07-24 08:36:35 UTC (rev 13974)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5250,3 +5250,25 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $admin_notifications;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * Checks whether a BuddyPress admin screen is displayed.
+ *
+ * @since 15.0.0
+ *
+ * @param string $screen_id The specific screen ID to check.
+ * @return boolean True if a BuddyPress admin screen is displayed. False otherwise.
+ */
+function bp_is_admin( $screen_id = '' ) {
+ $bp = buddypress();
+
+ if ( ! isset( $bp->admin->current_screen ) ) {
+ return false;
+ }
+
+ if ( ! $screen_id ) {
+ return ! empty( $bp->admin->current_screen );
+ }
+
+ return $screen_id === $bp->admin->current_screen;
+}
</ins></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-07-24 08:15:38 UTC (rev 13973)
+++ trunk/src/bp-core/classes/class-bp-admin.php 2024-07-24 08:36:35 UTC (rev 13974)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,6 +102,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public $submenu_pages = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * The current BP Admin screen being displayed.
+ *
+ * @since 15.0.0
+ * @var array
+ */
+ public $current_screen = '';
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /** Methods ***************************************************************/
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -409,6 +417,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $hooks as $hook ) {
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( "admin_head-$hook", 'bp_core_modify_admin_menu_highlight' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_action( "load-{$hook}", array( $this, 'trace_current_screen' ), 1 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'settings_page_bp-rewrites' === $hook ) {
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( "load-{$hook}", 'bp_core_admin_rewrites_load' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1319,11 +1328,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $screen = get_current_screen();
</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">+ /*
+ * @todo We should check for any possible post types generated by BuddyPress:
+ * - BP Email,
+ * - BP Directories...
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $screen->post_type ) || bp_get_email_post_type() !== $screen->post_type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</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"> bp_core_add_contextual_help( $screen );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->trace_current_screen();
</ins><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"> /** Helpers ***************************************************************/
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1628,6 +1643,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function addons_args() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $paged;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->current_screen = get_current_screen()->id;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'page' => $paged,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1696,4 +1712,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Traces the BP Admin screen being viewed.
+ *
+ * @since 15.0.0
+ */
+ public function trace_current_screen() {
+ $this->current_screen = get_current_screen()->id;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpgroupsbpgroupsadminphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/bp-groups-admin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/bp-groups-admin.php 2024-07-24 08:15:38 UTC (rev 13973)
+++ trunk/src/bp-groups/bp-groups-admin.php 2024-07-24 08:36:35 UTC (rev 13974)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -127,7 +127,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_groups_admin_load() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $bp_groups_list_table;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $bp = buddypress();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Traces the current BP Admin screen.
+ $bp->admin->trace_current_screen();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Build redirection URL.
</span><span class="cx" style="display: block; padding: 0 10px"> $redirect_to = remove_query_arg( array( 'action', 'action2', 'gid', 'deleted', 'error', 'updated', 'success_new', 'error_new', 'success_modified', 'error_modified' ), $_SERVER['REQUEST_URI'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -247,8 +251,6 @@
</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">- $bp = buddypress();
-
</del><span class="cx" style="display: block; padding: 0 10px"> // Enqueue CSS and JavaScript.
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_script( 'bp_groups_admin_js', $bp->plugin_url . "bp-groups/admin/js/admin{$min}.js", array( 'jquery', 'wp-ajax-response', 'jquery-ui-autocomplete' ), bp_get_version(), true );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_localize_script( 'bp_groups_admin_js', 'BP_Group_Admin', array(
</span></span></pre></div>
<a id="trunksrcbpmembersclassesclassbpmembersadminphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-members/classes/class-bp-members-admin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-members/classes/class-bp-members-admin.php 2024-07-24 08:15:38 UTC (rev 13973)
+++ trunk/src/bp-members/classes/class-bp-members-admin.php 2024-07-24 08:36:35 UTC (rev 13974)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -963,7 +963,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 6.0.0 The `delete_avatar` action is now managed into this method.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function user_admin_load() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $bp = buddypress();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Traces the current BP Admin screen.
+ $bp->admin->trace_current_screen();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Get the user ID.
</span><span class="cx" style="display: block; padding: 0 10px"> $user_id = $this->get_user_id();
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcbpxprofilebpxprofileadminphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-xprofile/bp-xprofile-admin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-xprofile/bp-xprofile-admin.php 2024-07-24 08:15:38 UTC (rev 13973)
+++ trunk/src/bp-xprofile/bp-xprofile-admin.php 2024-07-24 08:36:35 UTC (rev 13974)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,11 +25,32 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</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">- add_users_page( _x( 'Profile Fields', 'xProfile admin page title', 'buddypress' ), _x( 'Profile Fields', 'Admin Users menu', 'buddypress' ), 'manage_options', 'bp-profile-setup', 'xprofile_admin' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hook = add_users_page(
+ _x( 'Profile Fields', 'xProfile admin page title', 'buddypress' ),
+ _x( 'Profile Fields', 'Admin Users menu', 'buddypress' ),
+ 'manage_options',
+ 'bp-profile-setup',
+ 'xprofile_admin'
+ );
+
+ // Hook into early actions to load our init handler.
+ add_action( "load-$hook", 'bp_xprofile_admin_load' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( bp_core_admin_hook(), 'xprofile_add_admin_menu' );
</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">+ * Performs actions early during the xProfile Admin loading process.
+ *
+ * @since 15.0.0
+ */
+function bp_xprofile_admin_load() {
+ $bp = buddypress();
+
+ // Traces the current BP Admin screen.
+ $bp->admin->trace_current_screen();
+}
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Handles all actions for the admin area for creating, editing and deleting
</span><span class="cx" style="display: block; padding: 0 10px"> * profile groups and fields.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span></span></pre>
</div>
</div>
</body>
</html>