Advertisement
Guest User

bp_get_the_profile_field_datebox filter

a guest
Apr 3rd, 2013
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement