Add clean_category_cache() and capability checking. see #4107
git-svn-id: https://develop.svn.wordpress.org/trunk@5203 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c113ddaa1f
commit
143c7eb4c1
@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
class WP_Categories_to_Tags {
|
||||
var $categories_to_convert = array();
|
||||
var $all_categories = array();
|
||||
@ -114,6 +112,8 @@ class WP_Categories_to_Tags {
|
||||
}
|
||||
|
||||
print '</ul>';
|
||||
|
||||
clean_category_cache();
|
||||
}
|
||||
|
||||
function init() {
|
||||
@ -125,14 +125,21 @@ class WP_Categories_to_Tags {
|
||||
|
||||
$this->header();
|
||||
|
||||
if (!current_user_can('manage_categories') || !current_user_can('manage_tags')) {
|
||||
print '<div class="narrow">';
|
||||
print '<p>' __('Cheatin’ uh?') . '</p>';
|
||||
print '</div>';
|
||||
} else {
|
||||
switch ($step) {
|
||||
case 1:
|
||||
case 1 :
|
||||
$this->welcome();
|
||||
break;
|
||||
case 2:
|
||||
|
||||
case 2 :
|
||||
$this->convert_them();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$this->footer();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user