WordPress.org

Make WordPress Core

Ticket #9032: 9032.patch

File 9032.patch, 940 bytes (added by johnbillion, 9 years ago)

Patch

  • wp-admin/includes/template.php

     
    370370 * @param unknown_type $checked
    371371 * @param unknown_type $current
    372372 */
    373 function checked( $checked, $current) {
    374         if ( $checked == $current)
     373function checked( $checked, $current = true, $echo = true ) {
     374        if ( $checked != $current )
     375                return false;
     376        if ( $echo )
    375377                echo ' checked="checked"';
     378        return ' checked="checked"';
    376379}
    377380
    378381/**
     
    383386 * @param unknown_type $selected
    384387 * @param unknown_type $current
    385388 */
    386 function selected( $selected, $current) {
    387         if ( $selected == $current)
     389function selected( $selected, $current = true, $echo = true ) {
     390        if ( $selected != $current )
     391                return false;
     392        if ( $echo )
    388393                echo ' selected="selected"';
     394        return ' selected="selected"';
    389395}
    390396
    391397//