Ticket #10652: 10652.diff
| File 10652.diff, 1006 bytes (added by , 16 years ago) |
|---|
-
wp-admin/includes/template.php
612 612 * 613 613 * @param unknown_type $default 614 614 */ 615 function page_template_dropdown( $default = '' ) { 615 function page_template_dropdown( $args = '' ) { 616 $defaults = array( 617 'default' => '', 'echo' => 1 618 ); 619 $r = wp_parse_args( $args, $defaults ); 620 extract( $r, EXTR_SKIP ) 621 $output = ''; 622 616 623 $templates = get_page_templates(); 617 624 ksort( $templates ); 618 625 foreach (array_keys( $templates ) as $template ) … … 620 627 $selected = " selected='selected'"; 621 628 else 622 629 $selected = ''; 623 echo"\n\t<option value='".$templates[$template]."' $selected>$template</option>";630 $output .= "\n\t<option value='".$templates[$template]."' $selected>$template</option>"; 624 631 endforeach; 632 633 if ( $echo ) 634 echo $output; 635 636 return $output; 625 637 } 626 638 627 639 /**