0

I might get rep'ed down on this - but is there suppose to be a "Delete" link on the edit-tags.php page? Note: not the WP-List-Table, but the actual page where you specifically view the terms individually.

It seems as if they added on the option here: https://core.trac.wordpress.org/ticket/9777#no1

__ UPDATE

It seems like I was looking at the wrong WP file. The individual term page is located at: wp-admin/edit-tag-form.php, and there is no mention of any "Delete".

Knowing this, is it possible to add on a delete button to this page OR creating a "Delete" column onto the WP-List-Table. I tried it this way, but received an "undefined variable 'tag'" for the column.

Here is what I tried:

add_filter( 'manage_customcpt_custom_column', 'customcpt_taxnomy_add_columns', 10, 3 );
function saloncms_product_cpt_taxnomy_add_columns( $columns, $column, $id ) {
    if ( $column == 'delete' ) {
    "<a class='delete-tag' href='" . wp_nonce_url( "edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ) . "'>" . __( 'Delete' ) . "</a>";
    }
    return $columns;
}

Thanks, Roc.

0
"<a class='delete-tag' href='" . wp_nonce_url( "edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ) . "'>" . __( 'Delete' ) . "</a>";

$tag->term_id

It's exactly what it says, where did you define $tag? Also, I'm assuming $id is the $tag->term_id, so you might want to use $id instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.