Bring out the shears.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2011-01-06 04:11:14 +00:00
parent 8066547be3
commit 85f1feed84
26 changed files with 72 additions and 72 deletions

View File

@@ -66,13 +66,13 @@ class WP_Comments_List_Table extends WP_List_Table {
}
$page = $this->get_pagenum();
if ( isset( $_REQUEST['start'] ) ) {
$start = $_REQUEST['start'];
} else {
$start = ( $page - 1 ) * $comments_per_page;
}
if ( $doing_ajax && isset( $_REQUEST['offset'] ) ) {
$start += $_REQUEST['offset'];
}
@@ -115,7 +115,7 @@ class WP_Comments_List_Table extends WP_List_Table {
'per_page' => $comments_per_page,
) );
}
function get_per_page( $comment_status = 'all' ) {
$comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
$comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
@@ -513,7 +513,7 @@ class WP_Comments_List_Table extends WP_List_Table {
class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
function get_column_info() {
$this->_column_headers = array(
$this->_column_headers = array(
array(
'author' => __( 'Author' ),
'comment' => _x( 'Comment', 'column name' ),
@@ -521,16 +521,16 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
array(),
array(),
);
return $this->_column_headers;
}
function get_table_classes() {
$classes = parent::get_table_classes();
$classes[] = 'comments-box';
return $classes;
}
function display( $output_empty = false ) {
extract( $this->_args );
?>
@@ -541,7 +541,7 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
</table>
<?php
}
function get_per_page( $comment_status = false ) {
return 10;
}

View File

@@ -185,7 +185,7 @@ class WP_List_Table {
* @access public
*
* @param string $text The search button text
* @param string $input_id The search input id
* @param string $input_id The search input id
*/
function search_box( $text, $input_id ) {
if ( empty( $_REQUEST['s'] ) && !$this->has_items() )

View File

@@ -291,7 +291,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
$actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context );
$actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context );
$class = empty( $theme['enabled'] ) ? 'inactive' : 'active';
$checkbox_id = "checkbox_" . md5($theme['Name']);
$checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $theme_key ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme['Name'] . "</label>";

View File

@@ -233,7 +233,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
$text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count );
break;
}
if ( 'search' != $type ) {
$status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
add_query_arg('plugin_status', $type, 'plugins.php'),

View File

@@ -71,7 +71,7 @@ class WP_Terms_List_Table extends WP_List_Table {
'per_page' => $tags_per_page,
) );
}
function has_items() {
// todo: populate $this->items in prepare_items()
return true;
@@ -139,7 +139,7 @@ class WP_Terms_List_Table extends WP_List_Table {
// convert it to table rows
$out = '';
$count = 0;
$terms = array();
if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) {
@@ -160,7 +160,7 @@ class WP_Terms_List_Table extends WP_List_Table {
$out .= $this->single_row( $term, 0, $taxonomy );
$count = $number; // Only displaying a single page.
}
if ( empty( $terms ) ) {
echo '<tr class="no-items"><td colspan="2">';
$this->no_items();

View File

@@ -349,7 +349,7 @@ function upload_size_limit_filter( $size ) {
$fileupload_maxk = 1024 * get_site_option( 'fileupload_maxk', 1500 );
if ( get_site_option( 'upload_space_check_disabled' ) )
return min( $size, $fileupload_maxk );
return min( $size, $fileupload_maxk, get_upload_space_available() );
}
/**

View File

@@ -1221,7 +1221,7 @@ function wp_check_post_lock( $post_id ) {
$lock = explode( ':', $lock );
$time = $lock[0];
$user = isset( $lock[1] ) ? $lock[1] : get_post_meta( $post->ID, '_edit_last', true );
$time_window = apply_filters( 'wp_check_post_lock_window', AUTOSAVE_INTERVAL * 2 );
if ( $time && $time > time() - $time_window && $user != get_current_user_id() )

View File

@@ -330,7 +330,7 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single',
echo $content;
return;
}
if ( $mode == 'single' ) {
$wp_list_table = get_list_table('WP_Post_Comments_List_Table');
} else {