Skip to:
Content

BuddyPress.org

Changeset 10560


Ignore:
Timestamp:
02/08/2016 05:02:56 PM (8 years ago)
Author:
boonebgorges
Message:

Introduced 'bp_activity_get_join_sql' filter.

This filter on the JOIN clause of the SQL query in BP_Activity_Activity::get()
makes it more practical to modify the activity query, especially when used in
conjuction with the corresponding filter on the WHERE clause.

Props jozik.
Fixes #6850.

File:
1 edited

Legend:

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

    r10435 r10560  
    477477
    478478        /**
     479         * Filter the MySQL JOIN clause for the main activity query.
     480         *
     481         * @since 2.5.0
     482         *
     483         * @param string $join_sql   JOIN clause.
     484         * @param array  $r          Method parameters.
     485         * @param string $select_sql Current SELECT MySQL statement.
     486         * @param string $from_sql   Current FROM MySQL statement.
     487         * @param string $where_sql  Current WHERE MySQL statement.
     488         */
     489        $join_sql = apply_filters( 'bp_activity_get_join_sql', $join_sql, $r, $select_sql, $from_sql, $where_sql );
     490
     491        /**
    479492         * Filters the preferred order of indexes for activity item.
    480493         *
Note: See TracChangeset for help on using the changeset viewer.