This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

bp_get_the_profile_field_datebox filter

By: a guest on Apr 3rd, 2013  |  syntax: PHP  |  size: 0.47 KB  |  views: 215  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function custom_bp_datebox($html, $type, $day, $month, $year, $field_id, $date) {      
  2.     if($type == 'year'){
  3.    
  4.         $html = '<option value=""' . selected( $year, '', false ) . '>----</option>';
  5.  
  6.         for ( $i = 2035; $i > 1901; $i-- ) {
  7.                 $html .= '<option value="' . $i .'"' . selected( $year, $i, false ) . '>' . $i . '</option>';
  8.         }
  9.     }
  10.     return $html;
  11. }
  12. add_filter( 'bp_get_the_profile_field_datebox', 'custom_bp_datebox',10,7);
clone this paste RAW Paste Data