Ticket #32432: 32432-3.patch
| File 32432-3.patch, 1015 bytes (added by , 11 years ago) |
|---|
-
l10n.php
877 877 'translations' => array(), 878 878 'selected' => '', 879 879 'show_available_translations' => true, 880 'echo' => true, 880 881 ) ); 881 882 882 883 $translations = $args['translations']; … … 910 911 } 911 912 } 912 913 914 $output = ''; 915 913 916 $translations_available = ( ! empty( $translations ) && $args['show_available_translations'] ); 914 917 915 printf( '<select name="%s" id="%s">', esc_attr( $args['name'] ), esc_attr( $args['id'] ) );918 $output .= sprintf( '<select name="%s" id="%s">', esc_attr( $args['name'] ), esc_attr( $args['id'] ) ); 916 919 917 920 // Holds the HTML markup. 918 921 $structure = array(); … … 950 953 $structure[] = '</optgroup>'; 951 954 } 952 955 953 echojoin( "\n", $structure );956 $output .= join( "\n", $structure ); 954 957 955 echo '</select>'; 958 $output .= '</select>'; 959 if ( true === $args['echo'] ) { 960 echo $output; 961 } else { 962 return $output; 963 } 956 964 }