Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/07/2015 03:34:32 PM (11 years ago)
Author:
boonebgorges
Message:

Pass field ID to xprofile field type filter methods.

display_filter() and pre_validate_filter() are more useful if they receive
the field ID. So we pass it, when available.

See #5625.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

    r10179 r10203  
    302302     *
    303303     * @since 2.1.0
    304      *
    305      * @param string $field_value The date value, as saved in the database.
    306      *                            Typically, this is a MySQL-formatted date
    307      *                            string (Y-m-d H:i:s).
     304     * @since 2.4.0 Added the `$field_id` parameter.
     305     *
     306     * @param string $field_value The date value, as saved in the database. Typically, this is a MySQL-formatted
     307     *                            date string (Y-m-d H:i:s).
     308     * @param int    $field_id    Optional. ID of the field.
    308309     *
    309310     * @return string Date formatted by bp_format_time().
    310311     */
    311     public static function display_filter( $field_value ) {
     312    public static function display_filter( $field_value, $field_id = '' ) {
    312313
    313314        // If Unix timestamp.
Note: See TracChangeset for help on using the changeset viewer.