Column hiding for comments. Settings box JS consolidation. Props Viper007Bond. see #7725

git-svn-id: http://svn.automattic.com/wordpress/trunk@8988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-09-26 01:05:52 +00:00
parent 4bff75f637
commit b10412eab9
18 changed files with 157 additions and 318 deletions

View File

@ -520,11 +520,6 @@ input.readonly {
background: url(../images/xit.gif) no-repeat -10px 0; background: url(../images/xit.gif) no-repeat -10px 0;
} }
#the-comment-list .comment a {
border-bottom-color: #ababab;
color: #666;
}
#update-nag, .plugin-update { #update-nag, .plugin-update {
background-color: #fffeeb; background-color: #fffeeb;
border-bottom-color: #ccc; border-bottom-color: #ccc;

View File

@ -508,11 +508,6 @@ input.readonly {
background: url(../images/xit.gif) no-repeat -10px 0; background: url(../images/xit.gif) no-repeat -10px 0;
} }
#the-comment-list .comment a {
border-bottom-color: #ababab;
color: #666;
}
#update-nag, .plugin-update { #update-nag, .plugin-update {
background-color: #fffeeb; background-color: #fffeeb;
border-bottom-color: #ccc; border-bottom-color: #ccc;

View File

@ -96,6 +96,21 @@ if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['sp
} }
?> ?>
<div class="wrap"> <div class="wrap">
<form id="adv-settings" action="" method="get">
<div id="show-settings" class="hide-if-no-js"><a href="#edit_settings" id="show-settings-link"><?php _e('Advanced Options') ?></a>
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js"><?php _e('Hide Options') ?></a></div>
<div id="edit-settings" class="hide-if-js hide-if-no-js">
<div id="edit-settings-wrap">
<h5><?php _e('Show on screen') ?></h5>
<div class="metabox-prefs">
<?php manage_columns_prefs('comment') ?>
<br class="clear" />
</div></div>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
</div></form>
<form id="posts-filter" action="" method="get"> <form id="posts-filter" action="" method="get">
<h2><?php _e('Manage Comments'); ?></h2> <h2><?php _e('Manage Comments'); ?></h2>
@ -208,13 +223,9 @@ if ($comments) {
?> ?>
<table class="widefat"> <table class="widefat">
<thead> <thead>
<tr> <tr>
<th scope="col" class="check-column"><input type="checkbox" /></th> <?php print_column_headers('comment'); ?>
<th scope="col" class="comment-column"><?php _e('Comment') ?></th> </tr>
<th scope="col" class="author-column"><?php _e('Author') ?></th>
<th scope="col" class="date-column"><?php _e('Submitted') ?></th>
<th scope="col" class="response-column"><?php _e('In Response To This Post') ?></th>
</tr>
</thead> </thead>
<tbody id="the-comment-list" class="list:comment"> <tbody id="the-comment-list" class="list:comment">
<?php <?php

View File

@ -516,6 +516,16 @@ function get_column_headers($page) {
return wp_manage_posts_columns(); return wp_manage_posts_columns();
case 'page': case 'page':
return wp_manage_pages_columns(); return wp_manage_pages_columns();
case 'comment':
$columns = array(
'cb' => '<input type="checkbox" />',
'comment' => __('Comment'),
'author' => __('Author'),
'date' => __('Submitted'),
'response' => __('In Response To This Post')
);
return apply_filters('manage_comments_columns', $columns);
case 'link': case 'link':
$columns = array( $columns = array(
'cb' => '<input type="checkbox" />', 'cb' => '<input type="checkbox" />',
@ -1587,76 +1597,96 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
$unapprove_url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) ); $unapprove_url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) );
$spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
?> echo "<tr id='comment-$comment->comment_ID' class='$the_comment_status'>";
<tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $the_comment_status; ?>'> $columns = get_column_headers('comment');
<?php if ( $checkbox ) : ?> $hidden = (array) get_user_option( 'manage-comment-columns-hidden' );
<td class="check-column"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> foreach ( $columns as $column_name => $column_display_name ) {
<?php endif; ?> $class = "class=\"$column_name column-$column_name\"";
<td class="comment-column">
<?php if ( 'detail' == $mode || 'single' == $mode ) comment_text(); ?>
<?php $style = '';
$actions = array(); if ( in_array($column_name, $hidden) )
$style = ' style="display:none;"';
if ( current_user_can('edit_post', $comment->comment_post_ID) ) { $attributes = "$class$style";
$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
if ( $comment_status ) { // not looking at all comments
if ( 'approved' == $the_comment_status ) {
$actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
unset($actions['approve']);
} else {
$actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
unset($actions['unapprove']);
}
}
if ( 'spam' != $the_comment_status )
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>';
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
if ( 'spam' != $the_comment_status )
$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',this);return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
$actions = apply_filters( 'comment_row_actions', $actions, $comment ); switch ($column_name) {
case 'cb':
if ( !$checkbox ) break;
echo '<th scope="row" class="check-column">';
if ( current_user_can('edit_post', $comment->comment_post_ID) ) echo "<input type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />";
echo '</th>';
break;
case 'comment':
echo "<td $attributes>";
if ( 'detail' == $mode || 'single' == $mode ) comment_text();
$action_count = count($actions); $actions = array();
$i = 0;
foreach ( $actions as $action => $link ) { if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
++$i; $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
( $i == $action_count ) ? $sep = '' : $sep = ' | '; $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
// The action before reply shouldn't output a sep if ( $comment_status ) { // not looking at all comments
if ( 'edit' == $action ) if ( 'approved' == $the_comment_status ) {
$sep = ''; $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
// Reply needs a hide-if-no-js span unset($actions['approve']);
if ( 'reply' == $action ) } else {
echo "<span class='$action'><span class='hide-if-no-js'> | $link</span>$sep</span>"; $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
else unset($actions['unapprove']);
echo "<span class='$action'>$link$sep</span>"; }
}
if ( 'spam' != $the_comment_status )
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>';
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
if ( 'spam' != $the_comment_status )
$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',this);return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
$actions = apply_filters( 'comment_row_actions', $actions, $comment );
$action_count = count($actions);
$i = 0;
foreach ( $actions as $action => $link ) {
++$i;
( $i == $action_count ) ? $sep = '' : $sep = ' | ';
// The action before reply shouldn't output a sep
if ( 'edit' == $action )
$sep = '';
// Reply needs a hide-if-no-js span
if ( 'reply' == $action )
echo "<span class='$action'><span class='hide-if-no-js'> | $link</span>$sep</span>";
else
echo "<span class='$action'>$link$sep</span>";
}
}
echo '</td>';
break;
case 'author':
echo "<td $attributes><strong>"; comment_author(); echo '</strong><br />';
if ( !empty($author_url) )
echo "<a href='$author_url'>$author_url_display</a><br />";
if ( current_user_can( 'edit_post', $post->ID ) ) {
if ( !empty($comment->comment_author_email) ) {
comment_author_email_link();
echo '<br />';
}
echo '<a href="edit-comments.php?s=';
comment_author_IP();
echo '&amp;mode=detail">';
comment_author_IP();
echo '</a>';
} //current_user_can
echo '</td>';
break;
case 'date':
echo "<td $attributes>" . get_comment_date(__('Y/m/d \a\t g:ia')) . '</td>';
break;
case 'response':
if ( 'single' !== $mode )
echo "<td $attributes>&quot;$post_link&quot; " . sprintf('(%s comments)', $post->comment_count) . '<br />' . get_the_time(__('Y/m/d \a\t g:ia')) . '</td>';
} }
} }
?> echo "</tr>\n";
</td>
<td class="author-column">
<strong><?php comment_author(); ?></strong><br />
<?php if ( !empty($author_url) ) : ?>
<a href="<?php echo $author_url ?>"><?php echo $author_url_display; ?></a><br />
<?php endif; ?>
<?php if ( current_user_can( 'edit_post', $post->ID ) ) : ?>
<?php if ( !empty($comment->comment_author_email) ): ?>
<?php comment_author_email_link() ?><br />
<?php endif; ?>
<a href="edit-comments.php?s=<?php comment_author_IP() ?>&amp;mode=detail"><?php comment_author_IP() ?></a>
<?php endif; //current_user_can?>
</td>
<td class="date-column"><?php comment_date(__('Y/m/d \a\t g:ia')); ?></td>
<?php if ( 'single' !== $mode ) : ?>
<td class="response-column">
"<?php echo $post_link ?>" <?php echo sprintf('(%s comments)', $post->comment_count); ?><br />
<?php echo get_the_time(__('Y/m/d \a\t g:ia')); ?>
</td>
<?php endif; ?>
</tr>
<?php
} }
function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single') { function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single') {
@ -2292,7 +2322,7 @@ function manage_columns_prefs($page) {
foreach ( $columns as $column => $title ) { foreach ( $columns as $column => $title ) {
// Can't hide these // Can't hide these
if ( 'cb' == $column || 'title' == $column || 'name' == $column || 'username' == $column || 'media' == $column ) if ( 'cb' == $column || 'title' == $column || 'name' == $column || 'username' == $column || 'media' == $column || 'comment' == $column )
continue; continue;
if ( empty($title) ) if ( empty($title) )
continue; continue;

View File

@ -26,25 +26,4 @@ jQuery(function($) {
} else { } else {
columns.init('category'); columns.init('category');
} }
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
}); });

View File

@ -231,6 +231,8 @@ commentReply = {
}; };
$(document).ready(function(){ $(document).ready(function(){
columns.init('comment');
if ( typeof QTags != 'undefined' ) if ( typeof QTags != 'undefined' )
ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more'); ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more');

View File

@ -48,25 +48,4 @@ jQuery(document).ready( function($) {
return false; return false;
} ); } );
jQuery('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change(); jQuery('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change();
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
}); });

View File

@ -1,24 +1,3 @@
jQuery(document).ready( function($) { jQuery(document).ready( function($) {
columns.init('link'); columns.init('link');
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
}); });

View File

@ -1,24 +1,3 @@
jQuery(document).ready( function($) { jQuery(document).ready( function($) {
columns.init('media'); columns.init('media');
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
}); });

View File

@ -48,27 +48,6 @@ jQuery(document).ready( function($) {
return false; return false;
}); });
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
$('.edit-post-status').click(function() { $('.edit-post-status').click(function() {
if ($('#post-status-select').is(":hidden")) { if ($('#post-status-select').is(":hidden")) {
$('#post-status-select').slideDown("normal"); $('#post-status-select').slideDown("normal");

View File

@ -1,24 +1,3 @@
jQuery(document).ready( function($) { jQuery(document).ready( function($) {
columns.init('page'); columns.init('page');
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
}); });

View File

@ -192,27 +192,6 @@ jQuery(document).ready( function($) {
return false; return false;
}); });
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
// Custom Fields // Custom Fields
jQuery('#the-list').wpList( { addAfter: function( xml, s ) { jQuery('#the-list').wpList( { addAfter: function( xml, s ) {
if ( jQuery.isFunction( autosave_update_post_ID ) ) { if ( jQuery.isFunction( autosave_update_post_ID ) ) {

View File

@ -1,24 +1,3 @@
jQuery(document).ready( function($) { jQuery(document).ready( function($) {
columns.init('post'); columns.init('post');
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
}); });

View File

@ -0,0 +1,21 @@
jQuery(document).ready( function($) {
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
});

View File

@ -20,25 +20,4 @@ jQuery(function($) {
$('#the-list').wpList(); $('#the-list').wpList();
columns.init('tag'); columns.init('tag');
});
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
});

View File

@ -2,25 +2,4 @@ jQuery( function($) {
$('#users').wpList(); $('#users').wpList();
columns.init('user'); columns.init('user');
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
}); });

View File

@ -512,20 +512,20 @@ p.pagenav {
font-weight: bold; font-weight: bold;
} }
.comment-column p { .column-comment p {
margin-top: 0; margin-top: 0;
} }
.comment-column { .column-comment {
width: 50%; width: 50%;
} }
.author-column, .column-author,
.response-column { .column-response {
width: 20%; width: 20%;
} }
.author-column img { .column-author img {
float: left; float: left;
margin-right: 10px; margin-right: 10px;
margin-top: 3px; margin-top: 3px;
@ -1665,15 +1665,6 @@ ul.view-switch li.current {
border-top-right-radius: 3px; border-top-right-radius: 3px;
} }
#the-comment-list .comment a {
padding-bottom: 1px;
text-decoration: none;
border-bottom-width: 1px;
border-bottom-style: solid;
}
#the-comment-list td.comment p.comment-author { #the-comment-list td.comment p.comment-author {
margin-top: 0; margin-top: 0;
margin-left: 0; margin-left: 0;
@ -1693,8 +1684,10 @@ ul.view-switch li.current {
} }
#the-comment-list td.comment { #the-comment-list td.comment {
/*
width: 65%; width: 65%;
max-width: 460px; max-width: 460px;
*/
word-wrap: break-word; word-wrap: break-word;
} }

View File

@ -149,8 +149,8 @@ function wp_default_scripts( &$scripts ) {
'add' => attribute_escape(__('Add')), 'add' => attribute_escape(__('Add')),
'how' => __('Separate multiple categories with commas.') 'how' => __('Separate multiple categories with commas.')
) ); ) );
$scripts->add( 'admin-categories', '/wp-admin/js/categories.js', array('wp-lists', 'columns'), '20071031' ); $scripts->add( 'admin-categories', '/wp-admin/js/categories.js', array('wp-lists', 'columns', 'settings-box'), '20080925' );
$scripts->add( 'admin-tags', '/wp-admin/js/tags.js', array('wp-lists', 'columns'), '20080918' ); $scripts->add( 'admin-tags', '/wp-admin/js/tags.js', array('wp-lists', 'columns', 'settings-box'), '20080925' );
$scripts->add( 'admin-custom-fields', '/wp-admin/js/custom-fields.js', array('wp-lists'), '20070823' ); $scripts->add( 'admin-custom-fields', '/wp-admin/js/custom-fields.js', array('wp-lists'), '20070823' );
$scripts->add( 'password-strength-meter', '/wp-admin/js/password-strength-meter.js', array('jquery'), '20080824' ); $scripts->add( 'password-strength-meter', '/wp-admin/js/password-strength-meter.js', array('jquery'), '20080824' );
$scripts->localize( 'password-strength-meter', 'pwsL10n', array( $scripts->localize( 'password-strength-meter', 'pwsL10n', array(
@ -160,13 +160,13 @@ function wp_default_scripts( &$scripts ) {
'good' => __('Medium'), 'good' => __('Medium'),
'strong' => __('Strong') 'strong' => __('Strong')
) ); ) );
$scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-draggable', 'jquery-ui-resizable', 'quicktags'), '20080905' ); $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-draggable', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20080925' );
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array( $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
'pending' => __('%i% pending'), // must look like: "# blah blah" 'pending' => __('%i% pending'), // must look like: "# blah blah"
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']), 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']),
) ); ) );
$scripts->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists', 'columns'), '20080918' ); $scripts->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists', 'columns', 'settings-box'), '20080925' );
$scripts->add( 'admin-forms', '/wp-admin/js/forms.js', array('jquery'), '20080729'); $scripts->add( 'admin-forms', '/wp-admin/js/forms.js', array('jquery'), '20080729');
$scripts->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' ); $scripts->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );
$scripts->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' ); $scripts->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' );
@ -180,7 +180,7 @@ function wp_default_scripts( &$scripts ) {
'save' => __('Save'), 'save' => __('Save'),
'cancel' => __('Cancel'), 'cancel' => __('Cancel'),
) ); ) );
$scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080701' ); $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug', 'settings-box'), '20080925' );
$scripts->localize( 'post', 'postL10n', array( $scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'), 'tagsUsed' => __('Tags used on this post:'),
'add' => attribute_escape(__('Add')), 'add' => attribute_escape(__('Add')),
@ -189,12 +189,12 @@ function wp_default_scripts( &$scripts ) {
'cancel' => __('Cancel'), 'cancel' => __('Cancel'),
'edit' => __('Edit'), 'edit' => __('Edit'),
) ); ) );
$scripts->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox'), '20080318' ); $scripts->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox', 'settings-box'), '20080925' );
$scripts->localize( 'page', 'postL10n', array( $scripts->localize( 'page', 'postL10n', array(
'cancel' => __('Cancel'), 'cancel' => __('Cancel'),
'edit' => __('Edit'), 'edit' => __('Edit'),
) ); ) );
$scripts->add( 'link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20080131' ); $scripts->add( 'link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox', 'settings-box'), '20080925' );
$scripts->add( 'comment', '/wp-admin/js/comment.js', array('postbox'), '20080219' ); $scripts->add( 'comment', '/wp-admin/js/comment.js', array('postbox'), '20080219' );
$scripts->localize( 'comment', 'commentL10n', array( $scripts->localize( 'comment', 'commentL10n', array(
'cancel' => __('Cancel'), 'cancel' => __('Cancel'),
@ -263,15 +263,17 @@ function wp_default_scripts( &$scripts ) {
'time' => time() 'time' => time()
) ); ) );
$scripts->add( 'posts', '/wp-admin/js/posts.js', array('columns'), '20080910' ); $scripts->add( 'posts', '/wp-admin/js/posts.js', array('columns', 'settings-box'), '20080925' );
$scripts->add( 'pages', '/wp-admin/js/pages.js', array('columns'), '20080910' ); $scripts->add( 'pages', '/wp-admin/js/pages.js', array('columns', 'settings-box'), '20080925' );
$scripts->add( 'links', '/wp-admin/js/links.js', array('columns'), '20080913' ); $scripts->add( 'links', '/wp-admin/js/links.js', array('columns', 'settings-box'), '20080925' );
$scripts->add( 'media', '/wp-admin/js/media.js', array('columns'), '20080915' ); $scripts->add( 'media', '/wp-admin/js/media.js', array('columns', 'settings-box'), '20080925' );
$scripts->add( 'columns', '/wp-admin/js/columns.js', false, '20080910' ); $scripts->add( 'columns', '/wp-admin/js/columns.js', false, '20080910' );
$scripts->localize( 'columns', 'columnsL10n', array( $scripts->localize( 'columns', 'columnsL10n', array(
'requestFile' => admin_url('admin-ajax.php'), 'requestFile' => admin_url('admin-ajax.php'),
) ); ) );
$scripts->add( 'settings-box', '/wp-admin/js/settings-box.js', array( 'jquery' ), '20080925' );
} }
} }