Add labels to text inputs. see #9445

git-svn-id: http://svn.automattic.com/wordpress/trunk@11152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-05-01 21:52:34 +00:00
parent e52d7eee0b
commit ef0b1dc621
3 changed files with 9 additions and 6 deletions

View File

@ -269,17 +269,17 @@ add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', 'post', 'side',
* @param object $post
*/
function post_tags_meta_box($post, $box) {
$tax_name = substr($box['id'], 8);
$tax_name = attr(substr($box['id'], 8));
$taxonomy = get_taxonomy($tax_name);
$helps = isset($taxonomy->helps) ? attr($taxonomy->helps) : __('Separate tags with commas.');
?>
<div class="tagsdiv" id="<?php echo $tax_name; ?>">
<p class="jaxtag">
<label class="hidden" for="newtag"><?php _e( $box['title'] ); ?></label>
<label class="hidden" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label>
<input type="hidden" name="<?php echo "tax_input[$tax_name]"; ?>" class="the-tags" id="tax-input[<?php echo $tax_name; ?>]" value="<?php echo attr(get_terms_to_edit( $post->ID, $tax_name )); ?>" />
<span class="ajaxtag">
<input type="text" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="<?php _ea('Add new tag'); ?>" />
<input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="<?php _ea('Add new tag'); ?>" />
<input type="button" class="button tagadd" value="<?php _ea('Add'); ?>" tabindex="3" />
</span></p>
<p class="howto"><?php echo $helps; ?></p>

View File

@ -1350,7 +1350,8 @@ SWFUpload.onload = function() {
<div id="html-upload-ui">
<?php do_action('pre-html-upload-ui'); ?>
<p id="async-upload-wrap">
<input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php echo attr(__('Upload')); ?>" /> <a href="#" onclick="return top.tb_remove();"><?php _e('Cancel'); ?></a>
<label class="hidden" for="async-upload"><?php _e('Upload'); ?></label>
<input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php _ea('Upload'); ?>" /> <a href="#" onclick="return top.tb_remove();"><?php _e('Cancel'); ?></a>
</p>
<div class="clear"></div>
<?php if ( is_lighttpd_before_150() ): ?>

View File

@ -163,7 +163,8 @@ function install_search_form(){
<option value="tag"<?php selected('tag', $type) ?>><?php _x('Tag', 'Plugin Installer') ?></option>
</select>
<input type="text" name="s" value="<?php echo attr($term) ?>" />
<input type="submit" name="search" value="<?php echo attr(__('Search')) ?>" class="button" />
<label class="hidden" for="plugin-search-input"><?php _e('Search Plugins'); ?></label>
<input type="submit" id="plugin-search-input" name="search" value="<?php _ea('Search Plugins') ?>" class="button" />
</form><?php
}
@ -210,7 +211,8 @@ function install_plugins_upload( $page = 1 ) {
<p class="install-help"><?php _e('If you have a plugin in a .zip format, You may install it by uploading it here.') ?></p>
<form method="post" enctype="multipart/form-data" action="<?php echo admin_url('update.php?action=upload-plugin') ?>">
<?php wp_nonce_field( 'plugin-upload') ?>
<input type="file" name="pluginzip" />
<label class="hidden" for="pluginzip"><?php _e('Plugin zip file'); ?></label>
<input type="file" id="pluginzip" name="pluginzip" />
<input type="submit" class="button" value="<?php _e('Install Now') ?>" />
</form>
<?php