[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * BuddyPress XProfile Notifications. 4 * 5 * @package BuddyPress 6 * @subpackage XProfileSettings 7 * @since 1.0.0 8 */ 9 10 /** Notifications *************************************************************/ 11 12 /** 13 * Format notifications for the extended profile (Xprofile) component. 14 * 15 * @since 2.4.0 16 * 17 * @param string $action The kind of notification being rendered. 18 * @param int $item_id The primary item ID. 19 * @param int $secondary_item_id The secondary item ID. 20 * @param int $total_items The total number of messaging-related notifications 21 * waiting for the user. 22 * @param string $format 'string' for notification HTML link or 'array' for separate link and text. 23 * @return string 24 */ 25 function xprofile_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { 26 switch ( $action ) { 27 default: 28 29 /** 30 * Allows plugins to filter extended profile-related custom notifications. 31 * Notifications must have a 'component_name' of 'xprofile' to be routed 32 * to this function. 33 * 34 * @since 2.4.0 35 * 36 * @param string $notification Null value. 37 * @param int $item_id The primary item ID. 38 * @param int $secondary_item_id The secondary item ID. 39 * @param int $total_items The total number of messaging-related notifications 40 * waiting for the user. 41 * @param string $format 'string' for BuddyBar-compatible notifications; 42 * 'array' for WP Toolbar. 43 */ 44 $custom_action_notification = apply_filters( 'bp_xprofile_' . $action . '_notification', null, $item_id, $secondary_item_id, $total_items, $format ); 45 46 if ( ! is_null( $custom_action_notification ) ) { 47 return $custom_action_notification; 48 } 49 50 break; 51 } 52 53 return false; 54 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Dec 26 01:01:04 2024 | Cross-referenced by PHPXref 0.7.1 |