Make WordPress Core

Ticket #3188: 3188.diff

File 3188.diff, 6.6 KB (added by westi, 18 years ago)

Deprecate start_wp

  • wp-rss.php

     
    2121        <language><?php echo get_option('rss_language'); ?></language>
    2222        <?php do_action('rss_head'); ?>
    2323
    24 <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
     24<?php while (have_posts()) : the_post(); ?>
    2525        <item>
    2626                <title><?php the_title_rss() ?></title>
    2727<?php if (get_option('rss_use_excerpt')) { ?>
     
    3232                <link><?php permalink_single_rss() ?></link>
    3333                <?php do_action('rss_item'); ?>
    3434        </item>
    35 <?php $items_count++; if (($items_count == get_option('posts_per_rss')) && empty($m)) { break; } } } ?>
     35<?php endwhile; ?>
    3636</channel>
    3737</rss>
  • wp-includes/query.php

     
    919919                } elseif ($this->is_single) {
    920920                        $where .= " AND (post_type = 'post')";
    921921                } else {
    922                         $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'";
     922                        if ('all' == $post_type)
     923                                $where .= " AND ( 1=1 AND (post_status = 'publish'";
     924                        else
     925                                $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'";
    923926
    924927                        if ( is_admin() )
    925928                                $where .= " OR post_status = 'future' OR post_status = 'draft'";
  • wp-content/themes/classic/comments-popup.php

     
    11<?php
    22/* Don't remove these lines. */
    33add_filter('comment_text', 'popuplinks');
    4 foreach ($posts as $post) { start_wp();
     4while( have_posts()) : the_post();
    55?>
    66<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    77<html xmlns="http://www.w3.org/1999/xhtml">
     
    9393<div><strong><a href="javascript:window.close()"><?php _e("Close this window."); ?></a></strong></div>
    9494
    9595<?php // if you delete this the sky will fall on your head
    96 }
     96endwhile;
    9797?>
    9898
    9999<!-- // this is just the end of the motor - don't touch that line either :) -->
  • wp-content/themes/default/comments-popup.php

     
    11<?php
    22/* Don't remove these lines. */
    33add_filter('comment_text', 'popuplinks');
    4 foreach ($posts as $post) { start_wp();
     4while ( have_posts()) : the_post();
    55?>
    66<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    77<html xmlns="http://www.w3.org/1999/xhtml">
     
    9393<div><strong><a href="javascript:window.close()">Close this window.</a></strong></div>
    9494
    9595<?php // if you delete this the sky will fall on your head
    96 }
     96endwhile;
    9797?>
    9898
    9999<!-- // this is just the end of the motor - don't touch that line either :) -->
  • wp-rss2.php

     
    2727        <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
    2828        <language><?php echo get_option('rss_language'); ?></language>
    2929        <?php do_action('rss2_head'); ?>
    30         <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
     30        <?php while( have_posts()) : the_post(); ?>
    3131        <item>
    3232                <title><?php the_title_rss() ?></title>
    3333                <link><?php permalink_single_rss() ?></link>
     
    5151<?php rss_enclosure(); ?>
    5252        <?php do_action('rss2_item'); ?>
    5353        </item>
    54         <?php $items_count++; if (($items_count == get_option('posts_per_rss')) && !is_date()) { break; } } } ?>
     54        <?php endwhile; ?>
    5555</channel>
    5656</rss>
  • wp-atom.php

     
    2323        <copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog'), 0); ?></copyright>
    2424        <generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
    2525        <?php do_action('atom_head'); ?>
    26         <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
     26        <?php while (have_posts()) : the_post(); ?>
    2727        <entry>
    2828                <author>
    2929                        <name><?php the_author() ?></name>
     
    4141<?php rss_enclosure(); ?>
    4242<?php do_action('atom_entry'); ?>
    4343        </entry>
    44         <?php $items_count++; if (($items_count == get_option('posts_per_rss')) && empty($m)) { break; } } } ?>
     44        <?php endwhile ; ?>
    4545</feed>
  • wp-admin/edit.php

     
    157157<?php
    158158if ($posts) {
    159159$bgcolor = '';
    160 foreach ($posts as $post) { start_wp();
     160while (have_posts()) : the_post();
    161161add_filter('the_title','wp_specialchars');
    162162$class = ('alternate' == $class) ? '' : 'alternate';
    163163?>
     
    235235?>
    236236        </tr>
    237237<?php
    238 }
     238endwhile;
    239239} else {
    240240?>
    241241  <tr style='background-color: <?php echo $bgcolor; ?>'>
  • wp-admin/export.php

     
    3131header('Content-Type: application/octet-stream');
    3232header("Content-Disposition: attachment; filename=$filename");
    3333header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
    34 //$posts = query_posts('');
    35 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt ASC");
     34$posts = query_posts('posts_per_page=-1&order=ASC&post_type=all');
     35//$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt ASC");
    3636?>
    3737<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" created="<?php echo date('Y-m-d H:m'); ?>"-->
    3838<rss version="2.0"
     
    5050        <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
    5151        <language><?php echo get_option('rss_language'); ?></language>
    5252        <?php do_action('rss2_head'); ?>
    53         <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
     53        <?php while (have_posts()) : the_post(); ?>
    5454<item>
    5555<title><?php the_title_rss() ?></title>
    5656<link><?php permalink_single_rss() ?></link>
     
    9797</wp:comment>
    9898<?php } } ?>
    9999        </item>
    100 <?php } } ?>
     100<?php endwhile; ?>
    101101</channel>
    102102</rss>
    103103<?php
     
    105105}
    106106
    107107include ('admin-footer.php');
    108 ?>
    109  No newline at end of file
     108?>