[ Index ]

PHP Cross Reference of BuddyPress




/src/bp-core/admin/ -> bp-core-admin-functions.php (summary)

BuddyPress Common Admin Functions.

File Size: 1347 lines (42 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 32 functions


Functions that are not part of a class:

bp_core_admin_menu_init()   X-Ref
Initializes the wp-admin area "BuddyPress" menus and sub menus.

bp_core_admin_backpat_menu()   X-Ref
In BP 1.6, the top-level admin menu was removed. For backpat, this function
keeps the top-level menu if a plugin has registered a menu into the old
'bp-general-settings' menu.

The old "bp-general-settings" page was renamed "bp-components".

since: 1.6.0

bp_core_modify_admin_menu_highlight()   X-Ref
This tells WP to highlight the Settings > BuddyPress menu item,
regardless of which actual BuddyPress admin screen we are on.

The conditional prevents the behavior when the user is viewing the
backpat "Help" page, the Activity page, or any third-party plugins.

since: 1.6.0

bp_core_admin_backpat_page()   X-Ref
Generates markup for a fallback top-level BuddyPress menu page, if the site is running
a legacy plugin which hasn't been updated. If the site is up to date, this page
will never appear.

since: 1.6.0

bp_core_print_admin_notices()   X-Ref
Print admin messages to admin_notices or network_admin_notices.

BuddyPress combines all its messages into a single notice, to avoid a preponderance of yellow

since: 1.5.0

bp_core_add_admin_notice( $notice = '', $type = 'updated' )   X-Ref
Add an admin notice to the BP queue.

Messages added with this function are displayed in BuddyPress's general purpose admin notices
box. It is recommended that you hook this function to admin_init, so that your messages are
loaded in time.

since: 1.5.0
param: string $notice The notice you are adding to the queue.
param: string $type   The notice type; optional. Usually either "updated" or "error".

bp_core_activation_notice()   X-Ref
Verify that some BP prerequisites are set up properly, and notify the admin if not.

On every Dashboard page, this function checks the following:
- that pretty permalinks are enabled.
- that every BP component that needs a WP page for a directory has one.
- that no WP page has multiple BP components associated with it.
The administrator will be shown a notice for each check that fails.

since: 1.2.0

bp_do_activation_redirect()   X-Ref
Redirect user to BuddyPress's What's New page on activation.

since: 1.7.0

bp_core_admin_tabs( $active_tab = '', $context = 'settings' )   X-Ref
Output the tabs in the admin area.

since: 1.5.0
since: 8.0.0 Adds the `$context` parameter.
param: string $active_tab Name of the tab that is active. Optional.
param: string $context    The context of use for the tabs. Defaults to 'settings'.

bp_core_get_admin_tabs( $active_tab = '', $context = 'settings' )   X-Ref
Get the data for the tabs in the admin area.

since: 2.2.0
since: 8.0.0 Adds the `$context` parameter.
return: string
param: string $active_tab Name of the tab that is active. Optional.
param: string $context    The context of use for the tabs. Defaults to 'settings'.

bp_core_add_contextual_help( $screen = '' )   X-Ref
Adds contextual help to BuddyPress admin pages.

since: 1.7.0
param: string $screen Current screen.

bp_core_add_contextual_help_content( $tab = '' )   X-Ref
Renders contextual help content to contextual help tabs.

since: 1.7.0
return: string
param: string $tab Current help content tab.

bp_admin_separator()   X-Ref
Add a separator to the WordPress admin menus.

since: 1.7.0

bp_admin_custom_menu_order( $menu_order = false )   X-Ref
Tell WordPress we have a custom menu order.

since: 1.7.0
return: bool Always true.
param: bool $menu_order Menu order.

bp_admin_menu_order( $menu_order = array()   X-Ref
Move our custom separator above our custom post types.

since: 1.7.0
return: array Modified menu order.
param: array $menu_order Menu Order.

bp_admin_list_table_current_bulk_action()   X-Ref
When using a WP_List_Table, get the currently selected bulk action.

WP_List_Tables have bulk actions at the top and at the bottom of the tables,
and the inputs have different keys in the $_REQUEST array. This function
reconciles the two values and returns a single action being performed.

since: 1.7.0
return: string

bp_admin_wp_nav_menu_meta_box()   X-Ref
Register meta box and associated JS for BuddyPress WP Nav Menu.

since: 1.9.0

bp_admin_get_wp_nav_menu_items( $null, $wp_query )   X-Ref
BP Member nav menu filter to short-circuit WP's query.

since: 7.0.0
return: array   The BP Member nav items to short-circuit WP's query,
param: null     $null     A null value.
param: WP_Query $wp_query The WP_Query instance (passed by reference).

bp_admin_do_wp_nav_menu_meta_box( $object = '', $box = array()   X-Ref
Build and populate the BuddyPress accordion on Appearance > Menus.

since: 1.9.0
since: 7.0.0 Uses wp_nav_menu_item_post_type_meta_box()

bp_admin_email_maybe_add_translation_notice()   X-Ref
In admin emails list, for non-en_US locales, add notice explaining how to reinstall emails.

If BuddyPress installs before its translations are in place, tell people how to reinstall
the emails so they have their contents in their site's language.

since: 2.5.0

bp_admin_email_add_codex_notice()   X-Ref
In emails editor, add notice linking to token documentation on Codex.

since: 2.5.0

bp_email_tax_type_metabox( $post, $box )   X-Ref
Display metabox for email taxonomy type.

Shows the term description in a list, rather than the term name itself.

since: 2.5.0
param: WP_Post $post Post object.
param: array   $box {

bp_email_custom_metaboxes()   X-Ref
Custom metaboxes used by our 'bp-email' post type.

since: 2.5.0

bp_email_plaintext_metabox( $post )   X-Ref
Customized version of the 'Excerpt' metabox for our 'bp-email' post type.

We are using the 'Excerpt' metabox as our plain-text email content editor.

since: 2.5.0
param: WP_Post $post

bp_admin_wp_nav_menu_restrict_items()   X-Ref
Restrict various items from view if editing a BuddyPress menu.

If a person is editing a BP menu item, that person should not be able to
see or edit the following fields:

- CSS Classes - We use the 'bp-menu' CSS class to determine if the
menu item belongs to BP, so we cannot allow manipulation of this field to
- URL - This field is automatically generated by BP on output, so this
field is useless and can cause confusion.

Note: These restrictions are only enforced if JavaScript is enabled.

since: 1.9.0

bp_core_admin_user_row_actions( $actions, $user_object )   X-Ref
Add "Mark as Spam/Ham" button to user row actions.

since: 2.0.0
return: array $actions User row action links.
param: array  $actions     User row action links.
param: object $user_object Current user information.

bp_core_admin_user_manage_spammers()   X-Ref
Catch requests to mark individual users as spam/ham from users.php.

since: 2.0.0

bp_core_admin_user_spammed_js()   X-Ref
Inline script that adds the 'site-spammed' class to spammed users.

since: 2.0.0

bp_core_admin_notice_dismiss_callback()   X-Ref
Catch and process an admin notice dismissal.

since: 2.7.0

bp_core_admin_body_classes( $classes )   X-Ref
Add a "buddypress" class to body element of wp-admin.

since: 2.8.0
return: string
param: string $classes CSS classes for the body tag in the admin, a comma separated string.

bp_block_category( $categories = array()   X-Ref
Adds a BuddyPress category to house BuddyPress blocks.

since: 5.0.0
since: 8.0.0 The `bp_block_category_post_types` filter has been deprecated.
param: array          $categories Array of block categories.
param: string|WP_Post $post       Post being loaded.

bp_block_init_category_filter()   X-Ref
Select the right `block_categories` filter according to WP version.

since: 8.0.0

Generated: Tue Oct 26 01:00:55 2021 Cross-referenced by PHPXref 0.7.1