[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
BuddyPress Filters. This file contains the filters that are used throughout BuddyPress. They are consolidated here to make searching for them easier, and to help developers understand at a glance the order in which things occur.
File Size: | 1291 lines (42 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bp_core_exclude_pages( $pages = array() X-Ref |
Prevent specific pages (eg 'Activate') from showing on page listings. return: array The exclude list, with BP's pages added. param: array $pages List of excluded page IDs, as passed to the since: 1.5.0 |
bp_core_exclude_pages_from_nav_menu_admin( $object = null ) X-Ref |
Prevent specific pages (eg 'Activate') from showing in the Pages meta box of the Menu Administration screen. return: object|null The $object, with a query argument to remove register and activate pages id. param: object|null $object The post type object used in the meta box. since: 2.0.0 |
bp_core_menu_highlight_parent_page( $retval, $page ) X-Ref |
Adds current page CSS classes to the parent BP page in a WP Page Menu. Because BuddyPress primarily uses virtual pages, we need a way to highlight the BP parent page during WP menu generation. This function checks the current BP component against the current page in the WP menu to see if we should highlight the WP page. return: array param: array $retval CSS classes for the current menu page in the menu. param: WP_Post $page The page properties for the current menu item. since: 2.2.0 |
bp_core_menu_highlight_nav_menu_item( $retval, $item ) X-Ref |
Adds current page CSS classes to the parent BP page in a WP Nav Menu. When {@link wp_nav_menu()} is used, this function helps to highlight the current BP parent page during nav menu generation. return: array param: array $retval CSS classes for the current nav menu item in the menu. param: WP_Post $item The properties for the current nav menu item. since: 2.2.0 |
bp_core_filter_comments( $comments, $post_id ) X-Ref |
Filter the blog post comments array and insert BuddyPress URLs for users. return: array $comments The modified comment array. param: array $comments The array of comments supplied to the comments template. param: int $post_id The post ID. since: 1.2.0 |
bp_core_login_redirect( $redirect_to, $redirect_to_raw, $user ) X-Ref |
When a user logs in, redirect him in a logical way. return: string The redirect URL. param: string $redirect_to The URL to be redirected to, sanitized in wp-login.php. param: string $redirect_to_raw The unsanitized redirect_to URL ($_REQUEST['redirect_to']). param: WP_User $user The WP_User object corresponding to a successfully since: 1.2.0 |
bp_email_plaintext_entity_decode( $retval, $prop, $transform ) X-Ref |
Decode HTML entities for plain-text emails. return: string|null $retval Modified email content. param: string $retval Current email content. param: string $prop Email property to check against. param: string $transform Either 'raw' or 'replace-tokens'. since: 2.5.0 |
bp_core_filter_user_welcome_email( $welcome_email ) X-Ref |
Replace the generated password in the welcome email with '[User Set]'. On a standard BP installation, users who register themselves also set their own passwords. Therefore there is no need for the insecure practice of emailing the plaintext password to the user in the welcome email. This filter will not fire when a user is registered by the site admin. return: string Filtered $welcome_email with the password replaced param: string $welcome_email Complete email passed through WordPress. since: 1.2.1 |
bp_core_filter_blog_welcome_email( $welcome_email, $blog_id, $user_id, $password ) X-Ref |
Replace the generated password in the welcome email with '[User Set]'. On a standard BP installation, users who register themselves also set their own passwords. Therefore there is no need for the insecure practice of emailing the plaintext password to the user in the welcome email. This filter will not fire when a user is registered by the site admin. return: string Filtered $welcome_email with $password replaced by '[User Set]'. param: string $welcome_email Complete email passed through WordPress. param: int $blog_id ID of the blog user is joining. param: int $user_id ID of the user joining. param: string $password Password of user. since: 1.2.1 |
bp_core_activation_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key ) X-Ref |
Notify new users of a successful registration (with blog). This function filter's WP's 'wpmu_signup_blog_notification', and replaces WP's default welcome email with a BuddyPress-specific message. return: bool Returns false to stop original WPMU function from continuing. param: string $domain The new blog domain. param: string $path The new blog path. param: string $title The site title. param: string $user The user's login name. param: string $user_email The user's email address. param: string $key The activation key created in wpmu_signup_blog(). since: 1.0.0 |
bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) X-Ref |
Notify new users of a successful registration (without blog). return: false|string Returns false to stop original WPMU function from continuing. param: string $user The user's login name. param: string $user_email The user's email address. param: string $key The activation key created in wpmu_signup_user(). param: array $meta By default, an empty array. since: 1.0.0 |
bp_core_add_meta_to_multisite_signups( $meta ) X-Ref |
Ensure that some meta values are set for new multisite signups. return: array Signup meta data. param: array $meta Signup meta data. Default empty array. since: 10.0.0 |
bp_modify_page_title( $title = '', $sep = '»', $seplocation = 'right' ) X-Ref |
Filter the page title for BuddyPress pages. return: string New page title. param: string $title Original page title. param: string $sep How to separate the various items within the page title. param: string $seplocation Direction to display title. since: 1.5.0 |
bp_modify_document_title_parts( $title = array() X-Ref |
Filter the document title for BuddyPress pages. return: array the unchanged title parts or the BuddyPress ones param: array $title The WordPress document title parts. since: 2.4.3 |
bp_setup_nav_menu_item( $menu_item ) X-Ref |
Add BuddyPress-specific items to the wp_nav_menu. return: WP_Post The modified WP_Post object. param: WP_Post $menu_item The menu item. since: 1.9.0 |
bp_customizer_nav_menus_get_items( $items = array() X-Ref |
Populate BuddyPress user nav items for the customizer. return: array The paginated BuddyPress user nav items. param: array $items The array of menu items. param: string $type The requested type. param: string $object The requested object name. param: integer $page The page num being requested. since: 2.3.3 |
bp_customizer_nav_menus_set_item_types( $item_types = array() X-Ref |
Set BuddyPress item navs for the customizer. return: array $item_types An associative array structured for the customizer. param: array $item_types An associative array structured for the customizer. since: 2.3.3 |
bp_filter_metaid_column_name( $q ) X-Ref |
Filter SQL query strings to swap out the 'meta_id' column. WordPress uses the meta_id column for commentmeta and postmeta, and so hardcodes the column name into its *_metadata() functions. BuddyPress, on the other hand, uses 'id' for the primary column. To make WP's functions usable for BuddyPress, we use this just-in-time filter on 'query' to swap 'meta_id' with 'id. return: string param: string $q SQL query. since: 2.0.0 |
bp_core_filter_edit_post_link( $edit_link = '', $post_id = 0 ) X-Ref |
Filter the edit post link to avoid its display in BuddyPress pages. return: false|string Will be a boolean (false) if $post_id is 0. Will be a string (the unchanged edit link) param: string $edit_link The edit link. param: int $post_id Post ID. since: 2.1.0 |
bp_core_add_loading_lazy_attribute( $content = '' ) X-Ref |
Add 'loading="lazy"' attribute into images and iframes. return: string since: 7.0.0 |
bp_maybe_load_mentions_scripts_for_blog_content( $load_mentions, $mentions_enabled ) X-Ref |
Should BuddyPress load the mentions scripts and related assets, including results to prime the mentions suggestions? return: bool True if mentions scripts should be loaded. param: bool $load_mentions True to load mentions assets, false otherwise. param: bool $mentions_enabled True if mentions are enabled. since: 2.2.0 |
_bp_core_inject_bp_widget_css_class( $params ) X-Ref |
Injects specific BuddyPress CSS classes into a widget sidebar. Helps to standardize styling of BuddyPress widgets within a theme that does not use dynamic CSS classes in their widget sidebar's 'before_widget' call. return: array param: array $params Current sidebar params. since: 2.4.0 |
bp_email_add_link_color_to_template( $value, $property_name, $transform ) X-Ref |
Add email link styles to rendered email template. This is only used when the email content has been merged into the email template. return: string Updated value. param: string $value Property value. param: string $property_name Email template property name. param: string $transform How the return value was transformed. since: 2.5.0 |
bp_email_set_default_headers( $headers, $property, $transform, $email ) X-Ref |
Add custom headers to outgoing emails. return: array param: array $headers Array of email headers. param: string $property Name of property. Unused. param: string $transform Return value transformation. Unused. param: BP_Email $email Email object reference. since: 2.5.0 |
bp_email_set_default_tokens( $tokens, $property_name, $transform, $email ) X-Ref |
Add default email tokens. return: array param: array $tokens Email tokens. param: string $property_name Unused. param: string $transform Unused. param: BP_Email $email Email being sent. since: 2.5.0 |
bp_core_render_email_template( $template ) X-Ref |
Find and render the template for Email posts (the Customizer and admin previews). Misuses the `template_include` filter which expects a string, but as we need to replace the `{{{content}}}` token with the post's content, we use object buffering to load the template, replace the token, and render it. The function returns an empty string to prevent WordPress rendering another template. return: string param: string $template Path to template (probably single.php). since: 2.5.0 |
bp_core_components_subdirectory_reserved_names( $names = array() X-Ref |
Adds BuddyPress components' slugs to the WordPress Multisite subdirectory reserved names. return: array The WordPress & BuddyPress Multisite subdirectory reserved names. param: array $names The WordPress Multisite subdirectory reserved names. since: 6.0.0 |
Generated: Thu Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |