if (empty($data['ping_status'])) { $data['ping_status'] = 'closed'; } // update the post edit_post(); require_once './includes/default-list-tables.php'; $wp_list_table = new WP_Posts_Table(); $mode = $_POST['post_view']; $wp_list_table->display_rows(array(get_post($_POST['post_ID']))); exit; break; case 'inline-save-tax': check_ajax_referer('taxinlineeditnonce', '_inline_edit'); require_once './includes/default-list-tables.php'; $wp_list_table = new WP_Terms_Table(); $wp_list_table->check_permissions('edit'); if (!isset($_POST['tax_ID']) || !($id = (int) $_POST['tax_ID'])) { die(-1); } $tag = get_term($id, $taxonomy); $_POST['description'] = $tag->description; $updated = wp_update_term($id, $taxonomy, $_POST); if ($updated && !is_wp_error($updated)) { $tag = get_term($updated['term_id'], $taxonomy); if (!$tag || is_wp_error($tag)) { if (is_wp_error($tag) && $tag->get_error_message()) { die($tag->get_error_message()); } die(__('Item not updated.')); } echo $wp_list_table->single_row($tag, 0, $taxonomy);
<?php /** * Edit Tags Administration Panel. * * @package WordPress * @subpackage Administration */ /** WordPress Administration Bootstrap */ require_once './admin.php'; require_once './includes/default-list-tables.php'; $wp_list_table = new WP_Terms_Table(); $wp_list_table->check_permissions(); $title = $tax->labels->name; if ('post' != $post_type) { $parent_file = "edit.php?post_type={$post_type}"; $submenu_file = "edit-tags.php?taxonomy={$taxonomy}&post_type={$post_type}"; } else { $parent_file = 'edit.php'; $submenu_file = "edit-tags.php?taxonomy={$taxonomy}"; } if (isset($_REQUEST['action']) && isset($_REQUEST['delete_tags']) && ('delete' == $_REQUEST['action'] || 'delete' == $_REQUEST['action2'])) { $action = 'bulk-delete'; } switch ($action) { case 'add-tag': check_admin_referer('add-tag'); if (!current_user_can($tax->cap->edit_terms)) { wp_die(__('Cheatin’ uh?')); } $ret = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST);