[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

BuddyPress Common Admin Functions.

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

Defines 36 functions

  bp_core_admin_menu_init()
  bp_core_admin_backpat_menu()
  bp_core_modify_admin_menu_highlight()
  bp_core_admin_backpat_page()
  bp_core_print_admin_notices()
  bp_core_add_admin_notice()
  bp_core_activation_notice()
  bp_do_activation_redirect()
  bp_core_admin_tabbed_screen_header()
  bp_core_admin_tabs()
  bp_core_get_admin_settings_tabs()
  bp_core_get_admin_tools_tabs()
  bp_core_get_admin_tabs()
  bp_backcompat_admin_tabs()
  bp_core_add_contextual_help()
  bp_core_add_contextual_help_content()
  bp_admin_separator()
  bp_admin_custom_menu_order()
  bp_admin_menu_order()
  bp_admin_list_table_current_bulk_action()
  bp_admin_wp_nav_menu_meta_box()
  bp_admin_get_wp_nav_menu_items()
  bp_admin_do_wp_nav_menu_meta_box()
  bp_admin_email_maybe_add_translation_notice()
  bp_admin_email_add_codex_notice()
  bp_email_tax_type_metabox()
  bp_email_custom_metaboxes()
  bp_email_plaintext_metabox()
  bp_admin_wp_nav_menu_restrict_items()
  bp_core_admin_user_row_actions()
  bp_core_admin_user_manage_spammers()
  bp_core_admin_user_spammed_js()
  bp_core_admin_notice_dismiss_callback()
  bp_core_admin_body_classes()
  bp_block_category()
  bp_block_init_category_filter()

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
boxes.

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.

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

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_tabbed_screen_header( $title = '', $active_tab = '', $context = 'settings' )   X-Ref
Outputs the BP Admin Tabbed header.

param: string $title      The title of the Admin page.
param: string $active_tab The current displayed tab.
param: string $context    The context of use for the tabs. Defaults to 'settings'.
since: 10.0.0

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

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'.
since: 1.5.0
since: 8.0.0 Adds the `$context` parameter.

bp_core_get_admin_settings_tabs( $apply_filters = true )   X-Ref
Returns the BP Admin settings tabs.

return: array              The BP Admin settings tabs.
param: bool $apply_filters Whether to apply filters or not.
since: 10.0.0

bp_core_get_admin_tools_tabs( $apply_filters = true )   X-Ref
Returns the BP Admin tools tabs.

return: array              The BP Admin tools tabs.
param: bool $apply_filters Whether to apply filters or not.
since: 10.0.0

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

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'.
since: 2.2.0
since: 8.0.0 Adds the `$context` parameter.

bp_backcompat_admin_tabs( $context = '', $active_tab = '' )   X-Ref
Makes sure plugins using `bp_core_admin_tabs()` to output their custom BP Admin Tabs are well displayed
inside the 10.0.0 tabbed header.

param: string $context    The context of use for the tabs.
param: string $active_tab The active tab.
since: 10.0.0

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

param: string $screen Current screen.
since: 1.7.0

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

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

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.

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

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

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

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.

return: string
since: 1.7.0

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.

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).
since: 7.0.0

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.

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

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.

param: WP_Post $post
since: 2.5.0

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
occur.
- 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.

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

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.

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

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

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

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

since: 8.0.0



Generated: Thu Nov 21 01:00:57 2024 Cross-referenced by PHPXref 0.7.1