Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/15/2015 07:13:42 PM (11 years ago)
Author:
tw2113
Message:

More documentation cleanup for part of BP-Core component.

See #6398.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-core-notification.php

    r10108 r10355  
    1515 * Use BP_Notifications_Notification instead.
    1616 *
    17  * @package BuddyPress Core
    1817 * @deprecated since 1.9.0
    1918 */
     
    8180     * Constructor
    8281     *
    83      * @param int $id
     82     * @param int $id ID for the notification.
    8483     */
    8584    public function __construct( $id = 0 ) {
     
    102101        $bp = buddypress();
    103102
    104         // Update
     103        // Update.
    105104        if ( !empty( $this->id ) ) {
    106105            $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 );
    107106
    108         // Save
     107        // Save.
    109108        } else {
    110109            $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 );
     
    149148     * @param int $user_id         ID to check access for.
    150149     * @param int $notification_id Notification ID to check for.
    151      *
    152150     * @return string
    153151     */
     
    164162     *
    165163     * @global wpdb $wpdb WordPress database object
     164     *
     165     * @static
    166166     *
    167167     * @param int    $user_id User ID.
    168168     * @param string $status 'is_new' or 'all'.
    169      *
    170169     * @return array Associative array
    171      * @static
    172170     */
    173171    public static function get_all_for_user( $user_id, $status = 'is_new' ) {
     
    188186     * @global wpdb $wpdb WordPress database object.
    189187     *
    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.
    196193     * @return mixed
    197194     */
     
    208205     *
    209206     * @global wpdb $wpdb WordPress database object.
     207     *
     208     * @static
    210209     *
    211210     * @param int      $user_id           The ID of the user who the notifications are for.
     
    215214     * @param int|bool $secondary_item_id (optional) The secondary item id of the notifications that we wish to
    216215     *                                    use to delete.
    217      * @static
    218      *
    219216     * @return mixed
    220217     */
     
    236233     * @global wpdb $wpdb WordPress database object.
    237234     *
     235     * @static
     236     *
    238237     * @param int    $user_id          The ID of the user whose sent notifications we wish to delete.
    239238     * @param string $component_name   The name of the component the notification was sent from.
    240239     * @param string $component_action The action of the component the notification was sent from.
    241      * @static
    242      *
    243240     * @return mixed
    244241     */
     
    256253     *
    257254     * @global wpdb $wpdb WordPress database object.
     255     *
     256     * @static
    258257     *
    259258     * @param string $item_id           The item id that they notifications are to be for.
     
    261260     * @param string $component_action  The action that the notifications are to be from.
    262261     * @param string $secondary_item_id Optional secondary item id that the notifications are to have.
    263      * @static
    264      *
    265262     * @return mixed
    266263     */
Note: See TracChangeset for help on using the changeset viewer.