Skip to:
Content

BuddyPress.org

Ticket #5646: 5464.patch

File 5464.patch, 1.2 KB (added by bi0xid, 11 years ago)

Changing max year to current year in datebox

  • wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php

    From aa6bd2a1351f84eadc52b77fcdd0948d2f5768dd Mon Sep 17 00:00:00 2001
    From: Rafael Poveda - RaveN <raven@mecus.es>
    Date: Fri, 16 May 2014 12:49:39 +0200
    Subject: [PATCH] changing year - max actual year
    
    ---
     wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php
    index fe345c5..717ddd6 100644
    a b class BP_XProfile_Field_Type_Datebox extends BP_XProfile_Field_Type { 
    16261626                        case 'year':
    16271627                                $html = sprintf( '<option value="" %1$s>%2$s</option>', selected( $year, 0, false ), /* translators: no option picked in select box */ __( '----', 'buddypress' ) );
    16281628
    1629                                 for ( $i = 2037; $i > 1901; $i-- ) {
     1629                                for ( $i = date('Y'); $i > 1901; $i-- ) {
    16301630                                        $html .= sprintf( '<option value="%1$s" %2$s>%3$s</option>', (int) $i, selected( $year, $i, false ), (int) $i );
    16311631                                }
    16321632                        break;