Changeset 6225
- Timestamp:
- 10/11/2007 05:50:56 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/wp-cat2tag.php
r6206 r6225 64 64 print '</ul>'; 65 65 66 print '<p class="submit"><input type="submit" name=" maybe_convert_all_cats" value="' . __('Convert All Categories') . '" /> <input type="submit" name="submit" value="' . __('Convert »') . '" /></p>';66 print '<p class="submit"><input type="submit" name="submit" value="' . __('Convert »') . '" /></p>'; 67 67 print '</form>'; 68 68 } … … 173 173 } 174 174 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" /> <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 199 175 function init() { 200 176 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; 210 178 211 179 $this->header(); … … 227 195 $this->convert_them(); 228 196 break; 229 230 case 3 :231 $this->convert_all_confirm();232 break;233 234 case 4 :235 $this->convert_all();236 break;237 197 } 238 198 }
Note: See TracChangeset
for help on using the changeset viewer.