mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 07:37:44 +02:00
Lots of style and admin tweaks
git-svn-id: http://svn.automattic.com/wordpress/trunk@3770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b344d54553
commit
fdab6f4c1e
@ -736,7 +736,7 @@ function user_row( $user_object, $style = '' ) {
|
|||||||
<td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td>
|
<td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td>
|
||||||
<td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
|
<td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
|
||||||
<td><a href='$url' title='website: $url'>$short_url</a></td>";
|
<td><a href='$url' title='website: $url'>$short_url</a></td>";
|
||||||
$r .= "\n\t\t<td align='right'>$numposts</td>";
|
$r .= "\n\t\t<td align='center'>$numposts</td>";
|
||||||
$r .= "\n\t\t<td>";
|
$r .= "\n\t\t<td>";
|
||||||
if (current_user_can('edit_users'))
|
if (current_user_can('edit_users'))
|
||||||
$r .= "<a href='user-edit.php?user_id=$user_object->ID' class='edit'>".__('Edit')."</a>";
|
$r .= "<a href='user-edit.php?user_id=$user_object->ID' class='edit'>".__('Edit')."</a>";
|
||||||
@ -1559,8 +1559,8 @@ function get_file_description($file) {
|
|||||||
if (isset ($wp_file_descriptions[basename($file)])) {
|
if (isset ($wp_file_descriptions[basename($file)])) {
|
||||||
return $wp_file_descriptions[basename($file)];
|
return $wp_file_descriptions[basename($file)];
|
||||||
}
|
}
|
||||||
elseif (file_exists(ABSPATH.$file)) {
|
elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) {
|
||||||
$template_data = implode('', file(ABSPATH.$file));
|
$template_data = implode('', file( ABSPATH . $file ));
|
||||||
if (preg_match("|Template Name:(.*)|i", $template_data, $name))
|
if (preg_match("|Template Name:(.*)|i", $template_data, $name))
|
||||||
return $name[1];
|
return $name[1];
|
||||||
}
|
}
|
||||||
@ -1911,21 +1911,14 @@ function wp_import_cleanup($id) {
|
|||||||
|
|
||||||
function wp_import_upload_form($action) {
|
function wp_import_upload_form($action) {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<form enctype="multipart/form-data" id="import-upload-form" method="POST" action="<?php echo $action ?>">
|
||||||
function cancelUpload() {
|
<p>
|
||||||
o = document.getElementById('uploadForm');
|
<label for="upload"><?php _e('Choose a file from your computer:'); ?></label> <input type="file" id="upload" name="import" size="25" />
|
||||||
o.method = 'GET';
|
|
||||||
o.action.value = 'view';
|
|
||||||
o.submit();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo $action ?>">
|
|
||||||
<label for="upload"><?php _e('File:'); ?></label><input type="file" id="upload" name="import" />
|
|
||||||
<input type="hidden" name="action" value="save" />
|
<input type="hidden" name="action" value="save" />
|
||||||
<div id="buttons">
|
</p>
|
||||||
<input type="submit" value="<?php _e('Import'); ?>" />
|
<p class="submit">
|
||||||
<input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" />
|
<input type="submit" value="<?php _e('Upload file and import'); ?> »" />
|
||||||
</div>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -1938,7 +1931,7 @@ function wp_import_handle_upload() {
|
|||||||
return $file;
|
return $file;
|
||||||
|
|
||||||
$url = $file['url'];
|
$url = $file['url'];
|
||||||
$file = $file['file'];
|
$file = addslashes( $file['file'] );
|
||||||
$filename = basename($file);
|
$filename = basename($file);
|
||||||
|
|
||||||
// Construct the object array
|
// Construct the object array
|
||||||
|
@ -130,12 +130,12 @@ $messages[3] = __('Category updated.');
|
|||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<h2><?php _e('Categories') ?> </h2>
|
<h2><?php _e('Categories') ?> </h2>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<table width="100%" cellpadding="3" cellspacing="3">
|
<table class="widefat">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><?php _e('ID') ?></th>
|
<th scope="col"><?php _e('ID') ?></th>
|
||||||
<th scope="col"><?php _e('Name') ?></th>
|
<th scope="col" style="text-align: left"><?php _e('Name') ?></th>
|
||||||
<th scope="col"><?php _e('Description') ?></th>
|
<th scope="col" style="text-align: left"><?php _e('Description') ?></th>
|
||||||
<th scope="col" width="90"><?php _e('Posts') ?></th>
|
<th scope="col" width="90"><?php _e('Posts') ?></th>
|
||||||
<th scope="col" width="90"><?php _e('Bookmarks') ?></th>
|
<th scope="col" width="90"><?php _e('Bookmarks') ?></th>
|
||||||
<th colspan="2"><?php _e('Action') ?></th>
|
<th colspan="2"><?php _e('Action') ?></th>
|
||||||
|
@ -39,7 +39,7 @@ function getNumChecked(form)
|
|||||||
</script>
|
</script>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2><?php _e('Comments'); ?></h2>
|
<h2><?php _e('Comments'); ?></h2>
|
||||||
<form name="searchform" action="" method="get">
|
<form name="searchform" action="" method="get" id="editcomments">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php _e('Show Comments That Contain...') ?></legend>
|
<legend><?php _e('Show Comments That Contain...') ?></legend>
|
||||||
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
|
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
|
||||||
@ -152,15 +152,17 @@ $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
|
|||||||
if ($comments) {
|
if ($comments) {
|
||||||
echo '<form name="deletecomments" id="deletecomments" action="" method="post"> ';
|
echo '<form name="deletecomments" id="deletecomments" action="" method="post"> ';
|
||||||
wp_nonce_field('bulk-comments');
|
wp_nonce_field('bulk-comments');
|
||||||
echo '<table width="100%" cellpadding="3" cellspacing="3">
|
echo '<table class="widefat">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">*</th>
|
<th scope="col"><input type="checkbox" onclick="checkAll(document.getElementById(\'deletecomments\'));" /></th>
|
||||||
<th scope="col">' . __('Name') . '</th>
|
<th scope="col" style="text-align: left">' . __('Name') . '</th>
|
||||||
<th scope="col">' . __('E-mail') . '</th>
|
<th scope="col" style="text-align: left">' . __('E-mail') . '</th>
|
||||||
<th scope="col">' . __('IP') . '</th>
|
<th scope="col" style="text-align: left">' . __('IP') . '</th>
|
||||||
<th scope="col">' . __('Comment Excerpt') . '</th>
|
<th scope="col" style="text-align: left">' . __('Comment Excerpt') . '</th>
|
||||||
<th scope="col" colspan="3">' . __('Actions') . '</th>
|
<th scope="col" colspan="3">' . __('Actions') . '</th>
|
||||||
</tr>';
|
</tr>
|
||||||
|
</thead>';
|
||||||
foreach ($comments as $comment) {
|
foreach ($comments as $comment) {
|
||||||
$authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
|
$authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
|
||||||
$comment_status = wp_get_comment_status($comment->comment_ID);
|
$comment_status = wp_get_comment_status($comment->comment_ID);
|
||||||
@ -183,14 +185,13 @@ $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
|
|||||||
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
|
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
|
||||||
echo "<a href='comment.php?action=editcomment&comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
|
echo "<a href='comment.php?action=editcomment&comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
|
||||||
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
|
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
|
||||||
echo "<a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), js_escape( $comment->comment_author )) . "' );\" class='edit'>" . __('Delete') . "</a> ";
|
echo "<a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), js_escape( $comment->comment_author )) . "' );\" class='delete'>" . __('Delete') . "</a> ";
|
||||||
} ?></td>
|
} ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
} // end foreach
|
} // end foreach
|
||||||
?></table>
|
?></table>
|
||||||
<p><a href="javascript:;" onclick="checkAll(document.getElementById('deletecomments')); return false; "><?php _e('Invert Checkbox Selection') ?></a></p>
|
<p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" />
|
||||||
<p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" />
|
|
||||||
<input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.") ?>')" /></p>
|
<input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.") ?>')" /></p>
|
||||||
</form>
|
</form>
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
|
@ -28,16 +28,14 @@ else
|
|||||||
|
|
||||||
if ($posts) {
|
if ($posts) {
|
||||||
?>
|
?>
|
||||||
<table width="100%" cellpadding="3" cellspacing="3">
|
<table class="widefat">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><?php _e('ID') ?></th>
|
<th scope="col"><?php _e('ID') ?></th>
|
||||||
<th scope="col"><?php _e('Title') ?></th>
|
<th scope="col" style="text-align: left"><?php _e('Title') ?></th>
|
||||||
<th scope="col"><?php _e('Owner') ?></th>
|
<th scope="col" style="text-align: left"><?php _e('Owner') ?></th>
|
||||||
<th scope="col"><?php _e('Updated') ?></th>
|
<th scope="col" style="text-align: left"><?php _e('Updated') ?></th>
|
||||||
<th scope="col"></th>
|
<th scope="col" colspan="3"><?php _e('Action'); ?></th>
|
||||||
<th scope="col"></th>
|
|
||||||
<th scope="col"></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="the-list">
|
<tbody id="the-list">
|
||||||
|
@ -133,7 +133,7 @@ $posts_columns['control_delete'] = '';
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table width="100%" cellpadding="3" cellspacing="3">
|
<table class="widefat">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
|||||||
|
|
||||||
case 'comments':
|
case 'comments':
|
||||||
?>
|
?>
|
||||||
<td><a href="edit.php?p=<?php echo $id ?>&c=1">
|
<td style="text-align: center"><a href="edit.php?p=<?php echo $id ?>&c=1">
|
||||||
<?php comments_number(__('0'), __('1'), __('%')) ?>
|
<?php comments_number(__('0'), __('1'), __('%')) ?>
|
||||||
</a></td>
|
</a></td>
|
||||||
<?php
|
<?php
|
||||||
|
@ -115,12 +115,12 @@ bookmarks ordered by
|
|||||||
<input type="hidden" name="action" value="" />
|
<input type="hidden" name="action" value="" />
|
||||||
<input type="hidden" name="order_by" value="<?php echo wp_specialchars($order_by, 1); ?>" />
|
<input type="hidden" name="order_by" value="<?php echo wp_specialchars($order_by, 1); ?>" />
|
||||||
<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
|
<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
|
||||||
<table width="100%" cellpadding="3" cellspacing="3">
|
<table class="widefat">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="15%"><?php _e('Name') ?></th>
|
<th width="15%" style="text-align: left"><?php _e('Name') ?></th>
|
||||||
<th><?php _e('URI') ?></th>
|
<th style="text-align: left"><?php _e('URI') ?></th>
|
||||||
<th><?php _e('Categories') ?></th>
|
<th style="text-align: left"><?php _e('Categories') ?></th>
|
||||||
<th><?php _e('rel') ?></th>
|
<th><?php _e('rel') ?></th>
|
||||||
<th><?php _e('Visible') ?></th>
|
<th><?php _e('Visible') ?></th>
|
||||||
<th colspan="2"><?php _e('Action') ?></th>
|
<th colspan="2"><?php _e('Action') ?></th>
|
||||||
|
@ -78,13 +78,15 @@ if (empty($plugins)) {
|
|||||||
echo '</p>';
|
echo '</p>';
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<table width="100%" cellpadding="3" cellspacing="3">
|
<table class="widefat">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php _e('Plugin'); ?></th>
|
<th style="text-align: left"><?php _e('Plugin'); ?></th>
|
||||||
<th><?php _e('Version'); ?></th>
|
<th><?php _e('Version'); ?></th>
|
||||||
<th><?php _e('Description'); ?></th>
|
<th style="text-align: left"><?php _e('Description'); ?></th>
|
||||||
<th><?php _e('Action'); ?></th>
|
<th><?php _e('Action'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
<?php
|
<?php
|
||||||
$style = '';
|
$style = '';
|
||||||
|
|
||||||
|
@ -209,38 +209,40 @@ default:
|
|||||||
<?php wp_nonce_field('bulk-users') ?>
|
<?php wp_nonce_field('bulk-users') ?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2><?php _e('User List by Role'); ?></h2>
|
<h2><?php _e('User List by Role'); ?></h2>
|
||||||
<table cellpadding="3" cellspacing="3" width="100%">
|
<table class="widefat">
|
||||||
<?php
|
|
||||||
foreach($roleclasses as $role => $roleclass) {
|
|
||||||
ksort($roleclass);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<th colspan="8" align="left"><h3><?php echo $wp_roles->role_names[$role]; ?></h3></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th><?php _e('ID') ?></th>
|
|
||||||
<th><?php _e('Username') ?></th>
|
|
||||||
<th><?php _e('Name') ?></th>
|
|
||||||
<th><?php _e('E-mail') ?></th>
|
|
||||||
<th><?php _e('Website') ?></th>
|
|
||||||
<th><?php _e('Posts') ?></th>
|
|
||||||
<th> </th>
|
|
||||||
</tr>
|
|
||||||
<tbody id="role-<?php echo $role; ?>"><?php
|
|
||||||
$style = '';
|
|
||||||
foreach ($roleclass as $user_object) {
|
|
||||||
$style = (' class="alternate"' == $style) ? '' : ' class="alternate"';
|
|
||||||
echo "\n\t" . user_row( $user_object, $style );
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
foreach($roleclasses as $role => $roleclass) {
|
||||||
|
ksort($roleclass);
|
||||||
?>
|
?>
|
||||||
</table>
|
|
||||||
|
<tr>
|
||||||
|
<th colspan="8" align="left"><h3><?php echo $wp_roles->role_names[$role]; ?></h3></th>
|
||||||
|
</tr>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align: left"><?php _e('ID') ?></th>
|
||||||
|
<th style="text-align: left"><?php _e('Username') ?></th>
|
||||||
|
<th style="text-align: left"><?php _e('Name') ?></th>
|
||||||
|
<th style="text-align: left"><?php _e('E-mail') ?></th>
|
||||||
|
<th style="text-align: left"><?php _e('Website') ?></th>
|
||||||
|
<th><?php _e('Posts') ?></th>
|
||||||
|
<th> </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="role-<?php echo $role; ?>"><?php
|
||||||
|
$style = '';
|
||||||
|
foreach ($roleclass as $user_object) {
|
||||||
|
$style = (' class="alternate"' == $style) ? '' : ' class="alternate"';
|
||||||
|
echo "\n\t" . user_row( $user_object, $style );
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<h2><?php _e('Update Users'); ?></h2>
|
<h2><?php _e('Update Users'); ?></h2>
|
||||||
|
@ -40,6 +40,28 @@ a.delete:hover {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.widefat {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widefat td, .widefat th {
|
||||||
|
padding: 5px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.import-system {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
background: #dfdfdf
|
||||||
|
}
|
||||||
|
|
||||||
|
#import-upload-form {
|
||||||
|
width: 300px;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
a.edit, a.delete, a.edit:hover, a.delete:hover {
|
a.edit, a.delete, a.edit:hover, a.delete:hover {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
display: block;
|
display: block;
|
||||||
@ -366,7 +388,7 @@ form#upload #post_content {
|
|||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .vers, table .name {
|
table .vers {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ function wp_insert_attachment($object, $file = false, $post_parent = 0) {
|
|||||||
wp_set_post_cats('', $post_ID, $post_category);
|
wp_set_post_cats('', $post_ID, $post_category);
|
||||||
|
|
||||||
if ( $file )
|
if ( $file )
|
||||||
add_post_meta($post_ID, '_wp_attached_file', $file);
|
add_post_meta($post_ID, '_wp_attached_file', $file );
|
||||||
|
|
||||||
clean_post_cache($post_ID);
|
clean_post_cache($post_ID);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user