Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/30/2016 03:17:16 PM (8 years ago)
Author:
boonebgorges
Message:

XProfile: Introduce new settings for Datebox field type.

These new settings are designed to make it easier for site administrators
to decide how date-based data will be collected and displayed.

  • "Date format" allows the admin to select how dates will be displayed on public profiles. A number of default custom date formats are included. Admins may also enter a custom date format, or opt to display time elapsed ("4 years ago", etc).
  • "Range" allows the admin to set the start and end values for the Year dropdown. There are two ways to configure the range. The first is by defining a specific set of start and end years. The second is to define a relative range: *from* a certain number of years ago (or in the future) *to* a certain number of years ago (or in the future).

Props abwebstudio, abweb, sooskriszta, boonebgorges, DJPaul, mercime.

See #5500.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-cssjs.php

    r10613 r11041  
    5252        // "please enter options for this field" section.
    5353        $strings = array(
    54             'supports_options_field_types' => array(),
     54            'do_settings_section_field_types' => array(),
    5555            'do_autolink' => '',
    5656        );
     
    5858        foreach ( bp_xprofile_get_field_types() as $field_type => $field_type_class ) {
    5959            $field = new $field_type_class();
    60             if ( $field->supports_options ) {
    61                 $strings['supports_options_field_types'][] = $field_type;
     60            if ( $field->do_settings_section() ) {
     61                $strings['do_settings_section_field_types'][] = $field_type;
    6262            }
    6363        }
Note: See TracChangeset for help on using the changeset viewer.