Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/23/2021 02:03:02 AM (2 years ago)
Author:
espellcaste
Message:

Making PHPDoc Improvements to the BP Notifications (component) files.

See #8553

File:
1 edited

Legend:

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

    r13069 r13091  
    4242     *
    4343     * @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
    4452     * @var int
    4553     */
    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
    52      * @var int
    53      */
    5454    public $user_id;
    5555
     
    9090     *
    9191     * @since 9.1.0
    92      * @access public
    9392     * @var array
    9493     */
     
    101100        'component_action',
    102101        'date_notified',
    103         'is_new'
     102        'is_new',
    104103    );
    105104
     
    220219     *
    221220     * @since 1.9.0
     221     *
     222     * @global wpdb $wpdb WordPress database object.
     223     *
     224     * @see wpdb::insert() for further description of paramater formats.
    222225     *
    223226     * @param array $data {
     
    245248     * @since 1.9.0
    246249     *
     250     * @global wpdb $wpdb WordPress database object.
     251     *
    247252     * @see wpdb::update() for further description of paramater formats.
    248253     *
     
    267272     * @since 1.9.0
    268273     *
    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.
    270277     *
    271278     * @param array $where        Array of WHERE clauses to filter by, passed to
     
    287294     *
    288295     * @since 1.9.0
     296     *
     297     * @global wpdb $wpdb WordPress database object.
    289298     *
    290299     * @param array  $args           See {@link BP_Notifications_Notification::get()}
     
    438447
    439448        // 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 ) ) {
    441450            $sort_order               = $args['sort_order'];
    442451            $conditions['sort_order'] = "{$sort_order}";
     
    457466     *
    458467     * @since 1.9.0
     468     *
     469     * @global wpdb $wpdb WordPress database object.
    459470     *
    460471     * @param array $args See {@link BP_Notifications_Notification::get()}
     
    578589     * @since 1.9.0
    579590     *
     591     * @global BuddyPress $bp The one true BuddyPress instance.
     592     * @global wpdb $wpdb WordPress database object.
     593     *
    580594     * @param int $user_id         ID of the user being checked.
    581595     * @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.
    584597     */
    585598    public static function check_access( $user_id = 0, $notification_id = 0 ) {
     
    600613     * @since 2.3.0
    601614     *
    602      * @param mixed $args Args to parse.
     615     * @param array|string $args Args to parse.
    603616     * @return array
    604617     */
     
    619632            'meta_query'        => false,
    620633            'date_query'        => false,
    621             'update_meta_cache' => true
     634            'update_meta_cache' => true,
    622635        ) );
    623636    }
     
    627640     *
    628641     * @since 1.9.0
     642     *
     643     * @global BuddyPress $bp The one true BuddyPress instance.
     644     * @global wpdb $wpdb WordPress database object.
    629645     *
    630646     * @param array $args {
     
    737753     * @since 1.9.0
    738754     *
    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()}.
    742759     * @return int Count of located items.
    743760     */
     
    871888    public static function update( $update_args = array(), $where_args = array() ) {
    872889        $update = self::get_query_clauses( $update_args );
    873         $where  = self::get_query_clauses( $where_args  );
     890        $where  = self::get_query_clauses( $where_args );
    874891
    875892        /**
     
    11741191     * @since 3.0.0
    11751192     *
     1193     * @global BuddyPress $bp The one true BuddyPress instance.
     1194     * @global wpdb $wpdb WordPress database object.
     1195     *
    11761196     * @param int $user_id ID of the user whose notifications are being fetched.
    11771197     * @return array Notifications items for formatting into a list.
Note: See TracChangeset for help on using the changeset viewer.