WordPress.org

Make WordPress Core

Ticket #10556: 10556.patch

File 10556.patch, 747 bytes (added by hakre, 8 years ago)
  • wp-admin/includes/template.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    415415 * @param string $type The type of checked|selected we are doing.
    416416 */
    417417function __checked_selected_helper( $helper, $current, $echo, $type) {
    418         if ( (string) $helper === (string) $current)
    419                 $result = " $type='$type'";
    420         else
    421                 $result = '';
    422 
     418        $result = '';
     419       
     420        if ( ( is_array( $helper ) && in_array( $helper, $current ) ) || (string) $helper === (string) $current )
     421                $result = sprintf(' %1$s="%1$s"', $type);
     422       
    423423        if ($echo)
    424424                echo $result;
    425425