Skip to:
Content

BuddyPress.org

Changeset 9992


Ignore:
Timestamp:
07/03/2015 09:02:45 PM (9 years ago)
Author:
boonebgorges
Message:

Use bp_parse_args() in bp_notifications_add_notification().

This allows devs to modify default arguments, including the 'allow_duplicate'
check.

Props pareshradadiya, ganesh641.
Fixes #6455.

File:
1 edited

Legend:

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

    r9819 r9992  
    3535function bp_notifications_add_notification( $args = array() ) {
    3636
    37     $r = wp_parse_args( $args, array(
     37    $r = bp_parse_args( $args, array(
    3838        'user_id'           => 0,
    3939        'item_id'           => 0,
     
    4444        'is_new'            => 1,
    4545        'allow_duplicate'   => false,
    46     ) );
     46    ), 'notifications_add_notification' );;
    4747
    4848    // Check for existing duplicate notifications
Note: See TracChangeset for help on using the changeset viewer.