- Timestamp:
- 11/15/2015 07:13:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-core-notification.php
r10108 r10355 15 15 * Use BP_Notifications_Notification instead. 16 16 * 17 * @package BuddyPress Core18 17 * @deprecated since 1.9.0 19 18 */ … … 81 80 * Constructor 82 81 * 83 * @param int $id 82 * @param int $id ID for the notification. 84 83 */ 85 84 public function __construct( $id = 0 ) { … … 102 101 $bp = buddypress(); 103 102 104 // Update 103 // Update. 105 104 if ( !empty( $this->id ) ) { 106 105 $sql = $wpdb->prepare( "UPDATE {$bp->core->table_name_notifications} SET item_id = %d, secondary_item_id = %d, user_id = %d, component_name = %s, component_action = %d, date_notified = %s, is_new = %d ) WHERE id = %d", $this->item_id, $this->secondary_item_id, $this->user_id, $this->component_name, $this->component_action, $this->date_notified, $this->is_new, $this->id ); 107 106 108 // Save 107 // Save. 109 108 } else { 110 109 $sql = $wpdb->prepare( "INSERT INTO {$bp->core->table_name_notifications} ( item_id, secondary_item_id, user_id, component_name, component_action, date_notified, is_new ) VALUES ( %d, %d, %d, %s, %s, %s, %d )", $this->item_id, $this->secondary_item_id, $this->user_id, $this->component_name, $this->component_action, $this->date_notified, $this->is_new ); … … 149 148 * @param int $user_id ID to check access for. 150 149 * @param int $notification_id Notification ID to check for. 151 *152 150 * @return string 153 151 */ … … 164 162 * 165 163 * @global wpdb $wpdb WordPress database object 164 * 165 * @static 166 166 * 167 167 * @param int $user_id User ID. 168 168 * @param string $status 'is_new' or 'all'. 169 *170 169 * @return array Associative array 171 * @static172 170 */ 173 171 public static function get_all_for_user( $user_id, $status = 'is_new' ) { … … 188 186 * @global wpdb $wpdb WordPress database object. 189 187 * 190 * @param int $user_id 191 * @param string $component_name 192 * @param string $component_action 193 * 194 * @static 195 * 188 * @static 189 * 190 * @param int $user_id ID of the user to delet notification for. 191 * @param string $component_name Component name. 192 * @param string $component_action Component action. 196 193 * @return mixed 197 194 */ … … 208 205 * 209 206 * @global wpdb $wpdb WordPress database object. 207 * 208 * @static 210 209 * 211 210 * @param int $user_id The ID of the user who the notifications are for. … … 215 214 * @param int|bool $secondary_item_id (optional) The secondary item id of the notifications that we wish to 216 215 * use to delete. 217 * @static218 *219 216 * @return mixed 220 217 */ … … 236 233 * @global wpdb $wpdb WordPress database object. 237 234 * 235 * @static 236 * 238 237 * @param int $user_id The ID of the user whose sent notifications we wish to delete. 239 238 * @param string $component_name The name of the component the notification was sent from. 240 239 * @param string $component_action The action of the component the notification was sent from. 241 * @static242 *243 240 * @return mixed 244 241 */ … … 256 253 * 257 254 * @global wpdb $wpdb WordPress database object. 255 * 256 * @static 258 257 * 259 258 * @param string $item_id The item id that they notifications are to be for. … … 261 260 * @param string $component_action The action that the notifications are to be from. 262 261 * @param string $secondary_item_id Optional secondary item id that the notifications are to have. 263 * @static264 *265 262 * @return mixed 266 263 */
Note: See TracChangeset
for help on using the changeset viewer.