WordPress.org

Make WordPress Core

Ticket #9815: remove_vestige_what_to_show.9815.diff

File remove_vestige_what_to_show.9815.diff, 5.6 KB (added by filosofo, 5 years ago)
  • wp-includes/default-widgets.php

     
    555555                else if ( $number > 15 ) 
    556556                        $number = 15; 
    557557 
    558                 $r = new WP_Query(array('showposts' => $number, 'what_to_show' => 'posts', 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1)); 
     558                $r = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1)); 
    559559                if ($r->have_posts()) : 
    560560?> 
    561561                <?php echo $before_widget; ?> 
  • wp-includes/classes.php

     
    3636         * @since 2.0.0 
    3737         * @var array 
    3838         */ 
    39         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'); 
     39        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'); 
    4040 
    4141        /** 
    4242         * Extra query variables set by the user. 
  • wp-app.php

     
    10881088 
    10891089                $count = get_option('posts_per_rss'); 
    10901090 
    1091                 wp('what_to_show=posts&posts_per_page=' . $count . '&offset=' . ($count * ($page-1) . '&orderby=modified')); 
     1091                wp('posts_per_page=' . $count . '&offset=' . ($count * ($page-1) . '&orderby=modified')); 
    10921092 
    10931093                $post = $GLOBALS['post']; 
    10941094                $posts = $GLOBALS['posts']; 
  • wp-admin/includes/post.php

     
    823823                $posts_per_page = 15; 
    824824        $posts_per_page = apply_filters('edit_posts_per_page', $posts_per_page); 
    825825 
    826         wp("post_type=post&what_to_show=posts$post_status_q&posts_per_page=$posts_per_page&order=$order&orderby=$orderby"); 
     826        wp("post_type=post&$post_status_q&posts_per_page=$posts_per_page&order=$order&orderby=$orderby"); 
    827827 
    828828        return array($post_stati, $avail_post_stati); 
    829829} 
  • wp-admin/includes/dashboard.php

     
    367367                        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 ); 
    368368                        $drafts_query = new WP_Query( array( 
    369369                                'post_type' => 'post', 
    370                                 'what_to_show' => 'posts', 
    371370                                'post_status' => 'draft', 
    372371                                'author' => $GLOBALS['current_user']->ID, 
    373372                                'posts_per_page' => 1, 
     
    434433        if ( !$drafts ) { 
    435434                $drafts_query = new WP_Query( array( 
    436435                        'post_type' => 'post', 
    437                         'what_to_show' => 'posts', 
    438436                        'post_status' => 'draft', 
    439437                        'author' => $GLOBALS['current_user']->ID, 
    440438                        'posts_per_page' => 5, 
  • wp-admin/includes/upgrade.php

     
    527527                } 
    528528        } 
    529529 
    530         // The "paged" option for what_to_show is no more. 
    531         if ($wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'what_to_show'") == 'paged') 
    532                 $wpdb->update( $wpdb->options, array('option_value' => 'posts'), array('option_name' => 'what_to_show') ); 
    533  
    534530        $active_plugins = __get_option('active_plugins'); 
    535531 
    536532        // If plugins are not stored in an array, they're stored in the old 
  • wp-admin/includes/schema.php

     
    212212        'default_pingback_flag' => 1, 
    213213        'default_post_edit_rows' => 10, 
    214214        'posts_per_page' => 10, 
    215         'what_to_show' => 'posts', 
    216215        /* translators: default date format, see http://php.net/date */ 
    217216        'date_format' => __('F j, Y'), 
    218217        /* translators: default time format, see http://php.net/date */ 
  • wp-admin/admin.php

     
    4545set_screen_options(); 
    4646 
    4747$posts_per_page = get_option('posts_per_page'); 
    48 $what_to_show = get_option('what_to_show'); 
    4948$date_format = get_option('date_format'); 
    5049$time_format = get_option('time_format'); 
    5150 
  • wp-admin/edit-pages.php

     
    8282                'private' => array(_x('Private', 'page'), __('Private pages'), _nx_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>', 'page')) 
    8383        ); 
    8484 
    85 $query = array('post_type' => 'page', 'orderby' => 'menu_order title', 'what_to_show' => 'posts', 
     85$query = array('post_type' => 'page', 'orderby' => 'menu_order title', 
    8686        'posts_per_page' => -1, 'posts_per_archive_page' => -1, 'order' => 'asc'); 
    8787 
    8888$post_status_label = __('Pages');