Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/02/2024 02:07:21 AM (4 months ago)
Author:
espellcaste
Message:

WPCS: Part VII: miscellaneous fixes for some of the files of the core component.

Follow-up to [13883], [13886], [13887], [13888], [13891], and [13892]

See #9164 and #7228

File:
1 edited

Legend:

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

    r13184 r13893  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 if ( class_exists( 'WP_Date_Query' ) ) :
     13if ( ! class_exists( 'WP_Date_Query' ) ) {
     14    return;
     15}
    1416
    1517/**
     
    2628 */
    2729class BP_Date_Query extends WP_Date_Query {
     30
    2831    /**
    2932     * The column to query against. Can be changed via the query arguments.
     
    4649     *
    4750     * @since 2.1.0
    48      * @since 10.0.0 Added $prepend_and argument.
     51     * @since 10.0.0 Added `$prepend_and` argument.
     52     *
     53     * @see WP_Date_Query::__construct()
    4954     *
    5055     * @param array  $date_query  Date query arguments.
    5156     * @param string $column      The DB column to query against.
    5257     * @param bool   $prepend_and Whether to prepend the 'AND' operator to the WHERE SQL clause.
    53      *
    54      * @see WP_Date_Query::__construct()
    5558     */
    5659    public function __construct( $date_query, $column = '', $prepend_and = false ) {
     
    129132        if ( ! empty( $date_query ) && is_array( $date_query ) && ! empty( $column ) ) {
    130133            $date_query = new self( $date_query, $column, $prepend_and );
    131             $sql = $date_query->get_sql();
     134            $sql        = $date_query->get_sql();
    132135        }
    133136
     
    135138    }
    136139}
    137 endif;
Note: See TracChangeset for help on using the changeset viewer.