WordPress.org

Make WordPress Core

Changeset 6225


Ignore:
Timestamp:
10/11/2007 05:50:56 PM (11 years ago)
Author:
ryan
Message:

Lose Convert All Categories button. It is confusing people. Props foolswisdom. fixes #5058

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/wp-cat2tag.php

    r6206 r6225  
    6464        print '</ul>';
    6565
    66         print '<p class="submit"><input type="submit" name="maybe_convert_all_cats" value="' . __('Convert All Categories') . '" /> <input type="submit" name="submit" value="' . __('Convert &raquo;') . '" /></p>';
     66        print '<p class="submit"><input type="submit" name="submit" value="' . __('Convert &raquo;') . '" /></p>';
    6767        print '</form>';
    6868    }
     
    173173    }
    174174
    175     function convert_all_confirm() {
    176         print '<div class="narrow">';
    177 
    178         print '<h3>' . __('Confirm') . '</h3>';
    179 
    180         print '<p>' . __('You are about to convert all categories to tags. Are you sure you want to continue?') . '</p>';
    181 
    182         print '<form action="admin.php?import=wp-cat2tag" method="post">';
    183         wp_nonce_field('import-cat2tag');
    184         print '<p style="text-align:center" class="submit"><input type="submit" value="' . __('Yes') . '" name="yes_convert_all_cats" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="' . __('No') . '" name="no_dont_do_it" /></p>';
    185         print '</form>';
    186 
    187         print '</div>';
    188     }
    189 
    190     function convert_all() {
    191         global $wpdb;
    192 
    193         $this->populate_all_categories();
    194         foreach ( $this->all_categories as $category )
    195             $this->categories_to_convert[] = $category->term_id;
    196         $this->convert_them();
    197     }
    198 
    199175    function init() {
    200176
    201         if (isset($_POST['maybe_convert_all_cats'])) {
    202             $step = 3;
    203         } elseif (isset($_POST['yes_convert_all_cats'])) {
    204             $step = 4;
    205         } elseif (isset($_POST['no_dont_do_it'])) {
    206             die('no_dont_do_it');
    207         } else {
    208             $step = (isset($_GET['step'])) ? (int) $_GET['step'] : 1;
    209         }
     177        $step = (isset($_GET['step'])) ? (int) $_GET['step'] : 1;
    210178
    211179        $this->header();
     
    227195                    $this->convert_them();
    228196                break;
    229 
    230                 case 3 :
    231                     $this->convert_all_confirm();
    232                 break;
    233 
    234                 case 4 :
    235                     $this->convert_all();
    236                 break;
    237197            }
    238198        }
Note: See TracChangeset for help on using the changeset viewer.