- Timestamp:
- 08/23/2021 02:03:02 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/classes/class-bp-notifications-notification.php
r13069 r13091 42 42 * 43 43 * @since 1.9.0 44 * @var int|null 45 */ 46 public $secondary_item_id = null; 47 48 /** 49 * The ID of the user the notification is associated with. 50 * 51 * @since 1.9.0 44 52 * @var int 45 53 */ 46 public $secondary_item_id = null;47 48 /**49 * The ID of the user the notification is associated with.50 *51 * @since 1.9.052 * @var int53 */54 54 public $user_id; 55 55 … … 90 90 * 91 91 * @since 9.1.0 92 * @access public93 92 * @var array 94 93 */ … … 101 100 'component_action', 102 101 'date_notified', 103 'is_new' 102 'is_new', 104 103 ); 105 104 … … 220 219 * 221 220 * @since 1.9.0 221 * 222 * @global wpdb $wpdb WordPress database object. 223 * 224 * @see wpdb::insert() for further description of paramater formats. 222 225 * 223 226 * @param array $data { … … 245 248 * @since 1.9.0 246 249 * 250 * @global wpdb $wpdb WordPress database object. 251 * 247 252 * @see wpdb::update() for further description of paramater formats. 248 253 * … … 267 272 * @since 1.9.0 268 273 * 269 * @see wpdb::update() for further description of paramater formats. 274 * @global wpdb $wpdb WordPress database object. 275 * 276 * @see wpdb::delete() for further description of paramater formats. 270 277 * 271 278 * @param array $where Array of WHERE clauses to filter by, passed to … … 287 294 * 288 295 * @since 1.9.0 296 * 297 * @global wpdb $wpdb WordPress database object. 289 298 * 290 299 * @param array $args See {@link BP_Notifications_Notification::get()} … … 438 447 439 448 // Sort order direction. 440 if ( ! empty( $args['sort_order'] ) && in_array( $args['sort_order'], array( 'ASC', 'DESC' ) ) ) {449 if ( ! empty( $args['sort_order'] ) && in_array( $args['sort_order'], array( 'ASC', 'DESC' ), true ) ) { 441 450 $sort_order = $args['sort_order']; 442 451 $conditions['sort_order'] = "{$sort_order}"; … … 457 466 * 458 467 * @since 1.9.0 468 * 469 * @global wpdb $wpdb WordPress database object. 459 470 * 460 471 * @param array $args See {@link BP_Notifications_Notification::get()} … … 578 589 * @since 1.9.0 579 590 * 591 * @global BuddyPress $bp The one true BuddyPress instance. 592 * @global wpdb $wpdb WordPress database object. 593 * 580 594 * @param int $user_id ID of the user being checked. 581 595 * @param int $notification_id ID of the notification being checked. 582 * @return bool True if the notification belongs to the user, otherwise 583 * false. 596 * @return bool True if the notification belongs to the user, otherwise false. 584 597 */ 585 598 public static function check_access( $user_id = 0, $notification_id = 0 ) { … … 600 613 * @since 2.3.0 601 614 * 602 * @param mixed$args Args to parse.615 * @param array|string $args Args to parse. 603 616 * @return array 604 617 */ … … 619 632 'meta_query' => false, 620 633 'date_query' => false, 621 'update_meta_cache' => true 634 'update_meta_cache' => true, 622 635 ) ); 623 636 } … … 627 640 * 628 641 * @since 1.9.0 642 * 643 * @global BuddyPress $bp The one true BuddyPress instance. 644 * @global wpdb $wpdb WordPress database object. 629 645 * 630 646 * @param array $args { … … 737 753 * @since 1.9.0 738 754 * 739 * @see BP_Notifications_Notification::get() for a description of arguments. 740 * 741 * @param array $args See {@link BP_Notifications_Notification::get()}. 755 * @global BuddyPress $bp The one true BuddyPress instance. 756 * @global wpdb $wpdb WordPress database object. 757 * 758 * @param array|string $args See {@link BP_Notifications_Notification::get()}. 742 759 * @return int Count of located items. 743 760 */ … … 871 888 public static function update( $update_args = array(), $where_args = array() ) { 872 889 $update = self::get_query_clauses( $update_args ); 873 $where = self::get_query_clauses( $where_args 890 $where = self::get_query_clauses( $where_args ); 874 891 875 892 /** … … 1174 1191 * @since 3.0.0 1175 1192 * 1193 * @global BuddyPress $bp The one true BuddyPress instance. 1194 * @global wpdb $wpdb WordPress database object. 1195 * 1176 1196 * @param int $user_id ID of the user whose notifications are being fetched. 1177 1197 * @return array Notifications items for formatting into a list.
Note: See TracChangeset
for help on using the changeset viewer.