Skip to:
Content

BuddyPress.org

Changeset 10138


Ignore:
Timestamp:
09/24/2015 11:55:02 PM (11 years ago)
Author:
tw2113
Message:

Standardizing our @since tags for the Notifications component.

See #6576

Location:
trunk/src/bp-notifications
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-notifications/bp-notifications-actions.php

    r9993 r10138  
    11<?php
    2 
    32/**
    43 * BuddyPress Notifications Actions.
     
    1211 */
    1312
    14 // Exit if accessed directly
     13// Exit if accessed directly.
    1514defined( 'ABSPATH' ) || exit;
    1615
     
    1817 * Handle marking single notifications as read.
    1918 *
    20  * @since BuddyPress (1.9.0)
     19 * @since 1.9.0
    2120 *
    2221 * @return bool
     
    5453 * Handle marking single notifications as unread.
    5554 *
    56  * @since BuddyPress (1.9.0)
     55 * @since 1.9.0
    5756 *
    5857 * @return bool
     
    9089 * Handle deleting single notifications.
    9190 *
    92  * @since BuddyPress (1.9.0)
     91 * @since 1.9.0
    9392 *
    9493 * @return bool
     
    126125 * Handles bulk management (mark as read/unread, delete) of notifications.
    127126 *
    128  * @since BuddyPress (2.2.0)
     127 * @since 2.2.0
    129128 *
    130129 * @return bool
  • trunk/src/bp-notifications/bp-notifications-adminbar.php

    r9993 r10138  
    11<?php
    2 
    32/**
    43 * BuddyPress Notifications Admin Bar functions.
     
    109 */
    1110
    12 // Exit if accessed directly
     11// Exit if accessed directly.
    1312defined( 'ABSPATH' ) || exit;
    1413
     
    1615 * Build the "Notifications" dropdown.
    1716 *
    18  * @since BuddyPress (1.9.0)
     17 * @since 1.9.0
    1918 *
    2019 * @return bool
  • trunk/src/bp-notifications/bp-notifications-cache.php

    r9993 r10138  
    11<?php
    2 
    32/**
    43 * Functions related to notifications caching.
    54 *
    6  * @since BuddyPress (2.0.0)
     5 * @since 2.0.0
     6 *
     7 * @package BuddyPress
     8 * @subpackage NotificationsCache
    79 */
     10
     11// Exit if accessed directly.
     12defined( 'ABSPATH' ) || exit;
    813
    914/**
     
    1419 * when using notification meta within a loop context.
    1520 *
    16  * @since BuddyPress (2.3.0)
     21 * @since 2.3.0
    1722 *
    1823 * @param int|string|array|bool $notification_ids Accepts a single notification_id, or a
     
    3439 * Clear all notifications cache for a given user ID.
    3540 *
    36  * @since BuddyPress (2.3.0)
     41 * @since 2.3.0
    3742 *
    3843 * @param int $user_id The user ID's cache to clear.
     
    4550 * Invalidate 'all_for_user_' cache when saving.
    4651 *
    47  * @since BuddyPress (2.0.0)
     52 * @since 2.0.0
    4853 *
    4954 * @param BP_Notifications_Notification $n Notification object.
     
    5762 * Invalidate the 'all_for_user_' cache when deleting.
    5863 *
    59  * @since BuddyPress (2.0.0)
     64 * @since 2.0.0
    6065 *
    6166 * @param int $args Notification deletion arguments.
     
    8186 * Invalidates 'all_for_user_' cache when updating.
    8287 *
    83  * @since BuddyPress (2.3.0)
     88 * @since 2.3.0
    8489 *
    8590 * @param array $update_args See BP_Notifications_Notification::update() for description.
  • trunk/src/bp-notifications/bp-notifications-classes.php

    r9993 r10138  
    88 * @subpackage NotificationsClasses
    99 *
    10  * @since BuddyPress (1.9.0)
     10 * @since 1.9.0
    1111 */
    1212
    13 // Exit if accessed directly
     13// Exit if accessed directly.
    1414defined( 'ABSPATH' ) || exit;
    1515
  • trunk/src/bp-notifications/bp-notifications-functions.php

    r10055 r10138  
    11<?php
    2 
    32/**
    43 * BuddyPress Member Notifications Functions.
     
    109 */
    1110
    12 // Exit if accessed directly
     11// Exit if accessed directly.
    1312defined( 'ABSPATH' ) || exit;
    1413
     
    1615 * Add a notification for a specific user, from a specific component.
    1716 *
    18  * @since BuddyPress (1.9.0)
     17 * @since 1.9.0
    1918 *
    2019 * @param array $args {
     
    8180 * Get a specific notification by its ID.
    8281 *
    83  * @since BuddyPress (1.9.0)
     82 * @since 1.9.0
    8483 *
    8584 * @param int $id ID of the notification.
     
    9493 * Delete a specific notification by its ID.
    9594 *
    96  * @since BuddyPress (1.9.0)
     95 * @since 1.9.0
    9796 *
    9897 * @param int $id ID of the notification to delete.
     
    113112 * Used when clearing out notifications for a specific notification item.
    114113 *
    115  * @since BuddyPress (1.9.0)
     114 * @since 1.9.0
    116115 *
    117116 * @param int      $id     ID of the notification.
     
    134133 * Get all notifications for a user and cache them.
    135134 *
    136  * @since BuddyPress (2.1.0)
     135 * @since 2.1.0
    137136 *
    138137 * @param int $user_id ID of the user whose notifications are being fetched.
     
    159158         * Filters all notifications for a user.
    160159         *
    161          * @since BuddyPress (2.1.0)
     160         * @since 2.1.0
    162161         *
    163162         * @param array $notifications Array of notifications for user.
     
    170169 * Get notifications for a specific user.
    171170 *
    172  * @since BuddyPress (1.9.0)
     171 * @since 1.9.0
    173172 *
    174173 * @param int    $user_id ID of the user whose notifications are being fetched.
     
    277276                                         * Filters the notifications for a user.
    278277                                         *
    279                                          * @since BuddyPress (1.9.0)
     278                                         * @since 1.9.0
    280279                                         *
    281280                                         * @param array $ref_array Array of properties for the current notification being rendered.
     
    316315         * Filters the final array of notifications to be displayed for a user.
    317316         *
    318          * @since BuddyPress (1.6.0)
     317         * @since 1.6.0
    319318         *
    320319         * @param array|bool $renderable Array of notifications to render or false if no notifications.
     
    333332 * has visited that component.
    334333 *
    335  * @since BuddyPress (1.9.0)
     334 * @since 1.9.0
    336335 *
    337336 * @param int    $user_id          ID of the user whose notifications are being deleted.
     
    355354 * has visited that component.
    356355 *
    357  * @since BuddyPress (1.9.0)
     356 * @since 1.9.0
    358357 *
    359358 * @param int      $user_id           ID of the user whose notifications are being deleted.
     
    380379 * Used when clearing out notifications for an entire component.
    381380 *
    382  * @since BuddyPress (1.9.0)
     381 * @since 1.9.0
    383382 *
    384383 * @param int         $item_id           ID of the user whose notifications are being deleted.
     
    407406 *       certain components (such as Friends). Use with caution!
    408407 *
    409  * @since BuddyPress (1.9.0)
     408 * @since 1.9.0
    410409 *
    411410 * @param int    $user_id          ID of the user whose associated items are being deleted.
     
    431430 * has visited that component.
    432431 *
    433  * @since BuddyPress (1.9.0)
     432 * @since 1.9.0
    434433 *
    435434 * @param int      $user_id          ID of the user whose notifications are being deleted.
     
    459458 * has visited that component.
    460459 *
    461  * @since BuddyPress (1.9.0)
     460 * @since 1.9.0
    462461 *
    463462 * @param int      $user_id           ID of the user whose notifications are being deleted.
     
    490489 * Used when clearing out notifications for an entire component.
    491490 *
    492  * @since BuddyPress (1.9.0)
     491 * @since 1.9.0
    493492 *
    494493 * @param int         $item_id           ID of the user whose notifications are being deleted.
     
    523522 *       certain components (such as Friends). Use with caution!
    524523 *
    525  * @since BuddyPress (1.9.0)
     524 * @since 1.9.0
    526525 *
    527526 * @param int      $user_id          ID of the user whose associated items are being deleted.
     
    552551 * Used before deleting a notification for a user.
    553552 *
    554  * @since BuddyPress (1.9.0)
     553 * @since 1.9.0
    555554 *
    556555 * @param int $user_id         ID of the user being checked.
     
    566565 * Get a count of unread notification items for a user.
    567566 *
    568  * @since BuddyPress (1.9.0)
     567 * @since 1.9.0
    569568 *
    570569 * @param int $user_id ID of the user whose unread notifications are being
     
    580579         * Filters the count of unread notification items for a user.
    581580         *
    582          * @since BuddyPress (1.9.0)
     581         * @since 1.9.0
    583582         *
    584583         * @param int $count Count of unread notification items for a user.
     
    591590 * registered Notifications callbacks.
    592591 *
    593  * @since BuddyPress (1.9.1)
     592 * @since 1.9.1
    594593 *
    595594 * @see http://buddypress.trac.wordpress.org/ticket/5300
     
    618617         * Filters active components with registered notifications callbacks.
    619618         *
    620          * @since BuddyPress (1.9.1)
     619         * @since 1.9.1
    621620         *
    622621         * @param array $component_names   Array of registered component names.
     
    631630 * Delete a meta entry from the DB for a notification item.
    632631 *
    633  * @since BuddyPress (2.3.0)
     632 * @since 2.3.0
    634633 *
    635634 * @global object $wpdb WordPress database access object.
     
    677676 * Get metadata for a given notification item.
    678677 *
    679  * @since BuddyPress (2.3.0)
     678 * @since 2.3.0
    680679 *
    681680 * @uses apply_filters() To call the 'bp_notifications_get_meta' hook.
     
    699698         * Filters the metadata for a specified notification item.
    700699         *
    701          * @since BuddyPress (2.3.0)
     700         * @since 2.3.0
    702701         *
    703702         * @param mixed  $retval          The meta values for the notification item.
     
    712711 * Update a piece of notification meta.
    713712 *
    714  * @since BuddyPress (1.2.0)
     713 * @since 1.2.0
    715714 *
    716715 * @param  int    $notification_id ID of the notification item whose metadata is being
     
    738737 * Add a piece of notification metadata.
    739738 *
    740  * @since BuddyPress (2.3.0)
     739 * @since 2.3.0
    741740 *
    742741 * @param int    $notification_id ID of the notification item.
  • trunk/src/bp-notifications/bp-notifications-loader.php

    r9993 r10138  
    11<?php
    2 
    32/**
    43 * BuddyPress Member Notifications Loader.
     
    87 * @package BuddyPress
    98 * @subpackage NotificationsLoader
    10  * @since BuddyPress (1.9.0)
     9 * @since 1.9.0
    1110 */
    1211
     
    1918         * Start the notifications component creation process.
    2019         *
    21          * @since BuddyPress (1.9.0)
     20         * @since 1.9.0
    2221         */
    2322        public function __construct() {
     
    3534         * Include notifications component files.
    3635         *
    37          * @since BuddyPress (1.9.0)
     36         * @since 1.9.0
    3837         *
    3938         * @see BP_Component::includes() for a description of arguments.
     
    5857         * Set up component global data.
    5958         *
    60          * @since BuddyPress (1.9.0)
     59         * @since 1.9.0
    6160         *
    6261         * @see BP_Component::setup_globals() for a description of arguments.
     
    9392         * Set up component navigation.
    9493         *
    95          * @since BuddyPress (1.9.0)
     94         * @since 1.9.0
    9695         *
    9796         * @see BP_Component::setup_nav() for a description of arguments.
     
    165164         * Set up the component entries in the WordPress Admin Bar.
    166165         *
    167          * @since BuddyPress (1.9.0)
     166         * @since 1.9.0
    168167         *
    169168         * @see BP_Component::setup_nav() for a description of the $wp_admin_nav
     
    222221         * Set up the title for pages and <title>.
    223222         *
    224          * @since BuddyPress (1.9.0)
     223         * @since 1.9.0
    225224         */
    226225        public function setup_title() {
     
    248247         * Setup cache groups.
    249248         *
    250          * @since BuddyPress (2.2.0)
     249         * @since 2.2.0
    251250         */
    252251        public function setup_cache_groups() {
     
    265264 * Bootstrap the Notifications component.
    266265 *
    267  * @since BuddyPress (1.9.0)
     266 * @since 1.9.0
    268267 */
    269268function bp_setup_notifications() {
  • trunk/src/bp-notifications/bp-notifications-screens.php

    r9819 r10138  
    11<?php
    2 
    32/**
    43 * BuddyPress Notifications Screen Functions.
     
    1211 */
    1312
    14 // Exit if accessed directly
     13// Exit if accessed directly.
    1514defined( 'ABSPATH' ) || exit;
    1615
     
    1817 * Catch and route the 'unread' notifications screen.
    1918 *
    20  * @since BuddyPress (1.9.0)
     19 * @since 1.9.0
    2120 */
    2221function bp_notifications_screen_unread() {
     
    2524         * Fires right before the loading of the notifications unread screen template file.
    2625         *
    27          * @since BuddyPress (1.9.0)
     26         * @since 1.9.0
    2827         */
    2928        do_action( 'bp_notifications_screen_unread' );
     
    3231         * Filters the template to load for the notifications unread screen.
    3332         *
    34          * @since BuddyPress (1.9.0)
     33         * @since 1.9.0
    3534         *
    3635         * @param string $template Path to the notifications unread template to load.
     
    4241 * Catch and route the 'read' notifications screen.
    4342 *
    44  * @since BuddyPress (1.9.0)
     43 * @since 1.9.0
    4544 */
    4645function bp_notifications_screen_read() {
     
    4948         * Fires right before the loading of the notifications read screen template file.
    5049         *
    51          * @since BuddyPress (1.9.0)
     50         * @since 1.9.0
    5251         */
    5352        do_action( 'bp_notifications_screen_read' );
     
    5655         * Filters the template to load for the notifications read screen.
    5756         *
    58          * @since BuddyPress (1.9.0)
     57         * @since 1.9.0
    5958         *
    6059         * @param string $template Path to the notifications read template to load.
     
    6665 * Catch and route the 'settings' notifications screen.
    6766 *
    68  * @since BuddyPress (1.9.0)
     67 * @since 1.9.0
    6968 */
    7069function bp_notifications_screen_settings() {
  • trunk/src/bp-notifications/bp-notifications-template.php

    r10079 r10138  
    11<?php
    2 
    32/**
    43 * BuddyPress Notifications Template Functions.
     
    87 */
    98
    10 // Exit if accessed directly
     9// Exit if accessed directly.
    1110defined( 'ABSPATH' ) || exit;
    1211
     
    1413 * Output the notifications component slug.
    1514 *
    16  * @since BuddyPress (1.9.0)
     15 * @since 1.9.0
    1716 */
    1817function bp_notifications_slug() {
     
    2221         * Return the notifications component slug.
    2322         *
    24          * @since BuddyPress (1.9.0)
     23         * @since 1.9.0
    2524         *
    2625         * @return string Slug of the Notifications component.
     
    3130                 * Filters the notifications component slug.
    3231                 *
    33                  * @since BuddyPress (1.9.0)
     32                 * @since 1.9.0
    3433                 *
    3534                 * @param string $slug Notifications component slug.
     
    4140 * Output the notifications permalink.
    4241 *
    43  * @since BuddyPress (1.9.0)
     42 * @since 1.9.0
    4443 */
    4544function bp_notifications_permalink() {
     
    4948         * Return the notifications permalink.
    5049         *
    51          * @since BuddyPress (1.9.0)
     50         * @since 1.9.0
    5251         *
    5352         * @return string Notifications permalink.
     
    5958                 * Filters the notifications permalink.
    6059                 *
    61                  * @since BuddyPress (1.9.0)
     60                 * @since 1.9.0
    6261                 *
    6362                 * @param string $retval Permalink for the notifications.
     
    6968 * Output the unread notifications permalink.
    7069 *
    71  * @since BuddyPress (1.9.0)
     70 * @since 1.9.0
    7271 */
    7372function bp_notifications_unread_permalink() {
     
    7776         * Return the unread notifications permalink.
    7877         *
    79          * @since BuddyPress (1.9.0)
     78         * @since 1.9.0
    8079         *
    8180         * @return string Unread notifications permalink.
     
    8786                 * Filters the unread notifications permalink.
    8887                 *
    89                  * @since BuddyPress (1.9.0)
     88                 * @since 1.9.0
    9089                 *
    9190                 * @param string $retval Permalink for the unread notifications.
     
    9796 * Output the read notifications permalink.
    9897 *
    99  * @since BuddyPress (1.9.0)
     98 * @since 1.9.0
    10099 */
    101100function bp_notifications_read_permalink() {
     
    105104         * Return the read notifications permalink.
    106105         *
    107          * @since BuddyPress (1.9.0)
     106         * @since 1.9.0
    108107         *
    109108         * @return string Read notifications permalink.
     
    115114                 * Filters the read notifications permalink.
    116115                 *
    117                  * @since BuddyPress (1.9.0)
     116                 * @since 1.9.0
    118117                 *
    119118                 * @param string $retval Permalink for the read notifications.
     
    129128 * Responsible for loading a group of notifications into a loop for display.
    130129 *
    131  * @since BuddyPress (1.9.0)
     130 * @since 1.9.0
    132131 */
    133132class BP_Notifications_Template {
     
    136135         * The loop iterator.
    137136         *
    138          * @since BuddyPress (1.9.0)
     137         * @since 1.9.0
    139138         * @access public
    140139         * @var int
     
    145144         * The number of notifications returned by the paged query.
    146145         *
    147          * @since BuddyPress (1.9.0)
     146         * @since 1.9.0
    148147         * @access public
    149148         * @var int
     
    154153         * Total number of notifications matching the query.
    155154         *
    156          * @since BuddyPress (1.9.0)
     155         * @since 1.9.0
    157156         * @access public
    158157         * @var int
     
    163162         * Array of notifications located by the query.
    164163         *
    165          * @since BuddyPress (1.9.0)
     164         * @since 1.9.0
    166165         * @access public
    167166         * @var array
     
    172171         * The notification object currently being iterated on.
    173172         *
    174          * @since BuddyPress (1.9.0)
     173         * @since 1.9.0
    175174         * @access public
    176175         * @var object
     
    181180         * A flag for whether the loop is currently being iterated.
    182181         *
    183          * @since BuddyPress (1.9.0)
     182         * @since 1.9.0
    184183         * @access public
    185184         * @var bool
     
    190189         * The ID of the user to whom the displayed notifications belong.
    191190         *
    192          * @since BuddyPress (1.9.0)
     191         * @since 1.9.0
    193192         * @access public
    194193         * @var int
     
    199198         * The page number being requested.
    200199         *
    201          * @since BuddyPress (1.9.0)
     200         * @since 1.9.0
    202201         * @access public
    203202         * @var int
     
    208207         * The $_GET argument used in URLs for determining pagination.
    209208         *
    210          * @since BuddyPress (1.9.0)
     209         * @since 1.9.0
    211210         * @access public
    212211         * @var int
     
    217216         * The number of items to display per page of results.
    218217         *
    219          * @since BuddyPress (1.9.0)
     218         * @since 1.9.0
    220219         * @access public
    221220         * @var int
     
    226225         * An HTML string containing pagination links.
    227226         *
    228          * @since BuddyPress (1.9.0)
     227         * @since 1.9.0
    229228         * @access public
    230229         * @var string
     
    235234         * A string to match against.
    236235         *
    237          * @since BuddyPress (1.9.0)
     236         * @since 1.9.0
    238237         * @access public
    239238         * @var string
     
    244243         * A database column to order the results by.
    245244         *
    246          * @since BuddyPress (1.9.0)
     245         * @since 1.9.0
    247246         * @access public
    248247         * @var string
     
    253252         * The direction to sort the results (ASC or DESC).
    254253         *
    255          * @since BuddyPress (1.9.0)
     254         * @since 1.9.0
    256255         * @access public
    257256         * @var string
     
    262261         * Array of variables used in this notification query.
    263262         *
    264          * @since BuddyPress (2.2.2)
     263         * @since 2.2.2
    265264         * @var array
    266265         */
     
    272271         * @see bp_has_notifications() For information on the array format.
    273272         *
    274          * @since BuddyPress (1.9.0)
     273         * @since 1.9.0
    275274         *
    276275         * @param array $args {
     
    378377         * Whether there are notifications available in the loop.
    379378         *
    380          * @since BuddyPress (1.9.0)
     379         * @since 1.9.0
    381380         *
    382381         * @see bp_has_notifications()
     
    395394         * Set up the next notification and iterate index.
    396395         *
    397          * @since BuddyPress (1.9.0)
     396         * @since 1.9.0
    398397         *
    399398         * @return object The next notification to iterate over.
     
    411410         * Rewind the blogs and reset blog index.
    412411         *
    413          * @since BuddyPress (1.9.0)
     412         * @since 1.9.0
    414413         */
    415414        public function rewind_notifications() {
     
    429428         *     while ( bp_notifications() ) { ...
    430429         *
    431          * @since BuddyPress (1.9.0)
     430         * @since 1.9.0
    432431         *
    433432         * @see bp_notifications()
     
    446445                         * Fires right before the rewinding of notification posts.
    447446                         *
    448                          * @since BuddyPress (1.9.0)
     447                         * @since 1.9.0
    449448                         */
    450449                        do_action( 'notifications_loop_end');
     
    464463         * that iteration make reference to the current notification.
    465464         *
    466          * @since BuddyPress (1.9.0)
     465         * @since 1.9.0
    467466         *
    468467         * @see bp_the_notification()
     
    478477                         * Fires if the current notification item is the first in the notification loop.
    479478                         *
    480                          * @since BuddyPress (1.9.0)
     479                         * @since 1.9.0
    481480                         */
    482481                        do_action( 'notifications_loop_start' );
     
    494493 * templates and template functions to display a list of notifications.
    495494 *
    496  * @since BuddyPress (1.9.0)
     495 * @since 1.9.0
    497496 *
    498497 * @param array|string $args {
     
    561560         * Filters whether or not the user has notifications to display.
    562561         *
    563          * @since BuddyPress (1.9.0)
     562         * @since 1.9.0
    564563         *
    565564         * @param bool                      $value      Whether or not there are notifications to display.
     
    572571 * Get the notifications returned by the template loop.
    573572 *
    574  * @since BuddyPress (1.9.0)
     573 * @since 1.9.0
    575574 *
    576575 * @return array List of notifications.
     
    583582 * Get the current notification object in the loop.
    584583 *
    585  * @since BuddyPress (1.9.0)
     584 * @since 1.9.0
    586585 *
    587586 * @return object The current notification within the loop.
     
    596595 * Output the ID of the notification currently being iterated on.
    597596 *
    598  * @since BuddyPress (1.9.0)
     597 * @since 1.9.0
    599598 */
    600599function bp_the_notification_id() {
     
    604603         * Return the ID of the notification currently being iterated on.
    605604         *
    606          * @since BuddyPress (1.9.0)
     605         * @since 1.9.0
    607606         *
    608607         * @return int ID of the current notification.
     
    613612                 * Filters the ID of the notification currently being iterated on.
    614613                 *
    615                  * @since BuddyPress (1.9.0)
     614                 * @since 1.9.0
    616615                 *
    617616                 * @param int $id ID of the notification being iterated on.
     
    623622 * Output the associated item ID of the notification currently being iterated on.
    624623 *
    625  * @since BuddyPress (1.9.0)
     624 * @since 1.9.0
    626625 */
    627626function bp_the_notification_item_id() {
     
    631630         * Return the associated item ID of the notification currently being iterated on.
    632631         *
    633          * @since BuddyPress (1.9.0)
     632         * @since 1.9.0
    634633         *
    635634         * @return int ID of the item associated with the current notification.
     
    640639                 * Filters the associated item ID of the notification currently being iterated on.
    641640                 *
    642                  * @since BuddyPress (1.9.0)
     641                 * @since 1.9.0
    643642                 *
    644643                 * @param int $item_id ID of the associated item.
     
    650649 * Output the secondary associated item ID of the notification currently being iterated on.
    651650 *
    652  * @since BuddyPress (1.9.0)
     651 * @since 1.9.0
    653652 */
    654653function bp_the_notification_secondary_item_id() {
     
    658657         * Return the secondary associated item ID of the notification currently being iterated on.
    659658         *
    660          * @since BuddyPress (1.9.0)
     659         * @since 1.9.0
    661660         *
    662661         * @return int ID of the secondary item associated with the current notification.
     
    667666                 * Filters the secondary associated item ID of the notification currently being iterated on.
    668667                 *
    669                  * @since BuddyPress (1.9.0)
     668                 * @since 1.9.0
    670669                 *
    671670                 * @param int $secondary_item_id ID of the secondary associated item.
     
    677676 * Output the name of the component associated with the notification currently being iterated on.
    678677 *
    679  * @since BuddyPress (1.9.0)
     678 * @since 1.9.0
    680679 */
    681680function bp_the_notification_component_name() {
     
    685684         * Return the name of the component associated with the notification currently being iterated on.
    686685         *
    687          * @since BuddyPress (1.9.0)
     686         * @since 1.9.0
    688687         *
    689688         * @return int Name of the component associated with the current notification.
     
    694693                 * Filters the name of the component associated with the notification currently being iterated on.
    695694                 *
    696                  * @since BuddyPress (1.9.0)
     695                 * @since 1.9.0
    697696                 *
    698697                 * @param int $component_name Name of the component associated with the current notification.
     
    704703 * Output the name of the action associated with the notification currently being iterated on.
    705704 *
    706  * @since BuddyPress (1.9.0)
     705 * @since 1.9.0
    707706 */
    708707function bp_the_notification_component_action() {
     
    712711         * Return the name of the action associated with the notification currently being iterated on.
    713712         *
    714          * @since BuddyPress (1.9.0)
     713         * @since 1.9.0
    715714         *
    716715         * @return int Name of the action associated with the current notification.
     
    721720                 * Filters the name of the action associated with the notification currently being iterated on.
    722721                 *
    723                  * @since BuddyPress (1.9.0)
     722                 * @since 1.9.0
    724723                 *
    725724                 * @param int $component_action Name of the action associated with the current notification.
     
    731730 * Output the timestamp of the current notification.
    732731 *
    733  * @since BuddyPress (1.9.0)
     732 * @since 1.9.0
    734733 */
    735734function bp_the_notification_date_notified() {
     
    739738         * Return the timestamp of the current notification.
    740739         *
    741          * @since BuddyPress (1.9.0)
     740         * @since 1.9.0
    742741         *
    743742         * @return string Timestamp of the current notification.
     
    748747                 * Filters the timestamp of the current notification.
    749748                 *
    750                  * @since BuddyPress (1.9.0)
     749                 * @since 1.9.0
    751750                 *
    752751                 * @param string $date_notified Timestamp of the current notification.
     
    758757 * Output the timestamp of the current notification.
    759758 *
    760  * @since BuddyPress (1.9.0)
     759 * @since 1.9.0
    761760 */
    762761function bp_the_notification_time_since() {
     
    766765         * Return the timestamp of the current notification.
    767766         *
    768          * @since BuddyPress (1.9.0)
     767         * @since 1.9.0
    769768         *
    770769         * @return string Timestamp of the current notification.
     
    787786                 * Filters the time since value of the current notification.
    788787                 *
    789                  * @since BuddyPress (1.9.0)
     788                 * @since 1.9.0
    790789                 *
    791790                 * @param string $retval Time since value for current notification.
     
    797796 * Output full-text description for a specific notification.
    798797 *
    799  * @since BuddyPress (1.9.0)
     798 * @since 1.9.0
    800799 */
    801800function bp_the_notification_description() {
     
    806805         * Get full-text description for a specific notification.
    807806         *
    808          * @since BuddyPress (1.9.0)
     807         * @since 1.9.0
    809808         *
    810809         * @return string
     
    832831                 * Filters the full-text description for a specific notification.
    833832                 *
    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.
    836835                 *
    837836                 * @param string $description  Full-text description for a specific notification.
     
    844843 * Output the mark read link for the current notification.
    845844 *
    846  * @since BuddyPress (1.9.0)
     845 * @since 1.9.0
    847846 *
    848847 * @uses bp_get_the_notification_mark_read_link()
     
    854853         * Return the mark read link for the current notification.
    855854         *
    856          * @since BuddyPress (1.9.0)
     855         * @since 1.9.0
    857856         */
    858857        function bp_get_the_notification_mark_read_link() {
     
    868867                 * Filters the mark read link for the current notification.
    869868                 *
    870                  * @since BuddyPress (1.9.0)
     869                 * @since 1.9.0
    871870                 *
    872871                 * @param string $retval HTML for the mark read link for the current notification.
     
    880879 * Since this function directly outputs a URL, it is escaped.
    881880 *
    882  * @since BuddyPress (2.1.0)
     881 * @since 2.1.0
    883882 *
    884883 * @uses bp_get_the_notification_mark_read_url()
     
    890889         * Return the URL used for marking a single notification as read.
    891890         *
    892          * @since BuddyPress (2.1.0)
     891         * @since 2.1.0
    893892         */
    894893        function bp_get_the_notification_mark_read_url() {
     
    912911                 * Filters the URL used for marking a single notification as read.
    913912                 *
    914                  * @since BuddyPress (2.1.0)
     913                 * @since 2.1.0
    915914                 *
    916915                 * @param string $url URL to use for marking the single notification as read.
     
    922921 * Output the mark unread link for the current notification.
    923922 *
    924  * @since BuddyPress (1.9.0)
     923 * @since 1.9.0
    925924 *
    926925 * @uses bp_get_the_notification_mark_unread_link()
     
    932931         * Return the mark unread link for the current notification.
    933932         *
    934          * @since BuddyPress (1.9.0)
     933         * @since 1.9.0
    935934         */
    936935        function bp_get_the_notification_mark_unread_link() {
     
    946945                 * Filters the link used for marking a single notification as unread.
    947946                 *
    948                  * @since BuddyPress (1.9.0)
     947                 * @since 1.9.0
    949948                 *
    950949                 * @param string $retval HTML for the mark unread link for the current notification.
     
    958957 * Since this function directly outputs a URL, it is escaped.
    959958 *
    960  * @since BuddyPress (2.1.0)
     959 * @since 2.1.0
    961960 *
    962961 * @uses bp_get_the_notification_mark_unread_url()
     
    968967         * Return the URL used for marking a single notification as unread.
    969968         *
    970          * @since BuddyPress (2.1.0)
     969         * @since 2.1.0
    971970         */
    972971        function bp_get_the_notification_mark_unread_url() {
     
    990989                 * Filters the URL used for marking a single notification as unread.
    991990                 *
    992                  * @since BuddyPress (2.1.0)
     991                 * @since 2.1.0
    993992                 *
    994993                 * @param string $url URL to use for marking the single notification as unread.
     
    1000999 * Output the mark link for the current notification.
    10011000 *
    1002  * @since BuddyPress (1.9.0)
     1001 * @since 1.9.0
    10031002 *
    10041003 * @uses bp_get_the_notification_mark_unread_link()
     
    10101009         * Return the mark link for the current notification.
    10111010         *
    1012          * @since BuddyPress (1.9.0)
     1011         * @since 1.9.0
    10131012         */
    10141013        function bp_get_the_notification_mark_link() {
     
    10231022                 * Filters the mark link for the current notification.
    10241023                 *
    1025                  * @since BuddyPress (1.9.0)
     1024                 * @since 1.9.0
    10261025                 *
    10271026                 * @param string $retval The mark link for the current notification.
     
    10331032 * Output the delete link for the current notification.
    10341033 *
    1035  * @since BuddyPress (1.9.0)
     1034 * @since 1.9.0
    10361035 *
    10371036 * @uses bp_get_the_notification_delete_link()
     
    10431042         * Return the delete link for the current notification.
    10441043         *
    1045          * @since BuddyPress (1.9.0)
     1044         * @since 1.9.0
    10461045         */
    10471046        function bp_get_the_notification_delete_link() {
     
    10571056                 * Filters the delete link for the current notification.
    10581057                 *
    1059                  * @since BuddyPress (1.9.0)
     1058                 * @since 1.9.0
    10601059                 *
    10611060                 * @param string $retval HTML for the delete link for the current notification.
     
    10691068 * Since this function directly outputs a URL, it is escaped.
    10701069 *
    1071  * @since BuddyPress (2.1.0)
     1070 * @since 2.1.0
    10721071 *
    10731072 * @uses esc_url()
     
    10801079         * Return the URL used for deleting a single notification.
    10811080         *
    1082          * @since BuddyPress (2.1.0)
     1081         * @since 2.1.0
    10831082         *
    10841083         * @return string
     
    11111110                 * Filters the URL used for deleting a single notification.
    11121111                 *
    1113                  * @since BuddyPress (2.1.0)
     1112                 * @since 2.1.0
    11141113                 *
    11151114                 * @param string $url URL used for deleting a single notification.
     
    11221121 *
    11231122 * @param array|string $args Array of arguments.
    1124  * @since BuddyPress (1.9.0)
     1123 * @since 1.9.0
    11251124 */
    11261125function bp_the_notification_action_links( $args = '' ) {
     
    11301129         * Return the action links for the current notification.
    11311130         *
    1132          * @since BuddyPress (1.9.0)
     1131         * @since 1.9.0
    11331132         *
    11341133         * @param array|string $args {
     
    11601159                 * Filters the action links for the current notification.
    11611160                 *
    1162                  * @since BuddyPress (1.9.0)
     1161                 * @since 1.9.0
    11631162                 *
    11641163                 * @param string $retval HTML links for actions to take on single notifications.
     
    11701169 * Output the pagination count for the current notification loop.
    11711170 *
    1172  * @since BuddyPress (1.9.0)
     1171 * @since 1.9.0
    11731172 */
    11741173function bp_notifications_pagination_count() {
     
    11781177         * Return the pagination count for the current notification loop.
    11791178         *
    1180          * @since BuddyPress (1.9.0)
     1179         * @since 1.9.0
    11811180         *
    11821181         * @return string HTML for the pagination count.
     
    11981197                 * Filters the pagination count for the current notification loop.
    11991198                 *
    1200                  * @since BuddyPress (1.9.0)
     1199                 * @since 1.9.0
    12011200                 *
    12021201                 * @param string $pag HTML for the pagination count.
     
    12081207 * Output the pagination links for the current notification loop.
    12091208 *
    1210  * @since BuddyPress (1.9.0)
     1209 * @since 1.9.0
    12111210 */
    12121211function bp_notifications_pagination_links() {
     
    12161215         * Return the pagination links for the current notification loop.
    12171216         *
    1218          * @since BuddyPress (1.9.0)
     1217         * @since 1.9.0
    12191218         *
    12201219         * @return string HTML for the pagination links.
     
    12251224                 * Filters the pagination links for the current notification loop.
    12261225                 *
    1227                  * @since BuddyPress (1.9.0)
     1226                 * @since 1.9.0
    12281227                 *
    12291228                 * @param string $pag_links HTML for the pagination links.
     
    12371236 * Output the form for changing the sort order of notifications.
    12381237 *
    1239  * @since BuddyPress (1.9.0)
     1238 * @since 1.9.0
    12401239 */
    12411240function bp_notifications_sort_order_form() {
     
    12711270 * Output the dropdown for bulk management of notifications.
    12721271 *
    1273  * @since BuddyPress (2.2.0)
     1272 * @since 2.2.0
    12741273 */
    12751274function bp_notifications_bulk_management_dropdown() {
  • trunk/src/bp-notifications/classes/class-bp-notifications-notification.php

    r9993 r10138  
    88 * @subpackage NotificationsClasses
    99 *
    10  * @since BuddyPress (1.9.0)
     10 * @since 1.9.0
    1111 */
    1212
    13 // Exit if accessed directly
     13// Exit if accessed directly.
    1414defined( 'ABSPATH' ) || exit;
    1515
     
    1919 * Use this class to create, access, edit, or delete BuddyPress Notifications.
    2020 *
    21  * @since BuddyPress (1.9.0)
     21 * @since 1.9.0
    2222 */
    2323class BP_Notifications_Notification {
     
    2626         * The notification ID.
    2727         *
    28          * @since BuddyPress (1.9.0)
     28         * @since 1.9.0
    2929         * @access public
    3030         * @var int
     
    3535         * The ID of the item associated with the notification.
    3636         *
    37          * @since BuddyPress (1.9.0)
     37         * @since 1.9.0
    3838         * @access public
    3939         * @var int
     
    4444         * The ID of the secondary item associated with the notification.
    4545         *
    46          * @since BuddyPress (1.9.0)
     46         * @since 1.9.0
    4747         * @access public
    4848         * @var int
     
    5353         * The ID of the user the notification is associated with.
    5454         *
    55          * @since BuddyPress (1.9.0)
     55         * @since 1.9.0
    5656         * @access public
    5757         * @var int
     
    6262         * The name of the component that the notification is for.
    6363         *
    64          * @since BuddyPress (1.9.0)
     64         * @since 1.9.0
    6565         * @access public
    6666         * @var string
     
    7171         * The component action which the notification is related to.
    7272         *
    73          * @since BuddyPress (1.9.0)
     73         * @since 1.9.0
    7474         * @access public
    7575         * @var string
     
    8080         * The date the notification was created.
    8181         *
    82          * @since BuddyPress (1.9.0)
     82         * @since 1.9.0
    8383         * @access public
    8484         * @var string
     
    8989         * Is the notification new, or has it already been read.
    9090         *
    91          * @since BuddyPress (1.9.0)
     91         * @since 1.9.0
    9292         * @access public
    9393         * @var bool
     
    100100         * Constructor method.
    101101         *
    102          * @since BuddyPress (1.9.0)
     102         * @since 1.9.0
    103103         *
    104104         * @param int $id Optional. Provide an ID to access an existing
     
    115115         * Update or insert notification details into the database.
    116116         *
    117          * @since BuddyPress (1.9.0)
     117         * @since 1.9.0
    118118         *
    119119         * @global wpdb $wpdb WordPress database object.
     
    143143                 * Please use this hook to filter the properties above. Each part will be passed in.
    144144                 *
    145                  * @since BuddyPress (2.0.0)
     145                 * @since 2.0.0
    146146                 *
    147147                 * @param BP_Notifications_Notification $value Current instance of the notification item being saved. Passed by reference.
     
    169169                 * Fires after the current notification item gets saved.
    170170                 *
    171                  * @since BuddyPress (2.0.0)
     171                 * @since 2.0.0
    172172                 *
    173173                 * @param BP_Notifications_Notification $value Current instance of the notification item being saved. Passed by reference.
     
    182182         * Fetch data for an existing notification from the database.
    183183         *
    184          * @since BuddyPress (1.9.0)
     184         * @since 1.9.0
    185185         *
    186186         * @global BuddyPress $bp The one true BuddyPress instance.
     
    212212         * Create a notification entry.
    213213         *
    214          * @since BuddyPress (1.9.0)
     214         * @since 1.9.0
    215215         *
    216216         * @param array $data {
     
    236236         * Update notifications.
    237237         *
    238          * @since BuddyPress (1.9.0)
     238         * @since 1.9.0
    239239         *
    240240         * @see wpdb::update() for further description of paramater formats.
     
    259259         * Delete notifications.
    260260         *
    261          * @since BuddyPress (1.9.0)
     261         * @since 1.9.0
    262262         *
    263263         * @see wpdb::update() for further description of paramater formats.
     
    281281         * clause.
    282282         *
    283          * @since BuddyPress (1.9.0)
     283         * @since 1.9.0
    284284         *
    285285         * @param array  $args           See {@link BP_Notifications_Notification::get()}
     
    382382                 * Filters the MySQL WHERE conditions for the Notifications items get method.
    383383                 *
    384                  * @since BuddyPress (2.3.0)
     384                 * @since 2.3.0
    385385                 *
    386386                 * @param array  $where_conditions Current conditions for MySQL WHERE statement.
     
    407407         * clause.
    408408         *
    409          * @since BuddyPress (1.9.0)
     409         * @since 1.9.0
    410410         *
    411411         * @param array $args See {@link BP_Notifications_Notification::get()}
     
    445445         * Used by BP_Notifications_Notification::get() to create its LIMIT clause.
    446446         *
    447          * @since BuddyPress (1.9.0)
     447         * @since 1.9.0
    448448         *
    449449         * @param array $args See {@link BP_Notifications_Notification::get()}
     
    503503         * which can easily be passed as arguments to the $wpdb methods.
    504504         *
    505          * @since BuddyPress (1.9.0)
     505         * @since 1.9.0
    506506         *
    507507         * @param array $args Associative array of filter arguments.
     
    567567         * Check that a specific notification is for a specific user.
    568568         *
    569          * @since BuddyPress (1.9.0)
     569         * @since 1.9.0
    570570         *
    571571         * @param int $user_id         ID of the user being checked.
     
    614614         * Get notifications, based on provided filter parameters.
    615615         *
    616          * @since BuddyPress (1.9.0)
     616         * @since 1.9.0
    617617         *
    618618         * @param array $args {
     
    703703         * Get a count of total notifications matching a set of arguments.
    704704         *
    705          * @since BuddyPress (1.9.0)
     705         * @since 1.9.0
    706706         *
    707707         * @see BP_Notifications_Notification::get() for a description of
     
    762762         * AND keyword from the 'where' clause).
    763763         *
    764          * @since BuddyPress (2.3.0)
     764         * @since 2.3.0
    765765         *
    766766         * @param  array $meta_query An array of meta_query filters. See the
     
    804804         * the leading AND keyword from the query).
    805805         *
    806          * @since BuddyPress (2.3.0)
     806         * @since 2.3.0
    807807         *
    808808         * @param array $date_query An array of date_query parameters. See the
     
    828828         * Update notifications.
    829829         *
    830          * @since BuddyPress (1.9.0)
     830         * @since 1.9.0
    831831         *
    832832         * @see BP_Notifications_Notification::get() for a description of
     
    849849                 * Fires before the update of a notification item.
    850850                 *
    851                  * @since BuddyPress (2.3.0)
     851                 * @since 2.3.0
    852852                 *
    853853                 * @param array $update_args See BP_Notifications_Notification::update().
     
    867867         * Delete notifications.
    868868         *
    869          * @since BuddyPress (1.9.0)
     869         * @since 1.9.0
    870870         *
    871871         * @see BP_Notifications_Notification::get() for a description of
     
    884884                 * Fires before the deletion of a notification item.
    885885                 *
    886                  * @since BuddyPress (2.0.0)
     886                 * @since 2.0.0
    887887                 *
    888888                 * @param array $args Associative array of columns/values, to determine
     
    900900         * Delete a single notification by ID.
    901901         *
    902          * @since BuddyPress (1.9.0)
     902         * @since 1.9.0
    903903         *
    904904         * @see BP_Notifications_Notification::delete() for explanation of
     
    918918         * Fetch all the notifications in the database for a specific user.
    919919         *
    920          * @since BuddyPress (1.9.0)
     920         * @since 1.9.0
    921921         *
    922922         * @param int    $user_id ID of the user whose notifications are being
     
    937937         * Fetch all the unread notifications in the database for a specific user.
    938938         *
    939          * @since BuddyPress (1.9.0)
     939         * @since 1.9.0
    940940         *
    941941         * @param int $user_id ID of the user whose notifications are being
     
    954954         * Fetch all the read notifications in the database for a specific user.
    955955         *
    956          * @since BuddyPress (1.9.0)
     956         * @since 1.9.0
    957957         *
    958958         * @param int $user_id ID of the user whose notifications are being
     
    971971         * Get unread notifications for a user, in a pagination-friendly format.
    972972         *
    973          * @since BuddyPress (1.9.0)
     973         * @since 1.9.0
    974974         *
    975975         * @param array $args {
     
    10171017         * Mark all user notifications as read.
    10181018         *
    1019          * @since BuddyPress (1.9.0)
     1019         * @since 1.9.0
    10201020         *
    10211021         * @param int    $user_id           The ID of the user who the notifications are for.
     
    10621062         * Mark all notifications from a user as read.
    10631063         *
    1064          * @since BuddyPress (1.9.0)
     1064         * @since 1.9.0
    10651065         *
    10661066         * @param int    $user_id           The ID of the user who the notifications are from.
     
    11031103         * secondary item id, and component name and action.
    11041104         *
    1105          * @since BuddyPress (1.9.0)
     1105         * @since 1.9.0
    11061106         *
    11071107         * @param int    $item_id           The ID of the item associated with the
Note: See TracChangeset for help on using the changeset viewer.