WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/13/2008 03:07:39 AM (13 years ago)
Author:
azaozz
Message:

Keep state for image size, alignment and url in the uploader and for categories view on the write page, fixes #7520

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r9578 r9654  
    774774        $url = $link;
    775775   
    776     return "<input type='text' name='attachments[$post->ID][url]' value='" . attribute_escape($url) . "' /><br />
    777                 <button type='button' class='button url-$post->ID' title=''>" . __('None') . "</button>
    778                 <button type='button' class='button url-$post->ID' title='" . attribute_escape($file) . "'>" . __('File URL') . "</button>
    779                 <button type='button' class='button url-$post->ID' title='" . attribute_escape($link) . "'>" . __('Post URL') . "</button>
    780                 <script type='text/javascript'>
    781                 jQuery('button.url-$post->ID').bind('click', function(){jQuery(this).siblings('input').val(jQuery(this).attr('title'));});
    782                 </script>\n";
     776    return "<input type='text' class='urlfield' name='attachments[$post->ID][url]' value='" . attribute_escape($url) . "' /><br />
     777                <button type='button' class='button urlnone' title=''>" . __('None') . "</button>
     778                <button type='button' class='button urlfile' title='" . attribute_escape($file) . "'>" . __('File URL') . "</button>
     779                <button type='button' class='button urlpost' title='" . attribute_escape($link) . "'>" . __('Post URL') . "</button>
     780";
    783781}
    784782
     
    16801678            <th valign="top" scope="row" class="label"><p><label for="align">' . __('Alignment') . '</label></p></th>
    16811679            <td class="field">
    1682                 <input name="align" id="align-none" value="alignnone" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />
     1680                <input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />
    16831681                <label for="align-none" class="align image-align-none-label">' . __('None') . '</label>
    1684                 <input name="align" id="align-left" value="alignleft" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
     1682                <input name="align" id="align-left" value="left" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
    16851683                <label for="align-left" class="align image-align-left-label">' . __('Left') . '</label>
    1686                 <input name="align" id="align-center" value="aligncenter" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
     1684                <input name="align" id="align-center" value="center" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
    16871685                <label for="align-center" class="align image-align-center-label">' . __('Center') . '</label>
    1688                 <input name="align" id="align-right" value="alignright" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
     1686                <input name="align" id="align-right" value="right" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
    16891687                <label for="align-right" class="align image-align-right-label">' . __('Right') . '</label>
    16901688            </td>
Note: See TracChangeset for help on using the changeset viewer.