Skip to:
Content

BuddyPress.org

Ticket #5803: 5803.sans-destructor.patch

File 5803.sans-destructor.patch, 681 bytes (added by r-a-y, 7 years ago)
  • src/bp-core/bp-core-classes.php

     
    15431543        }
    15441544
    15451545        /**
     1546         * Override the parent get_sql() method.
     1547         *
     1548         * This is done to remove our date column after we've grabbed our SQL statement.
     1549         */
     1550        public function get_sql() {
     1551                $sql = parent::get_sql();
     1552
     1553                // clean up after ourselves
     1554                remove_filter( 'date_query_valid_columns', array( $this, 'register_date_column' ) );
     1555
     1556                return $sql;
     1557        }
     1558
     1559        /**
    15461560         * Registers our date column with WP Date Query to pass validation.
    15471561         *
    15481562         * @param array $retval Current DB columns