Remove vestiges of what_to_show. Props filosofo. fixes #9815

git-svn-id: https://develop.svn.wordpress.org/trunk@11318 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-05-13 22:28:56 +00:00
parent 765f9798d4
commit fc80cdec6b
9 changed files with 5 additions and 13 deletions

View File

@ -45,7 +45,6 @@ update_category_cache();
set_screen_options(); set_screen_options();
$posts_per_page = get_option('posts_per_page'); $posts_per_page = get_option('posts_per_page');
$what_to_show = get_option('what_to_show');
$date_format = get_option('date_format'); $date_format = get_option('date_format');
$time_format = get_option('time_format'); $time_format = get_option('time_format');

View File

@ -82,7 +82,7 @@ $post_stati = array( // array( adj, noun )
'private' => array(_x('Private', 'page'), __('Private pages'), _nx_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>', 'page')) 'private' => array(_x('Private', 'page'), __('Private pages'), _nx_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>', 'page'))
); );
$query = array('post_type' => 'page', 'orderby' => 'menu_order title', 'what_to_show' => 'posts', $query = array('post_type' => 'page', 'orderby' => 'menu_order title',
'posts_per_page' => -1, 'posts_per_archive_page' => -1, 'order' => 'asc'); 'posts_per_page' => -1, 'posts_per_archive_page' => -1, 'order' => 'asc');
$post_status_label = __('Pages'); $post_status_label = __('Pages');

View File

@ -367,7 +367,6 @@ function wp_dashboard_quick_press() {
printf( '<div class="message"><p>' . __( 'Draft Saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', clean_url( add_query_arg( 'preview', 1, $view ) ), $edit ); printf( '<div class="message"><p>' . __( 'Draft Saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', clean_url( add_query_arg( 'preview', 1, $view ) ), $edit );
$drafts_query = new WP_Query( array( $drafts_query = new WP_Query( array(
'post_type' => 'post', 'post_type' => 'post',
'what_to_show' => 'posts',
'post_status' => 'draft', 'post_status' => 'draft',
'author' => $GLOBALS['current_user']->ID, 'author' => $GLOBALS['current_user']->ID,
'posts_per_page' => 1, 'posts_per_page' => 1,
@ -434,7 +433,6 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
if ( !$drafts ) { if ( !$drafts ) {
$drafts_query = new WP_Query( array( $drafts_query = new WP_Query( array(
'post_type' => 'post', 'post_type' => 'post',
'what_to_show' => 'posts',
'post_status' => 'draft', 'post_status' => 'draft',
'author' => $GLOBALS['current_user']->ID, 'author' => $GLOBALS['current_user']->ID,
'posts_per_page' => 5, 'posts_per_page' => 5,

View File

@ -823,7 +823,7 @@ function wp_edit_posts_query( $q = false ) {
$posts_per_page = 15; $posts_per_page = 15;
$posts_per_page = apply_filters('edit_posts_per_page', $posts_per_page); $posts_per_page = apply_filters('edit_posts_per_page', $posts_per_page);
wp("post_type=post&what_to_show=posts$post_status_q&posts_per_page=$posts_per_page&order=$order&orderby=$orderby"); wp("post_type=post&$post_status_q&posts_per_page=$posts_per_page&order=$order&orderby=$orderby");
return array($post_stati, $avail_post_stati); return array($post_stati, $avail_post_stati);
} }

View File

@ -212,7 +212,6 @@ function populate_options() {
'default_pingback_flag' => 1, 'default_pingback_flag' => 1,
'default_post_edit_rows' => 10, 'default_post_edit_rows' => 10,
'posts_per_page' => 10, 'posts_per_page' => 10,
'what_to_show' => 'posts',
/* translators: default date format, see http://php.net/date */ /* translators: default date format, see http://php.net/date */
'date_format' => __('F j, Y'), 'date_format' => __('F j, Y'),
/* translators: default time format, see http://php.net/date */ /* translators: default time format, see http://php.net/date */

View File

@ -527,10 +527,6 @@ function upgrade_130() {
} }
} }
// The "paged" option for what_to_show is no more.
if ($wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'what_to_show'") == 'paged')
$wpdb->update( $wpdb->options, array('option_value' => 'posts'), array('option_name' => 'what_to_show') );
$active_plugins = __get_option('active_plugins'); $active_plugins = __get_option('active_plugins');
// If plugins are not stored in an array, they're stored in the old // If plugins are not stored in an array, they're stored in the old

View File

@ -1088,7 +1088,7 @@ EOD;
$count = get_option('posts_per_rss'); $count = get_option('posts_per_rss');
wp('what_to_show=posts&posts_per_page=' . $count . '&offset=' . ($count * ($page-1) . '&orderby=modified')); wp('posts_per_page=' . $count . '&offset=' . ($count * ($page-1) . '&orderby=modified'));
$post = $GLOBALS['post']; $post = $GLOBALS['post'];
$posts = $GLOBALS['posts']; $posts = $GLOBALS['posts'];

View File

@ -36,7 +36,7 @@ class WP {
* @since 2.0.0 * @since 2.0.0
* @var array * @var array
*/ */
var $private_query_vars = array('offset', 'posts_per_page', 'posts_per_archive_page', 'what_to_show', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page'); var $private_query_vars = array('offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page');
/** /**
* Extra query variables set by the user. * Extra query variables set by the user.

View File

@ -555,7 +555,7 @@ class WP_Widget_Recent_Posts extends WP_Widget {
else if ( $number > 15 ) else if ( $number > 15 )
$number = 15; $number = 15;
$r = new WP_Query(array('showposts' => $number, 'what_to_show' => 'posts', 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1)); $r = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1));
if ($r->have_posts()) : if ($r->have_posts()) :
?> ?>
<?php echo $before_widget; ?> <?php echo $before_widget; ?>