Changeset 10138
- Timestamp:
- 09/24/2015 11:55:02 PM (9 years ago)
- Location:
- trunk/src/bp-notifications
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-actions.php
r9993 r10138 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Notifications Actions. … … 12 11 */ 13 12 14 // Exit if accessed directly 13 // Exit if accessed directly. 15 14 defined( 'ABSPATH' ) || exit; 16 15 … … 18 17 * Handle marking single notifications as read. 19 18 * 20 * @since BuddyPress (1.9.0)19 * @since 1.9.0 21 20 * 22 21 * @return bool … … 54 53 * Handle marking single notifications as unread. 55 54 * 56 * @since BuddyPress (1.9.0)55 * @since 1.9.0 57 56 * 58 57 * @return bool … … 90 89 * Handle deleting single notifications. 91 90 * 92 * @since BuddyPress (1.9.0)91 * @since 1.9.0 93 92 * 94 93 * @return bool … … 126 125 * Handles bulk management (mark as read/unread, delete) of notifications. 127 126 * 128 * @since BuddyPress (2.2.0)127 * @since 2.2.0 129 128 * 130 129 * @return bool -
trunk/src/bp-notifications/bp-notifications-adminbar.php
r9993 r10138 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Notifications Admin Bar functions. … … 10 9 */ 11 10 12 // Exit if accessed directly 11 // Exit if accessed directly. 13 12 defined( 'ABSPATH' ) || exit; 14 13 … … 16 15 * Build the "Notifications" dropdown. 17 16 * 18 * @since BuddyPress (1.9.0)17 * @since 1.9.0 19 18 * 20 19 * @return bool -
trunk/src/bp-notifications/bp-notifications-cache.php
r9993 r10138 1 1 <?php 2 3 2 /** 4 3 * Functions related to notifications caching. 5 4 * 6 * @since BuddyPress (2.0.0) 5 * @since 2.0.0 6 * 7 * @package BuddyPress 8 * @subpackage NotificationsCache 7 9 */ 10 11 // Exit if accessed directly. 12 defined( 'ABSPATH' ) || exit; 8 13 9 14 /** … … 14 19 * when using notification meta within a loop context. 15 20 * 16 * @since BuddyPress (2.3.0)21 * @since 2.3.0 17 22 * 18 23 * @param int|string|array|bool $notification_ids Accepts a single notification_id, or a … … 34 39 * Clear all notifications cache for a given user ID. 35 40 * 36 * @since BuddyPress (2.3.0)41 * @since 2.3.0 37 42 * 38 43 * @param int $user_id The user ID's cache to clear. … … 45 50 * Invalidate 'all_for_user_' cache when saving. 46 51 * 47 * @since BuddyPress (2.0.0)52 * @since 2.0.0 48 53 * 49 54 * @param BP_Notifications_Notification $n Notification object. … … 57 62 * Invalidate the 'all_for_user_' cache when deleting. 58 63 * 59 * @since BuddyPress (2.0.0)64 * @since 2.0.0 60 65 * 61 66 * @param int $args Notification deletion arguments. … … 81 86 * Invalidates 'all_for_user_' cache when updating. 82 87 * 83 * @since BuddyPress (2.3.0)88 * @since 2.3.0 84 89 * 85 90 * @param array $update_args See BP_Notifications_Notification::update() for description. -
trunk/src/bp-notifications/bp-notifications-classes.php
r9993 r10138 8 8 * @subpackage NotificationsClasses 9 9 * 10 * @since BuddyPress (1.9.0)10 * @since 1.9.0 11 11 */ 12 12 13 // Exit if accessed directly 13 // Exit if accessed directly. 14 14 defined( 'ABSPATH' ) || exit; 15 15 -
trunk/src/bp-notifications/bp-notifications-functions.php
r10055 r10138 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Member Notifications Functions. … … 10 9 */ 11 10 12 // Exit if accessed directly 11 // Exit if accessed directly. 13 12 defined( 'ABSPATH' ) || exit; 14 13 … … 16 15 * Add a notification for a specific user, from a specific component. 17 16 * 18 * @since BuddyPress (1.9.0)17 * @since 1.9.0 19 18 * 20 19 * @param array $args { … … 81 80 * Get a specific notification by its ID. 82 81 * 83 * @since BuddyPress (1.9.0)82 * @since 1.9.0 84 83 * 85 84 * @param int $id ID of the notification. … … 94 93 * Delete a specific notification by its ID. 95 94 * 96 * @since BuddyPress (1.9.0)95 * @since 1.9.0 97 96 * 98 97 * @param int $id ID of the notification to delete. … … 113 112 * Used when clearing out notifications for a specific notification item. 114 113 * 115 * @since BuddyPress (1.9.0)114 * @since 1.9.0 116 115 * 117 116 * @param int $id ID of the notification. … … 134 133 * Get all notifications for a user and cache them. 135 134 * 136 * @since BuddyPress (2.1.0)135 * @since 2.1.0 137 136 * 138 137 * @param int $user_id ID of the user whose notifications are being fetched. … … 159 158 * Filters all notifications for a user. 160 159 * 161 * @since BuddyPress (2.1.0)160 * @since 2.1.0 162 161 * 163 162 * @param array $notifications Array of notifications for user. … … 170 169 * Get notifications for a specific user. 171 170 * 172 * @since BuddyPress (1.9.0)171 * @since 1.9.0 173 172 * 174 173 * @param int $user_id ID of the user whose notifications are being fetched. … … 277 276 * Filters the notifications for a user. 278 277 * 279 * @since BuddyPress (1.9.0)278 * @since 1.9.0 280 279 * 281 280 * @param array $ref_array Array of properties for the current notification being rendered. … … 316 315 * Filters the final array of notifications to be displayed for a user. 317 316 * 318 * @since BuddyPress (1.6.0)317 * @since 1.6.0 319 318 * 320 319 * @param array|bool $renderable Array of notifications to render or false if no notifications. … … 333 332 * has visited that component. 334 333 * 335 * @since BuddyPress (1.9.0)334 * @since 1.9.0 336 335 * 337 336 * @param int $user_id ID of the user whose notifications are being deleted. … … 355 354 * has visited that component. 356 355 * 357 * @since BuddyPress (1.9.0)356 * @since 1.9.0 358 357 * 359 358 * @param int $user_id ID of the user whose notifications are being deleted. … … 380 379 * Used when clearing out notifications for an entire component. 381 380 * 382 * @since BuddyPress (1.9.0)381 * @since 1.9.0 383 382 * 384 383 * @param int $item_id ID of the user whose notifications are being deleted. … … 407 406 * certain components (such as Friends). Use with caution! 408 407 * 409 * @since BuddyPress (1.9.0)408 * @since 1.9.0 410 409 * 411 410 * @param int $user_id ID of the user whose associated items are being deleted. … … 431 430 * has visited that component. 432 431 * 433 * @since BuddyPress (1.9.0)432 * @since 1.9.0 434 433 * 435 434 * @param int $user_id ID of the user whose notifications are being deleted. … … 459 458 * has visited that component. 460 459 * 461 * @since BuddyPress (1.9.0)460 * @since 1.9.0 462 461 * 463 462 * @param int $user_id ID of the user whose notifications are being deleted. … … 490 489 * Used when clearing out notifications for an entire component. 491 490 * 492 * @since BuddyPress (1.9.0)491 * @since 1.9.0 493 492 * 494 493 * @param int $item_id ID of the user whose notifications are being deleted. … … 523 522 * certain components (such as Friends). Use with caution! 524 523 * 525 * @since BuddyPress (1.9.0)524 * @since 1.9.0 526 525 * 527 526 * @param int $user_id ID of the user whose associated items are being deleted. … … 552 551 * Used before deleting a notification for a user. 553 552 * 554 * @since BuddyPress (1.9.0)553 * @since 1.9.0 555 554 * 556 555 * @param int $user_id ID of the user being checked. … … 566 565 * Get a count of unread notification items for a user. 567 566 * 568 * @since BuddyPress (1.9.0)567 * @since 1.9.0 569 568 * 570 569 * @param int $user_id ID of the user whose unread notifications are being … … 580 579 * Filters the count of unread notification items for a user. 581 580 * 582 * @since BuddyPress (1.9.0)581 * @since 1.9.0 583 582 * 584 583 * @param int $count Count of unread notification items for a user. … … 591 590 * registered Notifications callbacks. 592 591 * 593 * @since BuddyPress (1.9.1)592 * @since 1.9.1 594 593 * 595 594 * @see http://buddypress.trac.wordpress.org/ticket/5300 … … 618 617 * Filters active components with registered notifications callbacks. 619 618 * 620 * @since BuddyPress (1.9.1)619 * @since 1.9.1 621 620 * 622 621 * @param array $component_names Array of registered component names. … … 631 630 * Delete a meta entry from the DB for a notification item. 632 631 * 633 * @since BuddyPress (2.3.0)632 * @since 2.3.0 634 633 * 635 634 * @global object $wpdb WordPress database access object. … … 677 676 * Get metadata for a given notification item. 678 677 * 679 * @since BuddyPress (2.3.0)678 * @since 2.3.0 680 679 * 681 680 * @uses apply_filters() To call the 'bp_notifications_get_meta' hook. … … 699 698 * Filters the metadata for a specified notification item. 700 699 * 701 * @since BuddyPress (2.3.0)700 * @since 2.3.0 702 701 * 703 702 * @param mixed $retval The meta values for the notification item. … … 712 711 * Update a piece of notification meta. 713 712 * 714 * @since BuddyPress (1.2.0)713 * @since 1.2.0 715 714 * 716 715 * @param int $notification_id ID of the notification item whose metadata is being … … 738 737 * Add a piece of notification metadata. 739 738 * 740 * @since BuddyPress (2.3.0)739 * @since 2.3.0 741 740 * 742 741 * @param int $notification_id ID of the notification item. -
trunk/src/bp-notifications/bp-notifications-loader.php
r9993 r10138 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Member Notifications Loader. … … 8 7 * @package BuddyPress 9 8 * @subpackage NotificationsLoader 10 * @since BuddyPress (1.9.0)9 * @since 1.9.0 11 10 */ 12 11 … … 19 18 * Start the notifications component creation process. 20 19 * 21 * @since BuddyPress (1.9.0)20 * @since 1.9.0 22 21 */ 23 22 public function __construct() { … … 35 34 * Include notifications component files. 36 35 * 37 * @since BuddyPress (1.9.0)36 * @since 1.9.0 38 37 * 39 38 * @see BP_Component::includes() for a description of arguments. … … 58 57 * Set up component global data. 59 58 * 60 * @since BuddyPress (1.9.0)59 * @since 1.9.0 61 60 * 62 61 * @see BP_Component::setup_globals() for a description of arguments. … … 93 92 * Set up component navigation. 94 93 * 95 * @since BuddyPress (1.9.0)94 * @since 1.9.0 96 95 * 97 96 * @see BP_Component::setup_nav() for a description of arguments. … … 165 164 * Set up the component entries in the WordPress Admin Bar. 166 165 * 167 * @since BuddyPress (1.9.0)166 * @since 1.9.0 168 167 * 169 168 * @see BP_Component::setup_nav() for a description of the $wp_admin_nav … … 222 221 * Set up the title for pages and <title>. 223 222 * 224 * @since BuddyPress (1.9.0)223 * @since 1.9.0 225 224 */ 226 225 public function setup_title() { … … 248 247 * Setup cache groups. 249 248 * 250 * @since BuddyPress (2.2.0)249 * @since 2.2.0 251 250 */ 252 251 public function setup_cache_groups() { … … 265 264 * Bootstrap the Notifications component. 266 265 * 267 * @since BuddyPress (1.9.0)266 * @since 1.9.0 268 267 */ 269 268 function bp_setup_notifications() { -
trunk/src/bp-notifications/bp-notifications-screens.php
r9819 r10138 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Notifications Screen Functions. … … 12 11 */ 13 12 14 // Exit if accessed directly 13 // Exit if accessed directly. 15 14 defined( 'ABSPATH' ) || exit; 16 15 … … 18 17 * Catch and route the 'unread' notifications screen. 19 18 * 20 * @since BuddyPress (1.9.0)19 * @since 1.9.0 21 20 */ 22 21 function bp_notifications_screen_unread() { … … 25 24 * Fires right before the loading of the notifications unread screen template file. 26 25 * 27 * @since BuddyPress (1.9.0)26 * @since 1.9.0 28 27 */ 29 28 do_action( 'bp_notifications_screen_unread' ); … … 32 31 * Filters the template to load for the notifications unread screen. 33 32 * 34 * @since BuddyPress (1.9.0)33 * @since 1.9.0 35 34 * 36 35 * @param string $template Path to the notifications unread template to load. … … 42 41 * Catch and route the 'read' notifications screen. 43 42 * 44 * @since BuddyPress (1.9.0)43 * @since 1.9.0 45 44 */ 46 45 function bp_notifications_screen_read() { … … 49 48 * Fires right before the loading of the notifications read screen template file. 50 49 * 51 * @since BuddyPress (1.9.0)50 * @since 1.9.0 52 51 */ 53 52 do_action( 'bp_notifications_screen_read' ); … … 56 55 * Filters the template to load for the notifications read screen. 57 56 * 58 * @since BuddyPress (1.9.0)57 * @since 1.9.0 59 58 * 60 59 * @param string $template Path to the notifications read template to load. … … 66 65 * Catch and route the 'settings' notifications screen. 67 66 * 68 * @since BuddyPress (1.9.0)67 * @since 1.9.0 69 68 */ 70 69 function bp_notifications_screen_settings() { -
trunk/src/bp-notifications/bp-notifications-template.php
r10079 r10138 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Notifications Template Functions. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 14 13 * Output the notifications component slug. 15 14 * 16 * @since BuddyPress (1.9.0)15 * @since 1.9.0 17 16 */ 18 17 function bp_notifications_slug() { … … 22 21 * Return the notifications component slug. 23 22 * 24 * @since BuddyPress (1.9.0)23 * @since 1.9.0 25 24 * 26 25 * @return string Slug of the Notifications component. … … 31 30 * Filters the notifications component slug. 32 31 * 33 * @since BuddyPress (1.9.0)32 * @since 1.9.0 34 33 * 35 34 * @param string $slug Notifications component slug. … … 41 40 * Output the notifications permalink. 42 41 * 43 * @since BuddyPress (1.9.0)42 * @since 1.9.0 44 43 */ 45 44 function bp_notifications_permalink() { … … 49 48 * Return the notifications permalink. 50 49 * 51 * @since BuddyPress (1.9.0)50 * @since 1.9.0 52 51 * 53 52 * @return string Notifications permalink. … … 59 58 * Filters the notifications permalink. 60 59 * 61 * @since BuddyPress (1.9.0)60 * @since 1.9.0 62 61 * 63 62 * @param string $retval Permalink for the notifications. … … 69 68 * Output the unread notifications permalink. 70 69 * 71 * @since BuddyPress (1.9.0)70 * @since 1.9.0 72 71 */ 73 72 function bp_notifications_unread_permalink() { … … 77 76 * Return the unread notifications permalink. 78 77 * 79 * @since BuddyPress (1.9.0)78 * @since 1.9.0 80 79 * 81 80 * @return string Unread notifications permalink. … … 87 86 * Filters the unread notifications permalink. 88 87 * 89 * @since BuddyPress (1.9.0)88 * @since 1.9.0 90 89 * 91 90 * @param string $retval Permalink for the unread notifications. … … 97 96 * Output the read notifications permalink. 98 97 * 99 * @since BuddyPress (1.9.0)98 * @since 1.9.0 100 99 */ 101 100 function bp_notifications_read_permalink() { … … 105 104 * Return the read notifications permalink. 106 105 * 107 * @since BuddyPress (1.9.0)106 * @since 1.9.0 108 107 * 109 108 * @return string Read notifications permalink. … … 115 114 * Filters the read notifications permalink. 116 115 * 117 * @since BuddyPress (1.9.0)116 * @since 1.9.0 118 117 * 119 118 * @param string $retval Permalink for the read notifications. … … 129 128 * Responsible for loading a group of notifications into a loop for display. 130 129 * 131 * @since BuddyPress (1.9.0)130 * @since 1.9.0 132 131 */ 133 132 class BP_Notifications_Template { … … 136 135 * The loop iterator. 137 136 * 138 * @since BuddyPress (1.9.0)137 * @since 1.9.0 139 138 * @access public 140 139 * @var int … … 145 144 * The number of notifications returned by the paged query. 146 145 * 147 * @since BuddyPress (1.9.0)146 * @since 1.9.0 148 147 * @access public 149 148 * @var int … … 154 153 * Total number of notifications matching the query. 155 154 * 156 * @since BuddyPress (1.9.0)155 * @since 1.9.0 157 156 * @access public 158 157 * @var int … … 163 162 * Array of notifications located by the query. 164 163 * 165 * @since BuddyPress (1.9.0)164 * @since 1.9.0 166 165 * @access public 167 166 * @var array … … 172 171 * The notification object currently being iterated on. 173 172 * 174 * @since BuddyPress (1.9.0)173 * @since 1.9.0 175 174 * @access public 176 175 * @var object … … 181 180 * A flag for whether the loop is currently being iterated. 182 181 * 183 * @since BuddyPress (1.9.0)182 * @since 1.9.0 184 183 * @access public 185 184 * @var bool … … 190 189 * The ID of the user to whom the displayed notifications belong. 191 190 * 192 * @since BuddyPress (1.9.0)191 * @since 1.9.0 193 192 * @access public 194 193 * @var int … … 199 198 * The page number being requested. 200 199 * 201 * @since BuddyPress (1.9.0)200 * @since 1.9.0 202 201 * @access public 203 202 * @var int … … 208 207 * The $_GET argument used in URLs for determining pagination. 209 208 * 210 * @since BuddyPress (1.9.0)209 * @since 1.9.0 211 210 * @access public 212 211 * @var int … … 217 216 * The number of items to display per page of results. 218 217 * 219 * @since BuddyPress (1.9.0)218 * @since 1.9.0 220 219 * @access public 221 220 * @var int … … 226 225 * An HTML string containing pagination links. 227 226 * 228 * @since BuddyPress (1.9.0)227 * @since 1.9.0 229 228 * @access public 230 229 * @var string … … 235 234 * A string to match against. 236 235 * 237 * @since BuddyPress (1.9.0)236 * @since 1.9.0 238 237 * @access public 239 238 * @var string … … 244 243 * A database column to order the results by. 245 244 * 246 * @since BuddyPress (1.9.0)245 * @since 1.9.0 247 246 * @access public 248 247 * @var string … … 253 252 * The direction to sort the results (ASC or DESC). 254 253 * 255 * @since BuddyPress (1.9.0)254 * @since 1.9.0 256 255 * @access public 257 256 * @var string … … 262 261 * Array of variables used in this notification query. 263 262 * 264 * @since BuddyPress (2.2.2)263 * @since 2.2.2 265 264 * @var array 266 265 */ … … 272 271 * @see bp_has_notifications() For information on the array format. 273 272 * 274 * @since BuddyPress (1.9.0)273 * @since 1.9.0 275 274 * 276 275 * @param array $args { … … 378 377 * Whether there are notifications available in the loop. 379 378 * 380 * @since BuddyPress (1.9.0)379 * @since 1.9.0 381 380 * 382 381 * @see bp_has_notifications() … … 395 394 * Set up the next notification and iterate index. 396 395 * 397 * @since BuddyPress (1.9.0)396 * @since 1.9.0 398 397 * 399 398 * @return object The next notification to iterate over. … … 411 410 * Rewind the blogs and reset blog index. 412 411 * 413 * @since BuddyPress (1.9.0)412 * @since 1.9.0 414 413 */ 415 414 public function rewind_notifications() { … … 429 428 * while ( bp_notifications() ) { ... 430 429 * 431 * @since BuddyPress (1.9.0)430 * @since 1.9.0 432 431 * 433 432 * @see bp_notifications() … … 446 445 * Fires right before the rewinding of notification posts. 447 446 * 448 * @since BuddyPress (1.9.0)447 * @since 1.9.0 449 448 */ 450 449 do_action( 'notifications_loop_end'); … … 464 463 * that iteration make reference to the current notification. 465 464 * 466 * @since BuddyPress (1.9.0)465 * @since 1.9.0 467 466 * 468 467 * @see bp_the_notification() … … 478 477 * Fires if the current notification item is the first in the notification loop. 479 478 * 480 * @since BuddyPress (1.9.0)479 * @since 1.9.0 481 480 */ 482 481 do_action( 'notifications_loop_start' ); … … 494 493 * templates and template functions to display a list of notifications. 495 494 * 496 * @since BuddyPress (1.9.0)495 * @since 1.9.0 497 496 * 498 497 * @param array|string $args { … … 561 560 * Filters whether or not the user has notifications to display. 562 561 * 563 * @since BuddyPress (1.9.0)562 * @since 1.9.0 564 563 * 565 564 * @param bool $value Whether or not there are notifications to display. … … 572 571 * Get the notifications returned by the template loop. 573 572 * 574 * @since BuddyPress (1.9.0)573 * @since 1.9.0 575 574 * 576 575 * @return array List of notifications. … … 583 582 * Get the current notification object in the loop. 584 583 * 585 * @since BuddyPress (1.9.0)584 * @since 1.9.0 586 585 * 587 586 * @return object The current notification within the loop. … … 596 595 * Output the ID of the notification currently being iterated on. 597 596 * 598 * @since BuddyPress (1.9.0)597 * @since 1.9.0 599 598 */ 600 599 function bp_the_notification_id() { … … 604 603 * Return the ID of the notification currently being iterated on. 605 604 * 606 * @since BuddyPress (1.9.0)605 * @since 1.9.0 607 606 * 608 607 * @return int ID of the current notification. … … 613 612 * Filters the ID of the notification currently being iterated on. 614 613 * 615 * @since BuddyPress (1.9.0)614 * @since 1.9.0 616 615 * 617 616 * @param int $id ID of the notification being iterated on. … … 623 622 * Output the associated item ID of the notification currently being iterated on. 624 623 * 625 * @since BuddyPress (1.9.0)624 * @since 1.9.0 626 625 */ 627 626 function bp_the_notification_item_id() { … … 631 630 * Return the associated item ID of the notification currently being iterated on. 632 631 * 633 * @since BuddyPress (1.9.0)632 * @since 1.9.0 634 633 * 635 634 * @return int ID of the item associated with the current notification. … … 640 639 * Filters the associated item ID of the notification currently being iterated on. 641 640 * 642 * @since BuddyPress (1.9.0)641 * @since 1.9.0 643 642 * 644 643 * @param int $item_id ID of the associated item. … … 650 649 * Output the secondary associated item ID of the notification currently being iterated on. 651 650 * 652 * @since BuddyPress (1.9.0)651 * @since 1.9.0 653 652 */ 654 653 function bp_the_notification_secondary_item_id() { … … 658 657 * Return the secondary associated item ID of the notification currently being iterated on. 659 658 * 660 * @since BuddyPress (1.9.0)659 * @since 1.9.0 661 660 * 662 661 * @return int ID of the secondary item associated with the current notification. … … 667 666 * Filters the secondary associated item ID of the notification currently being iterated on. 668 667 * 669 * @since BuddyPress (1.9.0)668 * @since 1.9.0 670 669 * 671 670 * @param int $secondary_item_id ID of the secondary associated item. … … 677 676 * Output the name of the component associated with the notification currently being iterated on. 678 677 * 679 * @since BuddyPress (1.9.0)678 * @since 1.9.0 680 679 */ 681 680 function bp_the_notification_component_name() { … … 685 684 * Return the name of the component associated with the notification currently being iterated on. 686 685 * 687 * @since BuddyPress (1.9.0)686 * @since 1.9.0 688 687 * 689 688 * @return int Name of the component associated with the current notification. … … 694 693 * Filters the name of the component associated with the notification currently being iterated on. 695 694 * 696 * @since BuddyPress (1.9.0)695 * @since 1.9.0 697 696 * 698 697 * @param int $component_name Name of the component associated with the current notification. … … 704 703 * Output the name of the action associated with the notification currently being iterated on. 705 704 * 706 * @since BuddyPress (1.9.0)705 * @since 1.9.0 707 706 */ 708 707 function bp_the_notification_component_action() { … … 712 711 * Return the name of the action associated with the notification currently being iterated on. 713 712 * 714 * @since BuddyPress (1.9.0)713 * @since 1.9.0 715 714 * 716 715 * @return int Name of the action associated with the current notification. … … 721 720 * Filters the name of the action associated with the notification currently being iterated on. 722 721 * 723 * @since BuddyPress (1.9.0)722 * @since 1.9.0 724 723 * 725 724 * @param int $component_action Name of the action associated with the current notification. … … 731 730 * Output the timestamp of the current notification. 732 731 * 733 * @since BuddyPress (1.9.0)732 * @since 1.9.0 734 733 */ 735 734 function bp_the_notification_date_notified() { … … 739 738 * Return the timestamp of the current notification. 740 739 * 741 * @since BuddyPress (1.9.0)740 * @since 1.9.0 742 741 * 743 742 * @return string Timestamp of the current notification. … … 748 747 * Filters the timestamp of the current notification. 749 748 * 750 * @since BuddyPress (1.9.0)749 * @since 1.9.0 751 750 * 752 751 * @param string $date_notified Timestamp of the current notification. … … 758 757 * Output the timestamp of the current notification. 759 758 * 760 * @since BuddyPress (1.9.0)759 * @since 1.9.0 761 760 */ 762 761 function bp_the_notification_time_since() { … … 766 765 * Return the timestamp of the current notification. 767 766 * 768 * @since BuddyPress (1.9.0)767 * @since 1.9.0 769 768 * 770 769 * @return string Timestamp of the current notification. … … 787 786 * Filters the time since value of the current notification. 788 787 * 789 * @since BuddyPress (1.9.0)788 * @since 1.9.0 790 789 * 791 790 * @param string $retval Time since value for current notification. … … 797 796 * Output full-text description for a specific notification. 798 797 * 799 * @since BuddyPress (1.9.0)798 * @since 1.9.0 800 799 */ 801 800 function bp_the_notification_description() { … … 806 805 * Get full-text description for a specific notification. 807 806 * 808 * @since BuddyPress (1.9.0)807 * @since 1.9.0 809 808 * 810 809 * @return string … … 832 831 * Filters the full-text description for a specific notification. 833 832 * 834 * @since BuddyPress (1.9.0)835 * @since BuddyPress (2.3.0)Added the `$notification` parameter.833 * @since 1.9.0 834 * @since 2.3.0 Added the `$notification` parameter. 836 835 * 837 836 * @param string $description Full-text description for a specific notification. … … 844 843 * Output the mark read link for the current notification. 845 844 * 846 * @since BuddyPress (1.9.0)845 * @since 1.9.0 847 846 * 848 847 * @uses bp_get_the_notification_mark_read_link() … … 854 853 * Return the mark read link for the current notification. 855 854 * 856 * @since BuddyPress (1.9.0)855 * @since 1.9.0 857 856 */ 858 857 function bp_get_the_notification_mark_read_link() { … … 868 867 * Filters the mark read link for the current notification. 869 868 * 870 * @since BuddyPress (1.9.0)869 * @since 1.9.0 871 870 * 872 871 * @param string $retval HTML for the mark read link for the current notification. … … 880 879 * Since this function directly outputs a URL, it is escaped. 881 880 * 882 * @since BuddyPress (2.1.0)881 * @since 2.1.0 883 882 * 884 883 * @uses bp_get_the_notification_mark_read_url() … … 890 889 * Return the URL used for marking a single notification as read. 891 890 * 892 * @since BuddyPress (2.1.0)891 * @since 2.1.0 893 892 */ 894 893 function bp_get_the_notification_mark_read_url() { … … 912 911 * Filters the URL used for marking a single notification as read. 913 912 * 914 * @since BuddyPress (2.1.0)913 * @since 2.1.0 915 914 * 916 915 * @param string $url URL to use for marking the single notification as read. … … 922 921 * Output the mark unread link for the current notification. 923 922 * 924 * @since BuddyPress (1.9.0)923 * @since 1.9.0 925 924 * 926 925 * @uses bp_get_the_notification_mark_unread_link() … … 932 931 * Return the mark unread link for the current notification. 933 932 * 934 * @since BuddyPress (1.9.0)933 * @since 1.9.0 935 934 */ 936 935 function bp_get_the_notification_mark_unread_link() { … … 946 945 * Filters the link used for marking a single notification as unread. 947 946 * 948 * @since BuddyPress (1.9.0)947 * @since 1.9.0 949 948 * 950 949 * @param string $retval HTML for the mark unread link for the current notification. … … 958 957 * Since this function directly outputs a URL, it is escaped. 959 958 * 960 * @since BuddyPress (2.1.0)959 * @since 2.1.0 961 960 * 962 961 * @uses bp_get_the_notification_mark_unread_url() … … 968 967 * Return the URL used for marking a single notification as unread. 969 968 * 970 * @since BuddyPress (2.1.0)969 * @since 2.1.0 971 970 */ 972 971 function bp_get_the_notification_mark_unread_url() { … … 990 989 * Filters the URL used for marking a single notification as unread. 991 990 * 992 * @since BuddyPress (2.1.0)991 * @since 2.1.0 993 992 * 994 993 * @param string $url URL to use for marking the single notification as unread. … … 1000 999 * Output the mark link for the current notification. 1001 1000 * 1002 * @since BuddyPress (1.9.0)1001 * @since 1.9.0 1003 1002 * 1004 1003 * @uses bp_get_the_notification_mark_unread_link() … … 1010 1009 * Return the mark link for the current notification. 1011 1010 * 1012 * @since BuddyPress (1.9.0)1011 * @since 1.9.0 1013 1012 */ 1014 1013 function bp_get_the_notification_mark_link() { … … 1023 1022 * Filters the mark link for the current notification. 1024 1023 * 1025 * @since BuddyPress (1.9.0)1024 * @since 1.9.0 1026 1025 * 1027 1026 * @param string $retval The mark link for the current notification. … … 1033 1032 * Output the delete link for the current notification. 1034 1033 * 1035 * @since BuddyPress (1.9.0)1034 * @since 1.9.0 1036 1035 * 1037 1036 * @uses bp_get_the_notification_delete_link() … … 1043 1042 * Return the delete link for the current notification. 1044 1043 * 1045 * @since BuddyPress (1.9.0)1044 * @since 1.9.0 1046 1045 */ 1047 1046 function bp_get_the_notification_delete_link() { … … 1057 1056 * Filters the delete link for the current notification. 1058 1057 * 1059 * @since BuddyPress (1.9.0)1058 * @since 1.9.0 1060 1059 * 1061 1060 * @param string $retval HTML for the delete link for the current notification. … … 1069 1068 * Since this function directly outputs a URL, it is escaped. 1070 1069 * 1071 * @since BuddyPress (2.1.0)1070 * @since 2.1.0 1072 1071 * 1073 1072 * @uses esc_url() … … 1080 1079 * Return the URL used for deleting a single notification. 1081 1080 * 1082 * @since BuddyPress (2.1.0)1081 * @since 2.1.0 1083 1082 * 1084 1083 * @return string … … 1111 1110 * Filters the URL used for deleting a single notification. 1112 1111 * 1113 * @since BuddyPress (2.1.0)1112 * @since 2.1.0 1114 1113 * 1115 1114 * @param string $url URL used for deleting a single notification. … … 1122 1121 * 1123 1122 * @param array|string $args Array of arguments. 1124 * @since BuddyPress (1.9.0)1123 * @since 1.9.0 1125 1124 */ 1126 1125 function bp_the_notification_action_links( $args = '' ) { … … 1130 1129 * Return the action links for the current notification. 1131 1130 * 1132 * @since BuddyPress (1.9.0)1131 * @since 1.9.0 1133 1132 * 1134 1133 * @param array|string $args { … … 1160 1159 * Filters the action links for the current notification. 1161 1160 * 1162 * @since BuddyPress (1.9.0)1161 * @since 1.9.0 1163 1162 * 1164 1163 * @param string $retval HTML links for actions to take on single notifications. … … 1170 1169 * Output the pagination count for the current notification loop. 1171 1170 * 1172 * @since BuddyPress (1.9.0)1171 * @since 1.9.0 1173 1172 */ 1174 1173 function bp_notifications_pagination_count() { … … 1178 1177 * Return the pagination count for the current notification loop. 1179 1178 * 1180 * @since BuddyPress (1.9.0)1179 * @since 1.9.0 1181 1180 * 1182 1181 * @return string HTML for the pagination count. … … 1198 1197 * Filters the pagination count for the current notification loop. 1199 1198 * 1200 * @since BuddyPress (1.9.0)1199 * @since 1.9.0 1201 1200 * 1202 1201 * @param string $pag HTML for the pagination count. … … 1208 1207 * Output the pagination links for the current notification loop. 1209 1208 * 1210 * @since BuddyPress (1.9.0)1209 * @since 1.9.0 1211 1210 */ 1212 1211 function bp_notifications_pagination_links() { … … 1216 1215 * Return the pagination links for the current notification loop. 1217 1216 * 1218 * @since BuddyPress (1.9.0)1217 * @since 1.9.0 1219 1218 * 1220 1219 * @return string HTML for the pagination links. … … 1225 1224 * Filters the pagination links for the current notification loop. 1226 1225 * 1227 * @since BuddyPress (1.9.0)1226 * @since 1.9.0 1228 1227 * 1229 1228 * @param string $pag_links HTML for the pagination links. … … 1237 1236 * Output the form for changing the sort order of notifications. 1238 1237 * 1239 * @since BuddyPress (1.9.0)1238 * @since 1.9.0 1240 1239 */ 1241 1240 function bp_notifications_sort_order_form() { … … 1271 1270 * Output the dropdown for bulk management of notifications. 1272 1271 * 1273 * @since BuddyPress (2.2.0)1272 * @since 2.2.0 1274 1273 */ 1275 1274 function bp_notifications_bulk_management_dropdown() { -
trunk/src/bp-notifications/classes/class-bp-notifications-notification.php
r9993 r10138 8 8 * @subpackage NotificationsClasses 9 9 * 10 * @since BuddyPress (1.9.0)10 * @since 1.9.0 11 11 */ 12 12 13 // Exit if accessed directly 13 // Exit if accessed directly. 14 14 defined( 'ABSPATH' ) || exit; 15 15 … … 19 19 * Use this class to create, access, edit, or delete BuddyPress Notifications. 20 20 * 21 * @since BuddyPress (1.9.0)21 * @since 1.9.0 22 22 */ 23 23 class BP_Notifications_Notification { … … 26 26 * The notification ID. 27 27 * 28 * @since BuddyPress (1.9.0)28 * @since 1.9.0 29 29 * @access public 30 30 * @var int … … 35 35 * The ID of the item associated with the notification. 36 36 * 37 * @since BuddyPress (1.9.0)37 * @since 1.9.0 38 38 * @access public 39 39 * @var int … … 44 44 * The ID of the secondary item associated with the notification. 45 45 * 46 * @since BuddyPress (1.9.0)46 * @since 1.9.0 47 47 * @access public 48 48 * @var int … … 53 53 * The ID of the user the notification is associated with. 54 54 * 55 * @since BuddyPress (1.9.0)55 * @since 1.9.0 56 56 * @access public 57 57 * @var int … … 62 62 * The name of the component that the notification is for. 63 63 * 64 * @since BuddyPress (1.9.0)64 * @since 1.9.0 65 65 * @access public 66 66 * @var string … … 71 71 * The component action which the notification is related to. 72 72 * 73 * @since BuddyPress (1.9.0)73 * @since 1.9.0 74 74 * @access public 75 75 * @var string … … 80 80 * The date the notification was created. 81 81 * 82 * @since BuddyPress (1.9.0)82 * @since 1.9.0 83 83 * @access public 84 84 * @var string … … 89 89 * Is the notification new, or has it already been read. 90 90 * 91 * @since BuddyPress (1.9.0)91 * @since 1.9.0 92 92 * @access public 93 93 * @var bool … … 100 100 * Constructor method. 101 101 * 102 * @since BuddyPress (1.9.0)102 * @since 1.9.0 103 103 * 104 104 * @param int $id Optional. Provide an ID to access an existing … … 115 115 * Update or insert notification details into the database. 116 116 * 117 * @since BuddyPress (1.9.0)117 * @since 1.9.0 118 118 * 119 119 * @global wpdb $wpdb WordPress database object. … … 143 143 * Please use this hook to filter the properties above. Each part will be passed in. 144 144 * 145 * @since BuddyPress (2.0.0)145 * @since 2.0.0 146 146 * 147 147 * @param BP_Notifications_Notification $value Current instance of the notification item being saved. Passed by reference. … … 169 169 * Fires after the current notification item gets saved. 170 170 * 171 * @since BuddyPress (2.0.0)171 * @since 2.0.0 172 172 * 173 173 * @param BP_Notifications_Notification $value Current instance of the notification item being saved. Passed by reference. … … 182 182 * Fetch data for an existing notification from the database. 183 183 * 184 * @since BuddyPress (1.9.0)184 * @since 1.9.0 185 185 * 186 186 * @global BuddyPress $bp The one true BuddyPress instance. … … 212 212 * Create a notification entry. 213 213 * 214 * @since BuddyPress (1.9.0)214 * @since 1.9.0 215 215 * 216 216 * @param array $data { … … 236 236 * Update notifications. 237 237 * 238 * @since BuddyPress (1.9.0)238 * @since 1.9.0 239 239 * 240 240 * @see wpdb::update() for further description of paramater formats. … … 259 259 * Delete notifications. 260 260 * 261 * @since BuddyPress (1.9.0)261 * @since 1.9.0 262 262 * 263 263 * @see wpdb::update() for further description of paramater formats. … … 281 281 * clause. 282 282 * 283 * @since BuddyPress (1.9.0)283 * @since 1.9.0 284 284 * 285 285 * @param array $args See {@link BP_Notifications_Notification::get()} … … 382 382 * Filters the MySQL WHERE conditions for the Notifications items get method. 383 383 * 384 * @since BuddyPress (2.3.0)384 * @since 2.3.0 385 385 * 386 386 * @param array $where_conditions Current conditions for MySQL WHERE statement. … … 407 407 * clause. 408 408 * 409 * @since BuddyPress (1.9.0)409 * @since 1.9.0 410 410 * 411 411 * @param array $args See {@link BP_Notifications_Notification::get()} … … 445 445 * Used by BP_Notifications_Notification::get() to create its LIMIT clause. 446 446 * 447 * @since BuddyPress (1.9.0)447 * @since 1.9.0 448 448 * 449 449 * @param array $args See {@link BP_Notifications_Notification::get()} … … 503 503 * which can easily be passed as arguments to the $wpdb methods. 504 504 * 505 * @since BuddyPress (1.9.0)505 * @since 1.9.0 506 506 * 507 507 * @param array $args Associative array of filter arguments. … … 567 567 * Check that a specific notification is for a specific user. 568 568 * 569 * @since BuddyPress (1.9.0)569 * @since 1.9.0 570 570 * 571 571 * @param int $user_id ID of the user being checked. … … 614 614 * Get notifications, based on provided filter parameters. 615 615 * 616 * @since BuddyPress (1.9.0)616 * @since 1.9.0 617 617 * 618 618 * @param array $args { … … 703 703 * Get a count of total notifications matching a set of arguments. 704 704 * 705 * @since BuddyPress (1.9.0)705 * @since 1.9.0 706 706 * 707 707 * @see BP_Notifications_Notification::get() for a description of … … 762 762 * AND keyword from the 'where' clause). 763 763 * 764 * @since BuddyPress (2.3.0)764 * @since 2.3.0 765 765 * 766 766 * @param array $meta_query An array of meta_query filters. See the … … 804 804 * the leading AND keyword from the query). 805 805 * 806 * @since BuddyPress (2.3.0)806 * @since 2.3.0 807 807 * 808 808 * @param array $date_query An array of date_query parameters. See the … … 828 828 * Update notifications. 829 829 * 830 * @since BuddyPress (1.9.0)830 * @since 1.9.0 831 831 * 832 832 * @see BP_Notifications_Notification::get() for a description of … … 849 849 * Fires before the update of a notification item. 850 850 * 851 * @since BuddyPress (2.3.0)851 * @since 2.3.0 852 852 * 853 853 * @param array $update_args See BP_Notifications_Notification::update(). … … 867 867 * Delete notifications. 868 868 * 869 * @since BuddyPress (1.9.0)869 * @since 1.9.0 870 870 * 871 871 * @see BP_Notifications_Notification::get() for a description of … … 884 884 * Fires before the deletion of a notification item. 885 885 * 886 * @since BuddyPress (2.0.0)886 * @since 2.0.0 887 887 * 888 888 * @param array $args Associative array of columns/values, to determine … … 900 900 * Delete a single notification by ID. 901 901 * 902 * @since BuddyPress (1.9.0)902 * @since 1.9.0 903 903 * 904 904 * @see BP_Notifications_Notification::delete() for explanation of … … 918 918 * Fetch all the notifications in the database for a specific user. 919 919 * 920 * @since BuddyPress (1.9.0)920 * @since 1.9.0 921 921 * 922 922 * @param int $user_id ID of the user whose notifications are being … … 937 937 * Fetch all the unread notifications in the database for a specific user. 938 938 * 939 * @since BuddyPress (1.9.0)939 * @since 1.9.0 940 940 * 941 941 * @param int $user_id ID of the user whose notifications are being … … 954 954 * Fetch all the read notifications in the database for a specific user. 955 955 * 956 * @since BuddyPress (1.9.0)956 * @since 1.9.0 957 957 * 958 958 * @param int $user_id ID of the user whose notifications are being … … 971 971 * Get unread notifications for a user, in a pagination-friendly format. 972 972 * 973 * @since BuddyPress (1.9.0)973 * @since 1.9.0 974 974 * 975 975 * @param array $args { … … 1017 1017 * Mark all user notifications as read. 1018 1018 * 1019 * @since BuddyPress (1.9.0)1019 * @since 1.9.0 1020 1020 * 1021 1021 * @param int $user_id The ID of the user who the notifications are for. … … 1062 1062 * Mark all notifications from a user as read. 1063 1063 * 1064 * @since BuddyPress (1.9.0)1064 * @since 1.9.0 1065 1065 * 1066 1066 * @param int $user_id The ID of the user who the notifications are from. … … 1103 1103 * secondary item id, and component name and action. 1104 1104 * 1105 * @since BuddyPress (1.9.0)1105 * @since 1.9.0 1106 1106 * 1107 1107 * @param int $item_id The ID of the item associated with the
Note: See TracChangeset
for help on using the changeset viewer.